PageSourceSearch

https://iine-ai.web.app/_next/static/chunks/c4419d733a87324f.js

js iine-ai.web.app collected 2026-10-03 12:26:47 UTC 625,379 bytes, 10 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64899,e=>{"use strict";var t,n=e.i(191788),r=e.i(671185),i=e.i(674534),o=e.i(357006),l=e.i(998657),a=e.i(391398),s="dismissableLayer.update",u=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),c=n.forwardRef((e,c)=>{let{disableOutsidePointerEvents:d=!1,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:x,onDismiss:y,...v}=e,_=n.useContext(u),[b,C]=n.useState(null),T=b?.ownerDocument??globalThis?.document,[,E]=n.useState({}),S=(0,o.useComposedRefs)(c,e=>C(e)),k=Array.from(_.layers),[w]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),N=k.indexOf(w),I=b?k.indexOf(b):-1,A=_.layersWithOutsidePointerEventsDisabled.size>0,M=I>=N,O=function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e),i=n.useRef(!1),o=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let n=function(){h("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);i.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[..._.branches].some(e=>e.contains(t));M&&!n&&(g?.(e),x?.(e),e.defaultPrevented||y?.())},T),D=function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e),i=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!i.current&&h("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;![..._.branches].some(e=>e.contains(t))&&(m?.(e),x?.(e),e.defaultPrevented||y?.())},T);return!function(e,t=globalThis?.document){let r=(0,l.useCallbackRef)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{I===_.layers.size-1&&(p?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},T),n.useEffect(()=>{if(b)return d&&(0===_.layersWithOutsidePointerEventsDisabled.size&&(t=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(b)),_.layers.add(b),f(),()=>{d&&1===_.layersWithOutsidePointerEventsDisabled.size&&(T.body.style.pointerEvents=t)}},[b,T,d,_]),n.useEffect(()=>()=>{b&&(_.layers.delete(b),_.layersWithOutsidePointerEventsDisabled.delete(b),f())},[b,_]),n.useEffect(()=>{let e=()=>E({});return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[]),(0,a.jsx)(i.Primitive.div,{...v,ref:S,style:{pointerEvents:A?M?"auto":"none":void 0,...e.style},onFocusCapture:(0,r.composeEventHandlers)(e.onFocusCapture,D.onFocusCapture),onBlurCapture:(0,r.composeEventHandlers)(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:(0,r.composeEventHandlers)(e.onPointerDownCapture,O.onPointerDownCapture)})});c.displayName="DismissableLayer";var d=n.forwardRef((e,t)=>{let r=n.useContext(u),l=n.useRef(null),s=(0,o.useComposedRefs)(t,l);return n.useEffect(()=>{let e=l.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,a.jsx)(i.Primitive.div,{...e,ref:s})});function f(){let e=new CustomEvent(s);document.dispatchEvent(e)}function h(e,t,n,{discrete:r}){let o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?(0,i.dispatchDiscreteCustomEvent)(o,l):o.dispatchEvent(l)}d.displayName="DismissableLayerBranch",e.s(["Branch",()=>d,"DismissableLayer",()=>c,"Root",()=>c],64899)},437767,e=>{"use strict";var t=e.i(191788),n=e.i(730943),r=e.i(674534),i=e.i(776833),o=e.i(391398),l=t.forwardRef((e,l)=>{let{container:a,...s}=e,[u,c]=t.useState(!1);(0,i.useLayoutEffect)(()=>c(!0),[]);let d=a||u&&globalThis?.document?.body;return d?n.default.createPortal((0,o.jsx)(r.Primitive.div,{...s,ref:l}),d):null});l.displayName="Portal",e.s(["Portal",()=>l])},195600,95963,126477,e=>{"use strict";let t=["top","right","bottom","left"],n=t.reduce((e,t)=>
1e.concat(t,t+"-start",t+"-end"),[]),r=Math.min,i=Math.max,o=Math.round,l=Math.floor,a=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function c(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function p(e){return"y"===e?"height":"width"}let g=new Set(["top","bottom"]);function m(e){return g.has(d(e))?"y":"x"}function x(e,t,n){void 0===n&&(n=!1);let r=f(e),i=h(m(e)),o=p(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=T(l)),[l,T(l)]}function y(e){return e.replace(/start|end/g,e=>u[e])}let v=["left","right"],_=["right","left"],b=["top","bottom"],C=["bottom","top"];function T(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function E(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function S(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function k(e,t,n){let r,{reference:i,floating:o}=e,l=m(t),a=h(m(t)),s=p(a),u=d(t),c="y"===l,g=i.x+i.width/2-o.width/2,x=i.y+i.height/2-o.height/2,y=i[s]/2-o[s]/2;switch(u){case"top":r={x:g,y:i.y-o.height};break;case"bottom":r={x:g,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:x};break;case"left":r={x:i.x-o.width,y:x};break;default:r={x:i.x,y:i.y}}switch(f(t)){case"start":r[a]-=y*(n&&c?-1:1);break;case"end":r[a]+=y*(n&&c?-1:1)}return r}let w=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=k(u,r,s),f=r,h={},p=0;for(let n=0;n<a.length;n++){let{name:o,fn:g}=a[n],{x:m,y:x,data:y,reset:v}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});c=null!=m?m:c,d=null!=x?x:d,h={...h,[o]:{...h[o],...y}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(u=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):v.rects),{x:c,y:d}=k(u,f,s)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function N(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=c(t,e),g=E(p),m=a[h?"floating"===f?"reference":"floating":f],x=S(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:s})),y="floating"===f?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},b=S(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:s}):y);return{top:(x.top-b.top+g.top)/_.y,bottom:(b.bottom-x.bottom+g.bottom)/_.y,left:(x.left-b.left+g.left)/_.x,right:(b.right-x.right+g.right)/_.x}}function I(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function A(e){return t.some(t=>e[t]>=0)}function M(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top));return{x:t,y:n,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-n}}let O=new Set(["left","top"]);async function D(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=d(n),a=f(n),s="y"===m(n),u=O.has(l)?-1:1,h=o&&s?-1:1,p=c(t,e),{mainAxis:g,crossAxis:x,alignmentAxis:y}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&"number"==typeof y&&(x="end"===a?-1*y:y),s?{x:x*h,y:g*u}:{x:g*u,y:x*h}}function R(){return"u">typeof window}function P(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!R()&&(e instanceof Node||e instanceof L(e).Node)}function B(e){return!!R()&&(e instanceof Element||e instanceof L(e).Element)}function V(e){return!!R()&&(e instanceof HTMLElement||e instanceof L(e).HTMLElement)}function z(e){return!(!R()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof L(e).ShadowRoot)}let j=new Set(["inline","contents"]);function W(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ee(e);
1return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!j.has(i)}let K=new Set(["table","td","th"]),H=[":popover-open",":modal"];function U(e){return H.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let J=["transform","translate","scale","rotate","perspective"],Y=["transform","translate","scale","rotate","perspective","filter"],q=["paint","layout","strict","content"];function G(e){let t=X(),n=B(e)?ee(e):e;return J.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Y.some(e=>(n.willChange||"").includes(e))||q.some(e=>(n.contain||"").includes(e))}function X(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Q=new Set(["html","body","#document"]);function Z(e){return Q.has(P(e))}function ee(e){return L(e).getComputedStyle(e)}function et(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if("html"===P(e))return e;let t=e.assignedSlot||e.parentNode||z(e)&&e.host||$(e);return z(t)?t.host:t}function er(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=en(t);return Z(n)?t.ownerDocument?t.ownerDocument.body:t.body:V(n)&&W(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=L(i);if(o){let e=ei(l);return t.concat(l,l.visualViewport||[],W(i)?i:[],e&&n?er(e):[])}return t.concat(i,er(i,[],n))}function ei(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eo(e){let t=ee(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),l=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=o(n)!==l||o(r)!==a;return s&&(n=l,r=a),{width:n,height:r,$:s}}function el(e){return B(e)?e:e.contextElement}function ea(e){let t=el(e);if(!V(t))return a(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:l}=eo(t),s=(l?o(n.width):n.width)/r,u=(l?o(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}let es=a(0);function eu(e){let t=L(e);return X()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:es}function ec(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=el(e),s=a(1);t&&(r?B(r)&&(s=ea(r)):s=ea(e));let u=(void 0===(i=n)&&(i=!1),r&&(!i||r===L(l))&&i)?eu(l):a(0),c=(o.left+u.x)/s.x,d=(o.top+u.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(l){let e=L(l),t=r&&B(r)?L(r):r,n=e,i=ei(n);for(;i&&r&&t!==n;){let e=ea(i),t=i.getBoundingClientRect(),r=ee(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,h*=e.y,c+=o,d+=l,i=ei(n=L(i))}}return S({width:f,height:h,x:c,y:d})}function ed(e,t){let n=et(e).scrollLeft;return t?t.left+n:ec($(e)).left+n}function ef(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ed(e,n),y:n.top+t.scrollTop}}let eh=new Set(["absolute","fixed"]);function ep(e,t,n){var r;let o;if("viewport"===t)o=function(e,t){let n=L(e),r=$(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,s=0;if(i){o=i.width,l=i.height;let e=X();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,s=i.offsetTop)}let u=ed(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-i);l<=25&&(o-=l)}else u<=25&&(o+=u);return{width:o,height:l,x:a,y:s}}(e,n);else if("document"===t){let t,n,l,a,s,u,c;r=$(e),t=$(r),n=et(r),l=r.ownerDocument.body,a=i(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=i(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight),u=-n.scrollLeft+ed(r),c=-n.scrollTop,"rtl"===ee(l).direction&&(u+=i(t.clientWidth,l.clientWidth)-a),o={width:a,height:s,x:u,y:c}}else if(B(t)){let e,r,i,l,s,u;r=(e=ec(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=V(t)?ea(t):a(1),s=t.clientWidth*l.x,u=t.clientHeight*l.y,o={width:s,height:u,x:i*l.x,y:r*l.y}}else{let n=eu(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(o)}function eg(e){return"static"===ee(e).position}function em(e,t){if(!V(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let n=e.offsetParent;return $(e)===n&&(n=n.ownerDocument.body),n}function ex(e,t){var n;let r=L(e);if(U(e))return r;if(!V(e)){let t=en(e);for(;t&&!Z(t);){if(B(t)&&!eg(t))return t;t=en(t)}return r}let i=em(e,t);for(;i&&(n=i,K.has(P(n)))&&eg(i);)i=em(i,t);return i&&Z(i)&&eg(i)&&!G(i)?r:i||function(e){let t=en(e);for(;V(t)&&!Z(t);){if(G(t))return t;if(U(t))break;t=en(t)}return null}(e)||r}let ey=async function(e){let t=this.getOffsetParent||ex,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=V(t),i=$(t),o="fixed"===n,l=ec(e,!0,o,t),s={scrollLeft:0,scrollTop:0},u=a(0);if(r||!r&&!o)if(("body"!==P(t)||W(i))&&(s=et(t)),r){let e=ec(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else i&&(u.x=ed(i));o&&!r&&i&&(u.x=ed(i));let c=!i||r||o?a(0):ef(i,s);return{x:l.left+s.scrollLeft-u.x-c.x,y:l.top+s.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ev={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=$(r),s=!!t&&U(t.floating);if(r===l||s&&o)return n;let u={scrollLeft:0,scrollTop:0},c=a(1),d=a(0),f=V(r);if((f||!f&&!o)&&(("body"!==P(r)||W(l))&&(u=et(r)),V(r))){let e=ec(r);c=ea(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let h=!l||f||o?a(0):ef(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-u.scrollTop*c.y+d.y+h.y}},getDocumentElement:$,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e,a=[..."clippingAncestors"===n?U(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=er(e,[],!1).filter(e=>B(e)&&"body"!==P(e)),i=null,o="fixed"===ee(e).position,l=o?en(e):e;for(;B(l)&&!Z(l);){let t=ee(l),n=G(l);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&eh.has(i.position)||W(l)&&!n&&function e(t,n){let r=en(t);return!(r===n||!B(r)||Z(r))&&("fixed"===ee(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):i=t,l=en(l)}return t.set(e,r),r}(t,this._c):[].concat(n),o],s=a[0],u=a.reduce((e,n)=>{let o=ep(t,n,l);return e.top=i(o.top,e.top),e.right=r(o.right,e.right),e.bottom=r(o.bottom,e.bottom),e.left=i(o.left,e.left),e},ep(t,s,l));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:ex,getElementRects:ey,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eo(e);return{width:t,height:n}},getScale:ea,isElement:B,isRTL:function(e){return"rtl"===ee(e).direction}};function e_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eb(e,t,n,o){let a;void 0===o&&(o={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=o,h=el(e),p=s||u?[...h?er(h):[],...er(t)]:[];
1p.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let g=h&&d?function(e,t){let n,o=null,a=$(e);function s(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),s();let f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:m}=f;if(c||t(),!g||!m)return;let x={rootMargin:-l(p)+"px "+-l(a.clientWidth-(h+g))+"px "+-l(a.clientHeight-(p+m))+"px "+-l(h)+"px",threshold:i(0,r(1,d))||1},y=!0;function v(t){let r=t[0].intersectionRatio;if(r!==d){if(!y)return u();r?u(!1,r):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==r||e_(f,e.getBoundingClientRect())||u(),y=!1}try{o=new IntersectionObserver(v,{...x,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(v,x)}o.observe(e)}(!0),s}(h,n):null,m=-1,x=null;c&&(x=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=x)||e.observe(t)})),n()}),h&&!f&&x.observe(h),x.observe(t));let y=f?ec(e):null;return f&&function t(){let r=ec(e);y&&!e_(y,r)&&n(),y=r,a=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=x)||e.disconnect(),x=null,f&&cancelAnimationFrame(a)}}let eC=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:l,middlewareData:a}=t,s=await D(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:l}}}}},eT=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,o,l;let{rects:a,middlewareData:s,placement:u,platform:h,elements:p}=t,{crossAxis:g=!1,alignment:m,allowedPlacements:v=n,autoAlignment:_=!0,...b}=c(e,t),C=void 0!==m||v===n?((l=m||null)?[...v.filter(e=>f(e)===l),...v.filter(e=>f(e)!==l)]:v.filter(e=>d(e)===e)).filter(e=>!l||f(e)===l||!!_&&y(e)!==e):v,T=await N(t,b),E=(null==(r=s.autoPlacement)?void 0:r.index)||0,S=C[E];if(null==S)return{};let k=x(S,a,await (null==h.isRTL?void 0:h.isRTL(p.floating)));if(u!==S)return{reset:{placement:C[0]}};let w=[T[d(S)],T[k[0]],T[k[1]]],I=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:S,overflows:w}],A=C[E+1];if(A)return{data:{index:E+1,overflows:I},reset:{placement:A}};let M=I.map(e=>{let t=f(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),O=(null==(o=M.filter(e=>e[2].slice(0,f(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||M[0][0];return O!==u?{data:{index:E+1,overflows:I},reset:{placement:O}}:{}}}},eE=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:l}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=c(e,t),p={x:n,y:o},g=await N(t,f),x=m(d(l)),y=h(x),v=p[y],_=p[x];if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=v+g[e],o=v-g[t];v=i(n,r(v,o))}if(s){let e="y"===x?"top":"left",t="y"===x?"bottom":"right",n=_+g[e],o=_-g[t];_=i(n,r(_,o))}let b=u.fn({...t,[y]:v,[x]:_});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[y]:a,[x]:s}}}}}},eS=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,l;let a,s,u,{placement:h,middlewareData:p,rects:g,initialPlacement:E,platform:S,elements:k}=t,{mainAxis:w=!0,crossAxis:I=!0,fallbackPlacements:A,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:D=!0,...R}=c(e,t);if(null!=(n=p.arrow)&&n.alignmentOffset)return{};let P=d(h),L=m(E),$=d(E)===E,F=await (null==S.isRTL?void 0:S.isRTL(k.floating)),B=A||($||!D?[T(E)]:(a=T(E),[y(E),a,y(a)])),V="none"!==O;!A&&V&&B.push(...(s=f(E),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?_:v;return t?v:_;case"left":case"right":return t?b:C;default:return[]}}(d(E),"start"===O,F),s&&(u=u.map(e=>e+"-"+s),D&&(u=u.concat(u.map(y)))),u));let z=[E,...B],j=await N(t,R),W=[],K=(null==(r=p.flip)?void 0:r.overflows)||[];if(w&&W.push(j[P]),I){let e=x(h,g,F);W.push(j[e[0]],j[e[1]])}if(K=[...K,{placement:h,overflows:W}],!W.every(e=>e<=0)){let e=((null==(i=p.flip)?void 0:i.index)||0)+1,t=z[e];if(t&&("alignment"!==I||L===m(t)||K.every(e=>m(e.placement)!==L||e.overflows[0]>0)))return{data:{index:e,overflows:K},reset:{placement:t}};let n=null==(o=K.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(M){case"bestFit":{let e=null==(l=K.filter(e=>{if(V){let t=m(e.placement);return t===L||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=E}if(h!==n)return{reset:{placement:n}}}return{}}}},ek=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;let l,a,{placement:s,rects:u,platform:h,elements:p}=t,{apply:g=()=>{},...x}=c(e,t),y=await N(t,x),v=d(s),_=f(s),b="y"===m(s),{width:C,height:T}=u.floating;"top"===v||"bottom"===v?(l=v,a=_===(await (null==h.isRTL?void 0:h.isRTL(p.floating))?"start":"end")?"left":"right"):(a=v,l="end"===_?"top":"bottom");let E=T-y.top-y.bottom,S=C-y.left-y.right,k=r(T-y[l],E),w=r(C-y[a],S),I=!t.middlewareData.shift,A=k,M=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(M=S),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(A=E),I&&!_){let e=i(y.left,0),t=i(y.right,0),n=i(y.top,0),r=i(y.bottom,0);b?M=C-2*(0!==e||0!==t?e+t:i(y.left,y.right)):A=T-2*(0!==n||0!==r?n+r:i(y.top,y.bottom))}await g({...t,availableWidth:M,availableHeight:A});let O=await h.getDimensions(p.floating);return C!==O.width||T!==O.height?{reset:{rects:!0}}:{}}}},ew=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=c(e,t);switch(r){case"referenceHidden":{let e=I(await N(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{let e=I(await N(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}},eN=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:l,rects:a,platform:s,elements:u,middlewareData:d}=t,{element:g,padding:x=0}=c(e,t)||{};if(null==g)return{};let y=E(x),v={x:n,y:o},_=h(m(l)),b=p(_),C=await s.getDimensions(g),T="y"===_,S=T?"clientHeight":"clientWidth",k=a.reference[b]+a.reference[_]-v[_]-a.floating[b],w=v[_]-a.reference[_],N=await (null==s.getOffsetParent?void 0:s.getOffsetParent(g)),I=N?N[S]:0;I&&await (null==s.isElement?void 0:s.isElement(N))||(I=u.floating[S]||a.floating[b]);let A=I/2-C[b]/2-1,M=r(y[T?"top":"left"],A),O=r(y[T?"bottom":"right"],A),D=I-C[b]-O,R=I/2-C[b]/2+(k/2-w/2),P=i(M,r(R,D)),L=!d.arrow&&null!=f(l)&&R!==P&&a.reference[b]/2-(R<M?M:O)-C[b]/2<0,$=L?R<M?R-M:R-D:0;return{[_]:v[_]+$,data:{[_]:P,centerOffset:R-P-$,...L&&{alignmentOffset:$}},reset:L}}}),eI=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:o,rects:l,platform:a,strategy:s}=t,{padding:u=2,x:f,y:h}=c(e,t),p=Array.from(await (null==a.getClientRects?void 0:a.getClientRects(o.reference))||[]),g=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>S(M(e)))}(p),x=S(M(p)),y=E(u),v=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&g[0].left>g[1].right&&null!=f&&null!=h)return g.find(e=>f>e.left-y.left&&f<e.right+y.right&&h>e.top-y.top&&h<e.bottom+y.bottom)||x;if(g.length>=2){if("y"===m(n)){let e=g[0],t=g[g.length-1],r="top"===d(n),i=e.top,o=t.bottom,l=r?e.left:t.left,a=r?e.right:t.right;return{top:i,bottom:o,left:l,right:a,width:a-l,height:o-i,x:l,y:i}}let e="left"===d(n),t=i(...g.map(e=>e.right)),o=r(...g.map(e=>e.left)),l=g.filter(n=>e?n.left===o:n.right===t),a=l[0].top,s=l[l.length-1].bottom;return{top:a,bottom:s,left:o,right:t,width:t-o,height:s-a,x:o,y:a}}return x}},floating:o.floating,strategy:s});return l.reference.x!==v.reference.x||l.reference.y!==v.reference.y||l.reference.width!==v.reference.width||l.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},eA=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=c(e,t),f={x:n,y:r},p=m(i),g=h(p),x=f[g],y=f[p],v=c(a,t),_="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){let e="y"===g?"height":"width",t=o.reference[g]-o.floating[e]+_.mainAxis,n=o.reference[g]+o.reference[e]-_.mainAxis;x<t?x=t:x>n&&(x=n)}if(u){var b,C;let e="y"===g?"width":"height",t=O.has(d(i)),n=o.reference[p]-o.floating[e]+(t&&(null==(b=l.offset)?void 0:b[p])||0)+(t?0:_.crossAxis),r=o.reference[p]+o.reference[e]+(t?0:(null==(C=l.offset)?void 0:C[p])||0)-(t?_.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[g]:x,[p]:y}}}},eM=(e,t,n)=>{let r=new Map,i={platform:ev,...n},o={...i.platform,_c:r};return w(e,t,{...i,platform:o})};e.s(["arrow",()=>eN,"autoPlacement",()=>eT,"autoUpdate",()=>eb,"computePosition",()=>eM,"flip",()=>eS,"hide",()=>ew,"inline",()=>eI,"limitShift",()=>eA,"offset",()=>eC,"shift",()=>eE,"size",()=>ek],95963);var eO=e.i(191788),eD=e.i(730943),eR="u">typeof document?eO.useLayoutEffect:function(){};function eP(e,t){let n,r,i;if(e===t)return!0;
vendor: 2,277 bytes, line 1
1if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eP(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!eP(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eL(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e$(e,t){let n=eL(e);return Math.round(t*n)/n}function eF(e){let t=eO.useRef(e);return eR(()=>{t.current=e}),t}function eB(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:s,open:u}=e,[c,d]=eO.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=eO.useState(r);eP(f,r)||h(r);let[p,g]=eO.useState(null),[m,x]=eO.useState(null),y=eO.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),v=eO.useCallback(e=>{e!==T.current&&(T.current=e,x(e))},[]),_=o||p,b=l||m,C=eO.useRef(null),T=eO.useRef(null),E=eO.useRef(c),S=null!=s,k=eF(s),w=eF(i),N=eF(u),I=eO.useCallback(()=>{if(!C.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};w.current&&(e.platform=w.current),eM(C.current,T.current,e).then(e=>{let t={...e,isPositioned:!1!==N.current};A.current&&!eP(E.current,t)&&(E.current=t,eD.flushSync(()=>{d(t)}))})},[f,t,n,w,N]);eR(()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let A=eO.useRef(!1);eR(()=>(A.current=!0,()=>{A.current=!1}),[]),eR(()=>{if(_&&(C.current=_),b&&(T.current=b),_&&b){if(k.current)return k.current(_,b,I);I()}},[_,b,I,k,S]);let M=eO.useMemo(()=>({reference:C,floating:T,setReference:y,setFloating:v}),[y,v]),O=eO.useMemo(()=>({reference:_,floating:b}),[_,b]),D=eO.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=e$(O.floating,c.x),r=e$(O.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...eL(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,O.floating,c.x,c.y]);return eO.useMemo(()=>
1({...c,update:I,refs:M,elements:O,floatingStyles:D}),[c,I,M,O,D])}let eV=(e,t)=>({...eC(e),options:[e,t]}),ez=(e,t)=>({...eE(e),options:[e,t]}),ej=(e,t)=>({...eA(e),options:[e,t]}),eW=(e,t)=>({...eS(e),options:[e,t]}),eK=(e,t)=>({...ek(e),options:[e,t]}),eH=(e,t)=>({...ew(e),options:[e,t]}),eU=(e,t)=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eN({element:n.current,padding:r}).fn(t):{}:n?eN({element:n,padding:r}).fn(t):{}},options:[e,t]});e.s(["arrow",()=>eU,"flip",()=>eW,"hide",()=>eH,"limitShift",()=>ej,"offset",()=>eV,"shift",()=>ez,"size",()=>eK,"useFloating",()=>eB],195600);var eJ=e.i(674534),eY=e.i(391398),eq=eO.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,eY.jsx)(eJ.Primitive.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eY.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eq.displayName="Arrow",e.s(["Root",()=>eq],126477)},474864,e=>{"use strict";var t=e.i(191788),n=e.i(776833);function r(e){let[r,i]=t.useState(void 0);return(0,n.useLayoutEffect)(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,r;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,r=t.blockSize}else n=e.offsetWidth,r=e.offsetHeight;i({width:n,height:r})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),r}e.s(["useSize",()=>r])},746359,e=>{"use strict";var t=e.i(191788),n=e.i(195600),r=e.i(95963),i=e.i(126477),o=e.i(357006),l=e.i(479293),a=e.i(674534),s=e.i(998657),u=e.i(776833),c=e.i(474864),d=e.i(391398),f="Popper",[h,p]=(0,l.createContextScope)(f),[g,m]=h(f),x=e=>{let{__scopePopper:n,children:r}=e,[i,o]=t.useState(null);return(0,d.jsx)(g,{scope:n,anchor:i,onAnchorChange:o,children:r})};x.displayName=f;var y="PopperAnchor",v=t.forwardRef((e,n)=>{let{__scopePopper:r,virtualRef:i,...l}=e,s=m(y,r),u=t.useRef(null),c=(0,o.useComposedRefs)(n,u),f=t.useRef(null);return t.useEffect(()=>{let e=f.current;f.current=i?.current||u.current,e!==f.current&&s.onAnchorChange(f.current)}),i?null:(0,d.jsx)(a.Primitive.div,{...l,ref:c})});v.displayName=y;var _="PopperContent",[b,C]=h(_),T=t.forwardRef((e,i)=>{let{__scopePopper:l,side:f="bottom",sideOffset:h=0,align:p="center",alignOffset:g=0,arrowPadding:x=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:C=0,sticky:T="partial",hideWhenDetached:E=!1,updatePositionStrategy:S="optimized",onPlaced:k,...A}=e,M=m(_,l),[O,D]=t.useState(null),R=(0,o.useComposedRefs)(i,e=>D(e)),[P,L]=t.useState(null),$=(0,c.useSize)(P),F=$?.width??0,B=$?.height??0,V="number"==typeof C?C:{top:0,right:0,bottom:0,left:0,...C},z=Array.isArray(v)?v:[v],j=z.length>0,W={padding:V,boundary:z.filter(w),altBoundary:j},{refs:K,floatingStyles:H,placement:U,isPositioned:J,middlewareData:Y}=(0,n.useFloating)({strategy:"fixed",placement:f+("center"!==p?"-"+p:""),whileElementsMounted:(...e)=>(0,r.autoUpdate)(...e,{animationFrame:"always"===S}),elements:{reference:M.anchor},middleware:[(0,n.offset)({mainAxis:h+B,alignmentAxis:g}),y&&(0,n.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===T?(0,n.limitShift)():void 0,...W}),y&&(0,n.flip)({...W}),(0,n.size)({...W,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${i}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),P&&(0,n.arrow)({element:P,padding:x}),N({arrowWidth:F,arrowHeight:B}),E&&(0,n.hide)({strategy:"referenceHidden",...W})]}),[q,G]=I(U),X=(0,s.useCallbackRef)(k);(0,u.useLayoutEffect)(()=>{J&&X?.()},[J,X]);let Q=Y.arrow?.x,Z=Y.arrow?.y,ee=Y.arrow?.centerOffset!==0,[et,en]=t.useState();return(0,u.useLayoutEffect)(()=>{O&&en(window.getComputedStyle(O).zIndex)},[O]),(0,d.jsx)("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:J?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,d.jsx)(b,{scope:l,placedSide:q,onArrowChange:L,arrowX:Q,arrowY:Z,shouldHideArrow:ee,children:(0,d.jsx)(a.Primitive.div,{"data-side":q,"data-align":G,...A,ref:R,style:{...A.
1style,animation:J?void 0:"none"}})})})});T.displayName=_;var E="PopperArrow",S={top:"bottom",right:"left",bottom:"top",left:"right"},k=t.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=C(E,n),l=S[o.placedSide];return(0,d.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,d.jsx)(i.Root,{...r,ref:t,style:{...r.style,display:"block"}})})});function w(e){return null!==e}k.displayName=E;var N=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,l=o?0:e.arrowWidth,a=o?0:e.arrowHeight,[s,u]=I(n),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+l/2,f=(i.arrow?.y??0)+a/2,h="",p="";return"bottom"===s?(h=o?c:`${d}px`,p=`${-a}px`):"top"===s?(h=o?c:`${d}px`,p=`${r.floating.height+a}px`):"right"===s?(h=`${-a}px`,p=o?c:`${f}px`):"left"===s&&(h=`${r.floating.width+a}px`,p=o?c:`${f}px`),{data:{x:h,y:p}}}});function I(e){let[t,n="center"]=e.split("-");return[t,n]}e.s(["Anchor",()=>v,"Arrow",()=>k,"Content",()=>T,"Root",()=>x,"createPopperScope",()=>p])},10109,e=>{"use strict";var t=e.i(191788),n=e.i(671185),r=e.i(357006),i=e.i(479293),o=e.i(64899),l=e.i(64592),a=e.i(746359),s=e.i(437767),u=e.i(993953),c=e.i(674534),d=e.i(817549),f=e.i(55037),h=e.i(391398),p=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),g=t.forwardRef((e,t)=>(0,h.jsx)(c.Primitive.span,{...e,ref:t,style:{...p,...e.style}}));g.displayName="VisuallyHidden";var[m,x]=(0,i.createContextScope)("Tooltip",[a.createPopperScope]),y=(0,a.createPopperScope)(),v="TooltipProvider",_="tooltip.open",[b,C]=m(v),T=e=>{let{__scopeTooltip:n,delayDuration:r=700,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=e,a=t.useRef(!0),s=t.useRef(!1),u=t.useRef(0);return t.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,h.jsx)(b,{scope:n,isOpenDelayedRef:a,delayDuration:r,onOpen:t.useCallback(()=>{window.clearTimeout(u.current),a.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,i)},[i]),isPointerInTransitRef:s,onPointerInTransitChange:t.useCallback(e=>{s.current=e},[]),disableHoverableContent:o,children:l})};T.displayName=v;var E="Tooltip",[S,k]=m(E),w=e=>{let{__scopeTooltip:n,children:r,open:i,defaultOpen:o,onOpenChange:s,disableHoverableContent:u,delayDuration:c}=e,d=C(E,e.__scopeTooltip),p=y(n),[g,m]=t.useState(null),x=(0,l.useId)(),v=t.useRef(0),b=u??d.disableHoverableContent,T=c??d.delayDuration,k=t.useRef(!1),[w,N]=(0,f.useControllableState)({prop:i,defaultProp:o??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(_))):d.onClose(),s?.(e)},caller:E}),I=t.useMemo(()=>w?k.current?"delayed-open":"instant-open":"closed",[w]),A=t.useCallback(()=>{window.clearTimeout(v.current),v.current=0,k.current=!1,N(!0)},[N]),M=t.useCallback(()=>{window.clearTimeout(v.current),v.current=0,N(!1)},[N]),O=t.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{k.current=!0,N(!0),v.current=0},T)},[T,N]);return t.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),(0,h.jsx)(a.Root,{...p,children:(0,h.jsx)(S,{scope:n,contentId:x,open:w,stateAttribute:I,trigger:g,onTriggerChange:m,onTriggerEnter:t.useCallback(()=>{d.isOpenDelayedRef.current?O():A()},[d.isOpenDelayedRef,O,A]),onTriggerLeave:t.useCallback(()=>{b?M():(window.clearTimeout(v.current),v.current=0)},[M,b]),onOpen:A,onClose:M,disableHoverableContent:b,children:r})})};w.displayName=E;var N="TooltipTrigger",I=t.forwardRef((e,i)=>{let{__scopeTooltip:o,...l}=e,s=k(N,o),u=C(N,o),d=y(o),f=t.useRef(null),p=(0,r.useComposedRefs)(i,f,s.onTriggerChange),g=t.useRef(!1),m=t.useRef(!1),x=t.useCallback(()=>g.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),(0,h.jsx)(a.Anchor,{asChild:!0,...d,children:(0,h.jsx)(c.Primitive.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...l,ref:p,onPointerMove:(0,n.composeEventHandlers)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||u.isPointerInTransitRef.current||(s.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,n.composeEventHandlers)(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:(0,n.composeEventHandlers)(e.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{g.current||s.onOpen()}
1),onBlur:(0,n.composeEventHandlers)(e.onBlur,s.onClose),onClick:(0,n.composeEventHandlers)(e.onClick,s.onClose)})})});I.displayName=N;var A="TooltipPortal",[M,O]=m(A,{forceMount:void 0}),D=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=k(A,t);return(0,h.jsx)(M,{scope:t,forceMount:n,children:(0,h.jsx)(u.Presence,{present:n||o.open,children:(0,h.jsx)(s.Portal,{asChild:!0,container:i,children:r})})})};D.displayName=A;var R="TooltipContent",P=t.forwardRef((e,t)=>{let n=O(R,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=k(R,e.__scopeTooltip);return(0,h.jsx)(u.Presence,{present:r||l.open,children:l.disableHoverableContent?(0,h.jsx)(V,{side:i,...o,ref:t}):(0,h.jsx)(L,{side:i,...o,ref:t})})}),L=t.forwardRef((e,n)=>{let i=k(R,e.__scopeTooltip),o=C(R,e.__scopeTooltip),l=t.useRef(null),a=(0,r.useComposedRefs)(n,l),[s,u]=t.useState(null),{trigger:c,onClose:d}=i,f=l.current,{onPointerInTransitChange:p}=o,g=t.useCallback(()=>{u(null),p(!1)},[p]),m=t.useCallback((e,t)=>{let n,r=e.currentTarget,i={x:e.clientX,y:e.clientY},o=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(i,r.getBoundingClientRect());u(((n=[...function(e,t,n=5){let r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(i,o),...function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(n))),p(!0)},[p]);return t.useEffect(()=>()=>g(),[g]),t.useEffect(()=>{if(c&&f){let e=e=>m(e,f),t=e=>m(e,c);return c.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[c,f,m,g]),t.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||f?.contains(t),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let l=t[e],a=t[o],s=l.x,u=l.y,c=a.x,d=a.y;u>r!=d>r&&n<(c-s)*(r-u)/(d-u)+s&&(i=!i)}return i}(n,s);r?g():i&&(g(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,f,s,d,g]),(0,h.jsx)(V,{...e,ref:a})}),[$,F]=m(E,{isInside:!1}),B=(0,d.createSlottable)("TooltipContent"),V=t.forwardRef((e,n)=>{let{__scopeTooltip:r,children:i,"aria-label":l,onEscapeKeyDown:s,onPointerDownOutside:u,...c}=e,d=k(R,r),f=y(r),{onClose:p}=d;return t.useEffect(()=>(document.addEventListener(_,p),()=>document.removeEventListener(_,p)),[p]),t.useEffect(()=>{if(d.trigger){let e=e=>{let t=e.target;t?.contains(d.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,p]),(0,h.jsx)(o.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,h.jsxs)(a.Content,{"data-state":d.stateAttribute,...f,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,h.jsx)(B,{children:i}),(0,h.jsx)($,{scope:r,isInside:!0,children:(0,h.jsx)(g,{id:d.contentId,role:"tooltip",children:l||i})})]})})});P.displayName=R;var z="TooltipArrow",j=t.forwardRef((e,t)=>
1{let{__scopeTooltip:n,...r}=e,i=y(n);return F(z,n).isInside?null:(0,h.jsx)(a.Arrow,{...i,...r,ref:t})});j.displayName=z,e.s(["Arrow",()=>j,"Content",()=>P,"Portal",()=>D,"Provider",()=>T,"Root",()=>w,"Trigger",()=>I],10109)},592893,e=>{"use strict";let t;var n=e.i(191788),r=e.i(357006),i=e.i(674534),o=e.i(998657),l=e.i(391398),a="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",u={bubbles:!1,cancelable:!0},c=n.forwardRef((e,t)=>{let{loop:c=!1,trapped:g=!1,onMountAutoFocus:m,onUnmountAutoFocus:x,...y}=e,[v,_]=n.useState(null),b=(0,o.useCallbackRef)(m),C=(0,o.useCallbackRef)(x),T=n.useRef(null),E=(0,r.useComposedRefs)(t,e=>_(e)),S=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(g){let e=function(e){if(S.paused||!v)return;let t=e.target;v.contains(t)?T.current=t:h(T.current,{select:!0})},t=function(e){if(S.paused||!v)return;let t=e.relatedTarget;null!==t&&(v.contains(t)||h(T.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&h(v)});return v&&n.observe(v,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[g,v,S.paused]),n.useEffect(()=>{if(v){p.add(S);let e=document.activeElement;if(!v.contains(e)){let t=new CustomEvent(a,u);v.addEventListener(a,b),v.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(h(r,{select:t}),document.activeElement!==n)return}(d(v).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&h(v))}return()=>{v.removeEventListener(a,b),setTimeout(()=>{let t=new CustomEvent(s,u);v.addEventListener(s,C),v.dispatchEvent(t),t.defaultPrevented||h(e??document.body,{select:!0}),v.removeEventListener(s,C),p.remove(S)},0)}}},[v,b,C,S]);let k=n.useCallback(e=>{if(!c&&!g||S.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){var r;let t,i=e.currentTarget,[o,l]=[f(t=d(r=i),r),f(t.reverse(),r)];o&&l?e.shiftKey||n!==l?e.shiftKey&&n===o&&(e.preventDefault(),c&&h(l,{select:!0})):(e.preventDefault(),c&&h(o,{select:!0})):n===i&&e.preventDefault()}},[c,g,S.paused]);return(0,l.jsx)(i.Primitive.div,{tabIndex:-1,...y,ref:E,onKeyDown:k})});function d(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function f(e,t){for(let n of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function h(e,{select:t=!1}={}){if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}c.displayName="FocusScope";var p=(t=[],{add(e){let n=t[0];e!==n&&n?.pause(),(t=g(t,e)).unshift(e)},remove(e){t=g(t,e),t[0]?.resume()}});function g(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}e.s(["FocusScope",()=>c])},908525,e=>{"use strict";var t=e.i(191788),n=0;function r(){t.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i()),document.body.insertAdjacentElement("beforeend",e[1]??i()),n++,()=>{1===n&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),n--}},[])}function i(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",()=>r])},865823,189280,e=>{"use strict";var t,n,r,i,o,l,a,s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}
1function c(e,t,n,r){return new(n||(n=Promise))(function(i,o){function l(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(l,a)}s((r=r.apply(e,t||[])).next())})}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,e.s(["__assign",()=>s,"__awaiter",()=>c,"__rest",()=>u,"__spreadArray",()=>d],189280);var f=e.i(191788),h="right-scroll-bar-position",p="width-before-scroll-bar";function g(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var m="u">typeof window?f.useLayoutEffect:f.useEffect,x=new WeakMap,y=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],i=!1,o={read:function(){if(i)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,i);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(i=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){i=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var o=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(o)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}}).options=s({async:!0,ssr:!1},t),o),v=function(){},_=f.forwardRef(function(e,t){var n,r,i,o,l=f.useRef(null),a=f.useState({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:v}),c=a[0],d=a[1],h=e.forwardProps,p=e.children,_=e.className,b=e.removeScrollBar,C=e.enabled,T=e.shards,E=e.sideCar,S=e.noRelative,k=e.noIsolation,w=e.inert,N=e.allowPinchZoom,I=e.as,A=e.gapMode,M=u(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=(n=[l,t],r=function(e){return n.forEach(function(t){return g(t,e)})},(i=(0,f.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,o=i.facade,m(function(){var e=x.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||g(e,null)}),r.forEach(function(e){t.has(e)||g(e,i)})}x.set(o,n)},[n]),o),D=s(s({},M),c);return f.createElement(f.Fragment,null,C&&f.createElement(E,{sideCar:y,removeScrollBar:b,shards:T,noRelative:S,noIsolation:k,inert:w,setCallbacks:d,allowPinchZoom:!!N,lockRef:l,gapMode:A}),h?f.cloneElement(f.Children.only(p),s(s({},D),{ref:O})):f.createElement(void 0===I?"div":I,s({},D,{className:_,ref:O}),p))});_.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_.classNames={fullWidth:p,zeroRight:h};var b=function(e){var t=e.sideCar,n=u(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return f.createElement(r,s({},n))};b.isSideCarExport=!0;var C=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,i;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T=function(){var e=C();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},E=function(){var e=T();return function(t){return e(t.styles,t.dynamic),null}},S={left:0,top:0,right:0,gap:0},k=function(e){return parseInt(e||"",10)||0},w=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[k(n),k(r),k(i)]},N=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return S;var t=w(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},I=E(),A="data-scroll-locked",M=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(a,"px ").concat(r,";\n  }\n  body[").concat(A,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(o,"px;\n    padding-right: ").concat(l,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(a,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";
1")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(h," {\n    right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(p," {\n    margin-right: ").concat(a,"px ").concat(r,";\n  }\n  \n  .").concat(h," .").concat(h," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(p," .").concat(p," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(A,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n  }\n")},O=function(){var e=parseInt(document.body.getAttribute(A)||"0",10);return isFinite(e)?e:0},D=function(){f.useEffect(function(){return document.body.setAttribute(A,(O()+1).toString()),function(){var e=O()-1;e<=0?document.body.removeAttribute(A):document.body.setAttribute(A,e.toString())}},[])},R=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;D();var o=f.useMemo(function(){return N(i)},[i]);return f.createElement(I,{styles:M(o,!t,i,n?"":"!important")})},P=!1;if("u">typeof window)try{var L=Object.defineProperty({},"passive",{get:function(){return P=!0,!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch(e){P=!1}var $=!!P&&{passive:!1},F=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},B=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),V(e,r)){var i=z(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},V=function(e,t){return"v"===e?F(t,"overflowY"):F(t,"overflowX")},z=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},j=function(e,t,n,r,i){var o,l=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=l*r,s=n.target,u=t.contains(s),c=!1,d=a>0,f=0,h=0;do{if(!s)break;var p=z(e,s),g=p[0],m=p[1]-p[2]-l*g;(g||m)&&V(e,s)&&(f+=m,h+=g);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(i&&1>Math.abs(f)||!i&&a>f)?c=!0:!d&&(i&&1>Math.abs(h)||!i&&-a>h)&&(c=!0),c},W=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},K=function(e){return[e.deltaX,e.deltaY]},H=function(e){return e&&"current"in e?e.current:e},U=0,J=[];let Y=(l=function(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),i=f.useState(U++)[0],o=f.useState(E)[0],l=f.useRef(e);f.useEffect(function(){l.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=d([e.lockRef.current],(e.shards||[]).map(H),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var i,o=W(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),h=f&&f.anchorNode;if(h&&(h===c||h.contains(c)))return!1;var p=B(d,c);if(!p)return!0;if(p?i=d:(i="v"===d?"h":"v",p=B(d,c)),!p)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var g=r.current||i;return j(g,t,e,"h"===g?s:u,!0)},[]),s=f.useCallback(function(e){if(J.length&&J[J.length-1]===o){var n="deltaY"in e?K(e):W(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(l.current.shards||[]).map(H).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?a(e,i[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=f.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=f.useCallback(function(e){n.current=W(e),r.current=void 0},[]),h=f.useCallback(function(t){u(t.type,K(t),t.target,a(t,e.lockRef.current))},[]),p=f.useCallback(function(t){u(t.type,W(t),t.target,a(t,e.lockRef.current))},[]);f.useEffect(function(){return J.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",s,$),document.addEventListener("touchmove",s,$),document.addEventListener("touchstart",c,$),function(){J=J.filter(function(e){return e!==o}),document.removeEventListener("wheel",s,$),document.removeEventListener("touchmove",s,$),document.removeEventListener("touchstart",c,$)}},[]);var g=e.removeScrollBar,m=e.inert;return f.createElement(f.Fragment,null,m?f.createElement(o,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,g?f.createElement(R,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},y.useMedium(l),b);var q=f.forwardRef(function(e,t){return f.createElement(_,s({},e,{ref:t,sideCar:Y}))});q.classNames=_.classNames,e.s(["RemoveScroll",0,q],865823)},369131,e=>{"use strict";var t=new WeakMap,n=new WeakMap,r={},i=0,o=function(e){return e&&(e.host||o(e.parentNode))},l=function(e,l,a,s){var u=(Array.isArray(e)?e:[e]).map(function(e){if(l.contains(e))return e;var t=o(e);return t&&l.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",l,". Doing nothing"),null)}).filter(function(e){return!!e});r[a]||(r[a]=new WeakMap);var c=r[a],d=[],f=new Set,h=new Set(u),p=function(e){!e||f.has(e)||(f.add(e),p(e.parentNode))};u.forEach(p);var g=function(e){!e||h.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))g(e);else try{var r=e.getAttribute(s),i=null!==r&&"false"!==r,o=(t.get(e)||0)+1,l=(c.get(e)||0)+1;t.set(e,o),c.set(e,l),d.push(e),1===o&&i&&n.set(e,!0),1===l&&e.setAttribute(a,"true"),i||e.setAttribute(s,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return g(l),f.clear(),i++,function(){d.forEach(function(e){var r=t.get(e)-1,i=c.get(e)-1;t.set(e,r),c.set(e,i),r||(n.has(e)||e.removeAttribute(s),n.delete(e)),i||e.removeAttribute(a)}),--i||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}},a=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),l(r,i,n,"aria-hidden")):function(){return null}};e.s(["hideOthers",()=>a])},135598,e=>{"use strict";var t=e.i(191788),n=e.i(671185),r=e.i(357006),i=e.i(479293),o=e.i(64592),l=e.i(55037),a=e.i(64899),s=e.i(592893),u=e.i(437767),c=e.i(993953),d=e.i(674534),f=e.i(908525),h=e.i(865823),p=e.i(369131),g=e.i(817549),m=e.i(391398),x="Dialog",[y,v]=(0,i.createContextScope)(x),[_,b]=y(x),C=e=>{let{__scopeDialog:n,children:r,open:i,defaultOpen:a,onOpenChange:s,modal:u=!0}=e,c=t.useRef(null),d=t.useRef(null),[f,h]=(0,l.useControllableState)({prop:i,defaultProp:a??!1,onChange:s,caller:x});return(0,m.jsx)(_,{scope:n,triggerRef:c,contentRef:d,contentId:(0,o.useId)(),titleId:(0,o.useId)(),descriptionId:(0,o.useId)(),open:f,onOpenChange:h,onOpenToggle:t.useCallback(()=>h(e=>!e),[h]),modal:u,children:r})};C.displayName=x;var T="DialogTrigger",E=t.forwardRef((e,t)=>
1{let{__scopeDialog:i,...o}=e,l=b(T,i),a=(0,r.useComposedRefs)(t,l.triggerRef);return(0,m.jsx)(d.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":K(l.open),...o,ref:a,onClick:(0,n.composeEventHandlers)(e.onClick,l.onOpenToggle)})});E.displayName=T;var S="DialogPortal",[k,w]=y(S,{forceMount:void 0}),N=e=>{let{__scopeDialog:n,forceMount:r,children:i,container:o}=e,l=b(S,n);return(0,m.jsx)(k,{scope:n,forceMount:r,children:t.Children.map(i,e=>(0,m.jsx)(c.Presence,{present:r||l.open,children:(0,m.jsx)(u.Portal,{asChild:!0,container:o,children:e})}))})};N.displayName=S;var I="DialogOverlay",A=t.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=b(I,e.__scopeDialog);return o.modal?(0,m.jsx)(c.Presence,{present:r||o.open,children:(0,m.jsx)(O,{...i,ref:t})}):null});A.displayName=I;var M=(0,g.createSlot)("DialogOverlay.RemoveScroll"),O=t.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=b(I,n);return(0,m.jsx)(h.RemoveScroll,{as:M,allowPinchZoom:!0,shards:[i.contentRef],children:(0,m.jsx)(d.Primitive.div,{"data-state":K(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),D="DialogContent",R=t.forwardRef((e,t)=>{let n=w(D,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=b(D,e.__scopeDialog);return(0,m.jsx)(c.Presence,{present:r||o.open,children:o.modal?(0,m.jsx)(P,{...i,ref:t}):(0,m.jsx)(L,{...i,ref:t})})});R.displayName=D;var P=t.forwardRef((e,i)=>{let o=b(D,e.__scopeDialog),l=t.useRef(null),a=(0,r.useComposedRefs)(i,o.contentRef,l);return t.useEffect(()=>{let e=l.current;if(e)return(0,p.hideOthers)(e)},[]),(0,m.jsx)($,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,n.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,n.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),L=t.forwardRef((e,n)=>{let r=b(D,e.__scopeDialog),i=t.useRef(!1),o=t.useRef(!1);return(0,m.jsx)($,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||r.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let n=t.target;r.triggerRef.current?.contains(n)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),$=t.forwardRef((e,n)=>{let{__scopeDialog:i,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:u,...c}=e,d=b(D,i),h=t.useRef(null),p=(0,r.useComposedRefs)(n,h);return(0,f.useFocusGuards)(),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(s.FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:u,children:(0,m.jsx)(a.DismissableLayer,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":K(d.open),...c,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Y,{titleId:d.titleId}),(0,m.jsx)(q,{contentRef:h,descriptionId:d.descriptionId})]})]})}),F="DialogTitle",B=t.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=b(F,n);return(0,m.jsx)(d.Primitive.h2,{id:i.titleId,...r,ref:t})});B.displayName=F;var V="DialogDescription",z=t.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=b(V,n);return(0,m.jsx)(d.Primitive.p,{id:i.descriptionId,...r,ref:t})});z.displayName=V;var j="DialogClose",W=t.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,o=b(j,r);return(0,m.jsx)(d.Primitive.button,{type:"button",...i,ref:t,onClick:(0,n.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})});function K(e){return e?"open":"closed"}W.displayName=j;var H="DialogTitleWarning",[U,J]=(0,i.createContext)(H,{contentName:D,titleName:F,docsSlug:"dialog"}),Y=({titleId:e})=>{let n=J(H),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
2
3If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
4
5For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},q=({contentRef:e,descriptionId:n})=>{let r=J("DialogDescriptionWarning"),i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute("aria-describedby");n&&t&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null};e.s(["Close",()=>W,"Content",()=>R,"Description",()=>z,"Overlay",()=>A,"Portal",()=>N,"Root",()=>C,"Title",()=>B,"Trigger",()=>E,"WarningProvider",()=>U,"createDialogScope",()=>v])},343941,e=>{"use strict";function t(e,...n){let r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;for(let t of(i.append("code",e),n))i.append("v",t);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,r=n&&"documentMode"in document?document.documentMode:null,i=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),o=n&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),l=!(!n||!("InputEvent"in window)||r)&&"getTargetRanges"in new window.InputEvent("input"),a=n&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),s=n&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,u=n&&/Android/.test(navigator.userAgent),c=n&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=n&&u&&c,f=n&&/AppleWeb
5Kit\/[\d.]+/.test(navigator.userAgent)&&!c;function h(...e){let t=[];for(let n of e)if(n&&"string"==typeof n)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}let p=a||s||f?" ":"​",g=o?" ":p,m={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},x={directionless:1,unmergeable:2},y={center:2,end:6,justify:4,left:1,right:3,start:5},v={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},_={normal:0,segmented:2,token:1},b={0:"normal",2:"segmented",1:"token"},C="$config",T=!1,E=0;function S(e){E=e.timeStamp}function k(e,t,n){let r="BR"===e.nodeName,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&void 0!==rV(e,n)}function w(e,t,n){T=!0;let r=performance.now()-E>100;try{n0(e,()=>{let i=nb()||e.getEditorState().read(()=>{let e=nb();return null!==e?e.clone():null}),l=new Map,a=e.getRootElement(),s=e._editorState,u=e._blockCursorElement,c=!1,d="";for(let n=0;n<t.length;n++){let f=t[n],h=f.type,p=f.target,g=function(e,t,n,r){for(let i=e;i&&!iK(i);i=is(i)){let e=rV(i,t);if(void 0!==e){let t=rF(e,n);if(t)return n6(t)||!iA(i)?void 0:[i,t]}else if(i===r)return[r,rH(n)]}}(p,e,s,a);if(!g)continue;let[m,x]=g;if("characterData"===h)r&&t3(x)&&rN(p)&&function(e,t,n){if(nr(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return rN(t)&&n.isAttached()}(i,p,x)&&function(e,t,n){let r=ik(im(n)),i=null,o=null;null!==r&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);let l=e.nodeValue;null!==l&&rZ(t,l,i,o,!1)}(p,x,e);else if("childList"===h){c=!0;let t=f.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=rB(r),l=r.parentNode;if(null!=l&&r!==u&&null===i&&!k(r,l,e)){if(o){let e=(iA(r)?r.innerText:null)||r.nodeValue;e&&(d+=e)}l.removeChild(r)}}let n=f.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(k(r,p,e)||u===r)&&(p.appendChild(r),t++)}r!==t&&l.set(m,x)}}}if(l.size>0)for(let[t,n]of l)n.reconcileObservedMutation(t,e);let f=n.takeRecords();if(f.length>0){for(let t=0;t<f.length;t++){let n=f[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],o=n.parentNode;null==o||"BR"!==n.nodeName||k(n,i,e)||o.removeChild(n)}}n.takeRecords()}null!==i&&(c&&rU(i),o&&ii(e)&&i.insertRawText(d))})}finally{T=!1}}function N(e){let t=e._observer;null!==t&&w(e,t.takeRecords(),t)}function I(e){0===E&&im(e).addEventListener("textInput",S,!0),e._observer=new MutationObserver((t,n)=>{w(e,t,n)})}class A{constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||V).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}}function M(e,t){return new A(e,t)}function O(e,t,n="latest"){let r=("latest"===n?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function D(e,t,n){let r=O(e,n,"direct"),i=O(t,n,"direct");return n.isEqual(r,i)?null:[r,i]}function R(e,t,n){let r;if(nB(),"function"==typeof n){let i=e.getLatest(),o=O(i,t);if(r=n(o),t.isEqual(o,r))return i}else r=n;let i=e.getWritable();return $(i).updateFromKnown(t,r),i}function P(e){let t=new Map,n=new Set;for(let r="function"==typeof e?e:e.replace;r.prototype&&void 0!==r.prototype.getType;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=iU(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;"stateConfig"in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}class L{constructor(e,t,n,r=new Map,i){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;const{sharedConfigMap:o}=this.sharedNodeState,l=void 0!==i?i:function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(o,n,r);this.size=l}getValue(e){let t=this.knownState.get(e);if(void 0!==t)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];void 0!==t&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return B(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:n}=this,r=new Map(this.knownState);return new L(e,t,function(e,t,n){let r;if(n)for(let[i,o]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(o)):(r=r||{})[i]=o}return r}(t.sharedConfigMap,r,n),r,this.size)}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=B(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}}function $(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new L(t,F(t));return t.__state=n,n}function F(e){return e.__state?e.__state.sharedNodeState:ry(i$(),e.getType()).sharedNodeState}function B(e){if(e)for(let t in e)return e}function V(e){return e}function z(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;
5if(t!==i&&!r.isEqual(t,i))return!0}return!1}function j(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function W(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function K(e,t){let n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,l=t.__format,a=t.__style,s=e.__state,u=t.__state;return(null===n||n===o)&&(null===r||r===l)&&(null===i||i===a)&&(null===e.__state||s===u||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let n=new Set;return!(e&&z(n,e,t)||t&&z(n,t,e)||e&&j(n,e,t)||t&&j(n,t,e))}(s,u))}function H(e,t){let n=e.mergeWithSibling(t),r=nj()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function U(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&t3(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){K(t,r)&&(r=H(t,r));break}t.remove()}for(;null!==(n=r.getNextSibling())&&t3(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){K(r,n)&&(r=H(r,n));break}n.remove()}}else r.remove()}function J(e){return Y(e.anchor),Y(e.focus),e}function Y(e){for(;"element"===e.type;){let t,n,r=e.getNode(),i=e.offset;if(i===r.getChildrenSize()?(t=r.getChildAtIndex(i-1),n=!0):(t=r.getChildAtIndex(i),n=!1),t3(t)){e.set(t.__key,n?t.getTextContentSize():0,"text",!0);break}if(!n4(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element",!0)}}let q,G,X,Q,Z,ee,et,en,er,ei,eo="",el=null,ea="",es="",eu=!1,ec=!1;function ed(e,t){let n=et.get(e);if(null!==t){let n=eE(e);n.parentNode===t&&t.removeChild(n)}if(en.has(e)||G._keyToDOMMap.delete(e),n4(n)){let e=eb(n,et);ef(e,0,e.length-1,null)}void 0!==n&&r8(ei,X,Q,n,"destroyed")}function ef(e,t,n,r){let i=t;for(;i<=n;++i){let t=e[i];void 0!==t&&ed(t,r)}}function eh(e,t){e.setProperty("text-align",t)}function ep(e,t){let n=q.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}let r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px";e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function eg(e,t){let n=e.style;0===t?eh(n,""):1===t?eh(n,"left"):2===t?eh(n,"center"):3===t?eh(n,"right"):4===t?eh(n,"justify"):5===t?eh(n,"start"):6===t&&eh(n,"end")}function em(e,t){let n=function(e){let t=e.__dir;if(null!==t)return t;if(n8(e))return null;let n=e.getParentOrThrow();return n8(n)&&null===n.__dir?"auto":null}(t);null!==n?e.dir=n:e.removeAttribute("dir")}function ex(e,n){var r;let i,o=en.get(e);void 0===o&&t(60);let l=o.createDOM(q,G);if(i=(r=G)._keyToDOMMap,l[`__lexicalKey_${r._key}`]=e,i.set(e,l),t3(o)?l.setAttribute("data-lexical-text","true"):n6(o)&&l.setAttribute("data-lexical-decorator","true"),n4(o)){let e=o.__indent,t=o.__size;em(l,o),0!==e&&ep(l,e),0!==t&&ey(eb(o,en),o,0,t-1,o.getDOMSlot(l));let n=o.__format;0!==n&&eg(l,n),o.isInline()||e_(null,o,l),il(o)&&(eo+="\n\n",es+="\n\n")}else{let t=o.getTextContent();if(n6(o)){let t=o.decorate(G,q);null!==t&&eC(e,t),l.contentEditable="false"}eo+=t,es+=t}return null!==n&&n.insertChild(l),r8(ei,X,Q,o,"created"),l}function ey(e,t,n,r,i){let o=eo;eo="";let l=n;for(;l<=r;++l){ex(e[l],i);let t=en.get(e[l]);null!==t&&t3(t)&&(null===el&&(el=t.getFormat()),""===ea&&(ea=t.getStyle()))}il(t)&&(eo+="\n\n"),i.element.__lexicalTextContent=eo,eo=o+eo}function ev(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return tV(e)?"line-break":n6(e)&&e.isInline()?"decorator":null}return"empty"}return null}function e_(e,t,n){let r=ev(e,et),i=ev(t,en);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function eb(e,n){let r=[],i=e.__first;for(;null!==i;){let e=n.get(i);void 0===e&&t(101),r.push(i),i=e.__next}return r}function eC(e,t){let n=G._pendingDecorators,r=G._decorators;if(null===n){if(r[e]===t)return;n=rj(G)}n[e]=t}function eT(e){let t=e.nextSibling;return null!==t&&t===G._blockCursorElement&&(t=t.nextSibling),t}function eE(e){let n=er.get(e);return void 0===n&&t(75,e),n}function eS(e){return{type:e}}let ek=eS("SELECTION_CHANGE_COMMAND"),ew=eS("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),eN=eS("CLICK_COMMAND"),eI=eS("DELETE_CHARACTER_COMMAND"),eA=eS("INSERT_LINE_BREAK_COMMAND"),eM=eS("INSERT_PARAGRAPH_COMMAND"),eO=eS("CONTROLLED_TEXT_INSERTION_COMMAND"),eD=eS("PASTE_COMMAND"),eR=eS("REMOVE_TEXT_COMMAND"),eP=eS("DELETE_WORD_COMMAND"),eL=eS("DELETE_LINE_COMMAND"),e$=eS("FORMAT_TEXT_COMMAND"),eF=eS("UNDO_COMMAND"),eB=eS("REDO_COMMAND"),eV=eS("KEYDOWN_COMMAND"),ez=eS("KEY_ARROW_RIGHT_COMMAND"),ej=eS("MOVE_TO_END"),eW=eS("KEY_ARROW_LEFT_COMMAND"),eK=eS("MOVE_TO_START"),eH=eS("KEY_ARROW_UP_COMMAND"),eU=eS("KEY_ARROW_DOWN_COMMAND"),eJ=eS("KEY_ENTER_COMMAND"),eY=eS("KEY_SPACE_COMMAND"),eq=eS("KEY_BACKSPACE_COMMAND"),eG=eS("KEY_ESCAPE_COMMAND"),eX=eS("KEY_DELETE_COMMAND"),eQ=eS("KEY_TAB_COMMAND"),eZ=eS("INSERT_TAB_COMMAND"),e0=eS("INDENT_CONTENT_COMMAND"),e1=eS("OUTDENT_CONTENT_COMMAND"),e2=eS("DROP_COMMAND"),e3=eS("FORMAT_ELEMENT_COMMAND"),e4=eS("DRAGSTART_COMMAND"),e9=eS("DRAGOVER_COMMAND"),e5=eS("DRAGEND_COMMAND"),e6=eS("COPY_COMMAND"),e7=eS("CUT_COMMAND"),e8=eS("SELECT_ALL_COMMAND"),te=eS("CLEAR_EDITOR_COMMAND"),tt=eS("CLEAR_HISTORY_COMMAND"),tn=eS("CAN_REDO_COMMAND"),tr=eS("CAN_UNDO_COMMAND"),ti=eS("FOCUS_COMMAND"),to=eS("BLUR_COMMAND"),tl=eS("KEY_MODIFIER_COMMAND"),ta=Object.freeze({}),ts=[["keydown",function(e,t){if((tu=e.timeStamp,tc=e.key,!(t.isComposing()||io(t,eV,e)))&&null!=e.key){if(ty&&r5(e))return n0(t,()=>{tN(t,tv)}),ty=!1,void(tv="");if(r3(e,"ArrowRight",{shiftKey:"any"}))io(t,ez,e);else if(r3(e,"ArrowRight",r4))io(t,ej,e);else if(r3(e,"ArrowLeft",{shiftKey:"any"}))io(t,eW,e);else if(r3(e,"ArrowLeft",r4))io(t,eK,e);else if(r3(e,"ArrowUp",{altKey:"any",shiftKey:"any"}))io(t,eH,e);else if(r3(e,"ArrowDown",{altKey:"any",shiftKey:"any"}))io(t,eU,e);else if(r3(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0}))tm=!0,io(t,eJ,e);else if(" "===e.key)io(t,eY,e);else if(i&&r3(e,"o",{ctrlKey:!0}))e.preventDefault(),tm=!0,io(t,eA,!0);else if(r3(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"}))tm=!1,io(t,eJ,e);else if(r3(e,"Backspace",{shiftKey:"any"})||i&&r3(e,"h",{ctrlKey:!0}))r5(e)?io(t,eq,e):(e.preventDefault(),io(t,eI,!0));else if("Escape"===e.key)io(t,eG,e);else if(r3(e,"Delete",{})||i&&r3(e,"d",{ctrlKey:!0}))"Delete"!==e.key?(e.preventDefault(),io(t,eI,!1)):io(t,eX,e);else if(r3(e,"Backspace",r9))e.preventDefault(),io(t,eP,!0);else if(r3(e,"Delete",r9))e.preventDefault(),io(t,eP,!1);else if(i&&r3(e,"Backspace",{metaKey:!0}))e.preventDefault(),io(t,eL,!0);else if(i&&(r3(e,"Delete",{metaKey:!0})||r3(e,"k",{ctrlKey:!0})))e.preventDefault(),io(t,eL,!1);else if(r3(e,"b",r4))e.preventDefault(),io(t,e$,"bold");else if(r3(e,"u",r4))e.preventDefault(),io(t,e$,"underline");
5else if(r3(e,"i",r4))e.preventDefault(),io(t,e$,"italic");else if(r3(e,"Tab",{shiftKey:"any"}))io(t,eQ,e);else if(r3(e,"z",r4))e.preventDefault(),io(t,eF,void 0);else if(i?r3(e,"z",{metaKey:!0,shiftKey:!0}):r3(e,"y",{ctrlKey:!0})||r3(e,"z",{ctrlKey:!0,shiftKey:!0}))e.preventDefault(),io(t,eB,void 0);else{let n=t._editorState._selection;null===n||nr(n)?r3(e,"a",r4)&&(e.preventDefault(),io(t,e8,e)):r3(e,"c",r4)?(e.preventDefault(),io(t,e6,e)):r3(e,"x",r4)?(e.preventDefault(),io(t,e7,e)):r3(e,"a",r4)&&(e.preventDefault(),io(t,e8,e))}(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)&&io(t,tl,e)}}],["pointerdown",function(e,t){let n=e.target,r=e.pointerType;iM(n)&&"touch"!==r&&"pen"!==r&&0===e.button&&n0(t,()=>{n6(rz(n))||(tg=!0)})}],["compositionstart",function(e,t){n0(t,()=>{let n=nb();if(nr(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();rL(r.key),(e.timeStamp<tu+30||"element"===r.type||!n.isCollapsed()||i.getFormat()!==n.format||t3(i)&&i.getStyle()!==n.style)&&io(t,eO,g)}})}],["compositionend",function(e,t){o?tx=!0:!s&&(a||f)?(ty=!0,tv=e.data):n0(t,()=>{tN(t,e.data)})}],["input",function(e,t){e.stopPropagation(),n0(t,()=>{if(iA(e.target)&&n6(rz(e.target)))return;let n=nb(),r=e.data,i=tw(e);if(null!=r&&nr(n)&&tC(n,i,r,e.timeStamp,!1)){tx&&(tN(t,r),tx=!1);let i=n.anchor.getNode(),u=ik(im(t));if(null===u)return;let c=n.isBackward(),d=c?n.anchor.offset:n.focus.offset,h=c?n.focus.offset:n.anchor.offset;l&&!n.isCollapsed()&&t3(i)&&null!==u.anchorNode&&i.getTextContent().slice(0,d)+r+i.getTextContent().slice(d+h)===rX(u.anchorNode)||io(t,eO,r);let p=r.length;o&&p>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=p),a||s||f||!t.isComposing()||(tu=0,rL(null))}else rQ(!1,t,null!==r?r:void 0),tx&&(tN(t,r||void 0),tx=!1);nB(),N(nj())},{event:e}),tf=null}],["click",function(e,t){n0(t,()=>{let n=nb(),r=ik(im(t)),i=nC();if(r){if(nr(n)){let t=n.anchor,o=t.getNode();if("element"===t.type&&0===t.offset&&n.isCollapsed()&&!n8(o)&&1===rK().getChildrenSize()&&o.getTopLevelElementOrThrow().isEmpty()&&null!==i&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(3===e.detail&&!n.isCollapsed()&&o!==n.focus.getNode()){let e=function(e,t){let n=e;for(;n!==rK()&&null!=n;){if(t(n))return n;n=n.getParent()}return null}(o,e=>n4(e)&&!e.isInline());n4(e)&&e.select(0)}}else if("touch"===e.pointerType||"pen"===e.pointerType){let n=r.anchorNode;(iA(n)||rN(n))&&rU(n_(i,r,t,e))}}io(t,eN,e)})}],["cut",ta],["copy",ta],["dragstart",ta],["dragover",ta],["dragend",ta],["paste",ta],["focus",ta],["blur",ta],["drop",ta]];l&&ts.push(["beforeinput",(e,n)=>{let r,i;return r=e.inputType,i=tw(e),void("deleteCompositionText"===r||o&&ii(n)||"insertCompositionText"!==r&&n0(n,()=>{var o;let l=nb();if("deleteContentBackward"===r){if(null===l){let e=nC();if(!nr(e))return;rU(e.clone())}if(nr(l)){let r=l.anchor.key===l.focus.key;if(o=e.timeStamp,"MediaLast"===tc&&o<tu+30&&n.isComposing()&&r){if(rL(null),tu=0,setTimeout(()=>{n0(n,()=>{rL(null)})},30),nr(l)){let e=l.anchor.getNode();e.markDirty(),t3(e)||t(142),tk(l,e)}}else{rL(null),e.preventDefault();let t=l.anchor.getNode(),i=t.getTextContent(),o=t.canInsertTextAfter(),a=0===l.anchor.offset&&l.focus.offset===i.length,s=d&&r&&!a&&o;if(s&&l.isCollapsed()&&(s=!n6(ir(l.anchor,!0))),!s){io(n,eI,!0);let e=nb();d&&nr(e)&&e.isCollapsed()&&(t_=e,setTimeout(()=>t_=null))}}return}}if(!nr(l))return;let a=e.data;null!==tf&&rQ(!1,n,tf),l.dirty&&null===tf||!l.isCollapsed()||n8(l.anchor.getNode())||null===i||l.applyDOMRange(i),tf=null;let u=l.anchor,c=l.focus,f=u.getNode(),h=c.getNode();if("insertText"!==r&&"insertTranspose"!==r)switch(e.preventDefault(),r){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":io(n,eO,e);break;case"insertFromComposition":rL(null),io(n,eO,e);break;case"insertLineBreak":rL(null),io(n,eA,!1);break;case"insertParagraph":rL(null),tm&&!s?(tm=!1,io(n,eA,!1)):io(n,eM,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":io(n,eD,e);break;case"deleteByComposition":(f!==h||n4(f)||n4(h)||!rk(f)||!rk(h))&&io(n,eR,e);break;case"deleteByDrag":case"deleteByCut":io(n,eR,e);break;case"deleteContent":io(n,eI,!1);break;case"deleteWordBackward":io(n,eP,!0);break;
5case"deleteWordForward":io(n,eP,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":io(n,eL,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":io(n,eL,!1);break;case"formatStrikeThrough":io(n,e$,"strikethrough");break;case"formatBold":io(n,e$,"bold");break;case"formatItalic":io(n,e$,"italic");break;case"formatUnderline":io(n,e$,"underline");break;case"historyUndo":io(n,eF,void 0);break;case"historyRedo":io(n,eB,void 0)}else{if("\n"===a)e.preventDefault(),io(n,eA,!1);else if("\n\n"===a)e.preventDefault(),io(n,eM,void 0);else if(null==a&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),l.insertRawText(t)}else null!=a&&tC(l,i,a,e.timeStamp,!0)?(e.preventDefault(),io(n,eO,a)):tf=a;td=e.timeStamp}}))}]);let tu=0,tc=null,td=0,tf=null,th=new WeakMap,tp=!1,tg=!1,tm=!1,tx=!1,ty=!1,tv="",t_=null,tb=[0,"",0,"root",0];function tC(e,t,n,r,i){let o=e.anchor,a=e.focus,s=o.getNode(),u=nj(),c=ik(im(u)),d=null!==c?c.anchorNode:null,f=o.key,h=u.getElementByKey(f),p=n.length;return f!==a.key||!t3(s)||(!i&&(!l||td<r+50)||s.isDirty()&&p<2||rY(n))&&o.offset!==a.offset&&!s.isComposing()||rw(s)||s.isDirty()&&p>1||(i||!l)&&null!==h&&!s.isComposing()&&d!==rA(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){let n;if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let r=e.anchor.offset,i=t.getParentOrThrow(),o=rk(t);return 0===r?!t.canInsertTextBefore()||!i.canInsertTextBefore()&&!t.isComposing()||o||(t3(n=t.getPreviousSibling())||n4(n)&&n.isInline())&&!n.canInsertTextAfter():r===t.getTextContentSize()&&(!t.canInsertTextAfter()||!i.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function tT(e,t){return rN(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function tE(e,n,r){let{anchorNode:i,anchorOffset:o,focusNode:l,focusOffset:a}=e;tp&&(tp=!1,tT(i,o)&&tT(l,a)&&!t_)||n0(n,()=>{if(!r)return void rU(null);if(!rC(n,i,l))return;let s=nb();if(t_&&nr(s)&&s.isCollapsed()){let e=s.anchor,t=t_.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&rU(s=t_.clone())}if(t_=null,nr(s)){let r=s.anchor,i=r.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);let o=im(n).event,l=o?o.timeStamp:performance.now(),[a,u,c,d,f]=tb,h=rK(),p=!1===n.isComposing()&&""===h.getTextContent();if(l<f+200&&r.offset===c&&r.key===d)tS(s,a,u);else if("text"===r.type)t3(i)||t(141),tk(s,i);else if("element"===r.type&&!p){n4(i)||t(259);let e=r.getNode();e.isEmpty()?tS(s,e.getTextFormat(),e.getTextStyle()):tS(s,0,"")}}else{let e=r.key,t=s.focus.key,n=s.getNodes(),i=n.length,l=s.isBackward(),u=l?a:o,c=l?o:a,d=l?t:e,f=l?e:t,h=2047,p=!1;for(let e=0;e<i;e++){let t=n[e],r=t.getTextContentSize();if(t3(t)&&0!==r&&(0!==e||t.__key!==d||u!==r)&&(e!==i-1||t.__key!==f||0!==c)&&(p=!0,0==(h&=t.getFormat())))break}s.format=p?h:0}}io(n,ek,void 0)})}function tS(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function tk(e,t){tS(e,t.getFormat(),t.getStyle())}function tw(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function tN(e,t){let n=e._compositionKey;if(rL(null),null!==n&&null!=t){if(""===t){let t=rF(n),r=rA(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&t3(t)&&rZ(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){let t=nb();if(nr(t)){let n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void io(e,eJ,null)}}}rQ(!0,e,t)}function tI(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let tA=new Map;function tM(e){let t=iw(e.target);if(null===t)return;let n=rE(t.anchorNode);if(null===n)return;tg&&(tg=!1,n0(n,()=>{let r=nC(),i=t.anchorNode;(iA(i)||rN(i))&&rU(n_(r,t,n,e))}));let r=rq(n),i=r[r.length-1],o=i._key,l=tA.get(o),a=l||i;a!==n&&tE(t,a,!1),tE(t,n,!0),n!==i?tA.set(o,n):l&&tA.delete(o)}function tO(e){e._lexicalHandled=!0}function tD(e){return!0===e._lexicalHandled}function tR(e,t,n){nB();let r=e.__key,i=e.getParent();if(null===i)return;let o=function(e){let t=nb();if(!nr(t)||!n4(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),o=r.getNode();return ip(i,e)&&n.set(e.__key,0,"element"),ip(o,e)&&r.set(e.__key,0,"element"),t}(e),l=!1;
5if(nr(o)&&t){let t=o.anchor,n=o.focus;t.key===r&&(nS(t,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0),n.key===r&&(nS(n,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0)}else no(o)&&t&&e.isSelected()&&e.selectPrevious();if(nr(o)&&t&&!l){let t=e.getIndexWithinParent();rR(e),nT(o,i,t,-1)}else rR(e);n||iv(i)||i.canBeEmpty()||!i.isEmpty()||tR(i,t),t&&o&&n8(i)&&i.isEmpty()&&i.selectEnd()}function tP(e){return e}class tL{static getType(){let{ownNodeType:e}=iU(this);return void 0===e&&t(64,this.name),e}static clone(e){t(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),rD(this,e)}getType(){return this.__type}isInline(){t(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=rF(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){let t=e||nb();if(null==t)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(t3(this))return n;if(nr(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(n6(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(null===e)return -1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return -1}getParent(){let e=this.getLatest().__parent;return null===e?null:rF(e)}getParentOrThrow(){let e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let n=e.getParent();if(iv(n))return n4(e)||e===this&&n6(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:rF(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:rF(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=n4(this)?this:this.getParent(),n=n4(e)?e:e.getParent(),r=t&&n?om(t,n):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let n=om(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===op(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(e){let t=om(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let n=this.isBefore(e),r=[],i=new Set,o=this;for(;null!==o;){let l=o.__key;if(i.has(l)||(i.add(l),r.push(o)),o===e)break;let a=n4(o)?n?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}let s=n?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}let u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let c=null,d=u;do{if(null===d&&t(68),c=n?d.getNextSibling():d.getPreviousSibling(),null===(d=d.getParent()))break;null!==c||i.has(d.__key)||r.push(d)}while(null===c)o=c}return n||r.reverse(),r}isDirty(){let e=nj()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=rF(this.__key);return null===e&&t(113),e}getWritable(){nB();let e=nz(),t=nj(),n=e._nodeMap,r=this.__key,i=this.getLatest(),o=t._cloneNotNeeded,l=nb();if(null!==l&&l.setCachedNodes(null),o.has(r))return rP(i),i;let a=iz(i);return o.add(r),rP(a),n.set(r,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,r){t(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){t(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of F(n).flatKeys)e in t&&(void 0!==i&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&$(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){tR(this,!0,e)}replace(e,n){nB();let r=nb();null!==r&&(r=r.clone()),iC(this,e);let i=this.getLatest(),o=this.__key,l=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),u=s.__size;rR(a);let c=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,h=i.__next,p=i.__parent;if((tR(i,!1,!0),null===c)?s.__first=l:c.getWritable().__next=l,(a.__prev=f,null===d)?s.__last=l:d.getWritable().__prev=l,a.__next=h,a.__parent=p,s.__size=u,n&&(n4(this)&&n4(a)||t(139),this.getChildren().forEac
5h(e=>{a.append(e)})),nr(r)){rU(r);let e=r.anchor,t=r.focus;e.key===o&&nt(e,a),t.key===o&&nt(t,a)}return r$()===o&&rL(l),a}insertAfter(e,t=!0){nB(),iC(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.getParent(),o=nb(),l=!1,a=!1;if(null!==i){let t=e.getIndexWithinParent();if(rR(r),nr(o)){let e=i.__key,n=o.anchor,r=o.focus;l="element"===n.type&&n.key===e&&n.offset===t+1,a="element"===r.type&&r.key===e&&r.offset===t+1}}let s=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),c=r.__key,d=n.__next;if(null===s?u.__last=c:s.getWritable().__prev=c,u.__size++,n.__next=c,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&nr(o)){let e=this.getIndexWithinParent();nT(o,u,e+1);let t=u.__key;l&&o.anchor.set(t,e+2,"element"),a&&o.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){nB(),iC(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.__key;rR(r);let o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,s=this.getIndexWithinParent();null===o?l.__first=i:o.getWritable().__next=i,l.__size++,n.__prev=i,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent;let u=nb();return t&&nr(u)&&nT(u,this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return rc()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){nB();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(n4(n))return n.select();if(!t3(n)){let e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){nB();let n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(n4(n))return n.select(0,0);if(!t3(n)){let e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class t$ extends tL{static getType(){return"linebreak"}static clone(e){return new t$(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(e){let t=e.parentElement;if(null!==t&&iR(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&tz(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&tz(n))return!0}}return!1})(e)||function(e){let t=e.parentElement;if(null!==t&&iR(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&tz(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&tz(r))return!0}return!1}(e)?null:{conversion:tF,priority:0}}}static importJSON(e){return tB().updateFromJSON(e)}}function tF(e){return{node:tB()}}function tB(){return ib(new t$)}function tV(e){return e instanceof t$}function tz(e){return rN(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function tj(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function tW(e,t){return 1&t?"strong":2&t?"em":"span"}function tK(e,t,n,r,i){let o=r.classList,l=r7(i,"base");void 0!==l&&o.add(...l);let a=!1,s=8&t&&4&t;for(let e in void 0!==(l=r7(i,"underlineStrikethrough"))&&(8&n&&4&n?(a=!0,s||o.add(...l)):s&&o.remove(...l)),m){let r=m[e];if(void 0!==(l=r7(i,e)))if(n&r){if(a&&("underline"===e||"strikethrough"===e)){t&r&&o.remove(...l);continue}t&r&&(!s||"underline"!==e)&&"strikethrough"!==e||o.add(...l)}else t&r&&o.remove(...l)}}function tH(e,t,n){let r=t.firstChild,i=n.isComposing(),l=e+(i?p:"");if(null==r)t.textContent=l;else{let e=r.nodeValue;if(e!==l)if(i||o){let[t,n,i]=function(e,t){let n=e.length,r=t.length,i=0,o=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;o+i<n&&o+i<r&&e[n-o-1]===t[r-o-1];)o++;return[i,n-i-o,t.slice(i,r-o)]}(e,l);0!==n&&r.deleteData(t,n),r.insertData(t,i)}else r.nodeValue=l}}function tU(e,t,n,r,i,o){tH(i,e,t);let l=o.theme.text;void 0!==l&&tK(0,0,r,e,l)}function tJ(e,t){let n=document.createElement(t);return n.appendChild(e),n}class tY extends tL{static getType(){return"text"}static clone(e){return new tY(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return b[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===r$()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=m[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return rM(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=tj(0,n),i=tW(0,n),o=null===r?i:r,l=document.createElement(o),a=l;
5this.hasFormat("code")&&l.setAttribute("spellcheck","false"),null!==r&&(a=document.createElement(i),l.appendChild(a)),tU(a,this,0,n,this.__text,e);let s=this.__style;return""!==s&&(l.style.cssText=s),l}updateDOM(e,n,r){let i=this.__text,o=e.__format,l=this.__format,a=tj(0,o),s=tj(0,l),u=tW(0,o),c=tW(0,l);if((null===a?u:a)!==(null===s?c:s))return!0;if(a===s&&u!==c){let e=n.firstChild;null==e&&t(48);let o=document.createElement(c);return tU(o,this,0,l,i,r),n.replaceChild(o,e),!1}let d=n;null!==s&&null!==a&&null==(d=n.firstChild)&&t(49),tH(i,d,this);let f=r.theme.text;void 0!==f&&o!==l&&tK(0,o,l,d,f);let h=e.__style,p=this.__style;return h!==p&&(n.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:tQ,priority:0}),b:()=>({conversion:tG,priority:0}),code:()=>({conversion:t1,priority:0}),em:()=>({conversion:t1,priority:0}),i:()=>({conversion:t1,priority:0}),mark:()=>({conversion:t1,priority:0}),s:()=>({conversion:t1,priority:0}),span:()=>({conversion:tq,priority:0}),strong:()=>({conversion:t1,priority:0}),sub:()=>({conversion:t1,priority:0}),sup:()=>({conversion:t1,priority:0}),u:()=>({conversion:t1,priority:0})}}static importJSON(e){return t2().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
5exportDOM(e){let{element:n}=super.exportDOM(e);return iA(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=tJ(n,"b")),this.hasFormat("italic")&&(n=tJ(n,"i")),this.hasFormat("strikethrough")&&(n=tJ(n,"s")),this.hasFormat("underline")&&(n=tJ(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?m[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?x[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=rM(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=_[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){nB();let n=e,r=t,i=nb(),o=this.getTextContent(),l=this.__key;if("string"==typeof o){let e=o.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!nr(i))return nm(l,n,l,r,"text","text");{let e=r$();e!==i.anchor.key&&e!==i.focus.key||rL(l),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),o=i.__text,l=n.length,a=e;a<0&&(a=l+a)<0&&(a=0);let s=nb();if(r&&nr(s)){let t=e+l;s.setTextNodeRange(i,t,i,t)}return i.__text=o.slice(0,a)+n+o.slice(a+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){let t;nB();let n=this.getLatest(),r=n.getTextContent();if(""===r)return[];let i=n.__key,o=r$(),l=r.length;e.sort((e,t)=>e-t),e.push(l);let a=[],s=e.length;for(let t=0,n=0;t<l&&n<=s;n++){let i=e[n];i>t&&(a.push(r.slice(t,i)),t=i)}let u=a.length;if(1===u)return[n];let c=a[0],d=n.getParent(),f=n.getFormat(),h=n.getStyle(),p=n.__detail,g=!1,m=null,x=null,y=nb();if(nr(y)){let[e,t]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===e.type&&e.key===i&&(m=e),"text"===t.type&&t.key===i&&(x=t)}n.isSegmented()?((t=t2(c)).__format=f,t.__style=h,t.__detail=p,t.__state=W(n,t),g=!0):t=n.setTextContent(c);let v=[t];for(let e=1;e<u;e++){let t=t2(a[e]);t.__format=f,t.__style=h,t.__detail=p,t.__state=W(n,t);let r=t.__key;o===i&&rL(r),v.push(t)}let _=m?m.offset:null,b=x?x.offset:null,C=0;for(let e of v){if(!m&&!x)break;let t=C+e.getTextContentSize();if(null!==m&&null!==_&&_<=t&&_>=C&&(m.set(e.getKey(),_-C,"text"),_<t&&(m=null)),null!==x&&null!==b&&b<=t&&b>=C){x.set(e.getKey(),b-C,"text");break}C=t}if(null!==d){let e,t;e=this.getPreviousSibling(),t=this.getNextSibling(),null!==e&&rP(e),null!==t&&rP(t);let n=d.getWritable(),r=this.getIndexWithinParent();g?(n.splice(r,0,v),this.remove()):n.splice(r,1,v),nr(y)&&nT(y,d,r,u-1)}return v}mergeWithSibling(e){let n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);let r=this.__key,i=e.__key,o=this.__text,l=o.length;r$()===i&&rL(r);let a=nb();if(nr(a)){let t=a.anchor,o=a.focus;null!==t&&t.key===i&&nk(t,n,r,e,l),null!==o&&o.key===i&&nk(o,n,r,e,l)}let s=e.__text,u=n?s+o:o+s;this.setTextContent(u);let c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function tq(e){return{forChild:t4(e.style),node:null}}function tG(e){let t="normal"===e.style.fontWeight;return{forChild:t4(e.style,t?void 0:"bold"),node:null}}let tX=new WeakMap;function tQ(e){null===e.parentElement&&t(129);let n=e.textContent||"";if(null!==function(e){let t,n=e.parentNode,r=[e];for(;null!==n&&void 0===(t=tX.get(n))&&!function(e){if(!iA(e))return!1;if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}(n);)r.push(n),n=n.parentNode;let i=void 0===t?n:t;for(let e=0;e<r.length;e++)tX.set(r[e],i);return i}(e)){let e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){let r=e[n];"\n"===r||"\r\n"===r?t.push(tB()):"	"===r?t.push(t5()):""!==r&&t.push(t2(r))}return{node:t}}if(""===(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===n[0]){let t=e,r=!0;for(;null!==t&&null!==(t=tZ(t,!1));){let e=t.textContent||"";if(e.length>0){/[ \t\n]$/.test(e)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let t=e,r=!0;for(;null!==t&&null!==(t=tZ(t,!0));)if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}
5:{node:t2(n)}}function tZ(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){let e=n.parentElement;if(null===e)return null;n=e}if(iA(n=e)){let e=n.style.display;if(""===e&&!iD(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(rN(n))return n;if("BR"===n.nodeName)return null}}let t0={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function t1(e){let t=t0[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:t4(e.style,t),node:null}}function t2(e=""){return ib(new tY(e))}function t3(e){return e instanceof tY}function t4(e,t){let n=e.fontWeight,r=e.textDecoration.split(" "),i="700"===n||"bold"===n,o=r.includes("line-through"),l="italic"===e.fontStyle,a=r.includes("underline"),s=e.verticalAlign;return e=>(t3(e)&&(i&&!e.hasFormat("bold")&&e.toggleFormat("bold"),o&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),l&&!e.hasFormat("italic")&&e.toggleFormat("italic"),a&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==s||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==s||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class t9 extends tY{static getType(){return"tab"}static clone(e){return new t9(e.__key)}constructor(e){super("	",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=r7(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return t5().updateFromJSON(e)}setTextContent(e){return"	"!==e&&""!==e&&t(126),super.setTextContent("	")}spliceText(e,n,r,i){return""===r&&0===n||"	"===r&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function t5(){return ib(new t9)}function t6(e){return e instanceof t9}class t7{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:0>oh(ok(ox(this,"next")),ok(ox(e,"next")))}getNode(){let e=rF(this.key);return null===e&&t(20),e}set(e,t,n,r){let i=this._selection,o=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,nF()||(r$()===o&&rL(e),null!==i&&(i.setCachedNodes(null),i.dirty=!0)))}}function t8(e,t,n){return new t7(e,t,n)}function ne(e,t){let n=t.__key,r=e.offset,i="element";if(t3(t)){i="text";let e=t.getTextContentSize();r>e&&(r=e)}else if(!n4(t)){let e=t.getNextSibling();if(t3(e))n=e.__key,r=0,i="text";else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function nt(e,t){if(n4(t)){let n=t.getLastDescendant();n4(n)||t3(n)?ne(e,n):ne(e,t)}else ne(e,t)}class nn{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!no(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new nn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,n=this.getNodes(),r=n.length,i=n[r-1];if(t3(i))t=i.select();else{let e=i.getIndexWithinParent()+1;t=i.getParentOrThrow().select(e,e)}t.insertNodes(e);for(let e=0;e<r;e++)n[e].remove()}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=this._nodes,n=[];for(let e of t){let t=rF(e);null!==t&&n.push(t)}return nF()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((nb()||nC())===this&&e[0]){let t=i8(e[0],"next");ov(od(t,t))}for(let t of e)t.remove()}}function nr(e){return e instanceof ni}class ni{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!nr(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();
5n&&t.push(n.caret.origin);let i=new Set,o=new Set;for(let n of e)if(i9(n)){let{origin:e}=n;0===t.length?i.add(e):(o.add(e),t.push(e))}else{let{origin:e}=n;n4(e)&&o.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),i4(e.focus)&&n4(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let n=or(e.focus.origin,"previous");i9(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=oo(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!n4(e)||o.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let n=ok(e.anchor),r=ok(e.anchor.getFlipped()),i=e=>i2(e)?e.origin:e.getNodeAtCaret(),o=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(o)}return t}(oI(ob(this),"next"));return nF()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,"text"),this.focus.set(n.__key,r,"text")}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,o=r.isBefore(i),[l,a]=na(this),s="",u=!0;for(let c=0;c<e.length;c++){let d=e[c];if(n4(d)&&!d.isInline())u||(s+="\n"),u=!d.isEmpty();else if(u=!1,t3(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===i.type&&i.offset!==r.offset||(e=l<a?e.slice(l,a):e.slice(a,l)):e=o?e.slice(l):e.slice(a):d===n&&(e=o?e.slice(0,a):e.slice(0,l)),s+=e}else!n6(d)&&!tV(d)||d===n&&this.isCollapsed()||(s+=d.getTextContent())}return s}applyDOMRange(e){let t=nj(),n=t.getEditorState()._selection,r=np(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;let[i,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(o.key,o.offset,o.type,!0),J(this)}clone(){let e=this.anchor,t=this.focus;return new ni(t8(e.key,e.offset,e.type),t8(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=rM(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=m[e];return!!(this.format&t)}insertRawText(e){let t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){let r=t[e];"\n"===r||"\r\n"===r?n.push(tB()):"	"===r?n.push(t5()):n.push(t2(r))}this.insertNodes(n)}insertText(e){let n=this.anchor,r=this.focus,i=this.format,o=this.style,l=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(l=r,a=n),"element"===l.type&&function(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),l=t2();if(l.setFormat(n),l.setStyle(r),rd(o))o.splice(0,0,[l]);else{let e=n8(i)?rc().append(l):l;null===o?i.append(e):o.insertBefore(e)}e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}(l,a,i,o),"element"===a.type&&oy(a,ok(ox(a,"next")));let s=l.offset,u=a.offset,c=this.getNodes(),d=c.length,f=c[0];t3(f)||t(26);let h=f.getTextContent().length,p=f.getParentOrThrow(),g=c[d-1];if(1===d&&"element"===a.type&&(u=h,a.set(l.key,u,"text")),this.isCollapsed()&&s===h&&(rw(f)||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&null===f.getNextSibling())){let t=f.getNextSibling();if(t3(t)&&t.canInsertTextBefore()&&!rw(t)||((t=t2()).setFormat(i),t.setStyle(o),p.canInsertTextAfter()?f.insertAfter(t):p.insertAfter(t)),t.select(0,0),f=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(rw(f)||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&null===f.getPreviousSibling())){let t=f.getPreviousSibling();if(t3(t)&&!rw(t)||((t=t2()).setFormat(i),p.canInsertTextBefore()?f.insertBefore(t):p.insertBefore(t)),t.select(),f=t,""!==e)return void this.insertText(e)}else if(f.isSegmented()&&s!==h){let e=t2(f.getTextContent());e.setFormat(i),f.replace(e),f=e}else if(!this.isCollapsed()&&""!==e){let t=g.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||n4(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),nh(this.anchor,this.focus,null),void this.insertText(e)}if(1===d){if(rk(f)){let t=t2(e);return t.select(),void f.replace(t)}let t=f.getFormat(),n=f.getStyle();if(s!==u||t===i&&n===o){if(t6(f)){let t=t2(e);return t.setFormat(i),t.setStyle(o),t.select(),void f.replace(t)}}else{if(""!==f.getTextContent()){let t=t2(e);if(t.setFormat(i),t.setStyle(o),t.select(),0===s)f.insertBefore(t,!1);else{let[e]=f.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}f.setFormat(i),f.setStyle(o)}let r=u-s;""===(f=f.spliceText(s,r,e,!0)).getTextContent()?f.remove():"text"===this.anchor.type&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{let t=new Set([...f.getParentKeys(),...g.getParentKeys()]),n=n4(f)?f:f.getParentOrThrow(),r=n4(g)?g:g.getParentOrThrow(),i=g;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline())if("text"===a.type&&(0!==u||""===g.getTextContent())||"element"===a.type&&g.getIndexWithinParent()<u)if(t3(g)&&!rk(g)&&u!==g.getTextContentSize()){if(g.isSegmented()){let e=t2(g.getTextContent());g.replace(e),g=e}n8(a.getNode())||"text"!==a.type||(g=g.spliceText(0,u,"")),t.add(g.__key)}else{let e=g.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?g.remove():e.remove()}else t.add(g.__key);let o=r.getChildren(),l=new Set(c),p=n.is(r),m=n.isInline()&&null===f.getNextSibling()?n:f;for(let e=o.length-1;e>=0;
5e--){let t=o[e];if(t.is(f)||n4(t)&&t.isParentOf(f))break;t.isAttached()&&(!l.has(t)||t.is(i)?p||m.insertAfter(t,!1):t.remove())}if(!p){let e=r,n=null;for(;null!==e;){let r=e.getChildren(),i=r.length;(0===i||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(rk(f))if(s===h)f.select();else{let t=t2(e);t.select(),f.replace(t)}else""===(f=f.spliceText(s,h-s,e,!0)).getTextContent()?f.remove():f.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<d;e++){let n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=nb()===this;o_(this,oS(ob(this))),e&&nb()!==this&&rU(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void rL(null);let n=this.getNodes(),r=[];for(let e of n)t3(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(n4(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},o=r.length;if(0===o)return this.toggleFormat(e),rL(null),void i(t);let l=this.anchor,a=this.focus,s=this.isBackward(),u=s?a:l,c=s?l:a,d=0,f=r[0],h="element"===u.type?0:u.offset;if("text"===u.type&&h===f.getTextContentSize()&&(d=1,f=r[1],h=0),null==f)return;let p=f.getFormatFlags(e,t);i(p);let g=o-1,m=r[g],x="text"===c.type?c.offset:m.getTextContentSize();if(f.is(m)){if(h===x)return;if(rw(f)||0===h&&x===f.getTextContentSize())f.setFormat(p);else{let e=f.splitText(h,x),t=0===h?e[0]:e[1];t.setFormat(p),"text"===u.type&&u.set(t.__key,0,"text"),"text"===c.type&&c.set(t.__key,x-h,"text")}return void(this.format=p)}0===h||rw(f)||([,f]=f.splitText(h),h=0),f.setFormat(p);let y=m.getFormatFlags(e,p);x>0&&(x===m.getTextContentSize()||rw(m)||([m]=m.splitText(x)),m.setFormat(y));for(let t=d+1;t<g;t++){let n=r[t],i=n.getFormatFlags(e,y);n.setFormat(i)}"text"===u.type&&u.set(f.__key,h,"text"),"text"===c.type&&c.set(m.__key,x,"text"),this.format=p|y}insertNodes(e){var n;if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();let n=nb();return nr(n)||t(134),n.insertNodes(e)}let r=(this.isBackward()?this.focus:this.anchor).getNode(),i=iL(r,iP),o=e[e.length-1];if(n4(i)&&"__language"in i){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=nA(this);i.splice(t,0,e),o.selectEnd()}return}if(!e.some(e=>(n4(e)||n6(e))&&!e.isInline())){n4(i)||t(211,r.constructor.name,r.getType());let n=nA(this);return i.splice(n,0,e),void o.selectEnd()}let l=function(e){let t=rc(),n=null;for(let r=0;r<e.length;r++){let i=e[r],o=tV(i);if(o||n6(i)&&i.isInline()||n4(i)&&i.isInline()||t3(i)||i.isParentRequired()){if(null===n&&(n=i.createParentElementNode(),t.append(n),o))continue;null!==n&&n.append(i)}else t.append(i),n=null}return t}(e),a=l.getLastDescendant(),s=l.getChildren(),u=n4(i)&&i.isEmpty()?null:this.insertParagraph(),c=s[s.length-1],d=s[0];n4(n=d)&&iP(n)&&!n.isEmpty()&&n4(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(n4(i)||t(211,r.constructor.name,r.getType()),i.append(...d.getChildren()),d=s[1]),d&&(null===i&&t(212,r.constructor.name,r.getType()),function(e,n,r){let i=n.getParentOrThrow().getLastChild(),o=n,l=[n];for(;o!==i;)o.getNextSibling()||t(140),l.push(o=o.getNextSibling());let a=e;for(let e of l)a=a.insertAfter(e)}(i,d));let f=iL(a,iP);u&&n4(f)&&(u.canMergeWhenEmpty()||iP(c))&&(f.append(...u.getChildren()),u.remove()),n4(i)&&i.isEmpty()&&i.remove(),a.selectEnd();let h=n4(i)?i.getLastChild():null;tV(h)&&f!==i&&h.remove()}insertParagraph(){if("root"===this.anchor.key){let e=rc();return rK().splice(this.anchor.offset,0,[e]),e.select(),e}let e=nA(this),n=iL(this.anchor.getNode(),iP);n4(n)||t(213);let r=n.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){let t=tB();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,i=this.focus,o=e[0],l=e[n],[a,s]=na(this);if(0===t)return[];if(1===t){if(t3(o)&&!this.isCollapsed()){let e=a>s?s:a,t=o.splitText(e,a>s?a:s),n=0===e?t[0]:t[1];return null!=n?[n]:[]}return[o]}let u=r.isBefore(i);if(t3(o)){let t=u?a:s;t===o.getTextContentSize()?e.shift():0!==t&&([,o]=o.splitText(t),e[0]=o)}if(t3(l)){let t=l.getTextContent().length,r=u?s:a;0===r?e.pop():r!==t&&([l]=l.splitText(r),e[n]=l)}return e}
5modify(e,t,n){var r;if(nM(this,e,t,n))return;let i="move"===e,o=nj(),l=ik(im(o));if(!l)return;let a=o._blockCursorElement,s=o._rootElement,u=this.focus.getNode();if(null===s||null===a||!n4(u)||u.isInline()||u.canBeEmpty()||iS(a,o,s),this.dirty){let e=ia(o,this.anchor.key),t=ia(o,this.focus.key);"text"===this.anchor.type&&(e=rA(e)),"text"===this.focus.type&&(t=rA(t)),e&&t&&nw(l,e,this.anchor.offset,t,this.focus.offset)}if(r=t?"backward":"forward",l.modify(e,r,n),l.rangeCount>0){let e=l.getRangeAt(0),n=this.anchor.getNode(),r=n8(n)?n:iy(n);if(this.applyDOMRange(e),this.dirty=!0,!i){let n,i,o,a,s,u=this.getNodes(),c=[],d=!1;for(let e=0;e<u.length;e++){let t=u[e];ip(t,r)?c.push(t):d=!0}if(d&&c.length>0)if(t){let e=c[0];n4(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=c[c.length-1];n4(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||(n=this.focus,o=(i=this.anchor).key,a=i.offset,s=i.type,i.set(n.key,n.offset,n.type,!0),n.set(o,a,s,!0))}}"lineboundary"===n&&nM(this,e,t,n,"decorators")}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&n4(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(n4(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=ou(ox(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of r.iterNodeCarets("shadowRoot"))if(i9(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(n4(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=ok(t);o_(this,od(e,e)),r.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(i4(t)){if(n4(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(n6(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&n4(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=ny();e.add(t.origin.getKey()),rU(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:n}=e;return o_(this,od(!t.origin.isEmpty()&&n.isEmpty()?oC(i8(n,t.direction)):r.anchor,t)),this.removeText()}}let i=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&ns(this,t.getNode()))return}else{let r="text"===i.type?i.getNode():null;if(n="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){let t=i.offset,o=r.getTextContentSize();if(r.is(n)||e&&t!==o||!e&&0!==t)return void nc(r,e,t)}else if(null!==n&&n.isSegmented()){let i=t.offset,o=n.getTextContentSize();if(n.is(r)||e&&0!==i||!e&&i!==o)return void nc(n,e,i)}!function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&"text"===n.type&&"text"===r.type){var o;let e=n.offset,l=r.offset,a=e<l,s=a?e:l,u=a?l:e,c=u-1;s===c||rY(o=i.getTextContent().slice(s,u))||nu(o)||(t?r.set(r.key,c,r.type):n.set(n.key,c,n.type))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){let e=this.anchor.getNode();e.isEmpty()&&n8(e.getParent())&&null===e.getPreviousSibling()&&ns(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function no(e){return e instanceof nn}function nl(e){let t=e.offset;if("text"===e.type)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function na(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[nl(n),nl(r)]}function ns(e,t){for(let n=t;n;
5n=n.getParent()){if(n4(n)){if(n.collapseAtStart(e))return!0;if(iv(n))break}if(n.getPreviousSibling())break}return!1}let nu=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch(e){}return()=>!1})();function nc(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,o=0,l=0;for(let e=0;e<i;e++){let a=e===i-1;if(l=o,o+=r[e].length,t&&o===n||o>n||a){r.splice(e,1),a&&(l=void 0);break}}let a=r.join("").trim();""===a?e.remove():(e.setTextContent(a),e.select(l,l))}function nd(e,n,r,i){let o,l=n;if(iA(e)){let a=!1,s=e.childNodes,u=s.length,c=i._blockCursorElement;l===u&&(a=!0,l=u-1);let d=s[l],f=!1;if(d===c)d=s[l+1],f=!0;else if(null!==c){let t=c.parentNode;e===t&&n>Array.prototype.indexOf.call(t.children,c)&&l--}if(t3(o=rJ(d)))l=ot(o,a?"next":"previous");else{let s=rJ(e);if(null===s)return null;if(n4(s)){let u,c=i.getElementByKey(s.getKey());null===c&&t(214);let d=s.getDOMSlot(c);[s,l]=d.resolveChildIndex(s,c,e,n),n4(s)||t(215),a&&l>=s.getChildrenSize()&&(l=Math.max(0,s.getChildrenSize()-1));let h=s.getChildAtIndex(l);if(n4(h)&&(u=h.getParent(),null===r||null===u||!u.canBeEmpty()||u!==r.getNode())){let e=a?h.getLastDescendant():h.getFirstDescendant();s=null===e||n4(h=e)?h:h.getParentOrThrow(),l=0}t3(h)?(o=h,s=null,l=ot(h,a?"next":"previous")):h!==s&&a&&!f&&(n4(s)||t(216),l=Math.min(s.getChildrenSize(),l+1))}else{let t=s.getIndexWithinParent();l=0===n&&n6(s)&&rJ(e)===s?t:t+1,s=s.getParentOrThrow()}if(n4(s))return t8(s.__key,l,"element")}}else o=rJ(e);return t3(o)?t8(o.__key,ot(o,l,"clamp"),"text"):null}function nf(e,t,n){let r=e.offset,i=e.getNode();if(0===r){let r=i.getPreviousSibling(),o=i.getParent();if(t){if((n||!t)&&null===r&&n4(o)&&o.isInline()){let t=o.getPreviousSibling();t3(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else n4(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):t3(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===i.getTextContent().length){let r=i.getNextSibling(),o=i.getParent();if(t&&n4(r)&&r.isInline())e.set(r.__key,0,"element");else if((n||t)&&null===r&&n4(o)&&o.isInline()&&!o.canInsertTextAfter()){let t=o.getNextSibling();t3(t)&&e.set(t.__key,0,"text")}}}function nh(e,t,n){if("text"===e.type&&"text"===t.type){let r=e.isBefore(t),i=e.is(t);nf(e,r,i),nf(t,!r,i),i&&t.set(e.key,e.offset,e.type);let o=nj();if(o.isComposing()&&o._compositionKey!==e.key&&nr(n)){let r=n.anchor,i=n.focus;e.set(r.key,r.offset,r.type,!0),t.set(i.key,i.offset,i.type,!0)}}}function np(e,t,n,r,i,o){if(null===e||null===n||!rC(i,e,n))return null;let l=nd(e,t,nr(o)?o.anchor:null,i);if(null===l)return null;let a=nd(n,r,nr(o)?o.focus:null,i);if(null===a)return null;if("element"===l.type&&"element"===a.type){let t=rJ(e),r=rJ(n);if(n6(t)&&n6(r))return null}return nh(l,a,o),[l,a]}function ng(e){return n4(e)&&!e.isInline()}function nm(e,t,n,r,i,o){let l=nz(),a=new ni(t8(e,t,i),t8(n,r,o),0,"");return a.dirty=!0,l._selection=a,a}function nx(){return new ni(t8("root",0,"element"),t8("root",0,"element"),0,"")}function ny(){return new nn(new Set)}function nv(e,t){return n_(null,e,t,null)}function n_(e,t,n,r){let i,o,l,a,s=n._window;if(null===s)return null;let u=r||s.event,c=u?u.type:void 0,d="selectionchange"===c,f=!T&&(d||"beforeinput"===c||"compositionstart"===c||"compositionend"===c||"click"===c&&u&&3===u.detail||"drop"===c||void 0===c);if(nr(e)&&!f)return e.clone();if(null===t)return null;if(i=t.anchorNode,o=t.focusNode,l=t.anchorOffset,a=t.focusOffset,d&&nr(e)&&!rC(n,i,o))return e.clone();let h=np(i,l,o,a,n,e);if(null===h)return null;let[p,g]=h;return new ni(p,g,nr(e)?e.format:0,nr(e)?e.style:"")}function nb(){return nz()._selection}function nC(){return nj()._editorState._selection}function nT(e,t,n,r=1){let i=e.anchor,o=e.focus,l=i.getNode(),a=o.getNode();if(!t.is(l)&&!t.is(a))return;let s=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(s,n,"element"),o.set(s,n,"element"),nE(e)}}else{let l=e.isBackward(),a=l?o:i,u=a.getNode(),c=l?i:o,d=c.getNode();if(t.is(u)){let e=a.offset;(n<=e&&r>0||n<e&&r<0)&&a.set(s,Math.max(0,e+r),"element")}if(t.is(d)){let e=c.offset;(n<=e&&r>0||n<e&&r<0)&&c.set(s,Math.max(0,e+r),"element")}}nE(e)}function nE(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed()){if(!n4(o))return;let e=o.getChildrenSize(),i=n>=e,l=i?o.getChildAtIndex(e-1):o.getChildAtIndex(n);if(t3(l)){let e=0;i&&(e=l.getTextContentSize()),t.set(l.__key,e,"text"),r.set(l.__key,e,"text")}}else{if(n4(o)){let e=o.getChildrenSize(),r=n>=e,i=r?o.getChildAtIndex(e-1):o.getChildAtIndex(n);if(t3(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,"text")}}if(n4(l)){let e=l.getChildrenSize(),t=i>=e,n=t?l.getChildAtIndex(e-1):l.getChildAtIndex(i);if(t3(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function nS(e,t,n,r,i){let o=null,l=0,a=null;null!==r?(o=r.__key,t3(r)?(l=r.getTextContentSize(),a="text"):n4(r)&&(l=r.getChildrenSize(),a="element")):null!==i&&(o=i.__key,t3(i)?a="text":n4(i)&&(a="element")),null!==o&&null!==a?e.set(o,l,a):(-1===(l=t.getIndexWithinParent())&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function nk(e,t,n,r,i){"text"===e.type?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function nw(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch(e){}}function nN(e){let t=nb()||nC();
5null===t&&(t=rK().selectEnd()),t.insertNodes(e)}function nI(){let e=nb();return null===e?"":e.getTextContent()}function nA(e){let n=e;e.isCollapsed()||n.removeText();let r=nb();nr(r)&&(n=r),nr(n)||t(161);let i=n.anchor,o=i.getNode(),l=i.offset;for(;!iP(o);){let e=o;if([o,l]=function(e,t){let n=e.getParent();if(!n){let e=rc();return rK().append(e),e.select(),[rK(),0]}if(t3(e)){let r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];let i=+(0!==t);return[n,r[0].getIndexWithinParent()+i]}if(!n4(e)||0===t)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new ni(t8(e.__key,t,"element"),t8(e.__key,t,"element"),0,""),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}(o,l),e.is(o))break}return l}function nM(e,t,n,r,i="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let o=ox(e.focus,n?"previous":"next"),l="lineboundary"===r,a="move"===t,s=o,u="decorators-and-blocks"===i;if(!ow(s)){for(let e of s){u=!1;let{origin:t}=e;if(!n6(t)||t.isIsolated()||(s=e,!l||!t.isInline()))break}if(u)for(let e of ou(o).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(i9(e))e.origin.isInline()||(s=e);else{if(n4(e.origin))continue;n6(e.origin)&&!e.origin.isInline()&&(s=e)}break}}if(s===o)return!1;if(a&&!l&&n6(s.origin)&&s.origin.isKeyboardSelectable()){let e=ny();return e.add(s.origin.getKey()),rU(e),!0}return s=ok(s),a&&oy(e.anchor,s),oy(e.focus,s),u||!l}let nO=null,nD=null,nR=!1,nP=!1,nL=0,n$={characterData:!0,childList:!0,subtree:!0};function nF(){return nR||null!==nO&&nO._readOnly}function nB(){nR&&t(13)}function nV(){nL>99&&t(14)}function nz(){return null===nO&&t(195,nW()),nO}function nj(){return null===nD&&t(196,nW()),nD}function nW(){let e=0,t=new Set,n=rp.version;if("u">typeof window)for(let r of document.querySelectorAll("[contenteditable]")){let i=rS(r);if(rT(i))e++;else if(i){let e=String(i.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}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 nK(e,t,n){let r=t.__type,i=ry(e,r),o=n.get(r);void 0===o&&(o=Array.from(i.transforms),n.set(r,o));let l=o.length;for(let e=0;e<l&&(o[e](t),t.isAttached());e++);}function nH(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function nU(e,t){if(!t)return;let n=e._updateTags,r=t;for(let e of(Array.isArray(t)||(r=[t]),r))n.add(e)}function nJ(e){return nY(e,nj()._nodes)}function nY(e,n){let r=e.type,i=n.get(r);void 0===i&&t(17,r);let o=i.klass;e.type!==o.getType()&&t(18,o.name);let l=o.importJSON(e),a=e.children;if(n4(l)&&Array.isArray(a))for(let e=0;e<a.length;e++){let t=nY(a[e],n);l.append(t)}return l}function nq(e,t,n){let r=nO,i=nR,o=nD;nO=t,nR=!0,nD=e;try{return n()}finally{nO=r,nR=i,nD=o}}function nG(e,n){let r,i,o=e._pendingEditorState,l=e._rootElement,a=e._headless||null===l;if(null===o)return;let s=e._editorState,u=s._selection,c=o._selection,d=0!==e._dirtyType,f=nO,p=nR,g=nD,m=e._updating,x=e._observer,y=null;if(e._pendingEditorState=null,e._editorState=o,!a&&d&&null!==x){nD=e,nO=o,nR=!1,e._updating=!0;try{let n,r=e._dirtyType,i=e._dirtyElements,l=e._dirtyLeaves;x.disconnect(),eo="",es="",eu=2===r,G=e,q=e._config,X=e._nodes,Q=G._listeners.mutation,Z=i,ee=l,et=s._nodeMap,en=o._nodeMap,ec=o._readOnly,er=new Map(e._keyToDOMMap),ei=n=new Map,function e(n,r){let i=et.get(n),o=en.get(n);void 0!==i&&void 0!==o||t(61);let l=eu||ee.has(n)||Z.has(n),a=ia(G,n);if(i===o&&!l){if(n4(i)){let e=a.__lexicalTextContent;void 0!==e&&(eo+=e,es+=e)}else{let e=i.getTextContent();es+=e,eo+=e}return a}if(i!==o&&l&&r8(ei,X,Q,o,"updated"),o.updateDOM(i,a,q)){let e=ex(n,null);return null===r&&t(62),r.replaceChild(e,a),ed(n,null),e}if(n4(i)&&n4(o)){let n=o.__indent;(eu||n!==i.__indent)&&ep(a,n);let r=o.__format;if((eu||r!==i.__format)&&eg(a,r),l&&(function(n,r,i){el=null,ea="",function(n,r,i){let o=eo,l=n.__size,a=r.__size;eo="";let s=i.element;
5if(1===l&&1===a){let t=n.__first,i=r.__first;if(t===i)e(t,s);else{let e=eE(t),n=ex(i,null);try{s.replaceChild(n,e)}catch(r){if("object"==typeof r&&null!=r)throw Error(`${r.toString()} Parent: ${s.tagName}, new child: {tag: ${n.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${t}}.`);throw r}ed(t,null)}let o=en.get(i);t3(o)&&(null===el&&(el=o.getFormat()),""===ea&&(ea=o.getStyle()))}else{let o=eb(n,et),u=eb(r,en);if(o.length!==l&&t(227),u.length!==a&&t(228),0===l)0!==a&&ey(u,r,0,a-1,i);else if(0===a){if(0!==l){let e=null==i.after&&null==i.before&&null==i.element.__lexicalLineBreak;ef(o,0,l-1,e?null:s),e&&(s.textContent="")}}else!function(t,n,r,i,o,l){let a=i-1,s=o-1,u,c,d=l.getFirstChild(),f=0,h=0;for(;f<=a&&h<=s;){let t=n[f],i=r[h];if(t===i)d=eT(e(i,l.element)),f++,h++;else{void 0===u&&(u=new Set(n)),void 0===c&&(c=new Set(r));let o=c.has(t),a=u.has(i);if(o)if(a){let t=ia(G,i);t===d?d=eT(e(i,l.element)):(l.withBefore(d).insertChild(t),e(i,l.element)),f++,h++}else ex(i,l.withBefore(d)),h++;else d=eT(eE(t)),ed(t,l.element),f++}let o=en.get(i);null!==o&&t3(o)&&(null===el&&(el=o.getFormat()),""===ea&&(ea=o.getStyle()))}let p=f>a,g=h>s;if(p&&!g){let e=r[s+1],n=void 0===e?null:G.getElementByKey(e);ey(r,t,h,s,l.withBefore(n))}else g&&!p&&ef(n,f,a,l.element)}(r,o,u,l,a,i)}il(r)&&(eo+="\n\n"),s.__lexicalTextContent=eo,eo=o+eo}(n,r,r.getDOMSlot(i)),null==el||el===r.__textFormat||ec||r.setTextFormat(el),""===ea||ea===r.__textStyle||ec||r.setTextStyle(ea)}(i,o,a),n8(o)||o.isInline()||e_(i,o,a)),il(o)&&(eo+="\n\n",es+="\n\n"),(eu||o.__dir!==i.__dir)&&(em(a,o),n8(o)&&!eu))for(let e of o.getChildren())n4(e)&&em(ia(G,e.getKey()),e)}else{let e=o.getTextContent();if(n6(o)){let e=o.decorate(G,q);null!==e&&eC(n,e)}eo+=e,es+=e}if(!ec&&n8(o)&&o.__cachedText!==es){let e=o.getWritable();e.__cachedText=es,o=e}return a}("root",null),G=void 0,X=void 0,Z=void 0,ee=void 0,et=void 0,en=void 0,q=void 0,er=void 0,ei=void 0,y=n}catch(t){if(t instanceof Error&&e._onError(t),nP)throw t;return rf(e,null,l,o),I(e),e._dirtyType=2,nP=!0,nG(e,s),void(nP=!1)}finally{x.observe(l,n$),e._updating=m,nO=f,nR=p,nD=g}}o._readOnly||(o._readOnly=!0);let v=e._dirtyLeaves,_=e._dirtyElements,b=e._normalizedNodes,C=e._updateTags,T=e._deferred;d&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let n,r=e._decorators,i=e._pendingDecorators||r,o=t._nodeMap;for(n in i)o.has(n)||(i===r&&(i=rj(e)),delete i[n])}(e,o);let E=a?null:ik(im(e));if(e._editable&&null!==E&&(d||null===c||c.dirty)&&null!==l&&!C.has(rl)){nD=e,nO=o;try{if(null!==x&&x.disconnect(),d||null===c||c.dirty){let t=e._blockCursorElement;null!==t&&iS(t,e,l),function(e,t,n,r,i,o,l){let a=r.anchorNode,s=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has(ri)&&d!==o||null!==d&&rb(d))return;if(!nr(t))return null!==e&&rC(n,a,s)&&r.removeAllRanges();let f=t.anchor,h=t.focus,p=f.key,g=h.key,m=ia(n,p),x=ia(n,g),y=f.offset,v=h.offset,_=t.format,b=t.style,C=t.isCollapsed(),T=m,E=x,S=!1;if("text"===f.type){T=rA(m);let e=f.getNode();S=e.getFormat()!==_||e.getStyle()!==b}else nr(e)&&"text"===e.anchor.type&&(S=!0);if("text"===h.type&&(E=rA(x)),null!==T&&null!==E&&(C&&(null===e||S||nr(e)&&(e.format!==_||e.style!==b))&&(tb=[_,b,y,p,performance.now()]),u!==y||c!==v||a!==T||s!==E||"Range"===r.type&&C||(null!==d&&o.contains(d)||o.focus({preventScroll:!0}),"element"===f.type))){if(nw(r,T,y,E,v),!i.has(ro)&&t.isCollapsed()&&null!==o&&o===document.activeElement){let e=nr(t)&&"element"===t.anchor.type?T.childNodes[y]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){let r=iu(n),i=ig(r);if(null===r||null===i)return;let{top:o,bottom:l}=t,a=0,s=0,u=n;for(;null!==u;){let t=u===r.body;if(t)a=0,s=im(e).innerHeight;else{let e=u.getBoundingClientRect();a=e.top,s=e.bottom}let n=0;if(o<a?n=-(a-o):l>s&&(n=l-s),0!==n)if(t)i.scrollBy(0,n);else{let e=u.scrollTop;u.scrollTop+=n;let t=u.scrollTop-e;o-=t,l-=t}if(t)break;u=is(u)}}(n,t,o)}}tp=!0}}(u,c,e,E,C,l)}!function(e,t,n){let r=e._blockCursorElement;if(nr(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){let i=n.anchor,o=i.getNode(),l=i.offset,a=!1,s=null;if(l===o.getChildrenSize())iE(o.getChildAtIndex(l-1))&&(a=!0);else{let t=o.getChildAtIndex(l);if(null!==t&&iE(t)){let n=t.getPreviousSibling();(null===n||iE(n))&&(a=!0,s=e.getElementByKey(t.__key))}}if(a){let n,i,l,a=e.getElementByKey(o.__key);return null===r&&(n=e._config.theme,(i=document.createElement("div")).contentEditable="false",i.setAttribute("data-lexical-cursor","true"),l=n.blockCursor,void 0!==l&&("string"==typeof l&&(l=n.blockCursor=h(l)),void 0!==l&&i.classList.add(...l)),e._blockCursorElement=r=i),t.style.caretColor="transparent",null===s?a.appendChild(r):a.insertBefore(r,
5s)}}null!==r&&iS(r,e,t)}(e,l,c)}finally{null!==x&&x.observe(l,n$),nD=g,nO=f}}null!==y&&function(e,t,n,r,i){let o=Array.from(e._listeners.mutation),l=o.length;for(let e=0;e<l;e++){let[l,a]=o[e];for(let e of a){let o=t.get(e);void 0!==o&&l(o,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,y,C,v,s),nr(c)||null===c||null!==u&&u.is(c)||e.dispatchCommand(ek,void 0);let S=e._pendingDecorators;null!==S&&(e._decorators=S,e._pendingDecorators=null,nX("decorator",e,!0,S)),r=rW(n||s),r!==(i=rW(o))&&nX("textcontent",e,!0,i),nX("update",e,!0,{dirtyElements:_,dirtyLeaves:v,editorState:o,mutatedNodes:y,normalizedNodes:b,prevEditorState:n||s,tags:C}),function(e,t){if(e._deferred=[],0!==t.length){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,T),function(e){let t=e._updates;if(0!==t.length){let n=t.shift();if(n){let[t,r]=n;nZ(e,t,r)}}}(e)}function nX(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=i}}function nQ(e,n){let r=e._updates,i=n||!1;for(;0!==r.length;){let n=r.shift();if(n){let r,[o,l]=n,a=e._pendingEditorState;void 0!==l&&(r=l.onUpdate,l.skipTransforms&&(i=!0),l.discrete&&(null===a&&t(191),a._flushSync=!0),r&&e._deferred.push(r),nU(e,l.tag)),null==a?nZ(e,o,l):o()}}return i}function nZ(e,n,r){let i=e._updateTags,o,l=!1,a=!1;void 0!==r&&(o=r.onUpdate,nU(e,r.tag),l=r.skipTransforms||!1,a=r.discrete||!1),o&&e._deferred.push(o);let s=e._editorState,u=e._pendingEditorState,c=!1;(null===u||u._readOnly)&&(u=e._pendingEditorState=re(u||s),c=!0),u._flushSync=a;let d=nO,f=nR,h=nD,p=e._updating;nO=u,nR=!1,e._updating=!0,nD=e;let g=e._headless||null===e.getRootElement();rg=null;try{var m;let i,o;c&&(g?null!==s._selection&&(u._selection=s._selection.clone()):u._selection=(m=r&&r.event||null,i=e.getEditorState()._selection,o=ik(im(e)),nr(i)||null==i?n_(i,o,e,m):i.clone()));let a=e._compositionKey;n(),l=nQ(e,l),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(nr(r)){let e,t=r.anchor,i=r.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(n,r),"text"===i.type){let t=i.getNode();e!==t&&t.selectionTransform(n,r)}}}(u,e),0!==e._dirtyType&&(l?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);t3(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&U(t)}}(u,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,o=r$(),l=new Map,a=n,s=a.size,u=r,c=u.size;for(;s>0||c>0;){if(s>0){for(let e of(t._dirtyLeaves=new Set,a)){let r=i.get(e);t3(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&U(r),void 0!==r&&nH(r,o)&&nK(t,r,l),n.add(e)}if((s=(a=t._dirtyLeaves).size)>0){nL++;continue}}for(let e of(t._dirtyLeaves=new Set,t._dirtyElements=new Map,u.delete("root")&&u.set("root",!0),u)){let n=e[0],a=e[1];if(r.set(n,a),!a)continue;let s=i.get(n);void 0!==s&&nH(s,o)&&nK(t,s,l)}s=(a=t._dirtyLeaves).size,c=(u=t._dirtyElements).size,nL++}t._dirtyLeaves=n,t._dirtyElements=r}(u,e),nQ(e),function(e,t,n,r){let i=e._nodeMap,o=t._nodeMap,l=[];for(let[e]of r){let t=o.get(e);void 0!==t&&(t.isAttached()||(n4(t)&&function e(t,n,r,i,o,l){let a=t.getFirstChild();for(;null!==a;){let t=a.__key;a.__parent===n&&(n4(a)&&e(a,t,r,i,o,l),r.has(t)||l.delete(t),o.push(t)),a=a.getNextSibling()}}(t,e,i,o,l,r),i.has(e)||r.delete(e),l.push(e)))}for(let e of l)o.delete(e);for(let e of n){let t=o.get(e);void 0===t||t.isAttached()||(i.has(e)||n.delete(e),o.delete(e))}}(s,u,e._dirtyLeaves,e._dirtyElements)),a!==e._compositionKey&&(u._flushSync=!0);let d=u._selection;if(nr(d)){let e=u._nodeMap,n=d.anchor.key,r=d.focus.key;void 0!==e.get(n)&&void 0!==e.get(r)||t(19)}else no(d)&&0===d._nodes.size&&(u._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void nG(e)}finally{nO=d,nR=f,nD=h,e._updating=p,nL=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,nG(e)):c&&r_(()=>{nG(e)}):(u._flushSync=!1,c&&(i.clear(),e._deferred=[],e._pendingEditorState=null))}function n0(e,t,n){nD===e&&void 0===n?t():nZ(e,t,n)}class n1{constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new n1(this.element,e,this.after)}withAfter(e){return new n1(this.element,this.before,e)}withElement(e){return this.element===e?this:new n1(e,this.before,this.after)}insertChild(e){let n=this.before||this.getManagedLineBreak();return null!==n&&n.parentElement!==this.element&&t(222),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&t(223),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&t(224),this.element.replaceChild(e,n),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){null===e?this.removeManagedLineBreak():this.insertManagedLineBreak("decorator"===e&&(s||a))}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=document.createElement("br");if(n.insertBefore(i,r),e){let e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}let i=n2(t,n);i.push(r);let o=n2(t,this.element),l=e.getIndexWithinParent();for(let e=0;e<o.length;e++){let t=i[e],n=o[e];if(void 0===t||t<n)break;if(t>n){l+=1;break}}return[e.getParentOrThrow(),l]}}function n2(e,n){let r=[],i=n;for(;i!==e&&null!==i;i=i.parentNode){let e=0;for(let t=i.previousSibling;null!==t;t=t.previousSibling)e++;r.push(e)}return i!==e&&t(225),r.reverse()}class n3 extends tL{constructor(e){super(e),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(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return v[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=nj()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(t3(t)&&e.push(t),n4(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;n4(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;n4(e);){let t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return n4(e)&&e.getLastDescendant()||e||null}let r=t[e];return n4(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:rF(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:rF(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(e){let t,n,r=this.getChildrenSize();if(e<r/2){for(t=this.getFirstChild(),n=0;null!==t&&n<=e;){if(n===e)return t;t=t.getNextSibling(),n++}return null}for(t=this.getLastChild(),n=r-1;null!==t&&n>=e;){if(n===e)return t;t=t.getPreviousSibling(),n--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),n4(i)&&r!==n-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),n4(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=y[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){let t=m[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return rM(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){nB();let n=nb(),r=e,i=t,o=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(t3(e)||n4(e))return e.select(0,0)}
5else if((void 0===e||e===o)&&(void 0===t||t===o)){let e=this.getLastChild();if(t3(e)||n4(e))return e.select()}}void 0===r&&(r=o),void 0===i&&(i=o);let l=this.__key;return nr(n)?(n.anchor.set(l,r,"element"),n.focus.set(l,i,"element"),n.dirty=!0,n):nm(l,r,l,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?y[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){let i=r.length,o=this.getChildrenSize(),l=this.getWritable();e+n<=o||t(226,String(e),String(n),String(o));let a=l.__key,s=[],u=[],c=this.getChildAtIndex(e+n),d=null,f=o-n+i;if(0!==e)if(e===o)d=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(d=t.getPreviousSibling())}if(n>0){let e=null===d?this.getFirstChild():d.getNextSibling();for(let r=0;r<n;r++){null===e&&t(100);let n=e.getNextSibling(),r=e.__key;rR(e.getWritable()),u.push(r),e=n}}let h=d;for(let e=0;e<i;e++){let n=r[e];null!==h&&n.is(h)&&(d=h=h.getPreviousSibling());let i=n.getWritable();i.__parent===a&&f--,rR(i);let o=n.__key;if(null===h)l.__first=o,i.__prev=null;else{let e=h.getWritable();e.__next=o,i.__prev=e.__key}n.__key===a&&t(76),i.__parent=a,s.push(o),h=n}if(e+n===o)null!==h&&(h.getWritable().__next=null,l.__last=h.__key);else if(null!==c){let e=c.getWritable();if(null!==h){let t=h.getWritable();e.__prev=h.__key,t.__next=c.__key}else e.__prev=null}if(l.__size=f,u.length){let e=nb();if(nr(e)){let t=new Set(u),n=new Set(s),{anchor:r,focus:i}=e;n9(r,t,n)&&nS(r,r.getNode(),this,d,c),n9(i,t,n)&&nS(i,i.getNode(),this,d,c),0!==f||this.canBeEmpty()||iv(this)||this.remove()}}return l}getDOMSlot(e){return new n1(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(iA(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=this.getDOMSlot(e),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());null!==i&&(null==r?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}}function n4(e){return e instanceof n3}function n9(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class n5 extends tL{decorate(e,n){t(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function n6(e){return e instanceof n5}class n7 extends n3{static getType(){return"root"}static clone(){return new n7}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){let e=this.__cachedText;return(nF()||0===nj()._dirtyType)&&null!==e?e:super.getTextContent()}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(e,t){return!1}splice(e,n,r){for(let e of r)n4(e)||n6(e)||t(282);return super.splice(e,n,r)}static importJSON(e){return rK().updateFromJSON(e)}collapseAtStart(){return!0}}function n8(e){return e instanceof n7}function re(e){return new rn(new Map(e._nodeMap))}function rt(){return new rn(new Map([["root",new n7]]))}class rn{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return nq(t&&t.editor||null,this,e)}clone(e){let t=new rn(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return nq(null,this,()=>({root:function e(n){let r=n.exportJSON(),i=n.constructor;if(r.type!==i.getType()&&t(130,i.name),n4(n)){let o=r.children;Array.isArray(o)||t(59,i.name);let l=n.getChildren();for(let t=0;t<l.length;t++){let n=e(l[t]);o.push(n)}}return r}(rK())}))}}let rr="history-merge",ri="collaboration",ro="skip-scroll-into-view",rl="skip-dom-selection";class ra extends n3{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class rs extends n3{static getType(){return"paragraph"}static clone(e){return new rs(e.__key)}createDOM(e){let t=document.createElement("p"),n=r7(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:ru,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(iA(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return rc().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){let n=rc();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(0===e.length||t3(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function ru(e){let t=rc();return e.style&&(t.setFormat(e.style.textAlign),ij(e,t)),{node:t}}function rc(){return ib(new rs)}function rd(e){return e instanceof rs}function rf(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=rt(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let o=e._observer;null!==o&&(o.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",i.set("root",n))}function rh(e){var t,n;let r,i,o,l,a=e||{},s=nD,u=a.theme||{},c=void 0===e?s:a.parentEditor||null,d=a.disableEvents||!1,f=rt(),h=a.namespace||(null!==c?c._config.namespace:rG()),p=a.editorState,g=[n7,tY,t$,t9,rs,ra,...a.nodes||[]],{onError:m,html:x}=a,y=void 0===a.editable||a.editable;if(void 0===e&&null!==s)r=s._nodes;else{r=new Map;for(let e=0;e<g.length;e++){let t=g[e],n=null,i=null;if("function"!=typeof t){let e=t;t=e.replace,n=e.with,i=e.withKlass||null}let{ownNodeConfig:o}=iU(t),l=t.getType(),a=t.transform(),s=new Set;o&&o.$transform&&s.add(o.$transform),null!==a&&s.add(a),r.set(l,{exportDOM:x&&x.export?x.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:i,sharedNodeState:P(g[e]),transforms:s})}}let v=new rp(f,c,r,{disableEvents:d,namespace:h,theme:u},m||console.error,(t=r,n=x?x.import:void 0,i=new Map,o=new Set,l=e=>{Object.keys(e).forEach(t=>{let n=i.get(t);void 0===n&&(n=[],i.set(t,n)),n.push(e[t])})}
5,t.forEach(e=>{let t=e.klass.importDOM;if(null==t||o.has(t))return;o.add(t);let n=t.call(e.klass);null!==n&&l(n)}),n&&l(n),i),y,e);return void 0!==p&&(v._pendingEditorState=p,v._dirtyType=2),v}class rp{constructor(e,t,n,r,i,o,l,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,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=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,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=rG(),this._onError=i,this._htmlConversions=o,this._editable=l,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,n,r){void 0===r&&t(35);let i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=i.get(e);void 0===o&&t(36,String(e));let l=o[r];return l.add(n),()=>{l.delete(n),o.every(e=>0===e.size)&&i.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,o=i.get(t);void 0===o&&(o=new Set,i.set(t,o)),o.add(r);let l=n&&n.skipInitialization;return void 0!==l&&l||this.initializeMutationListener(t,r),()=>{o.delete(r),0===o.size&&i.delete(t)}}getRegisteredNode(e){let n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=iV(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(null!=i){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=iV(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}0!==r.length&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=rF(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:rr}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return io(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let n=this._rootElement;if(e!==n){let r=r7(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,rf(this,n,e,i),null!==n&&(this._config.disableEvents||function(e){let n=e.ownerDocument,r=th.get(n);if(void 0===r)return;let i=r-1;i>=0||t(164),th.set(n,i),0===i&&n.removeEventListener("selectionchange",tM);let o=rS(e);rT(o)?(!function(e){if(null!==e._parentEditor){let t=rq(e),n=t[t.length-1]._key;tA.get(n)===e&&tA.delete(n)}else tA.delete(e._key)}(o),e.__lexicalEditor=null):o&&t(198);let l=tI(e);for(let e=0;e<l.length;e++)l[e]();e.__lexicalEventHandles=[]}(n),null!=r&&n.classList.remove(...r)),null!==e){let t=ig(e),n=e.style;n.userSelect="text",n.whiteSpace="pre-wrap",n.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,I(this),this._updateTags.add(rr),nG(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument,r=th.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",tM),th.set(n,(r||0)+1),e.__lexicalEditor=t;let i=tI(e);for(let n=0;n<ts.length;n++){let[r,o]=ts[n],l="function"==typeof o?e=>
5{tD(e)||(tO(e),(t.isEditable()||"click"===r)&&o(e,t))}:e=>{if(tD(e))return;tO(e);let n=t.isEditable();switch(r){case"cut":return n&&io(t,e7,e);case"copy":return io(t,e6,e);case"paste":return n&&io(t,eD,e);case"dragstart":return n&&io(t,e4,e);case"dragover":return n&&io(t,e9,e);case"dragend":return n&&io(t,e5,e);case"focus":return n&&io(t,ti,e);case"blur":return n&&io(t,to,e);case"drop":return n&&io(t,e2,e)}};e.addEventListener(r,l),i.push(()=>{e.removeEventListener(r,l)})}}(e,this),null!=r&&e.classList.add(...r)}else this._window=null,this._updateTags.add(rr),nG(this);nX("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let r=e;r._readOnly&&((r=re(e))._selection=e._selection?e._selection.clone():null),N(this);let i=this._pendingEditorState,o=this._updateTags,l=void 0!==n?n.tag:null;null===i||i.isEmpty()||(null!=l&&o.add(l),nG(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=l&&o.add(l),this._updating||nG(this)}parseEditorState(e,t){return function(e,t,n){let r=rt(),i=nO,o=nR,l=nD,a=t._dirtyElements,s=t._dirtyLeaves,u=t._cloneNotNeeded,c=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,nO=r,nR=!1,nD=t,rg=null;try{let i=t._nodes;nY(e.root,i),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=a,t._dirtyLeaves=s,t._cloneNotNeeded=u,t._dirtyType=c,nO=i,nR=o,nD=l}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return nG(this),this.getEditorState().read(e,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):nZ(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),n0(this,()=>{let r=nb(),i=rK();null!==r?r.dirty||rU(r.clone()):0!==i.getChildrenSize()&&("rootStart"===t.defaultSelection?i.selectStart():i.selectEnd()),id("focus"),ih(()=>{n.removeAttribute("autocapitalize"),e&&e()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=ik(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,nX("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}rp.version="0.35.0+prod.esm";let rg=null,rm=1;function rx(){rm=1}function ry(e,n){let r=rv(e,n);return void 0===r&&t(30,n),r}function rv(e,t){return e._nodes.get(t)}let r_="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function rb(e){let t=document.activeElement;if(!iA(t))return!1;let n=t.nodeName;return n6(rz(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==rS(t))}function rC(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!rb(t)&&rE(t)===e}catch(e){return!1}}function rT(e){return e instanceof rp}function rE(e){let t=e;for(;null!=t;){let e=rS(t);if(rT(e))return e;t=is(t)}return null}function rS(e){return e?e.__lexicalEditor:null}function rk(e){return t6(e)||e.isToken()}function rw(e){return rk(e)||e.isSegmented()}function rN(e){return iM(e)&&3===e.nodeType}function rI(e){return iM(e)&&9===e.nodeType}function rA(e){let t=e;for(;null!=t;){if(rN(t))return t;t=t.firstChild}return null}function rM(e,t,n){let r=m[t];if(null!==n&&(e&r)==(n&r))return e;let i=e^r;return"subscript"===t?i&=~m.superscript:"superscript"===t?i&=~m.subscript:"lowercase"===t?(i&=~m.uppercase,i&=~m.capitalize):"uppercase"===t?(i&=~m.lowercase,i&=~m.capitalize):"capitalize"===t&&(i&=~m.lowercase,i&=~m.uppercase),i}function rO(e){return t3(e)||tV(e)||n6(e)}function rD(e,t){let n,r=(n=rg,rg=null,n);if(null!=(t=t||r&&r.__key))return void(e.__key=t);nB(),nV();let i=nj(),o=nz(),l=""+rm++;o._nodeMap.set(l,e),n4(e)?i._dirtyElements.set(l,!0):i._dirtyLeaves.add(l),i._cloneNotNeeded.add(l),i._dirtyType=1,e.__key=l}function rR(e){let t=e.getParent();if(null!==t){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),l=null!==o?o.__key:null,a=null!==i?i.__key:null,
5s=null!==i?i.getWritable():null,u=null!==o?o.getWritable():null;null===i&&(r.__first=l),null===o&&(r.__last=a),null!==s&&(s.__next=l),null!==u&&(u.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function rP(e){nV();let t=e.getLatest(),n=t.__parent,r=nz(),i=nj(),o=r._nodeMap,l=i._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;let e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,o,l);let a=t.__key;i._dirtyType=1,n4(e)?l.set(a,!0):i._dirtyLeaves.add(a)}function rL(e){nB();let t=nj(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){let e=rF(n);null!==e&&e.getWritable()}if(null!==e){let t=rF(e);null!==t&&t.getWritable()}}}function r$(){return nF()?null:nj()._compositionKey}function rF(e,t){let n=(t||nz())._nodeMap.get(e);return void 0===n?null:n}function rB(e,t){let n=rV(e,nj());return void 0!==n?rF(n,t):null}function rV(e,t){return e[`__lexicalKey_${t._key}`]}function rz(e,t){let n=e;for(;null!=n;){let e=rB(n,t);if(null!==e)return e;n=is(n)}return null}function rj(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function rW(e){return e.read(()=>rK().getTextContent())}function rK(){return rH(nz())}function rH(e){return e._nodeMap.get("root")}function rU(e){nB();let t=nz();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function rJ(e){let t=nj(),n=function(e,t){let n=e;for(;null!=n;){let e=rV(n,t);if(void 0!==e)return e;n=is(n)}return null}(e,t);return null===n?e===t.getRootElement()?rF("root"):null:rF(n)}function rY(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function rq(e){let t=[],n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function rG(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function rX(e){return rN(e)?e.nodeValue:null}function rQ(e,t,n){let r=ik(im(t));if(null===r)return;let i=r.anchorNode,{anchorOffset:o,focusOffset:l}=r;if(null!==i){let t=rX(i),r=rz(i);if(null!==t&&t3(r)){if(t===p&&n){let e=n.length;t=n,o=e,l=e}null!==t&&rZ(r,t,o,l,e)}}}function rZ(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let l=o.isComposing(),u=t;(l||i)&&t[t.length-1]===p&&(u=t.slice(0,-1));let c=o.getTextContent();if(i||u!==c){if(""===u){if(rL(null),a||s||f)o.remove();else{let e=nj();setTimeout(()=>{e.update(()=>{o.isAttached()&&o.remove()})},20)}return}let t=o.getParent(),i=nC(),c=o.getTextContentSize(),d=r$(),h=o.getKey();if(o.isToken()||null!==d&&h===d&&!l||nr(i)&&(null!==t&&!t.canInsertTextBefore()&&0===i.anchor.offset||i.anchor.key===e.__key&&0===i.anchor.offset&&!o.canInsertTextBefore()&&!l||i.focus.key===e.__key&&i.focus.offset===c&&!o.canInsertTextAfter()&&!l))return void o.markDirty();let p=nb();if(!nr(p)||null===n||null===r)return void r0(o,u,p);if(p.setTextNodeRange(o,n,o,r),o.isSegmented()){let e=t2(o.getTextContent());o.replace(e),o=e}r0(o,u,p)}}}function r0(e,t,n){if(e.setTextContent(t),nr(n)){let t=e.getKey();for(let r of["anchor","focus"]){let i=n[r];"text"===i.type&&i.key===t&&(i.offset=ot(e,i.offset,"clamp"))}}}function r1(e,t,n){let r=t[n]||!1;return"any"===r||r===e[n]}function r2(e,t){return r1(e,t,"altKey")&&r1(e,t,"ctrlKey")&&r1(e,t,"shiftKey")&&r1(e,t,"metaKey")}function r3(e,t,n){return r2(e,n)&&e.key.toLowerCase()===t.toLowerCase()}let r4={ctrlKey:!i,metaKey:i},r9={altKey:i,ctrlKey:!i};function r5(e){return"Backspace"===e.key}function r6(e){let t=rK();if(nr(e)){let t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),J(e),e}{let e=t.select(0,t.getChildrenSize());return rU(J(e)),e}}function r7(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;let i=e[t];if("string"==typeof i){let e=h(i);return n[t]=e,e}return i}function r8(e,n,r,i,o){if(0===r.size)return;let l=i.__type,a=i.__key,s=n.get(l);void 0===s&&t(33,l);let u=s.klass,c=e.get(u);void 0===c&&(c=new Map,e.set(u,c));let d=c.get(a),f="destroyed"===d&&"created"===o;(void 0===d||f)&&c.set(a,f?"updated":o)}function ie(e){let t=e.getType(),n=nz();if(n._readOnly){let e=iV(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function it(e,t,n){let r=e.getParent(),i=n,o=e;return null!==r&&(t&&0===n?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function ir(e,t){let n=e.offset;if("element"===e.type)return it(e.getNode(),t,n);{let r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return null===e?it(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function ii(e){let t=im(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function io(e,t,n){return function(e,t,n){let r=rq(e);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){let l=r[o],a=l._commands.get(t);if(void 0!==a){let t=a[i];if(void 0!==t){let r=Array.from(t),i=r.length,o=!1;if(n0(l,()=>{for(let t=0;t<i;t++)if(r[t](n,e))return void(o=!0)}),o)return o}}}return!1}(e,t,n)}function il(e){return!n8(e)&&!e.isLastChild()&&!e.isInline()}function ia(e,n){let r=e._keyToDOMMap.get(n);return void 0===r&&t(75,n),r}function is(e){let t=e.assignedSlot||e.parentElement;return iO(t)?t.host:t}function iu(e){return rI(e)?e:iA(e)?e.ownerDocument:null}function ic(e){return nj()._updateTags.has(e)}function id(e){nB(),nj()._updateTags.add(e)}function ih(e){nB(),nj()._deferred.push(e)}function ip(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function ig(e){let t=iu(e);return t?t.defaultView:null}function im(e){let n=e._window;return null===n&&t(78),n}function ix(e){return n4(e)&&e.isInline()||n6(e)&&e.isInline()}function iy(e){let t=e.getParentOrThrow();for(;null!==t&&!iv(t);)t=t.getParentOrThrow();return t}function iv(e){return n8(e)||n4(e)&&e.isShadowRoot()}function i_(e){let t=e.constructor.clone(e);return rD(t,null),t.afterCloneFrom(e),t}function ib(e){let n=nj(),r=e.getType(),i=rv(n,r);void 0===i&&t(200,e.constructor.name,r);let{replace:o,replaceWithKlass:l}=i;if(null!==o){let n=o(e),i=n.constructor;return null!==l?n instanceof l||t(201,l.name,l.getType(),i.name,i.getType(),e.constructor.name,r):n instanceof e.constructor&&i!==e.constructor||t(202,i.name,i.getType(),e.constructor.name,r),n.__key===e.__key&&t(203,e.constructor.name,r,i.name,i.getType()),n}return e}function iC(e,n){!n8(e.getParent())||n4(n)||n6(n)||t(99)}function iT(e){let n=rF(e);return null===n&&t(63,e),n}function iE(e){return(n6(e)||n4(e)&&!e.canBeEmpty())&&!e.isInline()}function iS(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;let r=e.parentElement;null!==r&&r.removeChild(e)}function ik(e){return n?(e||window).getSelection():null}function iw(e){let t=ig(e);return t?t.getSelection():null}function iN(e,n){let r=e.getChildAtIndex(n);null==r&&(r=e),iv(e)&&t(102);let i=e=>{let n=e.getParentOrThrow(),o=iv(n),l=e!==r||o?i_(e):e;if(o)return n4(e)&&n4(l)||t(133),e.insertAfter(l),[e,l,l];{let[t,r,o]=i(n),a=e.getNextSiblings();return o.append(l,...a),[t,r,l]}},[o,l]=i(r);return[o,l]}function iI(e){return iA(e)&&"A"===e.tagName}function iA(e){return iM(e)&&1===e.nodeType}
5function iM(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function iO(e){return iM(e)&&11===e.nodeType}function iD(e){let t=RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function iR(e){let t=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 null!==e.nodeName.match(t)}function iP(e){if(n6(e)&&!e.isInline())return!0;if(!n4(e)||iv(e))return!1;let t=e.getFirstChild(),n=null===t||tV(t)||t3(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function iL(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function i$(){return nj()}let iF=new WeakMap,iB=new Map;function iV(e){if(!e._readOnly&&e.isEmpty())return iB;e._readOnly||t(192);let n=iF.get(e);return n||(n=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),iF.set(e,n)),n}function iz(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function ij(e,t){let n=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(n)}function iW(e){e.__lexicalUnmanaged=!0}function iK(e){return!0===e.__lexicalUnmanaged}function iH(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==tL[t]}function iU(e){let t=C in e.prototype?e.prototype[C]():void 0,n=e===n5||e===n3||e===tL,r=!n&&iH(e,"getType")?e.getType():void 0,i,o=r;if(t)if(r)i=t[r];else for(let[e,n]of Object.entries(t))o=e,i=n;if(!n&&o&&(iH(e,"getType")||(e.getType=()=>o),iH(e,"clone")||(e.clone=t=>(rg=t,new e)),iH(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(t=>(new e).updateFromJSON(t))),!iH(e,"importDOM")&&i)){let{importDOM:t}=i;t&&(e.importDOM=()=>t)}return{ownNodeConfig:i,ownNodeType:o}}function iJ(e){let t=i$();return nB(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}let iY={next:"previous",previous:"next"};class iq{constructor(e){this.origin=e}[Symbol.iterator](){return of({hasNext:i4,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return i8(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return i8(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(null===n?this.insert(e):n.replace(e,t)),this}splice(e,n,r="next"){let i=r===this.direction?n:Array.from(n).reverse(),o=this,l=this.getParentAtCaret(),a=new Map;for(let t=o.getAdjacentCaret();null!==t&&a.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();a.set(e.getKey(),e)}for(let e of i){if(a.size>0){let n=o.getNodeAtCaret();if(n)if(a.delete(n.getKey()),a.delete(e.getKey()),n.is(e)||o.origin.is(e));else{let t=e.getParent();t&&t.is(l)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(a).join(" "))}else o.insert(e);o=i8(e,this.direction)}for(let e of a.values())e.remove();return this}}class iG extends iq{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:or(e,this.direction)}getParentCaret(e="root"){return i8(iZ(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=iY[this.direction];return i8(this.getNodeAtCaret(),e)||or(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof iG&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let iX={root:n8,shadowRoot:iv};function iQ(e){return iY[e]}function iZ(e,t="root"){return iX[t](e)?null:e}class i0 extends iq{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:i8(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return n4(this.origin)?or(this.origin,this.direction):null}getParentCaret(e="root"){return i8(iZ(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=iY[this.direction];return i8(this.getNodeAtCaret(),e)||or(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof i0&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof i0||e instanceof i1)&&this.direction===e.direction&&this.origin.is(e.origin)}}class i1 extends iq{type="text";constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:oe(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return i8(iZ(this.getParentAtCaret(),e),this.direction)}getFlipped(){return oe(this.origin,iY[this.direction],this.offset)}isSamePointCaret(e){return e instanceof i1&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof i0||e instanceof i1)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return i8(this.origin,this.direction)}}function i2(e){return e instanceof i1}function i3(e){return e instanceof iq}function i4(e){return e instanceof i0}function i9(e){return e instanceof iG}let i5={next:class extends i1{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends i1{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},i6={next:class extends i0{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends i0{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},i7={next:class extends iG{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends iG{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function i8(e,t){return e?new i6[t](e):null}function oe(e,t,n){return e?new i5[t](e,ot(e,n)):null}function ot(e,t,n="error"){let r=e.getTextContentSize(),i="next"===t?r:"previous"===t?0:t;return(i<0||i>r)&&("clamp"!==n&&function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",284),t))r.append("v",e);n.search=r.toString(),console.warn(`Minified Lexical warning #284; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}
5(0,String(t),String(r),e.getKey()),i=i<0?0:r),i}function on(e,t){return new oa(e,t)}function or(e,t){return n4(e)?new i7[t](e):null}function oi(e){return e&&e.getChildCaret()||e}function oo(e){return e&&oi(e.getAdjacentCaret())}class ol{type="node-caret-range";constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new ol(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return i2(t)?function(e,t){let{direction:n,origin:r}=e;return on(e,ot(r,"focus"===t?iY[n]:n)-e.offset)}(t,e):null},t=e("anchor"),n=e("focus");if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[on(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e="root"){let t=i2(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=i2(n),i=t=>t.isSameNodeCaret(n)?null:oo(t)||t.getParentCaret(e);return of({hasNext:e=>null!==e&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class oa{type="slice";constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return oe(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}}function os(e){return e instanceof oa}function ou(e){return od(e,i8(rK(),e.direction))}function oc(e){return od(e,e)}function od(e,n){return e.direction!==n.direction&&t(265),new ol(e,n,e.direction)}function of(e){let{initial:t,hasNext:n,step:r,map:i}=e,o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};let e={done:!1,value:i(o)};return o=r(o),e}}}function oh(e,n){let r=om(e.origin,n.origin);switch(null===r&&t(275,e.origin.getKey(),n.origin.getKey()),r.type){case"same":{let t="text"===e.type,r="text"===n.type;return t&&r?Math.sign(e.offset-n.offset):e.type===n.type?0:t?-1:r?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===n.type?1:-1;case"branch":return op(r)}}function op(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,o=t,l=n;for(;o&&l;o=o.getNextSibling(),l=l.getNextSibling()){if(o.__key===i)return -1;if(l.__key===r)return 1}return null===o?1:-1}function og(e){return n4(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function om(e,n){if(e.is(n))return{commonAncestor:e,type:"same"};let r=new Map;for(let[t,n]=og(e);t;n=t,t=t.getParent())r.set(t,n);for(let[i,o]=og(n);i;o=i,i=i.getParent()){let l=r.get(i);if(void 0!==l)return null===l?(i.is(e)||t(276),{commonAncestor:i,type:"ancestor"}):null===o?(i.is(n)||t(277),{commonAncestor:i,type:"descendant"}):((n4(l)||l.is(e))&&(n4(o)||o.is(n))&&i.is(l.getParent())&&i.is(o.getParent())||t(278),{a:l,b:o,commonAncestor:i,type:"branch"})}return null}function ox(e,n){let{type:r,key:i,offset:o}=e,l=iT(e.key);return"text"===r?(t3(l)||t(266,l.getType(),i),oe(l,n,o)):(n4(l)||t(267,l.getType(),i),oA(l,e.offset,n))}function oy(e,n){let{origin:r,direction:i}=n,o="next"===i;i2(n)?e.set(r.getKey(),n.offset,"text"):i4(n)?t3(r)?e.set(r.getKey(),ot(r,i),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+ +!!o,"element"):(i9(n)&&n4(r)||t(268),e.set(r.getKey(),o?0:r.getChildrenSize(),"element"))}function ov(e){let t=nb(),n=nr(t)?t:nx();return o_(n,e),rU(n),n}function o_(e,t){oy(e.anchor,t.anchor),oy(e.focus,t.focus)}function ob(e){let{anchor:t,focus:n}=e,r=ox(t,"next"),i=ox(n,"next"),o=0>=oh(r,i)?"next":"previous";return od(oN(r,o),oN(i,o))}function oC(e){let{direction:t,origin:n}=e,r=i8(n,iY[t]).getNodeAtCaret();return r?i8(r,t):or(n.getParentOrThrow(),t)}function oT(e,t="root"){let n=[e];for(let r=i9(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;r=r.getParentCaret(t))n.push(oC(r));return n}function oE(e){return!!e&&e.origin.isAttached()}function oS(e,n="removeEmptySlices"){let r,i;if(e.isCollapsed())return e;
5let o="root",l="next",a=n,s=oI(e,l),u=oT(s.anchor,o),c=oT(s.focus.getFlipped(),o),d=new Set,f=[];for(let e of s.iterNodeCarets(o))if(i9(e))d.add(e.origin.getKey());else if(i4(e)){let{origin:t}=e;n4(t)&&!d.has(t.getKey())||f.push(t)}for(let e of f)e.remove();for(let e of s.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),r=oC(i8(t,l)),i=t.getMode();if(Math.abs(e.distance)===n&&"removeEmptySlices"===a||"token"===i&&0!==e.distance)r.remove();else if(0!==e.distance){a="removeEmptySlices";let t=e.removeTextSlice(),n=e.caret.origin;if("segmented"===i){let e=t.origin,n=t2(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());r.replaceOrInsert(n),t=oe(n,l,t.offset)}n.is(u[0].origin)&&(u[0]=t),n.is(c[0].origin)&&(c[0]=t.getFlipped())}}for(let e of u)if(oE(e)){r=ok(e);break}for(let e of c)if(oE(e)){i=ok(e);break}let h=function(e,t,n){let r;if(!e||!t)return null;let i=e.getParentAtCaret(),o=t.getParentAtCaret();if(!i||!o)return null;let l=i.getParents().reverse();l.push(i);let a=o.getParents().reverse();a.push(o);let s=Math.min(l.length,a.length);for(r=0;r<s&&l[r]===a[r];r++);let u=(e,t)=>{let n;for(let i=r;i<e.length;i++){let r=e[i];if(iv(r))return;!n&&t(r)&&(n=r)}return n},c=u(l,iP),d=c&&u(a,e=>n.has(e.getKey())&&iP(e));return c&&d?[c,d]:null}(r,i,d);if(h){let[e,t]=h;or(e,"previous").splice(0,t.getChildren()),t.remove()}let p=[r,i,...u,...c].find(oE);if(p)return oc(oN(ok(p),e.direction));t(269,JSON.stringify(u.map(e=>e.origin.__key)))}function ok(e){let t=function(e){let t=e;for(;i9(t);){let e=oo(t);if(!i9(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(t3(t.origin))return i2(t)?t:oe(t.origin,n,n);let r=t.getAdjacentCaret();return i4(r)&&t3(r.origin)?oe(r.origin,n,iY[n]):t}function ow(e){return i2(e)&&e.offset!==ot(e.origin,e.direction)}function oN(e,t){return e.direction===t?e:e.getFlipped()}function oI(e,t){return e.direction===t?e:od(oN(e.focus,t),oN(e.anchor,t))}function oA(e,t,n){let r=or(e,"next");for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(null===e)break;r=e}return oN(r,n)}function oM(e,t="root"){let n=0,r=e,i=oo(r);for(;null===i;){if(n--,!(i=r.getParentCaret(t)))return null;i=oo(r=i)}return i&&[i,n]}function oO(e){let{origin:n,offset:r,direction:i}=e;if(r===ot(n,i))return e.getSiblingCaret();if(r===ot(n,iY[i]))return oC(e.getSiblingCaret());let[o]=n.splitText(r);return t3(o)||t(281),oN(i8(o,"next"),i)}function oD(e,t){return!0}function oR(e,{$copyElementNode:t=i_,$splitTextPointCaretNext:n=oO,rootMode:r="shadowRoot",$shouldSplit:i=oD}={}){if(i2(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(i9(e)&&(!n.canBeEmpty()||!i(n,"first")))return oC(o);let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||n.canBeEmpty()&&i(n,"last"))&&o.insert(t(n).splice(0,0,r))}return o}e.s(["$addUpdateTag",()=>id,"$applyNodeReplacement",()=>ib,"$caretFromPoint",()=>ox,"$caretRangeFromSelection",()=>ob,"$cloneWithProperties",()=>iz,"$comparePointCaretNext",()=>oh,"$copyNode",()=>i_,"$create",()=>iJ,"$createLineBreakNode",()=>tB,"$createNodeSelection",()=>ny,"$createParagraphNode",()=>rc,"$createPoint",()=>t8,"$createRangeSelection",()=>nx,"$createRangeSelectionFromDom",()=>nv,"$createTabNode",()=>t5,"$createTextNode",()=>t2,"$extendCaretToRange",()=>ou,"$getAdjacentChildCaret",()=>oo,"$getAdjacentNode",()=>ir,"$getAdjacentSiblingOrParentSiblingCaret",()=>oM,"$getCaretInDirection",()=>oN,"$getCaretRange",()=>od,"$getCaretRangeInDirection",()=>oI,"$getCharacterOffsets",()=>na,"$getChildCaret",()=>or,"$getChildCaretAtIndex",()=>oA,"$getChildCaretOrSelf",()=>oi,"$getCollapsedCaretRange",()=>oc,"$getCommonAncestor",()=>om,"$getCommonAncestorResultBranchOrder",()=>op,"$getEditor",()=>i$,"$getNearestNodeFromDOMNode",()=>rz,"$getNearestRootOrShadowRoot",()=>iy,"$getNodeByKey",()=>rF,"$getNodeByKeyOrThrow",()=>iT,"$getPreviousSelection",()=>nC,"$getRoot",()=>rK,"$getSelection",()=>nb,"$getSiblingCaret",()=>i8,"$getState",()=>O,"$getStateChange",()=>D,"$getTextContent",()=>nI,"$getTextNodeOffset",()=>ot,"$getTextPointCaret",()=>oe,"$getTextPointCaretSlice",()=>on,"$getWritableNodeState",()=>$,"$hasAncestor",()=>ip,"$hasUpdateTag",()=>
5ic,"$insertNodes",()=>nN,"$isBlockElementNode",()=>ng,"$isChildCaret",()=>i9,"$isDecoratorNode",()=>n6,"$isElementNode",()=>n4,"$isExtendableTextPointCaret",()=>ow,"$isInlineElementOrDecoratorNode",()=>ix,"$isLeafNode",()=>rO,"$isLineBreakNode",()=>tV,"$isNodeCaret",()=>i3,"$isNodeSelection",()=>no,"$isParagraphNode",()=>rd,"$isRangeSelection",()=>nr,"$isRootNode",()=>n8,"$isRootOrShadowRoot",()=>iv,"$isSiblingCaret",()=>i4,"$isTabNode",()=>t6,"$isTextNode",()=>t3,"$isTextPointCaret",()=>i2,"$isTextPointCaretSlice",()=>os,"$isTokenOrSegmented",()=>rw,"$isTokenOrTab",()=>rk,"$nodesOfType",()=>ie,"$normalizeCaret",()=>ok,"$normalizeSelection__EXPERIMENTAL",()=>J,"$onUpdate",()=>ih,"$parseSerializedNode",()=>nJ,"$removeTextFromCaretRange",()=>oS,"$rewindSiblingCaret",()=>oC,"$selectAll",()=>r6,"$setCompositionKey",()=>rL,"$setPointFromCaret",()=>oy,"$setSelection",()=>rU,"$setSelectionFromCaretRange",()=>ov,"$setState",()=>R,"$splitAtPointCaretNext",()=>oR,"$splitNode",()=>iN,"$updateRangeSelectionFromCaretRange",()=>o_,"ArtificialNode__DO_NOT_USE",()=>ra,"BLUR_COMMAND",()=>to,"CAN_REDO_COMMAND",()=>tn,"CAN_UNDO_COMMAND",()=>tr,"CLEAR_EDITOR_COMMAND",()=>te,"CLEAR_HISTORY_COMMAND",()=>tt,"CLICK_COMMAND",()=>eN,"COLLABORATION_TAG",()=>ri,"COMMAND_PRIORITY_CRITICAL",()=>4,"COMMAND_PRIORITY_EDITOR",()=>0,"COMMAND_PRIORITY_HIGH",()=>3,"COMMAND_PRIORITY_LOW",()=>1,"COMMAND_PRIORITY_NORMAL",()=>2,"CONTROLLED_TEXT_INSERTION_COMMAND",()=>eO,"COPY_COMMAND",()=>e6,"CUT_COMMAND",()=>e7,"DELETE_CHARACTER_COMMAND",()=>eI,"DELETE_LINE_COMMAND",()=>eL,"DELETE_WORD_COMMAND",()=>eP,"DRAGEND_COMMAND",()=>e5,"DRAGOVER_COMMAND",()=>e9,"DRAGSTART_COMMAND",()=>e4,"DROP_COMMAND",()=>e2,"DecoratorNode",()=>n5,"ElementNode",()=>n3,"FOCUS_COMMAND",()=>ti,"FORMAT_ELEMENT_COMMAND",()=>e3,"FORMAT_TEXT_COMMAND",()=>e$,"HISTORIC_TAG",()=>"historic","HISTORY_MERGE_TAG",()=>rr,"HISTORY_PUSH_TAG",()=>"history-push","INDENT_CONTENT_COMMAND",()=>e0,"INSERT_LINE_BREAK_COMMAND",()=>eA,"INSERT_PARAGRAPH_COMMAND",()=>eM,"INSERT_TAB_COMMAND",()=>eZ,"INTERNAL_$isBlock",()=>iP,"IS_ALL_FORMATTING",()=>2047,"IS_BOLD",()=>1,"IS_CODE",()=>16,"IS_HIGHLIGHT",()=>128,"IS_ITALIC",()=>2,"IS_STRIKETHROUGH",()=>4,"IS_SUBSCRIPT",()=>32,"IS_SUPERSCRIPT",()=>64,"IS_UNDERLINE",()=>8,"KEY_ARROW_DOWN_COMMAND",()=>eU,"KEY_ARROW_LEFT_COMMAND",()=>eW,"KEY_ARROW_RIGHT_COMMAND",()=>ez,"KEY_ARROW_UP_COMMAND",()=>eH,"KEY_BACKSPACE_COMMAND",()=>eq,"KEY_DELETE_COMMAND",()=>eX,"KEY_DOWN_COMMAND",()=>eV,"KEY_ENTER_COMMAND",()=>eJ,"KEY_ESCAPE_COMMAND",()=>eG,"KEY_MODIFIER_COMMAND",()=>tl,"KEY_SPACE_COMMAND",()=>eY,"KEY_TAB_COMMAND",()=>eQ,"LineBreakNode",()=>t$,"MOVE_TO_END",()=>ej,"MOVE_TO_START",()=>eK,"NODE_STATE_KEY",()=>"$","OUTDENT_CONTENT_COMMAND",()=>e1,"PASTE_COMMAND",()=>eD,"PASTE_TAG",()=>"paste","ParagraphNode",()=>rs,"REDO_COMMAND",()=>eB,"REMOVE_TEXT_COMMAND",()=>eR,"RootNode",()=>n7,"SELECTION_CHANGE_COMMAND",()=>ek,"SELECTION_INSERT_CLIPBOARD_NODES_COMMAND",()=>ew,"SELECT_ALL_COMMAND",()=>e8,"SKIP_COLLAB_TAG",()=>"skip-collab","SKIP_DOM_SELECTION_TAG",()=>rl,"SKIP_SCROLL_INTO_VIEW_TAG",()=>ro,"TEXT_TYPE_TO_FORMAT",()=>m,"TabNode",()=>t9,"TextNode",()=>tY,"UNDO_COMMAND",()=>eF,"buildImportMap",()=>tP,"createCommand",()=>eS,"createEditor",()=>rh,"createSharedNodeState",()=>P,"createState",()=>M,"flipDirection",()=>iQ,"getDOMOwnerDocument",()=>iu,"getDOMSelection",()=>ik,"getDOMSelectionFromTarget",()=>iw,"getDOMTextNode",()=>rA,"getEditorPropertyFromDOMNode",()=>rS,"getNearestEditorFromDOMNode",()=>rE,"getRegisteredNode",()=>rv,"getRegisteredNodeOrThrow",()=>ry,"getStaticNodeConfig",()=>iU,"isBlockDomNode",()=>iR,"isCurrentlyReadOnlyMode",()=>nF,"isDOMDocumentNode",()=>rI,"isDOMNode",()=>iM,"isDOMTextNode",()=>rN,"isDOMUnmanaged",()=>iK,"isDocumentFragment",()=>iO,"isExactShortcutMatch",()=>r3,"isHTMLAnchorElement",()=>iI,"isHTMLElement",()=>iA,"isInlineDomNode",()=>iD,"isLexicalEditor",()=>rT,"isModifierMatch",()=>r2,"isSelectionCapturedInDecoratorInput",()=>rb,"isSelectionWithinEditor",()=>rC,"makeStepwiseIterator",()=>of,"removeFromParent",()=>rR,"resetRandomKey",()=>rx,"setDOMUnmanaged",()=>iW,"setNodeIndentFromDOM",()=>ij])},125617,578467,541504,e=>{"use strict";let t;var n=e.i(191788),r=e.i(391398),i=Object.defineProperty,o=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?i(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};class l{constructor(e=new Map){this.map=e}clone(){return new l(new Map(this.map))}increment(e){let t=this.map.get(e)??0;this.map.set(e,t+1)}
5decrement(e,t){let n=this.map.get(e);void 0!==n&&(n-=1,this.map.set(e,n),0===n&&t())}}class a{constructor(){o(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return void 0===t&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){let n=this.get(e);void 0!==n&&t(n)}delete(e){return this.map.delete(e)}}function s(){}let u="cell";function c(e,t){return e===t}let d=new Map;class f{constructor(e={}){for(const t of(o(this,"subscriptions",new a),o(this,"singletonSubscriptions",new Map),o(this,"graph",new a),o(this,"state",new Map),o(this,"distinctNodes",new Map),o(this,"executionMaps",new Map),o(this,"definitionRegistry",new Set),o(this,"combinedCells",[]),Object.getOwnPropertySymbols(e)))this.state.set(t,e[t])}cellInstance(e,t=!0,n=Symbol()){return this.state.has(n)||this.state.set(n,e),!1===t||this.distinctNodes.has(n)||this.distinctNodes.set(n,!0===t?c:t),n}signalInstance(e=!0,t=Symbol()){return!1!==e&&this.distinctNodes.set(t,!0===e?c:e),t}sub(e,t){this.register(e);let n=this.subscriptions.getOrCreate(e);return n.add(t),()=>n.delete(t)}singletonSub(e,t){return this.register(e),void 0===t?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){let n=this.signalInstance();return this.connect({map:e=>(...t)=>{e(t)},sink:n,sources:e}),this.sub(n,t)}pubIn(e){var t;let n=Reflect.ownKeys(e),r=this.getExecutionMap(n),i=r.refCount.clone(),o=r.participatingNodes.slice(),l=new Map(this.state),a=e=>{this.graph.use(e,t=>{for(let{sources:n,sink:r}of t)n.has(e)&&i.decrement(r,()=>{o.splice(o.indexOf(r),1),a(r)})})};for(;;){let n=o.shift();if(void 0===n)break;let i=!1,s=e=>{let t=this.distinctNodes.get(n);if(null!=t&&t(l.get(n),e)){i=!1;return}i=!0,l.set(n,e),this.state.has(n)&&this.state.set(n,e)};if(Object.prototype.hasOwnProperty.call(e,n)?s(e[n]):r.projections.use(n,e=>{for(let t of e){let e=[...Array.from(t.sources),...Array.from(t.pulls)].map(e=>l.get(e));t.map(s)(...e)}}),i){let e=l.get(n);this.inContext(()=>{this.subscriptions.use(n,t=>{for(let n of t)n(e)})}),null==(t=this.singletonSubscriptions.get(n))||t(e)}else a(n)}}connect({sources:e,pulls:t=[],map:n,sink:r}){let i={map:n,pulls:new Set(t),sink:this.register(r),sources:new Set(e)};for(let n of[...e,...t])this.register(n),this.graph.getOrCreate(n).add(i);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>{var n;let r;return n=this.signalInstance(),r=n,this.link(this.pipe(r,...e),t),n}}link(e,t){this.connect({map:e=>t=>{e(t)},sink:t,sources:[e]})}combine(...e){var t,n;return n=t=this.signalInstance(),this.connect({map:e=>(...t)=>{e(t)},sink:n,sources:e}),t}combineCells(...e){let t=this.combinedCells.find(t=>e.length===t.sources.length&&e.every((e,n)=>e===t.sources[n]));if(t)return t.cell;let n=this.cellInstance(e.map(e=>this.getValue(e)),!0);return this.connect({map:e=>(...t)=>{e(t)},sink:n,sources:e}),this.combinedCells.push({sources:e,cell:n}),n}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(e=>this.getValue(e))}register(e){var t,n;let r=d.get(e);return void 0===r||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),n=t=r.type===u?this.cellInstance(r.initial,r.distinct,e):this.signalInstance(r.distinct,e),this.inContext(()=>{r.init(this,n)}),t)}inContext(e){let n=t;t=this;let r=e();return t=n,r}changeWith(e,t,n){this.connect({sources:[t],pulls:[e],sink:e,map:e=>(t,r)=>{e(n(r,t))}})}calculateExecutionMap(e){let t=[],n=new Set,r=new a,i=new l,o=new a,s=(e,l=0)=>{i.increment(e),n.has(e)||(this.register(e),r.use(e,e=>{l=Math.max(...Array.from(e).map(e=>t.indexOf(e)))+1}),this.graph.use(e,t=>{for(let n of t)n.sources.has(e)?(o.getOrCreate(n.sink).add(n),s(n.sink,l)):r.getOrCreate(n.sink).add(e)}),n.add(e),t.splice(l,0,e))};return e.forEach(s),{participatingNodes:t,pendingPulls:r,projections:o,refCount:i}}getExecutionMap(e){let t=e;if(1===e.length){t=e[0];let n=this.executionMaps.get(t);if(void 0!==n)return n}else for(let[t,n]of this.executionMaps.entries())if(Array.isArray(t)&&t.length===e.length&&t.every(t=>e.includes(t)))return n;let n=this.calculateExecutionMap(e);return this.executionMaps.set(t,n),n}combineOperators(...e){return t=>{for(let n of e)t=n(t,this);return t}}}function h(e,t=s,n=!0){var r,i;return i=r=Symbol(),d.set(i,{type:u,distinct:n,initial:e,init:t}),r}function p(e,t,n=!0){var r,i;return i=r=Symbol(),d.set(i,{type:u,distinct:n,initial:e,init:(e,n
5)=>{e.link(t(e,n),n)}}),r}function g(e=s,t=!1){var n,r;return r=n=Symbol(),d.set(r,{type:"signal",distinct:t,init:e}),n}function m(e=s){var t,n;return n=t=Symbol(),d.set(n,{type:"signal",distinct:!1,init:e}),t}function x(){if(!t)throw Error("This function must be called within a realm instance");return t}let y=(e,t)=>{x().link(e,t)},v=(...e)=>{x().pub(...e)},_=(...e)=>x().sub(...e),b=(...e)=>{x().pubIn(...e)},C=(...e)=>x().pipe(...e),T=(...e)=>{x().changeWith(...e)},E=(...e)=>x().combine(...e),S=e=>x().getValue(e),k=n.createContext(null);function w({children:e,initWith:t,updateWith:i={}}){let o=n.useMemo(()=>new f(t),[]);return n.useEffect(()=>{o.pubIn(i)},[i,o]),(0,r.jsx)(k.Provider,{value:o,children:e})}function N(){let e=n.useContext(k);if(null===e)throw Error("useRealm must be used within a RealmContextProvider");return e}function I(e){let t=N();t.register(e);let r=n.useCallback(n=>t.sub(e,n),[t,e]);return n.useSyncExternalStore(r,()=>t.getValue(e),()=>t.getValue(e))}function A(...e){let t=N();return I(n.useMemo(()=>t.combineCells.apply(t,e),[t,...e]))}function M(e){let t=N();return t.register(e),n.useCallback(n=>{t.pub(e,n)},[t,e])}function O(e){return[I(e),M(e)]}function D(e){return(t,n)=>{let r=n.signalInstance();return n.connect({map:t=>n=>{t(e(n))},sink:r,sources:[t]}),r}}function R(...e){return(t,n)=>{let r=n.signalInstance();return n.connect({map:e=>(...t)=>{e(t)},pulls:e,sink:r,sources:[t]}),r}}function P(e){return(t,n)=>{let r=n.signalInstance();return n.connect({map:t=>()=>{t(e)},sink:r,sources:[t]}),r}}function L(e){return(t,n)=>{let r=n.signalInstance();return n.connect({map:t=>n=>{e(n)&&t(n)},sink:r,sources:[t]}),r}}function $(){return(e,t)=>{let n=t.signalInstance(),r=!1;return t.connect({map:e=>t=>{r||(r=!0,e(t))},sink:n,sources:[e]}),n}}function F(e,t){return(n,r)=>{let i=r.signalInstance();return r.connect({map:n=>r=>{n(t=e(t,r))},sink:i,sources:[n]}),i}}function B(e){return(t,n)=>{let r=n.signalInstance(),i,o=null;return n.sub(t,t=>{i=t,null===o&&(o=setTimeout(()=>{o=null,n.pub(r,i)},e))}),r}}function V(e){return(t,n)=>{let r=n.signalInstance(),i,o=null;return n.sub(t,t=>{i=t,null!==o&&clearTimeout(o),o=setTimeout(()=>{n.pub(r,i)},e)}),r}}function z(){return(e,t)=>{let n=t.signalInstance();return t.sub(e,e=>{queueMicrotask(()=>{t.pub(n,e)})}),n}}function j(e){return(t,n)=>{let r=n.signalInstance(),i=Symbol(),o=i;return n.connect({map:e=>t=>{o!==i&&(e([o,t]),o=i)},sink:r,sources:[e]}),n.sub(t,e=>{o=e}),r}}function W(e,t,n){return(r,i)=>{let o=i.signalInstance();return i.sub(r,r=>{null!==r&&"object"==typeof r&&"then"in r?(i.pub(o,e()),r.then(e=>{i.pub(o,t(e))}).catch(e=>{i.pub(o,n(e))})):i.pub(o,t(r))}),o}}function K(e,t){return n=>e(t(n))}function H(e,t){return t(e)}function U(e,t){return n=>e(t,n)}function J(e,t){return()=>e(t)}function Y(e){return t=>t[e]}function q(e,t){return t(e),e}function G(e){e()}function X(e){return()=>e}function Q(...e){return()=>{e.map(G)}}function Z(){}function ee(e){return function(t){return{init:n=>{var r;return null==(r=e.init)?void 0:r.call(e,n,t)},postInit:n=>{var r;return null==(r=e.postInit)?void 0:r.call(e,n,t)},update:n=>{var r;return null==(r=e.update)?void 0:r.call(e,n,t)}}}}function et({children:e,plugins:t}){let r=n.default.useMemo(()=>{var e;return(e=>{var n,r;for(let r of t)null==(n=r.init)||n.call(r,e);for(let n of t)null==(r=n.postInit)||r.call(n,e)})(e=new f),e},[]);return n.default.useEffect(()=>{var e;for(let n of t)null==(e=n.update)||e.call(n,r)}),n.default.createElement(k.Provider,{value:r},e)}e.s(["Action",()=>m,"Cell",()=>h,"DerivedCell",()=>p,"Realm",()=>f,"RealmContext",()=>k,"RealmProvider",()=>w,"Signal",()=>g,"changeWith",()=>T,"combine",()=>E,"debounceTime",()=>V,"defaultComparator",()=>c,"delayWithMicrotask",()=>z,"filter",()=>L,"getValue",()=>S,"handlePromise",()=>W,"link",()=>y,"map",()=>D,"mapTo",()=>P,"onNext",()=>j,"once",()=>$,"pipe",()=>C,"pub",()=>v,"pubIn",()=>b,"scan",()=>F,"sub",()=>_,"throttleTime",()=>B,"useCell",()=>O,"useCellValue",()=>I,"useCellValues",()=>A,"usePublisher",()=>M,"useRealm",()=>N,"withLatestFrom",()=>R],578467),e.s(["always",()=>X,"call",()=>G,"compose",()=>K,"curry1to0",()=>J,"curry2to1",()=>U,"joinProc",()=>Q,"noop",()=>Z,"prop",()=>Y,"tap",()=>q,"thrush",()=>H],541504),e.s(["RealmWithPlugins",()=>et,"realmPlugin",()=>ee],125617)},317649,995013,919444,713511,847202,733473,433565,669462,305400,832519,924814,365601,244670,823580,252897,541435,220713,526912,806500,468506,794890,585136,257298,931188,869701,210095,121341,751291,383166,959323,808386,30625,801773,460703,541320,881868,335007,583838,750788,500143,623513,908576,133567,e=>{"use strict";e.s(["Appender",()=>ob,"NESTED_EDITOR_UPDATED_COMMAND",()=>iL,"activeEditor$",()=>iF,"activeEditorSubscriptions$",()=>om,"activePlugins$",()=>oW,"addActivePlugin$",()=>oK,"addBottomAreaChild$",()=>oM,"addComposerChild$",()=>ow,"addEditorWrapper$",()=>oD,"addExportVisitor$",()=>ou,"addImportVisitor$",()=>ol,"addLexicalNode$",()=>oo,"addMdastExtension$",()=>os,"addNestedEditorChild$",()=>oP,"addSyntaxExtension$",()=>oa,"addToMarkdownExtension$",()=>oc,"addTopAreaChild$",()=>oI,"applyBlockType$",()=>oF,"applyFormat$",()=>
5iY,"autoFocus$",()=>iW,"bottomAreaChildren$",()=>oA,"codeBlockEditorDescriptors$",()=>ot,"composerChildren$",()=>ok,"contentEditableClassName$",()=>iB,"contentEditableRef$",()=>oi,"contentEditableWrapperElement$",()=>og,"convertSelectionToNode$",()=>oB,"corePlugin",()=>oJ,"createActiveEditorSubscription$",()=>oE,"createRootEditorSubscription$",()=>oT,"currentBlockType$",()=>o$,"currentFormat$",()=>iH,"currentSelection$",()=>iq,"directiveDescriptors$",()=>oe,"editorInFocus$",()=>oy,"editorRootElementRef$",()=>on,"editorWrapperElementRef$",()=>or,"editorWrappers$",()=>oO,"exportVisitors$",()=>i9,"historyState$",()=>oL,"iconComponentFor$",()=>o_,"importVisitors$",()=>i1,"inFocus$",()=>iK,"initialMarkdown$",()=>iG,"initialMarkdownNormalize$",()=>iQ,"insertDecoratorNode$",()=>oV,"insertMarkdown$",()=>oh,"jsxComponentDescriptors$",()=>i8,"jsxIsAvailable$",()=>i7,"lexicalTheme$",()=>oU,"markdown$",()=>iX,"markdownErrorSignal$",()=>iJ,"markdownProcessingError$",()=>iU,"markdownSourceEditorValue$",()=>oj,"mdastExtensions$",()=>i4,"muteChange$",()=>od,"nestedEditorChildren$",()=>oR,"onBlur$",()=>ov,"placeholder$",()=>ij,"readOnly$",()=>iz,"rootEditor$",()=>i$,"rootEditorSubscriptions$",()=>ox,"setMarkdown$",()=>of,"spellCheck$",()=>iV,"syntaxExtensions$",()=>i3,"toMarkdownExtensions$",()=>i5,"toMarkdownOptions$",()=>i6,"topAreaChildren$",()=>oN,"translation$",()=>oH,"useTranslation",()=>oY,"usedLexicalNodes$",()=>i2,"viewMode$",()=>oz],317649);var t=e.i(125617),n=e.i(343941);let r=new Map;function i(e,t){let n=e.getRootElement();if(null===n)return[];let r=n.getBoundingClientRect(),i=getComputedStyle(n),o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),l=Array.from(t.getClientRects()),a,s=l.length;l.sort((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n});for(let e=0;e<s;e++){let t=l[e],n=a&&a.top<=t.top&&a.top+a.height>t.top&&a.left+a.width>t.left,i=t.width+o===r.width;n||i?(l.splice(e--,1),s--):a=t}return l}function o(e){let t={};if(!e)return t;for(let n of e.split(";"))if(""!==n){let[e,r]=n.split(/:([^]+)/);e&&r&&(t[e.trim()]=r.trim())}return t}function l(e){let t=r.get(e);return void 0===t&&(t=o(e),r.set(e,t)),t}function a(e){let t=(0,n.$getEditor)().getElementByKey(e.getKey());if(null===t)return null;let r=t.ownerDocument.defaultView;return null===r?null:r.getComputedStyle(t)}function s(e){return a((0,n.$isRootNode)(e)?e:e.getParentOrThrow())}function u(e){let t=s(e);return null!==t&&"rtl"===t.direction}function c(e,t){let r=e.getStartEndPoints();if(t.isSelected(e)&&!(0,n.$isTokenOrSegmented)(t)&&null!==r){let[i,o]=r,l=e.isBackward(),a=i.getNode(),s=o.getNode(),u=t.is(a),c=t.is(s);if(u||c){let[r,i]=(0,n.$getCharacterOffsets)(e),o=a.is(s),u=t.is(l?s:a),c=t.is(l?a:s),d,f=0;o?(f=r>i?i:r,d=r>i?r:i):u?(f=l?i:r,d=void 0):c&&(f=0,d=l?r:i),t.__text=t.__text.slice(f,d)}}return t}function d(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();let t=e.getNode();return(0,n.$isElementNode)(t)||function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",177),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #177; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(0),e.offset===t.getChildrenSize()}function f(e,t,r){let i=t.getNode(),o=r;if((0,n.$isElementNode)(i)){let e=i.getDescendantByIndex(t.offset);null!==e&&(i=e)}for(;o>0&&null!==i;){if((0,n.$isElementNode)(i)){let e=i.getLastDescendant();null!==e&&(i=e)}let r=i.getPreviousSibling(),l=0;if(null===r){let e=i.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(null===(e=e.getParent())){r=null;break}t=e.getPreviousSibling()}null!==e&&(l=2*!e.isInline(),r=t)}let a=i.getTextContent();""===a&&(0,n.$isElementNode)(i)&&!i.isInline()&&(a="\n\n");let s=a.length;if(!(0,n.$isTextNode)(i)||o>=s){let e=i.getParent();i.remove(),null==e||0!==e.getChildrenSize()||(0,n.$isRootNode)(e)||e.remove(),o-=s+l,i=r}else{let r=i.getKey(),l=e.getEditorState().read(()=>{let e=(0,n.$getNodeByKey)(r);return(0,n.$isTextNode)(e)&&e.isSimpleText()?e.getTextContent():null}),u=s-o,c=a.slice(0,u);if(null!==l&&l!==a){let e=(0,n.$getPreviousSelection)(),t=i;if(i.isSimpleText())i.setTextContent(l);else{let e=(0,n.$createTextNode)(l);i.replace(e),t=e}if((0,n.$isRangeSelection)(e)&&e.isCollapsed()){let n=e.anchor.offset;t.select(n,n)}}else if(i.isSimpleText()){let e=t.key===r,n=t.offset;n<o&&(n=s);let l=e?n-o:0,a=e?n:u;if(e&&0===l){let[e]=i.splitText(l,a);e.remove()}else{let[,e]=i.splitText(l,a);e.remove()}}else{let e=(0,n.$createTextNode)(c);i.replace(e)}o=0}}}function h(e){let t=e.getStyle(),n=o(t);r.set(t,n)}function p(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}
5function g(e,t,r=p){if(null===e)return;let i=e.getStartEndPoints(),o=new Map,l=null;if(i){let[e,t]=i;(l=(0,n.$createRangeSelection)()).anchor.set(e.key,e.offset,e.type),l.focus.set(t.key,t.offset,t.type);let r=b(e.getNode(),n.INTERNAL_$isBlock),a=b(t.getNode(),n.INTERNAL_$isBlock);(0,n.$isElementNode)(r)&&o.set(r.getKey(),r),(0,n.$isElementNode)(a)&&o.set(a.getKey(),a)}for(let t of e.getNodes())if((0,n.$isElementNode)(t)&&(0,n.INTERNAL_$isBlock)(t))o.set(t.getKey(),t);else if(null===i){let e=b(t,n.INTERNAL_$isBlock);(0,n.$isElementNode)(e)&&o.set(e.getKey(),e)}for(let[e,n]of o){let i=t();r(n,i),n.replace(i,!0),l&&(e===l.anchor.key&&l.anchor.set(i.getKey(),l.anchor.offset,l.anchor.type),e===l.focus.key&&l.focus.set(i.getKey(),l.focus.offset,l.focus.type))}l&&e.is((0,n.$getSelection)())&&(0,n.$setSelection)(l)}function m(e){let t=x(e);return null!==t&&"vertical-rl"===t.writingMode}function x(e){let t=e.anchor.getNode();return(0,n.$isElementNode)(t)?a(t):s(t)}function y(e,t){let r=m(e)?!t:t;v(e)&&(r=!r);let i=(0,n.$caretFromPoint)(e.focus,r?"previous":"next");if((0,n.$isExtendableTextPointCaret)(i))return!1;for(let e of(0,n.$extendCaretToRange)(i)){if((0,n.$isChildCaret)(e))return!e.origin.isInline();if(!(0,n.$isElementNode)(e.origin)){if((0,n.$isDecoratorNode)(e.origin))return!0;break}}return!1}function v(e){let t=x(e);return null!==t&&"rtl"===t.direction}function _(e,t,n){let r,i=v(e);r=m(e)||i?!n:n,e.modify(t?"extend":"move",r,"character")}function b(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function C(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}e.s(["$addNodeStyle",()=>h,"$isAtNodeEnd",()=>d,"$isParentRTL",()=>u,"$moveCharacter",()=>_,"$setBlocksType",()=>g,"$shouldOverrideDefaultCharacterSelection",()=>y,"$sliceSelectedTextNodeContent",()=>c,"$trimTextContentFromAnchor",()=>f,"createRectsFromDOMRange",()=>i,"getStyleObjectFromCSS",()=>l],995013);let T="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,E=T&&"documentMode"in document?document.documentMode:null,S=(T&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),T&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent));function k(...e){let t=[];for(let n of e)if(n&&"string"==typeof n)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function w(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function N(e,...t){let n=k(...t);n.length>0&&e.classList.add(...n)}function I(e,...t){let n=k(...t);n.length>0&&e.classList.remove(...n)}function A(e){return e?e.getAdjacentCaret():null}function M(e,t){let n=e;for(;null!=n;){if(n instanceof t)return n;n=n.getParent()}return null}function O(e){let t=D(e,e=>(0,n.$isElementNode)(e)&&!e.isInline());return(0,n.$isElementNode)(t)||C(4,e.__key),t}T&&"InputEvent"in window&&!E&&new window.InputEvent("input"),T&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),T&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,T&&/Android/.test(navigator.userAgent),T&&/^(?=.*Chrome).*/i.test(navigator.userAgent),T&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);let D=(e,t)=>{let r=e;for(;r!==(0,n.$getRoot)()&&null!=r;){if(t(r))return r;r=r.getParent()}return null};function R(e,t){let r=new Map,i=e._pendingEditorState;for(let[e,i]of t._nodeMap)r.set(e,(0,n.$cloneWithProperties)(i));i&&(i._nodeMap=r),e._dirtyType=2;let o=t._selection;(0,n.$setSelection)(null===o?null:o.clone())}function P(e){let t,r=(0,n.$getSelection)()||(0,n.$getPreviousSelection)();if((0,n.$isRangeSelection)(r))t=(0,n.$caretFromPoint)(r.focus,"next");else{if(null!=r){let e=r.getNodes(),i=e[e.length-1];i&&(t=(0,n.$getSiblingCaret)(i,"next"))}t=t||(0,n.$getChildCaret)((0,n.$getRoot)(),"previous").getFlipped().insert((0,n.$createParagraphNode)())}let i=function(e,t,r){let i=(0,n.$getCaretInDirection)(t,"next");for(let e=i;e;e=(0,n.$splitAtPointCaretNext)(e,void 0))i=e;return(0,n.$isTextPointCaret)(i)&&C(283),i.insert(e.isInline()?(0,n.$createParagraphNode)().append(e):e),(0,n.$getCaretInDirection)((0,n.$getSiblingCaret)(e.getLatest(),"next"),t.direction)}(e,t),o=(0,n.$getAdjacentChildCaret)(i),l=(0,n.$isChildCaret)(o)?(0,n.$normalizeCaret)(o):i;return(0,n.$setSelectionFromCaretRange)((0,n.$getCollapsedCaretRange)(l)),e.getLatest()}function L(e,t){let n=t();return e.replace(n),n.append(e),n}function $(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function F(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);null!==i&&n.push(i)}return n}let B=!(S||!T)&&void 0;function V(e){let t=1;if(function(){if(void 0===B){let e=document.createElement("div");e.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),B=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return B}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}function z(e){e.undoStack=[],e.redoStack=[],e.current=null}function j(){return{current:null,redoStack:[],undoStack:[]}}e.s(["$filter",()=>F,"$findMatchingParent",()=>D,"$getAdjacentCaret",()=>A,"$getNearestBlockElementAncestorOrThrow",()=>O,"$getNearestNodeOfType",()=>
5M,"$insertNodeToNearestRoot",()=>P,"$restoreEditorState",()=>R,"$wrapNodeInElement",()=>L,"addClassNamesToElement",()=>N,"calculateZoomLevel",()=>V,"mergeRegister",()=>w,"objectKlassEquals",()=>$,"removeClassNamesFromElement",()=>I],919444);let W=new Set(["STYLE","SCRIPT"]);function K(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function H(e,t,r){let i=e.getData("application/x-lexical-editor");if(i)try{let e=JSON.parse(i);if(e.namespace===r._config.namespace&&Array.isArray(e.nodes))return U(r,function(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=(0,n.$parseSerializedNode)(i);(0,n.$isTextNode)(o)&&h(o),t.push(o)}return t}(e.nodes),t)}catch(e){}let o=e.getData("text/html"),l=e.getData("text/plain");if(o&&l!==o)try{let e=(new DOMParser).parseFromString(window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(o):o,"text/html");return U(r,function(e,t){let r=t.body?t.body.childNodes:[],i=[],o=[];for(let t=0;t<r.length;t++){let l=r[t];if(!W.has(l.nodeName)){let t=function e(t,r,i,o,l=new Map,a){let s=[];if(W.has(t.nodeName))return s;let u=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(void 0!==r)for(let t of r){let n=t(e);null!==n&&(null===i||(i.priority||0)<=(n.priority||0))&&(i=n)}return null!==i?i.conversion:null}(t,r),d=c?c(t):null,f=null;if(null!==d){f=d.after;let e=d.node;if(null!==(u=Array.isArray(e)?e[e.length-1]:e)){for(let[,e]of l)if(!(u=e(u,a)))break;u&&s.push(...Array.isArray(e)?e:[u])}null!=d.forChild&&l.set(t.nodeName,d.forChild)}let h=t.childNodes,p=[],g=(null==u||!(0,n.$isRootOrShadowRoot)(u))&&(null!=u&&(0,n.$isBlockElementNode)(u)||o);for(let t=0;t<h.length;t++)p.push(...e(h[t],r,i,g,new Map(l),u));return null!=f&&(p=f(p)),(0,n.isBlockDomNode)(t)&&(p=function(e,t,r){let i=e.style.textAlign,o=[],l=[];for(let e=0;e<t.length;e++){let a=t[e];if((0,n.$isBlockElementNode)(a))i&&!a.getFormat()&&a.setFormat(i),o.push(a);else if(l.push(a),e===t.length-1||e<t.length-1&&(0,n.$isBlockElementNode)(t[e+1])){let e=r();e.setFormat(i),e.append(...l),o.push(e),l=[]}}return o}(t,p,g?()=>{let e=new n.ArtificialNode__DO_NOT_USE;return i.push(e),e}:n.$createParagraphNode)),null==u?p.length>0?s=s.concat(p):(0,n.isBlockDomNode)(t)&&null!=t.nextSibling&&null!=t.previousSibling&&(0,n.isInlineDomNode)(t.nextSibling)&&(0,n.isInlineDomNode)(t.previousSibling)&&(s=s.concat((0,n.$createLineBreakNode)())):(0,n.$isElementNode)(u)&&u.append(...p),s}(l,e,o,!1);null!==t&&(i=i.concat(t))}}return function(e){for(let t of e)t.getNextSibling()instanceof n.ArtificialNode__DO_NOT_USE&&t.insertAfter((0,n.$createLineBreakNode)());for(let t of e){for(let e of t.getChildren())t.insertBefore(e);t.remove()}}(o),i}(r,e),t)}catch(e){}let a=l||e.getData("text/uri-list");if(null!=a)if((0,n.$isRangeSelection)(t)){let e=a.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){let r=(0,n.$getSelection)();if((0,n.$isRangeSelection)(r)){let i=e[t];"\n"===i||"\r\n"===i?r.insertParagraph():"	"===i?r.insertNodes([(0,n.$createTabNode)()]):r.insertText(i)}}}else t.insertRawText(a)}function U(e,t,r){e.dispatchCommand(n.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,{nodes:t,selection:r})||(r.insertNodes(t),function(e){if((0,n.$isRangeSelection)(e)&&e.isCollapsed()){let t=e.anchor,r=null,i=(0,n.$caretFromPoint)(t,"previous");if(i)if((0,n.$isTextPointCaret)(i))r=i.origin;else for(let e of(0,n.$getCaretRange)(i,(0,n.$getChildCaret)((0,n.$getRoot)(),"next").getFlipped())){if((0,n.$isTextNode)(e.origin)){r=e.origin;break}if((0,n.$isElementNode)(e.origin)&&!e.origin.isInline())break}if(r&&(0,n.$isTextNode)(r)){let t=r.getFormat(),n=r.getStyle();e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}}}(r))}let J=null;async function Y(e,t,r){if(null!==J)return!1;if(null!==t)return new Promise((n,i)=>{e.update(()=>{n(q(e,t,r))})});let i=e.getRootElement(),o=e._window||window,l=window.document,a=(0,n.getDOMSelection)(o);if(null===i||null===a)return!1;let s=l.createElement("span");s.style.cssText="position: fixed; top: -1000px;",s.append(l.createTextNode("#")),i.append(s);let u=new Range;return u.setStart(s,0),u.setEnd(s,1),a.removeAllRanges(),a.addRange(u),new Promise((t,i)=>{let o=e.registerCommand(n.COPY_COMMAND,n=>($(n,ClipboardEvent)&&(o(),null!==J&&(window.clearTimeout(J),J=null),t(q(e,n,r))),!0),n.COMMAND_PRIORITY_CRITICAL);J=window.setTimeout(()=>{o(),J=null,t(!1)},50),l.execCommand("copy"),s.remove()})}function q(e,t,r){if(void 0===r){let t=(0,n.getDOMSelection)(e._window);if(!t)return!1;let i=t.anchorNode,o=t.focusNode;if(null!==i&&null!==o&&!(0,n.isSelectionWithinEditor)(e,i,o))return!1;let l=(0,n.$getSelection)();if(null===l)return!1;r=function(e=(0,n.$getSelection)()){let t={"text/plain":e?e.getTextContent():""};if(e){let r=(0,n.$getEditor)();for(let[n,i]of G){let o=i(r,e);null!==o&&(t[n]=o)}}return t}(l)}t.preventDefault();let i=t.clipboardData;return null!==i&&(function(e,t){for(let n in t){let r=t[n];void 0!==r&&e.setData(n,r)}}(i,r),!0)}let G=[["text/html",function(t,r=(0,n.$getSelection)()){return null==r&&K(166),(0,n.$isRangeSelection)(r)&&r.isCollapsed()||0===r.getNodes().length?"":function(t,r){if("u"<typeof document||"u"<typeof window&&void 0===e.g.window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let i=document.createElement("div"),o=(0,n.$getRoot)().getChildren();for(let e=0;e<o.length;e++)!function e(t,r,i,o=null){let l=null===o||r.isSelected(o),a=(0,n.$isElementNode)(r)&&r.excludeFromCopy("html"),s=r;if(null!==o){let e=(0,n.$cloneWithProperties)(r);s=e=(0,n.$isTextNode)(e)&&null!==o?c(o,e):e}let u=(0,n.$isElementNode)(s)?s.getChildren():[],d=(0,n.getRegisteredNode)(t,s.getType()),{element:f,after:h}=d&&void 0!==d.exportDOM?d.exportDOM(t,s):s.exportDOM(t);if(!f)return!1;let p=document.createDocumentFragment();for(let i=0;i<u.length;i++){let a=u[i],s=e(t,a,p,o);!l&&(0,n.$isElementNode)(r)&&s&&r.extractWithChild(a,o,"html")&&(l=!0)}if(l&&!a){if(((0,n.isHTMLElement)(f)||(0,n.isDocumentFragment)(f))&&f.append(p),i.append(f),h){let e=h.call(s,f);e&&((0,n.isDocumentFragment)(f)?f.replaceChildren(e):f.replaceWith(e))}}else i.append(p);return l}(t,o[e],i,r);return i.innerHTML}(t,r)}],["application/x-lexical-editor",function(e,t=(0,n.$getSelection)()){return null==t&&K(166),(0,n.$isRangeSelection)(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){let r=[],i=(0,n.$getRoot)().getChildren();for(let o=0;o<i.length;o++)!function e(t,r,i,o=[]){var l;let a,s,u=null===r||i.isSelected(r),d=(0,n.$isElementNode)(i)&&i.excludeFromCopy("html"),f=i;if(null!==r){let e=(0,n.$cloneWithProperties)(i);f=e=(0,n.$isTextNode)(e)&&null!==r?c(r,e):e}let h=(0,n.$isElementNode)(f)?f.getChildren():[],p=(a=(l=f).exportJSON(),s=l.constructor,a.t
5ype!==s.getType()&&K(58,s.name),(0,n.$isElementNode)(l)&&(Array.isArray(a.children)||K(59,s.name)),a);if((0,n.$isTextNode)(f)){let e=f.__text;e.length>0?p.text=e:u=!1}for(let o=0;o<h.length;o++){let l=h[o],a=e(t,r,l,p.children);!u&&(0,n.$isElementNode)(i)&&a&&i.extractWithChild(l,r,"clone")&&(u=!0)}if(u&&!d)o.push(p);else if(Array.isArray(p.children))for(let e=0;e<p.children.length;e++){let t=p.children[e];o.push(t)}return u}(e,t,i[o],r);return{namespace:e._config.namespace,nodes:r}}(e,t))}]];var X=n;function Q(e,t){if(void 0!==document.caretRangeFromPoint){let n=document.caretRangeFromPoint(e,t);return null===n?null:{node:n.startContainer,offset:n.startOffset}}if("undefined"!==document.caretPositionFromPoint){let n=document.caretPositionFromPoint(e,t);return null===n?null:{node:n.offsetNode,offset:n.offset}}return null}let Z="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ee=Z&&"documentMode"in document?document.documentMode:null,et=!(!Z||!("InputEvent"in window)||ee)&&"getTargetRanges"in new window.InputEvent("input"),en=Z&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),er=Z&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ei=Z&&/^(?=.*Chrome).*/i.test(navigator.userAgent),eo=Z&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ei,el=(0,X.createCommand)("DRAG_DROP_PASTE_FILE");class ea extends X.ElementNode{static getType(){return"quote"}static clone(e){return new ea(e.__key)}createDOM(e){let t=document.createElement("blockquote");return N(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:eh,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,X.isHTMLElement)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return es().updateFromJSON(e)}insertNewAfter(e,t){let n=(0,X.$createParagraphNode)(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){let e=(0,X.$createParagraphNode)();
5return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function es(){return(0,X.$applyNodeReplacement)(new ea)}function eu(e){return e instanceof ea}class ec extends X.ElementNode{static getType(){return"heading"}static clone(e){return new ec(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,n=document.createElement(t),r=e.theme.heading;return void 0!==r&&N(n,r[t]),n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:ef,priority:0}),h2:e=>({conversion:ef,priority:0}),h3:e=>({conversion:ef,priority:0}),h4:e=>({conversion:ef,priority:0}),h5:e=>({conversion:ef,priority:0}),h6:e=>({conversion:ef,priority:0}),p:e=>{let t=e.firstChild;return null!==t&&ed(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>ed(e)?{conversion:e=>({node:ep("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,X.isHTMLElement)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return ep(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=r&&(!e||e.anchor.key!==r.getKey()||n!==r.getTextContentSize())&&e?ep(this.getTag()):(0,X.$createParagraphNode)(),o=this.getDirection();if(i.setDirection(o),this.insertAfter(i,t),0===n&&!this.isEmpty()&&e){let e=(0,X.$createParagraphNode)();e.select(),this.replace(e,!0)}return i}collapseAtStart(){let e=this.isEmpty()?(0,X.$createParagraphNode)():ep(this.getTag());
5return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function ed(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function ef(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=ep(t),null!==e.style&&((0,X.setNodeIndentFromDOM)(e,n),n.setFormat(e.style.textAlign))),{node:n}}function eh(e){let t=es();return null!==e.style&&(t.setFormat(e.style.textAlign),(0,X.setNodeIndentFromDOM)(e,t)),{node:t}}function ep(e="h1"){return(0,X.$applyNodeReplacement)(new ec(e))}function eg(e){return e instanceof ec}function em(e){let t=null;if($(e,DragEvent)?t=e.dataTransfer:$(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];let n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function ex(e){let t=(0,X.$getSelection)();if(!(0,X.$isRangeSelection)(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],o=i.getKey();if(n.has(o))continue;let l=D(i,e=>(0,X.$isElementNode)(e)&&!e.isInline());if(null===l)continue;let a=l.getKey();l.canIndent()&&!n.has(a)&&(n.add(a),e(l))}return n.size>0}function ey(e){let t=(0,X.$getNearestNodeFromDOMNode)(e);return(0,X.$isDecoratorNode)(t)}function ev(e){for(let t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function e_(e){return w(e.registerCommand(X.CLICK_COMMAND,e=>{let t=(0,X.$getSelection)();return!!(0,X.$isNodeSelection)(t)&&(t.clear(),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DELETE_CHARACTER_COMMAND,e=>{let t=(0,X.$getSelection)();return(0,X.$isRangeSelection)(t)?(t.deleteCharacter(e),!0):!!(0,X.$isNodeSelection)(t)&&(t.deleteNodes(),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DELETE_WORD_COMMAND,e=>{let t=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(t)&&(t.deleteWord(e),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DELETE_LINE_COMMAND,e=>{let t=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(t)&&(t.deleteLine(e),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{let n=(0,X.$getSelection)();if("string"==typeof t)null!==n&&n.insertText(t);else{if(null===n)return!1;let r=t.dataTransfer;if(null!=r)H(r,n,e);else if((0,X.$isRangeSelection)(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.REMOVE_TEXT_COMMAND,()=>{let e=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(e)&&(e.removeText(),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.FORMAT_TEXT_COMMAND,e=>{let t=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(t)&&(t.formatText(e),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.FORMAT_ELEMENT_COMMAND,e=>{let t=(0,X.$getSelection)();if(!(0,X.$isRangeSelection)(t)&&!(0,X.$isNodeSelection)(t))return!1;for(let n of t.getNodes()){let t=D(n,e=>(0,X.$isElementNode)(e)&&!e.isInline());null!==t&&t.setFormat(e)}return!0},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.INSERT_LINE_BREAK_COMMAND,e=>{let t=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(t)&&(t.insertLineBreak(e),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.INSERT_PARAGRAPH_COMMAND,()=>{let e=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(e)&&(e.insertParagraph(),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.INSERT_TAB_COMMAND,()=>((0,X.$insertNodes)([(0,X.$createTabNode)()]),!0),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.INDENT_CONTENT_COMMAND,()=>ex(e=>{let t=e.getIndent();e.setIndent(t+1)}),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.OUTDENT_CONTENT_COMMAND,()=>ex(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ARROW_UP_COMMAND,e=>{let t=(0,X.$getSelection)();if((0,X.$isNodeSelection)(t)){let e=t.getNodes();if(e.length>0)return e[0].selectPrevious(),!0}else if((0,X.$isRangeSelection)(t)){let n=(0,X.$getAdjacentNode)(t.focus,!0);if(!e.shiftKey&&(0,X.$isDecoratorNode)(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ARROW_DOWN_COMMAND,e=>{let t=(0,X.$getSelection)();if((0,X.$isNodeSelection)(t)){let e=t.getNodes();if(e.length>0)return e[0].selectNext(0,0),!0}else if((0,X.$isRangeSelection)(t)){let n;if("root"===(n=t.focus).key&&n.offset===(0,X.$getRoot)().getChildrenSize())return e.preventDefault(),!0;let r=(0,X.$getAdjacentNode)(t.focus,!1);if(!e.shiftKey&&(0,X.$isDecoratorNode)(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ARROW_LEFT_COMMAND,e=>{let t=(0,X.$getSelection)();if((0,X.$isNodeSelection)(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),u(n[0])?n[0].selectNext(0,0):n[0].selectPrevious(),!0}if(!(0,X.$isRangeSelection)(t))return!1;if(y(t,!0)){let n=e.shiftKey;return e.preventDefault(),_(t,n,!0),!0}return!1},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ARROW_RIGHT_COMMAND,e=>{let t=(0,X.$getSelection)();if((0,X.$isNodeSelection)(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),u(n[0])?n[0].selectPrevious():n[0].selectNext(0,0),!0}if(!(0,X.$isRangeSelection)(t))return!1;let n=e.shiftKey;return!!y(t,!1)&&(e.preventDefault(),_(t,n,!1),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_BACKSPACE_COMMAND,t=>{if(ey(t.target))return!1;let n=(0,X.$getSelection)();if((0,X.$isRangeSelection)(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(0!==t.offset)return!1;let n=t.getNode();if((0,X.$isRootNode)(n))return!1;let r=O(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(X.OUTDENT_CONTENT_COMMAND,void 0);if(er&&"ko-KR"===navigator.language)return!1}else if(!(0,X.$isNodeSelection)(n))return!1;return t.preventDefault(),e.dispatchCommand(X.DELETE_CHARACTER_COMMAND,!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_DELETE_COMMAND,t=>{if(ey(t.target))return!1;let n=(0,X.$getSelection)();return!(!(0,X.$isRangeSelection)(n)&&!(0,X.$isNodeSelection)(n))&&(t.preventDefault(),e.dispatchCommand(X.DELETE_CHARACTER_COMMAND,!1))},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ENTER_COMMAND,t=>{let n=(0,X.$getSelection)();if(!(0,X.$isRangeSelection)(n))return!1;if(ev(n),null!==t){if((er||en||eo)&&et)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(X.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(X.INSERT_PARAGRAPH_COMMAND,void 0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_ESCAPE_COMMAND,()=>{let t=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(t)&&(e.blur(),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DROP_COMMAND,t=>{let[,n]=em(t);if(n.length>0){let r=Q(t.clientX,t.clientY);if(null!==r){let{offset:t,node:i}=r,o=(0,X.$getNearestNodeFromDOMNode)(i);if(null!==o){let e=(0,X.$createRangeSelection)();if((0,X.$isTextNode)(o))e.anchor.set(o.getKey(),t,"text"),e.focus.set(o.getKey(),t,"text");else{let t=o.getParentOrThrow().getKey(),n=o.getIndexWithinParent()+1;e.anchor.set(t,n,"element"),e.focus.set(t,n,"element")}let n=(0,X.$normalizeSelection__EXPERIMENTAL)(e);(0,X.$setSelection)(n)}e.dispatchCommand(el,n)}return t.preventDefault(),!0}let r=(0,X.$getSelection)();return!!(0,X.$isRangeSelection)(r)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DRAGSTART_COMMAND,e=>{let[t]=em(e),n=(0,X.$getSelection)();return!(t&&!(0,X.$isRangeSelection)(n))},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.DRAGOVER_COMMAND,e=>{let[t]=em(e),n=(0,X.$getSelection)();if(t&&!(0,X.$isRangeSelection)(n))return!1;let r=Q(e.clientX,e.clientY);
5if(null!==r){let t=(0,X.$getNearestNodeFromDOMNode)(r.node);(0,X.$isDecoratorNode)(t)&&e.preventDefault()}return!0},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.SELECT_ALL_COMMAND,()=>((0,X.$selectAll)(),!0),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.COPY_COMMAND,t=>(Y(e,$(t,ClipboardEvent)?t:null),!0),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.CUT_COMMAND,t=>((async function(e,t){await Y(t,$(e,ClipboardEvent)?e:null),t.update(()=>{let e=(0,X.$getSelection)();(0,X.$isRangeSelection)(e)?e.removeText():(0,X.$isNodeSelection)(e)&&e.getNodes().forEach(e=>e.remove())})})(t,e),!0),X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.PASTE_COMMAND,t=>{let[,n,r]=em(t);return n.length>0&&!r?(e.dispatchCommand(el,n),!0):!((0,X.isDOMNode)(t.target)&&(0,X.isSelectionCapturedInDecoratorInput)(t.target))&&null!==(0,X.$getSelection)()&&(t.preventDefault(),e.update(()=>{let n=(0,X.$getSelection)(),r=$(t,InputEvent)||$(t,KeyboardEvent)?null:t.clipboardData;null!=r&&null!==n&&H(r,n,e)},{tag:X.PASTE_TAG}),!0)},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_SPACE_COMMAND,e=>{let t=(0,X.$getSelection)();return(0,X.$isRangeSelection)(t)&&ev(t),!1},X.COMMAND_PRIORITY_EDITOR),e.registerCommand(X.KEY_TAB_COMMAND,e=>{let t=(0,X.$getSelection)();return(0,X.$isRangeSelection)(t)&&ev(t),!1},X.COMMAND_PRIORITY_EDITOR))}e.s(["$createHeadingNode",()=>ep,"$createQuoteNode",()=>es,"$isHeadingNode",()=>eg,"$isQuoteNode",()=>eu,"HeadingNode",()=>ec,"QuoteNode",()=>ea,"registerRichText",()=>e_],713511);var eb=e.i(578467);function eC(e,t,n,r){let i,o=e.length,l=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);l<r.length;)(i=r.slice(l,l+1e4)).unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function eT(e,t){return e.length>0?(eC(e,e.length,0,t),e):t}e.s(["push",()=>eT,"splice",()=>eC],847202);let eE=eL(/[A-Za-z]/),eS=eL(/[\dA-Za-z]/),ek=eL(/[#-'*+\--9=?A-Z^-~]/);function ew(e){return null!==e&&(e<32||127===e)}let eN=eL(/\d/),eI=eL(/[\dA-Fa-f]/),eA=eL(/[!-/:-@[-`{-~]/);function eM(e){return null!==e&&e<-2}function eO(e){return null!==e&&(e<0||32===e)}function eD(e){return -2===e||-1===e||32===e}let eR=eL(/\p{P}|\p{S}/u),eP=eL(/\s/);function eL(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function e$(e){return null===e||eO(e)||eP(e)?1:eR(e)?2:void 0}function eF(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}e.s(["asciiAlpha",0,eE,"asciiAlphanumeric",0,eS,"asciiAtext",0,ek,"asciiControl",()=>ew,"asciiDigit",0,eN,"asciiHexDigit",0,eI,"asciiPunctuation",0,eA,"markdownLineEnding",()=>eM,"markdownLineEndingOrSpace",()=>eO,"markdownSpace",()=>eD,"unicodePunctuation",0,eR,"unicodeWhitespace",0,eP],733473),e.s(["resolveAll",()=>eF],433565);let eB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function eV(e){this.enter({type:"delete",children:[]},e)}function ez(e){this.exit(e)}function ej(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}ej.peek=function(){return"~"},eH.peek=function(){return"="};var eW={canContainEols:["highlight"],enter:{highlight:function(e){this.enter({type:"highlight",children:[]},e)}},exit:{highlight:function(e){this.exit(e)}}},eK={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{highlight:eH}};function eH(e,t,n,r){let i=n.createTracker(r),o=n.enter("highlight"),l=i.move("==");return l+=i.move(n.containerPhrasing(e,{before:l,after:"=",...i.current()})),l+=i.move("=="),o(),l}function eU(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function eJ(){}function eY(){}e.s(["ccount",()=>eU],669462),e.s(["ok",()=>eJ,"unreachable",()=>eY],305400);let eq=["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","oslas
5h","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],eG={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 eX(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function eQ(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function eZ(e){let t;return(t="string"==typeof e?e.charCodeAt(0):e)>=97&&t<=122||t>=65&&t<=90||eX(e)}let e0=document.createElement("i");function e1(e){let t="&"+e+";";e0.innerHTML=t;let n=e0.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let e2=["","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 e3(e,t){let n,r,i,o=t||{},l="string"==typeof o.additional?o.additional.charCodeAt(0):o.additional,a=[],s=0,u=-1,c="";o.position&&("start"in o.position||"indent"in o.position?(r=o.position.indent,n=o.position.start):n=o.position);let d=(n?n.line:0)||1,f=(n?n.column:0)||1,h=m();for(s--;++s<=e.length;)if(10===i&&(f=(r?r[u]:0)||1),38===(i=e.charCodeAt(s))){let t,n=e.charCodeAt(s+1);if(9===n||10===n||12===n||32===n||38===n||60===n||Number.isNaN(n)||l&&n===l){c+=String.fromCharCode(i),f++;continue}let r=s+1,u=r,d=r;if(35===n){d=++u;let n=e.charCodeAt(d);88===n||120===n?(t="hexadecimal",d=++u):t="decimal"}else t="named";let v="",_="",b="",C="named"===t?eZ:"decimal"===t?eX:eQ;for(d--;++d<=e.length;){let n=e.charCodeAt(d);if(!C(n))break;b+=String.fromCharCode(n),"named"===t&&eq.includes(b)&&(v=b,_=e1(b))}let T=59===e.charCodeAt(d);if(T){d++;let e="named"===t&&e1(b);e&&(v=b,_=e)}let E=1+d-r,S="";if(T||!1!==o.nonTerminated)if(b)if("named"===t){if(T&&!_)x(5,1);else if(v!==b&&(E=1+(d=u+v.length)-u,T=!1),!T){let t=v?1:3;if(o.attribute){let n=e.charCodeAt(d);61===n?(x(t,E),_=""):eZ(n)?_="":x(t,E)}else x(t,E)}S=_}else{var p,g;T||x(2,E);let e=Number.parseInt(b,"hexadecimal"===t?16:10);if((p=e)>=55296&&p<=57343||p>1114111)x(7,E),S=String.fromCharCode(65533);else if(e in eG)x(6,E),S=eG[e];else{let t="";((g=e)>=1&&g<=8||11===g||g>=13&&g<=31||g>=127&&g<=159||g>=64976&&g<=65007||(65535&g)==65535||(65535&g)==65534)&&x(6,E),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==t&&x(4,E);if(S){y(),h=m(),s=d-1,f+=d-r+1,a.push(S);let t=m();t.offset++,o.reference&&o.reference.call(o.referenceContext||void 0,S,{start:h,end:t},e.slice(r-1,d)),h=t}else b=e.slice(r-1,d),c+=b,f+=b.length,s=d-1}else 10===i&&(d++,u++,f=0),Number.isNaN(i)?y():(c+=String.fromCharCode(i),f++);return a.join("");function m(){return{line:d,column:f,offset:s+((n?n.offset:0)||0)}}function x(e,t){let n;o.warning&&(n=m(),n.column+=t,n.offset+=t,o.warning.call(o.warningContext||void 0,e2[e],n,e))}function y(){c&&(a.push(c),o.text&&o.text.call(o.textContext||void 0,c,{start:h,end:m()}),c="")}}e.s(["parseEntities",()=>e3],832519);let e4=/["&'<>`]/g,e9=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,e5=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,e6=/[|\\{}()[\]^$+*?.]/g,e7=new WeakMap;function e8(e){return"&#x"+e.toString(16).toUpperCase()+";"}function te(e,t){let n;var r,i=e,o=Object.assign({format:e8},t);if(i=i.replace(o.subset?(r=o.subset,(n=e7.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(e6,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),e7.set(r,n)),n):e4,l),o.subset||o.escapeOnly)return i;return i.replace(e9,function(e,t,n){return o.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCo
5deAt(t+2),o)}).replace(e5,l);function l(e,t,n){return o.format(e.charCodeAt(0),n.charCodeAt(t+1),o)}}function tt(e){return e&&"object"==typeof e?"position"in e||"type"in e?tr(e.position):"start"in e||"end"in e?tr(e):"line"in e||"column"in e?tn(e):"":""}function tn(e){return ti(e&&e.line)+":"+ti(e&&e.column)}function tr(e){return tn(e&&e.start)+"-"+tn(e&&e.end)}function ti(e){return e&&"number"==typeof e?e:1}e.s(["stringifyEntitiesLight",()=>te],924814);class to extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=tt(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}function tl(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:l,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:l},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:s,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:g,mdxJsxFlowTagAttributeValueLiteral:m,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:x,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:y,mdxJsxFlowTag:v,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:s,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:g,mdxJsxTextTagAttributeValueLiteral:m,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:x,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:y,mdxJsxTextTag:v}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){let t=this.data.mdxJsxTagStack;if(eJ(t,"expected `mdxJsxTagStack`"),0===t.length)throw new to("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(e){let t=this.data.mdxJsxTag;if(eJ(t,"expected `mdxJsxTag`"),t.close)throw new to("Unexpected attribute in closing tag, expected the end of the tag",{start:e.start,end:e.end},"mdast-util-mdx-jsx:unexpected-attribute")}function l(e){let t=this.data.mdxJsxTag;if(eJ(t,"expected `mdxJsxTag`"),t.close)throw new to("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function a(){let e=this.data.mdxJsxTag;eJ(e,"expected `mdxJsxTag`"),e.close=!0}function s(e){let t=this.data.mdxJsxTag;eJ(t,"expected `mdxJsxTag`"),t.name=this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;eJ(t,"expected `mdxJsxTag`"),t.name+="."+this.sliceSerialize(e)}function c(e){let t=this.data.mdxJsxTag;eJ(t,"expected `mdxJsxTag`"),t.name+=":"+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`"),o.call(this,e),n.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`"),o.call(this,e),n.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(e.start),end:void 0}}),this.buffer()}function h(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`");let r=n.attributes[n.attributes.length-1];eJ("mdxJsxExpressionAttribute"===r.type);let i=e.estree;r.value=this.resume(),eJ(void 0!==r.position),r.position.end=t(e.end),i&&(r.data={estree:i})}function p(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`");let r=n.attributes[n.attributes.length-1];eJ("mdxJsxAttribute"===r.type),r.name=this.sliceSerialize(e),eJ(void 0!==r.position),r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`");let r=n.attributes[n.attributes.length-1];eJ("mdxJsxAttribute"===r.type),r.name+=":"+this.sliceSerialize(e),eJ(void 0!==r.position),r.position.end=t(e.end)}function m(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`");let r=n.attributes[n.attributes.length-1];r.value=e3(this.resume(),{nonTerminated:!1}),eJ(void 0!==r.position),r.position.end=t(e.end)}function x(e){let n=this.data.mdxJsxTag;eJ(n,"expected `mdxJsxTag`");let r=n.attributes[n.attributes.length-1];eJ("mdxJsxAttribute"===r.type);let i={type:"mdxJsxAttributeValueExpression",value:this.resume()},o=e.estree;o&&(i.data={estree:o}),r.value=i,eJ(void 0!==r.position),r.position.end=t(e.end)}function y(){let e=this.data.mdxJsxTag;eJ(e,"expected `mdxJsxTag`"),e.selfClosing=!0}function v(e){let t=this.data.mdxJsxTag;eJ(t,"expected `mdxJsxTag`");let n=this.data.mdxJsxTagStack;eJ(n,"expected `mdxJsxTagStack`");let r=n[n.length-1];if(t.close&&r.name!==t.name)throw new to("Unexpected closing tag `"+C(t)+"`, expected corresponding closing tag for `"+C(r)+"` ("+tt(r)+")",{start:e.start,end:e.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),t.close?n.pop():this.enter({type:"mdxJsxTextTag"===e.type?"mdxJsxTextElement":"mdxJsxFlowElement",name:t.name||null,attributes:t.attributes,children:[]},e,_),t.selfClosing||t.close?this.exit(e,b):n.push(t)}function _(e,t){let n=this.data.mdxJsxTagStack;eJ(n,"expected `mdxJsxTagStack`");let r=n[n.length-1];eJ(r,"expected `mdxJsxTag`");let i=e?" before the end of `"+e.type+"`":"",o=e?{start:e.start,end:e.end}:void 0;throw new to("Expected a closing tag for `"+C(r)+"` ("+tt({start:t.start,end:t.end})+")"+i,o,"mdast-util-mdx-jsx:end-tag-mismatch")}function b(e,t){let n=this.data.mdxJsxTag;throw eJ(n,"expected `mdxJsxTag`"),new to("Expected the closing tag `"+C(n)+"` either after the end of `"+t.type+"` ("+tt(t.end)+") or another opening tag after the start of `"+t.type+"` ("+tt(t.start)+")",{start:e.start,end:e.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function C(e){return"<"+(e.close?"/":"")+(e.name||"")+">"}}function ta(e){let t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||1/0,l='"'===n?"'":'"';if('"'!==n&&"'"!==n)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=tc,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0}
5;function a(e,t,a,s){let u="mdxJsxFlowElement"===e.type,c=!!e.name&&(!e.children||0===e.children.length),d=tu(ts(a)),f=a.createTracker(s),h=a.createTracker(s),p=[],g=(u?d:"")+"<"+(e.name||""),m=a.enter(e.type);if(f.move(g),h.move(g),e.attributes&&e.attributes.length>0){if(!e.name)throw Error("Cannot serialize fragment w/ attributes");let t=-1;for(;++t<e.attributes.length;){let i,o=e.attributes[t];if("mdxJsxExpressionAttribute"===o.type)i="{"+(o.value||"")+"}";else{if(!o.name)throw Error("Cannot serialize attribute w/o name");let e=o.value,t=o.name,a="";if(null==e);else if("object"==typeof e)a="{"+(e.value||"")+"}";else{let t=r&&eU(e,n)>eU(e,l)?l:n;a=t+te(e,{subset:[t]})+t}i=t+(a?"=":"")+a}p.push(i)}}let x=!1,y=p.join(" ");u&&(/\r?\n|\r/.test(y)||f.current().now.column+y.length+(c?i?2:3:1)>o)&&(x=!0);let v=f,_=g;if(x){v=h;let e=-1;for(;++e<p.length;)p[e]=d+"  "+p[e];_+=v.move("\n"+p.join("\n")+"\n"+d)}else y&&(_+=v.move(" "+y));return c&&(_+=v.move((i||x?"":" ")+"/")),_+=v.move(">"),e.children&&e.children.length>0&&("mdxJsxTextElement"===e.type?_+=v.move(a.containerPhrasing(e,{...v.current(),before:">",after:"<"})):(v.shift(2),_+=v.move("\n"),_+=v.move(function(e,t,n){let r=t.indexStack,i=e.children,o=t.createTracker(n),l=tu(ts(t)),a=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s;let u={before:"\n",after:"\n",...o.current()},c=t.handle(n,e,t,u),d="mdxJsxFlowElement"===n.type?c:t.indentLines(c,function(e,t,n){return(n?"":l)+e});a.push(o.move(d)),"list"!==n.type&&(t.bulletLastUsed=void 0),s<i.length-1&&a.push(o.move("\n\n"))}return r.pop(),a.join("")}(e,a,v.current())),_+=v.move("\n"))),c||(_+=v.move((u?d:"")+"</"+(e.name||"")+">")),m(),_}}function ts(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if("blockquote"===r||"listItem"===r)break;"mdxJsxFlowElement"===r&&t++}return t}function tu(e){return"  ".repeat(e)}function tc(){return"<"}to.prototype.file="",to.prototype.name="",to.prototype.reason="",to.prototype.message="",to.prototype.stack="",to.prototype.column=void 0,to.prototype.line=void 0,to.prototype.ancestors=void 0,to.prototype.cause=void 0,to.prototype.fatal=void 0,to.prototype.place=void 0,to.prototype.ruleId=void 0,to.prototype.source=void 0,e.s(["VFileMessage",()=>to],365601),e.s(["mdxJsxFromMarkdown",()=>tl,"mdxJsxToMarkdown",()=>ta],244670);var td=e.i(266986),tf=e.i(350461);let th,tp,tg,tm,tx=!0;void 0!==tf.default&&({FORCE_COLOR:th,NODE_DISABLE_COLORS:tp,NO_COLOR:tg,TERM:tm}=tf.default.env||{},tx=tf.default.stdout&&tf.default.stdout.isTTY);let ty={enabled:!tp&&null==tg&&"dumb"!==tm&&(null!=th&&"0"!==th||tx),reset:t_(0,0),bold:t_(1,22),dim:t_(2,22),italic:t_(3,23),underline:t_(4,24),inverse:t_(7,27),hidden:t_(8,28),strikethrough:t_(9,29),black:t_(30,39),red:t_(31,39),green:t_(32,39),yellow:t_(33,39),blue:t_(34,39),magenta:t_(35,39),cyan:t_(36,39),white:t_(37,39),gray:t_(90,39),grey:t_(90,39),bgBlack:t_(40,49),bgRed:t_(41,49),bgGreen:t_(42,49),bgYellow:t_(43,49),bgBlue:t_(44,49),bgMagenta:t_(45,49),bgCyan:t_(46,49),bgWhite:t_(47,49)};function tv(e,t){let n=0,r,i="",o="";for(;n<e.length;n++)i+=(r=e[n]).open,o+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return i+t+o}function t_(e,t){let n={open:`\x1b[${e}m`,close:`\x1b[${t}m`,rgx:RegExp(`\\x1b\\[${t}m`,"g")};return function(t){let r;return void 0!==this&&void 0!==this.has?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),void 0===t?this:ty.enabled?tv(this.keys,t+""):t+""):void 0===t?((r={has:[e],keys:[n]}).reset=ty.reset.bind(r),r.bold=ty.bold.bind(r),r.dim=ty.dim.bind(r),r.italic=ty.italic.bind(r),r.underline=ty.underline.bind(r),r.inverse=ty.inverse.bind(r),r.hidden=ty.hidden.bind(r),r.strikethrough=ty.strikethrough.bind(r),r.black=ty.black.bind(r),r.red=ty.red.bind(r),r.green=ty.green.bind(r),r.yellow=ty.yellow.bind(r),r.blue=ty.blue.bind(r),r.magenta=ty.magenta.bind(r),r.cyan=ty.cyan.bind(r),r.white=ty.white.bind(r),r.gray=ty.gray.bind(r),r.grey=ty.grey.bind(r),r.bgBlack=ty.bgBlack.bind(r),r.bgRed=ty.bgRed.bind(r),r.bgGreen=ty.bgGreen.bind(r),r.bgYellow=ty.bgYellow.bind(r),r.bgBlue=ty.bgBlue.bind(r),r.bgMagenta=ty.bgMagenta.bind(r),r.bgCyan=ty.bgCyan.bind(r),r.bgWhite=ty.bgWhite.bind(r),r):ty.enabled?tv([n],t+""):t+""}}function tb(){}tb.prototype={diff:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.callback;"function"==typeof r&&(i=r,r={}),this.options=r;var o=this;function l(e){return i?(setTimeout(function(){i(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,c=a+s;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var d=null!=(n=r.timeout)?n:1/0,f=Date.now()+d,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],t,e,0);if(h[0].oldPos+1>=s&&p+1>=a)return l([{value:this.join(t),count:t.length}]);var g=-1/0,m=1/0;function x(){for(var n=Math.max(g,-u);n<=Math.min(m,u);n+=2){var r=void 0,i=h[n-1],c=h[n+1];i&&(h[n-1]=void 0);var d=!1;if(c){var f=c.oldPos-n;d=c&&0<=f&&f<a}var x=i&&i.oldPos+1<s;if(!d&&!x){h[n]=void 0;continue}if(r=!x||d&&i.oldPos+1<c.oldPos?o.addToPath(c,!0,void 0,0):o.addToPath(i,void 0,!0,1),p=o.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=a)return l(function(e,t,n,r,i){for(var o,l=[];t;)l.push(t),o=t.previousComponent,delete t.previousComponent,t=o;l.reverse();for(var a=0,s=l.length,u=0,c=0;a<s;a++){var d=l[a];if(d.removed){if(d.value=e.join(r.slice(c,c+d.count)),c+=d.count,a&&l[a-1].added){var f=l[a-1];l[a-1]=l[a],l[a]=f}}else{if(!d.added&&i){var h=n.slice(u,u+d.count);h=h.map(function(e,t){var n=r[c+t];return n.length>e.length?n:e}),d.value=e.join(h)}else d.value=e.join(n.slice(u,u+d.count));u+=d.count,d.added||(c+=d.count)}
5}var p=l[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(l[s-2].value+=p.value,l.pop()),l}(o,r.lastComponent,t,e,o.useLongestToken));h[n]=r,r.oldPos+1>=s&&(m=Math.min(m,n-1)),p+1>=a&&(g=Math.max(g,n+1))}u++}if(i)!function e(){setTimeout(function(){if(u>c||Date.now()>f)return i();x()||e()},0)}();else for(;u<=c&&Date.now()<=f;){var y=x();if(y)return y}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,o=n.length,l=e.oldPos,a=l-r,s=0;a+1<i&&l+1<o&&this.equals(t[a+1],n[l+1]);)a++,l++,s++;return s&&(e.lastComponent={count:s,previousComponent:e.lastComponent}),e.oldPos=l,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var tC=new tb,tT=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,tE=/\S/,tS=new tb;tS.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!tE.test(e)&&!tE.test(t)},tS.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&tT.test(t[n])&&tT.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var tk=new tb;function tw(e){return(tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}tk.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t},new tb().tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},new tb().tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var tN=Object.prototype.toString,tI=new tb;tI.useLongestToken=!0,tI.tokenize=tk.tokenize,tI.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(function e(t,n,r,i,o){for(n=n||[],r=r||[],i&&(t=i(o,t)),l=0;l<n.length;l+=1)if(n[l]===t)return r[l];if("[object Array]"===tN.call(t)){for(n.push(t),a=Array(t.length),r.push(a),l=0;l<t.length;l+=1)a[l]=e(t[l],n,r,i,o);return n.pop(),r.pop(),a}if(t&&t.toJSON&&(t=t.toJSON()),"object"===tw(t)&&null!==t){n.push(t),a={},r.push(a);var l,a,s,u=[];for(s in t)t.hasOwnProperty(s)&&u.push(s);for(u.sort(),l=0;l<u.length;l+=1)a[s=u[l]]=e(t[s],n,r,i,s);n.pop(),r.pop()}else a=t;return a}(e,null,null,i),i,"  ")},tI.equals=function(e,t){return tb.prototype.equals.call(tI,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var tA=new tb;tA.tokenize=function(e){return e.slice()},tA.join=tA.removeEmpty=function(e){return e};ty.red,ty.grey,ty.green,ty.dim().italic,ty.dim("→"),ty.dim("·"),ty.dim("↵");function tM(e){let t=(e=e.replace(/\r?\n/g,"\n")).match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class tO extends Error{constructor(e={}
5){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function tD(e,t,n,r,i,o,l){if(e)return;if(l instanceof Error)throw l;let a=i&&i(t,n);throw new tO({actual:t,expects:n,operator:r,message:l||o,details:a,generated:!l})}function tR(e,t){tD(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}tR.ok=tR,tR.equal=function(e,t,n){tD(!(0,td.dequal)(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)},tR.type=function(e,t,n){let r=typeof e;tD(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)},tR.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";tD(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)},tR.snapshot=function(e,t,n){tD((e=tM(e))!==(t=tM(t)),e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)},tR.fixture=function(e,t,n){tD((e=tM(e))!==(t=tM(t)),e,t,"not.fixture",!1,"Expected value not to match fixture",n)},tR.match=function(e,t,n){"string"==typeof t?tD(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):tD(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)},tR.throws=function(e,t,n){n||"string"!=typeof t||(n=t,t=null);try{e()}catch(e){"function"==typeof t?tD(!t(e),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?tD(!t.test(e.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||tD(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};let tP={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};e.s(["codes",0,tP],823580);let tL={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4};e.s(["constants",0,tL],252897);let t$={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"};e.s(["types",0,t$],541435);var tF="highlightSequenceTemporary",tB="highlightSequence";let tV=/[$_\p{ID_Start}]/u,tz=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,tj=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,tW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tH={};function tU(e){return!!e&&tV.test(String.fromCodePoint(e))}function tJ(e,t){let n=(t||tH).jsx?tj:tz;return!!e&&n.test(String.fromCodePoint(e))}function tY(e,t){return((t||tH).jsx?tK:tW).test(e)}function tq(e,t,n,r){let i=r?r-1:1/0,o=0;return function(r){return eD(r)?(e.enter(n),function r(l){return eD(l)&&o++<i?(e.consume(l),r):(e.exit(n),t(l))}(r)):t(r)}}e.s(["cont",()=>tJ,"name",()=>tY,"start",()=>tU],220713),e.s(["factorySpace",()=>tq],526912);let tG={}.hasOwnProperty,tX=Symbol("continue"),tQ=Symbol("exit"),tZ=Symbol("skip");function t0(e){return Array.isArray(e)?e:"number"==typeof e?[tX,e]:[e]}function t1(e){return!!(e&&"object"==typeof e&&"type"in e&&"string"==typeof e.type&&e.type.length>0)}function t2(e,t){let n,r,i=t.prefix||"",o=t.suffix||"",l=Object.assign({},t.acornOptions),a=[],s=[],u=l.onComment,c=l.onToken,d=!1,f=Object.assign({},l,{onComment:a,preserveParens:!0});c&&(f.onToken=s);let h=function(e,t){let n={value:"",stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if("enter"===i[0]){let e=i[1].type;if("lineEnding"===e||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&-1===e[0];)e.shift();let t=function(e){let t,n=-1,r=[];for(;++n<e.length;){let i,o=e[n];if("string"==typeof o)i=o;else switch(o){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i="	";break;case -1:if(t)continue;i=" ";break;default:i=String.fromCharCode(o)}t=-2===o,r.push(i)}return r.join("")}(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}
5(e,t.tokenTypes),p=h.value,g=i+p+o,m=t.expression&&t3(p);if(m&&!t.allowEmpty)throw new to("Unexpected empty expression",{place:_(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{n=t.expression&&!m?t.acorn.parseExpressionAt(g,0,f):t.acorn.parse(g,f)}catch(t){let e=_(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,""),t.pos=e.offset,t.loc={line:e.line,column:e.column-1},r=t,d=t.raisedAt>=i.length+p.length||"Unterminated comment"===t.message}if(n&&t.expression&&!m)if(t3(g.slice(n.end,g.length-o.length)))n={type:"Program",start:0,end:i.length+p.length,body:[{type:"ExpressionStatement",expression:n,start:0,end:i.length+p.length}],sourceType:"module",comments:[]};else{let e=_(n.end),t=Error("Unexpected content after expression");t.pos=e.offset,t.loc={line:e.line,column:e.column-1},r=t,n=void 0}if(n){var x,y;let e,t;if(n.comments=a,x=n,"function"==typeof(y=function(e,t,n,r){let i=r[r.length-1],o=t;"ParenthesizedExpression"===e.type&&i&&o&&("number"==typeof n&&(i=i[o],o=n),i[o]=e.expression),v(e)})?e=y:y,(function n(r,i,o,l){return t1(r)&&(a.displayName="node ("+r.type+")"),a;function a(){let a=e?t0(e(r,i,o,l)):[];if(a[0]===tQ)return a;if(a[0]!==tZ){let e;for(e in r)if(tG.call(r,e)&&r[e]&&"object"==typeof r[e]&&"data"!==e&&"position"!==e){let t=l.concat(r),i=r[e];if(Array.isArray(i)){let r=0;for(;r>-1&&r<i.length;){let o=i[r];if(t1(o)){let i=n(o,e,r,t)();if(i[0]===tQ)return i;r="number"==typeof i[1]?i[1]:r+1}else r++}}else if(t1(i)){let r=n(i,e,void 0,t)();if(r[0]===tQ)return r}}}return t?t0(t(r,i,o,l)):a}})(x,void 0,void 0,[])(),Array.isArray(u))u.push(...a);else if("function"==typeof u)for(let e of a)u("Block"===e.type,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of s)e.end<=i.length||e.start-i.length>=p.length||(v(e),Array.isArray(c)?c.push(e):c(e))}return{estree:n,error:r,swallow:d};function v(e){let t=_(e.start),n=_(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function _(e){let n=e-i.length;n<0?n=0:n>p.length&&(n=p.length);let r=function(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(0===n)return;let[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}(h.stops,n);return r||(r={line:t.start.line,column:t.start.column,offset:t.start.offset}),r}}function t3(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function t4(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=t9(n.start,r[0]||t.start),o=t9(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function t9(e,t){if(e&&"object"==typeof e){let n="line"in e?t5(e.line):void 0,r="column"in e?t5(e.column):void 0;if(n&&void 0!==r)return{line:n,column:r+1,offset:t5(t)}}}function t5(e){return"number"==typeof e&&e>-1?e:void 0}e.s(["eventsToAcorn",()=>t2],806500),e.s(["positionFromEstree",()=>t4],468506);let t6="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",t7="#unexpected-type-in-code-expected-an-object-spread-spread";function t8(e,t,n,r,i,o,l,a,s,u,c){let d,f,h=this,p=this.events.length+3,g=0;return function(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),d=h.now(),m};function m(c){if(null===c){if(f)throw f;let e=new to("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw e.url=t6+"#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",e}if(eM(c))return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),y;if(125===c&&0===g){let g=o?ne.call(h,o,l,i,p,d,u||!1,s||!1):{type:"ok",estree:void 0};if("ok"===g.type){e.enter(r),e.consume(c),e.exit(r);let i=e.exit(n);return a&&g.estree&&Object.assign(i,{estree:g.estree}),t}return f=g.message,e.enter(i),e.consume(c),x}return e.enter(i),x(c)}function x(t){return 125===t&&0===g||null===t||eM(t)?(e.exit(i),m(t)):(123!==t||o?125===t&&(g-=1):g+=1,e.consume(t),x)}function y(t){let n=h.now();if(n.line!==d.line&&!c&&h.parser.lazy[n.line]){let e=new to("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:h.now(),ruleId:"unex
5pected-lazy",source:"micromark-extension-mdx-expression"});throw e.url=t6+"#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",e}return eD(t)?tq(e,m,"linePrefix",3)(t):m(t)}}function ne(e,t,n,r,i,o,l){let a=t2(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:l?"({":"",suffix:l?"})":""}),s=a.estree;if(l&&s){let e=s.body[0];if("ExpressionStatement"!==e.type||"ObjectExpression"!==e.expression.type){let t=t4(e),n=new to("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw n.url=t6+t7,n}if(e.expression.properties[1]){let t=new to("Unexpected extra content in spread: only a single spread is supported",{place:t4(e.expression.properties[1]).start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw t.url=t6+"#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",t}if(e.expression.properties[0]&&"SpreadElement"!==e.expression.properties[0].type){let t=t4(e.expression.properties[0]),n=new to("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw n.url=t6+t7,n}}if(a.error){let e=new to("Could not parse expression with acorn",{cause:a.error,place:{line:a.error.loc.line,column:a.error.loc.column+1,offset:a.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return e.url=t6+"#could-not-parse-expression-with-acorn",{type:"nok",message:e}}return{type:"ok",estree:s}}e.s(["factoryMdxExpression",()=>t8],794890);let nt="https://github.com/micromark/micromark-extension-mdx-jsx";function nn(e,t,n,r,i,o,l,a,s,u,c,d,f,h,p,g,m,x,y,v,_,b,C,T,E,S,k,w,N,I,A,M){let O,D,R=this;return function(t){return e.enter(a),e.enter(s),e.consume(t),e.exit(s),P};function P(e){return eO(e)?n(e):(O=L,er(e))}function L(t){return 47===t?(e.enter(u),e.consume(t),e.exit(u),O=$,er):62===t?en(t):null!==t&&t>=0&&tU(t)?(e.enter(d),e.enter(f),e.consume(t),F):void eo(t,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(33===t?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function $(t){return 62===t?en(t):null!==t&&t>=0&&tU(t)?(e.enter(d),e.enter(f),e.consume(t),F):void eo(t,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(42===t||47===t?" (note: JS comments in JSX tags are not supported in MDX)":""))}function F(t){return null!==t&&t>=0&&tJ(t,{jsx:!0})?(e.consume(t),F):46===t||47===t||58===t||62===t||123===t||eO(t)||eP(t)?(e.exit(f),O=B,er(t)):void eo(t,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(64===t?" (note: to create a link in MDX, use `[text](url)`)":""))}function B(t){return 46===t?(e.enter(h),e.consume(t),e.exit(h),O=V,er):58===t?(e.enter(g),e.consume(t),e.exit(g),O=W,er):47===t||62===t||123===t||null!==t&&t>=0&&tU(t)?(e.exit(d),U(t)):void eo(t,"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 V(t){if(null!==t&&t>=0&&tU(t))return e.enter(p),e.consume(t),z;eo(t,"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 z(t){return null!==t&&t>=0&&tJ(t,{jsx:!0})?(e.consume(t),z):46===t||47===t||62===t||123===t||eO(t)||eP(t)?(e.exit(p),O=j,er(t)):void eo(t,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(64===t?" (note: to create a link in MDX, use `[text](url)`)":""))}function j(t){return 46===t?(e.enter(h),e.consume(t),e.exit(h),O=V,er):47===t||62===t||123===t||null!==t&&t>=0&&tU(t)?(e.exit(d),U(t)):void eo(t,"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 W(t){if(null!==t&&t>=0&&tU(t))return e.enter(m),e.consume(t),K;eo(t,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(43===t||null!==t&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function K(t){return null!==t&&t>=0&&tJ(t,{jsx:!0})?(e.consume(t),K):47===t||62===t||123===t||eO(t)||eP(t)?(e.exit(m),O=H,er(t)):void eo(t,"in local name","a 
5name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function H(t){if(47===t||62===t||123===t||null!==t&&t>=0&&tU(t))return e.exit(d),U(t);eo(t,"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 U(t){return 47===t?(e.enter(c),e.consume(t),e.exit(c),O=et,er):62===t?en(t):123===t?t8.call(R,e,J,x,y,v,r,i,o,!0,!1,l)(t):null!==t&&t>=0&&tU(t)?(e.enter(_),e.enter(b),e.enter(C),e.consume(t),Y):void eo(t,"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 J(e){return O=U,er(e)}function Y(t){return null!==t&&t>=0&&tJ(t,{jsx:!0})?(e.consume(t),Y):47===t||58===t||61===t||62===t||123===t||eO(t)||eP(t)?(e.exit(C),O=q,er(t)):void eo(t,"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 q(t){return 58===t?(e.enter(T),e.consume(t),e.exit(T),O=G,er):61===t?(e.exit(b),e.enter(S),e.consume(t),e.exit(S),O=Z,er):47===t||62===t||123===t||eO(t)||eP(t)||null!==t&&t>=0&&tU(t)?(e.exit(b),e.exit(_),O=U,er(t)):void eo(t,"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 G(t){if(null!==t&&t>=0&&tU(t))return e.enter(E),e.consume(t),X;eo(t,"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 X(t){return null!==t&&t>=0&&tJ(t,{jsx:!0})?(e.consume(t),X):47===t||61===t||62===t||123===t||eO(t)||eP(t)?(e.exit(E),e.exit(b),O=Q,er(t)):void eo(t,"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 Q(t){return 61===t?(e.enter(S),e.consume(t),e.exit(S),O=Z,er):47===t||62===t||123===t||null!==t&&t>=0&&tU(t)?(e.exit(_),U(t)):void eo(t,"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 Z(t){return 34===t||39===t?(e.enter(k),e.enter(w),e.consume(t),e.exit(w),D=t,function t(n){return(null===n&&eo(n,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(D)+"`"),n===D)?(e.enter(w),e.consume(n),e.exit(w),e.exit(k),e.exit(_),D=void 0,O=U,er):eM(n)?(O=t,er(n)):(e.enter(N),function n(r){return null===r||r===D||eM(r)?(e.exit(N),t(r)):(e.consume(r),n)}(n))}):123===t?t8.call(R,e,ee,I,A,M,r,i,o,!1,!1,l)(t):void eo(t,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(60===t?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function ee(t){return e.exit(_),O=U,er(t)}function et(e){if(62===e)return en(e);eo(e,"after self-closing slash","`>` to end the tag"+(42===e||47===e?" (note: JS comments in JSX tags are not supported in MDX)":""))}function en(n){return e.enter(s),e.consume(n),e.exit(s),e.exit(a),t}function er(t){return eM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ei):eD(t)||eP(t)?(e.enter("esWhitespace"),function t(n){return eM(n)?(e.exit("esWhitespace"),er(n)):eD(n)||eP(n)?(e.consume(n),t):(e.exit("esWhitespace"),O(n))}(t)):O(t)}function ei(e){if(!l&&R.parser.lazy[R.now().line]){let e=new to("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",R.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw e.url=nt+"#unexpected-lazy-line-in-container-expected-line-to-be",e}return er(e)}function eo(e,t,n){let r=new to("Unexpected "+(null===e?"end of file":"character `"+(96===e?"` ` `":String.fromCodePoint(e))+"` (U+"+e.toString(16).toUpperCase().padStart(4,"0")+")")+" "+t+", expected "+n,R.now(),"micromark-extension-mdx-jsx:unexpected-"+(null===e?"eof":"character"));throw r.url=nt+(null===e?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-ex
5pected-expect"),r}}function nr(e){var t,n,r,i;let o,l=e||{},a=l.acorn;if(a){if(!a.parse||!a.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:"module"},l.acornOptions,{locations:!0})}else if(l.acornOptions||l.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:(t=a||void 0,n={acornOptions:o,addResult:l.addResult||void 0},{concrete:!0,name:"mdxJsxFlowTag",tokenize:function(e,r,i){let o=this;return function(e){return l(e)};function l(r){return nn.call(o,e,a,i,t,n.acornOptions,n.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")(r)}function a(t){return eD(t)?tq(e,s,"whitespace")(t):s(t)}function s(t){let n,a=o.parser.constructs.flow[123];for(let e of Array.isArray(a)?a:a?[a]:[])if("mdxFlowExpression"===e.name){n=e;break}return 60===t?l(t):123===t&&n?e.attempt(n,s,i)(t):null===t||eM(t)?r(t):i(t)}}})},text:{60:(r=a||void 0,i={acornOptions:o,addResult:l.addResult||void 0},{name:"mdxJsxTextTag",tokenize:function(e,t,n){return nn.call(this,e,t,n,r,i.acornOptions,i.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 ni(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}e.s(["mdxJsx",()=>nr],585136),e.s(["mdxMd",()=>ni],257298);let no={}.hasOwnProperty,nl={}.hasOwnProperty;function na(e,t,n){return">"+(n?"":" ")+e}function ns(e,t){return nu(e,t.inConstruct,!0)&&!nu(e,t.notInConstruct,!1)}function nu(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function nc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&ns(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function nd(e,t){return!!(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nf(e,t,n){return(n?"":"    ")+e}function nh(e){let t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function np(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ng(e,t,n){let r=e$(e),i=e$(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function nm(e,t,n,r){let i=function(e){let t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i),s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()})),u=s.charCodeAt(0),c=ng(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(s=np(u)+s.slice(1));let d=s.charCodeAt(s.length-1),f=ng(r.after.charCodeAt(0),d,i);
5f.inside&&(s=s.slice(0,-1)+np(d));let h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+s+h}nm.peek=function(e,t,n){return n.options.emphasis||"*"};let nx=function(e){var t,n;if(null==e)return nv;if("function"==typeof e)return ny(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=nx(e[n]);return ny(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,ny(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,ny(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function ny(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function nv(){return!0}let n_=[];function nb(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let o=nx(i),l=r?-1:1;(function e(i,a,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,d,f,h=n_;if((!t||o(i,a,s[s.length-1]||void 0))&&!1===(h=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?n_:[u])[0])return h;if("children"in i&&i.children&&i.children&&"skip"!==h[0])for(d=(r?i.children.length:-1)+l,f=s.concat(i);d>-1&&d<i.children.length;){if(!1===(c=e(i.children[d],d,f)())[0])return c;d="number"==typeof c[1]?c[1]:d+l}return h}})(e,void 0,[])()}function nC(e,t,n,r){let i,o,l;"function"==typeof t&&"function"!=typeof n?(o=void 0,l=t,i=n):(o=t,l=n,i=r),nb(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},i)}e.s(["EXIT",0,!1,"visitParents",()=>nb],931188),e.s(["visit",()=>nC],869701);let nT={};function nE(e,t){let n=t||nT;return nS(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function nS(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):""}function nk(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nS(e[i],t,n);return r.join("")}function nw(e,t){let n=!1;return nC(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nE(e)&&(t.options.setext||n))}function nN(e){return e.value||""}function nI(e,t,n,r){let i=nh(n),o='"'===i?"Quote":"Apostrophe",l=n.enter("image"),a=n.enter("label"),s=n.createTracker(r),u=s.move("![");return u+=s.move(n.safe(e.alt,{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 nA(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),l=n.enter("label"),a=n.createTracker(r),s=a.move("!["),u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();let c=n.stack;n.stack=[],l=n.enter("reference");let d=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,o(),"full"!==i&&u&&u===d?"shortcut"===i?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(d+"]"),s}function nM(e,t,n){let r=e.value||"",i="`",o=-1;for(;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;){let e,t=n.unsafe[o],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}function nO(e,t){let n=nE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function nD(e,t,n,r){let i,o,l=nh(n),a='"'===l?"Quote":"Apostrophe",s=n.createTracker(r);if(nO(e,n)){let t=n.stack;n.stack=[],i=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),i(),n.stack=t,r}i=n.enter("link"),o=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),u+=s.move(" "+l),u+=s.move(n.safe(e.title,{before:u,after:l,...s.current()})),u+=s.move(l),o()),u+=s.move(")"),i(),u}function nR(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),l=n.enter("label"),a=n.createTracker(r),s=a.move("["),u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();let c=n.stack;n.stack=[],l=n.enter("reference");let d=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,o(),"full"!==i&&u&&u===d?"shortcut"===i?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(d+"]"),s}function nP(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nL(e){let t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}nN.peek=function(){return"<"},nI.peek=function(){return"!"},nA.peek=function(){return"!"},nM.peek=function(){return"`"},nD.peek=function(e,t,n){return nO(e,n)?"<":"["},nR.peek=function(){return"["};let n$=nx(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nF(e,t,n,r){let i=function(e){let t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i),s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()})),u=s.charCodeAt(0),c=ng(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(s=np(u)+s.slice(1));let d=s.charCodeAt(s.length-1),f=ng(r.after.charCodeAt(0),d,i);
5f.inside&&(s=s.slice(0,-1)+np(d));let h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+s+h}nF.peek=function(e,t,n){return n.options.strong||"*"};let nB={blockquote:function(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let l=n.indentLines(n.containerFlow(e,o.current()),na);return i(),l},break:nc,code:function(e,t,n,r){let i=function(e){let t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",l="`"===i?"GraveAccent":"Tilde";if(nd(e,n)){let e=n.enter("codeIndented"),t=n.indentLines(o,nf);return e(),t}let a=n.createTracker(r),s=i.repeat(Math.max(function(e,t){let n=String(e),r=n.indexOf(t),i=r,o=0,l=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}(o,i)+1,3)),u=n.enter("codeFenced"),c=a.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...a.current()})),t()}return c+=a.move("\n"),o&&(c+=a.move(o+"\n")),c+=a.move(s),u(),c},definition:function(e,t,n,r){let i=nh(n),o='"'===i?"Quote":"Apostrophe",l=n.enter("definition"),a=n.enter("label"),s=n.createTracker(r),u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\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?" ":"\n",...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()),l(),u},emphasis:nm,hardBreak:nc,heading:function(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(nw(e,n)){let t=n.enter("headingSetext"),r=n.enter("phrasing"),l=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),l+"\n"+(1===i?"=":"-").repeat(l.length-(Math.max(l.lastIndexOf("\r"),l.lastIndexOf("\n"))+1))}let l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(u)&&(u=np(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u},html:nN,image:nI,imageReference:nA,inlineCode:nM,link:nD,linkReference:nR,list:function(e,t,n,r){let i=n.enter("list"),o=n.bulletCurrent,l=e.ordered?function(e){let t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):nP(n),a=e.ordered?"."===l?")":".":function(e){let t=nP(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n),s=!!t&&!!n.bulletLastUsed&&l===n.bulletLastUsed;if(!e.ordered){let t=e.children?e.children[0]:void 0;if("*"!==l&&"-"!==l||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(s=!0),nL(n)===l&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;let u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u},listItem:function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),o=n.bulletCurrent||nP(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let l=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));let a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(l))+e:(n?o:o+" ".repeat(l-o.length))+e});return s(),u},paragraph:function(e,t,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l},root:function(e,t,n,r){return(e.children.some(function(e){return n$(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:nF,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){let r=(nL(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};e.s(["handle",0,nB],210095);let nV=[function(e,t,n,r){if("code"===t.type&&nd(t,r)&&("list"===e.type||e.type===t.type&&nd(e,r)))return!1;
5if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&nw(t,r)))return;return+!!n.spread}}],nz=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],nj=[{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:"\n",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:nz},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:nz},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ 	\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:nz},{atBreak:!0,character:"+",after:"(?:[ 	\r\n])"},{atBreak:!0,character:"-",after:"(?:[ 	\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ 	\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:nz},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:nz},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:nz},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:nz},{atBreak:!0,character:"~"}];function nW(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let nK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nH(e){return e.replace(nK,nU)}function nU(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return nW(n.slice(t?2:1),t?16:10)}return e1(n)||e}function nJ(e){return e.label||!e.identifier?e.label||"":nH(e.identifier)}function nY(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}let nq=/\r?\n|\r/g;function nG(e,t){let n,r=[],i=0,o=0;for(;n=nq.exec(e);)l(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return l(e.slice(i)),r.join("");function l(e){r.push(t(e,o,!e))}}function nX(e,t){return e-t}function nQ(e,t){let n,r=/\\(?=[!-/:-@[-`{-~])/g,i=[],o=[],l=e+t,a=-1,s=0;for(;n=r.exec(l);)i.push(n.index);for(;++a<i.length;)s!==i[a]&&o.push(e.slice(s,i[a])),o.push("\\"),s=i[a];return o.push(e.slice(s)),o.join("")}function nZ(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:function(e){let t=e||"",n=t.split(/\r?\n|\r/g),l=n[n.length-1];return i+=n.length-1,o=1===n.length?o+l.length:1+l.length+r,t},current:function(){return{now:{line:i,column:o},lineShift:r}},shift:function(e){r+=e}}}function n0(e,t){let n={associationId:nJ,containerPhrasing:n4,containerFlow:n9,createTracker:nZ,c
5ompilePattern:nY,enter:function(e){return n.stack.push(e),function(){n.stack.pop()}},handlers:{...nB},handle:void 0,indentLines:nG,indexStack:[],join:[...nV],options:{},safe:n5,stack:[],unsafe:[...nj]};!function e(t,n){var r,i,o,l;let a,s=-1;if(n.extensions)for(;++s<n.extensions.length;)e(t,n.extensions[s]);for(a in n)if(nl.call(n,a))switch(a){case"extensions":break;case"unsafe":case"join":r=t[a],(i=n[a])&&r.push(...i);break;case"handlers":o=t[a],(l=n[a])&&Object.assign(o,l);break;default:t.options[a]=n[a]}return t}(n,t||{}),n.options.tightDefinitions&&n.join.push(n3),n.handle=function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,o=r.handlers;if(t&&no.call(t,e)){let n=String(t[e]);i=no.call(o,n)?o[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:n1,unknown:n2,handlers:n.handlers});let r=n.handle(e,void 0,n,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return r&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n"),r}function n1(e){throw Error("Cannot handle value `"+e+"`, expected node")}function n2(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function n3(e,t){if("definition"===e.type&&e.type===t.type)return 0}function n4(e,t){return function(e,t,n){let r,i=t.indexStack,o=e.children||[],l=[],a=-1,s=n.before;i.push(-1);let u=t.createTracker(n);for(;++a<o.length;){let c,d=o[a];if(i[i.length-1]=a,a+1<o.length){let n=t.handle.handlers[o[a+1].type];n&&n.peek&&(n=n.peek),c=n?n(o[a+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else c=n.after;l.length>0&&("\r"===s||"\n"===s)&&"html"===d.type&&(l[l.length-1]=l[l.length-1].replace(/(\r?\n|\r)$/," "),s=" ",(u=t.createTracker(n)).move(l.join("")));let f=t.handle(d,e,t,{...u.current(),after:c,before:s});r&&r===f.slice(0,1)&&(f=np(r.charCodeAt(0))+f.slice(1));let h=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,r=void 0,h&&(l.length>0&&h.before&&s===l[l.length-1].slice(-1)&&(l[l.length-1]=l[l.length-1].slice(0,-1)+np(s.charCodeAt(0))),h.after&&(r=c)),u.move(f),l.push(f),s=f.slice(-1)}return i.pop(),l.join("")}(e,this,t)}function n9(e,t){return function(e,t,n){let r=t.indexStack,i=e.children||[],o=t.createTracker(n),l=[],a=-1;for(r.push(-1);++a<i.length;){let n=i[a];r[r.length-1]=a,l.push(o.move(t.handle(n,e,t,{before:"\n",after:"\n",...o.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(function(e,t,n,r){let i=r.join.length;for(;i--;){let o=r.join[i](e,t,n,r);if(!0===o||1===o)break;if("number"==typeof o)return"\n".repeat(1+o);if(!1===o)return"\n\n<!---->\n\n"}return"\n\n"}(n,i[a+1],e,t)))}return r.pop(),l.join("")}(e,this,t)}function n5(e,t){return function(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],l={},a=-1;for(;++a<e.unsafe.length;){let t,n=e.unsafe[a];if(!ns(e.stack,n))continue;let o=e.compilePattern(n);for(;t=o.exec(r);){let e="before"in n||!!n.atBreak,r="after"in n,o=t.index+(e?t[1].length:0);i.includes(o)?(l[o].before&&!e&&(l[o].before=!1),l[o].after&&!r&&(l[o].after=!1)):(i.push(o),l[o]={before:e,after:r})}}i.sort(nX);let s=n.before?n.before.length:0,u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let e=i[a];!(e<s)&&!(e>=u)&&(!(e+1<u)||i[a+1]!==e+1||!l[e].after||l[e+1].before||l[e+1].after)&&(i[a-1]!==e-1||!l[e].before||l[e-1].before||l[e-1].after)&&(s!==e&&o.push(nQ(r.slice(s,e),"\\")),s=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(o.push(np(r.charCodeAt(e))),s++):o.push("\\"))}return o.push(nQ(r.slice(s,u),n.after)),o.join("")}(this,e,t)}let n6=["mdxJsxTextElement","mdxJsxFlowElement"];function n7(e){return n6.includes(e.type)&&n8.includes(e.name.toLowerCase())}let n8=["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 re(e){let t={};return e.split(";").filter(e=>
5""!==e.trim()).forEach(e=>{let[n,r]=e.split(":").map(e=>e.trim());t[n]=r}),t}function rt({root:e,visitors:t,jsxComponentDescriptors:r,jsxIsAvailable:i,addImportStatements:o=!0}){let l=null,a=new Set,s=new Map;function u(e,t){a.add(e),t&&s.set(e,{...t})}function c(e,n){if(null===l)return l=n;if(!(e.children instanceof Array))throw Error("Attempting to append children to a non-parent");let r=e.children,i=r.at(-1);if(i){let e=t.find(e=>{var t;return null==(t=e.shouldJoin)?void 0:t.call(e,i,n)});if(e){let t=e.join(i,n);return r.splice(r.length-1,1,t),t}}return r.push(n),n}function d(e,t){e.getChildren().forEach(e=>{f(e,t)})}function f(e,r,i=null){var o;let l=t.find((t,n)=>{var r;return(null==i||!i.has(n))&&(null==(r=t.testLexicalNode)?void 0:r.call(t,e))});if(!l)throw Error(`no lexical visitor found for ${e.getType()}`,{cause:e});null==(o=l.visitLexicalNode)||o.call(l,{lexicalNode:e,mdastParent:r,actions:{addAndStepInto(t,i={},o=!0){let l={type:t,...i,...o?{children:[]}:{}};c(r,l),(0,n.$isElementNode)(e)&&o&&d(e,l)},appendToParent:c,visitChildren:d,visit:f,registerReferredComponent:u,nextVisitor(){f(e,r,(i??new Set).add(t.indexOf(l)))}}})}if(t=t.sort((e,t)=>(t.priority??0)-(e.priority??0)),f(e,null),null===l)throw Error("traversal ended with no root element");let h=new Map,p=new Map;for(let e of a){let t=r.find(t=>t.name===e)??s.get(e)??r.find(e=>"*"===e.name);if(!t)throw Error(`Component ${e} is used but not imported`);if(t.source)if(t.defaultExport)p.set(e,t.source);else{let{source:n}=t,r=h.get(n);r?r.push(e):h.set(n,[e])}}if(!o){for(let[e,t]of h.entries()){let n=t.filter(e=>s.has(e));n.length>0?h.set(e,n):h.delete(e)}for(let e of p.keys())s.has(e)||p.delete(e)}let g=Array.from(h).map(([e,t])=>({type:"mdxjsEsm",value:`import { ${t.join(", ")} } from '${e}'`}));g.push(...Array.from(p).map(([e,t])=>({type:"mdxjsEsm",value:`import ${e} from '${t}'`})));let m=l,x=m.children.find(e=>"yaml"===e.type);return x?m.children.splice(m.children.indexOf(x)+1,0,...g):m.children.unshift(...g),function e(t,n){if("strong"===t.type||"emphasis"===t.type){let r=t.children.at(-1);if((null==r?void 0:r.type)==="text"){let i=rn.exec(r.value);if(i){r.value=r.value.replace(rn,"");let o=n.at(-1);o&&(o.children.splice(o.children.indexOf(t)+1,0,{type:"text",value:i[0]}),e(o,n.slice(0,-1)))}}let i=t.children.at(0);if((null==i?void 0:i.type)==="text"){let r=rr.exec(i.value);if(r){i.value=i.value.replace(rr,"");let o=n.at(-1);o&&(o.children.splice(o.children.indexOf(t),0,{type:"text",value:r[0]}),e(o,n.slice(0,-1)))}}}"children"in t&&t.children.length>0&&t.children.forEach(r=>{e(r,[...n,t])})}(m,[]),function e(t){if("children"in t&&t.children.length>0){if(n7(t)&&1===t.children.length){let e=t.children[0];"mdxJsxTextElement"===e.type&&"span"===e.name&&(e.attributes.forEach(e=>{if("mdxJsxAttribute"===e.type){let i=t.attributes.find(t=>"mdxJsxAttribute"===t.type&&t.name===e.name);if(i)if("className"===e.name){let t=new Set([...i.value.split(" "),...e.value.split(" ")]);i.value=Array.from(t).join(" ")}else{var n,r;let t,o;"style"===e.name&&(n=i.value,r=e.value,t=re(n),o=re(r),i.value=Object.entries({...t,...o}).map(([e,t])=>`${e}: ${t}`).join("; "))}else t.attributes.push(e)}}),t.children=e.children)}t.children.forEach(t=>{e(t)})}}(m),i||function e(t){if(Object.hasOwn(t,"children")){let n=[];t.children.forEach(t=>{"mdxJsxTextElement"===t.type&&"u"===t.name?n.push({type:"html",value:"<u>"},...t.children,{type:"html",value:"</u>"}):(n.push(t),e(t))}),t.children=n}}(m),m}e.s(["htmlTags",()=>n8,"isMdastHTMLNode",()=>n7],121341);let rn=/\s+$/,rr=/^\s+/;function ri({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return n0(rt({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+"\n"}e.s(["exportLexicalTreeToMdast",()=>rt,"exportMarkdownFromLexical",()=>ri],751291);let ro={}.hasOwnProperty;function rl(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(ro.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(r in o){ro.call(i,r)||(i[r]=[]);let e=o[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eC(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}
5e.s(["combineExtensions",()=>rl],383166);let ra={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tq(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eM(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},rs={tokenize:function(e){let t,n,r,i=this,o=[],l=0;return a;function a(t){if(l<o.length){let n=o[l];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(l++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&x();let r=i.events.length,o=r;for(;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}m(l);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return eC(i.events,o+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(l===o.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return p(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(ru,c,d)(n)}function c(e){return t&&x(),m(l),f(e)}function d(e){return i.parser.lazy[i.now().line]=l!==o.length,r=i.now().offset,p(e)}function f(t){return i.containerState={},e.attempt(ru,h,p)(t)}function h(e){return l++,o.push([i.currentConstruct,i.containerState]),f(e)}function p(r){if(null===r){t&&x(),m(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){g(e.exit("chunkFlow"),!0),m(0),e.consume(n);return}return eM(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function g(e,o){let a=i.sliceStream(e);if(o&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,o=t.events.length;for(;o--;)if(t.events[o][1].start.offset<r&&(!t.events[o][1].end||t.events[o][1].end.offset>r))return;let a=i.events.length,s=a;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(m(l),o=a;o<i.events.length;)i.events[o][1].end={...n},o++;eC(i.events,s+1,0,i.events.slice(a)),i.events.length=o}}function m(t){let n=o.length;for(;n-- >t;){let t=o[n];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function x(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},ru={tokenize:function(e,t,n){return tq(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},rc={partial:!0,tokenize:function(e,t,n){return function(t){return eD(t)?tq(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eM(e)?t(e):n(e)}}};e.s(["blankLine",0,rc],959323);class rd{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&rf(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),rf(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rf(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);rf(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);rf(this.left,t.reverse())}}}function rf(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 rh(e){let t,n,r,i,o,l,a,s={},u=-1,c=new rd(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(l=t[1]._tokenizer.events).length&&"lineEndingBlank"===l[r][1].type&&(r+=2),r<l.length&&"content"===l[r][1].type))for(;++r<l.length&&"content"!==l[r][1].type;)"chunkText"===l[r][1].type&&(l[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],o=e.get(t)[2],l=t-1,a=[],s=i._tokenizer;!s&&(s=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._c
5ontentTypeTextTrailing=!0));let u=s.events,c=[],d={},f=-1,h=i,p=0,g=0,m=[0];for(;h;){for(;e.get(++l)[1]!==h;);a.push(l),!h._tokenizer&&(n=o.sliceStream(h),h.next||n.push(null),r&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=h,h=h.next}for(h=i;++f<u.length;)"exit"===u[f][0]&&"enter"===u[f-1][0]&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(g=f+1,m.push(g),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):m.pop(),f=m.length;f--;){let t=u.slice(m[f],m[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)d[p+c[f][0]]=p+c[f][1],p+=c[f][1]-c[f][0]-1;return d}(c,u)),u=s[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(o=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,o))}}return eC(e,0,1/0,c.slice(0)),!a}let rp={resolve:function(e){return rh(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):eM(t)?e.check(rg,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},rg={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tq(e,i,"linePrefix")};function i(i){if(null===i||eM(i))return n(i);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},rm={tokenize:function(e){let t=this,n=e.attempt(rc,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,tq(e,e.attempt(this.parser.constructs.flow,r,e.attempt(rp,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},rx={resolveAll:rb()},ry=r_("string"),rv=r_("text");function r_(e){return{resolveAll:rb("text"===e?rC:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,o,l);return o;function o(e){return s(e)?i(e):l(e)}function l(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function rb(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function rC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],o=t.sliceStream(i),l=o.length,a=-1,s=0;for(;l--;){let e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let o={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...o.start},i.start.offset===i.end.offset?Object.assign(i,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}let rT={name:"attention",resolveAll:function(e,t){let n,r,i,o,l,a,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
5n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},f={...e[c][1].start};rE(d,-a),rE(f,a),o={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:f},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[n][1].end={...o.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eT(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eT(s,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),s=eT(s,eF(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=eT(s,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=eT(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eC(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=e$(i);return function(l){return n=l,e.enter("attentionSequence"),function l(a){if(a===n)return e.consume(a),l;let s=e.exit("attentionSequence"),u=e$(a),c=!u||2===u&&o||r.includes(a),d=!o||2===o&&u||r.includes(i);return s._open=!!(42===n?c:c&&(o||!d)),s._close=!!(42===n?d:d&&(u||!c)),t(a)}(l)}}};function rE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let rS={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eD(t)?tq(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(rS,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return eD(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},rk={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eA(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},rw={name:"characterReference",tokenize:function(e,t,n){let r,i,o=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=eS,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=eI,u):(e.enter("characterReferenceValue"),r=7,i=eN,u(t))}function u(a){if(59===a&&l){let r=e.exit("characterReferenceValue");return i!==eS||e1(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<r?(e.consume(a),u):n(a)}}},rN={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},rI={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l};
vendor: 11,074 bytes, line 5
5function l(t){return e.enter("codeFencedFence"),eD(t)?tq(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o>=a?(e.exit("codeFencedFenceSequence"),eD(i)?tq(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||eM(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},l=0,a=0;return function(t){var o;let u;return o=t,l=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=o,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),eD(i)?tq(e,s,"whitespace")(i):s(i))}(o)};function s(o){return null===o||eM(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(rN,c,p)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eM(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):eD(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tq(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(o))}function u(t){return null===t||eM(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||eM(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(o,p,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return l>0&&eD(t)?tq(e,h,"linePrefix",l+1)(t):h(t)}function h(t){return null===t||eM(t)?e.check(rN,c,p)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eM(n)?(e.exit("codeFlowValue"),h(n)):(e.consume(n),t)}(t))}function p(n){return e.exit("codeFenced"),t(n)}}},rA={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),tq(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?o(n):eM(n)?e.attempt(rM,t,o)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eM(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function o(n){return e.exit("codeIndented"),t(n)}}},rM={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):tq(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):eM(e)?i(e):n(e)}}};function rO(e,t,n,r,i,o,l,a,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d):null===t||32===t||41===t||ew(t)?n(t):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||eM(t)?n(t):(e.consume(t),92===t?h:f)}function h(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function p(i){return!c&&(null===i||41===i||eO(i))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,p):41===i?(e.consume(i),c--,p):null===i||32===i||40===i||ew(i)?n(i):(e.consume(i),92===i?g:p)}function g(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function rD(e,t,n,r,i,o){let l,a=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(d){return s>999||null===d||91===d||93===d&&!l||94===d&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):eM(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||eM(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),l||(l=!eD(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function rR(e,t,n,r,i,o){let l;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),l=40===t?41:t,a):n(t)};function a(n){return n===l?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),s(n))}function s(t){return t===l?(e.exit(o),a(l)):null===t?n(t):eM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),tq(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===l||null===t||eM(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===l||92===t?(e.consume(t),u):u(t)}}function rP(e,t){let n;return function r(i){return eM(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):eD(i)?tq(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function rL(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}e.s(["factoryWhitespace",()=>rP],808386);let r$={partial:!0,tokenize:function(e,t,n){return function(t){return eO(t)?rP(e,r)(t):n(t)};function r(t){return rR(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return eD(t)?tq(e,o,"whitespace")(t):o(t)}function o(e){return null===e||eM(e)?t(e):n(e)}}},rF=["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"],rB=["pre","script","style","textarea"],rV={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(rc,t,n)}}},rz={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eM(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},rj={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eC(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=l);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return o=eT(o=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+a+3)),o=eT(o,[["enter",c,t]]),o=eT(o,eF(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),o=eT(o,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),o=eT(o,e.slice(i+1)),o=eT(o,[["exit",s,t]]),eC(e,r,e.length,o),e},tokenize:function(e,t,n){let r,i,o=this,l=o.events.length;for(;l--;)if(("labelImage"===o.events[l][1].type||"labelLink"===o.events[l][1].type)&&!o.events[l][1]._balanced){r=o.events[l][1];break}return function(t){return r?r._inactive?c(t):(i=o.parser.defined.includes(rL(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(rW,u,i?u:c)(t):91===t?e.attempt(rK,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(rH,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},rW={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eO(t)?rP(e,i)(t):i(t)}function i(t){return 41===t?u(t):rO(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return eO(t)?rP(e,a)(t):u(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?rR(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return eO(t)?rP(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},rK={tokenize:function(e,t,n){let r=this;return function(t){return rD.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(rL(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},rH={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},rU={name:"labelStartImage",resolveAll:rj.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},rJ={name:"labelStartLink",resolveAll:rj.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},rY={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),tq(e,t,"linePrefix")}}},rq={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(o){var l;return e.enter("thematicBreak"),r=l=o,function o(l){return l===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),eD(n)?tq(e,o,"whitespace")(n):o(n))}(l)):i>=3&&(null===l||eM(l))?(e.exit("thematicBreak"),t(l)):n(l)}(l)}}},rG={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(rc,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tq(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eD(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
5=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rQ,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,tq(e,e.attempt(rG,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,l=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eN(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(rq,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eN(i)&&++l<10?(e.consume(i),t):(!r.interrupt||l<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(rc,r.interrupt?n:s,e.attempt(rX,c,u))}
5function s(e){return r.containerState.initialBlankLine=!0,o++,c(e)}function u(t){return eD(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},rX={partial:!0,tokenize:function(e,t,n){let r=this;return tq(e,function(e){let i=r.events[r.events.length-1];return!eD(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},rQ={partial:!0,tokenize:function(e,t,n){let r=this;return tq(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},rZ={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);let l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",l,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var l;let a,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){a="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,l=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eD(n)?tq(e,o,"lineSuffix")(n):o(n))}(l)):n(t)};function o(r){return null===r||eM(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,rD.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function o(t){return(r=rL(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return eO(t)?rP(e,a)(t):a(t)}function a(t){return rO(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(r$,u,u)(t)}function u(t){return eD(t)?tq(e,c,"whitespace")(t):c(t)}function c(o){return null===o||eM(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}}},"disable",0,{null:[]},"document",0,{42:rG,43:rG,45:rG,48:rG,49:rG,50:rG,51:rG,52:rG,53:rG,54:rG,55:rG,56:rG,57:rG,62:rS},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},eC(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var o;return e.enter("atxHeading"),o=i,e.enter("atxHeadingSequence"),function i(o){return 35===o&&r++<6?(e.consume(o),i):null===o||eO(o)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eM(r)?(e.exit("atxHeading"),t(r)):eD(r)?tq(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eO(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(o)):n(o)}(o)}}},42:rq,45:[rZ,rq],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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},tokenize:function(e,t,n){let r,i,o,l,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(l){return 33===l?(e.consume(l),c):47===l?(e.consume(l),i=!0,h):63===l?(e.consume(l),r=3,s.interrupt?t:O):eE(l)?(e.consume(l),o=String.fromCharCode(l),p):n(l)}function c(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,l=0,f):eE(i)?(e.consume(i),r=4,s.interrupt?t:O):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:O):n(r)}function f(r){let i="CDATA[";return r===i.charCodeAt(l++)?(e.consume(r),l===i.length)?s.interrupt?t:E:f:n(r)}function h(t){return eE(t)?(e.consume(t),o=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||eO(l)){let a=47===l,u=o.toLowerCase();return!a&&!i&&rB.includes(u)?(r=1,s.interrupt?t(l):E(l)):rF.includes(o.toLowerCase())?(r=6,a)?(e.consume(l),g):s.interrupt?t(l):E(l):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(l):i?function t(n){return eD(n)?(e.consume(n),t):C(n)}(l):m(l))}return 45===l||eS(l)?(e.consume(l),o+=String.fromCharCode(l),p):n(l)}function g(r){return 62===r?(e.consume(r),s.interrupt?t:E):n(r)}function m(t){return 47===t?(e.consume(t),C):58===t||95===t||eE(t)?(e.consume(t),x):eD(t)?(e.consume(t),m):C(t)}function x(t){return 45===t||46===t||58===t||95===t||eS(t)?(e.consume(t),x):y(t)}function y(t){return 61===t?(e.consume(t),v):eD(t)?(e.consume(t),y):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,_):eD(t)?(e.consume(t),v):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eO(n)?y(n):(e.consume(n),t)}(t)}function _(t){return t===a?(e.consume(t),a=null,b):null===t||eM(t)?n(t):(e.consume(t),_)}function b(e){return 47===e||62===e||eD(e)?m(e):n(e)}function C(t){return 62===t?(e.consume(t),T):n(t)}function T(t){return null===t||eM(t)?E(t):eD(t)?(e.consume(t),T):n(t)}function E(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),I):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),O):93===t&&5===r?(e.consume(t),M):eM(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(rV,R,S)(t)):null===t||eM(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),E)}function S(t){return e.check(rz,k,R)(t)}function k(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),w}function w(t){return null===t||eM(t)?S(t):(e.enter("htmlFlowData"),E(t))}function N(t){return 45===t?(e.consume(t),O):E(t)}function I(t){return 47===t?(e.consume(t),o="",A):E(t)}function A(t){if(62===t){let n=o.toLowerCase();return rB.includes(n)?(e.consume(t),D):E(t)}return eE(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),A):E(t)}function M(t){return 93===t?(e.consume(t),O):E(t)}function O(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),O):E(t)}function D(t){return null===t||eM(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),D)}function R(n){return e.exit("htmlFlow"),t(n)}}},61:rZ,95:rq,96:rI,126:rI},"flowInitial",0,{[-2]:rA,[-1]:rA,32:rA},"insideSpan",0,{null:[rT,rx]},"string",0,{38:rw,92:rk},"text",0,{[-5]:rY,[-4]:rY,[-3]:rY,33:rU,38:rw,42:rT,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return eE(t)?(e.consume(t),o):64===t?n(t):a(t)}function o(t){return 43===t||45===t||46===t||eS(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,l):(43===n||45===n||46===n||eS(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ew(r)?n(r):(e.consume(r),l)}function a(t){return 64===t?(e.consume(t),s):ek(t)?(e.consume(t),a):n(t)}function s(i){return eS(i)?function i(o){return 46===o?(e.consume(o),r=0,s):62===o?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(o){if((45===o||eS(o)
5)&&r++<63){let n=45===o?t:i;return e.consume(o),n}return n(o)}(o)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,o,l=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),_):63===t?(e.consume(t),y):eE(t)?(e.consume(t),C):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,h):eE(t)?(e.consume(t),x):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):eM(t)?(o=c,A(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),f):c(t)}function f(e){return 62===e?I(e):45===e?d(e):c(e)}function h(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?p:h):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),g):eM(t)?(o=p,A(t)):(e.consume(t),p)}function g(t){return 93===t?(e.consume(t),m):p(t)}function m(t){return 62===t?I(t):93===t?(e.consume(t),m):p(t)}function x(t){return null===t||62===t?I(t):eM(t)?(o=x,A(t)):(e.consume(t),x)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):eM(t)?(o=y,A(t)):(e.consume(t),y)}function v(e){return 62===e?I(e):y(e)}function _(t){return eE(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||eS(t)?(e.consume(t),b):function t(n){return eM(n)?(o=t,A(n)):eD(n)?(e.consume(n),t):I(n)}(t)}function C(t){return 45===t||eS(t)?(e.consume(t),C):47===t||62===t||eO(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),I):58===t||95===t||eE(t)?(e.consume(t),E):eM(t)?(o=T,A(t)):eD(t)?(e.consume(t),T):I(t)}function E(t){return 45===t||46===t||58===t||95===t||eS(t)?(e.consume(t),E):function t(n){return 61===n?(e.consume(n),S):eM(n)?(o=t,A(n)):eD(n)?(e.consume(n),t):T(n)}(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,k):eM(t)?(o=S,A(t)):eD(t)?(e.consume(t),S):(e.consume(t),w)}function k(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):eM(t)?(o=k,A(t)):(e.consume(t),k)}function w(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eO(t)?T(t):(e.consume(t),w)}function N(e){return 47===e||62===e||eO(e)?T(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function A(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return eD(t)?tq(e,O,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),o(t)}}}],91:rJ,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eM(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},rk],93:rj,95:rT,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),o++,t):(e.exit("codeTextSequence"),l(n))}(t)};function l(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),l):96===s?(i=e.enter("codeTextSequence"),r=0,function n(l){return 96===l?(e.consume(l),r++,n):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(l)):(i.type="codeTextData",a(l))}(s)):eM(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eM(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),a)}}}}],823051);var r0=e.i(823051);let r1=/[\0\t\n\r]/g,r2={}.hasOwnProperty;function r3(e,t,n){let r,i,o,l;return"string"!=typeof t&&(n=t,t=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter
5:{autolink:r(x),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(p),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(h),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(h,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(m,i),htmlFlowData:u,htmlText:r(m,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(p),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:l(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=nW(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=e1(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=r4(e.end)},codeFenced:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:l(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rL(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(d),hardBreakTrailing:l(d),htmlFlow:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=nH(t),n.identifier=rL(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=r4(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
5ype)&&(u.call(this,e),c.call(this,e))},link:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rL(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(r2.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},l={stack:[r],tokenStack:[],config:t,enter:o,exit:a,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,o,l,a=t-1,s=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||l||s||o||(o=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(i=void 0;l--;){let t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=l}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,o=void 0,l=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];r2.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},l),e[c][1])}if(l.tokenStack.length>0){let e=l.tokenStack[l.tokenStack.length-1];(e[1]||r9).call(l,void 0,e[0])}for(r.position={start:r4(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:r4(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function o(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:r4(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||r9).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): it’s not open");n.position.end=r4(e.end)}function s(){return nE(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:r4(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=r4(e.end)}function d(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function h(){return{type:"code",lang:null,meta:null,value:""}}function p(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function m(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(n)(function(e){for(;!rh(e););return e}((function(e){let t={constructs:rl([r0,...(e||{}).extensions||[]]),content:n(ra),defined:[],document:n(rs),flow:n(rm),lazy:{},string:n(ry),text:n(rv)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
5olumn:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],l=[],a=[],s={attempt:p(function(e,t){g(e,t.from)}),check:p(h),consume:function(e){eM(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:p(h,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,m()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let o,l=e[r];if("string"==typeof l)o=l;else switch(l){case -5:o="\r";break;case -4:o="\n";break;case -3:o="\r\n";break;case -2:o=t?" ":"	";break;case -1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(l)}n=-2===l,i.push(o)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(l=eT(l,e),function(){let e;for(;r._index<l.length;){let n=l[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==l[l.length-1])?[]:(g(t,0),u.events=eF(o,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,l)];else{if(n=e.slice(r,o),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}l>0&&n.push(e[o].slice(0,l))}return n}(l,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function h(e,t){t.restore()}function p(e,t){return function(n,i,o){var l;let c,d,h,p;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):(l=n,function(e){let t=null!==e&&l[e],n=null!==e&&l.null;return g([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function g(e){return(c=e,d=0,0===e.length)?o:x(e[d])}function x(e){return function(n){let i,o,l,c,d;return(i=f(),o=u.previous,l=u.currentConstruct,c=u.events.length,d=Array.from(a),p={from:c,restore:function(){r=i,u.previous=o,u.currentConstruct=l,u.events.length=c,a=d,m()}},h=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,y,v)(n)}}function y(t){return e(h,p),i}function v(e){return(p.restore(),++d<c.length)?x(c[d]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&eC(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function m(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(n).document().write((i=1,o="",l=!0,function(e,t,n){let a,s,u,c,d,f=[];for(e=o+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,o="",l&&(65279===e.charCodeAt(0)&&u++,l=void 0);u<e.length;){if(r1.lastIndex=u,c=(a=r1.exec(e))&&void 0!==a.index?a.index:e.length,d=e.charCodeAt(c),!a){o=e.slice(u);break}if(10===d&&u===c&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),u<c&&(f.push(e.slice(u,c)),i+=c-u),d){case 0:f.push(65533),i++;break;case 9:for(s=4*Math.ceil(i/4),f.push(-2);i++<s;)f.push(-1);break;case 10:f.push(-4),i=1;break;default:r=!0,i=1}u=c+1}
5return n&&(r&&f.push(-5),o&&f.push(o),f.push(null)),f})(e,t,!0))))}function r4(e){return{line:e.line,column:e.column,offset:e.offset}}function r9(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is still open")}function r5(e){return e.children instanceof Array}e.s(["fromMarkdown",()=>r3],30625);class r6 extends Error{constructor(e,t){super(e),this.name="MarkdownParseError",this.cause=t}}class r7 extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function r8({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var l;let a;try{a=r3(t,{extensions:r,mdastExtensions:i})}catch(e){if(e instanceof Error)throw new r6(`Error parsing markdown: ${e.message}`,e);throw new r6(`Error parsing markdown: ${e}`,e)}0===a.children.length&&a.children.push({type:"paragraph",children:[]}),(null==(l=a.children.at(-1))?void 0:l.type)!=="paragraph"&&a.children.push({type:"paragraph",children:[]}),ie({root:e,mdastRoot:a,visitors:n,...o})}function ie({root:e,mdastRoot:t,visitors:n,...r}){let i,o=new WeakMap,l=new WeakMap,a=(i=new Map,"root"!==t.type?{importDeclarations:{}}:(t.children.filter(e=>"mdxjsEsm"===e.type).filter(e=>
5e.value.startsWith("import ")).forEach(e=>{var t,n;((null==(n=null==(t=e.data)?void 0:t.estree)?void 0:n.body)??[]).forEach(e=>{"ImportDeclaration"===e.type&&e.specifiers.forEach(t=>{i.set(t.local.name,{source:`${e.source.value}`,defaultExport:"ImportDefaultSpecifier"===t.type})})})}),{importDeclarations:Object.fromEntries(i.entries())}));function s(e,t){if(!r5(e))throw Error("Attempting to visit children of a non-parent");e.children.forEach(n=>{u(n,t,e)})}function u(e,t,i,c=null){let d=n.find((t,n)=>(null==c||!c.has(n))&&("string"==typeof t.testNode?t.testNode===e.type:t.testNode(e,r)));if(!d)try{throw new r7(`Unsupported markdown syntax: ${n0(e)}`)}catch(t){throw new r7(`Parsing of the following markdown structure failed: ${JSON.stringify({type:e.type,name:"name"in e?e.name:"N/A"})}`)}d.visitNode({mdastNode:e,lexicalParent:t,mdastParent:i,descriptors:r,metaData:a,actions:{visitChildren:s,nextVisitor(){u(e,t,i,(c??new Set).add(n.indexOf(d)))},addAndStepInto(n){t.append(n),r5(e)&&s(e,n)},addFormatting(t,n){!n&&r5(e)&&(n=e),n&&o.set(n,t|(o.get(i)??0))},removeFormatting(t,n){!n&&r5(e)&&(n=e),n&&o.set(n,t^(o.get(i)??0))},getParentFormatting:()=>o.get(i)??0,addStyle(t,n){!n&&r5(e)&&(n=e),n&&l.set(n,t)},getParentStyle:()=>l.get(i)??""}})}n=n.sort((e,t)=>(t.priority??0)-(e.priority??0)),u(t,e,null)}e.s(["MarkdownParseError",()=>r6,"UnrecognizedMarkdownConstructError",()=>r7,"importMarkdownToLexical",()=>r8,"importMdastTreeToLexical",()=>ie],801773);var it=e.i(541504),ir=n,ii=Object.defineProperty,io=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?ii(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};let il="generic-html";class ia extends ir.ElementNode{constructor(e,t,n,r){super(r),io(this,"__tag"),io(this,"__nodeType"),io(this,"__attributes"),this.__tag=e,this.__nodeType=t,this.__attributes=n}static getType(){return il}static clone(e){return new ia(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){this.getWritable().__attributes=e}getStyle(){var e;return null==(e=this.__attributes.find(e=>"style"===e.name))?void 0:e.value}createDOM(){let e=this.__tag,t=document.createElement(e);return this.__attributes.forEach(e=>{t.setAttribute(e.name,e.value)}),t}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){let{element:t}=super.exportDOM(e);return{element:t}}static importJSON(e){let t=is(e.tag,e.mdxType,e.attributes);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:il,version:1}}extractWithChild(){return!0}isInline(){return"mdxJsxTextElement"===this.__nodeType}}function is(e,t,n){return(0,ir.$applyNodeReplacement)(new ia(e,t,n))}function iu(e){return e instanceof ia}e.s(["$createGenericHTMLNode",()=>is,"$isGenericHTMLNode",()=>iu,"GenericHTMLNode",()=>ia,"TYPE_NAME",()=>il],460703);let ic={testLexicalNode:iu,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},id={testLexicalNode:n.$isLineBreakNode,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:"\n"})}},ih={testLexicalNode:n.$isParagraphNode,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},ip={testLexicalNode:n.$isRootNode,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}};function ig(e){return"text"===e.type}e.s(["DEFAULT_FORMAT",()=>0,"IS_BOLD",()=>1,"IS_CODE",()=>16,"IS_HIGHLIGHT",()=>128,"IS_ITALIC",()=>2,"IS_STRIKETHROUGH",()=>4,"IS_SUBSCRIPT",()=>32,"IS_SUPERSCRIPT",()=>64,"IS_UNDERLINE",()=>8],541320);let im=["u","span","sub","sup"],ix={shouldJoin:(e,t)=>["text","emphasis","strong","highlight"].includes(e.type)?e.type===t.type:!!("mdxJsxTextElement"===e.type&&"mdxJsxTextElement"===t.type&&im.includes(t.name))&&e.name===t.name&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes),join:(e,t)=>ig(e)&&ig(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]},testLexicalNode:n.$isTextNode,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:r})=>{let i=e.getPreviousSibling(),o=(0,n.$isTextNode)(i)?i.getFormat():0,l=e.getTextContent(),a=e.getFormat(),s=e.getStyle(),u=t;(s&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:s}]})),o&a&8&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&a&64&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&a&32&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&a&2&&(u=r.appendToParent(u,{type:"emphasis",children:[]})),o&a&1&&(u=r.appendToParent(u,{type:"strong",children:[]})),o&a&4&&(u=r.appendToParent(u,{type:"delete",children:[]})),o&a&128&&(u=r.appendToParent(u,{type:"highlight",children:[]})),8&a&&!(8&o)&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),64&a&&!(64&o)&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),32&a&&!(32&o)&&(u=r.appendToParent(u,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),2&a&&!(2&o)&&(u=r.appendToParent(u,{type:"emphasis",children:[]})),1&a&&!(1&o)&&(u=r.appendToParent(u,{type:"strong",children:[]})),4&a&&!(4&o)&&(u=r.appendToParent(u,{type:"delete",children:[]})),128&a&&!(128&o)&&(u=r.appendToParent(u,{type:"highlight",children:[]})),16&a)?r.appendToParent(u,{type:"inlineCode",value:l}):r.appendToParent(u,{type:"text",value:l})}},iy={testNode:"break",visitNode:function({lexicalParent:e}){e.append((0,n.$createLineBreakNode)())}};function iv(e,t){return[{testNode:t=>"mdxJsxTextElement"===t.type&&t.name===e,visitNode({actions:e,mdastNode:n,lexicalParent:r}){e.addFormatting(t),e.visitChildren(n,r)}},{testNode:t=>"html"===t.type&&t.value===`<${e}>`,visitNode({actions:e,mdastParent:n}){e.addFormatting(t,n)}},{testNode:t=>"html"===t.type&&t.value===`</${e}>`,visitNode({actions:e,mdastParent:n}){e.removeFormatting(t,n)}}]}let i_=[{testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}
5){t.addFormatting(2),t.visitChildren(e,n)}},{testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(1),t.visitChildren(e,n)}},...iv("u",8),...iv("code",16),{testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto((0,n.$createTextNode)(e.value).setFormat(16|t.getParentFormatting()))}},{testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(4),t.visitChildren(e,n)}},{testNode:"highlight",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(128),t.visitChildren(e,n)}},...iv("sup",64),...iv("sub",32)],ib={testNode:n7,visitNode:function({mdastNode:e,actions:t,lexicalParent:n}){"span"===e.name&&1===e.attributes.length&&"mdxJsxAttribute"===e.attributes[0].type&&"style"===e.attributes[0].name?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(is(e.name,e.type,e.attributes))},priority:-100},iC=["listitem","quote","admonition"],iT={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:r}){iC.includes(t.getType())?r.visitChildren(e,t):r.addAndStepInto((0,n.$createParagraphNode)())}},iE={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},iS={testNode:"text",visitNode({mdastNode:e,actions:t}){let r=(0,n.$createTextNode)(e.value);r.setFormat(t.getParentFormatting());let i=t.getParentStyle();""!==i&&r.setStyle(i),t.addAndStepInto(r)}};e.s(["SharedHistoryPlugin",()=>iM],583838);var ik=e.i(191788);let iw=(0,ik.createContext)(null);function iN(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}}function iI(){let e=(0,ik.useContext)(iw);return null==e&&function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",8),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #8; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(0),e}function iA({delay:e,externalHistoryState:t}){let[r]=iI();return function(e,t,r=1e3){let i=(0,ik.useMemo)(()=>t||j(),[t]);(0,ik.useEffect)(()=>{let t,o,l;return t=Date.now(),o=0,l=(i,l,a,s,u,c)=>{let d=Date.now();if(c.has(n.HISTORIC_TAG))return o=0,t=d,2;let f=function(e,t,r,i,o){if(null===e||0===r.size&&0===i.size&&!o)return 0;let l=t._selection,a=e._selection;if(o)return 1;if(!((0,n.$isRangeSelection)(l)&&(0,n.$isRangeSelection)(a)&&a.isCollapsed()&&l.isCollapsed()))return 0;let s=function(e,t,r){let i=e._nodeMap,o=[];for(let e of t){let t=i.get(e);void 0!==t&&o.push(t)}for(let[e,t]of r){if(!t)continue;let r=i.get(e);void 0===r||(0,n.$isRootNode)(r)||o.push(r)}return o}(t,r,i);if(0===s.length)return 0;if(s.length>1){let r=t._nodeMap,i=r.get(l.anchor.key),o=r.get(a.anchor.key);return i&&o&&!e._nodeMap.has(i.__key)&&(0,n.$isTextNode)(i)&&1===i.__text.length&&1===l.anchor.offset?2:0}let u=s[0],c=e._nodeMap.get(u.__key);if(!(0,n.$isTextNode)(c)||!(0,n.$isTextNode)(u)||c.__mode!==u.__mode)return 0;let d=c.__text,f=u.__text;if(d===f)return 0;let h=l.anchor,p=a.anchor;if(h.key!==p.key||"text"!==h.type)return 0;let g=h.offset,m=p.offset,x=f.length-d.length;return 1===x&&m===g-1?2:-1===x&&m===g+1?3:4*(-1===x&&m===g)}(i,l,s,u,e.isComposing()),h=(()=>{var h;let p,g,m,x,y=null===a||a.editor===e,v=c.has(n.HISTORY_PUSH_TAG);if(!v&&y&&c.has(n.HISTORY_MERGE_TAG))return 0;if(null===i)return 1;let _=l._selection;return s.size>0||u.size>0?!1===v&&0!==f&&f===o&&d<t+r&&y?0:1!==s.size||(h=Array.from(s)[0],p=i._nodeMap.get(h),g=l._nodeMap.get(h),m=i._selection,x=l._selection,(0,n.$isRangeSelection)(m)&&(0,n.$isRangeSelection)(x)&&"element"===m.anchor.type&&"element"===m.focus.type&&"text"===x.anchor.type&&"text"===x.focus.type||!(0,n.$isTextNode)(p)||!(0,n.$isTextNode)(g)||p.__parent!==g.__parent||JSON.stringify(i.read(()=>p.exportJSON()))!==JSON.stringify(l.read(()=>g.exportJSON())))?1:0:2*(null===_)})();return t=d,o=f,h},w(e.registerCommand(n.UNDO_COMMAND,()=>((function(e,t){let r=t.redoStack,i=t.undoStack;if(0!==i.length){let o=t.current,l=i.pop();null!==o&&(r.push(o),e.dispatchCommand(n.CAN_REDO_COMMAND,!0)),0===i.length&&e.dispatchCommand(n.CAN_UNDO_COMMAND,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:n.HISTORIC_TAG})}})(e,i),!0),n.COMMAND_PRIORITY_EDITOR),e.registerCommand(n.REDO_COMMAND,()=>((function(e,t){let r=t.redoStack,i=t.undoStack;if(0!==r.length){let o=t.current;null!==o&&(i.push(o),e.dispatchCommand(n.CAN_UNDO_COMMAND,!0));let l=r.pop();0===r.length&&e.dispatchCommand(n.CAN_REDO_COMMAND,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:n.HISTORIC_TAG})}})(e,i),!0),n.COMMAND_PRIORITY_EDITOR),e.registerCommand(n.CLEAR_EDITOR_COMMAND,()=>(z(i),!1),n.COMMAND_PRIORITY_EDITOR),e.registerCommand(n.CLEAR_HISTORY_COMMAND,()=>(z(i),e.dispatchCommand(n.CAN_REDO_COMMAND,!1),e.dispatchCommand(n.CAN_UNDO_COMMAND,!1),!0),n.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(({editorState:t,prevEditorState:r,dirtyLeaves:o,dirtyElements:a,tags:s})=>{let u=i.current,c=i.redoStack,d=i.undoStack,f=null===u?null:u.editorState;if(null!==u&&t===f)return;let h=l(r,t,u,o,a,s);if(1===h)0!==c.length&&(i.redoStack=[],e.dispatchCommand(n.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),e.dispatchCommand(n.CAN_UNDO_COMMAND,!0));else if(2===h)return;i.current={editor:e,editorState:t}}))},[r,e,i])}(r,t,e),null}e.s(["LexicalComposerContext",()=>iw,"createLexicalComposerContext",()=>iN,"useLexicalComposerContext",()=>iI],881868),e.s(["HistoryPlugin",()=>iA],335007);let iM=()=>ik.default.createElement(iA,{externalHistoryState:(0,eb.useCellValue)(oL)}
5),iO=(e,t,n)=>{return function(t){return e.enter("comment"),e.consume(t),r};function r(t){return t===tP.exclamationMark?(e.consume(t),i):n(t)}function i(t){return t===tP.dash?(e.consume(t),o):n(t)}function o(t){return t===tP.dash?(e.consume(t),l):n(t)}function l(t){return t===tP.greaterThan?n(t):eM(t)?u(t):(e.enter(t$.data),t===tP.dash)?(e.consume(t),a):s(t)}function a(e){return e===tP.greaterThan?n(e):s(e)}function s(t){return t===tP.eof?n(t):t===tP.dash?(e.consume(t),d):eM(t)?(e.exit(t$.data),u(t)):(e.consume(t),s)}function u(t){return e.enter(t$.lineEnding),e.consume(t),e.exit(t$.lineEnding),tq(e,c,t$.linePrefix)}function c(t){return eM(t)?u(t):(e.enter(t$.data),s(t))}function d(t){return t===tP.dash?(e.consume(t),f):s(t)}function f(n){return n===tP.greaterThan?(e.exit(t$.data),e.enter("commentEnd"),e.consume(n),e.exit("commentEnd"),e.exit("comment"),t(n)):n===tP.dash?(e.consume(n),f):s(n)}},iD={flow:{60:{tokenize:iO,concrete:!0}},text:{60:{tokenize:iO}}},iR={bold:"_bold_1tncs_10",italic:"_italic_1tncs_14",underline:"_underline_1tncs_18",strikethrough:"_strikethrough_1tncs_34",underlineStrikethrough:"_underlineStrikethrough_1tncs_38",subscript:"_subscript_1tncs_42",superscript:"_superscript_1tncs_47",code:"_code_1tncs_52",nestedListItem:"_nestedListItem_1tncs_59",listitem:"_listitem_1tncs_69",listItemChecked:"_listItemChecked_1tncs_73",listItemUnchecked:"_listItemUnchecked_1tncs_74",admonitionDanger:"_admonitionDanger_1tncs_151",admonitionInfo:"_admonitionInfo_1tncs_152",admonitionNote:"_admonitionNote_1tncs_153",admonitionTip:"_admonitionTip_1tncs_154",admonitionCaution:"_admonitionCaution_1tncs_155",mdxExpression:"_mdxExpression_1tncs_188"};e.s(["default",()=>iR],750788);let iP={text:{bold:iR.bold,italic:iR.italic,underline:iR.underline,code:iR.code,strikethrough:iR.strikethrough,subscript:iR.subscript,superscript:iR.superscript,underlineStrikethrough:iR.underlineStrikethrough},list:{listitem:iR.listitem,listitemChecked:iR.listItemChecked,listitemUnchecked:iR.listItemUnchecked,nested:{listitem:iR.nestedListItem}},admonition:{danger:iR.admonitionDanger,info:iR.admonitionInfo,note:iR.admonitionNote,tip:iR.admonitionTip,caution:iR.admonitionCaution}};e.s(["lexicalTheme",()=>iP],500143);let iL=(0,n.createCommand)("NESTED_EDITOR_UPDATED_COMMAND"),i$=(0,eb.Cell)(null),iF=(0,eb.Cell)(null),iB=(0,eb.Cell)(""),iV=(0,eb.Cell)(!0),iz=(0,eb.Cell)(!1,e=>{e.sub(e.pipe(iz,(0,eb.withLatestFrom)(i$)),([e,t])=>{null==t||t.setEditable(!e)})}),ij=(0,eb.Cell)(""),iW=(0,eb.Cell)(!1),iK=(0,eb.Cell)(!1),iH=(0,eb.Cell)(0),iU=(0,eb.Cell)(null),iJ=(0,eb.Signal)(e=>{e.link(e.pipe(iU,(0,eb.filter)(e=>null!==e)),iJ)}),iY=(0,eb.Signal)(e=>{e.sub(e.pipe(iY,(0,eb.withLatestFrom)(iF)),([e,t])=>
5{null==t||t.dispatchCommand(n.FORMAT_TEXT_COMMAND,e)})}),iq=(0,eb.Cell)(null,e=>{e.sub(e.pipe(iq,(0,eb.withLatestFrom)(iF)),([t,r])=>{if(!t||!r)return;let i=t.anchor.getNode(),o="root"===i.getKey()?i:D(i,e=>{let t=e.getParent();return null!==t&&(0,n.$isRootOrShadowRoot)(t)});o??(o=i.getTopLevelElementOrThrow());let l=o.getKey();if(null!==r.getElementByKey(l)){let t=eg(o)?o.getTag():o.getType();e.pub(o$,t)}})}),iG=(0,eb.Cell)(""),iX=(0,eb.Cell)(""),iQ=(0,eb.Cell)(!1),iZ=(0,eb.Signal)(e=>{e.link(iX,iZ),e.sub(iG,t=>{e.pubIn({[iQ]:!0,[iX]:t})})}),i0=(0,eb.Signal)(e=>{e.link(e.pipe(iZ,(0,eb.withLatestFrom)(od),(0,eb.filter)(([,e])=>!e),(0,eb.map)(([e])=>e)),i0)},!0),i1=(0,eb.Cell)([]),i2=(0,eb.Cell)([]),i3=(0,eb.Cell)([]),i4=(0,eb.Cell)([]),i9=(0,eb.Cell)([]),i5=(0,eb.Cell)([]),i6=(0,eb.Cell)({}),i7=(0,eb.Cell)(!1),i8=(0,eb.Cell)([]),oe=(0,eb.Cell)([]),ot=(0,eb.Cell)([]),on=(0,eb.Cell)(null),or=(0,eb.Cell)(null),oi=(0,eb.Cell)(null),oo=ob(i2),ol=ob(i1),oa=ob(i3),os=ob(i4),ou=ob(i9),oc=ob(i5),od=(0,eb.Cell)(!1),of=(0,eb.Signal)(e=>{e.sub(e.pipe(of,(0,eb.withLatestFrom)(iX,i$,iK),(0,eb.filter)(([e,t])=>e.trim()!==t.trim())),([t,,r,i])=>{e.pub(od,!0),null==r||r.update(()=>{(0,n.$getRoot)().clear(),oS(e,(0,n.$getRoot)(),t),i?r.focus():(0,n.$setSelection)(null)},{onUpdate:()=>{e.pub(od,!1)}})})}),oh=(0,eb.Signal)(e=>{e.sub(e.pipe(oh,(0,eb.withLatestFrom)(iF,iK)),([t,r,i])=>{null==r||r.update(()=>{let o=(0,n.$getSelection)();if(null!==o){let r={children:[],append(e){this.children.push(e)},getType:()=>o.getNodes()[0].getType()};oS(e,r,t),(0,n.$insertNodes)(r.children)}i?r.focus():(0,n.$setSelection)(null)})})});function op(){return(0,eb.scan)((e,[t,n])=>(e.forEach(e=>{if(!e)throw Error("You have a subscription that does not return a teardown");e()}),n?t.map(e=>e(n)):[]),[])}let og=(0,eb.Cell)(null),om=(0,eb.Cell)([],e=>{e.pipe(e.combine(om,iF),op())}),ox=(0,eb.Cell)([],e=>{e.pipe(e.combine(ox,i$),op())}),oy=(0,eb.Cell)(null,it.noop,(e,t)=>!!(e&&t&&e.editorRef===t.editorRef)),ov=(0,eb.Signal)(),o_=(0,eb.Cell)(e=>{throw Error(`No icon component for ${e}`)});function ob(e,t){return(0,eb.Signal)((n,r)=>{n.changeWith(e,r,(e,t)=>{Array.isArray(t)||(t=[t]);let n=e;for(let r of t)e.includes(r)||(n=[...n,r]);return n}),null==t||t(n,r)})}function oC(e){let t=(0,n.$getSelection)();(0,n.$isRangeSelection)(t)&&e.pubIn({[iq]:t,[iH]:t.format})}let oT=ob(ox,(e,t)=>{e.pub(t,[t=>t.registerCommand(n.SELECTION_CHANGE_COMMAND,(t,r)=>(e.pubIn({[iF]:r,[iK]:!0}),null===r._parentEditor&&r.getEditorState().read(()=>{e.pub(oy,{rootNode:(0,n.$getRoot)(),editorType:"lexical",editorRef:r})}),oC(e),!1),n.COMMAND_PRIORITY_CRITICAL),t=>t.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{let l;null!==e.getValue(iU)||(0!==r.size||0!==i.size)&&(o.read(()=>{(0,n.$getRoot)().getLastChild()instanceof n.DecoratorNode&&t.update(()=>{(0,n.$getRoot)().append((0,n.$createParagraphNode)())},{discrete:!0}),l=ri({root:(0,n.$getRoot)(),visitors:e.getValue(i9),jsxComponentDescriptors:e.getValue(i8),toMarkdownExtensions:e.getValue(i5),toMarkdownOptions:e.getValue(i6),jsxIsAvailable:e.getValue(i7)})}),e.pub(iX,l.trim()),e.pub(iQ,!1))}),t=>t.registerCommand(n.FOCUS_COMMAND,()=>(e.pub(iK,!0),!1),n.COMMAND_PRIORITY_CRITICAL)])}),oE=ob(om,(e,t)=>{e.pub(t,[t=>t.registerUpdateListener(({editorState:t})=>{t.read(()=>{oC(e)})}),t=>t.registerCommand(n.BLUR_COMMAND,t=>{var n;let r=e.getValue(i$);return r&&((null==(n=r.getRootElement())?void 0:n.contains(t.relatedTarget))||e.pubIn({[iK]:!1,[ov]:t})),!1},n.COMMAND_PRIORITY_CRITICAL)])});function oS(e,t,n){try{r8({root:t,visitors:e.getValue(i1),mdastExtensions:e.getValue(i4),markdown:n,syntaxExtensions:e.getValue(i3),jsxComponentDescriptors:e.getValue(i8),directiveDescriptors:e.getValue(oe),codeBlockEditorDescriptors:e.getValue(ot)}),e.pub(iU,null)}catch(t){if(t instanceof r6||t instanceof r7)e.pubIn({[iX]:n,[iU]:{error:t.message,source:n}});else throw t}}let ok=(0,eb.Cell)([]),ow=ob(ok),oN=(0,eb.Cell)([]),oI=ob(oN),oA=(0,eb.Cell)([]),oM=ob(oA),oO=(0,eb.Cell)([]),oD=ob(oO),oR=(0,eb.Cell)([]),oP=ob(oR),oL=(0,eb.Cell)(j()),o$=(0,eb.Cell)(""),oF=(0,eb.Signal)(),oB=(0,eb.Signal)(e=>{e.sub(e.pipe(oB,(0,eb.withLatestFrom)(iF)),([e,t])=>{null==t||t.update(()=>{let r=(0,n.$getSelection)();(0,n.$isRangeSelection)(r)&&(g(r,e),setTimeout(()=>{t.focus()}))})})}),oV=(0,eb.Signal)(e=>{e.sub(e.pipe(oV,(0,eb.withLatestFrom)(iF)),([e,t])=>{null==t||t.focus(()=>{t.getEditorState().read(()=>{let r=(0,n.$getSelection)();(0,n.$isRangeSelection)(r)&&(t.update(()=>{let t=e();
5t.isInline()?((0,n.$insertNodes)([t]),(0,n.$isRootOrShadowRoot)(t.getParentOrThrow())&&L(t,n.$createParagraphNode).selectEnd()):P(t),setTimeout(()=>{"select"in t&&"function"==typeof t.select&&t.select()})}),setTimeout(()=>{t.dispatchCommand(iL,void 0)}))})},{defaultSelection:"rootEnd"})})}),oz=(0,eb.Cell)("rich-text",e=>{function t(){return(0,eb.scan)((e,t)=>({current:e.next,next:t}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(oz,t(),(0,eb.withLatestFrom)(oj)),([{current:t},n])=>{("source"===t||"diff"===t)&&e.pub(of,n)}),e.sub(e.pipe(oz,t(),(0,eb.filter)(e=>"rich-text"===e.current),(0,eb.withLatestFrom)(iF)),([,e])=>{null==e||e.dispatchCommand(iL,void 0)})}),oj=(0,eb.Cell)("",e=>{e.link(iX,oj),e.link(oj,iZ)},!0),oW=(0,eb.Cell)([]),oK=ob(oW),oH=(0,eb.Cell)(()=>{throw Error("No translation function provided")}),oU=(0,eb.Cell)(iP),oJ=(0,t.realmPlugin)({init(e,t){let r,i,o,l=(null==t?void 0:t.initialMarkdown)??"";e.register(oT),e.register(oE),e.register(iZ),e.register(oj),e.pubIn({[iG]:(null==t?void 0:t.trim)?l.trim():l,[o_]:null==t?void 0:t.iconComponentFor,[ol]:[iE,iT,iS,iy,...i_],[oo]:[n.ParagraphNode,n.TextNode,ia],[ou]:[ip,ih,ix,id,ic],[iB]:null==t?void 0:t.contentEditableClassName,[iV]:null==t?void 0:t.spellCheck,[i6]:null==t?void 0:t.toMarkdownOptions,[iW]:null==t?void 0:t.autoFocus,[ij]:null==t?void 0:t.placeholder,[iz]:null==t?void 0:t.readOnly,[oH]:null==t?void 0:t.translation,[os]:[{canContainEols:["delete"],enter:{strikethrough:eV},exit:{strikethrough:ez}},eW],[oa]:[(r=void 0,i={name:"strikethrough",tokenize:function(e,t,n){let i=this.previous,o=this.events,l=0;return function(a){return 126===i&&"characterEscape"!==o[o.length-1][1].type?n(a):(e.enter("strikethroughSequenceTemporary"),function o(a){let s=e$(i);if(126===a)return l>1?n(a):(e.consume(a),l++,o);if(l<2&&!r)return n(a);let u=e.exit("strikethroughSequenceTemporary"),c=e$(a);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,t(a)}(a))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&eC(l,l.length,0,eF(a,e.slice(r+1,n),t)),eC(l,l.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eC(e,r-1,n-r+3,l),n=r+l.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==r&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}}),(o={name:"highlight",tokenize:function(e,t,n){let r=this.previous,i=this.events,o=0;return function(l){return(tD(l===tP.equalsTo,!1,!0,"ok",!1,"Expected value to be truthy","expected `=`"),r===tP.equalsTo&&i[i.length-1][1].type!==t$.characterEscape)?n(l):(e.enter(tF),function i(l){let a=e$(r);if(l===tP.equalsTo)return o>1?n(l):(e.consume(l),o++,i);if(o<2)return n(l);let s=e.exit(tF),u=e$(l);return s._open=!u||u===tL.attentionSideAfter&&!!a,s._close=!a||a===tL.attentionSideAfter&&!!u,t(l)}(l))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&e[n][1].type===tF&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&e[r][1].type===tF&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=tB,e[r][1].type=tB;let i={type:"highlight",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"highlightText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&eC(l,l.length,0,eF(a,e.slice(r+1,n),t)),eC(l,l.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eC(e,r-1,n-r+3,l),n=r+l.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===tF&&(e[n][1].type=t$.data);return e}},{text:{[tP.equalsTo]:o},insideSpan:{null:[o]},attentionMarkers:{null:[tP.equalsTo]}})],[oc]:[ta(),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eB}],handlers:{delete:ej}},eK],[oU]:(null==t?void 0:t.lexicalTheme)??iP}),e.singletonSub(iJ,null==t?void 0:t.onError),e.singletonSub(i0,n=>{null==t||t.onChange(n,e.getValue(iQ))}),e.singletonSub(ov,null==t?void 0:t.onBlur),(null==t?void 0:t.suppressHtmlProcessing)||e.pubIn({[os]:[tl(),{canContainEols:["comment"],enter
5:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}],[oa]:[nr(),ni(),iD],[ol]:ib}),(null==t?void 0:t.suppressSharedHistory)||e.pub(ow,iM)},postInit(e,t){let r=(0,n.createEditor)({editable:(null==t?void 0:t.readOnly)!==!0,namespace:(null==t?void 0:t.lexicalEditorNamespace)??"MDXEditor",nodes:[...e.getValue(i2),...(null==t?void 0:t.additionalLexicalNodes)??[]],onError:e=>{throw e},theme:e.getValue(oU)});(null==t?void 0:t.editorState)!==null&&r.update(()=>{let i=(null==t?void 0:t.initialMarkdown.trim())??"";oS(e,(0,n.$getRoot)(),i);let o=null==t?void 0:t.autoFocus;if(o){if(!0===o)return void setTimeout(()=>{r.focus(it.noop,{defaultSelection:"rootStart"})});setTimeout(()=>{r.focus(it.noop,{defaultSelection:o.defaultSelection??"rootStart"})})}}),e.pub(i$,r),e.pub(iF,r)},update(e,t){e.pubIn({[iB]:null==t?void 0:t.contentEditableClassName,[iV]:null==t?void 0:t.spellCheck,[i6]:null==t?void 0:t.toMarkdownOptions,[iW]:null==t?void 0:t.autoFocus,[ij]:null==t?void 0:t.placeholder,[iz]:null==t?void 0:t.readOnly}),e.singletonSub(i0,n=>{null==t||t.onChange(n,e.getValue(iQ))}),e.singletonSub(ov,null==t?void 0:t.onBlur),e.singletonSub(iJ,null==t?void 0:t.onError)}});function oY(){return(0,eb.useCellValue)(oH)}var oq=e.i(391398);function oG(e){return()=>(function(e){if(!function(e,t=!0){if(e)return!1;let r=(0,n.$getRoot)().getTextContent();return t&&(r=r.trim()),""===r}(e,!1))return!1;let t=(0,n.$getRoot)().getChildren(),r=t.length;if(r>1)return!1;for(let e=0;e<r;e++){let r=t[e];if((0,n.$isDecoratorNode)(r))return!1;if((0,n.$isElementNode)(r)){if(!(0,n.$isParagraphNode)(r)||0!==r.__indent)return!1;let t=r.getChildren(),i=t.length;for(let r=0;r<i;r++){let r=t[e];if(!(0,n.$isTextNode)(r))return!1}}}return!0})(e)}e.s(["$canShowPlaceholderCurry",()=>oG],623513);let oX="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?ik.useLayoutEffect:ik.useEffect,oQ=(0,ik.forwardRef)(function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:l,ariaInvalid:a,ariaLabel:s,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:p,id:g,role:m="textbox",spellCheck:x=!0,style:y,tabIndex:v,"data-testid":_,...b},C){let[T,E]=(0,ik.useState)(e.isEditable()),S=(0,ik.useCallback)(t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)},[e]),k=(0,ik.useMemo)(()=>(function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}})(C,S),[S,C]);return oX(()=>(E(e.isEditable()),e.registerEditableListener(e=>{E(e)})),[e]),(0,oq.jsx)("div",{"aria-activedescendant":T?t:void 0,"aria-autocomplete":T?n:"none","aria-controls":T?r:void 0,"aria-describedby":i,...null!=o?{"aria-errormessage":o}:{},"aria-expanded":T&&"combobox"===m?!!l:void 0,...null!=a?{"aria-invalid":a}:{},"aria-label":s,"aria-labelledby":u,"aria-multiline":c,"aria-owns":T?d:void 0,"aria-readonly":!T||void 0,"aria-required":f,autoCapitalize:h,className:p,contentEditable:T,"data-testid":_,id:g,ref:k,role:m,spellCheck:x,style:y,tabIndex:v,...b})});function oZ(e){return e.getEditorState().read(oG(e.isComposing()))}let o0=(0,ik.forwardRef)(function(e,t){let{placeholder:n,...r}=e,[i]=iI();return(0,oq.jsxs)(oq.Fragment,{children:[(0,oq.jsx)(oQ,{editor:i,...r,ref:t}),null!=n&&(0,oq.jsx)(o1,{editor:i,content:n})]})});function o1({content:e,editor:t}){let n=function(e){let[t,n]=(0,ik.useState)(()=>oZ(e));return oX(()=>{function t(){n(oZ(e))}return t(),w(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(t),[r,i]=(0,ik.useState)(t.isEditable());if((0,ik.useLayoutEffect)(()=>(i(t.isEditable()),t.registerEditableListener(e=>{i(e)})),[t]),!n)return null;let o=null;return"function"==typeof e?o=e(r):null!==e&&(o=e),null===o?null:(0,oq.jsx)("div",{"aria-hidden":!0,children:o})}function o2(e,t){return(o2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}e.s(["ContentEditable",()=>o0],908576);var o3={error:null},o4=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state=o3,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o2(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var n=t.prototype;return n.reset=function(){this.setState(o3)},n.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},n.componentDidUpdate=function(e,t){var n,r,i,o,l=this.state.error,a=this.props.resetKeys;null!==l&&null!==t.error&&(void 0===(i=e.resetKeys)&&(i=[]),void 0===(o=a)&&(o=[]),i.length!==o.length||i.some(function(e,t){return!Object.is(e,o[t])}))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,a),this.reset())},n.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,i=t.fallback;if(null!==e){var o={error:e,resetErrorBoundary:this.resetErrorBoundary};if(ik.isValidElement(i))return i;if("function"==typeof n)return n(o);if(r)return ik.createElement(r,o);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(ik.Component);function o9({children:e,onError:t}){return(0,oq.jsx)(o4,{fallback:(0,oq.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}e.s(["LexicalErrorBoundary",()=>o9],133567)},878302,e=>{"use strict";var t=e.i(191788);let n=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],r=n[Math.floor(Math.random()*n.length)],i=(0,t.createContext)({clientID:0,color:r[1],isCollabActive:!1,name:r[0],yjsDocMap:new Map});var o=e.i(881868),l=e.i(343941),a=e.i(391398);function s(e){let t=new Set,{ownNodeConfig:n}=(0,l.getStaticNodeConfig)(e),r=e.transform();if(n){let e=n.$transform;e&&t.add(e)}return r&&t.add(r),t}let u=()=>{};function c({initialEditor:e,children:n,initialNodes:r,initialTheme:c,skipCollabChecks:d,skipEditableListener:f}){let h=(0,t.useRef)(!1),p=(0,t.useContext)(o.LexicalComposerContext);null==p&&function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",9),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #9; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(0);let[g,{getTheme:m}]=p,x=(0,t.useMemo)(()=>{let t=c||m()||void 0,n=(0,o.createLexicalComposerContext)(p,t);void 0!==t&&(e._config.theme=t),e._parentEditor=e._parentEditor||g;let i=e._createEditorArgs,a=i&&i.namespace;if(r)for(let t of(a||(u(),e._config.namespace=g._config.namespace),r)){let n=null,r=null;if("function"!=typeof t){let e=t;t=e.replace,n=e.with,r=e.withKlass||null}let i=(0,l.getRegisteredNode)(e,t.getType());e._nodes.set(t.getType(),{exportDOM:i?i.exportDOM:void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:(0,l.createSharedNodeState)(t),transforms:s(t)})}else if(i&&i.nodes)a||(u(),e._config.namespace=g._config.namespace);else{let t=e._nodes=new Map(g._nodes);for(let[n,r]of(a||(e._config.namespace=g._config.namespace),t))e._nodes.set(n,{exportDOM:r.exportDOM,klass:r.klass,replace:r.replace,replaceWithKlass:r.replaceWithKlass,sharedNodeState:(0,l.createSharedNodeState)(r.klass),transforms:s(r.klass)})}return[e,n]},[]),{isCollabActive:y,yjsDocMap:v}=(0,t.useContext)(i),_=d||h.current||v.has(e.getKey());return(0,t.useEffect)(()=>{_&&(h.current=!0)},[_]),(0,t.useEffect)(()=>
5{if(!f){let t=t=>e.setEditable(t);return t(g.isEditable()),g.registerEditableListener(t)}},[e,g,f]),(0,a.jsx)(o.LexicalComposerContext.Provider,{value:x,children:!y||_?n:null})}e.s(["LexicalNestedComposer",()=>c],878302)},272043,(e,t,n)=>{!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)n.call(e,o)&&e[o]&&(t=i(t,o));return t}(o)))}return e}function i(e,t){return t?e?e+" "+t:e+t:e}if(t.exports)r.default=r,t.exports=r;else if("function"==typeof define&&"object"==typeof define.amd&&define.amd)void 0!==r&&e.v(r);else window.classNames=r}()},783373,995711,e=>{"use strict";var t=e.i(881868),n=e.i(191788);let r="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function i(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var o=e.i(623513),l=e.i(919444),a=e.i(730943),s=e.i(391398),u=e.i(343941),c=e.i(713511);let d="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect;function f(e){return e.getEditorState().read((0,o.$canShowPlaceholderCurry)(e.isComposing()))}function h({contentEditable:e,placeholder:r=null,ErrorBoundary:i}){var o;let[f]=(0,t.useLexicalComposerContext)(),h=function(e,t){let[r,i]=(0,n.useState)(()=>e.getDecorators());return d(()=>e.registerDecoratorListener(e=>{(0,a.flushSync)(()=>{i(e)})}),[e]),(0,n.useEffect)(()=>{i(e.getDecorators())},[e]),(0,n.useMemo)(()=>{let i=[],o=Object.keys(r);for(let l=0;l<o.length;l++){let u=o[l],c=(0,s.jsx)(t,{onError:t=>e._onError(t),children:(0,s.jsx)(n.Suspense,{fallback:null,children:r[u]})}),d=e.getElementByKey(u);null!==d&&i.push((0,a.createPortal)(c,d,u))}return i},[t,r,e])}(f,i);return d(()=>{var e;let t,n;return(0,l.mergeRegister)((0,c.registerRichText)(o),(e=o,t=window.location.origin,n=n=>{if(n.origin!==t)return;let r=e.getRootElement();if(document.activeElement!==r)return;let i=n.data;if("string"==typeof i){let t;try{t=JSON.parse(i)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){let r=t.payload;if(r&&"makeChanges"===r.functionId){let t=r.args;if(t){let[r,i,o,l,a,s]=t;e.update(()=>{let e=(0,u.$getSelection)();if((0,u.$isRangeSelection)(e)){let t=e.anchor,s=t.getNode(),c=0,d=0;if((0,u.$isTextNode)(s)&&r>=0&&i>=0&&(c=r,d=r+i,e.setTextNodeRange(s,c,s,d)),c===d&&""===o||(e.insertRawText(o),s=t.getNode()),(0,u.$isTextNode)(s)){c=l,d=l+a;let t=s.getTextContentSize();c=c>t?t:c,d=d>t?t:d,e.setTextNodeRange(s,c,s,d)}n.stopImmediatePropagation()}})}}}}},window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}))},[o=f]),(0,s.jsxs)(s.Fragment,{children:[e,(0,s.jsx)(p,{content:r}),h]})}function p({content:e}){let[o]=(0,t.useLexicalComposerContext)(),a=function(e){let[t,r]=(0,n.useState)(()=>f(e));return d(()=>{function t(){r(f(e))}return t(),(0,l.mergeRegister)(e.registerUpdateListener(()=>{t()}),e.registerEditableListener(()=>{t()}))},[e]),t}(o),s=function(e){let[i]=(0,t.useLexicalComposerContext)(),o=(0,n.useMemo)(()=>e(i),[i,e]),[l,a]=(0,n.useState)(()=>o.initialValueFn()),s=(0,n.useRef)(l);return r(()=>{let{initialValueFn:e,subscribe:t}=o,n=e();return s.current!==n&&(s.current=n,a(n)),t(e=>{s.current=e,a(e)})},[o,e]),l}(i);return a?"function"==typeof e?e(s):e:null}e.s(["RichTextPlugin",()=>h],783373);let g={editorRoot:"_editorRoot_1e2ox_53",editorWrapper:"_editorWrapper_1e2ox_155",toolbarRoot:"_toolbarRoot_1e2ox_162",readOnlyToolbarRoot:"_readOnlyToolbarRoot_1e2ox_189",toolbarToggleItem:"_toolbarToggleItem_1e2ox_208",toolbarGroupOfGroups:"_toolbarGroupOfGroups_1e2ox_219",toolbarToggleSingleGroup:"_toolbarToggleSingleGroup_1e2ox_224",toolbarButton:"_toolbarButton_1e2ox_239",activeToolbarButton:"_activeToolbarButton_1e2ox_275",toolbarButtonDropdownContainer:"_toolbarButtonDropdownContainer_1e2ox_286",selectContainer:"_selectContainer_1e2ox_288",selectItem:"_selectItem_1e2ox_301",toolbarButtonSelectTrigger:"_toolbarButtonSelectTrigger_1e2ox_307",selectTrigger:"_selectTrigger_1e2ox_308",selectDropdownArrow:"_selectDropdownArrow_1e2ox_374",contentEditable:"_contentEditable_1e2ox_380",codeMirrorWrapper:"_codeMirrorWrapper_1e2ox_392",sandPackWrapper:"_sandPackWrapper_1e2ox_401",codeMirrorToolbar:"_codeMirrorToolbar_1e2ox_409",propertyPanelTitle:"_propertyPanelTitle_1e2ox_431",propertyEditorTable:"_propertyEditorTable_1e2ox_439",iconButton:"_iconButton_1e2ox_457",readOnlyColumnCell:"_readOnlyColumnCell_1e2ox_462",buttonsFooter:"_buttonsFooter_1e2ox_475",propertyEditorInput:"_propertyEditorInput_1e2ox_481",primaryButton:"_primaryButton_1e2ox_507",secondaryButton:"_secondaryButton_1e2ox_508",smallButton:"_smallButton_1e2ox_523",dialogForm:"_dialogForm_1e2ox_535",linkDialogEditForm:"_linkDialogEditForm_1e2ox_541",linkDialogInputContainer:"_linkDialogInputContainer_1e2ox_549",linkDialogInputWrapper:"_linkDialogInputWrapper_1e2ox_555",linkDialogInput:"_linkDialogInput_1e2ox_549",linkDialogAnchor:"_linkDialogAnchor_1e2ox_587",linkDialogPopoverContent:"_linkDialogPopoverContent_1e2ox_601",tableColumnEditorPopoverContent:"_tableColumnEditorPopoverContent_1e2ox_602",dialogContent:"_dialogContent_1e2ox_603",largeDialogContent:"_largeDialogContent_1e2ox_615",dialogTitle:"_dialogTitle_1e2ox_625",dialogCloseButton:"_dialogCloseButton_1e2ox_631",popoverContent:"_popoverContent_1e2ox_638",popoverArrow:"_popoverArrow_1e2ox_650",linkDialogPreviewAnchor:"_linkDialogPreviewAnchor_1e2ox_654",tooltipTrigger:"_tooltipTrigger_1e2ox_677",tooltipContent:"_tooltipContent_1e2ox_681",actionButton:"_actionButton_1e2ox_695",primaryActionButton:"_primaryActionButton_1e2ox_702",tableEditor:"_tableEditor_1e2ox_714",toolCell:"_toolCell_1e2ox_725",tableColumnEditorTrigger:"_tableColumnEditorTrigger_1e2ox_744",addRowButton:"_addRowButton_1e2ox_746",addColumnButton:"_addColumnButton_1e2ox_747",tableColumnEditorToolbar:"_tableColumnEditorToolbar_1e2ox_789",toggleGroupRoot:"_toggleGroupRoot_1e2ox_802",tableToolsColumn:"_tableToolsColumn_1e2ox_820",leftAlignedCell:"_leftAlignedCell_1e2ox_829",rightAlignedCell:"_rightAlignedCell_1e2ox_833",centeredCell:"_centeredCell_1e2ox_837",dialogOverlay:"_dialogOverlay_1e2ox_870",focusedImage:"_focusedImage_1e2ox_916",imageWrapper:"_imageWrapper_1e2ox_920",editImageToolbar:"_editImageToolbar_1e2ox_933",editImageButton:"_editImageButton_1e2ox_937",inline
5Editor:"_inlineEditor_1e2ox_943",blockEditor:"_blockEditor_1e2ox_952",nestedEditor:"_nestedEditor_1e2ox_961",genericComponentName:"_genericComponentName_1e2ox_980",diffSourceToggleWrapper:"_diffSourceToggleWrapper_1e2ox_986",ggDiffSourceToggle:"_ggDiffSourceToggle_1e2ox_994",diffSourceToggle:"_diffSourceToggle_1e2ox_986",selectWithLabel:"_selectWithLabel_1e2ox_1012",toolbarTitleMode:"_toolbarTitleMode_1e2ox_1027",imageControlWrapperResizing:"_imageControlWrapperResizing_1e2ox_1032",imageResizer:"_imageResizer_1e2ox_1036",imageResizerN:"_imageResizerN_1e2ox_1045",imageResizerNe:"_imageResizerNe_1e2ox_1051",imageResizerE:"_imageResizerE_1e2ox_1057",imageResizerSe:"_imageResizerSe_1e2ox_1063",imageResizerS:"_imageResizerS_1e2ox_1063",imageResizerSw:"_imageResizerSw_1e2ox_1075",imageResizerW:"_imageResizerW_1e2ox_1081",imageResizerNw:"_imageResizerNw_1e2ox_1087",imagePlaceholder:"_imagePlaceholder_1e2ox_1093",imageDimensionsContainer:"_imageDimensionsContainer_1e2ox_1101",placeholder:"_placeholder_1e2ox_1106",rootContentEditableWrapper:"_rootContentEditableWrapper_1e2ox_1119",downshiftInputWrapper:"_downshiftInputWrapper_1e2ox_1129",downshiftInput:"_downshiftInput_1e2ox_1129",downshiftAutocompleteContainer:"_downshiftAutocompleteContainer_1e2ox_1160",textInput:"_textInput_1e2ox_1206",multiFieldForm:"_multiFieldForm_1e2ox_1214",formField:"_formField_1e2ox_1220",markdownParseError:"_markdownParseError_1e2ox_1231",popupContainer:"_popupContainer_1e2ox_1240",inputSizer:"_inputSizer_1e2ox_1245"};e.s(["default",()=>g],995711)},892271,e=>{"use strict";e.s(["isPartOftheEditorUI",()=>function e(t,n){return null!==t&&t!==n&&(void 0!==t.dataset.editorDialog||void 0!==t.dataset.toolbarItem||!!t.dataset.editorDropdown||e(t.parentElement,n))}])},83169,e=>{"use strict";var t=e.i(343941),n=e.i(191788),r=e.i(317649),i=e.i(908576),o=e.i(133567),l=e.i(878302),a=e.i(783373),s=e.i(272043),u=e.i(751291),c=e.i(801773),d=e.i(995711),f=e.i(583838),h=e.i(919444),p=e.i(892271),g=e.i(578467);let m=n.default.createContext(void 0);function x(){let e=n.default.useContext(m);if(!e)throw Error("useNestedEditor must be used within a NestedEditorsProvider");return e}function y(){let{parentEditor:e,mdastNode:n,lexicalNode:i}=x();return function(o){e.update(()=>{(0,t.$addUpdateTag)("history-push");let e=(0,t.$getNodeByKey)(i.getKey());e&&e.setMdastNode({...n,...o})},{discrete:!0}),e.dispatchCommand(r.NESTED_EDITOR_UPDATED_COMMAND,void 0)}}function v(){let{parentEditor:e,lexicalNode:n}=x();return()=>{e.update(()=>{let e=(0,t.$getNodeByKey)(n.getKey());e.selectNext(),e.remove()})}}let _=function(e){let{getContent:m,getUpdatedMdastNode:_,contentEditableProps:b,block:C=!1}=e,{mdastNode:T,lexicalNode:E,focusEmitter:S}=x(),k=y(),w=v(),N=m(T),I=(0,g.useRealm)(),[A,M,O,D,R,P,L,$,F,B]=(0,g.useCellValues)(r.rootEditor$,r.importVisitors$,r.exportVisitors$,r.usedLexicalNodes$,r.jsxComponentDescriptors$,r.directiveDescriptors$,r.codeBlockEditorDescriptors$,r.jsxIsAvailable$,r.nestedEditorChildren$,r.lexicalTheme$),V=(0,g.usePublisher)(r.editorInFocus$),[z]=n.default.useState(()=>(0,t.createEditor)({nodes:D,theme:I.getValue(r.lexicalTheme$),namespace:"NestedEditor"}));return n.default.useEffect(()=>{S.subscribe(()=>{z.focus()})},[z,S]),n.default.useEffect(()=>{z.update(()=>{(0,t.$getRoot)().clear();let e=N;C?0===e.length&&(e=[{type:"paragraph",children:[]}]):e=[{type:"paragraph",children:N}],(0,c.importMdastTreeToLexical)({root:(0,t.$getRoot)(),mdastRoot:{type:"root",children:e},visitors:M,directiveDescriptors:P,codeBlockEditorDescriptors:L,jsxComponentDescriptors:R})})},[z,C,M]),n.default.useEffect(()=>{function e(){z.getEditorState().read(()=>{let e=(0,u.exportLexicalTreeToMdast)({root:(0,t.$getRoot)(),visitors:O,jsxComponentDescriptors:R,jsxIsAvailable:$,addImportStatements:!1}),n=C?e.children:e.children[0].children;k(_(structuredClone(T),n))})}return(0,h.mergeRegister)(z.registerCommand(t.FOCUS_COMMAND,()=>(V({editorType:"lexical",rootNode:E,editorRef:z}),!1),t.COMMAND_PRIORITY_LOW),z.registerCommand(t.BLUR_COMMAND,t=>{let n=t.relatedTarget;return!(0,p.isPartOftheEditorUI)(n,A.getRootElement())&&(e(),V(null),!0)},t.COMMAND_PRIORITY_EDITOR),z.registerCommand(r.NESTED_EDITOR_UPDATED_COMMAND,()=>(e(),!0),t.COMMAND_PRIORITY_EDITOR),z.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(V({editorType:"lexical",rootNode:E,editorRef:z}),!1),t.COMMAND_PRIORITY_HIGH),z.registerCommand(t.KEY_BACKSPACE_COMMAND,(e,t)=>{let n=t.getRootElement();return(null==n?void 0:n.innerText)==="\n"&&(w(),!0)},t.COMMAND_PRIORITY_CRITICAL))},[C,z,O,_,R,$,E,T,w,V,k,A]),n.default.createElement(l.LexicalNestedComposer,{initialEditor:z,initialTheme:
5B},n.default.createElement(a.RichTextPlugin,{contentEditable:n.default.createElement(i.ContentEditable,{...b,className:(0,s.default)(d.default.nestedEditor,null==b?void 0:b.className)}),placeholder:null,ErrorBoundary:o.LexicalErrorBoundary}),n.default.createElement(f.SharedHistoryPlugin,null),F.map((e,t)=>n.default.createElement(e,{key:t})))};e.s(["NestedEditorsContext",()=>m,"NestedLexicalEditor",()=>_,"useLexicalNodeRemove",()=>v,"useMdastNodeUpdater",()=>y,"useNestedEditorContext",()=>x])},769303,e=>{"use strict";var t=e.i(191788),n=e.i(83169);let r=["note","tip","danger","info","caution"],i={name:"admonition",attributes:[],hasChildren:!0,testNode:e=>r.includes(e.name),Editor({mdastNode:e}){var r;let{config:{theme:i}}=(0,n.useNestedEditorContext)();return t.default.createElement("div",{className:null==(r=i.admonition)?void 0:r[e.name]},t.default.createElement(n.NestedLexicalEditor,{block:!0,getContent:e=>e.children,getUpdatedMdastNode:(e,t)=>({...e,children:t})}))}};e.s(["ADMONITION_TYPES",()=>r,"AdmonitionDirectiveDescriptor",()=>i])},811122,39532,e=>{"use strict";var t=e.i(669462),n=e.i(305400),r=e.i(832519),i=e.i(924814),o=e.i(931188);let l={}.hasOwnProperty,a={},s=/^[^\t\n\r "#'.<=>`}]+$/,u=/^[^\t\n\r "'<=>`}]+$/;function c(){return{canContainEols:["textDirective"],enter:{directiveContainer:f,directiveContainerAttributes:v,directiveContainerLabel:x,directiveLeaf:h,directiveLeafAttributes:v,directiveText:p,directiveTextAttributes:v},exit:{directiveContainer:S,directiveContainerAttributeClassValue:b,directiveContainerAttributeIdValue:_,directiveContainerAttributeName:T,directiveContainerAttributeValue:C,directiveContainerAttributes:E,directiveContainerLabel:y,directiveContainerName:m,directiveLeaf:S,directiveLeafAttributeClassValue:b,directiveLeafAttributeIdValue:_,directiveLeafAttributeName:T,directiveLeafAttributeValue:C,directiveLeafAttributes:E,directiveLeafName:m,directiveText:S,directiveTextAttributeClassValue:b,directiveTextAttributeIdValue:_,directiveTextAttributeName:T,directiveTextAttributeValue:C,directiveTextAttributes:E,directiveTextName:m}}}function d(e){let n=e||a;if('"'!==n.quote&&"'"!==n.quote&&null!==n.quote&&void 0!==n.quote)throw Error("Invalid quote `"+n.quote+"`, expected `'` or `\"`");return r.peek=k,{handlers:{containerDirective:r,leafDirective:r,textDirective:r},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function r(e,t,r,i){var a;let u,d,f=r.createTracker(i),h=(u=0,"containerDirective"===(a=e).type?((0,o.visitParents)(a,function(e,t){if("containerDirective"===e.type){let e=t.length,n=0;for(;e--;)"containerDirective"===t[e].type&&n++;n>u&&(u=n)}}),u+=3):u="leafDirective"===a.type?2:1,":".repeat(u)),p=r.enter(e.type),g=f.move(h+(e.name||""));if("containerDirective"===e.type){let t=(e.children||[])[0];d=w(t)?t:void 0}else d=e;if(d&&d.children&&d.children.length>0){let t=r.enter("label"),n=`${e.type}Label`,i=r.enter(n);g+=f.move("["),g+=f.move(r.containerPhrasing(d,{...f.current(),before:g,after:"]"})),g+=f.move("]"),i(),t()}if(g+=f.move(function(e,t){let r,i,o,a,u=e.attributes||{},d=[];for(a in u)if(l.call(u,a)&&void 0!==u[a]&&null!==u[a]){let l=String(u[a]);if("id"===a)o=!1!==n.preferShortcut&&s.test(l)?"#"+l:c("id",l,e,t);else if("class"===a){let o=l.split(/[\t\n\r ]+/g),a=[],u=[],d=-1;for(;++d<o.length;)(!1!==n.preferShortcut&&s.test(o[d])?u:a).push(o[d]);r=a.length>0?c("class",a.join(" "),e,t):"",i=u.length>0?"."+u.join("."):""}else d.push(c(a,l,e,t))}return r&&d.unshift(r),i&&d.unshift(i),o&&d.unshift(o),d.length>0?"{"+d.join(" ")+"}":""}(e,r)),"containerDirective"===e.type){let t=(e.children||[])[0],n=e;w(t)&&(n=Object.assign({},e,{children:e.children.slice(1)})),n&&n.children&&n.children.length>0&&(g+=f.move("\n"),g+=f.move(r.containerFlow(n,f.current()))),g+=f.move("\n"+h)}return p(),g}function c(e,r,o,l){if(!1!==n.collapseEmptyAttributes&&!r)return e;if(n.preferUnquoted&&u.test(r))return e+"="+r;let a=n.quote||l.options.quote||'"',s='"'===a?"'":'"',c=n.quoteSmart&&(0,t.ccount)(r,a)>(0,t.ccount)(r,s)?s:a,d="textDirective"===o.type?[c]:[c,"\n","\r"];return e+"="+c+(0,i.stringifyEntitiesLight)(r,{subset:d})+c}}function f(e){g.call(this,"containerDirective",e)}function h(e){g.call(this,"leafDirective",e)}function p(e){g.call(this,"textDirective",e)}function g(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function m(e){let t=this.stack[this.stack.length-1];(0,n.ok)("containerDirective"===t.type||"leafDirective"===t.type||"textDirective"===t.type),t.name=this.sliceSerialize(e)}function x(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function y(e){this.exit(e)}function v(){this.data.directiveAttributes=[],this.buffer()}function _(e){let t=this.data.directiveAttributes;(0,n.ok)(t,"expected `directiveAttributes`"),t.push(["id",(0,r.parseEntities)(this.sliceSerialize(e),{attribute:!0})])}function b(e){let t=this.data.directiveAttributes;(0,n.ok)(t,"expected `directiveAttributes`"),t.push(["class",(0,r.parseEntities)(this.sliceSerialize(e),{attribute:!0})])}function C(e){let t=this.data.directiveAttributes;(0,n.ok)(t,"expected `directiveAttributes`"),t[t.length-1][1]=(0,r.parseEntities)(this.sliceSerialize(e),{attribute:!0})}function T(e){let t=this.data.directiveAttributes;(0,n.ok)(t,"expected `directiveAttributes`"),t.push([this.sliceSerialize(e),""])}function E(){let e=this.data.directiveAttributes;(0,n.ok)(e,"expected `directiveAttributes`");let t={},r=-1;for(;++r<e.length;){let n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.data.directiveAttributes=void 0,this.resume();let i=this.stack[this.stack.length-1];(0,n.ok)("containerDirective"===i.type||"leafDirective"===i.type||"textDirective"===i.type),i.attributes=t}function S(e){this.exit(e)}function k(){return":"}function w(e){return!!(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}e.s(["directiveFromMarkdown",()=>c,"directiveToMarkdown",()=>d],811122);var N=e.i(526912),I=e.i(733473),A=e.i(808386);function M(e,t,n,r,i,o,l,a,s,u,c,d,f,h,p){let g,m;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),x};function x(t){return 35===t?(g=l,y(t)):46===t?(g=a,y(t)):58===t||95===t||(0,I.asciiAlpha)(t)?(e.enter(o),e.enter(s),e.consume(t),b):p&&(0,I.markdownSpace)(t)?(0,N.factorySpace)(e,x,"whitespace")(t):!p&&(0,I.markdownLineEndingOrSpace)(t)?(0,A.factoryWhitespace)(e,x)(t):O(t)}function y(t){let n=g+"Marker";return e.enter(o),e.enter(g),e.enter(n),e.consume(t),e.exit(n),v}function v(t){if(null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||(0,I.markdownLineEndingOrSpace)(t))return n(t);let r=g+"Value";return e.enter(r),e.consume(t),_}function _(t){if(null===t||34===t||39===t||60===t||61===t||62===t||96===t)return n(t);if(35===t||46===t||125===t||(0,I.markdownLineEndingOrSpace)(t)){let n=g+"Value";return e.exit(n),e.exit(g),e.exit(o),x(t)}return e.consume(t),_}function b(t){return 45===t||46===t||58===t||95===t||(0,I.asciiAlphanumeric)(t)?(e.consume(t),b):(e.exit(s),p&&(0,I.markdownSpace)(t))?(0,N.factorySpace)(e,C,"whitespace")(t):!p&&(0,I.markdownLineEndingOrSpace)(t)?(0,A.factoryWhitespace)(e,C)(t):C(t)}function C(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),T):(e.exit(o),x(t))}function T(t){return null===t||60===t||61===t||62===t||96===t||125===t||p&&(0,I.markdownLineEnding)(t)?n(t):34===t||39===t?(e.enter(c),e.enter(f),e.consume(t),e.exit(f),m=t,S):p&&(0,I.markdownSpace)(t)?(0,N.factorySpace)(e,T,"whitespace")(t):!p&&(0,I.markdownLineEndingOrSpace)(t)?(0,A.factoryWhitespace)(e,T)(t):(e.enter(d),e.enter(h),e.consume(t),m=void 0,E)}function E(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?n(t):125===t||(0,I.markdownLineEndingOrSpace)(t)?(e.exit(h),e.exit(d),e.exit(o),x(t)):(e.consume(t),E)}function S(t){return t===m?(e.enter(f),e.consume(t),e.exit(f),e.exit(c),e.exit(o),M):(e.enter(d),k(t))}function k(t){return t===m?(e.exit(d),S(t)):null===t?n(t):(0,I.markdownLineEnding)(t)?p?n(t):(0,A.factoryWhitespace)(e,k)(t):(e.enter(h),e.consume(t),w)}function w(t){return t===m||null===t||(0,I.markdownLineEnding)(t)?(e.exit(h),k(t)):(e.consume(t),w)}function M(e){return 125===e||(0,I.markdownLineEndingOrSpace)(e)?x(e):O(e)}function O(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(r),t):n(o)}}function O(e,t,n,r,i,o,l){let a,s=0,u=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),c};function c(n){return 93===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),d(n))}function d(t){if(93===t&&!u)return p(t);let n=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=n),a=n,f(t)}function f(t){return null===t||s>999||91===t&&++u>32?n(t):93!==t||u--?(0,I.markdownLineEnding)(t)?l?n(t):(e.consume(t),e.exit("chunkText"),d):(e.consume(t),92===t?h:f):(e.exit("chunkText"),p(t))}function h(t){return 91===t||92===t||93===t?(e.consume(t),s++,f):f(t)}function p(n){return e.exit(o),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function D(e,t,n,r){let i=this;return function(t){return(0,I.asciiAlpha)(t)?(e.enter(r),e.consume(t),o):n(t)};function o(l){return 45===l||95===l||(0,I.asciiAlphanumeric)(l)?(e.consume(l),o):(e.exit(r),45===i.previous||95===i.previous?n(l):t(l))}}let R={tokenize:function(e,t,n){let r,i=this,o=i.events[i.events.length-1],l=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),function t(r){return 58===r?(e.consume(r),a++,t):a<3?n(r):(e.exit("directiveContainerSequence"),D.call(i,e,s,n,"directiveContainerName")(r))}(t)};function s(t){return 91===t?e.attempt(P,u,u)(t):u(t)}function u(t){return 123===t?e.attempt(L,c,c)(t):c(t)}function c(t){return(0,N.factorySpace)(e,d,"whitespace")(t)}function d(r){return(e.exit("directiveContainerFence"),null===r)?_(r):(0,I.markdownLineEnding)(r)?i.interrupt?t(r):e.attempt($,f,_)(r):n(r)}function f(t){return null===t?_(t):(0,I.markdownLineEnding)(t)?e.check($,m,_)(t):(e.enter("directiveContainerContent"),h(t))}function h(t){return e.attempt({tokenize:b,partial:!0},v,l?(0,N.factorySpace)(e,p,"linePrefix",l+1):p)(t)}function p(t){return null===t?v(t):(0,I.markdownLineEnding)(t)?e.check($,g,v)(t):g(t)}function g(t){let n=e.enter("chunkDocument",{contentType:"document",previous:r});return r&&(r.next=n),r=n,function t(n){if(null===n){let t=e.exit("chunkDocument");return i.parser.lazy[t.start.line]=!1,v(n)}return(0,I.markdownLineEnding)(n)?e.check($,x,y)(n):(e.consume(n),t)}(t)}function m(t){return e.enter("directiveContainerContent"),h(t)}function x(t){e.consume(t);let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,h}function y(t){let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,v(t)}function v(t){return e.exit("directiveContainerContent"),_(t)}function _(n){return e.exit("directiveContainer"),t(n)}function b(e,t,n){let r=0;return(0,N.factorySpace)(e,function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),function t(i){return 58===i?(e.consume(i),r++,t):r<a?n(i):(e.exit("directiveContainerSequence"),(0,N.factorySpace)(e,o,"whitespace")(i))}(t)},"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(r){return null===r||(0,I.markdownLineEnding)(r)?(e.exit("directiveContainerFence"),t(r)):n(r)}}},concrete:!0},P={tokenize:function(e,t,n){return O(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},L={tokenize:function(e,t,n){return M(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},$={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},F={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),D.call(r,e,o,n,"directiveLeafName")):n(t)}function o(t){return 91===t?e.attempt(B,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(V,a,a)(t):a(t)}function a(t){return(0,N.factorySpace)(e,s,"whitespace")(t)}function s(r){return null===r||(0,I.markdownLineEnding)(r)?(e.exit("directiveLeaf"),t(r)):n(r)}}},B={tokenize:function(e,t,n){return O(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},V={tokenize:function(e,t,n){return M(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0},z={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),D.call(r,e,i,n,"directiveTextName")};function i(t){return 58===t?n(t):91===t?e.attempt(j,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(W,l,l)(t):l(t)}function l(n){return e.exit("directiveText"),t(n)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},j={tokenize:function(e,t,n){return O(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},W={tokenize:function(e,t,n){return M(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};function K(){return{text:{58:z},flow:{58:[R,F]}}}e.s(["directive",()=>K],39532)},34399,e=>{"use strict";var t=e.i(541504);function n(){let e=t.noop;return{publish:()=>{e()},subscribe:t=>{e=t}}}e.s(["voidEmitter",()=>n])},155103,562564,e=>{"use strict";var t=e.i(125617),n=e.i(317649),r=e.i(578467),i=e.i(811122),o=e.i(39532),l=e.i(191788),a=e.i(343941),s=e.i(83169),u=e.i(34399),c=Object.defineProperty,d=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?c(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};class f extends a.DecoratorNode{constructor(e,t){super(t),d(this,"__mdastNode"),d(this,"__focusEmitter",(0,u.voidEmitter)()),d(this,"select",()=>{this.__focusEmitter.publish()}),this.__mdastNode=e}static getType(){return"directive"}static clone(e){return new f(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return p(e.mdastNode)}getMdastNode(){return this.__mdastNode}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"directive",version:1}}createDOM(){return document.createElement("textDirective"===this.__mdastNode.type?"span":"div")}updateDOM(){return!1}setMdastNode(e){this.getWritable().__mdastNode=e}decorate(e,t){return l.default.createElement(h,{lexicalNode:this,mdastNode:this.getMdastNode(),parentEditor:e,config:t,focusEmitter:this.__focusEmitter})}isInline(){return"textDirective"===this.__mdastNode.type}isKeyboardSelectable(){return!0}}let h=e=>{let{mdastNode:t}=e,[i]=(0,r.useCellValues)(n.directiveDescriptors$),o=i.find(e=>e.testNode(t));if(!o)throw Error(`No descriptor found for directive ${t.name}`);let a=o.Editor;return l.default.createElement(s.NestedEditorsContext.Provider,{value:e},l.default.createElement(a,{descriptor:o,mdastNode:t,lexicalNode:e.lexicalNode,parentEditor:e.parentEditor}))};function p(e,t){return new f(e,t)}function g(e){return e instanceof f}e.s(["$createDirectiveNode",()=>p,"$isDirecti
5veNode",()=>g,"DirectiveNode",()=>f],562564);let m={testLexicalNode:g,visitLexicalNode({actions:e,mdastParent:t,lexicalNode:n}){e.appendToParent(t,n.getMdastNode())}},x=["leafDirective","containerDirective","textDirective"],y=(0,r.Signal)(e=>{e.link(e.pipe(y,(0,r.map)(e=>()=>p({children:[],...e}))),n.insertDecoratorNode$)}),v=(0,t.realmPlugin)({update:(e,t)=>{e.pub(n.directiveDescriptors$,(null==t?void 0:t.directiveDescriptors)??[])},init:(e,t)=>{let r;e.pubIn({[n.directiveDescriptors$]:(null==t?void 0:t.directiveDescriptors)??[],[n.addMdastExtension$]:(0,i.directiveFromMarkdown)(),[n.addSyntaxExtension$]:(0,o.directive)(),[n.addImportVisitor$]:(r=null==t?void 0:t.escapeUnknownTextDirectives,{testNode:(e,{directiveDescriptors:t})=>{if(x.includes(e.type)){let n=t.find(t=>t.testNode(e));return!!r&&!n&&"textDirective"===e.type||void 0!==n}return!1},visitNode({lexicalParent:e,mdastNode:t,descriptors:n}){!r||n.directiveDescriptors.some(e=>e.testNode(t))?e.append(p(t)):e.append((0,a.$createTextNode)(`:${t.name}`))}}),[n.addLexicalNode$]:f,[n.addExportVisitor$]:m,[n.addToMarkdownExtension$]:(0,i.directiveToMarkdown)()})}});e.s(["directivesPlugin",()=>v,"insertDirective$",()=>y],155103)},114145,582645,e=>{"use strict";let t;var n,r=e.i(713511),i=e.i(578467),o=e.i(343941),l=e.i(125617);let a=void 0!==window.document.createElement,s=a&&((t=null==(n=navigator.userAgentData)?void 0:n.platform)?/mac/i.test(t):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent));function u(e,t){return s?e:t}e.s(["CAN_USE_DOM",()=>a,"IS_APPLE",()=>s,"controlOrMeta",()=>u],582645);var c=e.i(317649);let d={testLexicalNode:r.$isHeadingNode,visitLexicalNode:({lexicalNode:e,actions:t})=>{let n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},f={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto((0,r.$createHeadingNode)(`h${e.depth}`))}},h=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],p=[1,2,3,4,5,6],g={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},m=(0,i.Cell)(p,e=>{e.pub(c.createRootEditorSubscription$,t=>t.registerCommand(o.KEY_DOWN_COMMAND,n=>{var i,l;let{code:a,ctrlKey:u,metaKey:d,altKey:f}=n;return!!(h.includes(a)&&(i=d,l=u,s?i:l))&&!!f&&(n.preventDefault(),t.update(()=>{if("Digit0"===a)e.pub(c.convertSelectionToNode$,()=>(0,o.$createParagraphNode)());else{let t=e.getValue(m),n=g[a];t.includes(n)&&e.pub(c.convertSelectionToNode$,()=>(0,r.$createHeadingNode)(`h${n}`))}}),!0)},o.COMMAND_PRIORITY_LOW))}),x=(0,l.realmPlugin)({init(e){e.pubIn({[c.addActivePlugin$]:"headings",[c.addImportVisitor$]:f,[c.addLexicalNode$]:r.HeadingNode,[c.addExportVisitor$]:d})},update(e,t){e.pub(m,(null==t?void 0:t.allowedHeadingLevels)??p)}});e.s(["ALL_HEADING_LEVELS",()=>p,"allowedHeadingLevels$",()=>m,"headingsPlugin",()=>x],114145)},717417,479771,e=>{"use strict";var t=e.i(191788),n=e.i(915829),r=e.i(995711);let i=()=>t.default.createElement("div",{className:r.default.imagePlaceholder},t.default.createElement(n.ImageIcon,null));e.s(["ImagePlaceholder",()=>i],717417),e.s(["EditImageToolbar",()=>d],479771);var o=e.i(881868),l=e.i(578467),a=e.i(272043),s=e.i(343941),u=e.i(678779),c=e.i(317649);function d(e){let{nodeKey:n,imageSource:i,initialImagePath:d,title:f,alt:h,width:p,height:g}=e,[m,x,y]=(0,l.useCellValues)(u.disableImageSettingsButton$,c.iconComponentFor$,c.readOnly$),[v]=(0,o.useLexicalComposerContext)(),_=(0,l.usePublisher)(u.openEditImageDialog$),b=(0,c.useTranslation)();return t.default.createElement("div",{className:r.default.editImageToolbar},t.default.createElement("button",{className:r.default.iconButton,type:"button",title:b("imageEditor.deleteImage","Delete image"),disabled:y,onClick:e=>{e.preventDefault(),v.update(()=>{var e;null==(e=(0,s.$getNodeByKey)(n))||e.remove()})}},x("delete_small")),!m&&t.default.createElement("button",{type:"button",className:(0,a.default)(r.default.iconButton,r.default.editImageButton),title:b("imageEditor.editImage","Edit image"),disabled:y,onClick:()=>{_({nodeKey:n,initialValues:{src:d??i,title:f,altText:h,width:(0,u.parseImageDimension)(p),height:(0,u.parseImageDimension)(g)}})}},x("settings")))}},558021,e=>{"use strict";var t=e.i(191788),n=e=>e instanceof Date,r=e=>null==e,i=e=>!r(e)&&!Array.isArray(e)&&"object"==typeof e&&!n(e),o=e=>i(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,l=(e,t)=>
5e.has(t.substring(0,t.search(/\.\d+(\.|$)/))||t),a="u">typeof window&&void 0!==window.HTMLElement&&"u">typeof document;function s(e){let t;if(e instanceof Date)return new Date(e);let n="u">typeof FileList&&e instanceof FileList;if(a&&(e instanceof Blob||n))return e;let r=Array.isArray(e);if(!r&&!(i(e)&&i(t=e.constructor&&e.constructor.prototype)&&t.hasOwnProperty("isPrototypeOf")))return e;let o=r?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=s(e[t]));return o}var u=e=>void 0===e,c=e=>Array.isArray(e)?e.filter(Boolean):[],d=e=>c(e.replace(/["|']|\]/g,"").split(/\.|\[/)),f=(e,t,n)=>{if(!t||!i(e))return n;let o=(/^\w*$/.test(t)?[t]:d(t)).reduce((e,t)=>r(e)?e:e[t],e);return u(o)||o===e?u(e[t])?n:e[t]:o},h=e=>"function"==typeof e,p=(e,t,n)=>{let r=-1,o=/^\w*$/.test(t)?[t]:d(t),l=o.length,a=l-1;for(;++r<l;){let t=o[r],l=n;if(r!==a){let n=e[t];l=i(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=l,e=e[t]}};let g="blur",m="onChange",x="onSubmit",y="maxLength",v="minLength",_="pattern",b="required",C=t.default.createContext(null);C.displayName="HookFormControlContext";var T=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let o in e)Object.defineProperty(i,o,{get:()=>("all"!==t._proxyFormState[o]&&(t._proxyFormState[o]=!r||"all"),n&&(n[o]=!0),e[o])});return i};let E="u">typeof window?t.default.useLayoutEffect:t.default.useEffect;var S=e=>"string"==typeof e,k=(e,t,n,r,i)=>S(e)?(r&&t.watch.add(e),f(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),f(n,e))):(r&&(t.watchAll=!0),n),w=e=>r(e)||"object"!=typeof e;function N(e,t,r=new WeakSet){if(w(e)||w(t))return Object.is(e,t);if(n(e)&&n(t))return Object.is(e.getTime(),t.getTime());let o=Object.keys(e),l=Object.keys(t);if(o.length!==l.length)return!1;if(r.has(e)||r.has(t))return!0;for(let a of(r.add(e),r.add(t),o)){let o=e[a];if(!l.includes(a))return!1;if("ref"!==a){let e=t[a];if(n(o)&&n(e)||i(o)&&i(e)||Array.isArray(o)&&Array.isArray(e)?!N(o,e,r):!Object.is(o,e))return!1}}return!0}let I=e=>e.render(function(e){let n=t.default.useContext(C),{name:r,disabled:i,control:a=n,shouldUnregister:c,defaultValue:d,exact:m=!0}=e,x=l(a._names.array,r),y=t.default.useMemo(()=>f(a._formValues,r,f(a._defaultValues,r,d)),[a,r,d]),v=function(e){let n=t.default.useContext(C),{control:r=n,name:i,defaultValue:o,disabled:l,exact:a,compute:s}=e||{},u=t.default.useRef(o),c=t.default.useRef(s),d=t.default.useRef(void 0),f=t.default.useRef(r),h=t.default.useRef(i);c.current=s;let[p,g]=t.default.useState(()=>{let e=r._getWatch(i,u.current);return c.current?c.current(e):e}),m=t.default.useCallback(e=>{let t=k(i,r._names,e||r._formValues,!1,u.current);return c.current?c.current(t):t},[r._formValues,r._names,i]),x=t.default.useCallback(e=>{if(!l){let t=k(i,r._names,e||r._formValues,!1,u.current);if(c.current){let e=c.current(t);N(e,d.current)||(g(e),d.current=e)}else g(t)}},[r._formValues,r._names,l,i]);E(()=>(f.current===r&&N(h.current,i)||(f.current=r,h.current=i,x()),r._subscribe({name:i,formState:{values:!0},exact:a,callback:e=>{x(e.values)}})),[r,a,i,x]),t.default.useEffect(()=>r._removeUnmounted());let y=f.current!==r,v=h.current,_=t.default.useMemo(()=>{if(l)return null;let e=!y&&!N(v,i);return y||e?m():null},[l,y,i,v,m]);return null!==_?_:p}({control:a,name:r,defaultValue:y,exact:m}),_=function(e){let n=t.default.useContext(C),{control:r=n,disabled:i,name:o,exact:l}=e||{},[a,s]=t.default.useState(r._formState),u=t.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return E(()=>r._subscribe({name:o,formState:u.current,exact:l,callback:e=>{i||s({...r._formState,...e})}}),[o,i,l]),t.default.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),t.default.useMemo(()=>T(a,r,u.current,!1),[a,r])}({control:a,name:r,exact:m}),b=t.default.useRef(e),S=t.default.useRef(void 0),w=t.default.useRef(a.register(r,{...e.rules,value:v,..."boolean"==typeof e.disabled?{disabled:e.disabled}:{}}));b.current=e;let I=t.default.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(_.errors,r)},isDirty:{enumerable:!0,get:()=>!!f(_.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!f(_.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!f(_.validatingFields,r)},error:{enumerable:!0,get:()=>f(_.errors,r)}}),[_,r]),A=t.default.useCallback(e=>w.current.onChange({target:{value:o(e),name:r},type:"change"}),[r]),M=t.default.useCallback(()=>w.current.onBlur({target:{value:f(a._formValues,r),name:r},type:g}),[r,a._formValues]),O=t.default.useCallback(e=>{let t=f(a._fields,r);t&&t._f&&e&&(t._f.ref={focus:()=>h(e.focus)&&e.focus(),select:()=>h(e.select)&&e.select(),setCustomValidity:t=>h(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>h(e.reportValidity)&&e.reportValidity()})},[a._fields,r]),D=t.default.useMemo(()=>({name:r,value:v,..."boolean"==typeof i||_.disabled?{disabled:_.disabled||i}:{},onChange:A,onBlur:M,ref:O}),[r,i,_.disabled,A,M,O,v]);return t.default.useEffect(()=>{let e=a._options.shouldUnregister||c,t=S.current;t&&t!==r&&!x&&a.unregister(t),a.register(r,{...b.current.rules,..."boolean"==typeof b.current.disabled?{disabled:b.current.disabled}:{}});let n=(e,t)=>{let n=f(a._fields,e);n&&n._f&&(n._f.mount=t)};if(n(r,!0),e){let e=s(f(a._options.defaultValues,r,b.current.defaultValue));p(a._defaultValues,r,e),u(f(a._formValues,r))&&p(a._formValues,r,e)}return x||a.register(r),S.current=r,()=>{(x?e&&!a._state.action:e)?a.unregister(r):n(r,!1)}},[r,a,x,c]),t.default.useEffect(()=>{a._setDisabledField({disabled:i,name:r})},[i,r,a]),t.default.useMemo(()=>
5({field:D,formState:_,fieldState:I}),[D,_,I])}(e)),A=t.default.createContext(null);A.displayName="HookFormContext";let M=()=>t.default.useContext(A),O=e=>{let{children:n,watch:r,getValues:i,getFieldState:o,setError:l,clearErrors:a,setValue:s,trigger:u,formState:c,resetField:d,reset:f,handleSubmit:h,unregister:p,control:g,register:m,setFocus:x,subscribe:y}=e;return t.default.createElement(A.Provider,{value:t.default.useMemo(()=>({watch:r,getValues:i,getFieldState:o,setError:l,clearErrors:a,setValue:s,trigger:u,formState:c,resetField:d,reset:f,handleSubmit:h,unregister:p,control:g,register:m,setFocus:x,subscribe:y}),[a,g,c,o,i,h,m,f,d,l,x,s,y,u,p,r])},t.default.createElement(C.Provider,{value:g},n))};var D=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},R=e=>Array.isArray(e)?e:[e],P=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},L=e=>i(e)&&!Object.keys(e).length,$=e=>{if(!a)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},F=e=>$(e)&&e.isConnected;function B(e,t){let n=Array.isArray(t)?t:/^\w*$/.test(t)?[t]:d(t),r=1===n.length?e:function(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=u(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,l=n[o];return r&&delete r[l],0!==o&&(i(r)&&L(r)||Array.isArray(r)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!u(e[t]))return!1;return!0}(r))&&B(e,n.slice(0,-1)),e}function V(e){return Array.isArray(e)||i(e)&&!(e=>{for(let t in e)if(h(e[t]))return!0;return!1})(e)}function z(e,t={}){for(let n in e){let r=e[n];V(r)?(t[n]=Array.isArray(r)?[]:{},z(r,t[n])):u(r)||(t[n]=!0)}return t}function j(e,t,n){for(let i in n||(n=z(t)),e){let o=e[i];if(V(o))u(t)||w(n[i])?n[i]=z(o,Array.isArray(o)?[]:{}):j(o,r(t)?{}:t[i],n[i]);else{let e=t[i];n[i]=!N(o,e)}}return n}let W={value:!1,isValid:!1},K={value:!0,isValid:!0};var H=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!u(e[0].attributes.value)?u(e[0].value)||""===e[0].value?K:{value:e[0].value,isValid:!0}:K:W}return W},U=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>u(e)?e:t?""===e?NaN:e?+e:e:n&&S(e)?new Date(e):r?r(e):e;let J={isValid:!1,value:null};var Y=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,J):J;function q(e){let t=e.ref;return"file"===t.type?t.files:"radio"===t.type?Y(e.refs).value:"select-multiple"===t.type?[...t.selectedOptions].map(({value:e})=>e):"checkbox"===t.type?H(e.refs).value:U(u(t.value)?e.ref.value:t.value,e)}var G=e=>u(e)?e:e instanceof RegExp?e.source:i(e)?e.value instanceof RegExp?e.value.source:e.value:e,X=e=>({isOnSubmit:!e||e===x,isOnBlur:"onBlur"===e,isOnChange:e===m,isOnAll:"all"===e,isOnTouch:"onTouched"===e});let Q="AsyncFunction";var Z=e=>!!e&&!!e.validate&&!!(h(e.validate)&&e.validate.constructor.name===Q||i(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Q)),ee=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let et=(e,t,n,r)=>{for(let o of n||Object.keys(e)){let n=f(e,o);if(n){let{_f:e,...l}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;else if(e.ref&&t(e.ref,e.name)&&!r)return!0;else if(et(l,t))break}else if(i(l)&&et(l,t))break}}};function en(e,t,n){let r=f(e,n);if(r||/^\w*$/.test(n))return{error:r,name:n};let i=n.split(".");for(;i.length;){let r=i.join("."),o=f(t,r),l=f(e,r);if(o&&!Array.isArray(o)&&n!==r)break;if(l&&l.type)return{name:r,error:l};if(l&&l.root&&l.root.type)return{name:`${r}.root`,error:l.root};i.pop()}return{name:n}}var er=(e,t,n)=>{let r=R(f(e,n));return p(r,"root",t[n]),p(e,n,r),e};function ei(e,t,n="validate"){if(S(e)||Array.isArray(e)&&e.every(S)||"boolean"==typeof e&&!e)return{type:n,message:S(e)?e:"",ref:t}}var eo=e=>!i(e)||e instanceof RegExp?{value:e,message:""}:e,el=async(e,t,n,o,l,a)=>{let{ref:s,refs:c,required:d,maxLength:p,minLength:g,min:m,max:x,pattern:C,validate:T,name:E,valueAsNumber:k,mount:w}=e._f,N=f(n,E);if(!w||t.has(E))return{};let I=c?c[0]:s,A=e=>{l&&I.reportValidity&&(I.setCustomValidity("boolean"==typeof e?"":e||""),I.reportValidity())},M={},O="radio"===s.type,R="checkbox"===s.type,P=(k||"file"===s.type)&&u(s.value)&&u(N)||$(s)&&""===s.value||""===N||Array.isArray(N)&&!N.length,F=D.bind(null,E,o,M),B=(e,t,n,r=y,i=v)=>{let o=e?t:n;M[E]={type:e?r:i,message:o,ref:s,...F(e?r:i,o)}};if(a?!Array.isArray(N)||!N.length:d&&(!(O||R)&&(P||r(N))||"boolean"==typeof N&&!N||R&&!H(c).isValid||O&&!Y(c).isValid)){let{value:e,message:t}=S(d)?{value:!!d,message:d}:eo(d);if(e&&(M[E]={type:b,message:t,ref:I,...F(b,t)},!o))return A(t),M}if(!P&&(!r(m)||!r(x))){let e,t,n=eo(x),i=eo(m);if(r(N)||isNaN(N)){let r=s.valueAsDate||new Date(N),o=e=>new Date(new Date().toDateString()+" "+e),l="time"==s.type,a="week"==s.type;S(n.value)&&N&&(e=l?o(N)>o(n.value):a?N>n.value:r>new Date(n.value)),S(i.value)&&N&&(t=l?o(N)<o(i.value):a?N<i.value:r<new Date(i.value))}else{let o=s.valueAsNumber||(N?+N:N);r(n.value)||(e=o>n.value),r(i.value)||(t=o<i.value)}if((e||t)&&(B(!!e,n.message,i.message,"max","min"),!o))return A(M[E].message),M}if((p||g)&&!P&&(S(N)||a&&Array.isArray(N))){let e=eo(p),t=eo(g),n=!r(e.value)&&N.length>+e.value,i=!r(t.value)&&N.length<+t.value;if((n||i)&&(B(n,e.message,t.message),!o))return A(M[E].message),M}if(C&&!P&&S(N)){let{value:e,message:t}=eo(C);if(e instanceof RegExp&&!N.match(e)&&(M[E]={type:_,message:t,ref:s,...F(_,t)},!o))return A(t),M}if(T){if(h(T)){let e=ei(await T(N,n),I);if(e&&(M[E]={...e,...F("validate",e.message)},!o))return A(e.message),M}else if(i(T)){let e={};for(let t in T){if(!L(e)&&!o)break;let r=ei(await T[t](N,n),I,t);r&&(e={...r,...F(t,r.message)},A(r.message),o&&(M[E]=e))}if(!L(e)&&(M[E]={ref:I,...e},!o))return M}}return A(!0),M};let ea={mode:x,reValidateMode:m,shouldFocusError:!0};var es=()=>
5{if("u">typeof crypto&&crypto.randomUUID)return crypto.randomUUID();let e="u"<typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},eu=(e,t,n={})=>n.shouldFocus||u(n.shouldFocus)?n.focusName||`${e}.${u(n.focusIndex)?t:n.focusIndex}.`:"",ec=(e,t)=>[...e,...R(t)],ed=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function ef(e,t,n){return[...e.slice(0,t),...R(n),...e.slice(t)]}var eh=(e,t,n)=>Array.isArray(e)?(u(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],ep=(e,t)=>[...R(t),...R(e)],eg=(e,t)=>u(t)?[]:function(e,t){let n=0,r=[...e];for(let e of t)r.splice(e-n,1),n++;return c(r).length?r:[]}(e,R(t).sort((e,t)=>e-t)),em=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},ex=(e,t,n)=>(e[t]=n,e);function ey(e){let n=t.default.useContext(C),{control:r=n,name:i,keyName:o="id",shouldUnregister:l,rules:a}=e,[u,c]=t.default.useState(r._getFieldArray(i)),d=t.default.useRef(r._getFieldArray(i).map(es)),h=t.default.useRef(!1);r._names.array.add(i),t.default.useMemo(()=>a&&u.length>=0&&r.register(i,a),[r,i,u.length,a]),E(()=>r._subjects.array.subscribe({next:({values:e,name:t})=>{if(t===i||!t){let t=f(e,i);Array.isArray(t)&&(c(t),d.current=t.map(es))}}}).unsubscribe,[r,i]);let g=t.default.useCallback(e=>{h.current=!0,r._setFieldArray(i,e)},[r,i]);return t.default.useEffect(()=>{if(r._state.action=!1,ee(i,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!X(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!X(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([i]).then(e=>{r._updateIsValidating([i]);let t=f(e.errors,i),n=f(r._formState.errors,i);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?p(r._formState.errors,i,t):B(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{let e=f(r._fields,i);e&&e._f&&!(X(r._options.reValidateMode).isOnSubmit&&X(r._options.mode).isOnSubmit)&&el(e,r._names.disabled,r._formValues,"all"===r._options.criteriaMode,r._options.shouldUseNativeValidation,!0).then(e=>!L(e)&&r._subjects.state.next({errors:er(r._formState.errors,e,i)}))}r._subjects.state.next({name:i,values:s(r._formValues)}),r._names.focus&&et(r._fields,(e,t)=>{if(r._names.focus&&t.startsWith(r._names.focus)&&e.focus)return e.focus(),1}),r._names.focus="",r._setValid(),h.current=!1},[u,i,r]),t.default.useEffect(()=>(f(r._formValues,i)||r._setFieldArray(i),()=>{let e;r._options.shouldUnregister||l?r.unregister(i):(e=f(r._fields,i))&&e._f&&(e._f.mount=!1)}),[i,r,o,l]),{swap:t.default.useCallback((e,t)=>{let n=r._getFieldArray(i);em(n,e,t),em(d.current,e,t),g(n),c(n),r._setFieldArray(i,n,em,{argA:e,argB:t},!1)},[g,i,r]),move:t.default.useCallback((e,t)=>{let n=r._getFieldArray(i);eh(n,e,t),eh(d.current,e,t),g(n),c(n),r._setFieldArray(i,n,eh,{argA:e,argB:t},!1)},[g,i,r]),prepend:t.default.useCallback((e,t)=>{let n=R(s(e)),o=ep(r._getFieldArray(i),n);r._names.focus=eu(i,0,t),d.current=ep(d.current,n.map(es)),g(o),c(o),r._setFieldArray(i,o,ep,{argA:ed(e)})},[g,i,r]),append:t.default.useCallback((e,t)=>{let n=R(s(e)),o=ec(r._getFieldArray(i),n);r._names.focus=eu(i,o.length-1,t),d.current=ec(d.current,n.map(es)),g(o),c(o),r._setFieldArray(i,o,ec,{argA:ed(e)})},[g,i,r]),remove:t.default.useCallback(e=>{let t=eg(r._getFieldArray(i),e);d.current=eg(d.current,e),g(t),c(t),Array.isArray(f(r._fields,i))||p(r._fields,i,void 0),r._setFieldArray(i,t,eg,{argA:e})},[g,i,r]),insert:t.default.useCallback((e,t,n)=>{let o=R(s(t)),l=ef(r._getFieldArray(i),e,o);
5r._names.focus=eu(i,e,n),d.current=ef(d.current,e,o.map(es)),g(l),c(l),r._setFieldArray(i,l,ef,{argA:e,argB:ed(t)})},[g,i,r]),update:t.default.useCallback((e,t)=>{let n=s(t),o=ex(r._getFieldArray(i),e,n);d.current=[...o].map((t,n)=>t&&n!==e?d.current[n]:es()),g(o),c([...o]),r._setFieldArray(i,o,ex,{argA:e,argB:n},!0,!1)},[g,i,r]),replace:t.default.useCallback(e=>{let t=R(s(e));d.current=t.map(es),g([...t]),c([...t]),r._setFieldArray(i,[...t],e=>e,{},!0,!1)},[g,i,r]),fields:t.default.useMemo(()=>u.map((e,t)=>({...e,[o]:d.current[t]||es()})),[u,o])}}function ev(e={}){let d=t.default.useRef(void 0),m=t.default.useRef(void 0),[x,y]=t.default.useState({isDirty:!1,isValidating:!1,isLoading:h(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:h(e.defaultValues)?void 0:e.defaultValues});if(!d.current)if(e.formControl)d.current={...e.formControl,formState:x},e.defaultValues&&!h(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:t,...m}=function(e={}){let t,d={...ea,...e},m={submitCount:0,isDirty:!1,isReady:!1,isLoading:h(d.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:d.errors||{},disabled:d.disabled||!1},x={},y=(i(d.defaultValues)||i(d.values))&&s(d.defaultValues||d.values)||{},v=d.shouldUnregister?{}:s(y),_={action:!1,mount:!1,watch:!1,keepIsValid:!1},b={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},C=0,T={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={...T},w={...E},I={array:P(),state:P()},A="all"===d.criteriaMode,M=async e=>{if(!_.keepIsValid&&!d.disabled&&(E.isValid||w.isValid||e)){let e;d.resolver?(e=L((await z()).errors),O()):e=await K(x,!0),e!==m.isValid&&I.state.next({isValid:e})}},O=(e,t)=>{!d.disabled&&(E.isValidating||E.validatingFields||w.isValidating||w.validatingFields)&&((e||Array.from(b.mount)).forEach(e=>{e&&(t?p(m.validatingFields,e,t):B(m.validatingFields,e))}),I.state.next({validatingFields:m.validatingFields,isValidating:!L(m.validatingFields)}))},D=(e,t,n,r)=>{let i=f(x,e);if(i){let o=f(v,e,u(n)?f(y,e):n);u(o)||r&&r.defaultChecked||t?p(v,e,t?o:q(i._f)):Y(e,o),_.mount&&!_.action&&M()}},V=(e,t,n,r,i)=>{let o=!1,l=!1,a={name:e};if(!d.disabled){if(!n||r){(E.isDirty||w.isDirty)&&(l=m.isDirty,m.isDirty=a.isDirty=H(),o=l!==a.isDirty);let n=N(f(y,e),t);l=!!f(m.dirtyFields,e),n?B(m.dirtyFields,e):p(m.dirtyFields,e,!0),a.dirtyFields=m.dirtyFields,o=o||(E.dirtyFields||w.dirtyFields)&&!n!==l}if(n){let t=f(m.touchedFields,e);t||(p(m.touchedFields,e,n),a.touchedFields=m.touchedFields,o=o||(E.touchedFields||w.touchedFields)&&t!==n)}o&&i&&I.state.next(a)}return o?a:{}},z=async e=>(O(e,!0),await d.resolver(v,d.context,((e,t,n,r)=>{let i={};for(let n of e){let e=f(t,n);e&&p(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||b.mount,x,d.criteriaMode,d.shouldUseNativeValidation))),W=async e=>{let{errors:t}=await z(e);if(O(e),e)for(let n of e){let e=f(t,n);e?p(m.errors,n,e):B(m.errors,n)}else m.errors=t;return t},K=async(t,n,r={valid:!0})=>{for(let i in t){let o=t[i];if(o){let{_f:t,...i}=o;if(t){let i=b.array.has(t.name),l=o._f&&Z(o._f);l&&E.validatingFields&&O([t.name],!0);let a=await el(o,b.disabled,v,A,d.shouldUseNativeValidation&&!n,i);if(l&&E.validatingFields&&O([t.name]),a[t.name]&&(r.valid=!1,n||e.shouldUseNativeValidation))break;n||(f(a,t.name)?i?er(m.errors,a,t.name):p(m.errors,t.name,a[t.name]):B(m.errors,t.name))}L(i)||await K(i,n,r)}}return r.valid},H=(e,t)=>!d.disabled&&(e&&t&&p(v,e,t),!N(ec(),y)),J=(e,t,n)=>k(e,b,{..._.mount?v:u(t)?y:S(e)?{[e]:t}:t},n,t),Y=(e,t,n={})=>{let i=f(x,e),o=t;if(i){let n=i._f;n&&(n.disabled||p(v,e,U(t,n)),o=$(n.ref)&&r(t)?"":t,"select-multiple"===n.ref.type?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?"checkbox"===n.ref.type?n.refs.forEac
5h(e=>{e.defaultChecked&&e.disabled||(Array.isArray(o)?e.checked=!!o.find(t=>t===e.value):e.checked=o===e.value||!!o)}):n.refs.forEach(e=>e.checked=e.value===o):"file"===n.ref.type?n.ref.value="":(n.ref.value=o,n.ref.type||I.state.next({name:e,values:s(v)})))}(n.shouldDirty||n.shouldTouch)&&V(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&eu(e)},Q=(e,t,r)=>{for(let o in t){if(!t.hasOwnProperty(o))return;let l=t[o],a=e+"."+o,s=f(x,a);(b.array.has(e)||i(l)||s&&!s._f)&&!n(l)?Q(a,l,r):Y(a,l,r)}},ei=(e,t,n={})=>{let i=f(x,e),o=b.array.has(e),l=s(t);p(v,e,l),o?(I.array.next({name:e,values:s(v)}),(E.isDirty||E.dirtyFields||w.isDirty||w.dirtyFields)&&n.shouldDirty&&I.state.next({name:e,dirtyFields:j(y,v),isDirty:H(e,l)})):!i||i._f||r(l)?Y(e,l,n):Q(e,l,n),ee(e,b)?I.state.next({...m,name:e,values:s(v)}):I.state.next({name:_.mount?e:void 0,values:s(v)})},eo=async e=>{_.mount=!0;let r=e.target,i=r.name,l=!0,a=f(x,i),u=e=>{l=Number.isNaN(e)||n(e)&&isNaN(e.getTime())||N(e,f(v,i,e))},c=X(d.mode),h=X(d.reValidateMode);if(a){var y,T,S,k,D;let n,_,F,j=r.type?q(a._f):o(e),W=e.type===g||"focusout"===e.type,H=!((F=a._f).mount&&(F.required||F.min||F.max||F.maxLength||F.minLength||F.pattern||F.validate))&&!d.resolver&&!f(m.errors,i)&&!a._f.deps||(y=W,T=f(m.touchedFields,i),S=m.isSubmitted,k=h,!(D=c).isOnAll&&(!S&&D.isOnTouch?!(T||y):(S?k.isOnBlur:D.isOnBlur)?!y:(S?!k.isOnChange:!D.isOnChange)||y)),U=ee(i,b,W);p(v,i,j),W?r&&r.readOnly||(a._f.onBlur&&a._f.onBlur(e),t&&t(0)):a._f.onChange&&a._f.onChange(e);let J=V(i,j,W),Y=!L(J)||U;if(W||I.state.next({name:i,type:e.type,values:s(v)}),H)return(E.isValid||w.isValid)&&("onBlur"===d.mode?W&&M():W||M()),Y&&I.state.next({name:i,...U?{}:J});if(!W&&U&&I.state.next({...m}),d.resolver){let{errors:e}=await z([i]);if(O([i]),u(j),l){let t=en(m.errors,x,i),r=en(e,x,t.name||i);n=r.error,i=r.name,_=L(e)}}else O([i],!0),n=(await el(a,b.disabled,v,A,d.shouldUseNativeValidation))[i],O([i]),u(j),l&&(n?_=!1:(E.isValid||w.isValid)&&(_=await K(x,!0)));if(l){a._f.deps&&(!Array.isArray(a._f.deps)||a._f.deps.length>0)&&eu(a._f.deps);var R=i,P=_,$=n;let e=f(m.errors,R),r=(E.isValid||w.isValid)&&"boolean"==typeof P&&m.isValid!==P;if(d.delayError&&$){let e;e=()=>{p(m.errors,R,$),I.state.next({errors:m.errors})},(t=t=>{clearTimeout(C),C=setTimeout(e,t)})(d.delayError)}else clearTimeout(C),t=null,$?p(m.errors,R,$):B(m.errors,R);if(($?!N(e,$):e)||!L(J)||r){let e={...J,...r&&"boolean"==typeof P?{isValid:P}:{},errors:m.errors,name:R};m={...m,...e},I.state.next(e)}}}},es=(e,t)=>{if(f(m.errors,t)&&e.focus)return e.focus(),1},eu=async(e,t={})=>{let n,r,i=R(e);if(d.resolver){let t=await W(u(e)?e:i);n=L(t),r=e?!i.some(e=>f(t,e)):n}else e?((r=(await Promise.all(i.map(async e=>{let t=f(x,e);return await K(t&&t._f?{[e]:t}:t)}))).every(Boolean))||m.isValid)&&M():r=n=await K(x);return I.state.next({...!S(e)||(E.isValid||w.isValid)&&n!==m.isValid?{}:{name:e},...d.resolver||!e?{isValid:n}:{},errors:m.errors}),t.shouldFocus&&!r&&et(x,es,e?i:b.mount),r},ec=(e,t)=>{let n={..._.mount?v:y};return t&&(n=function e(t,n){let r={};for(let o in t)if(t.hasOwnProperty(o)){let l=t[o],a=n[o];if(l&&i(l)&&a){let t=e(l,a);i(t)&&(r[o]=t)}else t[o]&&(r[o]=a)}return r}(t.dirtyFields?m.dirtyFields:m.touchedFields,n)),u(e)?n:S(e)?f(n,e):e.map(e=>f(n,e))},ed=(e,t)=>({invalid:!!f((t||m).errors,e),isDirty:!!f((t||m).dirtyFields,e),error:f((t||m).errors,e),isValidating:!!f(m.validatingFields,e),isTouched:!!f((t||m).touchedFields,e)}),ef=(e,t,n)=>{let r=(f(x,e,{_f:{}})._f||{}).ref,{ref:i,message:o,type:l,...a}=f(m.errors,e)||{};p(m.errors,e,{...a,...t,ref:r}),I.state.next({name:e,errors:m.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},eh=e=>I.state.subscribe({next:t=>{let n,r,i;n=e.name,r=t.name,i=e.exact,(!n||!r||n===r||R(n).some(e=>e&&(i?e===r:e.startsWith(r)||r.startsWith(e))))&&((e,t,n,r)=>{n(e);let{name:i,...o}=e;return L(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!r||"all"))})(t,e.formState||E,eb,e.reRenderRoot)&&e.callback({values:{...v},...m,...t,defaultValues:y})}}).unsubscribe,ep=(e,t={})=>{for(let n of e?R(e):b.mount)b.mount.delete(n),b.array.delete(n),t.keepValue||(B(x,n),B(v,n)),t.keepError||B(m.errors,n),t.keepDirty||B(m.dirtyFields,n),t.keepTouched||B(m.touchedFields,n),t.keepIsValidating||B(m.validatingFields,n),d.shouldUnregister||t.keepDefaultValue||B(y,n);I.state.next({values:s(v)}),I.state.next({...m,...!t.keepDirty?{}:{isDirty:H()}}),t.keepIsValid||M()},eg=({disabled:e,name:t})=>{if("boolean"==typeof e&&_.mount||e||b.disabled.has(t)){let n=b.disabled.has(t);e?b.disabled.add(t):b.disabled.delete(t),!!e!==n&&_.mount&&!_.action&&M()}},em=(e,t={})=>{let n=f(x,e),r="boolean"==typeof t.disabled||"boolean"==typeof d.disabled;return(p(x,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),b.mount.add(e),n)?eg({disabled:"boolean"==typeof t.disabled?t.disabled:d.disabled,name:e}):D(e,!0,t.value),{...r?{disabled:t.disabled||d.disabled}:{},...d.progressive?{required:!!t.required,min:G(t.min),max:G(t.max),minLength:G(t.minLength),maxLength:G(t.maxLength),pattern:G(t.pattern)}:{}
5,name:e,onChange:eo,onBlur:eo,ref:r=>{if(r){let i;em(e,t),n=f(x,e);let o=u(r.value)&&r.querySelectorAll&&r.querySelectorAll("input,select,textarea")[0]||r,l="radio"===(i=o).type||"checkbox"===i.type,a=n._f.refs||[];(l?a.find(e=>e===o):o===n._f.ref)||(p(x,e,{_f:{...n._f,...l?{refs:[...a.filter(F),o,...Array.isArray(f(y,e))?[{}]:[]],ref:{type:o.type,name:e}}:{ref:o}}}),D(e,!1,void 0,o))}else(n=f(x,e,{}))._f&&(n._f.mount=!1),(d.shouldUnregister||t.shouldUnregister)&&!(l(b.array,e)&&_.action)&&b.unMount.add(e)}}},ex=()=>d.shouldFocusError&&et(x,es,b.mount),ey=(e,t)=>async n=>{let r;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let i=s(v);if(I.state.next({isSubmitting:!0}),d.resolver){let{errors:e,values:t}=await z();O(),m.errors=e,i=s(t)}else await K(x);if(b.disabled.size)for(let e of b.disabled)B(i,e);if(B(m.errors,"root"),L(m.errors)){I.state.next({errors:{}});try{await e(i,n)}catch(e){r=e}}else t&&await t({...m.errors},n),ex(),setTimeout(ex);if(I.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:L(m.errors)&&!r,submitCount:m.submitCount+1,errors:m.errors}),r)throw r},ev=(e,t={})=>{let n=e?s(e):y,r=s(n),i=L(e),o=i?y:r;if(t.keepDefaultValues||(y=n),!t.keepValues){if(t.keepDirtyValues)for(let e of Array.from(new Set([...b.mount,...Object.keys(j(y,v))]))){let t=f(m.dirtyFields,e),n=f(v,e),r=f(o,e);t&&!u(n)?p(o,e,n):t||u(r)||ei(e,r)}else{if(a&&u(e))for(let e of b.mount){let t=f(x,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if($(e)){let t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(let e of b.mount)ei(e,f(o,e));else x={}}v=d.shouldUnregister?t.keepDefaultValues?s(y):{}:s(o),I.array.next({values:{...o}}),I.state.next({values:{...o}})}b={mount:t.keepDirtyValues?b.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},_.mount=!E.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!d.shouldUnregister&&!L(o),_.watch=!!d.shouldUnregister,_.keepIsValid=!!t.keepIsValid,_.action=!1,t.keepErrors||(m.errors={}),I.state.next({submitCount:t.keepSubmitCount?m.submitCount:0,isDirty:!i&&(t.keepDirty?m.isDirty:!!(t.keepDefaultValues&&!N(e,y))),isSubmitted:!!t.keepIsSubmitted&&m.isSubmitted,dirtyFields:i?{}:t.keepDirtyValues?t.keepDefaultValues&&v?j(y,v):m.dirtyFields:t.keepDefaultValues&&e?j(y,e):t.keepDirty?m.dirtyFields:{},touchedFields:t.keepTouched?m.touchedFields:{},errors:t.keepErrors?m.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&m.isSubmitSuccessful,isSubmitting:!1,defaultValues:y})},e_=(e,t)=>ev(h(e)?e(v):e,{...d.resetOptions,...t}),eb=e=>{m={...m,...e}},eC={control:{register:em,unregister:ep,getFieldState:ed,handleSubmit:ey,setError:ef,_subscribe:eh,_runSchema:z,_updateIsValidating:O,_focusError:ex,_getWatch:J,_getDirty:H,_setValid:M,_setFieldArray:(e,t=[],n,r,i=!0,o=!0)=>{if(r&&n&&!d.disabled){if(_.action=!0,o&&Array.isArray(f(x,e))){let t=n(f(x,e),r.argA,r.argB);i&&p(x,e,t)}if(o&&Array.isArray(f(m.errors,e))){let t,o=n(f(m.errors,e),r.argA,r.argB);i&&p(m.errors,e,o),c(f(t=m.errors,e)).length||B(t,e)}if((E.touchedFields||w.touchedFields)&&o&&Array.isArray(f(m.touchedFields,e))){let t=n(f(m.touchedFields,e),r.argA,r.argB);i&&p(m.touchedFields,e,t)}(E.dirtyFields||w.dirtyFields)&&(m.dirtyFields=j(y,v)),I.state.next({name:e,isDirty:H(e,t),dirtyFields:m.dirtyFields,errors:m.errors,isValid:m.isValid})}else p(v,e,t)},_setDisabledField:eg,_setErrors:e=>{m.errors=e,I.state.next({errors:m.errors,isValid:!1})},_getFieldArray:e=>c(f(_.mount?v:y,e,d.shouldUnregister?f(y,e,[]):[])),_reset:ev,_resetDefaultValues:()=>h(d.defaultValues)&&d.defaultValues().then(e=>{e_(e,d.resetOptions),I.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of b.unMount){let t=f(x,e);t&&(t._f.refs?t._f.refs.every(e=>!F(e)):!F(t._f.ref))&&ep(e)}b.unMount=new Set},_disableForm:e=>{"boolean"==typeof e&&(I.state.next({disabled:e}),et(x,(t,n)=>{let r=f(x,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach(t=>{t.disabled=r._f.disabled||e}))},0,!1))},_subjects:I,_proxyFormState:E,get _fields(){return x},get _formValues(){return v},get _state(){return _},set _state(value){_=value},get _defaultValues(){return y},get _names(){return b},set _names(value){b=value},get _formState(){return m},get _options(){return d},set _options(value){d={...d,...value}}},subscribe:e=>(_.mount=!0,w={...w,...e.formState},eh({...e,formState:{...T,...e.formState}})),trigger:eu,register:em,handleSubmit:ey,watch:(e,t)=>h(e)?I.state.subscribe({next:n=>"values"in n&&e(J(void 0,t),n)}):J(e,t,!0),setValue:ei,getValues:ec,reset:e_,resetField:(e,t={})=>{f(x,e)&&(u(t.defaultValue)?ei(e,s(f(y,e))):(ei(e,t.defaultValue),p(y,e,s(t.defaultValue))),t.keepTouched||B(m.touchedFields,e),t.keepDirty||(B(m.dirtyFields,e),m.isDirty=t.defaultValue?H(e,s(f(y,e))):H()),!t.keepError&&(B(m.errors,e),E.isValid&&M()),I.state.next({...m}))},clearErrors:e=>
5{e&&R(e).forEach(e=>B(m.errors,e)),I.state.next({errors:e?m.errors:{}})},unregister:ep,setError:ef,setFocus:(e,t={})=>{let n=f(x,e),r=n&&n._f;if(r){let e=r.refs?r.refs[0]:r.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&h(e.select)&&e.select()})}},getFieldState:ed};return{...eC,formControl:eC}}(e);d.current={...m,formState:x}}let v=d.current.control;return v._options=e,E(()=>{let e=v._subscribe({formState:v._proxyFormState,callback:()=>y({...v._formState}),reRenderRoot:!0});return y(e=>({...e,isReady:!0})),v._formState.isReady=!0,e},[v]),t.default.useEffect(()=>v._disableForm(e.disabled),[v,e.disabled]),t.default.useEffect(()=>{e.mode&&(v._options.mode=e.mode),e.reValidateMode&&(v._options.reValidateMode=e.reValidateMode)},[v,e.mode,e.reValidateMode]),t.default.useEffect(()=>{e.errors&&(v._setErrors(e.errors),v._focusError())},[v,e.errors]),t.default.useEffect(()=>{e.shouldUnregister&&v._subjects.state.next({values:v._getWatch()})},[v,e.shouldUnregister]),t.default.useEffect(()=>{if(v._proxyFormState.isDirty){let e=v._getDirty();e!==x.isDirty&&v._subjects.state.next({isDirty:e})}},[v,x.isDirty]),t.default.useEffect(()=>{var t;e.values&&!N(e.values,m.current)?(v._reset(e.values,{keepFieldsRef:!0,...v._options.resetOptions}),(null==(t=v._options.resetOptions)?void 0:t.keepIsValid)||v._setValid(),m.current=e.values,y(e=>({...e}))):v._resetDefaultValues()},[v,e.values]),t.default.useEffect(()=>{v._state.mount||(v._setValid(),v._state.mount=!0),v._state.watch&&(v._state.watch=!1,v._subjects.state.next({...v._formState})),v._removeUnmounted()}),d.current.formState=t.default.useMemo(()=>T(x,v),[v,x]),d.current}e.s(["Controller",()=>I,"FormProvider",()=>O,"useFieldArray",()=>ey,"useForm",()=>ev,"useFormContext",()=>M])},571540,(e,t,n)=>{"use strict";var r=60103,i=60106,o=60107,l=60108,a=60114,s=60109,u=60110,c=60112,d=60113,f=60120,h=60115,p=60116,g=60121,m=60122,x=60117,y=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var _=Symbol.for;r=_("react.element"),i=_("react.portal"),o=_("react.fragment"),l=_("react.strict_mode"),a=_("react.profiler"),s=_("react.provider"),u=_("react.context"),c=_("react.forward_ref"),d=_("react.suspense"),f=_("react.suspense_list"),h=_("react.memo"),p=_("react.lazy"),g=_("react.block"),m=_("react.server.block"),x=_("react.fundamental"),y=_("react.debug_trace_mode"),v=_("react.legacy_hidden")}function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case l:case d:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case p:case h:case s:return e;default:return t}}case i:return t}}}var C=s,T=r,E=c,S=o,k=p,w=h,N=i,I=a,A=l,M=d;n.ContextConsumer=u,n.ContextProvider=C,n.Element=T,n.ForwardRef=E,n.Fragment=S,n.Lazy=k,n.Memo=w,n.Portal=N,n.Profiler=I,n.StrictMode=A,n.Suspense=M,n.isAsyncMode=function(){return!1},n.isConcurrentMode=function(){return!1},n.isContextConsumer=function(e){return b(e)===u},n.isContextProvider=function(e){return b(e)===s},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},n.isForwardRef=function(e){return b(e)===c},n.isFragment=function(e){return b(e)===o},n.isLazy=function(e){return b(e)===p},n.isMemo=function(e){return b(e)===h},n.isPortal=function(e){return b(e)===i},n.isProfiler=function(e){return b(e)===a},n.isStrictMode=function(e){return b(e)===l},n.isSuspense=function(e){return b(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===y||e===l||e===d||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===s||e.$$typeof===u||e.$$typeof===c||e.$$typeof===x||e.$$typeof===g||e[0]===m)||!1},n.typeOf=b},271987,(e,t,n)=>{"use strict";t.exports=e.r(571540)},536885,881747,999977,e=>{"use strict";e.s(["ImageDialog",()=>eE],536885);var t=e.i(135598),n=e.i(272043),r=e.i(191788),i=e.i(558021),o=e.i(995711),l=e.i(317649),a=e.i(678779);function s(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function u(){return(u=Object.assign.bind()).apply(null,arguments)}e.i(350461);var c=e.i(691567);e.i(271987);let d=e=>"object"==typeof e&&null!=e&&1===e.nodeType,f=(e,t)=>
5(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,h=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n,r=getComputedStyle(e,null);return f(r.overflowY,t)||f(r.overflowX,t)||!!(n=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(n.clientHeight<e.scrollHeight||n.clientWidth<e.scrollWidth)}return!1},p=(e,t,n,r,i,o,l,a)=>o<e&&l>t||o>e&&l<t?0:o<=e&&a<=n||l>=t&&a>=n?o-e-r:l>t&&a<n||o<e&&a>n?l-t+i:0,g=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var m=e.i(189280),x=0;function y(){}function v(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function _(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,o=Array(i),l=0;l<i;l++)o[l]=arguments[l];r(),n=setTimeout(function(){n=null,e.apply(void 0,o)},t)}return i.cancel=r,i}function b(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault})}}function C(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}function T(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=void 0!==t[r]?t[r]:e[r],n},{})}function E(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function S(e,t,n,r,i){if(void 0===i&&(i=!0),0===n)return -1;var o=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:o+1);var l=t+e;l<0?l=i?o:0:l>o&&(l=i?0:o);var a=k(e,l,n,r,i);return -1===a?t>=n?-1:t:a}function k(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var l=t+1;l<n;l++)if(!r(l).hasAttribute("disabled"))return l}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return i?e>0?k(1,0,n,r,!1):k(-1,n-1,n,r,!1):-1}function w(e,t,n,r){return void 0===r&&(r=!0),t.some(function(t){return t&&(v(t,e,n)||r&&v(t,n.document.activeElement,n))})}var N=_(function(e){A(e).textContent=""},500);function I(e,t){var n=A(t);e&&(n.textContent=e,N(t))}function A(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).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 M=["isInitialMount","highlightedIndex","items","environment"],O={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},D=_(function(e,t){I(e(),t)},200),R="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function P(e){var t=e.id,n=void 0===t?"downshift-"+String(x++):t,i=e.labelId,o=e.menuId,l=e.getItemId,a=e.toggleButtonId,s=e.inputId;return(0,r.useRef)({labelId:i||n+"-label",menuId:o||n+"-menu",getItemId:l||function(e){return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"}).current}function L(e,t,n,r){var i,o;if(void 0===e){if(void 0===t)throw Error(r);i=n[t],o=t}else o=void 0===t?n.indexOf(e):t,i=e;return[i,o]}function $(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function F(e){var t=(0,r.useRef)(e);return t.current=e,t}function B(e,t,n){var i=(0,r.useRef)(),o=(0,r.useRef)(),l=(0,r.useCallback)(function(t,n){o.current=n;var r=e(t=T(t,n.props),n);return n.props.stateReducer(t,u({},n,{changes:r}))},[e]),a=(0,r.useReducer)(l,t),s=a[0],c=a[1],d=F(n),f=(0,r.useCallback)(function(e){return c(u({props:d.current},e))},[d]),h=o.current;return(0,r.useEffect)(function(){var e,t,n,r;h&&i.current&&i.current!==s&&(e=T(i.current,h.props),t=h.props,n=h.type,r={},Object.keys(e).forEach(function(t){var n,i,o,l,a,c,d;n=t,i=h,o=e,l=s,a=i.props,c=i.type,a[d="on"+$(n)+"Change"]&&void 0!==l[n]&&l[n]!==o[n]&&a[d](u({type:c},l)),s[t]!==e[t]&&(r[t]=s[t])}),t.onStateChange&&Object.keys(r).length&&t.onStateChange(u({type:n},r))),i.current=s},[s,n,h]),[s,f]}
5function V(e,t,n){var r=B(e,t,n),i=r[0],o=r[1];return[T(i,n),o]}var z={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:function(e,t){e&&((e,t)=>{var n,r,i,o,l,a;if("u"<typeof document)return[];let{scrollMode:s,block:u,inline:c,boundary:f,skipOverflowHiddenElements:m}=t,x="function"==typeof f?f:e=>e!==f;if(!d(e))throw TypeError("Invalid target");let y=document.scrollingElement||document.documentElement,v=[],_=e;for(;d(_)&&x(_);){if((_=g(_))===y){v.push(_);break}null!=_&&_===document.body&&h(_)&&!h(document.documentElement)||null!=_&&h(_,m)&&v.push(_)}let b=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,C=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,T=null!=(l=window.scrollX)?l:pageXOffset,E=null!=(a=window.scrollY)?a:pageYOffset,{height:S,width:k,top:w,right:N,bottom:I,left:A}=e.getBoundingClientRect(),M="start"===u||"nearest"===u?w:"end"===u?I:w+S/2,O="center"===c?A+k/2:"end"===c?N:A,D=[];for(let e=0;e<v.length;e++){let t=v[e],{height:n,width:r,top:i,right:o,bottom:l,left:a}=t.getBoundingClientRect();if("if-needed"===s&&w>=0&&A>=0&&I<=C&&N<=b&&w>=i&&I<=l&&A>=a&&N<=o)break;let d=getComputedStyle(t),f=parseInt(d.borderLeftWidth,10),h=parseInt(d.borderTopWidth,10),g=parseInt(d.borderRightWidth,10),m=parseInt(d.borderBottomWidth,10),x=0,_=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-g:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-h-m:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,$="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(y===t)x="start"===u?M:"end"===u?M-C:"nearest"===u?p(E,E+C,C,h,m,E+M,E+M+S,S):M-C/2,_="start"===c?O:"center"===c?O-b/2:"end"===c?O-b:p(T,T+b,b,f,g,T+O,T+O+k,k),x=Math.max(0,x+E),_=Math.max(0,_+T);else{x="start"===u?M-i-h:"end"===u?M-l+m+P:"nearest"===u?p(i,l,n,h,m+P,M,M+S,S):M-(i+n/2)+P/2,_="start"===c?O-a-f:"center"===c?O-(a+r/2)+R/2:"end"===c?O-o+g+R:p(a,o,r,f,g+R,O,O+k,k);let{scrollLeft:e,scrollTop:s}=t;x=Math.max(0,Math.min(s+x/$,t.scrollHeight-n/$+P)),_=Math.max(0,Math.min(e+_/L,t.scrollWidth-r/L+R)),M+=s-x,O+=e-_}D.push({el:t,top:x,left:_})}return D})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}
5).forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})},environment:"u"<typeof window?{}:window};function j(e,t,n){void 0===n&&(n=O);var r=e["default"+$(t)];return void 0!==r?r:n[t]}function W(e,t,n){void 0===n&&(n=O);var r=e[t];if(void 0!==r)return r;var i=e["initial"+$(t)];return void 0!==i?i:j(e,t,n)}function K(e){var t=W(e,"selectedItem"),n=W(e,"isOpen"),r=W(e,"highlightedIndex"),i=W(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function H(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,l=t.selectedItem,a=t.highlightedIndex;return 0===r.length?-1:void 0!==i&&a===i?i:void 0!==o?o:l?r.indexOf(l):0===n?-1:n<0?r.length-1:0}function U(e,t,n,i){var o=(0,r.useRef)({isMouseDown:!1,isTouchMove:!1});return(0,r.useEffect)(function(){if((null==n?void 0:n.addEventListener)!=null){var r=function(){o.current.isMouseDown=!0},l=function(r){o.current.isMouseDown=!1,e&&!w(r.target,t.map(function(e){return e.current}),n)&&i()},a=function(){o.current.isTouchMove=!1},s=function(){o.current.isTouchMove=!0},u=function(r){!e||o.current.isTouchMove||w(r.target,t.map(function(e){return e.current}),n,!1)||i()};return n.addEventListener("mousedown",r),n.addEventListener("mouseup",l),n.addEventListener("touchstart",a),n.addEventListener("touchmove",s),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",r),n.removeEventListener("mouseup",l),n.removeEventListener("touchstart",a),n.removeEventListener("touchmove",s),n.removeEventListener("touchend",u)}}},[e,n]),o}var J=function(){return y};function Y(e,t,n){var i=n.isInitialMount,o=n.highlightedIndex,l=n.items,a=n.environment,c=s(n,M);(0,r.useEffect)(function(){i||D(function(){return e(u({highlightedIndex:o,highlightedItem:l[o],resultCount:l.length},c))},a.document)},t)}function q(e){var t=e.highlightedIndex,n=e.isOpen,i=e.itemRefs,o=e.getItemNodeFromIndex,l=e.menuElement,a=e.scrollIntoView,s=(0,r.useRef)(!0);return R(function(){!(t<0)&&n&&Object.keys(i.current).length&&(!1===s.current?s.current=!0:a(o(t),l))},[t]),s}function G(e,t,n){void 0===n&&(n=!0);var r,i=(null==(r=e.items)?void 0:r.length)&&t>=0;return u({isOpen:!1,highlightedIndex:-1},i&&u({selectedItem:e.items[t],isOpen:j(e,"isOpen"),highlightedIndex:j(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function X(e,t,n){var r,i=t.type,o=t.props;switch(i){case n.ItemMouseMove:r={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:H(o,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:H(o,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:j(o,"highlightedIndex"),isOpen:j(o,"isOpen"),selectedItem:j(o,"selectedItem"),inputValue:j(o,"inputValue")};break;default:throw Error("Reducer called without proper action type.")}return u({},e,r)}c.default.array.isRequired,c.default.func,c.default.func,c.default.func,c.default.number,c.default.number,c.default.number,c.default.bool,c.default.bool,c.default.bool,c.default.any,c.default.any,c.default.any,c.default.string,c.default.string,c.default.string,c.default.func,c.default.string,c.default.func,c.default.func,c.default.func,c.default.func,c.default.func,c.default.shape({addEventListener:c.default.func,removeEventListener:c.default.func,document:c.default.shape({getElementById:c.default.func,activeElement:c.default.any,body:c.default.any})});var Q=(0,m.__assign)((0,m.__assign)({},z),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}}),Z=Object.freeze({__proto__:null,ToggleButtonClick:0,ToggleButtonKeyDownArrowDown:1,ToggleButtonKeyDownArrowUp:2,ToggleButtonKeyDownCharacter:3,ToggleButtonKeyDownEscape:4,ToggleButtonKeyDown
5Home:5,ToggleButtonKeyDownEnd:6,ToggleButtonKeyDownEnter:7,ToggleButtonKeyDownSpaceButton:8,ToggleButtonKeyDownPageUp:9,ToggleButtonKeyDownPageDown:10,ToggleButtonBlur:11,MenuMouseLeave:12,ItemMouseMove:13,ItemClick:14,FunctionToggleMenu:15,FunctionOpenMenu:16,FunctionCloseMenu:17,FunctionSetHighlightedIndex:18,FunctionSelectItem:19,FunctionSetInputValue:20,FunctionReset:21});function ee(e,t){var n,r,i=t.type,o=t.props,l=t.altKey;switch(i){case 14:r={isOpen:j(o,"isOpen"),highlightedIndex:j(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 3:var a=t.key,s=""+e.inputValue+a,c=function(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,o=e.getItemNodeFromIndex,l=t.toLowerCase(),a=0;a<r.length;a++){var s=(a+n+ +(t.length<2))%r.length,u=r[s];if(void 0!==u&&i(u).toLowerCase().startsWith(l)){var c=o(s);if(!(null==c?void 0:c.hasAttribute("disabled")))return s}}return n}({keysSoFar:s,highlightedIndex:!e.isOpen&&e.selectedItem?o.items.indexOf(e.selectedItem):e.highlightedIndex,items:o.items,itemToString:o.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});r={inputValue:s,highlightedIndex:c,isOpen:!0};break;case 1:r={highlightedIndex:e.isOpen?S(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1):l&&null==e.selectedItem?-1:H(o,e,1),isOpen:!0};break;case 2:r=e.isOpen&&l?G(o,e.highlightedIndex,!1):{highlightedIndex:e.isOpen?S(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1):H(o,e,-1),isOpen:!0};break;case 7:case 8:r=G(o,e.highlightedIndex,!1);break;case 5:r={highlightedIndex:k(1,0,o.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case 6:r={highlightedIndex:k(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1),isOpen:!0};break;case 9:r={highlightedIndex:S(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case 10:r={highlightedIndex:S(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:r={isOpen:!1,highlightedIndex:-1};break;case 11:r=u({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&(null==(n=o.items)?void 0:n.length)&&{selectedItem:o.items[e.highlightedIndex]});break;case 19:r={selectedItem:t.selectedItem};break;default:return X(e,t,Z)}return u({},e,r)}var et=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],en=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],er=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];function ei(e){void 0===e&&(e={}),y(e,ei);var t=u({},Q,e),n=t.items,i=t.scrollIntoView,o=t.environment,l=t.itemToString,a=t.getA11ySelectionMessage,c=t.getA11yStatusMessage,d=V(ee,K(t),t),f=d[0],h=d[1],p=f.isOpen,g=f.highlightedIndex,m=f.selectedItem,x=f.inputValue,v=(0,r.useRef)(null),T=(0,r.useRef)(null),S=(0,r.useRef)({}),k=(0,r.useRef)(null),w=P(t),N=(0,r.useRef)(),I=(0,r.useRef)(!0),A=F({state:f,props:t}),M=(0,r.useCallback)(function(e){return S.current[w.getItemId(e)]},[w]);Y(c,[p,g,x,n],u({isInitialMount:I.current,previousResultCount:N.current,items:n,environment:o,itemToString:l},f)),Y(a,[m],u({isInitialMount:I.current,previousResultCount:N.current,items:n,environment:o,itemToString:l},f));var O=q({menuElement:T.current,highlightedIndex:g,isOpen:p,itemRefs:S,scrollIntoView:i,getItemNodeFromIndex:M});(0,r.useEffect)(function(){return k.current=_(function(e){e({type:20,inputValue:""})},500),function(){k.current.cancel()}},[]),(0,r.useEffect)(function(){x&&k.current(h)},[h,x]),y({isInitialMount:I.current,props:t,state:f}),(0,r.useEffect)(function(){I.current||(N.current=n.length)});var D=U(p,[T,v],o,function(){h({type:11})}),R=J("getMenuProps","getToggleButtonProps");(0,r.useEffect)(function(){return I.current=!1,function(){I.current=!0}},[]),(0,r.useEffect)(function(){p||(S.current={})},[p]);var $=(0,r.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),h({type:1,getItemNodeFromIndex:M,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),h({type:2,getItemNodeFromIndex:M,altKey:e.altKey})},Home:function(e){e.preventDefault(),h({type:5,getItemNodeFromIndex:M})},End:function(e){e.preventDefault(),h({type:6,getItemNodeFromIndex:M})},Escape:function(){A.current.state.isOpen&&h({type:4})},Enter:function(e){e.preventDefault(),h({type:7*!!A.current.state.isOpen})},PageUp:function(e){A.current.state.isOpen&&(e.preventDefault(),h({type:9,getItemNodeFromIndex:M}))},PageDown:function(e){A.current.state.isOpen&&(e.preventDefault(),h({type:10,getItemNodeFromIndex:M}))}," ":function(e){e.preventDefault();var t=A.current.state;t.isOpen?t.inputValue?h({type:3,key:" ",getItemNodeFromIndex:M}):h({type:8}):h({type:0})}}},[h,M,A]),B=(0,r.useCallback)(function(){h({type:15})},[h]),z=(0,r.useCallback)(function(){h({type:17})},[h]),j=(0,r.useCallback)(function(){h({type:16})},[h]),W=(0,r.useCallback)(function(e){h({type:18,highlightedIndex:e})}
5,[h]),H=(0,r.useCallback)(function(e){h({type:19,selectedItem:e})},[h]),G=(0,r.useCallback)(function(){h({type:21})},[h]),X=(0,r.useCallback)(function(e){h({type:20,inputValue:e})},[h]),Z=(0,r.useCallback)(function(e){return u({id:w.labelId,htmlFor:w.toggleButtonId},e)},[w]),eo=(0,r.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onMouseLeave,o=r.refKey,l=void 0===o?"ref":o;r.onKeyDown,r.onBlur;var a=r.ref,c=s(r,et),d=(void 0===t?{}:t).suppressRefError;return R("getMenuProps",void 0!==d&&d,l,T),u(((n={})[l]=C(a,function(e){T.current=e}),n.id=w.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?void 0:""+w.labelId,n.onMouseLeave=b(i,function(){h({type:12})}),n),c)},[h,R,w]);return{getToggleButtonProps:(0,r.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onBlur,o=r.onClick;r.onPress;var l=r.onKeyDown,a=r.refKey,c=void 0===a?"ref":a,d=r.ref,f=s(r,en),p=(void 0===t?{}:t).suppressRefError,g=A.current.state,m=u(((n={})[c]=C(d,function(e){v.current=e}),n["aria-activedescendant"]=g.isOpen&&g.highlightedIndex>-1?w.getItemId(g.highlightedIndex):"",n["aria-controls"]=w.menuId,n["aria-expanded"]=A.current.state.isOpen,n["aria-haspopup"]="listbox",n["aria-labelledby"]=f&&f["aria-label"]?void 0:""+w.labelId,n.id=w.toggleButtonId,n.role="combobox",n.tabIndex=0,n.onBlur=b(i,function(){g.isOpen&&!D.current.isMouseDown&&h({type:11})}),n),f);return f.disabled||(m.onClick=b(o,function(){h({type:0})}),m.onKeyDown=b(l,function(e){var t=E(e);t&&$[t]?$[t](e):/^\S{1}$/.test(t)&&h({type:3,key:t,getItemNodeFromIndex:M})})),R("getToggleButtonProps",void 0!==p&&p,c,v),m},[A,w,R,h,D,$,M]),getLabelProps:Z,getMenuProps:eo,getItemProps:(0,r.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.item,i=n.index,o=n.onMouseMove,l=n.onClick;n.onPress;var a=n.refKey,c=n.ref,d=n.disabled,f=s(n,er),p=A.current,g=p.state,x=L(r,i,p.props.items,"Pass either item or index to getItemProps!"),y=x[0],v=x[1],_=u(((t={disabled:d,role:"option","aria-selected":""+(y===m),id:w.getItemId(v)})[void 0===a?"ref":a]=C(c,function(e){e&&(S.current[w.getItemId(v)]=e)}),t),f);return d||(_.onClick=b(l,function(){h({type:14,index:v})})),_.onMouseMove=b(o,function(){v!==g.highlightedIndex&&(O.current=!1,h({type:13,index:v,disabled:d}))}),_},[A,m,w,O,h]),toggleMenu:B,openMenu:j,closeMenu:z,setHighlightedIndex:W,selectItem:H,reset:G,setInputValue:X,highlightedIndex:g,isOpen:p,selectedItem:m,inputValue:x}}ei.stateChangeTypes=Z;var eo=Object.freeze({__proto__:null,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownEnd:4,InputKeyDownPageUp:5,InputKeyDownPageDown:6,InputKeyDownEnter:7,InputChange:8,InputBlur:9,InputFocus:10,MenuMouseLeave:11,ItemMouseMove:12,ItemClick:13,ToggleButtonClick:14,FunctionToggleMenu:15,FunctionOpenMenu:16,FunctionCloseMenu:17,FunctionSetHighlightedIndex:18,FunctionSelectItem:19,FunctionSetInputValue:20,FunctionReset:21,ControlledPropUpdatedSelectedItem:22});c.default.array.isRequired,c.default.func,c.default.func,c.default.func,c.default.func,c.default.number,c.default.number,c.default.number,c.default.bool,c.default.bool,c.default.bool,c.default.any,c.default.any,c.default.any,c.default.string,c.default.string,c.default.string,c.default.string,c.default.string,c.default.string,c.default.func,c.default.string,c.default.string,c.default.func,c.default.func,c.default.func,c.default.func,c.default.func,c.default.func,c.default.shape({addEventListener:c.default.func,removeEventListener:c.default.func,document:c.default.shape({getElementById:c.default.func,activeElement:c.default.any,body:c.default.any})});var el=u({},z,{selectedItemChanged:function(e,t){return e!==t},getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}});function ea(e,t){var n,r,i=t.type,o=t.props,l=t.altKey;switch(i){case 13:r={isOpen:j(o,"isOpen"),highlightedIndex:j(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case 0:r=e.isOpen?{highlightedIndex:S(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:{highlightedIndex:l&&null==e.selectedItem?-1:H(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case 1:r=e.isOpen?l?G(o,e.highlightedIndex):{highlightedIndex:S(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:{highlightedIndex:H(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case 7:r=G(o,e.highlightedIndex);break;case 2:r=u({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 5:r={highlightedIndex:S(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case 6:r={highlightedIndex:S(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case 3:r={highlightedIndex:k(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:r={highlightedIndex:k(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case 9:r=u({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&(null==(n=o.items)?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case 8:r={isOpen:!0,highlightedIndex:j(o,"highlightedIndex"),inputValue:t.inputValue};break;case 10:r={isOpen:!0,highlightedIndex:H(o,e,0)};break;case 19:r={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case 22:r={inputValue:t.inputValue};break;default:return X(e,t,eo)}return u({},e,r)}var es=["onMouseLeave","refKey","ref"],eu=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],ec=["onClick","onPress","refKey","ref"],ed=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];function ef(e){void 0===e&&(e={}),y(e,ef);var t,n,i,o,l,a,c,d=u({},el,e),f=d.initialIsOpen,h=d.defaultIsOpen,p=d.items,g=d.scrollIntoView,m=d.environment,x=d.getA11yStatus
5Message,v=d.getA11ySelectionMessage,_=d.itemToString,S=(n=(t=K(d)).selectedItem,""===(i=t.inputValue)&&n&&void 0===d.defaultInputValue&&void 0===d.initialInputValue&&void 0===d.inputValue&&(i=d.itemToString(n)),u({},t,{inputValue:i})),k=(o=(0,r.useRef)(),a=(l=B(ea,S,d))[0],c=l[1],(0,r.useEffect)(function(){void 0!==d.selectedItem&&(d.selectedItemChanged(o.current,d.selectedItem)&&c({type:22,inputValue:d.itemToString(d.selectedItem)}),o.current=a.selectedItem===o.current?d.selectedItem:a.selectedItem)},[a.selectedItem,d.selectedItem]),[T(a,d),c]),w=k[0],N=k[1],I=w.isOpen,A=w.highlightedIndex,M=w.selectedItem,O=w.inputValue,D=(0,r.useRef)(null),R=(0,r.useRef)({}),$=(0,r.useRef)(null),V=(0,r.useRef)(null),z=(0,r.useRef)(!0),j=P(d),W=(0,r.useRef)(),H=F({state:w,props:d}),G=(0,r.useCallback)(function(e){return R.current[j.getItemId(e)]},[j]);Y(x,[I,A,O,p],u({isInitialMount:z.current,previousResultCount:W.current,items:p,environment:m,itemToString:_},w)),Y(v,[M],u({isInitialMount:z.current,previousResultCount:W.current,items:p,environment:m,itemToString:_},w));var X=q({menuElement:D.current,highlightedIndex:A,isOpen:I,itemRefs:R,scrollIntoView:g,getItemNodeFromIndex:G});y({isInitialMount:z.current,props:d,state:w}),(0,r.useEffect)(function(){(f||h||I)&&$.current&&$.current.focus()},[]),(0,r.useEffect)(function(){z.current||(W.current=p.length)});var Q=U(I,[$,D,V],m,function(){N({type:9,selectItem:!1})}),Z=J("getInputProps","getMenuProps");(0,r.useEffect)(function(){return z.current=!1,function(){z.current=!0}},[]),(0,r.useEffect)(function(){var e,t;I?(null==(e=m.document)?void 0:e.activeElement)!==$.current&&(null==$||null==(t=$.current)||t.focus()):R.current={}},[I,m]);var ee=(0,r.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),N({type:0,altKey:e.altKey,getItemNodeFromIndex:G})},ArrowUp:function(e){e.preventDefault(),N({type:1,altKey:e.altKey,getItemNodeFromIndex:G})},Home:function(e){H.current.state.isOpen&&(e.preventDefault(),N({type:3,getItemNodeFromIndex:G}))},End:function(e){H.current.state.isOpen&&(e.preventDefault(),N({type:4,getItemNodeFromIndex:G}))},Escape:function(e){var t=H.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),N({type:2}))},Enter:function(e){H.current.state.isOpen&&229!==e.which&&(e.preventDefault(),N({type:7,getItemNodeFromIndex:G}))},PageUp:function(e){H.current.state.isOpen&&(e.preventDefault(),N({type:5,getItemNodeFromIndex:G}))},PageDown:function(e){H.current.state.isOpen&&(e.preventDefault(),N({type:6,getItemNodeFromIndex:G}))}}},[N,H,G]),et=(0,r.useCallback)(function(e){return u({id:j.labelId,htmlFor:j.inputId},e)},[j]),en=(0,r.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onMouseLeave,o=r.refKey,l=void 0===o?"ref":o,a=r.ref,c=s(r,es),d=(void 0===t?{}:t).suppressRefError;return Z("getMenuProps",void 0!==d&&d,l,D),u(((n={})[l]=C(a,function(e){D.current=e}),n.id=j.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?void 0:""+j.labelId,n.onMouseLeave=b(i,function(){N({type:11})}),n),c)},[N,Z,j]),er=(0,r.useCallback)(function(e){var t,n,r=void 0===e?{}:e,i=r.item,o=r.index,l=r.refKey,a=r.ref,c=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var h=r.disabled,p=s(r,eu),g=H.current,m=g.props,x=g.state,y=L(i,o,m.items,"Pass either item or index to getItemProps!")[1];return u(((t={})[void 0===l?"ref":l]=C(a,function(e){e&&(R.current[j.getItemId(y)]=e)}),t.disabled=h,t.role="option",t["aria-selected"]=""+(y===x.highlightedIndex),t.id=j.getItemId(y),t),!h&&((n={}).onClick=b(f,function(){N({type:13,index:y})}),n),{onMouseMove:b(c,function(){y!==x.highlightedIndex&&(X.current=!1,N({type:12,index:y,disabled:h}))}),onMouseDown:b(d,function(e){return e.preventDefault()})},p)},[N,H,X,j]),ei=(0,r.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.onClick;n.onPress;var i=n.refKey,o=n.ref,l=s(n,ec),a=H.current.state;return u(((t={})[void 0===i?"ref":i]=C(o,function(e){V.current=e}),t["aria-controls"]=j.menuId,t["aria-expanded"]=a.isOpen,t.id=j.toggleButtonId,t.tabIndex=-1,t),!l.disabled&&u({},{onClick:b(r,function(){N({type:14})})}),l)},[N,H,j]),eo=(0,r.useCallback)(function(e,t){var n,r,i=void 0===e?{}:e,o=i.onKeyDown,l=i.onChange,a=i.onInput,c=i.onFocus,d=i.onBlur;i.onChangeText;var f=i.refKey,h=void 0===f?"ref":f,p=i.ref,g=s(i,ed),x=(void 0===t?{}:t).suppressRefError;Z("getInputProps",void 0!==x&&x,h,$);var y=H.current.state,v={};return g.disabled||((r={}).onChange=b(l,a,function(e){N({type:8,inputValue:e.target.value})}),r.onKeyDown=b(o,function(e){var t=E(e);t&&ee[t]&&ee[t](e)}),r.onBlur=b(d,function(e){y.isOpen&&!Q.current.isMouseDown&&N({type:9,selectItem:null!==e.relatedTarget||m.document.activeElement===m.document.body})}),r.onFocus=b(c,function(){y.isOpen||N({type:10})}),v=r),u(((n={})[h]=C(p,function(e){$.current=e}),n["aria-activedescendant"]=y.isOpen&&y.highlightedIndex>-1?j.getItemId(y.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=j.menuId,n["aria-expanded"]=y.isOpen,n["aria-labelledby"]=g&&g["aria-label"]?void 0:""+j.labelId,n.autoComplete="off",n.id=j.inputId,n.role="combobox",n.value=y.inputValue,n),v,g)},[Z,H,j,ee,N,Q,m]),eh=(0,r.useCallback)(function(){N({type:15})},[N]),ep=(0,r.useCallback)(function(){N({type:17})},[N]),eg=(0,r.useCallback)(function(){N({type:16})}
5,[N]),em=(0,r.useCallback)(function(e){N({type:18,highlightedIndex:e})},[N]),ex=(0,r.useCallback)(function(e){N({type:19,selectedItem:e})},[N]);return{getItemProps:er,getLabelProps:et,getMenuProps:en,getInputProps:eo,getToggleButtonProps:ei,toggleMenu:eh,openMenu:eg,closeMenu:ep,setHighlightedIndex:em,setInputValue:(0,r.useCallback)(function(e){N({type:20,inputValue:e})},[N]),selectItem:ex,reset:(0,r.useCallback)(function(){N({type:21})},[N]),highlightedIndex:A,isOpen:I,selectedItem:M,inputValue:O}}ef.stateChangeTypes=eo;var eh={activeIndex:-1,selectedItems:[]};function ep(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement)||""===t.value||0===t.selectionStart&&0===t.selectionEnd}c.default.array,c.default.array,c.default.array,c.default.func,c.default.func,c.default.func,c.default.number,c.default.number,c.default.number,c.default.func,c.default.func,c.default.string,c.default.string,c.default.shape({addEventListener:c.default.func,removeEventListener:c.default.func,document:c.default.shape({getElementById:c.default.func,activeElement:c.default.any,body:c.default.any})});var eg={itemToString:z.itemToString,stateReducer:z.stateReducer,environment:z.environment,getA11yRemovalMessage:function(e){var t=e.removedSelectedItem;return(0,e.itemToString)(t)+" has been removed."},keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},em=Object.freeze({__proto__:null,SelectedItemClick:0,SelectedItemKeyDownDelete:1,SelectedItemKeyDownBackspace:2,SelectedItemKeyDownNavigationNext:3,SelectedItemKeyDownNavigationPrevious:4,DropdownKeyDownNavigationPrevious:5,DropdownKeyDownBackspace:6,DropdownClick:7,FunctionAddSelectedItem:8,FunctionRemoveSelectedItem:9,FunctionSetSelectedItems:10,FunctionSetActiveIndex:11,FunctionReset:12});function ex(e,t){var n,r=t.type,i=t.index,o=t.props,l=t.selectedItem,a=e.activeIndex,s=e.selectedItems;switch(r){case 0:n={activeIndex:i};break;case 4:n={activeIndex:a-1<0?0:a-1};break;case 3:n={activeIndex:a+1>=s.length?-1:a+1};break;case 2:case 1:if(a<0)break;var c=a;1===s.length?c=-1:a===s.length-1&&(c=s.length-2),n=u({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:c});break;case 5:n={activeIndex:s.length-1};break;case 6:n={selectedItems:s.slice(0,s.length-1)};break;case 8:n={selectedItems:[].concat(s,[l])};break;case 7:n={activeIndex:-1};break;case 9:var d=a,f=s.indexOf(l);if(f<0)break;1===s.length?d=-1:f===s.length-1&&(d=s.length-2),n={selectedItems:[].concat(s.slice(0,f),s.slice(f+1)),activeIndex:d};break;case 10:n={selectedItems:t.selectedItems};break;case 11:n={activeIndex:t.activeIndex};break;case 12:n={activeIndex:j(o,"activeIndex",eh),selectedItems:j(o,"selectedItems",eh)};break;default:throw Error("Reducer called without proper action type.")}return u({},e,n)}var ey=["refKey","ref","onClick","onKeyDown","selectedItem","index"],ev=["refKey","ref","onKeyDown","onClick","preventKeyAction"];function e_(e){void 0===e&&(e={}),y(e,e_);var t,n=u({},eg,e),i=n.getA11yRemovalMessage,o=n.itemToString,l=n.environment,a=n.keyNavigationNext,c=n.keyNavigationPrevious,d=V(ex,{activeIndex:W(t=n,"activeIndex",eh),selectedItems:W(t,"selectedItems",eh)},n),f=d[0],h=d[1],p=f.activeIndex,g=f.selectedItems,m=(0,r.useRef)(!0),x=(0,r.useRef)(null),v=(0,r.useRef)(g),_=(0,r.useRef)();_.current=[];var T=F({state:f,props:n});(0,r.useEffect)(function(){if(!m.current){if(g.length<v.current.length){var e=v.current.find(function(e){return 0>g.indexOf(e)});I(i({itemToString:o,resultCount:g.length,removedSelectedItem:e,activeIndex:p,activeSelectedItem:g[p]}),l.document)}v.current=g}},[g.length]),(0,r.useEffect)(function(){!m.current&&(-1===p&&x.current?x.current.focus():_.current[p]&&_.current[p].focus())},[p]),y({isInitialMount:m.current,props:n,state:f});var S=J("getDropdownProps");(0,r.useEffect)(function(){return m.current=!1,function(){m.current=!0}},[]);var k=(0,r.useMemo)(function(){var e;return(e={})[c]=function(){h({type:4})},e[a]=function(){h({type:3})},e.Delete=function(){h({type:1})},e.Backspace=function(){h({type:2})},e},[h,a,c]),w=(0,r.useMemo)(function(){var e;return(e={})[c]=function(e){ep(e)&&h({type:5})},e.Backspace=function(e){ep(e)&&h({type:6})},e},[h,c]);return{getSelectedItemProps:(0,r.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.refKey,i=n.ref,o=n.onClick,l=n.onKeyDown,a=n.selectedItem,c=n.index,d=s(n,ey),f=T.current.state,p=L(a,c,f.selectedItems,"Pass either item or index to getSelectedItemProps!")[1],g=p>-1&&p===f.activeIndex;return u(((t={})[void 0===r?"ref":r]=C(i,function(e){e&&_.current.push(e)}),t.tabIndex=g?0:-1,t.onClick=b(o,function(){h({type:0,index:p})}),t.onKeyDown=b(l,function(e){var t=E(e);t&&k[t]&&k[t](e)}),t),d)},[h,T,k]),getDropdownProps:(0,r.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.refKey,o=void 0===i?"ref":i,l=r.ref,a=r.onKeyDown,c=r.onClick,d=r.preventKeyAction,f=s(r,ev),p=(void 0===t?{}:t).suppressRefError;return S("getDropdownProps",void 0!==p&&p,o,x),u(((n={})[o]=C(l,function(e){e&&(x.current=e)}),n),!(void 0!==d&&d)&&{onKeyDown:b(a,function(e){var t=E(e);t&&w[t]&&w[t](e)}),onClick:b(c,function(){h({type:7})})},f)},[h,w,S]),addSelectedItem:(0,r.useCallback)(function(e){h({type:8,selectedItem:e})}
5,[h]),removeSelectedItem:(0,r.useCallback)(function(e){h({type:9,selectedItem:e})},[h]),setSelectedItems:(0,r.useCallback)(function(e){h({type:10,selectedItems:e})},[h]),setActiveIndex:(0,r.useCallback)(function(e){h({type:11,activeIndex:e})},[h]),reset:(0,r.useCallback)(function(){h({type:12})},[h]),selectedItems:g,activeIndex:p}}e_.stateChangeTypes=em,e.s(["useCombobox",()=>ef],881747);var eb=e.i(578467);let eC=e=>e.suggestions.length>0?r.default.createElement(eT,{...e}):r.default.createElement("input",{className:o.default.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),eT=({autofocus:e,suggestions:t,control:n,inputName:a,placeholder:s,initialInputValue:u,setValue:c})=>{let[d,f]=r.default.useState(t.slice(0,20)),h=(0,eb.useCellValue)(l.iconComponentFor$),p=t.length>0,{isOpen:g,getToggleButtonProps:m,getMenuProps:x,getInputProps:y,highlightedIndex:v,getItemProps:_,selectedItem:b}=ef({initialInputValue:u,onInputValueChange({inputValue:e=""}){c(a,e),e=e.toLowerCase()||"";let n=[];for(let r of t)if(r.toLowerCase().includes(e)&&(n.push(r),n.length>=20))break;f(n)},items:d,itemToString:e=>e??""}),C=g&&d.length>0;return r.default.createElement("div",{className:o.default.downshiftAutocompleteContainer},r.default.createElement("div",{"data-visible-dropdown":C,className:o.default.downshiftInputWrapper},r.default.createElement(i.Controller,{name:a,control:n,render:({field:t})=>{let n=y();return r.default.createElement("input",{...n,name:t.name,placeholder:s,className:o.default.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),p&&r.default.createElement("button",{"aria-label":"toggle menu",type:"button",...m()},h("arrow_drop_down"))),r.default.createElement("div",{className:o.default.downshiftAutocompleteContainer},r.default.createElement("ul",{...x(),"data-visible":C},d.map((e,t)=>r.default.createElement("li",{"data-selected":b===e,"data-highlighted":v===t,key:`${e}${t}`,..._({item:e,index:t})},e)))))};e.s(["DownshiftAutoComplete",()=>eC],999977);let eE=()=>{let[e,s,u,c,d]=(0,eb.useCellValues)(a.imageAutocompleteSuggestions$,a.imageDialogState$,l.editorRootElementRef$,a.imageUploadHandler$,a.allowSetImageDimensions$),f=(0,eb.usePublisher)(a.saveImage$),h=(0,eb.usePublisher)(a.closeImageDialog$),p=(0,l.useTranslation)(),{register:g,handleSubmit:m,control:x,setValue:y,reset:v}=(0,i.useForm)({values:"editing"===s.type?s.initialValues:{}}),_=()=>{v({src:"",title:"",altText:"",width:void 0,height:void 0})};return"inactive"===s.type?null:r.default.createElement(t.Root,{open:!0,onOpenChange:e=>{e||(h(),_())}},r.default.createElement(t.Portal,{container:null==u?void 0:u.current},r.default.createElement(t.Overlay,{className:o.default.dialogOverlay}),r.default.createElement(t.Content,{className:o.default.dialogContent,onOpenAutoFocus:e=>{e.preventDefault()}},r.default.createElement(t.Title,null,p("uploadImage.dialogTitle","Upload an image")),r.default.createElement("form",{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await m(f)(e),_()},className:o.default.multiFieldForm},null===c?r.default.createElement("input",{type:"hidden",accept:"image/*",...g("file")}):r.default.createElement("div",{className:o.default.formField},r.default.createElement("label",{htmlFor:"file"},p("uploadImage.uploadInstructions","Upload an image from your device:")),r.default.createElement("input",{type:"file",accept:"image/*",...g("file")})),r.default.createElement("div",{className:o.default.formField},r.default.createElement("label",{htmlFor:"src"},null!==c?p("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):p("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),r.default.createElement(eC,{register:g,initialInputValue:"editing"===s.type?s.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:y,control:x,placeholder:p("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),r.default.createElement("div",{className:o.default.formField},r.default.createElement("label",{htmlFor:"alt"},p("uploadImage.alt","Alt:")),r.default.createElement("input",{type:"text",...g("altText"),className:o.default.textInput})),r.default.createElement("div",{className:o.default.formField}
5,r.default.createElement("label",{htmlFor:"title"},p("uploadImage.title","Title:")),r.default.createElement("input",{type:"text",...g("title"),className:o.default.textInput})),d&&r.default.createElement("div",{className:o.default.imageDimensionsContainer},r.default.createElement("div",{className:o.default.formField},r.default.createElement("label",{htmlFor:"width"},p("uploadImage.width","Width:")),r.default.createElement("input",{type:"number",min:0,...g("width"),className:o.default.textInput})),r.default.createElement("div",{className:o.default.formField},r.default.createElement("label",{htmlFor:"height"},p("uploadImage.height","Height:")),r.default.createElement("input",{type:"number",min:0,...g("height"),className:o.default.textInput}))),r.default.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},r.default.createElement("button",{type:"submit",title:p("dialogControls.save","Save"),"aria-label":p("dialogControls.save","Save"),className:(0,n.default)(o.default.primaryButton)},p("dialogControls.save","Save")),r.default.createElement(t.Close,{asChild:!0},r.default.createElement("button",{type:"reset",title:p("dialogControls.cancel","Cancel"),"aria-label":p("dialogControls.cancel","Cancel"),className:(0,n.default)(o.default.secondaryButton)},p("dialogControls.cancel","Cancel"))))))))}},898683,e=>{"use strict";var t=e.i(881868),n=e.i(343941),r=e.i(191788);function i(e,t){return e.getEditorState().read(()=>{let e=(0,n.$getNodeByKey)(t);return null!==e&&e.isSelected()})}function o(e){let[o]=(0,t.useLexicalComposerContext)(),[l,a]=(0,r.useState)(()=>i(o,e));return(0,r.useEffect)(()=>{let t=!0,n=o.registerUpdateListener(()=>{t&&a(i(o,e))});return()=>{t=!1,n()}},[o,e]),[l,(0,r.useCallback)(t=>{o.update(()=>{let r=(0,n.$getSelection)();(0,n.$isNodeSelection)(r)||(r=(0,n.$createNodeSelection)(),(0,n.$setSelection)(r)),(0,n.$isNodeSelection)(r)&&(t?r.add(e):r.delete(e))})},[o,e]),(0,r.useCallback)(()=>{o.update(()=>{let e=(0,n.$getSelection)();(0,n.$isNodeSelection)(e)&&e.clear()})},[o])]}e.s(["useLexicalNodeSelection",()=>o])},678779,575242,e=>{"use strict";e.s(["INSERT_IMAGE_COMMAND",()=>X,"allowSetImageDimensions$",()=>U,"closeImageDialog$",()=>K,"disableImageResize$",()=>$,"disableImageSettingsButton$",()=>H,"editImageToolbarComponent$",()=>Y,"imageAutocompleteSuggestions$",()=>L,"imageDialogState$",()=>z,"imagePlaceholder$",()=>V,"imagePlugin",()=>G,"imagePreviewHandler$",()=>B,"imageUploadHandler$",()=>F,"insertImage$",()=>P,"openEditImageDialog$",()=>W,"openNewImageDialog$",()=>j,"parseImageDimension",()=>q,"saveImage$",()=>J],678779);var t=e.i(717417),n=e.i(919444),r=e.i(578467),i=e.i(343941),o=e.i(125617),l=e.i(582645),a=e.i(317649),s=e.i(479771),u=e.i(536885);e.s(["$createImageNode",()=>w,"$isImageNode",()=>N,"ImageNode",()=>k],575242);var c=e.i(191788),d=i,f=e.i(881868),h=e.i(898683),p=e.i(272043),g=e.i(995711);function m(e,t,n){return Math.min(Math.max(e,t),n)}function x({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){let o=(0,c.useRef)(null),l=(0,c.useRef)({priority:"",value:"default"}),a=(0,c.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),s=i.getRootElement(),u=r??(null!==s?s.getBoundingClientRect().width-20:100),d=null!==s?s.getBoundingClientRect().height-20:100,f=(t,r)=>{if(!i.isEditable())return;let u=n.current,c=o.current;if(null!==u&&null!==c){let n;t.preventDefault();let{width:i,height:o}=u.getBoundingClientRect(),d=a.current;d.startWidth=i,d.startHeight=o,d.ratio=i/o,d.currentWidth=i,d.currentHeight=o,d.startX=t.clientX,d.startY=t.clientY,d.isResizing=!0,d.direction=r,n=1===r||4===r?"ew":8===r||2===r?"ns":8&r&&4&r||2&r&&1&r?"nwse":"nesw",null!==s&&s.style.setProperty("cursor",`${n}-resize`,"important"),null!==document.body&&(document.body.style.setProperty("cursor",`${n}-resize`,"important"),l.current.value=document.body.style.getPropertyValue("-webkit-user-select"),l.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important")),e(),c.classList.add(g.default.imageControlWrapperResizing),u.style.height=`${o}px`,u.style.width=`${i}px`,document.addEventListener("pointermove",h),document.addEventListener("pointerup",x)}}
5,h=e=>{let t=n.current,r=a.current,i=5&r.direction,o=10&r.direction;if(null!==t&&r.isResizing)if(i&&o){let n=Math.floor(r.startX-e.clientX);n=1&r.direction?-n:n;let i=m(r.startWidth+n,100,u),o=i/r.ratio;t.style.width=`${i}px`,t.style.height=`${o}px`,r.currentHeight=o,r.currentWidth=i}else if(o){let n=Math.floor(r.startY-e.clientY);n=2&r.direction?-n:n;let i=m(r.startHeight+n,100,d);t.style.height=`${i}px`,r.currentHeight=i}else{let n=Math.floor(r.startX-e.clientX);n=1&r.direction?-n:n;let i=m(r.startWidth+n,100,u);t.style.width=`${i}px`,r.currentWidth=i}},x=()=>{let e=n.current,r=a.current,i=o.current;if(null!==e&&null!==i&&r.isResizing){let e=r.currentWidth,n=r.currentHeight;r.startWidth=0,r.startHeight=0,r.ratio=0,r.startX=0,r.startY=0,r.currentWidth=0,r.currentHeight=0,r.isResizing=!1,i.classList.remove(g.default.imageControlWrapperResizing),null!==s&&s.style.setProperty("cursor","text"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",l.current.value,l.current.priority)),t(e,n),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",x)}};return c.createElement("div",{ref:o},c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerN),onPointerDown:e=>{f(e,8)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerNe),onPointerDown:e=>{f(e,9)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerE),onPointerDown:e=>{f(e,1)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerSe),onPointerDown:e=>{f(e,3)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerS),onPointerDown:e=>{f(e,2)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerSw),onPointerDown:e=>{f(e,6)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerW),onPointerDown:e=>{f(e,4)}}),c.createElement("div",{className:(0,p.default)(g.default.imageResizer,g.default.imageResizerNw),onPointerDown:e=>{f(e,12)}}))}let y="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
6    <svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
7      <rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
8      <text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
9    </svg>
10`),v={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{let n=new Image;n.onerror=()=>{this.__cache[e]=y,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function _({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:l}){return c.default.createElement("img",{className:n??void 0,alt:t,src:v.read(i),title:e,ref:r,draggable:"false",width:o,height:l})}function b({src:e,title:t,alt:o,nodeKey:l,width:s,height:u,rest:d}){let[m,y,v,b,T,E]=(0,r.useCellValues)(V,$,U,B,a.readOnly$,Y),S=c.default.useRef(null),k=c.default.useRef(null),[w,I,A]=(0,h.useLexicalNodeSelection)(l),[M]=(0,f.useLexicalComposerContext)(),[O,D]=c.default.useState(null),R=c.default.useRef(null),[P,L]=c.default.useState(!1),[F,z]=c.default.useState(null),[j,W]=c.default.useState(null),K=c.default.useCallback(e=>{if(w&&(0,i.$isNodeSelection)((0,i.$getSelection)())){e.preventDefault();let t=(0,i.$getNodeByKey)(l);N(t)&&t.remove()}return!1},[w,l]),H=c.default.useCallback(e=>{let t=(0,i.$getSelection)(),n=k.current;return!!(w&&(0,i.$isNodeSelection)(t))&&1===t.getNodes().length&&null!==n&&n!==document.activeElement&&(e.preventDefault(),n.focus(),!0)},[w]),J=c.default.useCallback(e=>k.current===e.target&&((0,i.$setSelection)(null),M.update(()=>{I(!0);let e=M.getRootElement();null!==e&&e.focus()}),!0),[M,I]);c.default.useEffect(()=>{b?(async()=>{j||W(e),z(await b(e))})().catch(e=>{console.error(e)}):z(e)},[e,b,j]),c.default.useEffect(()=>{if(v&&S.current){let{current:e}=S;C(e,"width",s),C(e,"height",u)}},[v,s,u]),c.default.useEffect(()=>{let e=!0,t=(0,n.mergeRegister)(M.registerUpdateListener(({editorState:t})=>{e&&D(t.read(()=>(0,i.$getSelection)()))}),M.registerCommand(i.SELECTION_CHANGE_COMMAND,(e,t)=>(R.current=t,!1),i.COMMAND_PRIORITY_LOW),M.registerCommand(i.CLICK_COMMAND,e=>!!P||e.target===S.current&&(e.shiftKey?I(!w):(A(),I(!0)),!0),i.COMMAND_PRIORITY_LOW),M.registerCommand(i.DRAGSTART_COMMAND,e=>e.target===S.current&&(e.preventDefault(),!0),i.COMMAND_PRIORITY_LOW),M.registerCommand(i.KEY_DELETE_COMMAND,K,i.COMMAND_PRIORITY_LOW),M.registerCommand(i.KEY_BACKSPACE_COMMAND,K,i.COMMAND_PRIORITY_LOW),M.registerCommand(i.KEY_ENTER_COMMAND,H,i.COMMAND_PRIORITY_LOW),M.registerCommand(i.KEY_ESCAPE_COMMAND,J,i.COMMAND_PRIORITY_LOW));return()=>{e=!1,t()}},[A,M,P,w,l,K,H,J,I]);let q=(0,i.$isNodeSelection)(O),G=c.default.useMemo(()=>
10{if(0===d.length)return null;let e=d.find(e=>"mdxJsxAttribute"===e.type&&("class"===e.name||"className"===e.name));return e?e.value:null},[d]);return null!==F?c.default.createElement(c.default.Suspense,{fallback:m?c.default.createElement(m,null):null},c.default.createElement("div",{className:g.default.imageWrapper,"data-editor-block-type":"image"},c.default.createElement("div",{draggable:q},c.default.createElement(_,{width:s,height:u,className:(0,p.default)({[g.default.focusedImage]:w},G),src:F,title:t??"",alt:o??"",imageRef:S})),q&&w&&!y&&c.default.createElement(x,{editor:M,imageRef:S,onResizeStart:()=>{L(!0)},onResizeEnd:(e,t)=>{setTimeout(()=>{L(!1)},200),M.update(()=>{let n=(0,i.$getNodeByKey)(l);N(n)&&n.setWidthAndHeight(e,t)})}}),T||c.default.createElement(E,{nodeKey:l,imageSource:F,initialImagePath:j,title:t??"",alt:o??"",width:s,height:u}))):null}let C=(e,t,n)=>{"number"==typeof n?e.style[t]=`${n}px`:e.style.removeProperty(t)};var T=Object.defineProperty,E=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?T(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};function S(e){if(e instanceof HTMLImageElement){let{alt:t,src:n,title:r,width:i,height:o}=e;return{node:w({altText:t,src:n,title:r,width:i,height:o})}}return null}class k extends d.DecoratorNode{constructor(e,t,n,r,i,o,l){super(l),E(this,"__src"),E(this,"__altText"),E(this,"__title"),E(this,"__width"),E(this,"__height"),E(this,"__rest"),this.__src=e,this.__title=n,this.__altText=t,this.__width=r??"inherit",this.__height=i??"inherit",this.__rest=o??[]}static getType(){return"image"}static clone(e){return new k(e.__src,e.__altText,e.__title,e.__width,e.__height,e.__rest,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__src=e.__src,this.__altText=e.__altText,this.__title=e.__title,this.__width=e.__width,this.__height=e.__height,this.__rest=e.__rest}static importJSON(e){let{altText:t,title:n,src:r,width:i,rest:o,height:l}=e;return w({altText:t,title:n,src:r,height:l,width:i,rest:o})}exportDOM(){let e=document.createElement("img");return e.setAttribute("src",this.__src),e.setAttribute("alt",this.__altText),this.__title&&e.setAttribute("title",this.__title),this.__width&&e.setAttribute("width",this.__width.toString()),this.__height&&e.setAttribute("height",this.__height.toString()),{element:e}}static importDOM(){return{img:()=>({conversion:S,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:"inherit"===this.__height?0:this.__height,width:"inherit"===this.__width?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(e,t){let n=this.getWritable();n.__width=e,n.__height=t}createDOM(e,t){let n=document.createElement("span"),r=e.theme.image;return void 0!==r&&(n.className=r),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(e){this.getWritable().__title=e}setSrc(e){this.getWritable().__src=e}setAltText(e){this.getWritable().__altText=e??""}shouldBeSerializedAsElement(){return"inherit"!==this.__width||"inherit"!==this.__height||this.__rest.length>0}decorate(e){return c.default.createElement(b,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function w(e){let{altText:t,title:n,src:r,key:i,width:o,height:l,rest:a}=e;return new k(r,t,n,o,l,a,i)}function N(e){return e instanceof k}let I={testLexicalNode:N,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){let r=new Image;for(let e of("inherit"!==t.getHeight()&&(r.height=t.getHeight()),"inherit"!==t.getWidth()&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle()),t.getRest()))"mdxJsxAttribute"===e.type&&"string"==typeof e.value&&r.setAttribute(e.name,e.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()})}},A={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(w({src:e.url,altText:e.alt??"",title:e.title??""}))}},M={testNode:e=>"html"===e.type&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){let n=document.createElement("div");n.innerHTML=e.value;let r=n.querySelector("img");if(!r)throw Error("Invalid HTML image");let o=r.src,l=r.alt,a=r.title,s=w({src:o||"",altText:l,title:a,width:r.width,height:r.height});if("root"===t.getType()){let e=(0,i.$createParagraphNode)();e.append(s),t.append(e)}else t.append(s)}};function O(e,t){let n=e.attributes.find(e=>"mdxJsxAttribute"===e.type&&e.name===t);if(n)return n.value}let D={testNode:e=>("mdxJsxTextElement"===e.type||"mdxJsxFlowElement"===e.type)&&"img"===e.name,visitNode({mdastNode:e,lexicalParent:t}){let n=O(e,"src");if(!n)return;let r=O(e,"alt")??"",o=O(e,"title"),l=O(e,"height"),a=O(e,"width"),s=e.attributes.filter(e=>"mdxJsxAttribute"===e.type&&!["src","alt","title","height","width"].includes(e.name)),u=w({src:n,altText:r,title:o,width:a?parseInt(a,10):void 0,height:l?parseInt(l,10):void 0,rest:s});if("root"===t.getType()){let e=(0,i.$createParagraphNode)();e.append(u),t.append(e)}else t.append(u)}},R=(0,r.Signal)(e=>{e.sub(e.pipe(R,(0,r.withLatestFrom)(a.activeEditor$)),([e,t])=>{null==t||t.update(()=>{let t=w({altText:e.altText??"",src:e.src,title:e.title??"",width:q(e.width),height:q(e.height)});
10(0,i.$insertNodes)([t]),(0,i.$isRootOrShadowRoot)(t.getParentOrThrow())&&(0,n.$wrapNodeInElement)(t,i.$createParagraphNode).selectEnd()})})}),P=(0,r.Signal)(e=>{e.sub(e.pipe(P,(0,r.withLatestFrom)(F)),([t,n])=>{let r=n=>{e.pub(R,{...t,src:n})};"file"in t?null==n||n(t.file).then(r).catch(e=>{throw e}):r(t.src)})}),L=(0,r.Cell)([]),$=(0,r.Cell)(!1),F=(0,r.Cell)(null),B=(0,r.Cell)(null),V=(0,r.Cell)(null),z=(0,r.Cell)({type:"inactive"},e=>{e.sub(e.pipe(J,(0,r.withLatestFrom)(a.activeEditor$,F,z,U)),([t,n,r,o,l])=>{let a="editing"===o.type?r=>{null==n||n.update(()=>{let{nodeKey:e}=o,n=(0,i.$getNodeByKey)(e);if(n.setTitle(t.title),n.setAltText(t.altText),n.setSrc(r),l){let e=q(t.width),r=q(t.height);n.setWidthAndHeight(e??"inherit",r??"inherit")}}),e.pub(z,{type:"inactive"})}:n=>{e.pub(R,{...t,src:n}),e.pub(z,{type:"inactive"})};t.file&&t.file.length>0?null==r||r(t.file.item(0)).then(a).catch(e=>{throw e}):t.src&&a(t.src)}),e.pub(a.createActiveEditorSubscription$,t=>{let r=e.getValue(F);return(0,n.mergeRegister)(t.registerCommand(X,e=>{let t=w(e);return(0,i.$insertNodes)([t]),(0,i.$isRootOrShadowRoot)(t.getParentOrThrow())&&(0,n.$wrapNodeInElement)(t,i.$createParagraphNode).selectEnd(),!0},i.COMMAND_PRIORITY_EDITOR),t.registerCommand(i.DRAGSTART_COMMAND,e=>(function(e){let t=Q();if(!t)return!1;let n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");let r=document.createElement("img");return r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",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})(e),i.COMMAND_PRIORITY_HIGH),t.registerCommand(i.DRAGOVER_COMMAND,e=>(function(e,t){var n;if(t){let t=Array.from((null==(n=e.dataTransfer)?void 0:n.items)??[]);if((t=t.filter(e=>e.type.includes("image"))).length>0)return e.preventDefault(),!0}return!!Q()&&(Z(e)||e.preventDefault(),!0)})(e,!!r),i.COMMAND_PRIORITY_LOW),t.registerCommand(i.DROP_COMMAND,n=>(function(e,t,n){var r;let o=Array.from((null==(r=e.dataTransfer)?void 0:r.items)??[]);if((o=o.filter(e=>e.type.includes("image"))).length>0&&null!==n)return e.preventDefault(),Promise.all(o.map(e=>"string"===e.kind?new Promise(t=>{e.getAsString(t)}):n(e.getAsFile()))).then(e=>{e.forEach(e=>{t.dispatchCommand(X,{src:e,altText:""})})}).catch(e=>{throw e}),!0;let a=Q();if(!a)return!1;let s=function(e){var t;let n=null==(t=e.dataTransfer)?void 0:t.getData("application/x-lexical-drag");if(!n)return null;let{type:r,data:i}=JSON.parse(n);return"image"!==r?null:i}(e);if(!s)return!1;if(e.preventDefault(),Z(e)){let n=function(e){let t,n,r=e.target,i=(n=null==r?null:9===r.nodeType?r.defaultView:r.ownerDocument.defaultView,l.CAN_USE_DOM?(n??window).getSelection():null);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&null!==i)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}(e);a.remove();let r=(0,i.$createRangeSelection)();null!=n&&r.applyDOMRange(n),(0,i.$setSelection)(r),t.dispatchCommand(X,s)}return!0})(n,t,e.getValue(F)),i.COMMAND_PRIORITY_HIGH),t.registerCommand(i.PASTE_COMMAND,n=>{var i,o;if(!r){let e=Array.from((null==(i=n.clipboardData)?void 0:i.items)??[]);return!(e=e.filter(e=>e.type.includes("text"))).length||0===e.length}let l=Array.from((null==(o=n.clipboardData)?void 0:o.items)??[]);if(l.some(e=>!e.type.includes("image"))||!l.length||0===l.length)return!1;let a=e.getValue(F);return Promise.all(l.map(e=>a(e.getAsFile()))).then(e=>{e.forEach(e=>{t.dispatchCommand(X,{src:e,altText:""})})}).catch(e=>{throw e}),!0},i.COMMAND_PRIORITY_CRITICAL))})}),j=(0,r.Action)(e=>{e.link(e.pipe(j,(0,r.mapTo)({type:"new"})),z)}),W=(0,r.Signal)(e=>{e.link(e.pipe(W,(0,r.map)(e=>({type:"editing",...e}))),z)}),K=(0,r.Action)(e=>{e.link(e.pipe(K,(0,r.mapTo)({type:"inactive"})),z)}),H=(0,r.Cell)(!1),U=(0,r.Cell)(!1),J=(0,r.Signal)(),Y=(0,r.Cell)(s.EditImageToolbar),q=e=>{if(void 0===e)return;let t=parseInt(String(e),10);return Number.isNaN(t)?void 0:t},G=(0,o.realmPlugin)({init(e,n){e.pubIn({[a.addImportVisitor$]:[A,M,D],[a.addLexicalNode$]:k,[a.addExportVisitor$]:I,[a.addComposerChild$]:(null==n?void 0:n.ImageDialog)??u.ImageDialog,[F]:(null==n?void 0:n.imageUploadHandler)??null,[L]:(null==n?void 0:n.imageAutocompleteSuggestions)??[],[$]:!!(null==n?void 0:n.disableImageResize),[H]:!!(null==n?void 0:n.disableImageSettingsButton),[U]:!!(null==n?void 0:n.allowSetImageDimensions),[B]:(null==n?void 0:n.imagePreviewHandler)??null,[Y]:(null==n?void 0:n.EditImageToolbar)??s.EditImageToolbar,[V]:(null==n?void 0:n.imagePlaceholder)??t.ImagePlaceholder})},update(e,n){e.pubIn({[F]:(null==n?void 0:n.imageUploadHandler)??null,[L]:(null==n?void 0:n.imageAutocompleteSuggestions)??[],[$]:!!(null==n?void 0:n.disableImageResize),[B]:(null==n?void 0:n.imagePreviewHandler)??null,[U]:!!(null==n?void 0:n.allowSetImageDimensions),[Y]:(null==n?void 0:n.EditImageToolbar)??s.EditImageToolbar,[V]:(null==n?void 0:n.imagePlaceholder)??t.ImagePlaceholder})}}),X=(0,i.createCommand)("INSERT_IMAGE_COMMAND");function Q(){let e=(0,i.$getSelection)();if(!(0,i.$isNodeSelection)(e))return null;let t=e.getNodes()[0];return N(t)?t:null}function Z(e){let t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}},752921,e=>{"use strict";var t=e.i(919444),n=e.i(343941);let r=new Set(["http:","https:","mailto:","sms:","tel:"]);class i extends n.ElementNode{static getType(){return"link"}static clone(e){return new i(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},n){super(n);const{target:r=null,rel:i=null,title:o=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=o}createDOM(e){let n=document.createElement("a");return this.updateLinkDOM(null,n,e),(0,t.addClassNamesToElement)(n,e.theme.link),n}updateLinkDOM(e,t,r){if((0,n.isHTMLAnchorElement)(t))for(let n of(e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url)),["target","rel","title"])){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:o,priority:1})}}static importJSON(e){return l().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=m(e);try{let t=new URL(m(e));if(!r.has(t.protocol))return"about:blank"}catch(e){}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=l(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!(0,n.$isRangeSelection)(t))return!1;let i=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function o(e){let t=null;if((0,n.isHTMLAnchorElement)(e)){let n=e.textContent;(null!==n&&""!==n||e.children.length>0)&&(t=l(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function l(e="",t){return(0,n.$applyNodeReplacement)(new i(e,t))}function a(e){return e instanceof i}class s extends i{constructor(e="",t={},n){super(e,t,n),this.__isUnlinked=void 0!==t.isUnlinked&&null!==t.isUnlinked&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new s(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return u().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let r=this.getParentOrThrow().insertNewAfter(e,t);if((0,n.$isElementNode)(r)){let e=u(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(e),e}return null}}function u(e="",t){return(0,n.$applyNodeReplacement)(new s(e,t))}function c(e){return e instanceof s}let d=(0,n.createCommand)("TOGGLE_LINK_COMMAND");function f(e,t){if("element"===e.type){let r=e.getNode();return(0,n.$isElementNode)(r)||function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",252),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #252; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(0),r.getChildren()[e.offset+t]||null}return null}function h(e,r={}){let{target:i,title:o}=r,s=void 0===r.rel?"noreferrer":r.rel,u=(0,n.$getSelection)();if(null===u||!(0,n.$isRangeSelection)(u)&&!(0,n.$isNodeSelection)(u))return;if((0,n.$isNodeSelection)(u)){let n=u.getNodes();if(0===n.length)return;
10return void n.forEach(n=>{if(null===e){let e=(0,t.$findMatchingParent)(n,e=>!c(e)&&a(e));e&&(e.insertBefore(n),0===e.getChildren().length&&e.remove())}else{let r=(0,t.$findMatchingParent)(n,e=>!c(e)&&a(e));if(r)r.setURL(e),void 0!==i&&r.setTarget(i),void 0!==s&&r.setRel(s);else{let t=l(e,{rel:s,target:i});n.insertBefore(t),t.append(n)}}})}let d=u.extract();if(null===e)return void d.forEach(e=>{let n=(0,t.$findMatchingParent)(e,e=>!c(e)&&a(e));if(n){let e=n.getChildren();for(let t=0;t<e.length;t++)n.insertBefore(e[t]);n.remove()}});let g=new Set,m=t=>{g.has(t.getKey())||(g.add(t.getKey()),t.setURL(e),void 0!==i&&t.setTarget(i),void 0!==s&&t.setRel(s),void 0!==o&&t.setTitle(o))};if(1===d.length){let e=p(d[0],a);if(null!==e)return m(e)}!function(e){let t=(0,n.$getSelection)();if(!(0,n.$isRangeSelection)(t))return e();let r=(0,n.$normalizeSelection__EXPERIMENTAL)(t),i=r.isBackward(),o=f(r.anchor,i?-1:0),l=f(r.focus,i?0:-1);if(e(),o||l){let e=(0,n.$getSelection)();if((0,n.$isRangeSelection)(e)){let t=e.clone();if(o){let e=o.getParent();e&&t.anchor.set(e.getKey(),o.getIndexWithinParent()+ +!!i,"element")}if(l){let e=l.getParent();e&&t.focus.set(e.getKey(),l.getIndexWithinParent()+ +!i,"element")}(0,n.$setSelection)((0,n.$normalizeSelection__EXPERIMENTAL)(t))}}}(()=>{let t=null;for(let r of d){if(!r.isAttached())continue;let u=p(r,a);if(u){m(u);continue}if((0,n.$isElementNode)(r)){if(!r.isInline())continue;if(a(r)){if(!(c(r)||null!==t&&t.getParentOrThrow().isParentOf(r))){m(r),t=r;continue}for(let e of r.getChildren())r.insertBefore(e);r.remove();continue}}let d=r.getPreviousSibling();a(d)&&d.is(t)?d.append(r):(t=l(e,{rel:s,target:i,title:o}),r.insertAfter(t),t.append(r))}})}function p(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}let g=/^\+?[0-9\s()-]{5,}$/;function m(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:g.test(e)?`tel:${e}`:`https://${e}`}e.s(["$createAutoLinkNode",()=>u,"$createLinkNode",()=>l,"$isAutoLinkNode",()=>c,"$isLinkNode",()=>a,"$toggleLink",()=>h,"AutoLinkNode",()=>s,"LinkNode",()=>i,"TOGGLE_LINK_COMMAND",()=>d])},246034,e=>{"use strict";var t=e.i(191788),n=e.i(752921);let r={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto((0,n.$createLinkNode)(e.url,{title:e.title}))}},i={testLexicalNode:n.$isLinkNode,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};var o=e.i(881868),l=e.i(919444),a=e.i(343941);function s({validateUrl:e,attributes:r}){let[i]=(0,o.useLexicalComposerContext)();return(0,t.useEffect)(()=>{if(!i.hasNodes([n.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return(0,l.mergeRegister)(i.registerCommand(n.TOGGLE_LINK_COMMAND,t=>{if(null===t)return(0,n.$toggleLink)(t),!0;if("string"==typeof t)return!(void 0!==e&&!e(t))&&((0,n.$toggleLink)(t,r),!0);{let{url:e,target:i,rel:o,title:l}=t;return(0,n.$toggleLink)(e,{...r,rel:o,target:i,title:l}),!0}},a.COMMAND_PRIORITY_LOW),void 0!==e?i.registerCommand(a.PASTE_COMMAND,t=>{let o=(0,a.$getSelection)();if(!(0,a.$isRangeSelection)(o)||o.isCollapsed()||!(0,l.objectKlassEquals)(t,ClipboardEvent)||null===t.clipboardData)return!1;let s=t.clipboardData.getData("text");return!!e(s)&&!o.getNodes().some(e=>(0,a.$isElementNode)(e))&&(i.dispatchCommand(n.TOGGLE_LINK_COMMAND,{...r,url:s}),t.preventDefault(),!0)},a.COMMAND_PRIORITY_LOW):()=>{})},[i,e,r]),null}function u(e,t=e=>e){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function c(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}let d=/[.,;\s]/;function f(e){return d.test(e)}function h(e){return f(e[e.length-1])}function p(e){let t=e.getPreviousSibling();return(0,a.$isElementNode)(t)&&(t=t.getLastDescendant()),null===t||(0,a.$isLineBreakNode)(t)||(0,a.$isTextNode)(t)&&h(t.getTextContent())}function g(e){let t=e.getNextSibling();return(0,a.$isElementNode)(t)&&(t=t.getFirstDescendant()),null===t||(0,a.$isLineBreakNode)(t)||(0,a.$isTextNode)(t)&&f(t.getTextContent()[0])}function m(e,t,n){let r=e.getChildren(),i=r.length;for(let t=0;t<i;t++){let i=r[t];if(!(0,a.$isTextNode)(i)||!i.isSimpleText())return x(e),void n(null,e.getURL())}let o=e.getTextContent(),l=c(o,t);
10if(null===l||l.text!==o||!p(e)||!g(e))return x(e),void n(null,e.getURL());let s=e.getURL();if(s!==l.url&&(e.setURL(l.url),n(l.url,s)),l.attributes){let t=e.getRel();t!==l.attributes.rel&&(e.setRel(l.attributes.rel||null),n(l.attributes.rel||null,t));let r=e.getTarget();r!==l.attributes.target&&(e.setTarget(l.attributes.target||null),n(l.attributes.target||null,r))}}function x(e){let t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}function y({matchers:e,onChange:r}){let[i]=(0,o.useLexicalComposerContext)();return(0,t.useEffect)(()=>{i.hasNodes([n.AutoLinkNode])||function(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let e of(r.append("code",77),t))r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #77; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(0);let t=(e,t)=>{r&&r(e,t)};return(0,l.mergeRegister)(i.registerNodeTransform(a.TextNode,r=>{let i=r.getParentOrThrow(),o=r.getPreviousSibling();if((0,n.$isAutoLinkNode)(i)&&!i.getIsUnlinked())m(i,e,t);else if(!(0,n.$isLinkNode)(i)){var l,s,u;let i,d,y;r.isSimpleText()&&(f(r.getTextContent()[0])||!(0,n.$isAutoLinkNode)(o))&&function(e,t,r){let i=[...e],o=i.map(e=>e.getTextContent()).join(""),l,s=o,u=0;for(;(l=c(s,t))&&null!==l;){var d,h,m;let e=l.index,t=e+l.length;if(d=u+e,h=u+t,m=i,(d>0?f(o[d-1]):p(m[0]))&&(h<o.length?f(o[h]):g(m[m.length-1]))){let[o,,s,c]=function(e,t,n){let r=[],i=[],o=[],l=0,a=0,s=[...e];for(;s.length>0;){let e=s[0],u=e.getTextContent().length,c=a;a+u<=t?(r.push(e),l+=u):c>=n?o.push(e):i.push(e),a+=u,s.shift()}return[l,r,i,o]}(i,u+e,u+t),d=function(e,t,r,i){let o=(0,n.$createAutoLinkNode)(i.url,i.attributes);if(1===e.length){let n,l=e[0];0===t?[n,l]=l.splitText(r):[,n,l]=l.splitText(t,r);let s=(0,a.$createTextNode)(i.text);return s.setFormat(n.getFormat()),s.setDetail(n.getDetail()),s.setStyle(n.getStyle()),o.append(s),n.replace(o),l}if(e.length>1){let n,i=e[0],l,s=i.getTextContent().length;0===t?l=i:[,l]=i.splitText(t);let u=[];for(let t=1;t<e.length;t++){let i=e[t],o=i.getTextContent().length,l=s;if(l<r)if(s+o<=r)u.push(i);else{let[e,t]=i.splitText(r-l);u.push(e),n=t}s+=o}let c=(0,a.$getSelection)(),d=c?c.getNodes().find(a.$isTextNode):void 0,f=(0,a.$createTextNode)(l.getTextContent());return f.setFormat(l.getFormat()),f.setDetail(l.getDetail()),f.setStyle(l.getStyle()),o.append(f,...u),d&&d===l&&((0,a.$isRangeSelection)(c)?f.select(c.anchor.offset,c.focus.offset):(0,a.$isNodeSelection)(c)&&f.select(0,f.getTextContent().length)),l.replace(o),n}}(s,u+e-o,u+t-o,l);i=d?[d,...c]:c,r(l.url,null),u=0}else u+=t;s=s.substring(t)}}(function(e){let t=[e],n=e.getNextSibling();for(;null!==n&&(0,a.$isTextNode)(n)&&n.isSimpleText()&&(t.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(r),e,t);l=r,s=e,u=t,i=l.getPreviousSibling(),d=l.getNextSibling(),y=l.getTextContent(),!(0,n.$isAutoLinkNode)(i)||i.getIsUnlinked()||f(y[0])&&!(i.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(y):/^\.[a-zA-Z0-9]{1,}/.test(y))||(i.append(l),m(i,s,u),u(null,i.getURL())),!(0,n.$isAutoLinkNode)(d)||d.getIsUnlinked()||h(y)||(x(d),m(d,s,u),u(null,d.getURL()))}}),i.registerCommand(n.TOGGLE_LINK_COMMAND,e=>{let t=(0,a.$getSelection)();return null===e&&!!(0,a.$isRangeSelection)(t)&&(t.extract().forEach(e=>{let t=e.getParent();(0,n.$isAutoLinkNode)(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1)},a.COMMAND_PRIORITY_LOW))},[i,e,r]),null}let v=[u(/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,e=>e.startsWith("http")?e:`https://${e}`),u(/(([^<>()[\]\\.,;:\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,}))/,e=>`mailto:${e}`)],_=()=>t.default.createElement(y,{matchers:v});var b=e.i(578467),C=e.i(125617),T=e.i(317649);let E=(0,b.Cell)(!1),S=(0,C.realmPlugin)({init(e,o){let l=!!(null==o?void 0:o.disableAutoLink),a=(null==o?void 0:o.validateUrl)?{validateUrl:o.validateUrl}:{},u=()=>t.default.createElement(t.default.Fragment,null,t.default.createElement(s,{...a}),l?null:t.default.createElement(_,null));e.pubIn({[T.addActivePlugin$]:"link",[T.addImportVisitor$]:r,[T.addLexicalNode$]:[n.LinkNode,n.AutoLinkNode],[T.addExportVisitor$]:i,[E]:l,[T.addNestedEditorChild$]:u,[T.addComposerChild$]:u})}});e.s(["disableAutoLink$",()=>E,"linkPlugin",()=>S],246034)},365774,e=>{"use strict";var t=e.i(919444),n=e.i(343941),r=e.i(995013);function i(e,...t){let n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let n of(r.append("code",e),t))r.append("v",n);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function o(e){let t=1,n=e.getParent();for(;null!=n;){if(v(n)){let e=n.getParent();if(k(e)){t++,n=e.getParent();continue}i(40)}break}return t}function l(e){let t=e.getParent();k(t)||i(40);let n=t;for(;null!==n;)k(n=n.getParent())&&(t=n);return t}function a(e){return v(e)&&k(e.getFirstChild())}function s(e){return y().append(e)}function u(e,t){return v(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function c(e){let t=(0,n.$getSelection)();if(null!==t){let r=t.getNodes();if((0,n.$isRangeSelection)(t)){let o=t.getStartEndPoints();null===o&&i(143);let[l]=o,a=l.getNode(),s=a.getParent();if((0,n.$isRootOrShadowRoot)(a)){let e=a.getFirstChild();if(e)r=e.selectStart().getNodes();else{let e=(0,n.$createParagraphNode)();a.append(e),r=e.select().getNodes()}}else if(u(a,r)){let t=S(e);if((0,n.$isRootOrShadowRoot)(s)){a.replace(t);let e=y();(0,n.$isElementNode)(a)&&(e.setFormat(a.getFormatType()),e.setIndent(a.getIndent())),t.append(e)}else if(v(a)){let e=a.getParentOrThrow();d(t,e.getChildren()),e.replace(t)}return}}let o=new Set;for(let t=0;t<r.length;t++){let i=r[t];if((0,n.$isElementNode)(i)&&i.isEmpty()&&!v(i)&&!o.has(i.getKey())){f(i,e);continue}let l=(0,n.$isLeafNode)(i)?i.getParent():v(i)&&i.isEmpty()?i:null;for(;null!=l;){let t=l.getKey();if(k(l)){if(!o.has(t)){let n=S(e);d(n,l.getChildren()),l.replace(n),o.add(t)}break}{let r=l.getParent();if((0,n.$isRootOrShadowRoot)(r)&&!o.has(t)){o.add(t),f(l,e);break}l=r}}}}}function d(e,t){e.splice(e.getChildrenSize(),0,t)}function f(e,t){let n;if(k(e))return e;let r=e.getPreviousSibling(),i=e.getNextSibling(),o=y();
10if(d(o,e.getChildren()),k(r)&&t===r.getListType())r.append(o),k(i)&&t===i.getListType()&&(d(r,i.getChildren()),i.remove()),n=r;else if(k(i)&&t===i.getListType())i.getFirstChildOrThrow().insertBefore(o),n=i;else{let r=S(t);r.append(o),e.replace(r),n=r}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),n}function h(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&a(n)&&a(r)&&(h(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function p(e){let t="check"!==e.getListType(),n=e.getStart();for(let r of e.getChildren())v(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),k(r.getFirstChild())||n++)}function g(...e){let t=[];for(let n of e)if(n&&"string"==typeof n)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}class m extends n.ElementNode{$config(){return this.config("listitem",{$transform:e=>{if(null==e.__checked)return;let t=e.getParent();k(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)},extends:n.ElementNode,importDOM:(0,n.buildImportMap)({li:()=>({conversion:x,priority:0})})})}constructor(e=1,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,n,i){let o=this.getParent();k(o)&&"check"===o.getListType()&&(k(this.getFirstChild())?(n.removeAttribute("role"),n.removeAttribute("tabIndex"),n.removeAttribute("aria-checked")):(n.setAttribute("role","checkbox"),n.setAttribute("tabIndex","-1"),e&&this.__checked===e.__checked||n.setAttribute("aria-checked",this.getChecked()?"true":"false"))),n.value=this.__value,function(e,n,r){let i,o=[],l=[],a=n.list,s=a?a.listitem:void 0;if(a&&a.nested&&(i=a.nested.listitem),void 0!==s&&o.push(...g(s)),a){let e=r.getParent(),t=k(e)&&"check"===e.getListType(),n=r.getChecked();t&&!n||l.push(a.listitemUnchecked),t&&n||l.push(a.listitemChecked),t&&o.push(n?a.listitemChecked:a.listitemUnchecked)}if(void 0!==i){let e=g(i);r.getChildren().some(e=>k(e))?o.push(...e):l.push(...e)}l.length>0&&(0,t.removeClassNamesFromElement)(e,...l),o.length>0&&(0,t.addClassNamesToElement)(e,...o)}(n,i.theme,this);let l=e?e.__style:"",a=this.__style;l!==a&&(""===a?n.removeAttribute("style"):n.style.cssText=a),function(e,t,n){let i=(0,r.getStyleObjectFromCSS)(t.__textStyle);for(let t in i)e.style.setProperty(`--listitem-marker-${t}`,i[t]);if(n)for(let t in(0,r.getStyleObjectFromCSS)(n.__textStyle))t in i||e.style.removeProperty(`--listitem-marker-${t}`)}(n,this,e)}updateDOM(e,t,n){return this.updateListItemDOM(e,t,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let r=e[t];if((0,n.$isElementNode)(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(v(e))return super.replace(e);this.setIndent(0);let r=this.getParentOrThrow();if(!k(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{let t=S(r.getListType()),n=this.getNextSibling();for(;n;){let e=n;n=n.getNextSibling(),t.append(e)}r.insertAfter(e),e.insertAfter(t)}return t&&((0,n.$isElementNode)(e)||i(139),this.getChildren().forEac
10h(t=>{e.append(t)})),this.remove(),0===r.getChildrenSize()&&r.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if(k(n)||i(39),v(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){let i=S(n.getListType());r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&a(t)&&a(n)&&(h(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){let n=y().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){let t=(0,n.$createParagraphNode)();this.getChildren().forEach(e=>t.append(e));let r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=v(i);if(1===r.getChildrenSize())if(o)r.remove(),i.select();else{r.insertBefore(t),r.remove();let n=e.anchor,i=e.focus,o=t.getKey();"element"===n.type&&n.getNode().is(this)&&n.set(o,n.offset,"element"),"element"===i.type&&i.getNode().is(this)&&i.set(o,i.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e,t=this.getLatest(),n=this.getParent();return k(n)&&(e=n.getListType()),"check"===e?!!t.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;v(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){"number"!=typeof e&&i(117),(e=Math.floor(e))>=0||i(199);let t=this.getIndent();for(;t!==e;)t<e?(function(e){let t=new Set;if(a(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(a(r)&&a(i)){let n=i.getFirstChild();if(k(n)){n.append(e);let i=r.getFirstChild();k(i)&&(d(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(a(r)){let t=r.getFirstChild();if(k(t)){let n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if(a(i)){let t=i.getFirstChild();k(t)&&t.append(e)}else if(k(n)){let t=y().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),o=S(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());t.append(o),o.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}(this),t++):(function(e){if(a(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if(k(n?n.getParent():void 0)&&v(n)&&k(t)){let 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{let r=t.getListType(),i=y(),o=S(r);
10i.append(o),e.getPreviousSiblings().forEach(e=>o.append(e));let l=y(),a=S(r);l.append(a),d(a,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(l),n.replace(e)}}}(this),t--);return this}canInsertAfter(e){return v(e)}canReplaceWith(e){return v(e)}canMergeWith(e){return v(e)||(0,n.$isParagraphNode)(e)}extractWithChild(e,t){if(!(0,n.$isRangeSelection)(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return S("bullet")}canMergeWhenEmpty(){return!0}}function x(e){if(e.classList.contains("task-list-item")){for(let n of e.children)if("INPUT"===n.tagName){var t;return"checkbox"!==(t=n).getAttribute("type")?{node:null}:{node:y(t.hasAttribute("checked"))}}}let n=e.getAttribute("aria-checked");return{node:y("true"===n||"false"!==n&&void 0)}}function y(e){return(0,n.$applyNodeReplacement)(new m(void 0,e))}function v(e){return e instanceof m}class _ extends n.ElementNode{$config(){return this.config("list",{$transform:e=>{let t;k(t=e.getNextSibling())&&e.getListType()===t.getListType()&&h(e,t),p(e)},extends:n.ElementNode,importDOM:(0,n.buildImportMap)({ol:()=>({conversion:T,priority:0}),ul:()=>({conversion:T,priority:0})})})}constructor(e="number",t=1,n){super(n);const r=E[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,b(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||(b(t,n.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return(0,n.isHTMLElement)(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,r){let i=r;for(let e=0;e<r.length;e++){let t=r[e];v(t)||(i===r&&(i=[...r]),i[e]=y().append(!(0,n.$isElementNode)(t)||k(t)||t.isInline()?t:(0,n.$createTextNode)(t.getTextContent())))}return super.splice(e,t,i)}extractWithChild(e){return v(e)}}function b(e,n,r){let i=[],l=[],a=n.list;if(void 0!==a){let e,t=a[`${r.__tag}Depth`]||[],n=o(r)-1,s=n%t.length,u=t[s],c=a[r.__tag],d=a.nested,f=a.checklist;if(void 0!==d&&d.list&&(e=d.list),void 0!==c&&i.push(c),void 0!==f&&"check"===r.__listType&&i.push(f),void 0!==u){i.push(...g(u));for(let e=0;e<t.length;e++)e!==s&&l.push(r.__tag+e)}if(void 0!==e){let t=g(e);n>1?i.push(...t):l.push(...t)}}l.length>0&&(0,t.removeClassNamesFromElement)(e,...l),i.length>0&&(0,t.addClassNamesToElement)(e,...i)}function C(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(v(r)){t.push(r);let e=r.getChildren();e.length>1&&e.forEach(e=>{k(e)&&t.push(s(e))})}else t.push(s(r))}return t}function T(e){let t=e.nodeName.toLowerCase(),r=null;return"ol"===t?r=S("number",e.start):"ul"===t&&(r=!function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list"))return!0;for(let t of e.childNodes)if((0,n.isHTMLElement)(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?S("bullet"):S("check")),{after:C,node:r}}let E={ol:"number",ul:"bullet"};function S(e="number",t=1){return(0,n.$applyNodeReplacement)(new _(e,t))}function k(e){return e instanceof _}let w=(0,n.createCommand)("INSERT_CHECK_LIST_COMMAND");function N(e){return(0,t.mergeRegister)(e.registerCommand(w,()=>(c("check"),!0),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ARROW_DOWN_COMMAND,t=>D(t,e,!1),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ARROW_UP_COMMAND,t=>D(t,e,!0),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ESCAPE_COMMAND,()=>{if(null!=O()){let t=e.getRootElement();return null!=t&&t.focus(),!0}return!1},n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_SPACE_COMMAND,t=>{let r=O();return!(null==r||!e.isEditable())&&(e.update(()=>{let e=(0,n.$getNearestNodeFromDOMNode)(r);v(e)&&(t.preventDefault(),e.toggleChecked())}),!0)}
10,n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ARROW_LEFT_COMMAND,r=>e.getEditorState().read(()=>{let i=(0,n.$getSelection)();if((0,n.$isRangeSelection)(i)&&i.isCollapsed()){let{anchor:o}=i,l="element"===o.type;if(l||0===o.offset){let i=o.getNode(),a=(0,t.$findMatchingParent)(i,e=>(0,n.$isElementNode)(e)&&!e.isInline());if(v(a)){let t=a.getParent();if(k(t)&&"check"===t.getListType()&&(l||a.getFirstDescendant()===i)){let t=e.getElementByKey(a.__key);if(null!=t&&document.activeElement!==t)return t.focus(),r.preventDefault(),!0}}}}return!1}),n.COMMAND_PRIORITY_LOW),e.registerRootListener((e,t)=>{null!==e&&(e.addEventListener("click",A),e.addEventListener("pointerdown",M)),null!==t&&(t.removeEventListener("click",A),t.removeEventListener("pointerdown",M))}))}function I(e,r){let i=e.target;if(!(0,n.isHTMLElement)(i))return;let o=i.firstChild;if((0,n.isHTMLElement)(o)&&("UL"===o.tagName||"OL"===o.tagName))return;let l=i.parentNode;if(!l||"check"!==l.__lexicalListType)return;let a=i.getBoundingClientRect(),s=(0,t.calculateZoomLevel)(i),u=e.clientX/s,c=parseFloat((window.getComputedStyle?window.getComputedStyle(i,"::before"):{width:"0px"}).width),d=32*("touch"===e.pointerType);("rtl"===i.dir?u<a.right+d&&u>a.right-c-d:u>a.left-d&&u<a.left+c+d)&&r()}function A(e){I(e,()=>{if((0,n.isHTMLElement)(e.target)){let t=e.target,r=(0,n.getNearestEditorFromDOMNode)(t);null!=r&&r.isEditable()&&r.update(()=>{let e=(0,n.$getNearestNodeFromDOMNode)(t);v(e)&&(t.focus(),e.toggleChecked())})}})}function M(e){I(e,()=>{e.preventDefault()})}function O(){let e=document.activeElement;return(0,n.isHTMLElement)(e)&&"LI"===e.tagName&&null!=e.parentNode&&"check"===e.parentNode.__lexicalListType?e:null}function D(e,t,r){let i=O();return null!=i&&t.update(()=>{let o=(0,n.$getNearestNodeFromDOMNode)(i);if(!v(o))return;let l=function(e,t){let n=t?e.getPreviousSibling():e.getNextSibling(),r=e;for(;null==n&&v(r);)null!=(r=r.getParentOrThrow().getParent())&&(n=t?r.getPreviousSibling():r.getNextSibling());for(;v(n);){let e=t?n.getLastChild():n.getFirstChild();if(!k(e))return n;n=t?e.getLastChild():e.getFirstChild()}return null}(o,r);if(null!=l){l.selectStart();let n=t.getElementByKey(l.__key);null!=n&&(e.preventDefault(),setTimeout(()=>{n.focus()},0))}}),!1}let R=(0,n.createCommand)("UPDATE_LIST_START_COMMAND"),P=(0,n.createCommand)("INSERT_UNORDERED_LIST_COMMAND"),L=(0,n.createCommand)("INSERT_ORDERED_LIST_COMMAND"),$=(0,n.createCommand)("REMOVE_LIST_COMMAND");function F(e){return(0,t.mergeRegister)(e.registerCommand(L,()=>(c("number"),!0),n.COMMAND_PRIORITY_LOW),e.registerCommand(R,e=>{let{listNodeKey:t,newStart:r}=e,i=(0,n.$getNodeByKey)(t);return!!k(i)&&("number"===i.getListType()&&(i.setStart(r),p(i)),!0)},n.COMMAND_PRIORITY_LOW),e.registerCommand(P,()=>(c("bullet"),!0),n.COMMAND_PRIORITY_LOW),e.registerCommand($,()=>((function(){let e=(0,n.$getSelection)();if((0,n.$isRangeSelection)(e)){let r=new Set,i=e.getNodes(),o=e.anchor.getNode();if(u(o,i))r.add(l(o));else for(let e=0;e<i.length;e++){let o=i[e];if((0,n.$isLeafNode)(o)){let e=(0,t.$getNearestNodeOfType)(o,m);null!=e&&r.add(l(e))}}for(let t of r){let r=t;for(let i of function e(t){let n=[],r=t.getChildren().filter(v);for(let t=0;t<r.length;t++){let i=r[t],o=i.getFirstChild();k(o)?n=n.concat(e(o)):n.push(i)}return n}(t)){let t=(0,n.$createParagraphNode)().setTextStyle(e.style).setTextFormat(e.format);d(t,i.getChildren()),r.insertAfter(t),r=t,i.__key===e.anchor.key&&(0,n.$setPointFromCaret)(e.anchor,(0,n.$normalizeCaret)((0,n.$getChildCaret)(t,"next"))),i.__key===e.focus.key&&(0,n.$setPointFromCaret)(e.focus,(0,n.$normalizeCaret)((0,n.$getChildCaret)(t,"next"))),i.remove()}t.remove()}}})(),!0),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.INSERT_PARAGRAPH_COMMAND,()=>(function(){let e,t=(0,n.$getSelection)();if(!(0,n.$isRangeSelection)(t)||!t.isCollapsed())return!1;let r=t.anchor.getNode();if(!v(r)||0!==r.getChildrenSize())return!1;let o=l(r),a=r.getParent();k(a)||i(40);let s=a.getParent();if((0,n.$isRootOrShadowRoot)(s))e=(0,n.$createParagraphNode)(),o.insertAfter(e);else{if(!v(s))return!1;e=y(),s.insertAfter(e)}e.setTextStyle(t.style).setTextFormat(t.format).select();let u=r.getNextSiblings();if(u.length>0){let t=S(a.getListType());if(v(e)){let n=y();n.append(t),e.insertAfter(n)}else e.insertAfter(t);t.append(...u)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){let e=t.getParent();if(null==e||!v(e)&&!k(e))break;t=e}t.remove()}(r),!0})(),n.COMMAND_PRIORITY_LOW),e.registerNodeTransform(m,e=>{let t=e.getFirstChild();if(t){if((0,n.$isTextNode)(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=(0,n.$getSelection)();(0,n.$isRangeSelection)(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(n.TextNode,e=>{let t=e.getParent();if(v(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}function B(e){let n=e=>{let n=e.getParent();if(k(e.getFirstChild())||!k(n))return;let r=(0,t.$findMatchingParent)(e,e=>v(e)&&k(e.getParent())&&v(e.getPreviousSibling()));if(null===r&&e.getIndent()>0)e.setIndent(0);else if(v(r)){let t=r.getPreviousSibling();if(v(t)){let r=(function(e){let t=e,n=t.getFirstChild();for(;k(n);){let e=n.getLastChild();if(!v(e))break;n=(t=e).getFirstChild()}return t})(t).getParent();
10if(k(r)){let t=o(r);t+1<o(n)&&e.setIndent(t)}}}};return e.registerNodeTransform(_,e=>{let t=[e];for(;t.length>0;){let e=t.shift();if(k(e)){for(let r of e.getChildren())if(v(r)){n(r);let e=r.getFirstChild();k(e)&&t.push(e)}}}})}e.s(["$createListItemNode",()=>y,"$createListNode",()=>S,"$getListDepth",()=>o,"$isListItemNode",()=>v,"$isListNode",()=>k,"INSERT_CHECK_LIST_COMMAND",()=>w,"INSERT_ORDERED_LIST_COMMAND",()=>L,"INSERT_UNORDERED_LIST_COMMAND",()=>P,"ListItemNode",()=>m,"ListNode",()=>_,"REMOVE_LIST_COMMAND",()=>$,"registerCheckList",()=>N,"registerList",()=>F,"registerListStrictIndentTransform",()=>B])},404267,648046,e=>{"use strict";var t=e.i(317649),n=e.i(365774);let r={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:r}){let i=e.children.some(e=>"boolean"==typeof e.checked)?"check":e.ordered?"number":"bullet",o=(0,n.$createListNode)(i);if((0,n.$isListItemNode)(t)){let e=(0,n.$createListItemNode)();e.append(o),t.insertAfter(e)}else t.append(o);r.visitChildren(e,o)}},i={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:r}){let i="check"===r.getListType()?e.checked??!1:void 0;t.addAndStepInto((0,n.$createListItemNode)(i))}},o={testLexicalNode:n.$isListNode,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:"number"===e.getListType(),spread:!1})}};var l=e.i(343941);let a={testLexicalNode:n.$isListItemNode,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:r})=>{let i=e.getChildren(),o=i[0];if(1===i.length&&(0,n.$isListNode)(o)){let n=t.children.at(-1);
10n?r.visitChildren(e,n):r.visitChildren(o,t)}else{let n=e.getParent(),i=r.appendToParent(t,{type:"listItem",checked:"check"===n.getListType()?!!e.getChecked():void 0,spread:!1,children:[]}),o=null;for(let t of e.getChildren())(0,l.$isTextNode)(t)||(0,l.$isLineBreakNode)(t)||t.isInline()&&((0,l.$isElementNode)(t)||(0,l.$isDecoratorNode)(t))?(o??(o=r.appendToParent(i,{type:"paragraph",children:[]})),r.visit(t,o)):(o=null,r.visit(t,i))}}};var s=e.i(881868),u=e.i(919444),c=e.i(191788);function d({maxIndent:e}){let[t]=(0,s.useLexicalComposerContext)();return(0,c.useEffect)(()=>(0,u.mergeRegister)(t.registerCommand(l.KEY_TAB_COMMAND,e=>{let n=(0,l.$getSelection)();if(!(0,l.$isRangeSelection)(n))return!1;e.preventDefault();let r=!function(e){let t=e.getNodes();if((0,u.$filter)(t,e=>(0,l.$isBlockElementNode)(e)&&e.canIndent()?e:null).length>0)return!0;let n=e.anchor,r=e.focus,i=r.isBefore(n)?r:n,o=i.getNode(),a=(0,u.$getNearestBlockElementAncestorOrThrow)(o);if(a.canIndent()){let e=a.getKey(),t=(0,l.$createRangeSelection)();if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),(t=(0,l.$normalizeSelection__EXPERIMENTAL)(t)).anchor.is(i))return!0}return!1}(n)?l.INSERT_TAB_COMMAND:e.shiftKey?l.OUTDENT_CONTENT_COMMAND:l.INDENT_CONTENT_COMMAND;return t.dispatchCommand(r,void 0)},l.COMMAND_PRIORITY_EDITOR),t.registerCommand(l.INDENT_CONTENT_COMMAND,()=>{if(null==e)return!1;let t=(0,l.$getSelection)();return!!(0,l.$isRangeSelection)(t)&&Math.max(...t.getNodes().map(e=>(0,u.$getNearestBlockElementAncestorOrThrow)(e).getIndent()))+1>=e},l.COMMAND_PRIORITY_CRITICAL)),[t,e]),null}function f(){let[e]=(0,s.useLexicalComposerContext)();return(0,c.useEffect)(()=>(0,n.registerCheckList)(e),[e]),null}function h({hasStrictIndent:e=!1}){let[t]=(0,s.useLexicalComposerContext)();return(0,c.useEffect)(()=>{if(!t.hasNodes([n.ListNode,n.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),(0,c.useEffect)(()=>{if(e)return(0,n.registerListStrictIndentTransform)(t)},[t,e]),(0,c.useEffect)(()=>(0,n.registerList)(t),[t]),null}var p=e.i(526912),g=e.i(733473);let m={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return(0,g.markdownLineEndingOrSpace)(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return(0,g.markdownLineEnding)(r)?t(r):(0,g.markdownSpace)(r)?e.check({tokenize:x},t,n)(r):n(r)}}};function x(e,t,n){return(0,p.factorySpace)(e,function(e){return null===e?n(e):t(e)},"whitespace")}var y=e.i(305400),v=e.i(210095);e.s(["defaultHandlers",()=>v.handle],648046);var v=v;function _(e){let t=this.stack[this.stack.length-2];(0,y.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function b(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];(0,y.ok)("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,o=-1;for(;++o<i.length;){let e=i[o];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function C(e,t,n,r){let i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=v.handle.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}var T=e.i(578467),E=e.i(125617);let S=new Map([["number",n.INSERT_ORDERED_LIST_COMMAND],["bullet",n.INSERT_UNORDERED_LIST_COMMAND],["check",n.INSERT_CHECK_LIST_COMMAND],["",n.REMOVE_LIST_COMMAND]]),k=(0,T.Cell)("",e=>{e.sub(e.pipe(t.currentSelection$,(0,T.withLatestFrom)(t.activeEditor$)),([t,r])=>
10{if(!t||!r)return;let i=t.anchor.getNode(),o="root"===i.getKey()?i:(0,u.$findMatchingParent)(i,e=>{let t=e.getParent();return null!==t&&(0,l.$isRootOrShadowRoot)(t)});o??(o=i.getTopLevelElementOrThrow());let a=o.getKey();if(null!==r.getElementByKey(a))if((0,n.$isListNode)(o)){let t=(0,u.$getNearestNodeOfType)(i,n.ListNode),r=t?t.getListType():o.getListType();e.pub(k,r)}else e.pub(k,"")})}),w=(0,T.Signal)(e=>{e.sub(e.pipe(w,(0,T.withLatestFrom)(t.activeEditor$)),([e,t])=>{null==t||t.dispatchCommand(S.get(e),void 0)})}),N=(0,E.realmPlugin)({init(e){var s;null==(s=e.getValue(t.rootEditor$))||s.registerCommand(l.INDENT_CONTENT_COMMAND,()=>!function(e){let t,r=(0,l.$getSelection)();if(!(0,l.$isRangeSelection)(r))return!1;let i=new Set(0===(t=r.getNodes()).length?[r.anchor.getNode().getParentOrThrow(),r.focus.getNode().getParentOrThrow()]:t.map(e=>(0,l.$isElementNode)(e)?e:e.getParentOrThrow())),o=0;for(let e of i)if((0,n.$isListNode)(e))o=Math.max((0,n.$getListDepth)(e)+1,o);else if((0,n.$isListItemNode)(e)){let t=e.getParent();if((null==t?void 0:t.getChildren().length)===1){let e=t.getParent();if((0,n.$isListItemNode)(e)&&1===e.getChildren().length)return!1}if(!(0,n.$isListNode)(t))throw Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");o=Math.max((0,n.$getListDepth)(t)+1,o)}return o<=7}(7),l.COMMAND_PRIORITY_CRITICAL),e.pubIn({[t.addActivePlugin$]:"lists",[t.addMdastExtension$]:{exit:{taskListCheckValueChecked:_,taskListCheckValueUnchecked:_,paragraph:b}},[t.addSyntaxExtension$]:{text:{91:m}},[t.addImportVisitor$]:[r,i],[t.addLexicalNode$]:[n.ListItemNode,n.ListNode],[t.addExportVisitor$]:[o,a],[t.addToMarkdownExtension$]:{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:C}},[t.addComposerChild$]:[d,h,f],[t.addNestedEditorChild$]:[d,h,f]})}});e.s(["applyListType$",()=>w,"currentListType$",()=>k,"listsPlugin",()=>N],404267)},44686,e=>{"use strict";var t=e.i(713511);let n={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto((0,t.$createQuoteNode)())}},r={testLexicalNode:t.$isQuoteNode,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{let r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}};var i=e.i(125617),o=e.i(317649);let l=(0,i.realmPlugin)({init(e){e.pubIn({[o.addActivePlugin$]:"quote",[o.addImportVisitor$]:n,[o.addLexicalNode$]:t.QuoteNode,[o.addExportVisitor$]:r})}});e.s(["quotePlugin",()=>l],44686)},572948,214389,e=>{"use strict";var t=e.i(305400);function n(e){return e.length}function r(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}var i=e.i(648046);function o(){return{enter:{table:l,tableData:c,tableHeader:c,tableRow:s},exit:{codeText:d,table:a,tableData:u,tableHeader:u,tableRow:u}}}function l(e){let n=e._align;(0,t.ok)(n,"expected `_align` on table"),this.enter({type:"table",align:n.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function a(e){this.exit(e),this.data.inTable=void 0}function s(e){this.enter({type:"tableRow",children:[]},e)}function u(e){this.exit(e)}function c(e){this.enter({type:"tableCell",children:[]},e)}function d(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,f));let r=this.stack[this.stack.length-1];(0,t.ok)("inlineCode"===r.type),r.value=n,this.exit(e)}function f(e,t){return"|"===t?t:e}function h(e){let t=e||{},o=t.tableCellPadding,l=t.tablePipeAlign,a=t.stringLength,s=o?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=i.defaultHandlers.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return c(function(e,t,n){let r=e.children,i=-1,o=[],l=t.enter("table");for(;++i<r.length;)o[i]=d(r[i],t,n);return l(),o}(e,n,r),e.align)},tableCell:u,tableRow:function(e,t,n,r){let i=c([d(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function u(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:s,after:s});return o(),i(),l}function c(e,t){return function(e,t){let i=t||{},o=(i.align||[]).concat(),l=i.stringLength||n,a=[],s=[],u=[],c=[],d=0,f=-1;for(;++f<e.length;){let t=[],n=[],r=-1;for(e[f].length>d&&(d=e[f].length);++r<e[f].length;){var h;let o=null==(h=e[f][r])?"":String(h);if(!1!==i.alignDelimiters){let e=l(o);n[r]=e,(void 0===c[r]||e>c[r])&&(c[r]=e)}t.push(o)}s[f]=t,u[f]=n}let p=-1;if("object"==typeof o&&"length"in o)for(;++p<d;
10)a[p]=r(o[p]);else{let e=r(o);for(;++p<d;)a[p]=e}p=-1;let g=[],m=[];for(;++p<d;){let e=a[p],t="",n="";99===e?(t=":",n=":"):108===e?t=":":114===e&&(n=":");let r=!1===i.alignDelimiters?1:Math.max(1,c[p]-t.length-n.length),o=t+"-".repeat(r)+n;!1!==i.alignDelimiters&&((r=t.length+r+n.length)>c[p]&&(c[p]=r),m[p]=r),g[p]=o}s.splice(1,0,g),u.splice(1,0,m),f=-1;let x=[];for(;++f<s.length;){let e=s[f],t=u[f];p=-1;let n=[];for(;++p<d;){let r=e[p]||"",o="",l="";if(!1!==i.alignDelimiters){let e=c[p]-(t[p]||0),n=a[p];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):l=o=" ".repeat(e/2):l=" ".repeat(e)}!1===i.delimiterStart||p||n.push("|"),!1!==i.padding&&(!1!==i.alignDelimiters||""!==r)&&(!1!==i.delimiterStart||p)&&n.push(" "),!1!==i.alignDelimiters&&n.push(o),n.push(r),!1!==i.alignDelimiters&&n.push(l),!1!==i.padding&&n.push(" "),(!1!==i.delimiterEnd||p!==d-1)&&n.push("|")}x.push(!1===i.delimiterEnd?n.join("").replace(/ +$/,""):n.join(""))}return x.join("\n")}(e,{align:t,alignDelimiters:l,padding:o,stringLength:a})}function d(e,t,n){let r=e.children,i=-1,o=[],l=t.enter("tableRow");for(;++i<r.length;)o[i]=u(r[i],e,t,n);return l(),o}}e.s(["gfmTableFromMarkdown",()=>o,"gfmTableToMarkdown",()=>h],572948);var p=e.i(526912),g=e.i(733473);class m{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function x(){return{flow:{null:{name:"table",tokenize:y,resolveAll:v}}}}function y(e,t,n){let r,i=this,o=0,l=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,o="tableHead"===r||"tableRow"===r?_:a;return o===_&&i.parser.lazy[i.now().line]?n(e):o(e)};function a(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,l+=1),s(n)}function s(t){return null===t?n(t):(0,g.markdownLineEnding)(t)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):(0,g.markdownSpace)(t)?(0,p.factorySpace)(e,s,"whitespace")(t):(l+=1,r&&(r=!1,o+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||(0,g.markdownLineEndingOrSpace)(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,(0,g.markdownSpace)(t))?(0,p.factorySpace)(e,f,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t)}function f(t){return 45===t||58===t?m(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):n(t)}function h(t){return(0,g.markdownSpace)(t)?(0,p.factorySpace)(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(l+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),x):45===t?(l+=1,x(t)):null===t||(0,g.markdownLineEnding)(t)?v(t):n(t)}function x(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(n))}(t)):n(t)}function y(t){return(0,g.markdownSpace)(t)?(0,p.factorySpace)(e,v,"whitespace")(t):v(t)}function v(i){if(124===i)return f(i);if(null===i||(0,g.markdownLineEnding)(i))return r&&o===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function _(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||(0,g.markdownLineEnding)(n)?(e.exit("tableRow"),t(n)):(0,g.markdownSpace)(n)?(0,p.factorySpace)(e,b,"whitespace")(n):(e.enter("data"),C(n))}function C(t){return null===t||124===t||(0,g.markdownLineEndingOrSpace)(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?T:C)}function T(t){return 92===t||124===t?(e.consume(t),C):C(t)}}function v(e,t){let n,r,i,o=-1,l=!0,a=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f=new m;for(;++o<e.length;){let h=e[o],p=h[1];"enter"===h[0]?"tableHead"===p.type?(c=!1,0!==d&&(b(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(o,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(l=!0,i=void 0,s=[0,0,0,0],u=[0,o+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(o,0,[["enter",r,t]])),a="tableDelimiterRow"===p.type?2:r?3:1):a&&("data"===p.type||"tableDelimiterMarker"===p.type||"tableDelimiterFiller"===p.type)?(l=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=_(f,t,s,a,void 0,i),s=[0,0,0,0]),u[2]=o)
10):"tableCellDivider"===p.type&&(l?l=!1:(0!==s[1]&&(u[0]=u[1],i=_(f,t,s,a,void 0,i)),u=[(s=u)[1],o,0,0])):"tableHead"===p.type?(c=!0,d=o):"tableRow"===p.type||"tableDelimiterRow"===p.type?(d=o,0!==s[1]?(u[0]=u[1],i=_(f,t,s,a,o,i)):0!==u[1]&&(i=_(f,t,u,a,o,i)),a=0):a&&("data"===p.type||"tableDelimiterMarker"===p.type||"tableDelimiterFiller"===p.type)&&(u[3]=o)}for(0!==d&&b(f,t,d,n,r),f.consume(t.events),o=-1;++o<t.events.length;){let e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,o))}return e}function _(e,t,n,r,i,o){0!==n[0]&&(o.end=Object.assign({},C(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let l=C(t.events,n[1]);if(o={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){let i=C(t.events,n[2]),o=C(t.events,n[3]),l={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==i&&(o.end=Object.assign({},C(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function b(e,t,n,r,i){let o=[],l=C(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function C(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}e.s(["gfmTable",()=>x],214389)},939162,e=>{"use strict";var t=e.i(191788),n=e.i(671185),r=e.i(357006),i=e.i(479293),o=e.i(64899),l=e.i(908525),a=e.i(592893),s=e.i(64592),u=e.i(746359),c=e.i(437767),d=e.i(993953),f=e.i(674534),h=e.i(817549),p=e.i(55037),g=e.i(369131),m=e.i(865823),x=e.i(391398),y="Popover",[v,_]=(0,i.createContextScope)(y,[u.createPopperScope]),b=(0,u.createPopperScope)(),[C,T]=v(y),E=e=>{let{__scopePopover:n,children:r,open:i,defaultOpen:o,onOpenChange:l,modal:a=!1}=e,c=b(n),d=t.useRef(null),[f,h]=t.useState(!1),[g,m]=(0,p.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:y});return(0,x.jsx)(u.Root,{...c,children:(0,x.jsx)(C,{scope:n,contentId:(0,s.useId)(),triggerRef:d,open:g,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:f,onCustomAnchorAdd:t.useCallback(()=>h(!0),[]),onCustomAnchorRemove:t.useCallback(()=>h(!1),[]),modal:a,children:r})})};E.displayName=y;var S="PopoverAnchor",k=t.forwardRef((e,n)=>{let{__scopePopover:r,...i}=e,o=T(S,r),l=b(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return t.useEffect(()=>(a(),()=>s()),[a,s]),(0,x.jsx)(u.Anchor,{...l,...i,ref:n})});k.displayName=S;var w="PopoverTrigger",N=t.forwardRef((e,t)=>{let{__scopePopover:i,...o}=e,l=T(w,i),a=b(i),s=(0,r.useComposedRefs)(t,l.triggerRef),c=(0,x.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":z(l.open),...o,ref:s,onClick:(0,n.composeEventHandlers)(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?c:(0,x.jsx)(u.Anchor,{asChild:!0,...a,children:c})});N.displayName=w;var I="PopoverPortal",[A,M]=v(I,{forceMount:void 0}),O=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=T(I,t);return(0,x.jsx)(A,{scope:t,forceMount:n,children:(0,x.jsx)(d.Presence,{present:n||o.open,children:(0,x.jsx)(c.Portal,{asChild:!0,container:i,children:r})})})};O.displayName=I;var D="PopoverContent",R=t.forwardRef((e,t)=>{let n=M(D,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=T(D,e.__scopePopover);return(0,x.jsx)(d.Presence,{present:r||o.open,children:o.modal?(0,x.jsx)(L,{...i,ref:t}):(0,x.jsx)($,{...i,ref:t})})});R.displayName=D;var P=(0,h.createSlot)("PopoverContent.RemoveScroll"),L=t.forwardRef((e,i)=>{let o=T(D,e.__scopePopover),l=t.useRef(null),a=(0,r.useComposedRefs)(i,l),s=t.useRef(!1);return t.useEffect(()=>{let e=l.current;if(e)return(0,g.hideOthers)(e)},[]),(0,x.jsx)(m.RemoveScroll,{as:P,allowPinchZoom:!0,children:(0,x.jsx)(F,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,n.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}
10),onPointerDownOutside:(0,n.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;s.current=2===t.button||n},{checkForDefaultPrevented:!1}),onFocusOutside:(0,n.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),$=t.forwardRef((e,n)=>{let r=T(D,e.__scopePopover),i=t.useRef(!1),o=t.useRef(!1);return(0,x.jsx)(F,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||r.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let n=t.target;r.triggerRef.current?.contains(n)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),F=t.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,...g}=e,m=T(D,n),y=b(n);return(0,l.useFocusGuards)(),(0,x.jsx)(a.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:(0,x.jsx)(o.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:p,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>m.onOpenChange(!1),children:(0,x.jsx)(u.Content,{"data-state":z(m.open),role:"dialog",id:m.contentId,...y,...g,ref:t,style:{...g.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)"}})})})}),B="PopoverClose";t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,o=T(B,r);return(0,x.jsx)(f.Primitive.button,{type:"button",...i,ref:t,onClick:(0,n.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})}).displayName=B;var V=t.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=b(n);return(0,x.jsx)(u.Arrow,{...i,...r,ref:t})});function z(e){return e?"open":"closed"}V.displayName="PopoverArrow",e.s(["Anchor",()=>k,"Arrow",()=>V,"Content",()=>R,"PopoverContent",()=>R,"PopoverTrigger",()=>N,"Portal",()=>O,"Root",()=>E,"Trigger",()=>N])},416576,e=>{"use strict";var t=e.i(191788),n=e.i(671185),r=e.i(479293),i=e.i(221498),o=e.i(674534),l=e.i(391398),a="horizontal",s=["horizontal","vertical"],u=t.forwardRef((e,t)=>{var n;let{decorative:r,orientation:i=a,...u}=e,c=(n=i,s.includes(n))?i:a;return(0,l.jsx)(o.Primitive.div,{"data-orientation":c,...r?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"},...u,ref:t})});u.displayName="Separator";var c=e.i(55037),d="Toggle",f=t.forwardRef((e,t)=>
10{let{pressed:r,defaultPressed:i,onPressedChange:a,...s}=e,[u,f]=(0,c.useControllableState)({prop:r,onChange:a,defaultProp:i??!1,caller:d});return(0,l.jsx)(o.Primitive.button,{type:"button","aria-pressed":u,"data-state":u?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:(0,n.composeEventHandlers)(e.onClick,()=>{e.disabled||f(!u)})})});f.displayName=d;var h=e.i(724537),p="ToggleGroup",[g,m]=(0,r.createContextScope)(p,[i.createRovingFocusGroupScope]),x=(0,i.createRovingFocusGroupScope)(),y=t.default.forwardRef((e,t)=>{let{type:n,...r}=e;if("single"===n)return(0,l.jsx)(b,{...r,ref:t});if("multiple"===n)return(0,l.jsx)(C,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${p}\``)});y.displayName=p;var[v,_]=g(p),b=t.default.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:o=()=>{},...a}=e,[s,u]=(0,c.useControllableState)({prop:r,defaultProp:i??"",onChange:o,caller:p});return(0,l.jsx)(v,{scope:e.__scopeToggleGroup,type:"single",value:t.default.useMemo(()=>s?[s]:[],[s]),onItemActivate:u,onItemDeactivate:t.default.useCallback(()=>u(""),[u]),children:(0,l.jsx)(S,{...a,ref:n})})}),C=t.default.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:o=()=>{},...a}=e,[s,u]=(0,c.useControllableState)({prop:r,defaultProp:i??[],onChange:o,caller:p}),d=t.default.useCallback(e=>u((t=[])=>[...t,e]),[u]),f=t.default.useCallback(e=>u((t=[])=>t.filter(t=>t!==e)),[u]);return(0,l.jsx)(v,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:d,onItemDeactivate:f,children:(0,l.jsx)(S,{...a,ref:n})})});y.displayName=p;var[T,E]=g(p),S=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:s,dir:u,loop:c=!0,...d}=e,f=x(n),p=(0,h.useDirection)(u),g={role:"group",dir:p,...d};return(0,l.jsx)(T,{scope:n,rovingFocus:a,disabled:r,children:a?(0,l.jsx)(i.Root,{asChild:!0,...f,orientation:s,dir:p,loop:c,children:(0,l.jsx)(o.Primitive.div,{...g,ref:t})}):(0,l.jsx)(o.Primitive.div,{...g,ref:t})})}),k="ToggleGroupItem",w=t.default.forwardRef((e,n)=>{let r=_(k,e.__scopeToggleGroup),o=E(k,e.__scopeToggleGroup),a=x(e.__scopeToggleGroup),s=r.value.includes(e.value),u=o.disabled||e.disabled,c={...e,pressed:s,disabled:u},d=t.default.useRef(null);return o.rovingFocus?(0,l.jsx)(i.Item,{asChild:!0,...a,focusable:!u,active:s,ref:d,children:(0,l.jsx)(N,{...c,ref:n})}):(0,l.jsx)(N,{...c,ref:n})});w.displayName=k;var N=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,o=_(k,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===o.type?a:void 0;return(0,l.jsx)(f,{...s,...i,ref:t,onPressedChange:e=>{e?o.onItemActivate(r):o.onItemDeactivate(r)}})}),I="Toolbar",[A,M]=(0,r.createContextScope)(I,[i.createRovingFocusGroupScope,m]),O=(0,i.createRovingFocusGroupScope)(),D=m(),[R,P]=A(I),L=t.forwardRef((e,t)=>{let{__scopeToolbar:n,orientation:r="horizontal",dir:a,loop:s=!0,...u}=e,c=O(n),d=(0,h.useDirection)(a);return(0,l.jsx)(R,{scope:n,orientation:r,dir:d,children:(0,l.jsx)(i.Root,{asChild:!0,...c,orientation:r,dir:d,loop:s,children:(0,l.jsx)(o.Primitive.div,{role:"toolbar","aria-orientation":r,dir:d,...u,ref:t})})})});L.displayName=I;var $="ToolbarSeparator",F=t.forwardRef((e,t)=>{let{__scopeToolbar:n,...r}=e,i=P($,n);return(0,l.jsx)(u,{orientation:"horizontal"===i.orientation?"vertical":"horizontal",...r,ref:t})});F.displayName=$;var B=t.forwardRef((e,t)=>{let{__scopeToolbar:n,...r}=e,a=O(n);return(0,l.jsx)(i.Item,{asChild:!0,...a,focusable:!e.disabled,children:(0,l.jsx)(o.Primitive.button,{type:"button",...r,ref:t})})});B.displayName="ToolbarButton",t.forwardRef((e,t)=>{let{__scopeToolbar:r,...a}=e,s=O(r);return(0,l.jsx)(i.Item,{asChild:!0,...s,focusable:!0,children:(0,l.jsx)(o.Primitive.a,{...a,ref:t,onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{" "===e.key&&e.currentTarget.click()})})})}).displayName="ToolbarLink";var V="ToolbarToggleGroup",z=t.forwardRef((e,t)=>{let{__scopeToolbar:n,...r}=e,i=P(V,n),o=D(n);return(0,l.jsx)(y,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});z.displayName=V;var j=t.forwardRef((e,t)=>
10{let{__scopeToolbar:n,...r}=e,i=D(n),o={__scopeToolbar:e.__scopeToolbar};return(0,l.jsx)(B,{asChild:!0,...o,children:(0,l.jsx)(w,{...i,...r,ref:t})})});j.displayName="ToolbarToggleItem",e.s(["Button",()=>B,"Root",()=>L,"Separator",()=>F,"ToggleGroup",()=>z,"ToggleItem",()=>j],416576)},820791,692891,291324,e=>{"use strict";var t=e.i(125617),n=e.i(578467),r=e.i(572948),i=e.i(214389),o=e.i(317649),l=e.i(343941),a=e.i(191788),s=e.i(541504),u=e.i(908576),c=e.i(133567),d=e.i(878302),f=e.i(783373),h=e.i(939162),p=e.i(751291),g=e.i(801773),m=e.i(500143),x=e.i(335007),y=e.i(919444),v=e.i(416576),_=e.i(272043),b=e.i(995711),C=e.i(892271);function T(){let e=[...Array(256).keys()].map(e=>e.toString(16).padStart(2,"0")),t=crypto.getRandomValues(new Uint8Array(16));return t[6]=15&t[6]|64,t[8]=63&t[8]|128,[...t.entries()].map(([t,n])=>[4,6,8,10].includes(t)?`-${e[n]}`:e[n]).join("")}e.s(["uuidv4",()=>T],692891);let E=e=>0===e?"th":"td",S={center:b.default.centeredCell,left:b.default.leftAlignedCell,right:b.default.rightAlignedCell},k=({mdastNode:e,parentEditor:t,lexicalTable:r})=>{let[i,s]=a.default.useState(null),[u,c]=(0,n.useCellValues)(o.iconComponentFor$,o.readOnly$),d=a.default.useMemo(()=>e=>(e.__cacheKey??(e.__cacheKey=T()),e.__cacheKey),[]),f=a.default.useCallback(e=>{let n=r.getColCount();if(null===e)return void s(null);let[i,o]=e;if(i>n-1&&(i=0,o++),i<0&&(i=n-1,o-=1),o>r.getRowCount()-1){s(null),t.update(()=>{if(r.getLatest().getNextSibling())r.getLatest().selectNext();else{let e=(0,l.$createParagraphNode)();r.insertAfter(e),e.select()}});return}if(o<0){s(null),t.update(()=>{r.getLatest().selectPrevious()});return}s([i,o])},[r,t]);a.default.useEffect(()=>{r.focusEmitter.subscribe(f)},[r,f]);let h=a.default.useCallback(e=>{e.preventDefault(),t.update(()=>{r.addRowToBottom(),s([0,r.getRowCount()])})},[t,r]),p=a.default.useCallback(e=>{e.preventDefault(),t.update(()=>{r.addColumnToRight(),s([r.getColCount(),0])})},[t,r]),[g,m]=a.default.useState([-1,-1]),x=a.default.useCallback(e=>{let t=e.target;for(;t&&!["TH","TD"].includes(t.tagName);){if(t===e.currentTarget)return;t=t.parentElement}if(null===t)return;let n=t.parentElement;m(["TFOOT"===n.parentElement.tagName?-1:Array.from(n.children).indexOf(t),"TH"===t.tagName?-1:Array.from(n.parentElement.children).indexOf(n)])},[]),y=(0,o.useTranslation)();return a.default.createElement("table",{className:b.default.tableEditor,onMouseOver:x,onMouseLeave:()=>{m([-1,-1])}},a.default.createElement("colgroup",null,c?null:a.default.createElement("col",null),Array.from({length:e.children[0].children.length},(t,n)=>{let r=S[(e.align??[])[n]??"left"];return a.default.createElement("col",{key:n,className:r})}),c?null:a.default.createElement("col",null)),c||a.default.createElement("thead",null,a.default.createElement("tr",null,a.default.createElement("th",{className:b.default.tableToolsColumn}),Array.from({length:e.children[0].children.length},(n,i)=>a.default.createElement("th",{key:i,"data-tool-cell":!0},a.default.createElement(I,{...{setActiveCellWithBoundaries:f,parentEditor:t,colIndex:i,highlightedCoordinates:g,lexicalTable:r,align:(e.align??[])[i]}}))),a.default.createElement("th",{className:b.default.tableToolsColumn,"data-tool-cell":!0},a.default.createElement("button",{className:b.default.iconButton,type:"button",title:y("table.deleteTable","Delete table"),onClick:e=>{e.preventDefault(),t.update(()=>{r.selectNext(),r.remove()})}},u("delete_small"))))),a.default.createElement("tbody",null,e.children.map((n,o)=>{let l=E(o);return a.default.createElement("tr",{key:o},c||a.default.createElement(l,{className:b.default.toolCell,"data-tool-cell":!0},a.default.createElement(A,{setActiveCellWithBoundaries:f,parentEditor:t,rowIndex:o,highlightedCoordinates:g,lexicalTable:r})),n.children.map((n,l)=>{var s;return a.default.createElement(w,{align:null==(s=e.align)?void 0:s[l],key:d(n),contents:n.children,setActiveCell:f,...{rowIndex:o,colIndex:l,lexicalTable:r,parentEditor:t,activeCell:c?[-1,-1]:i}})}),c||0===o&&a.default.createElement("th",{rowSpan:r.getRowCount(),"data-tool-cell":!0},a.default.createElement("button",{type:"button",className:b.default.addColumnButton,onClick:p},u("add_column"))))})),c||a.default.createElement("tfoot",null,a.default.createElement("tr",null,a.default.createElement("th",
10null),a.default.createElement("th",{colSpan:r.getColCount()},a.default.createElement("button",{type:"button",className:b.default.addRowButton,onClick:h},u("add_row"))),a.default.createElement("th",null))))},w=({align:e,...t})=>{let{activeCell:n,setActiveCell:r}=t,i=!!(n&&n[0]===t.colIndex&&n[1]===t.rowIndex),o=S[e??"left"],l=E(t.rowIndex);return a.default.createElement(l,{className:o,"data-active":i,onClick:()=>{r([t.colIndex,t.rowIndex])}},a.default.createElement(N,{...t,focus:i}))},N=({focus:e,setActiveCell:t,parentEditor:r,lexicalTable:i,contents:s,colIndex:h,rowIndex:v})=>{let[_,b,T,E,S,k,w,N,I]=(0,n.useCellValues)(o.importVisitors$,o.exportVisitors$,o.usedLexicalNodes$,o.jsxComponentDescriptors$,o.directiveDescriptors$,o.codeBlockEditorDescriptors$,o.jsxIsAvailable$,o.rootEditor$,o.nestedEditorChildren$),[A]=a.default.useState(()=>{let e=(0,l.createEditor)({nodes:T,theme:m.lexicalTheme,namespace:"TableCellEditor"});return e.update(()=>{(0,g.importMdastTreeToLexical)({root:(0,l.$getRoot)(),mdastRoot:{type:"root",children:[{type:"paragraph",children:s}]},visitors:_,jsxComponentDescriptors:E,directiveDescriptors:S,codeBlockEditorDescriptors:k})}),e}),M=a.default.useCallback(e=>{A.getEditorState().read(()=>{let e=(0,p.exportLexicalTreeToMdast)({root:(0,l.$getRoot)(),jsxComponentDescriptors:E,visitors:b,jsxIsAvailable:w});r.update(()=>{i.updateCellContents(h,v,e.children[0].children)},{discrete:!0}),r.dispatchCommand(o.NESTED_EDITOR_UPDATED_COMMAND,void 0)}),t(e)},[h,A,b,E,w,i,r,v,t]);return a.default.useEffect(()=>(0,y.mergeRegister)(A.registerCommand(l.KEY_TAB_COMMAND,e=>(e.preventDefault(),M(e.shiftKey?[h-1,v]:[h+1,v]),!0),l.COMMAND_PRIORITY_CRITICAL),A.registerCommand(l.FOCUS_COMMAND,()=>(t([h,v]),!1),l.COMMAND_PRIORITY_LOW),A.registerCommand(l.KEY_ENTER_COMMAND,e=>(null==e||e.preventDefault(),M((null==e?void 0:e.shiftKey)?[h,v-1]:[h,v+1]),!0),l.COMMAND_PRIORITY_CRITICAL),A.registerCommand(l.BLUR_COMMAND,e=>{let t=e.relatedTarget;return!(0,C.isPartOftheEditorUI)(t,N.getRootElement())&&(M(null),!0)},l.COMMAND_PRIORITY_EDITOR),A.registerCommand(o.NESTED_EDITOR_UPDATED_COMMAND,()=>(M(null),!0),l.COMMAND_PRIORITY_EDITOR)),[h,A,N,v,M,t]),a.default.useEffect(()=>{e&&A.focus()},[e,A]),a.default.createElement(d.LexicalNestedComposer,{initialEditor:A},a.default.createElement(f.RichTextPlugin,{contentEditable:a.default.createElement(u.ContentEditable,null),placeholder:a.default.createElement("div",null),ErrorBoundary:c.LexicalErrorBoundary}),I.map((e,t)=>a.default.createElement(e,{key:t})),a.default.createElement(x.HistoryPlugin,null))},I=({parentEditor:e,highlightedCoordinates:t,align:r,lexicalTable:i,colIndex:l,setActiveCellWithBoundaries:s})=>{let[u,c]=(0,n.useCellValues)(o.editorRootElementRef$,o.iconComponentFor$),d=a.default.useCallback(t=>{e.update(()=>{i.insertColumnAt(t)}),s([t,0])},[e,i,s]),f=a.default.useCallback(t=>{e.update(()=>{i.deleteColumnAt(t)})},[e,i]),p=a.default.useCallback((t,n)=>{e.update(()=>{i.setColumnAlign(t,n)})},[e,i]),g=(0,o.useTranslation)();return a.default.createElement(h.Root,null,a.default.createElement(h.PopoverTrigger,{className:b.default.tableColumnEditorTrigger,"data-active":t[0]===l+1,title:g("table.columnMenu","Column menu")},c("more_horiz")),a.default.createElement(h.Portal,{container:null==u?void 0:u.current},a.default.createElement(h.PopoverContent,{className:(0,_.default)(b.default.tableColumnEditorPopoverContent),onOpenAutoFocus:e=>{e.preventDefault()},sideOffset:5,side:"top"},a.default.createElement(v.Root,{className:b.default.tableColumnEditorToolbar},a.default.createElement(v.ToggleGroup,{className:b.default.toggleGroupRoot,onValueChange:e=>{p(l,e)},value:r??"left",type:"single","aria-label":g("table.textAlignment","Text alignment")},a.default.createElement(v.ToggleItem,{value:"left",title:g("table.alignLeft","Align left")},c("format_align_left")),a.default.createElement(v.ToggleItem,{value:"center",title:g("table.alignCenter","Align center")},c("format_align_center")),a.default.createElement(v.ToggleItem,{value:"right",title:g("table.alignRight","Align right")},c("format_align_right"))),a.default.createElement(v.Separator,null),a.default.createElement(v.Button,{onClick:d.bind(null,l),title:g("table.insertColumnLeft","Insert a column to the left of this one")},c("insert_col_left")),a.default.createElement(v.Button,{onClick:d.bind(null,l+1),title:g("table.insertColumnRight","Insert a column to the right of this one")},c("insert_col_right")),a.default.createElement(v.Button,{onClick:f.bind(null,l),title:g("table.deleteColumn","Delete this column")},c("delete_small"))),a.default.createElement(h.Arrow,{className:b.default.popoverArrow}))))},A=({parentEditor:e,highlightedCoordinates:t,lexicalTable:r,rowIndex:i,setActiveCellWithBoundaries:l})=>{let[s,u]=(0,n.useCellValues)(o.editorRootElementRef$,o.iconComponentFor$),c=a.default.useCallback(t=>{e.update(()=>{r.insertRowAt(t)}),l([0,t])},[e,r,l]),d=a.default.useCallback(t=>{e.update(()=>{r.deleteRowAt(t)})},[e,r]),f=(0,o.useTranslation)();return a.default.createElement(h.Root,null,a.default.createElement(h.PopoverTrigger,{className:b.default.tableColumnEditorTrigger,"data-active":t[1]===i,title:f("table.rowMenu","Row menu")},u("more_horiz")),a.default.createElement(h.Portal,{container:null==s?void 0:s.current},a.default.createElement(h.PopoverContent,{className:(0,_.default)(b.default.tableColumnEditorPopoverContent),onOpenAutoFocus:e=>{e.preventDefault()},sideOffset:5,side:"bottom"},a.default.createElement(v.Root,{className:b.default.tableColumnEditorToolbar},a.default.createElement(v.Button,{onClick:c.bind(null,i),title:f("table.insertRowAbove","Insert a row above this one")},u("insert_row_above")),a.default.createElement(v.Button,{onClick:c.bind(null,i+1),title:f("table.insertRowBelow","Insert a row below this one")},u("insert_row_below")),a.default.createElement(v.Button,{onClick:d.bind(null,i),title:f("table.deleteRow","Delete this row")},u("delete_small"))),a.default.createElement(h.Arrow,{className:b.default.popoverArrow}))))};var M=Object.defineProperty,O=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?M(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n};let D={type:"tableCell",children:[]};class R extends l.DecoratorNode{constructor(e,t){super(t),O(this,"__mdastNode"),O(this,"focusEmitter",function(){let e=s.noop;return{publish:t=>{e(t)},subscribe:t=>{e=t}}}()),this.__mdastNode=e??{type:"table",children:[]}}static getType(){return"table"}static clone(e){return new R(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return L(e.mdastNode)}static importDOM(){return{table:()=>({conversion:$,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var e;return(null==(e=this.__mdastNode.children[0])?void 0:e.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}
10updateCellContents(e,t,n){let r=this.getWritable().__mdastNode,i=r.children[t],o=i.children,l=o[e],a=Array.from(o),s={...l,children:n},u={...i,children:a};a[e]=s,r.children[t]=u}insertColumnAt(e){let t=this.getWritable().__mdastNode;for(let n=0;n<t.children.length;n++){let r=t.children[n],i=Array.from(r.children),o={...r,children:i};i.splice(e,0,structuredClone(D)),t.children[n]=o}t.align&&t.align.length>0&&t.align.splice(e,0,"left")}deleteColumnAt(e){let t=this.getWritable().__mdastNode;for(let n=0;n<t.children.length;n++){let r=t.children[n],i=Array.from(r.children),o={...r,children:i};i.splice(e,1),t.children[n]=o}}insertRowAt(e){let t=this.getWritable().__mdastNode,n={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(D))};t.children.splice(e,0,n)}deleteRowAt(e){1===this.getRowCount()?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(e,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(e,t){let n=this.getWritable().__mdastNode;n.align??(n.align=[]),n.align[e]=t}decorate(e){return a.default.createElement(k,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:e})}select(e){this.focusEmitter.publish(e??[0,0])}isInline(){return!1}}function P(e){return e instanceof R}function L(e){return new R(e)}function $(e){return{node:new R({type:"table",children:Array.from(e.querySelectorAll("tr")).map(e=>({type:"tableRow",children:Array.from(e.querySelectorAll("td, th")).map(e=>({type:"tableCell",children:[{type:"text",value:e.textContent}]}))}))})}}e.s(["$convertTableElement",()=>$,"$createTableNode",()=>L,"$isTableNode",()=>P,"TableNode",()=>R],291324);let F={testLexicalNode:P,visitLexicalNode({actions:e,mdastParent:t,lexicalNode:n}){e.appendToParent(t,n.getMdastNode())}},B={testNode:"table",visitNode({mdastNode:e,lexicalParent:t}){t.append(L(e))}},V=(0,n.Signal)(e=>{e.link(e.pipe(V,(0,n.map)(({rows:e,columns:t})=>()=>L(function(e=1,t=1){let n={type:"table",children:[]};for(let r=0;r<e;r++){let e={type:"tableRow",children:[]};for(let n=0;n<t;n++){let t={type:"tableCell",children:[]};e.children.push(t)}n.children.push(e)}return n}(e,t)))),o.insertDecoratorNode$)}),z=(0,t.realmPlugin)({init(e,t){e.pubIn({[o.addMdastExtension$]:(0,r.gfmTableFromMarkdown)(),[o.addSyntaxExtension$]:(0,i.gfmTable)(),[o.addImportVisitor$]:B,[o.addLexicalNode$]:R,[o.addExportVisitor$]:F,[o.addToMarkdownExtension$]:(0,r.gfmTableToMarkdown)({tableCellPadding:(null==t?void 0:t.tableCellPadding)??!0,tablePipeAlign:(null==t?void 0:t.tablePipeAlign)??!0})})}});e.s(["insertTable$",()=>V,"tablePlugin",()=>z],820791)},806726,709456,e=>{"use strict";var t=e.i(125617),n=e.i(881868),r=e.i(898683),i=e.i(919444),o=e.i(343941),l=e.i(191788),a=e.i(391398);let s=(0,o.createCommand)("INSERT_HORIZONTAL_RULE_COMMAND");function u({nodeKey:e}){let[t]=(0,n.useLexicalComposerContext)(),[a,s,u]=(0,r.useLexicalNodeSelection)(e);return(0,l.useEffect)(()=>(0,i.mergeRegister)(t.registerCommand(o.CLICK_COMMAND,n=>{let r=t.getElementByKey(e);return n.target===r&&(n.shiftKey||u(),s(!a),!0)},o.COMMAND_PRIORITY_LOW)),[u,t,a,e,s]),(0,l.useEffect)(()=>{let n=t.getElementByKey(e),r=t._config.theme.hrSelected??"selected";null!==n&&(a?(0,i.addClassNamesToElement)(n,r):(0,i.removeClassNamesFromElement)(n,r))},[t,a,e]),null}class c extends o.DecoratorNode{static getType(){return"horizontalrule"}static clone(e){return new c(e.__key)}static importJSON(e){return f().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:d,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){let t=document.createElement("hr");return(0,i.addClassNamesToElement)(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return(0,a.jsx)(u,{nodeKey:this.__key})}}function d(){return{node:f()}}function f(){return(0,o.$applyNodeReplacement)(new c)}function h(e){return e instanceof c}function p(){let[e]=(0,n.useLexicalComposerContext)();return(0,l.useEffect)(()=>e.registerCommand(s,e=>{let t=(0,o.$getSelection)();if(!(0,o.$isRangeSelection)(t))return!1;if(null!==t.focus.getNode()){let e=f();
10(0,i.$insertNodeToNearestRoot)(e)}return!0},o.COMMAND_PRIORITY_EDITOR),[e]),null}e.s(["$createHorizontalRuleNode",()=>f,"$isHorizontalRuleNode",()=>h,"HorizontalRuleNode",()=>c,"INSERT_HORIZONTAL_RULE_COMMAND",()=>s],709456);var g=e.i(578467),m=e.i(317649);let x={testLexicalNode:h,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},y={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(f())}},v=(0,g.Action)(e=>{e.sub(e.pipe(v,(0,g.withLatestFrom)(m.activeEditor$)),([,e])=>{null==e||e.dispatchCommand(s,void 0)})}),_=(0,t.realmPlugin)({init(e){e.pubIn({[m.addActivePlugin$]:"thematicBreak",[m.addImportVisitor$]:y,[m.addLexicalNode$]:c,[m.addExportVisitor$]:x,[m.addComposerChild$]:p})}});e.s(["insertThematicBreak$",()=>v,"thematicBreakPlugin",()=>_],806726)},593427,e=>{"use strict";var t=e.i(191788);function n(e){let n=t.useRef({value:e,previous:e});return t.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}e.s(["usePrevious",()=>n])},519862,e=>{"use strict";var t=e.i(191788),n=e.i(674534),r=e.i(391398),i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});t.forwardRef((e,t)=>(0,r.jsx)(n.Primitive.span,{...e,ref:t,style:{...i,...e.style}})).displayName="VisuallyHidden",e.s(["VISUALLY_HIDDEN_STYLES",()=>i])},594053,e=>{"use strict";var t=e.i(191788),n=e.i(730943),r=e.i(998847),i=e.i(671185),o=e.i(352162),l=e.i(357006),a=e.i(479293),s=e.i(724537),u=e.i(64899),c=e.i(908525),d=e.i(592893),f=e.i(64592),h=e.i(746359),p=e.i(437767),g=e.i(674534),m=e.i(817549),x=e.i(998657),y=e.i(55037),v=e.i(776833),_=e.i(593427),b=e.i(519862),C=e.i(369131),T=e.i(865823),E=e.i(391398),S=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],w="Select",[N,I,A]=(0,o.createCollection)(w),[M,O]=(0,a.createContextScope)(w,[A,h.createPopperScope]),D=(0,h.createPopperScope)(),[R,P]=M(w),[L,$]=M(w),F=e=>{let{__scopeSelect:n,children:r,open:i,defaultOpen:o,onOpenChange:l,value:a,defaultValue:u,onValueChange:c,dir:d,name:p,autoComplete:g,disabled:m,required:x,form:v}=e,_=D(n),[b,C]=t.useState(null),[T,S]=t.useState(null),[k,I]=t.useState(!1),A=(0,s.useDirection)(d),[M,O]=(0,y.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:w}),[P,$]=(0,y.useControllableState)({prop:a,defaultProp:u,onChange:c,caller:w}),F=t.useRef(null),B=!b||v||!!b.closest("form"),[V,z]=t.useState(new Set),j=Array.from(V).map(e=>e.props.value).join(";");return(0,E.jsx)(h.Root,{..._,children:(0,E.jsxs)(R,{required:x,scope:n,trigger:b,onTriggerChange:C,valueNode:T,onValueNodeChange:S,valueNodeHasChildren:k,onValueNodeHasChildrenChange:I,contentId:(0,f.useId)(),value:P,onValueChange:$,open:M,onOpenChange:O,dir:A,triggerPointerDownPosRef:F,disabled:m,children:[(0,E.jsx)(N.Provider,{scope:n,children:(0,E.jsx)(L,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{z(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{z(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:r})}),B?(0,E.jsxs)(eE,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:g,value:P,onChange:e=>$(e.target.value),disabled:m,form:v,children:[void 0===P?(0,E.jsx)("option",{value:""}):null,Array.from(V)]},j):null]})})};F.displayName=w;var B="SelectTrigger",V=t.forwardRef((e,n)=>{let{__scopeSelect:r,disabled:o=!1,...a}=e,s=D(r),u=P(B,r),c=u.disabled||o,d=(0,l.useComposedRefs)(n,u.onTriggerChange),f=I(r),p=t.useRef("touch"),[m,x,y]=ek(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=ew(t,e,n);void 0!==r&&u.onValueChange(r.value)}),v=e=>{c||(u.onOpenChange(!0),y()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,E.jsx)(h.Anchor,{asChild:!0,...s,children:(0,E.jsx)(g.Primitive.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":eS(u.value)?"":void 0,...a,ref:d,onClick:(0,i.composeEventHandlers)(a.onClick,e=>
10{e.currentTarget.focus(),"mouse"!==p.current&&v(e)}),onPointerDown:(0,i.composeEventHandlers)(a.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(v(e),e.preventDefault())}),onKeyDown:(0,i.composeEventHandlers)(a.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&S.includes(e.key)&&(v(),e.preventDefault())})})})});V.displayName=B;var z="SelectValue",j=t.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=P(z,n),{onValueNodeHasChildrenChange:c}=u,d=void 0!==o,f=(0,l.useComposedRefs)(t,u.onValueNodeChange);return(0,v.useLayoutEffect)(()=>{c(d)},[c,d]),(0,E.jsx)(g.Primitive.span,{...s,ref:f,style:{pointerEvents:"none"},children:eS(u.value)?(0,E.jsx)(E.Fragment,{children:a}):o})});j.displayName=z;var W=t.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,E.jsx)(g.Primitive.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});W.displayName="SelectIcon";var K=e=>(0,E.jsx)(p.Portal,{asChild:!0,...e});K.displayName="SelectPortal";var H="SelectContent",U=t.forwardRef((e,r)=>{let i=P(H,e.__scopeSelect),[o,l]=t.useState();return((0,v.useLayoutEffect)(()=>
10{l(new DocumentFragment)},[]),i.open)?(0,E.jsx)(G,{...e,ref:r}):o?n.createPortal((0,E.jsx)(J,{scope:e.__scopeSelect,children:(0,E.jsx)(N.Slot,{scope:e.__scopeSelect,children:(0,E.jsx)("div",{children:e.children})})}),o):null});U.displayName=H;var[J,Y]=M(H),q=(0,m.createSlot)("SelectContent.RemoveScroll"),G=t.forwardRef((e,n)=>{let{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:f,side:h,sideOffset:p,align:g,alignOffset:m,arrowPadding:x,collisionBoundary:y,collisionPadding:v,sticky:_,hideWhenDetached:b,avoidCollisions:S,...k}=e,w=P(H,r),[N,A]=t.useState(null),[M,O]=t.useState(null),D=(0,l.useComposedRefs)(n,e=>A(e)),[R,L]=t.useState(null),[$,F]=t.useState(null),B=I(r),[V,z]=t.useState(!1),j=t.useRef(!1);t.useEffect(()=>{if(N)return(0,C.hideOthers)(N)},[N]),(0,c.useFocusGuards)();let W=t.useCallback(e=>{let[t,...n]=B().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:"nearest"}),n===t&&M&&(M.scrollTop=0),n===r&&M&&(M.scrollTop=M.scrollHeight),n?.focus(),document.activeElement!==i))return},[B,M]),K=t.useCallback(()=>W([R,N]),[W,R,N]);t.useEffect(()=>{V&&K()},[V,K]);let{onOpenChange:U,triggerPointerDownPosRef:Y}=w;t.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Y.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():N.contains(n.target)||U(!1),document.removeEventListener("pointermove",t),Y.current=null};return null!==Y.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[N,U,Y]),t.useEffect(()=>{let e=()=>U(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[U]);let[G,Z]=ek(e=>{let t=B().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ew(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),ee=t.useCallback((e,t,n)=>{let r=!j.current&&!n;(void 0!==w.value&&w.value===t||r)&&(L(e),r&&(j.current=!0))},[w.value]),et=t.useCallback(()=>N?.focus(),[N]),en=t.useCallback((e,t,n)=>{let r=!j.current&&!n;(void 0!==w.value&&w.value===t||r)&&F(e)},[w.value]),er="popper"===o?Q:X,ei=er===Q?{side:h,sideOffset:p,align:g,alignOffset:m,arrowPadding:x,collisionBoundary:y,collisionPadding:v,sticky:_,hideWhenDetached:b,avoidCollisions:S}:{};return(0,E.jsx)(J,{scope:r,content:N,viewport:M,onViewportChange:O,itemRefCallback:ee,selectedItem:R,onItemLeave:et,itemTextRefCallback:en,focusSelectedItem:K,selectedItemText:$,position:o,isPositioned:V,searchRef:G,children:(0,E.jsx)(T.RemoveScroll,{as:q,allowPinchZoom:!0,children:(0,E.jsx)(d.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,i.composeEventHandlers)(a,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,E.jsx)(u.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,E.jsx)(er,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...k,...ei,onPlaced:()=>z(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:(0,i.composeEventHandlers)(k.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=B().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>W(t)),e.preventDefault()}})})})})})})});G.displayName="SelectContentImpl";var X=t.forwardRef((e,n)=>{let{__scopeSelect:i,onPlaced:o,...a}=e,s=P(H,i),u=Y(H,i),[c,d]=t.useState(null),[f,h]=t.useState(null),p=(0,l.useComposedRefs)(n,e=>h(e)),m=I(i),x=t.useRef(!1),y=t.useRef(!0),{viewport:_,selectedItem:b,selectedItemText:C,focusSelectedItem:T}=u,S=t.useCallback(()=>
10{if(s.trigger&&s.valueNode&&c&&f&&_&&b&&C){let e=s.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),i=C.getBoundingClientRect();if("rtl"!==s.dir){let o=i.left-t.left,l=n.left-o,a=e.left-l,s=e.width+a,u=Math.max(s,t.width),d=window.innerWidth-10,f=(0,r.clamp)(l,[10,Math.max(10,d-u)]);c.style.minWidth=s+"px",c.style.left=f+"px"}else{let o=t.right-i.right,l=window.innerWidth-n.right-o,a=window.innerWidth-e.right-l,s=e.width+a,u=Math.max(s,t.width),d=window.innerWidth-10,f=(0,r.clamp)(l,[10,Math.max(10,d-u)]);c.style.minWidth=s+"px",c.style.right=f+"px"}let l=m(),a=window.innerHeight-20,u=_.scrollHeight,d=window.getComputedStyle(f),h=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),y=h+p+u+parseInt(d.paddingBottom,10)+g,v=Math.min(5*b.offsetHeight,y),T=window.getComputedStyle(_),E=parseInt(T.paddingTop,10),S=parseInt(T.paddingBottom,10),k=e.top+e.height/2-10,w=b.offsetHeight/2,N=h+p+(b.offsetTop+w);if(N<=k){let e=l.length>0&&b===l[l.length-1].ref.current;c.style.bottom="0px";let t=Math.max(a-k,w+(e?S:0)+(f.clientHeight-_.offsetTop-_.offsetHeight)+g);c.style.height=N+t+"px"}else{let e=l.length>0&&b===l[0].ref.current;c.style.top="0px";let t=Math.max(k,h+_.offsetTop+(e?E:0)+w);c.style.height=t+(y-N)+"px",_.scrollTop=N-k+_.offsetTop}c.style.margin="10px 0",c.style.minHeight=v+"px",c.style.maxHeight=a+"px",o?.(),requestAnimationFrame(()=>x.current=!0)}},[m,s.trigger,s.valueNode,c,f,_,b,C,s.dir,o]);(0,v.useLayoutEffect)(()=>S(),[S]);let[k,w]=t.useState();(0,v.useLayoutEffect)(()=>{f&&w(window.getComputedStyle(f).zIndex)},[f]);let N=t.useCallback(e=>{e&&!0===y.current&&(S(),T?.(),y.current=!1)},[S,T]);return(0,E.jsx)(Z,{scope:i,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:(0,E.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,E.jsx)(g.Primitive.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});X.displayName="SelectItemAlignedPosition";var Q=t.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:i=10,...o}=e,l=D(n);return(0,E.jsx)(h.Content,{...l,...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)"}})});Q.displayName="SelectPopperPosition";var[Z,ee]=M(H,{}),et="SelectViewport",en=t.forwardRef((e,n)=>{let{__scopeSelect:r,nonce:o,...a}=e,s=Y(et,r),u=ee(et,r),c=(0,l.useComposedRefs)(n,s.onViewportChange),d=t.useRef(0);return(0,E.jsxs)(E.Fragment,{children:[(0,E.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:o}),(0,E.jsx)(N.Slot,{scope:r,children:(0,E.jsx)(g.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:(0,i.composeEventHandlers)(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,i=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(i<r){let o=i+e,l=Math.min(r,o),a=o-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});en.displayName=et;var er="SelectGroup",[ei,eo]=M(er),el=t.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=(0,f.useId)();return(0,E.jsx)(ei,{scope:n,id:i,children:(0,E.jsx)(g.Primitive.div,{role:"group","aria-labelledby":i,...r,ref:t})})});el.displayName=er;var ea="SelectLabel",es=t.forwardRef((e,t)=>
10{let{__scopeSelect:n,...r}=e,i=eo(ea,n);return(0,E.jsx)(g.Primitive.div,{id:i.id,...r,ref:t})});es.displayName=ea;var eu="SelectItem",[ec,ed]=M(eu),ef=t.forwardRef((e,n)=>{let{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...u}=e,c=P(eu,r),d=Y(eu,r),h=c.value===o,[p,m]=t.useState(s??""),[x,y]=t.useState(!1),v=(0,l.useComposedRefs)(n,e=>d.itemRefCallback?.(e,o,a)),_=(0,f.useId)(),b=t.useRef("touch"),C=()=>{a||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw 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(0,E.jsx)(ec,{scope:r,value:o,disabled:a,textId:_,isSelected:h,onItemTextChange:t.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,E.jsx)(N.ItemSlot,{scope:r,value:o,disabled:a,textValue:p,children:(0,E.jsx)(g.Primitive.div,{role:"option","aria-labelledby":_,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:v,onFocus:(0,i.composeEventHandlers)(u.onFocus,()=>y(!0)),onBlur:(0,i.composeEventHandlers)(u.onBlur,()=>y(!1)),onClick:(0,i.composeEventHandlers)(u.onClick,()=>{"mouse"!==b.current&&C()}),onPointerUp:(0,i.composeEventHandlers)(u.onPointerUp,()=>{"mouse"===b.current&&C()}),onPointerDown:(0,i.composeEventHandlers)(u.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,i.composeEventHandlers)(u.onPointerMove,e=>{b.current=e.pointerType,a?d.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,i.composeEventHandlers)(u.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,i.composeEventHandlers)(u.onKeyDown,e=>{(d.searchRef?.current===""||" "!==e.key)&&(k.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ef.displayName=eu;var eh="SelectItemText",ep=t.forwardRef((e,r)=>{let{__scopeSelect:i,className:o,style:a,...s}=e,u=P(eh,i),c=Y(eh,i),d=ed(eh,i),f=$(eh,i),[h,p]=t.useState(null),m=(0,l.useComposedRefs)(r,e=>p(e),d.onItemTextChange,e=>c.itemTextRefCallback?.(e,d.value,d.disabled)),x=h?.textContent,y=t.useMemo(()=>(0,E.jsx)("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:_,onNativeOptionRemove:b}=f;return(0,v.useLayoutEffect)(()=>(_(y),()=>b(y)),[_,b,y]),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(g.Primitive.span,{id:d.textId,...s,ref:m}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?n.createPortal(s.children,u.valueNode):null]})});ep.displayName=eh;var eg="SelectItemIndicator",em=t.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ed(eg,n).isSelected?(0,E.jsx)(g.Primitive.span,{"aria-hidden":!0,...r,ref:t}):null});em.displayName=eg;var ex="SelectScrollUpButton",ey=t.forwardRef((e,n)=>{let r=Y(ex,e.__scopeSelect),i=ee(ex,e.__scopeSelect),[o,a]=t.useState(!1),s=(0,l.useComposedRefs)(n,i.onScrollButtonChange);return(0,v.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,E.jsx)(eb,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ey.displayName=ex;var ev="SelectScrollDownButton",e_=t.forwardRef((e,n)=>{let r=Y(ev,e.__scopeSelect),i=ee(ev,e.__scopeSelect),[o,a]=t.useState(!1),s=(0,l.useComposedRefs)(n,i.onScrollButtonChange);return(0,v.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,E.jsx)(eb,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});e_.displayName=ev;var eb=t.forwardRef((e,n)=>{let{__scopeSelect:r,onAutoScroll:o,...l}=e,a=Y("SelectScrollButton",r),s=t.useRef(null),u=I(r),c=t.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return t.useEffect(()=>()=>c(),[c]),(0,v.useLayoutEffect)(()=>{let e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,E.jsx)(g.Primitive.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:(0,i.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:(0,i.composeEventHandlers)(l.onPointerMove,()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:(0,i.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),eC=t.forwardRef((e,t)=>
10{let{__scopeSelect:n,...r}=e;return(0,E.jsx)(g.Primitive.div,{"aria-hidden":!0,...r,ref:t})});eC.displayName="SelectSeparator";var eT="SelectArrow";t.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=D(n),o=P(eT,n),l=Y(eT,n);return o.open&&"popper"===l.position?(0,E.jsx)(h.Arrow,{...i,...r,ref:t}):null}).displayName=eT;var eE=t.forwardRef(({__scopeSelect:e,value:n,...r},i)=>{let o=t.useRef(null),a=(0,l.useComposedRefs)(i,o),s=(0,_.usePrevious)(n);return t.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[s,n]),(0,E.jsx)(g.Primitive.select,{...r,style:{...b.VISUALLY_HIDDEN_STYLES,...r.style},ref:a,defaultValue:n})});function eS(e){return""===e||void 0===e}function ek(e){let n=(0,x.useCallbackRef)(e),r=t.useRef(""),i=t.useRef(0),o=t.useCallback(e=>{let t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(i.current),""!==t&&(i.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),l=t.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,o,l]}function ew(e,t,n){var r,i;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,a=(r=e,i=Math.max(l,0),r.map((e,t)=>r[(i+t)%r.length]));1===o.length&&(a=a.filter(e=>e!==n));let s=a.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}eE.displayName="SelectBubbleInput",e.s(["Content",()=>U,"Group",()=>el,"Icon",()=>W,"Item",()=>ef,"ItemIndicator",()=>em,"ItemText",()=>ep,"Label",()=>es,"Portal",()=>K,"Root",()=>F,"ScrollDownButton",()=>e_,"ScrollUpButton",()=>ey,"Separator",()=>eC,"Trigger",()=>V,"Value",()=>j,"Viewport",()=>en])},163757,910665,e=>{"use strict";var t=e.i(191788),n=e.i(594053),r=e.i(272043),i=e.i(995711),o=e.i(10109),l=e.i(578467),a=e.i(317649);let s=t.default.forwardRef(({title:e,children:n},s)=>{let u=(0,l.useCellValue)(a.editorRootElementRef$);return t.default.createElement(o.Provider,{delayDuration:100},t.default.createElement(o.Root,null,t.default.createElement(o.Trigger,{ref:s,asChild:!0},t.default.createElement("span",{className:i.default.tooltipTrigger},n)),t.default.createElement(o.Portal,{container:null==u?void 0:u.current},t.default.createElement(o.Content,{className:(0,r.default)(i.default.tooltipContent),sideOffset:10},e))))});e.s(["TooltipWrap",()=>s],910665);let u=t.default.forwardRef(({children:e,className:o,...l},a)=>t.default.createElement(n.Item,{...l,ref:a,className:(0,r.default)(o,i.default.selectItem)},t.default.createElement(n.ItemText,null,e))),c=({title:e,placeholder:o,className:u})=>{let[c,d]=(0,l.useCellValues)(a.readOnly$,a.iconComponentFor$);return t.default.createElement(s,{title:e},t.default.createElement(n.Trigger,{"aria-label":o,className:(0,r.default)(i.default.selectTrigger,u),"data-toolbar-item":!0,disabled:c},t.default.createElement(n.Value,{placeholder:o}),t.default.createElement(n.Icon,{className:i.default.selectDropdownArrow},d("arrow_drop_down"))))},d=({children:e,className:o=i.default.selectContainer})=>{let s=(0,l.useCellValue)(a.editorRootElementRef$);return t.default.createElement(n.Portal,{container:null==s?void 0:s.current},t.default.createElement(n.Content,{className:(0,r.default)(o,"mdxeditor-select-content"),onCloseAutoFocus:e=>{e.preventDefault()},position:"popper"},t.default.createElement(n.Viewport,{"data-editor-dropdown":!0},e)))},f=({children:e,title:o,className:u})=>{let[c,d]=(0,l.useCellValues)(a.readOnly$,a.iconComponentFor$);return t.default.createElement(s,{title:o},t.default.createElement(n.Trigger,{className:(0,r.default)(i.default.toolbarButtonSelectTrigger,u),disabled:c},e,t.default.createElement(n.Icon,{className:i.default.selectDropdownArrow},d("arrow_drop_down"))))},h=e=>t.default.createElement(n.Root,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},t.default.createElement(c,{title:e.triggerTitle,placeholder:e.placeholder}),t.default.createElement(d,null,e.items.map((e,r)=>"separator"===e?t.default.createElement(n.Separator,{key:r}):t.default.createElement(u,{key:r,value:e.value},e.label))));e.s(["Select",()=>h,"SelectButtonTrigger",()=>f,"SelectContent",()=>d,"SelectItem",()=>u,"SelectTrigger",()=>c],163757)},82418,17361,e=>{"use strict";var t=e.i(125617),n=e.i(578467),r=e.i(191788),i=e.i(317649),o=e.i(594053),l=e.i(416576),a=e.i(272043),s=e.i(995711),u=e.i(910665),c=e.i(163757);function d(e,t){return r.default.forwardRef((n,i)=>{let o=(0,a.default)(t.className,n.className);return r.default.createElement(e,{...t,...n,className:o,ref:i})})}let f=({readOnly:e,children:t,className:n})=>r.default.createElement(l.Root,{className:(0,a.default)("mdxeditor-toolbar",s.default.toolbarRoot,{[s.default.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t),h=d(l.Button,{className:s.default.toolbarButton,"data-toolbar-item":!0}),p=({title:e,children:t,...n})=>r.default.createElement(h,{...n}
10,r.default.createElement(u.TooltipWrap,{title:e},t)),g=d(l.ToggleItem,{className:s.default.toolbarToggleItem,"data-toolbar-item":!0}),m=d(l.ToggleGroup,{type:"single",className:s.default.toolbarToggleSingleGroup}),x=r.default.forwardRef(({on:e,title:t,children:n,disabled:i,...o},a)=>r.default.createElement(l.ToggleGroup,{type:"single",className:s.default.toolbarToggleSingleGroup,...o,value:e?"on":"off",ref:a},r.default.createElement(g,{"aria-label":t,value:"on",disabled:i},r.default.createElement(u.TooltipWrap,{title:t},n)))),y=({items:e})=>r.default.createElement("div",{className:s.default.toolbarGroupOfGroups},e.map((e,t)=>r.default.createElement(x,{key:t,title:e.title,on:e.active,onValueChange:t=>{e.onChange("on"===t)},disabled:e.disabled},e.contents))),v=({value:e,onChange:t,className:n,ggClassName:o,items:c})=>{let d=(0,i.useTranslation)();return r.default.createElement("div",{className:(0,a.default)(s.default.toolbarGroupOfGroups,o)},r.default.createElement(l.ToggleGroup,{"aria-label":d("toolbar.toggleGroup","toggle group"),type:"single",className:(0,a.default)(s.default.toolbarToggleSingleGroup,n),onValueChange:t,value:e||"",onFocus:e=>{e.preventDefault()}},c.map((e,t)=>r.default.createElement(g,{key:t,"aria-label":e.title,value:e.value},r.default.createElement(u.TooltipWrap,{title:e.title},e.contents)))))},_=e=>{let t=(0,n.useCellValue)(i.readOnly$);return r.default.createElement(r.default.Fragment,null,1===e.items.length?r.default.createElement(p,{title:e.title,onClick:()=>{e.onChoose("")},disabled:t},e.children):r.default.createElement(o.Root,{value:"",onValueChange:e.onChoose},r.default.createElement(c.SelectButtonTrigger,{title:e.title},e.children),r.default.createElement(c.SelectContent,{className:s.default.toolbarButtonDropdownContainer},e.items.map((e,t)=>r.default.createElement(c.SelectItem,{key:t,value:e.value},e.label)))))};function b(e){return Object.hasOwn(e,"when")}let C=({options:e})=>{let t=(0,n.useCellValue)(i.editorInFocus$),o=r.default.useMemo(()=>{let n=e.find(e=>!b(e)||!!e.when(t)||void 0);return n?b(n)?n.contents():n.fallback():null},[e,t]);return r.default.createElement("div",{style:{display:"flex"}},o)},T=l.Separator;e.s(["Button",()=>h,"ButtonOrDropdownButton",()=>_,"ButtonWithTooltip",()=>p,"ConditionalContents",()=>C,"MultipleChoiceToggleGroup",()=>y,"Root",()=>f,"Separator",()=>T,"SingleChoiceToggleGroup",()=>v,"SingleToggleGroup",()=>m,"ToggleSingleGroupWithItem",()=>x,"ToolbarToggleItem",()=>g],17361);let E=(0,n.Cell)(()=>null),S=(0,n.Cell)(""),k=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",w=(0,t.realmPlugin)({init(e,t){let o=(null==t?void 0:t.toolbarPosition)==="bottom"?i.addBottomAreaChild$:i.addTopAreaChild$;e.pubIn({[E]:(null==t?void 0:t.toolbarContents)??k,[S]:(null==t?void 0:t.toolbarClassName)??"",[o]:()=>{let[e,t,o]=(0,n.useCellValues)(E,i.readOnly$,S);return r.default.createElement(f,{className:o,readOnly:t},e())}})},update(e,t){e.pub(E,(null==t?void 0:t.toolbarContents)??k),e.pub(S,(null==t?void 0:t.toolbarClassName)??"")}});e.s(["toolbarClassName$",()=>S,"toolbarContents$",()=>E,"toolbarPlugin",()=>w],82418)},309871,e=>{"use strict";var t=e.i(135598),n=e.i(416576),r=e.i(191788),i=e.i(272043),o=e.i(881747),l=e.i(317649),a=e.i(995711),s=e.i(910665),u=e.i(578467);let c=r.default.forwardRef(({autocompleteSuggestions:e=[],submitButtonTitle:i,dialogInputPlaceholder:o,onSubmit:c,tooltipTitle:f,buttonContent:h},p)=>{let[g,m]=(0,u.useCellValues)(l.editorRootElementRef$,l.readOnly$),[x,y]=r.default.useState(!1),v=r.default.useCallback(e=>{c(e),y(!1)},[c]);return r.default.createElement(t.Root,{open:x,onOpenChange:y},r.default.createElement(t.Trigger,{asChild:!0},r.default.createElement(n.Button,{className:a.default.toolbarButton,ref:p,disabled:m},r.default.createElement(s.TooltipWrap,{title:f},h))),r.default.createElement(t.Portal,{container:null==g?void 0:g.current},r.default.createElement(t.Overlay,{className:a.default.dialogOverlay}),r.default.createElement(t.Content,{className:a.default.dialogContent},r.default.createElement(d,{submitButtonTitle:i,autocompleteSuggestions:e,onSubmitCallback:v,dialogInputPlaceholder:o}))))}),d=({autocompleteSuggestions:e,onSubmitCallback:n,dialogInputPlaceholder:s,submitButtonTitle:c})=>{let[d,f]=r.default.useState(e.slice(0,20)),h=(0,u.useCellValue)(l.iconComponentFor$),p=e.length>0,{isOpen:g,getToggleButtonProps:m,getMenuProps:x,getInputProps:y,highlightedIndex:v,getItemProps:_,selectedItem:b}=(0,o.useCombobox)({initialInputValue:"",onInputValueChange({inputValue:t}){t=(null==t?void 0:t.toLowerCase())??"";let n=[];for(let r of e)if(r.toLowerCase().includes(t)&&(n.push(r),n.length>=20))break;f(n)},items:d,itemToString:e=>e??""}),C=r.default.useCallback(e=>{var t;"Escape"===e.key?null==(t=e.target.form)||t.reset():"Enter"!==e.key||g&&0!==d.length||(e.preventDefault(),n(e.target.value))},[g,d,n]),T=y(),E={...T,onKeyDown:e=>{C(e),T.onKeyDown(e)}},S=g&&d.length>0;return r.default.createElement("form",{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),n(E.value)},className:(0,i.default)(a.default.dialogForm)},r.default.createElement("div",{className:a.default.linkDialogInputContainer},r.default.createElement("div",{"data-visible-dropdown":S,className:a.default.linkDialogInputWrapper},r.default.createElement("input",{placeholder:s,className:a.default.linkDialogInput,...E,autoFocus:!0,size:30,"data-editor-dialog":!0}),p&&r.default.createElement("button",{"aria-label":"toggle menu",type:"button",...m()},h("arrow_drop_down"))),r.default.createElement("div",{className:a.default.downshiftAutocompleteContainer},r.default.createElement("ul",{...x(),"data-visible":S},d.map((e,t)=>r.default.createElement("li",{"data-selected":b===e,"data-highlighted":v===t,key:`${e}${t}`,..._({item:e,index:t})},e))))),r.default.createElement("button",{type:"submit",title:c,"aria-label":c,className:(0,i.default)(a.default.actionButton,a.default.primaryActionButton)},h("check")),r.default.createElement(t.Close,{className:a.default.actionButton},h("close")))};e.s(["DialogButton",()=>c])},755060,e=>{"use strict";var t=e.i(919444),n=e.i(578467),r=e.i(343941),i=e.i(191788),o=e.i(582645),l=e.i(317649),a=e.i(17361);let s=()=>{let[e,s]=(0,n.useCellValues)(l.iconComponentFor$,l.activeEditor$),[u,c]=i.default.useState(!1),[d,f]=i.default.useState(!1),h=(0,l.useTranslation)();return i.default.useEffect(()=>{if(s)return(0,t.mergeRegister)(s.registerCommand(r.CAN_UNDO_COMMAND,e=>(c(e),!1),r.COMMAND_PRIORITY_CRITICAL),s.registerCommand(r.CAN_REDO_COMMAND,e=>(f(e),!1),r.COMMAND_PRIORITY_CRITICAL))},[s]),i.default.createElement(a.MultipleChoiceToggleGroup,{items:[{title:h("toolbar.undo","Undo {{shortcut}}",{shortcut:o.IS_APPLE?"⌘Z":"Ctrl+Z"}),disabled:!u,contents:e("undo"),active:!1,onChange:()=>null==s?void 0:s.dispatchCommand(r.UNDO_COMMAND,void 0)},{title:h("toolbar.redo","Redo {{shortcut}}",{shortcut:o.IS_APPLE?"⌘Y":"Ctrl+Y"}),disabled:!d,contents:e("redo"),active:!1,onChange:()=>null==s?void 0:s.dispatchCommand(r.REDO_COMMAND,void 0)}]})};e.s(["UndoRedo",()=>s])},591195,e=>{"use strict";var t=e.i(317649),n=e.i(578467),r=e.i(191788),i=e.i(541320),o=e.i(17361),l=e.i(995711);let a=({format:e,addTitle:i,removeTitle:l,icon:a,formatName:s})=>{let[u,c]=(0,n.useCellValues)(t.currentFormat$,t.iconComponentFor$),d=(0,n.usePublisher)(t.applyFormat$),f=(u&e)!=0;return r.default.createElement(o.ToggleSingleGroupWithItem,{title:f?l:i,on:f,onValueChange:()=>{d(s)}},c(a))},s=({options:e})=>{let n=(0,t.useTranslation)(),o=void 0===e;return r.default.createElement("div",{className:l.default.toolbarGroupOfGroups},o||e.includes("Bold")?r.default.createElement(a,{format:i.IS_BOLD,addTitle:n("toolbar.bold","Bold"),removeTitle:n("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,o||e.includes("Italic")?r.default.createElement(a,{format:i.IS_ITALIC,addTitle:n("toolbar.italic","Italic"),removeTitle:n("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,o||e.includes("Underline")?r.default.createElement(a,{format:i.IS_UNDERLINE,addTitle:n("toolbar.underline","Underline"),removeTitle:n("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},u=({options:e})=>{let n=(0,t.useTranslation)(),o=void 0===e;return r.default.createElement("div",{className:l.default.toolbarGroupOfGroups},o||e.includes("Strikethrough")?r.default.createElement(a,{format:i.IS_STRIKETHROUGH,addTitle:n("toolbar.strikethrough","Strikethrough"),removeTitle:n("toolbar.removeStrikethrough","Remove strikethrough"),icon:"strikeThrough",formatName:"strikethrough"}):null,o||e.includes("Sup")?r.default.createElement(a,{format:i.IS_SUPERSCRIPT,addTitle:n("toolbar.superscript","Superscript"),removeTitle:n("toolbar.removeSuperscript","Remove superscript"),icon:"superscript",formatName:"superscript"}):null,o||e.includes("Sub")?r.default.createElement(a,{format:i.IS_SUBSCRIPT,addTitle:n("toolbar.subscript","Subscript"),removeTitle:n("toolbar.removeSubscript","Remove subscript"),icon:"subscript",formatName:"subscript"}):null)};e.s(["BoldItalicUnderlineToggles",()=>s,"StrikeThroughSupSubToggles",()=>u])},689126,e=>{"use strict";var t=e.i(191788),n=e.i(404267),r=e.i(17361),i=e.i(578467),o=e.i(317649);let l={bullet:"format_list_bulleted",number:"format_list_numbered",check:"format_list_checked"},a=({options:e=["bullet","number","check"]})=>{let[a,s]=(0,i.useCellValues)(n.currentListType$,o.iconComponentFor$),u=(0,i.usePublisher)(n.applyListType$),c=(0,o.useTranslation)(),d={bullet:c("toolbar.bulletedList","Bulleted list"),number:c("toolbar.numberedList","Numbered list"),check:c("toolbar.checkList","Check list")},f=e.map(e=>({value:e,title:d[e],contents:s(l[e])}));return t.default.createElement(r.SingleChoiceToggleGroup,{value:a||"",items:f,onChange:u})};e.s(["ListsToggle",()=>a])},895668,e=>{"use strict";var t=e.i(191788),n=e.i(317649),r=e.i(163757),i=e.i(769303),o=e.i(578467);function l(e){return{note:e("admonitions.note","Note"),tip:e("admonitions.tip","Tip"),danger:e("admonitions.danger","Danger"),info:e("admonitions.info","Info"),caution:e("admonitions.caution","Caution")}}let a=()=>{let[e,a]=(0,o.useCellValues)(n.editorInFocus$,n.rootEditor$),s=e.rootNode,u=(0,n.useTranslation)(),c=l(u);return t.default.createElement(r.Select,{value:s.getMdastNode().name,onChange:e=>{null==a||a.update(()=>{s.setMdastNode({...s.getMdastNode(),name:e}),setTimeout(()=>{a.update(()=>{s.getLatest().select()})},80)})},triggerTitle:u("admonitions.changeType","Select admonition type"),placeholder:u("admonitions.placeholder","Admonition type"),items:i.ADMONITION_TYPES.map(e=>({label:c[e],value:e}))})};e.s(["ChangeAdmonitionType",()=>a,"admonitionLabelsMap",()=>l])},910847,e=>{"use strict";var t=e.i(713511),n=e.i(578467),r=e.i(343941),i=e.i(191788),o=e.i(317649),l=e.i(114145),a=e.i(163757);let s=()=>{let e=(0,n.usePublisher)(o.convertSelectionToNode$),s=(0,n.useCellValue)(o.currentBlockType$),u=(0,n.useCellValue)(o.activePlugins$),c=u.includes("quote"),d=u.includes("headings"),f=(0,o.useTranslation)();if(!c&&!d)return null;let h=[{label:f("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(c&&h.push({label:f("toolbar.blockTypes.quote","Quote"),value:"quote"}),d){let e=(0,n.useCellValue)(l.allowedHeadingLevels$);h.push(...e.map(e=>({label:f("toolbar.blockTypes.heading","Heading {{level}}",{level:e}),value:`h${e}`})))}return i.default.createElement(a.Select,{value:s,onChange:n=>{switch(n){case"quote":e(()=>(0,t.$createQuoteNode)());break;case"paragraph":e(()=>(0,r.$createParagraphNode)());break;case"":break;default:if(n.startsWith("h"))e(()=>(0,t.$createHeadingNode)(n));else throw Error(`Unknown block type: ${n}`)}},triggerTitle:f("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:f("toolbar.blockTypeSelect.placeholder","Block type"),items:h})};e.s(["BlockTypeSelect",()=>s])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.