1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,872249,925720,73772,602408,e=>{"use strict";let t;var n,r,i,o,s,a,l,c=e.i(245157),d=0;function u(){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",0,function(){c.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??u()),document.body.insertAdjacentElement("beforeend",e[1]??u()),d++,()=>{1===d&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),d--}},[])}],872249);var h=e.i(161116),p=e.i(989200),f=e.i(987458),m=e.i(959557),g="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",b={bubbles:!1,cancelable:!0},v=c.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=c.useState(null),d=(0,f.useCallbackRef)(i),u=(0,f.useCallbackRef)(o),v=c.useRef(null),T=(0,h.useComposedRefs)(t,e=>l(e)),S=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(S.paused||!a)return;let t=e.target;a.contains(t)?v.current=t:w(v.current,{select:!0})},t=function(e){if(S.paused||!a)return;let t=e.relatedTarget;null!==t&&(a.contains(t)||w(v.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&&w(a)});return a&&n.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,a,S.paused]),c.useEffect(()=>{if(a){E.add(S);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(g,b);a.addEventListener(g,d),a.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(w(r,{select:t}),document.activeElement!==n)return}(k(a).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&w(a))}return()=>{a.removeEventListener(g,d),setTimeout(()=>{let t=new CustomEvent(y,b);a.addEventListener(y,u),a.dispatchEvent(t),t.defaultPrevented||w(e??document.body,{select:!0}),a.removeEventListener(y,u),E.remove(S)},0)}}},[a,d,u,S]);let C=c.useCallback(e=>{if(!n&&!r||S.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){var o;let t,r=e.currentTarget,[s,a]=[x(t=k(o=r),o),x(t.reverse(),o)];s&&a?e.shiftKey||i!==a?e.shiftKey&&i===s&&(e.preventDefault(),n&&w(a,{select:!0})):(e.preventDefault(),n&&w(s,{select:!0})):i===r&&e.preventDefault()}},[n,r,S.paused]);return(0,m.jsx)(p.Primitive.div,{tabIndex:-1,...s,ref:T,onKeyDown:C})});function k(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 x(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 w(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()}}v.displayName="FocusScope";var E=(t=[],{add(e){let n=t[0];e!==n&&n?.pause(),(t=T(t,e)).unshift(e)},remove(e){t=T(t,e),t[0]?.resume()}});function T(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}e.s(["FocusScope",0,v],925720);var S=new WeakMap,C=new WeakMap,A={},_=0,N=function(e){return e&&(e.host||N(e.parentNode))},O=function(e,t,n,r){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=N(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});A[n]||(A[n]=new WeakMap);var o=A[n],s=[],a=new Set,l=new Set(i),c=function(e){!e||a.has(e)||(a.add(e),c(e.parentNode))};
1i.forEach(c);var d=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))d(e);else try{var t=e.getAttribute(r),i=null!==t&&"false"!==t,l=(S.get(e)||0)+1,c=(o.get(e)||0)+1;S.set(e,l),o.set(e,c),s.push(e),1===l&&i&&C.set(e,!0),1===c&&e.setAttribute(n,"true"),i||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),a.clear(),_++,function(){s.forEach(function(e){var t=S.get(e)-1,i=o.get(e)-1;S.set(e,t),o.set(e,i),t||(C.has(e)||e.removeAttribute(r),C.delete(e)),i||e.removeAttribute(n)}),--_||(S=new WeakMap,S=new WeakMap,C=new WeakMap,A={})}};e.s(["hideOthers",0,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"))),O(r,i,n,"aria-hidden")):function(){return null}}],73772);var M=function(){return(M=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 I(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}var D=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),R="width-before-scroll-bar";function z(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var L="u">typeof window?c.useLayoutEffect:c.useEffect,P=new WeakMap,j=(void 0===n&&(n={}),(void 0===r&&(r=function(e){return e}),i=[],o=!1,s={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:null},useMedium:function(e){var t=r(e,o);return i.push(t),function(){i=i.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;i.length;){var t=i;i=[],t.forEach(e)}i={push:function(t){return e(t)},filter:function(){return i}}},assignMedium:function(e){o=!0;var t=[];if(i.length){var n=i;i=[],n.forEach(e),t=i}var r=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(r)};s(),i={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),i}}}}).options=M({async:!0,ssr:!1},n),s),$=function(){},F=c.forwardRef(function(e,t){var n,r,i,o,s=c.useRef(null),a=c.useState({onScrollCapture:$,onWheelCapture:$,onTouchMoveCapture:$}),l=a[0],d=a[1],u=e.forwardProps,h=e.children,p=e.className,f=e.removeScrollBar,m=e.enabled,g=e.shards,y=e.sideCar,b=e.noRelative,v=e.noIsolation,k=e.inert,x=e.allowPinchZoom,w=e.as,E=e.gapMode,T=I(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(n=[s,t],r=function(e){return n.forEach(function(t){return z(t,e)})},(i=(0,c.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,L(function(){var e=P.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||z(e,null)}),r.forEach(function(e){t.has(e)||z(e,i)})}P.set(o,n)},[n]),o),C=M(M({},T),l);return c.createElement(c.Fragment,null,m&&c.createElement(y,{sideCar:j,removeScrollBar:f,shards:g,noRelative:b,noIsolation:v,inert:k,setCallbacks:d,allowPinchZoom:!!x,lockRef:s,gapMode:E}),u?c.cloneElement(c.Children.only(h),M(M({},C),{ref:S})):c.createElement(void 0===w?"div":w,M({},C,{className:p,ref:S}),h))});F.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},F.classNames={fullWidth:R,zeroRight:D};var B=function(e){var t=e.sideCar,n=I(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 c.createElement(r,M({},n))};
1B.isSideCarExport=!0;var H=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=l||("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)}}},U=function(){var e=H();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},V=function(){var e=U();return function(t){return e(t.styles,t.dynamic),null}},q={left:0,top:0,right:0,gap:0},G=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[G(n),G(r),G(i)]},K=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return q;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])}},J=V(),Y="data-scroll-locked",X=function(e,t,n,r){var i=e.left,o=e.top,s=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(Y,"] {\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(s,"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,";")].filter(Boolean).join(""),"\n }\n \n .").concat(D," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(R," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(D," .").concat(D," {\n right: 0 ").concat(r,";\n }\n \n .").concat(R," .").concat(R," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Y,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},Q=function(){var e=parseInt(document.body.getAttribute(Y)||"0",10);return isFinite(e)?e:0},Z=function(){c.useEffect(function(){return document.body.setAttribute(Y,(Q()+1).toString()),function(){var e=Q()-1;e<=0?document.body.removeAttribute(Y):document.body.setAttribute(Y,e.toString())}},[])},ee=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;Z();var o=c.useMemo(function(){return K(i)},[i]);return c.createElement(J,{styles:X(o,!t,i,n?"":"!important")})},et=!1;if("u">typeof window)try{var en=Object.defineProperty({},"passive",{get:function(){return et=!0,!0}});window.addEventListener("test",en,en),window.removeEventListener("test",en,en)}catch(e){et=!1}var er=!!et&&{passive:!1},ei=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])},eo=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),es(e,r)){var i=ea(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},es=function(e,t){return"v"===e?ei(t,"overflowY"):ei(t,"overflowX")},ea=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},el=function(e,t,n,r,i){var o,s=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=s*r,l=n.target,c=t.contains(l),d=!1,u=a>0,h=0,p=0;do{if(!l)break;var f=ea(e,l),m=f[0],g=f[1]-f[2]-s*m;(m||g)&&es(e,l)&&(h+=g,p+=m);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l))return u&&(i&&1>Math.abs(h)||!i&&a>h)?d=!0:!u&&(i&&1>Math.abs(p)||!i&&-a>p)&&(d=!0),d},ec=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ed=function(e){return[e.deltaX,e.deltaY]},eu=function(e){return e&&"current"in e?e.current:e},eh=0,ep=[];let ef=(a=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(eh++)[0],o=c.useState(V)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(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))}
1)([e.lockRef.current],(e.shards||[]).map(eu),!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=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var i,o=ec(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-o[0],c="deltaY"in e?e.deltaY:a[1]-o[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===d||p.contains(d)))return!1;var f=eo(u,d);if(!f)return!0;if(f?i=u:(i="v"===u?"h":"v",f=eo(u,d)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=i),!i)return!0;var m=r.current||i;return el(m,t,e,"h"===m?l:c,!0)},[]),l=c.useCallback(function(e){if(ep.length&&ep[ep.length-1]===o){var n="deltaY"in e?ed(e):ec(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=(s.current.shards||[]).map(eu).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?a(e,i[0]):!s.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),d=c.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)},[]),u=c.useCallback(function(e){n.current=ec(e),r.current=void 0},[]),h=c.useCallback(function(t){d(t.type,ed(t),t.target,a(t,e.lockRef.current))},[]),p=c.useCallback(function(t){d(t.type,ec(t),t.target,a(t,e.lockRef.current))},[]);c.useEffect(function(){return ep.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",l,er),document.addEventListener("touchmove",l,er),document.addEventListener("touchstart",u,er),function(){ep=ep.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,er),document.removeEventListener("touchmove",l,er),document.removeEventListener("touchstart",u,er)}},[]);var f=e.removeScrollBar,m=e.inert;return c.createElement(c.Fragment,null,m?c.createElement(o,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,f?c.createElement(ee,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},j.useMedium(a),B);var em=c.forwardRef(function(e,t){return c.createElement(F,M({},e,{ref:t,sideCar:ef}))});em.classNames=F.classNames,e.s(["RemoveScroll",0,em],602408)},288826,e=>{"use strict";var t=e.i(245157),n=e.i(291967),r=e.i(493942),i=e.i(161116),o=e.i(719422),s=e.i(959557);function a(e){let n=e+"CollectionProvider",[a,l]=(0,r.createContextScope)(n),[c,d]=a(n,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:n,children:r}=e,i=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,s.jsx)(c,{scope:n,itemMap:o,collectionRef:i,children:r})};u.displayName=n;let h=e+"CollectionSlot",p=(0,o.createSlot)(h),f=t.default.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=d(h,n),a=(0,i.useComposedRefs)(t,o.collectionRef);return(0,s.jsx)(p,{ref:a,children:r})});f.displayName=h;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=(0,o.createSlot)(m),b=t.default.forwardRef((e,n)=>{let{scope:r,children:o,...a}=e,l=t.default.useRef(null),c=(0,i.useComposedRefs)(n,l),u=d(m,r);return t.default.useEffect(()=>(u.itemMap.set(l,{ref:l,...a}),()=>void u.itemMap.delete(l))),(0,s.jsx)(y,{...{[g]:""},ref:c,children:o})});return b.displayName=m,[{Provider:u,Slot:f,ItemSlot:b},function(n){let r=d(e+"CollectionConsumer",n);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},l]}var l=t.createContext(void 0);function c(e){let n=t.useContext(l);return e||n||"ltr"}var d=e.i(392476),u=e.i(872249),h=e.i(925720),p=e.i(559290),f=e.i(442562),m=e.i(747686),g=e.i(21438),y=e.i(989200),b=e.i(987458),v=e.i(710690),k="rovingFocusGroup.onEntryFocus",x={bubbles:!1,cancelable:!0},w="RovingFocusGroup",[E,T,S]=a(w),[C,A]=(0,r.createContextScope)(w,[S]),[_,N]=C(w),O=t.forwardRef((e,t)=>
1(0,s.jsx)(E.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(E.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(M,{...e,ref:t})})}));O.displayName=w;var M=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:l=!1,dir:d,currentTabStopId:u,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...g}=e,E=t.useRef(null),S=(0,i.useComposedRefs)(r,E),C=c(d),[A,N]=(0,v.useControllableState)({prop:u,defaultProp:h??null,onChange:p,caller:w}),[O,M]=t.useState(!1),I=(0,b.useCallbackRef)(f),D=T(o),R=t.useRef(!1),[L,P]=t.useState(0);return t.useEffect(()=>{let e=E.current;if(e)return e.addEventListener(k,I),()=>e.removeEventListener(k,I)},[I]),(0,s.jsx)(_,{scope:o,orientation:a,dir:C,loop:l,currentTabStopId:A,onItemFocus:t.useCallback(e=>N(e),[N]),onItemShiftTab:t.useCallback(()=>M(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,s.jsx)(y.Primitive.div,{tabIndex:O||0===L?-1:0,"data-orientation":a,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,()=>{R.current=!0}),onFocus:(0,n.composeEventHandlers)(e.onFocus,e=>{let t=!R.current;if(e.target===e.currentTarget&&t&&!O){let t=new CustomEvent(k,x);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);z([e.find(e=>e.active),e.find(e=>e.id===A),...e].filter(Boolean).map(e=>e.ref.current),m)}}R.current=!1}),onBlur:(0,n.composeEventHandlers)(e.onBlur,()=>M(!1))})})}),I="RovingFocusGroupItem",D=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:a=!1,tabStopId:l,children:c,...d}=e,u=(0,p.useId)(),h=l||u,f=N(I,i),m=f.currentTabStopId===h,g=T(i),{onFocusableItemAdd:b,onFocusableItemRemove:v,currentTabStopId:k}=f;return t.useEffect(()=>{if(o)return b(),()=>v()},[o,b,v]),(0,s.jsx)(E.ItemSlot,{scope:i,id:h,focusable:o,active:a,children:(0,s.jsx)(y.Primitive.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...d,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{o?f.onItemFocus(h):e.preventDefault()}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>f.onItemFocus(h)),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void f.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let i=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return R[i]}(e,f.orientation,f.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var n,r;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=f.loop?(n=i,r=o+1,n.map((e,t)=>n[(r+t)%n.length])):i.slice(o+1)}setTimeout(()=>z(i))}}),children:"function"==typeof c?c({isCurrentTabStop:m,hasTabStop:null!=k}):c})})});D.displayName=I;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function z(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var L=e.i(73772),P=e.i(602408),j=["Enter"," "],$=["ArrowUp","PageDown","End"],F=["ArrowDown","PageUp","Home",...$],B={ltr:[...j,"ArrowRight"],rtl:[...j,"ArrowLeft"]},H={ltr:["ArrowLeft"],rtl:["ArrowRight"]},U="Menu",[V,q,G]=a(U),[W,K]=(0,r.createContextScope)(U,[G,f.createPopperScope,A]),J=(0,f.createPopperScope)(),Y=A(),[X,Q]=W(U),[Z,ee]=W(U),et=e=>{let{__scopeMenu:n,open:r=!1,children:i,dir:o,onOpenChange:a,modal:l=!0}=e,d=J(n),[u,h]=t.useState(null),p=t.useRef(!1),m=(0,b.useCallbackRef)(a),g=c(o);return t.useEffect(()=>{let e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,s.jsx)(f.Root,{...d,children:(0,s.jsx)(X,{scope:n,open:r,onOpenChange:m,content:u,onContentChange:h,children:(0,s.jsx)(Z,{scope:n,onClose:t.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:g,modal:l,children:i})})})};et.displayName=U;var en=t.forwardRef((e,t)=>
1{let{__scopeMenu:n,...r}=e,i=J(n);return(0,s.jsx)(f.Anchor,{...i,...r,ref:t})});en.displayName="MenuAnchor";var er="MenuPortal",[ei,eo]=W(er,{forceMount:void 0}),es=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Q(er,t);return(0,s.jsx)(ei,{scope:t,forceMount:n,children:(0,s.jsx)(g.Presence,{present:n||o.open,children:(0,s.jsx)(m.Portal,{asChild:!0,container:i,children:r})})})};es.displayName=er;var ea="MenuContent",[el,ec]=W(ea),ed=t.forwardRef((e,t)=>{let n=eo(ea,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Q(ea,e.__scopeMenu),a=ee(ea,e.__scopeMenu);return(0,s.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(g.Presence,{present:r||o.open,children:(0,s.jsx)(V.Slot,{scope:e.__scopeMenu,children:a.modal?(0,s.jsx)(eu,{...i,ref:t}):(0,s.jsx)(eh,{...i,ref:t})})})})}),eu=t.forwardRef((e,r)=>{let o=Q(ea,e.__scopeMenu),a=t.useRef(null),l=(0,i.useComposedRefs)(r,a);return t.useEffect(()=>{let e=a.current;if(e)return(0,L.hideOthers)(e)},[]),(0,s.jsx)(ef,{...e,ref:l,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:(0,n.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),eh=t.forwardRef((e,t)=>{let n=Q(ea,e.__scopeMenu);return(0,s.jsx)(ef,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ep=(0,o.createSlot)("MenuContent.ScrollLock"),ef=t.forwardRef((e,r)=>{let{__scopeMenu:o,loop:a=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:p,disableOutsidePointerEvents:m,onEntryFocus:g,onEscapeKeyDown:y,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:k,onDismiss:x,disableOutsideScroll:w,...E}=e,T=Q(ea,o),S=ee(ea,o),C=J(o),A=Y(o),_=q(o),[N,M]=t.useState(null),I=t.useRef(null),D=(0,i.useComposedRefs)(r,I,T.onContentChange),R=t.useRef(0),z=t.useRef(""),L=t.useRef(0),j=t.useRef(null),B=t.useRef("right"),H=t.useRef(0),U=w?P.RemoveScroll:t.Fragment;t.useEffect(()=>()=>window.clearTimeout(R.current),[]),(0,u.useFocusGuards)();let V=t.useCallback(e=>{var t,n;return B.current===j.current?.side&&(t=e,!!(n=j.current?.area)&&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 s=t[e],a=t[o],l=s.x,c=s.y,d=a.x,u=a.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(i=!i)}return i}({x:t.clientX,y:t.clientY},n))},[]);return(0,s.jsx)(el,{scope:o,searchRef:z,onItemEnter:t.useCallback(e=>{V(e)&&e.preventDefault()},[V]),onItemLeave:t.useCallback(e=>{V(e)||(I.current?.focus(),M(null))},[V]),onTriggerLeave:t.useCallback(e=>{V(e)&&e.preventDefault()},[V]),pointerGraceTimerRef:L,onPointerGraceIntentChange:t.useCallback(e=>{j.current=e},[]),children:(0,s.jsx)(U,{...w?{as:ep,allowPinchZoom:!0}:void 0,children:(0,s.jsx)(h.FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:(0,n.composeEventHandlers)(c,e=>{e.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:(0,s.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:y,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:k,onDismiss:x,children:(0,s.jsx)(O,{asChild:!0,...A,dir:S.dir,orientation:"vertical",loop:a,currentTabStopId:N,onCurrentTabStopIdChange:M,onEntryFocus:(0,n.composeEventHandlers)(g,e=>{S.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,s.jsx)(f.Content,{role:"menu","aria-orientation":"vertical","data-state":eH(T.open),"data-radix-menu-content":"",dir:S.dir,...C,...E,ref:D,style:{outline:"none",...E.style},onKeyDown:(0,n.composeEventHandlers)(E.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;if(t){var i;let t,o,s,a,l,c;"Tab"===e.key&&e.preventDefault(),!n&&r&&(i=e.key,t=z.current+i,o=_().filter(e=>!e.disabled),s=document.activeElement,a=o.find(e=>e.ref.current===s)?.textValue,l=function(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1,s=(r=Math.max(o,0),e.map((t,n)=>e[(r+n)%e.length]));1===i.length&&(s=s.filter(e=>e!==n));let a=s.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}(o.map(e=>e.textValue),t,a),c=o.find(e=>e.textValue===l)?.ref.current,function e(t){z.current=t,window.clearTimeout(R.current),""!==t&&(R.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let o=I.current;
1if(e.target!==o||!F.includes(e.key))return;e.preventDefault();let s=_().filter(e=>!e.disabled).map(e=>e.ref.current);$.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(s)}),onBlur:(0,n.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(R.current),z.current="")}),onPointerMove:(0,n.composeEventHandlers)(e.onPointerMove,eq(e=>{let t=e.target,n=H.current!==e.clientX;e.currentTarget.contains(t)&&n&&(B.current=e.clientX>H.current?"right":"left",H.current=e.clientX)}))})})})})})})});ed.displayName=ea;var em=t.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(y.Primitive.div,{role:"group",...r,ref:t})});em.displayName="MenuGroup";var eg=t.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(y.Primitive.div,{...r,ref:t})});eg.displayName="MenuLabel";var ey="MenuItem",eb="menu.itemSelect",ev=t.forwardRef((e,r)=>{let{disabled:o=!1,onSelect:a,...l}=e,c=t.useRef(null),d=ee(ey,e.__scopeMenu),u=ec(ey,e.__scopeMenu),h=(0,i.useComposedRefs)(r,c),p=t.useRef(!1);return(0,s.jsx)(ek,{...l,ref:h,disabled:o,onClick:(0,n.composeEventHandlers)(e.onClick,()=>{let e=c.current;if(!o&&e){let t=new CustomEvent(eb,{bubbles:!0,cancelable:!0});e.addEventListener(eb,e=>a?.(e),{once:!0}),(0,y.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?p.current=!1:d.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:(0,n.composeEventHandlers)(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==u.searchRef.current;o||t&&" "===e.key||j.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ev.displayName=ey;var ek=t.forwardRef((e,r)=>{let{__scopeMenu:o,disabled:a=!1,textValue:l,...c}=e,d=ec(ey,o),u=Y(o),h=t.useRef(null),p=(0,i.useComposedRefs)(r,h),[f,m]=t.useState(!1),[g,b]=t.useState("");return t.useEffect(()=>{let e=h.current;e&&b((e.textContent??"").trim())},[c.children]),(0,s.jsx)(V.ItemSlot,{scope:o,disabled:a,textValue:l??g,children:(0,s.jsx)(D,{asChild:!0,...u,focusable:!a,children:(0,s.jsx)(y.Primitive.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:p,onPointerMove:(0,n.composeEventHandlers)(e.onPointerMove,eq(e=>{a?d.onItemLeave(e):(d.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,n.composeEventHandlers)(e.onPointerLeave,eq(e=>d.onItemLeave(e))),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>m(!0)),onBlur:(0,n.composeEventHandlers)(e.onBlur,()=>m(!1))})})})}),ex=t.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:i,...o}=e;return(0,s.jsx)(eN,{scope:e.__scopeMenu,checked:r,children:(0,s.jsx)(ev,{role:"menuitemcheckbox","aria-checked":eU(r)?"mixed":r,...o,ref:t,"data-state":eV(r),onSelect:(0,n.composeEventHandlers)(o.onSelect,()=>i?.(!!eU(r)||!r),{checkForDefaultPrevented:!1})})})});ex.displayName="MenuCheckboxItem";var ew="MenuRadioGroup",[eE,eT]=W(ew,{value:void 0,onValueChange:()=>{}}),eS=t.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,o=(0,b.useCallbackRef)(r);return(0,s.jsx)(eE,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,s.jsx)(em,{...i,ref:t})})});eS.displayName=ew;var eC="MenuRadioItem",eA=t.forwardRef((e,t)=>{let{value:r,...i}=e,o=eT(eC,e.__scopeMenu),a=r===o.value;return(0,s.jsx)(eN,{scope:e.__scopeMenu,checked:a,children:(0,s.jsx)(ev,{role:"menuitemradio","aria-checked":a,...i,ref:t,"data-state":eV(a),onSelect:(0,n.composeEventHandlers)(i.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});eA.displayName=eC;var e_="MenuItemIndicator",[eN,eO]=W(e_,{checked:!1}),eM=t.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,o=eO(e_,n);return(0,s.jsx)(g.Presence,{present:r||eU(o.checked)||!0===o.checked,children:(0,s.jsx)(y.Primitive.span,{...i,ref:t,"data-state":eV(o.checked)})})});eM.displayName=e_;var eI=t.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,s.jsx)(y.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});eI.displayName="MenuSeparator";var eD=t.forwardRef((e,t)=>
1{let{__scopeMenu:n,...r}=e,i=J(n);return(0,s.jsx)(f.Arrow,{...i,...r,ref:t})});eD.displayName="MenuArrow";var eR="MenuSub",[ez,eL]=W(eR),eP=e=>{let{__scopeMenu:n,children:r,open:i=!1,onOpenChange:o}=e,a=Q(eR,n),l=J(n),[c,d]=t.useState(null),[u,h]=t.useState(null),m=(0,b.useCallbackRef)(o);return t.useEffect(()=>(!1===a.open&&m(!1),()=>m(!1)),[a.open,m]),(0,s.jsx)(f.Root,{...l,children:(0,s.jsx)(X,{scope:n,open:i,onOpenChange:m,content:u,onContentChange:h,children:(0,s.jsx)(ez,{scope:n,contentId:(0,p.useId)(),triggerId:(0,p.useId)(),trigger:c,onTriggerChange:d,children:r})})})};eP.displayName=eR;var ej="MenuSubTrigger",e$=t.forwardRef((e,r)=>{let o=Q(ej,e.__scopeMenu),a=ee(ej,e.__scopeMenu),l=eL(ej,e.__scopeMenu),c=ec(ej,e.__scopeMenu),d=t.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:h}=c,p={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),h(null)}},[u,h]),(0,s.jsx)(en,{asChild:!0,...p,children:(0,s.jsx)(ek,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":l.contentId,"data-state":eH(o.open),...e,ref:(0,i.composeRefs)(r,l.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:(0,n.composeEventHandlers)(e.onPointerMove,eq(t=>{c.onItemEnter(t),!t.defaultPrevented&&(e.disabled||o.open||d.current||(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100)))})),onPointerLeave:(0,n.composeEventHandlers)(e.onPointerLeave,eq(e=>{f();let t=o.content?.getBoundingClientRect();if(t){let n=o.content?.dataset.side,r="right"===n,i=t[r?"left":"right"],s=t[r?"right":"left"];c.onPointerGraceIntentChange({area:[{x:e.clientX+(r?-5:5),y:e.clientY},{x:i,y:t.top},{x:s,y:t.top},{x:s,y:t.bottom},{x:i,y:t.bottom}],side:n}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(e),e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,t=>{let n=""!==c.searchRef.current;e.disabled||n&&" "===t.key||B[a.dir].includes(t.key)&&(o.onOpenChange(!0),o.content?.focus(),t.preventDefault())})})})});e$.displayName=ej;var eF="MenuSubContent",eB=t.forwardRef((e,r)=>{let o=eo(ea,e.__scopeMenu),{forceMount:a=o.forceMount,...l}=e,c=Q(ea,e.__scopeMenu),d=ee(ea,e.__scopeMenu),u=eL(eF,e.__scopeMenu),h=t.useRef(null),p=(0,i.useComposedRefs)(r,h);return(0,s.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(g.Presence,{present:a||c.open,children:(0,s.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,s.jsx)(ef,{id:u.contentId,"aria-labelledby":u.triggerId,...l,ref:p,align:"start",side:"rtl"===d.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{d.isUsingKeyboardRef.current&&h.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,n.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==u.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:(0,n.composeEventHandlers)(e.onEscapeKeyDown,e=>{d.onClose(),e.preventDefault()}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=H[d.dir].includes(e.key);t&&n&&(c.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});function eH(e){return e?"open":"closed"}function eU(e){return"indeterminate"===e}function eV(e){return eU(e)?"indeterminate":e?"checked":"unchecked"}function eq(e){return t=>"mouse"===t.pointerType?e(t):void 0}eB.displayName=eF,e.s(["Anchor",0,en,"Arrow",0,eD,"CheckboxItem",0,ex,"Content",0,ed,"Group",0,em,"Item",0,ev,"ItemIndicator",0,eM,"Label",0,eg,"Portal",0,es,"RadioGroup",0,eS,"RadioItem",0,eA,"Root",0,et,"Separator",0,eI,"Sub",0,eP,"SubContent",0,eB,"SubTrigger",0,e$,"createMenuScope",0,K],288826)},353444,(e,t,n)=>{var r=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};r.Diff=function(e,t){return[e,t]},r.prototype.diff_main=function(e,t,n,i){void 0===i&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=i;if(null==e||null==t)throw Error("Null input. (diff_main)");if(e==t)return e?[new r.Diff(0,e)]:[];void 0===n&&(n=!0);var s=n,a=this.diff_commonPrefix(e,t),l=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=this.diff_commonSuffix(e,t);var c=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new r.Diff(0,l)),c&&d.push(new r.Diff(0,c)),this.diff_cleanupMerge(d),d},r.prototype.diff_compute_=function(e,t,n,i){if(!e)return[new r.Diff(1,t)];if(!t)return[new r.Diff(-1,e)];var o,s=e.length>t.length?e:t,a=e.length>t.length?t:e,l=s.indexOf(a);if(-1!=l)return o=[new r.Diff(1,s.substring(0,l)),new r.Diff(0,a),new r.Diff(1,s.substring(l+a.length))],e.length>t.length&&(o[0][0]=o[2][0]=-1),o;if(1==a.length)return[new r.Diff(-1,e),new r.Diff(1,t)];var c=this.diff_halfMatch_(e,t);if(c){var d=c[0],u=c[1],h=c[2],p=c[3],f=c[4],m=this.diff_main(d,h,n,i),g=this.diff_main(u,p,n,i);return m.concat([new r.Diff(0,f)],g)}return n&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,i):this.diff_bisect_(e,t,i)},r.prototype.diff_lineMode_=function(e,t,n){var i=this.diff_linesToChars_(e,t);e=i.chars1,t=i.chars2;var o=i.lineArray,s=this.diff_main(e,t,!1,n);this.diff_charsToLines_(s,o),this.diff_cleanupSemantic(s),s.push(new r.Diff(0,""));for(var a=0,l=0,c=0,d="",u="";a<s.length;){switch(s[a][0]){case 1:c++,u+=s[a][1];break;case -1:l++,d+=s[a][1];break;case 0:if(l>=1&&c>=1){s.splice(a-l-c,l+c),a=a-l-c;for(var h=this.diff_main(d,u,!1,n),p=h.length-1;p>=0;p--)s.splice(a,0,h[p]);a+=h.length}c=0,l=0,d="",u=""}a++}
vendor: 15,182 bytes, line 1
1return s.pop(),s},r.prototype.diff_bisect_=function(e,t,n){for(var i=e.length,o=t.length,s=Math.ceil((i+o)/2),a=2*s,l=Array(a),c=Array(a),d=0;d<a;d++)l[d]=-1,c[d]=-1;l[s+1]=0,c[s+1]=0;for(var u=i-o,h=u%2!=0,p=0,f=0,m=0,g=0,y=0;y<s&&!(new Date().getTime()>n);y++){for(var b=-y+p;b<=y-f;b+=2){for(var v,k=s+b,x=(v=b==-y||b!=y&&l[k-1]<l[k+1]?l[k+1]:l[k-1]+1)-b;v<i&&x<o&&e.charAt(v)==t.charAt(x);)v++,x++;if(l[k]=v,v>i)f+=2;else if(x>o)p+=2;else if(h){var w=s+u-b;if(w>=0&&w<a&&-1!=c[w]){var E=i-c[w];if(v>=E)return this.diff_bisectSplit_(e,t,v,x,n)}}}for(var T=-y+m;T<=y-g;T+=2){for(var E,w=s+T,S=(E=T==-y||T!=y&&c[w-1]<c[w+1]?c[w+1]:c[w-1]+1)-T;E<i&&S<o&&e.charAt(i-E-1)==t.charAt(o-S-1);)E++,S++;if(c[w]=E,E>i)g+=2;else if(S>o)m+=2;else if(!h){var k=s+u-T;if(k>=0&&k<a&&-1!=l[k]){var v=l[k],x=s+v-k;if(v>=(E=i-E))return this.diff_bisectSplit_(e,t,v,x,n)}}}}return[new r.Diff(-1,e),new r.Diff(1,t)]},r.prototype.diff_bisectSplit_=function(e,t,n,r,i){var o=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),c=this.diff_main(o,s,!1,i),d=this.diff_main(a,l,!1,i);return c.concat(d)},r.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t="",i=0,s=-1,a=n.length;s<e.length-1;){-1==(s=e.indexOf("\n",i))&&(s=e.length-1);var l=e.substring(i,s+1);(r.hasOwnProperty?r.hasOwnProperty(l):void 0!==r[l])?t+=String.fromCharCode(r[l]):(a==o&&(l=e.substring(i),s=e.length),t+=String.fromCharCode(a),r[l]=a,n[a++]=l),i=s+1}return t}n[0]="";var o=4e4,s=i(e);return o=65535,{chars1:s,chars2:i(t),lineArray:n}},r.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)];e[n][1]=i.join("")}},r.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i},r.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(0==n||0==r)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var o=0,s=1;;){var a=e.substring(i-s),l=t.indexOf(a);if(-1==l)return o;s+=l,(0==l||e.substring(i-s)==t.substring(0,s))&&(o=s,s++)}},r.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n,r,i,o,s,a=e.length>t.length?e:t,l=e.length>t.length?t:e;if(a.length<4||2*l.length<a.length)return null;var c=this;function d(e,t,n){for(var r,i,o,s,a=e.substring(n,n+Math.floor(e.length/4)),l=-1,d="";-1!=(l=t.indexOf(a,l+1));){var u=c.diff_commonPrefix(e.substring(n),t.substring(l)),h=c.diff_commonSuffix(e.substring(0,n),t.substring(0,l));d.length<h+u&&(d=t.substring(l-h,l)+t.substring(l,l+u),r=e.substring(0,n-h),i=e.substring(n+u),o=t.substring(0,l-h),s=t.substring(l+u))}return 2*d.length>=e.length?[r,i,o,s,d]:null}var u=d(a,l,Math.ceil(a.length/4)),h=d(a,l,Math.ceil(a.length/2));return u||h?(n=h?u&&u[4].length>h[4].length?u:h:u,e.length>t.length?(r=n[0],i=n[1],o=n[2],s=n[3]):(o=n[0],s=n[1],r=n[2],i=n[3]),[r,i,o,s,n[4]]):null},r.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],i=0,o=null,s=0,a=0,l=0,c=0,d=0;s<e.length;)0==e[s][0]?(n[i++]=s,a=c,l=d,c=0,d=0,o=e[s][1]):(1==e[s][0]?c+=e[s][1].length:d+=e[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(c,d)&&(e.splice(n[i-1],0,new r.Diff(-1,o)),e[n[i-1]+1][0]=1,i--,s=--i>0?n[i-1]:-1,a=0,l=0,c=0,d=0,o=null,t=!0)),s++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s<e.length;){if(-1==e[s-1][0]&&1==e[s][0]){var u=e[s-1][1],h=e[s][1],p=this.diff_commonOverlap_(u,h),f=this.diff_commonOverlap_(h,u);p>=f?(p>=u.length/2||p>=h.length/2)&&(e.splice(s,0,new r.Diff(0,h.substring(0,p))),e[s-1][1]=u.substring(0,u.length-p),e[s+1][1]=h.substring(p),s++):(f>=u.length/2||f>=h.length/2)&&(e.splice(s,0,new r.Diff(0,u.substring(0,f))),e[s-1][0]=1,e[s-1][1]=h.substring(0,h.length-f),e[s+1][0]=-1,e[s+1][1]=u.substring(f),s++),s++}s++}},r.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),o=n.match(r.nonAlphaNumericRegex_),s=i.match(r.nonAlphaNumericRegex_),a=o&&n.match(r.whitespaceRegex_),l=s&&i.match(r.whitespaceRegex_),c=a&&n.match(r.linebreakRegex_),d=l&&i.match(r.linebreakRegex_),u=c&&e.match(r.blanklineEndRegex_),h=d&&t.match(r.blanklineStartRegex_);if(u||h)return 5;if(c||d)return 4;if(o&&!a&&l)return 3;if(a||l)return 2;if(o||s)return 1;return 0}for(var n=1;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var i=e[n-1][1],o=e[n][1],s=e[n+1][1],a=this.diff_commonSuffix(i,o);if(a){var l=o.substring(o.length-a);i=i.substring(0,i.length-a),o=l+o.substring(0,o.length-a),s=l+s}for(var c=i,d=o,u=s,h=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var p=t(i,o)+t(o,s);p>=h&&(h=p,c=i,d=o,u=s)}e[n-1][1]!=c&&(c?e[n-1][1]=c:(e.splice(n-1,1),n--),e[n][1]=d,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}},r.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,r.whitespaceRegex_=/\s/,r.linebreakRegex_=/[\r\n]/,r.blanklineEndRegex_=/\n\r?\n$/,r.blanklineStartRegex_=/^\r?\n\r?\n/,r.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],i=0,o=null,s=0,a=!1,l=!1,c=!1,d=!1;s<e.length;)0==e[s][0]?(e[s][1].length<this.Diff_EditCost&&(c||d)?(n[i++]=s,a=c,l=d,o=e[s][1]):(i=0,o=null),c=d=!1):(-1==e[s][0]?d=!0:c=!0,o&&(a&&l&&c&&d||o.length<this.Diff_EditCost/2&&a+l+c+d==3)&&(e.splice(n[i-1],0,new r.Diff(-1,o)),e[n[i-1]+1][0]=1,i--,o=null,a&&l?(c=d=!0,i=0):(s=--i>0?n[i-1]:-1,c=d=!1),t=!0)),s++;t&&this.diff_cleanupMerge(e)},r.prototype.diff_cleanupMerge=function(e){e.push(new r.Diff(0,""));for(var t,n=0,i=0,o=0,s="",a="";n<e.length;)switch(e[n][0]){case 1:o++,a+=e[n][1],n++;break;case -1:i++,s+=e[n][1],n++;break;case 0:i+o>1?(0!==i&&0!==o&&(0!==(t=this.diff_commonPrefix(a,s))&&(n-i-o>0&&0==e[n-i-o-1][0]?e[n-i-o-1][1]+=a.substring(0,t):(e.splice(0,0,new r.Diff(0,a.substring(0,t))),n++),a=a.substring(t),s=s.substring(t)),0!==(t=this.diff_commonSuffix(a,s))&&(e[n][1]=a.substring(a.length-t)+e[n][1],a=a.substring(0,a.length-t),s=s.substring(0,s.length-t))),n-=i+o,e.splice(n,i+o),s.length&&(e.splice(n,0,new r.Diff(-1,s)),n++),a.length&&(e.splice(n,0,new r.Diff(1,a)),n++),n++):0!==n&&0==e[n-1][0]?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,o=0,i=0,s="",a=""}""===e[e.length-1][1]&&e.pop();var l=!1;for(n=1;n<e.length-1;)0==e[n-1][0]&&0==e[n+1][0]&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)==e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),l=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),l=!0)),n++;l&&this.diff_cleanupMerge(e)},r.prototype.diff_xIndex=function(e,t){var n,r=0,i=0,o=0,s=0;for(n=0;n<e.length&&(1!==e[n][0]&&(r+=e[n][1].length),-1!==e[n][0]&&(i+=e[n][1].length),!(r>t));n++)o=r,s=i;return e.length!=n&&-1===e[n][0]?s:s+(t-o)},r.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,i=/>/g,o=/\n/g,s=0;s<e.length;s++){var a=e[s][0],l=e[s][1].replace(n,"&").replace(r,"<").replace(i,">").replace(o,"¶<br>");switch(a){case 1:t[s]='<ins style="background:#e6ffe6;">'+l+"</ins>";break;case -1:t[s]='<del style="background:#ffe6e6;">'+l+"</del>";break;case 0:t[s]="<span>"+l+"</span>"}}return t.join("")},r.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)-1!==e[n][0]&&(t[n]=e[n][1]);return t.join("")},r.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var o=e[i][0],s=e[i][1];switch(o){case 1:n+=s.length;break;case -1:r+=s.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+Math.max(n,r)},r.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]="+"+encodeURI(e[n][1]);break;case -1:t[n]="-"+e[n][1].length;break;case 0:t[n]="="+e[n][1].length}return t.join(" ").replace(/%20/g," ")},r.prototype.diff_fromDelta=function(e,t){for(var n=[],i=0,o=0,s=t.split(/\t/g),a=0;a<s.length;a++){var l=s[a].substring(1);switch(s[a].charAt(0)){case"+":try{n[i++]=new r.Diff(1,decodeURI(l))}catch(e){throw Error("Illegal escape in diff_fromDelta: "+l)}break;case"-":case"=":var c=parseInt(l,10);if(isNaN(c)||c<0)throw Error("Invalid number in diff_fromDelta: "+l);var d=e.substring(o,o+=c);"="==s[a].charAt(0)?n[i++]=new r.Diff(0,d):n[i++]=new r.Diff(-1,d);break;default:if(s[a])throw Error("Invalid diff operation in diff_fromDelta: "+s[a])}}if(o!=e.length)throw Error("Delta length ("+o+") does not equal source text length ("+e.length+").");return n},r.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw Error("Null input. (match_main)");return(n=Math.max(0,Math.min(n,e.length)),e==t)?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},r.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var r,i,o,s=this.match_alphabet_(t),a=this;function l(e,r){var i=e/t.length,o=Math.abs(n-r);return a.Match_Distance?i+o/a.Match_Distance:o?1:i}var c=this.Match_Threshold,d=e.indexOf(t,n);-1!=d&&(c=Math.min(l(0,d),c),-1!=(d=e.lastIndexOf(t,n+t.length))&&(c=Math.min(l(0,d),c)));var u=1<<t.length-1;d=-1;for(var h=t.length+e.length,p=0;p<t.length;p++){for(r=0,i=h;r<i;)l(p,n+i)<=c?r=i:h=i,i=Math.floor((h-r)/2+r);h=i;var f=Math.max(1,n-i+1),m=Math.min(n+i,e.length)+t.length,g=Array(m+2);g[m+1]=(1<<p)-1;for(var y=m;y>=f;y--){var b=s[e.charAt(y-1)];if(0===p?g[y]=(g[y+1]<<1|1)&b:g[y]=(g[y+1]<<1|1)&b|((o[y+1]|o[y])<<1|1)|o[y+1],g[y]&u){var v=l(p,y-1);if(v<=c)if(c=v,(d=y-1)>n)f=Math.max(1,2*n-d);else break}}if(l(p+1,n)>c)break;o=g}return d},r.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},r.prototype.patch_addContext_=function(e,t){if(0!=t.length){if(null===e.start2)throw Error("patch not initialized");for(var n=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(n)!=t.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,n=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new r.Diff(0,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new r.Diff(0,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},r.prototype.patch_make=function(e,t,n){if("string"==typeof e&&"string"==typeof t&&void 0===n)i=e,(o=this.diff_main(i,t,!0)).length>2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(e&&"object"==typeof e&&void 0===t&&void 0===n)o=e,i=this.diff_text1(o);else if("string"==typeof e&&t&&"object"==typeof t&&void 0===n)i=e,o=t;else if("string"==typeof e&&"string"==typeof t&&n&&"object"==typeof n)i=e,o=n;else throw Error("Unknown call format to patch_make.");if(0===o.length)return[];for(var i,o,s=[],a=new r.patch_obj,l=0,c=0,d=0,u=i,h=i,p=0;p<o.length;p++){var f=o[p][0],m=o[p][1];switch(!l&&0!==f&&(a.start1=c,a.start2=d),f){case 1:a.diffs[l++]=o[p],a.length2+=m.length,h=h.substring(0,d)+m+h.substring(d);break;case -1:a.length1+=m.length,a.diffs[l++]=o[p],h=h.substring(0,d)+h.substring(d+m.length);break;case 0:m.length<=2*this.Patch_Margin&&l&&o.length!=p+1?(a.diffs[l++]=o[p],a.length1+=m.length,a.length2+=m.length):m.length>=2*this.Patch_Margin&&l&&(this.patch_addContext_(a,u),s.push(a),a=new r.patch_obj,l=0,u=h,c=d)}1!==f&&(c+=m.length),-1!==f&&(d+=m.length)}return l&&(this.patch_addContext_(a,u),s.push(a)),s},r.prototype.patch_deepCopy=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],o=new r.patch_obj;o.diffs=[];for(var s=0;s<i.diffs.length;s++)o.diffs[s]=new r.Diff(i.diffs[s][0],i.diffs[s][1]);o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,t[n]=o}return t},r.prototype.patch_apply=function(e,t){if(0==e.length)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,i=[],o=0;o<e.length;o++){var s=e[o].start2+r,a=this.diff_text1(e[o].diffs),l=-1;if(a.length>this.Match_MaxBits?-1!=(d=this.match_main(t,a.substring(0,this.Match_MaxBits),s))&&(-1==(l=this.match_main(t,a.substring(a.length-this.Match_MaxBits),s+a.length-this.Match_MaxBits))||d>=l)&&(d=-1):d=this.match_main(t,a,s),-1==d)i[o]=!1,r-=e[o].length2-e[o].length1;else if(i[o]=!0,r=d-s,u=-1==l?t.substring(d,d+a.length):t.substring(d,l+this.Match_MaxBits),a==u)t=t.substring(0,d)+this.diff_text2(e[o].diffs)+t.substring(d+a.length);else{var c=this.diff_main(a,u,!1);if(a.length>this.Match_MaxBits&&this.diff_levenshtein(c)/a.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(c);for(var d,u,h,p=0,f=0;f<e[o].diffs.length;f++){var m=e[o].diffs[f];0!==m[0]&&(h=this.diff_xIndex(c,p)),1===m[0]?t=t.substring(0,d+h)+m[1]+t.substring(d+h):-1===m[0]&&(t=t.substring(0,d+h)+t.substring(d+this.diff_xIndex(c,p+m[1].length))),-1!==m[0]&&(p+=m[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),i]},r.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,n="",i=1;i<=t;i++)n+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(0==s.length||0!=s[0][0])s.unshift(new r.Diff(0,n)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var a=t-s[0][1].length;s[0][1]=n.substring(s[0][1].length)+s[0][1],o.start1-=a,o.start2-=a,o.length1+=a,o.length2+=a}if(0==(s=(o=e[e.length-1]).diffs).length||0!=s[s.length-1][0])s.push(new r.Diff(0,n)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var a=t-s[s.length-1][1].length;s[s.length-1][1]+=n.substring(0,a),o.length1+=a,o.length2+=a}return n},r.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,n=0;n<e.length;n++)if(!(e[n].length1<=t)){var i=e[n];e.splice(n--,1);for(var o=i.start1,s=i.start2,a="";0!==i.diffs.length;){var l=new r.patch_obj,c=!0;for(l.start1=o-a.length,l.start2=s-a.length,""!==a&&(l.length1=l.length2=a.length,l.diffs.push(new r.Diff(0,a)));0!==i.diffs.length&&l.length1<t-this.Patch_Margin;){var d=i.diffs[0][0],u=i.diffs[0][1];1===d?(l.length2+=u.length,s+=u.length,l.diffs.push(i.diffs.shift()),c=!1):-1===d&&1==l.diffs.length&&0==l.diffs[0][0]&&u.length>2*t?(l.length1+=u.length,o+=u.length,c=!1,l.diffs.push(new r.Diff(d,u)),i.diffs.shift()):(u=u.substring(0,t-l.length1-this.Patch_Margin),l.length1+=u.length,o+=u.length,0===d?(l.length2+=u.length,s+=u.length):c=!1,l.diffs.push(new r.Diff(d,u)),u==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(u.length))}a=(a=this.diff_text2(l.diffs)).substring(a.length-this.Patch_Margin);var h=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);
1""!==h&&(l.length1+=h.length,l.length2+=h.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=h:l.diffs.push(new r.Diff(0,h))),c||e.splice(++n,0,l)}}},r.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join("")},r.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var n=e.split("\n"),i=0,o=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<n.length;){var s=n[i].match(o);if(!s)throw Error("Invalid patch string: "+n[i]);var a=new r.patch_obj;for(t.push(a),a.start1=parseInt(s[1],10),""===s[2]?(a.start1--,a.length1=1):"0"==s[2]?a.length1=0:(a.start1--,a.length1=parseInt(s[2],10)),a.start2=parseInt(s[3],10),""===s[4]?(a.start2--,a.length2=1):"0"==s[4]?a.length2=0:(a.start2--,a.length2=parseInt(s[4],10)),i++;i<n.length;){var l=n[i].charAt(0);try{var c=decodeURI(n[i].substring(1))}catch(e){throw Error("Illegal escape in patch_fromText: "+c)}if("-"==l)a.diffs.push(new r.Diff(-1,c));else if("+"==l)a.diffs.push(new r.Diff(1,c));else if(" "==l)a.diffs.push(new r.Diff(0,c));else if("@"==l)break;else if(""===l);else throw Error('Invalid patch mode "'+l+'" in: '+c);i++}}return t},r.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},r.patch_obj.prototype.toString=function(){e=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;for(var e,t,n=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2,r=["@@ -"+e+" +"+n+" @@\n"],i=0;i<this.diffs.length;i++){switch(this.diffs[i][0]){case 1:t="+";break;case -1:t="-";break;case 0:t=" "}r[i+1]=t+encodeURI(this.diffs[i][1])+"\n"}return r.join("").replace(/%20/g," ")},t.exports=r,t.exports.diff_match_patch=r,t.exports.DIFF_DELETE=-1,t.exports.DIFF_INSERT=1,t.exports.DIFF_EQUAL=0},975609,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(s)return s(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,o,s,u=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},h=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});h<p;++h)if(t=arguments[h],null!=t)for(n in t)r=d(u,n),u!==(i=d(t,n))&&(f&&i&&(l(i)||(o=a(i)))?(o?(o=!1,s=r&&a(r)?r:[]):s=r&&l(r)?r:{},c(u,{name:n,newValue:e(f,s,i)})):void 0!==i&&c(u,{name:n,newValue:i}));return u}},439216,(e,t,n)=>{var r;function i(e){for(var t,n,r,i,o=1,s=[].slice.call(arguments),a=0,l=e.length,c="",d=!1,u=!1,h=function(){return s[o++]};a<l;++a)if(t=e[a],d)switch(d=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,a+=2,t=e[a]):u=!0,i=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null}(),t){case"b":c+=parseInt(h(),10).toString(2);break;case"c":"string"==typeof(n=h())||n instanceof String?c+=n:c+=String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(h(),10);break;case"f":r=String(parseFloat(h()).toFixed(i||6)),c+=u?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(h());break;case"o":c+="0"+parseInt(h(),10).toString(8);break;case"s":c+=h();break;case"x":c+="0x"+parseInt(h(),10).toString(16);break;case"X":c+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?d=!0:c+=t;return c}(r=t.exports=i).format=i,r.vsprintf=function(e,t){return i.apply(null,[e].concat(t))},"u">typeof console&&"function"==typeof console.log&&(r.printf=function(){console.log(i.apply(null,arguments))})},377989,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class r{}n._CodeOrName=r,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends r{constructor(e){if(super(),!n.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=i;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>
1`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof i&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function s(e,...t){let n=[e[0]],r=0;for(;r<t.length;)c(n,t[r]),n.push(e[++r]);return new o(n)}n._Code=o,n.nil=new o(""),n._=s;let a=new o("+");function l(e,...t){let n=[d(e[0])],r=0;for(;r<t.length;)n.push(a),c(n,t[r]),n.push(a,d(e[++r]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){var n,r;let o=(n=e[t-1],'""'===(r=e[t+1])?n:'""'===n?r:"string"==typeof n?r instanceof i||'"'!==n[n.length-1]?void 0:"string"!=typeof r?`${n.slice(0,-1)}${r}"`:'"'===r[0]?n.slice(0,-1)+r.slice(1):void 0:"string"!=typeof r||'"'!==r[0]||n instanceof i?void 0:`"${n}${r.slice(1)}`);if(void 0!==o){e.splice(t-1,3,o);continue}e[t++]="+"}t++}}(n),new o(n)}function c(e,t){var n;t instanceof o?e.push(...t._items):t instanceof i?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:d(Array.isArray(n)?n.join(","):n))}function d(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}n.str=l,n.addCodeArg=c,n.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:l`${e}${t}`},n.stringify=function(e){return new o(d(e))},n.safeStringify=d,n.getProperty=function(e){return"string"==typeof e&&n.IDENTIFIER.test(e)?new o(`.${e}`):s`[${e}]`},n.getEsmExportName=function(e){if("string"==typeof e&&n.IDENTIFIER.test(e))return new o(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},n.regexpCode=function(e){return new o(e.toString())}},684234,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;let o=e.r(377989);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}(i=r||(n.UsedValueState=r={}))[i.Started=0]="Started",i[i.Completed=1]="Completed",n.varKinds={const:new o.Name("const"),let:new o.Name("let"),var:new o.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof o.Name?e:this.name(e)}name(e){return new o.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if((null==(n=null==(t=this._parent)?void 0:t._prefixes)?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}n.Scope=a;class l extends o.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,o._)`.${new o.Name(t)}[${n}]`}}n.ValueScopeName=l;let c=(0,o._)`\n`;n.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:o.nil}}get(){return this._scope}name(e){return new l(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:i}=r,o=null!=(n=t.key)?n:t.ref,s=this._values[i];if(s){let e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,r);let a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,r.setValue(t,{property:i,itemIndex:l}),r}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw Error(`CodeGen: name "${t}" has no value`);return(0,o._)`${e}${t.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(e,t,i={},a){let l=o.nil;for(let c in e){let d=e[c];if(!d)continue;let u=i[c]=i[c]||new Map;d.forEach(e=>{if(u.has(e))return;u.set(e,r.Started);let i=t(e);if(i){let t=this.opts.es5?n.varKinds.var:n.varKinds.const;l=(0,o._)`${l}${t} ${e} = ${i};${this.opts._n}`}else if(i=null==a?void 0:a(e))l=(0,o._)`${l}${i}${this.opts._n}`;else throw new s(e);u.set(e,r.Completed)})}return l}}},352438,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;let r=e.r(377989),i=e.r(684234);var o=e.r(377989);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return o.Name}});var s=e.r(684234);Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),n.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}
1){let n=e?i.varKinds.var:this.varKind,r=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=M(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=M(this.rhs,e,t),this}get names(){return O(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class d extends c{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){let t=this.label?` ${this.label}`:"";return`break${t};`+e}}class p extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=M(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(function(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>N(e,t.names),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class b extends g{}b.kind="else";class v extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){let e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(I(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null==(n=this.else)?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=M(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&N(e,this.else.names),e}}v.kind="if";class k extends g{}k.kind="for";class x extends k{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=M(this.iteration,e,t),this}get names(){return N(super.names,this.iteration.names)}}class w extends k{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?i.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=O(super.names,this.from);return O(e,this.to)}}class E extends k{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=M(this.iterable,e,t),this}get names(){return N(super.names,this.iterable.names)}}class T extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){let t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}T.kind="func";class S extends m{render(e){return"return "+super.render(e)}}S.kind="return";class C extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null==(n=this.catch)||n.optimizeNames(e,t),null==(r=this.finally)||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&N(e,this.catch.names),this.finally&&N(e,this.finally.names),e}}class A extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}A.kind="catch";class _ extends g{render(e){return"finally"+super.render(e)}}function N(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,t){return t instanceof r._CodeOrName?N(e,t.names):e}function M(e,t,n){var i;if(e instanceof r.Name)return o(e);if(!((i=e)instanceof r._Code&&i._items.some(e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str])))return e;return new r._Code(e._items.reduce((e,t)=>
1(t instanceof r.Name&&(t=o(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e),[]));function o(e){let r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}function I(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,r._)`!${L(e)}`}_.kind="finally",n.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return void 0!==n&&r&&(this._constants[i.str]=n),this._leafNode(new l(e,i,n)),i}const(e,t,n){return this._def(i.varKinds.const,e,t,n)}let(e,t,n){return this._def(i.varKinds.let,e,t,n)}var(e,t,n){return this._def(i.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,t){return this._leafNode(new d(e,n.operators.ADD,t))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new f(e)),this}object(...e){let t=["{"];for(let[n,i]of e)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),(0,r.addCodeArg)(t,i));return t.push("}"),new r._Code(t)}if(e,t,n){if(this._blockNode(new v(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,n,r,o=this.opts.es5?i.varKinds.var:i.varKinds.let){let s=this._scope.toName(e);return this._for(new w(o,s,t,n),()=>r(s))}forOf(e,t,n,o=i.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,r._)`${e}.length`,t=>{this.var(s,(0,r._)`${e}[${t}]`),n(s)})}return this._for(new E("of",o,s,t),()=>n(s))}forIn(e,t,n,o=this.opts.es5?i.varKinds.var:i.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,r._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new E("in",o,s,t),()=>n(s))}endFor(){return this._endBlockNode(k)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new h(e))}return(e){let t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let r=new C;if(this._blockNode(r),this.code(e),t){let e=this.name("e");this._currNode=r.catch=new A(e),t(e)}return n&&(this._currNode=r.finally=new _,this.code(n)),this._endBlockNode(A,_)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,n,i){return this._blockNode(new T(e,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof v))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}},n.not=I;let D=z(n.operators.AND);n.and=function(...e){return e.reduce(D)};let R=z(n.operators.OR);function z(e){return(t,n)=>t===r.nil?n:n===r.nil?t:(0,r._)`${L(t)} ${e} ${L(n)}`}function L(e){return e instanceof r.Name?e:(0,r._)`(${e})`}n.or=function(...e){return e.reduce(R)}},748143,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;let o=e.r(352438),s=e.r(377989);function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||"boolean"==typeof t)return;let i=r.RULES.keywords;for(let n in t)i[n]||m(e,`unknown keyword: "${n}"`)}function l(e,t){if("boolean"==typeof e)return!e;for(let n in e)if(t[n])return!0;return!1}function c(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function u({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(i,s,a,l)=>{let c=void 0===a?s:a instanceof o.Name?(s instanceof o.Name?e(i,s,a):t(i,s,a),a):s instanceof o.Name?(t(i,a,s),s):n(s,a);return l!==o.Name||c instanceof o.Name?c:r(i,c)}}function h(e,t){if(!0===t)return e.var("props",!0);let n=e.var("props",(0,o._)`{}`);return void 0!==t&&p(e,n,t),n}
1function p(e,t,n){Object.keys(n).forEach(n=>e.assign((0,o._)`${t}${(0,o.getProperty)(n)}`,!0))}n.toHash=function(e){let t={};for(let n of e)t[n]=!0;return t},n.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(a(e,t),!l(t,e.self.RULES.all))},n.checkUnknownRules=a,n.schemaHasRules=l,n.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let n in e)if("$ref"!==n&&t.all[n])return!0;return!1},n.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,r,i){if(!i){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return(0,o._)`${n}`}return(0,o._)`${e}${t}${(0,o.getProperty)(r)}`},n.unescapeFragment=function(e){return d(decodeURIComponent(e))},n.escapeFragment=function(e){return encodeURIComponent(c(e))},n.escapeJsonPointer=c,n.unescapeJsonPointer=d,n.eachItem=function(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)},n.mergeEvaluated={props:u({mergeNames:(e,t,n)=>e.if((0,o._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,o._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,o._)`${n} || {}`).code((0,o._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,o._)`${n} !== true`,()=>{!0===t?e.assign(n,!0):(e.assign(n,(0,o._)`${n} || {}`),p(e,n,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:h}),items:u({mergeNames:(e,t,n)=>e.if((0,o._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,o._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,o._)`${n} !== true`,()=>e.assign(n,!0===t||(0,o._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},n.evaluatedPropsToName=h,n.setEvaluated=p;let f={};function m(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw Error(t);e.self.logger.warn(t)}}n.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new s._Code(t.code))})},(i=r||(n.Type=r={}))[i.Num=0]="Num",i[i.Str=1]="Str",n.getErrorPath=function(e,t,n){if(e instanceof o.Name){let i=t===r.Num;return n?i?(0,o._)`"[" + ${e} + "]"`:(0,o._)`"['" + ${e} + "']"`:i?(0,o._)`"/" + ${e}`:(0,o._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,o.getProperty)(e).toString():"/"+c(e)},n.checkStrictMode=m},560216,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438);n.default={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")}},24601,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;let r=e.r(352438),i=e.r(748143),o=e.r(560216);function s(e,t){let n=e.const("err",t);e.if((0,r._)`${o.default.vErrors} === null`,()=>e.assign(o.default.vErrors,(0,r._)`[${n}]`),(0,r._)`${o.default.vErrors}.push(${n})`),e.code((0,r._)`${o.default.errors}++`)}function a(e,t){let{gen:n,validateName:i,schemaEnv:o}=e;o.$async?n.throw((0,r._)`new ${e.ValidationError}(${t})`):(n.assign((0,r._)`${i}.errors`,t),n.return(!1))}n.keywordError={message:({keyword:e})=>(0,r.str)`must pass "${e}" keyword validation`},n.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,r.str)`"${e}" keyword must be ${t} ($data)`:(0,r.str)`"${e}" keyword is invalid ($data)`},n.reportError=function(e,t=n.keywordError,i,o){let{it:l}=e,{gen:d,compositeRule:u,allErrors:h}=l,p=c(e,t,i);(null!=o?o:u||h)?s(d,p):a(l,(0,r._)`[${p}]`)},n.reportExtraError=function(e,t=n.keywordError,r){let{it:i}=e,{gen:l,compositeRule:d,allErrors:u}=i;s(l,c(e,t,r)),d||u||a(i,o.default.vErrors)},n.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if((0,r._)`${o.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,r._)`${o.default.vErrors}.length`,t),()=>e.assign(o.default.vErrors,null)))},n.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:i,errsCount:s,it:a}){if(void 0===s)throw Error("ajv implementation error");let l=e.name("err");e.forRange("i",s,o.default.errors,s=>{e.const(l,(0,r._)`${o.default.vErrors}[${s}]`),e.if((0,r._)`${l}.instancePath === undefined`,()=>e.assign((0,r._)`${l}.instancePath`,(0,r.strConcat)(o.default.instancePath,a.errorPath))),e.assign((0,r._)`${l}.schemaPath`,(0,r.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,r._)`${l}.schema`,n),e.assign((0,r._)`${l}.data`,i))})};let l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.
1Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function c(e,t,n){let{createErrors:s}=e.it;return!1===s?(0,r._)`{}`:function(e,t,n={}){let{gen:s,it:a}=e,c=[function({errorPath:e},{instancePath:t}){let n=t?(0,r.str)`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,r.strConcat)(o.default.instancePath,n)]}(a,n),function({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let s=o?t:(0,r.str)`${t}/${e}`;return n&&(s=(0,r.str)`${s}${(0,i.getErrorPath)(n,i.Type.Str)}`),[l.schemaPath,s]}(e,n)];return function(e,{params:t,message:n},i){let{keyword:s,data:a,schemaValue:c,it:d}=e,{opts:u,propertyName:h,topSchemaRef:p,schemaPath:f}=d;i.push([l.keyword,s],[l.params,"function"==typeof t?t(e):t||(0,r._)`{}`]),u.messages&&i.push([l.message,"function"==typeof n?n(e):n]),u.verbose&&i.push([l.schema,c],[l.parentSchema,(0,r._)`${p}${f}`],[o.default.data,a]),h&&i.push([l.propertyName,h])}(e,t,c),s.object(...c)}(e,t,n)}},371539,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.boolOrEmptySchema=n.topBoolOrEmptySchema=void 0;let r=e.r(24601),i=e.r(352438),o=e.r(560216),s={message:"boolean schema is false"};function a(e,t){let{gen:n,data:i}=e;(0,r.reportError)({gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},s,void 0,t)}n.topBoolOrEmptySchema=function(e){let{gen:t,schema:n,validateName:r}=e;!1===n?a(e,!1):"object"==typeof n&&!0===n.$async?t.return(o.default.data):(t.assign((0,i._)`${r}.errors`,null),t.return(!0))},n.boolOrEmptySchema=function(e,t){let{gen:n,schema:r}=e;!1===r?(n.var(t,!1),a(e)):n.var(t,!0)}},631215,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRules=n.isJSONType=void 0;let r=new Set(["string","number","integer","boolean","null","object","array"]);n.isJSONType=function(e){return"string"==typeof e&&r.has(e)},n.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},810027,(e,t,n)=>{"use strict";function r(e,t){return t.rules.some(t=>i(e,t))}function i(e,t){var n;return void 0!==e[t.keyword]||(null==(n=t.definition.implements)?void 0:n.some(t=>void 0!==e[t]))}Object.defineProperty(n,"__esModule",{value:!0}),n.shouldUseRule=n.shouldUseGroup=n.schemaHasRulesForType=void 0,n.schemaHasRulesForType=function({schema:e,self:t},n){let i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},n.shouldUseGroup=r,n.shouldUseRule=i},742833,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;let o=e.r(631215),s=e.r(810027),a=e.r(24601),l=e.r(352438),c=e.r(748143);function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(o.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(i=r||(n.DataType=r={}))[i.Correct=0]="Correct",i[i.Wrong=1]="Wrong",n.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},n.getJSONTypes=d,n.coerceAndCheckDataType=function(e,t){var n,i;let{gen:o,data:a,opts:c}=e,d=(n=t,(i=c.coerceTypes)?n.filter(e=>u.has(e)||"array"===i&&"array"===e):[]),h=t.length>0&&!(0===d.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(h){let n=p(t,a,c.strictNumbers,r.Wrong);o.if(n,()=>{d.length?function(e,t,n){let{gen:r,data:i,opts:o}=e,s=r.let("dataType",(0,l._)`typeof ${i}`),a=r.let("coerced",(0,l._)`undefined`);for(let e of("array"===o.coerceTypes&&r.if((0,l._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,l._)`${i}[0]`).assign(s,(0,l._)`typeof ${i}`).if(p(t,i,o.strictNumbers),()=>r.assign(a,i))),r.if((0,l._)`${a} !== undefined`),n))(u.has(e)||"array"===e&&"array"===o.coerceTypes)&&function(e){switch(e){case"string":r.elseIf((0,l._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,l._)`"" + ${i}`).elseIf((0,l._)`${i} === null`).assign(a,(0,l._)`""`);return;case"number":r.elseIf((0,l._)`${s} == "boolean" || ${i} === null 2 || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,l._)`+${i}`);return;case"integer":r.elseIf((0,l._)`${s} === "boolean" || ${i} === null 3 || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,l._)`+${i}`);return;case"boolean":r.elseIf((0,l._)`${i}
3 === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,l._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,l._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,l._)`${s} === "string" || ${s} === "number" 4 || ${s} === "boolean" || ${i} === null`).assign(a,(0,l._)`[${i}]`)}}(e);r.else(),m(e),r.endIf(),r.if((0,l._)`${a} !== undefined`,()=>{r.assign(i,a),function({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,l._)`${t} !== undefined`,()=>e.assign((0,l._)`${t}[${n}]`,r))}(e,a)})}(e,t,d):m(e)})}return h};let u=new Set(["string","number","integer","boolean","null"]);function h(e,t,n,i=r.Correct){let o,s=i===r.Correct?l.operators.EQ:l.operators.NEQ;switch(e){case"null":return(0,l._)`${t} ${s} null`;case"array":o=(0,l._)`Array.isArray(${t})`;break;case"object":o=(0,l._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,l._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,l._)`typeof ${t} ${s} ${e}`}return i===r.Correct?o:(0,l.not)(o);function a(e=l.nil){return(0,l.and)((0,l._)`typeof ${t} == "number"`,e,n?(0,l._)`isFinite(${t})`:l.nil)}}function p(e,t,n,r){let i;if(1===e.length)return h(e[0],t,n,r);let o=(0,c.toHash)(e);if(o.array&&o.object){let e=(0,l._)`typeof ${t} != "object"`;i=o.null?e:(0,l._)`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=l.nil;for(let e in o.number&&delete o.integer,o)i=(0,l.and)(i,h(e,t,n,r));return i}n.checkDataType=h,n.checkDataTypes=p;let f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,l._)`{type: ${e}}`:(0,l._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:n,schema:r}=e,i=(0,c.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);(0,a.reportError)(t,f)}n.reportTypeError=m},293925,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assignDefaults=void 0;let r=e.r(352438),i=e.r(748143);function o(e,t,n){let{gen:o,compositeRule:s,data:a,opts:l}=e;if(void 0===n)return;let c=(0,r._)`${a}${(0,r.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let d=(0,r._)`${c} === undefined`;"empty"===l.useDefaults&&(d=(0,r._)`${d} || ${c} === null || ${c} === ""`),o.if(d,(0,r._)`${c} = ${(0,r.stringify)(n)}`)}n.assignDefaults=function(e,t){let{properties:n,items:r}=e.schema;if("object"===t&&n)for(let t in n)o(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach((t,n)=>o(e,n,t.default))}},416403,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateUnion=n.validateArray=n.usePattern=n.callValidateCode=n.schemaProperties=n.allSchemaProperties=n.noPropertyInData=n.propertyInData=n.isOwnProperty=n.hasPropFunc=n.reportMissingProp=n.checkMissingProp=n.checkReportMissingProp=void 0;let r=e.r(352438),i=e.r(748143),o=e.r(560216),s=e.r(748143);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}function l(e,t,n){return(0,r._)`${a(e)}.call(${t}, ${n})`}function c(e,t,n,i){let o=(0,r._)`${t}${(0,r.getProperty)(n)} === undefined`;return i?(0,r.or)(o,(0,r.not)(l(e,t,n))):o}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}n.checkReportMissingProp=function(e,t){let{gen:n,data:i,it:o}=e;n.if(c(n,i,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,r._)`${t}`},!0),e.error()})},n.checkMissingProp=function({gen:e,data:t,it:{opts:n}},i,o){return(0,r.or)(...i.map(i=>(0,r.and)(c(e,t,i,n.ownProperties),(0,r._)`${o} = ${i}`)))},n.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},n.hasPropFunc=a,n.isOwnProperty=l,n.propertyInData=function(e,t,n,i){let o=(0,r._)`${t}${(0,r.getProperty)(n)} !== undefined`;return i?(0,r._)`${o} && ${l(e,t,n)}`:o},n.noPropertyInData=c,n.allSchemaProperties=d,n.schemaProperties=function(e,t){return d(t).filter(n=>!(0,i.alwaysValidSchema)(e,t[n]))},n.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:s,errorPath:a},it:l},c,d,u){let h=u?(0,r._)`${e}, ${t}, ${i}${s}`:t,p=[[o.default.instancePath,(0,r.strConcat)(o.default.instancePath,a)],[o.default.parentData,l.parentData],[o.default.parentDataProperty,l.parentDataProperty],[o.default.rootData,o.default.rootData]];l.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let f=(0,r._)`${h}, ${n.object(...p)}`;return d!==r.nil?(0,r._)`${c}.call(${d}, ${f})`:(0,r._)`${c}(${f})`};let u=(0,r._)`new RegExp`;n.usePattern=function({gen:e,it:{opts:t}},n){let i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(n,i);
4return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,r._)`${"new RegExp"===o.code?u:(0,s.useFunc)(e,o)}(${n}, ${i})`})},n.validateArray=function(e){let{gen:t,data:n,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(a,!0),l(()=>t.break()),a;function l(s){let l=t.const("len",(0,r._)`${n}.length`);t.forRange("i",0,l,n=>{e.subschema({keyword:o,dataProp:n,dataPropType:i.Type.Num},a),t.if((0,r.not)(a),s)})}},n.validateUnion=function(e){let{gen:t,schema:n,keyword:o,it:s}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(n.some(e=>(0,i.alwaysValidSchema)(s,e))&&!s.opts.unevaluated)return;let a=t.let("valid",!1),l=t.name("_valid");t.block(()=>n.forEach((n,i)=>{let s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},l);t.assign(a,(0,r._)`${a} || ${l}`),e.mergeValidEvaluated(s,l)||t.if((0,r.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}},656672,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.val
4idateKeywordUsage=n.validSchemaType=n.funcKeywordCode=n.macroKeywordCode=void 0;let r=e.r(352438),i=e.r(560216),o=e.r(416403),s=e.r(24601);function a(e){let{gen:t,data:n,it:i}=e;t.if(i.parentData,()=>t.assign(n,(0,r._)`${i.parentData}[${i.parentDataProperty}]`))}function l(e,t,n){if(void 0===n)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}n.macroKeywordCode=function(e,t){let{gen:n,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),d=l(n,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);let u=n.name("valid");e.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,()=>e.error(!0))},n.funcKeywordCode=function(e,t){var n;let{gen:c,keyword:d,schema:u,parentSchema:h,$data:p,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,t);let m=l(c,d,!p&&t.compile?t.compile.call(f.self,u,h,f):t.validate),g=c.let("valid");function y(n=t.async?(0,r._)`await `:r.nil){let s=f.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!p||!1===t.schema);c.assign(g,(0,r._)`${n}${(0,o.callValidateCode)(e,m,s,a)}`,t.modifying)}function b(e){var n;c.if((0,r.not)(null!=(n=t.valid)?n:g),e)}e.block$data(g,function(){if(!1===t.errors)y(),t.modifying&&a(e),b(()=>e.error());else{let n,o,l=t.async?(n=c.let("ruleErrs",null),c.try(()=>y((0,r._)`await `),e=>c.assign(g,!1).if((0,r._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(n,(0,r._)`${e}.errors`),()=>c.throw(e))),n):(o=(0,r._)`${m}.errors`,c.assign(o,null),y(r.nil),o);t.modifying&&a(e),b(()=>(function(e,t){let{gen:n}=e;n.if((0,r._)`Array.isArray(${t})`,()=>{n.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`),(0,s.extendErrors)(e)},()=>e.error())})(e,l))}}),e.ok(null!=(n=t.valid)?n:g)},n.validSchemaType=function(e,t,n=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e)},n.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw Error("ajv implementation error");let s=i.dependencies;if(null==s?void 0:s.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let e=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if("log"===t.validateSchema)n.logger.error(e);else throw Error(e)}}},700758,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendSubschemaMode=n.extendSubschemaData=n.getSubschema=void 0;let r=e.r(352438),i=e.r(748143);n.getSubschema=function(e,{keyword:t,schemaProp:n,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==o)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let o=e.schema[t];return void 0===n?{schema:o,schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[n],schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(n)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===l)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:l,errSchemaPath:a}}throw Error('either "keyword" or "schema" must be passed')},n.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:o,data:s,dataTypes:a,propertyName:l}){if(void 0!==s&&void 0!==n)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=t;if(void 0!==n){let{errorPath:s,dataPathArr:a,opts:l}=t;d(c.let("data",(0,r._)`${t.data}${(0,r.getProperty)(n)}`,!0)),e.errorPath=(0,r.str)`${s}${(0,i.getErrorPath)(n,o,l.jsPropertySyntax)}`,e.parentDataProperty=(0,r._)`${n}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==s&&(d(s instanceof r.Name?s:c.let("data",s,!0)),void 0!==l&&(e.propertyName=l)),a&&(e.dataTypes=a)},n.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){void 0!==r&&(e.compositeRule=r),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}},65932,(e,t,n)=>{"use strict";
4t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var r,i,o,s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},725028,(e,t,n)=>{"use strict";var r=t.exports=function(e,t,n){"function"==typeof t&&(n=t,t={});var i="function"==typeof(n=t.cb||n)?n:n.pre||function(){};!function e(t,n,i,o,s,a,l,c,d,u){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var h in n(o,s,a,l,c,d,u),o){var p=o[h];if(Array.isArray(p)){if(h in r.arrayKeywords)for(var f=0;f<p.length;f++)e(t,n,i,p[f],s+"/"+h+"/"+f,a,s,h,o,f)}else if(h in r.propsKeywords){if(p&&"object"==typeof p)for(var m in p)e(t,n,i,p[m],s+"/"+h+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,h,o,m)}else(h in r.keywords||t.allKeys&&!(h in r.skipKeywords))&&e(t,n,i,p,s+"/"+h,a,s,h,o)}i(o,s,a,l,c,d,u)}}(t,i,n.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},619912,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSchemaRefs=n.resolveUrl=n.normalizeId=n._getFullPath=n.getFullPath=n.inlineRef=void 0;let r=e.r(748143),i=e.r(65932),o=e.r(725028),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);n.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!function e(t){for(let n in t){if(a.has(n))return!0;let r=t[n];if(Array.isArray(r)&&r.some(e)||"object"==typeof r&&e(r))return!0}return!1}(e):!!t&&function e(t){let n=0;for(let i in t)if("$ref"===i||(n++,!s.has(i)&&("object"==typeof t[i]&&(0,r.eachItem)(t[i],t=>n+=e(t)),n===1/0)))return 1/0;return n}(e)<=t)};let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e,t="",n){!1!==n&&(t=u(t));let r=e.parse(t);return c(e,r)}function c(e,t){return e.serialize(t).split("#")[0]+"#"}n.getFullPath=l,n._getFullPath=c;let d=/#\/?$/;function u(e){return e?e.replace(d,""):""}n.normalizeId=u,n.resolveUrl=function(e,t,n){return n=u(n),e.resolve(t,n)};let h=/^[a-z_][-a-z0-9._]*$/i;n.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:n,uriResolver:r}=this.opts,s=u(e[n]||t),a={"":s},c=l(r,s,!1),d={},p=new Set;return o(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let o=c+t,s=a[i];function l(t){let n=this.opts.uriResolver.resolve;if(t=u(s?n(s,t):t),p.has(t))throw m(t);p.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?f(e,r.schema,t):t!==u(o)&&("#"===t[0]?(f(e,d[t],t),d[t]=e):this.refs[t]=o),t}function g(e){if("string"==typeof e){if(!h.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[n]&&(s=l.call(this,e[n])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=s}),d;function f(e,t,n){if(void 0!==t&&!i(e,t))throw m(n)}function m(e){return Error(`reference "${e}" resolves to more than one schema`)}}},643741,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getData=n.KeywordCxt=n.validateFunctionCode=void 0;let r=e.r(371539),i=e.r(742833),o=e.r(810027),s=e.r(742833),a=e.r(293925),l=e.r(656672),c=e.r(700758),d=e.r(352438),u=e.r(560216),h=e.r(619912),p=e.r(748143),f=e.r(24601);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},o){var s;i.code.es5?e.func(t,(0,d._)`${u.default.data}, ${u.default.valCxt}`,r.$async,()=>{var t,r;e.code((0,d._)`"use strict"; ${g(n,i)}`),t=e,r=i,t.if(u.default.valCxt,()=>{t.var(u.default.instancePath,(0,d._)`${u.default.valCxt}.${u.default.instancePath}`),t.var(u.default.parentData,(0,d._)`${u.default.valCxt}.${u.default.parentData}`),t.var(u.default.parentDataProperty,(0,d._)`${u.default.valCxt}.${u.default.parentDataProperty}`),t.var(u.default.rootData,(0,d._)`${u.default.valCxt}.${u.default.rootData}`),r.dynamicRef&&t.var(u.default.dynamicAnchors,(0,d._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{t.var(u.default.instancePath,(0,d._)`""`),t.var(u.default.parentData,(0,d._)`undefined`),t.var(u.default.parentDataProperty,(0,d._)`undefined`),t.var(u.default.rootData,u.default.data),r.dynamicRef&&t.var(u.default.dynamicAnchors,(0,d._)`{}`)}),e.code(o)}):e.func(t,(0,d._)`${u.default.data}, ${(s=i,(0,d._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${s.dynamicRef?(0,d._)`, ${u.default.dynamicAnchors}={}`:d.nil}}={}`)}`,r.$async,()=>e.code(g(n,i)).code(o))}function g(e,t){let n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${n} */`:d.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function k(e,t){if(e.opts.jtd)return w(e,[],!1,t);let n=(0,i.getSchemaTypes)(e.schema),r=(0,i.coerceAndCheckDataType)(e,n);w(e,n,!r,t)}function x({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let o=n.$comment;if(!0===i.$comment)e.code((0,d._)`${u.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){let n=(0,d.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${u.default.self}.opts.$comment(${o}, ${n}, ${i}.schema)`)}}function w(e,t,n,r){var i,a,l,c;let{gen:h,schema:f,data:m,allErrors:g,opts:y,self:b}=e,{RULES:v}=b;if(f.$ref&&(y.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void h.block(()=>A(e,"$ref",v.all.$ref.definition));function k(i){(0,o.shouldUseGroup)(f,i)&&(i.type?(h.if((0,s.checkDataType)(i.type,m,y.strictNumbers)),E(e,i),1===t.length&&t[0]===i.type&&n&&(h.else(),(0,s.reportTypeError)(e)),h.endIf()):E(e,i),g||h.if((0,d._)`${u.default.errors} === ${r||0}`))}y.jtd||(i=e,a=t,!i.schemaEnv.meta&&i.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>
4{T(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let n=[];for(let r of e.dataTypes)T(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)}}(i,a),i.opts.allowUnionTypes||(l=i,(c=a).length>1&&!(2===c.length&&c.includes("null"))&&S(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let n=e.self.RULES.all;for(let r in n){let i=n[r];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){let{type:n}=i.definition;n.length&&!n.some(e=>{var n,r;return n=t,r=e,n.includes(r)||"number"===r&&n.includes("integer")})&&S(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(i,i.dataTypes))),h.block(()=>{for(let e of v.rules)k(e);k(v.post)})}function E(e,t){let{gen:n,schema:r,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,o.shouldUseRule)(r,n)&&A(e,n.keyword,n.definition,t.type)})}function T(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}n.validateFunctionCode=function(e){b(e)&&(v(e),y(e))?function(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&x(e),function(e){let{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(u.default.vErrors,null),r.let(u.default.errors,0),n.unevaluated&&function(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,d._)`${n}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),k(e),function(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=e;n.$async?t.if((0,d._)`${u.default.errors} === 0`,()=>t.return(u.default.data),()=>t.throw((0,d._)`new ${i}(${u.default.vErrors})`)):(t.assign((0,d._)`${r}.errors`,u.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof d.Name&&e.assign((0,d._)`${t}.props`,n),r instanceof d.Name&&e.assign((0,d._)`${t}.items`,r)}(e),t.return((0,d._)`${u.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,r.topBoolOrEmptySchema)(e))};class C{constructor(e,t,n){if((0,l.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",O(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,n){this.failResult((0,d.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=d.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:o}=this;n.if((0,d.or)((0,d._)`${r} === undefined`,t)),e!==d.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:i}=this;return(0,d.or)(function(){if(n.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(n)?n:[n];return(0,d._)`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return d.nil}(),function(){if(r.validateSchema){let n=e.scopeValue("validate$data",{ref:r.validateSchema});return(0,d._)`!${n}(${t})`}return d.nil}())}subschema(e,t){let n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return!function(e,t){if(b(e)&&(v(e),y(e)))return function(e,t){var n;let r,{schema:i,gen:o,opts:s}=e;s.$comment&&i.$comment&&x(e),(r=(n=e).schema[n.opts.schemaId])&&(n.baseId=(0,h.resolveUrl)(n.opts.uriResolver,n.baseId,r)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let a=o.const("_errs",u.default.errors);k(e,a),o.var(t,(0,d._)`${a} === ${u.default.errors}`)}(e,t);(0,r.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){let{it:n,gen:r}=this;
4n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=p.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=p.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}}function A(e,t,n,r){let i=new C(e,n,t);"code"in n?n.code(i,r):i.$data&&n.validate?(0,l.funcKeywordCode)(i,n):"macro"in n?(0,l.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(i,n)}n.KeywordCxt=C;let _=/^\/(?:[^~]|~0|~1)*$/,N=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,o;if(""===e)return u.default.rootData;if("/"===e[0]){if(!_.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,o=u.default.rootData}else{let s=N.exec(e);if(!s)throw Error(`Invalid JSON-pointer: ${e}`);let l=+s[1];if("#"===(i=s[2])){if(l>=t)throw Error(a("property/index",l));return r[t-l]}if(l>t)throw Error(a("data",l));if(o=n[t-l],!i)return o}let s=o;for(let e of i.split("/"))e&&(o=(0,d._)`${o}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,s=(0,d._)`${s} && ${o}`);return s;function a(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}n.getData=O},138955,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}},150814,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(619912);n.default=class extends Error{constructor(e,t,n,i){super(i||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,r.resolveUrl)(e,t,n),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(e,this.missingRef))}}},53562,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveSchema=n.getCompilingSchema=n.resolveRef=n.compileSchema=n.SchemaEnv=void 0;let r=e.r(352438),i=e.r(138955),o=e.r(560216),s=e.r(619912),a=e.r(748143),l=e.r(643741);class c{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,s.normalizeId)(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function d(e){let t,n,a=h.call(this,e);if(a)return a;let c=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:d,lines:u}=this.opts.code,{ownProperties:p}=this.opts,f=new r.CodeGen(this.scope,{es5:d,lines:u,ownProperties:p});e.$async&&(t=f.scopeValue("Error",{ref:i.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName("validate");e.validateName=m;let g={gen:f,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,r.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:t,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,l.validateFunctionCode)(g),f.optimize(this.opts.code.optimize);let t=f.toString();n=`${f.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(n=this.opts.code.process(n,e));let i=Function(`${o.default.self}`,`${o.default.scope}`,n)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:m,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:t}=g;i.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},i.source&&(i.source.evaluated=(0,r.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,n&&this.logger.error("Error compiling schema, function code:",n),t}finally{this._compilations.delete(e)}}function u(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function h(e){for(let r of this._compilations){var t,n;if(t=r,n=e,t.schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return r}}function p(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||f.call(this,e,t)}function f(e,t){let n=this.opts.uriResolver.parse(t),r=(0,s._getFullPath)(this.opts.uriResolver,n),i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===i)return g.call(this,n,e);let o=(0,s.normalizeId)(r),a=this.refs[o]||this.schemas[o];if("string"==typeof a){let t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,n,t)}
4if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),o===(0,s.normalizeId)(t)){let{schema:t}=a,{schemaId:n}=this.opts,r=t[n];return r&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,r)),new c({schema:t,schemaId:n,root:e,baseId:i})}return g.call(this,n,a)}}n.SchemaEnv=c,n.compileSchema=d,n.resolveRef=function(e,t,n){var r;n=(0,s.resolveUrl)(this.opts.uriResolver,t,n);let i=e.refs[n];if(i)return i;let o=p.call(this,e,n);if(void 0===o){let i=null==(r=e.localRefs)?void 0:r[n],{schemaId:s}=this.opts;i&&(o=new c({schema:i,schemaId:s,root:e,baseId:t}))}if(void 0!==o)return e.refs[n]=u.call(this,o)},n.getCompilingSchema=h,n.resolveSchema=f;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:n,root:r}){var i;let o;if((null==(i=e.fragment)?void 0:i[0])!=="/")return;for(let r of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;let e=n[(0,a.unescapeFragment)(r)];if(void 0===e)return;let i="object"==typeof(n=e)&&n[this.opts.schemaId];!m.has(r)&&i&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,i))}if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,s.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=f.call(this,r,e)}let{schemaId:l}=this.opts;if((o=o||new c({schema:n,schemaId:l,root:r,baseId:t})).schema!==o.root.schema)return o}},980249,(e,t,n)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},100798,(e,t,n)=>{"use strict";let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function l(e){let t="",n=0,r=0;for(r=0;r<e.length;r++)if(48!==(n=e[r].charCodeAt(0))){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[r];break}for(r+=1;r<e.length;r++){if(!((n=e[r].charCodeAt(0))>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[r]}return t}let c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function d(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=l(e);if(""===r)return n.error=!0,!1;t.push(r),e.length=0}return!0}function h(e){if(2>function(e){let t=0;for(let n=0;n<e.length;n++)":"===e[n]&&t++;return t}(e))return{host:e,isIPV6:!1};let t=function(e){let t=0,n={error:!1,address:"",zone:""},r=[],i=[],o=!1,s=!1,a=u;for(let l=0;l<e.length;l++){let c=e[l];if("["!==c&&"]"!==c)if(":"===c){if(!0===o&&(s=!0),!a(i,r,n))break;if(++t>7){n.error=!0;break}l>0&&":"===e[l-1]&&(o=!0),r.push(":");continue}else if("%"===c){if(!a(i,r,n))break;a=d}else{i.push(c);continue}}return i.length&&(a===d?n.zone=i.join(""):s?r.push(i.join("")):r.push(l(i))),n.address=r.join(""),n}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+="%"+t.zone,n+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}let p={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,m=/[@/?#]/g;function g(e,t){let n=t?m:f;return n.lastIndex=0,e.replace(n,e=>p[e])}t.exports={nonSimpleDomain:c,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let n=unescape(e.host);if(!i(n)){let e=h(n);n=!0===e.isIPV6?`[${e.escapedHost}]`:g(n,!1)}t.push(n)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},reescapeHostDelimiters:g,normalizePercentEncoding:function(e,t=!1){if(-1===e.indexOf("%"))return e;let n="";for(let r=0;r<e.length;r++){if("%"===e[r]&&r+2<e.length){let i=e.slice(r+1,r+3);if(o(i)){let e=i.toUpperCase(),o=String.fromCharCode(parseInt(e,16));t&&s(o)?n+=o:n+="%"+e,r+=2;continue}}n+=e[r]}return n},normalizePathEncoding:function(e){let t="";for(let n=0;n<e.length;n++){if("%"===e[n]&&n+2<e.length){let r=e.slice(n+1,n+3);if(o(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));"."!==i&&s(i)?t+=i:t+="%"+e,n+=2;continue}}
4a(e[n])?t+=e[n]:t+=escape(e[n])}return t},escapePreservingEscapes:function(e){let t="";for(let n=0;n<e.length;n++){if("%"===e[n]&&n+2<e.length){let r=e.slice(n+1,n+3);if(o(r)){t+="%"+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t},removeDotSegments:function(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(1===i)if("."===t)break;else if("/"===t){n.push("/");break}else{n.push(t);break}if(2===i){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){n.push("/");break}}else if(3===i&&"/.."===t){0!==n.length&&n.pop(),n.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==n.length&&n.pop();continue}}if(-1===(r=t.indexOf("/",1))){n.push(t);break}n.push(t.slice(0,r)),t=t.slice(r)}return n.join("")},isIPv4:i,isUUID:r,normalizeIPv6:h,stringArrayToHexStripped:l}},551758,(e,t,n)=>{"use strict";let{isUUID:r}=e.r(100798),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function s(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let c={scheme:"http",domainHost:!0,parse:a,serialize:l},d={scheme:"https",domainHost:c.domainHost,parse:a,serialize:l},u={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=s(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(s(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},h={scheme:"wss",domainHost:u.domainHost,parse:u.parse,serialize:u.serialize},p={http:c,https:d,ws:u,wss:h,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(i);if(n){let r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let i=f(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),i=f(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let o=e,s=e.nss;return o.path=`${r||t.nid}:${s}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function f(e){return e&&(p[e]||p[e.toLowerCase()])||void 0}Object.setPrototypeOf(p,null),t.exports={wsIsSecure:s,SCHEMES:p,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:f}},533242,(e,t,n)=>{"use strict";let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizePercentEncoding:s,normalizePathEncoding:a,escapePreservingEscapes:l,reescapeHostDelimiters:c,isIPv4:d,nonSimpleDomain:u}=e.r(100798),{SCHEMES:h,getSchemeHandler:p}=e.r(551758);function f(e,t,n,r){let o={};return r||(e=b(m(e,n),n),t=b(m(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path[0]?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function m(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),a=[],c=p(r.scheme||n.scheme);c&&c.serialize&&c.serialize(n,r),void 0!==n.path&&(r.skipEscape?n.path=s(n.path):(n.path=l(n.path),void 0!==n.scheme&&(n.path=n.path.split("%3A").join(":")))),"suffix"!==r.reference&&n.scheme&&a.push(n.scheme,":");let d=o(n);if(void 0!==d&&("suffix"!==r.reference&&a.push("//"),a.push(d),n.path&&"/"!==n.path[0]&&a.push("/")),void 0!==n.path){let e=n.path;r.absolutePath||c&&c.absolutePath||(e=i(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}
4return void 0!==n.query&&a.push("?",n.query),void 0!==n.fragment&&a.push("#",n.fragment),a.join("")}let g=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){let n=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,s=!1;"suffix"===n.reference&&(e=n.scheme?n.scheme+":"+e:"//"+e);let l=e.match(g);if(l){i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]);let t=void 0!==l[2]&&i.path&&"/"!==i.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof i.port&&(i.port<0||i.port>65535)?"URI port is malformed.":void 0;if(void 0!==t&&(i.error=i.error||t,o=!0),i.host)if(!1===d(i.host)){let e=r(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");let h=p(n.scheme||i.scheme);if(!n.unicodeSupport&&(!h||!h.unicodeSupport)&&i.host&&(n.domainHost||h&&h.domainHost)&&!1===s&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}if((!h||h&&!h.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=c(unescape(i.host),s))),i.path&&(i.path=a(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||"URI malformed"}h&&h.parse&&h.parse(i,n)}else i.error=i.error||"URI can not be parsed.";return{parsed:i,malformedAuthorityOrPort:o}}function b(e,t){return y(e,t).parsed}function v(e,t){let{parsed:n,malformedAuthorityOrPort:r}=y(e,t);return{normalized:r?e:m(n,t),malformedAuthorityOrPort:r}}function k(e,t){if("string"==typeof e){let{normalized:n,malformedAuthorityOrPort:r}=v(e,t);return r?void 0:n}if("object"==typeof e)return m(e,t)}let x={SCHEMES:h,normalize:function(e,t){return"string"==typeof e?e=v(e,t).normalized:"object"==typeof e&&(e=b(m(e,t),t)),e},resolve:function(e,t,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},i=f(b(e,r),b(t,r),r,!0);return r.skipEscape=!0,m(i,r)},resolveComponent:f,equal:function(e,t,n){let r=k(e,n),i=k(t,n);return void 0!==r&&void 0!==i&&r.toLowerCase()===i.toLowerCase()},serialize:m,parse:b};t.exports=x,t.exports.default=x,t.exports.fastUri=x},931253,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(533242);r.code='require("ajv/dist/runtime/uri").default',n.default=r},883504,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var r=e.r(643741);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var i=e.r(352438);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});let o=e.r(138955),s=e.r(150814),a=e.r(631215),l=e.r(53562),c=e.r(352438),d=e.r(619912),u=e.r(742833),h=e.r(748143),p=e.r(980249),f=e.r(931253),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated
4ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};class k{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...function(e){var t,n,r,i,o,s,a,l,c,d,u,h,p,g,y,b,v,k,x,w,E,T,S,C,A;let _=e.strict,N=null==(t=e.code)?void 0:t.optimize,O=!0===N||void 0===N?1:N||0,M=null!=(r=null==(n=e.code)?void 0:n.regExp)?r:m,I=null!=(i=e.uriResolver)?i:f.default;return{strictSchema:null==(s=null!=(o=e.strictSchema)?o:_)||s,strictNumbers:null==(l=null!=(a=e.strictNumbers)?a:_)||l,strictTypes:null!=(d=null!=(c=e.strictTypes)?c:_)?d:"log",strictTuples:null!=(h=null!=(u=e.strictTuples)?u:_)?h:"log",strictRequired:null!=(g=null!=(p=e.strictRequired)?p:_)&&g,code:e.code?{...e.code,optimize:O,regExp:M}:{optimize:O,regExp:M},loopRequired:null!=(y=e.loopRequired)?y:200,loopEnum:null!=(b=e.loopEnum)?b:200,meta:null==(v=e.meta)||v,messages:null==(k=e.messages)||k,inlineRefs:null==(x=e.inlineRefs)||x,schemaId:null!=(w=e.schemaId)?w:"$id",addUsedSchema:null==(E=e.addUsedSchema)||E,validateSchema:null==(T=e.validateSchema)||T,validateFormats:null==(S=e.validateFormats)||S,unicodeRegExp:null==(C=e.unicodeRegExp)||C,int32range:null==(A=e.int32range)||A,uriResolver:I}}(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:n}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),x.call(this,b,e,"NOT SUPPORTED"),x.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=C.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=p;"id"===n&&((r={...p}).id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){let n=await c.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){let i;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(i=e[t])&&"string"!=typeof i)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){let n;if("boolean"==typeof e)return!0;
4if(void 0!==(n=e.$schema)&&"string"!=typeof n)throw Error("$schema must be a string");if(!(n=n||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){let{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(!(t=l.resolveSchema.call(this,r,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if("object"==typeof e&&void 0===t){if(Array.isArray(n=(t=e).keyword)&&!n.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(N.call(this,n,t),!t)return(0,h.eachItem)(n,e=>O.call(this,e)),this;I.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(n,0===r.type.length?e=>O.call(this,e,r):e=>r.type.forEach(t=>O.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let n of(delete t.keywords[e],delete t.all[e],t.rules)){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n):"No errors"}$dataMetaSchema(e,t){let n=this.RULES.all;for(let r of(e=JSON.parse(JSON.stringify(e)),t)){let t=r.split("/").slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if("object"!=typeof t)continue;let{$data:r}=t.definition,o=i[e];r&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let a=this._cache.get(e);if(void 0!==a)return a;n=(0,d.normalizeId)(o||n);let c=d.getSchemaRefs.call(this,e,n);return a=new l.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:c}),this._cache.set(a.schema,a),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=a),r&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,n,r="error"){for(let i in e)i in t&&this.logger[r](`${n}: option ${i}. ${e[i]}`)}function w(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function C(){let e={...this.opts};for(let t of g)delete e[t];return e}
4k.ValidationError=o.default,k.MissingRefError=s.default,n.default=k;let A={log(){},warn(){},error(){}},_=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){let{RULES:n}=this;if((0,h.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!_.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function O(e,t,n){var r;let i=null==t?void 0:t.post;if(n&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:e})=>e===n);if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?M.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null==(r=t.implements)||r.forEach(e=>this.addKeyword(e))}function M(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function I(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}let D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},156504,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},561310,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.callRef=n.getValidate=void 0;let r=e.r(150814),i=e.r(416403),o=e.r(352438),s=e.r(560216),a=e.r(53562),l=e.r(748143);function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,o._)`${n.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,r){let{gen:a,it:c}=e,{allErrors:d,schemaEnv:u,opts:h}=c,p=h.passContext?s.default.this:o.nil;function f(e){let t=(0,o._)`${e}.errors`;a.assign(s.default.vErrors,(0,o._)`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,(0,o._)`${s.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(a,r.props,c.props));else{let t=a.var("props",(0,o._)`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(a,r.items,c.items));else{let t=a.var("items",(0,o._)`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(a,t,c.items,o.Name)}}r?function(){if(!u.$async)throw Error("async schema referenced by sync schema");let n=a.let("valid");a.try(()=>{a.code((0,o._)`await ${(0,i.callValidateCode)(e,t,p)}`),m(t),d||a.assign(n,!0)},e=>{a.if((0,o._)`!(${e} instanceof ${c.ValidationError})`,()=>a.throw(e)),f(e),d||a.assign(n,!1)}),e.ok(n)}():e.result((0,i.callValidateCode)(e,t,p),()=>m(t),()=>f(t))}n.getValidate=c,n.callRef=d,n.default={keyword:"$ref",schemaType:"string",code(e){var t,n;let i,s,l,u,{gen:h,schema:p,it:f}=e,{baseId:m,schemaEnv:g,validateName:y,opts:b,self:v}=f,{root:k}=g;if(("#"===p||"#/"===p)&&m===k.baseId){if(g===k)return d(e,y,g,g.$async);let t=h.scopeValue("root",{ref:k});return d(e,(0,o._)`${t}.validate`,k,k.$async)}let x=a.resolveRef.call(v,k,m,p);if(void 0===x)throw new r.default(f.opts.uriResolver,m,p);return x instanceof a.SchemaEnv?(i=c(e,t=x),void d(e,i,t,t.$async)):(n=x,s=h.scopeValue("schema",!0===b.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),l=h.name("valid"),u=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:s,errSchemaPath:p},l),void(e.mergeEvaluated(u),e.ok(l)))}}},397597,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(156504),i=e.r(561310);n.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default]},134569,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=r.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};n.default={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:n,schemaCode:i}=e;e.fail$data((0,r._)`${n} ${o[t].fail} ${i} || isNaN(${n})`)}}},974062,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438);n.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,r._)`{multipleOf: ${e}}`}
4,code(e){let{gen:t,data:n,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),l=s?(0,r._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,r._)`${a} !== parseInt(${a})`;e.fail$data((0,r._)`(${i} === 0 || (${a} = ${n}/${i}, ${l}))`)}}},40048,(e,t,n)=>{"use strict";function r(e){let t,n=e.length,r=0,i=0;for(;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&(64512&(t=e.charCodeAt(i)))==56320&&i++;return r}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},714576,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143),o=e.r(40048);n.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:n,schemaCode:s,it:a}=e,l="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===a.opts.unicode?(0,r._)`${n}.length`:(0,r._)`${(0,i.useFunc)(e.gen,o.default)}(${n})`;e.fail$data((0,r._)`${c} ${l} ${s}`)}}},397325,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(416403),i=e.r(748143),o=e.r(352438);n.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,o.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,o._)`{pattern: ${e}}`},code(e){let{gen:t,data:n,$data:s,schema:a,schemaCode:l,it:c}=e,d=c.opts.unicodeRegExp?"u":"";if(s){let{regExp:r}=c.opts.code,s="new RegExp"===r.code?(0,o._)`new RegExp`:(0,i.useFunc)(t,r),a=t.let("valid");t.try(()=>t.assign(a,(0,o._)`${s}(${l}, ${d}).test(${n})`),()=>t.assign(a,!1)),e.fail$data((0,o._)`!${a}`)}else{let t=(0,r.usePattern)(e,a);e.fail$data((0,o._)`!${t}.test(${n})`)}}}},881518,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438);n.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:n,schemaCode:i}=e,o="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`Object.keys(${n}).length ${o} ${i}`)}}},370894,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(416403),i=e.r(352438),o=e.r(748143);n.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:n,schemaCode:s,data:a,$data:l,it:c}=e,{opts:d}=c;if(!l&&0===n.length)return;let u=n.length>=d.loopRequired;if(c.allErrors?function(){if(u||l)e.block$data(i.nil,h);else for(let t of n)(0,r.checkReportMissingProp)(e,t)}():function(){let o=t.let("missing");if(u||l){let n=t.let("valid",!0);e.block$data(n,()=>{var l,c;return l=o,c=n,void(e.setParams({missingProperty:l}),t.forOf(l,s,()=>{t.assign(c,(0,r.propertyInData)(t,a,l,d.ownProperties)),t.if((0,i.not)(c),()=>{e.error(),t.break()})},i.nil))}),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,o)),(0,r.reportMissingProp)(e,o),t.else()}(),d.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=c.schemaEnv.baseId+c.errSchemaPath,n=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,o.checkStrictMode)(c,n,c.opts.strictRequired)}}function h(){t.forOf("prop",s,n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,a,n,d.ownProperties),()=>e.error())})}}}},380280,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438);n.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`}
4,code(e){let{keyword:t,data:n,schemaCode:i}=e,o="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`${n}.length ${o} ${i}`)}}},519035,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(65932);r.code='require("ajv/dist/runtime/equal").default',n.default=r},789325,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(742833),i=e.r(352438),o=e.r(748143),s=e.r(519035);n.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:n,$data:a,schema:l,parentSchema:c,schemaCode:d,it:u}=e;if(!a&&!l)return;let h=t.let("valid"),p=c.items?(0,r.getSchemaTypes)(c.items):[];e.block$data(h,function(){let a=t.let("i",(0,i._)`${n}.length`),l=t.let("j");e.setParams({i:a,j:l}),t.assign(h,!0),t.if((0,i._)`${a} > 1`,()=>(p.length>0&&!p.some(e=>"object"===e||"array"===e)?function(o,s){let a=t.name("item"),l=(0,r.checkDataTypes)(p,a,u.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${o}--;`,()=>{t.let(a,(0,i._)`${n}[${o}]`),t.if(l,(0,i._)`continue`),p.length>1&&t.if((0,i._)`typeof ${a} == "string"`,(0,i._)`${a} += "_"`),t.if((0,i._)`typeof ${c}[${a}] == "number"`,()=>{t.assign(s,(0,i._)`${c}[${a}]`),e.error(),t.assign(h,!1).break()}).code((0,i._)`${c}[${a}] = ${o}`)})}:function(r,a){let l=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for((0,i._)`;${r}--;`,()=>t.for((0,i._)`${a} = ${r}; ${a}--;`,()=>t.if((0,i._)`${l}(${n}[${r}], ${n}[${a}])`,()=>{e.error(),t.assign(h,!1).break(c)})))})(a,l))},(0,i._)`${d} === false`),e.ok(h)}}},958797,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143),o=e.r(519035);n.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,r._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:n,$data:s,schemaCode:a,schema:l}=e;s||l&&"object"==typeof l?e.fail$data((0,r._)`!${(0,i.useFunc)(t,o.default)}(${n}, ${a})`):e.fail((0,r._)`${l} !== ${n}`)}}},286973,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143),o=e.r(519035);n.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,r._)`{allowedValues: ${e}}`},code(e){let t,n,{gen:s,data:a,$data:l,schema:c,schemaCode:d,it:u}=e;if(!l&&0===c.length)throw Error("enum must have non-empty array");let h=c.length>=u.opts.loopEnum,p=()=>null!=t?t:t=(0,i.useFunc)(s,o.default);if(h||l)n=s.let("valid"),e.block$data(n,function(){s.assign(n,!1),s.forOf("v",d,e=>s.if((0,r._)`${p()}(${a}, ${e})`,()=>s.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=s.const("vSchema",d);n=(0,r.or)(...c.map((t,n)=>{var i,o;let s;return i=e,"object"==typeof(s=c[o=n])&&null!==s?(0,r._)`${p()}(${a}, ${i}[${o}])`:(0,r._)`${a} === ${s}`}))}e.pass(n)}}},168047,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(134569),i=e.r(974062),o=e.r(714576),s=e.r(397325),a=e.r(881518),l=e.r(370894),c=e.r(380280),d=e.r(789325),u=e.r(958797),h=e.r(286973);n.default=[r.default,i.default,o.default,s.default,a.default,l.default,c.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,h.default]},790900,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAdditionalItems=void 0;let r=e.r(352438),i=e.r(748143);function o(e,t){let{gen:n,schema:o,data:s,keyword:a,it:l}=e;l.items=!0;let c=n.const("len",(0,r._)`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass((0,r._)`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(l,o)){let o=n.var("valid",(0,r._)`${c} <= ${t.length}`);n.if((0,r.not)(o),()=>{var s;return s=o,void n.forRange("i",t.length,c,t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},s),l.allErrors||n.if((0,r.not)(s),()=>n.break())})}),e.ok(o)}}n.validateAdditionalItems=o,n.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`}
4,code(e){let{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?o(e,r):(0,i.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}}},727071,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateTuple=void 0;let r=e.r(352438),i=e.r(748143),o=e.r(416403);function s(e,t,n=e.schema){let{gen:o,parentSchema:a,data:l,keyword:c,it:d}=e;(function(e){let{opts:r,errSchemaPath:o}=d,s=n.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(r.strictTuples&&!a){let e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(d,e,r.strictTuples)}})(a),d.opts.unevaluated&&n.length&&!0!==d.items&&(d.items=i.mergeEvaluated.items(o,n.length,d.items));let u=o.name("valid"),h=o.const("len",(0,r._)`${l}.length`);n.forEach((t,n)=>{(0,i.alwaysValidSchema)(d,t)||(o.if((0,r._)`${h} > ${n}`,()=>e.subschema({keyword:c,schemaProp:n,dataProp:n},u)),e.ok(u))})}n.validateTuple=s,n.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,(0,i.alwaysValidSchema)(n,t)||e.ok((0,o.validateArray)(e))}}},33349,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(727071);n.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")}},513665,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143),o=e.r(416403),s=e.r(790900);n.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,(0,i.alwaysValidSchema)(r,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}}},449683,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143);n.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,r.str)`must contain at least ${e} valid item(s)`:(0,r.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,r._)`{minContains: ${e}}`:(0,r._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,n,{gen:o,schema:s,parentSchema:a,data:l,it:c}=e,{minContains:d,maxContains:u}=a;c.opts.next?(t=void 0===d?1:d,n=u):t=1;let h=o.const("len",(0,r._)`${l}.length`);if(e.setParams({min:t,max:n}),void 0===n&&0===t)return void(0,i.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==n&&t>n){(0,i.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,i.alwaysValidSchema)(c,s)){let i=(0,r._)`${h} >= ${t}`;void 0!==n&&(i=(0,r._)`${i} && ${h} <= ${n}`),e.pass(i);return}c.items=!0;let p=o.name("valid");function f(){let e=o.name("_valid"),i=o.let("count",0);m(e,()=>o.if(e,()=>{var e;return e=i,void(o.code((0,r._)`${e}++`),void 0===n?o.if((0,r._)`${e} >= ${t}`,()=>o.assign(p,!0).break()):(o.if((0,r._)`${e} > ${n}`,()=>o.assign(p,!1).break()),1===t?o.assign(p,!0):o.if((0,r._)`${e} >= ${t}`,()=>o.assign(p,!0))))}))}function m(t,n){o.forRange("i",0,h,r=>{e.subschema({keyword:"contains",dataProp:r,dataPropType:i.Type.Num,compositeRule:!0},t),n()})}void 0===n&&1===t?m(p,()=>o.if(p,()=>o.break())):0===t?(o.let(p,!0),void 0!==n&&o.if((0,r._)`${l}.length > 0`,f)):(o.let(p,!1),f()),e.result(p,()=>e.reset())}}},15068,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;let r=e.r(352438),i=e.r(748143),o=e.r(416403);n.error={message:({params:{property:e,depsCount:t,deps:n}})=>(0,r.str)`must have ${1===t?"property":"properties"} ${n} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>(0,r._)`{property: ${e}, 5 missingProperty: ${i}, 6 depsCount: ${t}, 7 deps: ${n}}`};let s={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(e){let[t,n]=function({schema:e}){let t={},n={};for(let r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);a(e,t),l(e,n)}};function a(e,t=e.schema){let{gen:n,data:i,it:s}=e;if(0===Object.keys(t).length)return;let l=n.let("missing");for(let a in t){let c=t[a];if(0===c.length)continue;let d=(0,o.propertyInData)(n,i,a,s.opts.ownProperties);e.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),s.allErrors?n.if(d,()=>{for(let t of c)(0,o.checkReportMissingProp)(e,t)}):(n.if((0,r._)`${d} && (${(0,o.checkMissingProp)(e,c,l)})`),(0,o.reportMissingProp)(e,l),n.else())}}function l(e,t=e.schema){let{gen:n,data:r,keyword:s,it:a}=e,c=n.name("valid");
7for(let l in t)(0,i.alwaysValidSchema)(a,t[l])||(n.if((0,o.propertyInData)(n,r,l,a.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>n.var(c,!0)),e.ok(c))}n.validatePropertyDeps=a,n.validateSchemaDeps=l,n.default=s},986893,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143);n.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,r._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:n,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,n))return;let a=t.name("valid");t.forIn("key",o,n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},a),t.if((0,r.not)(a),()=>{e.error(!0),s.allErrors||t.break()})}),e.ok(a)}}},353967,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(416403),i=e.r(352438),o=e.r(560216),s=e.r(748143);n.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,i._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:n,parentSchema:a,data:l,errsCount:c,it:d}=e;if(!c)throw Error("ajv implementation error");let{allErrors:u,opts:h}=d;if(d.props=!0,"all"!==h.removeAdditional&&(0,s.alwaysValidSchema)(d,n))return;let p=(0,r.allSchemaProperties)(a.properties),f=(0,r.allSchemaProperties)(a.patternProperties);function m(e){t.code((0,i._)`delete ${l}[${e}]`)}function g(r){if("all"===h.removeAdditional||h.removeAdditional&&!1===n)return void m(r);if(!1===n){e.setParams({additionalProperty:r}),e.error(),u||t.break();return}if("object"==typeof n&&!(0,s.alwaysValidSchema)(d,n)){let n=t.name("valid");"failing"===h.removeAdditional?(y(r,n,!1),t.if((0,i.not)(n),()=>{e.reset(),m(r)})):(y(r,n),u||t.if((0,i.not)(n),()=>t.break()))}}function y(t,n,r){let i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,n)}t.forIn("key",l,n=>{p.length||f.length?t.if(function(n){let o;if(p.length>8){let e=(0,s.schemaRefOrVal)(d,a.properties,"properties");o=(0,r.isOwnProperty)(t,e,n)}else o=p.length?(0,i.or)(...p.map(e=>(0,i._)`${n} === ${e}`)):i.nil;return f.length&&(o=(0,i.or)(o,...f.map(t=>(0,i._)`${(0,r.usePattern)(e,t)}.test(${n})`))),(0,i.not)(o)}(n),()=>g(n)):g(n)}),e.ok((0,i._)`${c} === ${o.default.errors}`)}}},701565,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(643741),i=e.r(416403),o=e.r(748143),s=e.r(353967);n.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:a,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new r.KeywordCxt(c,s.default,"additionalProperties"));let d=(0,i.allSchemaProperties)(n);for(let e of d)c.definedProperties.add(e);c.opts.unevaluated&&d.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(d),c.props));let u=d.filter(e=>!(0,o.alwaysValidSchema)(c,n[e]));if(0===u.length)return;let h=t.name("valid");for(let r of u){var p;(p=r,c.opts.useDefaults&&!c.compositeRule&&void 0!==n[p].default)?f(r):(t.if((0,i.propertyInData)(t,l,r,c.opts.ownProperties)),f(r),c.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(h)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}}},391626,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(416403),i=e.r(352438),o=e.r(748143),s=e.r(748143);n.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:a,parentSchema:l,it:c}=e,{opts:d}=c,u=(0,r.allSchemaProperties)(n),h=u.filter(e=>(0,o.alwaysValidSchema)(c,n[e]));if(0===u.length||h.length===u.length&&(!c.opts.unevaluated||!0===c.props))return;let p=d.strictSchema&&!d.allowMatchingProperties&&l.properties,f=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));let{props:m}=c;for(let e of u)p&&function(e){for(let t in p)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?g(e):(t.var(f,!0),g(e),t.if(f));function g(n){t.forIn("key",a,o=>{t.if((0,i._)`${(0,r.usePattern)(e,n)}.test(${o})`,()=>{let r=h.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:o,dataPropType:s.Type.Str},f),c.opts.unevaluated&&!0!==m?t.assign((0,i._)`${m}[${o}]`,!0):r||c.allErrors||t.if((0,i.not)(f),()=>t.break())})})}}}},320470,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(748143);n.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:i}=e;if((0,r.alwaysValidSchema)(i,n))return void e.fail();let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},216205,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.r(416403).validateUnion,error:{message:"must match a schema in anyOf"}}},8929,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143);n.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,r._)`{passingSchemas: ${e.passing}}`}
7,code(e){let{gen:t,schema:n,parentSchema:o,it:s}=e;if(!Array.isArray(n))throw Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;let a=t.let("valid",!1),l=t.let("passing",null),c=t.name("_valid");e.setParams({passing:l}),t.block(function(){n.forEach((n,o)=>{let d;(0,i.alwaysValidSchema)(s,n)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},c),o>0&&t.if((0,r._)`${c} && ${a}`).assign(a,!1).assign(l,(0,r._)`[${l}, ${o}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(l,o),d&&e.mergeEvaluated(d,r.Name)})})}),e.result(a,()=>e.reset(),()=>e.error(!0))}}},963318,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(748143);n.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw Error("ajv implementation error");let o=t.name("valid");n.forEach((t,n)=>{if((0,r.alwaysValidSchema)(i,t))return;let s=e.subschema({keyword:"allOf",schemaProp:n},o);e.ok(o),e.mergeEvaluated(s)})}}},564218,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143);function o(e,t){let n=e.schema[t];return void 0!==n&&!(0,i.alwaysValidSchema)(e,n)}n.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,r.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,r._)`{failingKeyword: ${e.ifClause}}`},code(e){let t,{gen:n,parentSchema:s,it:a}=e;void 0===s.then&&void 0===s.else&&(0,i.checkStrictMode)(a,'"if" without "then" and "else" is ignored');let l=o(a,"then"),c=o(a,"else");if(!l&&!c)return;let d=n.let("valid",!0),u=n.name("_valid");if(t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.mergeEvaluated(t),e.reset(),l&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(u,h("then",t),h("else",t))}else l?n.if(u,h("then")):n.if((0,r.not)(u),h("else"));function h(t,i){return()=>{let o=e.subschema({keyword:t},u);n.assign(d,u),e.mergeValidEvaluated(o,d),i?n.assign(i,(0,r._)`${t}`):e.setParams({ifClause:t})}}e.pass(d,()=>e.error(!0))}}},632269,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(748143);n.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}}},994472,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(790900),i=e.r(33349),o=e.r(727071),s=e.r(513665),a=e.r(449683),l=e.r(15068),c=e.r(986893),d=e.r(353967),u=e.r(701565),h=e.r(391626),p=e.r(320470),f=e.r(216205),m=e.r(8929),g=e.r(963318),y=e.r(564218),b=e.r(632269);n.default=function(e=!1){let t=[p.default,f.default,m.default,g.default,y.default,b.default,c.default,d.default,l.default,u.default,h.default];return e?t.push(i.default,s.default):t.push(r.default,o.default),t.push(a.default),t}},767852,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438);n.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,r._)`{format: ${e}}`},code(e,t){let n,i,o,s,a,l,{gen:c,data:d,$data:u,schema:h,schemaCode:p,it:f}=e,{opts:m,errSchemaPath:g,schemaEnv:y,self:b}=f;m.validateFormats&&(u?(n=c.scopeValue("formats",{ref:b.formats,code:m.code.formats}),i=c.const("fDef",(0,r._)`${n}[${p}]`),o=c.let("fType"),s=c.let("format"),c.if((0,r._)`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>c.assign(o,(0,r._)`${i}.type || "string"`).assign(s,(0,r._)`${i}.validate`),()=>c.assign(o,(0,r._)`"string"`).assign(s,i)),e.fail$data((0,r.or)(!1===m.strictSchema?r.nil:(0,r._)`${p} && !${s}`,(a=y.$async?(0,r._)`(${i}.async ? await ${s}(${d}) : ${s}(${d}))`:(0,r._)`${s}(${d})`,l=(0,r._)`(typeof ${s} == "function" ? ${a} : ${s}.test(${d}))`,(0,r._)`${s} && ${s} !== true && ${o} === ${t} && !${l}`)))):function(){var n;let i,o,s=b.formats[h];if(!s){if(!1===m.strictSchema)return b.logger.warn(a());throw Error(a());function a(){return`unknown format "${h}" ignored in schema at path "${g}"`}}if(!0===s)return;let[l,u,p]=(i=(n=s)instanceof RegExp?(0,r.regexpCode)(n):m.code.formats?(0,r._)`${m.code.formats}
7${(0,r.getProperty)(h)}`:void 0,o=c.scopeValue("formats",{key:h,ref:n,code:i}),"object"!=typeof n||n instanceof RegExp?["string",n,o]:[n.type||"string",n.validate,(0,r._)`${o}.validate`]);l===t&&e.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!y.$async)throw Error("async format in sync schema");return(0,r._)`await ${p}(${d})`}return"function"==typeof u?(0,r._)`${p}(${d})`:(0,r._)`${p}.test(${d})`}())}())}}},620458,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=[e.r(767852).default]},258445,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.contentVocabulary=n.metadataVocabulary=void 0,n.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],n.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},137351,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(397597),i=e.r(168047),o=e.r(994472),s=e.r(620458),a=e.r(258445);n.default=[r.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary]},561607,(e,t,n)=>{"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,(i=r||(n.DiscrError=r={})).Tag="tag",i.Mapping="mapping"},910495,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(561607),o=e.r(53562),s=e.r(150814),a=e.r(748143);n.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,r._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){let{gen:t,data:n,schema:l,parentSchema:c,it:d}=e,{oneOf:u}=c;if(!d.opts.discriminator)throw Error("discriminator: requires discriminator option");let h=l.propertyName;if("string"!=typeof h)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!u)throw Error("discriminator: requires oneOf keyword");let p=t.let("valid",!1),f=t.const("tag",(0,r._)`${n}${(0,r.getProperty)(h)}`);t.if((0,r._)`typeof ${f} == "string"`,()=>(function(){let n=function(){var e;let t={},n=i(c),r=!0;for(let t=0;t<u.length;t++){let c=u[t];if((null==c?void 0:c.$ref)&&!(0,a.schemaHasRulesButRef)(c,d.self.RULES)){let e=c.$ref;if((c=o.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e))instanceof o.SchemaEnv&&(c=c.schema),void 0===c)throw new s.default(d.opts.uriResolver,d.baseId,e)}let p=null==(e=null==c?void 0:c.properties)?void 0:e[h];if("object"!=typeof p)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${h}"`);r=r&&(n||i(c)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let n of e.enum)l(n,t);else throw Error(`discriminator: "properties/${h}" must have "const" or "enum"`)}(p,t)}if(!r)throw Error(`discriminator: "${h}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(h)}function l(e,n){if("string"!=typeof e||e in t)throw Error(`discriminator: "${h}" values must be unique strings`);t[e]=n}}();for(let i in t.if(!1),n)t.elseIf((0,r._)`${f} === ${i}`),t.assign(p,function(n){let i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:n},i);return e.mergeEvaluated(o,r.Name),i}(n[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:f,tagName:h}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:f,tagName:h})),e.ok(p)}}},393114,(e,t,n)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"}
7,const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}},882312,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;let r=e.r(883504),i=e.r(137351),o=e.r(910495),s=e.r(393114),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}n.Ajv=c,t.exports=n=c,t.exports.Ajv=c,Object.defineProperty(n,"__esModule",{value:!0}),n.default=c;var d=e.r(643741);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=e.r(352438);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=e.r(138955);Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=e.r(150814);Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},38997,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dynamicAnchor=void 0;let r=e.r(352438),i=e.r(560216),o=e.r(53562),s=e.r(561310);function a(e,t){let{gen:n,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;let l=(0,r._)`${i.default.dynamicAnchors}${(0,r.getProperty)(t)}`,c="#"===a.errSchemaPath?a.validateName:function(e){let{schemaEnv:t,schema:n,self:r}=e.it,{root:i,baseId:a,localRefs:l,meta:c}=t.root,{schemaId:d}=r.opts,u=new o.SchemaEnv({schema:n,schemaId:d,root:i,baseId:a,localRefs:l,meta:c});return o.compileSchema.call(r,u),(0,s.getValidate)(e,u)}(e);n.if((0,r._)`!${l}`,()=>n.assign(l,c))}n.dynamicAnchor=a,n.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>a(e,e.schema)}},611748,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dynamicRef=void 0;let r=e.r(352438),i=e.r(560216),o=e.r(561310);function s(e,t){let{gen:n,keyword:s,it:a}=e;if("#"!==t[0])throw Error(`"${s}" only supports hash fragment reference`);let l=t.slice(1);if(a.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(a.schemaEnv.root.dynamicAnchors[l]){let t=n.let("_v",(0,r._)`${i.default.dynamicAnchors}${(0,r.getProperty)(l)}`);n.if(t,d(t,e),d(a.validateName,e))}else d(a.validateName,e)()}function d(t,r){return r?()=>n.block(()=>{(0,o.callRef)(e,t),n.let(r,!0)}):()=>(0,o.callRef)(e,t)}}n.dynamicRef=s,n.default={keyword:"$dynamicRef",schemaType:"string",code:e=>s(e,e.schema)}},139375,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(38997),i=e.r(748143);n.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,r.dynamicAnchor)(e,""):(0,i.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}},923093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(611748);n.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,r.dynamicRef)(e,e.schema)}},679123,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(38997),i=e.r(611748),o=e.r(139375),s=e.r(923093);n.default=[r.default,i.default,o.default,s.default]},150324,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(15068);n.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:r.error,code:e=>(0,r.validatePropertyDeps)(e)}},175445,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(15068);n.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,r.validateSchemaDeps)(e)}},275707,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(748143);n.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:n}){void 0===t.contains&&(0,r.checkStrictMode)(n,`"${e}" without "contains" is ignored`)}}},146850,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(150324),i=e.r(175445),o=e.r(275707);n.default=[r.default,i.default,o.default]},141894,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143),o=e.r(560216);n.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,r._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:t,schema:n,data:s,errsCount:a,it:l}=e;if(!a)throw Error("ajv implementation error");let{allErrors:c,props:d}=l;function u(o){if(!1===n){e.setParams({unevaluatedProperty:o}),e.error(),c||t.break();return}
7if(!(0,i.alwaysValidSchema)(l,n)){let n=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:o,dataPropType:i.Type.Str},n),c||t.if((0,r.not)(n),()=>t.break())}}d instanceof r.Name?t.if((0,r._)`${d} !== true`,()=>t.forIn("key",s,e=>{var n,i;return t.if((n=d,i=e,(0,r._)`!${n} || !${n}[${i}]`),()=>u(e))})):!0!==d&&t.forIn("key",s,e=>void 0===d?u(e):t.if(function(e,t){let n=[];for(let i in e)!0===e[i]&&n.push((0,r._)`${t} !== ${i}`);return(0,r.and)(...n)}(d,e),()=>u(e))),l.props=!0,e.ok((0,r._)`${a} === ${o.default.errors}`)}}},722823,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(352438),i=e.r(748143);n.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{gen:t,schema:n,data:o,it:s}=e,a=s.items||0;if(!0===a)return;let l=t.const("len",(0,r._)`${o}.length`);if(!1===n)e.setParams({len:a}),e.fail((0,r._)`${l} > ${a}`);else if("object"==typeof n&&!(0,i.alwaysValidSchema)(s,n)){let n=t.var("valid",(0,r._)`${l} <= ${a}`);t.if((0,r.not)(n),()=>{var o,c;return o=n,c=a,void t.forRange("i",c,l,n=>{e.subschema({keyword:"unevaluatedItems",dataProp:n,dataPropType:i.Type.Num},o),s.allErrors||t.if((0,r.not)(o),()=>t.break())})}),e.ok(n)}s.items=!0}}},827783,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(141894),i=e.r(722823);n.default=[r.default,i.default]},635527,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}},243075,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}},574403,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}},94873,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}},411604,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}},191480,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}},606729,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}
7,const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}},605457,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(635527),i=e.r(243075),o=e.r(574403),s=e.r(94873),a=e.r(411604),l=e.r(191480),c=e.r(606729),d=["/properties"];n.default=function(e){return[r,i,o,s,t(this,a),l,t(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function t(t,n){return e?t.$dataMetaSchema(n,d):n}}},876259,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv2019=void 0;let r=e.r(883504),i=e.r(137351),o=e.r(679123),s=e.r(146850),a=e.r(827783),l=e.r(910495),c=e.r(605457),d="https://json-schema.org/draft/2019-09/schema";class u extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(s.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(l.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(c.default.call(this,e),this.refs["http://json-schema.org/schema"]=d)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}n.Ajv2019=u,t.exports=n=u,t.exports.Ajv2019=u,Object.defineProperty(n,"__esModule",{value:!0}),n.default=u;var h=e.r(643741);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var p=e.r(352438);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var f=e.r(138955);Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return f.default}});var m=e.r(150814);Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},373599,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(397597),i=e.r(168047),o=e.r(994472),s=e.r(679123),a=e.r(146850),l=e.r(827783),c=e.r(620458),d=e.r(258445);n.default=[s.default,r.default,i.default,(0,o.default)(!0),c.default,d.metadataVocabulary,d.contentVocabulary,a.default,l.default]},639284,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}}
7,dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}},33532,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}},687579,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}},753555,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}},539828,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}},666327,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}},639701,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}},29552,(e,t,n)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}},749208,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(639284),i=e.r(33532),o=e.r(687579),s=e.r(753555),a=e.r(539828),l=e.r(666327),c=e.r(639701),d=e.r(29552),u=["/properties"];n.default=function(e){return[r,i,o,s,a,t(this,l),c,t(this,d)].forEac
7h(e=>this.addMetaSchema(e,void 0,!1)),this;function t(t,n){return e?t.$dataMetaSchema(n,u):n}}},470855,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv2020=void 0;let r=e.r(883504),i=e.r(373599),o=e.r(910495),s=e.r(749208),a="https://json-schema.org/draft/2020-12/schema";class l extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}n.Ajv2020=l,t.exports=n=l,t.exports.Ajv2020=l,Object.defineProperty(n,"__esModule",{value:!0}),n.default=l;var c=e.r(643741);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=e.r(352438);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var u=e.r(138955);Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return u.default}});var h=e.r(150814);Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},503260,(e,t,n)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(n,"__esModule",{value:!0}),n.formatNames=n.fastFormats=n.fullFormats=void 0,n.fullFormats={date:r(s,a),time:r(c(!0),d),"date-time":r(p(!0),f),"iso-time":r(c(),u),"iso-date-time":r(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return g.test(e)&&y.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(w.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return b.lastIndex=0,b.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=k&&e>=v}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:x},double:{type:"number",validate:x},password:!0,binary:!0},n.fastFormats={...n.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},n.formatNames=Object.keys(n.fullFormats);let i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(e){var t;let n=i.exec(e);if(!n)return!1;let r=+n[1],s=+n[2],a=+n[3];return s>=1&&s<=12&&a>=1&&a<=(2===s&&(t=r)%4==0&&(t%100!=0||t%400==0)?29:o[s])}function a(e,t){if(e&&t)return e>t?1:e<t?-1:0}let l=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=l.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],o=+n[3],s=n[4],a="-"===n[5]?-1:1,c=+(n[6]||0),d=+(n[7]||0);if(c>23||d>59||e&&!s)return!1;if(r<=23&&i<=59&&o<60)return!0;let u=i-d*a,h=r-c*a-(u<0);
7return(23===h||-1===h)&&(59===u||-1===u)&&o<61}}function d(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),r=new Date("2020-01-01T"+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=l.exec(e),r=l.exec(t);if(n&&r)return(e=n[1]+n[2]+n[3])>(t=r[1]+r[2]+r[3])?1:e<t?-1:0}let h=/t|\s/i;function p(e){let t=c(e);return function(e){let n=e.split(h);return 2===n.length&&s(n[0])&&t(n[1])}}function f(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(h),[i,o]=t.split(h),s=a(n,i);if(void 0!==s)return s||d(r,o)}let g=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,v=-0x80000000,k=0x80000000-1;function x(){return!0}let w=/[^\\]\\Z/},391609,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatLimitDefinition=void 0;let r=e.r(882312),i=e.r(352438),o=i.operators,s={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}};n.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,i.str)`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,i._)`{comparison: ${s[e].okStr}, limit: ${t}}`},code(e){let t,n,{gen:o,data:a,schemaCode:l,keyword:c,it:d}=e,{opts:u,self:h}=d;if(!u.validateFormats)return;let p=new r.KeywordCxt(d,h.RULES.all.format.definition,"format");function f(e){return(0,i._)`${e}.compare(${a}, ${l}) ${s[c].fail} 0`}p.$data?(t=o.scopeValue("formats",{ref:h.formats,code:u.code.formats}),n=o.const("fmt",(0,i._)`${t}[${p.schemaCode}]`),e.fail$data((0,i.or)((0,i._)`typeof ${n} != "object"`,(0,i._)`${n} instanceof RegExp`,(0,i._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=p.schema,n=h.formats[t];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let r=o.scopeValue("formats",{key:t,ref:n,code:u.code.formats?(0,i._)`${u.code.formats}${(0,i.getProperty)(t)}`:void 0});e.fail$data(f(r))}()},dependencies:["format"]},n.default=e=>(e.addKeyword(n.formatLimitDefinition),e)},153760,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=e.r(503260),i=e.r(391609),o=e.r(352438),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),l=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,s),e;let[n,o]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,s];return c(e,t.formats||r.formatNames,n,o),t.keywords&&(0,i.default)(e),e};function c(e,t,n,r){var i;for(let s of(null!=(i=e.opts.code).formats||(i.formats=(0,o._)`require("ajv-formats/dist/formats").${r}`),t))e.addFormat(s,n[s])}l.get=(e,t="full")=>{let n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw Error(`Unknown format "${e}"`);return n},t.exports=n=l,Object.defineProperty(n,"__esModule",{value:!0}),n.default=l},265847,(e,t,n)=>{"use strict";let r="[^\\\\/]",i="[^/]",o="(?:\\/|$)",s="(?:^|\\/)",a=`\\.{1,2}${o}`,l=`(?!${s}${a})`,c=`(?!\\.{0,1}${o})`,d=`(?!${a})`,u=`${i}*?`,h={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:a,NO_DOT:"(?!\\.)",NO_DOTS:l,NO_DOT_SLASH:c,NO_DOTS_SLASH:d,QMARK_NO_DOT:"[^.\\/]",STAR:u,START_ANCHOR:s,SEP:"/"},p={...h,SLASH_LITERAL:"[\\\\/]",QMARK:r,STAR:`${r}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEM
vendor: 9,126 bytes, line 7
7ICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?p:h}},868396,(e,t,n)=>{"use strict";var r=e.i(347374);let{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=e.r(265847);n.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),n.hasRegexChars=e=>s.test(e),n.isRegexChar=e=>1===e.length&&n.hasRegexChars(e),n.escapeRegex=e=>e.replace(a,"\\$1"),n.toPosixSlashes=e=>e.replace(i,"/"),n.isWindows=()=>{if("u">typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return void 0!==r.default&&!!r.default.platform&&"win32"===r.default.platform},n.removeBackslashes=e=>e.replace(o,e=>"\\"===e?"":e),n.escapeLast=(e,t,r)=>{let i=e.lastIndexOf(t,r);return -1===i?e:"\\"===e[i-1]?n.escapeLast(e,t,i-1):`${e.slice(0,i)}\\${e.slice(i)}`},n.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},n.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",o=`${r}(?:${e})${i}`;return!0===t.negated&&(o=`(?:^(?!${o}).*$)`),o},n.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}},702142,(e,t,n)=>{"use strict";let r=e.r(868396),{CHAR_ASTERISK:i,CHAR_AT:o,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:d,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:f,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:b}=e.r(265847),v=e=>e===d||e===s,k=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let n,x,w=t||{},E=e.length-1,T=!0===w.parts||!0===w.scanToEnd,S=[],C=[],A=[],_=e,N=-1,O=0,M=0,I=!1,D=!1,R=!1,z=!1,L=!1,P=!1,j=!1,$=!1,F=!1,B=!1,H=0,U={value:"",depth:0,isGlob:!1},V=()=>N>=E,q=()=>_.charCodeAt(N+1),G=()=>(n=x,_.charCodeAt(++N));for(;N<E;){let e;if((x=G())===s){j=U.backslashes=!0,(x=G())===u&&(P=!0);continue}if(!0===P||x===u){for(H++;!0!==V()&&(x=G());){if(x===s){j=U.backslashes=!0,G();continue}if(x===u){H++;continue}if(!0!==P&&x===l&&(x=G())===l||!0!==P&&x===a){if(I=U.isBrace=!0,R=U.isGlob=!0,B=!0,!0===T)continue;break}if(x===g&&0==--H){P=!1,I=U.isBrace=!0,B=!0;break}}if(!0===T)continue;break}if(x===d){if(S.push(N),C.push(U),U={value:"",depth:0,isGlob:!1},!0===B)continue;if(n===l&&N===O+1){O+=2;continue}M=N+1;continue}if(!0!==w.noext&&!0==(x===f||x===o||x===i||x===m||x===c)&&q()===h){if(R=U.isGlob=!0,z=U.isExtglob=!0,B=!0,x===c&&N===O&&(F=!0),!0===T){for(;!0!==V()&&(x=G());){if(x===s){j=U.backslashes=!0,x=G();continue}if(x===y){R=U.isGlob=!0,B=!0;break}}continue}break}if(x===i){if(n===i&&(L=U.isGlobstar=!0),R=U.isGlob=!0,B=!0,!0===T)continue;break}if(x===m){if(R=U.isGlob=!0,B=!0,!0===T)continue;break}if(x===p){for(;!0!==V()&&(e=G());){if(e===s){j=U.backslashes=!0,G();continue}if(e===b){D=U.isBracket=!0,R=U.isGlob=!0,B=!0;break}}if(!0===T)continue;break}if(!0!==w.nonegate&&x===c&&N===O){$=U.negated=!0,O++;continue}if(!0!==w.noparen&&x===h){if(R=U.isGlob=!0,!0===T){for(;!0!==V()&&(x=G());){if(x===h){j=U.backslashes=!0,x=G();continue}if(x===y){B=!0;break}}continue}break}if(!0===R){if(B=!0,!0===T)continue;break}}!0===w.noext&&(z=!1,R=!1);let W=_,K="",J="";O>0&&(K=_.slice(0,O),_=_.slice(O),M-=O),W&&!0===R&&M>0?(W=_.slice(0,M),J=_.slice(M)):!0===R?(W="",J=_):W=_,W&&""!==W&&"/"!==W&&W!==_&&v(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===w.unescape&&(J&&(J=r.removeBackslashes(J)),W&&!0===j&&(W=r.removeBackslashes(W)));let Y={prefix:K,input:e,start:O,base:W,glob:J,isBrace:I,isBracket:D,isGlob:R,isExtglob:z,isGlobstar:L,negated:$,negatedExtglob:F};if(!0===w.tokens&&(Y.maxDepth=0,v(x)||C.push(U),Y.tokens=C),!0===w.parts||!0===w.tokens){let t;for(let n=0;n<S.length;n++){let r=t?t+1:O,i=S[n],o=e.slice(r,i);w.tokens&&(0===n&&0!==O?(C[n].isPrefix=!0,C[n].value=K):C[n].value=o,k(C[n]),Y.maxDepth+=C[n].depth),(0!==n||""!==o)&&A.push(o),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);A.push(n),w.tokens&&(C[C.length-1].value=n,k(C[C.length-1]),Y.maxDepth+=C[C.length-1].depth)}Y.slashes=S,Y.parts=A}return Y}},729178,(e,t,n)=>{"use strict";let r=e.r(265847),i=e.r(868396),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:c}=r,d=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map(e=>i.escapeRegex(e)).join("..")}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,h=e=>{let t=[],n=0,r=0,i=0,o="",s=!1;for(let a of e){if(!0===s){o+=a,s=!1;continue}if("\\"===a){o+=a,s=!0;continue}if('"'===a){i=+(1!==i),o+=a;continue}if(0===i){if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n){if("("===a)r++;else if(")"===a&&r>0)r--;else if("|"===a&&0===r){t.push(o),o="";continue}}}o+=a}return t.push(o),t},p=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(let n of e){if(!0===t){t=!1;continue}if("\\"===n){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0})(t))return t.replace(/\\(.)/g,"$1")},f=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,r=0,i=0,o=!1;for(let s=1;s<e.length;s++){let a=e[s];if(!0===o){o=!1;continue}if("\\"===a){o=!0;continue}if('"'===a){i=+(1!==i);continue}if(1!==i){if("["===a){n++;continue}if("]"===a&&n>0){n--;continue}if(!(n>0)){if("("===a){r++;continue}if(")"===a&&0==--r){if(!0===t&&s!==e.length-1)return;return{type:e[0],body:e.slice(2,s),end:s}}}}}},m=e=>{let t=0,n=[];for(;t<e.length;){let r=f(e.slice(t),!1);if(!r||"*"!==r.type)return;let i=h(r.body).map(e=>e.trim());if(1!==i.length)return;let o=p(i[0]);if(!o||1!==o.length)return;n.push(o),t+=r.end+1}if(!(n.length<1))return n},g=e=>{let t=0,n=e.trim(),r=f(n);for(;r;)t++,r=f(n=r.body.trim());return t},y=(e,t)=>{let n;if("string"!=typeof e)throw TypeError("Expected a string");e=c[e]||e;let f={...t},b="number"==typeof f.maxLength?Math.min(o,f.maxLength):o,v=e.length;if(v>b)throw SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${b}`);let k={type:"bos",value:"",output:f.prepend||""},x=[k],w=f.capture?"":"?:",E=r.globChars(f.windows),T=r.extglobChars(E),{DOT_LITERAL:S,PLUS_LITERAL:C,SLASH_LITERAL:A,ONE_CHAR:_,DOTS_SLASH:N,NO_DOT:O,NO_DOT_SLASH:M,NO_DOTS_SLASH:I,QMARK:D,QMARK_NO_DOT:R,STAR:z,START_ANCHOR:L}=E,P=e=>`(${w}(?:(?!${L}${e.dot?N:S}).)*?)`,j=f.dot?"":O,$=f.dot?D:R,F=!0===f.bash?P(f):z;f.capture&&(F=`(${F})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);let B={input:e,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:x};v=(e=i.removePrefix(e,B)).length;let H=[],U=[],V=[],q=k,G=()=>B.index===v-1,W=B.peek=(t=1)=>e[B.index+t],K=B.advance=()=>e[++B.index]||"",J=()=>e.slice(B.index+1),Y=(e="",t=0)=>{B.consumed+=e,B.index+=t},X=e=>{B.output+=null!=e.output?e.output:e.value,Y(e.value)},Q=()=>{let e=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)K(),B.start++,e++;return e%2!=0&&(B.negated=!0,B.start++,!0)},Z=e=>{B[e]++,V.push(e)},ee=e=>{B[e]--,V.pop()},et=e=>{if("globstar"===q.type){let t=B.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||H.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(B.output=B.output.slice(0,-q.output.length),q.type="star",q.value="*",q.output=F,B.output+=q.output)}if(H.length&&"paren"!==e.type&&(H[H.length-1].inner+=e.value),(e.value||e.output)&&X(e),q&&"text"===q.type&&"text"===e.type){q.output=(q.output||q.value)+e.value,q.value+=e.value;return}e.prev=q,x.push(e),q=e},en=(e,t)=>{let n={...T[t],conditions:1,inner:""};n.prev=q,n.parens=B.parens,n.output=B.output,n.startIndex=B.index,n.tokensIndex=x.length;let r=(f.capture?"(":"")+n.open;Z("parens"),et({type:e,value:t,output:B.output?"":_}),et({type:"paren",extglob:!0,value:K(),output:r}),H.push(n)},er=o=>{let s,a=e.slice(o.startIndex,B.index+1),l=((e,t)=>{if(!1===t.maxExtglobRecursion)return{risky:!1};let n="number"==typeof t.maxExtglobRecursion?t.maxExtglobRecursion:r.DEFAULT_MAX_EXTGLOB_RECURSION,o=h(e).map(e=>e.trim());if(o.length>1&&(o.some(e=>""===e)||o.some(e=>/^[*?]+$/.test(e))||(e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],o=r[0];if(o&&r===o.repeat(r.length)&&i===o.repeat(i.length)&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1})(o)))return{risky:!0};let s=[],a=!1,l=!0;for(let e of o){let t=m(e);if(t){a=!0,s.push(...t);continue}let r=p(e);if(r&&1===r.length){s.push(r);continue}if(l=!1,g(e)>n)return{risky:!0}}if(a){var c;let e;return l?{risky:!0,safeOutput:(e=1===(c=[...new Set(s)]).length?i.escapeRegex(c[0]):`[${c.map(e=>i.escapeRegex(e)).join("")}]`,`${e}*`)}:{risky:!0}}return{risky:!1}
vendor: 4,478 bytes, line 7
7})(e.slice(o.startIndex+2,B.index),f);if(("plus"===o.type||"star"===o.type)&&l.risky){let e=l.safeOutput?(o.output?"":_)+(f.capture?`(${l.safeOutput})`:l.safeOutput):void 0,t=x[o.tokensIndex];t.type="text",t.value=a,t.output=e||i.escapeRegex(a);for(let e=o.tokensIndex+1;e<x.length;e++)x[e].value="",x[e].output="",delete x[e].suffix;B.output=o.output+t.output,B.backtrack=!0,et({type:"paren",extglob:!0,value:n,output:""}),ee("parens");return}let c=o.close+(f.capture?")":"");if("negate"===o.type){let e=F;if(o.inner&&o.inner.length>1&&o.inner.includes("/")&&(e=P(f)),(e!==F||G()||/^\)+$/.test(J()))&&(c=o.close=`)$))${e}`),o.inner.includes("*")&&(s=J())&&/^\.[^\\/.]+$/.test(s)){let n=y(s,{...t,fastpaths:!1}).output;c=o.close=`)${n})${e})`}"bos"===o.prev.type&&(B.negatedExtglob=!0)}et({type:"paren",extglob:!0,value:n,output:c}),ee("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,r=e.replace(l,(e,t,r,i,o,s)=>"\\"===i?(n=!0,e):"?"===i?t?t+i+(o?D.repeat(o.length):""):0===s?$+(o?D.repeat(o.length):""):D.repeat(r.length):"."===i?S.repeat(r.length):"*"===i?t?t+i+(o?F:""):F:t?e:`\\${e}`);return(!0===n&&(r=!0===f.unescape?r.replace(/\\/g,""):r.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),r===e&&!0===f.contains)?B.output=e:B.output=i.wrapOutput(r,B,t),B}for(;!G();){if("\0"===(n=K()))continue;if("\\"===n){let e=W();if("/"===e&&!0!==f.bash||"."===e||";"===e)continue;if(!e){et({type:"text",value:n+="\\"});continue}let t=/^\\+/.exec(J()),r=0;if(t&&t[0].length>2&&(r=t[0].length,B.index+=r,r%2!=0&&(n+="\\")),!0===f.unescape?n=K():n+=K(),0===B.brackets){et({type:"text",value:n});continue}}if(B.brackets>0&&("]"!==n||"["===q.value||"[^"===q.value)){if(!1!==f.posix&&":"===n){let e=q.value.slice(1);if(e.includes("[")&&(q.posix=!0,e.includes(":"))){let e=q.value.lastIndexOf("["),t=q.value.slice(0,e),n=s[q.value.slice(e+2)];if(n){q.value=t+n,B.backtrack=!0,K(),k.output||1!==x.indexOf(q)||(k.output=_);continue}}}("["===n&&":"!==W()||"-"===n&&"]"===W())&&(n=`\\${n}`),"]"===n&&("["===q.value||"[^"===q.value)&&(n=`\\${n}`),!0===f.posix&&"!"===n&&"["===q.value&&(n="^"),q.value+=n,X({value:n});continue}if(1===B.quotes&&'"'!==n){n=i.escapeRegex(n),q.value+=n,X({value:n});continue}if('"'===n){B.quotes=+(1!==B.quotes),!0===f.keepQuotes&&et({type:"text",value:n});continue}if("("===n){Z("parens"),et({type:"paren",value:n});continue}if(")"===n){if(0===B.parens&&!0===f.strictBrackets)throw SyntaxError(u("opening","("));let e=H[H.length-1];if(e&&B.parens===e.parens+1){er(H.pop());continue}et({type:"paren",value:n,output:B.parens?")":"\\)"}),ee("parens");continue}if("["===n){if(!0!==f.nobracket&&J().includes("]"))Z("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw SyntaxError(u("closing","]"));n=`\\${n}`}et({type:"bracket",value:n});continue}if("]"===n){if(!0===f.nobracket||q&&"bracket"===q.type&&1===q.value.length){et({type:"text",value:n,output:`\\${n}`});continue}if(0===B.brackets){if(!0===f.strictBrackets)throw SyntaxError(u("opening","["));et({type:"text",value:n,output:`\\${n}`});continue}ee("brackets");let e=q.value.slice(1);if(!0===q.posix||"^"!==e[0]||e.includes("/")||(n=`/${n}`),q.value+=n,X({value:n}),!1===f.literalBrackets||i.hasRegexChars(e))continue;let t=i.escapeRegex(q.value);if(B.output=B.output.slice(0,-q.value.length),!0===f.literalBrackets){B.output+=t,q.value=t;continue}q.value=`(${w}${t}|${q.value})`,B.output+=q.value;continue}if("{"===n&&!0!==f.nobrace){Z("braces");let e={type:"brace",value:n,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};U.push(e),et(e);continue}if("}"===n){let e=U[U.length-1];if(!0===f.nobrace||!e){et({type:"text",value:n,output:n});continue}let t=")";if(!0===e.dots){let e=x.slice(),n=[];for(let t=e.length-1;t>=0&&(x.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=d(n,f),B.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let r=B.output.slice(0,e.outputIndex),i=B.tokens.slice(e.tokensIndex);for(let o of(e.value=e.output="\\{",n=t="\\}",B.output=r,i))B.output+=o.output||o.value}et({type:"brace",value:n,output:t}),ee("braces"),U.pop();continue}if("|"===n){H.length>0&&H[H.length-1].conditions++,et({type:"text",value:n});continue}if(","===n){let e=n,t=U[U.length-1];t&&"braces"===V[V.length-1]&&(t.comma=!0,e="|"),et({type:"comma",value:n,output:e});continue}if("/"===n){if("dot"===q.type&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",x.pop(),q=k;continue}et({type:"slash",value:n,output:A});continue}
vendor: 4,628 bytes, line 7
7if("."===n){if(B.braces>0&&"dot"===q.type){"."===q.value&&(q.output=S);let e=U[U.length-1];q.type="dots",q.output+=n,q.value+=n,e.dots=!0;continue}if(B.braces+B.parens===0&&"bos"!==q.type&&"slash"!==q.type){et({type:"text",value:n,output:S});continue}et({type:"dot",value:n,output:S});continue}if("?"===n){if(!(q&&"("===q.value)&&!0!==f.noextglob&&"("===W()&&"?"!==W(2)){en("qmark",n);continue}if(q&&"paren"===q.type){let e=W(),t=n;("("!==q.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${n}`),et({type:"text",value:n,output:t});continue}if(!0!==f.dot&&("slash"===q.type||"bos"===q.type)){et({type:"qmark",value:n,output:R});continue}et({type:"qmark",value:n,output:D});continue}if("!"===n){if(!0!==f.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){en("negate",n);continue}if(!0!==f.nonegate&&0===B.index){Q();continue}}if("+"===n){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){en("plus",n);continue}if(q&&"("===q.value||!1===f.regex){et({type:"plus",value:n,output:C});continue}if(q&&("bracket"===q.type||"paren"===q.type||"brace"===q.type)||B.parens>0){et({type:"plus",value:n});continue}et({type:"plus",value:C});continue}if("@"===n){if(!0!==f.noextglob&&"("===W()&&"?"!==W(2)){et({type:"at",extglob:!0,value:n,output:""});continue}et({type:"text",value:n});continue}if("*"!==n){("$"===n||"^"===n)&&(n=`\\${n}`);let e=a.exec(J());e&&(n+=e[0],B.index+=e[0].length),et({type:"text",value:n});continue}if(q&&("globstar"===q.type||!0===q.star)){q.type="star",q.star=!0,q.value+=n,q.output=F,B.backtrack=!0,B.globstar=!0,Y(n);continue}let t=J();if(!0!==f.noextglob&&/^\([^?]/.test(t)){en("star",n);continue}if("star"===q.type){if(!0===f.noglobstar){Y(n);continue}let r=q.prev,i=r.prev,o="slash"===r.type||"bos"===r.type,s=i&&("star"===i.type||"globstar"===i.type);if(!0===f.bash&&(!o||t[0]&&"/"!==t[0])){et({type:"star",value:n,output:""});continue}let a=B.braces>0&&("comma"===r.type||"brace"===r.type),l=H.length&&("pipe"===r.type||"paren"===r.type);if(!o&&"paren"!==r.type&&!a&&!l){et({type:"star",value:n,output:""});continue}for(;"/**"===t.slice(0,3);){let n=e[B.index+4];if(n&&"/"!==n)break;t=t.slice(3),Y("/**",3)}if("bos"===r.type&&G()){q.type="globstar",q.value+=n,q.output=P(f),B.output=q.output,B.globstar=!0,Y(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!s&&G()){B.output=B.output.slice(0,-(r.output+q.output).length),r.output=`(?:${r.output}`,q.type="globstar",q.output=P(f)+(f.strictSlashes?")":"|$)"),q.value+=n,B.globstar=!0,B.output+=r.output+q.output,Y(n);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){let e=void 0!==t[1]?"|$":"";B.output=B.output.slice(0,-(r.output+q.output).length),r.output=`(?:${r.output}`,q.type="globstar",q.output=`${P(f)}${A}|${A}${e})`,q.value+=n,B.output+=r.output+q.output,B.globstar=!0,Y(n+K()),et({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){q.type="globstar",q.value+=n,q.output=`(?:^|${A}|${P(f)}${A})`,B.output=q.output,B.globstar=!0,Y(n+K()),et({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-q.output.length),q.type="globstar",q.output=P(f),q.value+=n,B.output+=q.output,B.globstar=!0,Y(n);continue}let r={type:"star",value:n,output:F};if(!0===f.bash){r.output=".*?",("bos"===q.type||"slash"===q.type)&&(r.output=j+r.output),et(r);continue}if(q&&("bracket"===q.type||"paren"===q.type)&&!0===f.regex){r.output=n,et(r);continue}(B.index===B.start||"slash"===q.type||"dot"===q.type)&&("dot"===q.type?(B.output+=M,q.output+=M):!0===f.dot?(B.output+=I,q.output+=I):(B.output+=j,q.output+=j),"*"!==W()&&(B.output+=_,q.output+=_)),et(r)}for(;B.brackets>0;){if(!0===f.strictBrackets)throw SyntaxError(u("closing","]"));B.output=i.escapeLast(B.output,"["),ee("brackets")}for(;B.parens>0;){if(!0===f.strictBrackets)throw SyntaxError(u("closing",")"));B.output=i.escapeLast(B.output,"("),ee("parens")}for(;B.braces>0;){if(!0===f.strictBrackets)throw SyntaxError(u("closing","}"));B.output=i.escapeLast(B.output,"{"),ee("braces")}if(!0!==f.strictSlashes&&("star"===q.type||"bracket"===q.type)&&et({type:"maybe_slash",value:"",output:`${A}?`}),!0===B.backtrack)for(let e of(B.output="",B.tokens))B.output+=null!=e.output?e.output:e.value,e.suffix&&(B.output+=e.suffix);return B};y.fastpaths=(e,t)=>{let n={...t},s="number"==typeof n.maxLength?Math.min(o,n.maxLength):o,a=e.length;if(a>s)throw SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:d,ONE_CHAR:u,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=r.globChars(n.windows),b=n.dot?f:p,v=n.dot?m:p,k=n.capture?"":"?:",x=!0===n.bash?".*?"
7:g;n.capture&&(x=`(${x})`);let w=e=>!0===e.noglobstar?x:`(${k}(?:(?!${y}${e.dot?h:l}).)*?)`,E=e=>{switch(e){case"*":return`${b}${u}${x}`;case".*":return`${l}${u}${x}`;case"*.*":return`${b}${x}${l}${u}${x}`;case"*/*":return`${b}${x}${d}${u}${v}${x}`;case"**":return b+w(n);case"**/*":return`(?:${b}${w(n)}${d})?${v}${u}${x}`;case"**/*.*":return`(?:${b}${w(n)}${d})?${v}${x}${l}${u}${x}`;case"**/.*":return`(?:${b}${w(n)}${d})?${l}${u}${x}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=E(t[1]);if(!n)return;return n+l+t[2]}}},T=E(i.removePrefix(e,{negated:!1,prefix:""}));return T&&!0!==n.strictSlashes&&(T+=`${d}?`),T},t.exports=y},126386,(e,t,n)=>{"use strict";let r=e.r(702142),i=e.r(729178),o=e.r(868396),s=e.r(265847),a=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>a(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!r)throw TypeError("Expected pattern to be a non-empty string");let i=t||{},o=i.windows,s=r?a.compileRe(e,t):a.makeRe(e,t,!1,!0),l=s.state;delete s.state;let c=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};c=a(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:d,match:u,output:h}=a.test(n,s,t,{glob:e,posix:o}),p={glob:e,state:l,regex:s,posix:o,input:n,output:h,match:u,isMatch:d};return("function"==typeof i.onResult&&i.onResult(p),!1===d)?(p.isMatch=!1,!!r&&p):c(n)?("function"==typeof i.onIgnore&&i.onIgnore(p),p.isMatch=!1,!!r&&p):("function"==typeof i.onMatch&&i.onMatch(p),!r||p)};return n&&(d.state=l),d};a.test=(e,t,n,{glob:r,posix:i}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let s=n||{},l=s.format||(i?o.toPosixSlashes:null),c=e===r,d=c&&l?l(e):e;return!1===c&&(c=(d=l?l(e):e)===r),(!1===c||!0===s.capture)&&(c=!0===s.matchBase||!0===s.basename?a.matchBase(e,t,n,i):t.exec(d)),{isMatch:!!c,match:c,output:d}},a.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:a.makeRe(t,n)).test(o.basename(e,{windows:r})),a.isMatch=(e,t,n)=>a(t,n)(e),a.parse=(e,t)=>Array.isArray(e)?e.map(e=>a.parse(e,t)):i(e,{...t,fastpaths:!1}),a.scan=(e,t)=>r(e,t),a.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;let i=t||{},o=i.contains?"":"^",s=i.contains?"":"$",l=`${o}(?:${e.output})${s}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let c=a.toRegex(l,t);return!0===r&&(c.state=e),c},a.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(o.output=i.fastpaths(e,t)),o.output||(o=i(e,t)),a.compileRe(o,t,n,r)},a.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=s,t.exports=a},585781,(e,t,n)=>{"use strict";let r=e.r(126386),i=e.r(868396);function o(e,t,n=!1){return t&&(null===t.windows||void 0===t.windows)&&(t={...t,windows:i.isWindows()}),r(e,t,n)}Object.assign(o,r),t.exports=o},972605,738362,126314,564447,803781,181232,e=>{"use strict";let t,n,r,i,o,s,a,l,c,d,u;var h,p,f,m,g,y,b,v,k,x,w,E,T,S,C,A,_,N,O,M,I,D,R,z,L,P,j,$,F,B,H,U,V,q,G,W,K,J=e.i(918260);let Y=(0,J.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,Y],972605);let X=(0,J.default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",0,X],738362);let Q=(0,J.default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",0,Q],126314);var Z=e.i(959557),ee=e.i(347374);let et=["claude","claude-desktop","cursor","codex","copilot","opencode","openclaw","pi","antigravity","lm-studio","hermes"],en={claude:".claude/skills","claude-desktop":null,cursor:".cursor/skills",codex:".codex/skills",copilot:".github/skills",opencode:".opencode/skills",openclaw:null,pi:".pi/skills",antigravity:null,"lm-studio":null,hermes:null},er={claude:".claude/skills","claude-desktop":null,cursor:".cursor/skills",codex:".codex/skills",copilot:".copilot/skills",opencode:".opencode/skills",openclaw:null,pi:".pi/agent/skills",antigravity:".gemini/skills","lm-studio":".lmstudio/skills",hermes:null},ei=et.filter(e=>null!==en[e]),eo=et.filter(e=>null!==er[e]);et.flatMap(e=>{let t=en[e];return null===t?[]:[`${t}/open-knowledge/`]}),ei.filter(e=>"pi"!==e&&"copilot"!==e).map(e=>({hostDir:(en[e]??"").split("/")[0],editorId:e})),et.flatMap(e=>{let t=er[e];if(null===t)return[];let n=t.split("/")[0];return void 0===n?[]:[{hostDir:n,skillsRoot:t,editorId:e}]});let es="open-knowledge";var ea=e.i(207653);["delete","move","share_link","install","import"].map(e=>`mcp__${es}__${e}`),`mcp_servers.${es}.default_tools_approval_mode="approve"`.replace(/'/g,"'\\''");let el=["config-entry","managed-file","skill-bundle-copy","central-store-copy","session-injection"],ec=ea.z.enum(el);el.filter(e=>"session-injection"!==e);ea.z.union([ea.z.enum(["satisfied","present-consent-unknown","absent","foreign","foreign-replaceable","drifted","excluded","structural-na","undetected","unprobeable","unprobed"]),ea.z.string()]);let ed=["reclaim-permissive","pre-approval-exact","injection-functional"],eu=ea.z.enum(ed),eh=ea.z.enum(["none","approve-once","enable-manually","trust-gated"]),ep=["enable-manually"],ef=["written","overwritten","skipped-unsupported","skipped-prerequisite","declined","failed","removed","excluded","unchanged","handed-off","skipped-foreign","skipped-missing","no-op"];ea.z.enum(ef),ea.z.enum(["info","warning","error"]);let em=ea.z.enum(["required","recommended"]),eg=[...et,"gemini"],ey=ea.z.enum(eg),eb=ea.z.enum(["acp","terminal","external"]),ev=ea.z.enum(["claude","codex","opencode","cursor","copilot","pi","antigravity","openclaw","hermes","gemini"]),ek=ea.z.enum(["claude-cowork","claude-code","codex","cursor","copilot","opencode","pi","antigravity","openclaw","hermes"]),ex=ea.z.enum(["mcp","skill"]),ew=["project","user","session"],eE=ea.z.enum(ew),eT=ea.z.string().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),eS=ea.z.string().min(1).transform(e=>e),eC=ea.z.string().min(1).transform(e=>e);function eA(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function e_(e,t){return`${e}:${t}`}function eN(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:o,troubleshooting:s,...a}=e;return{...a,troubleshooting:void 0===s?[]:Array.isArray(s)?[...s]:[s],id:eA({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??"none",installability:i??"installable",preferred:o??!1}}function eO(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...o}=e,s={};for(let[e,t]of Object.entries(i))s[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...o,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:s}}let eM=(e,t,n,r)=>eA({agent:e,piece:t,scope:n,kind:r}),eI=e=>({piece:"mcp",level:"required",satisfiedByAny:e}),eD=e=>({piece:"skill",level:"recommended",satisfiedByAny:e}),eR=(...e)=>({mode:"probeable",strictness:e}),ez=(e,t)=>({id:e,...void 0===t?{}:{params:t}}),eL=(e,t)=>({kind:"source-read",ref:e,...void 0===t?{}:{note:t}}),eP=(e,t)=>void 0===t?{confidence:"verified",evidence:e}:{confidence:"verified",evidence:e,verifiedAgainst:t};function ej(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function e$(e){let{appBrandName:t,tagline:n,...r}=e;return{...r,...void 0===t?{}:{appBrandName:t},...void 0===n?{}:{tagline:n}}}let eF=(e,t)=>({kind:"observation",ref:e,note:t}),eB={observedAt:"2026-07-02"},eH="packages/cli/src/commands/editors.ts",eU="packages/core/src/constants/editors.ts",eV="packages/server/src/acp/thread-manager.ts",eq="packages/cli/src/integrations/write-project-skill.ts",eG="packages/cli/src/commands/repair-skills.ts",eW="packages/server/src/skill-install.ts";function eK(e){return eN({agent:e.agent,piece:"mcp",scope:"user",kind:"config-entry",pathId:e_("editor-user-config",e.agent),probe:eR(...e.strictness),attestation:e.attestation,audience:"this-user",installability:e.installability,notInstallableReason:e.n
7otInstallableReason,guidance:ez("guidance.mcp.user-config",{agent:e.agent}),troubleshooting:e.troubleshooting})}function eJ(e){var t,n;let r;return eN({agent:e.agent,piece:"mcp",scope:"project",kind:"config-entry",pathId:e_("editor-project-config",e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:eR(...e.strictness),attestation:e.attestation,audience:"this-project",guidance:ez("guidance.mcp.project-config",{agent:e.agent}),followup:(t=e.consentClass,n=e.agent,void 0===(r=ep.find(e=>e===t))?void 0:ez(`followup.${r}`,{agent:n})),troubleshooting:e.troubleshooting})}function eY(e){return eN({agent:e.agent,piece:"skill",scope:"project",kind:"skill-bundle-copy",pathId:e_("editor-project-skill-root",e.agent),prerequisites:e.prerequisites,probe:eR("reclaim-permissive"),attestation:e.attestation,audience:"this-project",guidance:ez("guidance.skill.project",{agent:e.agent}),troubleshooting:e.troubleshooting})}function eX(e){return eN({agent:e.agent,piece:"skill",scope:"user",kind:"skill-bundle-copy",pathId:e_("editor-user-skill-root",e.agent),probe:eR("reclaim-permissive"),attestation:e.attestation,audience:"this-user",guidance:ez("guidance.skill.user",{agent:e.agent})})}function eQ(e){return eN({agent:e,piece:"mcp",scope:"session",kind:"session-injection",probe:{mode:"unprobeable",reason:"session-scoped"},attestation:eP([eL(eV,"the session MCP config the thread manager builds per thread")]),audience:"this-project",installability:"not-installable",notInstallableReason:"session-scoped",guidance:ez("guidance.mcp.session-injection",{agent:e})})}let eZ={claude:eO({id:"claude",setupDocSlug:"claude-code",offersConnectionRow:!0,detectionSources:["cli-on-path:claude","scheme-handler:claude-code"],satisfiers:[eK({agent:"claude",strictness:["reclaim-permissive","pre-approval-exact","injection-functional"],attestation:eP([eL(eH,"user-global MCP config target")])}),eJ({agent:"claude",sharedWith:["copilot"],consentClass:"approve-once",strictness:["reclaim-permissive","pre-approval-exact","injection-functional"],attestation:eP([eL(eH),eL(eU)]),troubleshooting:ez("troubleshooting.claude.project-entry-not-approved",{agent:"claude"})}),eY({agent:"claude",prerequisites:[eM("claude","mcp","project","config-entry")],attestation:eP([eL(eU),eL(eG)])}),eX({agent:"claude",attestation:eP([eL(eU),eL(eW)])}),eQ("claude")],modes:{external:{requirements:[eI([eM("claude","mcp","user","config-entry"),eM("claude","mcp","project","config-entry")]),eD([eM("claude","skill","project","skill-bundle-copy"),eM("claude","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("claude","mcp","user","config-entry"),eM("claude","mcp","project","config-entry")]),eD([eM("claude","skill","project","skill-bundle-copy"),eM("claude","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("claude","mcp","session","session-injection"),eM("claude","mcp","user","config-entry"),eM("claude","mcp","project","config-entry")]),eD([eM("claude","skill","project","skill-bundle-copy"),eM("claude","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"claude-acp",featuredOrder:0,harnessCli:"claude",readsEditorConfig:"claude",readsEditorConfigAttestation:eP([eL(eV,"the injection-skip probe reads the managed entry for this editor"),eF("claude-acp adapter","The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.")],eB),verifiedPosture:"asks"}),external:e$({targetId:"claude-code",knownOrder:1,visible:!0,displayName:"Claude",appBrandName:"Claude Desktop",schemes:["claude:"],installUrl:"https://claude.com/download",tagline:"Agentic coding in Claude Desktop's Code tab."})}),"claude-desktop":eO({id:"claude-desktop",setupDocSlug:"claude-code",offersConnectionRow:!1,detectionSources:["scheme-handler:claude-code"],satisfiers:[eK({agent:"claude-desktop",strictness:["reclaim-permissive"],attestation:eP([eL(eH,"user-global config target; its path resolution throws on Linux")]),troubleshooting:ez("troubleshooting.claude-desktop.per-tool-approval",{agent:"claude-desktop"})})],modes:{external:{requirements:[eI([eM("claude-desktop","mcp","user","config-entry")]),eD([])]}},external:e$({targetId:"claude-cowork",knownOrder:0,visible:!1,displayName:"Claude Cowork",appBrandName:"Claude Desktop",schemes:["claude:"],installUrl:"https://claude.com/download",tagline:"Conversational pairing in Claude Desktop's Cowork tab."})}),cursor:eO({id:"cursor",setupDocSlug:"cursor",offersConnectionRow:!0,detectionSources:["cli-on-path:cursor","scheme-handler:cursor"],satisfiers:[eK({agent:"cursor",strictness:["reclaim-permissive"],attestation:eP([eL(eH)])}),eJ({agent:"cursor",consentClass:"enable-manually",strictness:["reclaim-permissive"],attestation:eP([eL(eH),eL(eU),{kind:"observation",ref:"cursor-3.19.19-project-server-default-off",note:"project .cursor/mcp.json server listed Disabled under Customize â MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it"}],{version:"3.19.19",observedAt:"2026-09-09"}),troubleshooting:ez("troubleshooting.cursor.project-entry-not-loaded",{agent:"cursor"})}),eY({agent:"cursor",prerequisites:[eM("cursor","mcp","project","config-entry")],attestation:eP([eL(eU),eL(eG)])}),eX({agent:"cursor",attestation:eP([eL(eU),eL(eW)])}),eQ("cursor")],modes:{external:{requirements:[eI([eM("cursor","mcp","user","config-entry"),eM("cursor","mcp","project","config-entry")]),eD([eM("cursor","skill","project","skill-bundle-copy"),eM("cursor","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("cursor","mcp","user","config-entry"),eM("cursor","mcp","project","config-entry")]),eD([eM("cursor","skill","project","skill-bundle-copy"),eM("cursor","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("cursor","mcp","session","session-injection")]),eD([eM("cursor","skill","project","skill-bundle-copy"),eM("cursor","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"cursor",featuredOrder:3,harnessCli:"cursor",readsEditorConfig:null,readsEditorConfigAttestation:eP([eF("cursor-agent mcp list",'Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.'),eL(eV,"the one agent the skip probe never stands down for")],{observedAt:"2026-08-20"}),verifiedPosture:"self-managed"}),external:e$({targetId:"cursor",knownOrder:3,visible:!0,displayName:"Cursor",sc
7hemes:["cursor:"],installUrl:"https://cursor.com/",tagline:"AI-first VS Code fork with multi-file edits."})}),codex:eO({id:"codex",setupDocSlug:"codex",offersConnectionRow:!0,detectionSources:["cli-on-path:codex","scheme-handler:codex"],satisfiers:[eK({agent:"codex",strictness:["reclaim-permissive","injection-functional"],attestation:eP([eL(eH,"TOML user-global config target")])}),eJ({agent:"codex",consentClass:"trust-gated",strictness:["reclaim-permissive","injection-functional"],attestation:{confidence:"contested",evidence:[eL(eH,"project config path added by analogy with the other editors"),{kind:"upstream-issue",ref:"openai/codex#13025",note:"open, reproduced on builds newer than the one OK checked"},{kind:"upstream-issue",ref:"openai/codex#36960",note:"requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks"},{kind:"vendor-doc",ref:"OpenAI Codex: Advanced configuration",note:"project-scoped config loads only for a trusted project"},{kind:"observation",ref:"codex-desktop-project-config-load",note:"single non-repro on 26.623.81905; the CLI honors it only for a trusted project"}],verifiedAgainst:{version:"26.707.72221",observedAt:"2026-07-15"}},troubleshooting:[ez("troubleshooting.codex.desktop-project-config",{agent:"codex",honoredByDesktop:!1}),ez("troubleshooting.codex.folder-trust",{agent:"codex"})]}),eY({agent:"codex",prerequisites:[eM("codex","mcp","project","config-entry")],attestation:eP([eL(eU),eL(eG)]),troubleshooting:ez("troubleshooting.codex.folder-trust",{agent:"codex"})}),eX({agent:"codex",attestation:eP([eL(eU),eL(eW)])}),eQ("codex")],modes:{external:{requirements:[eI([eM("codex","mcp","user","config-entry"),eM("codex","mcp","project","config-entry")]),eD([eM("codex","skill","project","skill-bundle-copy"),eM("codex","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("codex","mcp","user","config-entry"),eM("codex","mcp","project","config-entry")]),eD([eM("codex","skill","project","skill-bundle-copy"),eM("codex","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("codex","mcp","session","session-injection"),eM("codex","mcp","user","config-entry"),eM("codex","mcp","project","config-entry")]),eD([eM("codex","skill","project","skill-bundle-copy"),eM("codex","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"codex-acp",featuredOrder:1,harnessCli:"codex",readsEditorConfig:"codex",readsEditorConfigAttestation:eP([eL(eH,"the managed MCP entry OK writes into the Codex TOML config"),eF("codex-acp adapter","The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.")],eB),verifiedPosture:"self-managed"}),external:e$({targetId:"codex",knownOrder:2,visible:!0,displayName:"ChatGPT",appBrandName:"ChatGPT Desktop",schemes:["codex:"],installUrl:"https://developers.openai.com/codex/app",tagline:"OpenAI's ChatGPT desktop app, home of the Codex agent."})}),copilot:eO({id:"copilot",setupDocSlug:"github-copilot-cli",offersConnectionRow:!0,detectionSources:["cli-on-path:copilot"],satisfiers:[eK({agent:"copilot",strictness:["reclaim-permissive"],attestation:eP([eL(eH)])}),eJ({agent:"copilot",fileOwner:"claude",sharedWith:["claude"],consentClass:"trust-gated",strictness:["reclaim-permissive"],attestation:eP([{kind:"vendor-doc",ref:"GitHub Copilot CLI â MCP configuration",note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:"vendor-doc",ref:"GitHub Docs: Adding MCP servers for Copilot CLI",note:"project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true"},eL(eU,"OK deliberately writes no second copy for copilot")],{version:"copilot CLI 1.0.80",observedAt:"2026-08-20"}),troubleshooting:ez("troubleshooting.copilot.shared-workspace-config",{agent:"copilot",sourceAgent:"claude"})}),eY({agent:"copilot",prerequisites:[eM("copilot","mcp","project","config-entry"),eM("c
7opilot","mcp","user","config-entry")],attestation:eP([eL(eU),eL(eq)])}),eX({agent:"copilot",attestation:eP([eL(eU),eL(eW)])}),eQ("copilot")],modes:{external:{requirements:[eI([eM("copilot","mcp","user","config-entry"),eM("copilot","mcp","project","config-entry")]),eD([eM("copilot","skill","project","skill-bundle-copy"),eM("copilot","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("copilot","mcp","user","config-entry"),eM("copilot","mcp","project","config-entry")]),eD([eM("copilot","skill","project","skill-bundle-copy"),eM("copilot","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("copilot","mcp","session","session-injection")]),eD([eM("copilot","skill","project","skill-bundle-copy"),eM("copilot","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"github-copilot-cli",featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:"assumed",evidence:[eF("copilot CLI 1.0.80","The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:"1.0.80",observedAt:"2026-08-20"}},verifiedPosture:null}),external:e$({targetId:"copilot",knownOrder:4,visible:!1,displayName:"GitHub Copilot",schemes:[],installUrl:"https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started",tagline:"GitHub's terminal-native coding agent."})}),opencode:eO({id:"opencode",setupDocSlug:"opencode",offersConnectionRow:!0,detectionSources:["cli-on-path:opencode"],satisfiers:[eK({agent:"opencode",strictness:["reclaim-permissive","injection-functional"],attestation:eP([eL(eH,"XDG config dir; the win32 location is by analogy and unverified")])}),eJ({agent:"opencode",consentClass:"none",strictness:["reclaim-permissive","injection-functional"],attestation:eP([eL(eH,"the one project config that is not under a dotdir")])}),eY({agent:"opencode",prerequisites:[eM("opencode","mcp","project","config-entry")],attestation:eP([eL(eU),eL(eG)])}),eX({agent:"opencode",attestation:eP([eL(eU),eL(eW)])}),eQ("opencode")],modes:{external:{requirements:[eI([eM("opencode","mcp","user","config-entry"),eM("opencode","mcp","project","config-entry")]),eD([eM("opencode","skill","project","skill-bundle-copy"),eM("opencode","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("opencode","mcp","user","config-entry"),eM("opencode","mcp","project","config-entry")]),eD([eM("opencode","skill","project","skill-bundle-copy"),eM("opencode","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("opencode","mcp","session","session-injection"),eM("opencode","mcp","user","config-entry"),eM("opencode","mcp","project","config-entry")]),eD([eM("opencode","skill","project","skill-bundle-copy"),eM("opencode","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"opencode",featuredOrder:5,harnessCli:"opencode",readsEditorConfig:"opencode",readsEditorConfigAttestation:eP([eL(eH,"the managed MCP entry OK writes into the opencode config"),eF("opencode-acp adapter","The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.")],eB),verifiedPosture:null}),external:e$({targetId:"opencode",knownOrder:5,visible:!1,displayName:"OpenCode",schemes:[],installUrl:"https://opencode.ai",tagline:"Open-source terminal coding agent; bring any local model."})}),openclaw:eO({id:"openclaw",setupDocSlug:"openclaw",offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:["cli-on-path:openclaw"],satisfiers:[eK({agent:"openclaw",strictness:["reclaim-permissive"],attestation:eP([eL(eH,"the one two-level server map, nested under `mcp.servers`")])}),eN({agent:"openclaw",piece:"skill",scope:"user",kind:"central-store-copy",pathId:"central-skill-store",probe:eR("reclaim-permissive"),attestation:eP([eL(eU),eL(eW,"the hub is written only when it already exists")]),audience:"this-user",guidance:ez("guidance.skill.central-store",{agent:"openclaw"}),troubleshooting:ez("troubleshooting.openclaw.central-store-missing",{agent:"openclaw"})})],modes:{external:{requirements:[eI([eM("openclaw","mcp","user","config-entry")]),eD([eM("openclaw","skill","user","central-store-copy")])]},terminal:{requirements:[eI([eM("openclaw","mcp","user","config-entry")]),eD([eM("openclaw","skill","user","central-store-copy")])]}},external:e$({targetId:"openclaw",knownOrder:8,visible:!1,displayName:"OpenClaw",schemes:[],installUrl:"https://openclaw.ai",tagline:"Open-source agent gateway; runs agents against your MCP servers."})}),pi:eO({id:"pi",setupDocSlug:"pi",offersConnectionRow:!0,detectionSources:["cli-on-path:pi"],satisfiers:[eN({agent:"pi",piece:"mcp",scope:"project",kind:"managed-file",pathId:e_("editor-project-config","pi"),probe:eR("reclaim-permissive","injection-functional"),attestation:eP([eL(eH,"OK owns the whole file; currency is a first-line sentinel"),eL("packages/server/src/acp/registry.ts","the thread provisions this file instead of injecting")]),audience:"this-project",guidance:ez("guidance.mcp.managed-file",{agent:"pi"}),troubleshooting:ez("troubleshooting.pi.folder-trust",{agent:"pi"})}),eY({agent:"pi",prerequisites:[eM("pi","mcp","project","managed-file")],attestation:eP([eL(eU),eL(eq)]),troubleshooting:ez("troubleshooting.pi.folder-trust",{agent:"pi"})}),eX({agent:"pi",attestation:eP([eL(eU,"the agent home nests one level below the dotdir"),eL(eW)])})],modes:{external:{requirements:[eI([eM("pi","mcp","project","managed-file")]),eD([eM("pi","skill","project","skill-bundle-copy"),eM("pi","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("pi","mcp","project","managed-file")]),eD([eM("pi","skill","project","skill-bundle-copy"),eM("pi","skill","user","skill-bundle-copy")])]},acp:{requirements:[eI([eM("pi","mcp","project","managed-file")]),eD([eM("pi","skill","project","skill-bundle-copy"),eM("pi","skill","user","skill-bundle-copy")])]}},acp:ej({acpAgentId:"pi-acp",featuredOrder:null,harnessCli:"pi",readsEditorConfig:"pi",readsEditorConfigAttestation:eP([eF("[email protected]","Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting â the same mapping, a different shape."),eL(eV,"the bridge route that provisions the extension instead of injecting")],{version:"0.0.33",observedAt:"2026-08-20"}),verifiedPosture:"autonomous"}),external:e$({targetId:"pi",knownOrder:6,visible:!1,displayName:"Pi",schemes:[],installUrl:"https://pi.dev",tagline:"Minimal open-source terminal co
7ding agent, extensible in TypeScript."})}),antigravity:eO({id:"antigravity",setupDocSlug:"antigravity",offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:["cli-on-path:antigravity"],satisfiers:[eK({agent:"antigravity",strictness:["reclaim-permissive"],attestation:eP([eL(eH,"one user-global file shared by the IDE, the app and the CLI; per project you can only filter it")])}),eX({agent:"antigravity",attestation:eP([eL(eU),eL(eW)])})],modes:{external:{requirements:[eI([eM("antigravity","mcp","user","config-entry")]),eD([eM("antigravity","skill","user","skill-bundle-copy")])]},terminal:{requirements:[eI([eM("antigravity","mcp","user","config-entry")]),eD([eM("antigravity","skill","user","skill-bundle-copy")])]}},external:e$({targetId:"antigravity",knownOrder:7,visible:!1,displayName:"Antigravity",schemes:[],installUrl:"https://antigravity.google",tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":eO({id:"lm-studio",setupDocSlug:"lm-studio",offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[eK({agent:"lm-studio",strictness:["reclaim-permissive"],installability:"not-installable",notInstallableReason:"no-non-interactive-verb",attestation:eP([eL(eH,"two candidate locations, resolved against what already exists"),{kind:"upstream-issue",ref:"lmstudio-ai/lmstudio-bug-tracker#1371",note:"documented config path differs from the one the app reads on macOS"},eL("packages/desktop/src/main/integrations-settings.ts","deliberately absent from the presence probes")]),troubleshooting:ez("troubleshooting.lm-studio.config-path-mismatch",{agent:"lm-studio"})})],modes:{external:{requirements:[eI([eM("lm-studio","mcp","user","config-entry")]),eD([])]}}}),hermes:eO({id:"hermes",setupDocSlug:"hermes",offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:["cli-on-path:hermes"],satisfiers:[eK({agent:"hermes",strictness:["reclaim-permissive"],attestation:eP([eL(eH,"the one YAML target; the whole config is a single user-global file")])})],modes:{external:{requirements:[eI([eM("hermes","mcp","user","config-entry")]),eD([])]},terminal:{requirements:[eI([eM("hermes","mcp","user","config-entry")]),eD([])]}},external:e$({targetId:"hermes",knownOrder:9,visible:!1,displayName:"Hermes",schemes:[],installUrl:"https://hermes-agent.nousresearch.com",tagline:"Nous Research's terminal coding agent."})}),gemini:eO({id:"gemini",setupDocSlug:null,detectionSources:["harness-bin:gemini"],satisfiers:[eQ("gemini")],modes:{acp:{requirements:[eI([eM("gemini","mcp","session","session-injection")]),eD([])]}},acp:ej({acpAgentId:"gemini",featuredOrder:2,harnessCli:"gemini",readsEditorConfig:null,readsEditorConfigAttestation:eP([eL(eU,"gemini reaches OK as an ACP agent only; it has no editor config target")],eB),verifiedPosture:null})})},e0=Object.values(eZ).flatMap(e=>e.satisfiers);e0.map(e=>[e.id,e]);let e1=Object.values(eZ).flatMap(e=>void 0===e.acp?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));e1.filter(({acp:e})=>null!==e.featuredOrder).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId),Object.fromEntries(e1.flatMap(({acp:e})=>null===e.harnessCli?[]:[[e.acpAgentId,e.harnessCli]])),Object.fromEntries(e1.flatMap(({acp:e})=>null===e.harnessReadsEditorConfig?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]])),Object.fromEntries(e1.flatMap(({acp:e})=>null===e.verifiedPosture?[]:[[e.acpAgentId,e.verifiedPosture]]));let e2=Object.values(eZ).flatMap(e=>void 0===e.external?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),e5=e2.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,tagline:o})=>({id:e,displayName:t,...void 0===n?{}:{appBrandName:n},schemes:r,installUrl:i,...void 0===o?{}:{tagline:o}})),e3=new Set(e2.filter(e=>e.visible).map(e=>e.targetId));e5.filter(e=>e3.has(e.id)),et.filter(e=>eZ[e].offersConnectionRow),Object.values(eZ).flatMap(e=>void 0===e.external?[]:[[e.external.targetId,e.id]]),Object.values(eZ).flatMap(e=>void 0===e.modes.terminal?[]:[[e.id,e.id]]),Object.fromEntries(Object.values(eZ).flatMap(e=>{let t=e.satisfiers.find(e=>"mcp"===e.piece&&"project"===e.scope&&"none"!==e.consentClass)?.consentClass;return void 0===t?[]:[[e.id,t]]}));let e4=Symbol.for("yaml.alias"),e6=Symbol.for("yaml.document"),e8=Symbol.for("yaml.map"),e9=Symbol.for("yaml.pair"),e7=Symbol.for("yaml.scalar"),te=Symbol.for("yaml.seq"),tt=Symbol.for("yaml.node.type"),tn=e=>!!e&&"object"==typeof e&&e[tt]===e4,tr=e=>!!e&&"object"==typeof e&&e[tt]===e6,ti=e=>
7!!e&&"object"==typeof e&&e[tt]===e8,to=e=>!!e&&"object"==typeof e&&e[tt]===e9,ts=e=>!!e&&"object"==typeof e&&e[tt]===e7,ta=e=>!!e&&"object"==typeof e&&e[tt]===te;function tl(e){if(e&&"object"==typeof e)switch(e[tt]){case e8:case te:return!0}return!1}function tc(e){if(e&&"object"==typeof e)switch(e[tt]){case e4:case e8:case e7:case te:return!0}return!1}let td=e=>(ts(e)||tl(e))&&!!e.anchor,tu=Symbol("break visit"),th=Symbol("skip children"),tp=Symbol("remove node");function tf(e,t){let n=tb(t);tr(e)?tm(null,e.contents,n,Object.freeze([e]))===tp&&(e.contents=null):tm(null,e,n,Object.freeze([]))}function tm(e,t,n,r){let i=tv(e,t,n,r);if(tc(i)||to(i))return tk(e,r,i),tm(e,i,n,r);if("symbol"!=typeof i){if(tl(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=tm(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===tu)return tu;i===tp&&(t.items.splice(e,1),e-=1)}}}else if(to(t)){r=Object.freeze(r.concat(t));let e=tm("key",t.key,n,r);if(e===tu)return tu;e===tp&&(t.key=null);let i=tm("value",t.value,n,r);if(i===tu)return tu;i===tp&&(t.value=null)}}return i}async function tg(e,t){let n=tb(t);tr(e)?await ty(null,e.contents,n,Object.freeze([e]))===tp&&(e.contents=null):await ty(null,e,n,Object.freeze([]))}async function ty(e,t,n,r){let i=await tv(e,t,n,r);if(tc(i)||to(i))return tk(e,r,i),ty(e,i,n,r);if("symbol"!=typeof i){if(tl(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await ty(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===tu)return tu;i===tp&&(t.items.splice(e,1),e-=1)}}}else if(to(t)){r=Object.freeze(r.concat(t));let e=await ty("key",t.key,n,r);if(e===tu)return tu;e===tp&&(t.key=null);let i=await ty("value",t.value,n,r);if(i===tu)return tu;i===tp&&(t.value=null)}}return i}function tb(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function tv(e,t,n,r){return"function"==typeof n?n(e,t,r):ti(t)?n.Map?.(e,t,r):ta(t)?n.Seq?.(e,t,r):to(t)?n.Pair?.(e,t,r):ts(t)?n.Scalar?.(e,t,r):tn(t)?n.Alias?.(e,t,r):void 0}function tk(e,t,n){let r=t[t.length-1];if(tl(r))r.items[e]=n;else if(to(r))"key"===e?r.key=n:r.value=n;else if(tr(r))r.contents=n;else{let e=tn(r)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}tf.BREAK=tu,tf.SKIP=th,tf.REMOVE=tp,tg.BREAK=tu,tg.SKIP=th,tg.REMOVE=tp;let tx={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},tw=e=>e.replace(/[!,[\]{}]/g,e=>tx[e]);class tE{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},tE.defaultYaml,e),this.tags=Object.assign({},tE.defaultTags,t)}clone(){let e=new tE(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new tE(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:tE.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},tE.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:tE.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},tE.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let n=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,n),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+tw(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);if(e&&r.length>0&&tc(e.contents)){let n={};tf(e.contents,(e,t)=>{tc(t)&&t.tag&&(n[t.tag]=!0)}),t=Object.keys(n)}else t=[];for(let[i,o]of r)("!!"!==i||"tag:yaml.org,2002:"!==o)&&(!e||t.some(e=>e.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join("\n")}}function tT(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function tS(e){let t=new Set;return tf(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function tC(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function tA(e,t,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=tA(e,r,String(t),n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=tA(e,r,t,n);void 0===i?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=tA(e,r,t,t);void 0===n?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=tA(e,r,t,n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function t_(e,t,n){if(Array.isArray(e))return e.map((e,t)=>t_(e,String(t),n));if(e&&"function"==typeof e.toJSON){if(!n||!td(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return"bigint"!=typeof e||n?.keep?e:Number(e)}tE.defaultYaml={explicit:!1,version:"1.2"},tE.defaultTags={"!!":"tag:yaml.org,2002:"};class tN{constructor(e){Object.defineProperty(this,tt,{value:e})}
7clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!tr(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},s=t_(this,"",o);if("function"==typeof r)for(let{count:e,res:t}of o.anchors.values())r(t,e);return"function"==typeof i?tA(i,{"":s},"",s):s}}class tO extends tN{constructor(e){super(e4),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let n,r;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let i of(t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],tf(e,{Node:(e,t)=>{(tn(t)||td(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n)),n)){if(i===this)break;i.anchor===this.source&&(r=i)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,o=this.resolve(r,t);if(!o)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);let s=n.get(o);if(s||(t_(o,null,t),s=n.get(o)),s?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(s.count+=1,0===s.aliasCount&&(s.aliasCount=function e(t,n,r){if(tn(n)){let e=n.resolve(t),i=r&&e&&r.get(e);return i?i.count*i.aliasCount:0}if(tl(n)){let i=0;for(let o of n.items){let n=e(t,o,r);n>i&&(i=n)}return i}return to(n)?Math.max(e(t,n.key,r),e(t,n.value,r)):1}(r,o,n)),s.count*s.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exh
7austion attack");return s.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(tT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${r} `}return r}}let tM=e=>!e||"function"!=typeof e&&"object"!=typeof e;class tI extends tN{constructor(e){super(e7),this.value=e}toJSON(e,t){return t?.keep?this.value:t_(this.value,e,t)}toString(){return String(this.value)}}function tD(e,t,n){let r;if(tr(e)&&(e=e.contents),tc(e))return e;if(to(e)){let t=n.schema[e8].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:o,onTagObj:s,schema:a,sourceObjects:l}=n;if(i&&e&&"object"==typeof e){if(r=l.get(e))return r.anchor??(r.anchor=o(e)),new tO(r.anchor);r={anchor:null,node:null},l.set(e,r)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let c=function(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(e,t,a.tags);if(!c){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new tI(e);return r&&(r.node=t),t}c=e instanceof Map?a[e8]:Symbol.iterator in Object(e)?a[te]:a[e8]}s&&(s(c),delete n.onTagObj);let d=c?.createNode?c.createNode(n.schema,e,n):"function"==typeof c?.nodeClass?.from?c.nodeClass.from(n.schema,e,n):new tI(e);return t?d.tag=t:c.default||(d.tag=c.tag),r&&(r.node=d),d}function tR(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return tD(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}tI.BLOCK_FOLDED="BLOCK_FOLDED",tI.BLOCK_LITERAL="BLOCK_LITERAL",tI.PLAIN="PLAIN",tI.QUOTE_DOUBLE="QUOTE_DOUBLE",tI.QUOTE_SINGLE="QUOTE_SINGLE";let tz=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class tL extends tN{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>tc(t)||to(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(tz(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(tl(i))i.addIn(r,t);else if(void 0===i&&this.schema)this.set(n,tR(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let r=this.get(t,!0);if(tl(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return 0===r.length?!t&&ts(i)?i.value:i:tl(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!to(t))return!1;let n=t.value;return null==n||e&&ts(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let r=this.get(t,!0);return!!tl(r)&&r.hasIn(n)}setIn(e,t){let[n,...r]=e;if(0===r.length)this.set(n,t);else{let e=this.get(n,!0);if(tl(e))e.setIn(r,t);else if(void 0===e&&this.schema)this.set(n,tR(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}let tP=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function tj(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let t$=(e,t,n)=>e.endsWith("\n")?tj(n,t):n.includes("\n")?"\n"+tj(n,t):(e.endsWith(" ")?"":" ")+n,tF="flow",tB="block",tH="quoted";function tU(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){let l,c,d;if(!i||i<0)return e;i<o&&(o=0);let u=Math.max(1+o,1+i-t.length);if(e.length<=u)return e;let h=[],p={},f=i-t.length;"number"==typeof r&&(r>i-Math.max(2,o)?h.push(0):f=i-r);let m=!1,g=-1,y=-1,b=-1;for(n===tB&&-1!==(g=tV(e,g,t.length))&&(f=g+u);d=e[g+=1];){if(n===tH&&"\\"===d){switch(y=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}b=g}if("\n"===d)n===tB&&(g=tV(e,g,t.length)),f=g+t.length+u,l=void 0;else{if(" "===d&&c&&" "!==c&&"\n"!==c&&" "!==c){let t=e[g+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(l=g)}if(g>=f)if(l)h.push(l),f=l+u,l=void 0;else if(n===tH){for(;" "===c||" "===c;)c=d,d=e[g+=1],m=!0;let t=g>b+1?g-2:y-1;if(p[t])return e;h.push(t),p[t]=!0,f=t+u,l=void 0}else m=!0}c=d}if(m&&a&&a(),0===h.length)return e;s&&s();let v=e.slice(0,h[0]);for(let r=0;r<h.length;++r){let i=h[r],o=h[r+1]||e.length;0===i?v=` 8${t}${e.slice(0,o)}`:(n===tH&&p[i]&&(v+=`${e[i]}\\`),v+=` 9${t}${e.slice(i+1,o)}`)}return v}
9function tV(e,t,n){let r=t,i=t+1,o=e[i];for(;" "===o||" "===o;)if(t<i+n)o=e[++t];else{do o=e[++t];while(o&&"\n"!==o)r=t,o=e[i=t+1]}return r}let tq=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function tG(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),s="",a=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(s+=n.slice(a,e)+"\\ ",e+=1,a=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{s+=n.slice(a,e);let t=n.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=n.substr(e,6)}e+=5,a=e+1}break;case"n":if(r||'"'===n[e+2]||n.length<i)e+=1;else{for(s+=n.slice(a,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)s+="\n",e+=2;s+=o," "===n[e+2]&&(s+="\\"),e+=1,a=e+1}break;default:e+=1}return s=a?s+n.slice(a):n,r?s:tU(s,o,tH,tq(t,!1))}function tW(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return tG(e,t);let n=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$& 10${n}`)+"'";return t.implicitKey?r:tU(r,n,tF,tq(t,!1))}function tK(e,t){let n,{singleQuote:r}=t.options;if(!1===r)n=tG;else{let t=e.includes('"'),i=e.includes("'");n=t&&!i?tW:i&&!t?tG:r?tW:tG}return n(e,t)}try{t=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{t=/\n+(?!\n|$)/g}function tJ({comment:e,type:n,value:r},i,o,s){let a,l,c,d,{blockQuote:u,commentString:h,lineWidth:p}=i.options;if(!u||/\n[\t ]+$/.test(r))return tK(r,i);let f=i.indent||(i.forceBlockIndent||(d=r,/^(%|---|\.\.\.)/m.test(d))?" ":""),m="literal"===u||"folded"!==u&&n!==tI.BLOCK_FOLDED&&(n===tI.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>r)return!0;if(i-(n=t+1)<=r)return!1}return!0}(r,p,f.length));if(!r)return m?"|\n":">\n";for(l=r.length;l>0;--l){let e=r[l-1];if("\n"!==e&&" "!==e&&" "!==e)break}let g=r.substring(l),y=g.indexOf("\n");-1===y?a="-":r===g||y!==g.length-1?(a="+",s&&s()):a="",g&&(r=r.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(t,`$&${f}`));let b=!1,v=-1;for(c=0;c<r.length;++c){let e=r[c];if(" "===e)b=!0;else if("\n"===e)v=c;else break}let k=r.substring(0,v<c?v+1:c);k&&(r=r.substring(k.length),k=k.replace(/\n+/g,`$&${f}`));let x=f?"2":"1",w=(b?x:"")+a;if(e&&(w+=" "+h(e.replace(/ ?[\r\n]+/g," ")),o&&o()),!m){let e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`),t=!1,o=tq(i,!0);"folded"!==u&&n!==tI.BLOCK_FOLDED&&(o.onOverflow=()=>{t=!0});let s=tU(`${k}${e}${g}`,f,tB,o);if(!t)return`>${w} 11${f}${s}`}return r=r.replace(/\n+/g,`$&${f}`),`|${w} 12${f}${k}${r}${g}`}function tY(e,t,n,r){let{implicitKey:i,inFlow:o}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==tI.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=tI.QUOTE_DOUBLE);let l=e=>{switch(e){case tI.BLOCK_FOLDED:case tI.BLOCK_LITERAL:return i||o?tK(s.value,t):tJ(s,t,n,r);case tI.QUOTE_DOUBLE:return tG(s.value,t);case tI.QUOTE_SINGLE:return tW(s.value,t);case tI.PLAIN:return function(e,t,n,r){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:d}=t;if(a&&o.includes("\n")||d&&/[[\]{},]/.test(o))return tK(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||d||!o.includes("\n")?tK(o,t):tJ(e,t,n,r);if(!a&&!d&&i!==tI.PLAIN&&o.includes("\n"))return tJ(e,t,n,r);if(/^(%|---|\.\.\.)/m.test(o)){if(""===l)return t.forceBlockIndent=!0,tJ(e,t,n,r);else if(a&&l===c)return tK(o,t)}let u=o.replace(/\n+/g,`$& 13${l}`);if(s){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(u),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return tK(o,t)}return a?u:tU(u,l,tF,tq(t,!1))}(s,t,n,r);default:return null}},c=l(a);if(null===c){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(null===(c=l(r)))throw Error(`Unsupported default string type ${r}`)}return c}function tX(e,t){let n,r=Object.assign({blockQuote:!0,commentString:tP,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function tQ(e,t,n,r){let i;if(to(e))return e.toString(t,n,r);if(tn(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o=tc(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){let n,r;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}if(ts(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return r}(t.doc.schema.tags,o));let s=function(e,t,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],o=(ts(e)||tl(e))&&e.anchor;o&&tT(o)&&(n.add(o),i.push(`&${o}`));let s=e.tag??(t.default?null:t.tag);return s&&i.push(r.directives.tagString(s)),i.join(" ")}(o,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let a="function"==typeof i.stringify?i.stringify(o,t,n,r):ts(o)?tY(o,t,n,r):o.toString(t,n,r);
13return s?ts(o)||"{"===a[0]||"["===a[0]?`${s} ${a}`:`${s} 14${t.indent}${a}`:a}function tZ(e,t){("debug"===e||"warn"===e)&&console.warn(t)}let t0={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new tI(Symbol("<<")),{addToJSMap:t1}),stringify:()=>"<<"};function t1(e,t,n){let r=t5(e,n);if(ta(r))for(let n of r.items)t2(e,t,n);else if(Array.isArray(r))for(let n of r)t2(e,t,n);else t2(e,t,r)}function t2(e,t,n){let r=t5(e,n);if(!ti(r))throw Error("Merge sources must be maps or map aliases");for(let[n,i]of r.toJSON(null,e,Map))t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function t5(e,t){return e&&tn(t)?t.resolve(e.doc,e):t}function t3(e,t,{key:n,value:r}){if(tc(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if((t0.identify(n)||ts(n)&&(!n.type||n.type===tI.PLAIN)&&t0.identify(n.value))&&e?.doc.schema.tags.some(e=>e.tag===t0.tag&&e.default))t1(e,t,r);else{let i=t_(n,"",e);if(t instanceof Map)t.set(i,t_(r,i,e));else if(t instanceof Set)t.add(i);else{let o=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(tc(e)&&n?.doc){let t=tX(n.doc,{});for(let e of(t.anchors=new Set,n.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),tZ(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(n,i,e),s=t_(r,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function t4(e,t,n){return new t6(tD(e,void 0,n),tD(t,void 0,n))}class t6{constructor(e,t=null){Object.defineProperty(this,tt,{value:e9}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return tc(t)&&(t=t.clone(e)),tc(n)&&(n=n.clone(e)),new t6(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return t3(t,n,this)}toString(e,t,n){return e?.doc?function({key:e,value:t},n,r,i){let o,s,a,{allNullValues:l,doc:c,indent:d,indentStep:u,options:{commentString:h,indentSeq:p,simpleKeys:f}}=n,m=tc(e)&&e.comment||null;if(f){if(m)throw Error("With simple keys, key nodes cannot have comments");if(tl(e)||!tc(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let g=!f&&(!e||m&&null==t&&!n.inFlow||tl(e)||(ts(e)?e.type===tI.BLOCK_FOLDED||e.type===tI.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(f||!l),indent:d+u});let y=!1,b=!1,v=tQ(e,n,()=>y=!0,()=>b=!0);if(!g&&!n.inFlow&&v.length>1024){if(f)throw Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(l||null==t)return y&&r&&r(),""===v?"?":g?`? ${v}`:v}else if(l&&!f||null==t&&g)return v=`? ${v}`,m&&!y?v+=t$(v,n.indent,h(m)):b&&i&&i(),v;y&&(m=null),g?(m&&(v+=t$(v,n.indent,h(m))),v=`? ${v} 15${d}:`):(v=`${v}:`,m&&(v+=t$(v,n.indent,h(m)))),tc(t)?(o=!!t.spaceBefore,s=t.commentBefore,a=t.comment):(o=!1,s=null,a=null,t&&"object"==typeof t&&(t=c.createNode(t))),n.implicitKey=!1,!g&&!m&&ts(t)&&(n.indentAtStart=v.length+1),b=!1,!(!p&&u.length>=2&&!n.inFlow&&!g&&ta(t))||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let k=!1,x=tQ(t,n,()=>k=!0,()=>b=!0),w=" ";if(m||o||s){if(w=o?"\n":"",s){let e=h(s);w+=` 16${tj(e,n.indent)}`}""!==x||n.inFlow?w+=` 17${n.indent}`:"\n"===w&&a&&(w="\n\n")}else if(!g&&tl(t)){let e=x[0],r=x.indexOf("\n"),i=-1!==r,o=n.inFlow??t.flow??0===t.items.length;if(i||!o){let t=!1;if(i&&("&"===e||"!"===e)){let n=x.indexOf(" ");"&"===e&&-1!==n&&n<r&&"!"===x[n+1]&&(n=x.indexOf(" ",n+1)),(-1===n||r<n)&&(t=!0)}t||(w=` 18${n.indent}`)}}else(""===x||"\n"===x[0])&&(w="");return v+=w+x,n.inFlow?k&&r&&r():a&&!k?v+=t$(v,n.indent,h(a)):b&&i&&i(),v}(this,e,t,n):JSON.stringify(this)}}function t8(e,t,n){return(t.inFlow??e.flow?function({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t,l=Object.assign({},t,{indent:r+=o,inFlow:!0,type:null}),c=!1,d=0,u=[];for(let n=0;n<e.length;++n){let i=e[n],o=null;if(tc(i))i.spaceBefore&&u.push(""),t9(t,u,i.commentBefore,!1),i.comment&&(o=i.comment);else if(to(i)){let e=tc(i.key)?i.key:null;e&&(e.spaceBefore&&u.push(""),t9(t,u,e.commentBefore,!1),e.comment&&(c=!0));let n=tc(i.value)?i.value:null;n?(n.comment&&(o=n.comment),n.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(o=e.comment)}o&&(c=!0);let s=tQ(i,l,()=>o=null);c||(c=u.length>d||s.includes("\n")),n<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=u.reduce((e,t)=>
18e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),c&&(s+=",")),o&&(s+=t$(s,r,a(o))),u.push(s),d=u.length}let{start:h,end:p}=n;if(0===u.length)return h+p;if(!c){let e=u.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(!c)return`${h}${s}${u.join(" ")}${s}${p}`;{let e=h;for(let t of u)e+=t?` 19${o}${i}${t}`:"\n";return`${e} 20${i}${p}`}}:function({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let l,{indent:c,options:{commentString:d}}=n,u=Object.assign({},n,{indent:o,type:null}),h=!1,p=[];for(let e=0;e<t.length;++e){let i=t[e],s=null;if(tc(i))!h&&i.spaceBefore&&p.push(""),t9(n,p,i.commentBefore,h),i.comment&&(s=i.comment);else if(to(i)){let e=tc(i.key)?i.key:null;e&&(!h&&e.spaceBefore&&p.push(""),t9(n,p,e.commentBefore,h))}h=!1;let a=tQ(i,u,()=>s=null,()=>h=!0);s&&(a+=t$(a,o,d(s))),h&&s&&(h=!1),p.push(r+a)}if(0===p.length)l=i.start+i.end;else{l=p[0];for(let e=1;e<p.length;++e){let t=p[e];l+=t?` 21${c}${t}`:"\n"}}return e?(l+="\n"+tj(d(e),c),a&&a()):h&&s&&s(),l})(e,t,n)}function t9({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let i=tj(t(r),e);n.push(i.trimStart())}}function t7(e,t){let n=ts(t)?t.value:t;for(let r of e)if(to(r)&&(r.key===t||r.key===n||ts(r.key)&&r.key.value===n))return r}class ne extends tL{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(e8,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,o=new this(e),s=(e,s)=>{if("function"==typeof i)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==s||r)&&o.items.push(t4(e,s,n))};if(t instanceof Map)for(let[e,n]of t)s(e,n);else if(t&&"object"==typeof t)for(let e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=to(e)?e:e&&"object"==typeof e&&"key"in e?new t6(e.key,e.value):new t6(e,e?.value);let r=t7(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);ts(r.value)&&tM(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>0>i(n,e));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=t7(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=t7(this.items,e),r=n?.value;return(!t&&ts(r)?r.value:r)??void 0}has(e){return!!t7(this.items,e)}set(e,t){this.add(new t6(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(r),this.items))t3(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!to(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t8(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}let nt={collection:"map",default:!0,nodeClass:ne,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(ti(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>ne.from(e,t,n)};class nn extends tL{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(te,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=nr(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=nr(e);if("number"!=typeof n)return;let r=this.items[n];return!t&&ts(r)?r.value:r}has(e){let t=nr(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=nr(e);if("number"!=typeof n)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];ts(r)&&tM(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(t_(e,String(r++),t));return n}toString(e,t,n){return e?t8(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof r){let n=t instanceof Set?o:String(e++);o=r.call(t,n,o)}i.items.push(tD(o,void 0,n))}}return i}}function nr(e){let t=ts(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let ni={collection:"seq",default:!0,nodeClass:nn,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>
21(ta(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>nn.from(e,t,n)},no={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,r)=>tY(e,t=Object.assign({actualString:!0},t),n,r)},ns={identify:e=>null==e,createNode:()=>new tI(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new tI(null),stringify:({source:e},t)=>"string"==typeof e&&ns.test.test(e)?e:t.options.nullStr},na={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new tI("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&na.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};function nl({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);let i="number"==typeof r?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^-?\d/.test(o)&&!o.includes("e")){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o}let nc={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:nl},nd={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():nl(e)}},nu={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new tI(parseFloat(e)),n=e.indexOf(".");return -1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:nl},nh=e=>"bigint"==typeof e||Number.isInteger(e),np=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function nf(e,t,n){let{value:r}=e;return nh(r)&&r>=0?n+r.toString(t):nl(e)}let nm={identify:e=>nh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>np(e,2,8,n),stringify:e=>nf(e,8,"0o")},ng={identify:nh,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>np(e,0,10,n),stringify:nl},ny={identify:e=>nh(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>np(e,2,16,n),stringify:e=>nf(e,16,"0x")},nb=[nt,ni,no,ns,na,nm,ng,ny,nc,nd,nu];function nv(e){return"bigint"==typeof e||Number.isInteger(e)}let nk=({value:e})=>JSON.stringify(e),nx=[nt,ni].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:nk},{identify:e=>null==e,createNode:()=>new tI(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:nk},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:nk},{identify:nv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>nv(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:nk}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),nw={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}},stringify({comment:e,type:t,value:n},r,i,o){let s;if(!n)return"";if("function"==typeof btoa){let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);s=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=tI.BLOCK_LITERAL),t!==tI.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===tI.BLOCK_LITERAL?"\n":" ")}return tY({comment:e,type:t,value:s},r,i,o)}};function nE(e,t){if(ta(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!to(r)){if(ti(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let e=r.items[0]||new t6(new tI(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore} 22${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment} 23${t.comment}`:r.comment}r=e}e.items[n]=to(r)?r:new t6(r)}}else t("Expected a sequence for this tag");return e}function nT(e,t,n){let{replacer:r}=n,i=new nn(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,a;if("function"==typeof r&&(e=r.call(t,String(o++),e)),Array.isArray(e))if(2===e.length)s=e[0],a=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)a=e[s=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else s=e;i.items.push(t4(s,a,n))}return i}let nS={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nE,createNode:nT};class nC extends nn{constructor(){super(),this.add=ne.prototype.add.bind(this),this.delete=ne.prototype.delete.bind(this),this.get=ne.prototype.get.bind(this),this.has=ne.prototype.has.bind(this),this.set=ne.prototype.set.bind(this),this.tag=nC.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;for(let e of(t?.onCreate&&t.onCreate(n),this.items)){let r,i;if(to(e)?(r=t_(e.key,"",t),i=t_(e.value,r,t)):r=t_(e,"",t),n.has(r))throw Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}static from(e,t,n){let r=nT(e,t,n),i=new this;return i.items=r.items,i}}nC.tag="tag:yaml.org,2002:omap";let nA={collection:"seq",identify:e=>e instanceof Map,nodeClass:nC,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=nE(e,t),r=[];for(let{key:e}of n.items)ts(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new nC,n)},createNode:(e,t,n)=>nC.from(e,t,n)};function n_({value:e,source:t},n){return t&&(e?nN:nO).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let nN={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>
23new tI(!0),stringify:n_},nO={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new tI(!1),stringify:n_},nM=e=>"bigint"==typeof e||Number.isInteger(e);function nI(e,t,n,{intAsBigInt:r}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let o=parseInt(e,n);return"-"===i?-1*o:o}function nD(e,t,n){let{value:r}=e;if(nM(r)){let e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return nl(e)}class nR extends ne{constructor(e){super(e),this.tag=nR.tag}add(e){let t;t=to(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new t6(e.key,null):new t6(e,null),t7(this.items,t.key)||this.items.push(t)}get(e,t){let n=t7(this.items,e);return!t&&to(n)?ts(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=t7(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new t6(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error("Set items must all have null values")}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof r&&(e=r.call(t,e,e)),i.items.push(t4(e,null,n));return i}}nR.tag="tag:yaml.org,2002:set";let nz={collection:"map",identify:e=>e instanceof Set,nodeClass:nR,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>nR.from(e,t,n),resolve(e,t){if(ti(e))if(e.hasAllNullValues(!0))return Object.assign(new nR,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};function nL(e,t){let n=e[0],r="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===n?i(-1)*o:o}function nP(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return nl(e);let r="";t<0&&(r="-",t*=n(-1));let i=n(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),r+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let nj={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>nL(e,n),stringify:nP},n$={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>nL(e,!1),stringify:nP},nF={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(nF.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,o,s,a]=t.map(Number),l=Date.UTC(n,r-1,i,o||0,s||0,a||0,t[7]?Number((t[7]+"00").substr(1,3)):0),c=t[8];if(c&&"Z"!==c){let e=nL(c,!1);30>Math.abs(e)&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},nB=[nt,ni,no,ns,nN,nO,{identify:nM,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>nI(e,2,2,n),stringify:e=>nD(e,2,"0b")},{identify:nM,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>nI(e,1,8,n),stringify:e=>nD(e,8,"0")},{identify:nM,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>nI(e,0,10,n),stringify:nl},{identify:nM,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>nI(e,2,16,n),stringify:e=>nD(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?-1/0:1/0,stringify:nl},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():nl(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new tI(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){let r=e.substring(n+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:nl},nw,t0,nA,nS,nz,nj,n$,nF],nH=new Map([["core",nb],["failsafe",[nt,ni,no]],["json",nx],["yaml11",nB],["yaml-1.1",nB]]),nU={binary:nw,bool:na,float:nu,floatExp:nd,floatNaN:nc,floatTime:n$,int:ng,intHex:ny,intOct:nm,intTime:nj,map:nt,merge:t0,null:ns,omap:nA,pairs:nS,seq:ni,set:nz,timestamp:nF},nV={"tag:yaml.org,2002:binary":nw,"tag:yaml.org,2002:merge":t0,"tag:yaml.org,2002:omap":nA,"tag:yaml.org,2002:pairs":nS,"tag:yaml.org,2002:set":nz,"tag:yaml.org,2002:timestamp":nF};function nq(e,t,n){let r=nH.get(t);if(r&&!e)return n&&!r.includes(t0)?r.concat(t0):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(nH.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return n&&(i=i.concat(t0)),i.reduce((e,t)=>
23{let n="string"==typeof t?nU[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(nU).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}let nG=(e,t)=>e.key<t.key?-1:+(e.key>t.key);class nW{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?nq(e,"compat"):e?nq(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=r?nV:{},this.tags=nq(t,this.name,n),this.toStringOptions=s??null,Object.defineProperty(this,e8,{value:nt}),Object.defineProperty(this,e7,{value:no}),Object.defineProperty(this,te,{value:ni}),this.sortMapEntries="function"==typeof o?o:!0===o?nG:null}clone(){let e=Object.create(nW.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class nK{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,tt,{value:e6});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new tE({version:o}),this.setSchema(o,n),this.contents=void 0===e?null:this.createNode(e,r,n)}clone(){let e=Object.create(nK.prototype,{[tt]:{value:e6}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=tc(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){nJ(this.contents)&&this.contents.add(e)}addIn(e,t){nJ(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=tS(this);e.anchor=!t||n.has(t)?tC(t||"a",n):t}return new tO(e.anchor)}createNode(e,t,n){var r,i;let o,s,a,l;if("function"==typeof t)e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),o=t}else void 0===n&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:c,anchorPrefix:d,flow:u,keepUndefined:h,onTagObj:p,tag:f}=n??{},{onAnchor:m,setAnchors:g,sourceObjects:y}=(r=this,i=d||"a",s=[],a=new Map,l=null,{onAnchor:e=>{s.push(e),l??(l=tS(r));let t=tC(i,l);return l.add(t),t},setAnchors:()=>{for(let e of s){let t=a.get(e);if("object"==typeof t&&t.anchor&&(ts(t.node)||tl(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:a}),b={aliasDuplicateObjects:c??!0,keepUndefined:h??!1,onAnchor:m,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:y},v=tD(e,f,b);return u&&tl(v)&&(v.flow=!0),g(),v}createPair(e,t,n={}){return new t6(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return!!nJ(this.contents)&&this.contents.delete(e)}deleteIn(e){return tz(e)?null!=this.contents&&(this.contents=null,!0):!!nJ(this.contents)&&this.contents.deleteIn(e)}get(e,t){return tl(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return tz(e)?!t&&ts(this.contents)?this.contents.value:this.contents:tl(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!tl(this.contents)&&this.contents.has(e)}hasIn(e){return tz(e)?void 0!==this.contents:!!tl(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=tR(this.schema,[e],t):nJ(this.contents)&&this.contents.set(e,t)}setIn(e,t){tz(e)?this.contents=t:null==this.contents?this.contents=tR(this.schema,Array.from(e),t):nJ(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new tE({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new tE({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new nW(Object.assign(n,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},a=t_(this.contents,t??"",s);if("function"==typeof i)for(let{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof o?tA(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let n=[],r=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");let i=tX(e,t),{commentString:o}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");
23let t=o(e.commentBefore);n.unshift(tj(t,""))}let s=!1,a=null;if(e.contents){if(tc(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){let t=o(e.contents.commentBefore);n.push(tj(t,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let t=a?void 0:()=>s=!0,l=tQ(e.contents,i,()=>a=null,t);a&&(l+=t$(l,"",o(a))),("|"===l[0]||">"===l[0])&&"---"===n[n.length-1]?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(tQ(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=o(e.comment);t.includes("\n")?(n.push("..."),n.push(tj(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&((!s||a)&&""!==n[n.length-1]&&n.push(""),n.push(tj(o(t),"")))}return n.join("\n")+"\n"}(this,e)}}function nJ(e){if(tl(e))return!0;throw Error("Expected a YAML collection as document contents")}class nY extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}class nX extends nY{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class nQ extends nY{constructor(e,t,n){super("YAMLWarning",e,t,n)}}let nZ=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let e=Math.min(o-39,s.length-79);s="â¦"+s.substring(e),o-=e-1}if(s.length>80&&(s=s.substring(0,79)+"â¦"),r>1&&/^ *$/.test(s.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"â¦\n"),s=n+s}if(/[^ ]/.test(s)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-o)));let a=" ".repeat(o)+"^".repeat(e);n.message+=`: 24 25${s} 26${a} 27`}};function n0(e,{flow:t,indicator:n,next:r,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,d=a,u="",h="",p=!1,f=!1,m=null,g=null,y=null,b=null,v=null,k=null,x=null;for(let i of e)switch(f&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),m&&(c&&"comment"!==i.type&&"newline"!==i.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":!t&&("doc-start"!==n||r?.type!=="flow-collection")&&i.source.includes(" ")&&(m=i),d=!0;break;case"comment":{d||o(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=i.source.substring(1)||" ";u?u+=h+e:u=e,h="",c=!1;break}case"newline":c?u?u+=i.source:k&&"seq-item-ind"===n||(l=!0):h+=i.source,c=!0,p=!0,(g||y)&&(b=i),d=!0;break;case"anchor":g&&o(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&o(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=i,x??(x=i.offset),c=!1,d=!1,f=!0;break;case"tag":y&&o(i,"MULTIPLE_TAGS","A node can have at most one tag"),y=i,x??(x=i.offset),c=!1,d=!1,f=!0;break;case n:(g||y)&&o(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),k&&o(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),k=i,c="seq-item-ind"===n||"explicit-key-ind"===n,d=!1;break;case"comma":if(t){v&&o(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),v=i,c=!1,d=!1;break}default:o(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,d=!1}let w=e[e.length-1],E=w?w.offset+w.source.length:i;return f&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=s||r?.type==="block-map"||r?.type==="block-seq")&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:k,spaceBefore:l,comment:u,hasNewline:p,anchor:g,tag:y,newlineAfterProp:b,end:E,start:x??E}}function n1(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;
27if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(n1(t.key)||n1(t.value))return!0}return!1;default:return!0}}function n2(e,t,n){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&("]"===r.source||"}"===r.source)&&n1(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function n5(e,t,n){let{uniqueKeys:r}=e.options;if(!1===r)return!1;let i="function"==typeof r?r:(e,t)=>e===t||ts(e)&&ts(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}let n3="All mapping items must start at the same column";function n4(e,t,n,r){let i="";if(e){let o=!1,s="";for(let a of e){let{source:e,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}let n6="Block collections are not allowed within flow collections",n8=e=>e&&("block-map"===e.type||"block-seq"===e.type);function n9(e,t,n,r,i,o){let s="block-map"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s=new(o?.nodeClass??ne)(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,l=null;for(let o of r.items){let{start:c,key:d,sep:u,value:h}=o,p=n0(c,{indicator:"explicit-key-ind",next:d??u?.[0],offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0}),f=!p.found;if(f){if(d&&("block-seq"===d.type?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(a,"BAD_INDENT",n3)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||n1(d))&&i(d??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==r.indent&&i(a,"BAD_INDENT",n3);n.atKey=!0;let m=p.end,g=d?e(n,d,p,i):t(n,m,c,null,p,i);n.schema.compat&&n2(r.indent,d,i),n.atKey=!1,n5(n,s.items,g)&&i(m,"DUPLICATE_KEY","Map keys must be unique");let y=n0(u??[],{indicator:"map-value-ind",next:h,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||"block-scalar"===d.type});if(a=y.end,y.found){f&&(h?.type!=="block-map"||y.hasNewline||i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&p.start<y.found.offset-1024&&i(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let l=h?e(n,h,y,i):t(n,a,u,null,y,i);n.schema.compat&&n2(r.indent,h,i),a=l.range[2];let c=new t6(g,l);n.options.keepSourceTokens&&(c.srcToken=o),s.items.push(c)}else{f&&i(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);let e=new t6(g);n.options.keepSourceTokens&&(e.srcToken=o),s.items.push(e)}}return l&&l<a&&i(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[r.offset,a,l??a],s}(e,t,n,r,o):"block-seq"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s=new(o?.nodeClass??nn)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,l=null;for(let{start:o,value:c}of r.items){let d=n0(o,{indicator:"seq-item-ind",next:c,offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||c)c?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(s.comment=d.comment);continue}let u=c?e(n,c,d,i):t(n,d.end,o,null,d,i);n.schema.compat&&n2(r.indent,c,i),a=u.range[2],s.items.push(u)}return s.range=[r.offset,a,l??a],s}(e,t,n,r,o):function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s="{"===r.start.source,a=s?"flow map":"flow sequence",l=new(o?.nodeClass??(s?ne:nn))(n.schema);l.flow=!0;let c=n.atRoot;c&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset+r.start.source.length;for(let o=0;o<r.items.length;++o){let c=r.items[o],{start:u,key:h,sep:p,value:f}=c,m=n0(u,{flow:a,indicator:"explicit-key-ind",next:h??p?.[0],offset:d,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!p&&!f){0===o&&m.comma?i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):o<r.items.length-1&&i(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),m.comment&&(l.comment?l.comment+="\n"+m.comment:l.comment=m.comment),d=m.end;continue}!s&&n.options.strict&&n1(h)&&i(h,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)m.comma&&i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(m.comma||i(m.start,"MISSING_CHAR",`Missing , between ${a} items`),m.comment){let e="";e:for(let t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=l.items[l.items.length-1];to(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(s||p||m.found){n.atKey=!0;let o=m.end,g=h?e(n,h,m,i):t(n,o,u,null,m,i);n8(h)&&i(g.range,"BLOCK_IN_FLOW",n6),n.atKey=!1;let y=n0(p??[],{flow:a,indicator:"map-value-ind",next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(y.found){if(!s&&!m.found&&n.options.strict){if(p)for(let e of p){if(e===y.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<y.found.offset-1024&&i(y.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else f&&("source"in f&&f.source?.[0]===":"?i(f,"MISSING_CHAR",`Missing space after : in ${a}`):i(y.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let b=f?e(n,f,y,i):y.found?t(n,y.end,p,null,y,i):null;b?n8(f)&&i(b.range,"BLOCK_IN_FLOW",n6):y.comment&&(g.comment?g.comment+="\n"+y.comment:g.comment=y.comment);let v=new t6(g,b);if(n.options.keepSourceTokens&&(v.srcToken=c),s)n5(n,l.items,g)&&i(o,"DUPLICATE_KEY","Map ke
27ys must be unique"),l.items.push(v);else{let e=new ne(n.schema);e.flow=!0,e.items.push(v);let t=(b??g).range;e.range=[g.range[0],t[1],t[2]],l.items.push(e)}d=b?b.range[2]:y.end}else{let r=f?e(n,f,m,i):t(n,m.end,p,null,m,i);l.items.push(r),d=r.range[2],n8(f)&&i(r.range,"BLOCK_IN_FLOW",n6)}}let u=s?"}":"]",[h,...p]=r.end,f=d;if(h?.source===u)f=h.offset+h.source.length;else{let e=a[0].toUpperCase()+a.substring(1),t=c?`${e} must end with a ${u}`:`${e} in block collection must be sufficiently indented and end with a ${u}`;i(d,c?"MISSING_CHAR":"BAD_INDENT",t),h&&1!==h.source.length&&p.unshift(h)}if(p.length>0){let e=n4(p,f,n.options.strict,i);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[r.offset,f,e.offset]}else l.range=[r.offset,f,f];return l}(e,t,n,r,o),a=s.constructor;return"!"===i||i===a.tagName?s.tag=a.tagName:i&&(s.tag=i),s}function n7(e,t,n){let r=t.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],o=i[0],s=0,a="",l=-1;for(let t=1;t<i.length;++t){let n=i[t];if(a||"-"!==n&&"+"!==n){let r=Number(n);!s&&r?s=r:-1===l&&(l=e+t)}else a=n}-1!==l&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":c=!0;case"newline":u+=i.source.length;break;case"comment":n&&!c&&r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=i.source.length,d=i.source.substring(1);break;case"error":r(i,"UNEXPECTED_TOKEN",i.message),u+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;r(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(u+=t.length)}}}return{mode:o,indent:s,chomp:a,comment:d,length:u}}(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let o=">"===i.mode?tI.BLOCK_FOLDED:tI.BLOCK_LITERAL,s=t.source?function(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[],a=s.length;for(let e=s.length-1;e>=0;--e){let t=s[e][1];if(""===t||"\r"===t)a=e;else break}if(0===a){let e="+"===i.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"",n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:o,comment:i.comment,range:[r,n,n]}}let l=t.indent+i.indent,c=t.offset+i.length,d=0;for(let t=0;t<a;++t){let[r,o]=s[t];if(""===o||"\r"===o)0===i.indent&&r.length>l&&(l=r.length);else{r.length<l&&n(c+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(l=r.length),d=t,0!==l||e.atRoot||n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=r.length+o.length+1}for(let e=s.length-1;e>=a;--e)s[e][0].length>l&&(a=e+1);let u="",h="",p=!1;for(let e=0;e<d;++e)u+=s[e][0].slice(l)+"\n";for(let e=d;e<a;++e){let[t,r]=s[e];c+=t.length+r.length+1;let a="\r"===r[r.length-1];if(a&&(r=r.slice(0,-1)),r&&t.length<l){let e=i.indent?"explicit indentation indicator":"first line",o=`Block scalar lines must not be less indented than their ${e}`;n(c-r.length-(a?2:1),"BAD_INDENT",o),t=""}o===tI.BLOCK_LITERAL?(u+=h+t.slice(l)+r,h="\n"):t.length>l||" "===r[0]?(" "===h?h="\n":p||"\n"!==h||(h="\n\n"),u+=h+t.slice(l)+r,h="\n",p=!0):""===r?"\n"===h?u+="\n":h="\n":(u+=h+r,h=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let e=a;e<s.length;++e)u+="\n"+s[e][0].slice(l);"\n"!==u[u.length-1]&&(u+="\n");break;default:u+="\n"}let f=r+i.length+t.source.length;return{value:u,type:o,comment:i.comment,range:[r,f,f]}}function re(e,t,n){let r,i,{offset:o,type:s,source:a,end:l}=e,c=(e,t,r)=>n(o+e,t,r);switch(s){case"scalar":r=tI.PLAIN,i=function(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),rt(e)}(a,c);break;case"single-quoted-scalar":var d,u;
27r=tI.QUOTE_SINGLE,d=a,u=c,("'"!==d[d.length-1]||1===d.length)&&u(d.length,"MISSING_CHAR","Missing closing 'quote"),i=rt(d.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":r=tI.QUOTE_DOUBLE,i=function(e,t){let n="";for(let r=1;r<e.length-1;++r){let i=e[r];if("\r"!==i||"\n"!==e[r+1])if("\n"===i){let{fold:t,offset:i}=function(e,t){let n="",r=e[t+1];for(;(" "===r||" "===r||"\n"===r||"\r"===r)&&("\r"!==r||"\n"===e[t+2]);)"\n"===r&&(n+="\n"),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}(e,r);n+=t,r=i}else if("\\"===i){let i=e[++r],o=rn[i];if(o)n+=o;else if("\n"===i)for(i=e[r+1];" "===i||" "===i;)i=e[++r+1];else if("\r"===i&&"\n"===e[r+1])for(i=e[++r+1];" "===i||" "===i;)i=e[++r+1];else if("x"===i||"u"===i||"U"===i){let o="x"===i?2:"u"===i?4:8;n+=function(e,t,n,r){let i=e.substr(t,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let i=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}(e,r+1,o,t),r+=o}else{let i=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||" "===i){let t=r,o=e[r+1];for(;" "===o||" "===o;)o=e[++r+1];"\n"!==o&&("\r"!==o||"\n"!==e[r+2])&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(a,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[o,o+a.length,o+a.length]}}let h=o+a.length,p=n4(l,h,t,n);return{value:i,type:r,comment:p.comment,range:[o,h,p.offset]}}function rt(e){let t,n;try{t=RegExp("(.*?)(?<![ ])[ ]*\r?\n","sy"),n=RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],o=" ",s=t.lastIndex;for(n.lastIndex=s;r=n.exec(e);)""===r[1]?"\n"===o?i+=o:o="\n":(i+=o+r[1],o=" "),s=n.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=s,r=a.exec(e),i+o+(r?.[1]??"")}let rn={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"Â
",_:"Â ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rr(e,t,n,r){let i,o,{value:s,type:a,comment:l,range:c}="block-scalar"===t.type?n7(e,t,r):re(t,e.options.strict,r),d=n?e.directives.tagName(n.source,e=>r(n,"TAG_RESOLVE_FAILED",e)):null;i=e.options.stringKeys&&e.atKey?e.schema[e7]:d?function(e,t,n,r,i){if("!"===n)return e[e7];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(!t.default||!t.test)return t;else o.push(t);for(let e of o)if(e.test?.test(t))return e;let s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[e7])}(e.schema,s,d,n,r):"scalar"===t.type?function({atKey:e,directives:t,schema:n},r,i,o){let s=n.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(r))||n[e7];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[e7];if(s.tag!==e.tag){let n=t.tagString(s.tag),r=t.tagString(e.tag);o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n} or ${r}`,!0)}}return s}(e,s,t,r):e.schema[e7];try{let a=i.resolve(s,e=>r(n??t,"TAG_RESOLVE_FAILED",e),e.options);o=ts(a)?a:new tI(a)}catch(e){r(n??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),o=new tI(s)}return o.range=c,o.source=s,a&&(o.type=a),d&&(o.tag=d),i.format&&(o.format=i.format),l&&(o.comment=l),o}let ri={composeNode:ro,composeEmptyNode:rs};function ro(e,t,n,r){let i,o=e.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=n,d=!0;switch(t.type){case"alias":i=function({options:e},{offset:t,source:n,end:r},i){let o=new tO(n.substring(1));""===o.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+n.length,a=n4(r,s,e.strict,i);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}(e,t,r),(l||c)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":i=rr(e,t,c,r),l&&(i.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{i=function(e,t,n,r,i){let o=r.tag,s=o?t.directives.tagName(o.source,e=>i(o,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===n.type){let{anchor:e,newlineAfterProp:t}=r,n=e&&o?e.offset>o.offset?e:o:e??o;n&&(!t||t.offset<n.offset)&&i(n,"MISSING_CHAR","Missing newline after block sequence props")}let a="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!o||!s||"!"===s||s===ne.tagName&&"map"===a||s===nn.tagName&&"seq"===a)return n9(e,t,n,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===a);if(!l){let r=t.schema.knownTags[s];if(r?.collection!==a)return r?i(o,"BAD_COLLECTION_TYPE",`${r.tag} used for ${a} collection, but expects ${r.collection??"scalar"}`,!0):i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),n9(e,t,n,i,s);t.schema.tags.push(Object.assign({},r,{default:!1})),l=r}let c=n9(e,t,n,i,s,l),d=l.resolve?.(c,e=>i(o,"TAG_RESOLVE_FAILED",e),t.options)??c,u=tc(d)?d:new tI(d);return u.range=c.range,u.tag=s,l?.format&&(u.format=l.format),u}(ri,e,t,n,r),l&&(i.anchor=l.source.substring(1))}catch(e){r(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",e),d=!1}}return i??(i=rs(e,t.offset,void 0,null,n,r)),l&&""===i.anchor&&r(l,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!ts(i)||"string"!=typeof i.value||i.tag&&"tag:yaml.org,2002:str"!==i.tag)&&r(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(i.spaceBefore=!0),a&&("scalar"===t.type&&""===t.source?i.comment=a:i.commentBefore=a),e.options.keepSourceTokens&&d&&(i.srcToken=t),i}function rs(e,t,n,r,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let d=rr(e,{type:"scalar",offset:function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];n?.type==="space";)e+=n.source.length,n=t[++r];break}}return e}(t,n,r),indent:-1,source:""},a,c);return s&&(d.anchor=s.source.substring(1),""===d.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),o&&(
27d.comment=o,d.range[2]=l),d}function ra(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function rl(e){let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class rc{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=ra(e);r?this.warnings.push(new nQ(i,t,n)):this.errors.push(new nX(i,t,n))},this.directives=new tE({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=rl(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment} 28${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(tl(i)&&!i.flow&&i.items.length>0){let e=i.items[0];to(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n} 29${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n} 30${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:rl(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let i=ra(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:n,start:r,value:i,end:o},s){let a=new nK(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},c=n0(r,{indicator:"doc-start",next:i??o?.[0],offset:n,onError:s,parentIndent:0,startOnNewline:!0});c.found&&(a.directives.docStart=!0,i&&("block-map"===i.type||"block-seq"===i.type)&&!c.hasNewline&&s(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?ro(l,i,c,s):rs(l,c.end,r,null,c,s);let d=a.contents.range[2],u=n4(o,d,!1,s);return u.comment&&(a.comment=u.comment),a.range=[n,d,u.offset],a}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new nX(ra(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new nX(ra(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=n4(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e} 31${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new nX(ra(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new nK(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}function rd(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function ru(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),i=t.length;for(let t of("block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length),r))t.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>
31"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(let t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}let rh=Symbol("break visit"),rp=Symbol("skip children"),rf=Symbol("remove item");function rm(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,n,r){let i=r(n,t);if("symbol"==typeof i)return i;for(let o of["key","value"]){let s=n[o];if(s&&"items"in s){for(let n=0;n<s.items.length;++n){let i=e(Object.freeze(t.concat([[o,n]])),s.items[n],r);if("number"==typeof i)n=i-1;else{if(i===rh)return rh;i===rf&&(s.items.splice(n,1),n-=1)}}"function"==typeof i&&"key"===o&&(i=i(n,t))}}return"function"==typeof i?i(n,t):i}(Object.freeze([]),e,t)}rm.BREAK=rh,rm.SKIP=rp,rm.REMOVE=rf,rm.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},rm.parentCollection=(e,t)=>{let n=rm.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw Error("Parent collection not found")};let rg=e=>!!e&&"items"in e,ry=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function rb(e){switch(e){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}}function rv(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function rk(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=rk(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=rx(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=rx(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=rx(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function rx({start:e,key:t,sep:n,value:r}){let i="";for(let t of e)i+=t.source;if(t&&(i+=rk(t)),n)for(let e of n)i+=e.source;return r&&(i+=rk(r)),i}e.s(["BOM",0,"\uFEFF","DOCUMENT",0,"\x02","FLOW_END",0,"\x18","SCALAR",0,"\x1f","isCollection",0,rg,"isScalar",0,ry,"prettyToken",0,rb,"tokenType",0,rv],778514),e.i(778514),e.s(["BOM",0,"\uFEFF","DOCUMENT",0,"\x02","FLOW_END",0,"\x18","SCALAR",0,"\x1f","createScalarToken",0,function(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:o=-1,type:s="PLAIN"}=t,a=tY({type:s,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(a[0]){case"|":case">":{let e=a.indexOf("\n"),t=a.substring(0,e),n=a.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:o,indent:r,source:t}];return rd(i,l)||i.push({type:"newline",offset:-1,indent:r,source:"\n"}),{type:"block-scalar",offset:o,indent:r,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:a,end:l};default:return{type:"scalar",offset:o,indent:r,source:a,end:l}}},"isCollection",0,rg,"isScalar",0,ry,"prettyToken",0,rb,"resolveAsScalar",0,function(e,t=!0,n){if(e){let r=(e,t,r)=>{let i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,r);else throw new nX([i,i+1],t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return re(e,t,r);case"block-scalar":return n7({options:{strict:t}},e,r)}}return null},"setScalarValue",0,function(e,t,n={}
31){let{afterKey:r=!1,implicitKey:i=!1,inFlow:o=!1,type:s}=n,a="indent"in e?e.indent:null;if(r&&"number"==typeof a&&(a+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}let l=tY({type:s,value:t},{implicitKey:i||null===a,indent:null!==a&&a>0?" ".repeat(a):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){let n=t.indexOf("\n"),r=t.substring(0,n),i=t.substring(n+1)+"\n";if("block-scalar"===e.type){let t=e.props[0];if("block-scalar-header"!==t.type)throw Error("Invalid block scalar header");t.source=r,e.source=i}else{let{offset:t}=e,n="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:t,indent:n,source:r}];for(let t of(rd(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:n,source:"\n"}),Object.keys(e)))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:n,props:o,source:i})}}(e,l);break;case'"':ru(e,l,"double-quoted-scalar");break;case"'":ru(e,l,"single-quoted-scalar");break;default:ru(e,l,"scalar")}},"stringify",0,e=>"type"in e?rk(e):rx(e),"tokenType",0,rv,"visit",0,rm],178465);var rw=e.i(178465);function rE(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let rT=new Set("0123456789ABCDEFabcdef"),rS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),rC=new Set(",[]{}"),rA=new Set(" ,[]{}\n\r "),r_=e=>!e||rA.has(e);class rN{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){let t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"!==t&&!(n>=this.indentNext)&&(t||this.atEnd)?-1:e+n}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&rE(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\uFEFF"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){let r=e[n-1];if(" "===r||" "===r){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){let n=e[t-1];if(" "===n||" "===n)t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"\x02",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&rE(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!rE(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&rE(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";
31case"*":return yield*this.pushUntil(r_),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0)let r=this.getLine();if(null===r)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&rE(r[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==r[0]&&"}"!==r[0]))return this.flowLevel=0,yield"\x18",yield*this.parseLineStart();let i=0;for(;","===r[i];)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r[i+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(r_),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||rE(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){let e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>rE(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let r=this.pos;e=this.buffer[r];++r)switch(e){case" ":n+=1;break;case"\n":t=r,n=0;break;case"\r":{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t)if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(e=this.buffer[r];" "===e;)e=this.buffer[++r];if(" "===e){for(;" "===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);let i=e;for(;" "===r;)r=this.buffer[--e];if("\n"===r&&e>=this.pos&&e+1+n>i)t=e;else break}return yield"\x1f",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,n=this.pos-1,r=this.pos-1;for(;e=this.buffer[++r];)if(":"===e){let e=this.buffer[r+1];if(rE(e)||t&&rC.has(e))break;n=r}else if(rE(e)){let i=this.buffer[r+1];if("\r"===e&&("\n"===i?(r+=1,e="\n",i=this.buffer[r+1]):n=r),"#"===i||t&&rC.has(i))break;if("\n"===e){let e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(t&&rC.has(e))break;n=r}return e||this.atEnd?(yield"\x1f",yield*this.pushToIndex(n+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(r_),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(rE(n)||t&&rC.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!rE(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(rS.has(t))t=this.buffer[++e];else if("%"===t&&rT.has(this.buffer[e+1])&&rT.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do t=this.buffer[++n];while(" "===t||e&&" "===t)let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}function rO(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function rM(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function rI(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function rD(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function rR(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function rz(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function rL(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||rO(t.start,"explicit-key-ind")||rO(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,rI(t.value)?t.value.end?rz(t.value.end,t.sep):t.value.end=t.sep:rz(t.start,t.sep),delete t.sep)}class rP{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new rN,this.onNewLine=e}*parse(e,t=!1){for(let n of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=rv(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}
31get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&rL(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===rM(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==rM(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,n=rR(rD(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){rz(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case"newline":n.push(r);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,
31sep:[this.sourceToken]});else if(rO(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(rI(t.key)&&!rO(t.sep,"newline")){let e=rR(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(rO(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=rR(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):rO(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if("block-seq"===r.type){if(!t.explicitKey&&t.sep&&!rO(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){rz(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||rO(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let n=rR(rD(t));rL(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.t
31ype);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=rR(rD(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=rR(rD(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}class rj{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}function r$(e){let t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new rj||null,prettyErrors:t}}function rF(e,t={}){let{lineCounter:n,prettyErrors:r}=r$(t),i=new rP(n?.addNewLine),o=new rc(t),s=null;for(let t of o.compose(i.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new nX(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;
31return r&&n&&(s.errors.forEach(nZ(e,n)),s.warnings.forEach(nZ(e,n))),s}e.s([],480375),e.i(480375),e.s(["Alias",0,tO,"CST",0,rw,"Composer",0,rc,"Document",0,nK,"Lexer",0,rN,"LineCounter",0,rj,"Pair",0,t6,"Parser",0,rP,"Scalar",0,tI,"Schema",0,nW,"YAMLError",0,nY,"YAMLMap",0,ne,"YAMLParseError",0,nX,"YAMLSeq",0,nn,"YAMLWarning",0,nQ,"isAlias",0,tn,"isCollection",0,tl,"isDocument",0,tr,"isMap",0,ti,"isNode",0,tc,"isPair",0,to,"isScalar",0,ts,"isSeq",0,ta,"parse",0,function(e,t,n){let r;"function"==typeof t?r=t:void 0===n&&t&&"object"==typeof t&&(n=t);let i=rF(e,n);if(!i)return null;if(i.warnings.forEach(e=>tZ(i.options.logLevel,e)),i.errors.length>0)if("silent"!==i.options.logLevel)throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:r},n))},"parseAllDocuments",0,function(e,t={}){let{lineCounter:n,prettyErrors:r}=r$(t),i=new rP(n?.addNewLine),o=new rc(t),s=Array.from(o.compose(i.parse(e)));if(r&&n)for(let t of s)t.errors.forEach(nZ(e,n)),t.warnings.forEach(nZ(e,n));return s.length>0?s:Object.assign([],{empty:!0},o.streamInfo())},"parseDocument",0,rF,"stringify",0,function(e,t,n){let r=null;if("function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??t??{};if(!e)return}return tr(e)&&!r?e.toString(n):new nK(e,r,n).toString(n)},"visit",0,tf,"visitAsync",0,tg],175603),e.i(175603);let rB=["text","number","boolean","date","list","object"];ea.z.enum(rB);let rH=ea.z.union([ea.z.string(),ea.z.number(),ea.z.boolean()]),rU=ea.z.lazy(()=>ea.z.union([rH.transform(e=>String(e)),ea.z.record(ea.z.string(),rV),ea.z.array(rU)])),rV=ea.z.lazy(()=>ea.z.union([ea.z.string(),ea.z.number(),ea.z.boolean(),ea.z.array(rU),ea.z.record(ea.z.string(),rV)]));ea.z.preprocess(function e(t){if(Array.isArray(t)){let n=[];for(let r of t)null!==r&&n.push(e(r));return n}if(null!==t&&"object"==typeof t){let n={};for(let[r,i]of Object.entries(t))n[r]=null===i?"":e(i);return n}return t},ea.z.record(ea.z.string(),rV)),ea.z.record(ea.z.string(),ea.z.union([rV,ea.z.null()]));let rq=/^---[ \t]*\r?\n([\s\S]*?\r?\n)?---[ \t]*(\r?\n|$)/;Object.freeze(["__config__/project","__local__/project","__user__/config.yml","__config__/okignore"]);let rG=["project","global"],rW=ea.z.looseObject({name:ea.z.string(),description:ea.z.string(),files:ea.z.looseObject({skillMd:ea.z.string(),scripts:ea.z.array(ea.z.string()),references:ea.z.array(ea.z.string())})}),rK=ea.z.looseObject({pluginProvider:ea.z.string().optional(),plugin:ea.z.string().optional(),marketplace:ea.z.string().optional(),repositoryUrl:ea.z.string().optional(),version:ea.z.string().optional(),gitCommitSha:ea.z.string().optional(),scope:ea.z.string().optional(),projectPath:ea.z.string().optional()}),rJ=ea.z.looseObject({commands:ea.z.boolean(),hooks:ea.z.boolean(),mcp:ea.z.boolean()}),rY=ea.z.looseObject({...rW.shape,sourceHarness:ea.z.string(),sourceHarnesses:ea.z.array(ea.z.string()),home:ea.z.string(),provenance:rK,inert:rJ,outsideProject:ea.z.boolean().optional()}),rX=ea.z.looseObject({schema:ea.z.literal(1),name:ea.z.string(),version:ea.z.string(),description:ea.z.string().optional(),author:ea.z.looseObject({name:ea.z.string()}).optional(),skills:ea.z.array(ea.z.string()),hostCompatibility:ea.z.array(ea.z.string()).optional(),capabilities:ea.z.looseObject({scripts:ea.z.string(),network:ea.z.string(),inert:ea.z.array(ea.z.string())}).optional(),provenance:ea.z.looseObject({source:ea.z.string(),ref:ea.z.string(),contentHash:ea.z.string()}).optional()});ea.z.object({skills:ea.z.array(rY),packs:ea.z.array(rX)}).loose();let rQ=ea.z.object({id:ea.z.string().min(1),name:ea.z.string().min(1),source:ea.z.string().min(1),description:ea.z.string(),installs:ea.z.number().int().nonnegative().nullable(),publisher:ea.z.string().nullable()}).loose();ea.z.object({results:ea.z.array(rQ),backend:ea.z.enum(["skills.sh","github-fallback"]),degraded:ea.z.boolean()}).loose(),ea.z.object({title:ea.z.string(),description:ea.z.string(),image:ea.z.string().nullable(),skillsUrl:ea.z.string().nullable(),sourceKind:ea.z.enum(["github","site"]),sourceUrl:ea.z.string()}).loose();let rZ=ea.z.object({name:ea.z.string(),description:ea.z.string().nullable()}).loose();ea.z.object({skills:ea.z.array(rZ)}).loose(),ea.z.object({kind:ea.z.enum(["local","import","none"]),scope:ea.z.enum(rG).optional(),name:ea.z.string().optional(),dir:ea.z.string().optional(),source:ea.z.string().optional(),ref:ea.z.string().optional(),via:ea.z.enum(["source","publisher"]).optional()}).loose();let r0=ea.z.object({relPath:ea.z.string(),content:ea.z.string().nullable()}).loose(),r1=ea.z.object({provider:ea.z.string(),plugin:ea.z.string(),version:ea.z.string().optional(),marketplace:ea.z.string().optional(),repositoryUrl:ea.z.string().optional()}).loose(),r2=ea.z.object({provider:ea.z.string(),plugin:ea.z.string(),version:ea.z.string().optional(),description:ea.z.string().optional(),repositoryUrl:ea.z.string().optional(),bundledSkills:ea.z.array(ea.z.string()),capabilities:ea.z.object({commands:ea.z.boolean(),hooks:ea.z.boolean(),mcp:ea.z.boolean(),agents:ea.z.boolean()}),setupSupported:ea.z.boolean()}).loose();ea.z.object({name:ea.z.string(),description:ea.z.string().nullable(),skillMd:ea.z.string(),files:ea.z.array(r0),plugin:r1.optional(),pluginBundle:r2.optional()}).loose(),(h=O||(O={}))[h.UNSET=0]="UNSET",h[h.OK=1]="OK",h[h.ERROR=2]="ERROR";let r5="1.9.1",r3=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,r4=function(e){let t=new Set([e]),n=new Set,r=e.match(r3);if(!r)return()=>!1;let i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(null!=i.prerelease)return function(t){return t===e};
31function o(e){return n.add(e),!1}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;let r=e.match(r3);if(!r)return o(e);let s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(null!=s.prerelease||i.major!==s.major)return o(e);if(0===i.major)return i.minor===s.minor&&i.patch<=s.patch?(t.add(e),!0):o(e);return i.minor<=s.minor?(t.add(e),!0):o(e)}}(r5),r6=r5.split(".")[0],r8=Symbol.for(`opentelemetry.js.api.${r6}`),r9="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:e.g;function r7(e,t,n,r=!1){var i;let o=r9[r8]=null!=(i=r9[r8])?i:{version:r5};if(!r&&o[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(t.stack||t.message),!1}if(o.version!==r5){let t=Error(`@opentelemetry/api: Registration of version v${o.version} for ${e} does not match previously registered API v${r5}`);return n.error(t.stack||t.message),!1}return o[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${r5}.`),!0}function ie(e){var t,n;let r=null==(t=r9[r8])?void 0:t.version;if(r&&r4(r))return null==(n=r9[r8])?void 0:n[e]}function it(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${r5}.`);let n=r9[r8];n&&delete n[e]}let ir=new class e{constructor(t){const n=this;n._currentContext=t?new Map(t):new Map,n.getValue=e=>n._currentContext.get(e),n.setValue=(t,r)=>{let i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=t=>{let r=new e(n._currentContext);return r._currentContext.delete(t),r}}};class ii{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return io("debug",this._namespace,e)}error(...e){return io("error",this._namespace,e)}info(...e){return io("info",this._namespace,e)}warn(...e){return io("warn",this._namespace,e)}verbose(...e){return io("verbose",this._namespace,e)}}function io(e,t,n){let r=ie("diag");if(r)return r[e](t,...n)}(p=M||(M={}))[p.NONE=0]="NONE",p[p.ERROR=30]="ERROR",p[p.WARN=50]="WARN",p[p.INFO=60]="INFO",p[p.DEBUG=70]="DEBUG",p[p.VERBOSE=80]="VERBOSE",p[p.ALL=9999]="ALL";class is{static instance(){return this._instance||(this._instance=new is),this._instance}constructor(){function e(e){return function(...t){let n=ie("diag");if(n)return n[e](...t)}}const t=this;t.setLogger=(e,n={logLevel:M.INFO})=>{var r,i,o;if(e===t){let e=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!=(r=e.stack)?r:e.message),!1}"number"==typeof n&&(n={logLevel:n});let s=ie("diag"),a=function(e,t){function n(n,r){let i=t[n];return"function"==typeof i&&e>=r?i.bind(t):function(){}}return e<M.NONE?e=M.NONE:e>M.ALL&&(e=M.ALL),t=t||{},{error:n("error",M.ERROR),warn:n("warn",M.WARN),info:n("info",M.INFO),debug:n("debug",M.DEBUG),verbose:n("verbose",M.VERBOSE)}}(null!=(i=n.logLevel)?i:M.INFO,e);if(s&&!n.suppressOverrideMessage){let e=null!=(o=Error().stack)?o:"<failed to generate stacktrace>";s.warn(`Current logger will be overwritten from ${e}
31`),a.warn(`Current logger will overwrite one already registered from ${e}`)}return r7("diag",a,t,!0)},t.disable=()=>{it("diag",t)},t.createComponentLogger=e=>new ii(e),t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}}let ia="context",il=new class{active(){return ir}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}};class ic{static getInstance(){return this._instance||(this._instance=new ic),this._instance}setGlobalContextManager(e){return r7(ia,e,is.instance())}active(){return this._getContextManager().active()}with(e,t,n,...r){return this._getContextManager().with(e,t,n,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return ie(ia)||il}disable(){this._getContextManager().disable(),it(ia,is.instance())}}(f=I||(I={}))[f.NONE=0]="NONE",f[f.SAMPLED=1]="SAMPLED";let id="0000000000000000",iu="00000000000000000000000000000000",ih={traceId:iu,spanId:id,traceFlags:I.NONE};class ip{constructor(e=ih){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}let im=Symbol.for("OpenTelemetry Context Key SPAN");function ig(e){return e.getValue(im)||void 0}function iy(){return ig(ic.getInstance().active())}function ib(e,t){return e.setValue(im,t)}function iv(e){return e.deleteValue(im)}function ik(e,t){return ib(e,new ip(t))}function ix(e){var t;return null==(t=ig(e))?void 0:t.spanContext()}let iw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function iE(e,t){if("string"!=typeof e||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(0|iw[e.charCodeAt(t)])+(0|iw[e.charCodeAt(t+1)])+(0|iw[e.charCodeAt(t+2)])+(0|iw[e.charCodeAt(t+3)]);return n===t}function iT(e){var t,n;return iE(t=e.traceId,32)&&t!==iu&&iE(n=e.spanId,16)&&n!==id}function iS(e){return new ip(e)}let iC=ic.getInstance();class iA{startSpan(e,t,n=iC.active()){var r;if(null==t?void 0:t.root)return new ip;let i=n&&ix(n);return null!==(r=i)&&"object"==typeof r&&"spanId"in r&&"string"==typeof r.spanId&&"traceId"in r&&"string"==typeof r.traceId&&"traceFlags"in r&&"number"==typeof r.traceFlags&&iT(i)?new ip(i):new ip}startActiveSpan(e,t,n,r){let i,o,s;if(arguments.length<2)return;2==arguments.length?s=t:3==arguments.length?(i=t,s=n):(i=t,o=n,s=r);let a=null!=o?o:iC.active(),l=this.startSpan(e,i,a),c=ib(a,l);return iC.with(c,s,void 0,l)}}let i_=new iA;class iN{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}startSpan(e,t,n){return this._getTracer().startSpan(e,t,n)}startActiveSpan(e,t,n,r){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):i_}}let iO=new class{getTracer(e,t,n){return new iA}};class iM{getTracer(e,t,n){var r;return null!=(r=this.getDelegateTracer(e,t,n))?r:new iN(this,e,t,n)}getDelegate(){var e;return null!=(e=this._delegate)?e:iO}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){var r;return null==(r=this._delegate)?void 0:r.getTracer(e,t,n)}}let iI="trace";(class e{constructor(){this._proxyTracerProvider=new iM,this.wrapSpanContext=iS,this.isSpanContextValid=iT,this.deleteSpan=iv,this.getSpan=ig,this.getActiveSpan=iy,this.getSpanContext=ix,this.setSpan=ib,this.setSpanContext=ik}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(e){let t=r7(iI,this._proxyTracerProvider,is.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return ie(iI)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){it(iI,is.instance()),this._proxyTracerProvider=new iM}}).getInstance();let iD="pull",iR=["off","follow","full",iD],iz=["follow","full",iD],iL=Symbol.for("@inkeep/open-knowledge/field-registry"),iP=globalThis;void 0===iP[iL]&&(iP[iL]=ea.z.registry());let ij=iP[iL],i$={provider:ea.z.enum(["github"]).register(ij,{scope:"user",agentSettable:!1,reload:"boot",defaultScope:"user",description:"Declares that this git host is a GitHub Enterprise Server instance, so OpenKnowledge treats its remotes the way it treats github.com (OpenKnowledge credential handling, the push-permission check, share links, and the default host for `ok auth`). 'github' is the only accepted value today. A host that is not declared here and is not github.com is treated as a generic git remote, so OpenKnowledge leaves the machine's own git credentials alone and does not check push permission. Per-machine (user scope, `~/.ok/global.yml`); a value in a project's `.ok/config.yml` is ignored. The declaration takes effect when OpenKnowledge next starts."})},iF=Object.fromEntries(Object.entries(i$).map(([e,t])=>[e,t.optional().catch(void 0)])),iB=Object.fromEntries(Object.entries(i$).map(([e,t])=>[e,t.nullish()])),iH=ea.z.looseObject(iF).catch({});ea.z.record(ea.z.string(),ea.z.looseObject(i$).partial()),ea.z.looseObject({git:ea.z.looseObject({hosts:ea.z.record(ea.z.string(),ea.z.looseObject(iB).nullish()).nullish()}).nullish()});let iU=new Set(["sh","zsh","bash","c","cc","cpp","cxx","c++","h","hh","hpp","cs","css","less","scss","sass","diff","patch","feature","go","gql","graphql","ini","cfg","conf","properties","java","js","jsx","mjs","cjs","json","jsonc","kt","kts","lua","makefile","md","mdx","m","mm","pl","pm","php","phtml","py","pyi","pyx","r","rb","rs","sql","swift","ts","tsx","xml","yaml","yml"]),iV=new Set(["md","mdx","mmd","mermaid"]);[...iU,"txt","text","csv","tsv","log","toml","html","htm","svg","vue","svelte","astro","lock"].filter(e=>!iV.has(e));
31let iq=["image/jpeg","image/png","image/gif","image/webp","image/svg+xml"],iG=new Set(["png","jpg","jpeg","gif","webp","avif","svg"]),iW=new Set(["mp4","webm","mov","m4v","mkv"]),iK=new Set(["pdf"]),iJ=new Set(["mp3","wav","ogg","m4a","flac","aac","opus"]),iY=new Set(["pdf","docx","xlsx","pptx","doc","xls","ppt","zip","7z","tar","gz","rar","csv","tsv","rtf","json","yaml","yml","xml","txt","pages","numbers","key","odt","ods","odp","epub","mobi"]),iX=new Set(["png","jpg","jpeg","gif","webp","avif","svg","apng","heic","heif","tiff","bmp","ico","pdf","mp4","webm","mov","m4v","mkv","avi","flv","wmv","mpeg","mpg","mp3","wav","ogg","m4a","flac","aac","opus","zip","7z","tar","gz","rar","woff","woff2","ttf","otf","eot","docx","xlsx","pptx","doc","xls","ppt","odt","ods","odp","pages","numbers","key","epub","mobi","csv","tsv","txt","rtf","json","yaml","yml","xml","toml","lock","gpx","html","htm"]),iQ=new Set(["png","jpg","jpeg","gif","webp","avif","apng","heic","heif","tiff","bmp","ico","svg","pdf","mp4","webm","mov","m4v","mkv","mp3","wav","ogg","m4a","flac","aac","opus","json","toml","lock"]),iZ=new Set(["png","jpg","jpeg","gif","webp","avif","svg","pdf","mp4","webm","mov","m4v","mkv","mp3","wav","ogg","m4a","flac","aac","opus","docx","xlsx","pptx","doc","xls","ppt","zip","7z","tar","gz","rar","csv","tsv","rtf","json","yaml","yml","xml","txt","pages","numbers","key","odt","ods","odp","epub","mobi"]),i0=["png","jpg","jpeg","gif","webp","avif"],i1=["mp4","webm","mov","m4v"],i2=["mp3","wav","ogg","m4a","flac","aac","opus"],i5=["pdf"];function i3(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}i3("SIDEBAR_IMAGE_ASSET_EXTENSIONS",i0,iG),i3("SIDEBAR_VIDEO_ASSET_EXTENSIONS",i1,iW),i3("SIDEBAR_AUDIO_ASSET_EXTENSIONS",i2,iJ),i3("SIDEBAR_PDF_ASSET_EXTENSIONS",i5,iK),i3("FILE_ATTACHMENT_EXTENSIONS",[...iY],iZ),i3("WIKI_EMBED_EXTENSIONS",[...iZ],iX),i3("SIDEBAR_RENDERABLE_ASSET_EXTENSIONS",[...new Set([...i0,...i1,...i2,...i5,"json","toml","lock"])],iQ),[...iX,...new Set(["base","canvas"]),...new Set(["mmd","mermaid"]),...new Set(["excalidraw"])];let i4=["en","zh-Hans","zh-Hant","hi","es","ar","fr","bn","pt-BR","id","ur","ko"],i6=new Set(["ar","ur"]);i4.filter(e=>!i6.has(e));let i8="warning",i9=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"],i7={base00:"default background",base01:"alt background â cards, popovers, sidebar",base02:"selection background, borders",base03:"comments, invisibles",base04:"secondary text",base05:"default foreground",base06:"light foreground",base07:"lightest foreground",base08:"red â variables, tags, diff deleted",base09:"orange â numbers, constants",base0A:"yellow â classes, search highlight",base0B:"green â strings, diff inserted",base0C:"cyan â support, escapes, quotes",base0D:"blue â functions, headings, accent",base0E:"magenta â keywords, storage",base0F:"deprecated markers, embedded tags"},oe=/^#[0-9a-fA-F]{6}$/,ot=/\P{White_Space}/u;function on(e){return"string"==typeof e&&oe.test(e)}function or(e,t){let n=ou(e),r=ou(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function oi(e,t){return t.reduce((t,n)=>or(e,n)>or(e,t)?n:t)}function oo(e,t){let n=oi(e,t);return or(e,n)>=4.5?n:oi(e,["#000000","#ffffff"])}function oa(e,t,n){if(or(e,t)>=n)return t;let r=oi(e,["#000000","#ffffff"]);for(let i=1;i<=255;i+=1){let o=od(t,r,i/255);if(or(e,o)>=n)return o}return console.warn(`[base16] No foreground reaches a ${n}:1 contrast ratio against ${e}; using the highest-contrast endpoint`),r}let ol={black:"base00",red:"base08",green:"base0B",yellow:"base0A",blue:"base0D",magenta:"base0E",cyan:"base0C",white:"base05",brightBlack:"base03",brightRed:"base08",brightGreen:"base0B",brightYellow:"base0A",brightBlue:"base0D",brightMagenta:"base0E",brightCyan:"base0C",brightWhite:"base07"},oc=Object.keys(ol);function od(e,t,n){let r=on(e)?e:"#000000",i=on(t)?t:"#000000",o=Math.min(1,Math.max(0,n)),s="#";for(let e=0;e<3;e++){let t=Number.parseInt(r.slice(1+2*e,3+2*e),16);
31s+=Math.round(t+(Number.parseInt(i.slice(1+2*e,3+2*e),16)-t)*o).toString(16).padStart(2,"0")}return s}function ou(e){let t=on(e)?e:"#000000",n=e=>{let n=Number.parseInt(t.slice(1+2*e,3+2*e),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(1)+.0722*n(2)}function oh(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>{let e,t;return t=od((e=n.palette).base02,"dark"===n.variant?"#ffffff":"#000000",.04),{background:e.base00,foreground:e.base05,card:e.base01,"card-foreground":e.base05,popover:e.base01,"popover-foreground":e.base05,primary:e.base0D,"primary-foreground":e.base00,secondary:e.base01,"secondary-foreground":e.base05,muted:e.base01,"muted-foreground":e.base04,accent:e.base02,"accent-foreground":e.base05,destructive:e.base08,border:e.base02,input:e.base02,ring:e.base0D,"selection-soft":e.base02,"chart-1":e.base0D,"chart-2":e.base0B,"chart-3":e.base0A,"chart-4":e.base0E,"chart-5":e.base08,sidebar:e.base01,"sidebar-foreground":e.base05,"sidebar-primary":e.base0D,"sidebar-primary-foreground":e.base00,"sidebar-accent":e.base02,"sidebar-accent-foreground":e.base0D,"sidebar-hover":e.base02,"sidebar-hover-foreground":oo(e.base02,[e.base00,e.base05,e.base07]),"sidebar-hover-muted-foreground":oa(e.base02,e.base04,4.5),"sidebar-hover-destructive-foreground":oa(e.base02,e.base08,3),"sidebar-selected":t,"sidebar-selected-foreground":oo(t,[e.base00,e.base05,e.base07]),"sidebar-selected-muted-foreground":oa(t,e.base04,4.5),"sidebar-selected-destructive-foreground":oa(t,e.base08,3),"sidebar-border":e.base02,"sidebar-ring":e.base0D,"syntax-keyword":e.base0E,"syntax-tag":e.base08,"syntax-attr":e.base0D,"syntax-string":e.base0B,"syntax-number":e.base09,"syntax-atom":e.base0C,"syntax-comment":e.base03,"syntax-func":e.base0D,"syntax-var":e.base08,"syntax-type":e.base0A,"syntax-operator":e.base05,"syntax-meta":e.base0F,"syntax-bg":e.base01,"link-color":e.base0D,"broken-link-color":e.base08,"lint-warning-color":e.base0A,"lint-error-color":e.base08,"diff-added":e.base0B,"diff-removed":e.base08,"diff-modified":e.base0D,"callout-note-color":e.base0D,"callout-info-color":e.base0D,"callout-todo-color":e.base0D,"callout-abstract-color":e.base0C,"callout-tip-color":e.base0B,"callout-success-color":e.base0B,"callout-important-color":e.base0E,"callout-example-color":e.base0E,"callout-question-color":e.base0E,"callout-warning-color":e.base0A,"callout-caution-color":e.base09,"callout-danger-color":e.base09,"callout-failure-color":e.base08,"callout-bug-color":e.base08,"callout-quote-color":e.base03,...function(e){let t={};for(let n of oc)t[`ansi-${n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=e[ol[n]];return t}(e)}}}}function op(e,t){return{id:e,label:t,kind:"system"}}let of=[op("default","Default"),oh("dracula","Dracula",{name:"Dracula",author:"clach04 (https://github.com/clach04)",variant:"dark",palette:{base00:"#282a36",base01:"#21222c",base02:"#44475a",base03:"#6272a4",base04:"#9ea8c7",base05:"#f8f8f2",base06:"#f8f8f2",base07:"#ffffff",base08:"#ff5555",base09:"#ffb86c",base0A:"#f1fa8c",base0B:"#50fa7b",base0C:"#8be9fd",base0D:"#bd93f9",base0E:"#ff79c6",base0F:"#993333"}}),oh("catppuccin-frappe","Catppuccin Frappé",{name:"Catppuccin Frappé",author:"https://github.com/catppuccin/catppuccin",variant:"dark",palette:{base00:"#303446",base01:"#292c3c",base02:"#414559",base03:"#51576d",base04:"#626880",base05:"#c6d0f5",base06:"#f2d5cf",base07:"#babbf1",base08:"#e78284",base09:"#ef9f76",base0A:"#e5c890",base0B:"#a6d189",base0C:"#81c8be",base0D:"#8caaee",base0E:"#ca9ee6",base0F:"#eebebe"}}),oh("catppuccin-latte","Catppuccin Latte",{name:"Catppuccin Latte",author:"https://github.com/catppuccin/catppuccin",variant:"light",palette:{base00:"#eff1f5",base01:"#e6e9ef",base02:"#ccd0da",base03:"#bcc0cc",base04:"#acb0be",base05:"#4c4f69",base06:"#dc8a78",base07:"#7287fd",base08:"#d20f39",base09:"#fe640b",base0A:"#df8e1d",base0B:"#40a02b",base0C:"#179299",base0D:"#1d62ec",base0E:"#8839ef",base0F:"#dd7878"}}),oh("monokai","Monokai",{name:"Monokai",author:"Wimer Hazenberg (http://www.monokai.nl)",variant:"dark",palette:{base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"}}),oh("gruvbox","Gruvbox",{name:"Gruvbox dark, medium",author:"Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)",variant:"dark",palette:{base00:"#282828",base01:"#3c3836",base02:"#504945",base03:"#665c54",base04:"#bdae93",base05:"#d5c4a1",base06:"#ebdbb2",base07:"#fbf1c7",base08:"#fb4934",base09:"#fe8019",base0A:"#fabd2f",base0B:"#b8bb26",base0C:"#8ec07c",base0D:"#83a598",base0E:"#d3869b",base0F:"#d65d0e"}}),oh("solarized","Solarized",{name:"Solarized Dark",author:"Ethan Schoonover (modified by aramisgithub)",variant:"dark",palette:{base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#2995e1",base0E:"#6c71c4",base0F:"#d33682"}}),op("custom","Custom")],om=of.map(e=>e.id),og=/^[a-z0-9-]{1,32}$/;function oy(){return om.filter(e=>"default"!==e&&"custom"!==e).map(e=>`'${e}'`).join(", ")}of.map(e=>[e.id,e]);let ob=Object.freeze(["authorization","auth.token","auth.bearer","cookie","set-cookie","x-api-key","password","secret"]),ov="https://api.openai.com/v1",ok="text-embedding-3-small",ox=Object.freeze(["127.0.0.1"]);ea.z.looseObject({content:ea.z.looseObject({dir:ea.z.string().register(ij,{scope:"project",agentSettable:!1,reload:"boot",defaultScope:"project",description:"Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that c
31ontains .ok/). Defaults to the project root. Exclude paths with .okignore. Read at server start; changing it requires a restart."}).default("."),attachmentFolderPath:ea.z.string().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'."}).refine(function(e){let t,n=""===(t=e.trim())?"./":t;return!(n.includes("\0")||n.includes("\\"))&&("/"===n||!(n.startsWith("/")||/^[A-Za-z]:/.test(n)||n.split("/").some(e=>".."===e)))},{message:"Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root)."}).default("./")}).default({dir:".",attachmentFolderPath:"./"}),appearance:ea.z.looseObject({theme:ea.z.enum(["light","dark","system"]).register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) â not shared with the project."}).optional(),language:ea.z.enum(["system",...i4]).register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Interface language. 'system' follows the operating system. A personal preference (user scope) â not shared with the project, and never applied to document content."}).optional(),colorThemeLight:ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${oy()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) â not shared with the project.`}).regex(og,{message:"Theme id must be lowercase letters, digits, and hyphens, 1â32 characters (e.g. 'dracula', 'custom', or a saved theme id)."}).optional(),colorThemeDark:ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:`IDE color palette applied in dar
31k mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${oy()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) â not shared with the project.`}).regex(og,{message:"Theme id must be lowercase letters, digits, and hyphens, 1â32 characters (e.g. 'dracula', 'custom', or a saved theme id)."}).optional(),colorTheme:ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A short theme id (lowercase letters, digits, and hyphens; max 32 characters); an id no palette matches falls back to 'default'. A personal preference (user scope) â not shared with the project."}).regex(og,{message:"Theme id must be lowercase letters, digits, and hyphens, 1â32 characters (e.g. 'dracula', 'custom', or a saved theme id)."}).optional(),colorThemeEnabled:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Whether the Themes plugin appears in Settings â Plugins. A personal preference (user scope). Default on."}).optional(),customTheme:ea.z.looseObject({name:ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Custom theme: the scheme's display name."}).optional(),author:ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Custom theme: the scheme's author credit, carried through from an imported base16 scheme."}).optional(),variant:ea.z.enum(["dark","light"]).register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted."}).optional(),...Object.fromEntries(i9.map(e=>[e,ea.z.string().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:`Custom theme: base16 ${e} â ${i7[e]}, as a #rrggbb hex string.`}).optional()]))}).optional(),preview:ea.z.looseObject({autoOpen:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope)."}).default(!0)}).default({autoOpen:!0}),sidebar:ea.z.looseObject({showHiddenFiles:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) â not shared with collaborators."}).default(!1),showOnlyMarkdownFiles:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) â not shared with collaborators."}).default(!1),showSkillsSection:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) â not shared with collaborators."}).default(!0),showOkFolders:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) â not shared with collaborators."}).default(!1),showSkillGroups:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Group skills in the sidebar by where they came from â the publisher they were imported from, or the plugin that ships them. Skills you authored stay ungrouped at the top of their scope. Per-machine (project-local) â not shared with collaborators."}).default(!0),pinnedProjectSkills:ea.z.array(ea.z.string()).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Project-scope skills pinned to the top of the Skills sidebar, by name. A pinned skill also keeps its normal row, so a provenance group still lists everything from its source. Per-machine (project-local) â not shared with collaborators."}).default([]),pinnedGlobalSkills:ea.z.array(ea.z.string()).register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Global-scope skills pinned to the top of the Skills sidebar, by name. Stored per USER rather than per project, so a pinned global skill follows you into every project."}).default([])}).optional()}).default({preview:{autoOpen:!0}}),editor:ea.z.looseObject({wordWrap:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope)."}).default(!0),previewTabs:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Tur
31n off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope)."}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:ea.z.looseObject({autoApproveOkTools:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Auto-approve OpenKnowledge's own tools for agents launched from the built-in terminal (plus `ok open` on Claude) and for in-app Agents-panel chats with any ACP agent. Destructive tools (delete/move/share/install/import) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:ea.z.looseObject({mode:ea.z.enum(iR).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"What this machine syncs on a schedule for this project: 'off' (Manual â nothing scheduled; the manual pull/push actions still work), 'follow' (Auto, pull only â scheduled pulls, never a scheduled push; 'pull' is accepted as a legacy alias), or 'full' (Auto, pull and push â bidirectional). Explicit user-triggered pushes work in every mode. null = not chosen yet (onboarding asks). Per-machine (project-local) â not shared. Supersedes the legacy autoSync.enabled boolean."}).nullable().default(null),enabled:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) â not shared."}).nullable().default(null),resumeMode:ea.z.enum(iz).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared."}).optional(),pullIntervalSeconds:ea.z.number().int().min(30).max(3600).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Seconds between scheduled pulls while autoSync.mode is follow or full (default 30). An unauthenticated follower is additionally floored to the anonymous poll minimum, so a lower value there has no effect. Per-machine (project-local) â not shared."}).optional().catch(void 0),pushIntervalSeconds:ea.z.number().int().min(30).max(3600).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Seconds between scheduled pushes while autoSync.mode is full (default 60). Ignored in every other mode, which never pushes on a schedule. Each cycle with pending edits authors a commit, so a shorter interval means more, smaller commits in the repo's shared history. Per-machine (project-local) â not shared."}).optional().catch(void 0),default:ea.z.union([ea.z.boolean(),ea.z.enum(iR)]).register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it."}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),git:ea.z.looseObject({hosts:ea.z.record(ea.z.string(),iH).register(ij,{scope:"user",agentSettable:!1,reload:"boot",defaultScope:"user",description:"Per-git-host declarations, keyed by hostname (for example ghes.example.com). Each entry says how OpenKnowledge should treat remotes on that host; today the only key an entry carries is `provider`. Hosts absent from this map are treated as generic git remotes. Per-machine (user scope, `~/.ok/global.yml`); a value in a project's `.ok/config.yml` is ignored. Declarations take effect when OpenKnowledge next starts."}).default({}).catch({})}).default({hosts:{}}),terminal:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) â never shared via git, clone, or sync."}).nullable().default(null),shell:ea.z.string().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Absolute Windows shell executable override for the in-app terminal. PowerShell, cmd.exe, and Git Bash support OpenKnowledge-managed launches (agent chat tabs and fixed commands such as Resolve in terminal or Install Slidev) and dropped-file path insertion. A different existing executable remains usable for plain terminal tabs and shows a capability notice; requested agent and command launches open only the plain shell without running the agent or command, and dropped-file paths are refused. Empty values use automatic shell discovery. Per-machine (project-local), human-managed, and never shared via git, clone, or sync."}).optional()}).default({enabled:null}),slides:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Whether the Slides plugin appears in Settings â Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:ea.z.looseObject({localSink:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only â never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:ea.z.looseObject({maxBytes:ea.z.number().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB)."}).default(0x3200000)}).default({maxBytes:0x3200000}),logs:ea.z.looseObject({maxBytes:ea.z.number().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB)."}).default(0x1900000)}).default({maxBytes:0x1900000}),attributeDenylist:ea.z.array(ea.z.string()).register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist."}).default([...ob])}).default({enabled:!0,spans:{maxBytes:0x3200000},logs:{maxBytes:0x1900000},attributeDenylist:[...ob]}),skillInstallReports:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"user",agentSettable:!1,reload:"live",defaultScope:"user",description:"Report skill installs to skills.sh so a published skill shows an accurate install c
31ount. Sends the skill name, its source repo, and which agent tools it was installed for â never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off."}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:0x3200000},logs:{maxBytes:0x1900000},attributeDenylist:[...ob]},skillInstallReports:{enabled:!0}}),lossCapture:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only â never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:ea.z.number().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB)."}).default(0xc00000)}).default({enabled:!0,maxBytes:0xc00000}),bridge:ea.z.looseObject({backgroundThrottle:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0}),deferGuard:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0}),lossDetector:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only â never blocks a write. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0}),fixedPoint:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Bound the Y.TextâWYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0}),preDrain:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Before an agent write or und
31o rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos â a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0}),flushOnHide:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON â disable only to isolate a suspected regression."}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:ea.z.looseObject({semantic:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider â content egress. Default OFF. Per-machine (project-local) â not shared with collaborators."}).default(!1),baseUrl:ea.z.string().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here â set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(ov),model:ea.z.string().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions)."}).default(ok),dimensions:ea.z.number().int().positive().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response â that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus."}).optional(),similarityFloor:ea.z.number().min(0).max(1).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:'Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.'}).optional(),maxBatchSize:ea.z.number().int().min(1).max(2048).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Maximum number of text chunks sent in one indexing request (1â2048, default 96). The ceiling follows OpenAI's input-array limit; other providers may impose different limits. Larger requests may
31still be split by the character budget. Changing it preserves cached vectors and document chunking; it applies to the next indexing pass. Invalid values use the default and are reported by ok config validate and server logs."}).default(96).catch(96),maxBatchChars:ea.z.number().int().min(1).max(16384e3).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Approximate cumulative character budget per indexing request (1â16384000, default 96000). A single chunk can exceed this budget. OpenAI separately caps total input at 300000 tokens per request; this character budget does not enforce that limit, and high values can produce rejected requests. Other providers have their own limits. Changing it preserves cached vectors and document chunking; it applies to the next indexing pass. Invalid values use the default and are reported by ok config validate and server logs."}).default(96e3).catch(96e3),docTimeoutMs:ea.z.number().int().min(1).max(6e5).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Timeout in milliseconds for each indexing request attempt (1â600000, default 30000). A request can retry four times, and a failed grouped request can trigger individual-document requests. There is no total indexing-pass deadline: large timeouts can delay newly queued work for hours. The query timeout remains 8 seconds per attempt. Changing it preserves cached vectors and applies to the next indexing pass; an in-progress pass keeps its current timeout. Invalid values use the default and are reported by ok config validate and server logs."}).default(3e4).catch(3e4)}).default({enabled:!1,baseUrl:ov,model:ok,maxBatchSize:96,maxBatchChars:96e3,docTimeoutMs:3e4})}).default({semantic:{enabled:!1,baseUrl:ov,model:ok,maxBatchSize:96,maxBatchChars:96e3,docTimeoutMs:3e4}}),contentRules:ea.z.looseObject({markdownlint:ea.z.object({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether the markdownlint plugin (body rules) contributes diagnostics."}).default(!1)}).default({enabled:!1}),frontmatter:ea.z.object({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics."}).default(!1),schemas:ea.z.array(ea.z.object({appliesTo:ea.z.union([ea.z.string(),ea.z.array(ea.z.string())]).optional(),file:ea.z.string(),enabled:ea.z.boolean().optional()})).register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path)."}).default([])}).default({enabled:!1,schemas:[]}),okf:ea.z.object({enabled:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether the OKF plugin (Open Knowledge Format portability + conformance rules) contributes diagnostics. Advisory warnings; never blocks a write."}).default(!1),rules:ea.z.record(ea.z.string(),ea.z.boolean()).register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Per-rule opt-outs for the OKF plugin, keyed by rule id (e.g. no-wiki-links). Omit a rule to leave it enabled; set false to silence it while keeping the plugin on."}).optional(),generate:ea.z.object({index:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild."}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:ea.z.looseObject({links:ea.z.enum(["off","warning","error"]).register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity."}).default(i8),fileTreeIndicators:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether the file tree tints and badges files that have validation problems."}).default(!0),suppressLogLinkAdvisories:ea.z.boolean().register(ij,{scope:"project",agentSettable:!1,reload:"live",defaultScope:"project",description:"Whether unresolved links in the reserved change-history documents (lowercase-stemmed log.md / log.mdx at any depth, where the extension's case does not matter and the stem's does) are omitted from broken-link advisories: the Problems panel, file-tree indicators, source diagnostics, audits, and agent write/edit results. Default true. Raw link views still show them, and LOG.md, Log.md, and every other stem spelling are ordinary documents."}).default(!0)}).default({links:i8,fileTreeIndicators:!0,suppressLogLinkAdvisories:!0}),linkPreviews:ea.z.looseObject({enabled:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata â outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) â not shared with collaborators. Previews of links to other documents in this project are read from the local index with
31no network request and are always on."}).default(!0)}).default({enabled:!0}),server:ea.z.looseObject({port:ea.z.number().int().min(1).max(65535).register(ij,{scope:"project",agentSettable:!1,reload:"boot",defaultScope:"project",description:"TCP port the server listens on. Unset by default: a local start picks a free port dynamically, and deployment platforms inject the PORT environment variable instead. Read at server start; changing it requires a restart."}).optional(),bind:ea.z.array(ea.z.string().min(1)).min(1).register(ij,{scope:"project-local",agentSettable:!1,reload:"boot",defaultScope:"project-local",description:"Addresses the server binds, e.g. [127.0.0.1] or [0.0.0.0]. Default loopback-only ([127.0.0.1]): nothing off this machine can connect. A non-loopback bind additionally requires the server.allowExternal consent interlock. Per-machine (project-local): a value committed to .ok/config.yml is ignored, so one machine exposing the server can never break local clones for the rest of the team â the exposing host sets it via OK_BIND, --bind, or .ok/local/config.yml. Lists replace, never merge. Read at server start; changing it requires a restart."}).default([...ox]),externalUrl:ea.z.url({protocol:/^https?$/}).regex(/^https?:\/\//).register(ij,{scope:"project",agentSettable:!1,reload:"boot",defaultScope:"project",description:"Canonical external origin the server is reached at, e.g. https://kb.example.com â its host joins the Host/Origin allowlists (external-Host + CORS admission). Unset by default: the server admits only loopback Hosts. Setting it declares external exposure, which additionally requires the server.allowExternal consent interlock. Read at server start; changing it requires a restart."}).optional(),allowExternal:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"boot",defaultScope:"project-local",description:"Exposure consent interlock. A non-loopback server.bind without allowExternal: true is refused at boot with a one-line fix; a server.externalUrl without it boots (a committed externalUrl never arms exposure on clones â but it is project-scoped, so its host still joins the Host/Origin allowlists there), but requests carrying forwarding headers (X-Forwarded-For etc.) are refused until consent is given â proxy tolerance requires both keys. Default off. The server has no authentication of its own, so only consent behind an authenticating edge. Per-machine (project-local) â consent never travels via git, clone, or share; containers consent via the environment instead."}).default(!1),openBrowser:ea.z.boolean().register(ij,{scope:"project-local",agentSettable:!1,reload:"boot",defaultScope:"project-local",description:"Open the UI in a browser when the server starts. Default derived: true when every bind address is loopback (a laptop start pops the UI), false otherwise (a container or exposed bind is headless and must never try). Acts once at start. Per-machine (project-local) â not shared."}).optional(),idleShutdown:ea.z.union([ea.z.literal("off"),ea.z.string().regex(/^[1-9]\d*(s|m|h)$/)]).register(ij,{scope:"project-local",agentSettable:!1,reload:"live",defaultScope:"project-local",description:"Shut the server down after this long with no activity: a duration like '30m' (positive integer with unit s, m, or h), or 'off'. Default derived: '30m' for a loopback-only, unexposed server; 'off' otherwise â a non-loopback bind, or a loopback bind declared externally reachable (server.allowExternal + server.externalUrl), stays up, because a remote agent keeps it busy over /mcp, which the idle timer does not count. Residual case the derivation cannot see: a loopback server reached by remote agents with no server.externalUrl (e.g. behind a same-box reverse proxy) still idles at 30m â set 'off' by hand. Reloadable â a valid change applies without a restart. Per-machine (project-local) â not shared."}).optional()}).default({bind:[...ox],allowExternal:!1})});let ow=ea.z.object({file:ea.z.string(),line:ea.z.number().int().min(1),column:ea.z.number().int().min(1),snippet:ea.z.string().optional()}),oE=ea.z.object({path:ea.z.array(ea.z.union([ea.z.string(),ea.z.number()])),message:ea.z.string(),issueC
31ode:ea.z.string(),params:ea.z.record(ea.z.string(),ea.z.unknown()).optional(),source:ow.optional()}),oT=ea.z.enum(["user","project","project-local","either"]),oS=ea.z.enum(["user","project","project-local"]),oC=ea.z.object({code:ea.z.literal("YAML_PARSE"),detail:ea.z.string()}),oA=ea.z.object({code:ea.z.literal("UNREADABLE"),detail:ea.z.string()}),o_=ea.z.object({code:ea.z.literal("SCHEMA_INVALID"),issues:ea.z.array(oE)}),oN=ea.z.object({code:ea.z.literal("REMOVED_KEY"),path:ea.z.array(ea.z.string()),redirect:ea.z.string(),source:ow.optional()}),oO=ea.z.object({path:ea.z.array(ea.z.string()),message:ea.z.string(),source:ow.omit({snippet:!0}).optional()}),oM=ea.z.object({code:ea.z.literal("VALUE_FALLBACK"),issues:ea.z.array(oO)}),oI=ea.z.discriminatedUnion("code",[oC,o_,oA,ea.z.object({code:ea.z.literal("SCOPE_VIOLATION"),path:ea.z.array(ea.z.string()),expectedScope:oT,actualScope:oS}),ea.z.object({code:ea.z.literal("NOT_AGENT_SETTABLE"),path:ea.z.array(ea.z.string())}),ea.z.object({code:ea.z.literal("MIXED_SCOPE"),paths:ea.z.array(ea.z.object({path:ea.z.array(ea.z.string()),scope:oS}))}),oN,ea.z.object({code:ea.z.literal("NOT_SYNCED"),detail:ea.z.string()}),ea.z.object({code:ea.z.literal("WRITE_ERROR"),detail:ea.z.string()}),ea.z.object({code:ea.z.literal("OKIGNORE_INVALID"),detail:ea.z.string(),lineNumber:ea.z.number().int().min(1).optional()}),ea.z.object({code:ea.z.literal("UNKNOWN"),message:ea.z.string().optional()})]);ea.z.discriminatedUnion("code",[oN,oM,oC,o_,oA]);let oD=ea.z.discriminatedUnion("code",[ea.z.object({code:ea.z.literal("VALUE_FALLBACK"),scope:oS,file:ea.z.string(),issues:ea.z.array(oO.omit({source:!0}).extend({line:ow.shape.line.optional(),column:ow.shape.column.optional()}))}),ea.z.object({code:ea.z.literal("REMOVED_KEY"),scope:oS,file:ea.z.string(),path:ea.z.array(ea.z.string()),redirect:ea.z.string()}),ea.z.object({code:ea.z.literal("YAML_PARSE"),scope:oS,file:ea.z.string()}),ea.z.object({code:ea.z.literal("SCHEMA_INVALID"),scope:oS,file:ea.z.string()}),ea.z.object({code:ea.z.literal("UNREADABLE"),scope:oS,file:ea.z.string()})]);ea.z.object({diagnostics:ea.z.array(oD)}),oI.options.map(e=>e.shape.code.value);let oR=ea.z.looseObject({code:ea.z.string(),message:ea.z.string().optional()}),oz=ea.z.union([oI,oR]),oL="Run `ok config migrate` to strip the obsolete key automatically, or remove it by hand.";["content.include has been removed. For subdirectory scoping, set content.dir in .ok/config.yml instead. For pattern-based filtering, use .okignore (gitignore syntax â exclude-only; do not copy include patterns directly).",oL].join(" "),["Move these patterns to .okignore at the project root (gitignore syntax, 1:1 migration).",oL].join(" "),["folders is no longer a top-level config field. A folder's own frontmatter (open-shape, like a doc's) lives in nested `<folder>/.ok/frontmatter.yml`; new-doc starting properties come from templates in `<folder>/.ok/templates/`. Edit via the folder overview in the editor sidebar, or `edit({ folder: { path, frontmatter } })` via the MCP.",oL].join(" "),["appearance.editorModeDefault was removed and is never read â new docs always open in WYSIWYG; toggle mode via the editor mode button.",oL].join(" "),["streaming uploads have no user-facing cap; the value is hardcoded in @inkeep/open-knowledge-core.",oL].join(" "),["Use the OPEN_KNOWLEDGE_GITHUB_CLIENT_ID environment variable instead.",oL].join(" "),["Use server.bind in .ok/config.yml instead â a list of bind addresses, e.g. [127.0.0.1]; a non-loopback bind additionally requires server.allowExternal. The --bind CLI flag and HOST environment variable also remain available.",oL].join(" "),["remote.url has been removed. Use server.externalUrl in .ok/config.yml instead (the public origin your tunnel serves).",oL].join(" "),["remote.port has been removed. Use server.port in .ok/config.yml instead.",oL].join(" "),["server.publicUrl has been removed. Use server.externalUrl in .ok/config.yml instead (the same key under its current name).",oL].join(" "),["This behavior was removed; the value is hardcoded.",oL].join(" "),["To disable MCP auto-start, set OK_MCP_AUTOSTART=0.",oL].join(" "),["This value is hardcoded in @inkeep/open-knowledge-core.",oL].join(" "),["This value is hardcoded in @inkeep/open-knowledge-core.",oL].join(" "),["The search result cap is hardcoded in @inkeep/open-knowledge-core; this config key was removed.",oL].join(" "),["preview URLs now resolve only to the running server â start one with `ok start`.",oL].join(" "),["preview.scriptSrc has been removed. The code-block preview iframe now runs a fixed open network policy (it is no longer configurable).",oL].join(" "),["appearance.sidebar.showAllFiles has been removed. The sidebar lists every file on disk by default; dot-prefixed entries are gated by appearance.sidebar.showHiddenFiles, and appearance.sidebar.showOnlyMarkdownFiles scopes the tree down to markdown documents as a per-machine view preference.",oL].join(" ");let oP=["local","worktrees"],oj=[...oP,"cache","tmp"],o$=new Set(oP);function oF(e){return e&&"object"==typeof e?"position"in e||"type"in e?oH(e.position):"start"in e||"end"in e?oH(e):"line"in e||"column"in e?oB(e):"":""}function oB(e){return oU(e&&e.line)+":"+oU(e&&e.column)}function oH(e){return oB(e&&e.start)+"-"+oB(e&&e.end)}function oU(e){return e&&"number"==typeof e?e:1}oj.filter(e=>!o$.has(e));
31class oV 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 s=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=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=s?s.line:void 0,this.name=oF(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}}oV.prototype.file="",oV.prototype.name="",oV.prototype.reason="",oV.prototype.message="",oV.prototype.stack="",oV.prototype.column=void 0,oV.prototype.line=void 0,oV.prototype.ancestors=void 0,oV.prototype.cause=void 0,oV.prototype.fatal=void 0,oV.prototype.place=void 0,oV.prototype.ruleId=void 0,oV.prototype.source=void 0;var oq=e.i(353444);function oG(e){this.content=e}function oW(e){return e>=56320&&e<57344}function oK(e){return e>=55296&&e<56320}oG.prototype={constructor:oG,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return -1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new oG(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new oG(n)},addToStart:function(e,t){return new oG([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new oG(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new oG(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=oG.from(e)).size?new oG(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=oG.from(e)).size?new oG(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=oG.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},oG.from=function(e){if(e instanceof oG)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new oG(t)};class oJ{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new oJ(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let s=this.content[i],a=o+s.nodeSize;a>e&&((o<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),r+=s.nodeSize),o=a}return new oJ(n,r)}cutByIndex(e,t){return e==t?oJ.empty:0==e&&t==this.content.length?this:new oJ(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;
31let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new oJ(r,i)}addToStart(e){return new oJ([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new oJ(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,n=0;for(;e[n]==t[n];n++)r++;return n&&n<e.length&&n<t.length&&oK(e.charCodeAt(n-1))&&oW(e.charCodeAt(n))&&r--,r}if(o.content.size||s.content.size){let t=e(o.content,s.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let a=t.child(--o),l=n.child(--s),c=a.nodeSize;if(a==l){r-=c,i-=c;continue}if(!a.sameMarkup(l))return{a:r,b:i};if(a.isText&&a.text!=l.text){let e=a.text,t=l.text,n=e.length,o=t.length;for(;n>0&&o>0&&e[n-1]==t[o-1];)n--,o--,r--,i--;return n&&o&&n<e.length&&oK(e.charCodeAt(n-1))&&oW(e.charCodeAt(n))&&(r++,i++),{a:r,b:i}}if(a.content.size||l.content.size){let t=e(a.content,l.content,r-1,i-1);if(t)return t}r-=c,i-=c}}(this,e,t,n)}findIndex(e){if(0==e)return oX(0,e);if(e==this.size)return oX(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return oX(t+1,r);return oX(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return oJ.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return oJ.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return oJ.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new oJ(t||e,n)}static from(e){if(!e)return oJ.empty;if(e instanceof oJ)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new oJ([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}oJ.empty=new oJ([],0);let oY={index:0,offset:0};function oX(e,t){return oY.index=e,oY.offset=t,oY}function oQ(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!oQ(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!oQ(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class oZ{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&oQ(this.attrs,e.attrs)}
vendor: 6,083 bytes, line 31
31toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return oZ.none;if(e instanceof oZ)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}oZ.none=[];class o0 extends Error{}class o1{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i,o,s){let{index:a,offset:l}=t.findIndex(n),c=t.maybeChild(a);if(l==n||c.isText)return s&&i<=0&&o<=0&&!s.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));let d=e(c.content,n-l-1,r,0==a?i-1:0,a==t.childCount-1?o-1:0,c);return d&&t.replaceChild(a,c.copy(d))}(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new o1(n,this.openStart,this.openEnd)}removeBetween(e,t){return new o1(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),s=t.maybeChild(i),{index:a,offset:l}=t.findIndex(r);if(o==n||s.isText){if(l!=r&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return o1.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new o1(oJ.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new o1(e,n,r)}}function o2(e,t){if(!t.type.compatibleContent(e.type))throw new o0("Cannot join "+t.type.name+" onto "+e.type.name)}function o5(e,t,n){let r=e.node(n);return o2(r,t.node(n)),r}function o3(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function o4(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(o3(e.nodeAfter,r),o++));for(let e=o;e<s;e++)o3(i.child(e),r);t&&t.depth==n&&t.textOffset&&o3(t.nodeBefore,r)}function o6(e,t){if(!e.type.validContent(t))throw new o0("Invalid content for node "+e.type.name);return e.copy(t)}function o8(e,t,n){let r=[];return o4(null,e,n,r),e.depth>n&&o3(o6(o5(e,t,n+1),o8(e,t,n+1)),r),o4(t,null,n,r),new oJ(r)}o1.empty=new o1(oJ.empty,0,0);class o9{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return oZ.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new sn(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(n.push(t,e,r+o),!s||(t=t.child(e)).isText)break;
31i=s-1,r+=o+1}return new o9(t,n,i)}static resolveCached(e,t){let n=st.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else st.set(e,n=new o7);let r=n.elts[n.i]=o9.resolve(e,t);return n.i=(n.i+1)%se,r}}class o7{constructor(){this.elts=[],this.i=0}}let se=12,st=new WeakMap;class sn{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let sr=Object.create(null);class si{constructor(e,t,n,r=oZ.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||oJ.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&oQ(this.attrs,t||e.defaultAttrs||sr)&&oZ.sameSet(this.marks,n||oZ.none)}copy(e=null){return e==this.content?this:new si(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new si(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return o1.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o);return new o1(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(e,t,n){var r=this.resolve(e),i=this.resolve(t);if(n.openStart>r.depth)throw new o0("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new o0("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),s=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let a=e(t,n,r,i+1);return s.copy(s.content.replaceChild(o,a))}if(!r.content.size)return o6(s,o8(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(oJ.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return o6(s,function e(t,n,r,i,o){let s=t.depth>o&&o5(t,n,o+1),a=i.depth>o&&o5(r,i,o+1),l=[];return o4(null,t,o,l),s&&a&&n.index(o)==r.index(o)?(o2(s,a),o3(o6(s,e(t,n,r,i,o+1)),l)):(s&&o3(o6(s,o8(t,n,o+1)),l),o4(n,r,o,l),a&&o3(o6(a,o8(r,i,o+1)),l)),o4(i,null,o,l),new oJ(l)}(t,e,o,n,i))}{let e=t.parent,i=e.content;return o6(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return o9.resolveCached(this,e)}resolveNoCache(e){return o9.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}
31toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ss(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=oJ.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=oZ.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!oZ.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=oJ.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}si.prototype.text=void 0;class so extends si{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ss(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new so(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new so(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ss(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class sa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new sl(e,t);if(null==i.next)return sa.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=sc(e),r=n;return e.eat(",")&&(r="}"!=e.next?sc(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next)return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"))return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}else if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}else if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
vendor: 5,572 bytes, line 31
31function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);su(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new sa(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(sd);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(su(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,s){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return oJ.from(s.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}sa.empty=new sa(!0);class sl{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function sc(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function sd(e,t){return t-e}function su(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(sd)}function sh(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function sp(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function sf(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}function sm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new sy(e,r,t[r]);return n}class sg{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=sm(e,n.attrs),this.defaultAttrs=sh(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==sa.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:sp(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new si(this,this.computeAttrs(e),oJ.from(t),oZ.setFrom(n))}createChecked(e=null,t,n){return t=oJ.from(t),this.checkContent(t),new si(this,this.computeAttrs(e),t,oZ.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=oJ.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(oJ.empty,!0);return i?new si(this,e,t.append(i),oZ.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
31if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){sf(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:oZ.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new sg(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class sy{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class sb{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=sm(e,r.attrs),this.excluded=null;let i=sh(this.attrs);this.instance=i?new oZ(this,i):null}create(e=null){return!e&&this.instance?this.instance:new oZ(this,sp(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new sb(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){sf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class sv{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=oG.from(e.nodes),t.marks=oG.from(e.marks||{}),this.nodes=sg.compile(this.spec.nodes,this),this.marks=sb.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=sa.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?sk(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:sk(this,n.split(" "))}this.nodeFromJSON=e=>si.fromJSON(this,e),this.markFromJSON=e=>oZ.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof sg){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new so(n,n.defaultAttrs,e,oZ.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function sk(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class sx{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
31t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new sA(this,t,!1);return n.addAll(e,oZ.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new sA(this,t,!0);return n.addAll(e,oZ.none,t.from,t.to),o1.maxOpen(n.finish())}matchTag(e,t,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r,i;let n=this.tags[o];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=s_(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=s_(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new sx(e,sx.schemaRules(e)))}}let sw={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},sE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},sT={ol:!0,ul:!0};function sS(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class sC{constructor(e,t,n,r,i,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=oZ.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(oJ.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=oJ.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(oJ.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!sw.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class sA{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,o=sS(null,t.preserveWhitespace,0)|4*!!n;i=r?new sC(r.type,r.attrs,oZ.none,!0,t.topMatch||r.type.contentMatch,o):n?new sC(null,null,oZ.none,!0,null,o):new sC(e.sc
vendor: 2,938 bytes, line 31
31hema.topNodeType,null,oZ.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:o}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(o.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(o.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;sT.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&sT.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));t:if(a?a.ignore:sE.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let n,r=this.needsBlock;if(sw.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break t}let s=a&&a.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,a,n,!1===a.consuming?s:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,o;
vendor: 4,113 bytes, line 31
31if(t.node)if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],a=s.findWrapping(e);if(a&&(!r||r.length>a.length+o)&&(r=a,i=s,!a.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=oZ.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):sN(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=sS(e,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let a=oZ.none;return n=n.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!sN(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new sC(e,t,a,r,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,o=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];
31if(t.isTextblock&&t.defaultAttrs)return t}}}function s_(e){let t={};for(let n in e)t[n]=e[n];return t}function sN(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class sO{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=sI(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],s=this.serializeMark(n,e.isInline,t);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return sI(t).createTextNode(e.text);let{dom:n,contentDOM:r}=sR(sI(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&sR(sI(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return"string"==typeof t?{dom:e.createTextNode(t)}:sR(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new sO(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=sM(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return sM(e.marks)}}function sM(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function sI(e){return e.document||window.document}let sD=new WeakMap;function sR(e,t,n,r){let i,o,s;if(1==t.nodeType)return{dom:t};if(t.dom&&1==t.dom.nodeType)return t;let a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=sD.get(r))&&sD.set(r,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),o=s)),l=o)&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=a.indexOf(" ");c>0&&(n=a.slice(0,c),a=a.slice(c+1));let d=n?e.createElementNS(n,a):e.createElement(a),u=t[1],h=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let e in h=2,u)if(null!=u[e]){let t=e.indexOf(" ");t>0?d.setAttributeNS(e.slice(0,t),e.slice(t+1),u[e]):"style"==e&&d.style?d.style.cssText=u[e]:d.setAttribute(e,u[e])}}for(let o=h;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>h)throw RangeError("Content hole must be the only child of its parent node");return{dom:d,contentDOM:d}}if("string"==typeof s)d.appendChild(e.createTextNode(s));else{let{dom:t,contentDOM:o}=sR(e,s,n,r);if(d.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:d,contentDOM:i}}class sz{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class sL{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&sL.empty)return sL.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+i],c=this.ranges[s+o],d=a+l;if(e<=d){let i=l?e==a?-1:e==d?1:t:t,o=a+r+(i<0?0:c);if(n)return o;let u=e==(t<0?a:d)?null:s/3+(e-a)*65536,h=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(h|=8),new sz(o,h,u)}r+=c-l}return n?e+r:new sz(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;
vendor: 16,713 bytes, line 31
31for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let a=this.ranges[t+i];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+o]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),i+=c-l}}invert(){return new sL(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?sL.empty:new sL(e<0?[0,-e,0]:[0,0,e])}}sL.empty=new sL([]);class sP{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new sP(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new sP;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new sz(e,r,null)}}let sj=Object.create(null);class s${getMap(){return sL.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=sj[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in sj)throw RangeError("Duplicate use of step JSON ID "+e);return sj[e]=t,t.prototype.jsonID=e,t}}class sF{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new sF(e,null)}static fail(e){return new sF(null,e)}static fromReplace(e,t,n,r){try{return sF.ok(e.replace(t,n,r))}catch(e){if(e instanceof o0)return sF.fail(e.message);throw e}}}function sB(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(sB(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return oJ.fromArray(r)}class sH extends s${constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new o1(sB(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return sF.fromReplace(e,this.from,this.to,i)}invert(){return new sU(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new sH(t.pos,n.pos,this.mark)}merge(e){return e instanceof sH&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new sH(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new sH(t.from,t.to,e.markFromJSON(t.mark))}}s$.jsonID("addMark",sH);class sU extends s${constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new o1(sB(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return sF.fromReplace(e,this.from,this.to,n)}invert(){return new sH(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new sU(t.pos,n.pos,this.mark)}merge(e){return e instanceof sU&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new sU(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new sU(t.from,t.to,e.markFromJSON(t.mark))}}s$.jsonID("removeMark",sU);class sV extends s${constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return sF.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return sF.fromReplace(e,this.pos,this.pos+1,new o1(oJ.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new sV(this.pos,t.marks[n]);return new sV(this.pos,this.mark)}}return new sq(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new sV(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new sV(t.pos,e.markFromJSON(t.mark))}}s$.jsonID("addNodeMark",sV);class sq extends s${constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return sF.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return sF.fromReplace(e,this.pos,this.pos+1,new o1(oJ.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new sV(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new sq(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new sq(t.pos,e.markFromJSON(t.mark))}}s$.jsonID("removeNodeMark",sq);class sG extends s${constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&sK(e,this.from,this.to)?sF.fail("Structure replace would overwrite content"):sF.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new sL([this.from,this.to-this.from,this.slice.size])}invert(e){return new sG(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&sG.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new sG(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof sG)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?o1.empty:new o1(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new sG(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?o1.empty:new o1(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new sG(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new sG(t.from,t.to,o1.fromJSON(e,t.slice),!!t.structure)}}sG.MAP_BIAS=1,s$.jsonID("replace",sG);class sW extends s${constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(sK(e,this.from,this.gapFrom)||sK(e,this.gapTo,this.to)))return sF.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return sF.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?sF.fromReplace(e,this.from,this.to,n):sF.fail("Content does not fit in gap")}getMap(){return new sL([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new sW(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new sW(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new sW(t.from,t.to,t.gapFrom,t.gapTo,o1.fromJSON(e,t.slice),t.insert,!!t.structure)}}function sK(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function sJ(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let t=0;t<o.childCount;t++){let l=o.child(t),c=a+l.nodeSize,d=r.matchType(l.type);if(d){r=d;for(let t=0;t<l.marks.length;t++)n.allowsMarkType(l.marks[t].type)||e.step(new sU(a,c,l.marks[t]));if(i&&l.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(l.text);)r||(r=new o1(oJ.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new sG(a+e.index,a+e.index+e[0].length,r))}}else s.push(new sG(a,c,o1.empty));a=c}if(!r.validEnd){let t=r.fillBefore(oJ.empty,!0);e.replace(a,a,new o1(t,0,0))}for(let t=s.length-1;t>=0;t--)e.step(s[t])}function sY(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,a,t))return n;if(0==n||o.type.spec.isolating||!((0==s||o.canReplace(s,o.childCount))&&(a==o.childCount||o.canReplace(0,a))))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function sX(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return o?i.map(sQ).concat({type:t,attrs:n}).concat(o.map(sQ)):null}function sQ(e){return{type:e,attrs:null}}function sZ(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function s0(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function s1(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=r&&r[t+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function s2(e,t){let n=e.resolve(t),r=n.index();return s5(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function s5(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(!(n=n.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}(e,t))}function s3(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,s=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),s++,o=r.node(e).maybeChild(s)):(i=r.node(e).maybeChild(s-1),o=r.node(e+1)),i&&!i.isTextblock&&s5(i,o)&&r.node(e).canReplace(s,s+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function s4(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+ +(n>0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=e&&s.canReplaceWith(o,o,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function s6(e,t,n=t,r=o1.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return s8(i,o,r)?new sG(t,n,r):new s9(i,o,r).fit()}function s8(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}s$.jsonID("replaceAround",sW);class s9{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=oJ.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=oJ.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new o1(i,o,s);return e>-1?new sW(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new sG(n.pos,r.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,r=(n?(e=at(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let i=this.depth;i>=0;i--){let{type:o,match:s}=this.frontier[i],a,l=null;if(1==t&&(r?s.matchType(r.type)||(l=s.fillBefore(oJ.from(r),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:i,parent:e,inject:l};if(2==t&&r&&(a=s.findWrapping(r.type)))return{sliceDepth:n,frontierDepth:i,parent:e,wrap:a};if(e&&s.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=at(e,t);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new o1(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=at(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new o1(s7(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new o1(s7(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let o=this.unplaced,s=n?n.content:o.content,a=o.openStart-e,l=0,c=[],{match:d,type:u}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));d=d.matchFragment(r)}let h=s.size+e-(o.content.size-o.openEnd);for(;l<s.childCount;){let e=s.child(l),t=d.matchType(e.type);if(!t)break;(++l>
vendor: 2,199 bytes, line 31
311||0==a||e.content.size)&&(d=t,c.push(function e(t,n,r){if(n<=0)return t;let i=t.content;return n>1&&(i=i.replaceChild(0,e(i.firstChild,n-1,1==i.childCount?r-1:0))),n>0&&(i=t.type.contentMatch.fillBefore(i).append(i),r<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(oJ.empty,!0)))),t.copy(i)}(e.mark(u.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?h:-1)))}let p=l==s.childCount;p||(h=-1),this.placed=ae(this.placed,t,oJ.from(c)),this.frontier[t].match=d,p&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<h;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?0==e?o1.empty:new o1(s7(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new o1(s7(o.content,e,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!an(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){n:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=an(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=an(e,n,r,t,!0);if(!i||i.childCount)continue n}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ae(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ae(this.placed,this.depth,oJ.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(oJ.empty,!0);e.childCount&&(this.placed=ae(this.placed,this.frontier.length,e))}}
vendor: 6,684 bytes, line 31
31function s7(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(s7(e.firstChild.content,t-1,n)))}function ae(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ae(e.lastChild.content,t-1,n)))}function at(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function an(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,s)?a:null}function ar(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class ai extends s${constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return sF.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return sF.fromReplace(e,this.pos,this.pos+1,new o1(oJ.from(r),0,+!t.isLeaf))}getMap(){return sL.empty}invert(e){return new ai(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ai(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new ai(t.pos,t.attr,t.value)}}s$.jsonID("attr",ai);class ao extends s${constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return sF.ok(n)}getMap(){return sL.empty}invert(e){return new ao(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new ao(t.attr,t.value)}}s$.jsonID("docAttr",ao);let as=class extends Error{};(as=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),as.prototype.constructor=as,as.prototype.name="TransformError";class aa{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new sP}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new as(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,o)=>{e=Math.min(e,i),t=Math.max(t,o)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=o1.empty){let r=s6(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new o1(oJ.from(n),0,0))}delete(e,t){return this.replace(e,t,o1.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(s8(i,o,r))return e.step(new sG(t,n,r));let s=ar(i,o);0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:i.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],d=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var u;let t=c[e],n=(u=t.type).spec.defining||u.spec.definingForContent;if(n&&!t.sameMarkup(i.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+d+1)%(r.openStart+1),u=c[a];if(u)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],d=!0;c<0&&(d=!1,c=-c);let h=i.node(c-1),p=i.index(c-1);if(h.canReplaceWith(p,p,u.type,u.marks))return e.replace(i.before(c),d?o.after(c):n,new o1(function e(t,n,r,i,o){if(n<r){let o=t.firstChild;t=t.replaceChild(0,o.copy(e(o.content,n+1,r,i,o)))}if(n>i){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(oJ.empty,!0))}return t}(r.content,0,r.openStart,a),a,r.openEnd))}}let h=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>h));a--){let e=s[a];e<0||(t=i.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var r=e,i=t;if(!n.isInline&&r==i&&this.doc.resolve(r).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,r,n.type);null!=e&&(r=i=e)}return this.replaceRange(r,i,new o1(oJ.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let o=r.sharedDepth(n),s=!1;for(let e=r.depth;e>o;e--)r.node(e).type.spec.isolating&&(s=!0);for(let e=i.depth;e>o;e--)i.node(e).type.spec.isolating&&(s=!0);if(!s){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let o=ar(r,i);for(let t=0;t<o.length;t++){let n=o[t],s=t==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=oJ.empty,u=0;for(let e=o,t=!1;e>n;e--)t||r.index(e)>
310?(t=!0,d=oJ.from(r.node(e).copy(d)),u++):l--;let h=oJ.empty,p=0;for(let e=o,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,h=oJ.from(i.node(e).copy(h)),p++):c++;e.step(new sW(l,c,s,a,new o1(d.append(h),u,p),d.size-u,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let e="pre"==s.whitespace,t=!!s.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let a=e.steps.length;if(!1===r){let r=e.doc.resolve(t+n);s0(e,r.node(),r.before(),a)}s.inlineContent&&sJ(e,t+n-1,s,o.node().contentMatchAt(o.index()),null==r);let l=e.mapping.slice(a),c=l.map(t-n);if(e.step(new sG(c,l.map(t+n,-1),o1.empty,!0)),!0===r){let t=e.doc.resolve(c);sZ(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let r=oJ.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=oJ.from(n[e].type.create(n[e].attrs,r))}let i=t.start,o=t.end;e.step(new sW(i,o,i,o,new o1(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){var i=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=i.steps.length;return i.doc.nodesBetween(e,t,(e,t)=>{var s,a,l;let c,d,u="function"==typeof r?r(e):r;if(e.isTextblock&&!e.hasMarkup(n,u)&&(s=i.doc,a=i.mapping.slice(o).map(t),l=n,d=(c=s.resolve(a)).index(),c.parent.canReplaceWith(d,d+1,l))){let r=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?r=!1:!e&&t&&(r=!0)}!1===r&&s0(i,e,t,o),sJ(i,i.mapping.slice(o).map(t,1),n,void 0,null===r);let s=i.mapping.slice(o),a=s.map(t,1),l=s.map(t+e.nodeSize,1);return i.step(new sW(a,l,a+1,l-1,new o1(oJ.from(n.create(u,null,e.marks)),0,0),1,!0)),!0===r&&sZ(i,e,t,o),!1}}),this}setNodeMarkup(e,t,n=null,r){return!function(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new sW(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new o1(oJ.from(s),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new ai(e,t,n)),this}setDocAttribute(e,t){return this.step(new ao(e,t)),this}addNodeMark(e,t){return this.step(new sV(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof oZ)t.isInSet(n.marks)&&this.step(new sq(e,t));else{let r=n.marks,i,o=[];for(;i=t.isInSet(r);)o.push(new sq(e,i)),r=i.removeFromSet(r);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,n){return!function(e,t,n=1,r){let i=e.doc.resolve(t),o=oJ.empty,s=oJ.empty;for(let e=i.depth,t=i.depth-n,a=n-1;e>t;e--,a--){o=oJ.from(i.node(e).copy(o));let t=r&&r[a];s=oJ.from(t?t.type.create(t.attrs,s):i.node(e).copy(s))}e.step(new sG(t,t,new o1(o.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,o,s,a;return r=this,s=[],a=[],r.doc.nodesBetween(e,t,(r,l,c)=>{if(!r.isInline)return;let d=r.marks;if(!n.isInSet(d)&&c.type.allowsMarkType(n.type)){let c=Math.max(l,e),u=Math.min(l+r.nodeSize,t),h=n.addToSet(d);for(let e=0;e<d.length;e++)d[e].isInSet(h)||(i&&i.to==c&&i.mark.eq(d[e])?i.to=u:s.push(i=new sU(c,u,d[e])));o&&o.to==c?o.to=u:a.push(o=new sH(c,u,n))}}),s.forEach(e=>r.step(e)),a.forEach(e=>r.step(e)),this}removeMark(e,t,n){var r;let i,o;return r=this,i=[],o=0,r.doc.nodesBetween(e,t,(r,s)=>{if(!r.isInline)return;o++;let a=null;if(n instanceof sb){let e=r.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(r.marks)&&(a=[n]):a=r.marks;if(a&&a.length){let n=Math.min(s+r.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],l;for(let e=0;e<i.length;e++){let t=i[e];t.step==o-1&&r.eq(i[e].style)&&(l=t)}l?(l.to=n,l.step=o):i.push({style:r,from:Math.max(s,e),to:n,step:o})}}}
vendor: 7,898 bytes, line 31
31),i.forEach(e=>r.step(new sU(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return sJ(this,e,t,n),this}}let al=Object.create(null);class ac{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new ad(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=o1.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=e.mapping.slice(i);e.replaceRange(c.map(a.pos),c.map(l.pos),s?o1.empty:t),0==s&&ak(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),ak(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new ap(e):av(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?av(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):av(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new ay(e.node(0))}static atStart(e){return av(e,e,0,0,1)||new ay(e)}static atEnd(e){return av(e,e,e.content.size,e.childCount,-1)||new ay(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=al[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in al)throw RangeError("Duplicate use of selection JSON ID "+e);return al[e]=t,t.prototype.jsonID=e,t}getBookmark(){return ap.between(this.$anchor,this.$head).getBookmark()}}ac.prototype.visible=!0;class ad{constructor(e,t){this.$from=e,this.$to=t}}let au=!1;function ah(e){au||e.parent.inlineContent||(au=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ap extends ac{constructor(e,t=e){ah(e),ah(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return ac.near(n);let r=e.resolve(t.map(this.anchor));return new ap(r.parent.inlineContent?r:n,n)}replace(e,t=o1.empty){if(super.replace(e,t),t==o1.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof ap&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new af(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new ap(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=ac.findFrom(t,n,!0)||ac.findFrom(t,-n,!0);if(!e)return ac.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(ac.findFrom(e,-n,!0)||ac.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new ap(e,t)}}ac.jsonID("text",ap);class af{constructor(e,t){this.anchor=e,this.head=t}map(e){return new af(e.map(this.anchor),e.map(this.head))}resolve(e){return ap.between(e.resolve(this.anchor),e.resolve(this.head))}}class am extends ac{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?ac.near(i):new am(i)}content(){return new o1(oJ.from(this.node),0,0)}eq(e){return e instanceof am&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ag(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new am(e.resolve(t.anchor))}static create(e,t){return new am(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}am.prototype.visible=!1,ac.jsonID("node",am);class ag{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new af(n,n):new ag(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&am.isSelectable(n)?new am(t):ac.near(t)}}class ay extends ac{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=o1.empty){if(t==o1.empty){e.delete(0,e.doc.content.size);let t=ac.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new ay(e)}map(e){return new ay(e)}eq(e){return e instanceof ay}getBookmark(){return ab}}ac.jsonID("all",ay);let ab={map(){return this},resolve:e=>new ay(e)};function av(e,t,n,r,i,o=!1){if(t.inlineContent)return ap.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&am.isSelectable(r))return am.create(e,n-(i<0?r.nodeSize:0))}else{let t=av(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function ak(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let o=e.steps[i];(o instanceof sG||o instanceof sW)&&(e.mapping.maps[i].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(ac.near(e.doc.resolve(r),n)))}class ax extends aa{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return oZ.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||oZ.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(ac.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function aw(e,t){return t&&e?e.bind(t):e}
31class aE{constructor(e,t,n){this.name=e,this.init=aw(t.init,n),this.apply=aw(t.apply,n)}}let aT=[new aE("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new aE("selection",{init:(e,t)=>e.selection||ac.atStart(t.doc),apply:e=>e.selection}),new aE("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new aE("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class aS{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=aT.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new aE(e.key,e.spec.state,e))})}}class aC{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<t.length&&s.spec.appendTransaction.call(s,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new aC(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new ax(this)}static create(e){let t=new aS(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new aC(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new aS(this.schema,e.plugins),n=t.fields,r=new aC(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let r=new aS(e.schema,e.plugins),i=new aC(r);return r.fields.forEach(r=>{if("doc"==r.name)i.doc=si.fromJSON(e.schema,t.doc);else if("selection"==r.name)i.selection=ac.fromJSON(i.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,o)){i[r.name]=a.fromJSON.call(s,e,t[o],i);return}}i[r.name]=r.init(e,i)}}),i}}class aA{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:aN("plugin")}getState(e){return e[this.key]}}let a_=Object.create(null);function aN(e){return e in a_?e+"$"+ ++a_[e]:(a_[e]=0,e+"$")}class aO{constructor(e="key"){this.key=aN(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}let aM=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function aI(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let aD=(e,t,n)=>{let r=aI(e,n);if(!r)return!1;let i=a$(r);if(!i){let n=r.blockRange(),i=n&&sY(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(aJ(e,i,t,-1))return!0;
31if(0==r.parent.content.size&&(aP(o,"end")||am.isSelectable(o)))for(let n=r.depth;;n--){let s=s6(e.doc,r.before(n),r.after(n),o1.empty);if(s&&s.slice.size<s.to-s.from){if(t){let n=e.tr.step(s);n.setSelection(aP(o,"end")?ac.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):am.create(n.doc,i.pos-o.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||r.node(n-1).childCount>1)break}return!!o.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},aR=(e,t,n)=>{let r=aI(e,n);if(!r)return!1;let i=a$(r);return!!i&&aL(e,i,t)},az=(e,t,n)=>{let r=aF(e,n);if(!r)return!1;let i=aU(r);return!!i&&aL(e,i,t)};function aL(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let o=t.nodeAfter,s=t.pos+1;for(;!o.isTextblock;s++){if(o.type.spec.isolating)return!1;let e=o.firstChild;if(!e)return!1;o=e}let a=s6(e.doc,i,s,o1.empty);if(!a||a.from!=i||a instanceof sG&&a.slice.size>=s-i)return!1;if(n){let t=e.tr.step(a);t.setSelection(ap.create(t.doc,i)),n(t.scrollIntoView())}return!0}function aP(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let aj=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=a$(r)}let s=o&&o.nodeBefore;return!!s&&!!am.isSelectable(s)&&(t&&t(e.tr.setSelection(am.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function a$(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function aF(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let aB=(e,t,n)=>{let r=aF(e,n);if(!r)return!1;let i=aU(r);if(!i)return!1;let o=i.nodeAfter;if(aJ(e,i,t,1))return!0;if(0==r.parent.content.size&&(aP(o,"start")||am.isSelectable(o))){let n=s6(e.doc,r.before(),r.after(),o1.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(aP(o,"start")?ac.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):am.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return!!o.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},aH=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=aU(r)}let s=o&&o.nodeAfter;return!!s&&!!am.isSelectable(s)&&(t&&t(e.tr.setSelection(am.create(e.doc,o.pos)).scrollIntoView()),!0)};function aU(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let aV=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function aq(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let aG=(e,t)=>
31{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=aq(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,s.createAndFill());i.setSelection(ac.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},aW=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ay||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=aq(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(n,o.createAndFill());s.setSelection(ap.create(s.doc,n+1)),t(s.scrollIntoView())}return!0},aK=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(s1(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&sY(r);return null!=i&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function aJ(e,t,n,r){let i,o,s,a=t.nodeBefore,l=t.nodeAfter,c,d,u=a.type.spec.isolating||l.type.spec.isolating;if(!u&&(i=t.nodeBefore,o=t.nodeAfter,s=t.index(),i&&o&&i.type.compatibleContent(o.type)&&(!i.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(s,s+1)&&!!(o.isTextblock||s2(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let h=!u&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(c=(d=a.contentMatchAt(a.childCount)).findWrapping(l.type))&&d.matchType(c[0]||l.type).validEnd){if(n){let r=t.pos+l.nodeSize,i=oJ.empty;for(let e=c.length-1;e>=0;e--)i=oJ.from(c[e].create(null,i));i=oJ.from(a.copy(i));let o=e.tr.step(new sW(t.pos-1,r,t.pos,r,new o1(i,1,0),c.length,!0)),s=o.doc.resolve(r+2*c.length);s.nodeAfter&&s.nodeAfter.type==a.type&&s2(o.doc,s.pos)&&o.join(s.pos),n(o.scrollIntoView())}return!0}let p=l.type.spec.isolating||r>0&&u?null:ac.findFrom(t,1),f=p&&p.$from.blockRange(p.$to),m=f&&sY(f);if(null!=m&&m>=t.depth)return n&&n(e.tr.lift(f,m).scrollIntoView()),!0;if(h&&aP(l,"start",!0)&&aP(a,"end")){let r=a,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let o=l,s=1;for(;!o.isTextblock;o=o.firstChild)s++;if(r.canReplace(r.childCount,r.childCount,o.content)){if(n){let r=oJ.empty;for(let e=i.length-1;e>=0;e--)r=oJ.from(i[e].copy(r));n(e.tr.step(new sW(t.pos-i.length,t.pos+l.nodeSize,t.pos+s,t.pos+l.nodeSize-s,new o1(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function aY(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(ap.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let aX=aY(-1),aQ=aY(1);function aZ(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,e,t)}r(i.scrollIntoView())}return!0}}function a0(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let a1=a0(aM,aD,aj),a2=a0(aM,aB,aH),a5={Enter:a0(aV,aW,aK,(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof am&&e.selection.node.isBlock)return!!n.parentOffset&&!!s1(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let i=[],o,s,a=!1,l=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;a=n.end(e)==n.pos+(n.depth-e),l=n.start(e)==n.pos-(n.depth-e),s=aq(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));i.unshift(t||(a&&s?{type:s}:null)),o=e;break}if(1==e)return!1;i.unshift(null)}let c=e.tr;(e.selection instanceof ap||e.selection instanceof ay)&&c.deleteSelection();let d=c.mapping.map(n.pos),u=s1(c.doc,d,i.length,i);if(u||(i[0]=s?{type:s}:null,u=s1(c.doc,d,i.length,i)),!u)return!1;
31if(c.split(d,i.length,i),!a&&l&&n.node(o).type!=s){let e=c.mapping.map(n.before(o)),t=c.doc.resolve(e);s&&n.node(o-1).canReplaceWith(t.index(),t.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return t&&t(c.scrollIntoView()),!0}),"Mod-Enter":aG,Backspace:a1,"Mod-Backspace":a1,"Shift-Backspace":a1,Delete:a2,"Mod-Delete":a2,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new ay(e.doc))),!0)},a3={"Ctrl-h":a5.Backspace,"Alt-Backspace":a5["Mod-Backspace"],"Ctrl-d":a5.Delete,"Ctrl-Alt-Backspace":a5["Mod-Delete"],"Alt-Delete":a5["Mod-Delete"],"Alt-d":a5["Mod-Delete"],"Ctrl-a":aX,"Ctrl-e":aQ};for(let e in a5)a3[e]=a5[e];function a4(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let a=r?n.tr:null;return!!function(e,t,n,r=null){let i=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=s.resolve(t.start-2);o=new sn(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new sn(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let a=sX(o,n,r,t);return!!a&&(e&&function(e,t,n,r,i){let o=oJ.empty;for(let e=n.length-1;e>=0;e--)o=oJ.from(n[e].type.create(n[e].attrs,o));e.step(new sW(t.start-2*!!r,t.end,t.start,t.end,new o1(o,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==i&&(s=e+1);let a=n.length-s,l=t.start+n.length-2*!!r,c=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&s1(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize}(e,t,a,i,n),!0)}(a,s,e,t)&&(r&&r(a.scrollIntoView()),!0)}}function a6(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return!!o&&(!n||(r.node(o.depth-1).type==e?function(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new sW(o-1,s,o,s,new o1(oJ.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new sn(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));let a=sY(r);if(null==a)return!1;i.lift(r,a);let l=i.doc.resolve(i.mapping.map(o,-1)-1);return s2(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),t(i.scrollIntoView()),!0}(t,n,e,o):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,o=n.startIndex;t>o;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+ +!a,d+1,s.content.append(l?oJ.empty:oJ.from(i))))return!1;let u=o.pos,h=u+s.nodeSize;return r.step(new sW(u-!!a,h+ +!!l,u+1,h-1,new o1((a?oJ.empty:oJ.from(i.copy(oJ.empty))).append(l?oJ.empty:oJ.from(i.copy(oJ.empty))),+!a,+!l),+!a)),t(r.scrollIntoView()),!0}(t,n,o)))}}"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform();let a8=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},a9=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},a7=null,le=function(e,t,n){let r=a7||(a7=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},lt=function(){a7=null},ln=function(e,t,n,r){return n&&(li(e,t,n,r,-1)||li(e,t,n,r,1))},lr=/^(img|br|input|textarea|hr)$/i;function li(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:lo(e))){let n=e.parentNode;if(!n||1!=n.nodeType||ls(e)||lr.test(e.nodeName)||"false"==e.contentEditable)return!1;t=a8(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;let n=e.childNodes[t+(i<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable)if(null==(o=n.pmViewDesc)||!o.ignoreForSelection)return!1;else t+=i;else e=n,t=i<0?lo(e):0}}}function lo(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ls(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let la=function(e){return e.focusNode&&ln(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function ll(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let lc="u">typeof navigator?navigator:null,ld="u">typeof document?document:null,lu=lc&&lc.userAgent||"",lh=/Edge\/(\d+)/.exec(lu),lp=/MSIE \d/.exec(lu),lf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(lu),lm=!!(lp||lf||lh),lg=lp?document.documentMode:lf?+lf[1]:lh?+lh[1]:0,ly=!lm&&/gecko\/(\d+)/i.test(lu);ly&&(/Firefox\/(\d+)/.exec(lu)||[0,0])[1];let lb=!lm&&/Chrome\/(\d+)/.exec(lu),lv=!!lb,lk=lb?+lb[1]:0,lx=!lm&&!!lc&&/Apple Computer/.test(lc.vendor),lw=lx&&(/Mobile\/\w+/.test(lu)||!!lc&&lc.maxTouchPoints>2),lE=lw||!!lc&&/Mac/.test(lc.platform),lT=!!lc&&/Win/.test(lc.platform),lS=/Android \d/.test(lu),lC=!!ld&&"webkitFontSmoothing"in ld.documentElement.style,lA=lC?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function l_(e,t){return"number"==typeof e?e:e[t]}
vendor: 12,411 bytes, line 31
31function lN(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(1!=s.nodeType){s=a9(s);continue}let e=s,n=e==o.body,a=n?function(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}(o):function(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}(e),l=0,c=0;if(t.top<a.top+l_(r,"top")?c=-(a.top-t.top+l_(i,"top")):t.bottom>a.bottom-l_(r,"bottom")&&(c=t.bottom-t.top>a.bottom-a.top?t.top+l_(i,"top")-a.top:t.bottom-a.bottom+l_(i,"bottom")),t.left<a.left+l_(r,"left")?l=-(a.left-t.left+l_(i,"left")):t.right>a.right-l_(r,"right")&&(l=t.right-a.right+l_(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}let d=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:a9(s)}}function lO(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=a9(r));return t}function lM(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let lI=null;function lD(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function lR(e){return e.top<e.bottom||e.left<e.right}function lz(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(lR(e))return e}return Array.prototype.find.call(n,lR)||e.getBoundingClientRect()}let lL=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function lP(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=lC||ly;if(3==r.nodeType)if(s&&(lL.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=lz(le(r,i,i),n);if(ly&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=lz(le(r,i-1,i-1),-1);if(t.top==e.top){let n=lz(le(r,i,i+1),-1);if(n.top!=e.top)return lj(n,n.left<t.left)}}return e}else{let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,lj(lz(le(r,e,t),o),o<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==lo(r))){let e=r.childNodes[i-1];if(1==e.nodeType)return l$(e.getBoundingClientRect(),!1)}if(null==o&&i<lo(r)){let e=r.childNodes[i];if(1==e.nodeType)return l$(e.getBoundingClientRect(),!0)}return l$(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==lo(r))){let e=r.childNodes[i-1],t=3==e.nodeType?le(e,lo(e)-!s):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return lj(lz(t,1),!1)}if(null==o&&i<lo(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?le(e,0,+!s):1==e.nodeType?e:null:null;if(t)return lj(lz(t,-1),!0)}return lj(lz(3==r.nodeType?le(r):r,-n),n>=0)}function lj(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function l$(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function lF(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}let lB=/[\u0590-\u08ac]/,lH=null,lU=null,lV=!1;class lq{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){let r;if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}if(e==this.dom&&this.contentDOM)r=t>a8(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),o;if(i&&(!t||i.node))if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return i;else n=!1}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return -1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],o=t+i.size;if(o>e||i instanceof lQ){r=e-t;break}t=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof lG&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;(e=n?this.children[n-1]:null)&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?a8(e.dom)+1:0}}{let e,r=!0;for(;(e=n<this.children.length?this.children[n]:null)&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?a8(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&e<=a){let i=o+n.border;if(e>=i&&t<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=a8(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(a>t||s==this.children.length-1)){t=a;for(let e=s+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=a8(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(e-a-l.border,t-a-l.border,n,r);a=c}let s=this.domFromPos(e,e?-1:1),a=t==e?s:this.domFromPos(t,t?-1:1),l=n.root.getSelection(),c=n.domSelectionRange(),d=!1;if((ly||lx)&&e==t){let{node:e,offset:t}=s;if(3==e.nodeType){if((d=!!(t&&"\n"==e.nodeValue[t-1]))&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){"BR"==n.nodeName&&(s=a={node:n.parentNode,offset:a8(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];d=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(ly&&c.focusNode&&c.focusNode!=a.node&&1==c.focusNode.nodeType){let e=c.focusNode.childNodes[c.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||d&&lx)&&ln(s.node,s.offset,c.anchorNode,c.anchorOffset)&&ln(a.node,a.offset,c.focusNode,c.focusOffset))return;let u=!1;if((l.extend||e==t)&&!(d&&ly)){l.collapse(s.node,s.offset);try{e!=t&&l.extend(a.node,a.offset),u=!0}catch(e){}}if(!u){if(e>t){let e=s;s=a,a=e}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let r=n+i.border,s=o-i.border;if(e>=r&&t<=s){this.dirty=e==n||t==o?2:1,e==r&&t==s&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=3:i.markDirty(e-r,t-r);return}i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class lG extends lq{constructor(e,t,n,r){let i,o=t.type.toDOM;if("function"==typeof o&&(o=o(n,()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r)),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class lW extends lq{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class lK extends lq{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(e,t,n,r){let i=r.nodeViews[t.type.name],o=i&&i(t,r,n);return o&&o.dom||(o=sO.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new lK(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=lK.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;t<o&&(i=l7(i,t,o,n)),e>0&&(i=l7(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=r;return r.children=i,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class lJ extends lq{constructor(e,t,n,r,i,o,s,a,l){super(e,[],i,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}
31static create(e,t,n,r,i,o){let s=i.nodeViews[t.type.name],a,l=s&&s(t,i,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:o,n,r),c=l&&l.dom,d=l&&l.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){let e=sO.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:c,contentDOM:d}=e)}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let u=c;return(c=l3(c,n,t),l)?a=new lZ(e,t,n,r,c,d||null,u,l,i,o+1):t.isText?new lX(e,t,n,r,c,u,i):new lJ(e,t,n,r,c,d||null,u,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>oJ.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&l4(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new l8(this,o&&o.node,e);(function(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let s=e.child(n);r(s,i,t.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,u,h,p;for(;s<i.length&&i[s].to==o;){let e=i[s++];e.widget&&(d?(u||(u=[d])).push(e):d=e)}if(d)if(u){u.sort(l9);for(let e=0;e<u.length;e++)n(u[e],c,!!l)}else n(d,c,!!l);if(l)p=-1,h=l,l=null;else if(c<e.childCount)p=c,h=e.child(c++);else break;for(let e=0;e<a.length;e++)a[e].to<=o&&a.splice(e--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let f=o+h.nodeSize;if(h.isText){let e=f;s<i.length&&i[s].from<e&&(e=i[s].from);for(let t=0;t<a.length;t++)a[t].to<e&&(e=a[t].to);e<f&&(l=h.cut(e-o),h=h.cut(0,e-o),f=e,p=-1)}else for(;s<i.length&&i[s].to<f;)s++;let m=h.isInline&&!h.isLeaf?a.filter(e=>!e.inline):a.slice();r(h,m,t.forChild(o,h),p),o=f}})(this.node,this.innerDeco,(t,i,o)=>{t.spec.marks?a.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?oZ.none:this.node.child(i).marks,n,e,i),a.placeWidget(t,e,r)},(t,o,l,c)=>{let d;a.syncToMarks(t.marks,n,e,c),a.findNodeMatch(t,o,l,c)||s&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(d=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(t,o,l,d,e)||a.updateNextNode(t,o,l,e,c,r)||a.addNode(t,o,l,e,r),r+=t.nodeSize}),a.syncToMarks([],n,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(e,o),function e(t,n,r){let i=t.firstChild,o=!1;for(let s=0;s<n.length;s++){let a=n[s],l=a.dom;if(l.parentNode==t){for(;l!=i;)i=l6(i),o=!0;i=i.nextSibling}else o=!0,t.insertBefore(l,i);if(a instanceof lK){let n=i?i.previousSibling:t.lastChild;e(a.contentDOM,a.children,r),i=n?n.nextSibling:t.firstChild}}for(;i;)i=l6(i),o=!0;o&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),lw&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof ap)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(!this.node.inlineContent)return{node:i,pos:-1,text:""};{let e=i.nodeValue,o=function(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let t=e.child(i++);if(o+=t.nodeSize,!t.isText)break;l+=t.text}if(o>=n){if(o>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let e=a<r?l.lastIndexOf(t,r-a-1):-1;if(e>=0&&e+t.length+a>=n)return a+e;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return -1}(this.node.content,e,n-t,r-t);return o<0?null:{node:i,pos:o,text:e}}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new lW(this,i,t,r);e.input.compositionNodes.push(o),this.children=l7(this.children,n,n+r.length,e,o)}update(e,t,n,r){return 3!=this.dirty&&!!e.sameMarkup(this.node)&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(l4(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=l5(this.dom,this.nodeDOM,l2(this.outerDeco,this.node,t),l2(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function lY(e,t,n,r,i){l3(r,t,e);let o=new lJ(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class lX extends lJ{constructor(e,t,n,r,i,o,s){super(e,t,n,r,i,null,o,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return 3!=this.dirty&&(0==this.dirty||!!this.inParent())&&!!e.sameMarkup(this.node)&&(this.updateOuterDeco(t),(0!=this.dirty||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new lX(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(0==e||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class lQ extends lq{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class lZ extends lJ{constructor(e,t,n,r,i,o,s,a,l,c){super(e,t,n,r,i,o,s,l,c),this.spec=a}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return(!!this.contentDOM||!!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}let l0=function(e){e&&(this.nodeName=e)};l0.prototype=Object.create(null);let l1=[new l0];function l2(e,t,n){if(0==e.length)return l1;let r=n?l1[0]:new l0,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s)for(let e in s.nodeName&&i.push(r=new l0(s.nodeName)),s){let o=s[e];null!=o&&(n&&1==i.length&&i.push(r=new l0(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+o:"style"==e?r.style=(r.style?r.style+";":"")+o:"nodeName"!=e&&(r[e]=o))}}return i}function l5(e,t,n,r){if(n==l1&&r==l1)return t;let i=t;for(let t=0;t<r.length;t++){let o=r[t],s=n[t];if(t){let t;s&&s.nodeName==o.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==o.nodeName||((t=document.createElement(o.nodeName)).pmIsDeco=!0,t.appendChild(i),s=l1[0]),i=t}!function(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);
31if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==i.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)-1==r.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}(i,s||l1[0],o)}return i}function l3(e,t,n){return l5(e,e,l1,l2(t,n,1!=e.nodeType))}function l4(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function l6(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class l8{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];r:for(;i>0;){let a;for(;;)if(r){let e=n.children[r-1];if(e instanceof lK)n=e,r=e.children.length;else{a=e,r--;break}}else if(n==t)break r;else r=n.parent.children.indexOf(n),n=n.parent;let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&!1!==e[i].type.spec.spanning;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let i=-1,s=this.top.children.length;r<this.preMatch.index&&(s=Math.min(this.index+3,s));for(let t=this.index;t<s;t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=lK.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let i=-1,o;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r<o;r++){let o=this.top.children[r];if(o.matchesNode(e,t,n)&&!this.preMatch.matched.has(o)){i=r;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(e,t,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return -1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return -1}e=t}}updateNextNode(e,t,n,r,i,o){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof lJ){let l=this.preMatch.matched.get(a);if(null!=l&&l!=i)return!1;let c=a.dom,d,u=this.isLocked(c)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&l4(t,a.outerDeco));if(!u&&a.update(e,t,n,r))return this.destroyBetween(this.index,s),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!u&&(d=this.recreateWrapper(a,e,t,n,r,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=2,d.updateChildren(r,o+1),d.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!l4(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let s=lJ.create(this.top,t,n,r,i,o);if(s.contentDOM)for(let t of(s.children=e.children,e.children=[],s.children))t.parent=s;return e.destroy(),s}addNode(e,t,n,r,i){let o=lJ.create(this.top,e,t,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new lG(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof lK;)e=(t=e).children[t.children.length-1];(!e||!(e instanceof lX)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((lx||lv)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new lQ(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}
31isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function l9(e,t){return e.type.side-t.type.side}function l7(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,d=a+=l.size;c>=n||d<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function ce(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(la(n)){for(l=s;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&am.isSelectable(e)&&i.parent&&!(e.isInline&&function(e,t,n){for(let r=0==t,i=t==lo(e);r||i;){if(e==n)return!0;let t=a8(e);if(!(e=e.parentNode))return!1;r=r&&0==t,i=i&&t==lo(e)}}(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;c=new am(s==e?a:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=s,i=s;for(let r=0;r<n.rangeCount;r++){let o=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(o.startContainer,o.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(o.endContainer,o.endOffset,-1))}if(t<0)return null;[l,s]=i==e.state.selection.anchor?[i,t]:[t,i],a=r.resolve(s)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let n="pointer"==t||e.state.selection.head<a.pos&&!o?1:-1;c=cc(e,d,a,n)}return c}function ct(e){return e.editable?e.hasFocus():cu(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function cn(e,t=!1){let n=e.state.selection;if(ca(e,n),!ct(e))return;let r=e.input.mouseDown;if(!t&&lv&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&ln(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate())return void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r="IMG"==n.nodeName;r?t.collapse(n.parentNode,a8(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&lm&&lg<=11&&(n.disabled=!0,n.disabled=!1)}(e);else{var i;let r,o,s,a,{anchor:l,head:c}=n,d,u;cr&&!(n instanceof ap)&&(n.$from.parent.inlineContent||(d=ci(e,n.from)),n.empty||n.$from.parent.inlineContent||(u=ci(e,n.to))),e.docView.setSelection(l,c,e,t),cr&&(d&&cs(d),u&&cs(u)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&((r=(i=e).dom.ownerDocument).removeEventListener("selectionchange",i.input.hideSelectionGuard),s=(o=i.domSelectionRange()).anchorNode,a=o.anchorOffset,r.addEventListener("selectionchange",i.input.hideSelectionGuard=()=>{(o.anchorNode!=s||o.anchorOffset!=a)&&(r.removeEventListener("selectionchange",i.input.hideSelectionGuard),setTimeout(()=>{(!ct(i)||i.state.selection.visible)&&i.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}let cr=lx||lv&&lk<63;function ci(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(lx&&i&&"false"==i.contentEditable)return co(i);if((!i||"false"==i.contentEditable)&&(!o||"false"==o.contentEditable)){if(i)return co(i);else if(o)return co(o)}}function co(e){return e.contentEditable="true",lx&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function cs(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ca(e,t){if(t instanceof am){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(cl(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else cl(e)}function cl(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function cc(e,t,n,r){return e.someProp("createSelectionBetween",r=>r(e,t,n))||ap.between(t,n,r)}function cd(e){return(!e.editable||!!e.hasFocus())&&cu(e)}function cu(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focu
31sNode.parentNode:t.focusNode))}catch(e){return!1}}function ch(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&ac.findFrom(o,t)}function cp(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function cf(e,t,n){let r=e.state.selection;if(r instanceof ap){if(n.indexOf("s")>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return cp(e,new ap(r.$anchor,o))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?"forward":"backward")){let n=ch(e.state,t);return!!n&&n instanceof am&&cp(e,n)}else if(!(lE&&n.indexOf("m")>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,o;if(!i||i.isText)return!1;let s=t<0?n.pos-i.nodeSize:n.pos;return!!(i.isAtom||(o=e.docView.descAt(s))&&!o.contentDOM)&&(am.isSelectable(i)?cp(e,new am(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):!!lC&&cp(e,new ap(e.state.doc.resolve(t<0?s:s+i.nodeSize))))}}else{if(r instanceof am&&r.node.isInline)return cp(e,new ap(t>0?r.$to:r.$from));let n=ch(e.state,t);return!!n&&cp(e,n)}}function cm(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function cg(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function cy(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(ly&&1==n.nodeType&&r<cm(n)&&cg(n.childNodes[r],-1)&&(s=!0);;)if(r>0)if(1!=n.nodeType)break;else{let e=n.childNodes[r-1];if(cg(e,-1))i=n,o=--r;else if(3==e.nodeType)r=(n=e).nodeValue.length;else break}else if(cb(n))break;else{let t=n.previousSibling;for(;t&&cg(t,-1);)i=n.parentNode,o=a8(t),t=t.previousSibling;if(t)r=cm(n=t);else{if((n=n.parentNode)==e.dom)break;r=0}}s?cv(e,n,r):i&&cv(e,i,o)}(e):function(e){let t,n,r=e.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s=cm(i);for(;;)if(o<s){if(1!=i.nodeType)break;if(cg(i.childNodes[o],1))t=i,n=++o;else break}else if(cb(i))break;else{let r=i.nextSibling;for(;r&&cg(r,1);)t=r.parentNode,n=a8(r)+1,r=r.nextSibling;if(r)o=0,s=cm(i=r);else{if((i=i.parentNode)==e.dom)break;o=s=0}}t&&cv(e,t,n)}(e)}function cb(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function cv(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!ls(e);)t=a8(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!ls(e);)t=a8(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(la(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&cn(e)},50)}function ck(e,t){let n=e.state.doc.resolve(t);if(!(lv||lT)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function cx(e,t,n){let r=e.state.selection;if(r instanceof ap&&!r.empty||n.indexOf("s")>-1||lE&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=ch(e.state,t);if(n&&n instanceof am)return cp(e,n)}if(!i.parent.inlineContent){let n=t<0?i:o,s=r instanceof ay?ac.near(n,t):ac.findFrom(n,t);return!!s&&cp(e,s)}return!1}function cw(e,t){if(!(e.state.selection instanceof ap))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function cE(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function cT(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let e=r.firstChild;
31n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||sO.fromSchema(e.state.schema),a=cI(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,d,u=0;for(;c&&1==c.nodeType&&(d=cO[c.nodeName.toLowerCase()]);){for(let e=d.length-1;e>=0;e--){let t=a.createElement(d[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),u++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${i} ${o}${u?` -${u}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function cS(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",n=>{t=n(t,a||r,e)}),a)return s=new o1(oJ.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0),e.someProp("transformPasted",t=>{s=t(s,e,!0)}),s;let n=e.someProp("clipboardTextParser",n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,s=sO.fromSchema(r);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),o=function(e){var t;let n,r=/^(\s*<meta [^>]*>)*/.exec(e);r&&(e=e.slice(r[0].length));let i=cI().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e),s;if((s=o&&cO[o[1].toLowerCase()])&&(e=s.map(e=>"<"+e+">").join("")+e+s.map(e=>"</"+e+">").reverse().join("")),i.innerHTML=(t=e,(n=window.trustedTypes)?(cD||(cD=n.defaultPolicy||n.createPolicy("ProseMirrorClipboard",{createHTML:e=>e})),cD.createHTML(t)):t),s)for(let e=0;e<s.length;e++)i=i.querySelector(s[e])||i;return i}(n),lC&&function(e){let t=e.querySelectorAll(lv?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"Â "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let e=+d[3];e>0;e--){let e=o.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;o=e}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||sx.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||d),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||cC.test(e.parentNode.nodeName)?null:{ignore:!0}})),d)s=function(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch(t){return e}let{content:i,openStart:o,openEnd:s}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=oJ.from(t.create(r[e+1],i)),o++,s++}return new o1(i,o,s)}(cN(s,+d[1],+d[2]),d[4]);else if((s=o1.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,o=[];if(e.forEach(e=>{if(!o)return;let t=r.findWrapping(e.type),n;if(!t)return o=null;if(n=o.length&&i.length&&function e(t,n,r,i,o){if(o<t.length&&o<n.length&&t[o]==n[o]){let s=e(t,n,r,i.lastChild,o+1);if(s)return i.copy(i.content.replaceChild(i.childCount-1,s));if(i.contentMatchAt(i.childCount).matchType(o==t.length-1?r.type:t[o+1]))return i.copy(i.content.append(oJ.from(cA(r,t,o+1))))}}(t,i,e,o[o.length-1],0))o[o.length-1]=n;else{o.length&&(o[o.length-1]=function e(t,n){if(0==n)return t;let r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),i=t.contentMatchAt(t.childCount).fillBefore(oJ.empty,!0);return t.copy(r.append(i))}(o[o.length-1],i.length));let n=cA(e,t);o.push(n),r=r.matchType(n.type),i=t}}),o)return oJ.from(o)}return e}(s.content,i),!0)).openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=cN(s,e,t)}return e.someProp("transformPasted",t=>{s=t(s,e,l)}),s}let cC=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function cA(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,oJ.from(e));return e}
31function c_(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=c_(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(oJ.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function cN(e,t,n){return t<e.openStart&&(e=new o1(c_(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new o1(c_(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}let cO={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},cM=null;function cI(){return cM||(cM=document.implementation.createHTMLDocument("title"))}let cD=null,cR={},cz={},cL={touchstart:!0,touchmove:!0};class cP{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function cj(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function c$(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>cF(e,t))})}function cF(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function cB(e){return{left:e.clientX,top:e.clientY}}function cH(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,t=>r>o.depth?t(e,n,o.nodeAfter,o.before(r),i,!0):t(e,n,o.node(r),o.before(r),i,!1)))return!0;return!1}function cU(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function cV(e,t,n){let r=e.state.doc;if(-1==t)return r.inlineContent?ap.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),o=i.before(e);if(t.inlineContent)return ap.create(r,o+1,o+1+t.content.size);if(n&&am.isSelectable(t))return am.create(r,o)}return null}cz.keydown=(e,t)=>{if((e.input.shiftKey=16==t.keyCode||t.shiftKey,!cJ(e))&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!lS||!lv||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!lw||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){let n,r=t.keyCode,i=(n="",t.ctrlKey&&(n+="c"),t.metaKey&&(n+="m"),t.altKey&&(n+="a"),t.shiftKey&&(n+="s"),n);if(8==r||lE&&72==r&&"c"==i)return cw(e,-1)||cy(e,-1);if(46==r&&!t.shiftKey||lE&&68==r&&"c"==i)return cw(e,1)||cy(e,1);if(13==r||27==r)return!0;if(37==r||lE&&66==r&&"c"==i){let t=37==r?"ltr"==ck(e,e.state.selection.from)?-1:1:-1;return cf(e,t,i)||cy(e,t)}if(39==r||lE&&70==r&&"c"==i){let t=39==r?"ltr"==ck(e,e.state.selection.from)?1:-1:1;return cf(e,t,i)||cy(e,t)}else if(38==r||lE&&80==r&&"c"==i)return cx(e,-1,i)||cy(e,-1);else if(40==r||lE&&78==r&&"c"==i)return function(e){if(!lx||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;cE(e,n,"true"),setTimeout(()=>cE(e,n,"false"),20)}return!1}(e)||cx(e,1,i)||cy(e,1);else if(i==(lE?"m":"c")&&(66==r||73==r||89==r||90==r))return!0;return!1}(e,t)?t.preventDefault():cj(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,ll(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},cz.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},cz.keypress=(e,t)=>{if(cJ(e)||!t.charCode||t.ctrlKey&&!t.altKey||lE&&t.metaKey)return;if(e.someProp("handleKeyPress",n=>n(e,t)))return void t.preventDefault();let n=e.state.selection;if(!(n instanceof ap)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(t.charCode),i=()=>e.state.tr.insertText(r).scrollIntoView();/[\r\n]/.test(r)||e.someProp("handleTextInput",t=>t(e,n.$from.pos,n.$to.pos,r,i))||e.dispatch(i()),t.preventDefault()}};let cq=lE?"metaKey":"ctrlKey";cR.mousedown=(e,t)=>{var n;let r,i;e.input.shiftKey=t.shiftKey;let o=cZ(e),s=Date.now(),a="singleClick";
31s-e.input.lastClick.time<500&&(r=(n=e.input.lastClick).x-t.clientX)*r+(i=n.y-t.clientY)*i<100&&!t[cq]&&e.input.lastClick.button==t.button&&("singleClick"==e.input.lastClick.type?a="doubleClick":"doubleClick"==e.input.lastClick.type&&(a="tripleClick")),e.input.lastClick={time:s,x:t.clientX,y:t.clientY,type:a,button:t.button},e.input.mouseDown&&e.input.mouseDown.done();let l=e.posAtCoords(cB(t));l&&("singleClick"==a?e.input.mouseDown=new cW(e,l,t,!!o):("doubleClick"==a?function(e,t,n,r){return cH(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}:function(e,t,n,r){return cH(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||function(e,t,n){if(0!=n.button)return!1;let r=cV(e,t,!0),i=e.state.doc;return!!r&&(cU(e,r,"pointer"),r instanceof ap&&i.eq(e.state.doc)&&(e.input.mouseDown=new cK(e,r)),!0)}(e,n,r)})(e,l.pos,l.inside,t)?t.preventDefault():cj(e,"pointer"))};class cG{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){0==e.buttons&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class cW extends cG{constructor(e,t,n,r){let i,o;if(super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[cq],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a&&1==a.nodeDOM.nodeType?a.nodeDOM:null;let{selection:l}=e.state;0==n.button&&(i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof am&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ly&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),cj(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||cn(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;if(this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(cB(e))),this.updateAllowDefault(e),this.allowDefault||!t)cj(this.view,"pointer");else{var n,r,i,o;(n=this.view,r=t.pos,i=t.inside,o=this.selectNode,cH(n,"handleClickOn",r,i,e)||n.someProp("handleClick",t=>t(n,r,e))||(o?function(e,t){if(-1==t)return!1;let n=e.state.selection,r,i;n instanceof am&&(r=n.node);let o=e.state.doc.resolve(t);for(let e=o.depth+1;e>0;e--){let t=e>o.depth?o.nodeAfter:o.node(e);if(am.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?o.before(n.$from.depth):o.before(e);break}}return null!=i&&(cU(e,am.create(e.state.doc,i),"pointer"),!0)}(n,i):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&am.isSelectable(r))&&(cU(e,new am(n),"pointer"),!0)}(n,i)))?e.preventDefault():0==e.button&&(this.flushed||lx&&this.mightDrag&&!this.mightDrag.node.isAtom||lv&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to)))?(cU(this.view,ac.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):cj(this.view,"pointer")}}move(e){this.updateAllowDefault(e),cj(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return!!this.allowDefault&&(this.delayedSelectionSync=!0,!0)}}class cK extends cG{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(0==e.buttons||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc))return void this.done();e.preventDefault(),cj(this.view,"pointer");let t=this.view.posAtCoords(cB(e)),n=t&&cV(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[o,s]=n.from<i.from?[i.to,n.from]:[i.from,n.to];cU(this.view,ap.create(r,o,s),"pointer")}}function cJ(e,t){return!!e.composing||!!(lx&&500>Math.abs(Date.now()-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}cR.touchstart=e=>{e.input.lastTouch=Date.now(),cZ(e),cj(e,"pointer")},cR.touchmove=e=>{e.input.lastTouch=Date.now(),cj(e,"pointer")},cR.contextmenu=e=>cZ(e);let cY=lS?5e3:-1;function cX(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>cZ(e),t))}function cQ(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function cZ(e,t=!1){if(!lS||!(e.domObserver.flushingSoon>
31=0)){if(e.domObserver.forceFlush(),cQ(e),t||e.docView&&e.docView.dirty){let n=ce(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}cz.compositionstart=cz.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ap&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)||lv&&lT&&function(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||1!=t.nodeType||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return 1==r.nodeType&&"false"==r.contentEditable}(e)))e.markCursor=e.state.storedMarks||n.marks(),cZ(e,!0),e.markCursor=null;else if(cZ(e,!t.selection.empty),ly&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}cX(e,cY)},cz.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,cX(e,20))};let c0=lm&&lg<15||lw&&lA<604;function c1(e,t,n,r,i){let o=cS(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,i,o||o1.empty)))return!0;if(!o)return!1;let s=0==o.openStart&&0==o.openEnd&&1==o.content.childCount?o.content.firstChild:null,a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function c2(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}cR.copy=cz.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let i=c0?null:t.clipboardData,{dom:o,text:s}=cT(e,n.content());i?(t.preventDefault(),i.clearData(),i.setData("text/html",o.innerHTML),i.setData("text/plain",s)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,o),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},cz.paste=(e,t)=>{if(e.composing&&!lS)return;let n=c0?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&c1(e,c2(n),n.getData("text/html"),r,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?c1(e,r.value,null,i,t):c1(e,r.textContent,r.innerHTML,i,t)},50)}(e,t)};class c5{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let c3=lE?"altKey":"ctrlKey";function c4(e,t){let n;return e.someProp("dragCopies",e=>{n=n||e(t)}),null!=n?!n:!t[c3]}for(let e in cR.dragstart=(e,t)=>{let n,r=e.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(cB(t));if(o&&o.pos>=i.from&&o.pos<=(i instanceof am?i.to-1:i.to));else if(r&&r.mightDrag)n=am.create(e.state.doc,r.mightDrag.pos);else if(t.target&&1==t.target.nodeType){let r=e.docView.nearestDesc(t.target,!0);r&&r.node.type.spec.draggable&&r!=e.docView&&(n=am.create(e.state.doc,r.posBefore))}
vendor: 4,382 bytes, line 31
31let s=(n||e.state.selection).content(),{dom:a,text:l,slice:c}=cT(e,s);t.dataTransfer.files.length&&lv&&!(lk>120)||t.dataTransfer.clearData(),t.dataTransfer.setData(c0?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",c0||t.dataTransfer.setData("text/plain",l),e.dragging=new c5(c,c4(e,t),n)},cR.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},cz.dragover=cz.dragenter=(e,t)=>t.preventDefault(),cz.drop=(e,t)=>{try{!function(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(cB(t));if(!r)return;let i=e.state.doc.resolve(r.pos),o=n&&n.slice;o?e.someProp("transformPasted",t=>{o=t(o,e,!1)}):o=cS(e,c2(t.dataTransfer),c0?null:t.dataTransfer.getData("text/html"),!1,i);let s=!!(n&&c4(e,t));if(e.someProp("handleDrop",n=>n(e,t,o||o1.empty,s)))return t.preventDefault();if(!o)return;t.preventDefault();let a=o?s4(e.state.doc,i.pos,o):i.pos;null==a&&(a=i.pos);let l=e.state.tr;if(s){let{node:e}=n;e?e.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,u=l.doc;if(d?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),l.doc.eq(u))return;let h=l.doc.resolve(c);if(d&&am.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new am(h));else{let t=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),l.setSelection(cc(e,h,l.doc.resolve(t)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}(e,t,e.dragging)}finally{e.dragging=null}},cR.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&cn(e)},20))},cR.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},cR.beforeinput=(e,t)=>{if(lv&&lS&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,ll(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},cz)cR[e]=cz[e];function c6(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class c8{constructor(e,t){this.toDOM=e,this.spec=t||dn,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new de(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof c8&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&c6(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class c9{constructor(e,t){this.attrs=e,this.spec=t||dn}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new de(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof c9&&c6(this.attrs,e.attrs)&&c6(this.spec,e.spec)}static is(e){return e.type instanceof c9}destroy(){}}class c7{constructor(e,t){this.attrs=e,this.spec=t||dn}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new de(i.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(e){return this==e||e instanceof c7&&c6(this.attrs,e.attrs)&&c6(this.spec,e.spec)}destroy(){}}class de{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new de(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new de(e,e,new c8(t,n))}static inline(e,t,n,r){return new de(e,t,new c9(n,r))}static node(e,t,n,r){return new de(e,t,new c7(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof c9}get widget(){return this.type instanceof c8}}let dt=[],dn={};class dr{constructor(e,t){this.local=e.length?e:dt,this.children=t.length?t:dt}static create(e,t){return t.length?dd(t,e,0,dn):di}
vendor: 5,078 bytes, line 31
31find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==di||0==e.maps.length?this:this.mapInner(e,t,0,0,n||dn)}mapInner(e,t,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,i,o,s){let a=e.slice();for(let e=0,t=o;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,o)=>{let s=o-i-(n-e);for(let i=0;i<a.length;i+=3){let o=a[i+1];if(o<0||e>o+t-r)continue;let l=a[i]+t-r;n>=l?a[i+1]=e<=l?-2:-1:e>=t&&s&&(a[i]+=s,a[i+1]+=s)}r+=s}),t=n.maps[e].map(t,-1)}let l=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){l=!0,a[t+1]=-1;continue}let c=n.map(e[t]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let u=n.map(e[t+1]+o,-1)-i,{index:h,offset:p}=r.content.findIndex(d),f=r.maybeChild(h);if(f&&p==d&&p+f.nodeSize==u){let r=a[t+2].mapInner(n,f,c+1,e[t]+o+1,s);r!=di?(a[t]=d,a[t+1]=u,a[t+2]=r):(a[t+1]=-2,l=!0)}else l=!0}if(l){let l=dd(function(e,t,n,r,i,o,s){for(let a=0;a<e.length;a+=3)-1==e[a+1]&&function e(t,o){for(let e=0;e<t.local.length;e++){let a=t.local[e].map(r,i,o);a?n.push(a):s.onRemove&&s.onRemove(t.local[e].spec)}for(let n=0;n<t.children.length;n+=3)e(t.children[n+2],t.children[n]+o+1)}(e[a+2],t[a]+o+1);return n}(a,e,t,n,i,o,s),r,0,s);t=l.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<l.children.length;e+=3){let n=l.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,l.children[e],l.children[e+1],l.children[e+2])}}return new dr(t.sort(du),a)}(this.children,o||[],e,t,n,r,i):o?new dr(o.sort(du),dt):di}add(e,t){return t.length?this==di?dr.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach((e,o)=>{let s=o+n,a;if(a=dl(t,e,s)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,a,s+1):r.splice(i,0,o,o+e.nodeSize,dd(a,e,s+1,dn)),i+=3}});let o=da(i?dc(t):t,-n);for(let t=0;t<o.length;t++)o[t].type.valid(e,o[t])||o.splice(t--,1);return new dr(o.length?this.local.concat(o).sort(du):this.local,r||this.children)}remove(e){return 0==e.length||this==di?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+t,s=n[r+1]+t;for(let t=0,n;t<e.length;t++)(n=e[t])&&n.from>o&&n.to<s&&(e[t]=null,(i||(i=[])).push(n));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=di?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length){for(let n=0,i;n<e.length;n++)if(i=e[n])for(let e=0;e<r.length;e++)r[e].eq(i,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new dr(r,n):di}forChild(e,t){let n,r;if(this==di)return this;if(t.isLeaf)return dr.empty;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,o=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>i&&t.type instanceof c9){let e=Math.max(i,t.from)-i,n=Math.min(o,t.to)-i;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new dr(r.sort(du),dt);return n?new ds([e,n]):e}return n||di}eq(e){if(this==e)return!0;if(!(e instanceof dr)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return dh(this.localsInner(e))}localsInner(e){if(this==di)return dt;if(e.inlineContent||!this.local.some(c9.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof c9||t.push(this.local[e]);return t}forEachSet(e){e(this)}}dr.empty=new dr([],[]),dr.removeOverlap=dh;let di=dr.empty;class ds{constructor(e){this.members=e}map(e,t){let n=this.members.map(n=>n.map(e,t,dn));return ds.from(n)}forChild(e,t){if(t.isLeaf)return dr.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=di&&(i instanceof ds?n=n.concat(i.members):n.push(i))}return ds.from(n)}eq(e){if(!(e instanceof ds)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?dh(n?t:t.sort(du)):dt}static from(e){switch(e.length){case 0:return di;case 1:return e[0];default:return new ds(e.every(e=>e instanceof dr)?e:e.reduce((e,t)=>
vendor: 4,992 bytes, line 31
31e.concat(t instanceof dr?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function da(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new de(i.from+t,i.to+t,i.type))}return n}function dl(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,o;t<e.length;t++)(o=e[t])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[t]=null);return i}function dc(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function dd(e,t,n,r){let i=[],o=!1;t.forEach((t,s)=>{let a=dl(e,t,s+n);if(a){o=!0;let e=dd(a,t,n+s+1,r);e!=di&&i.push(s,s+t.nodeSize,e)}});let s=da(o?dc(e):e,-n).sort(du);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||i.length?new dr(s,i):di}function du(e,t){return e.from-t.from||e.to-t.to}function dh(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),dp(t,i+1,o.copy(r.to,o.to)));continue}o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),dp(t,i,r.copy(o.from,r.to)));break}}return t}function dp(e,t,n){for(;t<e.length&&du(n,e[t])>0;)t++;e.splice(t,0,n)}function df(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=di&&t.push(r)}),e.cursorWrapper&&t.push(dr.create(e.state.doc,[e.cursorWrapper.deco])),ds.from(t)}let dm={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},dg=lm&&lg<=11;class dy{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class db{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new dy,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);lm&&lg<=11&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():lx&&e.composing&&t.some(e=>"childList"==e.type&&"TR"==e.target.nodeName)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),dg&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,dm)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(cd(this.view)){if(this.suppressingSelectionUpdates)return cn(this.view);if(lm&&lg<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ln(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=a9(n))t.add(n);for(let r=e.anchorNode;r;r=a9(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:3==n.nodeType?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){var e;let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&cd(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];
31if(t.editable)for(let e=0;e<n.length;e++){let t=this.registerMutation(n[e],l);t&&(o=o<0?t.from:Math.min(t.from,o),s=s<0?t.to:Math.max(t.to,s),t.typeOver&&(a=!0))}if(l.some(e=>"BR"==e.nodeName)&&(8==t.input.lastKeyCode||46==t.input.lastKeyCode||lv&&(t.composing||t.input.compositionEndedAt>Date.now()-50)&&n.some(e=>"childList"==e.type&&e.removedNodes.length))){for(let e of l)if("BR"==e.nodeName&&e.parentNode){let t=e.nextSibling;for(;t&&1==t.nodeType;){if("false"==t.contentEditable){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(ly&&l.length){let e=l.filter(e=>"BR"==e.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;e&&"LI"==e.nodeName&&(!n||function(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}(t,n)!=e)&&r.remove()}}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&la(r)&&(c=ce(t))&&c.eq(ac.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,cn(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),e=t,!dv.has(e)&&(dv.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace))&&(e.requiresGeckoHackNode=ly,dk||(console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),dk=!0))),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let o of t)if((null==(n=o.parentNode)?void 0:n.nodeName)=="TR"){let t=o.nextSibling;for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.nextSibling;if(t){let n=t;for(;;){let e=n.firstChild;if(!e||1!=e.nodeType||"false"==e.contentEditable||/^(BR|IMG)$/.test(e.nodeName))break;n=e}n.insertBefore(o,n.firstChild),r==o&&e.domSelection().collapse(o,i)}else o.parentNode.removeChild(o)}}(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||cn(t),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(lm&&lg<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:o}=e.addedNodes[t];(!n||0>Array.prototype.indexOf.call(e.addedNodes,n))&&(r=n),(!o||0>Array.prototype.indexOf.call(e.addedNodes,o))&&(i=o)}let o=r&&r.parentNode==e.target?a8(r)+1:0,s=n.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?a8(i):e.target.childNodes.length;return{from:s,to:n.localPosFromDOM(e.target,a,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let dv=new WeakMap,dk=!1;function dx(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return ln(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function dw(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(lx&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}else if(e.parentNode.lastChild==e||lx&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}let dE=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
vendor: 1,307 bytes, line 31
31function dT(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:cc(e,t.resolve(n.anchor),t.resolve(n.head))}function dS(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}class dC{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new cP,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(dM),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=dN(this),d_(this),this.nodeViews=dO(this),this.docView=lY(this.state.doc,dA(this),df(this),this.dom,this),this.domObserver=new db(this,(e,t,n,r)=>(function(e,t,n,r,i){let o,s,a,l=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ce(e,t);
31if(n&&!e.state.selection.eq(n)){if(lv&&lS&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",t=>t(e,ll(13,"Enter"))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),l&&r.setMeta("composition",l),e.dispatch(r)}return}let c=e.state.doc.resolve(t),d=c.sharedDepth(n);t=c.before(d+1),n=e.state.doc.resolve(n).after(d+1);let u=e.state.selection,h=function(e,t,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),c=e.domSelectionRange(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],la(c)||r.push({node:c.focusNode,offset:c.focusOffset})),lv&&8===e.input.lastKeyCode)for(let e=s;e>o;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){s=e;break}if(!n||n.size)break}let u=e.state.doc,h=e.someProp("domParser")||sx.fromSchema(e.state.schema),p=u.resolve(a),f=null,m=h.parse(i,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:r,ruleFromNode:dw,context:p});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),f={anchor:e+a,head:t+a}}return{doc:m,sel:f,from:a,to:l}}(e,t,n),p=e.state.doc,f=p.slice(h.from,h.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(o=e.state.selection.to,s="end"):(o=e.state.selection.from,s="start"),e.input.lastKeyCode=null;let m=function(e,t,n,r,i){let o=e.findDiffStart(t,n),s=n+e.size,a=n+t.size;if(null==o)return null;let{a:l,b:c}=e.findDiffEnd(t,s,a);if("end"==i){let e=Math.max(0,o-Math.min(l,c));r-=l+e-o}if(l<o&&s<a){let e=r<=o&&r>=l?o-r:0;o-=e,c=o+(c-l),l=o}else if(c<o){let e=r<=o&&r>=c?o-r:0;o-=e,l=o+(l-c),c=o}return{start:o,endA:l,endB:c}}(f.content,h.doc.content,h.from,o,s);if(m&&e.input.domChangeCount++,(lw&&e.input.lastIOSEnter>Date.now()-225||lS)&&i.some(e=>1==e.nodeType&&!dE.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",t=>t(e,ll(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&u instanceof ap&&!u.empty&&u.$head.sameParent(u.$anchor)&&!e.composing&&!(h.sel&&h.sel.anchor!=h.sel.head))m={start:u.from,endA:u.to,endB:u.to};else{if(h.sel){let t=dT(e,e.state.doc,h.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);l&&n.setMeta("composition",l),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof ap&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),lm&&lg<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>h.from&&" Â "==h.doc.textBetween(m.start-h.from-1,m.start-h.from+1)&&(m.start--,m.endA--,m.endB--);let g=h.doc.resolveNoCache(m.start-h.from),y=h.doc.resolveNoCache(m.endB-h.from),b=p.resolve(m.start),v=g.sameParent(y)&&g.parent.inlineContent&&b.end()>=m.endA;if((lw&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!v&&g.pos<h.doc.content.size&&(!g.sameParent(y)||!g.parent.inlineContent)&&g.pos<y.pos&&!/\S/.test(h.doc.textBetween(g.pos,y.pos,"","")))&&e.someProp("handleKeyDown",t=>t(e,ll(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&function(e,t,n,r,i){if(n-t<=i.pos-r.pos||dS(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(!r.parent.isTextblock){let e=o.nodeAfter;return null!=e&&n==t+e.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(dS(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||dS(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,m.start,m.endA,g,y)&&e.someProp("handleKeyDown",t=>t(e,ll(8,"Backspace")))){lS&&lv&&e.domObserver.suppressSelectionUpdates();return}lv&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),lS&&!v&&g.start()!=y.start()&&0==y.parentOffset&&g.depth==y.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==m.endA&&(m.endB-=2,y=h.doc.resolveNoCache(m.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(t){return t(e,ll(13,"Enter"))})},20));let k=m.start,x=m.endA,w=t=>{let n=t||e.state.tr.replace(k,x,h.doc.slice(m.start-h.from,m.endB-h.from));if(h.sel){let t=dT(e,n.doc,h.sel);
vendor: 4,599 bytes, line 31
31t&&!(lv&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==k||t.head==n.mapping.map(x)-1)||lm&&t.empty&&t.head==k)&&n.setSelection(t)}return l&&n.setMeta("composition",l),n.scrollIntoView()};if(v)if(g.pos==y.pos){lm&&lg<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>cn(e),20));let t=w(e.state.tr.delete(k,x)),n=p.resolve(m.start).marksAcross(p.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(a=function(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,o=r,s,a,l;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)o=n[e].removeFromSet(o);if(1==i.length&&0==o.length)a=i[0],s="add",l=e=>e.mark(a.addToSet(e.marks));else{if(0!=i.length||1!=o.length)return null;a=o[0],s="remove",l=e=>e.mark(a.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(l(t.child(e)));if(oJ.from(c).eq(e))return{mark:a,type:s}}(g.parent.content.cut(g.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,m.endA-b.start())))){let t=w(e.state.tr);"add"==a.type?t.addMark(k,x,a.mark):t.removeMark(k,x,a.mark),e.dispatch(t)}else if(g.parent.child(g.index()).isText&&g.index()==y.index()-!y.textOffset){let t=g.parent.textBetween(g.parentOffset,y.parentOffset),n=()=>w(e.state.tr.insertText(t,k,x));e.someProp("handleTextInput",r=>r(e,k,x,t,n))||e.dispatch(n())}else e.dispatch(w());else e.dispatch(w())})(this,e,t,n,r)),this.domObserver.start(),function(e){for(let t in cR){let n=cR[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||cF(e,t)||!e.editable&&t.type in cz||n(e,t)},cL[t]?{passive:!0}:void 0)}lx&&e.dom.addEventListener("input",()=>null),c$(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&c$(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(dM),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n,r,i;let o=this.state,s=!1,a=!1;e.storedMarks&&this.composing&&(cQ(this),a=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=dO(this);(function(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&c$(this),this.editable=dN(this),d_(this);let c=df(this),d=dA(this),u=o.plugins==e.plugins||o.doc.eq(e.doc)?e.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",h=s||!this.docView.matchesNode(e.doc,d,c);(h||!e.selection.eq(o.selection))&&(a=!0);let p="preserve"==u&&a&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=e.root.elementFromPoint(o,s);if(!r||r==e.dom||!e.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){t=r,n=a.top;break}}return{refDOM:t,refTop:n,stack:lO(e.dom)}}(this);if(a){let t,n,a;this.domObserver.stop();let l=h&&(lm||lv)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(r=o.selection,i=e.selection,a=Math.min(r.$anchor.sharedDepth(r.head),i.$anchor.sharedDepth(i.head)),r.$anchor.start(a)!=i.$anchor.start(a));if(h){let t=lv?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=function(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=lo(e=e.childNodes[t-1])}else{if(!e.parentNode||ls(e))return null;t=a8(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||ls(e))return null;t=a8(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);
31if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}(this)),(s||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=lY(e.doc,d,c,this.dom,this)),!t||this.trackWrites&&this.dom.contains(this.trackWrites)||(l=!0)}let u=this.input.mouseDown;l||!(u&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(t=this.docView.domFromPos(this.state.selection.anchor,0),n=this.domSelectionRange(),ln(t.node,t.offset,n.anchorNode,n.anchorOffset))&&u.delaySelUpdate())?cn(this,l):(ca(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),(null==(n=this.dragging)?void 0:n.node)&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),"reset"==u?this.dom.scrollTop=0:"to selection"==u?this.scrollToSelection():p&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;lM(n,0==r?0:r-t)}(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(1==e.nodeType?e:e.parentNode))if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof am){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&lN(this,t.getBoundingClientRect(),e)}else lN(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new c5(e.slice,e.move,r<0?void 0:am.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(null!=n&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(null!=i&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let o=i[n].props[e];if(null!=o&&(r=t?t(o):o))return r}}hasFocus(){if(lm){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(lI)return e.focus(lI);let t=lO(e);e.focus(null==lI?{get preventScroll(){return lI={preventScroll:!0},!0}}:void 0),lI||(lI=!1,lM(t,0))}(this.dom),cn(this),this.domObserver.start()}get root(){let e=this._root;if(null==e){for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return function(e,t){var n;let r,i,o=e.dom.ownerDocument,s,a=0,l=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(lo(r.offsetNode),r.offset)}}catch(e){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(lo(r.startContainer),r.startOffset)}}}(o,t.left,t.top);l&&({node:s,offset:a}=l);let c=(e.root.elementFromPoint?e.root:o).elementFromPoint(t.left,t.top);if(!c||!e.dom.contains(1!=c.nodeType?c.parentNode:c)){let n=e.dom.getBoundingClientRect();if(!lD(t,n)||!(c=function e(t,n,r){let i=t.childNodes.length;if(i&&r.top<r.bottom)for(let o=Math.max(0,Math.min(i-1,Math.floor(i*(n.top-r.top)/(r.bottom-r.top))-2)),s=o;;){let r=t.childNodes[s];if(1==r.nodeType){let t=r.getClientRects();for(let i=0;i<t.length;i++){let o=t[i];if(lD(n,o))return e(r,n,o)}}if((s=(s+1)%i)==o)break}return t}(e.dom,t,n)))return null}if(lx)for(let e=c;s&&e;e=a9(e))e.draggable&&(s=void 0);if(c=(r=(n=c).parentNode)&&/^li$/i.test(r.nodeName)&&t.left<n.getBoundingClientRect().left?r:n,s){let n;if(ly&&1==s.nodeType&&(a=Math.min(a,s.childNodes.length))<s.childNodes.length){let e=s.childNodes[a],n;"IMG"==e.nodeName&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&a++}
31lC&&a&&1==s.nodeType&&1==(n=s.childNodes[a-1]).nodeType&&"false"==n.contentEditable&&n.getBoundingClientRect().top>=t.top&&a--,s==e.dom&&a==s.childNodes.length-1&&1==s.lastChild.nodeType&&t.top>s.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:(0==a||1!=s.nodeType||"BR"!=s.childNodes[a-1].nodeName)&&(i=function(e,t,n,r){let i=-1;for(let n=t,o=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),s;if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((s=t.dom.getBoundingClientRect()).width||s.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!o&&s.left>r.left||s.top>r.top?i=t.posBefore:(!o&&s.right<r.left||s.bottom<r.top)&&(i=t.posAfter),o=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(s.top+s.bottom)/2:r.left<(s.left+s.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}(e,s,a,t))}null==i&&(i=function(e,t,n){let{node:r,offset:i}=function e(t,n){let r,i,o,s=2e8,a,l=0,c=n.top,d=n.top;for(let e=t.firstChild,u=0;e;e=e.nextSibling,u++){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=le(e).getClientRects()}for(let h=0;h<t.length;h++){let p=t[h];if(p.top<=c&&p.bottom>=d){c=Math.max(p.bottom,c),d=Math.min(p.top,d);let t=p.left>n.left?p.left-n.left:p.right<n.left?n.left-p.right:0;if(t<s){o=e,s=t,a=t&&3==o.nodeType?{left:p.right<n.left?p.right:p.left,top:n.top}:n,1==e.nodeType&&t&&(l=u+ +(n.left>=(p.left+p.right)/2));continue}}else p.top>n.top&&!r&&p.left<=n.left&&p.right>=n.left&&(r=e,i={left:Math.max(p.left,Math.min(p.right,n.left)),top:p.top});!o&&(n.left>=p.right&&n.top>=p.top||n.left>=p.left&&n.top>=p.bottom)&&(l=u+1)}}return(!o&&r&&(o=r,a=i,s=0),o&&3==o.nodeType)?function(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=lz(r,1);if(n.top!=n.bottom&&lD(t,n)){i={node:e,offset:o+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}(o,a):!o||s&&1==o.nodeType?{node:t,offset:l}:e(o,a)}(t,n),o=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();o=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}(e,c,t));let d=e.docView.nearestDesc(c,!0);return{pos:i,inside:d?d.posAtStart-d.border:-1}}(this,e)}coordsAtPos(e,t=1){return lP(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return function(e,t,n){let r,i;return lH==t&&lU==n?lV:(lH=t,lU=n,lV="up"==n||"down"==n?(r=t.selection,i="up"==n?r.$from:r.$to,lF(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=lP(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=le(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=i==r.parent.content.size,s=e.domSelection();return s?lB.test(r.parent.textContent)&&s.modify?lF(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:a}=e.domSelectionRange(),l=s.caretBidiLevel;s.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:d,focusOffset:u}=e.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||t==d&&i==u;try{s.collapse(o,a),t&&(t!=o||i!=a)&&s.extend&&s.extend(t,i)}catch(e){}return null!=l&&(s.caretBidiLevel=l),h}):"left"==n||"backward"==n?!i:o:r.pos==r.start()||r.pos==r.end()}(e,t,n))}(this,t||this.state,e)}pasteHTML(e,t){return c1(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return c1(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return cT(this,e)}destroy(){if(this.docView){for(let e in this.input.mouseDown&&this.input.mouseDown.done(),this.domObserver.stop(),this.input.eventHandlers)this.dom.removeEventListener(e,this.input.eventHandlers[e]);clearTimeout(this.input.composingTimeout),clearTimeout(this.input.lastIOSEnterFallbackTimeout),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],df(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,lt()}}get isDestroyed(){return null==this.docView}dispatchEvent(e){!cF(this,e)&&cR[e.type]&&(this.editable||!(e.type in cz))&&cR[e.type](this,e)}domSelectionRange(){let e=this.domSelection();return e?lx&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){let n;if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return dx(e,n)}function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?dx(e,n):null}
31(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function dA(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),t.translate||(t.translate="no"),[de.node(0,e.state.doc.content.size,t)]}function d_(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:de.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function dN(e){return!e.someProp("editable",t=>!1===t(e.state))}function dO(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function dM(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError("Plugins passed directly to the view must not have a state component")}dC.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};var dI=e.i(260861);let dD="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),dR="u">typeof navigator&&/Win/.test(navigator.platform);function dz(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function dL(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))dD?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=e[n];return t}(e);return function(e,n){let r=(0,dI.keyName)(n),i,o=t[dz(r,n)];if(o&&o(e.state,e.dispatch,e))return!0;if(1==r.length&&" "!=r){if(n.shiftKey){let i=t[dz(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(dR&&n.ctrlKey&&n.altKey)&&(i=dI.base[n.keyCode])&&i!=r){let r=t[dz(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var dP=Object.defineProperty,dj=(e,t)=>{for(var n in t)dP(e,n,{get:t[n],enumerable:!0})};function d$(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}var dF=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!e,l=e||i.tr,c=()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every(e=>!0===e)),d={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(l,t),i=n(...e)(r);return s.push(i),d}])),run:c};return d}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:e,editor:r,view:o,state:d$({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(s)]))}};return s}},dB={};dj(dB,{blur:()=>dH,clearContent:()=>dU,clearNodes:()=>dV,command:()=>dq,createParagraphNear:()=>dG,cut:()=>dW,deleteCurrentNode:()=>dK,deleteNode:()=>dY,deleteRange:()=>dX,deleteSelection:()=>dZ,enter:()=>d0,exitCode:()=>d1,extendMarkRange:()=>d9,first:()=>d7,focus:()=>uo,forEach:()=>us,insertContent:()=>ua,insertContentAt:()=>uu,joinBackward:()=>uf,joinDown:()=>up,joinForward:()=>um,joinItemBackward:()=>ug,joinItemForward:()=>uy,joinTextblockBackward:()=>ub,joinTextblockForward:()=>uv,joinUp:()=>uh,keyboardShortcut:()=>ux,lift:()=>uE,liftEmptyBlock:()=>uT,liftListItem:()=>uS,newlineInCode:()=>uC,resetAttributes:()=>uN,scrollIntoView:()=>uO,selectAll:()=>uM,selectNodeBackward:()=>uI,selectNodeForward:()=>uD,selectParentNode:()=>uR,selectTextblockEnd:()=>uz,selectTextblockStart:()=>uL,setContent:()=>uj,setMark:()=>hh,setMeta:()=>hp,setNode:()=>hf,setNodeSelection:()=>hm,setTextDirection:()=>hg,setTextSelection:()=>hy,sinkListItem:()=>hb,splitBlock:()=>hk,splitListItem:()=>hx,toggleList:()=>hS,toggleMark:()=>hC,toggleNode:()=>hA,toggleWrap:()=>h_,undoInputRule:()=>hN,unsetAllMarks:()=>hO,unsetMark:()=>hM,unsetTextDirection:()=>hI,updateAttributes:()=>hD,wrapIn:()=>hR,wrapInList:()=>hz});var dH=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),null==(n=null==window?void 0:window.getSelection())||n.removeAllRanges())}),!0),dU=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),dV=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return!n||(i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+e.nodeSize)),a=o.blockRange(s);if(!a)return;let l=sY(a);if(e.type.isTextblock){let{defaultType:e}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(a.start,e)}(l||0===l)&&t.lift(a,l)})}),!0)},dq=e=>t=>e(t),dG=()=>({state:e,dispatch:t})=>aW(e,t),dW=(e,t)=>
31({editor:n,tr:r})=>{let{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new ap(r.doc.resolve(Math.max(s-1,0)))),!0},dK=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;n-=1)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function dJ(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var dY=e=>({tr:t,state:n,dispatch:r})=>{let i=dJ(e,n.schema),o=t.selection.$anchor;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===i){if(r){let n=o.before(e),r=o.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},dX=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},dQ=(e,t,n)=>{var r;return!e.parent.isInline||"left"===n&&e.pos>e.start()||"right"===n&&e.pos<e.end()?e.pos:(r=t.nodes[e.parent.type.name].spec).content&&/^text(\*|\+)/.test(r.content)?"left"===n?e.start()-1:e.end()+1:e.pos},dZ=()=>({state:e,dispatch:t})=>{var n;let{$from:r,$to:i}=e.selection;if(e.selection.empty)return!1;let{from:o,to:s}={from:dQ(r,n=e.schema,"left"),to:dQ(i,n,"right")};return t&&(e.tr.deleteRange(o,s).scrollIntoView(),t(e.tr)),!0},d0=()=>({commands:e})=>e.keyboardShortcut("Enter"),d1=()=>({state:e,dispatch:t})=>aG(e,t);function d2(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function d5(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:d2(t[r])?t[r].test(e[r]):t[r]===e[r])}function d3(e,t,n={}){return e.find(e=>e.type===t&&d5(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function d4(e,t,n={}){return!!d3(e,t,n)}function d6(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(r.node&&r.node.marks.some(e=>e.type===t)||(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!d3([...r.node.marks],t,n))return;let i=r.index,o=e.start()+r.offset,s=i+1,a=o+r.node.nodeSize;for(;i>0&&d4([...e.parent.child(i-1).marks],t,n);)i-=1,o-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&d4([...e.parent.child(s).marks],t,n);)a+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:a}}function d8(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var d9=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=d8(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:d}=a;if(i){let e=d6(l,o,t);if(e&&e.from<=c&&e.to>=d){let t=ap.create(s,e.from,e.to);n.setSelection(t)}}return!0},d7=e=>t=>{let n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function ue(e){return e instanceof ap}function ut(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function un(e,t=null){if(!t)return null;let n=ac.atStart(e),r=ac.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;let i=n.from,o=r.to;return"all"===t?ap.create(e,ut(0,i,o),ut(e.content.size,i,o)):ap.create(e,ut(t,i,o),ut(t,i,o))}function ur(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function ui(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var uo=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};let s=()=>{(ui()||ur())&&r.dom.focus(),"u">typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!ui()&&!ur()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{!n.isDestroyed&&(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&null===e||!1===e)return!0}catch{return!1}if(o&&null===e&&!ue(n.state.selection))return s(),!0;let a=un(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},us=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),ua=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),ul=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&ul(r)}return e};function uc(e){if("u"<typeof window)throw Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`;return ul(new window.DOMParser().parseFromString(t,"text/html").body)}function ud(e,t,n){if(e instanceof si||e instanceof oJ)return e;n={slice:!0,parseOptions:{},...n};let r="object"==typeof e&&null!==e,i="string"==typeof e;if(r)try{if(Array.isArray(e)&&e.length>0)return oJ.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error("[tiptap error]: Invalid JSON content",{cause:r});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),ud("",t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i="",o=new sv({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(r=!0,i="string"==typeof e?e:e.outerHTML,null)}]}})});if(n.slice?sx.fromSchema(o).parseSlice(uc(e),n.parseOptions):sx.fromSchema(o).parse(uc(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error("[tiptap error]: Invalid HTML content",{cause:Error(`Invalid element found: ${i}`)})}let r=sx.fromSchema(t);return n.slice?r.parseSlice(uc(e),n.parseOptions).content:r.parse(uc(e),n.parseOptions)}return ud("",t,n)}
31var uu=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{var s;if(i){let i,a;n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l=e=>{o.emit("contentError",{editor:o,error:e,disableCollaboration:()=>{"collaboration"in o.storage&&"object"==typeof o.storage.collaboration&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{ud(t,o.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(e){l(e)}try{i=ud(t,o.schema,{parseOptions:c,errorOnInvalidContent:null!=(s=n.errorOnInvalidContent)?s:o.options.enableContentCheck})}catch(e){return l(e),!1}let{from:d,to:u}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},h=!0,p=!0;if((!("type"in i)?i:[i]).forEach(e=>{e.check(),h=!!h&&e.isText&&0===e.marks.length,p=!!p&&e.isBlock}),d===u&&p){let{parent:e}=r.doc.resolve(d);!e.isTextblock||e.type.spec.code||e.childCount||(d-=1,u+=1)}if(h){if(Array.isArray(t))a=t.map(e=>e.text||"").join("");else if(t instanceof oJ){let e="";t.forEach(t=>{t.text&&(e+=t.text)}),a=e}else a="object"==typeof t&&t&&t.text?t.text:t;r.insertText(a,d,u)}else{a=i;let e=r.doc.resolve(d),t=e.node(),n=0===e.parentOffset,o=t.isText||t.isTextblock,s=t.content.size>0;n&&o&&s&&p&&(d=Math.max(0,d-1)),r.replaceWith(d,u,a)}n.updateSelection&&function(e,t){let n=e.steps.length-1;if(n<t)return;let r=e.steps[n];if(!(r instanceof sG||r instanceof sW))return;let i=e.mapping.maps[n],o=0;i.forEach((e,t,n,r)=>{0===o&&(o=r)}),e.setSelection(ac.near(e.doc.resolve(o),-1))}(r,r.steps.length-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:a}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:a})}return!0},uh=()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,r=n instanceof am,i;if(r){if(n.node.isTextblock||!s2(e.doc,n.from))return!1;i=n.from}else if(null==(i=s3(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(am.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0})(e,t),up=()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,r;if(n instanceof am){if(n.node.isTextblock||!s2(e.doc,n.to))return!1;r=n.to}else if(null==(r=s3(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0})(e,t),uf=()=>({state:e,dispatch:t})=>aD(e,t),um=()=>({state:e,dispatch:t})=>aB(e,t),ug=()=>({state:e,dispatch:t,tr:n})=>{try{let r=s3(e.doc,e.selection.$from.pos,-1);if(null==r)return!1;return n.join(r,2),t&&t(n),!0}catch{return!1}},uy=()=>({state:e,dispatch:t,tr:n})=>{try{let r=s3(e.doc,e.selection.$from.pos,1);if(null==r)return!1;return n.join(r,2),t&&t(n),!0}catch{return!1}},ub=()=>({state:e,dispatch:t})=>aR(e,t),uv=()=>({state:e,dispatch:t})=>az(e,t);function uk(){return"u">typeof navigator&&/Mac/.test(navigator.platform)}var ux=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let o=(function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"===s&&(s=" ");for(let e=0;e<o.length-1;e+=1){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))ui()||uk()?i=!0:n=!0;else throw Error(`Unrecognized modifier name: ${s}`)}return t&&(s=`Alt-${s}`),n&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),r&&(s=`Shift-${s}`),s})(e).split(/-(?!$)/),s=o.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,a))});return null==l||l.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function uw(e,t,n={}){let{from:r,to:i,empty:o}=e.selection,s=t?dJ(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a.push({node:e,from:n,to:o})});let l=i-r,c=a.filter(e=>!s||s.name===e.node.type.name).filter(e=>d5(e.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((e,t)=>
31e+t.to-t.from,0)>=l}var uE=(e,t={})=>({state:n,dispatch:r})=>{let i=dJ(e,n.schema);return!!uw(n,i,t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&sY(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)})(n,r)},uT=()=>({state:e,dispatch:t})=>aK(e,t),uS=e=>({state:t,dispatch:n})=>a6(dJ(e,t.schema))(t,n),uC=()=>({state:e,dispatch:t})=>aV(e,t);function uA(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function u_(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var uN=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null,a=uA("string"==typeof e?e:e.name,r.schema);if(!a)return!1;"node"===a&&(o=dJ(e,r.schema)),"mark"===a&&(s=d8(e,r.schema));let l=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{o&&o===e.type&&(l=!0,i&&n.setNodeMarkup(r,void 0,u_(e.attrs,t))),s&&e.marks.length&&e.marks.forEach(o=>{s===o.type&&(l=!0,i&&n.addMark(r,r+e.nodeSize,s.create(u_(o.attrs,t))))})})}),l},uO=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),uM=()=>({tr:e,dispatch:t})=>{if(t){let t=new ay(e.doc);e.setSelection(t)}return!0},uI=()=>({state:e,dispatch:t})=>aj(e,t),uD=()=>({state:e,dispatch:t})=>aH(e,t),uR=()=>({state:e,dispatch:t})=>((e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(am.create(e.doc,i))),!0)})(e,t),uz=()=>({state:e,dispatch:t})=>aQ(e,t),uL=()=>({state:e,dispatch:t})=>aX(e,t);function uP(e,t,n={},r={}){return ud(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var uj=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{let{doc:l}=o;if("full"!==r.preserveWhitespace){let a=uP(e,i.schema,r,{errorOnInvalidContent:null!=t?t:i.options.enableContentCheck});return s&&o.replaceWith(0,l.content.size,a).setMeta("preventUpdate",!n),!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:null!=t?t:i.options.enableContentCheck})};function u$(e,t){let n=d8(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{s.push(...e.marks)});let a=s.find(e=>e.type.name===n.name);return a?{...a.attrs}:{}}function uF(e,t){let n=new aa(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function uB(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function uH(e){return t=>uB(t.$from,e)}function uU(e,t,n){return void 0===e.config[t]&&e.parent?uU(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?uU(e.parent,t,n):null}):e.config[t]}function uV(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=uU(e,"addExtensions",t);return n?[e,...uV(n())]:e}).flat(10)}function uq(e,t){let n=sO.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function uG(e){return"function"==typeof e}function uW(e,t,...n){return uG(e)?t?e.bind(t)(...n):e(...n):e}function uK(e){let t=e.filter(e=>"extension"===e.type);return{baseExtensions:t,nodeExtensions:e.filter(e=>"node"===e.type),markExtensions:e.filter(e=>"mark"===e.type)}}function uJ(e){let t=[],{nodeExtensions:n,markExtensions:r}=uK(e),i=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(e=>"text"!==e.name).map(e=>e.name),a=r.map(e=>e.name),l=[...s,...a];return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage,extensions:i},r=uU(e,"addGlobalAttributes",n);r&&r().forEach(e=>{(Array.isArray(e.types)?e.types:"*"===e.types?l:"nodes"===e.types?s:"marks"===e.types?a:[]).forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...o,...r}})})})})}
31),i.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=uU(e,"addAttributes",n);r&&Object.entries(r()).forEach(([n,r])=>{let i={...o,...r};"function"==typeof(null==i?void 0:i.default)&&(i.default=i.default()),(null==i?void 0:i.isRequired)&&(null==i?void 0:i.default)===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function uY(e){let t=[],n=function(e){let t=[],n="",r=!1,i=!1,o=0,s=e.length;for(let a=0;a<s;a+=1){let s=e[a];if("'"===s&&!i){r=!r,n+=s;continue}if('"'===s&&!r){i=!i,n+=s;continue}if(!r&&!i){if("("===s){o+=1,n+=s;continue}if(")"===s&&o>0){o-=1,n+=s;continue}if(";"===s&&0===o){t.push(n),n="";continue}}n+=s}return n&&t.push(n),t}(e||""),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(":");if(-1===i)continue;let o=r.slice(0,i).trim(),s=r.slice(i+1).trim();o&&s&&t.push([o,s])}return t}function uX(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if("class"===e){let r=t?String(t).split(" "):[],i=n[e]?n[e].split(" "):[],o=r.filter(e=>!i.includes(e));n[e]=[...i,...o].join(" ")}else if("style"===e){let r=new Map([...uY(n[e]),...uY(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join("; ")}else n[e]=t}),n},{})}function uQ(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>uX(e,t),{})}function uZ(e,t){return"style"in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;let i=t.reduce((e,t)=>{var r;let i=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(r=n.getAttribute(t.name))?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r;return null==i?e:{...e,[t.name]:i}},{});return{...r,...i}}}}function u0(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!("attrs"===e&&function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t))}function u1(e){var t,n;let r={};return!(null==(t=null==e?void 0:e.attribute)?void 0:t.isRequired)&&"default"in((null==e?void 0:e.attribute)||{})&&(r.default=e.attribute.default),(null==(n=null==e?void 0:e.attribute)?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function u2(e,t){var n;let r=uJ(e),{nodeExtensions:i,markExtensions:o}=uK(e),s=null==(n=i.find(e=>uU(e,"topNode")))?void 0:n.name;return new sv({topNode:s,nodes:Object.fromEntries(i.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=u0({...e.reduce((e,t)=>{let r=uU(t,"extendNodeSchema",o);return{...e,...r?r(n):{}}},{}),content:uW(uU(n,"content",o)),marks:uW(uU(n,"marks",o)),group:uW(uU(n,"group",o)),inline:uW(uU(n,"inline",o)),atom:uW(uU(n,"atom",o)),selectable:uW(uU(n,"selectable",o)),draggable:uW(uU(n,"draggable",o)),code:uW(uU(n,"code",o)),whitespace:uW(uU(n,"whitespace",o)),linebreakReplacement:uW(uU(n,"linebreakReplacement",o)),defining:uW(uU(n,"defining",o)),isolating:uW(uU(n,"isolating",o)),attrs:Object.fromEntries(i.map(u1))}),a=uW(uU(n,"parseHTML",o));a&&(s.parseDOM=a.map(e=>uZ(e,i)));let l=uU(n,"renderHTML",o);l&&(s.toDOM=e=>l({node:e,HTMLAttributes:uQ(e,i)}));let c=uU(n,"renderText",o);return c&&(s.toText=c),[n.name,s]})),marks:Object.fromEntries(o.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},s=u0({...e.reduce((e,t)=>{let r=uU(t,"extendMarkSchema",o);return{...e,...r?r(n):{}}},{}),inclusive:uW(uU(n,"inclusive",o)),excludes:uW(uU(n,"excludes",o)),group:uW(uU(n,"group",o)),spanning:uW(uU(n,"spanning",o)),code:uW(uU(n,"code",o)),attrs:Object.fromEntries(i.map(u1))}),a=uW(uU(n,"parseHTML",o));a&&(s.parseDOM=a.map(e=>uZ(e,i)));let l=uU(n,"renderHTML",o);return l&&(s.toDOM=e=>l({mark:e,HTMLAttributes:uQ(e,i)})),[n.name,s]}))})}function u5(e){return e.sort((e,t)=>{let n=uU(e,"priority")||100,r=uU(t,"priority")||100;return n>r?-1:+(n<r)})}function u3(e){var t;let n=u5(uV(e)),r=Array.from(new Set((t=n.map(e=>e.name)).filter((e,n)=>t.indexOf(e)!==n)));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),n}function u4(e,t,n){let{from:r,to:i}
31=t,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{},a="";return e.nodesBetween(r,i,(e,n,l,c)=>{var d;e.isBlock&&n>r&&(a+=o);let u=null==s?void 0:s[e.type.name];if(u)return l&&(a+=u({node:e,pos:n,parent:l,index:c,range:t})),!1;e.isText&&(a+=null==(d=null==e?void 0:e.text)?void 0:d.slice(Math.max(r,n)-n,i-n))}),a}function u6(e,t){let n={from:0,to:e.content.size};return u4(e,n,t)}function u8(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function u9(e,t){let n=uA("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){let n=dJ(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,e=>{o.push(e)});let s=o.reverse().find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}(e,t):"mark"===n?u$(e,t):{}}function u7(e){let t,{mapping:n,steps:r}=e,i=[];return n.maps.forEach((e,t)=>{let o=[];if(e.ranges.length)e.forEach((e,t)=>{o.push({from:e,to:t})});else{let{from:e,to:n}=r[t];if(void 0===e||void 0===n)return;o.push({from:e,to:n})}o.forEach(({from:e,to:r})=>{let o=n.slice(t).map(e,-1),s=n.slice(t).map(r),a=n.invert().map(o,-1),l=n.invert().map(s);i.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})})}),1===(t=function(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)})}(i)).length?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function he(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=d6(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&(null==e?void 0:e.nodeSize)!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}function ht(e,t){return t.nodes[e]||t.marks[e]||null}function hn(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return!!r&&r.attribute.keepOnSplit}))}function hr(e,t,n={}){let{empty:r,ranges:i}=e.selection,o=t?d8(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!o||o.name===e.type.name).find(e=>d5(e.attrs,n,{strict:!1}));let s=0,a=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(o&&e.inlineContent&&!e.type.allowsMarkType(o))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),l=Math.min(i,t+e.nodeSize);s+=l-n,a.push(...e.marks.map(e=>({mark:e,from:n,to:l})))})}),0===s)return!1;let l=a.filter(e=>!o||o.name===e.mark.type.name).filter(e=>d5(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),c=a.filter(e=>!o||e.mark.type!==o&&e.mark.type.excludes(o)).reduce((e,t)=>e+t.to-t.from,0);return(l>0?l+c:l)>=s}function hi(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}function ho(e,t){let{nodeExtensions:n}=uK(t),r=n.find(t=>t.name===e);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},o=uW(uU(r,"group",i));return"string"==typeof o&&o.split(" ").includes("list")}function hs(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===e.type.name)return!0;if(e.isText)return!/\S/.test(null!=(r=e.text)?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(0===e.content.childCount)return!0;if(t){let r=!0;return e.content.forEach(e=>{!1!==r&&(hs(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function ha(e){return e instanceof am}var hl=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function hc(e,t){let n=t.mapping.mapResult(e.position);return{position:new hl(n.pos),mapResult:n}}function hd(e){return new hl(e)}function hu(e,t,n){let r=e.state.doc.content.size,i=ut(t,0,r),o=ut(n,0,r),s=e.coordsAtPos(i),a=e.coordsAtPos(o,-1),l=Math.min(s.top,a.top),c=Math.max(s.bottom,a.bottom),d=Math.min(s.left,a.left),u=Math.max(s.right,a.right),h={top:l,bottom:c,left:d,right:u,width:u-d,height:c-l,x:d,y:l};return{...h,toJSON:()=>h}}var hh=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:o}=n,{empty:s,ranges:a}=o,l=d8(e,r.schema);if(i)if(s){let e=u$(r,l);n.addStoredMark(l.create({...e,...t}))}
31else a.forEach(e=>{let i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,(e,r)=>{let s=Math.max(r,i),a=Math.min(r+e.nodeSize,o);e.marks.find(e=>e.type===l)?e.marks.forEach(e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))}):n.addMark(s,a,l.create(t))})});return function(e,t,n){var r;let{selection:i}=t,o=null;if(ue(i)&&(o=i.$cursor),o){let t=null!=(r=e.storedMarks)?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:s}=i;return s.some(({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),o=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&o}return!i}),i})}(r,n,l)},hp=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),hf=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let o,s=dJ(e,n.schema);return(n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock)?i().command(({commands:e})=>!!aZ(s,{...o,...t})(n)||e.clearNodes()).command(({state:e})=>aZ(s,{...o,...t})(e,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},hm=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=ut(e,0,n.content.size),i=am.create(n,r);t.setSelection(i)}return!0},hg=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o,s,{selection:a}=r;return"number"==typeof t?(o=t,s=t):t&&"from"in t&&"to"in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},hy=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}="number"==typeof e?{from:e,to:e}:e,o=ap.atStart(n).from,s=ap.atEnd(n).to,a=ut(r,o,s),l=ut(i,o,s),c=ap.create(n,a,l);t.setSelection(c)}return!0},hb=e=>({state:t,dispatch:n})=>{var r;return(r=dJ(e,t.schema),function(e,t){let{$from:n,$to:i}=e.selection,o=n.blockRange(i,e=>e.childCount>0&&e.firstChild.type==r);if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=r)return!1;if(t){let n=l.lastChild&&l.lastChild.type==a.type,i=oJ.from(n?r.create():null),s=new o1(oJ.from(r.create(null,oJ.from(a.type.create(null,i)))),n?3:1,0),c=o.start,d=o.end;t(e.tr.step(new sW(c-(n?3:1),d,c,d,s,1,!0)).scrollIntoView())}return!0})(t,n)};function hv(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}var hk=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=hn(i.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof am&&o.node.isBlock)return!!a.parentOffset&&!!s1(s,a.pos)&&(r&&(e&&hv(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,u=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1))),h=d&&u?[{type:u,attrs:c}]:void 0,p=s1(t.doc,t.mapping.map(a.pos),1,h);if(!h&&!p&&s1(t.doc,t.mapping.map(a.pos),1,u?[{type:u}]:void 0)&&(p=!0,h=u?[{type:u,attrs:c}]:void 0),r){if(p&&(o instanceof ap&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,h),u&&!d&&!a.parentOffset&&a.parent.type!==u)){let e=t.mapping.map(a.before()),n=t.doc.resolve(e);a.node(-1).canReplaceWith(n.index(),n.index()+1,u)&&t.setNodeMarkup(t.mapping.map(a.before()),u)}e&&hv(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return p},hx=(e,t={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var s;let a=dJ(e,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;let u=l.node(-1);if(u.type!==a)return!1;let h=o.extensionManager.attributes;if(0===l.parent.content.size&&l.node(-1).childCount===l.indexAfter(-1)){if(2===l.depth||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let e=oJ.empty,r=l.index(-1)?1:l.index(-2)?2:3;for(let t=l.depth-r;t>=l.depth-3;t-=1)e=oJ.from(l.node(t).copy(e));let i=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,o={...hn(h,l.node().type.name,l.node().attrs),...t}
31,c=(null==(s=a.contentMatch.defaultType)?void 0:s.createAndFill(o))||void 0;e=e.append(oJ.from(a.createAndFill(null,c)||void 0));let d=l.before(l.depth-(r-1));n.replace(d,l.after(-i),new o1(e,4-r,0));let u=-1;n.doc.nodesBetween(d,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)}),u>-1&&n.setSelection(ap.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let p=c.pos===l.end()?u.contentMatchAt(0).defaultType:null,f={...hn(h,u.type.name,u.attrs),...t},m={...hn(h,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);let g=p?[{type:a,attrs:f},{type:p,attrs:m}]:[{type:a,attrs:f}];if(!s1(n.doc,l.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:s}=o.extensionManager,a=t||e.$to.parentOffset&&e.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!a||!i)return!0;let c=a.filter(e=>s.includes(e.type.name));n.ensureMarks(c)}return!0};function hw(e){return e&&"1"!==e?e:null}var hE=(e,t)=>{var n,r;let i=uH(e=>e.type===t)(e.selection);if(!i)return!0;let o=e.doc.resolve(Math.max(0,i.pos-1)).before(i.depth);if(void 0===o)return!0;let s=e.doc.nodeAt(o);return!(i.node.type===(null==s?void 0:s.type)&&s2(e.doc,i.pos))||(n=i.node.attrs.type,r=null==s?void 0:s.attrs.type,hw(n)!==hw(r)||(e.join(i.pos),!0))},hT=(e,t)=>{var n,r;let i=uH(e=>e.type===t)(e.selection);if(!i)return!0;let o=e.doc.resolve(i.start).after(i.depth);if(void 0===o)return!0;let s=e.doc.nodeAt(o);return!(i.node.type===(null==s?void 0:s.type)&&s2(e.doc,o))||(n=i.node.attrs.type,r=null==s?void 0:s.attrs.type,hw(n)!==hw(r)||(e.join(o),!0))},hS=(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{let{extensions:u,splittableMarks:h}=i.extensionManager,p=dJ(e,s.schema),f=dJ(t,s.schema),{selection:m,storedMarks:g}=s,{$from:y,$to:b}=m,v=y.blockRange(b),k=g||m.$to.parentOffset&&m.$from.marks();if(!v)return!1;let x=uH(e=>
31ho(e.type.name,u))(m),w=0===m.from&&m.to===s.doc.content.size,E=s.doc.content.content,T=1===E.length?E[0]:null,S=w&&T&&ho(T.type.name,u)?{node:T,pos:0,depth:0}:null,C=null!=x?x:S,A=!!x&&v.depth>=1&&v.depth-x.depth<=1,_=!!S;if((A||_)&&C){if(C.node.type===p)return w&&_?l().command(({tr:e,dispatch:t})=>{let n=function(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return ap.between(r,i)}(e);return!!n&&(e.setSelection(n),t&&t(e),!0)}).liftListItem(f).run():c.liftListItem(f);if(ho(C.node.type.name,u)&&p.validContent(C.node.content))return l().command(()=>(o.setNodeMarkup(C.pos,p),!0)).command(()=>hE(o,p)).command(()=>hT(o,p)).run()}return n&&k&&a?l().command(()=>{let e=d().wrapInList(p,r),t=k.filter(e=>h.includes(e.type.name));return o.ensureMarks(t),!!e||c.clearNodes()}).wrapInList(p,r).command(()=>hE(o,p)).command(()=>hT(o,p)).run():l().command(()=>!!d().wrapInList(p,r)||c.clearNodes()).wrapInList(p,r).command(()=>hE(o,p)).command(()=>hT(o,p)).run()},hC=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:o=!1}=n,s=d8(e,r.schema);return hr(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},hA=(e,t,n={})=>({state:r,commands:i})=>{let o,s=dJ(e,r.schema),a=dJ(t,r.schema),l=uw(r,s,n);return(r.selection.$anchor.sameParent(r.selection.$head)&&(o=r.selection.$anchor.parent.attrs),l)?i.setNode(a,o):i.setNode(s,{...o,...n})},h_=(e,t={})=>({state:n,commands:r})=>{let i=dJ(e,n.schema);return uw(n,i,t)?r.lift(i):r.wrapIn(i,t)},hN=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i,o=n[r];if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){let n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},hO=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{ignoreClearable:i=!1}=e,{selection:o}=t,{empty:s,ranges:a}=o;if(s)return!0;let{nonClearableMarks:l}=r.extensionManager;if(n){let e=Object.values(r.schema.marks).filter(e=>i||!l.includes(e.name));a.forEach(n=>{for(let r of e)t.removeMark(n.$from.pos,n.$to.pos,r)})}return!0},hM=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;let{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=d8(e,r.schema),{$from:c,empty:d,ranges:u}=a;if(!i)return!0;if(d&&s){let{from:e,to:t}=a,r=null==(o=c.marks().find(e=>e.type===l))?void 0:o.attrs,i=d6(c,l,r);i&&(e=i.from,t=i.to),n.removeMark(e,t,l)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,l)});return n.removeStoredMark(l),!0},hI=e=>({tr:t,state:n,dispatch:r})=>{let i,o,{selection:s}=n;return"number"==typeof e?(i=e,o=e):e&&"from"in e&&"to"in e?(i=e.from,o=e.to):(i=s.from,o=s.to),r&&t.doc.nodesBetween(i,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},hD=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null,a=uA("string"==typeof e?e:e.name,r.schema);if(!a)return!1;"node"===a&&(o=dJ(e,r.schema)),"mark"===a&&(s=d8(e,r.schema));let l=!1;return n.selection.ranges.forEach(e=>{let a,c,d,u,h=e.$from.pos,p=e.$to.pos;n.selection.empty?r.doc.nodesBetween(h,p,(e,t)=>{o&&o===e.type&&(l=!0,d=Math.max(t,h),u=Math.min(t+e.nodeSize,p),a=t,c=e)}):r.doc.nodesBetween(h,p,(e,r)=>{r<h&&o&&o===e.type&&(l=!0,d=Math.max(r,h),u=Math.min(r+e.nodeSize,p),a=r,c=e),r>=h&&r<=p&&(o&&o===e.type&&(l=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),s&&e.marks.length&&e.marks.forEach(o=>{if(s===o.type&&(l=!0,i)){let i=Math.max(r,h),a=Math.min(r+e.nodeSize,p);n.addMark(i,a,s.create({...o.attrs,...t}))}}))}),c&&(void 0!==a&&i&&n.setNodeMarkup(a,void 0,{...c.attrs,...t}),s&&c.marks.length&&c.marks.forEach(e=>{s===e.type&&i&&n.addMark(d,u,s.create({...e.attrs,...t}))}))}),l},hR=(e,t={})=>({state:n,dispatch:r})=>(function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&sX(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}})(dJ(e,n.schema),t)(n,r),hz=(e,t={})=>({state:n,dispatch:r})=>a4(dJ(e,n.schema),t)(n,r),hL=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];
31return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}};function hP(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;let i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}function hj(e){return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function h$(e){if(!(null==e?void 0:e.trim()))return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,e=>(n.push(e),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([\w-]+)/g);i&&(t.class=i.map(e=>e.trim().slice(1)).join(" "));let o=r.match(/(?:^|\s)#([\w-]+)/);o&&(t.id=o[1]),Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,e,r])=>{var i;let o=n[parseInt((null==(i=r.match(/__QUOTED_(\d+)__/))?void 0:i[1])||"0",10)];o&&(t[e]=o.slice(1,-1))});let s=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return s&&s.split(/\s+/).filter(Boolean).forEach(e=>
31{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}),t}function hF(e){if(!e||0===Object.keys(e).length)return"";let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(e=>t.push(`.${e}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([e,n])=>{"class"!==e&&"id"!==e&&(!0===n?t.push(e):!1!==n&&null!=n&&t.push(`${e}="${String(n)}"`))}),t.join(" ")}function hB(e){let{nodeName:t,name:n,parseAttributes:r=h$,serializeAttributes:i=hF,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:a}=e,l=n||t;return{parseMarkdown:(e,n)=>{let r={...o,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:"block",start(e){var t;let n=RegExp(`^:::${l}(?:\\s|$)`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,i){let o=RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),a=e.match(o);if(!a)return;let c=r(a[1]||"");if(!s.find(e=>!(e in c)))return{type:t,raw:a[0],attributes:c}}},renderMarkdown:e=>{let t=i((e=>{if(!a)return e;let t={};return a.forEach(n=>{n in e&&(t[n]=e[n])}),t})(e.attrs||{})),n=t?` {${t}}`:"";return`:::${l}${n} :::`}}}function hH(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=h$,serializeAttributes:o=hF,defaultAttributes:s={},content:a="block",allowedAttributes:l}=e,c=n||t;return{parseMarkdown:(e,n)=>{let i;if(r){let t=r(e);i="string"==typeof t?[{type:"text",text:t}]:t}else i="block"===a?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);let o={...s,...e.attributes};return n.createNode(t,o,i)},markdownTokenizer:{name:t,level:"block",start(e){var t;let n=RegExp(`^:::${c}`,"m"),r=null==(t=e.match(n))?void 0:t.index;return void 0!==r?r:-1},tokenize(e,n,r){var o;let s=RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),l=e.match(s);if(!l)return;let[d,u=""]=l,h=i(u),p=1,f=d.length,m="",g=/^:::([\w-]*)(\s.*)?/gm,y=e.slice(f);for(g.lastIndex=0;;){let n=g.exec(y);if(null===n)break;let i=n.index,s=n[1];if(null==(o=n[2])||!o.endsWith(":::")){if(s)p+=1;else if(0==(p-=1)){let o=y.slice(0,i);m=o.trim();let s=e.slice(0,f+i+n[0].length),l=[];if(m)if("block"===a)for((l=r.blockTokens(o)).forEach(e=>{e.text&&(!e.tokens||0===e.tokens.length)&&(e.tokens=r.inlineTokens(e.text))});l.length>0;){let e=l[l.length-1];if("paragraph"!==e.type||e.text&&""!==e.text.trim())break;l.pop()}else l=r.inlineTokens(m);return{type:t,raw:s,attributes:h,content:m,tokens:l}}}}}},renderMarkdown:(e,t)=>{let n=o((e=>{if(!l)return e;let t={};return l.forEach(n=>{n in e&&(t[n]=e[n])}),t})(e.attrs||{})),r=n?` {${n}}`:"",i=t.renderChildren(e.content||[],"\n\n");return`:::${c}${r} 32 33${i} 34 35:::`}}}function hU(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;null!==r;){let[,i,o,s]=r;t[i]=o||s,r=n.exec(e)}return t}function hV(e){return Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${e}="${t}"`).join(" ")}function hq(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=hU,serializeAttributes:o=hV,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=e,c=n||t,d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(e,n)=>{let i={...s,...e.attributes};if(a)return n.createNode(t,i);let o=r?r(e):e.content||"";return o?n.createNode(t,i,[n.createTextNode(o)]):n.createNode(t,i,[])},markdownTokenizer:{name:t,level:"inline",start(e){let t=a?RegExp(`\\[${d}\\s*[^\\]]*\\]`):RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),n=e.match(t),r=null==n?void 0:n.index;return void 0!==r?r:-1},tokenize(e,n,r){let o=a?RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),s=e.match(o);if(!s)return;let l="",c="";if(a){let[,e]=s;c=e}else{let[,e,t]=s;c=e,l=t||""}let u=i(c.trim());return{type:t,raw:s[0],content:l.trim(),attributes:u}}},renderMarkdown:e=>{let t="";r?t=r(e):e.content&&e.content.length>0&&(t=e.content.filter(e=>"text"===e.type).map(e=>e.text).join(""));let n=o((e=>{if(!l)return e;let t={};return l.forEach(n=>{let r="string"==typeof n?n:n.name,i="string"==typeof n?void 0:n.skipIfDefault;if(r in e){let n=e[r];if(void 0!==i&&n===i)return;t[r]=n}}),t})(e.attrs||{})),i=n?` ${n}`:"";return a?`[${c}${i}]`:`[${c}${i}]${t}[/${c}]`}}}function hG(e,t,n){var r,i,o,s;let a=e.split("\n"),l=[],c="",d=0,u=t.baseIndentSize||2;for(;d<a.length;){let e,h=a[d],p=h.match(t.itemPattern);if(!p)if(l.length>0)break;else{if(""!==h.trim())return;d+=1,c=`${c}${h} 36`;continue}let f=t.extractItemData(p),{indentLevel:m,mainContent:g}=f;c=`${c}${h} 37`;let y=[g];for(d+=1;d<a.length;){let e=a[d];if(""===e.trim()){let t=a.slice(d+1).findIndex(e=>""!==e.trim());if(-1===t)break;
37if(((null==(i=null==(r=a[d+1+t].match(/^(\s*)/))?void 0:r[1])?void 0:i.length)||0)>m){y.push(e),c=`${c}${e} 38`,d+=1;continue}break}if(((null==(s=null==(o=e.match(/^(\s*)/))?void 0:o[1])?void 0:s.length)||0)>m)y.push(e),c=`${c}${e} 39`,d+=1;else break}let b=y.slice(1);if(b.length>0){let r=b.map(e=>e.slice(m+u)).join("\n");r.trim()&&(e=t.customNestedParser?t.customNestedParser(r):n.blockTokens(r))}let v=t.createToken(f,e);l.push(v)}if(0!==l.length)return{items:l,raw:c}}function hW(e,t,n,r){if(!e||!Array.isArray(e.content))return"";let i="function"==typeof n?n(r):n,[o,...s]=e.content,a=t.renderChildren([o]),l=`${i}${a}`;return s&&s.length>0&&s.forEach((e,n)=>{var r,i;let o=null!=(i=null==(r=t.renderChild)?void 0:r.call(t,e,n+1))?i:t.renderChildren([e]);if(null!=o){let n=o.split("\n").map(e=>e?t.indent(e):t.indent("")).join("\n");l+="paragraph"===e.type?` 40 41${n}`:` 42${n}`}}),l}dj({},{createAtomBlockMarkdownSpec:()=>hB,createBlockMarkdownSpec:()=>hH,createInlineMarkdownSpec:()=>hq,parseAttributes:()=>h$,parseIndentedBlocks:()=>hG,renderNestedMarkdownContent:()=>hW,serializeAttributes:()=>hF});var hK=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=null==(t=e.undoable)||t}};function hJ(e){var t;let{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null==(t=c.nodeBefore||c.nodeAfter)?void 0:t.marks.find(e=>e.type.spec.code)))return!1;let d=!1,u=((e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,o)=>{var s,a;let l=(null==(a=(s=e.type.spec).toText)?void 0:a.call(s,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=e.isAtom&&!e.isText?l:l.slice(0,Math.max(0,r-t))}),n})(c)+o;return s.forEach(e=>{if(d)return;let t=((e,t)=>{if(d2(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(u,e.find);if(!t)return;let s=l.state.tr,c=d$({state:l.state,transaction:s}),h={from:r-(t[0].length-o.length),to:i}
42,{commands:p,chain:f,can:m}=new dF({editor:n,state:c});null!==e.handler({state:c,range:h,match:t,commands:p,chain:f,can:m})&&s.steps.length&&(e.undoable&&s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),d=!0)}),d}var hY=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...uW(uU(this,"addOptions",{name:this.name}))}}get storage(){return{...uW(uU(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>(function e(t,n){let r={...t};return hj(t)&&hj(n)&&Object.keys(n).forEach(i=>{hj(n[i])&&hj(t[i])?r[i]=e(t[i],n[i]):r[i]=n[i]}),r})(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},hX=class e extends hY{constructor(){super(...arguments),this.type="mark"}static create(t={}){return new e("function"==typeof t?t():t)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>(null==e?void 0:e.type.name)===t.name))return!1;let o=i.find(e=>(null==e?void 0:e.type.name)===t.name);return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}},hQ=class{constructor(e){this.find=e.find,this.handler=e.handler}},hZ=null,h0=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=u3(e),this.schema=u2(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:ht(t.name,this.schema)},r=uU(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this;return u5([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:ht(t.name,this.schema)},r=[],i=uU(t,"addKeyboardShortcuts",n),o={};if("mark"===t.type&&uU(t,"exitable",n)&&(o.ArrowRight=()=>hX.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));o={...o,...t}}let s=new aA({props:{handleKeyDown:dL(o)}});r.push(s);let a=uU(t,"addInputRules",n);if(hi(t,e.options.enableInputRules)&&a){let t=a();if(t&&t.length){let n=function(e){let{editor:t,rules:n}=e,r=new aA({state:{init:()=>null,apply(e,i,o){let s=e.getMeta(r);if(s)return s;let a=e.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:e}=a;"string"==typeof e||(e=uq(oJ.from(e),o.schema));let{from:i}=a,s=i+e.length;hJ({editor:t,from:i,to:s,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput:(e,i,o,s)=>hJ({editor:t,from:i,to:o,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&hJ({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;let{$cursor:o}=e.state.selection;return!!o&&hJ({editor:t,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let l=uU(t,"addPasteRules",n);if(hi(t,e.options.enablePasteRules)&&l){let t=l();if(t&&t.length){let n=function(e){let t,{editor:n,rules:r}=e,i=null,o=!1,s=!1,a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{t="u">typeof DragEvent?new DragEvent("drop"):null}catch{t=null}let l=({state:e,from:r,to:i,rule:o,pasteEvt:s})=>{let l=e.tr;if(function(e){let{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:d}=new dF({editor:t,state:n}),u=[];return n.doc.nodesBetween(r,i,(e,t)=>{var h,p,f,m,g;if((null==(p=null==(h=e.type)?void 0:h.spec)?void 0:p.code)||!(e.isText||e.isTextblock||e.isInline))return;let y=null!=(g=null!=(m=null==(f=e.content)?void 0:f.size)?m:e.nodeSize)?g:0,b=Math.max(r,t),v=Math.min(i,t+y);b>=v||((e,t,n)=>{if(d2(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]})(e.isText?e.text||"":e.textBetween(b-t,v-t,void 0,""),o.find,s).forEac
42h(e=>{if(void 0===e.index)return;let t=b+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},h=o.handler({state:n,range:i,match:e,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});u.push(h)})}),u.every(e=>null!==e)}({editor:n,state:d$({state:e,transaction:l}),from:Math.max(r-1,0),to:i.b-1,rule:o,pasteEvent:s,dropEvent:t})&&l.steps.length){try{t="u">typeof DragEvent?new DragEvent("drop"):null}catch{t=null}return a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,l}};return r.map(e=>new aA({view(e){let t=t=>{var r;(i=(null==(r=e.dom.parentElement)?void 0:r.contains(t.target))?e.dom.parentElement:null)&&(hZ=n)},r=()=>{hZ&&(hZ=null)};return window.addEventListener("dragstart",t),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",t),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(e,n)=>{if(s=i===e.dom.parentElement,t=n,!s){let e=hZ;(null==e?void 0:e.isEditable)&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{var n;let r=null==(n=t.clipboardData)?void 0:n.getData("text/html");return a=t,o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{let i=t[0],c="paste"===i.getMeta("uiEvent")&&!o,d="drop"===i.getMeta("uiEvent")&&!s,u=i.getMeta("applyPasteRules"),h=!!u;if(!c&&!d&&!h)return;if(h){var p,f;let t,{text:n}=u;"string"==typeof n||(n=uq(oJ.from(n),r.schema));let{from:i}=u,o=i+n.length;return l({rule:e,state:r,from:i,to:{b:o},pasteEvt:(p=n,null==(f=(t=new ClipboardEvent("paste",{clipboardData:new DataTransfer})).clipboardData)||f.setData("text/html",p),t)})}let m=n.doc.content.findDiffStart(r.doc.content),g=n.doc.content.findDiffEnd(r.doc.content);if("number"==typeof m&&g&&m!==g.b)return l({rule:e,state:r,from:m,to:g,pasteEvt:a})}}))}({editor:e,rules:t});r.push(...n)}}let c=uU(t,"addProseMirrorPlugins",n);if(c){let e=c();r.push(...e)}return r})}get attributes(){return uJ(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=uK(this.extensions);return Object.fromEntries(t.filter(e=>!!uU(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:dJ(t.name,this.schema)},i=uU(t,"addNodeView",r);if(!i)return[];let o=i();return o?[t.name,(r,i,s,a,l)=>{let c=uQ(r,n);return o({node:r,view:i,getPos:s,decorations:a,innerDecorations:l,editor:e,extension:t,HTMLAttributes:c})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return u5([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ht(n.name,this.schema)},i=uU(n,"dispatchTransaction",r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return u5([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ht(n.name,this.schema)},i=uU(n,"transformPastedHTML",r);return i?(t,n)=>{let o=e(t,n);return i.call(r,o)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=uK(this.extensions);return Object.fromEntries(t.filter(e=>!!uU(e,"addMarkView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:d8(t.name,this.schema)},i=uU(t,"addMarkView",r);return i?[t.name,(r,o,s)=>{let a=uQ(r,n);return i()({mark:r,view:o,inline:s,editor:e,extension:t,HTMLAttributes:a,updateAttributes:t=>{!function(e,t,n={}){let{state:r}=t,{doc:i,tr:o}=r;i.descendants((t,r)=>{let i=o.mapping.map(r),s=o.mapping.map(r)+t.nodeSize,a=null;if(t.marks.forEach(t=>{if(t!==e)return!1;a=t}),!a)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==a.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});o.removeMark(i,s,e.type),o.addMark(i,s,t)}}),o.docChanged&&t.view.dispatch(o)}(r,e,t)}})}]:[]}))}destroy(){this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>
42[e.name,e.storage])),e.forEach(e=>{var t,n;let r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ht(e.name,this.schema)};"mark"===e.type&&((null==(t=uW(uU(e,"keepOnSplit",r)))||t)&&this.splittableMarks.push(e.name),null==(n=uW(uU(e,"clearable",r)))||n||this.nonClearableMarks.push(e.name));let i=uU(e,"onBeforeCreate",r),o=uU(e,"onCreate",r),s=uU(e,"onUpdate",r),a=uU(e,"onSelectionUpdate",r),l=uU(e,"onTransaction",r),c=uU(e,"onFocus",r),d=uU(e,"onBlur",r),u=uU(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}};h0.resolve=u3,h0.sort=u5,h0.flatten=uV,dj({},{ClipboardTextSerializer:()=>h2,Commands:()=>h5,Delete:()=>h3,Drop:()=>h4,Editable:()=>h6,FocusEvents:()=>h9,Keymap:()=>h7,Paste:()=>pe,Tabindex:()=>pt,TextDirection:()=>pn,focusEventsPluginKey:()=>h8});var h1=class e extends hY{constructor(){super(...arguments),this.type="extension"}static create(t={}){return new e("function"==typeof t?t():t)}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}},h2=h1.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new aA({key:new aO("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,o=u8(n),{blockSeparator:s}=this.options,a={...void 0!==s?{blockSeparator:s}:{},textSerializers:o};return[...i.ranges].sort((e,t)=>e.$from.pos-t.$from.pos).map(({$from:e,$to:t})=>u4(r,{from:e.pos,to:t.pos},a)).join(null!=s?s:"\n\n")}}})]}}),h5=h1.create({name:"commands",addCommands:()=>({...dB})}),h3=h1.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,i;let o=()=>{var n,r,i,o;if(null!=(o=null==(i=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.filterTransaction)?void 0:i.call(r,e))?o:e.getMeta("y-sync$"))return;let s=uF(e.before,[e,...t]);
42u7(s).forEach(t=>{s.mapping.mapResult(t.oldRange.from).deletedAfter&&s.mapping.mapResult(t.oldRange.to).deletedBefore&&s.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{let i=r+n.nodeSize-2,o=t.oldRange.from<=r&&i<=t.oldRange.to;this.editor.emit("delete",{type:"node",node:n,from:r,to:i,newFrom:s.mapping.map(r),newTo:s.mapping.map(i),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:s})})});let a=s.mapping;s.steps.forEach((t,n)=>{var r,i;if(t instanceof sU){let o=a.slice(n).map(t.from,-1),l=a.slice(n).map(t.to),c=a.invert().map(o,-1),d=a.invert().map(l),u=o>0&&(null==(r=s.doc.nodeAt(o-1))?void 0:r.marks.some(e=>e.eq(t.mark))),h=null==(i=s.doc.nodeAt(l))?void 0:i.marks.some(e=>e.eq(t.mark));this.editor.emit("delete",{type:"mark",mark:t.mark,from:t.from,to:t.to,deletedRange:{from:c,to:d},newRange:{from:o,to:l},partial:!!(h||u),editor:this.editor,transaction:e,combinedTransform:s})}})};null==(i=null==(r=null==(n=this.editor.options.coreExtensionOptions)?void 0:n.delete)?void 0:r.async)||i?setTimeout(o,0):o()}}),h4=h1.create({name:"drop",addProseMirrorPlugins(){return[new aA({key:new aO("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),h6=h1.create({name:"editable",addProseMirrorPlugins(){return[new aA({key:new aO("editable"),props:{editable:()=>this.editor.options.editable}})]}}),h8=new aO("focusEvents"),h9=h1.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new aA({key:h8,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),h7=h1.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:o}=n,{pos:s,parent:a}=o,l=o.parent.isTextblock&&s>0?t.doc.resolve(s-1):o,c=l.parent.type.spec.isolating,d=o.pos-o.parentOffset,u=c&&1===l.parent.childCount?d===o.pos:ac.atStart(r).from===s;return!!i&&!!a.type.isTextblock&&!a.textContent.length&&!!u&&(!u||"paragraph"!==o.parent.type.name)&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ui()||uk()?i:r},addProseMirrorPlugins(){return[new aA({key:new aO("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta("composition")))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta("preventClearDocument"));if(!r||i)return;let{empty:o,from:s,to:a}=t.selection,l=ac.atStart(t.doc).from,c=ac.atEnd(t.doc).to;if(o||s!==l||a!==c||!hs(n.doc))return;let d=n.tr,u=d$({state:n,transaction:d}),{commands:h}=new dF({editor:this.editor,state:u});if(h.clearNodes(),d.steps.length)return d}})]}}),pe=h1.create({name:"paste",addProseMirrorPlugins(){return[new aA({key:new aO("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),pt=h1.create({name:"tabindex",addOptions:()=>({value:void 0}),addProseMirrorPlugins(){return[new aA({key:new aO("tabindex"),props:{attributes:()=>{var e;return this.editor.isEditable||void 0!==this.options.value?{tabindex:null!=(e=this.options.value)?e:"0"}:{}}}})]}}),pn=h1.create({name:"textDirection",addOptions:()=>({direction:void 0}),addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=uK(this.extensions);return[{types:e.filter(e=>"text"!==e.name).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute("dir");return t&&("ltr"===t||"rtl"===t||"auto"===t)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new aA({key:new aO("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),pr=class e{constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}
42get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!=(e=this.actualDepth)?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(0===this.depth)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1);return new e(this.resolvedPos.doc.resolve(t),this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+r+ +!o;if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(a);if(!i&&!s&&l.depth<=this.depth)return;let c=new e(l,this.editor,i,i||s?n:null);i&&(c.actualDepth=this.depth+1),t.push(c)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;let i=Object.keys(t);return this.children.forEach(o=>{n&&r.length>0||(o.node.type.name===e&&i.every(e=>t[e]===o.node.attrs[e])&&r.push(o),n&&r.length>0||(r=r.concat(o.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},pi=`.ProseMirror { 43 position: relative; 44} 45 46.ProseMirror { 47 word-wrap: break-word; 48 white-space: pre-wrap; 49 white-space: break-spaces; 50 -webkit-font-variant-ligatures: none; 51 font-variant-ligatures: none; 52 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 53} 54 55.ProseMirror [contenteditable="false"] { 56 white-space: normal; 57} 58 59.ProseMirror [contenteditable="false"] [contenteditable="true"] { 60 white-space: pre-wrap; 61} 62 63.ProseMirror pre { 64 white-space: pre-wrap; 65} 66 67img.ProseMirror-separator { 68 display: inline !important; 69 border: none !important; 70 margin: 0 !important; 71 width: 0 !important; 72 height: 0 !important; 73} 74 75.ProseMirror-gapcursor { 76 display: none; 77 pointer-events: none; 78 position: absolute; 79 margin: 0; 80} 81 82.ProseMirror-gapcursor:after { 83 content: ""; 84 display: block; 85 position: absolute; 86 top: -2px; 87 width: 20px; 88 border-top: 1px solid black; 89 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 90} 91 92@keyframes ProseMirror-cursor-blink { 93 to { 94 visibility: hidden; 95 } 96} 97 98.ProseMirror-hideselection *::selection { 99 background: transparent; 100} 101 102.ProseMirror-hideselection *::-moz-selection { 103 background: transparent; 104} 105 106.ProseMirror-hideselection * { 107 caret-color: transparent; 108} 109 110.ProseMirror-focused .ProseMirror-gapcursor { 111 display: block; 112}`,po=class extends hL{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:"u">typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:hc,createMappablePosition:hd},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit
112("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on("paste",({event:e,slice:t})=>this.options.onPaste(e,t)),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=un(t,this.options.autofocus);this.editorState=aC.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if("u"<typeof document)throw Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;(null==e?void 0:e.editor)&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"==typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&"u">typeof document&&(this.css=hP(pi,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if("state"===t)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=uG(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t="string"==typeof e?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t,n,r;let i=[...this.options.enableCoreExtensions?[h6,h2.configure({blockSeparator:null==(t=null==(e=this.options.coreExtensionOptions)?void 0:e.clipboardTextSerializer)?void 0:t.blockSeparator}),h5,h9,h7,pt.configure({value:null==(r=null==(n=this.options.coreExtensionOptions)?void 0:n.tabindex)?void 0:r.value}),h4,pe,h3,pn.configure({direction:this.options.textDirection})].filter(e=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[e.name]):[],...this.options.extensions].filter(e=>["extension","node","mark"].includes(null==e?void 0:e.type));this.extensionManager=new h0(i,this)}createCommandManager(){this.commandManager=new dF({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=uP(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;
112this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&"object"==typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>"collaboration"!==e.name),this.createExtensionManager()}}),e=uP(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,o=t.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new dC(e,{...t,attributes:{role:"textbox",...null==t?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS(),this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>{var t;return null==(t=this.capturedTransaction)?void 0:t.step(e)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(e=>e.getMeta("focus")||e.getMeta("blur")),a=null==s?void 0:s.getMeta("focus"),l=null==s?void 0:s.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),e.getMeta("preventUpdate")||!n.some(e=>e.docChanged)||o.doc.eq(t.doc)||this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return u9(this.state,e)}isActive(e,t){let n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return uw(e,null,n)||hr(e,null,n);let r=uA(t,e.schema);return"node"===r?uw(e,t,n):"mark"===r&&hr(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return uq(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return u6(this.state.doc,{blockSeparator:t,textSerializers:{...u8(this.schema),...n}})}get isEmpty(){return hs(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var e,t;return null==(t=null==(e=this.editorView)?void 0:e.isDestroyed)||t}$node(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null==(n=this.$doc)?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText?t.nodeAfter:null;return new pr(t,this,!1,n)}get $doc(){return this.$pos(0)}};function ps(e){return new hK({find:e.find,handler:({state:t,range:n,match:r})=>{let i=uW(e.getAttributes,void 0,r);if(!1===i||null===i)return null;let{tr:o}=t,s=r[r.length-1],a=r[0];if(s){let r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(he(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>l).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+r,l);
112let d=n.from+r+s.length;o.addMark(n.from+r,d,e.type.create(i||{})),o.removeStoredMark(e.type)}},undoable:e.undoable})}function pa(e){return new hK({find:e.find,handler:({state:t,range:n,match:r})=>{let i=uW(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from,a=n.to,l=e.type.create(i);if(r[1]){let e=s+r[0].lastIndexOf(r[1]);e>a?e=a:a=e+r[1].length;let t=r[0][r[0].length-1];o.insertText(t,s+r[0].length-1),o.replaceWith(e,a,l)}else if(r[0]){let t=e.type.isInline?s:s-1;o.insert(t,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:e.undoable})}function pl(e){return new hK({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),o=uW(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)},undoable:e.undoable})}function pc(e){return new hK({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let o=uW(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&sX(a,e.type,o);if(!l)return null;if(s.wrap(a,l),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,o=r||n.$to.parentOffset&&n.$from.marks();if(o){let e=o.filter(e=>i.includes(e.type.name));s.ensureMarks(e)}}if(e.keepAttributes){let t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";i().updateAttributes(t,o).run()}let c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&s2(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&s.join(n.from-1)},undoable:e.undoable})}var pd=class{constructor(e){var t,n,r,i,o,s;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=e=>{if(!this.isResizing||!this.activeHandle)return;let t=e.clientX-this.startX,n=e.clientY-this.startY;this.handleResize(t,n)},this.handleTouchMove=e=>{if(!this.isResizing||!this.activeHandle)return;let t=e.touches[0];if(!t)return;let n=t.clientX-this.startX,r=t.clientY-this.startY;this.handleResize(n,r)},this.handleMouseUp=()=>{if(!this.isResizing)return;let e=this.element.offsetWidth,t=this.element.offsetHeight;this.onCommit(e,t),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=e=>{"Shift"===e.key&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=e=>{"Shift"===e.key&&(this.isShiftKeyPressed=!1)},this.node=e.node,this.editor=e.editor,this.element=e.element,this.element.draggable=!1,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,(null==(t=e.options)?void 0:t.min)&&(this.minSize={...this.minSize,...e.options.min}),(null==(n=e.options)?void 0:n.max)&&(this.maxSize=e.options.max),(null==(r=null==e?void 0:e.options)?void 0:r.directions)&&(this.directions=e.options.directions),(null==(i=e.options)?void 0:i.preserveAspectRatio)&&(this.preserveAspectRatio=e.options.preserveAspectRatio),(null==(o=e.options)?void 0:o.className)&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),(null==(s=e.options)?void 0:s.createCustomHandle)&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var e;return null!=(e=this.contentElement)?e:null}handleEditorUpdate(){let e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&0===this.handleMap.size&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type===this.node.type&&(this.node=e,!this.onUpdate||this.onUpdate(e,t,n))}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.n
112ame,e.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){let e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){let t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){let n=t.includes("top"),r=t.includes("bottom"),i=t.includes("left"),o=t.includes("right");n&&(e.style.top="0"),r&&(e.style.bottom="0"),i&&(e.style.left="0"),o&&(e.style.right="0"),("top"===t||"bottom"===t)&&(e.style.left="0",e.style.right="0"),("left"===t||"right"===t)&&(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach(e=>{let t;(t=this.createCustomHandle?this.createCustomHandle(e):this.createHandle(e))instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener("mousedown",t=>this.handleResizeStart(t,e)),t.addEventListener("touchstart",t=>this.handleResizeStart(t,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){let e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,"touches"in e?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,e,t),o=this.applyConstraints(r,i,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(e,t,n){let r=this.startWidth,i=this.startHeight,o=e.includes("right"),s=e.includes("left"),a=e.includes("bottom"),l=e.includes("top");return(o?r=this.startWidth+t:s&&(r=this.startWidth-t),a?i=this.startHeight+n:l&&(i=this.startHeight-n),("right"===e||"left"===e)&&(r=this.startWidth+(o?t:-t)),("top"===e||"bottom"===e)&&(i=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed)?this.applyAspectRatio(r,i,e):{width:r,height:i}}applyConstraints(e,t,n){var r,i,o,s;if(!n){let n=Math.max(this.minSize.width,e),o=Math.max(this.minSize.height,t);return(null==(r=this.maxSize)?void 0:r.width)&&(n=Math.min(this.maxSize.width,n)),(null==(i=this.maxSize)?void 0:i.height)&&(o=Math.min(this.maxSize.height,o)),{width:n,height:o}}let a=e,l=t;return a<this.minSize.width&&(l=(a=this.minSize.width)/this.aspectRatio),l<this.minSize.height&&(a=(l=this.minSize.height)*this.aspectRatio),(null==(o=this.maxSize)?void 0:o.width)&&a>this.maxSize.width&&(l=(a=this.maxSize.width)/this.aspectRatio),(null==(s=this.maxSize)?void 0:s.height)&&l>this.maxSize.height&&(a=(l=this.maxSize.height)*this.aspectRatio),{width:a,height:l}}applyAspectRatio(e,t,n){return"left"===n||"right"===n?{width:e,height:e/this.aspectRatio}:"top"===n||"bottom"===n?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}},pu=class e extends hY{constructor(){super(...arguments),this.type="node"}static create(t={}){return new e("function"==typeof t?t():t)}configure(e){return super.configure(e)}extend(e){let t="function"==typeof e?e():e;return super.extend(t)}}
112,ph=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,a;let{view:l}=this.editor,c=e.target,d=3===c.nodeType?null==(t=c.parentElement)?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null==(n=this.contentDOM)?void 0:n.contains(c))||!d)return;let u=0,h=0;if(this.dom!==d){let t=this.dom.getBoundingClientRect(),n=d.getBoundingClientRect(),a=null!=(i=e.offsetX)?i:null==(r=e.nativeEvent)?void 0:r.offsetX,l=null!=(s=e.offsetY)?s:null==(o=e.nativeEvent)?void 0:o.offsetY;u=n.x-t.x+a,h=n.y-t.y+l}let p=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();p.style.width=`${Math.round(e.width)}px`,p.style.height=`${Math.round(e.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let f=null;try{(f=document.createElement("div")).style.position="absolute",f.style.top="-9999px",f.style.left="-9999px",f.style.pointerEvents="none",f.appendChild(p),document.body.appendChild(f),null==(a=e.dataTransfer)||a.setDragImage(p,u,h)}finally{f&&setTimeout(()=>{try{null==f||f.remove()}catch{}},0)}let m=this.getPos();if("number"!=typeof m)return;let g=am.create(l.state.doc,m),y=l.state.tr.setSelection(g);l.dispatch(y)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!(null==(t=this.contentDOM)?void 0:t.contains(n))))return!1;let r=e.type.startsWith("drag"),i="dragover"===e.type||"dragenter"===e.type,o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!r)return!0;let{isEditable:s}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=am.isSelectable(this.node),d="copy"===e.type,u="paste"===e.type,h="cut"===e.type,p="mousedown"===e.type;if(!l&&c&&r&&e.target===this.dom&&e.preventDefault(),l&&r&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(l&&s&&!a&&p){let e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!a&&!i&&!o&&!d&&!u&&!h&&(!p||!c)&&!0}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!!this.node.isLeaf||!!this.node.isAtom||!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(ui()||ur())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return"number"==typeof n&&(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){let e=this.getPos();if("number"!=typeof e)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function pp(e){return new hQ({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let o=uW(e.getAttributes,void 0,r,i);if(!1===o||null===o)return null;let{tr:s}=t,a=r[r.length-1],l=r[0],c=n.to;if(a){let i=l.search(/\S/),d=n.from+l.indexOf(a),u=d+a.length;if(he(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>d).length)return null;u<n.to&&s.delete(u,n.to),d>n.from&&s.delete(n.from+i,d),c=n.from+i+a.length,s.addMark(n.from+i,c,e.type.create(o||{})),void 0!==r.index&&void 0!==r.input&&r.index+r[0].length>=r.input.length||s.removeStoredMark(e.type)}}})}var pf=/^```([a-z]+)?[\s\n]$/,pm=/^~~~([a-z]+)?[\s\n]$/,pg=pu.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",uX(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&(null==(r=e.raw)?void 0:r.startsWith("~~~"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r} 113 114\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:i}=r,{$from:o,empty:s}=i;
114if(o.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,o=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>a+e).join("\n");return e.replaceWith(t,n,r.schema.text(o)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:i}=r,{$from:o,empty:s}=i;return o.parent.type===this.type&&(s?e.commands.command(({tr:e})=>{var t;let{pos:i}=o,s=o.start(),a=o.end(),l=r.doc.textBetween(s,a,"\n","\n").split("\n"),c=0,d=0,u=i-s;for(let e=0;e<l.length;e+=1){if(d+l[e].length>=u){c=e;break}d+=l[e].length+1}let h=Math.min(((null==(t=l[c].match(/^ */))?void 0:t[0])||"").length,n);if(0===h)return!0;let p=s;for(let e=0;e<c;e+=1)p+=l[e].length+1;return e.delete(p,p+h),i-p<=h&&e.setSelection(ap.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:o}=i,s=r.doc.textBetween(t,o,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");return e.replaceWith(t,o,r.schema.text(s)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!!o&&!!s&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let s=i.after();return void 0!==s&&(r.nodeAt(s)?e.commands.command(({tr:e})=>(e.setSelection(ac.near(r.resolve(s))),!0)):e.commands.exitCode())}}},addInputRules(){return[pl({find:pf,type:this.type,getAttributes:e=>({language:e[1]})}),pl({find:pm,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new aA({key:new aO("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>
114{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(ap.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),py=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},pb=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,pv=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,pk=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,px=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,pw=hX.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return py("strong",{...uX(this.options.HTMLAttributes,e),children:py("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ps({find:pb,type:this.type}
114),ps({find:pk,type:this.type})]},addPasteRules(){return[pp({find:pv,type:this.type}),pp({find:px,type:this.type})]}}),pE=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,pT=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,pS=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,pC=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,pA=hX.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",uX(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
114,addInputRules(){return[ps({find:pE,type:this.type}),ps({find:pS,type:this.type})]},addPasteRules(){return[pp({find:pT,type:this.type}),pp({find:pC,type:this.type})]}}),p_=pu.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",uX(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>` 115`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:s}=r.extensionManager,a=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&a&&o){let t=a.filter(e=>s.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),pN=pu.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,uX(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>pl({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
115)\\s$`),type:this.type,getAttributes:{level:e}}))}}),pO=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,pM=pu.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",uX(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,r,i,o,s;let a=null!=(n=null==(t=e.attrs)?void 0:t.src)?n:"",l=null!=(i=null==(r=e.attrs)?void 0:r.alt)?i:"",c=null!=(s=null==(o=e.attrs)?void 0:o.title)?s:"";return c?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||"u"<typeof document)return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:o,HTMLAttributes:s,editor:a})=>{let l=document.createElement("img");l.draggable=!1;let c=uX(this.options.HTMLAttributes,s);Object.entries(c).forEach(([e,t])=>{if(null!=t)switch(e){case"width":case"height":break;default:l.setAttribute(e,t)}}),null!==c.src&&(l.src=c.src);let d=new pd({element:l,editor:a,node:i,getPos:o,onResize:(e,t)=>
115{l.style.width=`${e}px`,l.style.height=`${t}px`},onCommit:(e,t)=>{let n=o();void 0!==n&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:e,height:t}).run()},onUpdate:(e,t,n)=>e.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:!0===r}}),u=d.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",l.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},d}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[pa({find:pO,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}});let pI="numeric",pD="ascii",pR="alpha",pz="asciinumeric",pL="alphanumeric",pP="domain",pj="emoji",p$="whitespace";function pF(e,t,n){for(let r in t[pI]&&(t[pz]=!0,t[pL]=!0),t[pD]&&(t[pz]=!0,t[pR]=!0),t[pz]&&(t[pL]=!0),t[pR]&&(t[pL]=!0),t[pL]&&(t[pP]=!0),t[pj]&&(t[pP]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function pB(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}pB.groups={},pB.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||pB.groups,t&&t.j?i=t:(i=new pB(t),n&&r&&pF(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){if(r=r||pB.groups,t&&t.j)return this.j[e]=t,t;let i,o=this.go(e);return o?(Object.assign((i=new pB).j,o.j),i.jr.push.apply(i.jr,o.jr),i.jd=o.jd,i.t=o.t):i=new pB,t&&(r&&(i.t&&"string"==typeof i.t?pF(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&pF(t,n,r)),i.t=t),this.j[e]=i,i}};let pH=(e,t,n,r,i)=>e.ta(t,n,r,i),pU=(e,t,n,r,i)=>e.tr(t,n,r,i),pV=(e,t,n,r,i)=>e.ts(t,n,r,i),pq=(e,t,n,r,i)=>e.tt(t,n,r,i),pG="WORD",pW="UWORD",pK="ASCIINUMERICAL",pJ="ALPHANUMERICAL",pY="LOCALHOST",pX="UTLD",pQ="SCHEME",pZ="SLASH_SCHEME",p0="OPENBRACE",p1="CLOSEBRACE",p2="OPENBRACKET",p5="CLOSEBRACKET",p3="OPENPAREN",p4="CLOSEPAREN",p6="OPENANGLEBRACKET",p8="CLOSEANGLEBRACKET",p9="FULLWIDTHLEFTPAREN",p7="FULLWIDTHRIGHTPAREN",fe="LEFTCORNERBRACKET",ft="RIGHTCORNERBRACKET",fn="LEFTWHITECORNERBRACKET",fr="RIGHTWHITECORNERBRACKET",fi="FULLWIDTHLESSTHAN",fo="FULLWIDTHGREATERTHAN",fs="AMPERSAND",fa="APOSTROPHE",fl="ASTERISK",fc="BACKSLASH",fd="BACKTICK",fu="CARET",fh="COLON",fp="COMMA",ff="DOLLAR",fm="EQUALS",fg="EXCLAMATION",fy="HYPHEN",fb="PERCENT",fv="PIPE",fk="PLUS",fx="POUND",fw="QUERY",fE="QUOTE",fT="FULLWIDTHMIDDLEDOT",fS="SEMI",fC="SLASH",fA="TILDE",f_="UNDERSCORE",fN="EMOJI";var fO=Object.freeze({__proto__:null,ALPHANUMERICAL:pJ,AMPERSAND:fs,APOSTROPHE:fa,ASCIINUMERICAL:pK,ASTERISK:fl,AT:"AT",BACKSLASH:fc,BACKTICK:fd,CARET:fu,CLOSEANGLEBRACKET:p8,CLOSEBRACE:p1,CLOSEBRACKET:p5,CLOSEPAREN:p4,COLON:fh,COMMA:fp,DOLLAR:ff,DOT:"DOT",EMOJI:fN,EQUALS:fm,EXCLAMATION:fg,FULLWIDTHGREATERTHAN:fo,FULLWIDTHLEFTPAREN:p9,FULLWIDTHLESSTHAN:fi,FULLWIDTHMIDDLEDOT:fT,FULLWIDTHRIGHTPAREN:p7,HYPHEN:fy,LEFTCORNERBRACKET:fe,LEFTWHITECORNERBRACKET:fn,LOCALHOST:pY,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:p6,OPENBRACE:p0,OPENBRACKET:p2,OPENPAREN:p3,PERCENT:fb,PIPE:fv,PLUS:fk,POUND:fx,QUERY:fw,QUOTE:fE,RIGHTCORNERBRACKET:ft,RIGHTWHITECORNERBRACKET:fr,SCHEME:pQ,SEMI:fS,SLASH:fC,SLASH_SCHEME:pZ,SYM:"SYM",TILDE:fA,TLD:"TLD",UNDERSCORE:f_,UTLD:pX,UWORD:pW,WORD:pG,WS:"WS"});let fM=/[a-z]/,fI=/\p{L}/u,fD=/\p{Emoji}/u,fR=/\d/,fz=/\s/,fL=null,fP=null;function fj(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,o=e.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let a=e,l=null,c=0,d=null,u=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)(a=l).accepts()?(u=0,h=0,d=a):u>=0&&(u+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=u,s-=h,c-=u,i.push({t:d.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function f$(e,t,n,r,i){let o,s=t.length;for(let n=0;n<s-1;n++){let s=t[n];e.j[s]?o=e.j[s]:((o=new pB(r)).jr=i.slice(),e.j[s]=o),e=o}return(o=new pB(n)).jr=i.slice(),e.j[t[s-1]]=o,o}function fF(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let fB={defaultProtocol:"http",events:null,format:fU,formatHref:fU,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function fH(e,t=null){let n=Object.assign({},fB);e&&(n=Object.assign(n,e instanceof fH?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function fU(e){return e}function fV(e,t){this.t="token",this.v=e,this.tk=t}
115function fq(e,t){class n extends fV{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}fH.prototype={o:fB,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:fB[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},fV.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=fB.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),o={},s=e.get("className",t,this),a=e.get("target",t,this),l=e.get("rel",t,this),c=e.getObj("attributes",t,this),d=e.getObj("events",t,this);return o.href=n,s&&(o.class=s),a&&(o.target=a),l&&(o.rel=l),c&&Object.assign(o,c),{tagName:r,attributes:o,content:i,eventListeners:d}}};let fG=fq("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),fW=fq("text"),fK=fq("nl"),fJ=fq("url",{isLink:!0,toHref(e=fB.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==pY&&e[1].t===fh}}),fY=e=>new pB(e);function fX(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let fQ="u">typeof console&&console&&console.warn||(()=>{}),fZ={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function f0(e,t=!1){if(fZ.initialized&&fQ(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format. 1161. Must only contain digits, lowercase ASCII letters or "-" 1172. Cannot start or end with "-" 1183. "-" cannot repeat`);fZ.customSchemes.push([e,t])}function f1(e){return fZ.initialized||function(){fZ.scanner=function(e=[]){let t={};pB.groups=t;let n=new pB;null==fL&&(fL=fF("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
118ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==fP&&(fP=fF("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
118ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2")),pq(n,"'",fa),pq(n,"{",p0),pq(n,"}",p1),pq(n,"[",p2),pq(n,"]",p5),pq(n,"(",p3),pq(n,")",p4),pq(n,"<",p6),pq(n,">",p8),pq(n,"ï¼",p9),pq(n,"ï¼",p7),pq(n,"ã",fe),pq(n,"ã",ft),pq(n,"ã",fn),pq(n,"ã",fr),pq(n,"ï¼",fi),pq(n,"ï¼",fo),pq(n,"&",fs),pq(n,"*",fl),pq(n,"@","AT"),pq(n,"`",fd),pq(n,"^",fu),pq(n,":",fh),pq(n,",",fp),pq(n,"$",ff),pq(n,".","DOT"),pq(n,"=",fm),pq(n,"!",fg),pq(n,"-",fy),pq(n,"%",fb),pq(n,"|",fv),pq(n,"+",fk),pq(n,"#",fx),pq(n,"?",fw),pq(n,'"',fE),pq(n,"/",fC),pq(n,";",fS),pq(n,"~",fA),pq(n,"_",f_),pq(n,"\\",fc),pq(n,"ã»",fT);let r=pU(n,fR,"NUM",{[pI]:!0});pU(r,fR,r);let i=pU(r,fM,pK,{[pz]:!0}),o=pU(r,fI,pJ,{[pL]:!0}),s=pU(n,fM,pG,{[pD]:!0});pU(s,fR,i),pU(s,fM,s),pU(i,fR,i),pU(i,fM,i);let a=pU(n,fI,pW,{[pR]:!0});pU(a,fM),pU(a,fR,o),pU(a,fI,a),pU(o,fR,o),pU(o,fM),pU(o,fI,o);let l=pq(n,"\n","NL",{[p$]:!0}),c=pq(n,"\r","WS",{[p$]:!0}),d=pU(n,fz,"WS",{[p$]:!0});pq(n,"",d),pq(c,"\n",l),pq(c,"",d),pU(c,fz,d),pq(d,"\r"),pq(d,"\n"),pU(d,fz,d),pq(d,"",d);let u=pU(n,fD,fN,{[pj]:!0});pq(u,"#"),pU(u,fD,u),pq(u,"ï¸",u);let h=pq(u,"â");pq(h,"#"),pU(h,fD,u);let p=[[fM,s],[fR,i]],f=[[fM,null],[fI,a],[fR,o]];for(let e=0;e<fL.length;e++)f$(n,fL[e],"TLD",pG,p);for(let e=0;e<fP.length;e++)f$(n,fP[e],pX,pW,f);pF("TLD",{tld:!0,ascii:!0},t),pF(pX,{utld:!0,alpha:!0},t),f$(n,"file",pQ,pG,p),f$(n,"mailto",pQ,pG,p),f$(n,"http",pZ,pG,p),f$(n,"https",pZ,pG,p),f$(n,"ftp",pZ,pG,p),f$(n,"ftps",pZ,pG,p),pF(pQ,{scheme:!0,ascii:!0},t),pF(pZ,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[pP]=!0:fM.test(r)?fR.test(r)?i[pz]=!0:i[pD]=!0:i[pI]=!0,pV(n,r,r,i)}return pV(n,"localhost",pY,{ascii:!0}),n.jd=new pB("SYM"),{start:n,tokens:Object.assign({groups:t},fO)}}(fZ.customSchemes);for(let e=0;e<fZ.tokenQueue.length;e++)fZ.tokenQueue[e][1]({scanner:fZ.scanner});fZ.parser=function({groups:e}){let t=e.domain.concat([fs,fl,"AT",fc,fd,fu,ff,fm,fy,"NUM",fb,fv,fk,fx,fC,"SYM",fA,f_]),n=[fa,fh,fp,"DOT",fg,fb,fw,fE,fS,p6,p8,p0,p1,p5,p2,p3,p4,p9,p7,fe,ft,fn,fr,fi,fo],r=[fs,fa,fl,fc,fd,fu,ff,fm,fy,p0,p1,fb,fv,fk,fx,fw,fC,"SYM",fA,f_],i=fY(),o=pq(i,fA);pH(o,r,o),pH(o,e.domain,o);let s=fY(),a=fY(),l=fY();pH(i,e.domain,s),pH(i,e.scheme,a),pH(i,e.slashscheme,l),pH(s,r,o),pH(s,e.domain,s);let c=pq(s,"AT");pq(o,"AT",c),pq(a,"AT",c),pq(l,"AT",c);let d=pq(o,"DOT");pH(d,r,o),pH(d,e.domain,o);let u=fY();pH(c,e.domain,u),pH(u,e.domain,u);let h=pq(u,"DOT");pH(h,e.domain,u);let p=fY(fG);pH(h,e.tld,p),pH(h,e.utld,p),pq(c,pY,p);let f=pq(u,fy);pq(f,fy,f),pH(f,e.domain,u),pH(p,e.domain,u),pq(p,"DOT",h),pq(p,fy,f);let m=pq(s,fy),g=pq(s,"DOT");pq(m,fy,m),pH(m,e.domain,s),pH(g,r,o),pH(g,e.domain,s);let y=fY(fJ);pH(g,e.tld,y),pH(g,e.utld,y),pH(y,e.domain,s),pH(y,r,o),pq(y,"DOT",g),pq(y,fy,m),pq(y,"AT",c);let b=pq(y,fh),v=fY(fJ);pH(b,e.numeric,v);let k=fY(fJ),x=fY();pH(k,t,k),pH(k,n,x),pH(x,t,k),pH(x,n,x),pq(y,fC,k),pq(v,fC,k);let w=pq(a,fh),E=pq(l,fh),T=pq(E,fC),S=pq(T,fC);pH(a,e.domain,s),pq(a,"DOT",g),pq(a,fy,m),pH(l,e.domain,s),pq(l,"DOT",g),pq(l,fy,m),pH(w,e.domain,k),pq(w,fC,k),pq(w,fw,k),pH(S,e.domain,k),pH(S,t,k),pq(S,fC,k);let C=[[p0,p1],[p2,p5],[p3,p4],[p6,p8],[p9,p7],[fe,ft],[fn,fr],[fi,fo]];for(let e=0;e<C.length;e++){let[r,i]=C[e],o=pq(k,r);pq(x,r,o);let s=fY(fJ);pH(o,t,s);let a=fY();pH(o,n,a),pq(o,i,k),pH(s,t,s),pH(s,n,a),pH(a,t,s),pH(a,n,a),pq(s,i,k),pq(a,i,k)}return pq(i,pY,y),pq(i,"NL",fK),{start:i,tokens:fO}}(fZ.scanner.tokens);for(let e=0;e<fZ.pluginQueue.length;e++)fZ.pluginQueue[e][1]({scanner:fZ.scanner,parser:fZ.parser});fZ.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=e,l=null,c=null,d=0,u=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,(a=c).accepts()?(h=0,u=a):h>=0&&h++,i++,d++;if(h<0)(i-=d)<r&&(s.push(n[i]),i++);else{s.length>
1180&&(o.push(fX(fW,t,s)),s=[]),i-=h,d-=h;let e=u.t,r=n.slice(i-d,i);o.push(fX(e,t,r))}}return s.length>0&&o.push(fX(fW,t,s)),o}(fZ.parser.start,e,fj(fZ.scanner.start,e))}function f2(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new fH(n),i=f1(e),o=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}f1.scan=fj;var f5="[\0- Â áá â-\u2029âã]",f3=new RegExp(f5),f4=RegExp(`${f5}$`),f6=RegExp(f5,"g");function f8(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(f6,"").match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var f9=hX.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{"string"==typeof e?f0(e):f0(e.scheme,e.optionalSlashes)})},onDestroy(){pB.groups={},fZ.scanner=null,fZ.parser=null,fZ.tokenQueue=[],fZ.pluginQueue=[],fZ.customSchemes=[],fZ.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!f8(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!f8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!f8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",uX(this.options.HTMLAttributes,e),0]:["a",uX(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;let s=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",a=null!=(o=null==(i=e.attrs)?void 0:i.title)?o:"",l=t.renderChildren(e);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!f8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!f8(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[pp({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=f2(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!f8(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t}
118,type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let r=[],{protocols:i,defaultProtocol:o}=this.options;return this.options.autolink&&r.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!f8(e,i),protocols:i,defaultProtocol:o}),shouldAutoLink:this.options.shouldAutoLink},new aA({key:new aO("autolink"),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!i||o)return;let{tr:s}=r;if(u7(uF(n.doc,[...t])).forEach(({newRange:t})=>{var n,i;let o,a,l,c=(n=r.doc,i=e=>e.isTextblock,l=[],n.nodesBetween(t.from,t.to,(e,t)=>{i(e)&&l.push({node:e,pos:t})}),l);if(c.length>1)o=c[0],a=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ");else if(c.length){let e=r.doc.textBetween(t.from,t.to," "," ");if(!f4.test(e))return;o=c[0],a=r.doc.textBetween(o.pos,t.to,void 0," ")}if(o&&a){let t=a.split(f3).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],i=o.pos+a.lastIndexOf(n);if(!n)return!1;let l=f1(n).map(t=>t.toObject(e.defaultProtocol));if(!(1===l.length?l[0].isLink:3===l.length&&!!l[1].isLink&&["()","[]"].includes(l[0].value+l[2].value)))return!1;l.filter(e=>e.isLink).map(e=>({...e,from:i+e.start+1,to:i+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{he(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||s.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),s.steps.length)return s}}))),r.push((t={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new aA({key:new aO("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(0!==r.button||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let e=r.target;if(!e)return!1;let n=t.editor.view.dom;(s=e.closest("a"))&&!n.contains(s)&&(s=null)}if(!s)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let n=u9(e.state,t.type.name),r=null!=(i=s.href)?i:n.href,l=null!=(o=s.target)?o:n.target;r&&(window.open(r,l),a=!0)}return a}}}))),this.options.linkOnPaste&&r.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new aA({key:new aO("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let c=f2(l,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!c&&(void 0===i||!!i(c.value))&&n.editor.commands.setMark(n.type,{href:c.href})}}}))),r}}),f7=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,me=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,mt=hX.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||function(e,t){let n=e.getAttribute("style");if(!n)return null;let r=n.split(";").map(e=>e.trim()).filter(Boolean),i=t.toLowerCase();for(let e=r.length-1;e>=0;e-=1){let t=r[e],n=t.indexOf(":");if(-1!==n&&t.slice(0,n).trim().toLowerCase()===i)return t.slice(n+1).trim()}return null}(e,"background-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",uX(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:e=>e.indexOf("=="),tokenize(e,t,n){let r=/^(==)([^=]+)(==)/.exec(e);if(r){let e=r[2].trim(),t=n.inlineTokens(e);return{type:"highlight",raw:r[0],text:e,tokens:t}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}}
118,addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[ps({find:f7,type:this.type})]},addPasteRules(){return[pp({find:me,type:this.type})]}});if("u">typeof WeakMap){let e=new WeakMap;n=t=>e.get(t),r=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;n=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},r=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var mn=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,o=r+1,s=i+1;for(let e=1;o<this.width&&this.map[t+e]==n;e++)o++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:i,right:o,bottom:s}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(o,c)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let o=r*this.width+i,s=this.map[o];!n[s]&&(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(e){return n(e)||r(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),o=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);o+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[],i=0,o=null,s=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let a=0,l=0;a<n;a++){let c=e.child(a);l++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==c.childCount)break;let d=c.child(e),{colspan:u,rowspan:h,colwidth:p}=d.attrs;for(let e=0;e<h;e++){if(e+a>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:l,n:h-e});break}let c=i+e*t;for(let e=0;e<u;e++){0==r[c+e]?r[c+e]=l:(o||(o=[])).push({type:"collision",row:a,pos:l,n:u-e});let n=p&&p[e];if(n){let r=(c+e)%t*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=u,l+=d.nodeSize}let d=(a+1)*t,u=0;for(;i<d;)0==r[i++]&&u++;u&&(o||(o=[])).push({type:"missing",row:a,n:u}),l++}(0===t||0===n)&&(o||(o=[])).push({type:"zero_sized"});let a=new mn(t,n,r,o),l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(l=!0);return l&&function(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let o=e.map[i];if(r[o])continue;r[o]=!0;let s=n.nodeAt(o);if(!s)throw RangeError(`No cell with offset ${o} found`);let a=null,l=s.attrs;for(let n=0;n<l.colspan;n++){let r=t[(i+n)%e.width*2];null==r||l.colwidth&&l.colwidth[n]==r||((a||(a=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}(l)))[n]=r)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}(a,s,e),a}(e))}};function mr(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}let mi=new aO("selectingCells");function mo(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function ms(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function ma(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=mo(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function ml(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function mc(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function md(e,t,n){let r=e.node(-1),i=mn.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return null==s?null:e.node(0).resolve(o+s)}function mu(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function mh(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var mp=class e extends ac{constructor(e,t=e){const n=e.node(-1),r=mn.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),s=e.node(0),a=r.cellsInRect(o).filter(e=>e!=t.pos-i);a.unshift(t.pos-i);const l=a.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e}
118 found`);let r=i+e+1;return new ad(s.resolve(r),s.resolve(r+t.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(ml(r)&&ml(i)&&mc(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return ap.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=mn.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let s=[];for(let o=n*t.width+r.left,a=r.left;a<r.right;a++,o++){let n=t.map[o];if(i[n])continue;i[n]=!0;let a=t.findCell(n),l=e.nodeAt(n);if(!l)throw RangeError(`No cell with offset ${n} found`);let c=r.left-a.left,d=a.right-r.right;if(c>0||d>0){let e=l.attrs;if(c>0&&(e=mu(e,0,c)),d>0&&(e=mu(e,e.colspan-d,d)),a.left<r.left){if(!(l=l.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<r.top||a.bottom>r.bottom){let e={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top<r.top?l.type.createAndFill(e):l.type.create(e,l.content)}s.push(l)}o.push(e.child(n).copy(oJ.from(s)))}let s=this.isColSelection()&&this.isRowSelection()?e:o;return new o1(oJ.from(s),1,1)}replace(e,t=o1.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(s.pos),i?o1.empty:t)}let i=ac.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new o1(oJ.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=mn.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=mn.get(r),o=t.start(-1),s=i.findCell(t.pos-o),a=i.findCell(n.pos-o),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(o+i.map[s.left])),a.bottom<i.height&&(n=l.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+i.map[a.left])),s.bottom<i.height&&(t=l.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=mn.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=mn.get(r),o=t.start(-1),s=i.findCell(t.pos-o),a=i.findCell(n.pos-o),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(o+i.map[s.top*i.width])),a.right<i.width&&(n=l.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+i.map[a.top*i.width])),s.right<i.width&&(t=l.resolve(o+i.map[i.width*(s.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new mf(this.$anchorCell.pos,this.$headCell.pos)}};mp.prototype.visible=!1,ac.jsonID("cell",mp);var mf=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&mc(t,n)?new mp(t,n):ac.near(n,1)}};function mm(e){if(!(e.selection instanceof mp))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(de.node(n,n+e.nodeSize,{class:"selectedCell"}))}),dr.create(e.doc,t)}let mg=new aO("fix-tables");function my(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i,o,s=mn.get(t);if(!s.problems)return r;r||(r=e.tr);let a=[];for(let e=0;e<s.height;e++)a.push(0);for(let e=0;e<s.problems.length;e++){let i=s.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let o=e.attrs;for(let e=0;e<o.rowspan;e++)a[i.row+e]+=i.n;
118r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,mu(o,o.colspan-i.n,i.n))}else if("missing"==i.type)a[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<a.length;e++)a[e]&&(null==i&&(i=e),o=e);for(let l=0,c=n+1;l<s.height;l++){let n=t.child(l),s=c+n.nodeSize,d=a[l];if(d>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<d;n++){let n=mr(e.schema)[t].createAndFill();n&&a.push(n)}let u=(0==l||i==l-1)&&o==l?c+1:s-1;r.insert(r.mapping.map(u),a)}c=s}return r.setMeta(mg,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,i){let o=t.childCount,s=n.childCount;r:for(let a=0,l=0;a<s;a++){let s=n.child(a);for(let e=l,n=Math.min(o,a+3);e<n;e++)if(t.child(e)==s){l=e+1,r+=s.nodeSize;continue r}i(s,r),l<o&&t.child(l).sameMarkup(s)?e(t.child(l),s,r+1,i):s.nodesBetween(0,s.content.size,i,r+1),r+=s.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function mb(e){let t=e.selection,n=ma(e),r=n.node(-1),i=n.start(-1),o=mn.get(r);return{...t instanceof mp?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function mv(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){let r=mr(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0})(t,r,i+o)&&(o=0==i||i==t.width?null:0);for(let s=0;s<t.height;s++){let a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){let o=t.map[a],l=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,mh(l.attrs,i-t.colCount(o))),s+=l.attrs.rowspan-1}else{let l=null==o?mr(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function mk(e,{map:t,tableStart:n,table:r},i){let o=n;for(let e=0;e<i;e++)o+=r.child(e).nodeSize;let s=[],a=i>0?-1:0;(function(e,t,n){var r;let i=mr(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if((null==(r=t.nodeAt(e.map[o+n*e.width]))?void 0:r.type)!=i)return!1;return!0})(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let o=0,c=t.width*i;o<t.width;o++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],s=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...s,rowspan:s.rowspan+1}),o+=s.colspan-1}else{var l;let e=null==a?mr(r.type.schema).cell:null==(l=r.nodeAt(t.map[c+a*t.width]))?void 0:l.type,n=null==e?void 0:e.createAndFill();n&&s.push(n)}return e.insert(o,mr(r.type.schema).row.create(null,s)),e}function mx(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function mw(e,t){let n=e.selection;if(!(n instanceof mp)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=mb(e),{map:i}=r;if(function({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}(i,r))return!1;if(t){let n,o,s=e.tr,a={},l=oJ.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let c=i.map[e*i.width+t],d=r.table.nodeAt(c);if(!a[c]&&d)if(a[c]=!0,null==n)n=c,o=d;else{mx(d)||(l=l.append(d.content));let e=s.mapping.map(c+r.tableStart);s.delete(e,e+d.nodeSize)}}if(null==n||null==o)return!0;if(s.setNodeMarkup(n+r.tableStart,null,{...mh(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),rowspan:r.bottom-r.top}),l.size>0){let e=n+1+o.content.size,t=mx(o)?n+1:e;s.replaceWith(t+r.tableStart,e+r.tableStart,l)}s.setSelection(new mp(s.doc.resolve(n+r.tableStart))),t(s)}return!0}function mE(e,t){var n;let r=mr(e.schema);return(n=({node:e})=>r[e.type.spec.tableRole],(e,t)=>{let r,i,o=e.selection;if(o instanceof mp){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;r=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{var s;if(!(r=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;
118if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from)))return!1;i=null==(s=mo(o.$from))?void 0:s.pos}if(null==r||null==i||1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(t){let s,a=r.attrs,l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let d=mb(e),u=e.tr;for(let e=0;e<d.right-d.left;e++)l.push(c?{...a,colwidth:c&&c[e]?[c[e]]:null}:a);for(let e=d.top;e<d.bottom;e++){let t=d.map.positionAt(e,d.left,d.table);e==d.top&&(t+=r.nodeSize);for(let i=d.left,o=0;i<d.right;i++,o++)(i!=d.left||e!=d.top)&&u.insert(s=u.mapping.map(t+d.tableStart,1),n({node:r,row:e,col:i}).createAndFill(l[o]))}u.setNodeMarkup(i,n({node:r,row:d.top,col:d.left}),l[0]),o instanceof mp&&u.setSelection(new mp(u.doc.resolve(o.$anchorCell.pos),s?u.doc.resolve(s):void 0)),t(u)}return!0})(e,t)}function mT(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function mS(e,t){if((t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic)return function(t,n){if(!ms(t))return!1;if(n){let r=mr(t.schema),i=mb(t),o=t.tr,s=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(e=>i.table.nodeAt(e));for(let e=0;e<s.length;e++)a[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,a[e].attrs);if(0===o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,a[e].attrs);n(o)}return!0};return function(t,n){if(!ms(t))return!1;if(n){let r=mr(t.schema),i=mb(t),o=t.tr,s=mT("row",i,r),a=mT("column",i,r),l=+("column"===e?!!s:"row"===e&&!!a),c="column"==e?{left:0,top:l,right:1,bottom:i.map.height}:"row"==e?{left:l,top:0,right:i.map.width,bottom:1}:i,d="column"==e?a?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;i.map.cellsInRect(c).forEach(e=>{let t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,d,n.attrs)}),n(o)}return!0}}mS("row",{useDeprecatedLogic:!0}),mS("column",{useDeprecatedLogic:!0});let mC=mS("cell",{useDeprecatedLogic:!0});function mA(e){return function(t,n){if(!ms(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(ma(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(ap.between(e,e.node(0).resolve(e.pos+e.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function m_(e,t){let n=e.selection;if(!(n instanceof mp))return!1;if(t){let r=e.tr,i=mr(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new o1(i,0,0))}),r.docChanged&&t(r)}return!0}function mN(e,t){let n=e.createAndFill();return new aa(n).replace(0,n.content.size,t).doc}function mO(e,t,n,r,i,o,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){let i=s*t.width+c,o=t.map[i];if(t.map[i-t.width]==o){l=!0;let i=n.nodeAt(o),{top:d,left:u}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(a).map(o+r),null,{...i.attrs,rowspan:s-d}),e.insert(e.mapping.slice(a).map(t.positionAt(s,u,n)),i.type.createAndFill({...i.attrs,rowspan:d+i.attrs.rowspan-s})),c+=i.attrs.colspan-1}}return l}function mM(e,t,n,r,i,o,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){let i=c*t.width+s,o=t.map[i];if(t.map[i-1]==o){l=!0;let i=n.nodeAt(o),d=t.colCount(o),u=e.mapping.slice(a).map(o+r);e.setNodeMarkup(u,null,mu(i.attrs,s-d,i.attrs.colspan-(s-d))),e.insert(u+i.nodeSize,i.type.createAndFill(mu(i.attrs,0,s-d))),c+=i.attrs.rowspan-1}}return l}function mI(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw Error("No table found");let s=mn.get(o),{top:a,left:l}=r,c=l+i.width,d=a+i.height,u=e.tr,h=0;function p(){if(!(o=n?u.doc.nodeAt(n-1):u.doc))throw Error("No table found");
118s=mn.get(o),h=u.mapping.maps.length}(function(e,t,n,r,i,o){let s,a,l=mr(e.doc.type.schema);if(i>t.width)for(let o=0,c=0;o<t.height;o++){let d,u=n.child(o);c+=u.nodeSize;let h=[];d=null==u.lastChild||u.lastChild.type==l.cell?s||(s=l.cell.createAndFill()):a||(a=l.header_cell.createAndFill());for(let e=t.width;e<i;e++)h.push(d);e.insert(e.mapping.slice(0).map(c-1+r),h)}if(o>t.height){let c=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==l.header_cell;c.push(i?a||(a=l.header_cell.createAndFill()):s||(s=l.cell.createAndFill()))}let d=l.row.create(null,oJ.from(c)),u=[];for(let e=t.height;e<o;e++)u.push(d);e.insert(e.mapping.slice(0).map(r+n.nodeSize-2),u)}return!!(s||a)})(u,s,o,n,c,d)&&p(),mO(u,s,o,n,l,c,a,h)&&p(),mO(u,s,o,n,l,c,d,h)&&p(),mM(u,s,o,n,a,d,l,h)&&p(),mM(u,s,o,n,a,d,c,h)&&p();for(let e=a;e<d;e++){let t=s.positionAt(e,l,o),r=s.positionAt(e,c,o);u.replace(u.mapping.slice(h).map(t+n),u.mapping.slice(h).map(r+n),new o1(i.rows[e-a],0,0))}p(),u.setSelection(new mp(u.doc.resolve(n+s.positionAt(a,l,o)),u.doc.resolve(n+s.positionAt(d-1,c-1,o)))),t(u)}let mD=dL({ArrowLeft:mz("horiz",-1),ArrowRight:mz("horiz",1),ArrowUp:mz("vert",-1),ArrowDown:mz("vert",1),"Shift-ArrowLeft":mL("horiz",-1),"Shift-ArrowRight":mL("horiz",1),"Shift-ArrowUp":mL("vert",-1),"Shift-ArrowDown":mL("vert",1),Backspace:m_,"Mod-Backspace":m_,Delete:m_,"Mod-Delete":m_});function mR(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function mz(e,t){return(n,r,i)=>{if(!i)return!1;let o=n.selection;if(o instanceof mp)return mR(n,r,ac.near(o.$headCell,t));if("horiz"!=e&&!o.empty)return!1;let s=mF(i,e,t);if(null==s)return!1;if("horiz"==e)return mR(n,r,ac.near(n.doc.resolve(o.head+t),t));{let i,o=n.doc.resolve(s),a=md(o,e,t);return i=a?ac.near(a,1):t<0?ac.near(n.doc.resolve(o.before(-1)),-1):ac.near(n.doc.resolve(o.after(-1)),1),mR(n,r,i)}}}function mL(e,t){return(n,r,i)=>{let o;if(!i)return!1;let s=n.selection;if(s instanceof mp)o=s;else{let r=mF(i,e,t);if(null==r)return!1;o=new mp(n.doc.resolve(r))}let a=md(o.$headCell,e,t);return!!a&&mR(n,r,new mp(o.$anchorCell,a))}}function mP(e,t){let n=mo(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new mp(n))),!0)}function mj(e,t,n){if(!ms(e.state))return!1;let r=function(e){if(0===e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if("row"==o)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,o=e?0:Math.max(0,n-1),l=e<t.childCount-1?0:Math.max(0,r-1);(o||l)&&(i=mN(mr(s).row,new o1(i,o,l)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?mN(mr(s).row,new o1(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:o}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+o}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(oJ.empty),n[i]<r){let o=mr(e).cell.createAndFill(),s=[];for(let e=n[i];e<r;e++)s.push(o);t[i]=t[i].append(oJ.from(s))}return{height:t.length,width:r,rows:t}}(s,a)}(n),i=e.state.selection;if(i instanceof mp){r||(r={width:1,height:1,rows:[oJ.from(mN(mr(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=mn.get(t).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let o=n[e],s=[];for(let n=t[e]||0,i=0;n<r;i++){let a=o.child(i%o.childCount);n+a.attrs.colspan>r&&(a=a.type.createChecked(mu(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;n<a.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+a.attrs.colspan}i.push(oJ.from(s))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let s=[],a=n[o%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),s.push(t)}e.push(oJ.from(s))}n=e,t=i}return{width:e,height:t,rows:n}}(r,s.right-s.left,s.bottom-s.top),mI(e.state,e.dispatch,o,s,r),!0}if(!r)return!1;{let t=ma(e.state),n=t.start(-1);return mI(e.state,e.dispatch,n,mn.get(t.node(-1)).findCell(t.pos-n),r),!0}}function m$(e,t){var n;let r;if(0!=t.button||t.ctrlKey||t.metaKey)return;let i=mB(e,t.target);if(t.shiftKey&&e.state.selection instanceof mp)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=mo(e.state.selection.$anchor))&&(null==(n=mH(e,t))?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(t,n){let r=mH(e,n),i=null==mi.getState(e.state);if(!r||!mc(t,r))if(!i)return;else r=t;let o=new mp(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(mi,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=mi.getState(e.state)&&e.dispatch(e.state.tr.setMeta(mi,-1))}function a(n){let r,a=mi.getState(e.state);if(null!=a)r=e.state.doc.resolve(a);else if(mB(e,n.target)!=i&&!(r=mH(e,t)))return s();r&&o(r,n)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function mF(e,t,n){if(!(e.state.selection instanceof ap))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))break;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?o:null}}return null}function mB(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function mH(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&mo(e.state.doc.resolve(r))||mo(e.state.doc.resolve(i))}var mU=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),mV(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,mV(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function mV(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild,c=e.firstChild;if(c){for(let e=0,n=0;e<c.childCount;e++){let{colspan:d,colwidth:u}=c.child(e).attrs;for(let e=0;e<d;e++,n++){let c=i==n?o:u&&u[e],d=c?c+"px":"";if(s+=c||r,c||(a=!1),l)l.style.width!=d&&(l.style.width=d),l=l.nextSibling;else{let e=document.createElement("col");e.style.width=d,t.appendChild(e)}}}for(;l;){var d;let e=l.nextSibling;null==(d=l.parentNode)||d.removeChild(l),l=e}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}let mq=new aO("tableColumnResizing");var mG=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(mq);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&t.docChanged){let n=t.mapping.map(this.activeHandle,-1);return ml(t.doc.resolve(n))||(n=-1),new e(n,this.dragging)}return this}};function mW(e,t,n,r){let i=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!i)return -1;let{pos:o}=i,s=mo(e.state.doc.resolve(o));if(!s)return -1;if("right"==n)return s.pos;let a=mn.get(s.node(-1)),l=s.start(-1),c=a.map.indexOf(s.pos-l);return c%a.width==0?-1:l+a.map[c-1]}
118function mK(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function mJ(e,t){e.dispatch(e.state.tr.setMeta(mq,{setHandle:t}))}function mY(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=mn.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=e.domAtPos(i.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&mV(o,l.firstChild,l,r,a,n)}function mX(e){return"left"===e||"right"===e||"center"===e?e:null}function mQ(){return{default:null,parseHTML:e=>{let t,n;return t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase(),mX(t||n)},renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var mZ=pu.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;let r=e.getAttribute("colwidth"),i=r?r.split(",").map(e=>parseInt(e,10)):null;if(!i){let r=null==(t=e.closest("table"))?void 0:t.querySelectorAll("colgroup > col"),i=Array.from((null==(n=e.parentElement)?void 0:n.children)||[]).indexOf(e);if(i&&i>-1&&r&&r[i]){let e=r[i].getAttribute("width");return e?[parseInt(e,10)]:null}}return i}},align:mQ()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",uX(this.options.HTMLAttributes,e),0]}}),m0=pu.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},align:mQ()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",uX(this.options.HTMLAttributes,e),0]}}),m1=pu.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",uX(this.options.HTMLAttributes,e),0]}});function m2(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function m5(e,t,n,r,i,o){var s;let a=0,l=!0,c=t.firstChild,d=e.firstChild;if(null!==d)for(let e=0,n=0;e<d.childCount;e+=1){let{colspan:s,colwidth:u}=d.child(e).attrs;for(let e=0;e<s;e+=1,n+=1){let s=i===n?o:u&&u[e],d=s?`${s}px`:"";if(a+=s||r,s||(l=!1),c){if(c.style.width!==d){let[e,t]=m2(r,s);c.style.setProperty(e,t)}c=c.nextSibling}else{let e=document.createElement("col"),[n,i]=m2(r,s);e.style.setProperty(n,i),t.appendChild(e)}}}for(;c;){let e=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=e}let u=e.attrs.style&&"string"==typeof e.attrs.style&&/\bwidth\s*:/i.test(e.attrs.style);l&&!u?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var m3=class{constructor(e,t,n,r={}){for(const[n,i]of(this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),Object.entries(r)))null!=i&&("style"===n?this.table.style.cssText=String(i):this.table.setAttribute(n,String(i)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),m5(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,m5(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!n&&!r&&("attributes"===e.type||"childList"===e.type||"characterData"===e.type)}};function m4(e,t){return t?e.createChecked(null,t):e.createAndFill()}var m6=({editor:e})=>{let{selection:t}=e.state;if(!(t instanceof mp))return!1;let n=0,r=uB(t.ranges[0].$from,e=>"table"===e.type.name);return null==r||r.node.descendants(e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)},m8=function(e,t,n={}){var r;let i=null!=(r=n.cellLineSeparator)?r:"\x1f";if(!e||!e.content||0===e.content.length)return"";let o=[];
118e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{var r;let o=((e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(i):e.content?t.renderChildren(e.content):"")||"").replace(/\s+/g," ").trim(),s="tableHeader"===e.type,a=mX(null==(r=e.attrs)?void 0:r.align);n.push({text:o,isHeader:s,align:a})}),o.push(n)});let s=o.reduce((e,t)=>Math.max(e,t.length),0);if(0===s)return"";let a=Array.from({length:s}).fill(0);o.forEach(e=>{var t;for(let n=0;n<s;n+=1){let r=((null==(t=e[n])?void 0:t.text)||"").length;r>a[n]&&(a[n]=r),a[n]<3&&(a[n]=3)}});let l=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),c=o[0],d=c.some(e=>e.isHeader),u=Array.from({length:s}).fill(null);o.forEach(e=>{var t;for(let n=0;n<s;n+=1)!u[n]&&(null==(t=e[n])?void 0:t.align)&&(u[n]=e[n].align)});let h="\n",p=Array.from({length:s}).map((e,t)=>d&&c[t]&&c[t].text||"");return h+=`| ${p.map((e,t)=>l(e,a[t])).join(" | ")} | 119| ${a.map((e,t)=>{let n=Math.max(3,e),r=u[t];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} | 120`,(d?o.slice(1):o).forEach(e=>{h+=`| ${Array.from({length:s}).fill(0).map((t,n)=>l(e[n]&&e[n].text||"",a[n])).join(" | ")} | 121`}),h},m9=pu.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:m3,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=function(e,t){let n=0,r=!0,i=[],o=e.firstChild;if(!o)return{};for(let e=0,s=0;e<o.childCount;e+=1){let{colspan:a,colwidth:l}=o.child(e).attrs;for(let e=0;e<a;e+=1,s+=1){let o=void 0===s?void 0:l&&l[e];n+=o||t,o||(r=!1);let[a,c]=m2(t,o);i.push(["col",{style:`${a}: ${c}`}])}}return{colgroup:["colgroup",{},...i],tableWidth:r?`${n}px`:"",tableMinWidth:r?"":`${n}px`}}(e,this.options.cellMinWidth),o=t.style,s=["table",uX(this.options.HTMLAttributes,t,{style:o||(r?`width: ${r}`:`min-width: ${i}`)}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},s]:s},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{var o;let s=mX(null!=(o=r[n])?o:e.align);i.push(t.createNode("tableHeader",s?{align:s}:{},[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{var o;let s=mX(null!=(o=r[n])?o:e.align);i.push(t.createNode("tableCell",s?{align:s}:{},[{type:"paragraph",content:t.parseInline(e.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>m8(e,t),addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{let s=function(e,t,n,r){let i=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}(e),o=[],s=[];for(let e=0;e<n;e+=1){let e=m4(i.cell,void 0);if(e&&s.push(e),r){let e=m4(i.header_cell,void 0);e&&o.push(e)}}let a=[];for(let e=0;e<t;e+=1)a.push(i.row.createChecked(null,r&&0===e?o:s));return i.table.createChecked(null,a)}(o.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(ap.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e);t(mv(e.tr,n,n.left))}return!0})(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e);t(mv(e.tr,n,n.right))}return!0})(e,t),deleteColumn:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;!function(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let a=s*t.width+i,l=t.map[a],c=n.nodeAt(l),d=c.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,mu(d,i-t.colCount(l)));else{let t=e.mapping.slice(o).map(r+l);e.delete(t,t+c.nodeSize)}s+=d.rowspan}
121}(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=mn.get(e)}t(r)}return!0})(e,t),addRowBefore:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e);t(mk(e.tr,n,n.top))}return!0})(e,t),addRowAfter:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e);t(mk(e.tr,n,n.bottom))}return!0})(e,t),deleteRow:()=>({state:e,dispatch:t})=>(function(e,t){if(!ms(e))return!1;if(t){let n=mb(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;!function(e,{map:t,table:n,tableStart:r},i){let o=0;for(let e=0;e<i;e++)o+=n.child(e).nodeSize;let s=o+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(o+r,s+r);let l=new Set;for(let o=0,s=i*t.width;o<t.width;o++,s++){let c=t.map[s];if(!l.has(c)){if(l.add(c),i>0&&c==t.map[s-t.width]){let t=n.nodeAt(c).attrs;e.setNodeMarkup(e.mapping.slice(a).map(c+r),null,{...t,rowspan:t.rowspan-1}),o+=t.colspan-1}else if(i<t.height&&c==t.map[s+t.width]){let s=n.nodeAt(c),l=s.attrs,d=s.type.create({...l,rowspan:s.attrs.rowspan-1},s.content),u=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(a).map(r+u),d),o+=l.colspan-1}}}}(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=mn.get(n.table)}t(r)}return!0})(e,t),deleteTable:()=>({state:e,dispatch:t})=>(function(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1})(e,t),mergeCells:()=>({state:e,dispatch:t})=>mw(e,t),splitCell:()=>({state:e,dispatch:t})=>mE(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>mS("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>mS("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>mC(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!mw(e,t)||mE(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>(function(n,r){if(!ms(n))return!1;let i=ma(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let o=n.tr;n.selection instanceof mp?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&o.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(o)}return!0})(n,r),goToNextCell:()=>({state:e,dispatch:t})=>mA(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>mA(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&my(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=mp.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:m6,"Mod-Backspace":m6,Delete:m6,"Mod-Delete":m6}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[function({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=mU,lastColumnResizable:i=!0}={}){let o=new aA({key:mq,state:{init(e,t){var i;let s=null==(i=o.spec)||null==(i=i.props)?void 0:i.nodeViews,a=mr(t.schema).table.name;return r&&s&&(s[a]=(e,t)=>new r(e,n,t)),new mG(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=mq.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r){if(!e.editable)return;let i=mq.getState(e.state);if(i&&!i.dragging){let o=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(o){let{left:r,right:i}=o.getBoundingClientRect();t.clientX-r<=n?s=mW(e,t,"left",n):i-t.clientX<=n&&(s=mW(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&-1!==s){let t=e.state.doc.resolve(s),n=t.node(-1),r=mn.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}mJ(e,s)}}}(t,n,e,i)},mouseleave:e=>{!function(e){if(!e.editable)return;let t=mq.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&mJ(e,-1)}(e)},mousedown:(e,r)=>{!function(e,t,n,r){var i;if(!e.editable)return;let o=null!=(i=e.dom.ownerDocument.defaultView)?i:window,s=mq.getState(e.state);if(!s||-1==s.activeHandle||s.dragging)return;let a=e.state.doc.nodeAt(s.activeHandle),l=function(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=e.domAtPos(t),s=o.node.childNodes[o.offset].offsetWidth,a=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],a--);return s/a}(e,s.activeHandle,a.attrs);function c(t){o.removeEventListener("mouseup",c),o.removeEventListener("mousemove",d);let r=mq.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.no
121de(-1),o=mn.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+a;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],c=i.nodeAt(r).attrs,d=1==c.colspan?0:a-o.colCount(r);if(c.colwidth&&c.colwidth[d]==n)continue;let u=c.colwidth?c.colwidth.slice():Array(c.colspan).fill(0);u[d]=n,l.setNodeMarkup(s+r,null,{...c,colwidth:u})}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,mK(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(mq,{setDragging:null})))}function d(t){if(!t.which)return c(t);let i=mq.getState(e.state);if(i&&i.dragging){let o=mK(i.dragging,t,n);mY(e,i.activeHandle,o,r)}}e.dispatch(e.state.tr.setMeta(mq,{setDragging:{startX:t.clientX,startWidth:l}})),mY(e,s.activeHandle,l,r),o.addEventListener("mouseup",c),o.addEventListener("mousemove",d),t.preventDefault()}(e,r,t,n)}},decorations:e=>{let t=mq.getState(e);if(t&&t.activeHandle>-1)return function(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return dr.empty;let o=mn.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<o.height;t++){let r=a+t*o.width;if((a==o.width-1||o.map[r]!=o.map[r+1])&&(0==t||o.map[r]!=o.map[r-o.width])){var l;let t=o.map[r],a=s+t+i.nodeAt(t).nodeSize-1,c=document.createElement("div");c.className="column-resize-handle",(null==(l=mq.getState(e))?void 0:l.dragging)&&n.push(de.node(s+t,s+t+i.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),n.push(de.widget(a,c))}}return dr.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],function({allowTableNodeSelection:e=!1}={}){return new aA({key:mi,state:{init:()=>null,apply(e,t){let n=e.getMeta(mi);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:mm,handleDOMEvents:{mousedown:m$},createSelectionBetween:e=>null!=mi.getState(e.state)?e.state.selection:null,handleTripleClick:mP,handleKeyDown:mD,handlePaste:mj},appendTransaction:(t,n,r)=>(function(e,t,n){let r,i,o=(t||e).selection,s=(t||e).doc;if(o instanceof am&&(i=o.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=mp.create(s,o.from);else if("row"==i){let e=s.resolve(o.from+1);r=mp.rowSelection(e,e)}else if(!n){let e=mn.get(o.node),t=o.from+1,n=t+e.map[e.width*e.height-1];r=mp.create(s,t+1,n)}}else o instanceof ap&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}(o)?r=ap.create(s,o.from):o instanceof ap&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(o)&&(r=ap.create(s,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,my(r,n),e)})}({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:e,view:n,HTMLAttributes:r})=>{let i=uX(this.options.HTMLAttributes,r);return new t(e,this.options.cellMinWidth,n,i)}},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:uW(uU(e,"tableRole",t))}}});h1.create({name:"tableKit",addExtensions(){let e=[];return!1!==this.options.table&&e.push(m9.configure(this.options.table)),!1!==this.options.tableCell&&e.push(mZ.configure(this.options.tableCell)),!1!==this.options.tableHeader&&e.push(m0.configure(this.options.tableHeader)),!1!==this.options.tableRow&&e.push(m1.configure(this.options.tableRow)),e}});var m7=class e{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}
121textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(s,a)=>{let l=s.isText?s.text.slice(Math.max(e,a)-a,t-a):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=l},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(0==t&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,o=0;o<n;e++){let s=this.content[e],a=o+s.nodeSize;a>t&&((o<t||a>n)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,n-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,n-o-1))),r.push(s),i+=s.nodeSize),o=a}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,o)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)r++;return r}if(o.content.size||s.content.size){let t=e(o.content,s.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let a=t.child(--o),l=n.child(--s),c=a.nodeSize;if(a==l){r-=c,i-=c;continue}if(!a.sameMarkup(l))return{a:r,b:i};if(a.isText&&a.text!=l.text){let e=0,t=Math.min(a.text.length,l.text.length);for(;e<t&&a.text[a.text.length-e-1]==l.text[l.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(a.content.size||l.content.size){let t=e(a.content,l.content,r-1,i-1);if(t)return t}r-=c,i-=c}}(this,e,t,n)}findIndex(e){if(0==e)return gt(0,e);if(e==this.size)return gt(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return gt(t+1,r);return gt(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError("Invalid input for Fragment.fromJSON");return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||(n=t.slice(0,e)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};m7.empty=new m7([],0);var ge={index:0,offset:0};function gt(e,t){return ge.index=e,ge.offset=t,ge}function gn(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!gn(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!gn(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var gr=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;
vendor: 6,536 bytes, line 121
121if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&gn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};gr.none=[];var gi=class extends Error{},go=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=function e(t,n,r,i,o,s){let{index:a,offset:l}=t.findIndex(n),c=t.maybeChild(a);if(l==n||c.isText)return s&&i<=0&&o<=0&&!s.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));let d=e(c.content,n-l-1,r,0==a?i-1:0,a==t.childCount-1?o-1:0,c);return d&&t.replaceChild(a,c.copy(d))}(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),s=t.maybeChild(i),{index:a,offset:l}=t.findIndex(r);if(o==n||s.isText){if(l!=r&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-o-1,r-o-1)))}(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid input for Slice.fromJSON");return new e(m7.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};function gs(e,t){if(!t.type.compatibleContent(e.type))throw new gi("Cannot join "+t.type.name+" onto "+e.type.name)}function ga(e,t,n){let r=e.node(n);return gs(r,t.node(n)),r}function gl(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function gc(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(gl(e.nodeAfter,r),o++));for(let e=o;e<s;e++)gl(i.child(e),r);t&&t.depth==n&&t.textOffset&&gl(t.nodeBefore,r)}function gd(e,t){return e.type.checkContent(t),e.copy(t)}function gu(e,t,n){let r=[];return gc(null,e,n,r),e.depth>n&&gl(gd(ga(e,t,n+1),gu(e,t,n+1)),r),gc(t,null,n,r),new m7(r)}go.empty=new go(m7.empty,0,0);var gh=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return gr.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new gg(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(o),s=o-n;if(r.push(e,t,i+n),!s||(e=e.child(t)).isText)break;o=s-1,i+=n+1}return new e(n,r,o)}
121static resolveCached(t,n){let r=gm.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else gm.set(t,r=new gp);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%gf,i}},gp=class{constructor(){this.elts=[],this.i=0}},gf=12,gm=new WeakMap,gg=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},gy=Object.create(null);(class e{constructor(e,t,n,r=gr.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||m7.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&gn(this.attrs,t||e.defaultAttrs||gy)&&gr.sameSet(this.marks,n||gr.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return go.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o);return new go(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(e,t,n){var r=this.resolve(e),i=this.resolve(t);if(n.openStart>r.depth)throw new gi("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new gi("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),s=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let a=e(t,n,r,i+1);return s.copy(s.content.replaceChild(o,a))}if(!r.content.size)return gd(s,gu(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(m7.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return gd(s,function e(t,n,r,i,o){let s=t.depth>o&&ga(t,n,o+1),a=i.depth>o&&ga(r,i,o+1),l=[];return gc(null,t,o,l),s&&a&&n.index(o)==r.index(o)?(gs(s,a),gl(gd(s,e(t,n,r,i,o+1)),l)):(s&&gl(gd(s,gu(t,n,o+1)),l),gc(n,r,o,l),a&&gl(gd(a,gu(r,i,o+1)),l)),gc(i,null,o,l),new m7(l)}(t,e,o,n,i))}{let e=t.parent,i=e.content;return gd(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return gh.resolveCached(this,e)}resolveNoCache(e){return gh.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}
121toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),function(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=m7.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=gr.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!gr.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=m7.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}).prototype.text=void 0;var gb=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){var r;let i,o=new gv(t,n);if(null==o.next)return e.empty;let s=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=gk(e),r=n;return e.eat(",")&&(r="}"!=e.next?gk(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next)return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"))return 1==n.length?n[0]:{type:"choice",exprs:n}}(o);o.next&&o.err("Unexpected trailing text");let a=(r=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}else if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}else if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
121function i(e,t){e.forEach(e=>e.to=t)}}(s),i=Object.create(null),function e(t){let n=[];t.forEach(e=>{r[e].forEach(({term:e,to:t})=>{let i;if(e){for(let t=0;t<n.length;t++)n[t][0]==e&&(i=n[t][1]);gw(r,t).forEach(t=>{i||n.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)})}})});let o=i[t.join(",")]=new gb(t.indexOf(r.length-1)>-1);for(let t=0;t<n.length;t++){let r=n[t][1].sort(gx);o.next.push({type:n[t][0],next:i[r.join(",")]||e(r)})}return o}(gw(r,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(a,o),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,s){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return m7.from(s.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}};gb.empty=new gb(!0);var gv=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}};function gk(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gx(e,t){return t-e}function gw(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(gx)}var gE=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},gT=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;
vendor: 10,509 bytes, line 121
121for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+i],c=this.ranges[s+o],d=a+l;if(e<=d){let i=l?e==a?-1:e==d?1:t:t,o=a+r+(i<0?0:c);if(n)return o;let u=e==(t<0?a:d)?null:s/3+(e-a)*65536,h=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(h|=8),new gE(o,h,u)}r+=c-l}return n?e+r:new gE(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let a=this.ranges[t+i];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+o]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),i+=c-l}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};gT.empty=new gT([]);var gS=Object.create(null),gC=class{getMap(){return gT.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=gS[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in gS)throw RangeError("Duplicate use of step JSON ID "+e);return gS[e]=t,t.prototype.jsonID=e,t}},gA=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof gi)return e.fail(t.message);throw t}}};function g_(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(g_(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return m7.fromArray(r)}var gN=class e extends gC{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new go(g_(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return gA.fromReplace(e,this.from,this.to,i)}invert(){return new gO(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};gC.jsonID("addMark",gN);var gO=class e extends gC{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new go(g_(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return gA.fromReplace(e,this.from,this.to,n)}invert(){return new gN(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};gC.jsonID("removeMark",gO);var gM=class e extends gC{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return gA.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return gA.fromReplace(e,this.pos,this.pos+1,new go(m7.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new gI(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};gC.jsonID("addNodeMark",gM);var gI=class e extends gC{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return gA.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return gA.fromReplace(e,this.pos,this.pos+1,new go(m7.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new gM(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};gC.jsonID("removeNodeMark",gI);var gD=class e extends gC{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&gz(e,this.from,this.to)?gA.fail("Structure replace would overwrite content"):gA.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new gT([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart)if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;else{let n=this.slice.size+t.slice.size==0?go.empty:new go(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}{let n=this.slice.size+t.slice.size==0?go.empty:new go(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,go.fromJSON(t,n.slice),!!n.structure)}};gD.MAP_BIAS=1,gC.jsonID("replace",gD);var gR=class e extends gC{constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(gz(e,this.from,this.gapFrom)||gz(e,this.gapTo,this.to)))return gA.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return gA.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?gA.fromReplace(e,this.from,this.to,n):gA.fail("Content does not fit in gap")}getMap(){return new gT([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,go.fromJSON(t,n.slice),n.insert,!!n.structure)}};function gz(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}gC.jsonID("replaceAround",gR);var gL=class e extends gC{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return gA.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return gA.fromReplace(e,this.pos,this.pos+1,new go(m7.from(r),0,+!t.isLeaf))}getMap(){return gT.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if("number"!=typeof n.pos||"string"!=typeof n.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};gC.jsonID("attr",gL);var gP=class e extends gC{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return gA.ok(n)}getMap(){return gT.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if("string"!=typeof n.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};gC.jsonID("docAttr",gP);
121var gj=class extends Error{};(gj=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),gj.prototype.constructor=gj,gj.prototype.name="TransformError";var g$=Object.create(null),gF=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new gB(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=go.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=e.mapping.slice(i);e.replaceRange(c.map(a.pos),c.map(l.pos),s?go.empty:t),0==s&&gX(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=e.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),gX(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new gV(e):gY(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?gY(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):gY(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
vendor: 4,399 bytes, line 121
121static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new gK(e.node(0))}static atStart(e){return gY(e,e,0,0,1)||new gK(e)}static atEnd(e){return gY(e,e,e.content.size,e.childCount,-1)||new gK(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=g$[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in g$)throw RangeError("Duplicate use of selection JSON ID "+e);return g$[e]=t,t.prototype.jsonID=e,t}getBookmark(){return gV.between(this.$anchor,this.$head).getBookmark()}};gF.prototype.visible=!0;var gB=class{constructor(e,t){this.$from=e,this.$to=t}},gH=!1;function gU(e){gH||e.parent.inlineContent||(gH=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var gV=class e extends gF{constructor(e,t=e){gU(e),gU(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return gF.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=go.empty){if(super.replace(e,t),t==go.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new gq(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=gF.findFrom(n,r,!0)||gF.findFrom(n,-r,!0);if(!e)return gF.near(n,r);n=e.$head}return t.parent.inlineContent||(0==i?t=n:(t=(gF.findFrom(t,-r,!0)||gF.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0&&(t=n)),new e(t,n)}};gF.jsonID("text",gV);var gq=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return gV.between(e.resolve(this.anchor),e.resolve(this.head))}},gG=class e extends gF{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?gF.near(o):new e(o)}content(){return new go(m7.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new gW(this.anchor)}static fromJSON(t,n){if("number"!=typeof n.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}};gG.prototype.visible=!1,gF.jsonID("node",gG);var gW=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new gq(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&gG.isSelectable(n)?new gG(t):gF.near(t)}},gK=class e extends gF{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=go.empty){if(t==go.empty){e.delete(0,e.doc.content.size);let t=gF.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return gJ}};gF.jsonID("all",gK);var gJ={map(){return this},resolve:e=>new gK(e)};function gY(e,t,n,r,i,o=!1){if(t.inlineContent)return gV.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&gG.isSelectable(r))return gG.create(e,n-(i<0?r.nodeSize:0))}else{let t=gY(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function gX(e,t,n){let r,i=e.steps.length-1;if(i<t)return;let o=e.steps[i];(o instanceof gD||o instanceof gR)&&(e.mapping.maps[i].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(gF.near(e.doc.resolve(r),n)))}function gQ(e,t){return t&&e?e.bind(t):e}var gZ=class{constructor(e,t,n){this.name=e,this.init=gQ(t.init,n),this.apply=gQ(t.apply,n)}};new gZ("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new gZ("selection",{init:(e,t)=>
121e.selection||gF.atStart(t.doc),apply:e=>e.selection}),new gZ("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new gZ("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});var g0=/^\s*>\s$/,g1=pu.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return py("blockquote",{...uX(this.options.HTMLAttributes,e),children:py("slot",{})})},parseMarkdown:(e,t)=>{var n;let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=[];return e.content.forEach((e,r)=>{var i,o;let s=(null!=(o=null==(i=t.renderChild)?void 0:i.call(t,e,r))?o:t.renderChildren([e])).split("\n").map(e=>""===e.trim()?">":`> ${e}`);n.push(s.join("\n"))}),n.join(` 122> 123`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>((e,t)=>{var n;let{state:r,view:i}=e,{selection:o}=r;if(!o.empty)return!1;let{$from:s}=o;if(0!==s.parentOffset)return!1;let a=s.depth-1,l=s.node(a),c=s.index(a);if(0===c)return!1;if(l.type===t)return e.commands.lift(t.name);let d=l.child(c-1);if(d.type!==t||!(null==(n=d.lastChild)?void 0:n.isTextblock))return!1;let u=s.before(),h=u-1-1,{tr:p}=r;return p.delete(u,s.after()).insert(h,s.parent.content),p.setSelection(gV.create(p.doc,h)),i.dispatch(p.scrollIntoView()),!0})(this.editor,this.type)}}
123,addInputRules(){return[pc({find:g0,type:this.type})]}}),g2=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&"`"===e[t.index-1]?null:{index:t.index,text:t[0],replaceWith:t[1]}},g5=e=>{let t,n=/`([^`]+)`(?!`)/g,r=[];for(;null!==(t=n.exec(e));)t.index>0&&"`"===e[t.index-1]||r.push({index:t.index,text:t[0],replaceWith:t[1]});return r},g3=hX.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",uX(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ps({find:g2,type:this.type})]}
123,addPasteRules(){return[pp({find:g5,type:this.type})]}}),g4=pu.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),g6=pu.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",uX(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!function(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof am){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;i-=1}return!1}(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return ha(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(ap.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(am.create(t.doc,n.pos)):t.setSelection(ap.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=null==i?void 0:i.create();o&&(t.insert(r,o),t.setSelection(ap.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[pa({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
123ype})]}}),g8=Object.defineProperty,g9="textStyle",g7=/^\s*([-+*])\s$/,ye=pu.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",uX(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(g9)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=pc({find:g7,type:this.t
123ype});return(this.options.keepMarks||this.options.keepAttributes)&&(e=pc({find:g7,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(g9),editor:this.editor})),[e]}}),yt=(e,t)=>h1.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>{let n;return n=this.editor,((e,t,n,r)=>{let i=((e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let o=-1;for(let e=i.depth;e>0;e-=1)if(i.node(e).type.name===t){o=e;break}if(o<0)return null;let s=i.node(o),a=i.index(o);if(a+1>=s.childCount)return null;let l=s.child(a+1);if(!n.includes(l.type.name))return null;let c=e.schema.nodes[t],d=!1;if(l.forEach(e=>{e.type===c&&e.childCount>1&&(d=!0)}),!d)return null;let u=e.doc.resolve(i.after()).nodeAfter;if(!u||!n.includes(u.type.name))return null;let h=[];return(u.forEach(e=>{h.push(e)}),0===h.length)?null:{listItemDepth:o,nestedList:u,nestedListPos:i.after(),insertPos:i.after(o),items:h}})(e,n,r);if(!i)return!1;let{selection:o}=e,{nestedList:s,nestedListPos:a,insertPos:l,items:c}=i,d=e.tr;d.delete(a,a+s.nodeSize);let u=d.mapping.map(l);return d.insert(u,oJ.from(c)),d.setSelection(o.map(d.doc,d.mapping)),t&&t(d),!0})(n.state,n.view.dispatch,e,t)};return{Delete:n,"Mod-Delete":n}}}),yn=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],yr="abcdefghijklmnopqrstuvwxyz",yi=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function yo(e){let t=e,n="";for(let[e,r]of yn)for(;t>=e;)n+=r,t-=e;return n}function ys(e){return yo(e).toUpperCase()}function ya(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,o]of yn)if(t.startsWith(o,n)){r+=i,n+=o.length,e=!0;break}if(!e)return 0}return r}function yl(e){if(e<=26)return yr[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?yr[n]:yr[t]+yr[n]}function yc(e){if(!(!e||/^\d+$/.test(e))){if(function(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=ya(e);return!(t<=0)&&(e===e.toLowerCase()?yo(t):ys(t))===e}(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function yd(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=yc(e);if("i"===t||"I"===t)return ya(e);if("a"===t||"A"===t){let t,n=1===(t=e.toLowerCase()).length?t.charCodeAt(0)-97+1:2===t.length?(t.charCodeAt(0)-97+1)*26+(t.charCodeAt(1)-97)+1:0;return n>0?n:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}var yu=pu.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",uX(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n,r,i,o;if("list_item"!==e.type)return[];let s=null!=(n=t.parseBlockChildren)?n:t.parseChildren,a=[];if(e.tokens&&e.tokens.length>0){let n;if(n=null==(r=e.tokens)?void 0:r[0],e.text&&(null==(i=e.tokens)?void 0:i.length)===1&&(null==n?void 0:n.type)==="list"&&n.ordered&&n.raw===e.text)return{type:"listItem",content:[{type:"paragraph",content:(o=e.text||"",t.tokenizeInline?t.parseInline(t.tokenizeInline(o)):t.parseInline([{type:"text",raw:o,text:o}]))}]};if(e.tokens.some(e=>"paragraph"===e.type))a=s(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(a=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=s(e.tokens.slice(1));a.push(...t)}}else a=s(e.tokens)}}return 0===a.length&&(a=[{type:"paragraph",content:[]}]),{type:"listItem",content:a}},renderMarkdown:(e,t,n)=>hW(e,t,e=>{var t,n,r,i;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let o=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return function(e,t,n=". "){let r=t+1;if(!e||"1"===e)return`${r}${n}`;switch(e){case"a":return`${yl(r)}${n}`;case"A":return`${yl(r).toUpperCase()}${n}`;case"i":return`${yo(r)}${n}`;case"I":return`${ys(r)}${n}`;default:return`${r}${n}`}}(null==(i=null==(r=e.meta)?void 0:r.parentAttrs)?void 0:i.type,o-1+(e.index||0),". ")}return"- "},n),addExtensions(){return[yt(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),yh={},yp={findListItemPos:()=>ym,getNextListDepth:()=>yg,handleBackspace:()=>yb,handleDelete:()=>yx,hasListBefore:()=>yy,hasListItemAfter:()=>yw,hasListItemBefore:()=>yE,listItemHasSubList:()=>yT,nextListIsDeeper:()=>yv,nextListIsHigher:()=>yk};for(var yf in yp)g8(yh,yf,{get:yp[yf],enumerable:!0});var ym=(e,t)=>{let{$from:n}
123=t.selection,r=dJ(e,t.schema),i=n.depth,o=n.pos,s=null;for(;i>0&&null===s;)n.node(i).type===r?s=i:(i-=1,o-=1);return null===s?null:{$pos:t.doc.resolve(o),depth:s}},yg=(e,t)=>{let n=ym(e,t);if(!n)return!1;let[,r]=((e,t,n,r=20)=>{let i=e.doc.resolve(n),o=r,s=null;for(;o>0&&null===s;){let e=i.node(o);(null==e?void 0:e.type.name)===t?s=e:o-=1}return[s,o]})(t,e,n.$pos.pos+4);return r},yy=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),o=e.doc.resolve(i).node();return!!o&&!!n.includes(o.type.name)},yb=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!uw(e.state,t)&&yy(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let o=i.at(-1);if(!o)return!1;let s=e.state.doc.resolve(r.start()+o.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},s.end()).joinForward().run()}return!!uw(e.state,t)&&!!(e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0)&&t.pos===n.pos})(e.state)&&e.chain().liftListItem(t).run()},yv=(e,t)=>{let n=yg(e,t),r=ym(e,t);return!!r&&!!n&&n>r.depth},yk=(e,t)=>{let n=yg(e,t),r=ym(e,t);return!!r&&!!n&&n<r.depth},yx=(e,t)=>{if(!uw(e.state,t)||!((e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=uH(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2)&&n.pos===r.pos})(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!(!n.empty&&r.sameParent(i))&&(yv(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():yk(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},yw=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},yE=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},yT=(e,t,n)=>{if(!n)return!1;let r=dJ(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},yS=h1.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&yx(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&yx(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&yb(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&yb(e,n,r)&&(t=!0)}),t}}}}),yC=RegExp(`^(\\s*)(${yi})([.)])\\s+(.*)$`),yA=RegExp(`^(\\s*)(${yi})([.)])\\s+`),y_=/^\s/,yN=RegExp(`^(${yi})([.)])\\s+(.+)$`),yO="textStyle",yM=/^(\d+)\.\s$/;function yI(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var yD=pu.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let e=yI(n);if(e)return e}let r=e.querySelector("li");if(r){let e=r.getAttribute("style");if(e){let t=yI(e);if(t)return t}}return null}}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,i=uX(this.options.HTMLAttributes,r);return 1!==t&&(i.start=t),n&&"1"!==n&&(i.type=n),["ol",i,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{var n;if("list"!==e.type||!e.ordered)return[];let r=e.start||1,i=e.typeMarker,o=e.items?(n=e.items,n.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>
1230&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})):[],s={};return(1!==r&&(s.start=r),i&&(s.type=i),Object.keys(s).length>0)?{type:"orderedList",attrs:s,content:o}:{type:"orderedList",content:o}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(yA),n=null==t?void 0:t.index;return void 0!==n?n:-1},tokenize:(e,t,n)=>{var r,i;let o=e.split("\n"),[s,a]=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],o=i.match(yC);if(!o)break;let[,s,a,l,c]=o,d=s.length,u=parseInt(a,10),h=isNaN(u)?yc(a):void 0,p=isNaN(u)?yd(a):u,f=[c],m=n+1,g=[i],y=!1;for(;m<e.length;){let t=e[m];if(t.match(yC))break;if(""===t.trim())g.push(t),f.push(""),y=!0,m+=1;else if(t.match(y_)){let e=t.length-t.trimStart().length,n=d+a.length+1;g.push(t),f.push(t.slice(Math.min(e,n))),m+=1}else{if(y)break;g.push(t),f.push(t),m+=1}}t.push({indent:d,number:p,type:h,content:f.join("\n").trim(),contentLines:f,raw:g.join("\n")}),r=m,n=m}return[t,r]}(o);if(0===s.length)return;let l=function e(t,n,r){let i=[],o=0;for(;o<t.length;){let s=t[o];if(s.indent===n){let{paragraphLines:a,blockLines:l}=function(e){let t=[],n=[],r=!1;return e.forEach(e=>{let i;if(r)return void n.push(e);if(""===e.trim()||t.length>0&&(i=e.trimStart(),/^[-+*]\s+/.test(i)||yC.test(i.trimStart())||/^>\s?/.test(i)||/^```/.test(i)||/^~~~/.test(i))){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}(s.contentLines),c=a.join("\n").trim(),d=[];c&&d.push({type:"paragraph",raw:c,tokens:r.inlineTokens(c)});let u=l.join("\n").trim();if(u){let e=r.blockTokens(u);d.push(...e)}let h=o+1,p=[];for(;h<t.length&&t[h].indent>n;)p.push(t[h]),h+=1;if(p.length>0){let t=Math.min(...p.map(e=>e.indent)),n=e(p,t,r);d.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:n,raw:p.map(e=>e.raw).join("\n")})}i.push({type:"list_item",raw:s.raw,tokens:d}),o=h}else o+=1}return i}(s,0,n);if(0!==l.length)return{type:"list",ordered:!0,start:(null==(r=s[0])?void 0:r.number)||1,typeMarker:null==(i=s[0])?void 0:i.type,items:l,raw:o.slice(0,a).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(yO)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins:()=>[new aA({props:{handlePaste:(e,t)=>
123{var n,r;let i=null==(n=t.clipboardData)?void 0:n.getData("text/html");if(null==i?void 0:i.trim())return!1;let o=null==(r=t.clipboardData)?void 0:r.getData("text/plain");if(!o)return!1;let s=function(e){let t=e.split("\n").filter(e=>e.trim().length>0);if(0===t.length)return null;let n=[];for(let e of t){let t=e.trim().match(yN);if(!t)return null;n.push({marker:t[1],content:t[3]})}return!function(e){var t;if(0===e.length)return!1;let n=null!=(t=yc(e[0]))?t:"numeric",r=yd(e[0]);if(r<1)return!1;for(let t=0;t<e.length;t++){let i=function(e,t){if("numeric"===e)return String(t);switch(e){case"a":return yl(t);case"A":return yl(t).toUpperCase();case"i":return yo(t);case"I":return ys(t);default:return String(t)}}(n,r+t);if(e[t]!==i)return!1}return!0}(n.map(e=>e.marker))?null:{type:"orderedList",attrs:function(e){let{type:t,start:n}={type:yc(e),start:yd(e)},r={};return t&&(r.type=t),1!==n&&(r.start=n),r}(n[0].marker),content:n.map(e=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:e.content}]}]}))}}(o);if(!s)return!1;try{let t=e.state.schema.nodeFromJSON(s),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})],addInputRules(){let e=(e,t)=>(!t.attrs.type||"1"===t.attrs.type)&&t.childCount+t.attrs.start===+e[1],t=pc({find:yM,type:this.t
123ype,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=pc({find:yM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(yO)}),joinPredicate:e,editor:this.editor})),[t]}}),yR=/^\s*(\[([( |x])?\])\s$/,yz=pu.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",uX(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.checked)?"x":" ";return hW(e,t,`- [${r}] `)},addExtensions(){return this.options.nested?[yt(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=e=>{var t,n;a.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,a.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};c(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",e=>e.preventDefault()),a.addEventListener("change",t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:i}=t.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==r?void 0:r.attrs,checked:i}),!0}).run(),r.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,i)||(a.checked=!a.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,s),i.append(o,l),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let d=new Set(Object.keys(t));return{dom:i,contentDOM:l,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,c(e);let t=uQ(e,r.extensionManager.attributes),n=new Set(Object.keys(t)),o=this.options.HTMLAttributes;return d.forEach(e=>{n.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(t).forEach(([e,t])=>{null==t?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),d=n,!0}}}}
123,addInputRules(){return[pc({find:yR,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),yL=pu.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",uX(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let r=e=>{let t=hG(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},i=hG(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});h1.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(ye.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(yu.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(yS.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(yD.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(yz.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(yL.configure(this.options.taskList)),e}});var yP=" ",yj=pu.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",uX(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===yP||n[0].text===yP||"Â "===n[0].raw||"Â "===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===yP||"Â "===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";let o=Array.isArray(e.content)?e.content:[];if(0===o.length){let e=Array.isArray(null==(r=null==n?void 0:n.previousNode)?void 0:r.content)?n.previousNode.content:[];return(null==(i=null==n?void 0:n.previousNode)?void 0:i.type)==="paragraph"&&0===e.length?yP:""}return t.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),y$=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,yF=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,yB=hX.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",uX(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}}
123,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ps({find:y$,type:this.type})]},addPasteRules(){return[pp({find:yF,type:this.type})]}}),yH=pu.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),yU=hX.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",uX(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});class yV{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,o=this.editorView.dom,s=o.getBoundingClientRect(),a=s.width/o.offsetWidth,l=s.height/o.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=e?r.bottom:r.top;e&&t&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*l;i={left:r.left,right:r.right,top:o-s,bottom:o+s}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let c=this.editorView.dom.offsetParent;if(!this.element&&(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),c&&(c!=document.body||"static"!=getComputedStyle(c).position)){let n=c.getBoundingClientRect(),r=n.width/c.offsetWidth,i=n.height/c.offsetHeight;e=n.left-c.scrollLeft*r,t=n.top-c.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/a+"px",this.element.style.top=(i.top-t)/l+"px",this.element.style.width=(i.right-i.left)/a+"px",this.element.style.height=(i.bottom-i.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=s4(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class yq extends ac{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return yq.valid(n)?new yq(n):ac.near(n)}content(){return o1.empty}eq(e){return e instanceof yq&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new yq(e.resolve(t.pos))}getBookmark(){return new yG(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||yW(e.type))return!0;
123if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||yW(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){i:for(;;){if(!n&&yq.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(yq.valid(s))return s}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!am.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue i}break}i=o,r+=t;let s=e.doc.resolve(r);if(yq.valid(s))return s}return null}}}yq.prototype.visible=!1,yq.findFrom=yq.findGapCursorFrom,ac.jsonID("gapcursor",yq);class yG{constructor(e){this.pos=e}map(e){return new yG(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return yq.valid(t)?new yq(t):ac.near(t)}}function yW(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let yK=dL({ArrowLeft:yJ("horiz",-1),ArrowRight:yJ("horiz",1),ArrowUp:yJ("vert",-1),ArrowDown:yJ("vert",1)});function yJ(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let o=e.selection,s=t>0?o.$to:o.$from,a=o.empty;if(o instanceof ap){if(!i.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=yq.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new yq(l))),!0)}}function yY(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!yq.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&am.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new yq(r))),!0)}function yX(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof yq))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=oJ.empty;for(let e=r.length-1;e>=0;e--)i=oJ.from(r[e].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new o1(i,0,0));return o.setSelection(ap.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function yQ(e){if(!(e.selection instanceof yq))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",dr.create(e.doc,[de.widget(e.selection.head,t,{key:"gapcursor"})])}var yZ=function(){};yZ.prototype.append=function(e){return e.length?(e=yZ.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},yZ.prototype.prepend=function(e){return e.length?yZ.from(e).append(this):this},yZ.prototype.appendInner=function(e){return new y1(this,e)},yZ.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?yZ.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},yZ.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},yZ.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},yZ.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},yZ.from=function(e){return e instanceof yZ?e:e&&e.length?new y0(e):yZ.empty};var y0=function(e){function t(t){e.call(this),this.values=t}t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(yZ);yZ.empty=new y0([]);var y1=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return t.__proto__=e,t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(yZ);class y2{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(r=(n=this.remapping(s,this.items.length)).maps.length);let a=e.tr,l=[],c=[];
123return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(s,t+1)).maps.length),r--,c.push(e);return}if(n){c.push(new y5(e.map));let t=e.step.map(n.slice(r)),i;t&&a.maybeStep(t).doc&&(i=a.mapping.maps[a.mapping.maps.length-1],l.push(new y5(i,void 0,void 0,l.length+c.length))),r--,i&&n.appendMap(i,r)}else a.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,o=new y2(this.items.slice(0,s).append(c.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:a,selection:i}}addTransform(e,t,n,r){var i,o;let s,a=[],l=this.eventCount,c=this.items,d=!r&&c.length?c.get(c.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),o=new y5(e.mapping.maps[n],i,t),s;(s=d&&d.merge(o))&&(o=s,n?a.pop():c=c.slice(0,c.length-1)),a.push(o),t&&(l++,t=void 0),r||(d=o)}let u=l-n.depth;return u>y4&&(i=c,o=u,i.forEach((e,t)=>{if(e.selection&&0==o--)return s=t,!1}),c=i.slice(s),l-=u),new y2(c.append(a),l)}remapping(e,t){let n=new sP;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new y2(this.items.append(e.map(e=>new y5(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},r);let a=t;this.items.forEach(t=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(a+1,r));c&&s++,n.push(new y5(l,o,c))}else n.push(new y5(l))},r);let l=[];for(let e=t;e<o;e++)l.push(new y5(i.maps[e]));let c=new y2(this.items.slice(0,r).append(l).append(n),s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-n.length)),c}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((o,s)=>{if(s>=e)r.push(o),o.selection&&i++;else if(o.step){let e=o.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=o.selection&&o.selection.map(t.slice(n));a&&i++;let l=new y5(s.invert(),e,a),c,d=r.length-1;(c=r.length&&r[d].merge(l))?r[d]=c:r.push(l)}}else o.map&&n--},this.items.length,0),new y2(yZ.from(r.reverse()),i)}}y2.empty=new y2(yZ.empty,0);class y5{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new y5(t.getMap().invert(),t,this.selection)}}}class y3{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let y4=20;function y6(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function y8(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let y9=!1,y7=null;function be(e){let t=e.plugins;if(y7!=t){y9=!1,y7=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){y9=!0;break}}return y9}let bt=new aO("history"),bn=new aO("closeHistory");function br(e,t){return(n,r)=>{let i=bt.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let o=function(e,t,n){let r=be(t),i=bt.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),l=new y3(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(bt,{redo:n,historyState:l})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}let bi=br(!1,!0),bo=br(!0,!0);br(!1,!1),br(!0,!1),h1.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new aA({key:new aO("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,o=this.options.autoTrim;if(null==i||0===i||!1===o){e=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let t=r.tr.deleteRange(0,s-i);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;
123if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let o=e.selection.$head.pos;return e.deleteRange(o-(i-n),o),!(this.storage.characters({node:e.doc})>n)}})]}});var bs=h1.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new aA({view:t=>new yV(t,e)})}(this.options)]}});h1.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new aA({key:new aO("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return dr.create(e,[]);let s=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;s+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&s-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void o.push(de.node(t,t+e.nodeSize,{class:this.options.className})))),dr.create(e,o)}}})]}});var ba=h1.create({name:"gapCursor",addProseMirrorPlugins:()=>[new aA({props:{decorations:yQ,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&yq.valid(n)?new yq(n):null,handleClick:yY,handleKeyDown:yK,handleDOMEvents:{beforeinput
123:yX}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=uW(uU(e,"allowGapCursor",n)))?t:null}}}),bl="placeholder",bc=new aO("tiptap__placeholder");function bd(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:o,isEmptyDoc:s,hasAnchor:a,classes:{emptyNode:l,emptyEditor:c}}=e,d=[l];return s&&d.push(c),de.node(i,i+o.nodeSize,{class:d.join(" "),[r]:"function"==typeof n?n({editor:t,node:o,pos:i,hasAnchor:a}):n})}function bu(e,t){return"function"==typeof e?e(t):e}var bh={init:()=>({topPos:null,bottomPos:null}),apply(e,t){let n=e.getMeta(bc);return(null==n?void 0:n.positions)?{topPos:n.positions.top,bottomPos:n.positions.bottom}:e.docChanged?{topPos:null!==t.topPos?e.mapping.map(t.topPos):null,bottomPos:null!==t.bottomPos?e.mapping.map(t.bottomPos):null}:t}};function bp(e){let t=function(e){let t=e;for(;t;){if(function(e){let t=getComputedStyle(e),n=`${t.overflow} ${t.overflowY} ${t.overflowX}`;return/auto|scroll|overlay/.test(n)}(t))return t;let e=t.parentElement;if(!e){let e=t.getRootNode();if(e instanceof ShadowRoot){t=e.host;continue}break}t=e}return window}(e.dom),n=()=>{let n=function({view:e,scrollContainer:t}){let n=e.dom.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;let r=t?t===window?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect():{top:0,bottom:window.innerHeight},i=Math.max(n.top,r.top)-200,o=Math.min(n.bottom,r.bottom)+200;if(i>=o)return null;let s=n.left+1,a=n.right-1;if(s>a)return null;let l=Math.min(Math.max("rtl"===getComputedStyle(e.dom).direction?n.right-2:n.left+2,s),a),c=Math.max(i+2,n.top+1),d=Math.min(o-2,n.bottom-1);if(c>d)return null;let u=e.posAtCoords({left:l,top:c}),h=e.posAtCoords({left:l,top:d});return u&&h?{top:u.pos,bottom:h.pos}:null}({view:e,scrollContainer:t});if(null===n)return;let r=bc.getState(e.state);if((null==r?void 0:r.topPos)===n.top&&(null==r?void 0:r.bottomPos)===n.bottom)return;let i=e.state.tr.setMeta(bc,{positions:n});e.dispatch(i)},r=null,i=0,o=()=>{null===r&&(r=requestAnimationFrame(()=>{r=null;let e=performance.now();e-i>=150?(i=e,n()):o()}))};t.addEventListener("scroll",o,{passive:!0});let s="u">typeof ResizeObserver?new ResizeObserver(o):null;null==s||s.observe(e.dom);let a="u">typeof IntersectionObserver?new IntersectionObserver(o):null;return null==a||a.observe(e.dom),e.dom.addEventListener("focus",o),n(),{update(t,n){e.state.doc.content.size!==n.doc.content.size&&o()},destroy:()=>{null!==r&&cancelAnimationFrame(r),t.removeEventListener("scroll",o),null==s||s.disconnect(),null==a||a.disconnect(),e.dom.removeEventListener("focus",o)}}}var bf=h1.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:bl,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:e,options:t}){let n=t.dataAttribute?`data-${t.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${bl}`;return new aA({key:bc,state:bh,view:bp,props:{decorations:({doc:r,selection:i})=>(function({editor:e,options:t,dataAttribute:n,doc:r,selection:i}){var o,s;if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:a}=i,l=[],c=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let i=r.resolve(a),o=i.depth>0?i.node(1):i.nodeAfter,s=i.depth>0?i.before(1):a;if(o&&o.type.isTextblock&&hs(o)){let r=a>=s&&a<=s+o.nodeSize;l.push(bd({editor:e,isEmptyDoc:c,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:bu(t.emptyNodeClass,{editor:e,node:o,pos:s,hasAnchor:r})},node:o,pos:s}))}}else{let i=bc.getState(e.state),d=null!=(o=null==i?void 0:i.topPos)?o:0,u=null!=(s=null==i?void 0:i.bottomPos)?s:r.content.size;r.nodesBetween(d,u,(r,i)=>{let o=a>=i&&a<=i+r.nodeSize,s=!r.isLeaf&&hs(r);return r.type.isTextblock&&(o||!t.showOnlyCurrent)&&s&&l.push(bd({editor:e,isEmptyDoc:c,dataAttribute:n,hasAnchor:o,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:bu(t.emptyNodeClass,{editor:e,node:r,pos:i,hasAnchor:o})},node:r,pos:i})),t.includeChildren})}return dr.create(r,l)})({editor:e,options:t,dataAttribute:n,doc:r,selection:i})}})}({editor:this.editor,options:this.options})]}}),bm=`.ProseMirror:not(.ProseMirror-focused) *::selection { 124 background: transparent; 125} 126 127.ProseMirror:not(.ProseMirror-focused) *::-moz-selection { 128 background: transparent; 129}`;function bg({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}h1.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return e.options.injectCSS&&"u">typeof document&&hP(bm,e.options.injectNonce,"selection"),[new aA({key:new aO("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||ha(n.selection)||e.view.dragging?null:dr.create(n.doc,[de.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var by=h1.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new aO(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new aA({key:t,appendTransaction:(e,r,i)=>{let{doc:o,tr:s,schema:a}=i,l=t.getState(i),c=o.content.size,d=a.nodes[n];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&l)return s.insert(c,d.create())},state:{init:(e,t)=>
129!bg({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!bg({node:e.doc.lastChild,types:r})}})]}}),bb=h1.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>bi(e,t),redo:()=>({state:e,dispatch:t})=>bo(e,t)}),addProseMirrorPlugins(){return[function(e={}){return new aA({key:bt,state:{init:()=>new y3(y2.empty,y2.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(bt),o;if(i)return i.historyState;n.getMeta(bn)&&(e=new y3(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(bt))if(s.getMeta(bt).redo)return new y3(e.done.addTransform(n,void 0,r,be(t)),e.undone,y6(n.mapping.maps),e.prevTime,e.prevComposition);else return new y3(e.done,e.undone.addTransform(n,void 0,r,be(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(o=n.getMeta("rebased"))return new y3(e.done.rebased(n,o),e.undone.rebased(n,o),y8(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new y3(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),y8(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),a=s?y8(e.prevRanges,n.mapping):y6(n.mapping.maps);return new y3(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,be(t)),y2.empty,a,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?bi:"historyRedo"==n?bo:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),bv=h1.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(pw.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(g1.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(ye.configure(this.options.bulletList)),!1!==this.options.code&&i.push(g3.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(pg.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(g4.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(bs.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(ba.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(p_.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(pN.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(bb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(g6.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(pA.configure(this.options.italic)),!1!==this.options.listItem&&i.push(yu.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(yS.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(f9.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(yD.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(yj.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(yB.c
129onfigure(this.options.strike)),!1!==this.options.text&&i.push(yH.configure(this.options.text)),!1!==this.options.underline&&i.push(yU.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(by.configure(null==(r=this.options)?void 0:r.trailingNode)),i}}),bk=/(^|[^`])`([^`]+)`(?!`)$/,bx=/(^|[^`])`([^`]+)`(?!`)/g,bw=hX.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",uX(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ps({find:bk,type:this.t
129ype})]},addPasteRules(){return[pp({find:bx,type:this.type})]}});function bE(){}class bT{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function bS(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new bT(n,r,t)}function bC(e){return e.toLowerCase()}bT.prototype.normal={},bT.prototype.property={},bT.prototype.space=void 0;class bA{constructor(e,t){this.attribute=t,this.property=e}}bA.prototype.attribute="",bA.prototype.booleanish=!1,bA.prototype.boolean=!1,bA.prototype.commaOrSpaceSeparated=!1,bA.prototype.commaSeparated=!1,bA.prototype.defined=!1,bA.prototype.mustUseProperty=!1,bA.prototype.number=!1,bA.prototype.overloadedBoolean=!1,bA.prototype.property="",bA.prototype.spaceSeparated=!1,bA.prototype.space=void 0;let b_=0,bN=bL(),bO=bL(),bM=bL(),bI=bL(),bD=bL(),bR=bL(),bz=bL();function bL(){return 2**++b_}e.s(["boolean",0,bN,"booleanish",0,bO,"commaOrSpaceSeparated",0,bz,"commaSeparated",0,bR,"number",0,bI,"overloadedBoolean",0,bM,"spaceSeparated",0,bD],383954);var bP=e.i(383954);let bj=Object.keys(bP);class b$ extends bA{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<bj.length;){const e=bj[i];!function(e,t,n){n&&(e[t]=n)}(this,bj[i],(n&bP[e])===bP[e])}}}function bF(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let o=new b$(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[bC(r)]=r,n[bC(o.attribute)]=r}return new bT(t,n,e.space)}b$.prototype.defined=!0;let bB=bF({properties:{ariaActiveDescendant:null,ariaAtomic:bO,ariaAutoComplete:null,ariaBusy:bO,ariaChecked:bO,ariaColCount:bI,ariaColIndex:bI,ariaColSpan:bI,ariaControls:bD,ariaCurrent:null,ariaDescribedBy:bD,ariaDetails:null,ariaDisabled:bO,ariaDropEffect:bD,ariaErrorMessage:null,ariaExpanded:bO,ariaFlowTo:bD,ariaGrabbed:bO,ariaHasPopup:null,ariaHidden:bO,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bD,ariaLevel:bI,ariaLive:null,ariaModal:bO,ariaMultiLine:bO,ariaMultiSelectable:bO,ariaOrientation:null,ariaOwns:bD,ariaPlaceholder:null,ariaPosInSet:bI,ariaPressed:bO,ariaReadOnly:bO,ariaRelevant:null,ariaRequired:bO,ariaRoleDescription:bD,ariaRowCount:bI,ariaRowIndex:bI,ariaRowSpan:bI,ariaSelected:bO,ariaSetSize:bI,ariaSort:null,ariaValueMax:bI,ariaValueMin:bI,ariaValueNow:bI,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function bH(e,t){return t in e?e[t]:t}function bU(e,t){return bH(e,t.toLowerCase())}let bV=bF({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bR,acceptCharset:bD,accessKey:bD,action:null,allow:null,allowFullScreen:bN,allowPaymentRequest:bN,allowUserMedia:bN,alt:null,as:null,async:bN,autoCapitalize:null,autoComplete:bD,autoFocus:bN,autoPlay:bN,blocking:bD,capture:null,charSet:null,checked:bN,cite:null,className:bD,cols:bI,colSpan:null,content:null,contentEditable:bO,controls:bN,controlsList:bD,coords:bI|bR,crossOrigin:null,data:null,dateTime:null,decoding:null,default:bN,defer:bN,dir:null,dirName:null,disabled:bN,download:bM,draggable:bO,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:bN,formTarget:null,headers:bD,height:bI,hidden:bM,high:bI,href:null,hrefLang:null,htmlFor:bD,httpEquiv:bD,id:null,imageSizes:null,imageSrcSet:null,inert:bN,inputMode:null,integrity:null,is:null,isMap:bN,itemId:null,itemProp:bD,itemRef:bD,itemScope:bN,itemType:bD,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:bN,low:bI,manifest:null,max:null,maxLength:bI,media:null,method:null,min:null,minLength:bI,multiple:bN,muted:bN,name:null,nonce:null,noModule:bN,noValidate:bN,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:bN,optimum:bI,pattern:null,ping:bD,placeholder:null,playsInl
129ine:bN,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:bN,referrerPolicy:null,rel:bD,required:bN,reversed:bN,rows:bI,rowSpan:bI,sandbox:bD,scope:null,scoped:bN,seamless:bN,selected:bN,shadowRootClonable:bN,shadowRootDelegatesFocus:bN,shadowRootMode:null,shape:null,size:bI,sizes:null,slot:null,span:bI,spellCheck:bO,src:null,srcDoc:null,srcLang:null,srcSet:null,start:bI,step:null,style:null,tabIndex:bI,target:null,title:null,translate:null,type:null,typeMustMatch:bN,useMap:null,value:bO,width:bI,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bD,axis:null,background:null,bgColor:null,border:bI,borderColor:null,bottomMargin:bI,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:bN,declare:bN,event:null,face:null,frame:null,frameBorder:null,hSpace:bI,leftMargin:bI,link:null,longDesc:null,lowSrc:null,marginHeight:bI,marginWidth:bI,noResize:bN,noHref:bN,noShade:bN,noWrap:bN,object:null,profile:null,prompt:null,rev:null,rightMargin:bI,rules:null,scheme:null,scrolling:bO,standby:null,summary:null,text:null,topMargin:bI,valueType:null,version:null,vAlign:null,vLink:null,vSpace:bI,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:bN,disableRemotePlayback:bN,prefix:null,property:null,results:bI,security:null,unselectable:null},space:"html",transform:bU}),bq=bF({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
129-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:bz,accentHeight:bI,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:bI,amplitude:bI,arabicForm:null,ascent:bI,attributeName:null,attributeType:null,azimuth:bI,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:bI,by:null,calcMode:null,capHeight:bI,className:bD,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:bI,diffuseConstant:bI,direction:null,display:null,dur:null,divisor:bI,dominantBaseline:null,download:bN,dx:null,dy:null,edgeMode:null,editable:null,elevation:bI,enableBackground:null,end:null,event:null,exponent:bI,externalResourcesRequired:null,fill:null,fillOpacity:bI,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bR,g2:bR,glyphName:bR,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:bI,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:bI,horizOriginX:bI,horizOriginY:bI,id:null,ideographic:bI,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:bI,k:bI,k1:bI,k2:bI,k3:bI,k4:bI,kernelMatrix:bz,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:bI,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:bI,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
129Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:bI,overlineThickness:bI,paintOrder:null,panose1:null,path:null,pathLength:bI,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bD,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:bI,pointsAtY:bI,pointsAtZ:bI,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bz,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bz,rev:bz,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bz,requiredFeatures:bz,requiredFonts:bz,requiredFormats:bz,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:bI,specularExponent:bI,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:bI,strikethroughThickness:bI,string:null,stroke:null,strokeDashArray:bz,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:bI,strokeOpacity:bI,strokeWidth:null,style:null,surfaceScale:bI,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bz,tabIndex:bI,tableValues:null,target:null,targetX:bI,targetY:bI,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bz,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:bI,underlineThickness:bI,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:bI,values:null,vAlphabetic:bI,vMathematical:bI,vectorEffect:null,vHanging:bI,vIdeographic:bI,version:null,vertAdvY:bI,vertOriginX:bI,vertOriginY:bI,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:bI,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bH}),bG=bF({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),bW=bF({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bU}),bK=bF({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),bJ=bS([bB,bV,bG,bW,bK],"html"),bY=bS([bB,bq,bG,bW,bK],"svg");function bX(e){let t=[],n=String(e||""),r=n.indexOf(","),i=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);let e=n.slice(i,r).trim();(e||!o)&&t.push(e),i=r+1,r=n.indexOf(",",i)}return t}let bQ=/[#.]/g,bZ=/[A-Z]/g,b0=/-[a-z]/g,b1=/^data[-\w.:]+$/i;function b2(e,t){let n=bC(t),r=t,i=bA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&b1.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(b0,b3);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!b0.test(e)){let n=e.replace(bZ,b5);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=b$}return new i(r,t)}function b5(e){return"-"+e.toLowerCase()}function b3(e){return e.charAt(1).toUpperCase()}function b4(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function b6(e,t,n){let r=n?function(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...o){let s;if(null==n)s={type:"root",children:[]},o.unshift(i);else{let a=(s=function(e,t){let n,r,i=e||"",o={},s=0;for(;s<i.length;){bQ.lastIndex=s;let e=bQ.exec(i),t=i.slice(s,e?e.index:i.length);t&&(n?"#"===n?o.id=t:Array.isArray(o.className)?o.className.push(t):o.className=[t]:r=t,s+=t.length),e&&(n=e[0],s++)}return{type:"element",tagName:r||t||"div",properties:o,children:[]}}(n,t)).tagName.toLowerCase(),l=r?r.get(a):void 0;if(s.tagName=l||a,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;for(let t of Object.keys(e)){let n=e[t];if(n&&"object"==typeof n){if(!Array.isArray(n))return!0;for(let e of n)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!!("children"in e&&Array.isArray(e.children))}(i))o.unshift(i);else for(let[t,n]of Object.entries(i))!function(e,t,n,r){let i,o=b2(e,n);if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?o.spaceSeparated?b4(r):o.commaSeparated?bX(r):o.commaOrSpaceSeparated?b4(bX(r).join(" ")):b8(o,o.property,r):Array.isArray(r)?[...r]:"style"===o.property?function(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(i)){let e=[];for(let t of i)e.push(b8(o,o.property,t));i=e}"className"===o.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}(e,s.properties,t,n)}for(let e of o)!function e(t,n){if(null==n);else if("number"==typeof n||"string"==typeof n)t.push({type:"text",value:String(n)});else if(Array.isArray(n))for(let r of n)e(t,r);else if("object"==typeof n&&"type"in n)"root"===n.type?e(t,n.children):t.push(n);else throw Error("Expected node, nodes, or string, got `"+n+"`")}(s.children,e);return"element"===s.type&&"template"===s.tagName&&(s.content={type:"root",children:s.children},s.children=[]),s}}function b8(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||bC(n)===bC(t)))return!0}return n}let b9=b6(bJ,"div"),b7=b6(bY,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function ve(e,t){let n=e.indexOf("\r",t),r=e.indexOf("\n",t);return -1===r?n:-1===n||n+1===r?r:n<r?n:r}let vt={}.hasOwnProperty,vn=Object.prototype;function vr(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},vo(e,t,n),n;case"#document":case"#document-fragment":{let r="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(n={type:"root",children:vi(e,t.childNodes),data:{quirksMode:r}},e.file&&e.location){let t,r,i=String(e.file),o=(t=String(i),r=[],{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;r.length<e.line;){let e=r[r.length-1],n=ve(t,e),i=-1===n?t.length+1:n+1;if(e===i)break;r.push(i)}let n=(e.line>1?r[e.line-2]:0)+e.column-1;if(n<r[e.line-1])return n}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let n=0;for(;;){let i=r[n];if(void 0===i){let e=ve(t,r[n-1]);i=-1===e?t.length+1:e+1,r[n]=i}if(i>e)return{line:n+1,column:e-(n>0?r[n-1]:0)+1,offset:e};n++}}}}),s=o.toPoint(0),a=o.toPoint(i.length);bE(),bE(),n.position={start:s,end:a}}return n}case"#documentType":return vo(e,t,n={type:"doctype"}),n;case"#text":return n={type:"text",value:t.value},vo(e,t,n),n;
129default:return function(e,t){let n=e.schema;e.schema="http://www.w3.org/2000/svg"===t.namespaceURI?bY:bJ;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;vt.call(vn,n)||(i[n]=e.value)}let o=("svg"===e.schema.space?b7:b9)(t.tagName,i,vi(e,t.childNodes));if(vo(e,t,o),"template"===o.tagName){let n=t.sourceCodeLocation,r=n&&n.startTag&&vs(n.startTag),i=n&&n.endTag&&vs(n.endTag),s=vr(e,t.content);r&&i&&e.file&&(s.position={start:r.end,end:i.start}),o.content=s}return e.schema=n,o}(e,t)}}function vi(e,t){let n=-1,r=[];for(;++n<t.length;){let i=vr(e,t[n]);r.push(i)}return r}function vo(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let r=function(e,t,n){let r=vs(n);if("element"===t.type){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r,i={};if(n.attrs)for(r in n.attrs)vt.call(n.attrs,r)&&(i[b2(e.schema,r).property]=vs(n.attrs[r]));bE(n.startTag);let o=vs(n.startTag),s=n.endTag?vs(n.endTag):void 0,a={opening:o};s&&(a.closing=s),a.properties=i,t.data={position:a}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vs(e){let t=va({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=va({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function va(e){return e.line&&e.column?e:void 0}let vl=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);(m=D||(D={}))[m.EOF=-1]="EOF",m[m.NULL=0]="NULL",m[m.TABULATION=9]="TABULATION",m[m.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",m[m.LINE_FEED=10]="LINE_FEED",m[m.FORM_FEED=12]="FORM_FEED",m[m.SPACE=32]="SPACE",m[m.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",m[m.QUOTATION_MARK=34]="QUOTATION_MARK",m[m.AMPERSAND=38]="AMPERSAND",m[m.APOSTROPHE=39]="APOSTROPHE",m[m.HYPHEN_MINUS=45]="HYPHEN_MINUS",m[m.SOLIDUS=47]="SOLIDUS",m[m.DIGIT_0=48]="DIGIT_0",m[m.DIGIT_9=57]="DIGIT_9",m[m.SEMICOLON=59]="SEMICOLON",m[m.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",m[m.EQUALS_SIGN=61]="EQUALS_SIGN",m[m.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",m[m.QUESTION_MARK=63]="QUESTION_MARK",m[m.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",m[m.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",m[m.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",m[m.GRAVE_ACCENT=96]="GRAVE_ACCENT",m[m.LATIN_SMALL_A=97]="LATIN_SMALL_A",m[m.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";let vc="[CDATA[",vd="doctype",vu="script";function vh(e){return e>=55296&&e<=57343}function vp(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function vf(e){return e>=64976&&e<=65007||vl.has(e)}(g=R||(R={})).controlCharacterInInputStream="control-character-in-input-stream",g.noncharacterInInputStream="noncharacter-in-input-stream",g.surrogateInInputStream="surrogate-in-input-stream",g.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",g.endTagWithAttributes="end-tag-with-attributes",g.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",g.unexpectedSolidusInTag="unexpected-solidus-in-tag",g.unexpectedNullCharacter="unexpected-null-character",g.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",g.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",g.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",g.missingEndTagName="missing-end-tag-name",g.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",g.unknownNamedCharacterReference="unknown-named-character-reference",g.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",g.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",g.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",g.eofBeforeTagName="eof-before-tag-name",g.eofInTag="eof-in-tag",g.missingAttributeValue="missing-attribute-value",g.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",g.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",g.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",g.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",g.missingQuoteBeforeDoctype
129SystemIdentifier="missing-quote-before-doctype-system-identifier",g.missingDoctypePublicIdentifier="missing-doctype-public-identifier",g.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",g.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",g.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",g.cdataInHtmlContent="cdata-in-html-content",g.incorrectlyOpenedComment="incorrectly-opened-comment",g.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",g.eofInDoctype="eof-in-doctype",g.nestedComment="nested-comment",g.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",g.eofInComment="eof-in-comment",g.incorrectlyClosedComment="incorrectly-closed-comment",g.eofInCdata="eof-in-cdata",g.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",g.nullCharacterReference="null-character-reference",g.surrogateCharacterReference="surrogate-character-reference",g.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",g.controlCharacterReference="control-character-reference",g.noncharacterCharacterReference="noncharacter-character-reference",g.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",g.missingDoctypeName="missing-doctype-name",g.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",g.duplicateAttribute="duplicate-attribute",g.nonConformingDoctype="non-conforming-doctype",g.missingDoctype="missing-doctype",g.misplacedDoctype="misplaced-doctype",g.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",g.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",g.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",g.openElementsLeftAfterEof="open-elements-left-after-eof",g.abandonedHeadElementChild="abandoned-head-element-child",g.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",g.nestedNoscriptInHead="nested-noscript-in-head",g.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class vm{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,o=r+t,s=i+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(t>=56320&&t<=57343)return this.pos++,this._addGap(),(e-55296)*1024+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(R.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let n=this.html.charCodeAt(t);return n===D.CARRIAGE_RETURN?D.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let e=this.html.charCodeAt(this.pos);return e===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):e===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vh(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===D.LINE_FEED||e===D.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){vp(e)?this._err(R.controlCharacterInInputStream):vf(e)&&this._err(R.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function vg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(y=z||(z={}))[y.CHARACTER=0]="CHARACTER",y[y.NULL_CHARACTER=1]="NULL_CHARACTER",y[y.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",y[y.START_TAG=3]="START_TAG",y[y.END_TAG=4]="END_TAG",y[y.COMMENT=5]="COMMENT",y[y.DOCTYPE=6]="DOCTYPE",y[y.EOF=7]="EOF",y[y.HIBERNATION=8]="HIBERNATION";let vy
vendor: 26,688 bytes, line 129
129=new Uint16Array('áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ'.split("").map(e=>e.charCodeAt(0))),
129vb=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function vv(e){return e>=P.ZERO&&e<=P.NINE}L=String.fromCodePoint,(b=P||(P={}))[b.NUM=35]="NUM",b[b.SEMI=59]="SEMI",b[b.EQUALS=61]="EQUALS",b[b.ZERO=48]="ZERO",b[b.NINE=57]="NINE",b[b.LOWER_A=97]="LOWER_A",b[b.LOWER_F=102]="LOWER_F",b[b.LOWER_X=120]="LOWER_X",b[b.LOWER_Z=122]="LOWER_Z",b[b.UPPER_A=65]="UPPER_A",b[b.UPPER_F=70]="UPPER_F",b[b.UPPER_Z=90]="UPPER_Z",(v=j||(j={}))[v.VALUE_LENGTH=49152]="VALUE_LENGTH",v[v.BRANCH_LENGTH=16256]="BRANCH_LENGTH",v[v.JUMP_TABLE=127]="JUMP_TABLE",(k=$||($={}))[k.EntityStart=0]="EntityStart",k[k.NumericStart=1]="NumericStart",k[k.NumericDecimal=2]="NumericDecimal",k[k.NumericHex=3]="NumericHex",k[k.NamedEntity=4]="NamedEntity",(x=F||(F={}))[x.Legacy=0]="Legacy",x[x.Strict=1]="Strict",x[x.Attribute=2]="Attribute";class vk{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=$.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=F.Strict}startEntity(e){this.decodeMode=e,this.state=$.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case $.EntityStart:if(e.charCodeAt(t)===P.NUM)return this.state=$.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=$.NamedEntity,this.stateNamedEntity(e,t);case $.NumericStart:return this.stateNumericStart(e,t);case $.NumericDecimal:return this.stateNumericDecimal(e,t);case $.NumericHex:return this.stateNumericHex(e,t);case $.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===P.LOWER_X?(this.state=$.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=$.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!vv(i)&&(!((r=i)>=P.UPPER_A)||!(r<=P.UPPER_F))&&(!(r>=P.LOWER_A)||!(r<=P.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!vv(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n,r,i;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===P.SEMI)this.consumed+=1;else if(this.decodeMode===F.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=vb.get(r))?i:r,this.consumed),this.errors&&(e!==P.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&j.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let o=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let i=(t&j.BRANCH_LENGTH)>>7,o=t&j.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){let t=r-o;return t<0||t>=i?-1:e[n+t]-1}let s=n,a=s+i-1;for(;s<=a;){let t=s+a>>>1,n=e[t];if(n<r)s=t+1;else{if(!(n>r))return e[t+i];a=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===F.Attribute&&(0===i||function(e){var t;return e===P.EQUALS||(t=e)>=P.UPPER_A&&t<=P.UPPER_Z||t>=P.LOWER_A&&t<=P.LOWER_Z||vv(t)}
129(o))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&j.VALUE_LENGTH)>>14)){if(o===P.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==F.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&j.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~j.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case $.NamedEntity:return 0!==this.result&&(this.decodeMode!==F.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $.NumericDecimal:return this.emitNumericEntity(0,2);case $.NumericHex:return this.emitNumericEntity(0,3);case $.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $.EntityStart:return 0}}}(w=B||(B={})).HTML="http://www.w3.org/1999/xhtml",w.MATHML="http://www.w3.org/1998/Math/MathML",w.SVG="http://www.w3.org/2000/svg",w.XLINK="http://www.w3.org/1999/xlink",w.XML="http://www.w3.org/XML/1998/namespace",w.XMLNS="http://www.w3.org/2000/xmlns/",(E=H||(H={})).TYPE="type",E.ACTION="action",E.ENCODING="encoding",E.PROMPT="prompt",E.NAME="name",E.COLOR="color",E.FACE="face",E.SIZE="size",(T=U||(U={})).NO_QUIRKS="no-quirks",T.QUIRKS="quirks",T.LIMITED_QUIRKS="limited-quirks",(S=V||(V={})).A="a",S.ADDRESS="address",S.ANNOTATION_XML="annotation-xml",S.APPLET="applet",S.AREA="area",S.ARTICLE="article",S.ASIDE="aside",S.B="b",S.BASE="base",S.BASEFONT="basefont",S.BGSOUND="bgsound",S.BIG="big",S.BLOCKQUOTE="blockquote",S.BODY="body",S.BR="br",S.BUTTON="button",S.CAPTION="caption",S.CENTER="center",S.CODE="code",S.COL="col",S.COLGROUP="colgroup",S.DD="dd",S.DESC="desc",S.DETAILS="details",S.DIALOG="dialog",S.DIR="dir",S.DIV="div",S.DL="dl",S.DT="dt",S.EM="em",S.EMBED="embed",S.FIELDSET="fieldset",S.FIGCAPTION="figcaption",S.FIGURE="figure",S.FONT="font",S.FOOTER="footer",S.FOREIGN_OBJECT="foreignObject",S.FORM="form",S.FRAME="frame",S.FRAMESET="frameset",S.H1="h1",S.H2="h2",S.H3="h3",S.H4="h4",S.H5="h5",S.H6="h6",S.HEAD="head",S.HEADER="header",S.HGROUP="hgroup",S.HR="hr",S.HTML="html",S.I="i",S.IMG="img",S.IMAGE="image",S.INPUT="input",S.IFRAME="iframe",S.KEYGEN="keygen",S.LABEL="label",S.LI="li",S.LINK="link",S.LISTING="listing",S.MAIN="main",S.MALIGNMARK="malignmark",S.MARQUEE="marquee",S.MATH="math",S.MENU="menu",S.META="meta",S.MGLYPH="mglyph",S.MI="mi",S.MO="mo",S.MN="mn",S.MS="ms",S.MTEXT="mtext",S.NAV="nav",S.NOBR="nobr",S.NOFRAMES="noframes",S.NOEMBED="noembed",S.NOSCRIPT="noscript",S.OBJECT="object",S.OL="ol",S.OPTGROUP="optgroup",S.OPTION="option",S.P="p",S.PARAM="param",S.PLAINTEXT="plaintext",S.PRE="pre",S.RB="rb",S.RP="rp",S.RT="rt",S.RTC="rtc",S.RUBY="ruby",S.S="s",S.SCRIPT="script",S.SEARCH="search",S.SECTION="section",S.SELECT="select",S.SOURCE="source",S.SMALL="small",S.SPAN="span",S.STRIKE="strike",S.STRONG="strong",S.STYLE="style",S.SUB="sub",S.SUMMARY="summary",S.SUP="sup",S.TABLE="table",S.TBODY="tbody",S.TEMPLATE="template",S.TEXTAREA="textarea",S.TFOOT="tfoot",S.TD="td",S.TH="th",S.THEAD="thead",S.TITLE="title",S.TR="tr",S.TRACK="track",S.TT="tt",S.U="u",S.UL="ul",S.SVG="svg",S.VAR="var",S.WBR="wbr",S.XMP="xmp",(C=q||(q={}))[C.UNKNOWN=0]="UNKNOWN",C[C.A=1]="A",C[C.ADDRESS=2]="ADDRESS",C[C.ANNOTATION_XML=3]="ANNOTATION_XML",C[C.APPLET=4]="APPLET",C[C.AREA=5]="AREA",C[C.ARTICLE=6]="ARTICLE",C[C.ASIDE=7]="ASIDE",C[C.B=8]="B",C[C.BASE=9]="BASE",C[C.BASEFONT=10]="BASEFONT",C[C.BGSOUND=11]="BGSOUND",C[C.BIG=12]="BIG",C[C.BLOCKQUOTE=13]="BLOCKQUOTE",C[C.BODY=14]="BODY",C[C.BR=15]="BR",C[C.BUTTON=16]="BUTTON",C[C.CAPTION=17]="CAPTION",C[C.CENTER=18]="CENTER",C[C.CODE=19]="CODE",C[C.COL=20]="COL",C[C.COLGROUP=21]="COLGROUP",C[C.DD=22]="DD",C[C.DESC=23]="DESC",C[C.DETAILS=24]="DETAILS",C[C.DIALOG=25]="DIALOG",C[C.DIR=26]="DIR",C[C.DIV=27]="DIV",C[C.DL=28]="DL",C[C.DT=29]="DT",C[C.EM=30]="EM",C[C.EMBED=31]="EMBED",C[C.FIELDSET=32]="FIELDSET",C[C.FIGCAPTION=33]="FIGCAPTION",C[C.FIGURE=34]="FIGURE",C[C.FONT=35]="FONT",C[C.FOOTER=36]="FOOTER",C[C.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",C[C.FORM=38]="FORM",C[C.FRAME=39]="FRAME",C[C.FRAMESET=40]="FRAMESET",C[C.H1=41]="H1",C[C.H2=42]="H2",C[C.H3=43]="H3",C[C.H4=44]="H4",C[C.H5=45]="H5",C[C.H6=46]="H6",C[C.HEAD=47]="HEAD",C[C.HEADER=48]="HEADER",C[C.HGROUP=49]="HGROUP",C[C.HR=50]="HR",C[C.HTML=51]="HTML",C[C.I=52]="I",C[C.IMG=53]="IMG",C[C.IMAGE=54]="IMAGE",C[C.INPUT=55]="INPUT",C[C.IFRAME=56]="IFRAME",C[C.KEYGEN=57]="KEYGEN",C[C.LABEL=58]="LABEL",C[C.LI=59]="LI",C[C.LINK=60]="LINK",C[C.LISTING=61]="LISTING",C[C.MAIN=62]="MAIN",C[C.MALIGNMARK=63]="MALIGNMARK",C[C.MARQUEE=64]="MARQUEE",C[C.MATH=65]="MATH",C[C.MENU=66]="MENU",C[C.META=67]="META",C[C.MGLYPH=68]="MGLYPH",C[C.MI=69]="MI",C[C.MO=70]="MO",C[C.MN=
12971]="MN",C[C.MS=72]="MS",C[C.MTEXT=73]="MTEXT",C[C.NAV=74]="NAV",C[C.NOBR=75]="NOBR",C[C.NOFRAMES=76]="NOFRAMES",C[C.NOEMBED=77]="NOEMBED",C[C.NOSCRIPT=78]="NOSCRIPT",C[C.OBJECT=79]="OBJECT",C[C.OL=80]="OL",C[C.OPTGROUP=81]="OPTGROUP",C[C.OPTION=82]="OPTION",C[C.P=83]="P",C[C.PARAM=84]="PARAM",C[C.PLAINTEXT=85]="PLAINTEXT",C[C.PRE=86]="PRE",C[C.RB=87]="RB",C[C.RP=88]="RP",C[C.RT=89]="RT",C[C.RTC=90]="RTC",C[C.RUBY=91]="RUBY",C[C.S=92]="S",C[C.SCRIPT=93]="SCRIPT",C[C.SEARCH=94]="SEARCH",C[C.SECTION=95]="SECTION",C[C.SELECT=96]="SELECT",C[C.SOURCE=97]="SOURCE",C[C.SMALL=98]="SMALL",C[C.SPAN=99]="SPAN",C[C.STRIKE=100]="STRIKE",C[C.STRONG=101]="STRONG",C[C.STYLE=102]="STYLE",C[C.SUB=103]="SUB",C[C.SUMMARY=104]="SUMMARY",C[C.SUP=105]="SUP",C[C.TABLE=106]="TABLE",C[C.TBODY=107]="TBODY",C[C.TEMPLATE=108]="TEMPLATE",C[C.TEXTAREA=109]="TEXTAREA",C[C.TFOOT=110]="TFOOT",C[C.TD=111]="TD",C[C.TH=112]="TH",C[C.THEAD=113]="THEAD",C[C.TITLE=114]="TITLE",C[C.TR=115]="TR",C[C.TRACK=116]="TRACK",C[C.TT=117]="TT",C[C.U=118]="U",C[C.UL=119]="UL",C[C.SVG=120]="SVG",C[C.VAR=121]="VAR",C[C.WBR=122]="WBR",C[C.XMP=123]="XMP";let vx=new Map([[V.A,q.A],[V.ADDRESS,q.ADDRESS],[V.ANNOTATION_XML,q.ANNOTATION_XML],[V.APPLET,q.APPLET],[V.AREA,q.AREA],[V.ARTICLE,q.ARTICLE],[V.ASIDE,q.ASIDE],[V.B,q.B],[V.BASE,q.BASE],[V.BASEFONT,q.BASEFONT],[V.BGSOUND,q.BGSOUND],[V.BIG,q.BIG],[V.BLOCKQUOTE,q.BLOCKQUOTE],[V.BODY,q.BODY],[V.BR,q.BR],[V.BUTTON,q.BUTTON],[V.CAPTION,q.CAPTION],[V.CENTER,q.CENTER],[V.CODE,q.CODE],[V.COL,q.COL],[V.COLGROUP,q.COLGROUP],[V.DD,q.DD],[V.DESC,q.DESC],[V.DETAILS,q.DETAILS],[V.DIALOG,q.DIALOG],[V.DIR,q.DIR],[V.DIV,q.DIV],[V.DL,q.DL],[V.DT,q.DT],[V.EM,q.EM],[V.EMBED,q.EMBED],[V.FIELDSET,q.FIELDSET],[V.FIGCAPTION,q.FIGCAPTION],[V.FIGURE,q.FIGURE],[V.FONT,q.FONT],[V.FOOTER,q.FOOTER],[V.FOREIGN_OBJECT,q.FOREIGN_OBJECT],[V.FORM,q.FORM],[V.FRAME,q.FRAME],[V.FRAMESET,q.FRAMESET],[V.H1,q.H1],[V.H2,q.H2],[V.H3,q.H3],[V.H4,q.H4],[V.H5,q.H5],[V.H6,q.H6],[V.HEAD,q.HEAD],[V.HEADER,q.HEADER],[V.HGROUP,q.HGROUP],[V.HR,q.HR],[V.HTML,q.HTML],[V.I,q.I],[V.IMG,q.IMG],[V.IMAGE,q.IMAGE],[V.INPUT,q.INPUT],[V.IFRAME,q.IFRAME],[V.KEYGEN,q.KEYGEN],[V.LABEL,q.LABEL],[V.LI,q.LI],[V.LINK,q.LINK],[V.LISTING,q.LISTING],[V.MAIN,q.MAIN],[V.MALIGNMARK,q.MALIGNMARK],[V.MARQUEE,q.MARQUEE],[V.MATH,q.MATH],[V.MENU,q.MENU],[V.META,q.META],[V.MGLYPH,q.MGLYPH],[V.MI,q.MI],[V.MO,q.MO],[V.MN,q.MN],[V.MS,q.MS],[V.MTEXT,q.MTEXT],[V.NAV,q.NAV],[V.NOBR,q.NOBR],[V.NOFRAMES,q.NOFRAMES],[V.NOEMBED,q.NOEMBED],[V.NOSCRIPT,q.NOSCRIPT],[V.OBJECT,q.OBJECT],[V.OL,q.OL],[V.OPTGROUP,q.OPTGROUP],[V.OPTION,q.OPTION],[V.P,q.P],[V.PARAM,q.PARAM],[V.PLAINTEXT,q.PLAINTEXT],[V.PRE,q.PRE],[V.RB,q.RB],[V.RP,q.RP],[V.RT,q.RT],[V.RTC,q.RTC],[V.RUBY,q.RUBY],[V.S,q.S],[V.SCRIPT,q.SCRIPT],[V.SEARCH,q.SEARCH],[V.SECTION,q.SECTION],[V.SELECT,q.SELECT],[V.SOURCE,q.SOURCE],[V.SMALL,q.SMALL],[V.SPAN,q.SPAN],[V.STRIKE,q.STRIKE],[V.STRONG,q.STRONG],[V.STYLE,q.STYLE],[V.SUB,q.SUB],[V.SUMMARY,q.SUMMARY],[V.SUP,q.SUP],[V.TABLE,q.TABLE],[V.TBODY,q.TBODY],[V.TEMPLATE,q.TEMPLATE],[V.TEXTAREA,q.TEXTAREA],[V.TFOOT,q.TFOOT],[V.TD,q.TD],[V.TH,q.TH],[V.THEAD,q.THEAD],[V.TITLE,q.TITLE],[V.TR,q.TR],[V.TRACK,q.TRACK],[V.TT,q.TT],[V.U,q.U],[V.UL,q.UL],[V.SVG,q.SVG],[V.VAR,q.VAR],[V.WBR,q.WBR],[V.XMP,q.XMP]]);function vw(e){var t;return null!=(t=vx.get(e))?t:q.UNKNOWN}let vE=q,vT={[B.HTML]:new Set([vE.ADDRESS,vE.APPLET,vE.AREA,vE.ARTICLE,vE.ASIDE,vE.BASE,vE.BASEFONT,vE.BGSOUND,vE.BLOCKQUOTE,vE.BODY,vE.BR,vE.BUTTON,vE.CAPTION,vE.CENTER,vE.COL,vE.COLGROUP,vE.DD,vE.DETAILS,vE.DIR,vE.DIV,vE.DL,vE.DT,vE.EMBED,vE.FIELDSET,vE.FIGCAPTION,vE.FIGURE,vE.FOOTER,vE.FORM,vE.FRAME,vE.FRAMESET,vE.H1,vE.H2,vE.H3,vE.H4,vE.H5,vE.H6,vE.HEAD,vE.HEADER,vE.HGROUP,vE.HR,vE.HTML,vE.IFRAME,vE.IMG,vE.INPUT,vE.LI,vE.LINK,vE.LISTING,vE.MAIN,vE.MARQUEE,vE.MENU,vE.META,vE.NAV,vE.NOEMBED,vE.NOFRAMES,vE.NOSCRIPT,vE.OBJECT,vE.OL,vE.P,vE.PARAM,vE.PLAINTEXT,vE.PRE,vE.SCRIPT,vE.SECTION,vE.SELECT,vE.SOURCE,vE.STYLE,vE.SUMMARY,vE.TABLE,vE.TBODY,vE.TD,vE.TEMPLATE,vE.TEXTAREA,vE.TFOOT,vE.TH,vE.THEAD,vE.TITLE,vE.TR,vE.TRACK,vE.UL,vE.WBR,vE.XMP]),[B.MATHML]:new Set([vE.MI,vE.MO,vE.MN,vE.MS,vE.MTEXT,vE.ANNOTATION_XML]),[B.SVG]:new Set([vE.TITLE,vE.FOREIGN_OBJECT,vE.DESC]),[B.XLINK]:new Set,[B.XML]:new Set,[B.XMLNS]:new Set},vS=new Set([vE.H1,vE.H2,vE.H3,vE.H4,vE.H5,vE.H6]);V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT,(A=G||(G={}))[A.DATA=0]="DATA",A[A.RCDATA=1]="RCDATA",A[A.RAWTEXT=2]="RAWTEXT",A[A.SCRIPT_DATA=3]="SCRIPT_DATA",A[A.PLAINTEXT=4]="PLAINTEXT",A[A.TAG_OPEN=5]="TAG_OPEN",A[A.END_TAG_OPEN=6]="END_TAG_OPEN",A[A.TAG_NAME=7]="TAG_NAME",A[A.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",A[A.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",A[A.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",A[A.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",A[A.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",A[A.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",A[A.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",A[A.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",A[A.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",A[A.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",A[A.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",A[A.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",A[A.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",A[A.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",A[A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",A[A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",A[A.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",A[A.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",A[A.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",A[A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",A[A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",A[A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",A[A.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",A[A.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",A[A.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",A[A.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",A[A.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",A[A.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",A[A.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",A[A.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",A[A.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",A[A.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",A[A.BOGUS_COMMENT=40]="BOGUS_COMMENT",A[A.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",A[A.COMMENT_START=42]="COMMENT_START",A[A.COMMENT_START_DASH=43]="COMMENT_START_DASH",A[A.COMMENT=44]="COMMENT",A[A.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",A[A.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",A[A.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",A[A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",A[A.COMMENT_END_DASH=49]="COMMENT_END_DASH",A[A.COMMENT_END=50]="COMMENT_END",A[A.COMMENT_END_BANG=51]="COMMENT_END_BANG",A[A.DOCTYPE=52]="DOCTYPE",A[A.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",A[A.DOCTYPE_NAME=54]="DOCTYPE_NAME",A[A.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",A[A.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",A[A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",A[A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",A[A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",A[A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",A[A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",A[A.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",A[A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",A[A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",A[A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",A[A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",A[A.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",A[A.CDATA_SECTION=68]="CDATA_SECTION",A[A.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",A[A.CDATA_SECTION_END=70]="CDATA_SECTION_END",A[A.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",A[A.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";let vC={DATA:G.DATA,RCDATA:G.RCDATA,RAWTEXT:G.RAWTEXT,SCRIPT_DATA:G.SCRIPT_DATA,PLAINTEXT:G.PLAINTEXT,CDATA_SECTION:G.CDATA_SECTION};function vA(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function v_(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z||vA(e)}function vN(e){return v_(e)||e>=D.DIGIT_0&&e<=D.DIGIT_9}function vO(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function vM(e){return vO(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}class vI{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=G.DATA,this.returnState=G.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new vm(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new vk(vy,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=function(e){if(e===D.NULL)return R.nullCharacterReference;if(e>1114111)return R.characterReferenceOutsideUnicodeRange;if(vh(e))return R.surrogateCharacterReference;if(vf(e))return R.noncharacterCharacterReference;if(vp(e)||e===D.CARRIAGE_RETURN)return R.controlCharacterReference;return null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null==(r=(n=this.handler).onParseError)||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:z.START_TAG,tagName:"",tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:z.END_TAG,tagName:"",tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:z.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:z.DOCTYPE,name:e,forceQuirks:!1,publicId:null,
129systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;let n=this.currentToken;null===vg(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!=(e=(t=n.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=vw(e.tagName),e.type===z.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(R.endTagWithAttributes),e.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case z.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case z.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case z.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:z.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=vO(e)?z.WHITESPACE_CHARACTER:e===D.NULL?z.NULL_CHARACTER:z.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(z.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=G.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?F.Attribute:F.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===G.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===G.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===G.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case G.DATA:this._stateData(e);break;case G.RCDATA:this._stateRcdata(e);break;case G.RAWTEXT:this._stateRawtext(e);break;case G.SCRIPT_DATA:this._stateScriptData(e);break;case G.PLAINTEXT:this._statePlaintext(e);break;case G.TAG_OPEN:this._stateTagOpen(e);break;case G.END_TAG_OPEN:this._stateEndTagOpen(e);break;case G.TAG_NAME:this._stateTagName(e);break;case G.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case G.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case G.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case G.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case G.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case G.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case G.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case G.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case G.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case G.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case G.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case G.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case G.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case G.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case G.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case G.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case G.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscape
vendor: 7,007 bytes, line 129
129Start(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case G.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case G.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case G.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case G.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case G.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case G.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case G.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case G.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case G.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case G.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case G.BOGUS_COMMENT:this._stateBogusComment(e);break;case G.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case G.COMMENT_START:this._stateCommentStart(e);break;case G.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case G.COMMENT:this._stateComment(e);break;case G.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case G.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case G.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case G.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case G.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case G.COMMENT_END:this._stateCommentEnd(e);break;case G.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case G.DOCTYPE:this._stateDoctype(e);break;case G.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case G.DOCTYPE_NAME:this._stateDoctypeName(e);break;case G.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case G.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case G.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case G.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case G.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case G.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case G.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case G.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case G.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case G.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case G.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case G.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case G.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case G.CDATA_SECTION:this._stateCdataSection(e);break;case G.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case G.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case G.CHARACTER_REFERENCE:this._stateCharacterReference();break;case G.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case D.LESS_THAN_SIGN:this.state=G.TAG_OPEN;break;case D.AMPERSAND:this._startCharacterReference();break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitCodePoint(e);break;case D.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case D.AMPERSAND:this._startCharacterReference();break;case D.LESS_THAN_SIGN:this.state=G.RCDATA_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case D.LESS_THAN_SIGN:this.state=G.RAWTEXT_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(v_(e))this._createStartTagToken(),this.state=G.TAG_NAME,this._stateTagName(e);else switch(e){case D.EXCLAMATION_MARK:this.state=G.MARKUP_DECLARATION_OPEN;break;case D.SOLIDUS:this.state=G.END_TAG_OPEN;break;case D.QUESTION_MARK:this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=G.BOGUS_COMMENT,this._stateBogusComment(e);break;case D.EOF:this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=G.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(v_(e))this._createEndTagToken(),this.state=G.TAG_NAME,this._stateTagName(e);else switch(e){case D.GREATER_THAN_SIGN:this._err(R.missingEndTagName),this.state=G.DATA;break;case D.EOF:this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=G.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.BEFORE_ATTRIBUTE_NAME;break;case D.SOLIDUS:this.state=G.SELF_CLOSING_START_TAG;break;case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentTagToken();break;case D.NULL:this._err(R.unexpectedNullCharacter),t.tagName+="�";break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(vA(e)?e+32:e)}}_stateRcdataLessThanSign(e){e===D.SOLIDUS?this.state=G.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=G.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){v_(e)?(this.state=G.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=G.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=G.BEFORE_ATTRIBUTE_NAME,
vendor: 7,207 bytes, line 129
129!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=G.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=G.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=G.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===D.SOLIDUS?this.state=G.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=G.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){v_(e)?(this.state=G.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=G.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=G.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case D.SOLIDUS:this.state=G.SCRIPT_DATA_END_TAG_OPEN;break;case D.EXCLAMATION_MARK:this.state=G.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=G.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){v_(e)?(this.state=G.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=G.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=G.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===D.HYPHEN_MINUS?(this.state=G.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=G.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===D.HYPHEN_MINUS?(this.state=G.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=G.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case D.HYPHEN_MINUS:this.state=G.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case D.HYPHEN_MINUS:this.state=G.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),this.state=G.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=G.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case D.HYPHEN_MINUS:this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case D.GREATER_THAN_SIGN:this.state=G.SCRIPT_DATA,this._emitChars(">");break;case D.NULL:this._err(R.unexpectedNullCharacter),this.state=G.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=G.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===D.SOLIDUS?this.state=G.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:v_(e)?(this._emitChars("<"),this.state=G.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=G.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){v_(e)?(this.state=G.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=G.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=G.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(vu,!1)&&vM(this.preprocessor.peek(vu.length))){this._emitCodePoint(e);for(let e=0;e<vu.length;e++)this._emitCodePoint(this._consume());this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=G.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case D.HYPHEN_MINUS:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case D.NULL:this._err(R.unexpectedNullCharacter),this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case D.HYPHEN_MINUS:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case D.NULL:this._err(R.unexpectedNullCharacter),this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case D.HYPHEN_MINUS:this._emitChars("-");break;case D.LESS_THAN_SIGN:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case D.GREATER_THAN_SIGN:this.state=G.SCRIPT_DATA,this._emitChars(">");break;case D.NULL:this._err(R.unexpectedNullCharacter),this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case D.EOF:this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===D.SOLIDUS?(this.state=G.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(vu,!1)&&vM(this.preprocessor.peek(vu.length))){this._emitCodePoint(e);for(let e=0;e<vu.length;e++)this._emitCodePoint(this._consume());this.state=G.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=G.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:this.state=G.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case D.EQUALS_SIGN:this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=G.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=G.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:this._leaveAttrName(),this.state=G.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case D.EQUALS_SIGN:this._leaveAttrName(),this.state=G.BEFORE_ATTRIBUTE_VALUE;break;case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case D.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.name+="
129�";break;default:this.currentAttr.name+=String.fromCodePoint(vA(e)?e+32:e)}}_stateAfterAttributeName(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:this.state=G.SELF_CLOSING_START_TAG;break;case D.EQUALS_SIGN:this.state=G.BEFORE_ATTRIBUTE_VALUE;break;case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentTagToken();break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=G.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:this.state=G.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case D.APOSTROPHE:this.state=G.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case D.GREATER_THAN_SIGN:this._err(R.missingAttributeValue),this.state=G.DATA,this.emitCurrentTagToken();break;default:this.state=G.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case D.QUOTATION_MARK:this.state=G.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case D.AMPERSAND:this._startCharacterReference();break;case D.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case D.APOSTROPHE:this.state=G.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case D.AMPERSAND:this._startCharacterReference();break;case D.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this._leaveAttrValue(),this.state=G.BEFORE_ATTRIBUTE_NAME;break;case D.AMPERSAND:this._startCharacterReference();break;case D.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=G.DATA,this.emitCurrentTagToken();break;case D.NULL:this._err(R.unexpectedNullCharacter),this.currentAttr.value+="�";break;case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this._leaveAttrValue(),this.state=G.BEFORE_ATTRIBUTE_NAME;break;case D.SOLIDUS:this._leaveAttrValue(),this.state=G.SELF_CLOSING_START_TAG;break;case D.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=G.DATA,this.emitCurrentTagToken();break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.missingWhitespaceBetweenAttributes),this.state=G.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case D.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=G.DATA,this.emitCurrentTagToken();break;case D.EOF:this._err(R.eofInTag),this._emitEOFToken();break;default:this._err(R.unexpectedSolidusInTag),this.state=G.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentComment(t);break;case D.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case D.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch("--",!0)?(this._createCommentToken(3),this.state=G.COMMENT_START):this._consumeSequenceIfMatch(vd,!1)?(this.currentLocation=this.getCurrentLocation(vd.length+1),this.state=G.DOCTYPE):this._consumeSequenceIfMatch(vc,!0)?this.inForeignNode?this.state=G.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(vc.length+1),this.currentToken.data="[CDATA[",this.state=G.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=G.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case D.HYPHEN_MINUS:this.state=G.COMMENT_START_DASH;break;case D.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=G.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=G.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case D.HYPHEN_MINUS:this.state=G.COMMENT_END;break;case D.GREATER_THAN_SIGN:this._err(R.abruptClosingOfEmptyComment),this.state=G.DATA,this.emitCurrentComment(t);break;case D.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=G.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case D.HYPHEN_MINUS:this.state=G.COMMENT_END_DASH;break;case D.LESS_THAN_SIGN:t.data+="<",this.state=G.COMMENT_LESS_THAN_SIGN;break;case D.NULL:this._err(R.unexpectedNullCharacter),t.data+="�";break;case D.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case D.EXCLAMATION_MARK:t.data+="!",this.state=G.COMMENT_LESS_THAN_SIGN_BANG;break;case D.LESS_THAN_SIGN:t.data+="<";break;default:this.state=G.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===D.HYPHEN_MINUS?this.state=G.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=G.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===D.HYPHEN_MINUS?this.state=G.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=G.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==D.GREATER_THAN_SIGN&&e!==D.EOF&&this._err(R.nestedComment),this.state=G.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case D.HYPHEN_MINUS:this.state=G.COMMENT_END;break;case D.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=G.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentComment(t);break;case D.EXCLAMATION_MARK:this.state=G.COMMENT_END_BANG;break;case D.HYPHEN_MINUS:t.data+="-";break;case D.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=G.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case D.HYPHEN_MINUS:t.data+="--!",this.state=G.COMMENT_END_DASH;break;case D.GREATER_THAN_SIGN:this._err(R.incorrectlyClosedComment),this.state=G.DATA,this.emitCurrentComment(t);break;case D.EOF:this._err(R.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=G.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.BEFORE_DOCTYPE_NAME;break;case D.GREATER_THAN_SIGN:this.state=G.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case D.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=G.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(vA(e))this._createDoctypeToken(String.fromCharCode(e+32)),this.state=G.DOCTYPE_NAME;else switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:this._err(R.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=G.DOCTYPE_NAME;break;case D.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=G.DATA;break}case D.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=G.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.AFTER_DOCTYPE_NAME;break;case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentDoctype(t);break;
129case D.NULL:this._err(R.unexpectedNullCharacter),t.name+="�";break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(vA(e)?e+32:e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=G.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=G.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case D.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=G.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=G.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case D.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:t.publicId="",this.state=G.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:t.publicId="",this.state=G.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case D.GREATER_THAN_SIGN:this._err(R.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case D.QUOTATION_MARK:this.state=G.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case D.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case D.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case D.APOSTROPHE:this.state=G.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case D.NULL:this._err(R.unexpectedNullCharacter),t.publicId+="�";break;case D.GREATER_THAN_SIGN:this._err(R.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case D.GREATER_THAN_SIGN:this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.QUOTATION_MARK:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;
vendor: 4,995 bytes, line 129
129default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.QUOTATION_MARK:t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:this.state=G.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case D.QUOTATION_MARK:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case D.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case D.APOSTROPHE:t.systemId="",this.state=G.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case D.GREATER_THAN_SIGN:this._err(R.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.DATA,this.emitCurrentDoctype(t);break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case D.QUOTATION_MARK:this.state=G.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case D.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case D.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case D.APOSTROPHE:this.state=G.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case D.NULL:this._err(R.unexpectedNullCharacter),t.systemId+="�";break;case D.GREATER_THAN_SIGN:this._err(R.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.EOF:this._err(R.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=G.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case D.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=G.DATA;break;case D.NULL:this._err(R.unexpectedNullCharacter);break;case D.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case D.RIGHT_SQUARE_BRACKET:this.state=G.CDATA_SECTION_BRACKET;break;case D.EOF:this._err(R.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===D.RIGHT_SQUARE_BRACKET?this.state=G.CDATA_SECTION_END:(this._emitChars("]"),this.state=G.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case D.GREATER_THAN_SIGN:this.state=G.DATA;break;case D.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=G.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}
vendor: 4,106 bytes, line 129
1290===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vN(this.preprocessor.peek(1))?G.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){vN(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===D.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}let vD=new Set([q.DD,q.DT,q.LI,q.OPTGROUP,q.OPTION,q.P,q.RB,q.RP,q.RT,q.RTC]),vR=new Set([...vD,q.CAPTION,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]),vz=new Set([q.APPLET,q.CAPTION,q.HTML,q.MARQUEE,q.OBJECT,q.TABLE,q.TD,q.TEMPLATE,q.TH]),vL=new Set([...vz,q.OL,q.UL]),vP=new Set([...vz,q.BUTTON]),vj=new Set([q.ANNOTATION_XML,q.MI,q.MN,q.MO,q.MS,q.MTEXT]),v$=new Set([q.DESC,q.FOREIGN_OBJECT,q.TITLE]),vF=new Set([q.TR,q.TEMPLATE,q.HTML]),vB=new Set([q.TBODY,q.TFOOT,q.THEAD,q.TEMPLATE,q.HTML]),vH=new Set([q.TABLE,q.TEMPLATE,q.HTML]),vU=new Set([q.TD,q.TH]);class vV{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=q.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===q.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===B.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==B.HTML)this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(vS,B.HTML)}popUntilTableCellPopped(){this.popUntilPopped(vU,B.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return -1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(vH,B.HTML)}clearBackToTableBodyContext(){this.clearBackTo(vB,B.HTML)}clearBackToTableRowContext(){this.clearBackTo(vF,B.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===q.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===q.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case B.HTML:if(r===e)return!0;
129if(t.has(r))return!1;break;case B.SVG:if(v$.has(r))return!1;break;case B.MATHML:if(vj.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,vz)}hasInListItemScope(e){return this.hasInDynamicScope(e,vL)}hasInButtonScope(e){return this.hasInDynamicScope(e,vP)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case B.HTML:if(vS.has(t))return!0;if(vz.has(t))return!1;break;case B.SVG:if(v$.has(t))return!1;break;case B.MATHML:if(vj.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===B.HTML)switch(this.tagIDs[e]){case q.TBODY:case q.THEAD:case q.TFOOT:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===B.HTML)switch(this.tagIDs[t]){case e:return!0;case q.OPTION:case q.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&vD.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&vR.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&vR.has(this.currentTagId);)this.pop()}}(_=W||(W={}))[_.Marker=0]="Marker",_[_.Element=1]="Element";let vq={type:W.Marker};class vG{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===W.Marker)break;let{element:s}=t;if(this.treeAdapter.getTagName(s)===i&&this.treeAdapter.getNamespaceURI(s)===o){let t=this.treeAdapter.getAttrList(s);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1)>=3&&this.entries.splice(t.idx,1)}}insertMarker(){this.entries.unshift(vq)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:W.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:W.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(vq);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===W.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===W.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===W.Element&&t.element===e)}}let vW={createDocument:()=>({nodeName:"#document",mode:U.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>"#documentType"===e.nodeName);i?(i.name=t,i.publicId=n,i.systemId=r):vW.appendChild(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(vW.isTextNode(n)){n.value+=t;return}}vW.appendChild(e,vW.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&vW.isTextNode(r)?r.value+=t:vW.insertBefore(e,vW.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},vK="html",vJ=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],vY=[...vJ,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],vX=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),vQ=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],vZ=[...vQ,"-/
129/w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function v0(e,t){return t.some(t=>e.startsWith(t))}let v1=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),v2=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:B.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:B.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:B.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:B.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:B.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:B.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:B.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:B.XML}],["xml:space",{prefix:"xml",name:"space",namespace:B.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:B.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:B.XMLNS}]]),v5=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),v3=new Set([q.B,q.BIG,q.BLOCKQUOTE,q.BODY,q.BR,q.CENTER,q.CODE,q.DD,q.DIV,q.DL,q.DT,q.EM,q.EMBED,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HR,q.I,q.IMG,q.LI,q.LISTING,q.MENU,q.META,q.NOBR,q.OL,q.P,q.PRE,q.RUBY,q.S,q.SMALL,q.SPAN,q.STRONG,q.STRIKE,q.SUB,q.SUP,q.TABLE,q.TT,q.U,q.UL,q.VAR]);function v4(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function v6(e){for(let t=0;t<e.attrs.length;t++){let n=v1.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function v8(e){for(let t=0;t<e.attrs.length;t++){let n=v2.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}(N=K||(K={}))[N.INITIAL=0]="INITIAL",N[N.BEFORE_HTML=1]="BEFORE_HTML",N[N.BEFORE_HEAD=2]="BEFORE_HEAD",N[N.IN_HEAD=3]="IN_HEAD",N[N.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",N[N.AFTER_HEAD=5]="AFTER_HEAD",N[N.IN_BODY=6]="IN_BODY",N[N.TEXT=7]="TEXT",N[N.IN_TABLE=8]="IN_TABLE",N[N.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",N[N.IN_CAPTION=10]="IN_CAPTION",N[N.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",N[N.IN_TABLE_BODY=12]="IN_TABLE_BODY",N[N.IN_ROW=13]="IN_ROW",N[N.IN_CELL=14]="IN_CELL",N[N.IN_SELECT=15]="IN_SELECT",N[N.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",N[N.IN_TEMPLATE=17]="IN_TEMPLATE",N[N.AFTER_BODY=18]="AFTER_BODY",N[N.IN_FRAMESET=19]="IN_FRAMESET",N[N.AFTER_FRAMESET=20]="AFTER_FRAMESET",N[N.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",N[N.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";let v9={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},v7=new Set([q.TABLE,q.TBODY,q.TFOOT,q.THEAD,q.TR]),ke={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vW,onParseError:null};class kt{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=K.INITIAL,this.originalInsertionMode=K.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...ke,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new vI(this.options,this),this.activeFormattingElements=new vG(this.treeAdapter),this.fragmentContextID=n?vw(this.treeAdapter.getTagName(n)):q.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new vV(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...ke,...t};null!=e||(e=n.treeAdapter.createElement(V.TEMPLATE,B.HTML,[]));let r=n.treeAdapter.createElement("documentmock",B.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===q.TEMPLATE&&i.tmplInsertionModeStack.unshift(K.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;let i=null!=(r=e.location)?r:v9,o={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(o)}
129onItemPush(e,t,n){var r,i;null==(i=(r=this.treeAdapter).onItemPush)||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null==(r=(n=this.treeAdapter).onItemPop)||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===B.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,B.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=K.TEXT}switchToPlaintextParsing(){this.insertionMode=K.TEXT,this.originalInsertionMode=K.IN_BODY,this.tokenizer.state=vC.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===V.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===B.HTML)switch(this.fragmentContextID){case q.TITLE:case q.TEXTAREA:this.tokenizer.state=vC.RCDATA;break;case q.STYLE:case q.XMP:case q.IFRAME:case q.NOEMBED:case q.NOFRAMES:case q.NOSCRIPT:this.tokenizer.state=vC.RAWTEXT;break;case q.SCRIPT:this.tokenizer.state=vC.SCRIPT_DATA;break;case q.PLAINTEXT:this.tokenizer.state=vC.PLAINTEXT}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,B.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,B.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(V.HTML,B.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,q.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,o=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===z.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){let t,n;return!!this.currentNotInHTML&&(0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,(e.tagID!==q.SVG||this.treeAdapter.getTagName(t)!==V.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==B.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===q.MGLYPH||e.tagID===q.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,B.HTML)))}_processToken(e){switch(e.type){case z.CHARACTER:this.onCharacter(e);break;case z.NULL_CHARACTER:this.onNullCharacter(e);break;case z.COMMENT:this.onComment(e);break;case z.DOCTYPE:this.onDoctype(e);break;case z.START_TAG:this._processStartTag(e);break;case z.END_TAG:this.onEndTag(e);break;case z.EOF:this.onEof(e);break;case z.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return(!n||n===B.HTML)&&function(e,t,n){if(t===B.MATHML&&e===q.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===H.ENCODING){let t=n[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}}return t===B.SVG&&(e===q.FOREIGN_OBJECT||e===q.DESC||e===q.TITLE)}(e,r,i)||(!n||n===B.MATHML)&&r===B.MATHML&&(e===q.MI||e===q.MO||e===q.MN||e===q.MS||e===q.MTEXT)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===W.Marker||this.openElements.contains(e.element)),n=-1===t?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=K.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(q.P),this.openElements.popUntilTagNamePopped(q.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case q.TR:this.insertionMode=K.IN_ROW;return;case q.TBODY:case q.THEAD:case q.TFOOT:this.insertionMode=K.IN_TABLE_BODY;return;case q.CAPTION:this.insertionMode=K.IN_CAPTION;return;case q.COLGROUP:this.insertionMode=K.IN_COLUMN_GROUP;return;case q.TABLE:this.insertionMode=K.IN_TABLE;return;case q.BODY:this.insertionMode=K.IN_BODY;return;case q.FRAMESET:this.insertionMode=K.IN_FRAMESET;return;case q.SELECT:return void this._resetInsertionModeForSelect(e);case q.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case q.HTML:this.insertionMode=this.headElement?K.AFTER_HEAD:K.BEFORE_HEAD;return;case q.TD:case q.TH:if(e>0){this.insertionMode=K.IN_CELL;return}break;case q.HEAD:if(e>0){this.insertionMode=K.IN_HEAD;return}}this.insertionMode=K.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===q.TEMPLATE)break;if(e===q.TABLE){this.insertionMode=K.IN_SELECT_IN_TABLE;return}}this.insertionMode=K.IN_SELECT}_isElementCausesFosterParenting(e){return v7.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case q.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===B.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case q.TABLE:{let n=this.treeAdapter.getParentNode(t);if(n)return{parent:n,beforeElement:t};return{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return vT[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,n=e,t._insertCharacters(n),t.framesetOk=!1)}switch(this.insertionMode){case K.INITIAL:ko(this,e);break;case K.BEFORE_HTML:ks(this,e);break;case K.BEFORE_HEAD:ka(this,e);break;case K.IN_HEAD:kd(this,e);break;case K.IN_HEAD_NO_SCRIPT:ku(this,e);break;case K.AFTER_HEAD:kh(this,e);break;case K.IN_BODY:case K.IN_CAPTION:case K.IN_CELL:case K.IN_TEMPLATE:km(this,e);break;case K.TEXT:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:kT(this,e);break;case K.IN_TABLE_TEXT:kN(this,e);break;case K.IN_COLUMN_GROUP:kD(this,e);break;case K.AFTER_BODY:kH(this,e);break;case K.AFTER_AFTER_BODY:kU(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,(n=e).chars="�",t._insertCharacters(n))}switch(this.insertionMode){case K.INITIAL:ko(this,e);break;case K.BEFORE_HTML:ks(this,e);break;case K.BEFORE_HEAD:ka(this,e);break;case K.IN_HEAD:kd(this,e);break;case K.IN_HEAD_NO_SCRIPT:ku(this,e);break;case K.AFTER_HEAD:kh(this,e);break;case K.TEXT:this._insertCharacters(e);break;case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:kT(this,e);break;case K.IN_COLUMN_GROUP:kD(this,e);break;case K.AFTER_BODY:kH(this,e);break;case K.AFTER_AFTER_BODY:kU(this,e)}}onComment(e){var t,n,r,i;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void kr(this,e);switch(this.insertionMode){case K.INITIAL:case K.BEFORE_HTML:case K.BEFORE_HEAD:case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:case K.IN_BODY:case K.IN_TABLE:case K.IN_CAPTION:case K.IN_COLUMN_GROUP:case K.IN_TABLE_BODY:case K.IN_ROW:case K.IN_CELL:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:case K.IN_TEMPLATE:case K.IN_FRAMESET:case K.AFTER_FRAMESET:kr(this,e);break;case K.IN_TABLE_TEXT:kO(this,e);break;case K.AFTER_BODY:t=this,n=e,t._appendCommentNode(n,t.openElements.items[0]);break;case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:r=this,i=e,r._appendCommentNode(i,r.document)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case K.INITIAL:!function(e,t){e._setDocumentType(t);let n=t.forceQuirks?U.QUIRKS:function(e){if(e.name!==vK)return U.QUIRKS;let{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return U.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),vX.has(n))return U.QUIRKS;let e=null===t?vY:vJ;if(v0(n,e))return U.QUIRKS;if(v0(n,e=null===t?vQ:vZ))return U.LIMITED_QUIRKS}return U.NO_QUIRKS}(t);(t.name!==vK||null!==t.publicId||null!==t.systemId&&"about:legacy-compat"!==t.systemId)&&e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=K.BEFORE_HTML}(this,e);break;case K.BEFORE_HEAD:case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:this._err(e,R.misplacedDoctype);break;case K.IN_TABLE_TEXT:kO(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){let n;if((n=t.tagID)===q.FONT&&t.attrs.some(({name:e})=>e===H.COLOR||e===H.SIZE||e===H.FACE)||v3.has(n))kV(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);if(r===B.MATHML)v4(t);else if(r===B.SVG){let e;null!=(e=v5.get(t.tagName))&&(t.tagName=e,t.tagID=vw(t.tagName)),v6(t)}v8(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case K.INITIAL:ko(this,e);break;case K.BEFORE_HTML:t=this,(n=e).tagID===q.HTML?(t._insertElement(n,B.HTML),t.insertionMode=K.BEFORE_HEAD):ks(t,n);break;case K.BEFORE_HEAD:var t,n,r,i,o,s,a,l,c,d,u,h,p=this,f=e;switch(f.tagID){case q.HTML:kk(p,f);break;case q.HEAD:p._insertElement(f,B.HTML),p.headElement=p.openElements.current,p.insertionMode=K.IN_HEAD;break;default:ka(p,f)}break;case K.IN_HEAD:kl(this,e);break;case K.IN_HEAD_NO_SCRIPT:var m=this,g=e;switch(g.tagID){case q.HTML:kk(m,g);break;case q.BASEFONT:case q.BGSOUND:case q.HEAD:case q.LINK:case q.META:case q.NOFRAMES:case q.STYLE:kl(m,g);break;case q.NOSCRIPT:m._err(g,R.nestedNoscriptInHead);break;default:ku(m,g)}break;case K.AFTER_HEAD:var y=this,b=e;switch(b.tagID){case q.HTML:kk(y,b);break;case q.BODY:y._insertElement(b,B.HTML),y.framesetOk=!1,y.insertionMode=K.IN_BODY;break;case q.FRAMESET:y._insertElement(b,B.HTML),y.insertionMode=K.IN_FRAMESET;break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:y._err(b,R.abandonedHeadElementChild),y.openElements.push(y.headElement,q.HEAD),kl(y,b),y.openElements.remove(y.headElement);break;case q.HEAD:y._err(b,R.misplacedStartTagForHeadElement);break;default:kh(y,b)}break;case K.IN_BODY:kk(this,e);break;case K.IN_TABLE:kS(this,e);break;case K.IN_TABLE_TEXT:kO(this,e);break;case K.IN_CAPTION:let v;r=this,v=(i=e).tagID,kM.has(v)?r.openElements.hasInTableScope(q.CAPTION)&&(r.openElements.generateImpliedEndTags(),r.openElements.popUntilTagNamePopped(q.CAPTION),r.activeFormattingElements.clearToLastMarker(),r.insertionMode=K.IN_TABLE,kS(r,i)):kk(r,i);break;case K.IN_COLUMN_GROUP:kI(this,e);break;case K.IN_TABLE_BODY:kR(this,e);break;case K.IN_ROW:kL(this,e);break;case K.IN_CELL:let k;o=this,k=(s=e).tagID,kM.has(k)?(o.openElements.hasInTableScope(q.TD)||o.openElements.hasInTableScope(q.TH))&&(o._closeTableCell(),kL(o,s)):kk(o,s);break;case K.IN_SELECT:kj(this,e);break;case K.IN_SELECT_IN_TABLE:let x;a=this,(x=(l=e).tagID)===q.CAPTION||x===q.TABLE||x===q.TBODY||x===q.TFOOT||x===q.THEAD||x===q.TR||x===q.TD||x===q.TH?(a.openElements.popUntilTagNamePopped(q.SELECT),a._resetInsertionMode(),a._processStartTag(l)):kj(a,l);break;case K.IN_TEMPLATE:var w=this,E=e;switch(E.tagID){case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:kl(w,E);break;case q.CAPTION:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:w.tmplInsertionModeStack[0]=K.IN_TABLE,w.insertionMode=K.IN_TABLE,kS(w,E);break;case q.COL:w.tmplInsertionModeStack[0]=K.IN_COLUMN_GROUP,w.insertionMode=K.IN_COLUMN_GROUP,kI(w,E);break;case q.TR:w.tmplInsertionModeStack[0]=K.IN_TABLE_BODY,w.insertionMode=K.IN_TABLE_BODY,kR(w,E);break;case q.TD:case q.TH:w.tmplInsertionModeStack[0]=K.IN_ROW,w.insertionMode=K.IN_ROW,kL(w,E);break;default:w.tmplInsertionModeStack[0]=K.IN_BODY,w.insertionMode=K.IN_BODY,kk(w,E)}break;case K.AFTER_BODY:c=this,(d=e).tagID===q.HTML?kk(c,d):kH(c,d);break;case K.IN_FRAMESET:var T=this,S=e;switch(S.tagID){case q.HTML:kk(T,S);break;case q.FRAMESET:T._insertElement(S,B.HTML);break;case q.FRAME:T._appendElement(S,B.HTML),S.ackSelfClosing=!0;break;case q.NOFRAMES:kl(T,S)}break;case K.AFTER_FRAMESET:var C=this,A=e;switch(A.tagID){case q.HTML:kk(C,A);break;case q.NOFRAMES:kl(C,A)}break;case K.AFTER_AFTER_BODY:u=this,(h=e).tagID===q.HTML?kk(u,h):kU(u,h);break;case K.AFTER_AFTER_FRAMESET:var _=this,N=e;switch(N.tagID){case q.HTML:kk(_,N);break;case q.NOFRAMES:kl(_,N)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===q.P||t.
129tagID===q.BR){kV(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===B.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case K.INITIAL:ko(this,e);break;case K.BEFORE_HTML:let t;r=this,((t=(i=e).tagID)===q.HTML||t===q.HEAD||t===q.BODY||t===q.BR)&&ks(r,i);break;case K.BEFORE_HEAD:let n;o=this,(n=(s=e).tagID)===q.HEAD||n===q.BODY||n===q.HTML||n===q.BR?ka(o,s):o._err(s,R.endTagWithoutMatchingOpenElement);break;case K.IN_HEAD:var r,i,o,s,a,l,c,d,u,h,p,f,m=this,g=e;switch(g.tagID){case q.HEAD:m.openElements.pop(),m.insertionMode=K.AFTER_HEAD;break;case q.BODY:case q.BR:case q.HTML:kd(m,g);break;case q.TEMPLATE:kc(m,g);break;default:m._err(g,R.endTagWithoutMatchingOpenElement)}break;case K.IN_HEAD_NO_SCRIPT:var y=this,b=e;switch(b.tagID){case q.NOSCRIPT:y.openElements.pop(),y.insertionMode=K.IN_HEAD;break;case q.BR:ku(y,b);break;default:y._err(b,R.endTagWithoutMatchingOpenElement)}break;case K.AFTER_HEAD:var v=this,k=e;switch(k.tagID){case q.BODY:case q.HTML:case q.BR:kh(v,k);break;case q.TEMPLATE:kc(v,k);break;default:v._err(k,R.endTagWithoutMatchingOpenElement)}break;case K.IN_BODY:kw(this,e);break;case K.TEXT:a=this,e.tagID===q.SCRIPT&&(null==(l=a.scriptHandler)||l.call(a,a.openElements.current)),a.openElements.pop(),a.insertionMode=a.originalInsertionMode;break;case K.IN_TABLE:kC(this,e);break;case K.IN_TABLE_TEXT:kO(this,e);break;case K.IN_CAPTION:var x=this,w=e;let E=w.tagID;switch(E){case q.CAPTION:case q.TABLE:x.openElements.hasInTableScope(q.CAPTION)&&(x.openElements.generateImpliedEndTags(),x.openElements.popUntilTagNamePopped(q.CAPTION),x.activeFormattingElements.clearToLastMarker(),x.insertionMode=K.IN_TABLE,E===q.TABLE&&kC(x,w));break;case q.BODY:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:kw(x,w)}break;case K.IN_COLUMN_GROUP:var T=this,S=e;switch(S.tagID){case q.COLGROUP:T.openElements.currentTagId===q.COLGROUP&&(T.openElements.pop(),T.insertionMode=K.IN_TABLE);break;case q.TEMPLATE:kc(T,S);break;case q.COL:break;default:kD(T,S)}break;case K.IN_TABLE_BODY:kz(this,e);break;case K.IN_ROW:kP(this,e);break;case K.IN_CELL:var C=this,A=e;let _=A.tagID;switch(_){case q.TD:case q.TH:C.openElements.hasInTableScope(_)&&(C.openElements.generateImpliedEndTags(),C.openElements.popUntilTagNamePopped(_),C.activeFormattingElements.clearToLastMarker(),C.insertionMode=K.IN_ROW);break;case q.TABLE:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:C.openElements.hasInTableScope(_)&&(C._closeTableCell(),kP(C,A));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:break;default:kw(C,A)}break;case K.IN_SELECT:k$(this,e);break;case K.IN_SELECT_IN_TABLE:let N;c=this,(N=(d=e).tagID)===q.CAPTION||N===q.TABLE||N===q.TBODY||N===q.TFOOT||N===q.THEAD||N===q.TR||N===q.TD||N===q.TH?c.openElements.hasInTableScope(N)&&(c.openElements.popUntilTagNamePopped(q.SELECT),c._resetInsertionMode(),c.onEndTag(d)):k$(c,d);break;case K.IN_TEMPLATE:u=this,(h=e).tagID===q.TEMPLATE&&kc(u,h);break;case K.AFTER_BODY:kB(this,e);break;case K.IN_FRAMESET:p=this,e.tagID===q.FRAMESET&&!p.openElements.isRootHtmlElementCurrent()&&(p.openElements.pop(),p.fragmentContext||p.openElements.currentTagId===q.FRAMESET||(p.insertionMode=K.AFTER_FRAMESET));break;case K.AFTER_FRAMESET:f=this,e.tagID===q.HTML&&(f.insertionMode=K.AFTER_AFTER_FRAMESET);break;case K.AFTER_AFTER_BODY:kU(this,e)}}onEof(e){switch(this.insertionMode){case K.INITIAL:ko(this,e);break;case K.BEFORE_HTML:ks(this,e);break;case K.BEFORE_HEAD:ka(this,e);break;case K.IN_HEAD:kd(this,e);break;case K.IN_HEAD_NO_SCRIPT:ku(this,e);break;case K.AFTER_HEAD:kh(this,e);break;case K.IN_BODY:case K.IN_TABLE:case K.IN_CAPTION:case K.IN_COLUMN_GROUP:case K.IN_TABLE_BODY:case K.IN_ROW:case K.IN_CELL:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:kE(this,e);break;case K.TEXT:var t,n;t=this,n=e,t._err(n,R.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(n);break;case K.IN_TABLE_TEXT:kO(this,e);break;case K.IN_TEMPLATE:kF(this,e);break;case K.AFTER_BODY:case K.IN_FRAMESET:case K.AFTER_FRAMESET:case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:ki(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCo
129deAt(0)===D.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)return void this._insertCharacters(e);switch(this.insertionMode){case K.IN_HEAD:case K.IN_HEAD_NO_SCRIPT:case K.AFTER_HEAD:case K.TEXT:case K.IN_COLUMN_GROUP:case K.IN_SELECT:case K.IN_SELECT_IN_TABLE:case K.IN_FRAMESET:case K.AFTER_FRAMESET:this._insertCharacters(e);break;case K.IN_BODY:case K.IN_CAPTION:case K.IN_CELL:case K.IN_TEMPLATE:case K.AFTER_BODY:case K.AFTER_AFTER_BODY:case K.AFTER_AFTER_FRAMESET:kf(this,e);break;case K.IN_TABLE:case K.IN_TABLE_BODY:case K.IN_ROW:kT(this,e);break;case K.IN_TABLE_TEXT:k_(this,e)}}}function kn(e,t){for(let n=0;n<8;n++){let n=function(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):kx(e,t),n}(e,t);if(!n)break;let r=function(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=function(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);let n=e.activeFormattingElements.getElementEntry(s),a=n&&o>=3;!n||a?(a&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(s)):(s=function(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),o&&function(e,t,n){let r=vw(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===q.TEMPLATE&&i===B.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}(e,o,i),function(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}(e,r,n)}}function kr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ki(e,t){if(e.stopped=!0,t.location){let n=2*!e.fragmentContext;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function ko(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,U.QUIRKS),e.insertionMode=K.BEFORE_HTML,e._processToken(t)}function ks(e,t){e._insertFakeRootElement(),e.insertionMode=K.BEFORE_HEAD,e._processToken(t)}function ka(e,t){e._insertFakeElement(V.HEAD,q.HEAD),e.headElement=e.openElements.current,e.insertionMode=K.IN_HEAD,e._processToken(t)}function kl(e,t){switch(t.tagID){case q.HTML:kk(e,t);break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case q.TITLE:e._switchToTextParsing(t,vC.RCDATA);break;case q.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,vC.RAWTEXT):(e._insertElement(t,B.HTML),e.insertionMode=K.IN_HEAD_NO_SCRIPT);break;case q.NOFRAMES:case q.STYLE:e._switchToTextParsing(t,vC.RAWTEXT);break;case q.SCRIPT:e._switchToTextParsing(t,vC.SCRIPT_DATA);break;case q.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=K.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(K.IN_TEMPLATE);break;case q.HEAD:e._err(t,R.misplacedStartTagForHeadElement);break;default:kd(e,t)}}function kc(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==q.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function kd(e,t){e.openElements.pop(),e.insertionMode=K.AFTER_HEAD,e._processToken(t)}function ku(e,t){let n=t.type===z.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=K.IN_HEAD,e._processToken(t)}function kh(e,t){e._insertFakeElement(V.BODY,q.BODY),e.insertionMode=K.IN_BODY,kp(e,t)}function kp(e,t){switch(t.type){case z.CHARACTER:km(e,t);break;case z.WHITESPACE_CHARACTER:kf(e,t);break;case z.COMMENT:kr(e,t);break;case z.START_TAG:kk(e,t);break;case z.END_TAG:kw(e,t);break;case z.EOF:kE(e,t)}}function kf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function km(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function kg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ky(e){let t=vg(e,H.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function kb(e,t){e._switchToTextParsing(t,vC.RAWTEXT)}function kv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML)}function kk(e,t){switch(t.tagID){case q.I:case q.S:case q.B:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.SMALL:case q.STRIKE:case q.STRONG:e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case q.A:let n;(n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A))&&(kn(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&vS.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case q.P:case q.DL:case q.OL:case q.UL:case q.DIV:case q.DIR:case q.NAV:case q.MAIN:case q.MENU:case q.ASIDE:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.DETAILS:case q.ADDRESS:case q.ARTICLE:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML);break;case q.LI:case q.DD:case q.DT:e.framesetOk=!1;let r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let n=e.openElements.tagIDs[t];if(r===q.LI&&n===q.LI||(r===q.DD||r===q.DT)&&(n===q.DD||n===q.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==q.ADDRESS&&n!==q.DIV&&n!==q.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML);break;case q.BR:case q.IMG:case q.WBR:case q.AREA:case q.EMBED:case q.KEYGEN:kg(e,t);break;case q.HR:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._appendElement(t,B.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;break;case q.RB:case q.RTC:e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,B.HTML);break;case q.RT:case q.RP:e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(q.RTC),e._insertElement(t,B.HTML);break;case q.PRE:case q.LISTING:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;break;case q.XMP:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,vC.RAWTEXT);break;case q.SVG:e._reconstructActiveFormattingElements(),v6(t),v8(t),t.selfClosing?e._appendElement(t,B.SVG):e._insertElement(t,B.SVG),t.ackSelfClosing=!0;break;case q.HTML:0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);break;case q.BASE:case q.LINK:case q.META:case q.STYLE:case q.TITLE:case q.SCRIPT:case q.BGSOUND:case q.BASEFONT:case q.TEMPLATE:kl(e,t);break;case q.BODY:let i;(i=e.openElements.tryPeekProperlyNestedBodyElement())&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(i,t.attrs));break;case q.FORM:let o;o=e.openElements.tmplCount>0,(!e.formElement||o)&&(e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML),o||(e.formElement=e.openElements.current));break;case q.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(q.NOBR)&&(kn(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,B.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case q.MATH:e._reconstructActiveFormattingElements(),v4(t),v8(t),t.selfClosing?e._appendElement(t,B.MATHML):e._insertElement(t,B.MATHML),t.ackSelfClosing=!0;break;case q.TABLE:e.treeAdapter.getDocumentMode(e.document)!==U.QUIRKS&&e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=K.IN_TABLE;break;case q.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,B.HTML),ky(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case q.PARAM:case q.TRACK:case q.SOURCE:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case q.IMAGE:t.tagName=V.IMG,t.tagID=q.IMG,kg(e,t);break;case q.BUTTON:e.openElements.hasInScope(q.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1;break;case q.APPLET:case q.OBJECT:case q.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case q.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,vC.RAWTEXT);break;case q.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===K.IN_TABLE||e.insertionMode===K.IN_CAPTION||e.insertionMode===K.IN_TABLE_BODY||e.insertionMode===K.IN_ROW||e.insertionMode===K.IN_CELL?K.IN_SELECT_IN_TABLE:K.IN_SELECT;break;case q.OPTION:case q.OPTGROUP:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,B.HTML);break;case q.NOEMBED:case q.NOFRAMES:kb(e,t);break;case q.FRAMESET:let s;s=e.openElements.tryPeekProperlyNestedBodyElement(),e.framesetOk&&s&&(e.treeAdapter.detachNode(s),e.o
129penElements.popAllUpToHtmlElement(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_FRAMESET);break;case q.TEXTAREA:e._insertElement(t,B.HTML),e.skipNextNewLine=!0,e.tokenizer.state=vC.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=K.TEXT;break;case q.NOSCRIPT:e.options.scriptingEnabled?kb(e,t):kv(e,t);break;case q.PLAINTEXT:e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,B.HTML),e.tokenizer.state=vC.PLAINTEXT;break;case q.COL:case q.TH:case q.TD:case q.TR:case q.HEAD:case q.FRAME:case q.TBODY:case q.TFOOT:case q.THEAD:case q.CAPTION:case q.COLGROUP:break;default:kv(e,t)}}function kx(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],o=e.openElements.tagIDs[t];if(r===o&&(r!==q.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,o))break}}function kw(e,t){switch(t.tagID){case q.A:case q.B:case q.I:case q.S:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.NOBR:case q.SMALL:case q.STRIKE:case q.STRONG:kn(e,t);break;case q.P:e.openElements.hasInButtonScope(q.P)||e._insertFakeElement(V.P,q.P),e._closePElement();break;case q.DL:case q.UL:case q.OL:case q.DIR:case q.DIV:case q.NAV:case q.PRE:case q.MAIN:case q.MENU:case q.ASIDE:case q.BUTTON:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.ADDRESS:case q.ARTICLE:case q.DETAILS:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.LISTING:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:let n;n=t.tagID,e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));break;case q.LI:e.openElements.hasInListItemScope(q.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(q.LI),e.openElements.popUntilTagNamePopped(q.LI));break;case q.DD:case q.DT:let r;r=t.tagID,e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r));break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());break;case q.BR:e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,q.BR),e.openElements.pop(),e.framesetOk=!1;break;case q.BODY:if(e.openElements.hasInScope(q.BODY)&&(e.insertionMode=K.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}break;case q.HTML:e.openElements.hasInScope(q.BODY)&&(e.insertionMode=K.AFTER_BODY,kB(e,t));break;case q.FORM:!function(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(q.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(q.FORM):n&&e.openElements.remove(n))}(e);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:let i;i=t.tagID,e.openElements.hasInScope(i)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(i),e.activeFormattingElements.clearToLastMarker());break;case q.TEMPLATE:kc(e,t);break;default:kx(e,t)}}function kE(e,t){e.tmplInsertionModeStack.length>0?kF(e,t):ki(e,t)}function kT(e,t){if(void 0!==e.openElements.currentTagId&&v7.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=K.IN_TABLE_TEXT,t.type){case z.CHARACTER:kN(e,t);break;case z.WHITESPACE_CHARACTER:k_(e,t)}else kA(e,t)}function kS(e,t){switch(t.tagID){case q.TD:case q.TH:case q.TR:e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,q.TBODY),e.insertionMode=K.IN_TABLE_BODY,kR(e,t);break;case q.STYLE:case q.SCRIPT:case q.TEMPLATE:kl(e,t);break;case q.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,q.COLGROUP),e.insertionMode=K.IN_COLUMN_GROUP,kI(e,t);break;case q.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,B.HTML),e.formElement=e.openElements.current,e.openElements.pop());break;case q.TABLE:e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode(),e._processStartTag(t));break;case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_TABLE_BODY;break;case q.INPUT:ky(t)?e._appendElement(t,B.HTML):kA(e,t),t.ackSelfClosing=!0;break;case q.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_CAPTION;break;case q.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_COLUMN_GROUP;break;default:kA(e,t)}}function kC(e,t){switch(t.tagID){case q.TABLE:e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode());break;case q.TEMPLATE:kc(e,t);break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:kA(e,t)}}function kA(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kp(e,t),e.fosterParentingEnabled=n}
vendor: 5,181 bytes, line 129
129function k_(e,t){e.pendingCharacterTokens.push(t)}function kN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function kO(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)kA(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let kM=new Set([q.CAPTION,q.COL,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]);function kI(e,t){switch(t.tagID){case q.HTML:kk(e,t);break;case q.COL:e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case q.TEMPLATE:kl(e,t);break;default:kD(e,t)}}function kD(e,t){e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=K.IN_TABLE,e._processToken(t))}function kR(e,t){switch(t.tagID){case q.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_ROW;break;case q.TH:case q.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,q.TR),e.insertionMode=K.IN_ROW,kL(e,t);break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE,kS(e,t));break;default:kS(e,t)}}function kz(e,t){let n=t.tagID;switch(t.tagID){case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE);break;case q.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE,kC(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:case q.TR:break;default:kC(e,t)}}function kL(e,t){switch(t.tagID){case q.TH:case q.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,B.HTML),e.insertionMode=K.IN_CELL,e.activeFormattingElements.insertMarker();break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,kR(e,t));break;default:kS(e,t)}}function kP(e,t){switch(t.tagID){case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY);break;case q.TABLE:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,kz(e,t));break;case q.TBODY:case q.TFOOT:case q.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(q.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=K.IN_TABLE_BODY,kz(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:break;default:kC(e,t)}}function kj(e,t){switch(t.tagID){case q.HTML:kk(e,t);break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case q.OPTGROUP:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._insertElement(t,B.HTML);break;case q.HR:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._appendElement(t,B.HTML),t.ackSelfClosing=!0;break;case q.INPUT:case q.KEYGEN:case q.TEXTAREA:case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),t.tagID!==q.SELECT&&e._processStartTag(t));break;case q.SCRIPT:case q.TEMPLATE:kl(e,t)}}function k$(e,t){switch(t.tagID){case q.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===q.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===q.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop();break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop();break;case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode());break;case q.TEMPLATE:kc(e,t)}}function kF(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ki(e,t)}function kB(e,t){var n;if(t.tagID===q.HTML){if(e.fragmentContext||(e.insertionMode=K.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===q.HTML){e._setEndLocation(e.openElements.items[0],t);let r=e.openElements.items[1];!r||(null==(n=e.treeAdapter.getNodeSourceCodeLocation(r))?void 0:n.endTag)||e._setEndLocation(r,t)}}else kH(e,t)}function kH(e,t){e.insertionMode=K.IN_BODY,kp(e,t)}function kU(e,t){e.insertionMode=K.IN_BODY,kp(e,t)}function kV(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==B.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.o
129penElements.current);)e.openElements.pop()}function kq(e,t){return kt.parse(e,t)}function kG(e,t,n){"string"==typeof e&&(n=t,t=e,e=null);let r=kt.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR;let kW=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');kX(e);let r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(i=o):(a=-1,i=s));return r===i?i=s:i<0&&(i=e.length),e.slice(r,i)},kK=function(e){let t;if(kX(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},kJ=function(e){let t;kX(e);let n=e.length,r=-1,i=0,o=-1,s=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1)}return o<0||r<0||0===s||1===s&&o===r-1&&o===i+1?"":e.slice(o,r)},kY=function(...e){var t;let n,r,i,o=-1;for(;++o<e.length;)kX(e[o]),e[o]&&(i=void 0===i?e[o]:i+"/"+e[o]);return void 0===i?".":(kX(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),s=l,a=0;continue}}else if(i.length>0){i="",o=0,s=l,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(s+1,l):i=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function kX(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function kQ(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let kZ=["history","path","basename","stem","extname","dirname"];class k0{constructor(e){let t,n;t=e?kQ(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<kZ.length;){const e=kZ[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)kZ.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?kW(this.path):void 0}set basename(e){k2(e,"basename"),k1(e,"basename"),this.path=kY(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?kK(this.path):void 0}set dirname(e){k5(this.basename,"dirname"),this.path=kY(e||"",this.basename)}get extname(){return"string"==typeof this.path?kJ(this.path):void 0}set extname(e){if(k1(e,"extname"),k5(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=kY(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){kQ(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!kQ(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),k2(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?kW(this.path,this.extname):void 0}set stem(e){k2(e,"stem"),k1(e,"stem"),this.path=kY(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new oV(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function k1(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function k2(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function k5(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let k3={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"}
129,abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"}
129,missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}}
129,k4=/-[a-z]/g,k6=/%c(?:([-+])(\d+))?/g,k8=/%x/g,k9={2:!0,1:!1,0:null},k7={};function xe(e){return e.charAt(1).toUpperCase()}let xt="object"==typeof self?self:globalThis,xn=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[o,s]=e[i];switch(o){case 0:case -1:return n(s,i);case 1:{let e=n([],i);for(let t of s)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),i);case 4:{let{source:e,flags:t}=s;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of s)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of s)e.add(r(t));return e}case 7:{let{name:e,message:t}=s;return n(new xt[e](t),i)}case 8:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(new xt[o](s),i)})(0)},{toString:xr}={},{keys:xi}=Object,xo=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=xr.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},xs=([e,t])=>0===e&&("function"===t||"symbol"===t),xa=(e,{json:t,lossy:n}={})=>{var r,i,o;let s,a,l=[];return(r=!(t||n),i=!!t,o=new Map,s=(e,t)=>{let n=l.push(e)-1;return o.set(t,n),n},a=e=>{if(o.has(e))return o.get(e);let[t,n]=xo(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return s([-1],e)}return s([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),s([n,[...t]],e)}let r=[],i=s([t,r],e);for(let t of e)r.push(a(t));return i}case 2:{if(n)switch(n){case"BigInt":return s([n,e.toString()],e);case"Boolean":case"Number":case"String":return s([n,e.valueOf()],e)}if(i&&"toJSON"in e)return a(e.toJSON());let o=[],l=s([t,o],e);for(let t of xi(e))(r||!xs(xo(e[t])))&&o.push([a(t),a(e[t])]);return l}case 3:return s([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return s([t,{source:n,flags:r}],e)}case 5:{let n=[],i=s([t,n],e);for(let[t,i]of e)(r||!(xs(xo(t))||xs(xo(i))))&&n.push([a(t),a(i)]);return i}case 6:{let n=[],i=s([t,n],e);for(let t of e)(r||!xs(xo(t)))&&n.push(a(t));return i}}let{message:l}=e;return s([t,{name:n,message:l}],e)})(e),l},xl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?xn(xa(e,t)):structuredClone(e):(e,t)=>xn(xa(e,t)),xc=function(e){if(null==e)return xu;if("string"==typeof e){var t;return t=e,xd(function(e){return e.tagName===t})}if("object"==typeof e){var n=e;let t=[],r=-1;for(;++r<n.length;)t[r]=xc(n[r]);return xd(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}if("function"==typeof e)return xd(e);throw Error("Expected function, string, or array as `test`")};function xd(e){return function(t,n,r){var i;return!!(null!==(i=t)&&"object"==typeof i&&"type"in i&&"tagName"in i&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function xu(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}let xh=xc(function(e){return"audio"===e.tagName||"canvas"===e.tagName||"embed"===e.tagName||"iframe"===e.tagName||"img"===e.tagName||"math"===e.tagName||"object"===e.tagName||"picture"===e.tagName||"svg"===e.tagName||"video"===e.tagName}),xp=/[ \t\n\f\r]/g;function xf(e){return"object"==typeof e?"text"===e.type&&xm(e.value):xm(e)}function xm(e){return""===e.replace(xp,"")}let xg=function(e,t,n,r,i){let o=xy(t);if(null!=n&&("number"!=typeof n||n<0||n===1/0))throw Error("Expected positive finite index");if(null!=r&&(!xg(r)||!r.children))throw Error("Expected parent node");if(null==r!=(null==n))throw Error("Expected both parent and index");return!!xk(e)&&o.call(i,e,n,r)},xy=function(e){var t,n;if(null==e)return xv;if("function"==typeof e)return xb(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=xy(e[n]);return xb(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,xb(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,xb(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function xb(e){return function(t,n,r){return!!(xk(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function xv(){return!0}function xk(e){return null!==e&&"object"==typeof e&&"type"in e}xy(["comment","doctype"]);let xx=[],xw="skip";function xE(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let o=xy(i),s=r?-1:1;(function e(i,a,l){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return d;function d(){var c;let d,u,h,p=xx;if((!t||o(i,a,l[l.length-1]||void 0))&&!1===(p=Array.isArray(c=n(i,l))?c:"number"==typeof c?[!0,c]:null==c?xx:[c])[0])return p;if("children"in i&&i.children&&i.children&&p[0]!==xw)for(u=(r?i.children.length:-1)+s,h=l.concat(i);u>-1&&u<i.children.length;){if(!1===(d=e(i.children[u],u,h)())[0])return d;u="number"==typeof d[1]?d[1]:u+s}return p}})(e,void 0,[])()}function xT(e,t,n,r){let i,o,s;"function"==typeof t&&"function"!=typeof n?(o=void 0,s=t,i=n):(o=t,s=n,i=r),xE(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},i)}function xS(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}xS("end"),xS("start"),xc("br"),xc(function(e){return"td"===e.tagName||"th"===e.tagName}),xc("p"),xc("tr"),xc(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return!!(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),xc(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);let xC=new Set(["pingback","prefetch","stylesheet"]),xA=xc(["a","abbr","area","b","bdi","bdo","br","button","cite","code","data","datalist","del","dfn","em","i","input","ins","kbd","keygen","label","map","mark","meter","noscript","output","progress","q","ruby","s","samp","script","select","small","span","strong","sub","sup","template","textarea","time","u","var","wbr"]),x_=xc("meta"),xN={};function xO(e,t){let n=t||xN;return xM(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}
129function xM(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 xI(e.children,t,n)}return Array.isArray(e)?xI(e,t,n):""}function xI(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=xM(e[i],t,n);return r.join("")}let xD=xy(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xR(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}let xz=xW(/[A-Za-z]/),xL=xW(/[\dA-Za-z]/),xP=xW(/[#-'*+\--9=?A-Z^-~]/);function xj(e){return null!==e&&(e<32||127===e)}let x$=xW(/\d/),xF=xW(/[\dA-Fa-f]/),xB=xW(/[!-/:-@[-`{-~]/);function xH(e){return null!==e&&e<-2}function xU(e){return null!==e&&(e<0||32===e)}function xV(e){return -2===e||-1===e||32===e}let xq=xW(/\p{P}|\p{S}/u),xG=xW(/\s/);function xW(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function xK(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let xJ="phrasing",xY=["autolink","link","image","label"];function xX(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xQ(e){this.config.enter.autolinkProtocol.call(this,e)}function xZ(e){this.config.exit.autolinkProtocol.call(this,e)}function x0(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];bE(t.type),t.url="http://"+this.sliceSerialize(e)}function x1(e){this.config.exit.autolinkEmail.call(this,e)}function x2(e){this.exit(e)}function x5(e){!function(e,t,n){let r=xy((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(xK(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),o=-1;for(;++o<i.length;)xE(e,"text",s);function s(e,t){let n,s=-1;for(;++s<t.length;){let e=t[s],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[o][0],s=i[o][1],a=0,l=n.children.indexOf(e),c=!1,d=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){let n=u.index,i={index:u.index,input:u.input,stack:[...t,e]},o=s(...u,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(a!==n&&d.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(o)?d.push(...o):o&&d.push(o),a=n+u[0].length,c=!0),!r.global)break;u=r.exec(e.value)}return c?(a<e.value.length&&d.push({type:"text",value:e.value.slice(a)}),n.children.splice(l,1,...d)):d=[e],l+d.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,x3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,x4]],{ignore:["link","linkReference"]})}function x3(e,t,n,r,i){let o,s="";if(!x6(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",s="http://"),(o=n.split(".")).length<2||o[o.length-1]&&(/_/.test(o[o.length-1])||!/[a-zA-Z\d]/.test(o[o.length-1]))||o[o.length-2]&&(/_/.test(o[o.length-2])||!/[a-zA-Z\d]/.test(o[o.length-2])))return!1;let a=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=xR(e,"("),o=xR(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;let l={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function x4(e,t,n,r){return!(!x6(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function x6(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||xG(n)||xq(n))&&(!t||47!==n)}function x8(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function x9(){this.buffer()}function x7(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function we(){this.buffer()}function wt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wn(e){let t=this.resume(),n=this.stack[this.stack.length-1];bE(n.type),n.identifier=x8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wr(e){this.exit(e)}function wi(e){let t=this.resume(),n=this.stack[this.stack.length-1];bE(n.type),n.identifier=x8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wo(e){this.exit(e)}function ws(e,t,n,r){let i=n.createTracker(r),o=i.move("[^"),s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]")}function wa(e,t,n){return 0===t?e:wl(e,t,n)}function wl(e,t,n){return(n?"":" ")+e}ws.peek=function(){return"["};let wc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function wd(e){this.enter({type:"delete",children:[]},e)}function wu(e){this.exit(e)}function wh(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function wp(e){return e.length}function wf(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)}function wm(e,t,n){return">"+(n?"":" ")+e}function wg(e,t){return wy(e,t.inConstruct,!0)&&!wy(e,t.notInConstruct,!1)}function wy(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 wb(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&wg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function wv(e,t){let n=String(e),r=n.indexOf(t),i=r,o=0,s=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function wk(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 wx(e,t,n){return(n?"":" ")+e}function ww(e){let t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wT(e){return null===e||xU(e)||xG(e)?1:xq(e)?2:void 0}function wS(e,t,n){let r=wT(e),i=wT(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 wC(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"),s=n.createTracker(r),a=s.move(i),l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()})),c=l.charCodeAt(0),d=wS(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=wE(c)+l.slice(1));let u=l.charCodeAt(l.length-1),h=wS(r.after.charCodeAt(0),u,i);h.inside&&(l=l.slice(0,-1)+wE(u));let p=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},a+l+p}function wA(e,t){let n=!1;return xT(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)&&xO(e)&&(t.options.setext||n))}function w_(e){return e.value||""}function wN(e,t,n,r){let i=ww(n),o='"'===i?"Quote":"Apostrophe",s=n.enter("image"),a=n.enter("label"),l=n.createTracker(r),c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),s(),c}function wO(e,t,n,r){let i=e.referenceType,o=n.enter("imageReference"),s=n.enter("label"),a=n.createTracker(r),l=a.move("!["),c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();let d=n.stack;n.stack=[],s=n.enter("reference");let u=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=d,o(),"full"!==i&&c&&c===u?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(u+"]"),l}function wM(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 wI(e,t){let n=xO(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 wD(e,t,n,r){let i,o,s=ww(n),a='"'===s?"Quote":"Apostrophe",l=n.createTracker(r);
129if(wI(e,n)){let t=n.stack;n.stack=[],i=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),i(),n.stack=t,r}i=n.enter("link"),o=n.enter("label");let c=l.move("[");return c+=l.move(n.containerPhrasing(e,{before:c,after:"](",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=l.move(" "+s),c+=l.move(n.safe(e.title,{before:c,after:s,...l.current()})),c+=l.move(s),o()),c+=l.move(")"),i(),c}function wR(e,t,n,r){let i=e.referenceType,o=n.enter("linkReference"),s=n.enter("label"),a=n.createTracker(r),l=a.move("["),c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),s();let d=n.stack;n.stack=[],s=n.enter("reference");let u=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=d,o(),"full"!==i&&c&&c===u?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(u+"]"),l}function wz(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 wL(e){let t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function wP(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"),s=n.createTracker(r),a=s.move(i+i),l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()})),c=l.charCodeAt(0),d=wS(r.before.charCodeAt(r.before.length-1),c,i);d.inside&&(l=wE(c)+l.slice(1));let u=l.charCodeAt(l.length-1),h=wS(r.after.charCodeAt(0),u,i);h.inside&&(l=l.slice(0,-1)+wE(u));let p=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},a+l+p}wh.peek=function(){return"~"},wC.peek=function(e,t,n){return n.options.emphasis||"*"},w_.peek=function(){return"<"},wN.peek=function(){return"!"},wO.peek=function(){return"!"},wM.peek=function(){return"`"},wD.peek=function(e,t,n){return wI(e,n)?"<":"["},wR.peek=function(){return"["},wP.peek=function(e,t,n){return n.options.strong||"*"};let wj={blockquote:function(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let s=n.indentLines(n.containerFlow(e,o.current()),wm);return i(),s},break:wb,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||"",s="`"===i?"GraveAccent":"Tilde";if(wk(e,n)){let e=n.enter("codeIndented"),t=n.indentLines(o,wx);return e(),t}let a=n.createTracker(r),l=i.repeat(Math.max(wv(o,i)+1,3)),c=n.enter("codeFenced"),d=a.move(l);if(e.lang){let t=n.enter(`codeFencedLang${s}`);d+=a.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${s}`);d+=a.move(" "),d+=a.move(n.safe(e.meta,{before:d,after:"\n",encode:["`"],...a.current()})),t()}return d+=a.move("\n"),o&&(d+=a.move(o+"\n")),d+=a.move(l),c(),d},definition:function(e,t,n,r){let i=ww(n),o='"'===i?"Quote":"Apostrophe",s=n.enter("definition"),a=n.enter("label"),l=n.createTracker(r),c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),s(),c},emphasis:wC,hardBreak:wb,heading:function(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(wA(e,n)){let t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===i?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}let s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=wE(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c},html:w_,image:wN,imageReference:wO,inlineCode:wM,link:wD,linkReference:wR,list:function(e,t,n,r){let i=n.enter("list"),o=n.bulletCurrent,s=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):wz(n),a=e.ordered?"."===s?")":".":function(e){let t=wz(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),l=!!t&&!!n.bulletLastUsed&&s===n.bulletLastUsed;if(!e.ordered){let t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!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]||
1290!==n.indexStack[n.indexStack.length-3]||(l=!0),wL(n)===s&&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){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;let c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c},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||wz(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 s=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));let a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(s))+e:(n?o:o+" ".repeat(s-o.length))+e});return l(),c},paragraph:function(e,t,n,r){let i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s},root:function(e,t,n,r){return(e.children.some(function(e){return xD(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:wP,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){let r=(wL(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}};function w$(e){let t=e._align;bE(),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function wF(e){this.exit(e),this.data.inTable=void 0}function wB(e){this.enter({type:"tableRow",children:[]},e)}function wH(e){this.exit(e)}function wU(e){this.enter({type:"tableCell",children:[]},e)}function wV(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wq));let n=this.stack[this.stack.length-1];bE(n.type),n.value=t,this.exit(e)}function wq(e,t){return"|"===t?t:e}function wG(e){let t=this.stack[this.stack.length-2];bE(t.type),t.checked="taskListCheckValueChecked"===e.type}function wW(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];bE(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 wK(e,t,n,r){let i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let l=wj.listItem(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),l}function wJ(e,t,n,r){let i,o=e.length,s=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);s<r.length;)(i=r.slice(s,s+1e4)).unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function wY(e,t){return e.length>0?(wJ(e,e.length,0,t),e):t}let wX={}.hasOwnProperty;function wQ(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(wX.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(r in o){wX.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]);wJ(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let wZ={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},w0={tokenize:function(e,t,n){let r,i,o;return s;function s(t){return 46===t||95===t?e.check(w2,l,a)(t):null===t||xU(t)||xG(t)||45!==t&&xq(t)?l(t):(o=!0,e.consume(t),s)}function a(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),s}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},w1={tokenize:function(e,t){let n=0,r=0;return i;function i(s){return 40===s?(n++,e.consume(s),i):41===s&&r<n?o(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(w2,t,o)(s):null===s||xU(s)||xG(s)?t(s):(e.consume(s),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},w2={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),o):93===s?(e.consume(s),i):60===s||null===s||xU(s)||xG(s)?t(s):n(s)}function i(e){return null===e||40===e||91===e||xU(e)||xG(e)?t(e):r(e)}function o(t){return xz(t)?function t(i){return 59===i?(e.consume(i),r):xz(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},w5={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return xL(e)?n(e):t(e)}},partial:!0},w3={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!w7.call(r,r.previous)||Er(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wZ,e.attempt(w0,e.attempt(w1,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:w7},w4={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",o=!1;return function(t){return(72===t||104===t)&&Ee.call(r,r.previous)&&!Er(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),s):n(t)};function s(t){if(xz(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),o)?l:(o=!0,a):n(t)}function l(t){return null===t||xj(t)||xU(t)||xG(t)||xq(t)?n(t):e.attempt(w0,e.attempt(w1,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Ee},w6={name:"emailAutolink",tokenize:function(e,t,n){let r,i,o=this;return function(t){return!En(t)||!Et.call(o,o.previous)||Er(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return En(r)?(e.consume(r),t):64===r?(e.consume(r),s):n(r)}(t))};function s(t){return 46===t?e.check(w5,l,a)(t):45===t||95===t||xL(t)?(i=!0,e.consume(t),s):l(t)}function a(t){return e.consume(t),r=!0,s}function l(s){return i&&r&&xz(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:Et},w8={},w9=48;for(;w9<123;)w8[w9]=w6,58==++w9?w9=65:91===w9&&(w9=97);function w7(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||xU(e)}function Ee(e){return!xz(e)}function Et(e){return!(47===e||En(e))}function En(e){return 43===e||45===e||46===e||95===e||xL(e)}function Er(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Ei(e,t,n,r){let i=r?r-1:1/0,o=0;return function(r){return xV(r)?(e.enter(n),function r(s){return xV(s)&&o++<i?(e.consume(s),r):(e.exit(n),t(s))}(r)):t(r)}}w8[43]=w6,w8[45]=w6,w8[46]=w6,w8[95]=w6,w8[72]=[w6,w4],w8[104]=[w6,w4],w8[87]=[w6,w3],w8[119]=[w6,w3];let Eo={partial:!0,tokenize:function(e,t,n){return function(t){return xV(t)?Ei(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||xH(e)?t(e):n(e)}}},Es={tokenize:function(e,t,n){let r=this;return Ei(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ea(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Eu,continuation:{tokenize:Eh},exit:Ep}},text:{91:{name:"gfmFootnoteCall",tokenize:Ed},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:El,resolveTo:Ec}}}}function El(e,t,n){let r,i=this,o=i.events.length,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;o--;){let e=i.events[o][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}
129return function(o){if(!r||!r._balanced)return n(o);let a=x8(i.sliceSerialize({start:r.end,end:i.now()}));return 94===a.codePointAt(0)&&s.includes(a.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)):n(o)}}function Ec(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Ed(e,t,n){let r,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(a){if(s>999||93===a&&!r||null===a||91===a||xU(a))return n(a);if(93===a){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return o.includes(x8(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return xU(a)||(r=!0),s++,e.consume(a),92===a?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}}function Eu(e,t,n){let r,i,o=this,s=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(a>999||93===t&&!i||null===t||91===t||xU(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=x8(o.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return xU(t)||(i=!0),a++,e.consume(t),92===t?d:c}function d(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s.includes(r)||s.push(r),Ei(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function Eh(e,t,n){return e.check(Eo,t,e.attempt(Es,t,n))}function Ep(e){e.exit("gfmFootnoteDefinition")}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}class Em{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 Eg(){return{flow:{null:{name:"table",tokenize:Ey,resolveAll:Eb}}}}function Ey(e,t,n){let r,i=this,o=0,s=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?b:a;return o===b&&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,s+=1),l(n)}function l(t){return null===t?n(t):xH(t)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):xV(t)?Ei(e,l,"whitespace")(t):(s+=1,r&&(r=!1,o+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,l):(e.enter("data"),c(t))}function c(t){return null===t||124===t||xU(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?d:c)}function d(t){return 92===t||124===t?(e.consume(t),c):c(t)}function u(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,xV(t))?Ei(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t)}function h(t){return 45===t||58===t?f(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return xV(t)?Ei(e,f,"whitespace")(t):f(t)}
129function f(t){return 58===t?(s+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(s+=1,m(t)):null===t||xH(t)?y(t):n(t)}function m(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"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return xV(t)?Ei(e,y,"whitespace")(t):y(t)}function y(i){if(124===i)return h(i);if(null===i||xH(i))return r&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function b(t){return e.enter("tableRow"),v(t)}function v(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),v):null===n||xH(n)?(e.exit("tableRow"),t(n)):xV(n)?Ei(e,v,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||xU(t)?(e.exit("data"),v(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function Eb(e,t){let n,r,i,o=-1,s=!0,a=0,l=[0,0,0,0],c=[0,0,0,0],d=!1,u=0,h=new Em;for(;++o<e.length;){let p=e[o],f=p[1];"enter"===p[0]?"tableHead"===f.type?(d=!1,0!==u&&(Ek(h,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(s=!0,i=void 0,l=[0,0,0,0],c=[0,o+1,0,0],d&&(d=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(o,0,[["enter",r,t]])),a="tableDelimiterRow"===f.type?2:r?3:1):a&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(s=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=Ev(h,t,l,a,void 0,i),l=[0,0,0,0]),c[2]=o)):"tableCellDivider"===f.type&&(s?s=!1:(0!==l[1]&&(c[0]=c[1],i=Ev(h,t,l,a,void 0,i)),c=[(l=c)[1],o,0,0])):"tableHead"===f.type?(d=!0,u=o):"tableRow"===f.type||"tableDelimiterRow"===f.type?(u=o,0!==l[1]?(c[0]=c[1],i=Ev(h,t,l,a,o,i)):0!==c[1]&&(i=Ev(h,t,c,a,o,i)),a=0):a&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(c[3]=o)}for(0!==u&&Ek(h,t,u,n,r),h.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 Ev(e,t,n,r,i,o){0!==n[0]&&(o.end=Object.assign({},Ex(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));let s=Ex(t.events,n[1]);if(o={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){let i=Ex(t.events,n[2]),o=Ex(t.events,n[3]),s={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",s,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",s,t]])}return void 0!==i&&(o.end=Object.assign({},Ex(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Ek(e,t,n,r,i){let o=[],s=Ex(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ex(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let Ew={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 xU(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"),s):n(t)}function s(r){return xH(r)?t(r):xV(r)?e.check({tokenize:EE},t,n)(r):n(r)}}};function EE(e,t,n){return Ei(e,function(e){return null===e?n(e):t(e)},"whitespace")}let ET={};function ES(e){var t;let n,r,i,o=e||ET,s=this.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),l=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),c=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push((t=o,wQ([{text:w8},Ea(),(n=(t||{}).singleTilde,r={name:"strikethrough",tokenize:function(e,t,r){let i=this.previous,o=this.events,s=0;return function(a){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(a):(e.enter("strikethroughSequenceTemporary"),function o(a){let l=wT(i);if(126===a)return s>1?r(a):(e.consume(a),s++,o);if(s<2&&!n)return r(a);let c=e.exit("strikethroughSequenceTemporary"),d=wT(a);return c._open=!d||2===d&&!!l,c._close=!l||2===l&&!!d,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)},s=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],a=t.parser.constructs.insideSpan.null;a&&wJ(s,s.length,0,Ef(a,e.slice(r+1,n),t)),wJ(s,s.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),wJ(e,r-1,n-r+3,s),n=r+s.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==n&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}),Eg(),{text:{91:Ew}}]))),l.push([{transforms:[x5],enter:{literalAutolink:xX,literalAutolinkEmail:xQ,literalAutolinkHttp:xQ,literalAutolinkWww:xQ},exit:{literalAutolink:x2,literalAutolinkEmail:x1,literalAutolinkHttp:xZ,literalAutolinkWww:x0}}
129,{enter:{gfmFootnoteCallString:x9,gfmFootnoteCall:x7,gfmFootnoteDefinitionLabelString:we,gfmFootnoteDefinition:wt},exit:{gfmFootnoteCallString:wn,gfmFootnoteCall:wr,gfmFootnoteDefinitionLabelString:wi,gfmFootnoteDefinition:wo}},{canContainEols:["delete"],enter:{strikethrough:wd},exit:{strikethrough:wu}},{enter:{table:w$,tableData:wU,tableHeader:wU,tableRow:wB},exit:{codeText:wV,table:wF,tableData:wH,tableHeader:wH,tableRow:wH}},{exit:{taskListCheckValueChecked:wG,taskListCheckValueUnchecked:wG,paragraph:wW}}]),c.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xJ,notInConstruct:xY},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xJ,notInConstruct:xY},{character:":",before:"[ps]",after:"\\/",inConstruct:xJ,notInConstruct:xY}]},(i=!1,o&&o.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:function(e,t,n,r){let o=n.createTracker(r),s=o.move("[^"),a=n.enter("footnoteDefinition"),l=n.enter("label");return s+=o.move(n.safe(n.associationId(e),{before:s,after:"]"})),l(),s+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),s+=o.move((i?"\n":" ")+n.indentLines(n.containerFlow(e,o.current()),i?wl:wa))),a(),s},footnoteReference:ws},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wc}],handlers:{delete:wh}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";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=wj.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return a(function(e,t,n){let r=e.children,i=-1,o=[],s=t.enter("table");for(;++i<r.length;)o[i]=l(r[i],t,n);return s(),o}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){let i=a([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function s(e,t,n,r){let i=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:o,after:o});return s(),i(),a}function a(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||wp,o=[],s=[],a=[],l=[],c=0,d=-1;for(;++d<e.length;){let t=[],r=[],o=-1;for(e[d].length>c&&(c=e[d].length);++o<e[d].length;){var u;let s=null==(u=e[d][o])?"":String(u);if(!1!==n.alignDelimiters){let e=i(s);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(s)}s[d]=t,a[d]=r}let h=-1;if("object"==typeof r&&"length"in r)for(;++h<c;)o[h]=wf(r[h]);else{let e=wf(r);for(;++h<c;)o[h]=e}h=-1;let p=[],f=[];for(;++h<c;){let e=o[h],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[h]-t.length-r.length),s=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>l[h]&&(l[h]=i),f[h]=i),p[h]=s}s.splice(1,0,p),a.splice(1,0,f),d=-1;let m=[];for(;++d<s.length;){let e=s[d],t=a[d];h=-1;let r=[];for(;++h<c;){let i=e[h]||"",s="",a="";if(!1!==n.alignDelimiters){let e=l[h]-(t[h]||0),n=o[h];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):a=s=" ".repeat(e/2):a=" ".repeat(e)}!1===n.delimiterStart||h||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||h)&&r.push(" "),!1!==n.alignDelimiters&&r.push(s),r.push(i),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||h!==c-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){let r=e.children,i=-1,o=[],a=t.enter("tableRow");for(;++i<r.length;)o[i]=s(r[i],e,t,n);return a(),o}}(o),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wK}}]})}let EC={}.hasOwnProperty;function EA(e,t){let n=t||{};function r(t,...n){let i=r.invalid,o=r.handlers;if(t&&EC.call(t,e)){let n=String(t[e]);i=EC.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}let E_={}.hasOwnProperty,EN=[function(e,t,n,r){if("code"===t.type&&wk(t,r)&&("list"===e.type||e.type===t.type&&wk(e,r)))return!1;
129if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&wA(t,r)))return;return+!!n.spread}}],EO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],EM=[{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:EO},{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:EO},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:EO},{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:EO},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:EO},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:EO},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:EO},{atBreak:!0,character:"~"}],EI=document.createElement("i");function ED(e){let t="&"+e+";";EI.innerHTML=t;let n=EI.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function ER(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 Ez=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EL(e){return e.replace(Ez,EP)}function EP(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return ER(n.slice(t?2:1),t?16:10)}return ED(n)||e}function Ej(e){return e.label||!e.identifier?e.label||"":EL(e.identifier)}function E$(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 EF=/\r?\n|\r/g;function EB(e,t){let n,r=[],i=0,o=0;for(;n=EF.exec(e);)s(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,o++;return s(e.slice(i)),r.join("");function s(e){r.push(t(e,o,!e))}}function EH(e,t){return e-t}function EU(e,t){let n,r=/\\(?=[!-/:-@[-`{-~])/g,i=[],o=[],s=e+t,a=-1,l=0;for(;n=r.exec(s);)i.push(n.index);for(;++a<i.length;)l!==i[a]&&o.push(e.slice(l,i[a])),o.push("\\"),l=i[a];return o.push(e.slice(l)),o.join("")}function EV(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),s=n[n.length-1];return i+=n.length-1,o=1===n.length?o+s.length:1+s.length+r,t},current:function(){return{now:{line:i,column:o},lineShift:r}},shift:function(e){r+=e}}}function Eq(e){throw Error("Cannot handle value `"+e+"`, expected node")}function EG(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function EW(e,t){if("definition"===e.type&&e.type===t.type)return 0}function EK(e,t){return function(e,t,n){let r,i=t.indexStack,o=e.children||[],s=[],a=-1,l=n.before;i.push(-1);let c=t.createTracker(n);for(;++a<o.length;){let d,u=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),d=n?n(o[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else d=n.after;s.length>0&&("\r"===l||"\n"===l)&&"html"===u.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",(c=t.createTracker(n)).move(s.join("")));let h=t.handle(u,e,t,{...c.current(),after:d,before:l});r&&r===h.slice(0,1)&&(h=wE(r.charCodeAt(0))+h.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,r=void 0,p&&(s.length>0&&p.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+wE(l.charCodeAt(0))),p.after&&(r=d)),c.move(h),s.push(h),l=h.slice(-1)}return i.pop(),s.join("")}(e,this,t)}function EJ(e,t){return function(e,t,n){let r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[],a=-1;for(r.push(-1);++a<i.length;){let n=i[a];r[r.length-1]=a,s.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&&s.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(),s.join("")}(e,this,t)}function EY(e,t){return function(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={},a=-1;for(;++a<e.unsafe.length;){let t,n=e.unsafe[a];if(!wg(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)?(s[o].before&&!e&&(s[o].before=!1),s[o].after&&!r&&(s[o].after=!1)):(i.push(o),s[o]={before:e,after:r})}}i.sort(EH);let l=n.before?n.before.length:0,c=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let e=i[a];!(e<l)&&!(e>=c)&&(!(e+1<c)||i[a+1]!==e+1||!s[e].after||s[e+1].before||s[e+1].after)&&(i[a-1]!==e-1||!s[e].before||s[e-1].before||s[e-1].after)&&(l!==e&&o.push(EU(r.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(o.push(wE(r.charCodeAt(e))),l++):o.push("\\"))}return o.push(EU(r.slice(l,c),n.after)),o.join("")}(this,e,t)}function EX(e){let t=this;t.compiler=function(n){var r;let i,o;return r={...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]},!function e(t,n){var r,i,o,s;let a,l=-1;if(n.extensions)for(;++l<n.extensions.length;)e(t,n.extensions[l]);for(a in n)if(E_.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],(s=n[a])&&Object.assign(o,s);break;default:t.options[a]=n[a]}return t}(i={associationId:Ej,containerPhrasing:EK,containerFlow:EJ,createTracker:EV,compilePattern:E$,enter:function(e){return i.stack.push(e),function(){i.stack.pop()}},handlers:{...wj},handle:void 0,indentLines:EB,indexStack:[],join:[...EN],options:{},safe:EY,stack:[],unsafe:[...EM]},r||{}),i.options.tightDefinitions&&i.join.push(EW),i.handle=EA("type",{invalid:Eq,unknown:EG,handlers:i.handlers}),(o=i.handle(n,void 0,i,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0}
129))&&10!==o.charCodeAt(o.length-1)&&13!==o.charCodeAt(o.length-1)&&(o+="\n"),o}}function EQ(e){if(e)throw e}var EZ=e.i(975609);function E0(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function E1(e,t){let n;return function(...t){let o,s=e.length>t.length;s&&t.push(r);try{o=e.apply(this,t)}catch(e){if(s&&n)throw e;return r(e)}s||(o&&o.then&&"function"==typeof o.then?o.then(i,r):o instanceof Error?r(o):i(o))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}}let E2=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},E5={}.hasOwnProperty,E3=new class e extends E2{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(o,...s){let a=e[++n],l=-1;if(o)return void r(o);for(;++l<t.length;)(null===s[l]||void 0===s[l])&&(s[l]=t[l]);t=s,a?E1(a,i)(...s):r(null,...s)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,EZ.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2==arguments.length?(E8("data",this.frozen),this.namespace[e]=t,this):E5.call(this.namespace,e)&&this.namespace[e]||void 0:e?(E8("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Te(e),n=this.parser||this.Parser;return E4("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),E4("process",this.parser||this.Parser),E6("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let o=Te(e),s=n.parse(o);function a(e,n){e||!n?i(e):r?r(n):(bE(),t(void 0,n))}n.run(s,o,function(e,t,r){var i,o;if(e||!t||!r)return a(e);let s=n.stringify(t,r);"string"==typeof(i=s)||(o=i)&&"object"==typeof o&&"byteLength"in o&&"byteOffset"in o?r.value=s:r.result=s,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),E4("processSync",this.parser||this.Parser),E6("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,EQ(e),t=r}),E7("processSync","process",n),bE(),t}run(e,t,n){E9(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){bE();let s=Te(t);r.run(e,s,function(t,r,s){let a=r||e;t?o(t):i?i(a):(bE(),n(void 0,a,s))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){EQ(e),n=t,r=!0}),E7("runSync","run",r),bE(),n}stringify(e,t){this.freeze();let n=Te(t),r=this.compiler||this.Compiler;return E6("stringify",r),E9(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(E8("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else if("object"==typeof e)Array.isArray(e)?o(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,EZ.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)s(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,s=n[i][1];E0(s)&&E0(r)&&(r=(0,EZ.default)(!0,s,r)),n[i]=[e,r,...o]}}}}().freeze();function E4(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function E6(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function E8(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function E9(e){if(!E0(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}
129function E7(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Te(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new k0(e)}function Tt(e,t){return(n,r,i)=>{let o=i.all(n);return{type:e,...t?.(n),children:o}}}function Tn(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}function Tr(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ti(e){throw Error(`unknown markdown node: ${e.type}`)}function To(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ts(){}function Ta(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function Tl(e,t,n,r,i,o){return EA("type",{invalid:Ta,unknown:Ti,handlers:{toml:Ts,yaml:Ts,definition:Ts,footnoteDefinition:Ts,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){var r,i,s;let a,l,c,d,u,h=(r=t.value,a=k7.onerror,l=r instanceof k0?r:new k0(r),c=k7.fragment?kG:kq,i=c(d=String(l),{sourceCodeLocationInfo:!0,onParseError:k7.onerror?function(e){let t=e.code,n=t.replace(k4,xe),r=k7[n],i=null==r||r,o="number"==typeof i?i:+!!i;if(o){let r=k3[n];bE();let i=new oV(s(r.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:"hast-util-from-html"});l.path&&(i.file=l.path,i.name=l.path+":"+i.name),i.fatal=k9[o],i.note=s(r.description),i.url=!1===r.url?void 0:"https://html.spec.whatwg.org/multipage/parsing.html#parse-error-"+t,bE(),a(i)}function s(t){return t.replace(k6,function(t,n,r){var i;let o=(r?Number.parseInt(r,10):0)*("-"===n?-1:1);return"`"===(i=d.charAt(e.startOffset+o))?"` ` `":i}).replace(k8,function(){return"0x"+d.charCodeAt(e.startOffset).toString(16).toUpperCase()})}}:null,scriptingEnabled:!1}),vr({file:(u={file:l,space:k7.space,verbose:k7.verbose}).file||void 0,location:!1,schema:"svg"===u.space?bY:bJ,verbose:u.verbose||!1},i)).children[0];if(h?.type!=="element")return null;let[,p]=h.children;if(p?.type!=="element")return null;let f=p.children[0];if(f?.type!=="element")return null;let m=(s=void 0,EA("tagName",{handlers:n})(f,s,o));return m||(t.value?e.text(t.value):null)},text:t=>e.text((function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];for(;r;)o.push(Tr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Tr(t.slice(i),i>0,!1)),o.join("")})(String(t.value)).replaceAll(/\n([^\n])/g," $1")),...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let o=String(n.identifier).toUpperCase(),s=i.definitionById.get(o);if(!s)return function(e,t,n){let r=t.referenceType,i="]";if("collapsed"===r?i+="[]":"full"===r&&(i+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[e.text("!["+(t.alt??"")+i)];let o=n.all(t),s=o[0];s&&s.type===e.nodes.text?o[0]=s.copy(oJ.from(e.text("["+(s.text??"")))):o.unshift(e.text("["));let a=o[o.length-1];return a&&a.type===e.nodes.text?o[o.length-1]=a.copy(oJ.from(e.text((a.text??"")+i))):o.push(e.text(i)),o}(e,n,i);let a={type:"link",url:s.url,title:s.title,children:n.children,data:{...s.data,...n.data}};return t.link?.(a,r,i)}}})(r,i,o)}function Tc(e,t){return(n,r,i)=>{let o=i.all(n);return e.createAndFill(t?.(n)??null,o)}}function Td(e,t){return(n,r,i)=>{let o=i.all(n),s=e.create(t?.(n)??null);return o.map(e=>e.mark(s.addToSet(e.marks)))}}let Tu=function(e,t){var n,r,i;let o,s,a,l=Tl(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,(n=t.schema,r=t.handlers,i=t.htmlHandlers??{},o=new Map,a={all:function(e){let t=[];if("children"in e){let r=e.children,i=-1;for(;++i<r.length;){let o=a.one(r[i],e);if(o){if(i&&r[i-1]?.type==="break"&&(Array.isArray(o)||o.type!==n.nodes.text||(o=n.text(To(o.text))),!Array.isArray(o)&&o.type!==n.nodes.text)){let e=o.firstChild;e&&e.type===n.nodes.text&&(o=o.copy(oJ.from(o.content).replaceChild(0,n.text(To(e.text)))))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},definitionById:o,footnoteById:s=new Map,footnoteCounts:new Map,footnoteOrder:[],one:function(e,t){return Tl(n,r,i,e,t,a)}},xT(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?o:s,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a));return l.check(),l},Th=function(e){this.compiler=function(t){return Tu(t,e)}};var Tp=e.i(439216);let Tf=Object.assign(Tm(Error),{eval:Tm(EvalError),range:Tm(RangeError),reference:Tm(ReferenceError),syntax:Tm(SyntaxError),t
129ype:Tm(TypeError),uri:Tm(URIError)});function Tm(e){return t.displayName=e.displayName||e.name,t;function t(n,...r){return new e(n?(0,Tp.default)(n,...r):n)}}let Tg={}.hasOwnProperty,Ty={yaml:"-",toml:"+"};function Tb(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++n<r.length;)t[n]=function(e){let t=e;if("string"==typeof t){if(!Tg.call(Ty,t))throw Tf("Missing matter definition for `%s`",t);t={type:t,marker:Ty[t]}}else if("object"!=typeof t)throw Tf("Expected matter to be an object, not `%j`",t);if(!Tg.call(t,"type"))throw Tf("Missing `type` in matter `%j`",t);if(!Tg.call(t,"fence")&&!Tg.call(t,"marker"))throw Tf("Missing `marker` or `fence` in matter `%j`",t);return t}(r[n]);return t}function Tv(e){let t=this.resume(),n=this.stack[this.stack.length-1];bE(),this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Tk(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Tx(e,t){return e.marker?Tw(e.marker,t).repeat(3):Tw(e.fence,t)}function Tw(e,t){return"string"==typeof e?e:e[t]}function TE(e,t){return e.marker?TT(e.marker,t).repeat(3):TT(e.fence,t)}function TT(e,t){return"string"==typeof e?e:e[t]}function TS(e){let t=e||"yaml",n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){let t=Tb(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=TE(e,"open").charCodeAt(0),o=function(e){let t,n=e.anywhere,r=e.type,i=r+"Fence",o=i+"Sequence",s=r+"Value",a={tokenize:function(e,n,r){let s=0;return function(n){return n===t.charCodeAt(s)?(e.enter(i),e.enter(o),function n(i){return s===t.length?(e.exit(o),xV(i))?(e.enter("whitespace"),function t(n){return xV(n)?(e.consume(n),t):(e.exit("whitespace"),a(n))}(i)):a(i):i===t.charCodeAt(s++)?(e.consume(i),n):r(i)}(n)):r(n)};function a(t){return null===t||xH(t)?(e.exit(i),n(t)):r(t)}},partial:!0},l=0;return{tokenize:function(c,d,u){let h=this;return function(s){let a=h.now();return 1===a.column&&(1===a.line||n)&&(t=TE(e,"open"),l=0,s===t.charCodeAt(l))?(c.enter(r),c.enter(i),c.enter(o),function e(n){return l===t.length?(c.exit(o),xV(n))?(c.enter("whitespace"),function e(t){return xV(t)?(c.consume(t),e):(c.exit("whitespace"),p(t))}(n)):p(n):n===t.charCodeAt(l++)?(c.consume(n),e):u(n)}(s)):u(s)};function p(n){return xH(n)?(c.exit(i),c.enter("lineEnding"),c.consume(n),c.exit("lineEnding"),t=TE(e,"close"),l=0,c.attempt(a,g,f)):u(n)}function f(e){return null===e||xH(e)?m(e):(c.enter(s),function e(t){return null===t||xH(t)?(c.exit(s),m(t)):(c.consume(t),e)}(e))}function m(e){return null===e?u(e):(c.enter("lineEnding"),c.consume(e),c.exit("lineEnding"),c.attempt(a,g,f))}function g(e){return c.exit(r),d(e)}},concrete:!0}}(e),s=n[i];Array.isArray(s)?s.push(o):n[i]=[o]}return{flow:n}}(t)),i.push(function(e){let t=Tb(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=function(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}(e),r[e.type]=Tv,r[e.type+"Value"]=Tk}return{enter:n,exit:r}}(t)),o.push(function(e){let t=[],n={},r=Tb(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=function(e){let t=Tx(e,"open"),n=Tx(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+n}}(e);let o=Tx(e,"open");t.push({atBreak:!0,character:o.charAt(0),after:xK(o.charAt(1))})}return{unsafe:t,handlers:n}}(t))}let TC={note:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',tip:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',important:'<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',warning:'<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',caution:'<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},TA={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,s=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(e.consume(r),s++,t):s<2?n(r):(e.exit("mathFlowFenceSequence"),Ei(e,a,"whitespace")(r))}(t)};function a(t){return null===t||xH(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(r){return null===r||xH(r)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),l(r)):36===r?n(r):(e.consume(r),t)}(t))}function l(n){return(e.exit("mathFlowFence"),r.interrupt)?t(n):e.attempt(T_,c,h)(n)}function c(t){return e.attempt({tokenize:p,partial:!0},h,d)(t)}function d(t){return(o?Ei(e,u,"linePrefix",o+1):u)(t)}function u(t){return null===t?h(t):xH(t)?e.attempt(T_,c,h)(t):(e.enter("mathFlowValue"),function t(n){return null===n||xH(n)?(e.exit("mathFlowValue"),u(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("mathFlow"),t(n)}function p(e,t,n){let i=0;return Ei(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(i++,e.consume(r),t):i<s?n(r):(e.exit("mathFlowFenceSequence"),Ei(e,o,"whitespace")(r))}(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(r){return null===r||xH(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}},concrete:!0,name:"mathFlow"},T_={tokenize:function(e,t,n){let r=this;return function(n){return null===n?t(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};function TN(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("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[i][1].type="mathTextPadding",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="mathTextData",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}function TO(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}function TM(e){let t;return{flow:{36:TA},text:{36:(null==(t=(e||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,n,r){let i,o,s=0;return function(n){return e.enter("mathText"),e.enter("mathTextSequence"),function n(i){return 36===i?(e.consume(i),s++,n):s<2&&!t?r(i):(e.exit("mathTextSequence"),a(i))}(n)};function a(t){return null===t?r(t):36===t?(o=e.enter("mathTextSequence"),i=0,function t(r){return 36===r?(e.consume(r),i++,t):i===s?(e.exit("mathTextSequence"),e.exit("mathText"),n(r)):(o.type="mathTextData",l(r))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):xH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||xH(t)?(e.exit("mathTextData"),a(t)):(e.consume(t),l)}},resolve:TN,previous:TO,name:"mathText"})}}}let TI={};function TD(e){let t=e||TI,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(TM(t)),i.push(function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"
129code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},e),this.buffer()}},exit:{mathFlow:function(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),n=this.stack[this.stack.length-1];bE(n.type),this.exit(e),n.value=t;let r=n.data.hChildren[0];bE(r.type),bE(r.tagName),r.children.push({type:"text",value:t}),this.data.mathFlowInside=void 0},mathFlowFence:function(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)},mathFlowFenceMeta:function(){let e=this.resume(),t=this.stack[this.stack.length-1];bE(t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];bE(n.type),this.exit(e),n.value=t,n.data.hChildren.push({type:"text",value:t})},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),o.push(function(e){let t=(e||{}).singleDollarTextMath;return null==t&&(t=!0),n.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:"\n",inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,n,r){let i=e.value||"",o=n.createTracker(r),s="$".repeat(Math.max(wv(i,"$")+1,2)),a=n.enter("mathFlow"),l=o.move(s);if(e.meta){let t=n.enter("mathFlowMeta");l+=o.move(n.safe(e.meta,{after:"\n",before:l,encode:["$"],...o.current()})),t()}return l+=o.move("\n"),i&&(l+=o.move(i+"\n")),l+=o.move(s),a(),l},inlineMath:n}};function n(e,n,r){let i=e.value||"",o=1;for(!t&&o++;RegExp("(^|[^$])"+"\\$".repeat(o)+"([^$]|$)").test(i);)o++;let s="$".repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=" "+i+" ");let a=-1;for(;++a<r.unsafe.length;){let e,t=r.unsafe[a];if(!t.atBreak)continue;let n=r.compilePattern(t);for(;e=n.exec(i);){let t=e.index;10===i.codePointAt(t)&&13===i.codePointAt(t-1)&&t--,i=i.slice(0,t)+" "+i.slice(e.index+1)}}return s+i+s}}(t))}let TR={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"),Ei(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 xH(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},Tz={tokenize:function(e){let t,n,r,i=this,o=[],s=0;return a;function a(t){if(s<o.length){let n=o[s];return i.containerState=n[1],e.attempt(n[0].continuation,l,c)(t)}return c(t)}function l(e){if(s++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&y();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}g(s);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return wJ(i.events,o+1,0,i.events.slice(r)),i.events.length=a,c(e)}return a(e)}function c(n){if(s===o.length){if(!t)return h(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(TL,d,u)(n)}function d(e){return t&&y(),g(s),h(e)}function u(e){return i.parser.lazy[i.now().line]=s!==o.length,r=i.now().offset,f(e)}function h(t){return i.containerState={},e.attempt(TL,p,f)(t)}function p(e){return s++,o.push([i.currentConstruct,i.containerState]),h(e)}function f(r){if(null===r){t&&y(),g(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){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return xH(n)?(e.consume(n),m(e.exit("chunkFlow")),s=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(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,l=a;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){if(e){n=i.events[l][1].end;break}e=!0}for(g(s),o=a;o<i.events.length;)i.events[o][1].end={...n},o++;wJ(i.events,l+1,0,i.events.slice(a)),i.events.length=o}}function g(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 y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},TL={tokenize:function(e,t,n){return Ei(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};class TP{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&&Tj(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),Tj(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Tj(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);Tj(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Tj(this.left,t.reverse())}}}function Tj(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 T$(e){let t,n,r,i,o,s,a,l={},c=-1,d=new TP(e);for(;++c<d.length;){for(;c in l;)c=l[c];if(t=d.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===d.get(c-1)[1].type&&((r=0)<(s=t[1]._tokenizer.events).length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let n,r,i=e.get(t)[1],o=e.get(t)[2],s=t-1,a=[],l=i._tokenizer;!l&&(l=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,d=[],u={},h=-1,p=i,f=0,m=0,g=[0];for(;p;){for(;e.get(++s)[1]!==p;);a.push(s),!p._tokenizer&&(n=o.sliceStream(p),p.next||n.push(null),r&&l.defineSki
129p(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++h<c.length;)"exit"===c[h][0]&&"enter"===c[h-1][0]&&c[h][1].type===c[h-1][1].type&&c[h][1].start.line!==c[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){let t=c.slice(g[h],g[h+1]),n=a.pop();d.push([n,n+t.length-1]),e.splice(n,2,t)}for(d.reverse(),h=-1;++h<d.length;)u[f+d[h][0]]=f+d[h][1],f+=d[h][1]-d[h][0]-1;return u}(d,c)),c=l[c],a=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(i=d.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(d.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={...d.get(n)[1].start},(o=d.slice(n,c)).unshift(t),d.splice(n,c-n+1,o))}}return wJ(e,0,1/0,d.slice(0)),!a}let TF={resolve:function(e){return T$(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):xH(t)?e.check(TB,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}}},TB={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"),Ei(e,i,"linePrefix")};function i(i){if(null===i||xH(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)}}},TH={tokenize:function(e){let t=this,n=e.attempt(Eo,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,Ei(e,e.attempt(this.parser.constructs.flow,r,e.attempt(TF,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)}}},TU={resolveAll:TW()},TV=TG("string"),Tq=TG("text");function TG(e){return{resolveAll:TW("text"===e?TK:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(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 TW(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 TK(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),s=o.length,a=-1,l=0;for(;s--;){let e=o[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let o={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},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 TJ={name:"attention",resolveAll:function(e,t){let n,r,i,o,s,a,l,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close){for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
129n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;let u={...e[n][1].end},h={...e[d][1].start};TY(u,-a),TY(h,a),o={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},s={type:a>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:h},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[d][1].start}},r={type:a>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[d][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=wY(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=wY(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=wY(l,Ef(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),l=wY(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,l=wY(l,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,wJ(e,n-1,d-n+3,l),d=n+l.length-c-2;break}}for(d=-1;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=wT(i);return function(s){return n=s,e.enter("attentionSequence"),function s(a){if(a===n)return e.consume(a),s;let l=e.exit("attentionSequence"),c=wT(a),d=!c||2===c&&o||r.includes(a),u=!o||2===o&&c||r.includes(i);return l._open=!!(42===n?d:d&&(o||!u)),l._close=!!(42===n?u:u&&(c||!d)),t(a)}(s)}}};function TY(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let TX={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return xV(t)?Ei(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(TX,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 xV(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},TQ={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 xB(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},TZ={name:"characterReference",tokenize:function(e,t,n){let r,i,o=this,s=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"),l):(e.enter("characterReferenceValue"),r=31,i=xL,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=xF,c):(e.enter("characterReferenceValue"),r=7,i=x$,c(t))}function c(a){if(59===a&&s){let r=e.exit("characterReferenceValue");return i!==xL||ED(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&s++<r?(e.consume(a),c):n(a)}}},T0={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)}}},T1={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"),s};
129function s(t){return e.enter("codeFencedFence"),xV(t)?Ei(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o>=a?(e.exit("codeFencedFenceSequence"),xV(i)?Ei(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||xH(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},s=0,a=0;return function(t){var o;let c;return o=t,s=(c=i.events[i.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[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"),xV(i)?Ei(e,l,"whitespace")(i):l(i))}(o)};function l(o){return null===o||xH(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(T0,d,f)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||xH(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):xV(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ei(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(o))}function c(t){return null===t||xH(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||xH(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function d(t){return e.attempt(o,f,u)(t)}function u(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return s>0&&xV(t)?Ei(e,p,"linePrefix",s+1)(t):p(t)}function p(t){return null===t||xH(t)?e.check(T0,d,f)(t):(e.enter("codeFlowValue"),function t(n){return null===n||xH(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function f(n){return e.exit("codeFenced"),t(n)}}},T2={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),Ei(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):xH(n)?e.attempt(T5,t,o)(n):(e.enter("codeFlowValue"),function n(r){return null===r||xH(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function o(n){return e.exit("codeIndented"),t(n)}}},T5={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):xH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Ei(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):xH(e)?i(e):n(e)}}};function T3(e,t,n,r,i,o,s,a,l){let c=l||1/0,d=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),u):null===t||32===t||41===t||xj(t)?n(t):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function u(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"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||xH(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(i){return!d&&(null===i||41===i||xU(i))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(i)):d<c&&40===i?(e.consume(i),d++,f):41===i?(e.consume(i),d--,f):null===i||32===i||40===i||xj(i)?n(i):(e.consume(i),92===i?m:f)}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function T4(e,t,n,r,i,o){let s,a=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(u){return l>999||null===u||91===u||93===u&&!s||94===u&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(u):93===u?(e.exit(o),e.enter(i),e.consume(u),e.exit(i),e.exit(r),t):xH(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(u))}function d(t){return null===t||91===t||93===t||xH(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!xV(t)),92===t?u:d)}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,d):d(t)}}function T6(e,t,n,r,i,o){let s;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):xH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ei(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===s||null===t||xH(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?d:c)}function d(t){return t===s||92===t?(e.consume(t),c):c(t)}}function T8(e,t){let n;return function r(i){return xH(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xV(i)?Ei(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}let T9={partial:!0,tokenize:function(e,t,n){return function(t){return xU(t)?T8(e,r)(t):n(t)};function r(t){return T6(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return xV(t)?Ei(e,o,"whitespace")(t):o(t)}function o(e){return null===e||xH(e)?t(e):n(e)}}},T7=["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"],Se=["pre","script","style","textarea"],St={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Eo,t,n)}}},Sn={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return xH(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)}}},Sr={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&&wJ(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o,s=e.length,a=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=s);let l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return o=wY(o=[["enter",l,t],["enter",c,t]],e.slice(r+1,r+a+3)),o=wY(o,[["enter",d,t]]
vendor: 3,769 bytes, line 129
129),o=wY(o,Ef(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),o=wY(o,[["exit",d,t],e[i-2],e[i-1],["exit",c,t]]),o=wY(o,e.slice(i+1)),o=wY(o,[["exit",l,t]]),wJ(e,r,e.length,o),e},tokenize:function(e,t,n){let r,i,o=this,s=o.events.length;for(;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){r=o.events[s][1];break}return function(t){return r?r._inactive?d(t):(i=o.parser.defined.includes(x8(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(Si,c,i?c:d)(t):91===t?e.attempt(So,c,i?l:d)(t):i?c(t):d(t)}function l(t){return e.attempt(Ss,c,d)(t)}function c(e){return t(e)}function d(e){return r._balanced=!0,n(e)}}},Si={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 xU(t)?T8(e,i)(t):i(t)}function i(t){return 41===t?c(t):T3(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return xU(t)?T8(e,a)(t):c(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?T6(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return xU(t)?T8(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},So={tokenize:function(e,t,n){let r=this;return function(t){return T4.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(x8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},Ss={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)}}},Sa={name:"labelStartImage",resolveAll:Sr.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)}}},Sl={name:"labelStartLink",resolveAll:Sr.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)}}},Sc={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ei(e,t,"linePrefix")}}},Sd={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(o){var s;return e.enter("thematicBreak"),r=s=o,function o(s){return s===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),xV(n)?Ei(e,o,"whitespace")(n):o(n))}(s)):i>=3&&(null===s||xH(s))?(e.exit("thematicBreak"),t(s)):n(s)}(s)}}},Su={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Eo,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ei(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!xV(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
129=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Sp,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ei(e,e.attempt(Su,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,s=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:x$(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(Sd,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return x$(i)&&++s<10?(e.consume(i),t):(!r.interrupt||s<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(Eo,r.interrupt?n:l,e.attempt(Sh,d,c))}
129function l(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function c(t){return xV(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Sh={partial:!0,tokenize:function(e,t,n){let r=this;return Ei(e,function(e){let i=r.events[r.events.length-1];return!xV(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Sp={partial:!0,tokenize:function(e,t,n){let r=this;return Ei(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)}},Sf={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 s={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",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=s,e.push(["exit",s,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var s;let a,l=i.events.length;for(;l--;)if("lineEnding"!==i.events[l][1].type&&"linePrefix"!==i.events[l][1].type&&"content"!==i.events[l][1].type){a="paragraph"===i.events[l][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,s=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),xV(n)?Ei(e,o,"lineSuffix")(n):o(n))}(s)):n(t)};function o(r){return null===r||xH(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,T4.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function o(t){return(r=x8(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return xU(t)?T8(e,a)(t):a(t)}function a(t){return T3(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(T9,c,c)(t)}function c(t){return xV(t)?Ei(e,d,"whitespace")(t):d(t)}function d(o){return null===o||xH(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}}},"disable",0,{null:[]},"document",0,{42:Su,43:Su,45:Su,48:Su,49:Su,50:Su,51:Su,52:Su,53:Su,54:Su,55:Su,56:Su,57:Su,62:TX},"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"},wJ(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||xU(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||xH(r)?(e.exit("atxHeading"),t(r)):xV(r)?Ei(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||xU(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(o)):n(o)}(o)}}},42:Sd,45:[Sf,Sd],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,s,a,l=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(s){return 33===s?(e.consume(s),d):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),r=3,l.interrupt?t:I):xz(s)?(e.consume(s),o=String.fromCharCode(s),f):n(s)}function d(i){return 45===i?(e.consume(i),r=2,u):91===i?(e.consume(i),r=5,s=0,h):xz(i)?(e.consume(i),r=4,l.interrupt?t:I):n(i)}function u(r){return 45===r?(e.consume(r),l.interrupt?t:I):n(r)}function h(r){let i="CDATA[";return r===i.charCodeAt(s++)?(e.consume(r),s===i.length)?l.interrupt?t:T:h:n(r)}function p(t){return xz(t)?(e.consume(t),o=String.fromCharCode(t),f):n(t)}function f(s){if(null===s||47===s||62===s||xU(s)){let a=47===s,c=o.toLowerCase();return!a&&!i&&Se.includes(c)?(r=1,l.interrupt?t(s):T(s)):T7.includes(o.toLowerCase())?(r=6,a)?(e.consume(s),m):l.interrupt?t(s):T(s):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(s):i?function t(n){return xV(n)?(e.consume(n),t):w(n)}(s):g(s))}return 45===s||xL(s)?(e.consume(s),o+=String.fromCharCode(s),f):n(s)}function m(r){return 62===r?(e.consume(r),l.interrupt?t:T):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||xz(t)?(e.consume(t),y):xV(t)?(e.consume(t),g):w(t)}function y(t){return 45===t||46===t||58===t||95===t||xL(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),v):xV(t)?(e.consume(t),b):g(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,k):xV(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||xU(n)?b(n):(e.consume(n),t)}(t)}function k(t){return t===a?(e.consume(t),a=null,x):null===t||xH(t)?n(t):(e.consume(t),k)}function x(e){return 47===e||62===e||xV(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||xH(t)?T(t):xV(t)?(e.consume(t),E):n(t)}function T(t){return 45===t&&2===r?(e.consume(t),_):60===t&&1===r?(e.consume(t),N):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),I):93===t&&5===r?(e.consume(t),M):xH(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(St,R,S)(t)):null===t||xH(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),T)}function S(t){return e.check(Sn,C,R)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||xH(t)?S(t):(e.enter("htmlFlowData"),T(t))}function _(t){return 45===t?(e.consume(t),I):T(t)}function N(t){return 47===t?(e.consume(t),o="",O):T(t)}function O(t){if(62===t){let n=o.toLowerCase();return Se.includes(n)?(e.consume(t),D):T(t)}return xz(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),O):T(t)}function M(t){return 93===t?(e.consume(t),I):T(t)}function I(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),I):T(t)}function D(t){return null===t||xH(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),D)}function R(n){return e.exit("htmlFlow"),t(n)}}},61:Sf,95:Sd,96:T1,126:T1},"flowInitial",0,{[-2]:T2,[-1]:T2,32:T2},"insideSpan",0,{null:[TJ,TU]},"string",0,{38:TZ,92:TQ},"text",0,{[-5]:Sc,[-4]:Sc,[-3]:Sc,33:Sa,38:TZ,42:TJ,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 xz(t)?(e.consume(t),o):64===t?n(t):a(t)}function o(t){return 43===t||45===t||46===t||xL(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,s):(43===n||45===n||46===n||xL(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function s(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||xj(r)?n(r):(e.consume(r),s)}function a(t){return 64===t?(e.consume(t),l):xP(t)?(e.consume(t),a):n(t)}function l(i){return xL(i)?function i(o){return 46===o?(e.consume(o),r=0,l):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||xL(o))&&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,s=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):xz(t)?(e.consume(t),w):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):xz(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),h):n(t)}function d(t){return null===t?n(t):45===t?(e.consume(t),u):xH(t)?(o=d,O(t)):(e.consume(t),d)}function u(t){return 45===t?(e.consume(t),h):d(t)}function h(e){return 62===e?N(e):45===e?u(e):d(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):xH(t)?(o=f,O(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?N(t):93===t?(e.consume(t),g):f(t)}function y(t){return null===t||62===t?N(t):xH(t)?(o=y,O(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):xH(t)?(o=b,O(t)):(e.consume(t),b)}function v(e){return 62===e?N(e):b(e)}function k(t){return xz(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||xL(t)?(e.consume(t),x):function t(n){return xH(n)?(o=t,O(n)):xV(n)?(e.consume(n),t):N(n)}(t)}function w(t){return 45===t||xL(t)?(e.consume(t),w):47===t||62===t||xU(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),N):58===t||95===t||xz(t)?(e.consume(t),T):xH(t)?(o=E,O(t)):xV(t)?(e.consume(t),E):N(t)}function T(t){return 45===t||46===t||58===t||95===t||xL(t)?(e.consume(t),T):function t(n){return 61===n?(e.consume(n),S):xH(n)?(o=t,O(n)):xV(n)?(e.consume(n),t):E(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,C):xH(t)?(o=S,O(t)):xV(t)?(e.consume(t),S):(e.consume(t),A)}function C(t){return t===r?(e.consume(t),r=void 0,_):null===t?n(t):xH(t)?(o=C,O(t)):(e.consume(t),C)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||xU(t)?E(t):(e.consume(t),A)}function _(e){return 47===e||62===e||xU(e)?E(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function O(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return xV(t)?Ei(e,I,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),o(t)}}}],91:Sl,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return xH(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},TQ],93:Sr,95:TJ,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;
129return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),o++,t):(e.exit("codeTextSequence"),s(n))}(t)};function s(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),s):96===l?(i=e.enter("codeTextSequence"),r=0,function n(s){return 96===s?(e.consume(s),r++,n):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(s)):(i.type="codeTextData",a(s))}(l)):xH(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(l))}function a(t){return null===t||32===t||96===t||xH(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),a)}}}}],119210);var Sm=e.i(119210);function Sg(e){let t={constructs:wQ([Sm,...(e||{}).extensions||[]]),content:n(TR),defined:[],document:n(Tz),flow:n(TH),lazy:{},string:n(TV),text:n(Tq)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],s=[],a=[],l={attempt:f(function(e,t){m(e,t.from)}),check:f(p),consume:function(e){xH(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=h(),c.events.push(["enter",n,c]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=h(),c.events.push(["exit",t,c]),t},interrupt:f(p,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:h,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let o,s=e[r];if("string"==typeof s)o=s;else switch(s){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(s)}n=-2===s,i.push(o)}return i.join("")}(u(e),t)},sliceStream:u,write:function(e){return(s=wY(s,e),function(){let e;for(;r._index<s.length;){let n=s[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),d=d(t)}else d=d(n)}}(),null!==s[s.length-1])?[]:(m(t,0),c.events=Ef(o,c.events,c),c.events)}},d=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function u(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,s)];else{if(n=e.slice(r,o),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}s>0&&n.push(e[o].slice(0,s))}return n}(s,e)}function h(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function p(e,t){t.restore()}function f(e,t){return function(n,i,o){var s;let d,u,p,f;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(s=n,function(e){let t=null!==e&&s[e],n=null!==e&&s.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(d=e,u=0,0===e.length)?o:y(e[u])}function y(e){return function(n){let i,o,s,d,u;return(i=h(),o=c.previous,s=c.currentConstruct,d=c.events.length,u=Array.from(a),f={from:d,restore:function(){r=i,c.previous=o,c.currentConstruct=s,c.events.length=d,a=u,g()}},p=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,b,v)(n)}}function b(t){return e(p,f),i}function v(e){return(f.restore(),++u<d.length)?y(d[u]):o}}}function m(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&wJ(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}}function Sy(e){for(;!T$(e););return e}let Sb=/[\0\t\n\r]/g;function Sv(){let e,t=1,n="",r=!0;return function(i,o,s){let a,l,c,d,u,h=[];for(i=n+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),c=0,n="",r&&(65279===i.charCodeAt(0)&&c++,r=void 0);c<i.length;){if(Sb.lastIndex=c,d=(a=Sb.exec(i))&&void 0!==a.index?a.index:i.length,u=i.charCodeAt(d),!a){n=i.slice(c);break}if(10===u&&c===d&&e)h.push(-3),e=void 0;else switch(e&&(h.push(-5),e=void 0),c<d&&(h.push(i.slice(c,d)),t+=d-c),u){case 0:h.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),h.push(-2);t++<l;)h.push(-1);break;case 10:h.push(-4),t=1;break;default:e=!0,t=1}c=d+1}return s&&(e&&h.push(-5),n&&h.push(n),h.push(null)),h}}let Sk={}.hasOwnProperty;function Sx(e){return{line:e.line,column:e.column,offset:e.offset}}function Sw(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+oF({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+oF({start:t.start,end:t.end}
129)+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+oF({start:t.start,end:t.end})+") is still open")}function SE(e){let t=this;t.parser=function(n){var r,i;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(f),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:c,data:c,codeFlowValue:c,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(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:c,htmlText:r(g,i),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),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(b,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(b),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(f),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:s(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:s(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=ER(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=ED(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=Sx(e.end)},codeFenced:s(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:d,codeIndented:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:s(),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=x8(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(u),hardBreakTrailing:s(u),htmlFlow:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:s(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=EL(t),n.identifier=x8(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=Sx(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
129ype)&&(c.call(this,e),d.call(this,e))},link:s(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:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=x8(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:s(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:s(),thematicBreak:s()}};!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(Sk.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:[]},s={stack:[r],tokenStack:[],config:t,enter:o,exit:a,buffer:i,resume:l,data:n},c=[],d=-1;for(;++d<e.length;)("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)&&("enter"===e[d][0]?c.push(d):d=function(e,t,n){let r,i,o,s,a=t-1,l=-1,c=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(i=void 0;s--;){let t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=s}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,s=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Sk.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},s),e[d][1])}if(s.tokenStack.length>0){let e=s.tokenStack[s.tokenStack.length-1];(e[1]||Sw).call(s,void 0,e[0])}for(r.position={start:Sx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](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:Sx(t.start),end:void 0}}function s(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]||Sw).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+oF({start:e.start,end:e.end})+"): itâs not open");n.position.end=Sx(e.end)}function l(){return xO(this.stack.pop())}function c(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:Sx(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Sx(e.end)}function u(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function f(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(Sy(Sg(i).document().write(Sv()(n,r,!0))))}}function ST(e){this.enter({type:"mdxFlowExpression",value:""},e),this.buffer()}function SS(e){this.enter({type:"mdxTextExpression",value:""},e),this.buffer()}function SC(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];bE("mdxFlowExpression"===r.type||r.type),this.exit(e),r.value=t,n&&
129(r.data={estree:n})}function SA(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function S_(e,t,n){let r=e.value||"";return"{"+n.indentLines(r,function(e,t,n){return(0===t||n?"":" ")+e})+"}"}let SN=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],SO={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 SM(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function SI(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function SD(e){let t;return(t="string"==typeof e?e.charCodeAt(0):e)>=97&&t<=122||t>=65&&t<=90||SM(e)}let SR=["","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"],Sz=/["&'<>`]/g,SL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,SP=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Sj=/[|\\{}()[\]^$+*?.]/g,S$=new WeakMap;function SF(e,t){var n;let r;if(e=e.replace(t.subset?(n=t.subset,(r=S$.get(n))||(r=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Sj,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(n),S$.set(n,r)),r):Sz,i),t.subset||t.escapeOnly)return e;return e.replace(SL,function(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(SP,i);function i(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}let SB=/[\dA-Fa-f]/,SH=/\d/,SU={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"Â¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"Â",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"Ã",Aacute:"Ã",Acirc:"Ã",Atilde:"Ã",Auml:"Ã",Aring:"Ã
",AElig:"Ã",Ccedil:"Ã",Egrave:"Ã",Eacute:"Ã",Ecirc:"Ã",Euml:"Ã",Igrave:"Ã",Iacute:"Ã",Icirc:"Ã",Iuml:"Ã",ETH:"Ã",Ntilde:"Ã",Ograve:"Ã",Oacute:"Ã",Ocirc:"Ã",Otilde:"Ã",Ouml:"Ã",times:"Ã",Oslash:"Ã",Ugrave:"Ã",Uacute:"Ã",Ucirc:"Ã",Uuml:"Ã",Yacute:"Ã",THORN:"Ã",szlig:"Ã",agrave:"à ",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"Ã¥",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"Ã",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"Æ",Alpha:"Î",Beta:"Î",Gamma:"Î",Delta:"Î",Epsilon:"Î",Zeta:"Î",Eta:"Î",Theta:"Î",Iota:"Î",Kappa:"Î",Lambda:"Î",Mu:"Î",Nu:"Î",Xi:"Î",Omicron:"Î",Pi:"Î ",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Î¥",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"Ï",rho:"Ï",sigmaf:"Ï",sigma:"Ï",tau:"Ï",upsilon:"Ï
",phi:"Ï",chi:"Ï",psi:"Ï",omega:"Ï",thetasym:"Ï",upsih:"Ï",piv:"Ï",bull:"â¢",hellip:"â¦",prime:"â²",Prime:"â³",oline:"â¾",frasl:"â",weierp:"â",image:"â",real:"â",trade:"â¢",alefsym:"âµ",larr:"â",uarr:"â",rarr:"â",darr:"â",harr:"â",crarr:"âµ",lArr:"â",uArr:"â",rArr:"â",dArr:"â",hArr:"â",forall:"â",part:"â",exist:"â",empty:"â
",nabla:"â",isin:"â",notin:"â",ni:"â",prod:"â",sum:"â",minus:"â",lowast:"â",radic:"â",prop:"â",infin:"â",ang:"â ",and:"â§",or:"â¨",cap:"â©",cup:"âª",int:"â«",there4:"â´",sim:"â¼",cong:"â
",asymp:"â",ne:"â ",equiv:"â¡",le:"â¤",ge:"â¥",sub:"â",sup:"â",nsub
129:"â",sube:"â",supe:"â",oplus:"â",otimes:"â",perp:"â¥",sdot:"â
",lceil:"â",rceil:"â",lfloor:"â",rfloor:"â",lang:"â©",rang:"âª",loz:"â",spades:"â ",clubs:"â£",hearts:"â¥",diams:"â¦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Å",oelig:"Å",Scaron:"Å ",scaron:"Å¡",Yuml:"Ÿ",circ:"Ë",tilde:"Ë",ensp:"â",emsp:"â",thinsp:"â",zwnj:"â",zwj:"â",lrm:"â",rlm:"â",ndash:"â",mdash:"â",lsquo:"â",rsquo:"â",sbquo:"â",ldquo:"â",rdquo:"â",bdquo:"â",dagger:"â ",Dagger:"â¡",permil:"â°",lsaquo:"â¹",rsaquo:"âº",euro:"â¬"},SV=["cent","copy","divide","gt","lt","not","para","times"],Sq={}.hasOwnProperty,SG={};for(i in SU)Sq.call(SU,i)&&(SG[SU[i]]=i);let SW=/[^\dA-Za-z]/;function SK(e,t,n){var r,i;let o,s,a=(r=n.omitOptionalSemicolons,o="&#x"+e.toString(16).toUpperCase(),r&&t&&!SB.test(String.fromCharCode(t))?o:o+";");if((n.useNamedReferences||n.useShortestReferences)&&(s=function(e,t,n,r){let i=String.fromCharCode(e);if(Sq.call(SG,i)){let e=SG[i],o="&"+e;return n&&SN.includes(e)&&!SV.includes(e)&&(!r||t&&61!==t&&SW.test(String.fromCharCode(t)))?o:o+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){let r,o=(i=n.omitOptionalSemicolons,r="&#"+String(e),i&&t&&!SH.test(String.fromCharCode(t))?r:r+";");o.length<a.length&&(a=o)}return s&&(!n.useShortestReferences||s.length<a.length)?s:a}function SJ(e){return"&#x"+e.toString(16).toUpperCase()+";"}function SY(e,t){return SF(e,Object.assign({format:SK},t))}function SX(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 SQ(e){return" ".repeat(e)}function SZ(){return"<"}function S0(e){this.enter({type:"mdxjsEsm",value:""},e),this.buffer()}function S1(e){let t=this.resume(),n=this.stack[this.stack.length-1];bE(n.type),this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function S2(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function S5(e){return e.value||""}function S3(){return[{enter:{mdxFlowExpression:ST,mdxTextExpression:SS},exit:{mdxFlowExpression:SC,mdxFlowExpressionChunk:SA,mdxTextExpression:SC,mdxTextExpressionChunk:SA}},function(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:u,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:u,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:a,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:c,mdxJsxFlowTagNameLocal:d,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:f,mdxJsxFlowTagAttributeNameLocal:m,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:b,mdxJsxFlowTag:v,mdxJsxTextTagClosingMarker:a,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:c,mdxJsxTextTagNameLocal:d,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:f,mdxJsxTextTagAttributeNameLocal:m,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:b,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(bE(),0===t.length)throw new oV("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(bE(),t.close)throw new oV("Unexpected attribute in closing tag, expected the end of the tag",{start:e.start,end:e.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(e){let t=this.data.mdxJsxTag;if(bE(),t.close)throw new oV("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;bE(),e.close=!0}function l(e){let t=this.data.mdxJsxTag;bE(),t.name=this.sliceSerialize(e)}function c(e){let t=this.data.mdxJsxTag;bE(),t.name+="."+this.sliceSerialize(e)}function d(e){let t=this.data.mdxJsxTag;bE(),t.name+=":"+this.sliceSerialize(e)}function u(e){let n=this.data.mdxJsxTag;bE(),o.call(this,e),n.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(e.start),end:void 0}})}function h(e){let n=this.data.mdxJsxTag;bE(),o.call(this,e),n.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag;bE();let r=n.attributes[n.attributes.length-1];bE(r.type);let i=e.estree;r.value=this.resume(),bE(r.position),r.position.end=t(e.end),i&&(r.data={estree:i})}function f(e){let n=this.data.mdxJsxTag;bE();let r=n.attributes[n.attributes.length-1];bE(r.type),r.name=this.sliceSerialize(e),bE(r.position),r.position.end=t(e.end)}function m(e){let n=this.data.mdxJsxTag;bE();let r=n.attributes[n.attributes.length-1];bE(r.type),r.name+=":"+this.sliceSerialize(e),bE(r.position),r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag;bE();let r=n.attributes[n.attributes.length-1];r.value=function(e,t){let n,r,i,o=t||{},s="string"==typeof o.additional?o.additional.charCodeAt(0):o.additional,a=[],l=0,c=-1,d="";o.position&&("start"in o.position||"indent"in o.position?(r=o.position.indent,n=o.position.start):n=o.position);let u=(n?n.line:0)||1,h=(n?n.column:0)||1,p=g();for(l--;++l<=e.length;)if(10===i&&(h=(r?r[c]:0)||1),38===(i=e.charCodeAt(l))){let t,n=e.charCodeAt(l+1);if(9===n||10===n||12===n||32===n||38===n||60===n||Number.isNaN(n)||s&&n===s){d+=String.fromCharCode(i),h++;continue}let r=l+1,c=r,u=r;if(35===n){u=++c;let n=e.charCodeAt(u);88===n||120===n?(t="hexadecimal",u=++c):t="decimal"}else t="named";let v="",k="",x="",w="named"===t?SD:"decimal"===t?SM:SI;for(u--;++u<=e.length;){let n=e.charCodeAt(u);if(!w(n))break;x+=String.fromCharCode(n),"named"===t&&SN.includes(x)&&(v=x,k=ED(x))}let E=59===e.charCodeAt(u);if(E){u++;let e="named"===t&&ED(x);e&&(v=x,k=e)}let T=1+u-r,S="";if(E||!1!==o.nonTerminated)if(x)if("named"===t){if(E&&!k)y(5,1);else if(v!==x&&(T=1+(u=c+v.length)-c,E=!1),!E){let t=v?1:3;if(o.attribute){let n=e.charCodeAt(u);61===n?(y(t,T),k=""):SD(n)?k="":y(t,T)}else y(t,T)}S=k}else{var f,m;E||y(2,T);let e=Number.parseInt(x,"hexadecimal"===t?16:10);if((f=e)>=55296&&f<=57343||f>1114111)y(7,T),S=String.fromCharCode(65533);else if(e in SO)y(6,T),S=SO[e];else{let t="";((m=e)>=1&&m<=8||11===m||m>=13&&m<=31||m>=127&&m<=159||m>=64976&&m<=65007||(65535&m)==65535||(65535&m)==65534)&&y(6,T),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),S=t+String.fromCharCode(e)}}else"named"!==t&&y(4,T);if(S){b(),p=g(),l=u-1,h+=u-r+1,a.push(S);let t=g();t.offset++,o.reference&&o.reference.call(o.referenceContext||void 0,S,{start:p,end:t},e.slice(r-1,u)),p=t}else x=e.slice(r-1,u),d+=x,h+=x.length,l=u-1}else 10===i&&(u++,c++,h=0),Number.isNaN(i)?b():(d+=String.fromCharCode(i),h++);return a.join("");function g(){return{line:u,column:h,offset:l+((n?n.offset:0)||0)}}function y(e,t){let n;o.warning&&(n=g(),n.column+=t,n.offset+=t,o.warning.call(o.warningContext||void 0,SR[e],n,e))}function b(){d&&(a.push(d),o.text&&o.text.call(o.textContext||void 0,d,{start:p,end:g()}),d="")}}(this.resume(),{nonTerminated:!1}),bE(r.position),r.position.end=t(e.end)}function y(e){let n=this.data.mdxJsxTag;bE();let r=n.attributes[n.attributes.length-1];bE(r.type);let i={type:"mdxJsxAttributeValueExpression",value:this.resume()},o=e.estree;o&&(i.data={estree:o}),r.value=i,bE(r.position),r.position.end=t(e.end)}function b(){let e=this.data.mdxJsxTag;bE(),e.selfClosing=!0}function v(e){let t=this.data.mdxJsxTag;bE();let n=this.data.mdxJsxTagStack;bE();let r=n[n.length-1];if(t.close&&r.name!==t.name)throw new oV("Unexpected closing tag `"+w(t)+"`, expected corresponding closing tag for `"+w(r)+"` ("+oF(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,k),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function k(e,t){let n=this.data.mdxJsxTagStack;bE();let r=n[n.length-1];bE();let i=e?" before the end of `"+e.type+"`":"",o=e?{start:e.start,end:e.end}:void 0;throw new oV("Expected a closing tag for `"+w(r)+"` ("+oF({start:t.start,end:t.end})+")"+i,o,"mdast-util-mdx-jsx:end-tag-mismatch")}function x(e,t){let n=this.data.mdxJsxTag;throw bE(),new oV("Expected the closing tag `"+w(n)+"` either after the end of `"+t.type+"` ("+oF(t.end)+") or another opening tag after the start of `"+t.type+"` ("+oF(t.start)+")",{start:e.start,end:e.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function w(e){return"<"+(e.close?"/":"")+(e.name||"")+">"}}
129(),{enter:{mdxjsEsm:S0},exit:{mdxjsEsm:S1,mdxjsEsmData:S2}}]}function S4(e){return{extensions:[{handlers:{mdxFlowExpression:S_,mdxTextExpression:S_},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]},function(e){let t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||1/0,s='"'===n?"'":'"';if('"'!==n&&"'"!==n)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return a.peek=SZ,{handlers:{mdxJsxFlowElement:a,mdxJsxTextElement:a},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function a(e,t,a,l){let c="mdxJsxFlowElement"===e.type,d=!!e.name&&(!e.children||0===e.children.length),u=SQ(SX(a)),h=a.createTracker(l),p=a.createTracker(l),f=[],m=(c?u:"")+"<"+(e.name||""),g=a.enter(e.type);if(h.move(m),p.move(m),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&&xR(e,n)>xR(e,s)?s:n;a=t+SF(e,Object.assign({format:SJ},{subset:[t]}))+t}i=t+(a?"=":"")+a}f.push(i)}}let y=!1,b=f.join(" ");c&&(/\r?\n|\r/.test(b)||h.current().now.column+b.length+(d?i?2:3:1)>o)&&(y=!0);let v=h,k=m;if(y){v=p;let e=-1;for(;++e<f.length;)f[e]=u+" "+f[e];k+=v.move("\n"+f.join("\n")+"\n"+u)}else b&&(k+=v.move(" "+b));return d&&(k+=v.move((i||y?"":" ")+"/")),k+=v.move(">"),e.children&&e.children.length>0&&("mdxJsxTextElement"===e.type?k+=v.move(a.containerPhrasing(e,{...v.current(),before:">",after:"<"})):(v.shift(2),k+=v.move("\n"),k+=v.move(function(e,t,n){let r=t.indexStack,i=e.children,o=t.createTracker(n),s=SQ(SX(t)),a=[],l=-1;for(r.push(-1);++l<i.length;){let n=i[l];r[r.length-1]=l;let c={before:"\n",after:"\n",...o.current()},d=t.handle(n,e,t,c),u="mdxJsxFlowElement"===n.type?d:t.indentLines(d,function(e,t,n){return(n?"":s)+e});a.push(o.move(u)),"list"!==n.type&&(t.bulletLastUsed=void 0),l<i.length-1&&a.push(o.move("\n\n"))}return r.pop(),a.join("")}(e,a,v.current())),k+=v.move("\n"))),d||(k+=v.move((c?u:"")+"</"+(e.name||"")+">")),g(),k}}(e),{handlers:{mdxjsEsm:S5}}]}}let S6={}.hasOwnProperty,S8=Symbol("continue"),S9=Symbol("exit"),S7=Symbol("skip");function Ce(e){return Array.isArray(e)?e:"number"==typeof e?[S8,e]:[e]}function Ct(e){return!!(e&&"object"==typeof e&&"type"in e&&"string"==typeof e.type&&e.type.length>0)}function Cn(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function Cr(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Ci(n.start,r[0]||t.start),o=Ci(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function Ci(e,t){if(e&&"object"==typeof e){let n="line"in e?Co(e.line):void 0,r="column"in e?Co(e.column):void 0;if(n&&void 0!==r)return{line:n,column:r+1,offset:Co(t)}}}function Co(e){return"number"==typeof e&&e>-1?e:void 0}let Cs="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",Ca="#unexpected-type-in-code-expected-an-object-spread-spread";function Cl(e,t,n,r,i,o,s,a,l,c,d){let u,h,p=this,f=this.events.length+3,m=0;return function(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),u=p.now(),g};function g(d){if(null===d){if(h)throw h;let e=new oV("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:p.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw e.url=Cs+"#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",e}if(xH(d))return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),b;if(125===d&&0===m){let m=o?Cc.call(p,o,s,i,f,u,c||!1,l||!1):{type:"ok",estree:void 0};if("ok"===m.type){e.enter(r),e.consume(d),e.exit(r);let i=e.exit(n);return a&&m.estree&&Object.assign(i,{estree:m.estree}),t}return h=m.message,e.enter(i),e.consume(d),y}return e.enter(i),y(d)}function y(t){return 125===t&&0===m||null===t||xH(t)?(e.exit(i),g(t)):(123!==t||o?125===t&&(m-=1):m+=1,e.consume(t),y)}function b(t){let n=p.now();if(n.line!==u.line&&!d&&p.parser.lazy[n.line]){let e=new oV("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:p.now(),ruleId:"unex
129pected-lazy",source:"micromark-extension-mdx-expression"});throw e.url=Cs+"#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",e}return xV(t)?Ei(e,g,"linePrefix",3)(t):g(t)}}function Cc(e,t,n,r,i,o,s){let a=function(e,t){let n,r,i=t.prefix||"",o=t.suffix||"",s=Object.assign({},t.acornOptions),a=[],l=[],c=s.onComment,d=s.onToken,u=!1,h=Object.assign({},s,{onComment:a,preserveParens:!0});d&&(h.onToken=l);let p=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}(e,t.tokenTypes),f=p.value,m=i+f+o,g=t.expression&&Cn(f);if(g&&!t.allowEmpty)throw new oV("Unexpected empty expression",{place:k(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{n=t.expression&&!g?t.acorn.parseExpressionAt(m,0,h):t.acorn.parse(m,h)}catch(t){let e=k(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,u=t.raisedAt>=i.length+f.length||"Unterminated comment"===t.message}if(n&&t.expression&&!g)if(Cn(m.slice(n.end,m.length-o.length)))n={type:"Program",start:0,end:i.length+f.length,body:[{type:"ExpressionStatement",expression:n,start:0,end:i.length+f.length}],sourceType:"module",comments:[]};else{let e=k(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 y,b;let e,t;if(n.comments=a,y=n,"function"==typeof(b=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=b:b,(function n(r,i,o,s){return Ct(r)&&(a.displayName="node ("+r.type+")"),a;function a(){let a=e?Ce(e(r,i,o,s)):[];if(a[0]===S9)return a;
129if(a[0]!==S7){let e;for(e in r)if(S6.call(r,e)&&r[e]&&"object"==typeof r[e]&&"data"!==e&&"position"!==e){let t=s.concat(r),i=r[e];if(Array.isArray(i)){let r=0;for(;r>-1&&r<i.length;){let o=i[r];if(Ct(o)){let i=n(o,e,r,t)();if(i[0]===S9)return i;r="number"==typeof i[1]?i[1]:r+1}else r++}}else if(Ct(i)){let r=n(i,e,void 0,t)();if(r[0]===S9)return r}}}return t?Ce(t(r,i,o,s)):a}})(y,void 0,void 0,[])(),Array.isArray(c))c.push(...a);else if("function"==typeof c)for(let e of a)c("Block"===e.type,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of l)e.end<=i.length||e.start-i.length>=f.length||(v(e),Array.isArray(d)?d.push(e):d(e))}return{estree:n,error:r,swallow:u};function v(e){let t=k(e.start),n=k(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 k(e){let n=e-i.length;n<0?n=0:n>f.length&&(n=f.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}}(p.stops,n);return r||(r={line:t.start.line,column:t.start.column,offset:t.start.offset}),r}}(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:s?"({":"",suffix:s?"})":""}),l=a.estree;if(s&&l){let e=l.body[0];if("ExpressionStatement"!==e.type||"ObjectExpression"!==e.expression.type){let t=Cr(e),n=new oV("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw n.url=Cs+Ca,n}if(e.expression.properties[1]){let t=new oV("Unexpected extra content in spread: only a single spread is supported",{place:Cr(e.expression.properties[1]).start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw t.url=Cs+"#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=Cr(e.expression.properties[0]),n=new oV("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=Cs+Ca,n}}if(a.error){let e=new oV("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=Cs+"#could-not-parse-expression-with-acorn",{type:"nok",message:e}}return{type:"ok",estree:l}}let Cd=/[$_\p{ID_Start}]/u,Cu=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Ch=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Cp={};function Cf(e){return!!e&&Cd.test(String.fromCodePoint(e))}function Cm(e,t){let n=(t||Cp).jsx?Ch:Cu;return!!e&&n.test(String.fromCodePoint(e))}let Cg="https://github.com/micromark/micromark-extension-mdx-jsx";function Cy(e,t,n,r,i,o,s,a,l,c,d,u,h,p,f,m,g,y,b,v,k,x,w,E,T,S,C,A,_,N,O,M){let I,D,R=this;return function(t){return e.enter(a),e.enter(l),e.consume(t),e.exit(l),z};function z(e){return xU(e)?n(e):(I=L,er(e))}function L(t){return 47===t?(e.enter(c),e.consume(t),e.exit(c),I=P,er):62===t?en(t):null!==t&&t>=0&&Cf(t)?(e.enter(u),e.enter(h),e.consume(t),j):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 P(t){return 62===t?en(t):null!==t&&t>=0&&Cf(t)?(e.enter(u),e.enter(h),e.consume(t),j):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 j(t){return null!==t&&t>=0&&Cm(t,{jsx:!0})?(e.consume(t),j):46===t||47===t||58===t||62===t||123===t||xU(t)||xG(t)?(e.exit(h),I=$,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 $(t){return 46===t?(e.enter(p),e.consume(t),e.exit(p),I=F,er):58===t?(e.enter(m),e.consume(t),e.exit(m),I=U,er):47===t||62===t||123===t||null!==t&&t>=0&&Cf(t)?(e.exit(u),G(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 F(t){if(null!==t&&t>=0&&Cf(t))return e.enter(f),e.consume(t),B;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 B(t){return null!==t&&t>=0&&Cm(t,{jsx:!0})?(e.consume(t),B):46===t||47===t||62===t||123===t||xU(t)||xG(t)?(e.exit(f),I=H,er(t)):void eo(t,"in member name","a
129name 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 H(t){return 46===t?(e.enter(p),e.consume(t),e.exit(p),I=F,er):47===t||62===t||123===t||null!==t&&t>=0&&Cf(t)?(e.exit(u),G(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 U(t){if(null!==t&&t>=0&&Cf(t))return e.enter(g),e.consume(t),V;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 V(t){return null!==t&&t>=0&&Cm(t,{jsx:!0})?(e.consume(t),V):47===t||62===t||123===t||xU(t)||xG(t)?(e.exit(g),I=q,er(t)):void eo(t,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function q(t){if(47===t||62===t||123===t||null!==t&&t>=0&&Cf(t))return e.exit(u),G(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 G(t){return 47===t?(e.enter(d),e.consume(t),e.exit(d),I=et,er):62===t?en(t):123===t?Cl.call(R,e,W,y,b,v,r,i,o,!0,!1,s)(t):null!==t&&t>=0&&Cf(t)?(e.enter(k),e.enter(x),e.enter(w),e.consume(t),K):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 W(e){return I=G,er(e)}function K(t){return null!==t&&t>=0&&Cm(t,{jsx:!0})?(e.consume(t),K):47===t||58===t||61===t||62===t||123===t||xU(t)||xG(t)?(e.exit(w),I=J,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 J(t){return 58===t?(e.enter(E),e.consume(t),e.exit(E),I=Y,er):61===t?(e.exit(x),e.enter(S),e.consume(t),e.exit(S),I=Z,er):47===t||62===t||123===t||xU(t)||xG(t)||null!==t&&t>=0&&Cf(t)?(e.exit(x),e.exit(k),I=G,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 Y(t){if(null!==t&&t>=0&&Cf(t))return e.enter(T),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&&Cm(t,{jsx:!0})?(e.consume(t),X):47===t||61===t||62===t||123===t||xU(t)||xG(t)?(e.exit(T),e.exit(x),I=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),I=Z,er):47===t||62===t||123===t||null!==t&&t>=0&&Cf(t)?(e.exit(k),G(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(C),e.enter(A),e.consume(t),e.exit(A),D=t,function t(n){return(null===n&&eo(n,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(D)+"`"),n===D)?(e.enter(A),e.consume(n),e.exit(A),e.exit(C),e.exit(k),D=void 0,I=G,er):xH(n)?(I=t,er(n)):(e.enter(_),function n(r){return null===r||r===D||xH(r)?(e.exit(_),t(r)):(e.consume(r),n)}(n))}):123===t?Cl.call(R,e,ee,N,O,M,r,i,o,!1,!1,s)(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(k),I=G,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(l),e.consume(n),e.exit(l),e.exit(a),t}function er(t){return xH(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ei):xV(t)||xG(t)?(e.enter("esWhitespace"),function t(n){return xH(n)?(e.exit("esWhitespace"),er(n)):xV(n)||xG(n)?(e.consume(n),t):(e.exit("esWhitespace"),I(n))}(t)):I(t)}function ei(e){if(!s&&R.parser.lazy[R.now().line]){let e=new oV("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=Cg+"#unexpected-lazy-line-in-container-expected-line-to-be",e}return er(e)}function eo(e,t,n){let r=new oV("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=Cg+(null===e?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-ex
129pected-expect"),r}}function Cb(){return wQ([function(){let e,t={},n=t.addResult,r=t.acorn,i=t.spread,o=t.allowEmpty;if(null==o&&(o=!0),r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");e=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:function(t,s,a){let l=this;return function(s){var a;return a=s,Cl.call(l,t,c,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",r,e,n,i,o)(a)};function c(e){return xV(e)?Ei(t,d,"whitespace")(e):d(e)}function d(e){let n=l.parser.constructs.flow[60],r=(Array.isArray(n)?n:n?[n]:[]).find(function(e){return"mdxJsxFlowTag"===e.name});return 60===e&&r?t.attempt(r,d,a)(e):null===e||xH(e)?s(e):a(e)}},concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:function(t,s){let a=this;return function(l){return Cl.call(a,t,s,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",r,e,n,i,o,!0)(l)}}}}}}(),function(){var e,t,n,r;let i,o={},s=o.acorn;if(s){if(!s.parse||!s.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");i=Object.assign({ecmaVersion:2024,sourceType:"module"},o.acornOptions,{locations:!0})}else if(o.acornOptions||o.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:(e=s||void 0,t={acornOptions:i,addResult:o.addResult||void 0},{concrete:!0,name:"mdxJsxFlowTag",tokenize:function(n,r,i){let o=this;return function(e){return s(e)};function s(r){return Cy.call(o,n,a,i,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(r)}function a(e){return xV(e)?Ei(n,l,"whitespace")(e):l(e)}function l(e){let t,a=o.parser.constructs.flow[123];for(let e of Array.isArray(a)?a:a?[a]:[])if("mdxFlowExpression"===e.name){t=e;break}return 60===e?s(e):123===e&&t?n.attempt(t,l,i)(e):null===e||xH(e)?r(e):i(e)}}})},text:{60:(n=s||void 0,r={acornOptions:i,addResult:o.addResult||void 0},{name:"mdxJsxTextTag",tokenize:function(e,t,i){return Cy.call(this,e,t,i,n,r.acornOptions,r.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")}})}}}(),{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}])}var Cv=e.i(882312),Ck=e.i(876259),Cx=e.i(470855),Cw=e.i(153760),CE=e.i(585781);let CT=()=>{throw Error("Node APIs are not available in browser context.")},CS={access:(e,t)=>t(Error("Node APIs are not available in browser context.")),accessSync:CT,readFile:(e,t,n
129)=>n(Error("Node APIs are not available in browser context.")),readFileSync:CT},CC={};var CA=e.i(496118),C_=e.i(310556);let CN=new Map;function CO(e){CN.clear(),s=e}function CM(){return s?.parsers.micromark.tokens||[]}function CI(e,t){if(CN.has(e))return CN.get(e);let n=t();return CN.set(e,n),n}function CD(e,t){return CI(JSON.stringify(arguments),()=>(0,C_.filterByTypes)(CM(),e,t))}function CR(){return CI(CR.name,()=>(0,CA.getReferenceLinkImageData)(CM()))}let Cz="0.41.0";var CL=e.i(34009);let CP=e=>"-"===e?"dash":"+"===e?"plus":"asterisk",Cj=e=>"dash"===e?"-":"plus"===e?"+":"*",C$=e=>"dash"===e?"plus":"plus"===e?"asterisk":"dash",CF=new Set(["asterisk","consistent","dash","plus","sublist"]),CB=["blockQuotePrefix","listItemPrefix","listUnordered"],CH=["blockQuote","listOrdered","listUnordered"],CU=/\t+/g,CV=/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g,Cq=/^(?:[#>\s]*\s)?\S*$/,CG=/^(\s*)(\$\s+)/;function CW(e,t,n){let{children:r,startLine:i,text:o}=t,s=n>0?0:r.length-1;for(;r[s]&&"atxHeadingSequence"!==r[s].type;)s+=n;let a=r[s],l=r[s+n];if(a?.type==="atxHeadingSequence"&&l?.type==="whitespace"&&l.text.length>1){let t=l.startColumn+1,r=l.endColumn-t;(0,CA.addErrorContext)(e,i,o.trim(),n>0,n<0,[t,r],{editColumn:t,deleteCount:r})}}let CK=[{names:["MD019","no-multiple-space-atx"],description:"Multiple spaces after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){for(let e of CD(["atxHeading"]).filter(e=>"atx"===(0,C_.getHeadingStyle)(e)))CW(t,e,1)}},{names:["MD021","no-multiple-space-closed-atx"],description:"Multiple spaces inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){for(let e of CD(["atxHeading"]).filter(e=>"atx_closed"===(0,C_.getHeadingStyle)(e)))CW(t,e,1),CW(t,e,-1)}}],CJ=e=>{if(Array.isArray(e)){let t=Array(6).fill(1);for(let[n,r]of[...e.entries()].slice(0,6))t[n]=r;return e=>t[(0,C_.getHeadingLevel)(e)-1]}let t=void 0===e?1:Number(e);return()=>t},CY=(e,t,n,r)=>t>=0&&t<e.length?e[t]:r&&n.length>0&&t<0&&t>=-n.length?n[n.length+t]:"",CX=["listOrdered","listUnordered"],CQ=new Set(["lineEnding","listItemIndent","linePrefix"]),CZ={one:"1/1/1",ordered:"1/2/3",zero:"0/0/0"},C0=Object.keys(CZ);function C1(e){let t=(0,C_.getDescendantsByType)(e,["listItemValue"])[0];return{column:t.startColumn,value:Number(t.text)}}let C2=/^(.*?)[`~]/;function C5(e,t,n,r){let i=t[n-1],[,o]=i.match(C2)||[],s=void 0===o?void 0:{lineNumber:n+ +!r,insertText:`${o.replace(/[^>]/g," ").trim()} 130`};(0,CA.addErrorContext)(e,n,i.trim(),void 0,void 0,void 0,s)}let C3=e=>"listOrdered"===e.type||"listUnordered"===e.type,C4=e=>Array.isArray(e)?e.map(e=>String(e).toLowerCase()):[],C6=[["emphasis","emphasisText"],["strong","strongText"]],C8=e=>"htmlText"!==e.type&&("data"!==e.type||0!==e.text.trim().length);function C9(e,t,n,r){let i=n.text.match(r?/^[^\S\r\n]+/:/[^\S\r\n]+$/),o=i?[r?n.startColumn:n.endColumn-i[0].length,i[0].length]:void 0;(0,CA.addErrorContext)(e,r?n.startLine+ +!i:n.endLine-!i,t.text.replace(/\s+/g," "),r,!r,o,o?{editColumn:o[0],deleteCount:o[1]}:void 0)}let C7=/^h[1-6]$/;function Ae(e,t,n,r,i,o,s,a,l,c,d,u,h,p,f){let m,g;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),y};function y(t){return 35===t?(m=s,b(t)):46===t?(m=a,b(t)):f&&xV(t)?Ei(e,y,"whitespace")(t):!f&&xU(t)?T8(e,y)(t):null===t||xH(t)||xG(t)||xq(t)&&45!==t&&95!==t?N(t):(e.enter(o),e.enter(l),e.consume(t),x)}function b(t){let n=m+"Marker";return e.enter(o),e.enter(m),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||xU(t))return n(t);let r=m+"Value";return e.enter(r),e.consume(t),k}function k(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||xU(t)){let n=m+"Value";return e.exit(n),e.exit(m),e.exit(o),y(t)}return e.consume(t),k}function x(t){return null===t||xH(t)||xG(t)||xq(t)&&45!==t&&46!==t&&58!==t&&95!==t?(e.exit(l),f&&xV(t))?Ei(e,w,"whitespace")(t):!f&&xU(t)?T8(e,w)(t):w(t):(e.consume(t),x)}function w(t){return 61===t?(e.enter(c),e.consume(t),e.exit(c),E):(e.exit(o),y(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||f&&xH(t)?n(t):34===t||39===t?(e.enter(d),e.enter(h),e.consume(t),e.exit(h),g=t,S):f&&xV(t)?Ei(e,E,"whitespace")(t):!f&&xU(t)?T8(e,E)(t):(e.enter(u),e.enter(p),e.consume(t),g=void 0,T)}function T(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?n(t):125===t||xU(t)?(e.exit(p),e.exit(u),e.exit(o),y(t)):(e.consume(t),T)}function S(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(d),e.exit(o),_):(e.enter(u),C(t))}function C(t){return t===g?(e.exit(u),S(t)):null===t?n(t):xH(t)?f?n(t):T8(e,C)(t):(e.enter(p),e.consume(t),A)}function A(t){return t===g||null===t||xH(t)?(e.exit(p),C(t)):(e.consume(t),A)}function _(e){return 125===e||xU(e)?y(e):N(e)}function N(o){return 125===o?(e.enter(i),e.consume(o),e.exit(i),e.exit(r),t):n(o)}}function At(e,t,n,r,i,o,s){let a,l=0,c=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),d};function d(n){return 93===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),u(n))}function u(t){if(93===t&&!c)return f(t);let n=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:a});return a&&(a.next=n),a=n,h(t)}function h(t){return null===t||l>999||91===t&&++c>32?n(t):93!==t||c--?xH(t)?s?n(t):(e.consume(t),e.exit("chunkText"),u):(e.consume(t),92===t?p:h):(e.exit("chunkText"),f(t))}function p(t){return 91===t||92===t||93===t?(e.consume(t),l++,h):h(t)}function f(n){return e.exit(o),e.enter(i),e.consume(n),e.exit(i),e.exit(r),t}}function An(e,t,n,r){let i=this;return function(t){return null===t||xH(t)||xq(t)||xG(t)?n(t):(e.enter(r),e.consume(t),o)};function o(s){return null===s||xH(s)||xG(s)||xq(s)&&45!==s&&95!==s?(e.exit(r),45===i.previous||95===i.previous?n(s):t(s)):(e.consume(s),o)}}let Ar={tokenize:function(e,t,n){let r,i=this,o=i.events[i.events.length-1],s=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"),An.call(i,e,l,n,"directiveContainerName")(r))}(t)};function l(t){return 91===t?e.attempt(Ai,c,c)(t):c(t)}function c(t){return 123===t?e.attempt(Ao,d,d)(t):d(t)}function d(t){return Ei(e,u,"whitespace")(t)}function u(r){return(e.exit("directiveContainerFence"),null===r)?k(r):xH(r)?i.interrupt?t(r):e.attempt(As,h,k)(r):n(r)}function h(t){return null===t?k(t):xH(t)?e.check(As,g,k)(t):(e.enter("directiveContainerContent"),p(t))}function p(t){return e.attempt({tokenize:x,partial:!0},v,s?Ei(e,f,"linePrefix",s+1):f)(t)}function f(t){return null===t?v(t):xH(t)?e.check(As,m,v)(t):m(t)}function m(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 xH(n)?e.check(As,y,b)(n):(e.consume(n),t)}(t)}function g(t){return e.enter("directiveContainerContent"),p(t)}function y(t){e.consume(t);let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,p}function b(t){let n=e.exit("chunkDocument");return i.parser.lazy[n.start.line]=!1,v(t)}function v(t){return e.exit("directiveContainerContent"),k(t)}function k(n){return e.exit("directiveContainer"),t(n)}function x(e,t,n){let r=0;return Ei(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"),Ei(e,o,"whitespace")(i))}(t)},"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(r){return null===r||xH(r)?(e.exit("directiveContainerFence"),t(r)):n(r)}}},concrete:!0},Ai={tokenize:function(e,t,n){return At(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},Ao={tokenize:function(e,t,n){return Ae(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},As={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},Aa={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"),An.call(r,e,o,n,"directiveLeafName")):n(t)}function o(t){return 91===t?e.attempt(Al,s,s)(t):s(t)}function s(t){return 123===t?e.attempt(Ac,a,a)(t):a(t)}function a(t){return Ei(e,l,"whitespace")(t)}function l(r){return null===r||xH(r)?(e.exit("directiveLeaf"),t(r)):n(r)}}},Al={tokenize:function(e,t,n){return At(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},Ac={tokenize:function(e,t,n){return Ae(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0},Ad={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),An.call(r,e,i,n,"directiveTextName")};function i(t){return 58===t?n(t):91===t?e.attempt(Au,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(Ah,s,s)(t):s(t)}function s(n){return e.exit("directiveText"),t(n)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},Au={tokenize:function(e,t,n){return At(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},Ah={tokenize:function(e,t,n){return Ae(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};var Ap=e.i(437724);function Af(e,t){return e.slice(t.start.offset,t.end.offset)}function Am(e,t){return function e(t,n={},r={},i=0,o){let s=!!n.freezeTokens,a=function(e,t={}){let n,r=[(n={text:{58:Ad},flow:{58:[Ar,Aa]}},delete n.text,n),{text:w8},Ea(),Eg(),TM(),...t.extensions||[]],i=[],o=Sr.tokenize;try{Sr.tokenize=function(t,n,r){let s=this,a=s.events;return o.call(s,t,n,t=>{let n=a.length;for(;--n>=0;){let[e,t]=a[n];if("enter"===e){let{type:e}=t;if("labelImage"===e||"labelLink"===e)break}}if(n>=0){let[,t]=a[n],[,r]=a[a.length-1],o={type:"undefinedReferenceShortcut",start:t.start,end:r.end},l={type:"undefinedReference",start:t.start,end:r.end},c=a.slice(n).filter(e=>{let[,t]=e,{type:n}=t;return"data"===n||"lineEnding"===n}),d=i.length>0&&i[i.length-1][0],u=d&&d[1];u&&u.end.line===o.start.line&&u.end.column===o.start.column&&(0===c.length?(u.type="undefinedReferenceCollapsed",u.end=r.end):(o.type="undefinedReferenceFull",o.start=u.start,i.pop()));let h=c.filter(e=>"enter"===e[0]).map(t=>Af(e,t[1])).join("").trim();if(h.length>0&&!h.includes("]")){let e=[["enter",o,s],["enter",l,s]];
130for(let t of c){let[n,r]=t;e.push([n,{...r},s])}e.push(["exit",l,s],["exit",o,s]),i.push(e)}}return r(t)})};let n=Sg({...t,extensions:r}),s=Sv()(e,void 0,!0);return Sy(n.document().write(s)).concat(...i)}finally{Sr.tokenize=o}}(t,r),l=[],c=[],d={type:"data",startLine:-1,startColumn:-1,endLine:-1,endColumn:-1,text:"ROOT",children:l,parent:null},u=[d],h=d,p=null,f=null,m=!1;for(let l of a){let[a,g]=l,{type:y,start:b,end:v}=g,{column:k,line:x}=b,{column:w,line:E}=v,T=Af(t,g);if("enter"!==a||m)"exit"===a&&("htmlFlow"===y&&(m=!1),m||(s&&(Object.freeze(h.children),Object.freeze(h)),h=u.pop()));else{let s=h;if(u.push(s),h={type:y,startLine:x+i,startColumn:k,endLine:E+i,endColumn:w,text:T,children:[],parent:s===d?o||null:s},o&&Object.defineProperty(h,Ap.htmlFlowSymbol,{value:!0}),s.children.push(h),c.push(h),"htmlFlow"===h.type&&!(0,C_.isHtmlFlowComment)(h)){m=!0,p&&f||(p={...r,extensions:[{disable:{null:["codeIndented","htmlFlow"]}}]},f=t.split(Ap.newlineRe));let i=e(f.slice(h.startLine-1,h.endLine).join("\n"),n,p,h.startLine-1,h);h.children=i,c=c.concat(i[Ap.flatTokensSymbol])}}}return Object.defineProperty(l,Ap.flatTokensSymbol,{value:c}),s&&Object.freeze(l),l}(e,t)}let Ag=new Set(["codeFencedFence","definition","reference","resource"]),Ay=(0,CA.getHtmlAttributeRe)("alt"),Ab=(0,CA.getHtmlAttributeRe)("aria-hidden"),Av=e=>"codeFenced"===e?"fenced":"indented";function Ak(e){return"~"===e[0]?"tilde":"backtick"}let Ax=/^\w$/,Aw=(e,t,n,r,i,o,s="consistent")=>{let{lines:a,parsers:l}=e;for(let e of(0,C_.filterByPredicate)(l.micromark.tokens,e=>e.type===n,e=>"htmlFlow"===e.type?[]:e.children)){let n=(0,C_.getDescendantsByType)(e,[r]),l=n[0],c=n[n.length-1];if(l&&c){let e="*"===l.text[0]?"asterisk":"underscore";if("consistent"===s&&(s=e),s!==e&&!("underscore"===s&&(Ax.test(a[l.startLine-1][l.startColumn-2])||Ax.test(a[c.endLine-1][c.endColumn-1]))))for(let n of[l,c])(0,CA.addError)(t,n.startLine,`Expected: ${s}; Actual: ${e}`,void 0,[n.startColumn,n.text.length],{editColumn:n.startColumn,deleteCount:n.text.length,insertText:"asterisk"===s?i:o})}}},AE=[{names:["MD049","emphasis-style"],description:"Emphasis style",tags:["emphasis"],parser:"micromark",function:function(e,t){return Aw(e,t,"emphasis","emphasisSequence","*","_",e.config.style||void 0)}},{names:["MD050","strong-style"],description:"Strong style",tags:["emphasis"],parser:"micromark",function:function(e,t){return Aw(e,t,"strong","strongSequence","**","__",e.config.style||void 0)}}],AT=(0,CA.getHtmlAttributeRe)("id"),AS=(0,CA.getHtmlAttributeRe)("name"),AC=/\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu,AA=/^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/,A_=new Set(["image","reference","resource"]),AN=new Set(["characterEscapeValue","codeTextData","data","mathTextData"]),AO=/^ {0,3}\[([^\]]*[^\\])\]:/,AM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,AI=e=>e.replace(AM,"$1"),AD=/[ <>]/,AR=e=>{try{new URL(e)}catch{return!1}return!AD.test(e)},Az=new Set(["linePrefix","whitespace"]),AL=e=>e.filter(e=>!Az.has(e.type)),AP=e=>e[0],Aj=e=>e[e.length-1],A$=(e,t)=>[e,t-e+1],AF=(e,t)=>[e,t-e+1],AB=new Set(["codeText","htmlText"]),AH=["click here","here","link","more"];function AU(e){return e.replace(/[\W_]+/g," ").replace(/\s+/g," ").toLowerCase().trim()}let AV=function({onlyFirst:e=!1}={}){return RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}(),Aq=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9
130618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],AG=[12288,12288,65281,65376,65504,65510],AW=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],AK=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],AJ=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],AY=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),o=2*i;if(t<e[o])r=i-1;else{if(!(t>e[o+1]))return!0;n=i+1}}return!1},AX=Aq[0],AQ=Aq.at(-1),AZ=AG[0],A0=AG.at(-1);AW[0],AW.at(-1),AK[0],AK.at(-1);let A1=AJ[0],A2=AJ.at(-1),[A5,A3]=function(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],o=e[r+1];if(19968>=i&&19968<=o)return[i,o];o-i>n-t&&(t=i,n=o)}return[t,n]}(AJ);function A4(e,{ambiguousAsWide:t=!1}={}){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`);return!(e<AZ)&&!(e>A0)&&AY(AG,e)||e>=A5&&e<=A3||!(e<A1)&&!(e>A2)&&AY(AJ,e)||t&&!(e<AX)&&!(e>AQ)&&AY(Aq,e)?2:1}let A6=new Intl.Segmenter,A8=RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),A9=RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),A7=RegExp("^\\p{RGI_Emoji}$","v"),_e=/^[\d#*]\u20E3$/,_t=/\p{Extended_Pictographic}/gu;function _n(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function _r(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function _i(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function _o(e,t,n,r,i){e.push({lineNumber:t,detail:r,range:[n,1],fixInfo:i})}function _s(e,t){return(0,C_.filterByTypes)(t.children,["tableCellDivider"]).map(n=>({actual:n.startColumn,effective:function(e,t={}){if("string"!=typeof e||0===e.length)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t,i=e;if(!r&&(i.includes("\x1b")||i.includes("Â"))&&(i=function(e){if("string"!=typeof e)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.includes("\x1b")||e.includes("Â")?e.replace(AV,""):e}(i)),0===i.length)return 0;if(/^[\u0020-\u007E]*$/.test(i))return i.length;let o=0,s={ambiguousAsWide:!n};for(let{segment:e}
130of A6.segment(i)){if(A8.test(e))continue;if(A7.test(e)||function(e){if(e.length>50)return!1;if(_e.test(e))return!0;if(e.includes("â")){let t=e.match(_t);return null!==t&&t.length>=2}return!1}(e)){o+=2;continue}let t=e.replace(A9,""),n=function(e,t){let n=[];for(let t of e)A8.test(t)||n.push(t.codePointAt(0));if(0===n.length)return;let r=0;for(let e=0;e<n.length;e++){let i=n[e];if(!(_n(i)||_r(i)||_i(i))){if(0===r)return;for(let i=e;i<n.length;i++)r+=A4(n[i],t);break}if(_n(i)&&_r(n[e+1])){r+=2,e+=_i(n[e+2])?2:1;continue}r+=A4(i,t)}return r}(t,s);if(void 0!==n){o+=n;continue}o+=A4(t.codePointAt(0),s),o+=function(e,t){let n=0,r=!0;for(let i of e){if(r){r=!1;continue}i>="ï¼"&&i<="￯"&&(n+=A4(i.codePointAt(0),t))}return n}(t,s)}return o}(e[t.startLine-1].slice(0,n.startColumn-1))}))}function _a(e,t,n){let r=[],i=_s(e,t[0]);for(let o of t.slice(1)){let t=new Set(i.map(e=>e.effective));for(let i of _s(e,o))t.size>0&&!t.delete(i.effective)&&_o(r,o.startLine,i.actual,n)}return r}let[_l,_c]=CK,[_d,_u]=AE,_h=[{names:["MD001","heading-increment"],description:"Heading levels should only increment by one level at a time",tags:["headings"],parser:"micromark",function:function(e,t){let n=(0,CA.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)?1:Number.MAX_SAFE_INTEGER;for(let e of CD(["atxHeading","setextHeading"])){let r=(0,C_.getHeadingLevel)(e);r>n&&(0,CA.addErrorDetailIf)(t,e.startLine,`h${n+1}`,`h${r}`),n=r}}},{names:["MD003","heading-style"],description:"Heading style",tags:["headings"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(let e of CD(["atxHeading","setextHeading"])){let r=(0,C_.getHeadingStyle)(e);if("consistent"===n&&(n=r),r!==n){let i=2>=(0,C_.getHeadingLevel)(e),o="setext_with_atx"===n&&(i&&"setext"===r||!i&&"atx"===r),s="setext_with_atx_closed"===n&&(i&&"setext"===r||!i&&"atx_closed"===r);if(!o&&!s){let o=n;"setext_with_atx"===n?o=i?"setext":"atx":"setext_with_atx_closed"===n&&(o=i?"setext":"atx_closed"),(0,CA.addErrorDetailIf)(t,e.startLine,o,r)}}}}},{names:["MD004","ul-style"],description:"Unordered list style",tags:["bullet","ul"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent"),r=CF.has(n)?n:"dash",i=[];for(let e of CD(["listUnordered"])){let o=0;if("sublist"===n){let t=e;for(;t=(0,C_.getParentOfType)(t,["listOrdered","listUnordered"]);)o++}for(let s of(0,C_.getDescendantsByType)(e,["listItemPrefix","listItemMarker"])){let e=CP(s.text);"sublist"===n?(i[o]||(i[o]=e===i[o-1]?C$(e):e),r=i[o]):"consistent"===r&&(r=e);let a=s.startColumn,l=s.endColumn-s.startColumn;(0,CA.addErrorDetailIf)(t,s.startLine,r,e,void 0,void 0,[a,l],{editColumn:a,deleteCount:l,insertText:Cj(r)})}}}},{names:["MD005","list-indent"],description:"Inconsistent indentation for list items at the same level",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){for(let e of CD(["listOrdered","listUnordered"])){let n=e.startColumn-1,r=0,i=!1;for(let o of e.children.filter(e=>"listItemPrefix"===e.type)){let s=o.startLine,a=o.startColumn-1,l=[1,o.endColumn-1];if("listUnordered"===e.type)(0,CA.addErrorDetailIf)(t,s,n,a,void 0,void 0,l);else{let e=o.text.trim().length,c=o.startColumn+e-1;if(r=r||c,n!==a||i)if(r===c)i=!0;else{let o=i?`Expected: (${r}); Actual: (${c})`:`Expected: ${n}; Actual: ${a}`,d=i?r-e:n,u=i?c-e:a;(0,CA.addError)(t,s,o,void 0,l,{editColumn:Math.min(u,d)+1,deleteCount:Math.max(u-d,0),insertText:"".padEnd(Math.max(d-u,0))})}}}}}},{names:["MD007","ul-indent"],description:"Unordered list indentation",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){let n=Number(e.config.indent||2),r=!!e.config.start_indented,i=Number(e.config.start_indent||n),o=new Map,s=null;for(let e of CD(CB)){let{endColumn:a,parent:l,startColumn:c,startLine:d,type:u}=e;if("blockQuotePrefix"===u)s=e;else if("listUnordered"===u){let t=0,n=e;for(;n=(0,C_.getParentOfType)(n,CH);){if("listUnordered"===n.type){t++;continue}"listOrdered"===n.type&&(t=-1);break}t>=0&&o.set(e,t)}else{let u=o.get(l);if(void 0!==u){let o=4*!!(0,C_.getParentOfType)(e,["gfmFootnoteDefinition"])+(r?i:0)+u*n,l=c-1-(s?.endLine===d?s.endColumn-1:0),h=[1,a-1],p={editColumn:c-l,deleteCount:Math.max(l-o,0),insertText:"".padEnd(Math.max(o-l,0))};(0,CA.addErrorDetailIf)(t,d,o,l,void 0,void 0,h,p)}}}}},{names:["MD009","no-trailing-spaces"],description:"Trailing space
130s",tags:["whitespace"],parser:"micromark",function:function(e,t){let n=e.config.br_spaces;n=Number(void 0===n?2:n);let r=e.config.code_blocks,i=!!e.config.list_item_empty_lines,o=!!e.config.strict,s=new Set;if(!(void 0!==r&&r)){for(let e of CD(["codeFenced"]))(0,C_.addRangeToSet)(s,e.startLine+1,e.endLine-1);for(let e of CD(["codeIndented"]))(0,C_.addRangeToSet)(s,e.startLine,e.endLine)}let a=new Set;if(i)for(let e of CD(["listOrdered","listUnordered"])){(0,C_.addRangeToSet)(a,e.startLine,e.endLine);let t=!0;for(let n=e.children.length-1;n>=0;n--){let r=e.children[n];switch(r.type){case"content":t=!1;break;case"listItemIndent":t&&a.delete(r.startLine);break;case"listItemPrefix":t=!0}}}let l=new Set,c=new Set;if(o){for(let e of CD(["paragraph"]))(0,C_.addRangeToSet)(l,e.startLine,e.endLine-1);for(let e of CD(["codeText"]))(0,C_.addRangeToSet)(c,e.startLine,e.endLine-1)}let d=n<2?0:n;for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=n+1,u=r.length-r.trimEnd().length;if(u&&!s.has(i)&&!a.has(i)&&(d!==u||o&&(!l.has(i)||c.has(i)))){let e=r.length-u+1;(0,CA.addError)(t,i,"Expected: "+(0===d?"":"0 or ")+d+"; Actual: "+u,void 0,[e,u],{editColumn:e,deleteCount:u})}}}},{names:["MD010","no-hard-tabs"],description:"Hard tabs",tags:["whitespace","hard_tab"],parser:"micromark",function:function(e,t){let n=e.config.code_blocks,r=new Set((e.config.ignore_code_languages||[]).map(e=>String(e).toLowerCase())),i=e.config.spaces_per_tab,o=void 0===i?1:Math.max(0,Number(i)),s=[];void 0===n||n?r.size>0&&s.push("codeFenced"):s.push("codeFenced","codeIndented","codeText");let a=CD(s).filter(e=>"codeFenced"!==e.type||!(r.size>0)||(0,C_.getDescendantsByType)(e,["codeFencedFence","codeFencedFenceInfo"]).every(e=>r.has(e.text.toLowerCase()))).map(e=>{let{type:t,startLine:n,startColumn:r,endLine:i,endColumn:o}=e,s="codeFenced"===t;return{startLine:n+ +!!s,startColumn:s?0:r,endLine:i-!!s,endColumn:s?Number.MAX_SAFE_INTEGER:o}});for(let n=0;n<e.lines.length;n++){let r=e.lines[n],i=null;for(;null!==(i=CU.exec(r));){let e=n+1,r=i.index+1,s=i[0].length,l={startLine:e,startColumn:r,endLine:e,endColumn:r+s-1};a.some(e=>(0,CA.hasOverlap)(e,l))||(0,CA.addError)(t,e,"Column: "+r,void 0,[r,s],{editColumn:r,deleteCount:s,insertText:"".padEnd(s*o)})}}}},{names:["MD011","no-reversed-links"],description:"Reversed link syntax",tags:["links"],parser:"micromark",function:function(e,t){let n=new Set;for(let e of CD(["codeFenced","codeIndented","mathFlow"]))(0,C_.addRangeToSet)(n,e.startLine,e.endLine);let r=CD(["codeText","mathText"]);for(let[i,o]of e.lines.entries()){let e=i+1;if(!n.has(e)){let n=null;for(;null!==(n=CV.exec(o));){let[i,o,s,a]=n;if(!s.endsWith("\\")&&!a.endsWith("\\")){let l=n.index+o.length+1,c=n[0].length-o.length,d={startLine:e,startColumn:l,endLine:e,endColumn:l+c-1};r.some(e=>(0,CA.hasOverlap)(e,d))||(0,CA.addError)(t,e,i.slice(o.length),void 0,[l,c],{editColumn:l,deleteCount:c,insertText:`[${s}](${a})`})}}}}}},{names:["MD012","no-multiple-blanks"],description:"Multiple consecutive blank lines",tags:["whitespace","blank_lines"],parser:"micromark",function:function(e,t){let n=Number(e.config.maximum||1),{lines:r}=e,i=new Set;for(let e of CD(["codeFenced","codeIndented"]))(0,C_.addRangeToSet)(i,e.startLine,e.endLine);let o=0;for(let[e,s]of r.entries())n<(o=i.has(e+1)||s.trim().length>0?0:o+1)&&(0,CA.addErrorDetailIf)(t,e+1,n,o,void 0,void 0,void 0,{deleteCount:-1})}},{names:["MD013","line-length"],description:"Line length",tags:["line_length"],parser:"micromark",function:function(e,t){let n=Number(e.config.line_length||80),r=Number(e.config.heading_line_length||n),i=Number(e.config.code_block_line_length||n),o=!!e.config.strict,s=!!e.config.stern,a=e.config.code_blocks,l=void 0===a||!!a,c=e.config.tables,d=void 0===c||!!c,u=e.config.headings,h=void 0===u||!!u,p=new Set;for(let e of CD(["atxHeading","setextHeading"]))(0,C_.addRangeToSet)(p,e.startLine,e.endLine);let f=new Set;for(let e of CD(["codeFenced","codeIndented"]))(0,C_.addRangeToSet)(f,e.startLine,e.endLine);let m=new Set;for(let e of CD(["table"]))(0,C_.addRangeToSet)(m,e.startLine,e.endLine);let g=new Set;for(let e of CD(["autolink","image","link","literalAutolink"]))(0,C_.addRangeToSet)(g,e.startLine,e.endLine);let y=new Set;for(let e of CD(["paragraph"]))for(let t of(0,C_.getDescendantsByType)(e,["data"]))(0,C_.addRangeToSet)(y,t.startLine,t.endLine);let b=new Set;for(let e of g)y.has(e)||b.add(e);let v=new Set(CR().definitionLineIndices);for(let a=0;a<e.lines.length;a++){let c=e.lines[a],u=a+1,g=p.has(u),y=f.has(u),k=m.has(u),x=y?i:g?r:n,w=o||s?c:c.replace(/\S*$/u,"#");x>0&&(l||!y)&&(d||!k)&&(h||!g)&&!v.has(a)&&(o||!(s&&Cq.test(c))&&!b.has(u))&&w.length>x&&(0,CA.addErrorDetailIf)(t,u,x,c.length,void 0,void 0,[x+1,c.length-x])}}},{names:["MD014","commands-show-output"],description:"Dollar signs used before commands without showing output",tags:["code"],parser:"micromark",function:function(e,t){for(let e of CD(["codeFenced","codeIndented"])){let n=e.children.filter(e=>"codeFlowValue"===e.type),r=n.map(e=>({result:e.text.match(CG),startColumn:e.startColumn,startLine:e.startLine,text:e.text})).filter(e=>e.result);if(r.length===n.length)for(let e of r){let n=e.startColumn+e.result[1].length,r=e.result[2].length;(0,CA.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[n,r],{editColumn:n,deleteCount:r})}}}},{names:["MD018","no-missing-space-atx"],description:"No space after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){let{lines:n}=e,r=new Set;for(let e of CD(["codeFenced","codeIndented","htmlFlow"]))(0,C_.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)&&/^#+[^# \t]/.test(i)&&!/#\s*$/.test(i)&&!i.startsWith("#ï¸â£")){let n=/^#+/.exec(i)[0].length;(0,CA.addErrorContext)(t,e+1,i.trim(),void 0,void 0,[1,n+1],{editColumn:n+1,insertText:" "})}}},_l,{names:["MD020","no-missing-space-closed-atx"],description:"No space inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){let{lines:n}=e,r=new Set;for(let e of CD(["codeFenced","codeIndented","htmlFlow"]))(0,C_.addRangeToSet)(r,e.startLine,e.endLine);for(let[e,i]of n.entries())if(!r.has(e+1)){let n=/^(#+)([ \t]*)([^# \t\\]|[^# \t][^#]*?[^# \t\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(i);if(n){let[,r,{length:o},s,{length:a},l,c,{length:d}]=n,u=r.length,h=c.length,p=!o,f=!a||!!l,m=l?`${l} `:"";if(p||f){let n=p?[1,u+1]:[i.length-d-h,h+1];(0,CA.addErrorContext)(t,e+1,i.trim(),p,f,n,{editColumn:1,deleteCount:i.length,insertText:`${r} ${s} ${m}${c}`})}}}}},_c,{names:["MD022","blanks-around-headings"],description:"Headings should be surrounded by blank lines",tags:["headings","blank_lines"],parser:"micromark",function:function(e,t){let n=CJ(e.config.lines_above),r=CJ(e.config.lines_below),i=!!e.config.include_front_matter,{lines:o,frontMatterLines:s}=e,a=CD(["blockQuotePrefix","linePrefix"]);for(let e of CD(["atxHeading","setextHeading"])){let{startLine:l,endLine:c}
130=e,d=o[l-1].trim(),u=n(e);if(u>=0){let e=0;for(let t=0;t<u&&(0,CA.isBlankLine)(CY(o,l-2-t,s,i));t++)e++;(0,CA.addErrorDetailIf)(t,l,u,e,"Above",d,void 0,{insertText:(0,C_.getBlockQuotePrefixText)(a,l-1,u-e)})}let h=r(e);if(h>=0){let e=0;for(let t=0;t<h&&(0,CA.isBlankLine)(CY(o,c+t,s,!1));t++)e++;(0,CA.addErrorDetailIf)(t,l,h,e,"Below",d,void 0,{lineNumber:c+1,insertText:(0,C_.getBlockQuotePrefixText)(a,c+1,h-e)})}}}},{names:["MD023","heading-start-left"],description:"Headings must start at the beginning of the line",tags:["headings","spaces"],parser:"micromark",function:function(e,t){let n=CD(["atxHeading","linePrefix","setextHeading"]);for(let r=0;r<n.length-1;r++)if("linePrefix"===n[r].type&&"linePrefix"!==n[r+1].type&&n[r].startLine===n[r+1].startLine){let{endColumn:i,startColumn:o,startLine:s}=n[r],a=i-o;(0,CA.addErrorContext)(t,s,e.lines[s-1],!0,!1,[o,a],{editColumn:o,deleteCount:a})}}},{names:["MD024","no-duplicate-heading"],description:"Multiple headings with the same content",tags:["headings"],parser:"micromark",function:function(e,t){let n=!!e.config.siblings_only,r=[null,[]],i=1,o=r[1];for(let e of CD(["atxHeading","setextHeading"])){let s=(0,C_.getHeadingText)(e);if(n){let t=(0,C_.getHeadingLevel)(e);for(;i<t;)r[++i]=[];for(;i>t;)r[i]=[],i--;o=r[t]}o.includes(s)?(0,CA.addErrorContext)(t,e.startLine,s.trim()):o.push(s)}}},{names:["MD025","single-title","single-h1"],description:"Multiple top-level headings in the same document",tags:["headings"],parser:"micromark",function:function(e,t){let n=Number(e.config.level||1),{tokens:r}=e.parsers.micromark,i=CD(["atxHeading","setextHeading"]).filter(e=>n===(0,C_.getHeadingLevel)(e)&&!(0,C_.isDocfxTab)(e));if(i.length>0){let n=(0,CA.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title),o=n;if(o||(o=r.slice(0,r.indexOf(i[0])).every(e=>C_.nonContentTokens.has(e.type)||(0,C_.isHtmlFlowComment)(e))),o)for(let e of i.slice(+!n))(0,CA.addErrorContext)(t,e.startLine,(0,C_.getHeadingText)(e))}}},{names:["MD026","no-trailing-punctuation"],description:"Trailing punctuation in heading",tags:["headings"],parser:"micromark",function:function(e,t){let n=e.config.punctuation;n=String(void 0===n?CA.allPunctuationNoQuestion:n);let r=RegExp("\\s*["+(0,CA.escapeForRegExp)(n)+"]+$");for(let e of CD(["atxHeadingText","setextHeadingText"])){let{endColumn:n,endLine:i,text:o}=e,s=r.exec(o);if(s&&!CA.endOfLineHtmlEntityRe.test(o)&&!CA.endOfLineGemojiCodeRe.test(o)){let e=s[0],r=e.length,o=n-r;(0,CA.addError)(t,i,`Punctuation: '${e}'`,void 0,[o,r],{editColumn:o,deleteCount:r})}}}},{names:["MD027","no-multiple-space-blockquote"],description:"Multiple spaces after blockquote symbol",tags:["blockquote","whitespace","indentation"],parser:"micromark",function:function(e,t){let n=e.config.list_items,r=void 0===n||!!n,{tokens:i}=e.parsers.micromark;for(let n of CD(["linePrefix"])){let o=n.parent,s=o?.type==="codeIndented",a=o?.children||i;if(!s&&a[a.indexOf(n)-1]?.type==="blockQuotePrefix"&&(r||!CX.includes(a[a.indexOf(n)+1]?.type)&&!(0,C_.getParentOfType)(n,CX))){let{startColumn:r,startLine:i,text:o}=n,{length:s}=o,a=e.lines[i-1];(0,CA.addErrorContext)(t,i,a,void 0,void 0,[r,s],{editColumn:r,deleteCount:s})}}}},{names:["MD028","no-blanks-blockquote"],description:"Blank line inside blockquote",tags:["blockquote","whitespace"],parser:"micromark",function:function(e,t){for(let n of CD(["blockQuote"])){let r=[],i=n.parent?.children||e.parsers.micromark.tokens;for(let e=i.indexOf(n)+1;e<i.length;e++){let{startLine:n,type:o}=i[e];if("lineEndingBlank"===o)r.push(n);else if(CQ.has(o));else if("blockQuote"===o){for(let e of r)(0,CA.addError)(t,e);break}else break}}}},{names:["MD029","ol-prefix"],description:"Ordered list item prefix",tags:["ol"],parser:"micromark",function:function(e,t){let n=String(e.config.style);for(let e of CD(["listOrdered"])){let r=(0,C_.getDescendantsByType)(e,["listItemPrefix"]),i=1,o=!1;if(r.length>=2){let e=C1(r[0]);(1!==C1(r[1]).value||0===e.value)&&(o=!0,0===e.value&&(i=0))}let s=C0.includes(n)?n:o?"ordered":"one";for(let e of("zero"===s?i=0:"one"===s&&(i=1),r)){let n=C1(e),r=n.value,o={editColumn:n.column,deleteCount:n.value.toString().length,insertText:i.toString()};(0,CA.addErrorDetailIf)(t,e.startLine,i,r,"Style: "+CZ[s],void 0,[e.startColumn,e.endColumn-e.startColumn],o),"ordered"===s&&i++}}}},{names:["MD030","list-marker-space"],description:"Spaces after list markers",tags:["ol","ul","whitespace"],parser:"micromark",function:function(e,t){let n=Number(e.config.ul_single||1),r=Number(e.config.ol_single||1),i=Number(e.config.ul_multi||1),o=Number(e.config.ol_multi||1);for(let e of CD(["listOrdered","listUnordered"])){let s="listOrdered"===e.type,a=e.children.filter(e=>"listItemPrefix"===e.type),l=e.endLine-e.startLine+1===a.length,c=s?l?r
130:o:l?n:i;for(let e of a){let n=[e.startColumn,e.endColumn-e.startColumn];for(let r of e.children.filter(e=>"listItemPrefixWhitespace"===e.type)){let{endColumn:e,startColumn:i,startLine:o}=r,s=e-i,a={editColumn:i,deleteCount:s,insertText:"".padEnd(c)};(0,CA.addErrorDetailIf)(t,o,c,s,void 0,void 0,n,a)}}}}},{names:["MD031","blanks-around-fences"],description:"Fenced code blocks should be surrounded by blank lines",tags:["code","blank_lines"],parser:"micromark",function:function(e,t){let n=e.config.list_items,r=void 0===n||!!n,{lines:i}=e;for(let e of CD(["codeFenced"]))(r||!(0,C_.getParentOfType)(e,["listOrdered","listUnordered"]))&&((0,CA.isBlankLine)(i[e.startLine-2])||C5(t,i,e.startLine,!0),(0,CA.isBlankLine)(i[e.endLine])||(0,CA.isBlankLine)(i[e.endLine-1])||C5(t,i,e.endLine,!1))}},{names:["MD032","blanks-around-lists"],description:"Lists should be surrounded by blank lines",tags:["bullet","ul","ol","blank_lines"],parser:"micromark",function:function(e,t){let{lines:n,parsers:r}=e,i=CD(["blockQuotePrefix","linePrefix"]);for(let e of(0,C_.filterByPredicate)(r.micromark.tokens,C3,e=>C3(e)||"htmlFlow"===e.type?[]:e.children)){let r=e.startLine;(0,CA.isBlankLine)(n[r-2])||(0,CA.addErrorContext)(t,r,n[r-1].trim(),void 0,void 0,void 0,{insertText:(0,C_.getBlockQuotePrefixText)(i,r)});let o=(0,C_.filterByPredicate)(e.children,e=>!C_.nonContentTokens.has(e.type),e=>C_.nonContentTokens.has(e.type)?[]:e.children),s=e.endLine;o.length>0&&(s=o[o.length-1].endLine);let a=s;(0,CA.isBlankLine)(n[a])||(0,CA.addErrorContext)(t,a,n[a-1].trim(),void 0,void 0,void 0,{lineNumber:a+1,insertText:(0,C_.getBlockQuotePrefixText)(i,a)})}}},{names:["MD033","no-inline-html"],description:"Inline HTML",tags:["html"],parser:"micromark",function:function(e,t){let n=C4(e.config.allowed_elements),r=C4(e.config.table_allowed_elements||e.config.allowed_elements);for(let e of CD(["htmlText"],!0)){let i=(0,C_.getHtmlTagInfo)(e);if(i&&!i.close){let o=i?.name.toLowerCase(),s=!!(0,C_.getParentOfType)(e,["table"]);if((s||!n.includes(o))&&(!s||!r.includes(o))){let n=[e.startColumn,e.text.replace(CA.nextLinesRe,"").length];(0,CA.addError)(t,e.startLine,"Element: "+i.name,void 0,n)}}}}},{names:["MD034","no-bare-urls"],description:"Bare URL used",tags:["links","url"],parser:"micromark",function:function(e,t){let n;for(let r of(n=e.parsers.micromark.tokens,(0,C_.filterByPredicate)(n,e=>{if("literalAutolink"===e.type&&!(0,C_.inHtmlFlow)(e)){let t=e.parent?.children,n=t?.indexOf(e),r=t?.at(n-1),i=t?.at(n+1);return!(r&&i&&"data"===r.type&&"data"===i.type&&r.text.endsWith("<")&&i.text.startsWith(">"))}return!1},e=>{let{children:t}=e,n=[];for(let e=0;e<t.length;e++){let r=t[e],i=(0,C_.getHtmlTagInfo)(r);if(i&&!i.close){let n=1;for(let r=e+1;r<t.length;r++){let o=t[r],s=(0,C_.getHtmlTagInfo)(o);if(s&&i.name===s.name)if(s.close){if(0==--n){e=r;break}}else n++}}else n.push(r)}return n}))){let e=[r.startColumn,r.endColumn-r.startColumn],n={editColumn:e[0],deleteCount:e[1],insertText:`<${r.text}>`};(0,CA.addErrorContext)(t,r.startLine,r.text,void 0,void 0,e,n)}}},{names:["MD035","hr-style"],description:"Horizontal rule style",tags:["hr"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent").trim();for(let e of CD(["thematicBreak"])){let{startLine:r,text:i}=e;"consistent"===n&&(n=i),(0,CA.addErrorDetailIf)(t,r,n,i)}}},{names:["MD036","no-emphasis-as-heading"],description:"Emphasis used instead of a heading",tags:["headings","emphasis"],parser:"micromark",function:function(e,t){let n=e.config.punctuation,r=RegExp("["+(n=String(void 0===n?CA.allPunctuation:n))+"]$"),i=CD(["paragraph"],!0).filter(e=>e.parent?.type==="content"&&(!e.parent?.parent||e.parent?.parent?.type==="htmlFlow"&&!e.parent?.parent?.parent)&&1===e.children.filter(C8).length);for(let e of C6)for(let n of(0,C_.getDescendantsByType)(i,e))1!==n.children.length||"data"!==n.children[0].type||r.test(n.text)||(0,CA.addErrorContext)(t,n.startLine,n.text)}},{names:["MD037","no-space-in-emphasis"],description:"Spaces inside emphasis markers",tags:["whitespace","emphasis"],parser:"micromark",function:function(e,t){let{lines:n,parsers:r}=e,i=new Map;for(let e of["_","__","___","*","**","***"])i.set(e,[]);for(let e of(0,C_.filterByPredicate)(r.micromark.tokens,e=>e.children.some(e=>"data"===e.type))){for(let e of i.values())e.length=0;for(let t of e.children){let{text:e,type:n}=t;if("data"===n&&e.length<=3){let n=i.get(e);n&&!(0,C_.inHtmlFlow)(t)&&n.push(t)}}for(let e of i.entries()){let[r,i]=e;for(let e=0;e+1<i.length;e+=2){let o=i[e],s=n[o.startLine-1].slice(o.endColumn-1).match(/^\s+\S/);if(s){let[e]=s,n=`${r}${e}`,i=o.endColumn,a=e.length-1;(0,CA.addError)(t,o.startLine,void 0,n,[i,a],{editColumn:i,deleteCount:a})}let a=i[e+1],l=n[a.startLine-1].slice(0,a.startColumn-1).match(/\S\s+$/);if(l){let[e]=l,n=`${e}${r}`,i=a.startColumn-(e.length-1),o=e.length-1;(0,CA.addError)(t,a.startLine,void 0,n,[i,o],{editColumn:i,deleteCount:o})}}}}}},{names:["MD038","no-space-in-code"],description:"Spaces inside code span elements",tags:["whitespace","code"],parser:"micromark",function:function(e,t){for(let e of CD(["codeText"])){let n=(0,C_.getDescendantsByType)(e,["codeTextData"]);if(n.length>0){let r=(0,C_.getDescendantsByType)(e,["codeTextPadding"]),i=r[0],o=n[0],s=/^(\s+)(\S)/.exec(o.text)||[null,"",""],a="`"===s[2],l=s[1].length-(a&&!i?1:0),c=l>0,d=r[r.length-1],u=n[n.length-1],h=/(\S)(\s+)$/.exec(u.text)||[null,"",""],p="`"===h[1],f=h[2].length-(p&&!d?1:0),m=f>0,g=c&&m&&i&&d&&!a&&!p,y=e.text;if(c){let e=(g?i:o).startColumn,n=l+(g?i.text.length:0);(0,CA.addErrorContext)(t,o.startLine,y,!0,!1,[e,n],{editColumn:e,deleteCount:n})}if(m){let e=(g?d:u).endColumn,n=f+(g?d.text.length:0);(0,CA.addErrorContext)(t,u.endLine,y,!1,!0,[e-n,n],{editColumn:e-n,deleteCount:n})}}}}},{names:["MD039","no-space-in-links"],description:"Spaces inside link text",tags:["whitespace","links"],parser:"micromark",function:function(e,t){for(let e of CD(["label"]).filter(e=>e.parent?.type==="link"))for(let n of e.children.filter(e=>"labelText"===e.type))n.text.trimStart().length!==n.text.length&&C9(t,e,n,!0),n.text.trimEnd().length!==n.text.length&&C9(t,e,n,!1)}},{names:["MD040","fenced-code-language"],description:"Fenced code blocks should have a language specified",tags:["code","language"],parser:"micromark",function:function(e,t){let n=e.config.allowed_languages;n=Array.isArray(n)?n:[];let r=!!e.config.language_only;for(let e of CD(["codeFenced"])){let i=(0,C_.getDescendantsByType)(e,["codeFencedFence"])[0],{startLine:o,text:s}=i,a=(0,C_.getDescendantsByType)(i,["codeFencedFenceInfo"])[0]?.text;a?n.length>0&&!n.includes(a)&&(0,CA.addError)(t,o,`"${a}" is not allowed`):(0,CA.addErrorContext)(t,o,s),r&&(0,C_.getDescendantsByType)(i,["codeFencedFenceMeta"]).length>0&&(0,CA.addError)(t,o,`Info string contains more than language: "${s}"`)}}},{names:["MD041","first-line-heading","first-line-h1"],description:"First line in a file should be a top-level heading",tags:["headings"],parser:"micromark",function:function(e,t){let n=!!e.config.allow_preamble,r=Number(e.config.level||1),{tokens:i}=e.parsers.micromark;if(!(0,CA.frontMatterHasTitle)(e.frontMatterLines,e.config.front_matter_title)){let o=0;for(let e of i){let{startLine:t,type:i}=e;if(!C_.nonContentTokens.has(i)&&!(0,C_.isHtmlFlowComment)(e)){let s=null;if("atxHeading"===i||"setextHeading"===i){(0,C_.getHeadingLevel)(e)!==r&&(o=t);break}if((s=function(e){let{children:t,type:n}=e;if("htmlFlow"===n){let e=(0,C_.filterByTypes)(t,["htmlText"],!0),n=e.length>0&&(0,C_.getHtmlTagInfo)(e[0]);if(n)return n.name.toLowerCase()}return null}(e))&&C7.test(s)){s!==`h${r}`&&(o=t);break}if(!n){o=t;break}}}o>
1300&&(0,CA.addErrorContext)(t,o,e.lines[o-1])}}},{names:["MD042","no-empty-links"],description:"No empty links",tags:["links"],parser:"micromark",function:function(e,t){let{definitions:n}=CR(),r=e=>{let t=n.get(e.text.trim());return!!(t&&"#"===t[1])};for(let e of CD(["link"])){let n=(0,C_.getDescendantsByType)(e,["label","labelText"]),i=(0,C_.getDescendantsByType)(e,["reference"]),o=(0,C_.getDescendantsByType)(e,["resource"]),s=(0,C_.getDescendantsByType)(i,["referenceString"]),a=(0,C_.getDescendantsByType)(o,["resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"]),l=n.length>0,c=i.length>0,d=o.length>0,u=s.length>0,h=a.length>0,p=!1;!l||(c||d)&&(!c||u)?u&&!h?p=r(s[0]):!u&&h?p="#"===a[0].text.trim():u||h||(p=!0):p=r(n[0]),p&&(0,CA.addErrorContext)(t,e.startLine,e.text,void 0,void 0,[e.startColumn,e.endColumn-e.startColumn])}}},{names:["MD043","required-headings"],description:"Required heading structure",tags:["headings"],parser:"micromark",function:function(e,t){let n=e.config.headings;if(!Array.isArray(n))return;let r=e.config.match_case||!1,i=0,o=!1,s=!1,a=!1,l=()=>String(n[i++]||"[None]"),c=e=>r?e:e.toLowerCase();for(let e of CD(["atxHeading","setextHeading"]))if(!s){let n=(0,C_.getHeadingText)(e),r=(0,C_.getHeadingLevel)(e);a=!0;let d=`${"".padEnd(r,"#")} ${n}`,u=l();"*"===u?c(l())!==c(d)&&(o=!0,i--):"+"===u?o=!0:"?"===u||(c(u)===c(d)?o=!1:o?i--:((0,CA.addErrorDetailIf)(t,e.startLine,u,d),s=!0))}let d=n.length-i;!s&&(d>1||1===d&&"*"!==n[i])&&(a||!n.every(e=>"*"===e))&&(0,CA.addErrorContext)(t,e.lines.length,n[i])}},{names:["MD044","proper-names"],description:"Proper names should have the correct capitalization",tags:["spelling"],parser:"micromark",function:function(e,t){let n=e.config.names;if((n=Array.isArray(n)?n:[]).sort((e,t)=>t.length-e.length||e.localeCompare(t)),0===n.length)return;let r=e.config.code_blocks,i=e.config.html_elements,o=new Set(["data"]);(void 0===r||r)&&(o.add("codeFlowValue"),o.add("codeTextData")),(void 0===i||i)&&(o.add("htmlFlowData"),o.add("htmlTextData"));let s=(0,C_.filterByPredicate)(e.parsers.micromark.tokens,e=>o.has(e.type),e=>e.children.filter(e=>!Ag.has(e.type))),a=[],l=new Set;for(let e of n){let r=(0,CA.escapeForRegExp)(e),i=/^\W/.test(e)?"":"\\b_*",o=/\W$/.test(e)?"":"_*\\b",c=RegExp(`(${i})(${r})${o}`,"gi");for(let r of s){let i=null;for(;null!==(i=c.exec(r.text));){let[,o,s]=i,c=r.startColumn+i.index+o.length,d=s.length,u=r.startLine,h={startLine:u,startColumn:c,endLine:u,endColumn:c+d-1};if(!n.includes(s)&&!a.some(e=>(0,CA.hasOverlap)(e,h))){let n=[];l.has(r)||(n=(0,C_.filterByTypes)(Am(r.text),["literalAutolink"]).map(e=>({startLine:u,startColumn:r.startColumn+e.startColumn-1,endLine:u,endColumn:r.endColumn+e.endColumn-1})),a.push(...n),l.add(r)),n.some(e=>(0,CA.hasOverlap)(e,h))||(0,CA.addErrorDetailIf)(t,r.startLine,e,s,void 0,void 0,[c,d],{editColumn:c,deleteCount:d,insertText:e})}a.push(h)}}}}},{names:["MD045","no-alt-text"],description:"Images should have alternate text (alt text)",tags:["accessibility","images"],parser:"micromark",function:function(e,t){for(let e of CD(["image"]))if((0,C_.getDescendantsByType)(e,["label","labelText"]).some(e=>0===e.text.length)){let n=e.startLine===e.endLine?[e.startColumn,e.endColumn-e.startColumn]:void 0;(0,CA.addError)(t,e.startLine,void 0,void 0,n)}for(let e of CD(["htmlText"],!0)){let{startColumn:n,startLine:r,text:i}=e,o=(0,C_.getHtmlTagInfo)(e);if(o&&!o.close&&"img"===o.name.toLowerCase()&&!Ay.test(i)&&Ab.exec(i)?.[1].toLowerCase()!=="true"){let e=[n,i.replace(CA.nextLinesRe,"").length];(0,CA.addError)(t,r,void 0,void 0,e)}}}},{names:["MD046","code-block-style"],description:"Code block style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(let e of CD(["codeFenced","codeIndented"])){let{startLine:r,type:i}=e;"consistent"===n&&(n=Av(i)),(0,CA.addErrorDetailIf)(t,r,n,Av(i))}}}
130,{names:["MD047","single-trailing-newline"],description:"Files should end with a single newline character",tags:["blank_lines"],parser:"none",function:function(e,t){let n=e.lines.length,r=e.lines[n-1];(0,CA.isBlankLine)(r)||(0,CA.addError)(t,n,void 0,void 0,[r.length,1],{insertText:"\n",editColumn:r.length+1})}},{names:["MD048","code-fence-style"],description:"Code fence style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(let e of CD(["codeFenced"])){let{startLine:r,text:i}=(0,C_.getDescendantsByType)(e,["codeFencedFence","codeFencedFenceSequence"])[0];"consistent"===n&&(n=Ak(i)),(0,CA.addErrorDetailIf)(t,r,n,Ak(i))}}},_d,_u,{names:["MD051","link-fragments"],description:"Link fragments should be valid",tags:["links"],parser:"micromark",function:function(e,t){let n=e.config.ignore_case||!1,r=new RegExp(e.config.ignored_pattern||"^$"),i=new Map([["#top",0]]);for(let e of CD(["atxHeadingText","setextHeadingText"])){let t="#"+encodeURIComponent((0,C_.filterByPredicate)(e.children,e=>AN.has(e.type),e=>A_.has(e.type)?[]:e.children).map(e=>e.text).join("").toLowerCase().replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,"").replace(/ /gu,"-").toWellFormed());if("#"!==t){let n=i.get(t)||0;n&&i.set(`${t}-${n}`,0),i.set(t,n+1);let r=null;for(;null!==(r=AC.exec(e.text));){let[,e]=r;i.has(e)||i.set(e,1)}}}for(let e of CD(["htmlText"],!0)){let t=(0,C_.getHtmlTagInfo)(e);if(t&&!t.close){let n=AT.exec(e.text)||"a"===t.name.toLowerCase()&&AS.exec(e.text);n&&n.length>0&&i.set(`#${n[1]}`,0)}}for(let[e,o]of[["link","resourceDestinationString"],["definition","definitionDestinationString"]])for(let s of CD([e]).filter(e=>!(e.parent?.type==="atxHeadingText"&&(0,C_.isDocfxTab)(e.parent.parent))))for(let e of(0,C_.filterByTypes)(s.children,[o])){let{endColumn:o,startColumn:a}=e,l=(0,C_.filterByTypes)(e.children,["characterEscapeValue","data"]).map(e=>e.text).join(""),c=l.slice(1),d=`#${encodeURIComponent(c.toWellFormed())}`;if(l.length>1&&l.startsWith("#")&&!i.has(d)&&!AA.test(d)&&!r.test(c)){let e,r,c;s.startLine===s.endLine&&(e=s.text,r=[s.startColumn,s.endColumn-s.startColumn],c={editColumn:a,deleteCount:o-a});let d=l.toLowerCase(),u=[...i.keys()].find(e=>d===e.toLowerCase());u?((c||{}).insertText=u,n||u===l||(0,CA.addError)(t,s.startLine,`Expected: ${u}; Actual: ${l}`,e,r,c)):(0,CA.addError)(t,s.startLine,void 0,e,r)}}}},{names:["MD052","reference-links-images"],description:"Reference links and images should use a label that is defined",tags:["images","links"],parser:"none",function:function(e,t){let{config:n,lines:r}=e,i=n.shortcut_syntax||!1,o=new Set(n.ignored_labels||["x"]),{definitions:s,references:a,shortcuts:l}=CR();for(let e of i?[...a.entries(),...l.entries()]:a.entries()){let[n,i]=e;if(!s.has(n)&&!o.has(n))for(let e of i){let[i,o,s]=e,a=r[i].slice(o,o+s);(0,CA.addError)(t,i+1,`Missing link or image reference definition: "${n}"`,a,[o+1,a.length])}}}},{names:["MD053","link-image-reference-definitions"],description:"Link and image reference definitions should be needed",tags:["images","links"],parser:"none",function:function(e,t){let n=new Set(e.config.ignored_definitions||["//"]),r=e.lines,{references:i,shortcuts:o,definitions:s,duplicateDefinitions:a}=CR(),l=e=>e.replace(AO,"").trim().length>0,c={deleteCount:-1};for(let e of s.entries()){let[s,[a]]=e;if(!n.has(s)&&!i.has(s)&&!o.has(s)){let e=r[a];(0,CA.addError)(t,a+1,`Unused link or image reference definition: "${s}"`,(0,CA.ellipsify)(e),[1,e.length],l(e)?c:void 0)}}for(let e of a){let[i,o]=e;if(!n.has(i)){let e=r[o];(0,CA.addError)(t,o+1,`Duplicate link or image reference definition: "${i}"`,(0,CA.ellipsify)(e),[1,e.length],l(e)?c:void 0)}}}},{names:["MD054","link-image-style"],description:"Link and image style",tags:["images","links"],parser:"micromark",function:(e,t)=>{let n=e.config,r=void 0===n.autolink||!!n.autolink,i=void 0===n.inline||!!n.inline,o=void 0===n.full||!!n.full,s=void 0===n.collapsed||!!n.collapsed,a=void 0===n.shortcut||!!n.shortcut,l=void 0===n.url_inline||!!n.url_inline;if(r&&i&&o&&s&&a&&l)return;let{definitions:c}=CR();for(let e of CD(["autolink","image","link"])){let n=null,d=null,{endColumn:u,endLine:h,startColumn:p,startLine:f,text:m,type:g}=e,y="image"===g,b=!1;if("autolink"===g)n=d=(0,C_.getDescendantsByType)(e,[["autolinkEmail","autolinkProtocol"]])[0]?.text,b=!r&&!!d;else if(n=(0,C_.getDescendantsByType)(e,["label","labelText"])[0].text,d=(0,C_.getDescendantsByType)(e,["resource","resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"])[0]?.text){let t=(0,C_.getDescendantsByType)(e,["resource","resourceTitle","resourceTitleString"])[0]?.text;b=!i||!l&&r&&!y&&!t&&n===d&&AR(d)}else{let t=0===(0,C_.getDescendantsByType)(e,["reference"]).length,r=(0,C_.getDescendantsByType)(e,["reference","referenceString"])[0]?.text,i=void 0===r,l=c.get(r||n);b=!!((d=l&&l[1]||"")&&(t?!a:i?!s:!o))}if(b){let e,o;if(f===h){e=[p,u-p];let t=null,s=i&&n,a=r&&!y&&AR(d);if(s&&(l||!a)){let e=y?"!":"",r=n.replace(/[[\]]/g,"\\$&"),i=d.replace(/[()]/g,"\\$&");t=`${e}[${r}](${i})`}else a&&(t=`<${AI(d)}>`);t&&(o={editColumn:e[0],insertText:t,deleteCount:e[1]})}(0,CA.addErrorContext)(t,f,m.replace(CA.nextLinesRe,""),void 0,void 0,e,o)}}}},{names:["MD055","table-pipe-style"],description:"Table pipe style",tags:["table"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent"),r="no_leading_or_trailing"!==n&&"trailing_only"
130!==n,i="no_leading_or_trailing"!==n&&"leading_only"!==n;for(let e of CD(["tableDelimiterRow","tableRow"])){let o=AP(e.children),s="tableCellDivider"===AP(AL(o.children)).type,a=Aj(e.children),l="tableCellDivider"===Aj(AL(a.children)).type,c=s?l?"leading_and_trailing":"leading_only":l?"trailing_only":"no_leading_or_trailing";"consistent"===n&&(n=c,r=s,i=l),s!==r&&(0,CA.addErrorDetailIf)(t,o.startLine,n,c,`${r?"Missing":"Unexpected"} leading pipe`,void 0,A$(e.startColumn,o.startColumn)),l!==i&&(0,CA.addErrorDetailIf)(t,a.endLine,n,c,`${i?"Missing":"Unexpected"} trailing pipe`,void 0,A$(a.endColumn-1,e.endColumn-1))}}},{names:["MD056","table-column-count"],description:"Table column count",tags:["table"],parser:"micromark",function:function(e,t){let n=CD(["tableDelimiterRow","tableRow"]),r=0,i=null;for(let e of n){let n,o,s=(0,C_.getParentOfType)(e,["table"]);i!==s&&(r=0,i=s);let a=e.children.filter(e=>["tableData","tableDelimiter","tableHeader"].includes(e.type)),l=a.length;r||=l,l<r?(n="Too few cells, row will be missing data",o=[e.endColumn-1,1]):r<l&&(n="Too many cells, extra data will be missing",o=AF(a[r].startColumn,e.endColumn-1)),(0,CA.addErrorDetailIf)(t,e.endLine,r,l,n,void 0,o)}}},{names:["MD058","blanks-around-tables"],description:"Tables should be surrounded by blank lines",tags:["table"],parser:"micromark",function:function(e,t){let{lines:n}=e,r=CD(["blockQuotePrefix","linePrefix"]);for(let e of CD(["table"])){let i=e.startLine;(0,CA.isBlankLine)(n[i-2])||(0,CA.addErrorContext)(t,i,n[i-1].trim(),void 0,void 0,void 0,{insertText:(0,C_.getBlockQuotePrefixText)(r,i)});let o=e.endLine;(0,CA.isBlankLine)(n[o])||(0,CA.addErrorContext)(t,o,n[o-1].trim(),void 0,void 0,void 0,{lineNumber:o+1,insertText:(0,C_.getBlockQuotePrefixText)(r,o)})}}},{names:["MD059","descriptive-link-text"],description:"Link text should be descriptive",tags:["accessibility","links"],parser:"micromark",function:function(e,t){let n=new Set((e.config.prohibited_texts||AH).map(AU));if(n.size>0)for(let e of CD(["link"]))for(let r of(0,C_.getDescendantsByType)(e,["label","labelText"])){let{children:e,endColumn:i,endLine:o,parent:s,startColumn:a,startLine:l,text:c}=r;if(!e.some(e=>AB.has(e.type))&&n.has(AU(c))){let e=l===o?[a,i-a]:void 0;(0,CA.addErrorContext)(t,l,s.text,void 0,void 0,e)}}}},{names:["MD060","table-column-style"],description:"Table column style",tags:["table"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"any"),r="any"===n||"aligned"===n,i="any"===n||"compact"===n,o="any"===n||"tight"===n,s=!!e.config.aligned_delimiter,a=e.lines;for(let e of CD(["table"])){let n=(0,C_.filterByTypes)(e.children,["tableDelimiterRow","tableRow"]),l=[];r&&l.push(..._a(a,n,'Table pipe does not align with header for style "aligned"'));let c=[],d=[];if((i||o)&&!(r&&0===l.length)){if(s){let e=_a(a,n.slice(0,2),'Table pipe does not align with header for option "aligned_delimiter"');c.push(...e),d.push(...e)}for(let e of n){let t=(0,C_.filterByTypes)(e.children,["tableCellDivider","tableContent","whitespace"]);for(let n=0;n<t.length;n++){let{startColumn:r,startLine:i,type:o}=t[n];if("tableCellDivider"===o){let o=t[n-1];o&&("whitespace"===o.type?(1!==o.text.length&&_o(c,i,r,'Table pipe has extra space to the left for style "compact"',{editColumn:o.startColumn,deleteCount:o.text.length-1}),_o(d,i,r,'Table pipe has space to the left for style "tight"',{editColumn:o.startColumn,deleteCount:o.text.length})):_o(c,i,r,'Table pipe is missing space to the left for style "compact"',{editColumn:o.endColumn,insertText:" "}));let s=t[n+1];s&&("whitespace"===s.type?s.endColumn!==e.endColumn&&(1!==s.text.length&&_o(c,i,r,'Table pipe has extra space to the right for style "compact"',{editColumn:s.startColumn,deleteCount:s.text.length-1}),_o(d,i,r,'Table pipe has space to the right for style "tight"',{editColumn:s.startColumn,deleteCount:s.text.length})):_o(c,i,r,'Table pipe is missing space to the right for style "compact"',{editColumn:s.startColumn,insertText:" "}))}}}}let u=l;for(let e of(i&&(c.length<u.length||!r)&&(u=c),o&&(d.length<u.length||!r&&!i)&&(u=d),u))t(e)}}}];for(let e of _h){let t=e.names[0].toLowerCase();e.information=new URL(`https://github.com/DavidAnson/markdownlint/blob/v${Cz}/doc/${t}.md`)}function _p(t,n,r,i,o,s,a,l,c,d,u,h){let p=e=>h(e instanceof Error?e:Error(e)),f=function(e,t){let n=[];if(t){let r=e.match(t);if(r&&!r.index){let t=r[0];e=e.slice(t.length),(n=t.split(CA.newLineRe)).length>0&&""===n[n.length-1]&&n.length--}}return{content:e,frontMatterLines:n}}(i=i.replace(/^\uFEFF/,""),l),{frontMatterLines:m}
130=f,{effectiveConfig:g,enabledRulesPerLineNumber:y,enabledRuleList:b,rulesSeverity:v}=function(e,t,n,r,i,o,s){let a=new Map,l=a,c=Array(1+n.length);function d(e,t,n){for(let[i,o]of e.entries()){if(!r){let e=null;for(;e=CA.inlineCommentStartRe.exec(o);){let n=e[2].toUpperCase(),r=e.index+e[1].length,s=o.indexOf("-->",r);if(-1===s)break;t(n,o.slice(r,s),i+1)}}n&&n()}}function u(e,t,n){n=new Map(n);let r=e.startsWith("ENABLE"),i=t&&t.trim();for(let e of i?i.toUpperCase().split(/\s+/):m)for(let t of s[e]||[])n.set(t,r);return n}d([t.join("\n")],function(e,t){if("CONFIGURE-FILE"===e){let e,n,r,s,{config:a}=(e=null,n=null,r=[],s=0,(o||[JSON.parse]).every(n=>{try{let r=n(t);return e=r&&"object"==typeof r&&!Array.isArray(r)?r:{},!1}catch(e){r.push(`Parser ${s++}: ${e?.message}`)}return!0})&&(r.unshift("Unable to parse 'CONFIGURE-FILE'"),n=r.join("; ")),{config:e,message:n});a&&(i={...i,...a})}});let{effectiveConfig:h,rulesEnabled:p,rulesSeverity:f}=function(e,t,n){let r=!0,i="error";Object.entries(t).every(([e,t])=>"DEFAULT"!==e.toUpperCase()||(r=!!t,"warning"===t&&(i="warning"),!1));let o={},s=new Map,a=new Map,l=Object.freeze({});for(let t of e.map(e=>e.names[0].toUpperCase()))o[t]=l,s.set(t,r),a.set(t,i);for(let[e,r]of Object.entries(t)){let t=e.toUpperCase(),i=!1,l="error",c={};for(let e of(r&&(r instanceof Object?(i=void 0===r.enabled||!!r.enabled,l="warning"===r.severity?"warning":"error",c=Object.fromEntries(Object.entries(r).filter(([e])=>"enabled"!==e&&"severity"!==e))):(i=!0,l="warning"===r?"warning":"error")),n[t]||[]))Object.freeze(c),o[e]=c,s.set(e,i),a.set(e,l)}return{effectiveConfig:o,rulesEnabled:s,rulesSeverity:a}}(e,i,s),m=[...p.keys()];l=a=new Map(p),d(t,function(e,t){("ENABLE-FILE"===e||"DISABLE-FILE"===e)&&(a=u(e,t,a))}),d(t,function(e,t){"CAPTURE"===e?l=a:"RESTORE"===e?a=l:("ENABLE"===e||"DISABLE"===e)&&(a=u(e,t,a))},function(){c.push(a)}),d(t,function(e,t,r){let i="DISABLE-LINE"===e,o="DISABLE-NEXT-LINE"===e;if(i||o){let i=n.length+r+ +!!o;c[i]=u(e,t,c[i])}});let g=e.filter(e=>{let t=e.names[0].toUpperCase();return c.some(e=>e.get(t))});return{effectiveConfig:h,enabledRulesPerLineNumber:c,enabledRuleList:g,rulesSeverity:f}}(t,(i=f.content).split(CA.newLineRe),m,d,s,a,n),k=b.some(e=>"markdownit"===e.parser||void 0===e.parser),x=b.some(e=>"micromark"===e.parser),w=t.length!==_h.length,E=x?Am(i,{freezeTokens:w}):[],T=i,S=(i=CA.clearHtmlCommentText(i)).split(CA.newLineRe),C=e=>{let t=Object.freeze({markdownit:Object.freeze({tokens:e})}),n=Object.freeze({micromark:Object.freeze({tokens:E})}),i=Object.freeze({}),o={name:r,version:Cz,lines:Object.freeze(S),frontMatterLines:Object.freeze(m)};CO({...o,parsers:n,config:{}});let s=[],a=b.filter(e=>e.asynchronous),l=[...a,...b.filter(e=>!e.asynchronous)],d=()=>h(null,(s.sort((e,t)=>e.ruleNames[0].localeCompare(t.ruleNames[0])||e.lineNumber-t.lineNumber),s));try{let u=l.map(a=>{let l=a.names[0].toUpperCase(),d={},u=i;void 0===a.parser?(d.tokens=e,u=t):"markdownit"===a.parser?u=t:"micromark"===a.parser&&(u=n);let h=Object.freeze({...o,...d,parsers:u,config:g[l]});function p(e){throw Error(`Value of '${e}' passed to onError by '${l}' is incorrect for '${r}'.`)}function f(e){(!e||!CA.isNumber(e.lineNumber)||e.lineNumber<1||e.lineNumber>S.length)&&p("lineNumber");let t=e.lineNumber+m.length;if(!y[t].get(l))return;e.detail&&!CA.isString(e.detail)&&p("detail"),e.context&&!CA.isString(e.context)&&p("context"),e.information&&!CA.isUrl(e.information)&&p("information"),e.range&&(!Array.isArray(e.range)||2!==e.range.length||!CA.isNumber(e.range[0])||e.range[0]<1||!CA.isNumber(e.range[1])||e.range[1]<1||e.range[0]+e.range[1]-1>S[e.lineNumber-1].length)&&p("range");let n=e.fixInfo,r={};if(n){CA.isObject(n)||p("fixInfo"),void 0!==n.lineNumber&&((!CA.isNumber(n.lineNumber)||n.lineNumber<1||n.lineNumber>S.length)&&p("fixInfo.lineNumber"),r.lineNumber=n.lineNumber+m.length);let t=n.lineNumber||e.lineNumber;void 0!==n.editColumn&&((!CA.isNumber(n.editColumn)||n.editColumn<1||n.editColumn>S[t-1].length+1)&&p("fixInfo.editColumn"),r.editColumn=n.editColumn),void 0!==n.deleteCount&&((!CA.isNumber(n.deleteCount)||n.deleteCount<-1||n.deleteCount>S[t-1].length)&&p("fixInfo.deleteCount"),r.deleteCount=n.deleteCount),void 0!==n.insertText&&(CA.isString(n.insertText)||p("fixInfo.insertText"),r.insertText=n.insertText)}let i=e.information||a.information;s.push({lineNumber:t,ruleNames:a.names,ruleDescription:a.description,ruleInformation:i?i.href:null,errorDetail:e.detail?.replace(CA.newLineRe," ")||null,errorContext:e.context?.replace(CA.newLineRe," ")||null,errorRange:e.range?[...e.range]:null,fixInfo:n?r:null,severity:v.get(l)})}let b=e=>f({lineNumber:1,detail:`This rule threw an exception: ${e.message||e}`}),k=()=>a.function(h,f);if(a.asynchronous){let e=Promise.resolve().then(k);return c?e.catch(b):e}try{k()}catch(e){if(c)b(e);else throw e}return null});a.length>0?Promise.all(u.slice(0,a.length)).then(d).catch(p):d()}catch(e){p(e)}finally{CO()}};!k||u?C(k?(0,CL.requireMarkdownItCjs)().getMarkdownItTokens(o(),T,S):[]):Promise.all([e.A(491774),new Promise(e=>e(o()))]).then(([e,t])=>{C(e.getMarkdownItTokens(t,T,S))}).catch(p)}function _f(e){let t=null;return!function(e,t,n){n=n||function(){};let r=[(e=e||{}).customRules||[]].flat().map(e=>({names:CA.cloneIfArray(e.names),description:e.description,information:CA.cloneIfUrl(e.information),tags:CA.cloneIfArray(e.tags),parser:e.parser,asynchronous:e.asynchronous,function:e.function})),i=_h.concat(r),o=function(e,t){let n=null;if(e.length===_h.length)return n;let r={};for(let[o,s]of e.entries()){let e=o-_h.length;function i(t,n){return Error(`Property '${t}' of custom rule at index ${e} is incorrect: '${n}'.`)}for(let e of["names","tags"]){let t=s[e];!n&&(!t||!Array.isArray(t)||0===t.length||!t.every(CA.isString)||t.some(CA.isEmptyString))&&(n=i(e,t))}for(let e of[["description","string"],["function","function"]]){let t=e[0],r=s[t];n||r&&typeof r===e[1]||(n=i(t,r))}if(n||void 0===s.parser||"markdownit"===s.parser||"micromark"===s.parser||"none"===s.parser||(n=i("parser",s.parser)),n||!s.information||CA.isUrl(s.information)||(n=i("information",s.information)),n||void 0===s.asynchronous||"boolean"==typeof s.asynchronous||(n=i("asynchronous",s.asynchronous)),!n&&s.asynchronous&&t&&(n=Error("Custom rule "+s.names.join("/")+" at index "+e+" is asynchronous and can not be used in a synchronous context.")),!n){for(let t of s.names){let i=t.toUpperCase();n||void 0===r[i]||(n=Error("Name '"+t+"' of custom rule at index "+e+" is already used as a name or tag.")),r[i]=!0}for(let t of s.tags){let i=t.toUpperCase();!n&&r[i]&&(n=Error("Tag '"+t+"' of custom rule at index "+e+" is already used as a name.")),r[i]=!1}}}return n}(i,t);if(o)return n(o);let s=[];Array.isArray(e.files)?s=[...e.files]:e.files&&(s=[String(e.files)]);let a=e.strings||{},l=Object.keys(a),c=e.config||{default:!0},d=e.configParsers||void 0,u=void 0===e.frontMatter?CA.frontMatterRe:e.frontMatter,h=!!e.handleRuleFailures,p=!!e.noInlineConfig,f=e.markdownItFactory||(()=>{throw Error("The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set.")}),m=e.fs||CS,g=function(e){let t={};for(let n of e){let e=n.names[0].toUpperCase();for(let r of n.names)t[r.toUpperCase()]=[e];for(let r of n.tags){let n=r.toUpperCase(),i=t[n]||[];
130i.push(e),t[n]=i}}return t}(i),y={},b=!1,v=0;function k(){let e;function r(r,i){return(v--,r)?(b=!0,n(r)):(y[e]=i,t||k(),null)}if(b);else if(e=s.shift()){v++;var o=e;function x(e,n){return e?r(e):_p(i,g,o,n,f,c,d,u,h,p,t,r)}t?x(null,m.readFileSync(o,"utf8")):m.readFile(o,"utf8",x)}else if(e=l.shift())v++,_p(i,g,e,a[e]||"",f,c,d,u,h,p,t,r);else if(0===v){b=!0;let e=Object.entries(y);e.sort(([e],[t])=>e.localeCompare(t));let t=Object.fromEntries(e);return n(null,t)}return null}if(t)for(;!b;)k();else k(),k(),k(),k(),k(),k(),k(),k()}(e,!0,function(e,n){if(e)throw e;t=n}),t}function _m(e,t=0){return{lineNumber:e.lineNumber||t,editColumn:e.editColumn||1,deleteCount:e.deleteCount||0,insertText:e.insertText||""}}let _g=/^>|^->|<!--|-->|--!>|<!-$/g,_y=[">"],_b=["<",">"],_v=_w(1),_k=_w(-1),_x=[];function _w(e){return function(t,n,r){let i=t?t.children:_x,o=(n||0)+e,s=i[o];if(!r)for(;s&&xf(s);)o+=e,s=i[o];return s}}let _E={}.hasOwnProperty;function _T(e){return function(t,n,r){return _E.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let _S=_T({body:function(e,t,n){let r=_v(n,t);return!r||"comment"!==r.type},caption:_C,colgroup:_C,dd:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=_v(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:_C,html:function(e,t,n){let r=_v(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=_v(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:_A,rt:_A,tbody:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:__,tfoot:function(e,t,n){return!_v(n,t)},th:__,thead:function(e,t,n){let r=_v(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function _C(e,t,n){let r=_v(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&xf(r.value.charAt(0)))}function _A(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function __(e,t,n){let r=_v(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let _N=_T({body:function(e){let t=_v(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&xf(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=_k(n,t),i=_v(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&_S(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=_v(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=_k(n,t),i=_v(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&_S(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}
130),_O={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},_M=["<","&"];function _I(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:SY(e.value,Object.assign({},r.settings.characterReferences,{subset:_M}))}EA("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+SY(e.value,Object.assign({},r.settings.characterReferences,{subset:_y}))+">":"<!--"+e.value.replace(_g,function(e){return SY(e,Object.assign({},r.settings.characterReferences,{subset:_b}))})+"-->"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,o=r.schema,s="svg"!==o.space&&r.settings.omitOptionalTags,a="svg"===o.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===o.space&&"svg"===e.tagName&&(r.schema=bY);let c=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=b2(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=SY(i.attribute,Object.assign({},e.settings.characterReferences,{subset:_O.name[o][s]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?function(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}:function(e){return e.join(" ").trim()})(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=SY(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:_O.unquoted[o][s]}))),r!==n&&(e.settings.quoteSmart&&xR(n,a)>xR(n,e.alternative)&&(a=e.alternative),r=a+SY(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?_O.single:_O.double)[o][s],attribute:!0}))+a),l+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),d=r.all("html"===o.space&&"template"===e.tagName?e.content:e);
130return r.schema=o,d&&(a=!1),!c&&s&&_N(e,t,n)||(l.push("<",e.tagName,c?" "+c:""),a&&("svg"===o.space||r.settings.closeSelfClosing)&&(i=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(d),a||s&&_S(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:_I(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:_I}});let _D={arabic:"ar",armenian:"am",bulgarian:"bg",czech:"cz",danish:"dk",dutch:"nl",english:"en",finnish:"fi",french:"fr",german:"de",greek:"gr",hungarian:"hu",indian:"in",indonesian:"id",irish:"ie",italian:"it",lithuanian:"lt",nepali:"np",norwegian:"no",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"rs",slovenian:"ru",spanish:"es",swedish:"se",tamil:"ta",turkish:"tr",ukrainian:"uk",sanskrit:"sk"},_R={dutch:/[^A-Za-zà èéìòóù0-9_'-]+/gim,english:/[^A-Za-zà èéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâà éèëêïîöôùüûÅç-]+/gim,italian:/[^A-Za-zà èéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÃÃà äÃöÃüÃ]+/gim,portuguese:/[^a-z0-9à -úÃ-Ã]/gim,russian:/[^a-z0-9а-ÑÐ-ЯÑÐ]+/gim,spanish:/[^a-z0-9A-Zá-úÃ-ÃñÃüÃ]+/gim,swedish:/[^a-z0-9_åà äÃöÃüÃ-]+/gim,german:/[^a-z0-9A-ZäöüÃÃÃÃ]+/gim,finnish:/[^a-z0-9äöÃÃ]+/gim,danish:/[^a-z0-9æøåÃÃà ]+/gim,hungarian:/[^a-z0-9áéÃóöÅúüűÃÃÃÃÃÅÃÃŰ]+/gim,romanian:/[^a-z0-9ÄâîÈÈÄÃÃÈÈ]+/gim,serbian:/[^a-z0-9ÄÄžšÄÄÄŽŠÄ]+/gim,turkish:/[^a-z0-9çÃÄÄıİöÃÅÅüÃ]+/gim,lithuanian:/[^a-z0-9Ä ÄÄÄįšųūžÄÄÄÄĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9Ø£-Ù]+/gim,nepali:/[^a-z0-9ठ-ह]+/gim,irish:/[^a-z0-9áéÃóúÃÃÃÃÃ]+/gim,indian:/[^a-z0-9ठ-ह]+/gim,armenian:/[^a-z0-9Õ¡-Ö]+/gim,greek:/[^a-z0-9α-Ïά-Ï]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-ÑÐ-ЯÑÑÑÐÐÐ]+/gim,slovenian:/[^a-z0-9ÄžšÄŽŠ]+/gim,bulgarian:/[^a-z0-9а-ÑÐ-Я]+/gim,tamil:/[^a-z0-9à® -ஹ]+/gim,sanskrit:/[^a-z0-9A-ZÄīūá¹á¸·á¹á¹á¸¥Åá¹£á¹á¸á¹á¹ ñḻḹá¹]+/gim,czech:/[^A-Z0-9a-zÄÅ¡ÄÅžýáÃéúůóťÄÄÅ ÄÅŽÃÃÃÃÃÃŮŤÄ-]+/gim},_z=Object.keys(_D);function _L(e,t){return void 0===Object.hasOwn?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}Date.now().toString().slice(5),BigInt(1e3),BigInt(1e6),BigInt(1e9);"intersection"in new Set;"union"in new Set;let _P=_z.join("\n - "),_j={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:"Do not pass the language option to create when using a custom tokenizer.",LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported. 131Supported languages are: 132 - ${_P}`,INVALID_STEMMER_FUNCTION_TYPE:"config.stemmer property must be a function.",MISSING_STEMMER:'As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.',CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:"Custom stop words array must only contain strings.",UNSUPPORTED_COMPONENT:'Unsupported component "%s".',COMPONENT_MUST_BE_FUNCTION:'The component "%s" must be a function.',COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:'The component "%s" must be a function or an array of functions.',INVALID_SCHEMA_TYPE:'Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.',DOCUMENT_ID_MUST_BE_STRING:'Document id must be of type "string". Got "%s" instead.',DOCUMENT_ALREADY_EXISTS:'A document with id "%s" already exists.',DOCUMENT_DOES_NOT_EXIST:'A document with id "%s" does not exists.',MISSING_DOCUMENT_PROPERTY:'Missing searchable property "%s".',INVALID_DOCUMENT_PROPERTY:'Invalid document property "%s": expected "%s", got "%s"',UNKNOWN_INDEX:'Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s',INVALID_BOOST_VALUE:"Boost value must be a number greater than, or less than 0.",INVALID_FILTER_OPERATION:"You can only use one operation per filter, you requested %d.",SCHEMA_VALIDATION_FAILURE:'Cannot insert document due schema validation failure on "%s" property.',INVA
132LID_SORT_SCHEMA_TYPE:'Unsupported sort schema type "%s" at "%s". Expected "string" or "number".',CANNOT_SORT_BY_ARRAY:'Cannot configure sort for "%s" because it is an array (%s).',UNABLE_TO_SORT_ON_UNKNOWN_FIELD:'Unable to sort on unknown field "%s". Allowed fields: %s',SORT_DISABLED:"Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.",UNKNOWN_GROUP_BY_PROPERTY:'Unknown groupBy property "%s".',INVALID_GROUP_BY_PROPERTY:'Invalid groupBy property "%s". Allowed types: "%s", but given "%s".',UNKNOWN_FILTER_PROPERTY:'Unknown filter property "%s".',UNKNOWN_VECTOR_PROPERTY:'Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.',INVALID_VECTOR_SIZE:'Vector size must be a number greater than 0. Got "%s" instead.',INVALID_VECTOR_VALUE:'Vector value must be a number greater than 0. Got "%s" instead.',INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead. 133Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:'Property "%s" is not searchable. Only "string" properties are searchable.',FACET_NOT_SUPPORTED:'Facet doens\'t support the type "%s".',INVALID_DISTANCE_SUFFIX:'Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.',INVALID_SEARCH_MODE:'Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".',MISSING_VECTOR_AND_SECURE_PROXY:"No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.",MISSING_TERM:'"term" is a required parameter when performing hybrid search. Please provide a search term.',INVALID_VECTOR_INPUT:'Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.',PLUGIN_CRASHED:"A plugin crashed during initialization. Please check the error message for more information:",PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance. 134Please install it before proceeding with creating an answer session. 135Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy 136`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration. 137Please provide a chat model before proceeding with creating an answer session. 138Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy 139`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:"The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.",PLUGIN_COMPONENT_CONFLICT:'The component "%s" is already defined. The plugin "%s" is trying to redefine it.'};function _$(e,...t){let n=Error(function(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],o=i?t[Number.parseInt(i)-1]:t.shift(),s=""===n?0:Number.parseInt(n);switch(r){case"d":return o.toString().padStart(s,"0");case"f":{let e=o,[t,r]=n.split(".").map(e=>Number.parseFloat(e));return"number"==typeof r&&r>=0&&(e=e.toFixed(r)),"number"==typeof t&&t>=0?e.toString().padStart(s,"0"):e.toString()}case"s":return s<0?o.toString().padEnd(-s," "):o.toString().padStart(s," ");default:return o}})}(_j[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,"captureStackTrace"in Error.prototype&&Error.captureStackTrace(n),n}function _F(e,t,n){let r=function(e,t,n){if(n<0)return -1;if(e===t)return 0;let r=e.length,i=t.length;if(0===r)return i<=n?i:-1;if(0===i)return r<=n?r:-1;let o=Math.abs(r-i);if(e.startsWith(t))return o<=n?o:-1;if(t.startsWith(e))return 0;if(o>n)return -1;let s=[];for(let e=0;e<=r;e++){s[e]=[e];for(let t=1;t<=i;t++)s[e][t]=0===e?t:0}for(let o=1;o<=r;o++){let r=1/0;for(let n=1;n<=i;n++)e[o-1]===t[n-1]?s[o][n]=s[o-1][n-1]:s[o][n]=Math.min(s[o-1][n]+1,s[o][n-1]+1,s[o-1][n-1]+1),r=M
139ath.min(r,s[o][n]);if(r>n)return -1}return s[r][i]<=n?s[r][i]:-1}(e,t,n);return{distance:r,isBounded:r>=0}}class _B{k;s;c=new Map;d=new Set;e;w="";constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let o=i.pop();if(o.e){let{w:i,d:s}=o;if(n&&i!==t)continue;if(null!==_L(e,i))if(r){if(!(Math.abs(t.length-i.length)<=r)||!_F(t,i,r).isBounded)continue;e[i]=[]}else e[i]=[];if(null!=_L(e,i)&&s.size>0){let t=e[i];for(let e of s)t.includes(e)||t.push(e)}}o.c.size>0&&i.push(...o.c.values())}return e}insert(e,t){let n=this,r=0,i=e.length;for(;r<i;){let o=e[r],s=n.c.get(o);if(s){let o=s.s,a=o.length,l=0;for(;l<a&&r+l<i&&o[l]===e[r+l];)l++;if(l===a){if(n=s,(r+=l)===i){s.e||(s.e=!0),s.addDocument(t);return}continue}let c=o.slice(0,l),d=o.slice(l),u=e.slice(r+l),h=new _B(c[0],c,!1);if(n.c.set(c[0],h),h.updateParent(n),s.s=d,s.k=d[0],h.c.set(d[0],s),s.updateParent(h),u){let e=new _B(u[0],u,!0);e.addDocument(t),h.c.set(u[0],e),e.updateParent(h)}else h.e=!0,h.addDocument(t);return}{let i=new _B(o,e.slice(r),!0);i.addDocument(t),n.c.set(o,i),i.updateParent(n);return}}n.e||(n.e=!0),n.addDocument(t)}_findLevenshtein(e,t,n,r,i){let o=[{node:this,index:t,tolerance:n}
139];for(;o.length>0;){let{node:t,index:n,tolerance:s}=o.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(s<0)continue;if(t.e){let{w:n,d:o}=t;if(n&&(_F(e,n,r).isBounded&&(i[n]=[]),void 0!==_L(i,n)&&o.size>0)){let e=new Set(i[n]);for(let t of o)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let a=e[n];if(t.c.has(a)){let e=t.c.get(a);o.push({node:e,index:n+1,tolerance:s})}for(let[e,r]of(o.push({node:t,index:n+1,tolerance:s-1}),t.c))o.push({node:r,index:n,tolerance:s-1}),e!==a&&o.push({node:r,index:n+1,tolerance:s-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}{let e=this,i=0,o=t.length;for(;i<o;){let s=t[i],a=e.c.get(s);if(!a)return{};{let s=a.s,l=s.length,c=0;for(;c<l&&i+c<o&&s[c]===t[i+c];)c++;if(c===l)e=a,i+=c;else{if(i+c!==o||c!==o-i||n)return{};let e={};return a.findAllWords(e,t,n,r),e}}}let s={};return e.findAllWords(s,t,n,r),s}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],o=t.c.get(i);if(!o)return!1;{let i=o.s,s=i.length,a=0;for(;a<s&&n+a<r&&i[a]===e[n+a];)a++;if(a<s)return!1;n+=s,t=o}}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(!t.c.has(n))return!1;{let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}}for(t.d.clear(),t.e=!1;r.length>0&&0===t.c.size&&!t.e&&0===t.d.size;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let o=0;o<i;o++){let i=e[o];if(!r.c.has(i))return!1;{let s=r.c.get(i);o+=s.s.length-1,r=s,n&&r.w!==e||r.removeDocument(t)}}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(e){let t=new _B(e.k,e.s,e.e);return t.w=e.w,t.d=new Set(e.d),t.c=new Map(e?.c?.map(([e,t])=>[e,_B.fromJSON(t)])||[]),t}}let _H=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115],_U={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},_V={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},_q="[aeiouy]",_G="[^aeiou][^aeiouy]*",_W=_q+"[aeiou]*",_K="^("+_G+")?"+_W+_G,_J="^("+_G+")?"+_W+_G+"("+_W+")?$",_Y="^("+_G+")?"+_W+_G+_W+_G,_X="^("+_G+")?"+_q;function _Q(e){let t,n,r,i,o,s;if(e.length<3)return e;let a=e.substring(0,1);if("y"==a&&(e=a.toUpperCase()+e.substring(1)),i=/^(.+?)([^s])s$/,(r=/^(.+?)(ss|i)es$/).test(e)?e=e.replace(r,"$1$2"):i.test(e)&&(e=e.replace(i,"$1$2")),i=/^(.+?)(ed|ing)$/,(r=/^(.+?)eed$/).test(e)){let t=r.exec(e);(r=new RegExp(_K)).test(t[1])&&(r=/.$/,e=e.replace(r,""))}else i.test(e)&&(t=i.exec(e)[1],(i=new RegExp(_X)).test(t)&&(e=t,i=/(at|bl|iz)$/,o=RegExp("([^aeiouylsz])\\1$"),s=RegExp("^"+_G+_q+"[^aeiouwxy]$"),i.test(e)?e+="e":o.test(e)?(r=/.$/,e=e.replace(r,"")):s.test(e)&&(e+="e")));if((r=/^(.+?)y$/).test(e)){let n=r.exec(e);t=n?.[1],r=new RegExp(_X),t&&r.test(t)&&(e=t+"i")}if((r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/).test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(_K),t&&r.test(t)&&(e=t+_U[n])}if((r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/).test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(_K),t&&r.test(t)&&(e=t+_V[n])}if(i=/^(.+?)(s|t)(ion)$/,(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/).test(e)){let n=r.exec(e);t=n?.[1],r=new RegExp(_Y),t&&r.test(t)&&(e=t)}else if(i.test(e)){let n=i.exec(e);t=n?.[1]??""+n?.[2]??"",(i=new RegExp(_Y)).test(t)&&(e=t)}if((r=/^(.+?)e$/).test(e)){let n=r.exec(e);t=n?.[1],r=new RegExp(_Y),i=new RegExp(_J),o=RegExp("^"+_G+_q+"[^aeiouwxy]$"),t&&(r.test(t)||i.test(t)&&!o.test(t))&&(e=t)}return r=/ll$/,i=new RegExp(_Y),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,"")),"y"==a&&(e=a.toLowerCase()+e.substring(1)),e}function _Z(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,""),""):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=function(e){let t=[];for(let r=0;r<e.length;r++){var n;t[r]=(n=e.charCodeAt(r))<192||n>383?n:_H[n-192]||n}return String.fromCharCode(...t)}(t),n&&this.normalizationCache.set(r,t),t)}function _0(e,t,n,r=!0){let i;if(t&&t!==this.language)throw _$("LANGUAGE_NOT_SUPPORTED",t);if("string"!=typeof e)return[e];let o=this.normalizeToken.bind(this,n??"");if(n&&this.tokenizeSkipProperties.has(n))i=[o(e,r)];else{let t=_R[this.language];i=e.toLowerCase().split(t).map(e=>
139o(e,r)).filter(Boolean)}let s=function(e){for(;""===e[e.length-1];)e.pop();for(;""===e[0];)e.shift();return e}(i);return this.allowDuplicates?s:Array.from(new Set(s))}e.s(["createTokenizer",0,function(e={}){let t,n;if(e.language){if(!_z.includes(e.language))throw _$("LANGUAGE_NOT_SUPPORTED",e.language)}else e.language="english";if(e.stemming||e.stemmer&&!("stemming"in e))if(e.stemmer){if("function"!=typeof e.stemmer)throw _$("INVALID_STEMMER_FUNCTION_TYPE");t=e.stemmer}else if("english"===e.language)t=_Q;else throw _$("MISSING_STEMMER",e.language);if(!1!==e.stopWords){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if("function"==typeof e.stopWords)n=e.stopWords(n);else if(e.stopWords)throw _$("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY");if(!Array.isArray(n))throw _$("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY");for(let e of n)if("string"!=typeof e)throw _$("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY")}let r={tokenize:_0,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:_Z,normalizationCache:new Map};return r.tokenize=_0.bind(r),r.normalizeToken=_Z,r},"normalizeToken",0,_Z],794033),e.i(794033),[{id:"mcp-preapproval",piece:"mcp",scope:"project",requiredStrictness:"pre-approval-exact",revokedByForeignEntry:!1},{id:"tool-autoapprove",piece:"mcp",requiredStrictness:"pre-approval-exact",revokedByForeignEntry:!0}].map(e=>e.id);ea.z.enum(["count-unverified","not-count"]),ea.z.enum(["acp-catalog-supported","harness-cli-on-path","os-scheme-handler"]),ew.filter(e=>"session"!==e);let _1={agent:ey};Object.keys({"followup.enable-manually":{params:ea.z.strictObject(_1)},"guidance.mcp.user-config":{params:ea.z.strictObject(_1)},"guidance.mcp.project-config":{params:ea.z.strictObject(_1)},"guidance.mcp.session-injection":{params:ea.z.strictObject(_1)},"guidance.mcp.managed-file":{params:ea.z.strictObject(_1)},"guidance.skill.project":{params:ea.z.strictObject(_1)},"guidance.skill.user":{params:ea.z.strictObject(_1)},"guidance.skill.central-store":{params:ea.z.strictObject(_1)},"troubleshooting.claude.project-entry-not-approved":{params:ea.z.strictObject(_1)},"troubleshooting.claude-desktop.per-tool-approval":{params:ea.z.strictObject(_1)},"troubleshooting.cursor.project-entry-not-loaded":{params:ea.z.strictObject(_1)},"troubleshooting.codex.desktop-project-config":{params:ea.z.strictObject({..._1,honoredByDesktop:ea.z.boolean()})},"troubleshooting.codex.folder-trust":{params:ea.z.strictObject(_1)},"troubleshooting.copilot.shared-workspace-config":{params:ea.z.strictObject({..._1,sourceAgent:ey})},"troubleshooting.openclaw.central-store-missing":{params:ea.z.strictObject(_1)},"troubleshooting.pi.folder-trust":{params:ea.z.strictObject(_1)},"troubleshooting.lm-studio.config-path-mismatch":{params:ea.z.strictObject(_1)}}).sort();e0.flatMap(e=>"probeable"===e.probe.mode?[{satisfierId:e.id,agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind,pathId:e.pathId??null,strictness:e.probe.strictness}]:[]).map(e=>e.satisfierId);let _2=ea.z.enum(et),_5=ea.z.object({kind:ea.z.enum(["source-read","measured","vendor-doc","upstream-issue","observation"]),ref:ea.z.string().min(1),note:ea.z.string().optional()}),_3=ea.z.object({version:ea.z.string().min(1).optional(),observedAt:ea.z.string().min(1)}),_4=ea.z.discriminatedUnion("confidence",[ea.z.object({confidence:ea.z.literal("verified"),evidence:ea.z.array(_5).min(1),verifiedAgainst:_3.optional()}),ea.z.object({confidence:ea.z.literal("assumed"),evidence:ea.z.array(_5).min(1),verifiedAgainst:_3.optional()}),ea.z.object({confidence:ea.z.literal("contested"),evidence:ea.z.array(_5).min(1),verifiedAgainst:_3})]),_6=ea.z.object({id:eC,params:ea.z.record(ea.z.string(),ea.z.union([ea.z.string(),ea.z.number(),ea.z.boolean()])).optional()}),_8=ea.z.discriminatedUnion("mode",[ea.z.object({mode:ea.z.literal("probeable"),strictness:ea.z.array(eu).min(1)}),ea.z.object({mode:ea.z.literal("unprobeable"),reason:ea.z.enum(["no-readable-state","different-machine","no-programmatic-path","session-scoped"]),note:ea.z.string().optional()})]),_9=ea.z.enum(["this-project","this-user","this-machine"]),_7=ea.z.enum(["installable","user-completes","not-installable"]),Ne=ea.z.object({id:eT,agent:ey,piece:ex,scope:eE,kind:ec,pathId:eS.optional(),sharedWith:ea.z.array(ey).default([]),prerequisites:ea.z.array(eT).default([]),consentClass:eh.default("none"),probe:_8,attestation:_4,audience:_9,installability:_7.default("installable"),notInstallableReason:ea.z.enum(["no-non-interactive-verb","session-scoped","no-surface"]).optional(),preferred:ea.z.boolean().default(!1),guidance:_6.optional(),followup:_6.optional(),troubleshooting:ea.z.array(_6).default([])}),Nt=ea.z.object({piece:ex,level:em,satisfiedByAny:ea.z.array(eT)}),Nn=ea.z.object({acpAgentId:ea.z.string().min(1),featuredOrder:ea.z.number().int().nonnegative().nullable(),harnessCli:ev.nullable(),harnessReadsEditorConfig:_2.nullable(),harnessReadsEditorConfigAttestation:_4,verifiedPosture:ea.z.enum(["asks","self-managed","autonomous"]).nullable()}),Nr=ea.z.object({cliId:ea.z.string().min(1)}),Ni=ea.z.object({targetId:ek,knownOrder:ea.z.number().int().nonnegative(),visible:ea.z.boolean(),displayName:ea.z.string().min(1),appBrandName:ea.z.string().min(1).optional(),schemes:ea.z.array(ea.z.string().min(1)),installUrl:ea.z.string().min(1),tagline:ea.z.string().min(1).optional()}),No=ea.z.object({requirements:ea.z.array(Nt),caveats:ea.z.array(_6).default([])});ea.z.object({id:ey,setupDocSlug:ea.z.string().min(1).nullable(),offerOnlyWhenDetected:ea.z.boolean().default(!1),offersConnectionRow:ea.z.boolean().default(!1),detectionSources:ea.z.array(ea.z.string().min(1)).default([]),satisfiers:ea.z.array(Ne),modes:ea.z.partialRecord(eb,No),acp:Nn.optional(),terminal:Nr.optional(),external:Ni.optional()}),ea.z.object({id:ea.z.string().min(1),requiredStrictness:eu,scope:eE.optional(),piece:ex,revokedByForeignEntry:ea.z.boolean().default(!1),guidance:_6.optional()}),new oq.default;let Ns=ea.z.object({path:ea.z.array(ea.z.union([ea.z.string(),ea.z.number()])),message:ea.z.string(),issueC
139ode:ea.z.string()});function Na(e,t){return e>=("leading"===t?2:1)?e:0}function Nl(e,t){let n={line:e,column:1,offset:t};return{type:"paragraph",children:[],position:{start:n,end:{...n}}}}function Nc(e,t){let n=e.children,r=0===n.length||void 0===t.leading?0:Na(t.leading.length,"leading"),i=0===n.length||void 0===t.trailing?0:Na(t.trailing.length-1,"trailing");if(0===r&&0===i)return t;let o=n[n.length-1]?.position?.end,s=[],a=[];if(r>0)for(let e=0;e<r;e++)s.push(Nl(1+e,e));if(i>0&&"number"==typeof o?.offset&&"number"==typeof o.line)for(let e=0;e<i;e++)a.push(Nl(o.line+1+e,o.offset+1+e));return 0===s.length&&0===a.length||(e.children=[...s,...n,...a],s.length>0&&delete t.leading,a.length>0&&delete t.trailing,void 0!==t.bom||void 0!==t.leading||void 0!==t.trailing)?t:void(void 0!==e.data&&delete e.data.sourceDocBoundary)}function Nd(e,t){let n=0;for(let r=0;r<t.length&&n<e.length;r++)e[n]===t[r]&&n++;return n===e.length}ea.z.discriminatedUnion("code",[ea.z.object({code:ea.z.literal("SCHEMA_INVALID"),issues:ea.z.array(Ns)}),ea.z.object({code:ea.z.literal("WRITE_ERROR"),detail:ea.z.string()})]),Object.freeze({source:"local",skipStoreHooks:!1,context:Object.freeze({origin:"form-write"})}),new oq.default().Match_Threshold=.5;let Nu=new Set(["sourceRaw","sourceDirty","position"]),Nh=new Set(["jsxComponent","table","tableRow","tableCell","tableHeader","list","listItem","blockquote","codeBlock","heading"]),Np={type:"__br__"},Nf=/^<br\s*\/?>$/i,Nm=[{label:"table-cell-block-flatten",severity:"pm-model-caused",rationale:"GFM table cells have no block spelling; a block placed in a cell is flattened to inline on serialize, so a cell-with-blocks and a cell-with-inline describe the same persisted document.",proofPointer:"markdown/table-cell-flatten.ts flattenCellBlocks (table-cell-flatten-dropped-block event)",canonicalize:function e(t){let n=Ng(t,e);return("tableCell"===n.type||"tableHeader"===n.type)&&n.content?{...n,content:function e(t){let n=[];for(let i of t){var r;let t=void 0!==(r=i).text||"hardBreak"===r.type||"jsxInline"===r.type?[r]:r.content&&0!==r.content.length?r.content.some(e=>void 0===e.text&&"hardBreak"!==e.type&&"jsxInline"!==e.type&&!!e.content)?e(r.content):r.content:[];0!==t.length&&(n.length>0&&n.push(Np),n.push(...t))}return n}(n.content)}:n}},{label:"void-hardbreak-br",severity:"serializer-caused",rationale:"A void hardBreak inside a table cell or heading serializes to a literal <br /> that a fresh parse keeps as text; the node form and the literal form are the same break.",proofPointer:"markdown/void-br-promoter.ts + markdown/to-markdown-handlers.ts break handler",canonicalize:function e(t){return"hardBreak"===t.type||t.type===Np.type||void 0!==t.text&&Nf.test(t.text.trim())?Np:Ng(t,e)}}];function Ng(e,t){return e.content?{...e,content:e.content.map(t)}:e}function Ny(e,t){let n={};void 0!==e.type&&(n.type=e.type),void 0!==e.text&&(n.text=e.text);let r=Nb(e.attrs,t);return r&&(n.attrs=r),e.marks&&e.marks.length>0&&(n.marks=[...e.marks].map(e=>({type:e.type,attrs:Nb(e.attrs,t)})).sort((e,t)=>Nv(e).localeCompare(Nv(t)))),e.content&&e.content.length>0&&(n.content=e.content.map(e=>Ny(e,t))),n}function Nb(e,t){if(!e)return null;let n={};for(let r of Object.keys(e).sort()){if(Nu.has(r)||t?.(r))continue;let i=e[r];null!=i&&(n[r]=t?function e(t,n){if(Array.isArray(t))return t.map(t=>e(t,n));if(t&&"object"==typeof t){let r={};for(let[i,o]of Object.entries(t))n(i)||(r[i]=e(o,n));return r}return t}(i,t):i)}return Object.keys(n).length>0?n:null}function Nv(e){return JSON.stringify(e,(e,t)=>{if(t&&"object"==typeof t&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}function Nk(e,t=!1){let n="",r=e=>{if((!t||"rawMdxFallback"!==e.type)&&(void 0!==e.text&&(n+=e.text),e.content))for(let t of e.content)r(t)};return r(e),n.replace(/\s+/g,"")}function Nx(e){let t=[],n=e=>{if(e.type&&Nh.has(e.type)){let n="jsxComponent"===e.type?String(e.attrs?.componentName??""):"";t.push(n?`${e.type}:${n}`:e.type)}if(e.content)for(let t of e.content)n(t)};return n(e),t.sort()}function Nw(e){let t=e,n=[];for(let e of Nm){let r=Nv(t),i=e.canonicalize(t);Nv(i)!==r&&n.push(e.label),t=i}return{normalized:t,fired:n}}let NE=new Set(["src","href","size"]),NT=new Set(["WikiEmbedImage","WikiEmbedVideo","WikiEmbedAudio","WikiEmbedFile"]);function NS(e){return"jsxComponent"===e.type&&"string"==typeof e.attrs?.componentName&&NT.has(e.attrs.componentName)?function e(t){if(Array.isArray(t))return t.map(t=>e(t));if(t&&"object"==typeof t){let n={};for(let[r,i]of Object.entries(t))NE.has(r)||(n[r]=e(i));return n}return t}(e):e.content?{...e,content:e.content.map(NS)}:e}function NC(e){if(Array.isArray(e))return e.map(e=>NC(e));if(e&&"object"==typeof e){let t={};for(let[n,r]of Object.entries(e))"position"!==n&&(t[n]=NC(r));return t}return e}let NA=ea.z.looseObject({at:ea.z.string(),transport:ea.z.string(),outcome:ea.z.string(),reference:ea.z.string().optional(),error:ea.z.string().optional(),errorCode:ea.z.string().optional()}),N_=ea.z.looseObject({reason:ea.z.string(),at:ea.z.string(),errorCode:ea.z.string().optional()});ea.z.looseObject({version:ea.z.number().int().catch(1),id:ea.z.string(),createdAt:ea.z.string(),bundleLevel:ea.z.string(),zipBytes:ea.z.number().int().nonnegative().c
139atch(0),zipDeleted:ea.z.boolean().optional(),state:ea.z.string(),systemWide:ea.z.boolean().optional(),projectSlug:ea.z.string().nullable().optional(),reference:ea.z.string().optional(),lastError:N_.optional(),attempts:ea.z.array(NA).optional(),note:ea.z.string().optional()}),ea.z.looseObject({version:ea.z.number().int().catch(1),id:ea.z.string().optional(),sentAt:ea.z.string().optional(),reference:ea.z.string().optional()});let NN=new Map([[32," "],[9," "],[160,"Â "]]);function NO(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r="x"===n[0]||"X"===n[0],i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function NM(e){let t=NO(e);return null!==t&&NN.has(t)}let NI=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function ND(e){NI.lastIndex=0;let t=e.match(NI);if(null===t||t.join("")!==e)return null;let n="";for(let e of t){let t=function(e){let t=NO(e);return null===t?null:NN.get(t)??null}(e);if(null===t)return null;n+=t}return n}let NR="(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)";RegExp(`^127\\.${NR}\\.${NR}\\.${NR}$`);let Nz=[".mdx",".md"];Object.freeze([{value:"workflow-fit",label:"It didn't fit into my workflow"},{value:"missing-feature",label:"It was missing a feature I needed"},{value:"hard-to-start",label:"It was too hard to set up or get started"},{value:"unreliable",label:"Bugs, crashes, or it felt unreliable"},{value:"switched-tool",label:"I'm switching to another tool"},{value:"one-off",label:"It was a trial or one-off project"},{value:"other",label:"Something else"}]).map(e=>e.value);let NL=pg.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:"fenced"},sourceClosingFenceLength:{default:null,rendered:!1},sourceUnclosedFence:{default:!1,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),NP=pA.extend({name:"emphasis",priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:"*"}}}
139,addInputRules(){return[ps({find:pE,type:this.type,getAttributes:{sourceDelimiter:"*"}}),ps({find:pS,type:this.type,getAttributes:{sourceDelimiter:"_"}})]}}),Nj=pw.extend({name:"strong",priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:"**"}}},addInputRules(){return[ps({find:pb,type:this.type,getAttributes:{sourceDelimiter:"**"}}),ps({find:pk,type:this.type,getAttributes:{sourceDelimiter:"__"}})]}}),N$=hX.create({name:"escapeMark",priority:10,excludes:"",inclusive:!1,parseHTML:()=>[{tag:"span[data-escape-mark]"}],renderHTML:()=>["span",{"data-escape-mark":""},0]}),NF=pu.create({name:"footnoteDefinition",group:"block",content:"block+",defining:!0,priority:60,addAttributes:()=>({identifier:{default:""},label:{default:null}}),parseHTML(){let e=e=>{if("string"==typeof e)return!1;let t=e.getAttribute("data-footnote-id")||"";return{identifier:t,label:t||null}};return[{tag:"aside[data-footnote-def]",getAttrs:e},{tag:"aside.footnote-def",getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??"");return["aside",{...t,"data-footnote-def":"","data-footnote-id":n,id:`fn-${n}`,class:"footnote-def"},["div",{class:"footnote-body"},0],["a",{href:`#fnref-${n}`,class:"footnote-backref",contentEditable:"false","aria-label":"Back to reference"},"â©"]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:"paragraph"}]})}}});function NB({node:e}){return"".repeat(e.nodeSize-e.content.size)}let NH=pu.create({name:"footnoteReference",marks:"_",group:"inline",inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,renderText:NB,addAttributes:()=>({identifier:{default:""},label:{default:null}}),parseHTML:()=>[{tag:"sup[data-footnote-ref]",getAttrs:e=>{if("string"==typeof e)return!1;let t=e.getAttribute("data-footnote-id")||"";return{identifier:t,label:t||null}}}],renderHTML({node:e}){let t=String(e.attrs.identifier??"");return["sup",{id:`fnref-${t}`,"data-footnote-ref":"","data-footnote-id":t,class:"footnote-ref"},["a",{href:`#fn-${t}`,class:"footnote-ref-link"},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),NU=p_.extend({marks:"_",priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:"backslash"},sourceRaw:{default:null}}}}),NV=pN.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:"atx"},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),Nq=pu.create({name:"htmlBlock",group:"block",atom:!0,priority:60,addAttributes:()=>({content:{default:""}}),parseHTML:()=>[{tag:"div[data-html-block]"}],renderHTML:({node:e})=>["div",{"data-html-block":"",class:"html-block"},e.attrs.content]}),NG=pu.create({name:"imageReference",marks:"_",group:"inline",inline:!0,atom:!0,priority:60,renderText:NB,addAttributes:()=>({alt:{default:""},label:{default:""},identifier:{default:""},referenceType:{default:"shortcut"}}),parseHTML:()=>[{tag:"img[data-image-reference]"}],renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return["img",{"data-image-reference":"","data-reference-type":r,"data-label":n,alt:t||n}]}}),NW=pM.extend({marks:"_",priority:60,renderText:NB,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=uX(this.options.HTMLAttributes,e);return"string"==typeof t.src&&(t.src=function(e){if("string"!=typeof e||!e.startsWith("/"))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return"string"==typeof t&&t?t+e:e}(t.src)),["img",t]}}),NK=pu.create({name:"jsxComponent",group:"block",atom:!1,content:"block*",isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes:()=>({componentName:{default:""},kind:{default:"element"},attributes:{default:[]},sourceRaw:{default:""},sourceDirty:{default:!1},props:{default:{}}}),parseHTML:()=>[{tag:"div[data-jsx-component]",getAttrs:e=>"string"!=typeof e&&{componentName:e.getAttribute("data-component-name")||"",sourceRaw:e.getAttribute("data-source-raw")||""}}],renderHTML:({HTMLAttributes:e})=>["div",{"data-jsx-component":"","data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0],addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),NJ=pu.create({name:"jsxInline",group:"inline",inline:!0,atom:!1,content:"text*",isolating:!1,selectable:!0,priority:60,renderText:NB,addAttributes:()=>({componentName:{default:""},kind:{default:"element"},attributes:{default:[]},sourceRaw:{default:""},sourceDirty:{default:!1},props:{default:{}}}),parseHTML:()=>[{tag:"span[data-jsx-inline]",getAttrs:e=>"string"!=typeof e&&{componentName:e.getAttribute("data-component-name")||"",sourceRaw:e.getAttribute("data-source-raw")||""}}],renderHTML:({HTMLAttributes:e})=>["span",{"data-jsx-inline":"","data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]}),NY=["https","http","mailto","tel","ftp","sms"],NX=NY.map(e=>`${e}:`).join("|");RegExp(`^(?:${NX}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,"i");let NQ=new Set(NY.map(e=>`${e}:`));function NZ(e){try{let t=new URL(e,"https://placeholder.invalid");return NQ.has(t.protocol.toLowerCase())}catch{return!1}}let N0="LinkFidelity must be derived from the Link extension",N1=f9.extend({priority:60,addOptions(){let e=this.parent?.();if(void 0===e)throw Error(N0);return{...e,openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"},isAllowedUri:NZ,shouldAutoLink:()=>!0}},addAttributes(){let e=this.parent?.();if(void 0===e)throw Error(N0);return{...e,linkStyle:{default:"inline",rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}}}),N2=pu.create({name:"linkRefDef",group:"block",atom:!0,priority:60,addAttributes:()=>({label:{default:""},href:{default:""},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}),parseHTML:()=>[{tag:"div[data-link-ref-def]"}],renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return["div",{"data-link-ref-def":"",class:"link-ref-def"},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});
139function N5(e){return"list"===e.type.name&&!e.attrs.ordered}function N3(e){let t=!1;return e.forEach(e=>{"listItem"===e.type.name&&null!==e.attrs.checked&&(t=!0)}),t}function N4(e,t,n,r,i,o,s){let a=uH(e=>"list"===e.type.name)(e.selection);if(a&&i(a.node)){let{$from:n,$to:i}=e.selection;return!!n.blockRange(i)&&a6(r)(e,t)}if(a){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(a.pos,void 0,{...a.node.attrs,...o}),void 0!==s&&a.node.forEach((e,t)=>{if("listItem"===e.type.name){let r=a.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...s})}}),t(n),!0}return!!a4(n,o)(e,void 0)&&(!t||a4(n,o)(e,n=>{if(s){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if("listItem"===t.type.name){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...s});break}}}t(n)}))}function N6(e){return"x"===e||"X"===e}function N8(e){return"X"===e?"X":null}function N9(e,t,n,r){let i=e.schema.nodes.list;if(!i)return!1;let o=e.doc.resolve(t.from),s=o.depth-1;if(s>0&&"listItem"===o.node(s).type.name&&0===o.index(s)){let i=o.node(s);return e.tr.delete(t.from,t.to).setNodeMarkup(o.before(s),void 0,{...i.attrs,checked:n,sourceCheckboxChar:r}),!0}let a=o.blockRange();if(!a)return!1;let l=sX(a,i,{ordered:!1});if(!l)return!1;let c=e.tr;c.wrap(a,l),c.delete(c.mapping.map(t.from),c.mapping.map(t.to));let d=c.doc.resolve(c.mapping.map(t.from));for(let e=d.depth;e>0;e--){let t=d.node(e);if("listItem"===t.type.name){c.setNodeMarkup(d.before(e),void 0,{...t.attrs,checked:n,sourceCheckboxChar:r});break}}return!0}let N7=/^\s*([-+*])\s$/,Oe=/^\s*(\d+)([.)])\s$/,Ot=/^\s*[-*+]\s\[([ xX]?)\]\s$/,On=/^\s*\[([ xX]?)\]\s$/,Or=pu.create({name:"list",group:"block list",content:"listItem+",priority:60,addAttributes:()=>({ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}),parseHTML:()=>[{tag:"ul",getAttrs:()=>({ordered:!1})},{tag:"ol",getAttrs:e=>({ordered:!0,start:e.getAttribute("start")?Number(e.getAttribute("start")):1})}],renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?"ol":"ul",r={};return e.attrs.ordered&&1!==e.attrs.start&&(r.start=e.attrs.start),[n,uX(t,r),0]},addCommands:()=>({toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!!n&&!!r&&N4(e,t,n,r,e=>N5(e)&&!N3(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!!n&&!!r&&N4(e,t,n,r,e=>"list"===e.type.name&&!!e.attrs.ordered,{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!!n&&!!r&&N4(e,t,n,r,e=>N5(e)&&N3(e),{ordered:!1},{checked:!1})}}
139),addInputRules(){return[pc({find:N7,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]}),joinPredicate:(e,t)=>!1===t.attrs.ordered}),pc({find:Oe,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]}),joinPredicate:(e,t)=>!0===t.attrs.ordered}),new hK({find:Ot,handler:({state:e,range:t,match:n})=>N9(e,t,N6(n[1]),N8(n[1]))?void 0:null}),new hK({find:On,handler:({state:e,range:t,match:n})=>N9(e,t,N6(n[1]),N8(n[1]))?void 0:null})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Oi=pu.create({name:"listItem",content:"paragraph block*",defining:!0,addAttributes:()=>({checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}),parseHTML:()=>[{tag:"li",getAttrs:e=>{let t=e.querySelector('input[type="checkbox"]');return{checked:t?t.checked:null}}}],renderHTML:({node:e,HTMLAttributes:t})=>null!==e.attrs.checked?["li",uX(t,{"data-type":"taskItem","data-checked":e.attrs.checked?"true":"false"}),["label",{contenteditable:"false"},["input",{type:"checkbox",...e.attrs.checked?{checked:"checked"}:{}}]],["div",0]]:["li",uX(t),0],addNodeView:()=>({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement("li");Object.entries(uX(r,null!==e.attrs.checked?{"data-type":"taskItem","data-checked":String(!!e.attrs.checked)}:{})).forEach(([e,t])=>{null!=t&&i.setAttribute(e,String(t))});let o=null,s=null,a=document.createElement("div"),l=()=>{s&&(s.disabled=!n.isEditable)};return null!==e.attrs.checked&&((o=document.createElement("label")).contentEditable="false",(s=document.createElement("input")).type="checkbox",s.checked=!!e.attrs.checked,l(),n.on("update",l),s.addEventListener("change",()=>{let r=t();void 0!==r&&"number"==typeof r&&n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:s?.checked??!1}))}),o.appendChild(s),i.appendChild(o)),i.appendChild(a),{dom:i,contentDOM:a,update:t=>t.type===e.type&&null!==t.attrs.checked==(null!==e.attrs.checked)&&(s&&null!==t.attrs.checked&&(s.checked=!!t.attrs.checked,s.disabled=!n.isEditable,i.setAttribute("data-checked",String(!!t.attrs.checked))),e=t,!0),destroy(){n.off("update",l)}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if("listItem"===e.node(t).type.name)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if("listItem"===e.node(t).type.name)return this.editor.commands.liftListItem(this.name);return!1}}}}),Oo=pu.create({name:"mathInline",marks:"_",group:"inline",inline:!0,atom:!0,selectable:!0,priority:60,renderText:NB,addAttributes:()=>({formula:{default:""},id:{default:null},language:{default:"latex"},sourceDelimiter:{default:null,rendered:!1}}),parseHTML:()=>[{tag:"span[data-math-inline]",getAttrs:e=>"string"!=typeof e&&{formula:e.getAttribute("data-formula")||"",id:e.getAttribute("id")||null,language:e.getAttribute("data-language")||"latex"}}],renderHTML:({HTMLAttributes:e})=>["span",{"data-math-inline":"","data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}],addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),Os=pu.create({name:"rawMdxFallback",group:"block",atom:!1,content:"text*",isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes:()=>({reason:{default:""},originalSpan:{default:{start:0,end:0}}}),parseHTML(){let e=e=>"string"!=typeof e&&{reason:e.getAttribute("data-reason")||""};return[{tag:"div[data-raw-mdx-fallback]",getAttrs:e},{tag:"pre[data-raw-mdx-fallback]",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>["div",{"data-raw-mdx-fallback":"","data-raw-badge":"raw","data-reason":e.reason,contenteditable:"false",class:"raw-mdx-fallback"},0],addNodeView:()=>({HTMLAttributes:e})=>{let t=document.createElement("div");t.setAttribute("data-raw-mdx-fallback",""),t.setAttribute("data-raw-badge","raw"),t.setAttribute("contenteditable","false"),t.classList.add("raw-mdx-fallback"),e.reason&&t.setAttribute("data-reason",e.reason);let n=document.createElement("pre");return n.classList.add("raw-mdx-fallback-content"),n.setAttribute("contenteditable","false"),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}),Oa=g1.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),Ol=bw.extend({excludes:"",addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),Oc=pu.create({name:"commentBlock",group:"block",content:"block+",defining:!0,priority:60,addAttributes:()=>({sourceForm:{default:"percent",parseHTML:e=>"html"===e.getAttribute("data-source-form")?"html":"percent",renderHTML:e=>"html"===e.sourceForm?{"data-source-form":"html"}:{}},sourceLayout:{default:"block",parseHTML:e=>"inline"===e.getAttribute("data-source-layout")?"inline":"block",renderHTML:e=>"inline"===e.sourceLayout?{"data-source-layout":"inline"}:{}}}),parseHTML:()=>[{tag:"aside[data-comment-block]"},{tag:"aside.comment-block"}],renderHTML:({HTMLAttributes:e})=>["aside",{"data-comment-block":"","data-clipboard-omit":"true",class:"comment-block",...e},0],addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),Od=hX.create({name:"comment",priority:10,excludes:"",inclusive:!1,addAttributes:()=>({sourceForm:{default:"percent",parseHTML:e=>"html"===e.getAttribute("data-source-form")?"html":"percent",renderHTML:e=>"html"===e.sourceForm?{"data-source-form":"html"}:{}}}),parseHTML:()=>[{tag:"span[data-comment-mark]"}],renderHTML:({HTMLAttributes:e})=>["span",{"data-comment-mark":"","data-clipboard-omit":"true",class:"comment-mark",...e},0],addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),Ou=h1.create({name:"docFidelity",addGlobalAttributes:()=>[{types:["doc"],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]});function Oh(e){for(let t=e.depth;t>0;t--)if("listItem"===e.node(t).type.name)return t;return null}function Op(e){let{selection:t}=e;return t instanceof ap?t.$cursor:null}let Of=h1.create({name:"listBoundaryMerge",addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!function(e){var t;let n,r=Op(e);if(r?.parentOffset!==0)return!1;let i=Oh(r);if(null===i||r.depth!==i+1||0!==r.index(i))return!1;let o=r.index(i-1);return 0!==o&&(t=r.node(i-1).child(o-1),n=!1,t.descendants(e=>
139!n&&("list"===e.type.name&&(n=!0),!n)),n)}(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return aR(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!function(e){let t=Op(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=Oh(t);if(null===n)return!1;for(let e=t.depth;e>n;e--)if(t.index(e-1)!==t.node(e-1).childCount-1)return!1;let r=function(e,t){for(let n=t-1;n>=0;n--){let t=e.node(n),r=e.index(n);if(r<t.childCount-1){let e=t.child(r+1),i=n+1;for(;"list"===e.type.name&&e.firstChild;)e=e.firstChild,i+=1;return"listItem"===e.type.name?i:null}}return null}(t,n);return null!==r&&r<n}(e.state))return!1;let{state:t,view:n}=e;return az(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),Om=h1.create({name:"plainTextClipboard",priority:1e3,addProseMirrorPlugins:()=>[new aA({key:new aO("okPlainTextClipboard"),props:{clipboardTextSerializer:e=>e.content.textBetween(0,e.content.size,"\n\n")}})]}),Og=hX.create({name:"sourceLiteral",priority:10,excludes:"",inclusive:!1,addAttributes:()=>({sourceRaw:{default:""}}),parseHTML:()=>[{tag:"span[data-source-literal]"}],renderHTML:({HTMLAttributes:e})=>["span",{"data-source-literal":"",...e},0]});function Oy(e,t){if("string"!=typeof e||"string"!=typeof t||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll("Â "," "),r=t.replaceAll("Â "," ");return n===r||n.replace(/\\([!-/:-@[-`{-~])/g,"$1")===r||ND(e)===t}let Ob=yB.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:"~~",rendered:!1}}}}),Ov=m9.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),Ok=mZ.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Ox=m0.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),Ow=pu.create({name:"tag",marks:"_",group:"inline",inline:!0,atom:!0,selectable:!0,priority:60,renderText:NB,addAttributes:()=>({value:{default:""}}),parseHTML:()=>[{tag:"a[data-tag]",getAttrs:e=>"string"!=typeof e&&{value:e.getAttribute("data-tag")||""}}],renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??"");return["a",{...t,"data-tag":n,href:`#tag/${n}`,class:"tag"},`#${n}`]},addCommands:()=>({insertTag:e=>({chain:t})=>t().insertContent({type:"tag",attrs:{value:e}}).run()})}),OE=/^(?:---|â-|___\s|\*\*\*\s)$/,OT=g6.extend({name:"thematicBreak",priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:"---"}}}
139,addInputRules(){return[pa({find:OE,type:this.type,getAttributes:e=>{let t;return{sourceRaw:"â-"===(t=String(e[0]??"").replace(/\s+$/,""))?"---":t}}})]}}),OS=yU.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceForm:{default:"u",rendered:!1}}}});function OC(e,t,n){let r;return"string"==typeof e&&((r=e.trim())===t||("alias"===n?ON(r)===t:O_(r)===t))?e:t}function OA(e){return""===O_(e.trim())}function O_(e){return e.endsWith("\\")?e.slice(0,-1):e}function ON(e){return e.replace(/\\\|/g,"|")}function OO(e){if("string"!=typeof e)return null;let t=e.trim();return t.length>0?t:null}function OM(e){let t=e.split("/").pop()??e,n=t.lastIndexOf(".");return n<=0||n===t.length-1?"":t.slice(n+1).toLowerCase()}let OI=[NK,Os,NJ,Oo,pu.create({name:"wikiLink",marks:"_",group:"inline",inline:!0,atom:!0,priority:60,renderText:NB,addAttributes:()=>({target:{default:""},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}),parseHTML:()=>[{tag:"span[data-wiki-link]",getAttrs:e=>"string"!=typeof e&&{target:e.getAttribute("data-target")||"",alias:OO(e.getAttribute("data-alias")),anchor:OO(e.getAttribute("data-anchor")),resolved:"true"===e.getAttribute("data-resolved")}},{tag:"a.wiki-link[data-target]",priority:100,getAttrs:e=>{if("string"==typeof e)return!1;let t=e.getAttribute("data-target")??"";return!!t&&{target:t,alias:OO(e.getAttribute("data-alias")),anchor:OO(e.getAttribute("data-anchor")),resolved:!1}}}],renderHTML({node:e,HTMLAttributes:t}){var n;let r=String(e.attrs.target??""),i=OO(e.attrs.alias),o=OO(e.attrs.anchor),s=!0===e.attrs.resolved;return["span",{...t,"data-wiki-link":"","data-target":r,"data-alias":i??"","data-anchor":o??"","data-resolved":s?"true":"false"},(n={target:r,alias:i,anchor:o}).alias?n.alias:n.anchor?`${n.target}#${n.anchor}`:n.target]}}),pu.create({name:"wikiLinkEmbed",group:"inline",inline:!0,atom:!0,priority:60,renderText:NB,addAttributes:()=>({target:{default:""},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}),parseHTML(){let e=e=>"string"!=typeof e&&!!e.hasAttribute("data-wiki-embed")&&{target:e.getAttribute("data-target")||"",alias:OO(e.getAttribute("data-alias")),anchor:OO(e.getAttribute("data-anchor"))};return[{tag:"img[data-wiki-embed]",getAttrs:e,priority:100},{tag:"a[data-wiki-embed]",getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){var n;let r=String(e.attrs.target??""),i=OO(e.attrs.alias),o=OO(e.attrs.anchor),s=OO(e.attrs.resolvedSrc),a=OM(r);if(iG.has(a))return["img",{...t,"data-wiki-embed":"","data-target":r,"data-alias":i??"","data-anchor":o??"",src:s??r,alt:i??r}];let l=s??r;return["a",{...t,"data-wiki-embed":"","data-target":r,"data-alias":i??"","data-anchor":o??"",href:o?`${l}#${o}`:l,target:"_blank",rel:"noopener noreferrer"},(n={target:r,alias:i,anchor:o}).alias?n.alias:n.anchor?`${n.target}#${n.anchor}`:n.target]}}),Ow,Or,Oi,NP,Nj,Ob,OS,Ol,NL,Oa,NV,OT,N1,Nq,N2,NU,N$,Ou,Og,Om,bv.configure({trailingNode:!1,undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:"listItem",wrapperNames:["list"]}]},italic:!1,bold:!1,strike:!1,underline:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:"color-mix(in oklch, var(--primary) 50%, transparent)",width:2}}),Of,Ov.configure({resizable:!0}),m1,Ox,Ok,NW.configure({inline:!0}),NG,mt,Od,Oc,NH,NF],OD=ea.z.discriminatedUnion("kind",[ea.z.object({key:ea.z.string(),kind:ea.z.literal("added"),after:rV}).loose(),ea.z.object({key:ea.z.string(),kind:ea.z.literal("removed"),before:rV}).loose(),ea.z.object({key:ea.z.string(),kind:ea.z.literal("changed"),before:rV,after:rV}).loose()]),OR=ea.z.object({changes:ea.z.array(OD),unparseable:ea.z.object({before:ea.z.string(),after:ea.z.string()}).loose().nullable()}).loose();function Oz(e,t){let n=function(e){if(0===e.length)return{ok:!1,reason:"docName must not be empty"};if(0===e.trim().length)return{ok:!1,reason:"docName must not be blank (whitespace only)"};if(e!==e.trim())return{ok:!1,reason:"docName must not have leading or trailing whitespace"};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||127===n)return{ok:!1,reason:"docName must not contain control characters"}}if(e.includes("..")||e.startsWith("/")||e.includes("\\"))return{ok:!1,reason:'docName must not contain "..", a leading "/", or a backslash'};for(let t of e.split("/")){if(0===t.length)return{ok:!1,reason:'docName must not contain empty path segments (no leading, trailing, or doubled "/")'};if(t.startsWith("."))return{ok:!1,reason:'docName path segments must not start with "." (hidden files are not addressable)'}}return{ok:!0}}(e);n.ok||t.addIssue({code:"custom",message:n.reason})}u=encodeURIComponent("This is an OpenKnowledge project: load the `open-knowledge` skill and use the OpenKnowledge MCP tools for all markdown â don't probe for `.ok/` or use native file tools on `.md` / `.mdx`. "),encodeURIComponent(u).length,new TextEncoder;let OL=ea.z.string().superRefine(Oz).optional(),OP=ea.z.string().superRefine(Oz),Oj={agentId:ea.z.string().optional(),agentName:ea.z.string().optional(),colorSeed:ea.z.string().optional(),clientName:ea.z.string().optional(),clientVersion:ea.z.string().optional(),label:ea.z.string().optional()},O$=ea.z.string().optional();ea.z.discriminatedUnion("kind",[ea.z.object({kind:ea.z.literal("doc"),docPath:ea.z.string().min(1)}).loose(),ea.z.object({kind:ea.z.literal("folder"),folderPath:ea.z.string()}).loose()]);let OF=ea.z.enum(["no-remote","detached-head","branch-not-on-origin","non-github-remote","invali
139d-path","unsupported-share-url"]),OB=ea.z.enum(["current","stale","absent","empty"]);ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),shareUrl:ea.z.string().min(1),sharedUrl:ea.z.string().min(1),branch:ea.z.string().min(1),freshness:OB.optional().catch(void 0)}).loose(),ea.z.object({ok:ea.z.literal(!1),error:OF,branch:ea.z.string().min(1).optional()}).loose()]);let OH=ea.z.enum(["user","org"]),OU=ea.z.object({login:ea.z.string().min(1),kind:OH,avatarUrl:ea.z.string().optional()}).loose(),OV=ea.z.enum(["auth-required","network"]);ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),owners:ea.z.array(OU)}).loose(),ea.z.object({ok:ea.z.literal(!1),error:OV}).loose()]),ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),available:ea.z.boolean()}).loose(),ea.z.object({ok:ea.z.literal(!1),error:OV}).loose()]);let Oq=ea.z.enum(["public","private"]);ea.z.object({owner:ea.z.string().min(1),name:ea.z.string().min(1),visibility:Oq,description:ea.z.string().optional()}).loose();let OG=ea.z.enum(["name-conflict","saml-sso","auth-required","push-failed","init-failed","network","no-project"]);function OW(e){return!("string"!=typeof e||0===e.length||e.startsWith("-")||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(":")||e.split("/").includes(".."))}ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),ownerLogin:ea.z.string().min(1),repoName:ea.z.string().min(1),cloneUrl:ea.z.string().min(1),defaultBranch:ea.z.string().min(1)}).loose(),ea.z.object({ok:ea.z.literal(!1),error:OG}).loose()]);let OK={shareTargetExists:ea.z.boolean(),dirtyConflicts:ea.z.object({conflicts:ea.z.boolean(),files:ea.z.array(ea.z.string().min(1))}).loose(),branchIsLocal:ea.z.boolean(),shareTargetOnOriginBranch:ea.z.boolean().optional()};ea.z.discriminatedUnion("detached",[ea.z.object({detached:ea.z.literal(!1),currentBranch:ea.z.string().min(1).nullable(),currentHeadSha:ea.z.null(),...OK}).loose(),ea.z.object({detached:ea.z.literal(!0),currentBranch:ea.z.null(),currentHeadSha:ea.z.string().min(1),...OK}).loose()]),ea.z.object({branch:ea.z.string().min(1).refine(OW,"invalid branch name"),principalId:ea.z.string().optional(),fastForward:ea.z.boolean().optional()}).loose();let OJ=ea.z.enum(["dirty-conflict","branch-not-found","fetch-failed","checkout-failed","branch-in-other-worktree","ff-diverged"]);ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0)}).loose(),ea.z.object({ok:ea.z.literal(!1),reason:OJ,files:ea.z.array(ea.z.string().min(1)).optional(),otherWorktreePath:ea.z.string().min(1).optional()}).loose()]),ea.z.enum(["on-origin","renamed","deleted","never-on-branch","changed-locally","unknown"]),ea.z.object({branch:ea.z.string().min(1).refine(OW,"invalid branch name"),path:ea.z.string(),kind:ea.z.enum(["doc","folder"]),contentRootDepth:ea.z.number().int().min(1).max(65535).optional()}).loose(),ea.z.discriminatedUnion("verdict",[ea.z.object({verdict:ea.z.literal("on-origin")}).loose(),ea.z.object({verdict:ea.z.literal("renamed"),renamedTo:ea.z.string().min(1)}).loose(),ea.z.object({verdict:ea.z.literal("deleted")}).loose(),ea.z.object({verdict:ea.z.literal("never-on-branch")}).loose(),ea.z.object({verdict:ea.z.literal("changed-locally")}).loose(),ea.z.object({verdict:ea.z.literal("unknown")}).loose()]).catch({verdict:"unknown"});let OY=ea.z.object({startedAt:ea.z.string().min(1),httpListenMs:ea.z.number().nonnegative().optional(),seedWalkMs:ea.z.number().nonnegative().optional(),indexesMs:ea.z.number().nonnegative().optional(),readyMs:ea.z.number().nonnegative().optional(),fileCount:ea.z.number().nonnegative().optional()});ea.z.object({serverInstanceId:ea.z.string().min(1),currentBranch:ea.z.string().min(1).optional(),currentDiskAckSVs:ea.z.record(ea.z.string().min(1),ea.z.string().min(1)).optional(),boot:OY.optional(),collabClients:ea.z.number().int().nonnegative().optional()}).loose(),ea.z.object({id:ea.z.string().min(1),display_name:ea.z.string().min(1),display_email:ea.z.string(),source:ea.z.enum(["git-config","synthesized"]),created_at:ea.z.string().min(1)}).loose(),ea.z.object({collabUrl:ea.z.string().nullable(),previewUrl:ea.z.string().nullable(),port:ea.z.number(),singleFile:ea.z.boolean().default(!1)}).loose();let OX=ea.z.enum(["urn:ok:error:malformed-upload","urn:ok:error:collision-exhaustion","urn:ok:error:storage-full","urn:ok:error:storage-readonly","urn:ok:error:storage-error","urn:ok:error:no-file-received","urn:ok:error:path-escape","urn:ok:error:symlink-refused","urn:ok:error:method-not-allowed","urn:ok:error:invalid-request","urn:ok:error:payload-too-large","urn:ok:error:request-timeout","urn:ok:error:internal-server-error","urn:ok:error:derived-index-unavailable","urn:ok:error:loopback-required","urn:ok:error:invalid-origin","urn:ok:error:url-not-allowed","urn:ok:error:dir-outside-home","urn:ok:error:concurrent-operation","urn:ok:error:clone-failed","urn:ok:error:clone-timeout","urn:ok:error:server-start-failed","urn:ok:error:reserved-doc-name","urn:ok:error:target-not-found","urn:ok:error:stale-target","urn:ok:error:frontmatter-edit-not-supported","urn:ok:error:invalid-frontmatter-patch","urn:ok:error:frontmatter-malformed","urn:ok:error:no-active-session","urn:ok:error:too-many-agent-sessions","urn:ok:error:disk-divergence","urn:ok:error:stale-external-write","urn:ok:error:store-refused","urn:ok:error:doc-removed","urn:ok:error:doc-not-found","urn:ok:error:doc-already-exists","urn:ok:error:doc-not-open","urn:ok:error:rollback-not-configured","urn:ok:error:doc-not-available","urn:ok:error:backl
139ink-index-not-configured","urn:ok:error:file-rescan-not-configured","urn:ok:error:shadow-not-configured","urn:ok:error:host-not-allowed","urn:ok:error:principal-not-available","urn:ok:error:not-found","urn:ok:error:auth-failed","urn:ok:error:no-project-dir","urn:ok:error:non-github-origin","urn:ok:error:server-open-failed","urn:ok:error:doc-in-conflict","urn:ok:error:concurrent-overwrite-refused","urn:ok:error:unresolved-conflict-markers","urn:ok:error:no-conflict-tracked","urn:ok:error:no-blocking-changes","urn:ok:error:sync-not-active","urn:ok:error:project-repo-not-configured","urn:ok:error:seed-prerequisite-missing","urn:ok:error:seed-invalid-root","urn:ok:error:tag-index-not-configured","urn:ok:error:template-not-found","urn:ok:error:unsupported-asset-type","urn:ok:error:asset-not-found","urn:ok:error:single-file-mode","urn:ok:error:collab-server-not-running","urn:ok:error:gateway-timeout","urn:ok:error:cursor-not-installed","urn:ok:error:cursor-spawn-timeout","urn:ok:error:cursor-spawn-failed","urn:ok:error:handoff-target-not-installed","urn:ok:error:handoff-spawn-timeout","urn:ok:error:handoff-spawn-failed","urn:ok:error:registry-unreachable","urn:ok:error:config-not-writable","urn:ok:error:audit-superseded","urn:ok:error:theme-name-taken","urn:ok:error:theme-name-invalid"]),OQ=ea.z.object({type:OX,title:ea.z.string().min(1),status:ea.z.number().int().min(400).max(599),instance:ea.z.string().regex(/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,"instance must be urn:uuid:<uuid>").optional(),detail:ea.z.string().optional()}).loose();ea.z.object({parentDocName:ea.z.string().min(1),placement:ea.z.enum(["configured-attachments","parent-dir"]).default("configured-attachments"),agentId:ea.z.string().min(1).optional(),agentName:ea.z.string().min(1).optional()}).loose(),ea.z.object({src:ea.z.string().min(1),path:ea.z.string().min(1).optional(),deduped:ea.z.boolean().optional()}).loose(),ea.z.object({url:ea.z.string().min(1),dir:ea.z.string().min(1),branch:ea.z.string().min(1).refine(OW,"invalid branch name").optional()}).loose(),ea.z.object({type:ea.z.literal("error"),problem:OQ}).loose();let OZ=ea.z.enum(rG),O0=ea.z.looseObject({hosts:ea.z.array(ea.z.string()),scope:OZ,scripts:ea.z.boolean(),installedAt:ea.z.iso.datetime(),projection:ea.z.enum(["symlink","copy"]).optional(),contentHash:ea.z.string().optional()});function O1(e){return(t,n)=>{let r={type:"emphasis",children:t.all(n),data:{okUnderlineForm:e}};return t.patch(n,r),r}}function O2(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>null!=e&&"object"==typeof e&&"type"in e):[],r=e.attrs.props??{},i=new Map,o=new Set;if(t)for(let e of t)!0===e.omitOnDefault&&"defaultValue"in e&&void 0!==e.defaultValue&&i.set(e.name,e.defaultValue),"string"===e.type&&!1===e.required&&void 0===e.defaultValue&&o.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>"mdxJsxAttribute"===t.type&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)||o.has(e)&&""===t){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if("mdxJsxAttribute"===e.type&&null!=e.value&&"object"==typeof e.value&&"mdxJsxAttributeValueExpression"===e.value.type&&function(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}(e.value.value,t))continue}let s=function(e,t){if(!0===t)return{type:"mdxJsxAttribute",name:e,value:null};if(!1===t)return{type:"mdxJsxAttribute",name:e,value:{type:"mdxJsxAttributeValueExpression",value:"false"}};if(null==t)return{type:"mdxJsxAttribute",name:e,value:null};if("string"==typeof t)return{type:"mdxJsxAttribute",name:e,value:t};if("number"==typeof t)return{type:"mdxJsxAttribute",name:e,value:{type:"mdxJsxAttributeValueExpression",value:JSON.stringify(t)}};if("object"==typeof t){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:"mdxJsxAttribute",name:e,value:{type:"mdxJsxAttributeValueExpression",value:n}}}return{type:"mdxJsxAttribute",name:e,value:String(t)}}(e,t);r>=0?n[r]=s:n.push(s)}return n}function O5(e,t,n,r){return{type:"mdxJsxFlowElement",name:e,attributes:O2(t,r),children:n.all(t),data:{}}}ea.z.looseObject({schema:ea.z.literal(1),skills:ea.z.record(ea.z.string(),O0).default({})}),[{name:"github-pat",regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:"[REDACTED-GH-PAT]"},{name:"aws-access-key",regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:"[REDACTED-AWS-KEY]"},{name:"anthropic-key",regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:"[REDACTED-ANTHROPIC]"},{name:"openai-key",regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:"[REDACTED-OPENAI]"},{name:"bearer-token",regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:"$1[REDACTED]"},{name:"jwt",regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:"[REDACTED-JWT]"},{name:"url-credentials",regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:"://[REDACTED]@"},{name:"github-pat-fine-grained",regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:"[REDACTED-GH-PAT]"},{name:"openai-key-modern",regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:"[REDACTED-OPENAI]"},{name:"slack-token",regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:"[REDACTED-SLACK]"},{name:"google-api-key",regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:"[REDACTED-GOOGLE]"},{name:"stripe-secret-key",regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:"[REDACTED-STRIPE]"},{name:"gitlab-pat",regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:"[REDACTED-GITLAB]"},{name:"bearer-token-json",regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:"$1[REDACTED]"},{name:"macos-home-path",regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:"~"},{name:"linux-home-path",regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:"~"},{name:"windows-home-path",regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:"~"}].map(e=>e.name),O1("u"),O1("ins");let O3=/^[A-Za-z0-9]{20,}$/,O4=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function O6(e){return null!==function(e){let t,n;if("string"!=typeof e||0===e.length)return null;try{t=new URL(e)}catch{return null}if("http:"!==t.protocol&&"https:"!==t.protocol||"loom.com"!==(n=t.hostname.toLowerCase())&&"www.loom.com"!==n)return null;let r=function(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??"";return O3.test(n)?n:null}(t);if(!r)return null;let i=t.searchParams.get("t");return{id:r,startRaw:i&&i.length>0&&O4.test(i)?i:null}}(e)}function O8(e){let t,n;if("string"!=typeof e||0===e.length)return!1;try{t=new URL(e)}catch{return!1}return("http:"===t.protocol||"https:"===t.protocol)&&("vimeo.com"===(n=t.hostname.toLowerCase())||"www.vimeo.com"===n||"player.vimeo.com"===n)}let O9=/^[A-Za-z0-9_-]{11}$/,O7=[{name:"type",type:"enum",enumValues:["note","tip","important","
139warning","caution","abstract","info","todo","success","question","failure","danger","bug","example","quote"],defaultValue:"note",required:!1,description:"Callout variant"},{name:"title",type:"string",required:!1,description:"Optional heading shown above the body"},{name:"icon",type:"string",required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:"color",type:"string",required:!1,advanced:!0,description:"Optional accent color override (hex â e.g. `#F05032`)",colorPicker:!0},{name:"collapsible",type:"boolean",required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:"defaultOpen",type:"boolean",required:!1,defaultValue:!0,advanced:!0,description:"When collapsible, start in the open state",hideWhen:e=>!0!==e.collapsible},{name:"children",type:"reactnode",required:!0,description:"Callout content"}],Me=[{name:"src",type:"string",required:!0,defaultValue:"",description:"Image source URL",accept:iq,autoFocus:!0},{name:"alt",type:"string",required:!0,description:"Alt text"},{name:"width",type:"number",required:!1,advanced:!0,description:"Image width"},{name:"height",type:"number",required:!1,advanced:!0,description:"Image height"},{name:"srcset",type:"string",required:!1,advanced:!0,description:'Responsive image candidate set (e.g. "x.png 1x, y.png 2x")'},{name:"sizes",type:"string",required:!1,advanced:!0,description:"Responsive image sizes hint paired with srcset"},{name:"loading",type:"enum",enumValues:["eager","lazy"],defaultValue:"lazy",required:!1,advanced:!0,omitOnDefault:!0,description:"Native img loading strategy (defaults to lazy)"},{name:"title",type:"string",required:!1,advanced:!0,description:"Native HTML title attribute (tooltip)"},{name:"decoding",type:"enum",enumValues:["sync","async","auto"],defaultValue:"auto",required:!1,advanced:!0,omitOnDefault:!0,description:"Hint for how the browser should decode the image"},{name:"fetchpriority",type:"enum",enumValues:["high","low","auto"],defaultValue:"auto",required:!1,advanced:!0,omitOnDefault:!0,description:"Resource fetch priority hint"},{name:"crossorigin",type:"enum",enumValues:["anonymous","use-credentials"],required:!1,advanced:!0,description:"CORS mode for the image fetch"},{name:"referrerpolicy",type:"string",required:!1,advanced:!0,description:"Referrer policy for the image fetch (HTML referrerpolicy values)"},{name:"align",type:"enum",enumValues:["center","left","right"],defaultValue:"center",required:!1,omitOnDefault:!0,description:"Alignment within the column",hidden:!0}],Mt=[{name:"src",type:"string",required:!0,defaultValue:"",description:"Embedded page URL (must start with http:// or https://)",autoFocus:!0},{name:"title",type:"string",required:!1,description:"Iframe title (accessible label for screen readers)"},{name:"width",type:"string",required:!1,advanced:!0,description:'Embed width as a CSS length (e.g. "100%", "640px")',cssLengthInput:!0},{name:"height",type:"string",required:!1,advanced:!0,description:'Embed height as a CSS length (e.g. "26rem", "480px")',cssLengthInput:!0},{name:"align",type:"enum",enumValues:["center","left","right"],defaultValue:"center",required:!1,omitOnDefault:!0,description:"Alignment within the column",hidden:!0}],Mn=[{name:"src",type:"string",required:!0,defaultValue:"",description:"Video source URL",accept:["video/mp4","video/webm","video/ogg"],autoFocus:!0},{name:"controls",type:"boolean",required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:"Show native HTML5 video controls (defaults to true)",hideWhen:e=>"string"==typeof e.src&&(O8(e.src)||O6(e.src))},{name:"autoplay",type:"boolean",required:!1,advanced:!0,description:"Begin playback as soon as possible (usually requires muted)"},{name:"poster",type:"string",required:!1,advanced:!0,description:"Poster image URL shown before playback",accept:iq,hideWhen:e=>"string"==typeof e.src&&(O8(e.src)||O6(e.src))},{name:"width",type:"number",required:!1,advanced:!0,description:"Video width"},{name:"height",type:"number",required:!1,advanced:!0,description:"Video height"},{name:"title",type:"string",required:!1,advanced:!0,description:"Native HTML title attribute (tooltip)"},{name:"muted",type:"boolean",required:!1,advanced:!0,description:"Mute audio on load"},{name:"loop",type:"boolean",required:!1,advanced:!0,description:"Restart from the beginning when playback ends",hideWhen:e=>"string"==typeof e.src&&O6(e.src)},{name:"playsinline",type:"boolean",required:!1,advanced:!0,description:"Play inline on iOS rather than entering fullscreen",hideWhen:e=>"string"==typeof e.src&&(O8(e.src)||O6(e.src))},{name:"preload",type:"enum",enumValues:["none","metadata","auto"],required:!1,advanced:!0,description:"Hint for how much of the video to preload",hideWhen:e=>"string"==typeof e.src&&(null!==function(e){let t,n;if("string"!=typeof e||0===e.length)return null;try{t=new URL(e)}catch{return null}if("http:"!==t.protocol&&"https:"!==t.protocol||"youtube.com"!==(n=t.hostname.toLowerCase())&&"www.youtube.com"!==n&&"m.youtube.com"!==n&&"music.youtube.com"!==n&&"youtu.be"!==n&&"youtube-nocookie.com"!==n&&"www.youtube-nocookie.com"!==n)return null;let r=function(e){if("youtu.be"===e.hostname.toLowerCase()){let t=e.pathname.replace(/^\//,"").split("/")[0]??"";return O9.test(t)?t:null}if("/watch"===e.pathname){let t=e.searchParams.get("v")??"";return O9.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}(t);if(!r)return null;let i=t.searchParams.get("t")??t.searchParams.get("start")??"";return{id:r,startSeconds:i.length>0?function(e){if(0===e.length)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=3600*(t[1]?Number.parseInt(t[1],10):0)+60*(t[2]?Number.parseInt(t[2],10):0)+(t[3]?Number.parseInt(t[3],10):0);return n>0?n:null}(i):null,noCookie:t.hostname.toLowerCase().endsWith("youtube-nocookie.com")}}(e.src)||O8(e.src)||O6(e.src))},{name:"align",type:"enum",enumValues:["center","left","right"],defaultValue:"center",required:!1,omitOnDefault:!0,description:"Alignment within the column",hidden:!0}],Mr=[{name:"src",type:"string",required:!0,defaultValue:"",description:"Audio source URL",accept:["audio/mpeg","audio/wav","audio/ogg"],autoFocus:!0},{name:"controls",type:"boolean",required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:"Show native HTML5 audio controls (defaults to true)"},{name:"autoplay",type:"boolean",required:!1,advanced:!0,description:"Begin playback as soon as possible (usually requires muted)"},{name:"title",type:"string",required:!1,advanced:!0,description:"Native HTML title attribute (tooltip)"},{name:"muted",type:"boolean",required:!1,advanced:!0,description:"Mute audio on load"},{name:"loop",type:"boolean",required:!1,advanced:!0,description:"Restart from the beginning when playback ends"},{name:"preload",type:"enum",enumValues:["none","metadata","auto"],required:!1,advanced:!0,description:"Hint for how much of the audio to preload"}],Mi=[{name:"title",type:"string",required:!0,description:"Heading shown inside the <summary>"},{name:"defaultOpen",type:"boolean",required:!1,defaultValue:!1,description:"When true, the block renders expanded on initial load"},{name:"icon",type:"string",required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:"description",type:"string",required:!1,advanced:!0,description:"Optional subtitle rendered below the title inside <summary>"},{name:"id",type:"string",required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:"name",type:"string",required:!1,advanced:!0,description:"HTML5 <details name=> group â siblings with the same name are mutually exclusive"}],Mo=[O7[0],O7[1],O7[4],O7[5],O7[6]],Ms=[Me[0],Me[1],Me[7]],Ma=[Mi[0],Mi[1],Mi[4],Mi[5]],Ml=[{name:"id",type:"string",required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],Mc=[{name:"label",type:"string",required:!0,autoFocus:!0,defaultValue:"Tab",description:"Tab strip label â shown in the clickable pill at the top"},{name:"id",type:"string",required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],Md=[{name:"formula",type:"string",required:!0,autoFocus:!0,language:"latex",description:"LaTeX math source (rendered with KaTeX in the browser)"},{name:"id",type:"string",required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:"language",type:"string",required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],Mu=[Md[0]],Mh=[Md[0]],Mp=[{name:"src",type:"string",required:!0,defaultValue:"",description:"File URL",accept:["*/*"],autoFocus:!0}],Mf=[{name:"src",type:"string",required:!0,defaultValue:"",description:"PDF source URL",accept:["application/pdf"],autoFocus:!0},{name:"title",type:"string",required:!1,advanced:!0,description:"Accessible label for the embedded PDF viewer"},{name:"anchor",type:"string",required:!1,advanced:!0,description:"PDF viewer parameters as a
139single URL-fragment string (e.g. `page=3&height=600`)"}],Mm=[{name:"src",type:"string",required:!0,description:"Path to the `.excalidraw` board this embed renders",autoFocus:!0},{name:"title",type:"string",required:!1,advanced:!0,description:"Accessible label for the embedded board"}],Mg=[{name:"src",type:"string",required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:"anchor",type:"string",required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],My=[{name:"id",type:"string",required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:"children",type:"reactnode",required:!0,description:"Block content this MirrorSource owns â paragraphs, callouts, code, nested JSX, anything."}];function Mb(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Mv(e){let t=e.attrs.props,n=t?.target??"",r="string"==typeof t?.alias&&t.alias.length>0?t.alias:null,i="string"==typeof t?.anchor&&t.anchor.length>0?t.anchor:null,o="string"==typeof t?.sourceTarget?t.sourceTarget:null,s="string"==typeof t?.sourceAnchor?t.sourceAnchor:null,a="string"==typeof t?.sourceAlias?t.sourceAlias:null,l=r??(i?`${n}#${i}`:n);return{type:"wikiLinkEmbed",value:l,data:{target:n,anchor:i,alias:r,sourceTarget:o,sourceAnchor:s,sourceAlias:a},children:[{type:"text",value:l}]}}let Mk=[{name:"Callout",surface:"canonical",hasChildren:!0,props:O7,icon:"MessageSquareWarning",category:"content",displayName:"Callout",description:"Alert / admonition with 15 type variants â 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)",searchTerms:["note","tip","important","warning","caution","abstract","info","todo","success","question","failure","danger","bug","example","quote","alert","admonition","callout"],serialize:(e,t)=>O5("Callout",e,t,O7)},{name:"img",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Me,icon:"Image",category:"media",displayName:"Image",description:"Image with click-to-zoom and HTML-native attributes",searchTerms:["image","zoom","picture","photo"],placeholder:{label:"Add an image"},serialize:(e,t)=>O5("img",e,t,Me)},{name:"video",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mn,icon:"SquarePlay",category:"media",displayName:"Video",description:"HTML5 video player with native controls",searchTerms:["video","media","player","mp4","webm","movie"],placeholder:{label:"Add a video"}
139,serialize:(e,t)=>O5("video",e,t,Mn)},{name:"audio",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mr,icon:"Volume2",category:"media",displayName:"Audio",description:"HTML5 audio player with native controls",searchTerms:["audio","sound","music","mp3","podcast","player"],placeholder:{label:"Add audio"},serialize:(e,t)=>O5("audio",e,t,Mr)},{name:"Pdf",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mf,icon:"FileText",category:"media",displayName:"PDF",description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:["pdf","document","embed","pdfjs"],placeholder:{label:"Add a PDF"},serialize:(e,t)=>O5("Pdf",e,t,Mf)},{name:"Excalidraw",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mm,icon:"PenTool",category:"embed",displayName:"Excalidraw",description:"Embedded snapshot of an `.excalidraw` board, linking to its canvas editor",searchTerms:["excalidraw","board","whiteboard","sketch","drawing","canvas"],serialize:(e,t)=>O5("Excalidraw",e,t,Mm)},{name:"File",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mp,icon:"Paperclip",category:"media",displayName:"File",description:"Downloadable file attachment â inline row with
139name + size + download link",searchTerms:["file","attachment","download","document","zip","docx","doc"],placeholder:{label:"Add a file"},serialize:(e,t)=>O5("File",e,t,Mp)},{name:"Embed",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mt,icon:"AppWindow",category:"embed",displayName:"Embed",description:'Inline web embed (iframe) â drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="â¦">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:["embed","iframe","website","page","inline","frame","preview"],placeholder:{label:"Embed a URL"},serialize:(e,t)=>O5("Embed",e,t,Mt)},{name:"Accordion",surface:"canonical",hasChildren:!0,props:Mi,icon:"ChevronRight",category:"content",displayName:"Accordion",description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:["accordion","expandable","details","disclosure","collapse","fold"],exampleBody:"Body content revealed when the accordion is expanded.",serialize:(e,t)=>O5("Accordion",e,t,Mi)},{name:"Toggle",surface:"canonical",hasChildren:!0,props:Mi,icon:"ChevronRight",category:"content",displayName:"Toggle",description:"Standalone expand/collapse block (Notion-style). Same render + props as `<Accordion>` â pick whichever vocabulary matches the vault.",searchTerms:["toggle","collapsible","expand","details","disclosure","fold"],exampleBody:"Body content revealed when the toggle is expanded.",serialize:(e,t)=>O5("Toggle",e,t,Mi)},{name:"Tabs",surface:"canonical",hasChildren:!0,emptyChildName:"Tab",props:Ml,icon:"LayoutPanelTop",category:"content",displayName:"Tabs",description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:["tabs","tabbed","panels","tabgroup","switcher"],exampleBody:'<Tab label="One">Body of the first tab panel.</Tab>\n <Tab label="Two">Body of the second tab panel.</Tab>',serialize:(e,t)=>O5("Tabs",e,t,Ml)},{name:"Tab",surface:"canonical",hasChildren:!0,props:Mc,icon:"PanelTop",category:"content",displayName:"Tab",description:"A single tab panel inside a `<Tabs>` container â carries the strip label and the block-content body.",searchTerms:["tab","panel"],exampleBody:"Panel content â must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>O5("Tab",e,t,Mc)},{name:"Math",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Md,icon:"Sigma",category:"content",displayName:"Math",description:"Block math equation rendered with KaTeX from a LaTeX source string",searchTerms:["math","latex","equation","formula","katex","tex"],serialize:(e,t)=>O5("Math",e,t,Md)},{name:"MermaidFence",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:[{name:"chart",type:"string",required:!0,hidden:!0,description:"Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)"}],icon:"Workflow",category:"content",displayName:"Mermaid",placeholder:{label:"Add a Mermaid diagram"},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:["mermaid","diagram","flowchart","graph","sequence","sequencediagram","class","state","er","erdiagram","gantt","pie","chart"],serialize:e=>({type:"code",lang:"mermaid",meta:null,value:e.attrs.props?.chart??""})},{name:"Mirror",surface:"canonical",hasChildren:!1,isSelfClosing:!0,props:Mg,icon:"CopyPlus",category:"content",displayName:"Mirror",description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste â edits land at the source, every Mirror reflects the change.",searchTerms:["mirror","sync","synced","transclude","embed","reference","shared block"],serialize:(e,t)=>O5("Mirror",e,t,Mg)},{name:"MirrorSource",surface:"canonical",hasChildren:!0,props:My,icon:"GitBranch",category:"content",displayName:"Mirror Source",description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="â¦" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:["mirror source","sync source","source block","master block","shared"],exampleBody:"Authoritative content lives inside this block â edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>
139O5("MirrorSource",e,t,My)},{name:"GFMCallout",surface:"compat",hasChildren:!0,props:Mo,icon:"MessageSquareWarning",category:"content",displayName:"GFM Callout",description:"GFM blockquote alert (`> [!NOTE]`) â read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:"Callout",translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set(["note","tip","important","warning","caution","abstract","info","todo","success","question","failure","danger","bug","example","quote"]),i=n?.type??"note";return{type:"blockquote",children:[{type:"html",value:`[!${(r.has(i.toLowerCase())?i:"note").toUpperCase()}]${n?.collapsible?!1===n.defaultOpen?"-":"+":""}${n?.title?` ${n.title}`:""}`},...t.all(e).filter(e=>"paragraph"!==e.type||Array.isArray(e.children)&&e.children.length>0)]}}},{name:"CommonMarkImage",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:Ms,icon:"Image",category:"media",displayName:"CommonMark Image",description:'CommonMark image (``) â read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:"img",translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:"paragraph",children:[{type:"image",url:t?.sourceUrl??t?.src??"",alt:t?.alt??"",title:t?.title??null}]}}},{name:"WikiEmbedImage",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:[{name:"alias",type:"string",required:!1,defaultValue:"",description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],icon:"ZoomIn",category:"media",displayName:"Wiki Embed Image",description:"Obsidian-style `![[file.png]]` wiki-embed â read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:"img",translateProps:e=>{let t="string"==typeof e.alias&&e.alias.length>0?e.alias:null,n="string"==typeof e.target?e.target:"";return{src:e.src,alt:t??n}},serialize:Mv},{name:"WikiEmbedVideo",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:[{name:"alias",type:"string",required:!1,defaultValue:"",description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],icon:"Film",category:"media",displayName:"Wiki Embed Video",description:"Obsidian-style `![[clip.mp4]]` wiki-embed â read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:"video",translateProps:e=>{let t="string"==typeof e.alias&&e.alias.length>0?e.alias:null,n="string"==typeof e.target?e.target:"";return{src:e.src,title:t??n}},serialize:Mv},{name:"WikiEmbedAudio",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:[{name:"alias",type:"string",required:!1,defaultValue:"",description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],icon:"Volume2",category:"media",displayName:"Wiki Embed Audio",description:"Obsidian-style `![[song.mp3]]` wiki-embed â read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:"audio",translateProps:e=>{let t="string"==typeof e.alias&&e.alias.length>0?e.alias:null,n="string"==typeof e.target?e.target:"";return{src:e.src,title:t??n}},serialize:Mv},{name:"WikiEmbedFile",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:[{name:"alias",type:"string",required:!1,defaultValue:"",description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],icon:"Paperclip",category:"media",displayName:"Wiki Embed File",description:"Obsidian-style `![[file.zip]]` wiki-embed â read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:"File",translateProps:e=>{let t="string"==typeof e.alias&&e.alias.length>0?e.alias:null,n="string"==typeof e.size&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:Mv},{name:"HtmlDetailsAccordion",surface:"compat",hasChildren:!0,props:Ma,icon:"ChevronRight",category:"content",displayName:"HTML5 Details",description:"HTML5 `<details><summary>` collapsible â read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:"Accordion",translateProps:e=>e,serialize:(e,t)=>
139{let n=e.attrs.props,r=n?.defaultOpen?" open":"",i=n?.name?` name="${Mb(n.name)}"`:"",o=n?.id?` id="${Mb(n.id)}"`:"",s=n?.title?.trim(),a=s?`<summary>${s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</summary>`:"";return{type:"mdxJsxFlowElement",name:"HtmlDetailsAccordion",attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${o}> 140${a}`,closer:"</details>"}}}}},{name:"HtmlAlignBlock",surface:"canonical",hasChildren:!0,props:[{name:"align",type:"enum",enumValues:["center","left","right","justify"],required:!1,defaultValue:"center",description:"Block alignment from the `<div align>` attribute."},{name:"tag",type:"string",required:!1,defaultValue:"div",hidden:!0,description:"Source wrapper tag (div or center)."},{name:"sourceAttrs",type:"string",required:!1,defaultValue:"",hidden:!0,description:"Raw opener-tag attribute bytes preserved for round-trip."}],icon:"AlignCenter",category:"content",displayName:"Align block",description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:["align","center","centered","div"],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag==="center"?"center":"div",i="string"==typeof n?.align&&n.align?n.align:null,o="string"==typeof n?.sourceAttrs?n.sourceAttrs:"",s=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return null!==i&&("div"===r||"center"!==i)?o=s.test(o)?o.replace(s,`$1"${Mb(i)}"`):`${o} align="${Mb(i)}"`:(null===i||"center"===r&&"center"===i)&&(o=o.replace(RegExp(`\\s*${s.source}`,"i"),"")),{type:"mdxJsxFlowElement",name:"HtmlAlignBlock",attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${o}>`,closer:`</${r}>`}}}}},{name:"DollarMath",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:Mu,icon:"Sigma",category:"content",displayName:"Dollar Math",description:"Block math via `$$â¦$$` syntax â read-only compat. Preserves `$$â¦$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:"Math",translateProps:e=>e,serialize:e=>({type:"math",value:e.attrs.props?.formula??""})},{name:"MathFence",surface:"compat",hasChildren:!1,isSelfClosing:!0,props:Mh,icon:"Sigma",category:"content",displayName:"Math Fence",description:"Block math via ` ```math ` fenced code syntax â read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:"Math",translateProps:e=>e,serialize:e=>({type:"code",lang:"math",meta:null,value:e.attrs.props?.formula??""})}],Mx={name:"*",surface:"canonical",hasChildren:!0,props:[],description:"Unregistered component â children editable as markdown",serialize:(e,t)=>O5(e.attrs.componentName||"*",e,t)},Mw={blockLevel:0,wholeDoc:0,wholeDocBudget:0};function ME(){Mw.blockLevel++}function MT(){Mw.wholeDoc++}let MS=/^(`{3,}|~{3,})/gm;function MC(e){let t=[],n=null;for(let r of e.matchAll(MS)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function MA(e,t){return t.some(([t,n])=>e>=t&&e<n)}let M_=/`+/g,MN=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function MO(e){let t=MC(e),n=[];for(let r of e.matchAll(MN))MA(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join("\n")} 141 142`:""}function MM(e){return e.calls>=1e3||("u">typeof performance&&"function"==typeof performance.now?performance.now():Date.now())-e.startMs>=500}function MI(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split("\n").slice(0,4).join("\n")}:{name:"UnknownError",message:String(e??"unknown").slice(0,500)}}function MD(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function MR(e){return{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:e}]}]}}function Mz(e){if("object"!=typeof e||null===e||!Object.hasOwn(e,"escapedChars"))return{kind:"absent"};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if("object"!=typeof e||null===e)return!1;let t=e.offset;return"number"==typeof t&&Number.isInteger(t)&&t>=0&&"string"==typeof e.char}
142)?{kind:"valid",data:{escapedChars:t}}:{kind:"malformed"}}function ML(e){return"valid"===Mz(e).kind}let MP=[["î","î
"],["î","î"],["î","î"],["î","î"],["î","î"]],Mj=/[\uE000-\uE004]/,M$=/[\uE005-\uE009]/,MF=MP.map(([e,t])=>({from:e,to:t})),MB=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,MH=/<!--[\s\S]*?-->/g,MU=/<\/([a-z][a-z0-9]*)\s*>/g,MV=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,Mq=new Set(["img","video","audio"]),MG=new Set(["mark","u","ins"]),MW=/<\/([A-Z][A-Za-z0-9.]*)>/g;function MK(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function MJ(e,t){var n,r;let i,o,s=(n=e,r=t.escapeAware,i=[],o=[],MY(n,r,{onFlush:()=>{i.push(...o),o.length=0},onBrace:(e,t)=>{"{"===t?o.push(e):o.length>0&&o.pop()}}),i.push(...o),i),a=new Set(s),l=[],c=[];return MY(e,t.escapeAware,{onFlush:()=>{c.length=0},onBrace:(e,t)=>{if(!a.has(e)){if("{"===t)c.push(e);else if(c.length>0){let t=c.pop();0===c.length&&l.push({start:t,end:e+1})}}}}),{matched:l,unmatched:s}}function MY(e,t,n){for(let r=0;r<e.length;r++){if("\n"===e[r]){let t=e[r+1];if("\n"===t||">"===t){if(n.onFlush(),"\n"===t)for(;"\n"===e[r+1];)r++;continue}}let i=e[r];if("{"===i||"}"===i){if(t){let t=0;for(let n=r-1;n>=0&&"\\"===e[n];n--)t++;if(t%2==1)continue}n.onBrace(r,i)}}}function MX(e){return Mj.test(e)||M$.test(e)}function MQ(e){let t=e.replaceAll("î","<").replaceAll("î",">").replaceAll("î",":").replaceAll("î","@").replaceAll("î","{");if(M$.test(t))for(let[e,n]of MP)t=t.replaceAll(n,e);return t}let MZ=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function M0(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>"number"!=typeof r||function(e,t){let n=0;for(let r=t-1;r>=0&&"\\"===e[r];r--)n++;return n}(e,r)%2==1?t:n(t))}let M1=RegExp("î([^î]+)î","g");function M2(e){if(!e.includes("î"))return{value:e,spans:[]};let t=[],n="",r=0;M1.lastIndex=0;let i=M1.exec(e);for(;null!==i;){i.index>r&&(n+=e.slice(r,i.index));let o=`&${i[1]??""};`;t.push({offset:n.length,length:o.length,raw:o}),n+=o,r=i.index+i[0].length,i=M1.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}let M5=/\\</g,M3=new Set(["note","tip","important","warning","caution","abstract","info","todo","success","question","failure","danger","bug","example","quote"]),M4={note:"note",tip:"tip",important:"important",warning:"warning",caution:"caution",abstract:"abstract",info:"info",todo:"todo",success:"success",question:"question",failure:"failure",danger:"danger",bug:"bug",example:"example",quote:"quote",summary:"abstract",tldr:"abstract",check:"success",done:"success",help:"question",faq:"question",fail:"failure",missing:"failure",error:"danger",cite:"quote",idea:"tip",hint:"tip",warn:"warning",attention:"warning"},M6="ok-alert",M8=RegExp(`(?:^|\\s)${M6}-(\\w+)(?:\\s|$)`),M9=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function M7(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf("\n",t),r=(-1===n?e.slice(t):e.slice(t,n)).match(M9);return r?{rawType:r[1],foldableMarker:"+"===r[2]||"-"===r[2]?r[2]:null,title:r[3]?.trim()||null}:null}function Ie(e){return M4[e.toLowerCase()]??null}let It={markers:"*",classPrefix:M6,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>'})};function In(e,t,n){return"\\"===e[t]&&t+1<e.length&&e[t+1]===n}function Ir(e,t,n,r){let i=t,o=0;for(;o<r&&i<e.length;){let t=o>0&&"\n"===n[o-1]?function(e,t,n){var r;let i=t,o=!1;for(;;){let t=i;for(;i<e.length&&(" "===e[i]||" "===e[i]);)i+=1;if(">"===e[i]){(" "===e[i+=1]||" "===e[i])&&(i+=1),o=!0;continue}i>t&&(o=!0);break}return o&&(e[r=i]===n||In(e,r,n))?i:null}(e,i,n[o]):null;null!==t&&(i=t),i+=In(e,i,n[o])?2:1,o+=1}return i}function Ii(e){return ML(e.data)?new Set(e.data.escapedChars.map(e=>e.offset)):null}function Io(e,t,n,r){var i,o;let s,a={type:"text",value:t.value.slice(n,r)},l=Il(e,t,n,r);if(l&&(a.position=l),ML(t.data)&&(s={escapedChars:(i=t.data.escapedChars,i.filter(e=>e.offset>=n&&e.offset<r).map(e=>({...e,offset:e.offset-n})))}),t.data?.entityRefSpans?.length){let e=(o=t.data.entityRefSpans,o.filter(e=>e.offset>=n&&e.offset+e.length<=r).map(e=>({...e,offset:e.offset-n})));e.length>0&&(s={...s,entityRefSpans:e})}return s&&(a.data=s),a}function Is(e,t,n){if(null===e||0===e.size)return!1;for(let r=0;r<n;r++)if(e.has(t+r))return!0;return!1}function Ia(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)"\n"===e[i]?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function Il(e,t,n,r){var i,o;if(!e||!t.position||"number"!=typeof t.position.start?.offset)return;let s=t.position.start.offset;return i=Ir(e,s,t.value,n),o=Ir(e,s,t.value,r),{start:Ia(e,i),end:Ia(e,o)}}let Ic=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,Id=/<!--([\s\S]*?)-->/g;function Iu(e,t,n){let r=e.children[0],i=e.children[e.children.length-1];if("text"!==r.type||"text"!==i.type)return!1;let o=r.value.length-r.value.trimStart().length,s=i.value.trimEnd().length-n,a=Ii(r);return!!Is(a,o,t)||Is(i===r?a:Ii(i),s,n)}function Ih(e){if(1!==e.children.length)return null;let t=e.children[0];return"text"!==t.type?null:t.value}function Ip(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);
142if(-1===i)break;n+=1,r=i+t.length}return n}function If(e){var t,n;let r=Ih(e);return null!==r&&"%%"===r.trim()&&(t=e.children[0],n=r.indexOf("%%"),!Is(Ii(t),n,2))}let Im=new Set(["paragraph","heading","tableCell"]),Ig=[{sourceForm:"html",open:"<!--",close:"-->"},{sourceForm:"percent",open:"%%",close:"%%"}];function Iy(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if("text"!==i.type)continue;let o=0;for(;;){let e=i.value.indexOf(t,o);if(-1===e)break;n.push({index:r,offset:e}),o=e+t.length}}return n}function Ib(e){if(null==e)return!1;if("comment"===e.type)return!0;let t=e.children;return Array.isArray(t)&&t.some(Ib)}let Iv=/^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm,Ik=/^[ ]{0,3}([-*+]|\d{1,9}[.)])([ \t]|$)/;function Ix(e){if(!e.includes("</"))return e;let t=MC(e),n=!1,r=e.replace(Iv,(r,i,o,s,a)=>MA(a,t)||!function(e,t){if(0===t)return!1;let n=t-1;for(;n>=0;){let r=n;for(;r>0&&"\n"!==e[r-1];)r--;let i=e.slice(r,n===t-1?n:n+1);if(0===i.trim().length){n=r-2;continue}return Ik.test(i)}return!1}(e,a)?r:(n=!0,`${o}${s}`));return n?r:e}let Iw=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,IE=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,IT=/^\s*<\/details>\s*$/;function IS(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,o=i.exec(e);for(;null!==o;){let s=o[1].toLowerCase(),a=o[2]??o[3]??o[4]??null;"open"===s?t=!0:"name"===s?n=a:"id"===s&&(r=a),o=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function IC(e){let t=[];return null!==e.title&&t.push({type:"mdxJsxAttribute",name:"title",value:e.title}),e.defaultOpen&&t.push({type:"mdxJsxAttribute",name:"defaultOpen",value:null}),null!==e.name&&t.push({type:"mdxJsxAttribute",name:"name",value:e.name}
142),null!==e.id&&t.push({type:"mdxJsxAttribute",name:"id",value:e.id}),t}function IA(e){if("paragraph"!==e.type)return!1;let t=e.children;return 1===t.length&&"text"===t[0].type}function I_(e){return e.children[0].value??""}let IN=/^<(div|center)(\s[^>]*?)?\s*>$/i,IO=new Set(["center","left","right","justify"]);function IM(e){if("paragraph"!==e.type)return!1;let t=e.children;return 1===t.length&&"text"===t[0].type}function II(e){return e.children[0].value??""}let ID=" ";function IR(e){return"listItem"===e.type&&"boolean"==typeof e.checked}let Iz=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g,IL=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function IP(e){return"text"===e.type||"inlineCode"===e.type?e.value.length>0?e.value.charAt(0):null:"children"in e&&Array.isArray(e.children)&&e.children.length>0?IP(e.children[0]):null}let Ij=/^( {4}|\t)/,I$=/^\n+$/;function IF(e,t){let n=function(e,t){let n=[],r=e.children;for(let e=1;e<r.length;e++){var i;let o=r[e-1],s=r[e],a=o?.position?.end?.offset,l=o?.position?.end?.line,c=s?.position?.start?.offset;if("number"!=typeof a||"number"!=typeof c||"number"!=typeof l||c<a)continue;let d=(i=t.slice(a,c)).length<3||!I$.test(i)?0:i.length-2;if(0===d)continue;let u=[],h=[];for(let e=0;e<d;e++)u.push(l+2+e),h.push(a+2+e);n.push({beforeChildIndex:e,lines:u,offsets:h})}return n}(e,t);if(0===n.length)return;let r=[],i=0;for(let t=0;t<e.children.length;t++){let o=n[i];if(o&&o.beforeChildIndex===t){for(let e=0;e<o.lines.length;e++)r.push(function(e,t){let n={line:e,column:1,offset:t};return{type:"paragraph",children:[],position:{start:n,end:{...n}}}}(o.lines[e],o.offsets[e]));i+=1}r.push(e.children[t])}e.children=r}function IB(e){let t=e.identifier??e.label;if("string"!=typeof t)return null;let n=t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase();return n.length>0?n:null}function IH(e,t,n){let r={type:"mdxJsxFlowElement",name:e,attributes:[{type:"mdxJsxAttribute",name:"formula",value:t}],children:[]};return n&&(r.position=n),r}let IU=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,IV=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".split(""));function Iq(e){let t=[],n="";for(let r=0;r<e.length;r++){let i=e[r];if("\\"===i&&r+1<e.length&&"|"===e[r+1]){n+=`${i}|`,r++;continue}if("|"===i){t.push(n),n="";continue}n+=i}return t.push(n),t}let IG=RegExp("(^|\\s)#([a-zA-Z][\\w/-]*)","g"),IW=new Set(["root","paragraph","heading","text","emphasis","strong","blockquote","list","listItem","code","inlineCode","link","image","linkReference","imageReference","definition","html","thematicBreak","break","yaml","toml","table","tableRow","tableCell","delete","footnoteDefinition","footnoteReference","mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","wikiLink","wikiLinkEmbed","tag","math","inlineMath","mark","underline","comment","commentBlock","rawMdxFallbackMdast"]);function IK(e,t){if(!e||"object"!=typeof e)return null;if("number"==typeof e.offset)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if("number"!=typeof n||"number"!=typeof r||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf("\n",i);if(-1===e)return null;i=e+1}let o=t.indexOf("\n",i),s=-1===o?t.length:o,a=i+r-1;return a<=s?a:null}function IJ(e,t,n){for(let r=t;r<n;r++)e[r]=" "}function IY(e,t,n){let r=RegExp(`</${n}\\s*>`,"i").exec(e.slice(t));return r?.index===void 0?null:t+r.index+r[0].length}let IX=Cb(),IQ=S3(),IZ=S4();function I0(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===IX)||t.push(IX);let n=e.fromMarkdownExtensions;n.some(e=>e===IQ)||n.push(IQ);let r=e.toMarkdownExtensions;r.some(e=>e===IZ)||r.push(IZ)}let I1=Object.assign(function(e,t,n,r){var i,o;let s=e.value??"",a=e.data?.sourceDelimiter,l="string"==typeof a&&/^\$+$/.test(a)?a.length:2;for(1===l&&(i=s,o=r,0===i.length||!/^\S/.test(i)||!/\S$/.test(i)||/[$\r\n]/.test(i)||i.endsWith("\\")||/\\[!-/:-@[-`{-~]/.test(i)||/^\d/.test(o.after)||o.before.endsWith("\\"))&&(l=2);RegExp(`(^|[^$])${"\\$".repeat(l)}([^$]|$)`).test(s);)l++;let c="$".repeat(l);/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^\$|\$$/.test(s))&&(s=` ${s} `);let d=-1;for(;++d<n.unsafe.length;){let e,t=n.unsafe[d];if(!t.atBreak)continue;let r=n.compilePattern(t);for(;null!==(e=r.exec(s));){let t=e.index;10===s.codePointAt(t)&&13===s.codePointAt(t-1)&&t--,s=`${s.slice(0,t)} ${s.slice(e.index+1)}`}}return c+s+c},{peek:()=>"$"}),I2=Object.assign(function(e,t,n,r){let i=e.data?.sourceDelimiter==="~"?"~":"~~",o=n.createTracker(r),s=n.enter("strikethrough"),a=o.move(i);return a+=Ds(n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),r,i),a+=o.move(i),s(),a},{peek:()=>"~"}),I5=(()=>{for(let e of IZ.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if("function"==typeof t)return t}throw Error("mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found â the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).")})(),I3=/^[ \t]*(?:$|#{1,6}(?:[ \t]|[ \t]*$)|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function I4(e){return"rawMdxFallback"!==e.type?e:{type:"mdxJsxFlowElement",name:null,attributes:[],children:[],data:{sourceRaw:e.value??""}}}let I6={text(e,t,n,r){if("string"==typeof e.data?.sourceRaw&&Oy(e.data.sourceRaw,e.value??""))return e.data.sourceRaw;let i=Mz(e.data);if("malformed"===i.kind&&void 0!==ee.default&&ee.default.env?.OK_DEBUG_POSITION_SLICE==="1"&&console.warn("[escape-provenance] malformed escapedChars metadata: CommonMark-safe serialization applies"),"valid"===i.kind&&i.data.escapedChars.length>0){let t,o=e.value??"",s=i.data.escapedChars,a="",l=0,c=(e,i)=>{if(!e)return;let o="<"===t?e.indexOf(">"):-1;o>=0&&(a+=Dr(n,e.slice(0,o+1),{...r,before:r.before+a,after:e.slice(o+1,o+2)||i},!0),e=e.slice(o+1)),e&&(a+=Dr(n,e,{...r,before:r.before+a,after:i}))};for(let{offset:e,char:n}of s)e>l&&c(o.slice(l,e),"\\"),a+=`\\${n}`,l=e+1,t=n;return l<o.length&&c(o.slice(l),r.after),a}return Dr(n,e.value??"",r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??"*",o=n.createTracker(r),s=n.enter("emphasis"),a=o.move(i);return a+=Ds(n.containerPhrasing(e,{before:a,after:i,...o.current()}),r,i),a+=o.move(i),s(),a},strong(e,t,n,r){let i=e.data?.sourceDelimiter??"**",o=n.createTracker(r),s=n.enter("strong"),a=o.move(i);return a+=Ds(n.containerPhrasing(e,{before:a,after:i,...o.current()}),r,i),a+=o.move(i),s(),a},link(e,t,n,r){if(e.data?.sourceStyle==="autolink")return`<${e.url??""}>`;if(e.data?.sourceStyle==="gfm-autolink"){let t=e.children?.length===1?e.children[0]:null;if(t?.type==="text"&&"string"==typeof t.value)return t.value}let i=n.createTracker(r),o=n.enter("link"),s=n.enter("label"),a=i.move("[");a+=i.move(n.containerPhrasing(e,{before:a,after:"](",...i.current()})),a+=i.move("]("),s();let l=n.enter("destinationRaw"),c=String(e.url??""),d=e.data?.sourceUrlForm==="angle-bracketed",u=c.startsWith("<")&&c.endsWith(">"),h=d&&!u?`<${c}>`:Dt(c);if(a+=i.move(h),l(),e.title){let t=e.data?.sourceTitleMarker??"double";a+=i.move(De(e.title,t))}return a+=i.move(")"),o(),a},image(e,t,n,r){let i=n.createTracker(r),o=n.enter("image"),s=n.enter("label"),a=i.move("})),a+=i.move("]("),s();let l=n.enter("destinationRaw");if(a+=i.move(Dt(String(e.url??""))),l(),e.title){let t=n.enter("titleQuote");a+=i.move(' "'),a+=i.move(n.safe(e.title,{before:a,after:'"',...i.current()})),a+=i.move('"'),t()}return a+=i.move(")"),o(),a},definition(e,t,n,r){let i=e.data?.sourceLayout??"inline",o=e.data?.sourceTitleMarker??"double",s=n.enter("definition"),a=n.createTracker(r),l=n.enter("label"),c=a.move("[");c+=a.move(n.safe(n.associationId(e),{before:c,after:"]",...a.current()})),c+=a.move("]:"),l(),c+=a.move("multiline"===i?"\n ":" ");let d=String(e.url??"");if(!d||/[\0- �]/.test(d)){let e=n.enter("destinationLiteral");c+=a.move("<"),c+=a.move(n.safe(d,{before:c,after:">",...a.current()})),c+=a.move(">"),e()}else{let e=n.enter("destinationRaw");c+=a.move(Dt(d)),e()}return e.title&&(c+=a.move(De(e.title,o,"multiline"===i?"\n ":" "))),s(),c},thematicBreak:e=>e.data?.sourceRaw??"---",break(e,t,n){let r=e.data?.sourceRaw;return"string"==typeof r&&r.length>0?r:n.stack.includes("tableCell")||n.stack.includes("okAtxHeading")?"<br />":e.data?.sourceStyle==="backslash"?"\\\n":" \n"},code(e,t){let n=e.value??"";if(e.data?.sourceStyle==="indented"){let t=n.split("\n"),r=e.data.sourceIndents;return Array.isArray(r)&&r.length===t.length?t.map((e,t)=>`${r[t]??(e.length>0?" ":"")}${e}`).join("\n"):t.map(e=>e.length>0?` ${e}`:e).join("\n")}let r=e.data?.sourceFenceChar==="~"?"~":"`",i=function(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split("\n")){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}(r,n,e.data?.sourceFenceLength??3),o=e.data?.sourceClosingFenceLength,s="number"==typeof o&&o>i?o:i,a=e.data?.sourceFenceIndent,l="number"==typeof a&&a>=1&&a<=3?" ".repeat(a):"",c=e.data?.sourceInfoPadding,d=r.repeat(i),u=e.lang??"",h=u&&"number"==typeof c&&c>=1?" ".repeat(c):"",p=e.meta?` ${e.meta}`:"";if(e.data?.sourceUnclosedFence===!0&&t?.type==="root"&&t.children[t.children.length-1]===e){let e=`${d}${h}${u}${p}${n.length>0?` 143${n}`:""}`;return l?e.split("\n").map(e=>e.length>0?`${l}${e}`:e).join("\n"):e}let f=`${d}${h}${u}${p} 144${n} 145${r.repeat(s)}`;return l?f.split("\n").map(e=>e.length>0?`${l}${e}`:e).join("\n"):f},inlineCode(e,t,n){let r=e.value??"",i=e.data?.sourceFenceChar==="~"?"~":"`",o="number"==typeof e.data?.sourceFenceLength&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,s="`"===i?"`":"~",a=o;for(;RegExp(`(^|[^${s}])${s.repeat(a)}([^${s}]|$)`).test(r);)a+=1;let l=i.repeat(a);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let c=`${l}${r}${l}`;return n.stack.includes("tableCell")?c.replace(/\|/g,"\\|"):c},inlineMath:I1,delete:I2,heading(e,t,n,r){let i=e.data?.sourceStyle??"atx",o=e.depth;if("setext"===i&&(1===o||2===o)){let t=n.containerPhrasing(e,{...r,before:"\n",after:"\n"}),i=e.data?.sourceUnderlineLength,s="number"==typeof i&&i>=1?i:Math.max(t.length,3);return`${t} 146${(1===o?"=":"-").repeat(s)}`}let s=e.data?.sourceLeadingIndent,a="number"==typeof s&&s>=1&&s<=3?" ".repeat(s):"",l=e.data?.sourceInteriorSpacing,c="number"==typeof l&&l>=2?" ".repeat(l):" ",d="#".repeat(o),u=n.enter("okAtxHeading"),h=n.containerPhrasing(e,{...r,before:`${d} `,after:"\n"});u();let p=e.data?.sourceTrailingHashes;if("number"==typeof p&&p>0){let e="#".repeat(p);return h?`${a}${d}${c}${h} ${e}`:`${a}${d} ${e}`}return h?`${a}${d}${c}${h}`:`${a}${d}`},list(e,t,n,r){let i=n.options.bullet||"-",o=!!e.ordered,s=n.bulletCurrent,a=n.bulletLastUsed;if(!o){let t=e.data?.bulletMarker;("-"===t||"*"===t||"+"===t)&&(n.bulletCurrent=t)}let l=e.children||[],c=[],d=o?e.data?.listMarkerDelimiter??".":null,u=e.start??1;for(let t=0;t<l.length;t++){let s,a=l[t],h=a.data?.sourceOrdinal,p="number"==typeof h&&h>=0?h:u+t,f=o?`${p}${d}`:e.data?.bulletMarker??i,m=a.data?.sourceMarkerSpacing,g="number"==typeof m&&m>=2&&m<=4?m:1,y=" ".repeat(g),b=f;!0===a.checked?b+=`${y}[${a.data?.sourceCheckboxChar==="X"?"X":"x"}]`:!1===a.checked&&(b+=`${y}[ ]`);let v=a.data?.sourceContinuationIndent,k=f.length+g,x="number"==typeof v&&v>=k&&v<=k+3?v:k,w=" ".repeat(x),E=null===a.checked||void 0===a.checked?y:" ",T=a.children??[];if(T[0]?.type==="list"){let e=null!==a.checked&&void 0!==a.checked,t=n.containerFlow({...a,children:[T[0]]},r),i=T.slice(1),o=i.length?n.containerFlow({...a,children:i},r):"",l=t.split("\n").map((t,n)=>0===n?e?`${w}${t}`:`${b}${E}${t}`:t?`${w}${t}`:t).join("\n"),c=[];if(e?c.push(b,"",l):c.push(l),o){let e=o.split("\n").map(e=>e?`${w}${e}`:e).join("\n");c.push("",e)}s=c.join("\n")}else s=n.containerFlow(a,r).split("\n").map((e,t)=>0===t?`${b}${E}${e}`:e?`${w}${e}`:e).join("\n");c.push(s)}n.bulletCurrent=s,n.bulletLastUsed=a;let h=e.spread?"\n\n":"\n";return c.join(h)},table(e,t,n,r){let i=n.enter("table"),o=[],s=[],a=e.children??[];for(let e of a){let t=e.children??[],i=[],a=[];for(let e of t){let t=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:" ",after:" "});o(),t(),i.push(s);let l=e.data?.sourcePadding;a.push(l&&"number"==typeof l.left&&"number"==typeof l.right?{left:l.left,right:l.right}:null)}o.push(i),s.push(a)}i();let l=e.align??[],c=e.data?.sourceDashCounts,d=Math.max(o[0]?.length??0,o.slice(1).reduce((e,t)=>
146Math.max(e,t.length),0),l.length);if(0===d)return console.warn(JSON.stringify({event:"table-serialize-dropped-empty",rows:a.length})),"";let u=[];for(let e=0;e<d;e++){let t=l[e],n="",r="";"center"===t?(n=":",r=":"):"left"===t?n=":":"right"===t&&(r=":");let i=c?.[e],o="number"==typeof i&&i>=1?i:1;u.push(n+"-".repeat(o)+r)}let h=(e,t)=>{let n=[];for(let r=0;r<d;r++){let i=e[r]??"",o=t[r]??{left:1,right:1};n.push(" ".repeat(o.left)+i+" ".repeat(o.right))}let r=g&&!g.leading?"":"|",i=g&&!g.trailing?"":"|";return`${r}${n.join("|")}${i}`},p=e.data?.sourceAlignmentPadding,f=Array.from({length:d},(e,t)=>{let n=p?.[t];return n&&"number"==typeof n.left&&"number"==typeof n.right?n:null}),m=e.data?.sourceOuterPipes,g=m&&d>=2&&o.every(e=>{let t=(e[0]??"").trim(),n=(e[d-1]??"").trim();return(m.leading||t.length>0)&&(m.trailing||n.length>0&&!n.endsWith("\\"))})?m:null;if(0===o.length)return h(u,f);let y=[];y.push(h(o[0],s[0]??[])),y.push(h(u,f));for(let e=1;e<o.length;e++)y.push(h(o[e],s[e]??[]));return y.join("\n")},mdxJsxFlowElement(e,t,n,r){let i=e.data?.sourceRaw;if("string"==typeof i)return i;let o=e.data?.htmlBoundary;if(o&&"string"==typeof o.opener&&"string"==typeof o.closer){let t=n.containerFlow({type:"root",children:e.children??[]},r);return`${o.opener} 147 148${t} 149 150${o.closer}`}let s=e.name??"",a=I8(e.attributes??[]);return e.children&&0!==e.children.length?I5({...e,attributes:(e.attributes??[]).map(I7),children:(e.children??[]).map(I4)},t,n,r):s?a?`<${s} ${a} />`:`<${s} />`:""},mark(e,t,n,r){let i=n.createTracker(r),o=n.enter("mark"),s=i.move("==");return s+=Ds(n.containerPhrasing(e,{before:s,after:"==",...i.current()}),r,"=="),s+=i.move("=="),o(),s},underline(e,t,n,r){let i=e.data?.sourceForm==="ins"?"<ins>":"<u>",o=e.data?.sourceForm==="ins"?"</ins>":"</u>",s=n.createTracker(r),a=n.enter("underline"),l=s.move(i);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),a(),l},comment(e,t,n,r){let i=e.data?.sourceForm,o="html"===i?" -->":"%%",s=n.createTracker(r),a=n.enter("comment"),l=s.move("html"===i?"<!-- ":"%%");return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),a(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),o=n.enter("commentBlock"),s=e.children??[],a=e.data?.sourceForm,l=e.data?.sourceLayout,c=1===s.length&&s[0]?.type==="paragraph";if("html"===a&&c){let e=s[0],t=n.containerPhrasing(e,{before:"<!-- ",after:" -->",...i.current()});return o(),`<!-- ${t} -->`}if("inline"===l&&c){let e=s[0],t=n.containerPhrasing(e,{before:"%% ",after:" %%",...i.current()});return o(),`%% ${t} %%`}let d=n.containerFlow(e,i.current());return o(),`%% 151 152${d} 153 154%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if("string"==typeof t)return t;let n=e.name??"",r=I8(e.attributes??[]),i=(e.children??[]).map(e=>e&&"object"==typeof e&&"value"in e?String(e.value??""):"").join("");return i?r?`<${n} ${r}>${i}</${n}>`:`<${n}>${i}</${n}>`:r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback:e=>e.value??"",blockquote(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let s=n.containerFlow(e,o.current());i();let a=e.data?.sourceMarkerSpacings,l=0;return n.indentLines(s,(e,t,n)=>{if(n)return">";let r=l++,i=a?.[r];return"lazy"===i&&r>0&&!I3.test(e)?e:"none"===i||0===i?`>${e}`:"number"==typeof i&&i>=2&&!e.startsWith(" ")?`>${" ".repeat(i)}${e}`:`> ${e}`})}};function I8(e){let t=[];for(let n of e){if("mdxJsxExpressionAttribute"===n.type){t.push(`{${n.value}}`);continue}let e=n.name;if(null===n.value||void 0===n.value){t.push(e);continue}if("string"==typeof n.value){n.value.includes('"')?t.push(`${e}={${I9(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(" ")}function I9(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function I7(e){return"mdxJsxAttribute"===e.type&&"string"==typeof e.value&&e.value.includes('"')?{type:"mdxJsxAttribute",name:e.name,value:{type:"mdxJsxAttributeValueExpression",value:I9(e.value)}}:e}function De(e,t,n=" "){return"single"===t?`${n}'${e.replace(/'/g,"\\'")}'`:"paren"===t?`${n}(${e.replace(/[()]/g,"\\$&")})`:`${n}"${e.replace(/"/g,'\\"')}"`}function Dt(e){if(!e)return"";let t=0,n=!0;for(let r of e)"("===r?t++:")"===r&&--t<0&&(n=!1);return(0!==t&&(n=!1),n)?e:e.replace(/[\\()]/g,"\\$&")}let Dn=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Dr(e,t,n,r=!1){let{matched:i}=MJ(t,{escapeAware:!1});if(0===i.length)return Di(e,t,n,r);let o="",s=0,a=i=>{i>s&&(o+=Di(e,t.slice(s,i),{...n,before:n.before+o,after:t.slice(i,i+1)||n.after},r)),s=i};for(let e of i){var l;a(e.start),l=n.before+o,/[\r\n][\t ]*$/.test(l)||(o+=t.slice(e.start,e.end),s=e.end)}return a(t.length),o}function Di(e,t,n,r=!1){let i,o=e.unsafe;e.unsafe=o.filter(e=>!("&"===e.character&&"[#A-Za-z]"===e.after||"<"===e.character||"["===e.character||"("===e.character||"!"===e.character&&"\\["===e.after&&"phrasing"===e.inConstruct||"@"===e.character&&"[+\\-.\\w]"===e.before||r&&":"===e.character&&"[ps]"===e.before&&"\\/"===e.after||"{"===e.character&&Array.isArray(e.inConstruct)&&e.inConstruct.includes("phrasing"))&&"`"!==e.character&&("*"!==e.character&&"_"!==e.character&&"~"!==e.character||"phrasing"!==e.inConstruct)&&("="!==e.character||!0!==e.atBreak)&&(" "!==e.character||"phrasing"!==e.inConstruct||"[\\r\\n]"!==e.after)&&(" "!==e.character||"phrasing"!==e.inConstruct||"[\\r\\n]"!==e.after)&&!0),e.unsafe=e.unsafe.map(e=>{if(")"!==e.character||!0!==e.atBreak||"\\d+"!==e.before||void 0!==e.after)return e;let t={...e,after:"(?:[ \r\n]|$)"};return delete t._compiled,t});try{i=e.safe(t.replace(Dn,e=>NM(e)?"î"+e.slice(1):e),n)}finally{e.unsafe=o}return(function(e,t){let n="",r=0;for(;r<e.length;){let i=e.charAt(r);if("\\"===i){n+=e.slice(r,r+2),r+=2;continue}if("*"===i||"_"===i||"~"===i||"="===i){let o=r+1;for(;o<e.length&&e.charAt(o)===i;)o++;let s=0===r?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);"="===i?n+=(Number.isNaN(s)||10===s||13===s)&&function(e,t,n){let r=t;for(;r<e.length&&(" "===e[r]||" "===e[r]);)r++;if(r<e.length)return"\n"===e[r]||"\r"===e[r];let i=n.after.charCodeAt(0);return Number.isNaN(i)||10===i||13===i}(e,o,t)?`\\${e.slice(r,o)}`:e.slice(r,o):n+=!function(e,t,n){let r=Do(t),i=Do(n),o="ws"!==i&&("other"===i||"other"!==r),s="ws"!==r&&("other"===r||"other"!==i);return"_"===e?o&&(!s||"punct"===r)||s&&(!o||"punct"===i):o||s}(i,s,o<e.length?e.charCodeAt(o):t.after.charCodeAt(0))?e.slice(r,o):`\\${i}`.repeat(o-r),r=o;continue}n+=i,r+=1}return n})(i=i.replaceAll("î","\\&"),n).replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>!function(e){if(35!==e.charCodeAt(0))return!1;let t="x"===e[1]||"X"===e[1]?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return 9===t||10===t||11===t||12===t||13===t||32===t||160===t}(t)?`\\${e}`:e)}function Do(e){if(Number.isNaN(e))return"ws";let t=wT(e);return 1===t?"ws":2===t?"punct":"other"}function Ds(e,t,n){let r=n.startsWith("_")?"_":"*",i=t.before??"",o=t.after??"",s=e,a=s.charCodeAt(0);Da(i.charCodeAt(i.length-1),a,r)&&(s=Dl(a)+s.slice(1));let l=s.charCodeAt(s.length-1);
154return Da(o.charCodeAt(0),l,r)&&(s=s.slice(0,-1)+Dl(l)),s}function Da(e,t,n){return 1===wT(t)&&("_"!==n||void 0!==wT(e))}function Dl(e){return`&#x${e.toString(16).toUpperCase()};`}let Dc=[{mode:"protecting",protect:function(e){return M0(e,M5,e=>`î${e.slice(1)}`)},reservations:[{from:"\\",to:"î"}]},{mode:"protecting",protect:function(e){let t=e;if(Mj.test(t))for(let[e,n]of MP)t=t.replaceAll(e,n);t=(t=t.replace(MH,e=>e.replace(/</g,"î").replace(/>/g,"î"))).replace(MB,(e,t)=>{let n=t.replaceAll(":","î").replaceAll("@","î");return`î${n}î`});let n=new Map,r=[...MC(t),...function(e){let t=[];for(let n of(M_.lastIndex=0,e.matchAll(M_)))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let o=t[i];if(o.length===r.length){n.push([r.offset,o.offset+o.length]),e=i;break}}}return n}(t)],i=function(e){let t=new Map,n=RegExp(MW.source,"g"),r=n.exec(e);for(;null!==r;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}(t=(t=(t=t.replace(MU,(e,i,o)=>{if(MG.has(i)){let s=n.get(i)??0;if(s<function(e,t,n,r){let i=0,o=0,s=`<${t}`;for(;o<n;){let t=e.indexOf(s,o);if(-1===t||t>=n)break;o=t+s.length;let a=e[t+s.length];if(void 0!==a&&">"!==a&&"/"!==a&&!/\s/.test(a)||MA(t,r))continue;let l=e.indexOf(">",t);(-1===l||"/"!==e[l-1])&&i++}return i}(t,i,o,r))return n.set(i,s+1),e}return e.replace(/</g,"î").replace(/>/g,"î")})).replace(MV,(e,t)=>Mq.has(t)&&e.endsWith("/>")||MG.has(t)?e:t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,"î").replace(/>/g,"î"):e)).replace(/<>/g,"îî")),o=function(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;null!==r;)t.push(r.index),r=n.exec(e);return t}(t),s=function(e){let t=[],n=e.indexOf(">");for(;-1!==n;)t.push(n),n=e.indexOf(">",n+1);return t}(t),a=function(e){let t=[];for(let n of e.matchAll(/<\/?([A-Z][A-Za-z0-9.]*)/g)){let r=n.index;if(t.length>0){let[e,n]=t[t.length-1];if(r>e&&r<=n)continue}let i=r+n[0].length,o=!1,s=!1,a=!1,l=0,c=-1;for(;i<e.length;){let t=e[i];if(o)"'"===t?o=!1:"\\"===t&&i+1<e.length&&i++;else if(s)'"'===t?s=!1:"\\"===t&&i+1<e.length&&i++;else if(a)"`"===t?a=!1:"\\"===t&&i+1<e.length&&i++;else if("'"===t)o=!0;else if('"'===t)s=!0;else if("`"===t)a=!0;else if("{"===t)l++;else if("}"===t&&l>0)l--;else if(0===l&&">"===t){c=i;break}i++}if(-1!==c){if(e.slice(r,c).includes("\n\n"))continue;t.push([r,c])}}return t}(t);t=t.replace(/</g,(e,n)=>{if(function(e,t){if("("!==t[e-1]||"]"!==t[e-2])return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&"\\"===t[e];e--)r++;if(r%2==1)return!1;let i=!1,o=Math.max(0,n-1024);for(let e=n-1;e>=o;e--){let n=t[e];if("\n"===n||"\r"===n||"`"===n)return!1;if("["!==n&&"]"!==n)continue;let r=0;for(let n=e-1;n>=0&&"\\"===t[n];n--)r++;if(r%2!=1){if("]"===n||"^"===t[e+1]||"]"===t[e-1])return!1;i=!0;break}}if(!i)return!1;let s=!1,a=-1,l=Math.min(t.length,e+1+1024);for(let n=e+1;n<l;n++){let e=t[n];if(">"===e){a=n;break}if("<"===e||"\\"===e||"\n"===e||"\r"===e||"î"===e||"î"===e||"î"===e||"î"===e||"î"===e)return!1;(" "===e||" "===e)&&(s=!0)}return -1!==a&&!!s&&")"===t[a+1]}(n,t)||function(e,t){if(0===t.length)return!1;let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>>1,[o,s]=t[i];if(e<=o)r=i-1;else{if(!(e>s))return!0;n=i+1}}return!1}(n,a))return e;let r=t.slice(n,n+256);if("/"===r[1])return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(r)?e:"î";let l=/^<([a-z][a-z0-9]*)/.exec(r);if(l&&Mq.has(l[1])&&function(e,t,n,r){let i=MK(n,e);if(i>=n.length)return!1;let o=n[i],s=MK(r,e);return!(o>=(s<r.length?r[s]:t.length))&&"/"===t[o-1]}(n,t,s,o))return e;let c=/^<([a-z][a-z0-9]*)([\s/>])/.exec(r);if(c&&MG.has(c[1])){let i=c[1];return r.startsWith(`<${i}/>`)||-1!==t.indexOf(`</${i}>`,n)?e:"î"}let d=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(r);if(!d)return"î";let u=d[1],h=MK(o,n),p=h<o.length?o[h]:t.length;if(function(e,t,n){let r=Math.min(t.length,n),i=!1,o=0;for(let n=e;n<r;n++){let e=t[n];if(i){'"'===e&&(i=!1),"\\"===e&&n+1<r&&n++;continue}if('"'===e){i=!0;continue}if("{"===e){o++;continue}if("}"===e&&o>0){o--;continue}if(!(o>0)&&">"===e)return n>0&&"/"===t[n-1]}return!1}(n+1+u.length,t,p))return e;let f=i.get(u);return f&&MK(f,n)<f.length?e:"î"});{let{unmatched:e}=MJ(t,{escapeAware:!0});if(e.length>0){let n=t.split("");for(let t of e)n[t]="î";t=n.join("")}}return t},reservations:MF},{mode:"protecting",protect:function(e){return M0(e,MZ,e=>{let t=e.slice(1,-1);return`î${t}î`})},reservations:[{from:"&",to:"î"},{from:";",to:"î"}]},{mode:"serializer-only",reservations:[{to:"î"}]}];function Dd(e,t){switch(t.mode){case"protecting":return t.protect(e);case"serializer-only":return e}}function Du(e){return Dc.reduce(Dd,e)}function Dh(e){return e.data?.sourceRaw}function Dp(e){return"text"===e.type?""===e.value:"mdxJsxTextElement"===e.type&&""===Dh(e)}function Df(e){return"paragraph"===e.type&&(e.children??[]).every(Dp)}function Dm(e){let t=e.children??[],n=t[0]?.children?.length??0,r=0;for(let e=1;e<t.length;e++)r=Math.max(r,t[e]?.children?.length??0);return Math.max(n,r,(e.align??[]).length)}Dc.flatMap(({reservations:e})=>e.map(({to:e})=>e));let Dg=(e,t)=>
154{if(Df(e)||"heading"===e.type&&e.data?.sourceContiguousNext===!0&&"paragraph"===t.type)return 0;let n=e.position,r=t.position;if(!n||!r)return;let i=r.start.line-n.end.line-1;return i>=1?i:void 0},Dy=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g,Db=new Set(["strong","emphasis","delete","link","mark","comment"]);function Dv(e){if(e?.type!=="text")return!1;let t=e.data?.sourceRaw;return"string"!=typeof t||0===t.length}let Dk=/[ \t]+$/,Dx=/^[ \t]*$/,Dw=new Set(["paragraph","heading","tableCell"]),DE={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:"#",inConstruct:["phrasing"],before:"\\s",after:"[a-zA-Z]"}]};function DT(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===DE)||e.toMarkdownExtensions.push(DE)}let DS=new Set(["u","ins"]),DC=/(?<!\uE102)<br[ \t]*\/?>/g,DA=new Set(["mdxJsxTextElement","mdxJsxFlowElement"]);function D_(e){return -2===e?" ":-1===e?" ":String.fromCharCode(e)}function DN(e){return e.stack[e.stack.length-1]}function DO(e){let t,n;(n=function(e,t){let{target:n,anchor:r,alias:i}=e;if(!t.separatorCrossed)return e;if(null!==r){let e=O_(r);return{target:n,anchor:e.length>0?e:null,alias:null===i?null:ON(i)}}return{target:O_(n),anchor:null,alias:null===i?null:ON(i)}}(t={target:e.data.target,anchor:e.data.anchor??null,alias:e.data.alias??null},{separatorCrossed:null!==t.alias||null!=e.data.sourceAlias})).target!==t.target&&(e.data.sourceTarget??=t.target,e.data.target=n.target),n.anchor!==t.anchor&&(e.data.sourceAnchor??=t.anchor,e.data.anchor=n.anchor),n.alias!==t.alias&&(e.data.sourceAlias??=t.alias,e.data.alias=n.alias);let{target:r,anchor:i,alias:o}=e.data,s=o||(i?`${r}#${i}`:r);e.value=s,e.children=[{type:"text",value:s}]}let DM={enter:{wikiLink:function(e){this.enter({type:"wikiLink",value:"",data:{target:"",anchor:null,alias:null},children:[]},e)},wikiLinkEmbed:function(e){this.enter({type:"wikiLinkEmbed",value:"",data:{target:"",anchor:null,alias:null},children:[]},e)}},exit:{wikiLinkTarget:function(e){let t=DN(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)},wikiLinkAnchor:function(e){let t=DN(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,null!==t.data.anchor&&n!==r&&(t.data.sourceAnchor=n)},wikiLinkAlias:function(e){let t=DN(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,n!==r&&(t.data.sourceAlias=n)},wikiLink:function(e){DO(DN(this)),this.exit(e)},wikiLinkEmbed:function(e){DO(DN(this)),this.exit(e)}}};function DI(e){return(t,n,r,i)=>{let o=t.data,s=r.stack.includes("tableCell"),a=e=>s?function(e){let t="",n=0;for(let r of e)"\\"===r?n++:("|"===r&&n%2==0&&(t+="\\"),n=0),t+=r;return t}(e):e,l=o?.target??"",c=o?.anchor,d=o?.alias,u=`${e}${a(OC(o?.sourceTarget,l,"separatorAdjacent"))}`;if(c)u+=`#${a(OC(o?.sourceAnchor,c,"separatorAdjacent"))}`;else{let e=a(OC(o?.sourceAnchor,"","separatorAdjacent"));e.length>0&&(u+=`#${e}`)}let h=d?OC(o?.sourceAlias,d,"alias"):OC(o?.sourceAlias,"","alias");if(h.length>0){let e=s&&!u.endsWith("\\")?"\\|":"|";u+=`${e}${a(h)}`}return`${u}]]`}}let DD={handlers:{wikiLink:DI("[["),wikiLinkEmbed:DI("![[")},unsafe:[{character:"[",inConstruct:["phrasing"]}]},DR={text:{91:{name:"wikiLink",tokenize:(e,t,n)=>{let r=0,i=0,o="";return function(t){return 91!==t?n(t):(e.enter("wikiLink"),e.enter("wikiLinkMarker"),e.consume(t),s)};function s(t){return 91!==t?n(t):(e.consume(t),e.exit("wikiLinkMarker"),e.enter("wikiLinkTarget"),a)}function a(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?""===o.trim()?n(t):(e.exit("wikiLinkTarget"),d(t)):35===t?""===o.trim()?n(t):(e.exit("wikiLinkTarget"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAnchor"),l):124===t?OA(o)?n(t):(e.exit("wikiLinkTarget"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAlias"),c):(e.consume(t),o+=D_(t),a)}function l(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?0===r?n(t):(e.exit("wikiLinkAnchor"),d(t)):124===t?0===r?n(t):(e.exit("wikiLinkAnchor"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAlias"),c):(e.consume(t),r++,l)}function c(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?0===i?n(t):(e.exit("wikiLinkAlias"),d(t)):(e.consume(t),i++,c)}function d(t){return 93!==t?n(t):(e.enter("wikiLinkMarker"),e.consume(t),u)}function u(r){return 93!==r?n(r):(e.consume(r),e.exit("wikiLinkMarker"),e.exit("wikiLink"),t)}}}
154,33:{name:"wikiLinkEmbed",tokenize:(e,t,n)=>{let r=0,i=0,o="";return function(t){return 33!==t?n(t):(e.enter("wikiLinkEmbed"),e.enter("wikiLinkEmbedBang"),e.consume(t),e.exit("wikiLinkEmbedBang"),s)};function s(t){return 91!==t?n(t):(e.enter("wikiLinkMarker"),e.consume(t),a)}function a(t){return 91!==t?n(t):(e.consume(t),e.exit("wikiLinkMarker"),e.enter("wikiLinkTarget"),l)}function l(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?""===o.trim()?n(t):(e.exit("wikiLinkTarget"),u(t)):35===t?""===o.trim()?n(t):(e.exit("wikiLinkTarget"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAnchor"),c):124===t?OA(o)?n(t):(e.exit("wikiLinkTarget"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAlias"),d):(e.consume(t),o+=D_(t),l)}function c(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?0===r?n(t):(e.exit("wikiLinkAnchor"),u(t)):124===t?0===r?n(t):(e.exit("wikiLinkAnchor"),e.enter("wikiLinkSeparator"),e.consume(t),e.exit("wikiLinkSeparator"),e.enter("wikiLinkAlias"),d):(e.consume(t),r++,c)}function d(t){return null===t||-5===t||-4===t||-3===t||91===t?n(t):93===t?0===i?n(t):(e.exit("wikiLinkAlias"),u(t)):(e.consume(t),i++,d)}function u(t){return 93!==t?n(t):(e.enter("wikiLinkMarker"),e.consume(t),h)}function h(r){return 93!==r?n(r):(e.consume(r),e.exit("wikiLinkMarker"),e.exit("wikiLinkEmbed"),t)}}}}};function Dz(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===DR)||e.micromarkExtensions.push(DR),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===DM)||e.fromMarkdownExtensions.push(DM),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===DD)||e.toMarkdownExtensions.push(DD)}function DL(e){return e.children.some(e=>{let t=e.type;return"yaml"!==t&&"toml"!==t})?e:{...e,children:[...e.children,{type:"paragraph",children:[]}]}}let DP=[{name:"remark-parse",plugin:SE},{name:"escape-provenance",plugin:function(){var e,t;let n;this.parser=(e=this.parser,t=this,(r,i)=>{var o;let s=t.data();s.fromMarkdownExtensions??=[];let a=s.fromMarkdownExtensions,l=(o=function(e){let{occupied:t,longestStartRun:n}=function(e){let t=new Set,n=0;for(let r of e){let e=0;for(let i of r){let r=i.codePointAt(0);void 0!==r&&(r>=57856&&r<=63743&&t.add(r),57856===r?(e+=1,n=Math.max(n,e)):e=0)}}return{occupied:t,longestStartRun:n}}([e,(Iz.lastIndex=0,e.replace(Iz,e=>{let t=e.slice(1,-1);if(t.startsWith("#")){let e="x"===t[1]||"X"===t[1];return ER(t.slice(e?2:1),e?16:10)}let n=ED(t);return!1===n?e:n}))]);for(let e=57856;e<=63743;e+=1)if(!t.has(e))return String.fromCharCode(e);
154let r=String.fromCharCode(57856),i=String.fromCharCode(57857);return r.repeat(n+1)+i}(r),{exit:{characterEscapeValue(e){let t=this.stack.pop();t.value+=o+this.sliceSerialize(e),t.position&&(t.position.end={line:e.end.line,column:e.end.column,offset:e.end.offset})}},transforms:[e=>(xT(e,e=>{if("text"===e.type){let t=[],n="",r=0;for(;;){let i=e.value.indexOf(o,r);if(-1===i)break;n+=e.value.slice(r,i);let s=e.value.slice(i+o.length,i+o.length+1);t.push({offset:n.length,char:s}),r=i+o.length}n+=e.value.slice(r),e.value=n,e.data??={},e.data.escapedChars=t;return}for(let[t,n]of Object.entries(e))"string"==typeof n&&(e[t]=n.replaceAll(o,""))}),e)]}),c=n,d=c?a.lastIndexOf(c):-1;d>=0?a.splice(d,1,l):a.push(l),n=l;try{return e(r,i)}finally{let e=a.lastIndexOf(l);e>=0&&(c&&d>=0?a.splice(e,1,c):a.splice(e,1)),n=c}})}},{name:"remark-mdx-agnostic",plugin:I0},{name:"remark-gfm",plugin:ES},{name:"remark-math",plugin:TD,options:{singleDollarTextMath:!1}},{name:"remark-wiki-link",plugin:Dz},{name:"remark-github-alerts",plugin:(e={})=>{let{markers:t=["TIP","NOTE","IMPORTANT","WARNING","CAUTION"],icons:n=TC,matchCaseSensitive:r=!1,titles:i={},classPrefix:o="markdown-alert",ignoreSquareBracket:s=!1}=e,a="*"===t?"\\w+":t.join("|"),l=new RegExp(s?`^!(${a})([^\\n\\r]*)`:`^\\[\\!(${a})\\]([^\\n\\r]*)`,r?"":"i");return e=>(xT(e,"blockquote",(e,t,r)=>{let s=e.children[0];if(!s)return;let a=s.children?.[0];if(!a||(!("value"in a)&&"children"in a&&a.children[0]&&(a=a.children[0]),"text"!==a.type))return;let c=a.value.match(l);if(!c)return;let d=c[1]?.toLowerCase(),u=c[2]?.trim()||(i[d]??d.charAt(0).toUpperCase()+d.slice(1)),h=n[d],p=`data:image/svg+xml;utf8,${h.replace("<svg",~h.indexOf("xmlns")?"<svg":'<svg xmlns="http://www.w3.org/2000/svg"').replaceAll('"',"'").replaceAll("%","%25").replaceAll("#","%23").replaceAll("{","%7B").replaceAll("}","%7D").replaceAll("<","%3C").replaceAll(">","%3E")}`;void 0!==t&&r&&(a.value=a.value.slice(c[0].length).trimStart(),e.data={hName:"div",hProperties:{class:`${o} ${o}-${d}`}},e.children=[{type:"paragraph",data:{hName:"p",hProperties:{class:`${o}-title`}},children:[{type:"span",data:{hName:"span",hProperties:{class:`octicon octicon-${d}`,style:`--oct-icon: url("${p}")`}}},{type:"text",value:u}]},...e.children])}),e)},options:It},{name:"callout-transformer",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:"";xT(e,"blockquote",(e,t,r)=>{if(void 0===r||"number"!=typeof t)return;let i=function(e){if(e.data?.hName!=="div")return null;let t=e.data?.hProperties?.class;if("string"!=typeof t)return null;let n=t.match(M8);return n?n[1].toLowerCase():null}(e);if(!i)return;let o=Ie(i),s=null,a=null;e.position?.start?.offset!==void 0&&(a=M7(n,e.position.start.offset))&&(s=a.title,o||=Ie(a.rawType));let l=o??"note",c=a&&M3.has(l)?a.foldableMarker:null,d=(()=>
154{if(e.position?.start?.offset!==void 0){let t=M7(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),u=d.toLowerCase()!==l?d:null;if(!function(e){if(!e||"object"!=typeof e||"paragraph"!==e.type)return!1;let t=e.data?.hProperties?.class;return"string"==typeof t&&t.includes(`${M6}-title`)}(e.children[0]))return;let h=function(e,t,n,r,i=null){let o=[{type:"mdxJsxAttribute",name:"type",value:t}];n&&o.push({type:"mdxJsxAttribute",name:"title",value:n}),i&&o.push({type:"mdxJsxAttribute",name:"data-authored-as",value:i}),null!==r&&(o.push({type:"mdxJsxAttribute",name:"collapsible",value:null}),"+"===r?o.push({type:"mdxJsxAttribute",name:"defaultOpen",value:null}):o.push({type:"mdxJsxAttribute",name:"defaultOpen",value:{type:"mdxJsxAttributeValueExpression",value:"false"}}));let s=e.children.slice(1),a=e.position?.start.line;return{type:"mdxJsxFlowElement",name:"GFMCallout",attributes:o,children:n&&s.length>0&&void 0!==a&&function(e,t){if(!e||"object"!=typeof e||"paragraph"!==e.type)return!1;let n=e.position?.start?.line,r=e.position?.end?.line;return n===t&&r===t}(s[0],a)?s.slice(1):s,position:e.position}}(e,l,s,c,u);r.children[t]=h})}}},{name:"restore-from-mdx",plugin:function(){return e=>{xT(e,e=>{"string"==typeof e.value&&MX(e.value)&&(e.value=MQ(e.value)),"string"==typeof e.url&&MX(e.url)&&(e.url=MQ(e.url)),"string"==typeof e.title&&MX(e.title)&&(e.title=MQ(e.title)),"string"==typeof e.alt&&MX(e.alt)&&(e.alt=MQ(e.alt)),"string"==typeof e.lang&&MX(e.lang)&&(e.lang=MQ(e.lang)),"string"==typeof e.meta&&MX(e.meta)&&(e.meta=MQ(e.meta))})}}},{name:"void-br-promoter",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:"";xT(e,e=>{if(DA.has(e.type))return xw;Array.isArray(e.children)&&function(e,t){let n=[],r=!1;for(let i of e.children){if("text"!==i.type){n.push(i);continue}let e=i.value;DC.lastIndex=0;let o=[],s=0;for(;;){let n=DC.exec(e);if(null===n)break;let a=n.index;a>s&&o.push(Io(t,i,s,a));let l={type:"break",data:{sourceStyle:"html",sourceRaw:n[0]}},c=Il(t,i,a,a+n[0].length);c&&(l.position=c),o.push(l),s=a+n[0].length,r=!0}0===o.length?n.push(i):(s<e.length&&o.push(Io(t,i,s,e.length)),n.push(...o))}r&&(e.children=n)}(e,n)})}}},{name:"restore-entity-refs",plugin:function(){return e=>{xT(e,e=>{if("string"==typeof e.value&&e.value.includes("î")){let{value:t,spans:n}=M2(e.value);e.value=t,"text"===e.type&&n.length>0&&(e.data??={},e.data.entityRefSpans=n)}for(let t of["url","title","alt","lang","meta"]){let n=e[t];"string"==typeof n&&n.includes("î")&&(e[t]=M2(n).value)}})}}},{name:"restore-backslash-escapes",plugin:function(){return e=>{xT(e,e=>{if("string"==typeof e.value&&e.value.includes("î"))if("text"===e.type){let t=e.value,n=Array(t.length+1),r=[],i="";for(let e=0;e<t.length;e+=1)n[e]=i.length,"î"===t[e]?r.push({offset:i.length,char:t[e+1]??""}):i+=t[e];n[t.length]=i.length;let o=[...(e.data?.escapedChars??[]).map(e=>({...e,offset:n[e.offset]??e.offset})),...r].map(e=>({...e})).sort((e,t)=>e.offset-t.offset||e.char.localeCompare(t.char)).filter((e,t,n)=>0===t||e.offset!==n[t-1]?.offset||e.char!==n[t-1]?.char),s=e.data?.entityRefSpans?.map(e=>{let t=n[e.offset]??e.offset,r=n[e.offset+e.length]??e.offset+e.length;return{...e,offset:t,length:r-t}});e.value=i,e.data??={},e.data.escapedChars=o,s&&(e.data.entityRefSpans=s)}else e.value=e.value.split("î").join("");for(let t of["url","title","alt"]){let n=e[t];"string"==typeof n&&n.includes("î")&&(e[t]=n.split("î").join(""))}})}}},{name:"details-accordion-promoter",plugin:function(){return e=>{xT(e,e=>{"children"in e&&Array.isArray(e.children)&&function(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(IA(e)){let r=function(e){if(!IA(e))return null;let t=I_(e).match(Iw);if(!t)return null;let{defaultOpen:n,name:r,id:i}=IS(t[1]),o=t[2].trim()||null,s=t[3].trim();return{type:"mdxJsxFlowElement",name:"HtmlDetailsAccordion",attributes:IC({title:o,defaultOpen:n,name:r,id:i}),children:s?[{type:"paragraph",children:[{type:"text",value:s}]}]:[],position:e.position}}(e);if(r){t[n]=r,n++;continue}let i=function(e,t){let n=e[t];if(!IA(n))return null;let r=I_(n);if(!r.startsWith("<details")||r.includes("</details>"))return null;let i=r.match(IE);if(!i)return null;let{defaultOpen:o,name:s,id:a}=IS(i[1]),l=i[2]?.trim()||null;
154for(let n=t+1;n<e.length;n++){let t=e[n];if(!IA(t))continue;let r=I_(t);if(IT.test(r))return{closerIdx:n,title:l,defaultOpen:o,name:s,id:a};if(r.includes("</details>"))break}return null}(t,n);if(i){let r=t[i.closerIdx],o=n+1,s=i.closerIdx,a=t.slice(o,s),l=e.position,c=r.position,d={type:"mdxJsxFlowElement",name:"HtmlDetailsAccordion",attributes:IC(i),children:a,position:l&&c?{start:l.start,end:c.end}:void 0},u=i.closerIdx-n+1;t.splice(n,u,d),n++;continue}}n++}}(e)})}}},{name:"div-align-promoter",plugin:function(){return e=>{xT(e,e=>{"children"in e&&Array.isArray(e.children)&&function(e){let t=e.children,n=0;for(;n<t.length;){let e=function(e){if(!IM(e))return null;let t=II(e).trim().match(IN);if(!t)return null;let n=t[1].toLowerCase(),r=t[2]??"";return{tag:n,align:function(e){if(!e)return null;let t=e.match(/\balign\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+))/i);if(!t)return null;let n=(t[1]??t[2]??t[3]??"").toLowerCase();return IO.has(n)?n:null}(r)??("center"===n?"center":null),sourceAttrs:r}}(t[n]);if(null!==e){let r=function(e,t,n){let r=RegExp(String.raw`^\s*</${n}>\s*$`,"i");for(let i=t+1;i<e.length;i++){let t=e[i];if(!IM(t))continue;let o=II(t);if(r.test(o))return i;let s=o.trimStart().toLowerCase();if(s.startsWith("<div")||s.startsWith("<center")||s.includes(`</${n}>`))break}return null}(t,n,e.tag);if(null!==r){let i=t[n],o=t[r],s=t.slice(n+1,r),a=i.position,l=o.position,c={type:"mdxJsxFlowElement",name:"HtmlAlignBlock",attributes:[...null!==e.align?[{type:"mdxJsxAttribute",name:"align",value:e.align}]:[],{type:"mdxJsxAttribute",name:"tag",value:e.tag},{type:"mdxJsxAttribute",name:"sourceAttrs",value:e.sourceAttrs}],children:s,position:a&&l?{start:a.start,end:l.end}:void 0};t.splice(n,r-n+1,c),n++;continue}}n++}}(e)})}}},{name:"image-promoter",plugin:function(){return e=>{xT(e,"paragraph",(e,t,n)=>{var r,i;let o,s;if(!n||null==t||1!==e.children.length)return;let a=e.children[0];if(a?.type!=="image")return;let l=(r=a,i=e,o=[{type:"mdxJsxAttribute",name:"src",value:r.url}],"string"==typeof r.alt&&o.push({type:"mdxJsxAttribute",name:"alt",value:r.alt}),r.title&&o.push({type:"mdxJsxAttribute",name:"title",value:r.title}),s={type:"mdxJsxFlowElement",name:"CommonMarkImage",attributes:o,children:[]},i.position&&(s.position=i.position),s);n.children[t]=l})}}},{name:"indented-code-promoter",plugin:function(){return(e,t)=>{let n=String(t.value??"");n&&xT(e,"paragraph",(e,t,r)=>{if(r?.type!=="root"||null==t)return;let i=r.children[t-1];if(i&&"list"===i.type)return;let o=function(e,t){let n=e.position;if(!n||"number"!=typeof n.start.offset||"number"!=typeof n.end.offset)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let o=r;for(;o>0&&"\n"!==t[o-1];)o--;if(o===r)return null;let s=t.slice(o,r);if(!Ij.test(s))return null;let a=t.slice(o,i);if(!function(e){let t=e.split("\n"),n=!1;for(let e of t)if(0!==e.length&&(n=!0,!Ij.test(e)))return!1;return n}(a))return null;let l={start:{line:n.start.line,column:1,offset:o},end:n.end};return{type:"code",lang:null,meta:null,value:a.split("\n").map(e=>0===e.length?e:e.startsWith(" ")?e.slice(4):e.startsWith(" ")?e.slice(1):e).join("\n").replace(/\n+$/,""),position:l,data:{sourceStyle:"indented"}}}(e,n);o&&(r.children[t]=o)})}}},{name:"math-promoter",plugin:function(){return e=>{xT(e,"math",(e,t,n)=>{if(!n||null==t)return;let r=IH("DollarMath","string"==typeof e.value?e.value:"",e.position);n.children[t]=r}),xT(e,"code",(e,t,n)=>{if(!n||null==t||"math"!==e.lang)return;let r=IH("MathFence","string"==typeof e.value?e.value:"",e.position);n.children[t]=r})}}},{name:"single-dollar-math-promoter",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:"";xT(e,"text",(e,t,r)=>{let i;if(void 0===r||null==t)return;let o=e.value;if(-1===o.indexOf("$"))return;let s=Ii(e);Dy.lastIndex=0;let a=[];for(;null!==(i=Dy.exec(o));){let e=i.index,t=e+i[0].length;if(Is(s,e,1)||Is(s,t-1,1)){Dy.lastIndex=e+1;continue}a.push(i)}if(0===a.length)return;let l=[],c=0;for(let t of a){let r=t.index,i=r+t[0].length;r>c&&l.push(Io(n,e,c,r));let o={type:"inlineMath",value:t[1]},s=Il(n,e,r,i);s&&(o.position=s),l.push(o),c=i}return c<o.length&&l.push(Io(n,e,c,o.length)),r.children.splice(t,1,...l),[xw,t+l.length]})}}},{name:"highlight-promoter",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:"";xT(e,"text",(e,t,r)=>{let i;if(void 0===r||null==t)return;let o=e.value;if(-1===o.indexOf("=="))return;let s=Ii(e);IL.lastIndex=0;let a=[];for(;null!==(i=IL.exec(o));){let e=i.index,t=e+i[0].length;if(Is(s,e,2)||Is(s,t-2,2)){IL.lastIndex=e+1;continue}a.push(i)}if(0===a.length)return;let l=[],c=0;for(let t of a){let r=t.index,i=r+t[0].length;r>c&&l.push(Io(n,e,c,r));let o={type:"mark",children:[Io(n,e,r+2,i-2)]},s=Il(n,e,r,i);s&&(o.position=s),l.push(o),c=i}return c<o.length&&l.push(Io(n,e,c,o.length)),r.children.splice(t,1,...l),[xw,t+l.length]}),function e(t,n){if("children"in t&&Array.isArray(t.children))for(let r of(!function(e,t){let n=e.children,r=new Map,i=e=>{let t=r.get(e);if(void 0!==t)return t;let n=Ii(e);return r.set(e,n),n},o=0;for(;o<n.length;){let e=n[o];if("text"!==e.type){o++;continue}let r=e.value,s=-1;for(let t=0;t<=r.length-2;t++){let a;if(!(61!==r.charCodeAt(t)||61!==r.charCodeAt(t+1)||t>0&&61===r.charCodeAt(t-1)||Is(i(e),t,2))){if(t+2<r.length)a=r.charAt(t+2);else{let e=n[o+1];if(!e)continue;a=IP(e)}if(!(null===a||/\s/.test(a))){s=t;break}}}if(-1===s){o++;continue}let a=-1,l=-1,c=!1;for(let t=s+3;t<=r.length-2;t++){let s;if(61!==r.charCodeAt(t)||61!==r.charCodeAt(t+1)||Is(i(e),t,2))continue;let l=r.charAt(t-1);if(!/[\s=]/.test(l)){if(t+2<r.length)s=r.charAt(t+2);else{let e=n[o+1];
154s=e?"text"===e.type?e.value[0]??null:IP(e):null}if("="!==s){a=-2;break}}}if(-2===a){o++;continue}for(let e=o+1;e<n.length;e++){let t=n[e];if("text"===t.type){for(let r=0;r<=t.value.length-2;r++){let o,s;if(!(61!==t.value.charCodeAt(r)||61!==t.value.charCodeAt(r+1)||Is(i(t),r,2)||null===(o=r>0?t.value.charAt(r-1):function e(t){if("text"===t.type||"inlineCode"===t.type)return t.value.length>0?t.value.slice(-1):null;if("children"in t&&Array.isArray(t.children)&&t.children.length>0){let n=t.children;return e(n[n.length-1])}return null}(n[e-1]))||/[\s=]/.test(o))){if(r+2<t.value.length)s=t.value.charAt(r+2);else{let t=n[e+1];s=t?"text"===t.type?t.value[0]??null:IP(t):null}if("="!==s){a=e,l=r,c=!0;break}}}if(a>=0)break}else if("strong"===t.type||"emphasis"===t.type||"delete"===t.type||"inlineCode"===t.type);else break}if(a<0){o++;continue}let d=n[a],u=r.slice(0,s),h=r.slice(s+2),p=d.value.slice(0,l),f=d.value.slice(l+2),m=[];h.length>0&&m.push(Io(t,e,s+2,r.length));for(let e=o+1;e<a;e++)m.push(n[e]);if(p.length>0&&m.push(Io(t,d,0,l)),!c){o++;continue}let g={type:"mark",children:m},y=[];u.length>0&&y.push(Io(t,e,0,s)),y.push(g),f.length>0&&y.push(Io(t,d,l+2,d.value.length)),n.splice(o,a-o+1,...y),o+=+(u.length>0)+1}}(t,n),t.children))e(r,n)}(e,n),xT(e,"mdxJsxTextElement",(e,t,n)=>{if(void 0===n||null==t||"mark"!==e.name)return;let r={type:"mark",children:e.children??[]};return n.children.splice(t,1,r),t+1})}}},{name:"underline-promoter",plugin:function(){return e=>{xT(e,"mdxJsxTextElement",(e,t,n)=>{if(void 0===n||null==t||null===e.name||!DS.has(e.name)||(e.attributes??[]).length>0)return;let r={type:"underline",children:e.children??[],data:{sourceForm:"ins"===e.name?"ins":"u"}};return e.position&&(r.position=e.position),n.children.splice(t,1,r),t+1})}}},{name:"mermaid-promoter",plugin:function(){return e=>{xT(e,"code",(e,t,n)=>{var r,i;let o;if(!n||null==t||"mermaid"!==e.lang)return;let s=(r="string"==typeof e.value?e.value:"",i=e.position,o={type:"mdxJsxFlowElement",name:"MermaidFence",attributes:[{type:"mdxJsxAttribute",name:"chart",value:r}],children:[]},i&&(o.position=i),o);n.children[t]=s})}}},{name:"comment-promoter",plugin:function(){return(e,t)=>{var n,r;let i="string"==typeof t.value?t.value:"";(function(e,t){let n=e.children,r=0;for(;r<n.length;){let e=n[r];if("paragraph"===e.type){let i=Ih(e);if(null!==i){let t,o=e.children[0],s=()=>(void 0===t&&(t=Ii(o)),t),a=function(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return null===t?null:t[1]}(i);if(null!==a&&!Is(s(),0,2)&&!Is(s(),i.length-2,2)){let e={type:"commentBlock",children:[{type:"paragraph",children:[{type:"text",value:a}]}],data:{sourceForm:"percent",sourceLayout:"block"}};n.splice(r,1,e),r+=1;continue}let l=function(e){let t=e.trim();if(!t.startsWith("<!--")||!t.endsWith("-->"))return null;let n=t.slice(4,-3);if(n.includes("-->")||n.includes("<!--"))return null;let r=n.trim();return""===r?null:r}(i);if(null!==l&&!Is(s(),i.length-i.trimStart().length,4)&&!Is(s(),i.trimEnd().length-3,3)){let e={type:"commentBlock",children:[{type:"paragraph",children:[{type:"text",value:l}]}],data:{sourceForm:"html",sourceLayout:"inline"}};n.splice(r,1,e),r+=1;continue}}let o=function(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if("text"!==n.type||"text"!==r.type)return null;let i=n.value.trimStart();if(!i.startsWith("<!--"))return null;let o=r.value.trimEnd();if(!o.endsWith("-->"))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if("text"!==n.type)continue;let r=n.value;if(0===t){if(Ip(r,"<!--")>1||Ip(r,"-->")>0)return null}else if(t===e.children.length-1){if(Ip(r,"<!--")>0||Ip(r,"-->")>1)return null}else if(r.includes("<!--")||r.includes("-->"))return null}let s=n.value.length-i.length+4;" "===n.value[s]&&(s+=1);let a=o.length-3;" "===r.value[a-1]&&(a-=1);let l=[];s<n.value.length&&l.push(Io(t,n,s,n.value.length));for(let t=1;t<e.children.length-1;t++)l.push(e.children[t]);return(a>0&&l.push(Io(t,r,0,a)),0===l.length)?null:{type:"paragraph",children:l}}(e,t);if(null!==o&&!Iu(e,4,3)){let e={type:"commentBlock",children:[o],data:{sourceForm:"html",sourceLayout:"inline"}};n.splice(r,1,e),r+=1;continue}let s=function(e,t){if(e.children.length<2)return null;let n=e.children[0],r=e.children[e.children.length-1];if("text"!==n.type||"text"!==r.type)return null;let i=n.value.trimStart();if(!i.startsWith("%%")||i.startsWith("%%%"))return null;let o=r.value.trimEnd();if(!o.endsWith("%%")||o.endsWith("%%%"))return null;let s=n.value.length-i.length+2;" "===n.value[s]&&(s+=1);let a=o.length-2;" "===r.value[a-1]&&(a-=1);let l=n.value.slice(s),c=r.value.slice(0,a);if(-1!==l.indexOf("%%")||-1!==c.indexOf("%%"))return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if("text"===n.type&&-1!==n.value.indexOf("%%"))return null}if(!(e.children.slice(1,-1).some(e=>"text"!==e.type||e.value.trim().length>0)||l.trim().length>0||c.trim().length>0))return null;let d=[];l.length>0&&d.push(Io(t,n,s,n.value.length));for(let t=1;t<e.children.length-1;t++)d.push(e.children[t]);return(c.length>0&&d.push(Io(t,r,0,a)),0===d.length)?null:{type:"paragraph",children:d}}(e,t);if(null!==s&&!Iu(e,2,2)){let e={type:"commentBlock",children:[s],data:{sourceForm:"percent",sourceLayout:"inline"}};n.splice(r,1,e),r+=1;continue}}if("paragraph"===e.type&&If(e)){let e=r+1;for(;e<n.length;){let t=n[e];if("paragraph"===t.type&&If(t))break;e+=1}if(e<n.length&&e>r+1){let t={type:"commentBlock",children:n.slice(r+1,e),data:{sourceForm:"percent",sourceLayout:"block"}};n.splice(r,e-r+1,t),r+=1;continue}}r+=1}})(e,i),xT(e,"text",(e,t,n)=>{if(void 0===n||null==t)return;let r=e.value;if(-1===r.indexOf("%%")&&-1===r.indexOf("<!--"))return;let o=function(e,t){let n,r,i=[];for(Ic.lastIndex=0;null!==(n=Ic.exec(e));){if(Is(t,n.index,2)||Is(t,n.index+n[0].length-2,2)){Ic.lastIndex=n.index+1;continue}0!==n[1].trim().length&&i.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:"percent"})}for(Id.lastIndex=0;null!==(r=Id.exec(e));){if(Is(t,r.index,4)||Is(t,r.index+r[0].length-3,3)){Id.lastIndex=r.index+1;continue}let e=r[1].trim();""!==e&&i.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:"html"})}i.sort((e,t)=>
154e.start-t.start);let o=[],s=-1;for(let e of i)e.start<s||(o.push(e),s=e.end);return o}(r,Ii(e));if(0===o.length)return;let s=[],a=0;for(let t of o){t.start>a&&s.push(Io(i,e,a,t.start));let n="html"===t.sourceForm?4:2,o=t.start+n,l="html"===t.sourceForm?o+r.slice(o,t.end-3).indexOf(t.body):o,c={type:"comment",children:[Io(i,e,l,l+t.body.length)],data:{sourceForm:t.sourceForm}},d=Il(i,e,t.start,t.end);d&&(c.position=d),s.push(c),a=t.end}return a<r.length&&s.push(Io(i,e,a,r.length)),n.children.splice(t,1,...s),[xw,t+s.length]}),n=e,(-1!==(r=i).indexOf("%%")||-1!==r.indexOf("<!--"))&&xT(n,e=>{if(!Im.has(e.type))return;let t=e.children;if(void 0!==t&&!(t.length<2)){for(let e of Ig)if(function(e,t,n){var r,i,o,s;let a,l;if("percent"===n.sourceForm){let t=Iy(e,"%%");if(2!==t.length)return!1;[a,l]=t}else{let t=Iy(e,"<!--"),n=Iy(e,"-->");if(1!==t.length||1!==n.length)return!1;a=t[0],l=n[0]}if(a.index>=l.index)return!1;let c=e[a.index],d=e[l.index];if("percent"===n.sourceForm&&("%"===c.value[a.offset-1]||"%"===c.value[a.offset+2]||"%"===d.value[l.offset-1]||"%"===d.value[l.offset+2])||function(e,t,n,r){let i=e[n.index],o=e[r.index];if(-1!==i.value.indexOf("\n",n.offset+t.open.length)||-1!==o.value.lastIndexOf("\n",r.offset))return!0;for(let t=n.index+1;t<r.index;t++)if(function e(t){return t?.type==="break"||(t?.type==="text"?-1!==(t.value??"").indexOf("\n"):Array.isArray(t?.children)&&t.children.some(e))}(e[t]))return!0;return!1}(e,n,a,l)||(r=a.offset,i=n.open.length,Is(Ii(c),r,i))||(o=l.offset,s=n.close.length,Is(Ii(d),o,s)))return!1;for(let t=a.index+1;t<l.index;t++)if(Ib(e[t]))return!1;if(0===a.offset&&Ib(e[a.index-1])||l.offset+n.close.length===d.value.length&&Ib(e[l.index+1]))return!1;let u=function(e,t,n,r,i){let o=e[n.index],s=e[r.index],a=n.offset+t.open.length,l=o.value.length,c=r.offset;if("html"===t.sourceForm){for(;a<l&&/\s/.test(o.value[a]);)a+=1;for(;c>0&&/\s/.test(s.value[c-1]);)c-=1}let d=[];a<l&&d.push(Io(i,o,a,l));for(let t=n.index+1;t<r.index;t++)d.push(e[t]);return(0<c&&d.push(Io(i,s,0,c)),0!==d.length&&d.some(e=>"text"!==e.type||e.value.trim().length>0)&&d.some(e=>"text"===e.type))?d:null}(e,n,a,l,t);if(null===u)return!1;let h=[];c.value.slice(0,a.offset).length>0&&h.push(Io(t,c,0,a.offset));let p={type:"comment",children:u,data:{sourceForm:n.sourceForm}},f=Il(t,c,a.offset,c.value.length),m=Il(t,d,0,l.offset+n.close.length);f&&m&&(p.position={start:f.start,end:m.end}),h.push(p);let g=l.offset+n.close.length;return d.value.slice(g).length>0&&h.push(Io(t,d,g,d.value.length)),e.splice(a.index,l.index-a.index+1,...h),!0}(t,r,e))return}})}}},{name:"merged-post-parse-walker",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:"",r=void 0!==ee.default&&ee.default.env?.OK_DEBUG_POSITION_SLICE==="1";xT(e,(e,t,i)=>{if(void 0!==i&&"number"==typeof t&&"string"==typeof e.type&&!IW.has(e.type)){let r,o=(r=function(e,t){if(!e)return null;let n=IK(e.start,t),r=IK(e.end,t);return null===n||null===r||r<n?null:t.slice(n,r)}(e.position,n),{type:"rawMdxFallbackMdast",originalType:e.type??"unknown",value:r??"",unresolvedPosition:null===r,position:e.position});return i.children[t]=o,xw}if("children"in e&&Array.isArray(e.children)&&e.children.some(e=>"text"===e.type)&&(!function(e,t=""){let n=[],r=!1;for(let i of e.children){if("text"!==i.type){n.push(i);continue}let e=i.value,o=Ii(i);IU.lastIndex=0;let s=[],a=0;for(;;){let n=IU.exec(e);if(null===n)break;let l=n[0],c=n[1],d=n.index;if(Is(o,d,1))continue;d>a&&s.push(Io(t,i,a,d));let u={type:"link",url:c,title:null,children:[Io(t,i,d+1,d+1+c.length)],data:{sourceStyle:"autolink"}},h=Il(t,i,d,d+l.length);h&&(u.position=h),s.push(u),a=d+l.length,r=!0}0===s.length?n.push(i):(a<e.length&&s.push(Io(t,i,a,e.length)),n.push(...s))}r&&(e.children=n)}(e,n),!function(e,t=""){let n=[],r=!1;for(let i of e.children){if("text"!==i.type){n.push(i);continue}let e=i.value,o=Ii(i);IG.lastIndex=0;let s=[],a=0;for(;;){let n=IG.exec(e);if(null===n)break;let l=n[1]??"",c=n[2]??"",d=n.index+l.length;if(Is(o,d,1))continue;d>a&&s.push(Io(t,i,a,d));let u={type:"tag",value:c},h=Il(t,i,d,d+1+c.length);h&&(u.position=h),s.push(u),a=d+1+c.length,r=!0}0===s.length?n.push(i):(a<e.length&&s.push(Io(t,i,a,e.length)),n.push(...s))}r&&(e.children=n)}(e,n)),!function(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||"number"!=typeof i.start?.offset){n&&console.warn(`[position-slice] node type=${e.type} has no position â fidelity defaults apply`);return}let o=i.start.offset,s=i.end?.offset??o;if(o<0||s>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${o} end=${s} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case"text":{let n=t.slice(o,s),r=e.value??"";if(!ML(e.data)&&n.length>r.length&&n.includes("\\")){let t=[],i=0,o=0;for(;i<n.length&&o<r.length;)"\\"===n[i]&&i+1<n.length&&IV.has(n[i+1])&&r[o]===n[i+1]?(t.push({offset:o,char:n[i+1]}),i+=2,o+=1):(i++,o++);t.length>0&&(e.data.escapedChars=t)}n.endsWith("\\")&&r.endsWith("\\")&&(e.data.sourceRaw=n);break}case"emphasis":{let n=t[o];("*"===n||"_"===n)&&(e.data.sourceDelimiter=n);break}case"strong":{let n=t.slice(o,o+2);("**"===n||"__"===n)&&(e.data.sourceDelimiter=n);break}case"heading":{let n=t[o],i=t.slice(o,s);if("#"===n){if(e.data.sourceStyle="atx",r?.type==="root"){let n=o;for(;n>0&&"\n"!==t[n-1];)n--;let r=t.slice(n,o);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceLeadingIndent=r.length)}let n=/^#+( {2,})[^ ]/.exec(i);n&&(e.data.sourceInteriorSpacing=n[1].length);let s=/^.*?[ \t](#+)[ \t]*$/.exec(i);s&&(e.data.sourceTrailingHashes=s[1].length)}else{let t=/\n(=+)[ \t]*$/.exec(i),n=/\n(-+)[ \t]*$/.exec(i),r=t??n;r?(e.data.sourceStyle="setext",e.data.sourceUnderlineLength=r[1].length):e.data.sourceStyle="atx"}break}case"blockquote":{let n=o;for(;n>0&&"\n"!==t[n-1];)n--;let r=!1;for(let e=n;e<o;e++)if(">"===t[e]){r=!0;break}let i=t.slice(o,s).split("\n"),a=[];for(let e=0;e<i.length;e++){let t=i[e];if(0===t.trim().length)continue;if(r&&e>0)break;let n=t.replace(/^ {1,3}/,"");if(">"!==n[0]){e>0&&">"!==t.trimStart()[0]&&a.push("lazy");continue}if(""!==n.slice(1).trimEnd())if(" "===n[1])a.push(1);else{let e=0;for(;" "===n[1+e];)e++;a.push(e)}}a.length>0&&(e.data.sourceMarkerSpacings=a);break}case"list":{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];
154if(e.ordered||"-"!==n&&"*"!==n&&"+"!==n){if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}else e.data.bulletMarker=n}}break}case"listItem":{let n=t.slice(o,s),r=/^(?:([-+*])|(\d{1,9})[.)])( *)/.exec(n);if(!r)break;let a=r[1]?1:(r[2]?.length??0)+1,l=r[3].length;l>=2&&l<=4&&(e.data.sourceMarkerSpacing=l),r[2]&&(e.data.sourceOrdinal=Number.parseInt(r[2],10)),null!=e.checked&&/^\[([xX])\] /.exec(n.slice(a+Math.max(l,1)))?.[1]==="X"&&(e.data.sourceCheckboxChar="X");let c=a+(l>=2&&l<=4?l:1),d=o;for(;d>0&&"\n"!==t[d-1];)d--;let u=i.start.column;for(let n of e.children??[]){if("list"!==n.type)continue;let r=n.position?.start?.offset,i=n.position?.start?.column;if("number"!=typeof r||"number"!=typeof i)continue;let o=r;for(;o>0&&"\n"!==t[o-1];)o--;if(o===d)continue;let s=i-u;s!==c&&s>=c&&s<=c+3&&/^ +$/.test(t.slice(o,r))&&(e.data.sourceContinuationIndent=s);break}break}case"delete":"~"===t[o]&&(e.data.sourceDelimiter="~"===t[o+1]?"~~":"~");break;case"code":{let n=t[o];if("`"===n||"~"===n){e.data.sourceStyle="fenced",e.data.sourceFenceChar=n;let i=0;for(;o+i<t.length&&t[o+i]===n;)i++;if(i>=3&&(e.data.sourceFenceLength=i),r?.type==="root"){let n=o;for(;n>0&&"\n"!==t[n-1];)n--;let r=t.slice(n,o);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceFenceIndent=r.length)}if(e.lang){let n=0;for(;" "===t[o+i+n];)n++;n>=1&&(e.data.sourceInfoPadding=n)}let a=t.slice(o,s),l=RegExp(`\\n[ \\t]*(\\${n}+)[ \\t]*$`).exec(a);l&&l[1].length>i&&(e.data.sourceClosingFenceLength=l[1].length),r?.type!=="root"||RegExp(`\\n {0,3}\\${n}{${i},}[ \\t]*$`).test(a)||(e.data.sourceUnclosedFence=!0)}else if(e.data.sourceStyle="indented",r?.type==="root"){let n=t.slice(o,s).split("\n"),r=(e.value??"").split("\n");if(n.length===r.length){let t=[],i=!1,o=!0;for(let e=0;e<n.length;e++){let s=n[e],a=r[e];if(!s.endsWith(a)){o=!1;break}let l=s.slice(0,s.length-a.length);if(!/^[ \t]*$/.test(l)){o=!1;break}t.push(l),l!==(a.length>0?" ":"")&&(i=!0)}o&&i&&(e.data.sourceIndents=t)}}break}case"inlineCode":{let n=t[o];if("`"===n||"~"===n){e.data.sourceFenceChar=n;let r=0;for(;o+r<t.length&&t[o+r]===n;)r++;r>=1&&(e.data.sourceFenceLength=r);let i=t.slice(o+r,s-r),a=e.value??"";i!==a&&i===` ${a} `&&(e.data.sourcePadded=!0)}break}case"inlineMath":if("$"===t[o]){let n=0;for(;o+n<t.length&&"$"===t[o+n];)n++;e.data.sourceDelimiter="$".repeat(n)}break;case"thematicBreak":case"mdxJsxFlowElement":case"mdxJsxTextElement":case"mdxFlowExpression":case"mdxTextExpression":e.data.sourceRaw=t.slice(o,s);break;case"table":{let n=t.slice(o,s),r=n.indexOf("\n");if(-1===r)break;let i=n.slice(r+1),a=i.indexOf("\n"),l=-1===a?i:i.slice(0,a),c=l.trim().replace(/^\|/,"").replace(/\|$/,"").split("|"),d=[];for(let e of c){let t=e.match(/-/g);d.push(t?t.length:0)}d.some(e=>e>0)&&(e.data.sourceDashCounts=d);{let t=l.trim(),n=Iq(t);n.length>0&&""===n[0]&&t.startsWith("|")&&n.shift(),n.length>0&&""===n[n.length-1]&&t.endsWith("|")&&n.pop();let r=n.every(e=>/^[-: ]+$/.test(e)),i=[];for(let e of n){let t=0;for(;t<e.length&&" "===e[t];)t++;let n=0;for(;n<e.length-t&&" "===e[e.length-1-n];)n++;i.push({left:t,right:n})}r&&i.length>0&&(e.data.sourceAlignmentPadding=i)}{let t=n.split("\n").filter(e=>e.trim().length>0);if(t.length>=2){let n=t.map(e=>e.trimStart().startsWith("|")),r=t.map(e=>/(^|[^\\])\|$/.test(e.trimEnd())),i=n.every(e=>e===n[0]),o=r.every(e=>e===r[0]);if(i&&o){let t=n[0],i=r[0];t&&i||(e.data.sourceOuterPipes={leading:t,trailing:i})}}}for(let n of e.children??[]){if("tableRow"!==n.type||!n.position)continue;let e=n.position.start.offset,r=n.position.end.offset;if("number"!=typeof e||"number"!=typeof r)continue;let i=t.slice(e,r),o=i.indexOf("\n");-1!==o&&(i=i.slice(0,o));let s=Iq(i);s.length>0&&""===s[0]&&i.startsWith("|")&&s.shift(),s.length>0&&""===s[s.length-1]&&i.endsWith("|")&&s.pop();let a=n.children??[],l=Math.min(a.length,s.length);for(let e=0;e<l;e++){let t=a[e];if("tableCell"!==t.type)continue;let n=s[e],r=0;for(;r<n.length&&" "===n[r];)r++;let i=0;for(;i<n.length-r&&" "===n[n.length-1-i];)i++;t.data||={},t.data.sourcePadding={left:r,right:i}}}break}case"link":case"linkReference":if("children"in e&&0===e.children.length&&(e.data.sourceRaw=t.slice(o,s)),"link"===e.type){let n=t[o];if("["===n||"<"===n||e.title){if("["===n){let n=t.slice(o,s),r=n.lastIndexOf("](");if(-1!==r){let t=r+2;for(;t<n.length&&(" "===n[t]||" "===n[t]);)t++;if("<"===n[t]&&(e.data.sourceUrlForm="angle-bracketed"),void 0!==e.title&&null!==e.title&&")"===n[n.length-1]){let t=n.length-2;for(;t>r+1&&(" "===n[t]||" "===n[t]||"\n"===n[t]);)t--;'"'===n[t]?e.data.sourceTitleMarker="double":"'"===n[t]?e.data.sourceTitleMarker="single":")"===n[t]&&(e.data.sourceTitleMarker="paren")}}}}else e.data.sourceStyle="gfm-autolink"}break;case"definition":{let n=t.slice(o,s);if(e.data.sourceLayout=n.includes("\n")?"multiline":"inline","string"==typeof e.title&&n.length>0){let t=n[n.length-1];'"'===t?e.data.sourceTitleMarker="double":"'"===t?e.data.sourceTitleMarker="single":")"===t&&(e.data.sourceTitleMarker="paren")}break}case"break":if(e.data.sourceRaw)break;t.slice(o,s).includes("\\")?e.data.sourceStyle="backslash":e.data.sourceStyle="spaces"}}(e,n,r,i),"heading"===e.type&&void 0!==i&&"number"==typeof t){let n=e.position?.end?.line,r=i.children[t+1],o=r?.position?.start?.line;r?.type==="paragraph"&&"number"==typeof n&&"number"==typeof o&&o===n+1&&(e.data??={},e.data.sourceContiguousNext=!0)}})}}},{name:"empty-task-item-unmint",plugin:function(){return e=>{xT(e,"listItem",e=>{IR(e)&&function(e){let t=e.children??[];if(1!==t.length)return!1;let n=t[0];if(n?.type!=="paragraph"||(n.children?.length??0)!==1)return!1;let r=n.children[0];if(r?.type!=="text"||r.value!==ID)return!1;let i=r.data?.entityRefSpans;if(!Array.isArray(i)||1!==i.length)return!1;let o=i[0];return o?.offset===0&&6===o.length&&o.raw===ID}(e)&&(e.children[0].children=[])})}}},{name:"link-reference-destination",plugin:function(){return e=>{let t,n=(t=new Map,xT(e,"definition",e=>{let n=IB(e);n&&!t.has(n)&&t.set(n,e)}),t);0!==n.size&&xT(e,"linkReference",e=>{let t=IB(e);if(!t)return;let r=n.get(t);r&&(e.data={...e.data,resolvedUrl:r.url,resolvedTitle:r.title??null})})}}},{name:"non-rendering-context-demote",plugin:function(){return(e,t)=>{let n="string"==typeof t.value?t.value:String(t.value??"");if(0===n.length||!n.includes("<!--")&&!/<(pre|code)[\s/>]/i.test(n))return;let r=function(e){let t,n,r,i,o,s,a=[],l=0;for(let t=0;t<e.length;t++){let n=e[t];"\n"===n?(a.push({text:e.slice(l,t),start:l}),l=t+1):"\r"===n&&(a.push({text:e.slice(l,t),start:l}),"\n"===e[t+1]&&(t+=1),l=t+1)}a.push({text:e.slice(l),start:l});let c=(t=!1,n="",r=0,i=e=>{var i;let o,s=(o=((i=e).endsWith("\r")?i.slice(0,-1):i).match(/^ {0,3}([`~])(\1{2,})(.*)$/))?{char:o[1],len:1+o[2].length,hasInfo:""!==o[3].trim()}:null;return t?(s&&s.char===n&&s.len>=r&&!s.hasInfo&&(t=!1,n="",r=0),!0):!!s&&(t=!0,n=s.char,r=s.len,!0)},o=!1,s=null,a.map(({text:e,start:t})=>{if(null===s&&!o&&i(e))return{text:" ".repeat(e.length),start:t};let n=e.split(""),r=0;for(;r<e.length;){if(o){let t=e.indexOf("-->",r),i=t<0?e.length:t+3;if(IJ(n,r,i),r=i,t<0)break;o=!1;continue}if(null!==s){let t=IY(e,r,s);if(IJ(n,r,t??e.length),null===t)break;r=t,s=null;continue}let t=e.indexOf("<!--",r),i=-1,a=null;for(let t=r;t<e.length;t++){let n=function(e,t){if("<"!==e[t])return null;let n=e.slice(t).toLowerCase();for(let r of["pre","code"]){if(!n.startsWith(`<${r}`))continue;let i=e[t+r.length+1];if(">"===i||"/"===i||" "===i||" "===i)return r}return null}(e,t);if(null!==n){i=t,a=n;break}}let l=e.indexOf("`",r),c=t<0?i:i<0?t:Math.min(t,i);if(l>=0&&(c<0||l<c)){r=function(e,t){let n=0;for(;"`"===e[t+n];)n+=1;if(0===n)return null;let r=t+n,i=r;for(;i<e.length;){if("`"!==e[i]){i+=1;continue}let t=0;for(;"`"===e[i+t];)t+=1;if(t===n)return i+n;i+=t}return r}(e,l)??l+1;continue}if(t<0&&i<0)break;if(t>=0&&(i<0||t<i)){let i=e.indexOf("-->",t+4),s=i<0?e.length:i+3;if(IJ(n,t,s),r=s,o=i<0)break;continue}let d=function(e,t){let n=null;for(let r=t;r<e.length;r++){let t=e[r];if(null!==n)t===n&&(n=null);else if('"'===t||"'"===t)n=t;else if(">"===t)return r+1}return null}(e,i);if(null===d||null===a)break;let u=IY(e,d,a),h=u??e.length;if(IJ(n,i,h),r=h,null!==(s=null===u?a:null))break}return{text:n.join(""),start:t}})),d=e.split("");for(let e of c)for(let t=0;t<e.text.length;t++)d[e.start+t]=e.text[t];return d.join("")}(n),i=e=>{for(let t=e.children.length-1;t>=0;t--){let o=e.children[t];if(!o||("children"in o&&Array.isArray(o.children)&&i(o),"link"!==o.type&&"linkReference"!==o.type))continue;let s=o.position?.start.offset,a=o.position?.end.offset;void 0!==s&&void 0!==a&&(a<=s||0===n.slice(s,a).trim().length||0!==r.
154slice(s,a).trim().length||function(e,t,n,r){let i=n.position?.start.offset,o=n.position?.end.offset;if(void 0===i||void 0===o)return;let s=r.slice(i,o),a={type:"text",value:s,data:{sourceRaw:s},position:n.position};e.children.splice(t,1,a)}(e,t,o,n))}};i(e)}}},{name:"ensure-non-empty-doc",plugin:()=>DL}];function Dj(e){return 65279===e.charCodeAt(0)?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}let D$=/^\n+$/,DF=/^\n{2,}$/;function DB(e,t,n){let r,i,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if("number"==typeof e&&e>0){let n=t.slice(0,e);D$.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if("number"==typeof n&&n<=t.length){let e=t.slice(n);DF.test(e)&&(i=e)}}if(!n&&void 0===r&&void 0===i)return;let s={...n?{bom:!0}:{},...void 0!==r?{leading:r}:{},...void 0!==i?{trailing:i}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function DH(e,t,n){let{source:r,hadBom:i}=Dj(e),o=Ix(r),s=new k0(Du(o)),a=t.parse(s);s.value=o;let l=t.runSync(a,s);n&&IF(l,o);let c=DB(l,o,i);return n&&c&&Nc(l,c),l}function DU(e,t){let n;if("string"!=typeof e||""===e||!t||e.startsWith("/")||!function(e){let t=e.trim();if(""===t)return!0;let n=t.indexOf(":");if(-1===n)return!0;let r=t.indexOf("/"),i=t.indexOf("?"),o=t.indexOf("#");return n>Math.min(-1===r?1/0:r,-1===i?1/0:i,-1===o?1/0:o)}(e))return e;let r=function(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith("/"),i=[];for(let e of n.split("/"))if(""!==e&&"."!==e){if(".."===e){let e=i[i.length-1];i.length>0&&".."!==e?i.pop():r||i.push("..");continue}i.push(e)}let o=i.join("/");return r?`/${o}`:o}(-1===(n=t.lastIndexOf("/"))?"":0===n?"/":t.slice(0,n),e);return""===r||".."===r||r.startsWith("../")?(void 0===ee.default||!ee.default.env,e):`/${r}`}var DV=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};freshnessHolder={checker:void 0};constructor(e){this.schema=function(e){return u2(u3(e),void 0)}(e.extensions),this.handlers=function(e,t){let n=e.nodes,r=e.marks,i={};if(n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),o=i.some(e=>e?.isBlock&&!e?.isInline),s=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(o&&!s)return 1===i.length?i[0]:i;if(o&&s){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],o=n.paragraph.createAndFill(null,e.length>0?e:null);return o&&r.push(o),r.push(...t),1===r.length?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=Tc(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell){let e;e=n.tableCell,i.tableCell=(t,r,i)=>{let o=i.all(t).flat();if(o.length>0&&n.paragraph){let t=n.paragraph.create(null,o);return e.createAndFill(null,[t])}return e.createAndFill(null,null)}}n.tableRow&&(i.tableRow=Tc(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],o=e.children??[],s=[];for(let e=0;e<o.length;e++){let t=o[e];if("tableRow"!==t.type)continue;let a=t.children??[],l=[];for(let t=0;t<a.length;t++){let o=a[t];if("tableCell"!==o.type)continue;let s=r.all(o).flat(),c=s.length>0&&n.paragraph?[n.paragraph.create(null,s)]:null,d=i[t]??null,u=0===e&&n.tableHeader?n.tableHeader:n.tableCell,h=o.data?.sourcePadding??null,p=u.createAndFill({align:d,sourcePadding:h},c);p&&l.push(p)}let c=n.tableRow.createAndFill(null,l.length>0?l:null);c&&s.push(c)}let a=e.data?.sourceDashCounts??null,l=e.data?.sourceOuterPipes??null,c=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:a,sourceOuterPipes:l,sourceAlignmentPadding:c},s.length>0?s:null)}),n.image&&(i.image=e=>{let r=e.url??"",i=DU(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i!==r?r:null})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??"",label:e.label??e.identifier??"",identifier:e.identifier??"",referenceType:e.referenceType??"shortcut"}):i.imageReference=e=>n.image.createAndFill({src:"",alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??"",i="string"==typeof t.data?.sourceRaw?t.data.sourceRaw:null;if(!n&&!i)return null;if(i)return r.sourceLiteral?e.text(n,[r.sourceLiteral.create({sourceRaw:i})]):e.text(n);let o=t.data?.escapedChars,s=t.data?.entityRefSpans;if(!o?.length&&!s?.length)return e.text(n);let a=[...(o??[]).map(e=>({kind:"escape",offset:e.offset,length:1})),...(s??[]).map(e=>({kind:"entity",offset:e.offset,length:e.length,raw:e.raw}))];a.sort((e,t)=>
154e.offset-t.offset);let l=[];for(let e of a){let t=l[l.length-1];"entity"===e.kind&&t?.kind==="entity"&&t.offset+t.length===e.offset&&null!==ND(t.raw)&&NM(e.raw)?l[l.length-1]={kind:"entity",offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:l.push(e)}let c=[],d=0;for(let t of l){if(t.offset>d){let r=n.slice(d,t.offset);r&&c.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length);if(i)if("escape"===t.kind)c.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=ND(t.raw);c.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else c.push(e.text(i));d=t.offset+t.length}}if(d<n.length){let t=n.slice(d);t&&c.push(e.text(t))}return 1===c.length?c[0]:c}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:"number"==typeof t.data?.sourceFenceLength?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let o=r.strike??r.delete;if(o&&(i.delete=Td(o,e=>({sourceDelimiter:e.data?.sourceDelimiter==="~"?"~":"~~"}))),r.highlight&&(i.mark=Td(r.highlight)),r.underline&&(i.underline=Td(r.underline,e=>({sourceForm:e.data?.sourceForm==="ins"?"ins":"u"}))),r.comment&&(i.comment=Td(r.comment,e=>({sourceForm:e.data?.sourceForm??"percent"}))),n.commentBlock&&(i.commentBlock=Tc(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??"percent",sourceLayout:e.data?.sourceLayout??"block"}))),r.emphasis&&(i.emphasis=Td(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??"*"}))),r.strong&&(i.strong=Td(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??"**"}))),n.heading&&(i.heading=Tc(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??"atx",sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??"fenced",sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceUnclosedFence:t.data?.sourceUnclosedFence??!1,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??"---"})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??"spaces",sourceRaw:e.data?.sourceRaw??null})),n.list&&(i.list=Tc(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=Tc(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,o)=>{if(0===(n.children??[]).length){let r="string"==typeof n.data?.sourceRaw?n.data.sourceRaw:`[](${n.url??""})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let s=o.all(n).flat(),a=r.link.create({href:n.url??"",title:n.title??null,linkStyle:n.data?.sourceStyle??"inline",refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return s.map(e=>e.mark(a.addToSet(e.marks)))},i.linkReference=(n,i,o)=>{if(0===(n.children??[]).length){let r="string"==typeof n.data?.sourceRaw?n.data.sourceRaw:`[${n.label??""}][${n.identifier??""}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let s=o.all(n).flat(),a=r.link.create({href:n.data?.resolvedUrl??"",title:n.data?.resolvedTitle??null,linkStyle:n.referenceType??"shortcut",refLabel:n.label??n.identifier??null});return s.map(e=>e.mark(a.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??""}));let s=n.linkDefinition??n.linkRefDef;if(s){let e=!!s.spec.attrs?.url,t=!!s.spec.attrs?.href,n=!!s.spec.attrs?.identifier,r=!!s.spec.attrs?.sourceLayout,o=!!s.spec.attrs?.sourceTitleMarker;i.definition=i=>{let a={title:i.title??null};return n&&(a.identifier=i.identifier??""),a.label=i.label??i.identifier??"",e?a.url=i.url??"":t&&(a.href=i.url??""),r&&(a.sourceLayout=i.data?.sourceLayout??null),o&&(a.sourceTitleMarker=i.data?.sourceTitleMarker??null),s.createAndFill(a)}}if(n.jsxComponent){let r=e=>{if(e&&"object"==typeof e&&"sourceRaw"in e){let t=e.sourceRaw;if("string"==typeof t)return t}};i.mdxJsxFlowElement=(e,i,o)=>{let s=e.name??"",a=Dq.getOrWildcard(s),l=DG(e.attributes,a.props);if("CommonMarkImage"===s&&"string"==typeof l.src){let e=l.src,n=DU(e,t.current.sourcePath);n!==e&&(l.src=n,l.sourceUrl=e)}let c=o.all(e).flat();return n.jsxComponent.createAndFill({componentName:s,kind:"element",attributes:e.attributes,sourceRaw:r(e.data)??"",sourceDirty:!1,props:l}
154,c.length?c:void 0)};let o=(e,t)=>{let n=e.attributes?.find(e=>"mdxJsxAttribute"===e.type&&e.name===t);return n&&"string"==typeof n.value?n.value:null};i.mdxJsxTextElement=t=>{if("InlineMath"===t.name&&n.mathInline){let e=o(t,"formula")??"",r=o(t,"id");return n.mathInline.create({formula:e,id:r??null})}if("Tag"===t.name&&n.tag){let e=o(t,"value")??"";return n.tag.create({value:e})}let i=t.name??"",s=i?Dq.get(i):void 0;if(s&&n.jsxInline){let e=DG(t.attributes,s.props),o=r(t.data)??"",a=(t.children??[]).map(e=>e&&"object"==typeof e&&"value"in e?String(e.value??""):"").join("");return a&&(e.children=a),n.jsxInline.createAndFill({componentName:i,attributes:t.attributes,sourceRaw:o,sourceDirty:!1,props:e})}if(n.jsxInline){let i=r(t.data)??"";return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??""})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??""}}`;return n.jsxComponent.createAndFill({kind:"expression",sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??""}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??"",alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,o)=>{let s=i.data?.target??"",a=i.data?.alias??null,l=i.data?.anchor??null,c=i.data?.sourceTarget??null,d=i.data?.sourceAnchor??null,u=i.data?.sourceAlias??null,h=OM(s),{resolveEmbed:p,sourcePath:f}=t.current,m=p&&f?p(s,f)??null:null,g=m?`/${m}`:s,y=o?.type==="paragraph"&&Array.isArray(o.children)&&1===o.children.length;if(y&&iG.has(h)&&n.jsxComponent&&Dq.has("WikiEmbedImage"))return n.jsxComponent.createAndFill({componentName:"WikiEmbedImage",kind:"element",attributes:[],sourceRaw:"",sourceDirty:!1,props:{src:g,alt:a??s,target:s,anchor:l,alias:a,sourceTarget:c,sourceAnchor:d,sourceAlias:u}});if(y&&iW.has(h)&&n.jsxComponent&&Dq.has("WikiEmbedVideo"))return n.jsxComponent.createAndFill({componentName:"WikiEmbedVideo",kind:"element",attributes:[],sourceRaw:"",sourceDirty:!1,props:{src:g,title:a??s,target:s,anchor:l,alias:a,sourceTarget:c,sourceAnchor:d,sourceAlias:u}});if(y&&iJ.has(h)&&n.jsxComponent&&Dq.has("WikiEmbedAudio"))return n.jsxComponent.createAndFill({componentName:"WikiEmbedAudio",kind:"element",attributes:[],sourceRaw:"",sourceDirty:!1,props:{src:g,title:a??s,target:s,anchor:l,alias:a,sourceTarget:c,sourceAnchor:d,sourceAlias:u}});if(y&&iY.has(h)&&n.jsxComponent&&Dq.has("WikiEmbedFile")){let{resolveSize:e}=t.current,r=e&&f?e(s,f)??null:null,i=null!==r?function(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;let t=["KiB","MiB","GiB","TiB"],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,"")} ${t[r]}`}(r):null;return n.jsxComponent.createAndFill({componentName:"WikiEmbedFile",kind:"element",attributes:[],sourceRaw:"",sourceDirty:!1,props:{src:g,target:s,anchor:l,alias:a,size:i,sourceTarget:c,sourceAnchor:d,sourceAlias:u}})}let b=a||(l?`${s}#${l}`:s);if(r.link){let t=r.link.create({href:g,title:null,linkStyle:"inline",refLabel:null,sourceForm:"wikiembed",target:s,anchor:l,alias:a,sourceTarget:c,sourceAnchor:d,sourceAlias:u});return e.text(b,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark â cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??"",sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=null!=t.value?t.value:`\xabunknown:${t.type}\xbb`;return n.rawMdxFallback?(console.warn(JSON.stringify({event:"unknown-mdast-type",type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:"unknown-mdast-type",type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),null!=t.value)?e.text(t.value):e.text(`\xabunknown:${t.type}\xbb`),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:"unknown-mdast-type",type:"footnoteReference",reason:"FootnoteReference extension missing â recovering [^id] source"})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=Tc(n.footnoteDefinition,e=>({identifier:e.identifier,label:e.label??e.identifier})):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:"unknown-mdast-type",type:"footnoteDefinition",reason:"FootnoteDefinition extension missing â recovering [^id]: marker"}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:"unknown-mdast-type",type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}(this.schema,this.parseCtx),this.freshnessHolder.checker=e.deriveStructuralFreshness?function(e){let t=e.cacheLimit??2048,n=new Map;return{isDiverged(r){if("jsxComponent"!==r.type||!r.attrs||"expression"===r.attrs.kind)return!1;let i=r.attrs.sourceRaw;if("string"!=typeof i||0===i.length)return!1;let o=(r=>{let i=n.get(r);if(void 0!==i)return i;let o=function e(t){if("jsxComponent"===t.type)return t;if(t.content)for(let n of t.content){let t=e(n);if(t)return t}}(e.parse(r)),s=o?NS(NC(o)):null;if(n.size>=t){let e=n.keys().next().value;void 0!==e&&n.delete(e)}return n.set(r,s),s})(i);return!!o&&!function(e,t,n={}){let r=Nw(e),i=Nw(t),o=[...new Set([...r.fired,...i.fired])],s=Nd(Nk(r.normalized),Nk(i.normalized)),a=!s&&"expected"===n.rawSourceSide&&Nd(Nk(r.normalized,!0),Nk(i.normalized,!0));if(!s&&!a)return{equivalent:!1,level:"L1",reason:"content-loss",appliedDegrades:o,detail:"authored text did n
154ot survive the round-trip"};let l=Nx(r.normalized),c=Nx(i.normalized);if(Nv(l)!==Nv(c))return{equivalent:!1,level:"L1",reason:"structural-shatter",appliedDegrades:o,detail:`container multiset diverged: [${l.join(", ")}] vs [${c.join(", ")}]`};let d=Ny(r.normalized,n.ignoreAttrs),u=Ny(i.normalized,n.ignoreAttrs);return Nv(d)===Nv(u)?{equivalent:!0,level:o.length>0?"L2":"L1",appliedDegrades:o}:{equivalent:!1,level:"L2",reason:"structural-divergence",appliedDegrades:o,detail:function e(t,n,r="doc"){if(!t||!n)return`${r}: node presence differs`;if(t.type!==n.type)return`${r}: type ${String(t.type)} vs ${String(n.type)}`;let i=t.content??[],o=n.content??[];if(i.length!==o.length)return`${r}(${String(t.type)}): child count ${i.length} vs ${o.length}`;for(let n=0;n<i.length;n++)if(Nv(i[n])!==Nv(o[n]))return e(i[n],o[n],`${r}>${String(t.type)}[${n}]`);return`${r}(${String(t.type)}): attrs or marks differ`}(d,u)}}(o,NS(NC(r)),{ignoreAttrs:void 0}).equivalent}}}({parse:e=>this.parseWithFallback(e)}):void 0;const{nodeHandlers:t,markHandlers:n}=function(e,t){let n={},r={},i=e.nodes,o=e.marks;i.paragraph&&(n.paragraph=Tt("paragraph")),i.blockquote&&(n.blockquote=Tt("blockquote",e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),i.heading&&(n.heading=Tt("heading",e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:!0===e.attrs.sourceContiguousNext||void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),i.codeBlock&&(n.codeBlock=e=>{let t="indented"===e.attrs.sourceStyle?"indented":"fenced";return{type:"code",lang:"indented"===t?null:e.attrs.language??null,meta:"indented"===t?null:e.attrs.meta??null,value:e.textContent??"",data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceUnclosedFence:!0===e.attrs.sourceUnclosedFence||void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),i.thematicBreak&&(n.thematicBreak=e=>({type:"thematicBreak",data:{sourceRaw:e.attrs.sourceRaw}})),i.hardBreak&&(n.hardBreak=e=>({type:"break",data:{sourceStyle:e.attrs.hardBreakStyle,..."string"==typeof e.attrs.sourceRaw&&e.attrs.sourceRaw.length>0?{sourceRaw:e.attrs.sourceRaw}:{}}})),i.list&&(n.list=Tt("list",e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),i.listItem&&(n.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&function(e){if("paragraph"!==e.type)return!1;let t=e.children??[];return 0===t.length||t.every(e=>"text"===e.type&&""===e.value)}(r[0])?r.slice(1):r,o={};return"number"==typeof e.attrs.sourceMarkerSpacing&&(o.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),"number"==typeof e.attrs.sourceOrdinal&&(o.sourceOrdinal=e.attrs.sourceOrdinal),"X"===e.attrs.sourceCheckboxChar&&(o.sourceCheckboxChar="X"),"number"==typeof e.attrs.sourceContinuationIndent&&(o.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:"listItem",checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(o).length>0?{data:o}:{},children:i}}),i.table&&(n.table=(e,t,n)=>{let r=n.all(e),i=[],o=e.firstChild;o&&o.forEach(e=>{let t=e.attrs.align;i.push("left"===t||"right"===t||"center"===t?t:null)});let s=r.filter(e=>"tableRow"===e.type),a=e.attrs.sourceDashCounts,l={};Array.isArray(a)&&a.length>0&&(l.sourceDashCounts=a);let c=e.attrs.sourceOuterPipes;null!==c&&"object"==typeof c&&"boolean"==typeof c.leading&&"boolean"==typeof c.trailing&&(l.sourceOuterPipes=c);let d=e.attrs.sourceAlignmentPadding;Array.isArray(d)&&d.length>0&&(l.sourceAlignmentPadding=d);let u=Object.keys(l).length>0?l:void 0,h={type:"table",align:i,children:s};return u&&(h.data=u),h}),i.tableRow&&(n.tableRow=Tt("tableRow"));let s=(e,t)=>{let n,r,i,o,s,a,l={type:"tableCell",children:(n=[],r=0,i=()=>{n.length>0&&(r+=1)},o=e=>{for(;r>0;)n.push({type:"break"}),r-=1;n.push(e)},s=e=>{e.split("\n").forEach((e,t)=>{t>0&&i(),e.length>0&&o({type:"text",value:e})})},a=e=>
154{switch(e.type){case"paragraph":case"heading":e.children.forEach(o);return;case"list":let t,n,r,l,c;t=!0===e.ordered,n="number"==typeof e.start?e.start:1,r=e.data,l="string"==typeof r?.bulletMarker?r.bulletMarker:"-",c="string"==typeof r?.listMarkerDelimiter?r.listMarkerDelimiter:".",e.children.forEach((e,r)=>{r>0&&i(),o({type:"text",value:t?`${n+r}${c} `:`${l} `}),e.children.forEach((e,t)=>{t>0&&i(),a(e)})});return;case"code":case"html":s(e.value);return;case"thematicBreak":o({type:"text",value:e.data?.sourceRaw??"---"});return;default:if(Array.isArray(e.children)&&e.children.length>0)return void e.children.forEach((e,t)=>{t>0&&i(),a(e)});if("string"==typeof e.value)return void s(e.value);console.warn(JSON.stringify({event:"table-cell-flatten-dropped-block",nodeType:e.type}))}},t.forEach((e,t)=>{t>0&&i(),a(e)}),n)},c=e.attrs.sourcePadding;return null!==c&&"object"==typeof c&&"number"==typeof c.left&&"number"==typeof c.right&&(l.data={sourcePadding:c}),l};return i.tableCell&&(n.tableCell=(e,t,n)=>s(e,n.all(e))),i.tableHeader&&(n.tableHeader=(e,t,n)=>s(e,n.all(e))),i.image&&(n.image=e=>({type:"image",url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),i.imageReference&&(n.imageReference=e=>{let t=e.attrs.label??"",n=e.attrs.identifier??t;return{type:"imageReference",alt:e.attrs.alt??"",identifier:n,label:t||n,referenceType:e.attrs.referenceType??"shortcut"}}),i.htmlBlock&&(n.htmlBlock=e=>({type:"html",value:e.attrs.content})),(i.linkDefinition??i.linkRefDef)&&(n[i.linkDefinition?"linkDefinition":"linkRefDef"]=e=>{let t={},n=e.attrs.sourceLayout;("multiline"===n||"inline"===n)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;("single"===r||"double"===r||"paren"===r)&&(t.sourceTitleMarker=r);let i={type:"definition",identifier:e.attrs.identifier??e.attrs.label??"",label:e.attrs.label??e.attrs.identifier??"",url:e.attrs.url??e.attrs.href??"",title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}),i.jsxComponent&&(n.jsxComponent=(e,n,r)=>{var i,o;let s;if("expression"===e.attrs.kind)return{type:"html",value:e.attrs.sourceRaw??""};let a=e.attrs.componentName||null,l=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return(i=e,o=t.checker,!(i.attrs.sourceDirty||(s=!1,i.descendants(e=>!s&&("jsxInline"===e.type.name?(e.attrs.sourceDirty&&(s=!0),!1):"jsxComponent"!==e.type.name||!e.attrs.sourceDirty||(s=!0,!1))),s)||o&&o.isDiverged(i.toJSON()))&&e.attrs.sourceRaw)?{type:"mdxJsxFlowElement",name:a,attributes:l,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:Dq.getOrWildcard(a??"*").serialize(e,{all:e=>r.all(e),registry:Dq,serializeChildren:()=>{throw Error("SerializeContext.serializeChildren is not available in the PMâmdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.")}})}),i.rawMdxFallback&&(n.rawMdxFallback=e=>{let t=e.textContent??"",n="string"==typeof e.attrs.reason?e.attrs.reason:"",r=e.attrs.originalSpan;return{type:"rawMdxFallback",value:t,data:{reason:n,originalSpan:r&&"object"==typeof r&&"start"in r&&"end"in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),i.jsxInline&&(n.jsxInline=e=>{let t=e.attrs.componentName||"";if(t&&e.attrs.sourceDirty){var n;let r;return n=Dq.get(t)?.props,r=e.attrs.props?.children,{type:"mdxJsxTextElement",name:t,attributes:O2(e,n),children:"string"==typeof r&&""!==r?[{type:"text",value:r}]:[],data:{}}}let r=e.attrs.attributes,i=e.attrs.sourceRaw||e.textContent||"";return{type:"mdxJsxTextElement",name:t||null,attributes:Array.isArray(r)?r:[],children:[],data:{sourceRaw:String(i)}}}),i.mathInline&&(n.mathInline=e=>{let t=e.attrs.formula??"",n=e.attrs.id;if("string"==typeof n&&n.length>0)return{type:"mdxJsxTextElement",name:"InlineMath",attributes:[{type:"mdxJsxAttribute",name:"formula",value:t},{type:"mdxJsxAttribute",name:"id",value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:"inlineMath",value:t,..."string"==typeof r&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),i.wikiLink&&(n.wikiLink=e=>
154{let t=e.attrs.target??"",n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:"wikiLink",value:i,data:{target:t,anchor:n,alias:r,sourceTarget:"string"==typeof e.attrs.sourceTarget?e.attrs.sourceTarget:null,sourceAnchor:"string"==typeof e.attrs.sourceAnchor?e.attrs.sourceAnchor:null,sourceAlias:"string"==typeof e.attrs.sourceAlias?e.attrs.sourceAlias:null},children:[{type:"text",value:i}]}}),i.tag&&(n.tag=e=>({type:"tag",value:String(e.attrs.value??"")})),i.wikiLinkEmbed&&(n.wikiLinkEmbed=e=>{let t=e.attrs.target??"",n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:"wikiLinkEmbed",value:i,data:{target:t,anchor:n,alias:r},children:[{type:"text",value:i}]}}),o.emphasis&&(r.emphasis=Tn("emphasis",e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.strong&&(r.strong=Tn("strong",e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),o.code&&(r.code=(e,t,n)=>(function e(t,n){if(0===t.length)return DW({type:"inlineCode",value:""},n);if(t.every(e=>"text"===e.type))return DW({type:"inlineCode",value:t.map(e=>e.value).join("")},n);if(1===t.length&&"children"in t[0]){let r=t[0];return{...r,children:[e(r.children,n)]}}return DW({type:"inlineCode",value:function e(t){let n="";for(let r of t)"text"===r.type?n+=r.value:"children"in r&&Array.isArray(r.children)?n+=e(r.children):"value"in r&&"string"==typeof r.value&&(n+=r.value);return n}(t)},n)})(n,{sourceFenceChar:e.attrs.sourceFenceChar,sourceFenceLength:e.attrs.sourceFenceLength,sourcePadded:!0===e.attrs.sourcePadded||void 0})),(o.strike??o.delete)&&(r[o.strike?"strike":"delete"]=Tn("delete",e=>({data:{sourceDelimiter:"~"===e.attrs.sourceDelimiter?"~":"~~"}}))),o.highlight&&(r.highlight=Tn("mark")),o.underline&&(r.underline=Tn("underline",e=>({data:{sourceForm:"ins"===e.attrs.sourceForm?"ins":"u"}}))),o.comment&&(r.comment=Tn("comment",e=>({data:{sourceForm:"html"===e.attrs.sourceForm?"html":"percent"}}))),i.commentBlock&&(n.commentBlock=Tt("commentBlock",e=>({data:{sourceForm:"html"===e.attrs.sourceForm?"html":"percent",sourceLayout:"inline"===e.attrs.sourceLayout?"inline":"block"}}))),i.footnoteReference&&(n.footnoteReference=e=>{let t=String(e.attrs.identifier??"");return{type:"footnoteReference",identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),i.footnoteDefinition&&(n.footnoteDefinition=Tt("footnoteDefinition",e=>({identifier:String(e.attrs.identifier??""),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??"")}))),o.link&&(r.link=(e,t,n)=>{if("wikiembed"===e.attrs.sourceForm){let t="string"==typeof e.attrs.target&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??"",r="string"==typeof e.attrs.anchor&&e.attrs.anchor.length>0?e.attrs.anchor:null,i="string"==typeof e.attrs.alias&&e.attrs.alias.length>0?e.attrs.alias:null,o="string"==typeof e.attrs.sourceTarget?e.attrs.sourceTarget:null,s="string"==typeof e.attrs.sourceAnchor?e.attrs.sourceAnchor:null,a="string"==typeof e.attrs.sourceAlias?e.attrs.sourceAlias:null,l=i||(r?`${t}#${r}`:t),c=n.map(e=>"value"in e&&"string"==typeof e.value?e.value:"").join("");return c!==l&&c.trim().length>0&&!c.includes("]]")&&(i=c,l=c),{type:"wikiLinkEmbed",value:l,data:{target:t,anchor:r,alias:i,sourceTarget:o,sourceAnchor:s,sourceAlias:a},children:[{type:"text",value:l}]}}let r=e.attrs.linkStyle;if("autolink"===r)return{type:"link",url:e.attrs.href??"",title:null,children:n,data:{sourceStyle:"autolink"}};if("gfm-autolink"===r)return{type:"link",url:e.attrs.href??"",title:null,children:n,data:{sourceStyle:"gfm-autolink"}};if("inline"===r||!r){let t={};"angle-bracketed"===e.attrs.sourceUrlForm&&(t.sourceUrlForm="angle-bracketed");let r=e.attrs.sourceTitleMarker;return("single"===r||"double"===r||"paren"===r)&&(t.sourceTitleMarker=r),{type:"link",url:e.attrs.href??"",title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:"linkReference",identifier:(e.attrs.refLabel??"").toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),o.escapeMark&&(r.escapeMark=(e,t,n)=>{for(let e of n)if("text"===e.type&&e.value){e.data??={},e.data.escapedChars??=[];for(let t=0;t<e.value.length;t++)e.data.escapedChars.push({offset:t,char:e.value[t]})}return 1===n.length?n[0]:n}
154),o.sourceLiteral&&(r.sourceLiteral=(e,t,n)=>{let r="string"==typeof e.attrs.sourceRaw?e.attrs.sourceRaw:"";if(1===n.length&&n[0]?.type==="text"){let e=n[0],t=r||e.value;return Oy(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:"text",value:n.filter(e=>"text"===e.type).map(e=>e.value??"").join("")||r}}),{nodeHandlers:n,markHandlers:r}}(this.schema,this.freshnessHolder);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=function(e){let t=E3();for(let e of DP)t="options"in e&&void 0!==e.options?t.use(e.plugin,e.options):t.use(e.plugin);return(t=t.use(Th,{schema:e.schema,handlers:e.handlers})).freeze(),t}({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=function(e){let t=E3().use(TS,["yaml"]).use(ES,{tablePipeAlign:!1}).use(TD,{singleDollarTextMath:!1}).use(I0).use(Dz).use(DT).use(EX,{bullet:"-",fences:!0,rule:"-",join:[Dg],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}({toMarkdownHandlers:I6})}parse(e,t){if(!e.trim())return{type:"doc",content:[{type:"paragraph",content:[]}]};this.parseCtx.current=t??{};try{return(function(e,t){let{source:n,hadBom:r}=Dj(e),i=Ix(n),o=new k0(Du(i)),s=t.parse(o);o.value=i;let a=t.runSync(s,o);IF(a,i);let l=DB(a,i,r),c=l?Nc(a,l):void 0,d=t.stringify(a);return c?d.type.create({...d.attrs,sourceDocBoundary:c},d.content,d.marks):d})(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?DH(e,this.parseProcessor,!1):{type:"root",children:[]}}parseToEditorMdast(e){return e.trim()?DH(e,this.parseProcessor,!0):{type:"root",children:[]}}parseWithFallback(e,t){var n;let r;return e.trim()?(n={parse:e=>this.parse(e,t)},r={startMs:"u">typeof performance&&"function"==typeof performance.now?performance.now():Date.now(),calls:0},function e(t,n,r,i){if(r>20)return MT(),console.warn(JSON.stringify({event:"mdx-whole-doc-fallback",reason:"MAX_SPLIT_DEPTH exceeded"})),MR(t);if(i){if(MM(i))return Mw.wholeDocBudget++,console.warn(JSON.stringify({event:"mdx-whole-doc-fallback",reason:"parse budget exhausted",calls:i.calls})),MR(t);i.calls+=1}try{return n(t)}catch(l){var o;let s=(o=l)&&"object"==typeof o?o.place&&"number"==typeof o.place.offset?o.place.offset:o.place?.start&&"number"==typeof o.place.start.offset?o.place.start.offset:o.position&&"number"==typeof o.position.offset?o.position.offset:o.position?.start&&"number"==typeof o.position.start.offset?o.position.start.offset:void 0:void 0,a=MI(l);if(void 0===s){if(0===r){let e=function(e,t,n,r){let i=function(e){let t=MC(e),n=[0];for(let r of e.matchAll(/\n[ \t]*\n/g)){let e=r.index;MA(e,t)||n.push(e+r[0].length)}n.push(e.length);let r=[];for(let t=0;t<n.length-1;t++){let i=n[t],o=n[t+1];if(o<=i)continue;let s=e.slice(i,o);s.trim()&&r.push({src:s,start:i,end:o})}return r}(e);if(i.length<2)return null;let o=[],s=!1,a="";for(let e of i){if(r&&MM(r))break;r&&(r.calls+=1);let i=a+e.src;try{let n=t(i).content??[];a+=MO(e.src);let r=n.filter(e=>"paragraph"!==e.type||Array.isArray(e.content)&&e.content.length>0);if(0===r.length&&n.length>0){s=!0;continue}o.push(...r),s=!0}catch(i){ME();let t=i?.message?.slice(0,200)??"unknown block error",r=n?.message?.slice(0,160)??"unknown";console.warn(JSON.stringify({event:"mdx-block-fallback",offset:e.start,reason:`Per-block recovery after position-less error: ${r}`,blockError:t,blockErrorName:i?.name})),o.push({type:"rawMdxFallback",attrs:{reason:t,originalSpan:{start:e.start,end:e.end}},content:[{type:"text",text:e.src}]})}}return s?{type:"doc",content:o.length>0?o:[{type:"paragraph",content:[]}]}:null}(t,n,l,i);if(e)return e}return MT(),console.warn(JSON.stringify({event:"mdx-whole-doc-fallback",reason:a.message,error:a})),MR(t)}ME(),console.warn(JSON.stringify({event:"mdx-block-fallback",offset:s,reason:a.message,error:a}));try{let o=function(e,t){let n=function(e){let t=function(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(MA(i,t))continue;let o="/"===r[1],s=r[2],a=i+r[0].length,l=Math.min(e.length,a+32768),c=!1,d=0,u=-1,h=!1;for(let t=a;t<l;t++){let n=e[t];if(c){'"'===n&&(c=!1),"\\"===n&&t+1<l&&t++;continue}if('"'===n){c=!0;continue}if("{"===n){d++;continue}if("}"===n&&d>0){d--;continue}if(!(d>0)&&">"===n){u=t,t>0&&"/"===e[t-1]&&(h=!0);break}}if(-1===u)continue;let p=u+1;
154o?n.push({kind:"close",name:s,start:i,end:p}):h?n.push({kind:"self-close",name:s,start:i,end:p}):n.push({kind:"open",name:s,start:i,end:p})}return n}(e,MC(e)),n=[],r=[];for(let i of t){if("self-close"===i.kind)continue;if("open"===i.kind){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(-1!==t){for(let o=n.length-1;o>t;o--){let t=n[o],s=MD(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,s),source:"unmatched"})}r.push({start:n[t].start,end:i.end,source:"pair"}),n.length=t}}for(let t of n){let n=MD(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:"unmatched"})}return r}(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:function(e,t){let n=null;for(let r of e.matchAll(/\n\s*\n/g)){if(r.index>=t)break;n=r.index+r[0].length}return n}(e,t)??0,end:MD(e,t)??e.length}}(t,s),l=t.slice(o.start,o.end),c=t.slice(0,o.start).replace(/\n+$/,""),d=t.slice(o.end).replace(/^\n+/,""),u=c.trim()?e(c,n,r+1,i):{type:"doc",content:[]},h=d.trim()?e(MO(c)+d,n,r+1,i):{type:"doc",content:[]},p={type:"rawMdxFallback",attrs:{reason:a.message,originalSpan:{start:o.start,end:o.end}},content:l?[{type:"text",text:l}]:[]},f=[...u.content??[],p,...h.content??[]];return{type:"doc",content:f.length>0?f:[{type:"paragraph",content:[]}]}}catch(n){MT();let e=MI(n);return console.warn(JSON.stringify({event:"mdx-whole-doc-fallback",reason:`Recovery failed: ${e.message}`,recoveryPath:"block-split-then-rejoin",error:e,originalError:a})),MR(t)}}}(e,n.parse,0,r)):{type:"doc",content:[{type:"paragraph",content:[]}]}}serialize(e,t){let n;try{n=this.schema.nodeFromJSON(e)}catch(t){throw Error(`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`,{cause:t})}let r=this.freshnessHolder.checker;t?.skipFreshnessDerive&&(this.freshnessHolder.checker=void 0);try{return function(e,t,n){var r,i,o;let s,a,l=(r=(o={schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers}).nodeHandlers,i=o.markHandlers,s={one:function(e,t){let n=e.type.schema,r=e.type.name,i=s.nodeHandlers[r];if(i)return i(e,t,s);if(e.type===n.topNodeType){let t=s.all(e);return bE(t.some(e=>xg(e,"root"))),{type:"root",children:t}}return e.type===n.nodes.text?{type:"text",value:e.text}:null},all:function(e){return function e(t,n){return t.reduce((e,t)=>{let n=e[e.length-1];if(!n)return[[t]];let r=n[n.length-1];return r?!t.marks.length&&!r.marks.length||t.marks.length&&r.marks.length&&t.marks[0]?.eq(r.marks[0])?[...e.slice(0,e.length-1),[...n.slice(0,n.length),t]]:[...e,[t]]:[...e.slice(0,e.length),[t]]},[]).flatMap(t=>(function(t,n){let r=t[0],i=r?.marks[0];if(!i)return t.map(e=>s.one(e.node,n));let o=e(t.map(({node:e,marks:t})=>({node:e,marks:t.slice(1)})),n),a=s.markHandlers[i.type.name];return a?a(i,n,o,s):o})(t,n)).filter(e=>!!e).flat()}(e.children.map(e=>({node:e,marks:e.marks})),e)},nodeHandlers:r,markHandlers:i}).one(e);(function e(t){if("children"in t&&Array.isArray(t.children)){for(let n of t.children)e(n);for(let e=0;e+1<t.children.length;){let n=t.children[e],r=t.children[e+1],i=n?.data,o=r?.data,s=ML(i)?i.escapedChars:null,a=ML(o)?o.escapedChars:null;if(n?.type!=="text"||r?.type!=="text"||"string"==typeof n.data?.sourceRaw||"string"==typeof r.data?.sourceRaw||null===s&&null===a){e+=1;continue}let l=n.value.length;n.value+=r.value,n.data??={},n.data.escapedChars=[...s??[],...(a??[]).map(e=>({...e,offset:e.offset+l}))],r.data?.entityRefSpans?.length&&(n.data.entityRefSpans=[...n.data.entityRefSpans??[],...r.data.entityRefSpans.map(e=>({...e,offset:e.offset+l}))]),t.children.splice(e+1,1)}}})(l),xT(l,"listItem",e=>{IR(e)&&function(e){let t=e.children??[];if(1!==t.length)return!1;let n=t[0];return n?.type==="paragraph"&&(n.children?.length??0)===0}(e)&&(e.children[0].children=[{type:"text",value:" ",data:{sourceRaw:ID}}])}),(a=e=>{if(Dw.has(e.type)&&"children"in e&&function e(t,n=!1){for(;t.length>0;){let r=t[t.length-1];if(function(e){if(e?.type!=="break")return!1;let t=e.data?.sourceRaw;return"string"!=typeof t||0===t.length}(r)){r.data??={},r.data.sourceRaw="<br />",r.data.sourceStyle="html";break}if(r&&Db.has(r.type)&&"children"in r){let n=r.children;if(e(n,!0),0===n.length){t.pop();continue}}if(!n&&Dv(r)&&Dk.test(r.value)){let e=r.value.replace(Dk,"");if(e.length>0){r.value=e;continue}if(t.slice(0,-1).some(e=>!(Dv(e)&&Dx.test(e.value)))){t.pop();continue}if(t.every(e=>Dv(e)&&Dx.test(e.value))){let e=t[0];e.value=e.value.charAt(0),t.splice(1)}}break}}(e.children),"children"in e)for(let t of e.children)a(t)})(l);let c=[];for(let e of l.children){if("table"===e.type&&0===Dm(e)){console.warn(JSON.stringify({event:"table-serialize-dropped-empty",rows:(e.children??[]).length}));continue}!function(e){switch(e.type){case"table":return 0===Dm(e);case"code":return e.data?.sourceStyle==="indented"&&/^\n*$/.test(e.value??"");case"thematicBreak":return""===Dh(e);case"html":return(e.value??"")==="";case"mdxJsxFlowElement":return void 0===Dh(e)&&e.data?.htmlBoundary===void 0&&0===(e.children??[]).length&&!e.name;case"list":return 0===(e.children??[]).length;default:return!1}}(e)&&("paragraph"===e.type&&e.children.length>0&&Df(e)&&(e.children=[]),c.push(e))}l.children=c;let d=function(e){if("object"!=typeof e||null===e)return;let t={};return!0===e.bom&&(t.bom=!0),"string"==typeof e.leading&&D$.test(e.leading)&&(t.leading=e.leading),"string"==typeof e.trailing&&DF.test(e.trailing)&&(t.trailing=e.trailing),t.bom||t.leading||t.trailing?t:void 0}(e.attrs?.sourceDocBoundary),u=String(t.stringify(l));return d?.leading&&(u=d.leading+u),d?.trailing&&(u=u.replace(/\n+$/,"")+d.trailing),d?.bom&&(u=`\uFEFF${u}`),u}(n,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}finally{this.freshnessHolder.checker=r}}};let Dq=function(){let e=new Map;for(let t of(e.set("*",Mx),Mk))e.set(t.name,t);return{get:t=>e.get(t),getOrWildcard:t=>e.get(t)??e.get("*"),set(t,n){e.set(t,n)},has:t=>e.has(t),entries:()=>e.entries()}}();function DG(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if("mdxJsxExpressionAttribute"===t.type)continue;let e=t.name,i=n.get(e);if(null===t.value||void 0===t.value){r[e]=!0;continue}if("string"==typeof t.value){if(i?.type==="number"){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type==="boolean"?r[e]="true"===t.value:r[e]=t.value;continue}let o=t.value.value;try{r[e]=JSON.parse(o)}catch{r[e]=o}}return r}function DW(e,t){if(!t)return e;let n={};return(t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),"number"==typeof t.sourceFenceLength&&(n.sourceFenceLength=t.sourceFenceLength),!0===t.sourcePadded&&(n.sourcePadded=!0),0===Object.keys(n).length)?e:{...e,data:n}}let DK={default:!0,MD013:!1};function DJ(e){let t=(void 0===e?[]:Array.isArray(e)?e:[e]).map(e=>e.trim()).filter(e=>e.length>0),n=[],r=[],i=[],o=[],s=0;for(let e of t){let t=e.startsWith("!"),a=t?e.slice(1):e;if(t||(s+=1),0===a.length){n.push({pattern:e,detail:"empty pattern"});continue}try{let e=(0,CE.default)(a,{dot:!0,strictBrackets:!0});(t?o:i).push(e)}catch(t){n.push({pattern:e,detail:t instanceof Error?t.message:String(t)});continue}if(a.endsWith("/"))r.push({pattern:e,reason:"trailing-slash"});else if(a.startsWith("/"))r.push({pattern:e,reason:"leading-slash"});else{let t=a.toLowerCase();Nz.some(e=>t.endsWith(e))&&r.push({pattern:e,reason:"doc-extension"})}}let a=0===s;
154return{invalidPatterns:n,suspiciousPatterns:r,matches(e){if(void 0===e||""===e)return!1;let t=function(e){let t=e.replace(/\\/g,"/");for(;t.startsWith("./");)t=t.slice(2);let n=t.toLowerCase();for(let e of Nz)if(n.endsWith(e))return t.slice(0,-e.length);return t}(e);return""!==t&&!!(a||i.some(e=>e(t)))&&!o.some(e=>e(t))}}}function DY(e,t){let n=new Set,r=[];for(let i of e){if(!1===i.enabled||!i.schema||!DJ(i.appliesTo).matches(t))continue;let e=i.key??i.file;n.has(e)||(n.add(e),r.push({file:i.file,schema:i.schema}))}return r}let DX={"draft-06":"http://json-schema.org/draft-06/schema#","draft-07":"http://json-schema.org/draft-07/schema#","2019-09":"https://json-schema.org/draft/2019-09/schema","2020-12":"https://json-schema.org/draft/2020-12/schema"},DQ=new Map(Object.keys(DX).map(e=>[DZ(DX[e]),e]));function DZ(e){return e.replace(/^https?:\/\//,"").replace(/#$/,"")}let D0=new Map,D1=new Map,D2={"date-time":'an ISO 8601 datetime with an explicit UTC offset, for example "2026-09-23T00:00:00Z"'};function D5(e){let t=e.format;return"string"==typeof t?D2[t]:void 0}function D3(e){let t;if(void 0===e)return"";if("string"==typeof e)t=`"${e}"`;else try{t=JSON.stringify(e)??String(e)}catch{t=String(e)}return t.length>60&&(t=`${t.slice(0,57)}â¦`),` (got ${t})`}function D4(e,t,n){if(0===t.length)return[];let r=n?.source??"frontmatter",{data:i,keyLines:o}=function(e){let t,n=new Map;if(!rq.test(e))return{data:{},keyLines:n};let{frontmatter:r}=(t=e.match(rq))?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:"",body:e},i=function(e){if(""===e)return"";let t=e.match(rq);return t?(t[1]??"").replace(/\r?\n$/,""):e}(r);if(""===i.trim())return{data:{},keyLines:n};let o=rF(i,{uniqueKeys:!1});if(o.errors.length>0)return{data:{},keyLines:n};let s=o.toJS();if(null===s||"object"!=typeof s||Array.isArray(s))return{data:{},keyLines:n};if(ti(o.contents))for(let e of o.contents.items){let t=e.key;if(!ts(t)||"string"!=typeof t.value||!t.range)continue;let r=0,o=Math.min(t.range[0],i.length);for(let e=0;e<o;e++)10===i.charCodeAt(e)&&r++;n.has(t.value)||n.set(t.value,r+1)}return{data:s,keyLines:n}}(e),s=e.split("\n"),a=e=>({start:{line:e,character:0},end:{line:e,character:s[e]?.length??0}}),l=[];for(let{schema:e,ruleId:n}of t){let t=function(e){let t,n=JSON.stringify(e),r=D1.get(n);if(void 0!==r)return r;let i=null,o=void 0===(t=e.$schema)?"draft-07":"string"!=typeof t?null:DQ.get(DZ(t))??null;if(null!==o)try{let t,n;t=function(e){let t,n=D0.get(e);if(n)return n;let r={allErrors:!0,strict:!1};switch(e){case"2020-12":t=new Cx.default(r);break;case"2019-09":t=new Ck.default(r);break;case"draft-06":case"draft-07":t=new Cv.default(r);break;default:throw Error(`Unhandled FrontmatterSchemaDialect: ${JSON.stringify(e)}`)}return(0,Cw.default)(t),D0.set(e,t),t}(o),n=e.$id,"string"==typeof n&&""!==n&&t.removeSchema(n),i=t.compile(function(e){let{$schema:t,...n}=e;return n}(e))}catch{i=null}return D1.size>=256&&D1.clear(),D1.set(n,i),i}(e);if(t&&!t(i))for(let e of t.errors??[]){let t,s,c=e.keyword;if("if"===c)continue;let d=0,u="invalid";if("maxProperties"===c&&""===e.instancePath)t="This document must not have frontmatter";else if("required"===c&&""===e.instancePath){let n=String(e.params.missingProperty??"");t=`Frontmatter property "${n}" is required`,u="missing",""!==n&&(s=n)}else if(""===e.instancePath)t=`Frontmatter ${e.message??`violates "${c}"`}`;else{let n=function(e){if(!e.startsWith("/"))return null;let t=e.slice(1).split("/")[0]??"";return""===t?null:t.replace(/~1/g,"/").replace(/~0/g,"~")}(e.instancePath);null!==n&&(d=o.get(n)??0);let r=e.instancePath.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")).join("."),s=null!==n&&r===n?i[n]:void 0;if("enum"===c)t=`Frontmatter property "${r}" must be one of: ${(e.params.allowedValues??[]).map(String).join(", ")}${D3(s)}`;else if("format"===c&&void 0!==D5(e.params)){let n=e.params.format;t=`Frontmatter property "${r}" must be ${D5(e.params)} (format "${String(n)}")${D3(s)}`}else t=`Frontmatter property "${r}" ${e.message??`violates "${c}"`}`}l.push({range:a(d),severity:"warning",source:r,code:n??c,message:t,frontmatterScope:u,...void 0===s?{}:{frontmatterProperty:s}})}}return l}function D6(e){return`.ok/okf/${e.replace(/^frontmatter-/,"")}.schema.json`}let D8=["**","!**/{index,log}"],D9=[{id:"frontmatter-required",appliesTo:D8,schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â required frontmatter",description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:"object",required:["type"],properties:{type:{type:"string",pattern:"\\S",description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally â pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}}},{id:"frontmatter-recommended",appliesTo:D8,schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â recommended frontmatter",description:"Shapes for the OKF v0.2 recommended keys. Every key here is o
154ptional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:"object",properties:{title:{type:"string",description:"Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1."},description:{type:"string",description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:"string",format:"uri-reference",description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path â hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:"array",items:{type:"string"},description:"A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1."},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 â one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}}},{id:"frontmatter-provenance",appliesTo:D8,schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â provenance, trust, and lifecycle frontmatter",description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:"object",properties:{sources:{type:"array",description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:"object",required:["resource"],properties:{resource:{type:"string",description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:"string",description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents â a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:"string",description:"Optional. Human-readable label for the source. OKF v0.2 §5.1."},author:{type:"string",description:"Optional credibility signal â an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:"integer",description:"Optional credibility signal â an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:"string",format:"date-time",description:"Optional credibility signal â a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:"object",description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:"string",format:"date-time",description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:"string",format:"date-time",description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:"object",description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:"string",format:"date-time",description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:"string",format:"date-time",description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:"object",required:["by"],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:"string",description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content â a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:"string",format:"date-time",description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` â a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list â hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:"object",description:"The bare single-verifier mapping form. OKF v0.2 §5.2.",properties:{by:{type:"string",description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:"string",format:"date-time",description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:"array",description:"The list form: one entry per independent verification event. OKF v0.2 §5.2.",items:{type:"object",properties:{by:{type:"string",description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:"string",format:"date-time",description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:["draft","stable","deprecated"],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:"string",format:"date-time",description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}
154}},{id:"frontmatter-computation",appliesTo:D8,schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â Attested Computation frontmatter",description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:"object",if:{required:["type"],properties:{type:{const:"Attested Computation",description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:["runtime"]},properties:{runtime:{type:"string",description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean â a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:"array",description:'The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.',items:{type:"object",properties:{name:{type:"string",description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:"string",description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:"boolean",description:"Whether the agent must supply a value for this parameter. OKF v0.2 §10.2."}}}},computation:{type:"string",format:"uri-reference",description:"Optional. A path to a file holding the computation, used instead of an inline body fence â best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:"object",description:"How the computation is run. A runner â an agent, or deterministic consumer code â follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:"string",format:"uri-reference",description:"Names the run instructions or code. What sits behind it â a Skill, a script, a container â is a packaging choice;
154 OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:"array",items:{type:"string"},description:"Declares the fields a run must return â the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:"object",description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:"string",format:"uri-reference",description:"Names code â no LLM â that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}}},{id:"frontmatter-reserved-index",appliesTo:["**/index","!index"],schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â index files carry no frontmatter",description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception â a bundle-root `index.md` may carry `okf_version` â which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:"object",maxProperties:0}},{id:"frontmatter-root-index",appliesTo:["index"],schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"OKF v0.2 â bundle-root index.md",description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved
154in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:"object",properties:{okf_version:{type:"string",pattern:"^[0-9]+\\.[0-9]+$",description:'The OKF version this bundle targets, as `<major>.<minor>` â currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}}}],D7=Object.fromEntries(["no-wiki-links","log-shape","index-shape","reserved-casing","frontmatter-required","frontmatter-recommended","frontmatter-provenance","frontmatter-computation","frontmatter-reserved-index","frontmatter-root-index","project-no-mdx"].filter(e=>!D9.some(t=>t.id===e)).map(e=>[e,!1]));function Re(e,t){return void 0===t?[]:D9.filter(n=>{var r;return r=n.id,e?.[r]!==!1&&DJ([...n.appliesTo]).matches(t)})}function Rt(e,t){return function(e,t){let n="string"==typeof e?e:e.origin,r="string"==typeof e?void 0:e.url,i=n.split(":"),o=i[1]?i[0]:void 0,s=i[1];return Object.defineProperty(a,"name",{value:n}),a;function a(e){let[n,i]=function(e,t){if(Array.isArray(t)){let[n,r]=t;switch(n){case!1:case 0:case"off":return[0,r];case!0:case 1:case"on":case"warn":return[1,r];case 2:case"error":return[2,r];default:if("number"==typeof n)throw Error("Incorrect severity `"+n+"` for `"+e+"`, expected 0, 1, or 2")}}return[1,t]}(s,e),a=2===n;if(n)return function(e,n,l){let c=n.messages.length-1;E1(t,function(e){let t=n.messages;if(e&&!t.includes(e))try{n.fail(e)}catch{}for(;++c<t.length;)Object.assign(t[c],{fatal:a,ruleId:s,source:o,url:r});l()})(e,n,i)}}}(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:""}`,t)}})}function Rn(e,t,n){let r=DJ(t);return Rt(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}let Rr=e=>({line:e.line-1,character:e.column-1}),Ri=Rn("index-shape","**/index",(e,t)=>{let n=!1;for(let r of e.children){if("heading"===r.type){n=!0;continue}"list"!==r.type||n||t.message("This index list is not under a section heading, so an Open Knowledge Format consumer reading the file as navigation has no name to file its entries under â an index is one or more heading-led sections of bulleted links.",r)}xT(e,"listItem",e=>{let n;!e.children.some(e=>"list"===e.type)&&(n=!1,xT(e,["link","linkReference"],()=>(n=!0,!1)),n||t.message("This index entry has no link, so an Open Knowledge Format consumer reading the file as navigation has nowhere to follow it. Every entry in the format's own reference bundles is a link followed by a short description.",e))})}),Ro=/^\s*(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?!\d)/,Rs=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function Ra(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}â¦`:t}let Rl=Rn("log-shape","**/log",(e,t)=>{let n;xT(e,"heading",e=>{var r,i,o;let s;if(2!==e.depth)return;let a=xO(e),l=Ro.exec(a);if(!l)return void t.message(Rs.test(a)?`Log date heading "${Ra(a)}" is not in ISO 8601 YYYY-MM-DD form, the one form an Open Knowledge Format log requires of its date headings.`:`Log entry heading "${Ra(a)}" is not a date, so it falls outside the dated-entry format an Open Knowledge Format consumer reads a log as â nothing under it reaches the change-history timeline.`,e);let c=`${l[1]}-${l[2]}-${l[3]}`;(r=Number(l[1]),(s=new Date(Date.UTC(r,(i=Number(l[2]))-1,o=Number(l[3])))).getUTCFullYear()!==r||s.getUTCMonth()!==i-1||s.getUTCDate()!==o)?t.message(`Log date heading "${c}" is not a real calendar date, so it is not ISO 8601 â the one form an Open Knowledge Format log requires of its date headings.`,e):(void 0!==n&&c>n&&t.message(`Log date heading "${c}" is newer than the entry above it â an Open Knowledge Format log is a flat list of date-grouped entries, newest first.`,e),n=c)})}),Rc=/\[\[[^[\]\n]+\]\]/g,Rd=Rt("no-wiki-links",(e,t)=>{let n="string"==typeof t.value?t.value:String(t.value);xT(e,"text",e=>{let r=e.position?.start,i=e.position?.end,o=r?.offset,s=void 0===o||i?.offset===void 0?e.value:n.slice(o,i.offset),a=0,l=r?.line??0,c=r?.column??0,d=e=>{for(;a<e;a+=1)"\n"===s[a]?(l+=1,c=1):c+=1;return{line:l,column:c}
154};for(let e of s.matchAll(Rc)){let{index:i}=e;if((void 0===o?s[i-1]:n[o+i-1])==="!")continue;let a=r&&void 0!==o?{start:d(i),end:d(i+e[0].length)}:void 0;t.message(function(e){let t=`Wiki-link ${e} won't resolve for an external Open Knowledge Format consumer â it renders as literal text and its graph edge is lost.`;return e.includes("|")?`${t} The alias "|" also splits a GFM table cell.`:t}(e[0]),a)}})}),Ru=["index","log"],Rh=[{id:"no-wiki-links",rule:Rd},{id:"log-shape",rule:Rl},{id:"index-shape",rule:Ri},{id:"reserved-casing",rule:Rt("reserved-casing",(e,t)=>{let n=t.data.okfDocName;if(void 0===n)return;let r=function(e){let t=e.slice(e.lastIndexOf("/")+1),n=t.lastIndexOf(".");if(n<=0)return t;let r=t.slice(n).toLowerCase();return Nz.includes(r)?t.slice(0,n):t}(n),i=r.toLowerCase();Ru.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)})}],Rp=Rh.map(e=>e.rule),Rf=ea.z.union([ea.z.boolean(),ea.z.enum(["error","warning"]),ea.z.record(ea.z.string(),ea.z.unknown())]),Rm={id:"markdownlint",sliceSchema:ea.z.object({enabled:ea.z.boolean(),rules:ea.z.record(ea.z.string(),Rf)}),defaultSlice:{enabled:!1,rules:DK},lint:async(e,t)=>{var n,r;let i,o,s,a;return i=_f({strings:{doc:e},config:n=t.rules??DK}).doc??[],o=e.split("\n"),r=n,a=new Map,Object.entries(r).forEach(([e,t],n)=>{let r=e.toUpperCase();if("DEFAULT"===r)return;let i=null;if("error"===t||"warning"===t)i=t;else if(null!==t&&"object"==typeof t&&!Array.isArray(t)){let e=t.severity;("error"===e||"warning"===e)&&(i=e)}null!==i&&a.set(r,{entryIndex:n,severity:i})}),s=a,i.map(e=>(function(e,t,n){let[r,i]=e.errorRange??[1,null],o=e.lineNumber-1,s=(r??1)-1,a=t[o]?.length??0,l=null==i?a:Math.min(s+i,a),c=e.fixInfo?[function(e,t,n){let r=e.lineNumber??t,i=r-1;if(-1===e.deleteCount){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:""};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:""}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:""}}let o=(e.editColumn??1)-1;return{range:{start:{line:i,character:o},end:{line:i,character:o+Math.max(0,e.deleteCount??0)}},newText:e.insertText??""}}(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:o,character:s},end:{line:o,character:Math.max(l,s)}},severity:n,source:"markdownlint",code:e.ruleNames[0]??"MD000",message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...c?{fixes:c}:{}}})(e,o,function(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());void 0!==e&&(void 0===n||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??"warning"}(e,s)))},fix:(e,t)=>{let n;return n=_f({strings:{doc:e},config:t.rules??DK}),function(e,t){let n=CA.getPreferredLineEnding(e,CC),r=e.split(CA.newLineRe),i=t.filter(e=>e.fixInfo).map(e=>_m(e.fixInfo,e.lineNumber));i.sort((e,t)=>{let n=-1===e.deleteCount,r=-1===t.deleteCount;return t.lineNumber-e.lineNumber||(n?1:r?-1:0)||t.editColumn-e.editColumn||t.insertText.length-e.insertText.length});let o={};for(let e of(i=i.filter(e=>{let t=e.lineNumber!==o.lineNumber||e.editColumn!==o.editColumn||e.deleteCount!==o.deleteCount||e.insertText!==o.insertText;return o=e,t}),o={lineNumber:-1},i))e.lineNumber===o.lineNumber&&e.editColumn===o.editColumn&&!e.insertText&&e.deleteCount>0&&o.insertText&&!o.deleteCount&&(e.insertText=o.insertText,o.lineNumber=0),o=e;i=i.filter(e=>e.lineNumber);let s=-1,a=-1;for(let e of i){let{lineNumber:t,editColumn:i,deleteCount:o}=e,l=t-1,c=i-1;(l!==s||-1===o||c+o<=a-(o>0?0:1))&&(r[l]=function(e,t,n="\n"){let{editColumn:r,deleteCount:i,insertText:o}=_m(t),s=r-1;return -1===i?null:e.slice(0,s)+o.replace(/\n/g,n)+e.slice(s+i)}(r[l],e,n)),s=l,a=c}return r.filter(e=>null!==e).join(n)}(e,n.doc??[])}},Rg=ea.z.object({appliesTo:ea.z.union([ea.z.string(),ea.z.array(ea.z.string())]).optional(),file:ea.z.string(),enabled:ea.z.boolean().optional(),key:ea.z.string().optional(),schema:ea.z.record(ea.z.string(),ea.z.unknown()).optional()}),Ry=[Rm,{id:"frontmatter",sliceSchema:ea.z.object({enabled:ea.z.boolean(),schemas:ea.z.array(Rg)}),defaultSlice:{enabled:!1,schemas:[]},lint:async(e,t,n)=>D4(e,DY(t.schemas,n.docName)),frontmatter:{schemasForDoc:(e,t)=>DY(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:"okf",sliceSchema:ea.z.object({enabled:ea.z.boolean(),rules:ea.z.record(ea.z.string(),ea.z.boolean()).optional(),generate:ea.z.object({index:ea.z.boolean().optional()}).optional()}),defaultSlice:{enabled:!1},lint:async(e,t,n)=>{var r;let i;return[...function(e,t,n){if(0===t.length)return[];let r=E3().use(SE).use(ES).use(TS,["yaml"]);for(let e of t)r.use(e);let i=new k0({value:e});void 0!==n&&(i.data.okfDocName=n);let o=r.parse(i);r.runSync(o,i);let s=e.split("\n");return i.messages.map(e=>({range:function(e,t){if(e&&"start"in e)return{start:Rr(e.start),end:Rr(e.end)};if(e){let n=Rr(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}(e.place,s),severity:"warning",source:"okf",code:e.ruleId??"okf",message:e.reason}))}(e,void 0===(r=t.rules)?Rp:Rh.filter(e=>{var t;return t=e.id,r?.[t]!==!1}).map(e=>e.rule),n.docName),...0===(i=Re(t.rules,n.docName)).length?[]:D4(e,i.map(e=>({file:D6(e.id),schema:e.schema,ruleId:e.id})),{source:"okf"})]},frontmatter:{schemasForDoc:(e,t)=>Re(e.rules,t),narrowSliceToFrontmatter:e=>
154({...e,rules:{...e.rules,...D7}}),advertisedMappings:e=>{var t;return t=e.rules,D9.filter(e=>{var n;return n=e.id,t?.[n]!==!1}).map(e=>({appliesTo:[...e.appliesTo],file:D6(e.id)}))}}}];Object.fromEntries(Ry.map(e=>[e.id,e.defaultSlice])),ea.z.object({docName:OL,summary:O$,content:ea.z.string().optional(),...Oj}).loose(),ea.z.object({docName:OL,summary:O$,markdown:ea.z.string(),position:ea.z.enum(["append","prepend","replace"]).optional(),extension:ea.z.enum(Nz).optional(),...Oj}).loose(),ea.z.object({docName:OL,summary:O$,find:ea.z.string().min(1),replace:ea.z.string(),offset:ea.z.number().int().nonnegative().optional(),...Oj}).loose(),ea.z.object({docName:OL,connectionId:ea.z.string().min(1),scope:ea.z.enum(["last","session","file","count"]).optional(),count:ea.z.number().int().positive().optional(),...Oj}).loose().refine(e=>"count"!==e.scope||void 0!==e.count,{message:"count is required when scope is 'count'",path:["count"]});let Rb=ea.z.object({value:ea.z.string(),truncatedFrom:ea.z.number().int().nonnegative().optional(),hint:ea.z.string().optional()}).loose(),Rv=ea.z.discriminatedUnion("kind",[ea.z.object({kind:ea.z.literal("inline"),content:ea.z.string()}),ea.z.object({kind:ea.z.literal("truncated"),byteLength:ea.z.number().int().nonnegative(),hint:ea.z.string()})]),Rk=ea.z.object({kind:ea.z.literal("content-divergence"),intendedBytes:ea.z.number().int().nonnegative(),actualBytes:ea.z.number().int().nonnegative(),byteDelta:ea.z.number().int(),divergenceType:ea.z.string().optional(),currentState:Rv.optional(),hint:ea.z.string().optional()}).loose(),Rx=ea.z.object({type:ea.z.literal("orphan"),parentCandidates:ea.z.array(ea.z.string()),message:ea.z.string()}).loose(),Rw=ea.z.object({kind:ea.z.literal("disk-edit-reconciled"),intendedBytes:ea.z.number().int().nonnegative(),actualBytes:ea.z.number().int().nonnegative(),byteDelta:ea.z.number().int(),mergeOutcome:ea.z.string().optional(),hint:ea.z.string().optional()}).loose();ea.z.discriminatedUnion("kind",[Rk,Rw]);let RE=ea.z.object({kind:ea.z.literal("mermaid-parse-error"),fenceIndex:ea.z.number().int().positive(),fenceFirstLine:ea.z.string(),message:ea.z.string(),line:ea.z.number().int().positive().optional()}).loose(),RT=ea.z.object({href:ea.z.string(),targetKind:ea.z.string(),role:ea.z.string(),sourceForm:ea.z.string(),resolvedTarget:ea.z.string().nullable(),reason:ea.z.string(),resolutionMethod:ea.z.string(),fallbackTarget:ea.z.string().nullable().optional(),definition:ea.z.object({line:ea.z.number().int().nonnegative(),label:ea.z.string()}).loose().optional()}).loose(),RS=ea.z.object({kind:ea.z.literal("lint-violation"),source:ea.z.string(),code:ea.z.string(),message:ea.z.string(),severity:ea.z.enum(["error","warning","info","hint"]),line:ea.z.number().int().positive(),column:ea.z.number().int().positive(),linkTarget:ea.z.string().optional(),localTarget:RT.optional()}).loose(),RC=ea.z.discriminatedUnion("kind",[Rk,Rw,RE,RS]),RA=ea.z.array(RC).min(1),R_=ea.z.object({href:ea.z.string(),resolvedTo:ea.z.string().nullable(),reason:ea.z.enum(["no-such-doc","no-such-file","unresolvable"]),localTarget:RT.optional()}).loose(),RN=ea.z.array(R_),RO=ea.z.object({reason:ea.z.string().min(1),count:ea.z.number().int().positive()}).loose();ea.z.object({timestamp:ea.z.string().min(1),summary:Rb.optional(),warnings:RA.optional()}).loose(),ea.z.object({timestamp:ea.z.string().min(1),subscriberCount:ea.z.number().int().nonnegative(),systemSubscriberCount:ea.z.number().int().nonnegative(),hints:ea.z.array(Rx).optional(),summary:Rb.optional(),warnings:RA.optional(),brokenLinks:RN,brokenLinkSuppression:RO.optional()}).loose(),ea.z.object({timestamp:ea.z.string().min(1),subscriberCount:ea.z.number().int().nonnegative(),systemSubscriberCount:ea.z.number().int().nonnegative(),summary:Rb.optional(),warnings:RA.optional(),brokenLinks:RN,brokenLinkSuppression:RO.optional()}).loose(),ea.z.object({docName:ea.z.string().min(1),scope:ea.z.enum(["last","session","count"]),undone:ea.z.boolean()}).loose();let RM=ea.z.object({docName:OP,markdown:ea.z.string(),position:ea.z.enum(["append","prepend","replace"]).optional(),extension:ea.z.enum(Nz).optional(),summary:O$}).loose();ea.z.object({docs:ea.z.array(RM).min(1).max(100),...Oj}).loose();let RI=ea.z.object({type:OX,title:ea.z.string(),detail:ea.z.string().optional()}).loose(),RD=ea.z.discriminatedUnion("status",[ea.z.object({status:ea.z.literal("written"),docName:ea.z.string().min(1),summary:Rb.optional(),warnings:RA.optional(),brokenLinks:RN,brokenLinkSuppression:RO.optional()}).loose(),ea.z.object({status:ea.z.literal("error"),docName:ea.z.string().min(1),error:RI}).loose()]);ea.z.object({timestamp:ea.z.string().min(1),results:ea.z.array(RD),written:ea.z.number().int().nonnegative(),failed:ea.z.number().int().nonnegative()}).loose(),ea.z.object({docName:OL,patch:ea.z.record(ea.z.string(),ea.z.union([rV,ea.z.null()])),types:ea.z.record(ea.z.string(),ea.z.enum(rB)).optional(),summary:O$,...Oj}).loose(),ea.z.object({timestamp:ea.z.string().min(1),subscriberCount:ea.z.number().int().nonnegative(),systemSubscriberCount:ea.z.number().int().nonnegative(),appliedKeys:ea.z.array(ea.z.string()),summary:Rb.optional(),warnings:RA.optional(),brokenLinks:RN,brokenLinkSuppression:RO.optional()}).loose();let RR=Object.fromEntries(Ry.map(e=>[e.id,e.sliceSchema])),Rz=ea.z.object({enabled:ea.z.boolean(),plugins:ea.z.object(RR)});ea.z.object({effective:Rz,configFile:ea.z.string().nullable().optional(),configProblems:ea.z.array(ea.z.string()).optional()});let RL=ea.z.union([ea.z.boolean(),ea.z.record(ea.z.string(),ea.z.unknown())]),RP=new Set(["__proto__"]),Rj=ea.z.string().min(1).max(256).refine(e=>!RP.has(e),{message:"schema property name cannot be __proto__"});ea.z.object({ruleId:ea.z.string().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:ea.z.union([RL,ea.z.null()])}),ea.z.object({file:ea.z.string().min(1).max(512),delete:ea.z.literal(!0).optional(),field:Rj.optional(),parentPath:ea.z.array(ea.z.union([Rj,ea.z.object({items:ea.z.literal(!0)}).strict()])).max(8).optional(),removeField:ea.z.literal(!0).optional(),renameTo:Rj.optional(),constraint:ea.z.object({type:ea.z.enum(["string","number","boolean","array","object"]).nullable().optional(),enum:ea.z.array(ea.z.union([ea.z.string(),ea.z.number(),ea.z.boolean()])).nullable().optional(),itemsEnum:ea.z.array(ea.z.union([ea.z.string(),ea.z.number(),ea.z.boolean()])).nullable().optional(),itemsType:ea.z.enum(["string","number","boolean","object"]).nullable().optional(),pattern:ea.z.string().nullable().optional(),format:ea.z.string().nullable().optional(),description:ea.z.string().max(2048).nullable().optional(),required:ea.z.boolean().optional()}).optional()}).refine(e=>void 0===e.delete||void 0===e.field&&void 0===e.constraint&&void 0===e.removeField&&void 0===e.renameTo,{message:"delete cannot be combined with a field edit"}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>void 0!==e).length<=1,{message:"constraint, removeField, and renameTo are mutually exclusive"}).refine(e=>void 0===e.removeField&&void 0===e.renameTo||void 0!==e.field,{message:"removeField and renameTo require field"}).refine(e=>void 0===e.parentPath||void 0!==e.field,{message:"parentPath requires field"}).refine(e=>void 0===e.field?void 0===e.constraint:void 0!==e.constraint||void 0!==e.removeField||void 0!==e.renameTo,{message:"field requires constraint, removeField, or renameTo"}),ea.z.object({schemas:ea.z.array(ea.z.string()),truncated:ea.z.boolean()}).strict();let R$=ea.z.object({line:ea.z.number(),character:ea.z.number()}),RF=ea.z.object({start:R$,end:R$}),RB=ea.z.object({range:RF,severity:ea.z.enum(["error","warning","info","hint"]),source:ea.z.string(),code:ea.z.string(),message:ea.z.string(),fixes:ea.z.array(ea.z.object({range:RF,newText:ea.z.string()}
154)).optional(),frontmatterScope:ea.z.enum(["missing","invalid"]).optional(),frontmatterProperty:ea.z.string().optional()}),RH=ea.z.array(ea.z.string()).optional(),RU=ea.z.object({file:ea.z.string(),diagnostics:ea.z.array(RB),ran:RH,warnings:ea.z.array(ea.z.string()).optional()});ea.z.object({files:ea.z.array(RU),fileCount:ea.z.number(),errorCount:ea.z.number(),warningCount:ea.z.number(),warnings:ea.z.array(ea.z.string()),ran:RH});let RV=RB.extend({linkTarget:ea.z.string().optional(),localTarget:RT.optional()}),Rq=ea.z.object({file:ea.z.string(),diagnostics:ea.z.array(RV)});ea.z.object({files:ea.z.array(Rq),fileCount:ea.z.number(),errorCount:ea.z.number(),warningCount:ea.z.number(),warnings:ea.z.array(ea.z.string()),ran:RH,brokenLinkSuppression:RO.optional()});let RG=ea.z.object({errorCount:ea.z.number().int().nonnegative(),warningCount:ea.z.number().int().nonnegative()}),RW=ea.z.object({file:ea.z.string(),lint:RG,links:RG});ea.z.object({files:ea.z.array(RW),fileCount:ea.z.number().int().nonnegative(),errorCount:ea.z.number().int().nonnegative(),warningCount:ea.z.number().int().nonnegative(),warnings:ea.z.array(ea.z.string()),brokenLinkSuppression:RO.optional()}),ea.z.object({docName:OL,summary:O$,...Oj}).loose();let RK=ea.z.object({reason:ea.z.enum(["re-lint-threw","source-went-blind"]),message:ea.z.string().min(1)});ea.z.object({file:ea.z.string(),fixedCount:ea.z.number(),diagnostics:ea.z.array(RB),errorCount:ea.z.number(),warningCount:ea.z.number(),ran:RH,warnings:ea.z.array(ea.z.string()).optional(),diagnosticsArePreFix:ea.z.boolean().optional(),reLintFailure:RK.optional()});let RJ=[{id:"MD001",alias:"heading-increment",aliases:["heading-increment"],name:"Heading levels should only increment by one level at a time",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md",tags:["headings"],options:[{key:"front_matter_title",type:"string",description:"RegExp for matching title in front matter",default:"^\\s*title\\s*[:=]"}]},{id:"MD003",alias:"heading-style",aliases:["heading-style"],name:"Heading style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md",tags:["headings"],options:[{key:"style",type:"enum",description:"Heading style",enum:["consistent","atx","atx_closed","setext","setext_with_atx","setext_with_atx_closed"],default:"consistent"}]},{id:"MD004",alias:"ul-style",aliases:["ul-style"],name:"Unordered list style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md",tags:["bullet","ul"],options:[{key:"style",type:"enum",description:"List style",enum:["consistent","asterisk","plus","dash","sublist"],default:"consistent"}]},{id:"MD005",alias:"list-indent",aliases:["list-indent"],name:"Inconsistent indentation for list items at the same level",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md",tags:["bullet","ul","indentation"],options:[]},{id:"MD007",alias:"ul-indent",aliases:["ul-indent"],name:"Unordered list indentation",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md",tags:["bullet","ul","indentation"],options:[{key:"indent",type:"integer",description:"Spaces for indent",default:2,minimum:1},{key:"start_indented",type:"boolean",description:"Whether to indent the first level of the list",default:!1},{key:"start_indent",type:"integer",description:"Spaces for first level indent (when start_indented is set)",default:2,minimum:1}]},{id:"MD009",alias:"no-trailing-spaces",aliases:["no-trailing-spaces"],name:"Trailing spaces",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md",tags:["whitespace"],options:[{key:"br_spaces",type:"integer",description:"Spaces for line break",default:2,minimum:0},{key:"code_blocks",type:"boolean",description:"Include code blocks",default:!1},{key:"list_item_empty_lines",type:"boolean",description:"Allow spaces for empty lines in list items",default:!1},{key:"strict",type:"boolean",description:"Include unnecessary breaks",default:!1}]},{id:"MD010",alias:"no-hard-tabs",aliases:["no-hard-tabs"],name:"Hard tabs",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md",tags:["whitespace","hard_tab"],options:[{key:"code_blocks",type:"boolean",description:"Include code blocks",default:!0},{key:"ignore_code_languages",type:"string-array",description:"Fenced code languages to ignore",default:[]},{key:"spaces_per_tab",type:"integer",description:"Number of space
154s for each hard tab",default:1,minimum:0}]},{id:"MD011",alias:"no-reversed-links",aliases:["no-reversed-links"],name:"Reversed link syntax",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md",tags:["links"],options:[]},{id:"MD012",alias:"no-multiple-blanks",aliases:["no-multiple-blanks"],name:"Multiple consecutive blank lines",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md",tags:["whitespace","blank_lines"],options:[{key:"maximum",type:"integer",description:"Consecutive blank lines",default:1,minimum:1}]},{id:"MD013",alias:"line-length",aliases:["line-length"],name:"Line length",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md",tags:["line_length"],options:[{key:"line_length",type:"integer",description:"Number of characters",default:80,minimum:1},{key:"heading_line_length",type:"integer",description:"Number of characters for headings",default:80,minimum:1},{key:"code_block_line_length",type:"integer",description:"Number of characters for code blocks",default:80,minimum:1},{key:"code_blocks",type:"boolean",description:"Include code blocks",default:!0},{key:"tables",type:"boolean",description:"Include tables",default:!0},{key:"headings",type:"boolean",description:"Include headings",default:!0},{key:"strict",type:"boolean",description:"Strict length checking",default:!1},{key:"stern",type:"boolean",description:"Stern length checking",default:!1}]},{id:"MD014",alias:"commands-show-output",aliases:["commands-show-output"],name:"Dollar signs used before commands without showing output",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md",tags:["code"],options:[]},{id:"MD018",alias:"no-missing-space-atx",aliases:["no-missing-space-atx"],name:"No space after hash on atx style heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md",tags:["headings","atx","spaces"],options:[]},{id:"MD019",alias:"no-multiple-space-atx",aliases:["no-multiple-space-atx"],name:"Multiple spaces after hash on atx style heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md",tags:["headings","atx","spaces"],options:[]},{id:"MD020",alias:"no-missing-space-closed-atx",aliases:["no-missing-space-closed-atx"],name:"No space inside hashes on closed atx style heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md",tags:["headings","spaces","atx_closed"],options:[]},{id:"MD021",alias:"no-multiple-space-closed-atx",aliases:["no-multiple-space-closed-atx"],name:"Multiple spaces inside hashes on closed atx style heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md",tags:["headings","spaces","atx_closed"],options:[]},{id:"MD022",alias:"blanks-around-headings",aliases:["blanks-around-headings"],name:"Headings should be surrounded by blank lines",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md",tags:["headings","blank_lines"],options:[{key:"include_front_matter",type:"boolean",description:"Include front matter content",default:!1},{key:"lines_above",type:"unsupported",description:"Blank lines above heading",default:1},{key:"lines_below",type:"unsupported",description:"Blank lines below heading",default:1}]},{id:"MD023",alias:"heading-start-left",aliases:["heading-start-left"],name:"Headings must start at the beginning of the line",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md",tags:["headings","spaces"],options:[]},{id:"MD024",alias:"no-duplicate-heading",aliases:["no-duplicate-heading"],name:"Multiple headings with the same content",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md",tags:["headings"],options:[{key:"siblings_only",type:"boolean",description:"Only check sibling headings",default:!1}]},{id:"MD025",alias:"single-title",aliases:["single-title","single-h1"],name:"Multiple top-level headings in the same document",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md",tags:["headings"],options:[{key:"front_matter_title",type:"string",description:"RegExp for matching title in front matter",default:"^\\s*title\\s*[:=]"},{key:"level",type:"integer",description:"Heading level",default:1,minimum:1,maximum:6}]},{id:"MD026",alias:"no-trailing-punctuation",aliases:["no-trailing-punctuation"],name:"Trailing punctuation in heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md",tags:["headings"],options:[{key:"punctuation",type:"string",description:"Punctuation characters",default:".,;:!ãï¼ï¼ï¼ï¼"}]},{id:"MD027",alias:"no-multiple-space-blockquote",aliases:["no-multiple-space-blockquote"],name:"Multiple spaces after blockquote symbol",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md",tags:["indentation","whitespace","blockquote"],options:[{key:"list_items",type:"boolean",description:"Include list items",default:!0}]},{id:"MD028",alias:"no-blanks-blockquote",aliases:["no-blanks-blockquote"],name:"Blank line inside blockquote",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md",tags:["whitespace","blockquote"],options:[]},{id:"MD029",alias:"ol-prefix",aliases:["ol-prefix"],name:"Ordered list item prefix",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md",tags:["ol"],options:[{key:"style",type:"enum",description:"List style",enum:["one","ordered","one_or_ordered","zero"],default:"one_or_ordered"}]},{id:"MD030",alias:"list-marker-space",aliases:["list-marker-space"],name:"Space
154s after list markers",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md",tags:["ul","whitespace","ol"],options:[{key:"ul_single",type:"integer",description:"Spaces for single-line unordered list items",default:1,minimum:1},{key:"ol_single",type:"integer",description:"Spaces for single-line ordered list items",default:1,minimum:1},{key:"ul_multi",type:"integer",description:"Spaces for multi-line unordered list items",default:1,minimum:1},{key:"ol_multi",type:"integer",description:"Spaces for multi-line ordered list items",default:1,minimum:1}]},{id:"MD031",alias:"blanks-around-fences",aliases:["blanks-around-fences"],name:"Fenced code blocks should be surrounded by blank lines",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md",tags:["blank_lines","code"],options:[{key:"list_items",type:"boolean",description:"Include list items",default:!0}]},{id:"MD032",alias:"blanks-around-lists",aliases:["blanks-around-lists"],name:"Lists should be surrounded by blank lines",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md",tags:["bullet","ul","blank_lines","ol"],options:[]},{id:"MD033",alias:"no-inline-html",aliases:["no-inline-html"],name:"Inline HTML",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md",tags:["html"],options:[{key:"allowed_elements",type:"string-array",description:"Allowed elements",default:[]},{key:"table_allowed_elements",type:"string-array",description:"Allowed elements in tables",default:[]}]},{id:"MD034",alias:"no-bare-urls",aliases:["no-bare-urls"],name:"Bare URL used",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md",tags:["links","url"],options:[]},{id:"MD035",alias:"hr-style",aliases:["hr-style"],name:"Horizontal rule style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md",tags:["hr"],options:[{key:"style",type:"string",description:"Horizontal rule style",default:"consistent"}]},{id:"MD036",alias:"no-emphasis-as-heading",aliases:["no-emphasis-as-heading"],name:"Emphasis used instead of a heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md",tags:["headings","emphasis"],options:[{key:"punctuation",type:"string",description:"Punctuation characters",default:".,;:!?ãï¼ï¼ï¼ï¼ï¼"}]},{id:"MD037",alias:"no-space-in-emphasis",aliases:["no-space-in-emphasis"],name:"Spaces inside emphasis markers",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md",tags:["whitespace","emphasis"],options:[]},{id:"MD038",alias:"no-space-in-code",aliases:["no-space-in-code"],name:"Spaces inside code span elements",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md",tags:["whitespace","code"],options:[]},{id:"MD039",alias:"no-space-in-links",aliases:["no-space-in-links"],name:"Spaces inside link text",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md",tags:["whitespace","links"],options:[]},{id:"MD040",alias:"fenced-code-language",aliases:["fenced-code-language"],name:"Fenced code blocks should have a language specified",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md",tags:["code","language"],options:[{key:"allowed_languages",type:"string-array",description:"List of languages",default:[]},{key:"language_only",type:"boolean",description:"Require language only",default:!1}]},{id:"MD041",alias:"first-line-heading",aliases:["first-line-heading","first-line-h1"],name:"First line in a file should be a top-level heading",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md",tags:["headings"],options:[{key:"allow_preamble",type:"boolean",description:"Allow content before first heading",default:!1},{key:"front_matter_title",type:"string",description:"RegExp for matching title in front matter",default:"^\\s*title\\s*[:=]"},{key:"level",type:"integer",description:"Heading level",default:1,minimum:1,maximum:6}]},{id:"MD042",alias:"no-empty-links",aliases:["no-empty-links"],name:"No empty links",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md",tags:["links"],options:[]},{id:"MD043",alias:"required-headings",aliases:["required-headings"],name:"Required heading structure",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md",tags:["headings"],options:[{key:"headings",type:"string-array",description:"List of headings",default:[]},{key:"match_case",type:"boolean",description:"Match case of headings",default:!1}]},{id:"MD044",alias:"proper-names",aliases:["proper-names"],name:"Proper names should have the correct capitalization",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md",tags:["spelling"],options:[{key:"names",type:"string-array",description:"List of proper names",default:[]},{key:"code_blocks",type:"boolean",description:"Include code blocks",default:!0},{key:"html_elements",type:"boolean",description:"Include HTML elements",default:!0}]},{id:"MD045",alias:"no-alt-text",aliases:["no-alt-text"],name:"Images should have alternate text (alt text)",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md",tags:["accessibility","images"],options:[]},{id:"MD046",alias:"code-block-style",aliases:["code-block-style"],name:"Code block style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md",tags:["code"],options:[{key:"style",type:"enum",description:"Block style",enum:["consistent","fenced","indented"],default:"consistent"}]}
154,{id:"MD047",alias:"single-trailing-newline",aliases:["single-trailing-newline"],name:"Files should end with a single newline character",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md",tags:["blank_lines"],options:[]},{id:"MD048",alias:"code-fence-style",aliases:["code-fence-style"],name:"Code fence style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md",tags:["code"],options:[{key:"style",type:"enum",description:"Code fence style",enum:["consistent","backtick","tilde"],default:"consistent"}]},{id:"MD049",alias:"emphasis-style",aliases:["emphasis-style"],name:"Emphasis style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md",tags:["emphasis"],options:[{key:"style",type:"enum",description:"Emphasis style",enum:["consistent","asterisk","underscore"],default:"consistent"}]},{id:"MD050",alias:"strong-style",aliases:["strong-style"],name:"Strong style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md",tags:["emphasis"],options:[{key:"style",type:"enum",description:"Strong style",enum:["consistent","asterisk","underscore"],default:"consistent"}]},{id:"MD051",alias:"link-fragments",aliases:["link-fragments"],name:"Link fragments should be valid",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md",tags:["links"],options:[{key:"ignore_case",type:"boolean",description:"Ignore case of fragments",default:!1},{key:"ignored_pattern",type:"string",description:"Pattern for ignoring additional fragments",default:""}]},{id:"MD052",alias:"reference-links-images",aliases:["reference-links-images"],name:"Reference links and images should use a label that is defined",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md",tags:["links","images"],options:[{key:"ignored_labels",type:"string-array",description:"Ignored link labels",default:["x"]},{key:"shortcut_syntax",type:"boolean",description:"Include shortcut syntax",default:!1}]},{id:"MD053",alias:"link-image-reference-definitions",aliases:["link-image-reference-definitions"],name:"Link and image reference definitions should be needed",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md",tags:["links","images"],options:[{key:"ignored_definitions",type:"string-array",description:"Ignored definitions",default:["//"]}]},{id:"MD054",alias:"link-image-style",aliases:["link-image-style"],name:"Link and image style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md",tags:["links","images"],options:[{key:"autolink",type:"boolean",description:"Allow autolinks",default:!0},{key:"inline",type:"boolean",description:"Allow inline links and images",default:!0},{key:"full",type:"boolean",description:"Allow full reference links and images",default:!0},{key:"collapsed",type:"boolean",description:"Allow collapsed reference links and images",default:!0},{key:"shortcut",type:"boolean",description:"Allow shortcut reference links and images",default:!0},{key:"url_inline",type:"boolean",description:"Allow URLs as inline links",default:!0}]},{id:"MD055",alias:"table-pipe-style",aliases:["table-pipe-style"],name:"Table pipe style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md",tags:["table"],options:[{key:"style",type:"enum",description:"Table pipe style",enum:["consistent","leading_only","trailing_only","leading_and_trailing","no_leading_or_trailing"],default:"consistent"}]},{id:"MD056",alias:"table-column-count",aliases:["table-column-count"],name:"Table column count",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md",tags:["table"],options:[]},{id:"MD058",alias:"blanks-around-tables",aliases:["blanks-around-tables"],name:"Tables should be surrounded by blank lines",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md",tags:["table"],options:[]},{id:"MD059",alias:"descriptive-link-text",aliases:["descriptive-link-text"],name:"Link text should be descriptive",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md",tags:["links","accessibility"],options:[{key:"prohibited_texts",type:"string-array",description:"Prohibited link texts",default:["click here","here","link","more"]}]},{id:"MD060",alias:"table-column-style",aliases:["table-column-style"],name:"Table column style",docUrl:"https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md",tags:["table"],options:[{key:"style",type:"enum",description:"Table column style",enum:["any","aligned","compact","tight"],default:"any"},{key:"aligned_delimiter",type:"boolean",description:"Aligned delimiter columns",default:!1}]}],RY=new Map;for(let e of RJ)for(let t of(RY.set(e.id.toUpperCase(),e.id),e.aliases))RY.set(t.toUpperCase(),e.id);let RX=new Set(["img","video","audio","mark","u","ins"]);for(let e of(Mk.flatMap(e=>"compat"===e.surface&&RX.has(e.rendersAs)?[[e.name,e]]:[]),function(){let e=[],t=-1,n=0,r=0;for(;++t<2;){let i="<>".charCodeAt(t),o="";if(37===i&&xL("<>".charCodeAt(t+1))&&xL("<>".charCodeAt(t+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let e="<>".charCodeAt(t+1);i<56320&&e>56319&&e<57344?(o=String.fromCharCode(i,e),r=1):o="�"}else o=String.fromCharCode(i);o&&(e.push("<>".slice(n,t),encodeURIComponent(o)),n=t+r+1,o=""),r&&(t+=r,r=0)}e.join("")}(),[{tagName:"Mirror",attrName:"src",resolution:"bare-doc-name"},{tagName:"Excalidraw",attrName:"src",resolution:"doc-relative"}])){let t=Mk.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' â the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' â the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}Cb(),S3(),S4();let RQ=ea.z.object({satisfierId:ea.z.string().min(1),desired:ea.z.enum(["present","absent"])}).loose();ea.z.object({intents:ea.z.array(RQ),...Oj,summary:O$}).loose();let RZ=ea.z.object({satisfierId:ea.z.string(),agentId:ea.z.string(),piece:ea.z.string(),scope:ea.z.string(),kind:ea.z.string(),pathId:ea.z.string().optional(),desired:ea.z.enum(["present","absent"]),action:ea.z.enum(ef),errorId:ea.z.string().optional()}).loose(),R0=ea.z.object({kind:ea.z.string(),satisfierIds:ea.z.array(ea.z.string()),agentIds:ea.z.array(ea.z.string()),pathId:ea.z.string().optional(),blockedReason:ea.z.string().optional()}).loose(),R1=ea.z.object({state:ea.z.string(),strictness:ea.z.array(ea.z.enum(ed)).optional()}).loose(),R2=ea.z.object({probes:ea.z.object({env:ea.z.enum(["desktop","local-web","remote-web"]),satisfiers:ea.z.record(ea.z.string(),R1)}).loose(),detection:ea.z.object({detected:ea.z.array(ea.z.string()),probed:ea.z.boolean()}).loose()}).loose();ea.z.object({actions:ea.z.array(RZ),conflicts:ea.z.array(R0),withheld:ea.z.array(ea.z.string()),snapshot:R2}).loose();let R5=ea.z.object({level:ea.z.enum(["info","warn","error"]),message:ea.z.string().max(8192),event:ea.z.string().optional(),fields:ea.z.record(ea.z.string(),ea.z.unknown()).optional(),ts:ea.z.number().optional(),sourceId:ea.z.string().optional(),lineNumber:ea.z.number().optional()}).loose();ea.z.object({entries:ea.z.array(R5).max(100),droppedSinceLastFlush:ea.z.number().int().min(0).optional()}).loose(),ea.z.object({accepted:ea.z.number().int().min(0)}).loose();let R3=ea.z.object({exact:ea.z.string().min(1),prefix:ea.z.string(),suffix:ea.z.string(),start:ea.z.number().int().nonnegative(),end:ea.z.number().int().nonnegative()}),R4=ea.z.array(ea.z.union([ea.z.string(),ea.z.number().int().nonnegative()])),R6=ea.z.discriminatedUnion("kind",[ea.z.object({kind:ea.z.literal("body")}),ea.z.object({kind:ea.z.literal("property"),key:ea.z.string().min(1),path:R4.default([])})]).default({kind:"body"}),R8=ea.z.enum(["anchored","orphaned","resolved"]),R9=ea.z.object({threadId:ea.z.string().min(1),docName:ea.z.string().min(1),target:R6,anch
154or:R3.nullable(),state:R8,queued:ea.z.boolean(),latestComment:ea.z.string(),createdBy:ea.z.string().min(1),createdAt:ea.z.number(),updatedAt:ea.z.number().optional()}),R7=ea.z.object({docName:ea.z.string(),instruction:ea.z.string(),property:ea.z.string().nullable(),passage:ea.z.object({exact:ea.z.string(),prefix:ea.z.string(),suffix:ea.z.string()}).nullable(),anchorLost:ea.z.boolean(),passageRepeats:ea.z.boolean()}).loose(),ze=ea.z.object({threadId:ea.z.string(),ok:ea.z.literal(!0)}),zt=ea.z.object({threadId:ea.z.string(),ok:ea.z.literal(!1),error:ea.z.literal("not-found")});ea.z.object({threads:ea.z.array(R9)}).loose(),ea.z.object({meta:R9,orphaned:ea.z.boolean()}).loose(),ea.z.object({threadId:ea.z.string()}).loose(),ea.z.object({meta:R9,payload:R7}).loose(),ea.z.object({results:ea.z.array(ea.z.union([ze.extend({meta:R9,payload:R7}),zt]))}).loose(),ea.z.object({results:ea.z.array(ea.z.union([ze.extend({meta:R9}),zt]))}).loose();let zn=ea.z.object({status:ea.z.string().min(1),reason:ea.z.string()}).loose();ea.z.object({docName:ea.z.string().min(1),content:ea.z.string(),lifecycle:zn.nullable()}).loose();let zr=ea.z.object({kind:ea.z.enum(["document","asset","folder","file"]).default("document"),docName:ea.z.string().min(1).optional(),docExt:ea.z.string().min(1).default(".md"),size:ea.z.number().int().nonnegative(),modified:ea.z.string().min(1),isSymlink:ea.z.boolean().default(!1),canonicalDocName:ea.z.string().nullable().default(null),targetPath:ea.z.string().nullable().default(null),path:ea.z.string().min(1).optional(),assetExt:ea.z.string().min(1).optional(),mediaKind:ea.z.enum(["image","video","audio","pdf","text","mermaid","excalidraw"]).nullable().optional(),referencedBy:ea.z.array(ea.z.string().min(1)).optional(),hasChildren:ea.z.boolean().optional()}).loose().refine(e=>"document"===e.kind?void 0!==e.docName&&void 0===e.path&&void 0===e.assetExt&&void 0===e.mediaKind&&void 0===e.referencedBy&&void 0===e.hasChildren:"folder"===e.kind?void 0===e.docName&&void 0!==e.path&&void 0===e.assetExt&&void 0===e.mediaKind&&void 0===e.referencedBy:"file"===e.kind?void 0!==e.path&&void 0===e.mediaKind&&void 0===e.referencedBy&&void 0===e.hasChildren:void 0!==e.path&&void 0!==e.assetExt&&void 0!==e.referencedBy&&void 0===e.hasChildren,{message:"document/asset/folder/file kind must match its required fields (document â docName; asset â path+assetExt+referencedBy; folder â path only, no docName; file â path, no mediaKind/referencedBy/hasChildren)"});ea.z.object({documents:ea.z.array(zr),truncated:ea.z.boolean().optional()}).loose();let zi=ea.z.object({source:ea.z.string().min(1),anchor:ea.z.string().nullable(),title:ea.z.string(),snippet:ea.z.string().nullable()}).loose();ea.z.object({docName:ea.z.string().min(1),backlinks:ea.z.array(zi)}).loose(),ea.z.object({counts:ea.z.record(ea.z.string().min(1),ea.z.number().int().nonnegative())}).loose(),ea.z.object({counts:ea.z.record(ea.z.string().min(1),ea.z.number().int().nonnegative())}).loose();let zo=ea.z.object({kind:ea.z.literal("doc"),docName:ea.z.string().min(1),anchor:ea.z.string().nullable(),title:ea.z.string(),snippet:ea.z.string().nullable()}).loose(),zs=ea.z.object({kind:ea.z.literal("external"),url:ea.z.string().min(1),title:ea.z.string(),snippet:ea.z.string().nullable()}).loose(),za=ea.z.discriminatedUnion("kind",[zo,zs]),zl=ea.z.object({role:ea.z.string().min(1),sourceForm:ea.z.string().min(1),targetKind:ea.z.string().min(1),href:ea.z.string(),resolvedTarget:ea.z.string().nullable(),status:ea.z.string().min(1),reason:ea.z.string().nullable(),resolutionMethod:ea.z.string().min(1),fallbackTarget:ea.z.string().nullable().default(null),range:ea.z.object({start:ea.z.number().int().nonnegative(),end:ea.z.number().int().nonnegative()}),line:ea.z.number().int().nonnegative(),column:ea.z.number().int().nonnegative(),definition:ea.z.object({label:ea.z.string(),line:ea.z.number().int().nonnegative()}).nullable().default(null)}).loose();ea.z.object({docName:ea.z.string().min(1),forwardLinks:ea.z.array(za),localTargets:ea.z.array(zl).optional()}).loose();let zc=ea.z.object({id:ea.z.string().min(1),kind:ea.z.literal("doc"),docName:ea.z.string().min(1),anchor:ea.z.string().nullable(),label:ea.z.string(),cluster:ea.z.string().nullable(),category:ea.z.string().nullable(),tags:ea.z.array(ea.z.string()).nullable(),managed:ea.z.boolean().optional()}).loose(),zd=ea.z.object({id:ea.z.string().min(1),kind:ea.z.literal("external"),url:ea.z.string().min(1),label:ea.z.string()}).loose(),zu=ea.z.discriminatedUnion("kind",[zc,zd]),zh=ea.z.object({source:ea.z.string().min(1),target:ea.z.string().min(1)}).loose();ea.z.object({nodes:ea.z.array(zu),links:ea.z.array(zh)}).loose();let zp=ea.z.object({ts:ea.z.number().int().min(0),url:ea.z.string(),method:ea.z.string(),ua:ea.z.string().optional(),origin:ea.z.string().optional(),referer:ea.z.string().optional(),host:ea.z.string().optional(),remote:ea.z.string().optional(),secChUa:ea.z.string().optional(),secChUaMobile:ea.z.string().optional(),secChUaPlatform:ea.z.string().optional(),secFetchSite:ea.z.string().optional(),secFetchDest:ea.z.string().optional(),secFetchMo
154de:ea.z.string().optional(),secFetchUser:ea.z.string().optional()}).loose(),zf=ea.z.object({app:ea.z.union([ea.z.literal("cursor"),ea.z.literal("codex"),ea.z.literal("claude"),ea.z.null()]),signals_fired:ea.z.array(ea.z.string())}).loose();ea.z.object({entries:ea.z.array(zp),count:ea.z.number().int().min(0),detection:zf}).loose();let zm=ea.z.object({path:ea.z.string().min(1),code:ea.z.enum(["M","A","D","R","C","U","T","?","!"," "]),origPath:ea.z.string().min(1).optional(),syncScoped:ea.z.boolean(),open:ea.z.discriminatedUnion("kind",[ea.z.object({kind:ea.z.literal("doc"),docName:ea.z.string().min(1)}),ea.z.object({kind:ea.z.literal("asset"),path:ea.z.string().min(1)})]).optional()}).loose();ea.z.object({branch:ea.z.string().nullable(),detached:ea.z.boolean(),upstream:ea.z.string().nullable(),staged:ea.z.array(zm),notStaged:ea.z.array(zm),untracked:ea.z.array(zm),incoming:ea.z.array(zm),truncated:ea.z.boolean(),readable:ea.z.boolean().default(!0)}).loose();let zg=ea.z.object({id:ea.z.string().min(1),name:ea.z.string().optional(),email:ea.z.string().optional()}).loose();ea.z.object({writers:ea.z.array(zg).optional(),summary:O$,...Oj}).loose(),ea.z.object({checkpointRef:ea.z.string().min(1)}).loose();let zy=ea.z.object({v:ea.z.number().int().optional(),id:ea.z.string().min(1),name:ea.z.string().min(1),colorSeed:ea.z.string().optional(),docs:ea.z.array(ea.z.string()),summaries:ea.z.array(ea.z.string()).optional()}).loose(),zb=ea.z.object({sha:ea.z.string().min(1),timestamp:ea.z.string().min(1),author:ea.z.string(),authorEmail:ea.z.string(),type:ea.z.enum(["checkpoint","wip","upstream","park"]),message:ea.z.string(),contributors:ea.z.array(zy),checkpoint:ea.z.unknown().nullable(),parentSha:ea.z.string().nullable().optional()}).loose();ea.z.object({entries:ea.z.array(zb),total:ea.z.number().int().nonnegative().optional(),truncated:ea.z.boolean().optional(),hasMore:ea.z.boolean().optional()}).loose(),ea.z.object({sha:ea.z.string().regex(/^[0-9a-f]{40}$/i),content:ea.z.string(),timestamp:ea.z.string(),author:ea.z.string()}).loose(),ea.z.object({contentDir:ea.z.string().min(1),pathSeparator:ea.z.enum(["/","\\"]),symlinkResolved:ea.z.boolean()}).loose();let zv=ea.z.object({docName:ea.z.string().min(1),timestamp:ea.z.string().min(1),size:ea.z.number().int().nonnegative(),source:ea.z.literal("flat")}).loose(),zk=ea.z.object({docName:ea.z.string().min(1),timestamp:ea.z.string().min(1),source:ea.z.literal("timeline"),sha:ea.z.string().min(1)}).loose();ea.z.array(ea.z.discriminatedUnion("source",[zv,zk])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});let zx=ea.z.object({domain:ea.z.string().min(1),title:ea.z.string().optional(),description:ea.z.string().optional(),siteName:ea.z.string().optional(),faviconDataUri:ea.z.string().optional()}).loose();ea.z.object({url:ea.z.string()}).loose(),ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),metadata:zx}).loose(),ea.z.object({ok:ea.z.literal(!1),reason:ea.z.string()}).loose()]);let zw=ea.z.object({docName:ea.z.string().min(1),title:ea.z.string()}).loose();ea.z.object({orphans:ea.z.array(zw)}).loose();let zE=ea.z.object({docName:ea.z.string().min(1),title:ea.z.string(),count:ea.z.number().int().nonnegative()}).loose();ea.z.object({hubs:ea.z.array(zE)}).loose();let zT=ea.z.object({source:ea.z.string().min(1),title:ea.z.string(),snippet:ea.z.string().nullable()}).loose(),zS=ea.z.object({target:ea.z.string().min(1),sources:ea.z.array(zT)}).loose();ea.z.object({deadLinks:ea.z.array(zS)}).loose();let zC=ea.z.object({docName:ea.z.string().min(1),title:ea.z.string(),aliases:ea.z.array(ea.z.string())}).loose(),zA=ea.z.object({source:ea.z.string().min(1),excerpt:ea.z.string(),offset:ea.z.number().int().nonnegative()}).loose();ea.z.object({target:zC,mentions:ea.z.array(zA),truncated:ea.z.boolean()}).loose(),ea.z.object({projectPath:ea.z.string().min(1)}).loose();let z_=ea.z.enum(["not-a-git-worktree","init-failed"]);ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),projectPath:ea.z.string().min(1)}).loose(),ea.z.object({ok:ea.z.literal(!1),reason:z_,message:ea.z.string().min(1)}).loose()]),ea.z.object({host:ea.z.string().min(1).optional()}).loose(),ea.z.object({host:ea.z.string().min(1).optional(),token:ea.z.string().min(1)}).loose(),ea.z.object({host:ea.z.string(),login:ea.z.string()}).loose(),ea.z.object({key:ea.z.string().min(1)}).loose(),ea.z.object({keyPresent:ea.z.boolean()}).loose();
154let zN=ea.z.enum(["no_key","invalid_endpoint","rate_limit","timeout","http_error","network","dims_mismatch","malformed_response"]);ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),endpoint:ea.z.string().min(1),model:ea.z.string().min(1),dimensions:ea.z.number().int().positive()}).loose(),ea.z.object({ok:ea.z.literal(!1),endpoint:ea.z.string().min(1),model:ea.z.string().min(1),reason:zN,status:ea.z.number().int().optional()}).loose()]),ea.z.object({name:ea.z.string().refine(e=>e.trim().length>0,{message:"name must be non-empty"}),email:ea.z.string().refine(e=>e.trim().length>0,{message:"email must be non-empty"})}).loose(),ea.z.object({authenticated:ea.z.boolean()}).loose(),ea.z.object({channel:ea.z.enum(["login","gh-login"]).default("login")}).loose(),ea.z.object({}).loose();let zO=ea.z.object({stackIndex:ea.z.number().int().min(0),ts:ea.z.number().int().min(0),additions:ea.z.number().int().min(0),deletions:ea.z.number().int().min(0)}).loose(),zM=ea.z.object({docName:ea.z.string().min(1),additionsTotal:ea.z.number().int().min(0),deletionsTotal:ea.z.number().int().min(0),lastTs:ea.z.number().int().min(0),bursts:ea.z.array(zO)}).loose(),zI=ea.z.object({displayName:ea.z.string().min(1),color:ea.z.string().min(1),icon:ea.z.string().optional(),connectionId:ea.z.string().min(1)}).loose();ea.z.object({sessionAlive:ea.z.boolean(),agent:zI.nullable(),files:ea.z.array(zM)}).loose(),ea.z.object({diff:ea.z.string(),before:ea.z.string(),after:ea.z.string(),properties:OR,generatedAt:ea.z.number().int().min(0)}).loose(),ea.z.object({}).loose(),ea.z.object({}).loose(),ea.z.object({}).loose(),ea.z.object({}).loose(),ea.z.object({}).loose(),ea.z.object({}).loose();let zD=ea.z.object({displayName:ea.z.string().min(1),icon:ea.z.string(),color:ea.z.string().min(1),currentDoc:ea.z.string().nullable(),mode:ea.z.enum(["idle","writing"]),ts:ea.z.number().int().min(0)}).loose();ea.z.object({presence:ea.z.record(ea.z.string().min(1),zD)}).loose();let zR=ea.z.object({sessionId:ea.z.string().min(1),agentType:ea.z.string().min(1),ts:ea.z.number().int().min(0),insertedChars:ea.z.number().int().min(0),deletedChars:ea.z.number().int().min(0)}).loose(),zz=ea.z.object({"doc.name":ea.z.string().min(1),entries:ea.z.array(zR)}).loose();ea.z.object({effects:ea.z.array(zz)}).loose();let zL=ea.z.object({ts:ea.z.number().int().min(0),decision:ea.z.string().min(1),kind:ea.z.string().min(1),"doc.name":ea.z.string().min(1),pathRole:ea.z.string().min(1)}).loose();ea.z.object({decisions:ea.z.array(zL)}).loose(),ea.z.record(ea.z.string().min(1),ea.z.boolean()).meta({description:"Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed."}),ea.z.object({path:ea.z.string().min(1,"path must be non-empty")}).loose(),ea.z.object({}).loose();let zP=ea.z.object({fromDocName:ea.z.string().min(1),toDocName:ea.z.string().min(1)}).loose(),zj=ea.z.object({fromPath:ea.z.string().min(1),toPath:ea.z.string().min(1)}).loose();ea.z.object({}).loose(),ea.z.object({path:ea.z.string().min(1),...Oj,summary:O$}).loose(),ea.z.object({docName:ea.z.string().min(1)}).loose(),ea.z.object({path:ea.z.string().min(1),...Oj,summary:O$}).loose(),ea.z.object({path:ea.z.string().min(1)}).loose(),ea.z.object({kind:ea.z.enum(["file","folder"]),path:ea.z.string().min(1),...Oj,summary:O$}).loose(),ea.z.object({kind:ea.z.enum(["file","folder"]),path:ea.z.string().min(1),duplicatedDocNames:ea.z.array(ea.z.string().min(1))}).loose();let z$=ea.z.object({docName:ea.z.string().min(1),title:ea.z.string(),docExt:ea.z.string().min(1),size:ea.z.number().int().nonnegative(),modified:ea.z.string().min(1),icon:ea.z.string().min(1).max(2048).optional()}).loose();ea.z.object({pages:ea.z.array(z$)}).loose();let zF=ea.z.object({level:ea.z.number().int().min(1).max(6),text:ea.z.string(),slug:ea.z.string()}).loose();ea.z.object({docName:ea.z.string().min(1),headings:ea.z.array(zF)}).loose();let zB=ea.z.object({docName:ea.z.string().min(1),rewrites:ea.z.number().int().nonnegative()}).loose();ea.z.object({kind:ea.z.enum(["file","folder","asset"]),fromPath:ea.z.string().min(1),toPath:ea.z.string().min(1),...Oj,summary:O$}).loose(),ea.z.object({renamed:ea.z.array(zP),renamedAssets:ea.z.array(zj),rewrittenDocs:ea.z.array(zB).optional(),summary:Rb.optional()}).loose(),ea.z.object({kind:ea.z.enum(["file","folder","asset"]),path:ea.z.string().min(1),...Oj}).loose(),ea.z.object({deletedDocNames:ea.z.array(ea.z.string().min(1))}).loose(),ea.z.object({kind:ea.z.enum(["file","folder","asset"]),path:ea.z.string().min(1),...Oj,summary:O$}).loose(),ea.z.object({deletedDocNames:ea.z.array(ea.z.string().min(1))}).loose(),ea.z.object({docName:ea.z.string().min(1),commitSha:ea.z.string().regex(/^[0-9a-f]{40}$/i,{message:"commitSha must be a 40-char git SHA"}),summary:O$,...Oj}).loose(),ea.z.object({restoredFrom:ea.z.string().min(1),timestamp:ea.z.string().min(1),summary:Rb.optional(),warnings:RA.optional()}).loose();let zH=/^#[0-9a-fA-F]{6}$/,zU=Object.fromEntries(i9.map(e=>[e,ea.z.string().regex(zH,"must be a #rrggbb hex color")])),zV=ea.z.object(zU),zq=ea.z.string().min(1).refine(function(e){return ot.test(e)},{message:"must contain a non-whitespace character"}),zG=ea.z.object({name:zq,author:zq.optional(),variant:ea.z.enum(["dark","light"]),palette:zV}).loose();ea.z.object({name:ea.z.string().min(1),scheme:zG,stem:ea.z.string().min(1).optional(),extension:ea.z.enum([".yaml",".yml"]).optional()}).loose(),ea.z.object({id:ea.z.string().min(1),filename:ea.z.string().min(1)}).loose(),ea.z.object({id:ea.z.string().min(1),scheme:zG}).loose(),ea.z.object({id:ea.z.string().min(1),filename:ea.z.string().min(1)}).loose(),ea.z.discriminatedUnion("existed",[ea.z.object({existed:ea.z.literal(!1)}).loose(),ea.z.object({existed:ea.z.literal(!0),filename:ea.z.string().min(1),scheme:zG}).loose()]);let zW=ea.z.discriminatedUnion("ok",[ea.z.object({ok:ea.z.literal(!0),id:ea.z.string().min(1),filename:ea.z.string().min(1),scheme:zG}),ea.z.object({ok:ea.z.literal(!1),filename:ea.z.string().min(1),id:ea.z.string().min(1).optional(),code:ea.z.string().min(1),conflictingFilenames:ea.z.array(ea.z.string().min(1)).min(2).optional()})]);ea.z.object({themes:ea.z.array(zW),truncated:ea.z.boolean()}).loose();
154let zK=ea.z.enum(["dormant","idle","fetching","pulling","pushing","conflict","offline","auth-error","disabled"]),zJ=ea.z.object({label:ea.z.string().min(1),webUrl:ea.z.url().nullable()}).loose(),zY=ea.z.discriminatedUnion("checkStatus",[ea.z.object({checkStatus:ea.z.literal("allowed")}).loose(),ea.z.object({checkStatus:ea.z.literal("denied"),deniedReason:ea.z.enum(["no-collaborator","private-no-access","repo-not-found","not-authenticated"]),resolvedLogin:ea.z.string().optional(),declaredLogin:ea.z.string().optional(),declaredSource:ea.z.string().optional()}).loose(),ea.z.object({checkStatus:ea.z.literal("unknown"),unknownError:ea.z.enum(["network","timeout","rate-limit","token-invalid","malformed-response","ssh-unverified"]).optional()}).loose()]),zX=ea.z.enum(["auth-403","auth-401","auth-scope-mismatch","auth-no-credential","auth-not-found-as-identity","semantic-protected-branch"]),zQ=ea.z.enum(["off","follow","full"]),zZ=ea.z.enum(["succeeded","up-to-date","conflict","refused","error"]);ea.z.object({state:zK,lastSyncUtc:ea.z.string().nullable(),lastRunUtc:ea.z.string().nullable().optional(),lastPullOkUtc:ea.z.string().nullable().optional(),lastPushOkUtc:ea.z.string().nullable().optional(),lastFetchUtc:ea.z.string().nullable(),lastPushedSha:ea.z.string().nullable(),ahead:ea.z.number().int().min(0),behind:ea.z.number().int().min(0),consecutiveFailures:ea.z.number().int().min(0),consecutivePushFailures:ea.z.number().int().min(0).optional(),conflictCount:ea.z.number().int().min(0),hasRemote:ea.z.boolean(),syncEnabled:ea.z.boolean(),identityUnresolved:ea.z.boolean(),remote:zJ.nullable().optional(),pushError:ea.z.string().optional(),pushErrorCode:zX.optional(),pullError:ea.z.string().optional(),pullErrorCode:zX.optional(),pausedReason:ea.z.string().optional(),blockingPaths:ea.z.array(ea.z.string().min(1)).optional(),pushPermission:zY.optional(),syncMode:zQ.optional(),lastPullUtc:ea.z.string().nullable().optional(),lastPullOutcome:zZ.nullable().optional()}).loose(),ea.z.object({action:ea.z.enum(["commit"]),paths:ea.z.array(ea.z.string().min(1)),commitSha:ea.z.string().optional()}).loose(),ea.z.object({action:ea.z.enum(["commit"])}).loose(),ea.z.object({op:ea.z.enum(["sync","push","pull","fetch"]).optional()}).loose(),ea.z.object({op:ea.z.enum(["sync","push","pull","fetch"])}).loose();let z0=ea.z.enum(["merge-native","working-tree","reconcile"]),z1=ea.z.enum(["merged-with-markers","refused-conflict-markers","refused-no-base","refused-too-large","disk-markers","stale-external-write"]),z2=ea.z.enum(["mine","theirs","content","delete"]),z5=ea.z.object({file:ea.z.string().min(1),detectedAt:ea.z.string().min(1),conflict:z0,reason:z1.optional().catch(void 0),conflictKind:ea.z.enum(["git","stale-external-write"]).optional(),docName:ea.z.string().nullable(),theirsSha:ea.z.string().optional(),baseSha:ea.z.string().optional()}).loose();ea.z.object({conflicts:ea.z.array(z5)}).loose(),ea.z.object({file:ea.z.string().min(1),strategy:ea.z.enum(["mine","theirs","content","delete"]),content:ea.z.string().optional()}).loose().refine(e=>"content"!==e.strategy||void 0!==e.content,{message:"content must be provided when strategy is 'content' (an empty string keeps an empty file)",path:["content"]}),ea.z.object({}).loose(),ea.z.object({file:ea.z.string().min(1),base:ea.z.string(),ours:ea.z.string(),theirs:ea.z.string(),kind:ea.z.enum(["both-modified","delete-modify","modify-delete"]),conflict:z0,reason:z1.optional().catch(void 0),conflictKind:ea.z.enum(["git","stale-external-write"]).optional(),resolutionOptions:ea.z.array(z2)}).loose(),ea.z.object({plan:ea.z.custom(e=>void 0!==e,{message:"plan is required"})}).loose(),ea.z.object({plan:ea.z.custom(e=>void 0!==e,{message:"plan is required"})}).loose(),ea.z.object({result:ea.z.custom(e=>void 0!==e,{message:"result is required"})}).loose(),ea.z.object({packId:ea.z.string().min(1)}).strict(),ea.z.object({installedHosts:ea.z.array(ea.z.string()),skills:ea.z.array(ea.z.object({name:ea.z.string().min(1),created:ea.z.boolean()}).strict())}).strict();let z3=ea.z.object({path:ea.z.string().min(1),summary:ea.z.string().min(1)}).loose(),z4=ea.z.object({files:ea.z.number().int().nonnegative(),folders:ea.z.number().int().nonnegative()}).loose(),z6=ea.z.object({id:ea.z.string().min(1),name:ea.z.string().min(1),description:ea.z.string().min(1),defaultSubfolder:ea.z.string().optional(),folders:ea.z.array(z3),entryCounts:z4}).loose();ea.z.object({packs:ea.z.array(z6)}).loose(),ea.z.object({noOpen:ea.z.boolean().optional(),out:ea.z.string().min(1).optional()}).loose();let z8=ea.z.object({reason:ea.z.enum(["unsupported-platform","spawn-error"]),message:ea.z.string()}).loose();ea.z.discriminatedUnion("status",[ea.z.object({status:ea.z.literal("installed"),outputPath:ea.z.string(),size:ea.z.number().int().nonnegative(),sha256:ea.z.string(),skill
154Version:ea.z.string()}).loose(),ea.z.object({status:ea.z.literal("built"),outputPath:ea.z.string(),size:ea.z.number().int().nonnegative(),sha256:ea.z.string(),skillVersion:ea.z.string(),handoffError:z8.optional()}).loose(),ea.z.object({status:ea.z.literal("failed"),buildError:ea.z.string()}).loose(),ea.z.object({status:ea.z.literal("skip-current"),skillVersion:ea.z.string(),recordedAt:ea.z.string().optional()}).loose()]);let z9=ea.z.enum(ei),z7=ea.z.enum(eo),Le=ea.z.object({alwaysOn:ea.z.number().int().nonnegative(),onTrigger:ea.z.number().int().nonnegative(),onDemand:ea.z.number().int().nonnegative()}).strict(),Lt=ea.z.object({name:ea.z.string().min(1),count:ea.z.number().int().nonnegative(),isLeaf:ea.z.boolean()}).loose();ea.z.object({tags:ea.z.array(Lt)}).loose();let Ln=ea.z.object({docName:ea.z.string().min(1),title:ea.z.string(),matchingTags:ea.z.array(ea.z.string().min(1)),snippet:ea.z.string().nullable()}).loose();ea.z.object({name:ea.z.string().min(1),docs:ea.z.array(Ln)}).loose(),ea.z.object({folder:ea.z.unknown(),frontmatter_local:ea.z.record(ea.z.string(),ea.z.unknown()).nullable(),warnings:ea.z.array(ea.z.string()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete â the aligned `warningCodes` entry names which field and how."}),warningCodes:ea.z.array(ea.z.enum(["symlink-refused","malformed-yaml","unverifiable","templates-symlink-refused","templates-unverifiable"])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) â `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from â a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure â `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),ea.z.object({path:ea.z.string(),frontmatter:ea.z.record(ea.z.string(),ea.z.unknown()).optional()}).loose(),ea.z.object({applied:ea.z.unknown()}).loose();let Lr=ea.z.record(ea.z.string(),ea.z.unknown()).meta({description:"Free-form frontmatter map embedded in template payloads."}),Li=ea.z.object({name:ea.z.string().min(1),folder:ea.z.string(),scope:ea.z.enum(["local","inherited"]),path:ea.z.string().min(1),frontmatter:Lr,body:ea.z.string()}).strict();ea.z.object({template:Li}).strict();let Lo=ea.z.object({name:ea.z.string().min(1),title:ea.z.string().optional(),description:ea.z.string().optional(),path:ea.z.string().min(1),source_folder:ea.z.string()}).strict();ea.z.object({templates:ea.z.array(Lo),truncated:ea.z.boolean()}).strict(),ea.z.object({folder:ea.z.string(),name:ea.z.string(),body:ea.z.string().optional(),frontmatter:Lr.optional(),...Oj,summary:O$}).strict(),ea.z.object({path:ea.z.string().min(1),created:ea.z.boolean(),warnings:ea.z.array(ea.z.string())}).strict(),ea.z.object({sourcePath:ea.z.string().min(1),targetFolder:ea.z.string(),name:ea.z.string().optional(),title:ea.z.string().optional(),deleteSource:ea.z.boolean().optional(),...Oj,summary:O$}).strict(),ea.z.object({path:ea.z.string().min(1),created:ea.z.boolean(),warnings:ea.z.array(ea.z.string())}).strict(),ea.z.object({existed:ea.z.boolean(),path:ea.z.string().min(1)}).strict(),ea.z.object({fromFolder:ea.z.string(),fromName:ea.z.string(),toFolder:ea.z.string(),toName:ea.z.string(),body:ea.z.string().optional(),frontmatter:Lr.optional(),...Oj,summary:O$}).strict(),ea.z.object({from:ea.z.string().min(1),to:ea.z.string().min(1),committed:ea.z.boolean()}).strict();let Ls=ea.z.enum(rG),La=ea.z.object({name:ea.z.string(),description:ea.z.string(),metadata:ea.z.object({pack:ea.z.string()}).strict().optional()}).strict(),Ll=ea.z.object({name:ea.z.string().min(1),scope:Ls,path:ea.z.string().min(1),frontmatter:La,body:ea.z.string(),files:ea.z.array(ea.z.object({path:ea.z.string().min(1),text:ea.z.string().nullable()})).optional(),managed:ea.z.boolean().optional()}).strict();ea.z.object({skill:Ll}).strict();let Lc=ea.z.object({source:ea.z.string().min(1),publisher:ea.z.string().optional(),skill:ea.z.string().optional(),marketplaceUrl:ea.z.string().optional(),importedAt:ea.z.string().min(1),autoUpdate:ea.z.boolean().optional()}).strict(),Ld=ea.z.object({name:ea.z.string().min(1),description:ea.z.string().optional(),scope:Ls,path:ea.z.string().min(1),canonicalPath:ea.z.string().min(1).optional(),filePaths:ea.z.array(ea.z.string()).optional(),absolutePath:ea.z.string().min(1).optional(),installed:ea.z.boolean(),hosts:ea.z.array(ea.z.string()),hostQualifier:ea.z.string().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:ea.z.array(ea.z.string()).optional().meta({description:"Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there â evidence another tool rewrote the path."}),hostAliases:ea.z.record(ea.z.string(),ea.z.string()).optional().meta({description:"Host skills roots that are symlink ALIASES of another location (host id â base-relative target root). An aliased folder is a derived view â no menu row, never a write target; the host's icon rides the target root's row."}),conflictHosts:ea.z.array(ea.z.string()).optional().meta({description:"Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) â occupied, not this skill."}),symlinkedHosts:ea.z.array(ea.z.string()).optional(),installableEditors:ea.z.array(ea.z.string()).optional(),hubOffered:ea.z.boolean().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine â server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads
154it is installed (`HUB_READER_EDITORS`)."}),linkMode:ea.z.boolean().optional(),customPlacements:ea.z.array(ea.z.object({path:ea.z.string(),mode:ea.z.enum(["copy","link"])}).strict()).optional(),plugin:ea.z.object({name:ea.z.string().min(1),marketplace:ea.z.string().min(1),provider:ea.z.string().min(1),url:ea.z.string().optional()}).strict().optional(),managed:ea.z.boolean().optional(),origin:Lc.optional(),pack:ea.z.string().optional(),modified:ea.z.boolean().optional(),revertable:ea.z.boolean().optional(),ignored:ea.z.boolean().optional(),size:Le.optional()}).strict();ea.z.object({name:ea.z.string().min(1),scope:Ls,apply:ea.z.boolean().optional()}).strict(),ea.z.object({line:ea.z.string().min(1),gitignorePath:ea.z.string().min(1),applied:ea.z.boolean(),alreadyTracked:ea.z.boolean().optional()}).strict(),ea.z.object({skills:ea.z.array(Ld),truncated:ea.z.boolean()}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string().meta({description:"Managed skill name to create or update."}),body:ea.z.string().optional(),frontmatter:La,...Oj,summary:O$}).strict();let Lu=ea.z.array(ea.z.enum(["skill-name-vendor-word","skill-body-too-long"])).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."});ea.z.object({path:ea.z.string().min(1),created:ea.z.boolean(),warnings:ea.z.array(ea.z.string()),warningCodes:Lu}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string(),dryRun:ea.z.boolean().optional(),setAutoUpdate:ea.z.boolean().optional(),...Oj,summary:O$}).strict(),ea.z.object({name:ea.z.string().min(1),updated:ea.z.boolean(),source:ea.z.string().min(1),localBody:ea.z.string().optional(),upstreamBody:ea.z.string().optional(),gitTracked:ea.z.boolean().optional(),warnings:ea.z.array(ea.z.string()),warningCodes:Lu}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string(),...Oj,summary:O$}).strict(),ea.z.object({name:ea.z.string().min(1),baselineRef:ea.z.string().min(1),restoredFiles:ea.z.array(ea.z.string()),warnings:ea.z.array(ea.z.string())}).strict();let Lh="This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.";ea.z.object({existed:ea.z.boolean(),path:ea.z.string().min(1),warnings:ea.z.array(ea.z.string()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged â either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${Lh}`})}).strict(),ea.z.object({scope:Ls.default("project"),fromName:ea.z.string(),toName:ea.z.string(),body:ea.z.string().optional(),frontmatter:La.optional(),...Oj,summary:O$}).strict(),ea.z.object({from:ea.z.string().min(1),to:ea.z.string().min(1),committed:ea.z.boolean(),warnings:ea.z.array(ea.z.string()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${Lh}`})}).strict(),ea.z.object({name:ea.z.string(),toName:ea.z.string().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:Ls,toScope:Ls,...Oj,summary:O$}).strict(),ea.z.object({scope:Ls,path:ea.z.string().optional(),droppedLocations:ea.z.array(ea.z.string()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:ea.z.array(ea.z.string()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${Lh}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),ea.z.object({scope:Ls,name:ea.z.string(),toName:ea.z.string(),...Oj,summary:O$}).strict(),ea.z.object({name:ea.z.string().min(1)}).strict(),ea.z.object({name:ea.z.string(),home:ea.z.string().min(1)}).strict(),ea.z.object({docName:ea.z.string().min(1)}).strict();let Lp=ea.z.enum(["reference","script","file"]);ea.z.object({scope:Ls.default("project"),name:ea.z.string(),path:ea.z.string().min(1),content:ea.z.string(),...Oj,summary:O$}).strict(),ea.z.object({path:ea.z.string().min(1),created:ea.z.boolean(),kind:Lp,content:ea.z.boolean()}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string(),from:ea.z.string().min(1),to:ea.z.string().min(1),...Oj,summary:O$}).strict(),ea.z.object({from:ea.z.string().min(1),to:ea.z.string().min(1),fromDocName:ea.z.string().optional(),toDocName:ea.z.string().optional()}).strict(),ea.z.object({path:ea.z.string().min(1),kind:Lp,text:ea.z.string()}).strict(),ea.z.object({path:ea.z.string().min(1),existed:ea.z.boolean(),kind:Lp}).strict();let Lf=ea.z.union([z7,ea.z.literal("agents")]),Lm=ea.z.string().min(1).refine(e=>!e.startsWith("/")&&!e.startsWith("~")&&!/^[A-Za-z]:/.test(e),{error:'a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed'}).refine(e=>e.split("/").every(e=>""!==e&&"."!==e&&".."!==e),{error:'a custom root may not contain "..", "." or empty path segments'}).refine(e=>e.includes("/"),{error:'a custom root is a path (e.g. ".tim/skills") â bare editor names are host ids'}),Lg=ea.z.union([Lf,Lm]);ea.z.object({scope:Ls.default("project"),name:ea.z.string(),targets:ea.z.array(Lf).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub â in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:ea.z.array(Lg).optional().meta({description:'Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.'}),remove:ea.z.array(Lg).optional().meta({description:"Locations to REMOVE the skill from (lossless only â a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:ea.z.enum(["copy","link"]).optional().meta({description:'"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.'}),source:Lg.optional().meta({description:"Move the skill's REAL folder to this location (the old source becomes a symlink to it â never a removal). Sticky across rescans."}),linkMode:ea.z.boolean().optional(),setSource:ea.z.string().min(1).optional(),place:ea.z.object({dir:ea.z.string().min(1).meta({description:'Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").'}),mode:ea.z.enum(["copy","link"])}).strict().optional(),convert:ea.z.object({target:Lg.meta({description:'The installed location to convert â an editor id, "agents", or a recorded custom placement path.'}),mode:ea.z.enum(["copy","link"]).meta({description:'"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.'})}).strict().optional(),unplace:ea.z.object({path:ea.z.string().min(1).meta({description:'The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").'})}).strict().optional(),...Oj,summary:O$,fork:ea.z.object({editor:ea.z.string().min(1),action:ea.z.enum(["align","make-source","rename"]),toName:ea.z.string().optional()}).strict().optional()}).strict().refine(e=>void 0===e.targets||void 0===e.add&&void 0===e.remove,{error:"`targets` is set-exact; `add`/`remove` are additive â use one style per call"}).refine(e=>void 0===e.fork||void 0===e.targets&&void 0===e.add&&void 0===e.remove&&void 0===e.source&&void 0===e.setSource,{error:"`fork` is its own operation â run it in a separate call"}).refine(e=>e.fork?.action!=="rename"||void 0!==e.fork.toName,{error:"`fork.rename` requires `toName`"}).refine(e=>void 0===e.source||void 0===e.add&&void 0===e.remove,{error:"a `source` move is its own operation â run it in a separate call from `add`/`remove`"}).refine(e=>[void 0!==e.targets||void 0!==e.add||void 0!==e.remove,void 0!==e.place,void 0!==e.unplace,void 0!==e.convert,void 0!==e.source||void 0!==e.setSource,void 0!==e.fork].filter(
154Boolean).length<=1,{error:"one operation per call â membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),ea.z.object({name:ea.z.string().min(1).meta({description:"Managed skill name installed or uninstalled."}),hosts:ea.z.array(ea.z.string()).meta({description:"Editor ids the skill is projected into after the operation; [] is expected after uninstall."}),scripts:ea.z.boolean().meta({description:"True when the skill ships executable scripts, projected but never run."}),warnings:ea.z.array(ea.z.string()).meta({description:"Non-fatal install/uninstall warnings from target projection."}),warningCodes:ea.z.array(ea.z.enum(["no-targets","scripts-present","name-conflict","no-description","skill-fork-name-unpatched","place-path-invalid","place-fork-refused"])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:ea.z.string().optional(),sourceMovedTo:ea.z.string().optional()}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string().meta({description:"Managed skill name to uninstall without deleting source."})}).strict(),ea.z.object({name:ea.z.string().min(1).meta({description:"Managed skill name requested for uninstall."}),uninstalled:ea.z.boolean().meta({description:"True when an install marker existed and was removed; false for an idempotent no-op."})}).strict(),ea.z.object({targets:ea.z.array(z9),configured:ea.z.boolean(),folders:ea.z.array(ea.z.object({scope:Ls,host:ea.z.string(),root:ea.z.string(),state:ea.z.enum(["own","linked","linked-parent","absent"]),target:ea.z.string().optional(),drift:ea.z.literal(!0).optional(),expected:ea.z.string().optional()}).strict()).optional()}).strict();let Ly=ea.z.object({action:ea.z.literal("link"),scope:Ls,root:ea.z.string().min(1).meta({description:'The folder to link (e.g. ".codex/skills").'}),target:ea.z.string().min(1).meta({description:'The root it merges into (e.g. ".agents/skills"). Required.'})}),Lb=ea.z.object({action:ea.z.literal("unlink"),scope:Ls,root:ea.z.string().min(1).meta({description:"The linked folder to materialize back."}),exclude:ea.z.array(ea.z.string().min(1)).optional().meta({description:"Skill names to LEAVE OUT when materializing â the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root."})}).strict(),Lv=ea.z.object({action:ea.z.literal("add-root"),scope:Ls,root:Lm.meta({description:'New custom skills root to declare (base-relative, e.g. ".team/skills").'})}).strict(),Lk=ea.z.discriminatedUnion("action",[Ly.extend({preview:ea.z.boolean().optional().meta({description:"Return the merge plan only (moves, drops, removes, conflicts, strays) â nothing is written."})}).strict(),Lb,Lv]);ea.z.discriminatedUnion("action",[Ly.strict(),Lb,Lv]),ea.z.object({folderAction:Lk}).strict();let Lx=ea.z.object({moves:ea.z.array(ea.z.string()),drops:ea.z.array(ea.z.string()),removes:ea.z.array(ea.z.string()),replaces:ea.z.array(ea.z.string()),conflicts:ea.z.array(ea.z.string()),strays:ea.z.array(ea.z.string())}).strict();ea.z.object({targets:ea.z.array(z9),reprojected:ea.z.array(ea.z.object({name:ea.z.string(),hosts:ea.z.array(ea.z.string())}).strict()),bundleHosts:ea.z.array(ea.z.string()),removedFrom:ea.z.array(ea.z.string()),folder:ea.z.object({moved:ea.z.array(ea.z.string()),dropped:ea.z.array(ea.z.string()),linked:ea.z.array(ea.z.string())}).strict().optional(),preview:Lx.optional()}).strict(),ea.z.object({scope:Ls.default("project"),name:ea.z.string(),version:ea.z.string().regex(/^[0-9a-f]{40}$/i),...Oj,summary:O$}).strict(),ea.z.object({name:ea.z.string().min(1),version:ea.z.string(),restoredFiles:ea.z.array(ea.z.string()),warnings:ea.z.array(ea.z.string())}).strict(),ea.z.object({query:ea.z.string().optional(),intent:ea.z.enum(["autocomplete","full_text","omnibar"]).optional(),ranking:ea.z.enum(["navigation","relevance"]).optional(),scopes:ea.z.array(ea.z.enum(["page","folder","content","file"])).optional(),scope:ea.z.string().optional(),limit:ea.z.number().int().nonnegative().optional(),semantic:ea.z.boolean().optional(),source:ea.z.enum(["omnibar","mcp","http"]).optional()}).loose();let Lw=ea.z.object({kind:ea.z.enum(["page","folder","content","file"]),path:ea.z.string().min(1),title:ea.z.string(),score:ea.z.number(),signals:ea.z.record(ea.z.string(),ea.z.unknown()),snippet:ea.z.string().optional()}).loose(),LE=ea.z.enum(["applied","no_match","warming","incapable","provider_error","restart_required","query_too_short"]),LT=ea.z.enum(["warm","corpus","query","dimensions","configured_dimensions"]),LS=ea.z.object({capable:ea.z.boolean(),applied:ea.z.boolean(),outcome:LE,providerErrorReason:LT.nullable().optional().catch(null),coverage:ea.z.object({embedded:ea.z.number().int().nonnegative(),total:ea.z.number().int().nonnegative()})}).loose();ea.z.object({enabled:ea.z.boolean(),keyPresent:ea.z.boolean(),keyNotRequired:ea.z.boolean(),keySource:ea.z.enum(["project","file","env"]).nullable(),keyHint:ea.z.string().nullable(),ready:ea.z.boolean(),capable:ea.z.boolean(),providerError:ea.z.boolean().optional(),providerErrorReason:LT.nullable().optional().catch(null),embedded:ea.z.number().int().nonnegative(),total:ea.z.number().int().nonnegative()}).loose(),ea.z.object({query:ea.z.string(),intent:ea.z.enum(["autocomplete","full_text","omnibar"]),results:ea.z.array(Lw),elapsedMs:ea.z.number().nonnegative(),semantic:LS.optional(),truncated:ea.z.boolean().optional(),ready:ea.z.boolean().optional()}).loose();let LC=ea.z.object({version:ea.z.string().min(1),recordedAt:ea.z.string().min(1)}).loose();ea.z.object({currentVersion:ea.z.string().min(1),targets:ea.z.record(ea.z.string(),LC.nullable())}).loose(),ea.z.object({scope:Ls.default("project"),source:ea.z.string().min(1).meta({description:"External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path."}),skill:ea.z.string().min(1).optional().meta({description:"Specific skill name to import from a multi-skill source."}
154),install:ea.z.boolean().optional().meta({description:"Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true."}),marketplace:ea.z.boolean().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...Oj,summary:O$}).strict(),ea.z.object({scope:Ls.default("project"),source:ea.z.string().min(1).meta({description:"External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path."}),skills:ea.z.array(ea.z.string().min(1)).min(1).max(100).meta({description:"Skill names to import from the source."}),install:ea.z.boolean().optional().meta({description:"Pass false to import WITHOUT the default-editor auto-projection. Default true."}),marketplace:ea.z.boolean().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...Oj,summary:O$}).strict();let LA=ea.z.object({requested:ea.z.string(),status:ea.z.enum(["imported","already-imported","not-found","failed"]),name:ea.z.string().optional(),collisionRenamedFrom:ea.z.string().optional(),warnings:ea.z.array(ea.z.string()),warningCodes:Lu,error:ea.z.string().optional()}).loose();ea.z.object({results:ea.z.array(LA),imported:ea.z.number(),alreadyImported:ea.z.number(),failed:ea.z.number()}).loose(),ea.z.object({scope:Ls.default("project"),names:ea.z.array(ea.z.string().min(1)).min(1).max(100).meta({description:"Managed skill names to refresh from their recorded upstreams."}),...Oj,summary:O$}).strict();let L_=ea.z.object({requested:ea.z.string(),status:ea.z.enum(["updated","up-to-date","not-found","failed"]),source:ea.z.string().optional(),warnings:ea.z.array(ea.z.string()),warningCodes:Lu,error:ea.z.string().optional()}).loose();ea.z.object({results:ea.z.array(L_),updated:ea.z.number(),upToDate:ea.z.number(),failed:ea.z.number()}).loose();let LN=ea.z.object({source:ea.z.string(),ref:ea.z.string().optional(),contentHash:ea.z.string(),publisher:ea.z.string().optional()}).loose();ea.z.object({name:ea.z.string().min(1).meta({description:"Managed skill name created or matched."}),path:ea.z.string().min(1).meta({description:"Store-relative path to the imported skill source."}),created:ea.z.boolean().meta({description:"True when this request created new source files."}),alreadyImported:ea.z.boolean().meta({description:"True when identical content was already present and no files changed."}),collisionRenamedFrom:ea.z.string().optional().meta({description:"Original source name when collision handling renamed the import."}),provenance:LN,warnings:ea.z.array(ea.z.string()).meta({description:"Non-fatal import warnings, such as skipped unsupported files."}),warningCodes:Lu}).loose();let LO=ea.z.enum(["files","backlinks","graph","sync-status","session-activity","tags","comments","lint-config","local-targets"]);ea.z.object({v:ea.z.literal(1),ch:ea.z.literal("server-info"),seq:ea.z.number(),serverInstanceId:ea.z.string().min(1),currentBranch:ea.z.string().min(1).optional()}).loose(),ea.z.object({v:ea.z.literal(1),ch:ea.z.literal("branch-switched"),seq:ea.z.number(),branch:ea.z.string().min(1)}).loose(),ea.z.object({v:ea.z.literal(1),ch:LO,seq:ea.z.number()}).loose(),ea.z.object({v:ea.z.literal(1),ch:ea.z.literal("disk-ack"),seq:ea.z.number(),docName:ea.z.string().min(1),sv:ea.z.string().min(1)}).loose(),ea.z.object({v:ea.z.literal(1),ch:ea.z.literal("config-validation-rejected"),seq:ea.z.number(),docName:ea.z.string().min(1),error:oz}).loose(),ea.z.object({v:ea.z.literal(1),ch:ea.z.literal("config-ignore-nested-error"),seq:ea.z.number(),path:ea.z.string().min(1),error:ea.z.string().min(1)}).loose(),(a=globalThis.Intl.Segmenter)&&new a("en",{granularity:"word"});let LM=Symbol.for("@inkeep/open-knowledge/skill-state-field-registry"),LI=globalThis;void 0===LI[LM]&&(LI[LM]=ea.z.registry());let LD=LI[LM],LR=ea.z.looseObject({version:ea.z.string().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,"version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/").register(LD,{description:"Recorded skill version for this target."}),recordedAt:ea.z.iso.datetime().register(LD,{description:"ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version."}),surface:ea.z.enum(["server-build-and-open","electron-build-and-open","cli-npx-skills-add","desktop-direct","cli-start"]).register(LD,{description:"Install-source surface that recorded this entry."}).optional()}),Lz=ea.z.looseObject({enabled:ea.z.boolean().register(LD,{description:"Whether this user-global skill bundle is o
154pted in."}),decidedAt:ea.z.iso.datetime().register(LD,{description:"ISO 8601 timestamp of the opt-in / opt-out decision."})});ea.z.looseObject({schema:ea.z.literal(1).register(LD,{description:"Schema major version. Bumped only on breaking shape changes."}),targets:ea.z.looseObject({"claude-cowork":LR.optional(),"cli-hosts":LR.optional()}).register(LD,{description:"Per-target install-state entries. Absent target = no recorded install."}).default({}),bundles:ea.z.record(ea.z.string(),Lz).register(LD,{description:"Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision."}).optional(),installsReported:ea.z.array(ea.z.string()).register(LD,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()}),Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));var LL=e.i(245157),LP=e.i(632717),Lj=e.i(938001);let{getOwnPropertyNames:L$,getOwnPropertySymbols:LF}=Object,{hasOwnProperty:LB}=Object.prototype;function LH(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function LU(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,o=i.get(t),s=i.get(n);if(o&&s)return o===n&&s===t;i.set(t,n),i.set(n,t);let a=e(t,n,r);return i.delete(t),i.delete(n),a}}function LV(e){return L$(e).concat(LF(e))}let Lq=Object.hasOwn||((e,t)=>LB.call(e,t));function LG(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:LW,keys:LK}=Object;function LJ(e,t){return e.byteLength===t.byteLength&&L8(new Uint8Array(e),new Uint8Array(t))}function LY(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function LX(e,t){return e.byteLength===t.byteLength&&L8(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function LQ(e,t){return LG(e.getTime(),t.getTime())}function LZ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function L0(e,t){return e===t}function L1(e,t,n){let r,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.entries(),l=0;for(;(r=a.next())&&!r.done;){let o=t.entries(),a=!1,c=0;for(;(i=o.next())&&!i.done;){if(s[c]){c++;continue}let o=r.value,d=i.value;if(n.equals(o[0],d[0],l,c,e,t,n)&&n.equals(o[1],d[1],o[0],d[0],e,t,n)){a=s[c]=!0;break}c++}if(!a)return!1;l++}return!0}function L2(e,t,n){let r=LK(e),i=r.length;if(LK(t).length!==i)return!1;for(;i-- >0;)if(!L7(e,t,n,r[i]))return!1;return!0}function L5(e,t,n){let r,i,o,s=LV(e),a=s.length;if(LV(t).length!==a)return!1;for(;a-- >0;)if(!L7(e,t,n,r=s[a])||(i=LW(e,r),o=LW(t,r),(i||o)&&(!i||!o||i.configurable!==o.configurable||i.enumerable!==o.enumerable||i.writable!==o.writable)))return!1;return!0}function L3(e,t){return LG(e.valueOf(),t.valueOf())}function L4(e,t){return e.source===t.source&&e.flags===t.flags}function L6(e,t,n){let r,i,o=e.size;if(o!==t.size)return!1;if(!o)return!0;let s=Array(o),a=e.values();for(;(r=a.next())&&!r.done;){let o=t.values(),a=!1,l=0;for(;(i=o.next())&&!i.done;){if(!s[l]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){a=s[l]=!0;break}l++}if(!a)return!1}return!0}function L8(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function L9(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function L7(e,t,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!e.$$typeof||!!t.$$typeof)||Lq(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let Pe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Pt=Object.prototype.toString,Pn=Pr();function Pr(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:u,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;
154if(null==m||null==g)return!1;let b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);let v=m.constructor;if(v!==g.constructor)return!1;if(v===Object)return l(m,g,y);if(Array.isArray(m))return t(m,g,y);if(v===Date)return r(m,g,y);if(v===RegExp)return d(m,g,y);if(v===Map)return s(m,g,y);if(v===Set)return u(m,g,y);let k=Pt.call(m);if("[object Date]"===k)return r(m,g,y);if("[object RegExp]"===k)return d(m,g,y);if("[object Map]"===k)return s(m,g,y);if("[object Set]"===k)return u(m,g,y);if("[object Object]"===k)return"function"!=typeof m.then&&"function"!=typeof g.then&&l(m,g,y);if("[object URL]"===k)return p(m,g,y);if("[object Error]"===k)return i(m,g,y);if("[object Arguments]"===k)return l(m,g,y);if(Pe[k])return h(m,g,y);if("[object ArrayBuffer]"===k)return e(m,g,y);if("[object DataView]"===k)return n(m,g,y);if("[object Boolean]"===k||"[object Number]"===k||"[object String]"===k)return c(m,g,y);if(f){let e=f[k];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:LJ,areArraysEqual:n?L5:LY,areDataViewsEqual:LX,areDatesEqual:LQ,areErrorsEqual:LZ,areFunctionsEqual:L0,areMapsEqual:n?LH(L1,L5):L1,areNumbersEqual:LG,areObjectsEqual:n?L5:L2,arePrimitiveWrappersEqual:L3,areRegExpsEqual:L4,areSetsEqual:n?LH(L6,L5):L6,areTypedArraysEqual:n?LH(L8,L5):L8,areUrlsEqual:L9,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=LU(r.areArraysEqual),t=LU(r.areMapsEqual),n=LU(r.areObjectsEqual),i=LU(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}(e)),s=n?n(o):function(e,t,n,r,i,s,a){return o(e,t,a)};return function({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(o,s){let{cache:a=e?new WeakMap:void 0,meta:l}=n();return t(o,s,{cache:a,equals:r,meta:l,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let o={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,o)}}({circular:t,comparator:o,createState:r,equals:s,strict:i})}Pr({strict:!0}),Pr({circular:!0}),Pr({circular:!0,strict:!0}),Pr({createInternalComparator:()=>LG}),Pr({strict:!0,createInternalComparator:()=>LG}),Pr({circular:!0,createInternalComparator:()=>LG}),Pr({circular:!0,createInternalComparator:()=>LG,strict:!0});var Pi=e.i(168446),Po=({contentComponent:e})=>{let t=(0,Lj.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Z.jsx)(Z.Fragment,{children:Object.values(t)})},Ps=class extends LL.default.Component{constructor(e){super(e),this.editorContentRef=LL.default.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){let e,n;if(t.contentComponent)return;let r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),e=new Set,n={},t.contentComponent={subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>n,getServerSnapshot:()=>n,setRenderer(t,r){n={...n,[t]:LP.default.createPortal(r.reactElement,r.element,t)},e.forEach(e=>e())},removeRenderer(t){let r={...n};delete r[t],n=r,e.forEach(e=>e())}},t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var e;let t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,Z.jsx)(Po,{contentComponent:e.contentComponent})]})}},Pa=(0,LL.forwardRef)((e,t)=>{let n=LL.default.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return LL.default.createElement(Ps,{key:n,innerRef:t,...e})}),Pl=LL.default.memo(Pa),Pc="u">typeof window?LL.useLayoutEffect:LL.useEffect,Pd=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0}
154,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};function Pu(e){var t;let[n]=(0,LL.useState)(()=>new Pd(e.editor)),r=(0,Pi.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:Pn);return Pc(()=>n.watch(e.editor),[e.editor,n]),(0,LL.useDebugValue)(r),r}var Ph="u"<typeof window,Pp=Ph||!!("u">typeof window&&window.next),Pf=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=null==e||e;return Ph?t=!1:Pp&&void 0===e&&(t=!1),t?this.createEditor():null}createEditor(){return new po({...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){
154if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}},Pm=(0,LL.createContext)({editor:null});Pm.Consumer;var Pg=()=>(0,LL.useContext)(Pm),Py=(0,LL.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Pb=()=>(0,LL.useContext)(Py);function Pv({as:e="div",...t}){let{nodeViewContentRef:n,nodeViewContentChildren:r}=Pb();return(0,Z.jsx)(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style},children:r})}var Pk=LL.default.forwardRef((e,t)=>{let{onDragStart:n}=Pb(),r=e.as||"div";return(0,Z.jsx)(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function Px(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function Pw(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}var PE=class{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isEditorContentInitialized?(0,LP.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=function(){try{if(LL.version)return parseInt(LL.version.split(".")[0],10)>=19}catch{}return!1}(),o=function(e){if(Px(e)||Pw(e))return!0;if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return Px(t)||Pw(t)}return!1}(t),s={...n};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=e=>{this.ref=e}),this.reactElement=(0,Z.jsx)(t,{...s}),null==(e=null==r?void 0:r.contentComponent)||e.setRenderer(this.id,this)}updateProps(e={}){if(this.destroyed)return;let t=!1,n=Object.keys(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==this.props[i]){t=!0;break}}t&&(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;let t=this.editor;null==(e=null==t?void 0:t.contentComponent)||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};LL.default.createContext({markViewContentRef:()=>{}});var PT=class extends ph{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.handlePositionUpdate=()=>{let e=this.getPos();"number"==typeof e&&e!==this.currentPos&&(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),"function"==typeof this.options.attrs&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const e=this.dom.querySelector("[data-node-view-content]");if(!e)return;e.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){var o;return"storage"===r?null!=(o=e.storage[t.name])?o:{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,LL.createRef)()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute("data-node-view-wrapper")&&e.removeAttribute("data-node-view-wrapper"),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,LL.memo)(e=>(0,Z.jsx)(Py.Provider,{value:t,children:(0,LL.createElement)(n,e)}));r.displayName="ReactNodeView";let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:o=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new PE(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.n
154ame} ${o}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null==(e=this.renderer.element.firstElementChild)?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let e=this.currentPos;if("number"==typeof e)if(function({selection:e,pos:t,nodeSize:n,selectedOnTextSelection:r=!1}){let{from:i,to:o}=e;return!!(i<=t&&o>=t+n||r&&ue(e)&&i>t&&o<t+n)}({selection:this.editor.state.selection,pos:e,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(e===this.node)return this.node=e,this.decorations=t,this.innerDecorations=n,!0;let i=this.getPos();this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i;let o={node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(o.getPos=()=>this.getPos()),r(o),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=uQ(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}},PS=(0,LL.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function PC({editor:e,instance:t,children:n}){let r=null!=e?e:t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,LL.useMemo)(()=>({editor:r}),[r]),o=(0,LL.useMemo)(()=>({editor:r}),[r]);return(0,Z.jsx)(Pm.Provider,{value:o,children:(0,Z.jsx)(PS.Provider,{value:i,children:n})})}function PA({...e}){let{editor:t}=(0,LL.useContext)(PS);return(0,Z.jsx)(Pl,{editor:t,...e})}PS.displayName="TiptapContext",PC.displayName="Tiptap",PA.displayName="Tiptap.Content",Object.assign(PC,{Content:PA});var P_=e.i(974163),PN=e.i(278928),PO=class{constructor({editor:e,element:t,view:n,pluginKey:r="bubbleMenu",updateDelay:i=250,resizeDelay:o=60,shouldShow:s,appendTo:a,getReferencedVirtualElement:l,options:c}){var d;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:o}=t,{empty:s}=o,a=!i.textBetween(n,r).length&&ue(t.selection),l=this.element.contains(document.activeElement);return!!(e.hasFocus()||l)&&!s&&!a&&!!this.editor.isEditable},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.editor.isDestroyed)return void this.destroy();if(this.preventHide){this.preventHide=!1;return}(null==e?void 0:e.relatedTarget)&&(null==(t=this.element.parentNode)?void 0:t.contains(e.relatedTarget))||(null==e?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(e,t)=>
154{let n=!(null==t?void 0:t.selection.eq(e.state.selection)),r=!(null==t?void 0:t.doc.eq(e.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;!i&&(t||n)&&(this.getShouldShow(r)?(this.show(),this.updatePosition()):this.hide())},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);"updatePosition"===t?this.updatePosition():t&&"object"==typeof t&&"updateOptions"===t.type?this.updateOptions(t.options):"hide"===t?this.hide():"show"===t&&(this.updatePosition(),this.show())},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=o,this.appendTo=a,this.scrollTarget=null!=(d=null==c?void 0:c.scrollTarget)?d:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...c},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push((0,PN.flip)("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push((0,PN.shift)("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push((0,PN.offset)("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push((0,PN.arrow)(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push((0,PN.size)("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push((0,PN.autoPlacement)("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push((0,PN.hide)("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push((0,PN.inline)("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e,t,n,r,i;let{selection:o}=this.editor.state,s=null==(e=this.getReferencedVirtualElement)?void 0:e.call(this);if(s)return s;if(!(null==(n=null==(t=this.view)?void 0:t.dom)?void 0:n.parentNode))return;let a=hu(this.view,o.from,o.to),l={getBoundingClientRect:()=>a,getClientRects:()=>[a]};if(o instanceof am){let e=this.view.nodeDOM(o.from),t=e.dataset.nodeViewWrapper?e:e.querySelector("[data-node-view-wrapper]");t&&(e=t),e&&(l={getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>[e.getBoundingClientRect()]})}if(o instanceof mp){let e,t,n,{$anchorCell:s,$headCell:a}=o,c=s?s.pos:a.pos,d=a?a.pos:s.pos,u=this.view.nodeDOM(c),h=this.view.nodeDOM(d);if(!u||!h)return;let p=u===h?u.getBoundingClientRect():(r=u.getBoundingClientRect(),i=h.getBoundingClientRect(),e=Math.min(r.top,i.top),t=Math.max(r.bottom,i.bottom),n=Math.min(r.left,i.left),new DOMRect(n,e,Math.max(r.right,i.right)-n,t-e));l={getBoundingClientRect:()=>p,getClientRects:()=>[p]}}return l}updatePosition(){if(!this.isVisible)return;let e=this.virtualElement;e&&(0,PN.computePosition)(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{var i,o;if(this.isVisible&&!this.editor.isDestroyed&&this.element.isConnected){if((null==(i=r.hide)?void 0:i.referenceHidden)||(null==(o=r.hide)?void 0:o.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(e,t){let{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r)return void this.handleDebouncedUpdate(e,t);let i=!(null==t?void 0:t.selection.eq(e.state.selection)),o=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,i,o,t)}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:i}=r,o=Math.min(...i.map(e=>e.$from.pos)),s=Math.max(...i.map(e=>e.$to.pos));return(null==(t=this.shouldShow)?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:o,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(e=null!=t?t:this.view.dom.parentElement)||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(e){var t;if(void 0!==e.updateDelay&&(this.updateDelay=e.updateDelay),void 0!==e.resizeDelay&&(this.resizeDelay=e.resizeDelay),void 0!==e.appendTo&&(this.appendTo=e.appendTo),void 0!==e.getReferencedVirtualElement&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),void 0!==e.shouldShow&&e.shouldShow&&(this.shouldShow=e.shouldShow),void 0!==e.options){let n=null!=(t=e.options.scrollTarget)?t:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},PM=e=>new aA({key:"string"==typeof e.pluginKey?new aO(e.pluginKey):e.pluginKey,view:t=>new PO({view:t,...e})});h1.create({name:"bubbleMenu",addOptions:()=>({element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[PM({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var PI=class{constructor({editor:e,element:t,view:n,pluginKey:r="floatingMenu",updateDelay:i=250,resizeDelay:o=60,options:s,appendTo:a,shouldShow:l}){var c;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:e,state:t})=>{let{selection:n}=t,{$anchor:r,empty:i}=n,o=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent&&0===r.parent.childCount&&!this.getTextContent(r.parent);return!!e.hasFocus()&&!!i&&!!o&&!!s&&!!this.editor.isEditable},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(e,t,n,r)=>{let{composing:i}=e;!i&&(t||n)&&(this.getShouldShow(r)?(this.updatePosition(),this.show()):this.hide())},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.preventHide){this.preventHide=!1;return}(null==e?void 0:e.relatedTarget)&&(null==(t=this.element.parentNode)?void 0:t.contains(e.relatedTarget))||(null==e?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:e})=>{let t=e.getMeta(this.pluginKey);"updatePosition"===t?this.updatePosition():t&&"object"==typeof t&&"updateOptions"===t.type?this.updateOptions(t.options):"hide"===t?this.hide():"show"===t&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=o,this.appendTo=a,this.scrollTarget=null!=(c=null==s?void 0:s.scrollTarget)?c:window,this.floatingUIOptions={...this.floatingUIOptions,...s},this.element.tabIndex=0,l&&(this.shouldShow=l),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.get
154ShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return u6(e,{textSerializers:u8(this.editor.schema)})}get middlewares(){let e=[];return this.floatingUIOptions.flip&&e.push((0,PN.flip)("boolean"!=typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push((0,PN.shift)("boolean"!=typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push((0,PN.offset)("boolean"!=typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push((0,PN.arrow)(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push((0,PN.size)("boolean"!=typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push((0,PN.autoPlacement)("boolean"!=typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push((0,PN.hide)("boolean"!=typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push((0,PN.inline)("boolean"!=typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;let{state:n}=this.view,{selection:r}=n,{ranges:i}=r,o=Math.min(...i.map(e=>e.$from.pos)),s=Math.max(...i.map(e=>e.$to.pos));return null==(t=this.shouldShow)?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:o,to:s})}updateOptions(e){var t;if(void 0!==e.updateDelay&&(this.updateDelay=e.updateDelay),void 0!==e.resizeDelay&&(this.resizeDelay=e.resizeDelay),void 0!==e.appendTo&&(this.appendTo=e.appendTo),void 0!==e.shouldShow&&e.shouldShow&&(this.shouldShow=e.shouldShow),void 0!==e.options){let n=null!=(t=e.options.scrollTarget)?t:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){var e,t;if(!(null==(t=null==(e=this.view)?void 0:e.dom)?void 0:t.parentNode))return;let{selection:n}=this.editor.state,r=hu(this.view,n.from,n.to);(0,PN.computePosition)({getBoundingClientRect:()=>r,getClientRects:()=>[r]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:t,strategy:n,middlewareData:r})=>{var i,o;if((null==(i=r.hide)?void 0:i.referenceHidden)||(null==(o=r.hide)?void 0:o.escaped)){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=n,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){let n=!(null==t?void 0:t.selection.eq(e.state.selection)),r=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";let t="function"==typeof this.appendTo?this.appendTo():this.appendTo;null==(e=null!=t?t:this.view.dom.parentElement)||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},PD=e=>new aA({key:"string"==typeof e.pluginKey?new aO(e.pluginKey):e.pluginKey,view:t=>new PI({view:t,...e})});function PR(e,t){return null!=e?e:new aO(t)}h1.create({name:"floatingMenu",addOptions:()=>({element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}),addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[PD({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var Pz="u">typeof window?LL.useLayoutEffect:LL.useEffect,PL=new Set(["left","opacity","position","top","visibility","width"]),PP=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","o
154pacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),Pj=new Set(["children","className","style"]),P$=new Set(["tabIndex"]),PF=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),PB={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function PH(e,t){return/^on[A-Z]/.test(e)&&"function"==typeof t}function PU(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function PV(e,t,n){if("tabIndex"===t){e.tabIndex=Number(n);return}e[t]=n}function Pq(e,t){let n=(0,LL.useRef)({}),r=(0,LL.useRef)([]);Pz(()=>{var i,o,s;let a,l,c,d=n.current;return!function(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute("class")}}(e,d.className,t.className),i=d.style,o=t.style,a=null!=i?i:{},l=null!=o?o:{},new Set([...Object.keys(a),...Object.keys(l)]).forEach(t=>{let n=a[t],r=l[t];if(n!==r){if(null==r)return void(!PL.has(t)&&e.style.removeProperty(PU(t)));PL.has(t)||e.style.setProperty(PU(t),"number"!=typeof r||0===r||t.startsWith("--")||PP.has(t)?String(r):`${r}px`)}}),new Set([...Object.keys(d),...Object.keys(t)]).forEach(n=>{if(Pj.has(n)||!(n.startsWith("aria-")||n.startsWith("data-")||PF.has(n))||PH(n,d[n])||PH(n,t[n]))return;let r=d[n],i=t[n];if(r===i)return;let o=(n.startsWith("aria-")||n.startsWith("data-"),n);if(null==i||!1===i){P$.has(n)&&function(e,t){if("tabIndex"===t)return e.removeAttribute("tabindex");let n=e[t];if("boolean"==typeof n){e[t]=!1;return}if("number"==typeof n){e[t]=0;return}e[t]=""}(e,n),e.removeAttribute(o);return}if(!0===i){P$.has(n)&&PV(e,n,!0),e.setAttribute(o,"");return}P$.has(n)?PV(e,n,i):e.setAttribute(o,String(i))}),s=r.current,s.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),c=[],Object.entries(t).forEach(([t,n])=>{var r;let i,o;if(!PH(t,n))return;let{eventName:s,options:a}={eventName:null!=(r=PB[o=((i=t.endsWith("Capture"))?t.slice(0,-7):t).slice(2)])?r:o.toLowerCase(),options:i?{capture:!0}:void 0},l=t=>{let r,i,o;n((r=t.defaultPrevented,i=!1,Object.defineProperties(o=Object.create(t),{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>void 0},isDefaultPrevented:{value:()=>r},isPropagationStopped:{value:()=>i},preventDefault:{value:()=>{r=!0,t.preventDefault()}},stopPropagation:{value:()=>{i=!0,t.stopPropagation()}}}),o))};e.addEventListener(s,l,a),c.push({eventName:s,listener:l,options:a})}),r.current=c,n.current=t,()=>{r.current.forEach(({eventName:t,listener:n,options:r})=>{e.removeEventListener(t,n,r)}),r.current=[]}},[e,t])}var PG=LL.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:o=null,getReferencedVirtualElement:s,options:a,children:l,...c},d)=>{let u=(0,LL.useRef)(document.createElement("div")),h=(0,LL.useRef)(PR(e,"bubbleMenu")).current;Pq(u.current,c),"function"==typeof d?d(u.current):d&&(d.current=u.current);let{editor:p}=Pg(),f=t||p,m={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:h,shouldShow:o,getReferencedVirtualElement:s,options:a},g=(0,LL.useRef)(m);g.current=m;let[y,b]=(0,LL.useState)(!1),v=(0,LL.useRef)(!0);return(0,LL.useEffect)(()=>{if(null==f?void 0:f.isDestroyed)return;if(!f)return void console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");let e=u.current;e.style.visibility="hidden",e.style.position="absolute";let t=PM({...g.current,editor:f,element:e});f.registerPlugin(t);let n=g.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),f.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[f]),(0,LL.useEffect)(()=>{if(y&&f&&!f.isDestroyed){if(v.current){v.current=!1;return}f.view.dispatch(f.state.tr.setMeta(h,{type:"updateOptions",options:g.current}))}},[y,f,n,r,o,a,i,s,h]),(0,LP.createPortal)(l,u.current)});LL.default.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:o=null,options:s,children:a,...l},c)=>{let d=(0,LL.useRef)(document.createElement("div")),u=(0,LL.useRef)(PR(e,"floatingMenu")).current;Pq(d.current,l),"function"==typeof c?c(d.current):c&&(c.current=d.current);let{editor:h}=Pg(),p=t||h,f={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:u,shouldShow:o,options:s},m=(0,LL.useRef)(f);m.current=f;let[g,y]=(0,LL.useState)(!1),b=(0,LL.useRef)(!0);return(0,LL.useEffect)(()=>
154{if(null==p?void 0:p.isDestroyed)return;if(!p)return void console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");let e=d.current;e.style.visibility="hidden",e.style.position="absolute";let t=PD({...m.current,editor:p,element:e});p.registerPlugin(t);let n=m.current.pluginKey;return b.current=!0,y(!0),()=>{y(!1),p.unregisterPlugin(n),window.requestAnimationFrame(()=>{e.parentNode&&e.parentNode.removeChild(e)})}},[p]),(0,LL.useEffect)(()=>{if(g&&p&&!p.isDestroyed){if(b.current){b.current=!1;return}p.view.dispatch(p.state.tr.setMeta(u,{type:"updateOptions",options:m.current}))}},[g,p,n,r,o,s,i,u]),(0,LP.createPortal)(a,d.current)});let PW=(0,J.default)("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]),PK=(0,J.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,PK],564447);let PJ=(0,J.default)("highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]),PY=(0,J.default)("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]),PX=(0,J.default)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]),PQ=(0,J.default)("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);var PZ=e.i(326190),P0=e.i(276398);let P1=(0,J.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),P2=(0,J.default)("heading-1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]),P5=(0,J.default)("heading-2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]),P3=(0,J.default)("heading-3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]),P4=(0,J.default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),P6=(0,J.default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]),P8=(0,J.default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]),P9=(0,J.default)("pilcrow",[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]]),P7=(0,J.default)("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]),je=(0,J.default)("square-code",[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);e.i(370931),e.i(100736),(0,J.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var jt=e.i(291967),jn=e.i(161116),jr=e.i(493942),ji=e.i(710690),jo=e.i(989200),js=e.i(288826),ja=e.i(559290),jl="DropdownMenu",[jc,jd]=(0,jr.createContextScope)(jl,[js.createMenuScope]),ju=(0,js.createMenuScope)(),[jh,jp]=jc(jl),jf=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:
154a=!0}=e,l=ju(t),c=LL.useRef(null),[d,u]=(0,ji.useControllableState)({prop:i,defaultProp:o??!1,onChange:s,caller:jl});return(0,Z.jsx)(jh,{scope:t,triggerId:(0,ja.useId)(),triggerRef:c,contentId:(0,ja.useId)(),open:d,onOpenChange:u,onOpenToggle:LL.useCallback(()=>u(e=>!e),[u]),modal:a,children:(0,Z.jsx)(js.Root,{...l,open:d,onOpenChange:u,dir:r,modal:a,children:n})})};jf.displayName=jl;var jm="DropdownMenuTrigger",jg=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=jp(jm,n),s=ju(n);return(0,Z.jsx)(js.Anchor,{asChild:!0,...s,children:(0,Z.jsx)(jo.Primitive.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:(0,jn.composeRefs)(t,o.triggerRef),onPointerDown:(0,jt.composeEventHandlers)(e.onPointerDown,e=>{!r&&0===e.button&&!1===e.ctrlKey&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:(0,jt.composeEventHandlers)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});jg.displayName=jm;var jy=e=>{let{__scopeDropdownMenu:t,...n}=e,r=ju(t);return(0,Z.jsx)(js.Portal,{...r,...n})};jy.displayName="DropdownMenuPortal";var jb="DropdownMenuContent",jv=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=jp(jb,n),o=ju(n),s=LL.useRef(!1);return(0,Z.jsx)(js.Content,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:(0,jt.composeEventHandlers)(e.onCloseAutoFocus,e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:(0,jt.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!i.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jv.displayName=jb;var jk=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.Group,{...i,...r,ref:t})});jk.displayName="DropdownMenuGroup";var jx=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.Label,{...i,...r,ref:t})});jx.displayName="DropdownMenuLabel";var jw=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.Item,{...i,...r,ref:t})});jw.displayName="DropdownMenuItem";var jE=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.CheckboxItem,{...i,...r,ref:t})});jE.displayName="DropdownMenuCheckboxItem";var jT=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.RadioGroup,{...i,...r,ref:t})});jT.displayName="DropdownMenuRadioGroup";var jS=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.RadioItem,{...i,...r,ref:t})});jS.displayName="DropdownMenuRadioItem";var jC=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.ItemIndicator,{...i,...r,ref:t})});jC.displayName="DropdownMenuItemIndicator";var jA=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.Separator,{...i,...r,ref:t})});jA.displayName="DropdownMenuSeparator";var j_=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.Arrow,{...i,...r,ref:t})});j_.displayName="DropdownMenuArrow";var jN=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:o}=e,s=ju(t),[a,l]=(0,ji.useControllableState)({prop:r,defaultProp:o??!1,onChange:i,caller:"DropdownMenuSub"});return(0,Z.jsx)(js.Sub,{...s,open:a,onOpenChange:l,children:n})},jO=LL.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.SubTrigger,{...i,...r,ref:t})});jO.displayName="DropdownMenuSubTrigger";var jM=LL.forwardRef((e,t)=>
154{let{__scopeDropdownMenu:n,...r}=e,i=ju(n);return(0,Z.jsx)(js.SubContent,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jM.displayName="DropdownMenuSubContent",e.s(["Arrow",0,j_,"CheckboxItem",0,jE,"Content",0,jv,"DropdownMenu",0,jf,"DropdownMenuArrow",0,j_,"DropdownMenuCheckboxItem",0,jE,"DropdownMenuContent",0,jv,"DropdownMenuGroup",0,jk,"DropdownMenuItem",0,jw,"DropdownMenuItemIndicator",0,jC,"DropdownMenuLabel",0,jx,"DropdownMenuPortal",0,jy,"DropdownMenuRadioGroup",0,jT,"DropdownMenuRadioItem",0,jS,"DropdownMenuSeparator",0,jA,"DropdownMenuSub",0,jN,"DropdownMenuSubContent",0,jM,"DropdownMenuSubTrigger",0,jO,"DropdownMenuTrigger",0,jg,"Group",0,jk,"Item",0,jw,"ItemIndicator",0,jC,"Label",0,jx,"Portal",0,jy,"RadioGroup",0,jT,"RadioItem",0,jS,"Root",0,jf,"Separator",0,jA,"Sub",0,jN,"SubContent",0,jM,"SubTrigger",0,jO,"Trigger",0,jg,"createDropdownMenuScope",0,jd],545550);var jI=e.i(545550),jI=jI;function jD({...e}){return(0,Z.jsx)(jI.Root,{"data-slot":"dropdown-menu",...e})}function jR({...e}){return(0,Z.jsx)(jI.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function jz({className:e,sideOffset:t=4,...n}){return(0,Z.jsx)(jI.Portal,{children:(0,Z.jsx)(jI.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,P0.cn)("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-card p-1 text-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function jL({className:e,inset:t,variant:n="default",...r}){return(0,Z.jsx)(jI.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:(0,P0.cn)("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-foreground
154/[0.06] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}let jP=[{name:"paragraph",label:"Text",Icon:P9,isActive:e=>e.isActive("paragraph")&&!e.isActive("list"),run:e=>e.chain().focus().setParagraph().run()},{name:"heading1",label:"Heading 1",Icon:P2,isActive:e=>e.isActive("heading",{level:1}),run:e=>e.chain().focus().toggleHeading({level:1}).run()},{name:"heading2",label:"Heading 2",Icon:P5,isActive:e=>e.isActive("heading",{level:2}),run:e=>e.chain().focus().toggleHeading({level:2}).run()},{name:"heading3",label:"Heading 3",Icon:P3,isActive:e=>e.isActive("heading",{level:3}),run:e=>e.chain().focus().toggleHeading({level:3}).run()},{name:"bulletList",label:"Bullet List",Icon:P4,isActive:e=>e.isActive("list",{ordered:!1}),run:e=>e.chain().focus().toggleBulletList().run()},{name:"orderedList",label:"Ordered List",Icon:P6,isActive:e=>e.isActive("list",{ordered:!0}),run:e=>e.chain().focus().toggleOrderedList().run()},{name:"taskList",label:"Task List",Icon:P8,isActive:e=>e.isActive("listItem",{checked:!0})||e.isActive("listItem",{checked:!1}),run:e=>e.chain().focus().toggleTaskList().run()},{name:"blockquote",label:"Quote",Icon:P7,isActive:e=>e.isActive("blockquote"),run:e=>e.chain().focus().toggleBlockquote().run()},{name:"codeBlock",label:"Code Block",Icon:je,isActive:e=>e.isActive("codeBlock"),run:e=>e.chain().focus().toggleCodeBlock({language:"js"}).run()}],jj=jP[0];function j$({editor:e}){let{current:t,activeStates:n}=Pu({editor:e,selector:({editor:e})=>{let t=Object.fromEntries(jP.map(t=>[t.name,t.isActive(e)]));return{current:jP.find(e=>t[e.name])??jj,activeStates:t}}}),r=t.Icon;return(0,Z.jsxs)(jD,{children:[(0,Z.jsx)(jR,{asChild:!0,children:(0,Z.jsxs)("button",{type:"button",className:"ok-bubble-blocktype","aria-label":"Block type",children:[(0,Z.jsx)(r,{className:"ok-bubble-icon"}),(0,Z.jsx)("span",{children:t.label}),(0,Z.jsx)(P1,{className:"size-3 opacity-50"})]})}),(0,Z.jsx)(jz,{align:"start",sideOffset:8,className:"w-44",children:jP.map(t=>{let r=t.Icon;return(0,Z.jsxs)(jL,{className:(0,P0.cn)(n[t.name]&&"bg-foreground
154/[0.06] text-foreground"),onMouseDown:e=>e.preventDefault(),onSelect:()=>t.run(e),children:[(0,Z.jsx)(r,{className:"size-4"}),(0,Z.jsx)("span",{children:t.label})]},t.name)})})]})}let jF=[{name:"Bold",Icon:PW,run:e=>e.chain().focus().toggleBold().run(),mark:"strong",shortcut:"Cmd/Ctrl+B"},{name:"Italic",Icon:PY,run:e=>e.chain().focus().toggleItalic().run(),mark:"emphasis",shortcut:"Cmd/Ctrl+I"},{name:"Underline",Icon:PQ,run:e=>e.chain().focus().toggleUnderline().run(),mark:"underline",shortcut:"Cmd/Ctrl+U"},{name:"Strikethrough",Icon:PX,run:e=>e.chain().focus().toggleStrike().run(),mark:"strike",shortcut:"Cmd/Ctrl+Shift+S"},{name:"Code",Icon:PK,run:e=>e.chain().focus().toggleCode().run(),mark:"code",shortcut:"Cmd/Ctrl+E"},{name:"Highlight",Icon:PJ,run:e=>e.chain().focus().toggleHighlight().run(),mark:"highlight",shortcut:"Cmd/Ctrl+Shift+H"}];function jB({editor:e}){if(!e.isEditable)return!1;let{from:t,to:n,empty:r}=e.state.selection;return!r&&!!e.state.doc.textBetween(t,n," ").trim()}function jH({editor:e}){let t,n=(0,LL.useRef)(null),r=(0,LL.useRef)(null);(0,LL.useEffect)(()=>()=>r.current?.(),[]);let i=Pu({editor:e,selector:({editor:e})=>Object.fromEntries(jF.map(t=>[t.mark,e.isActive(t.mark)]))}),o=Pu({editor:e,selector:({editor:e})=>e.isActive("codeBlock")});try{t=e.view.dom}catch{t=void 0}let s={getBoundingClientRect:()=>{try{let{from:t,to:n}=e.state.selection;return hu(e.view,t,n)}catch{return new DOMRect}},contextElement:t};return(0,Z.jsxs)(PG,{ref:n,editor:e,shouldShow:jB,updateDelay:200,appendTo:()=>document.body,options:{onShow:()=>{let e=n.current;e&&(r.current?.(),r.current=(0,PN.autoUpdate)(s,e,()=>{(0,PN.computePosition)(s,e,{placement:"top",strategy:"fixed",middleware:[(0,PN.offset)(8),(0,PN.flip)(),(0,PN.shift)({padding:8})]}).then(({x:t,y:n})=>{e.isConnected&&(e.style.position="fixed",e.style.left=`${t}px`,e.style.top=`${n}px`)}).catch(()=>{})}))},onHide:()=>{r.current?.(),r.current=null},strategy:"fixed"},className:"ok-bubble-menu",children:[(0,Z.jsx)(j$,{editor:e}),!o&&(0,Z.jsx)("span",{className:"ok-bubble-sep","aria-hidden":"true"}),!o&&(0,Z.jsx)(PZ.TooltipProvider,{delayDuration:350,children:jF.map(({name:t,Icon:n,run:r,mark:o,shortcut:s})=>(0,Z.jsxs)(PZ.Tooltip,{children:[(0,Z.jsx)(PZ.TooltipTrigger,{asChild:!0,children:(0,Z.jsx)("button",{type:"button","aria-label":t,"aria-pressed":i[o],className:(0,P0.cn)("ok-bubble-btn",i[o]&&"is-active"),onMouseDown:t=>{t.preventDefault(),r(e)},children:(0,Z.jsx)(n,{className:"ok-bubble-icon"})})}),(0,Z.jsxs)(PZ.TooltipContent,{sideOffset:8,className:"flex items-center gap-1.5",children:[t,(0,Z.jsx)("span",{className:"text-[11px] text-background/60",children:s})]})]},t))})]})}let jU=()=>new Map,jV=e=>{let t=jU();return e.forEach((e,n)=>{t.set(n,e)}),t},jq=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},jG=()=>new Set,jW=e=>e[e.length-1],jK=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},jJ=Array.from,jY=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},jX=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},jQ=Array.isArray;class jZ{constructor(){this._observers=jU()}on(e,t){return jq(this._observers,e,jG).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return jJ((this._observers.get(e)||jU()).values()).forEach(e=>e(...t))}destroy(){this._observers=jU()}}let j0=Math.floor,j1=Math.abs,j2=(e,t)=>e<t?e:t,j5=(e,t)=>e>t?e:t,j3=e=>0!==e?e<0:1/e<0,j4=Number.MAX_SAFE_INTEGER,j6=Number.MIN_SAFE_INTEGER,j8=Number.isInteger||(e=>"number"==typeof e&&isFinite(e)&&j0(e)===e),j9=String.fromCharCode;j9(65535);let j7=/^\s*/g,$e=/([A-Z])/g,$t=(e,t)=>e.replace($e,e=>`${t}${e.toLowerCase()}`).replace(j7,""),$n="u">typeof TextEncoder?new TextEncoder:null,$r=$n?e=>$n.encode(e):e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},$i="u"<typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});$i&&1===$i.decode(new Uint8Array).length&&($i=null);let $o=(e,t)=>((e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n})(t,()=>e).join("");class $s{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}let $a=()=>new $s,$l=e=>{let t=new Uint8Array((e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t})(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},$c=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},$d=(e,t)=>{for(;t>127;)$c(e,128|127&t),t=j0(t/128);$c(e,127&t)},$u=(e,t)=>
154{let n=j3(t);for(n&&(t=-t),$c(e,128*(t>63)|64*!!n|63&t),t=j0(t/64);t>0;)$c(e,128*(t>127)|127&t),t=j0(t/128)},$h=new Uint8Array(3e4),$p=$h.length/3,$f=$n&&$n.encodeInto?(e,t)=>{if(t.length<$p){let n=$n.encodeInto(t,$h).written||0;$d(e,n);for(let t=0;t<n;t++)$c(e,$h[t])}else $g(e,$r(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;$d(e,r);for(let t=0;t<r;t++)$c(e,n.codePointAt(t))},$m=(e,t)=>{let n=e.cbuf.length,r=e.cpos,i=j2(n-r,t.length),o=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(j5(2*n,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)},$g=(e,t)=>{$d(e,t.byteLength),$m(e,t)},$y=(e,t)=>{let n;(n=e.cbuf.length)-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*j5(n,t)),e.cpos=0);let r=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,r},$b=new DataView(new ArrayBuffer(4)),$v=(e,t)=>{switch(typeof t){case"string":$c(e,119),$f(e,t);break;case"number":if(j8(t)&&0x7fffffff>=j1(t))$c(e,125),$u(e,t);else if($b.setFloat32(0,t),$b.getFloat32(0)===t)$c(e,124),$y(e,4).setFloat32(0,t,!1);else $c(e,123),$y(e,8).setFloat64(0,t,!1);break;case"bigint":$c(e,122),$y(e,8).setBigInt64(0,t,!1);break;case"object":if(null===t)$c(e,126);else if(jQ(t)){$c(e,117),$d(e,t.length);for(let n=0;n<t.length;n++)$v(e,t[n])}else if(t instanceof Uint8Array)$c(e,116),$g(e,t);else{$c(e,118);let n=Object.keys(t);$d(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];$f(e,i),$v(e,t[i])}}break;case"boolean":$c(e,t?120:121);break;default:$c(e,127)}};class $k extends $s{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&$d(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}let $x=e=>{e.count>0&&($u(e.encoder,1===e.count?e.s:-e.s),e.count>1&&$d(e.encoder,e.count-2))};class $w{constructor(){this.encoder=new $s,this.s=0,this.count=0}write(e){this.s===e?this.count++:($x(this),this.count=1,this.s=e)}toUint8Array(){return $x(this),$l(this.encoder)}}let $E=e=>{if(e.count>0){let t=2*e.diff+ +(1!==e.count);$u(e.encoder,t),e.count>1&&$d(e.encoder,e.count-2)}};class $T{constructor(){this.encoder=new $s,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):($E(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return $E(this),$l(this.encoder)}}class $S{constructor(){this.sarr=[],this.s="",this.lensE=new $w}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new $s;return this.sarr.push(this.s),this.s="",$f(e,this.sarr.join("")),$m(e,this.lensE.toUint8Array()),$l(e)}}let $C=()=>{throw Error("Method unimplemented")},$A=()=>{throw Error("Unexpected case")},$_=Error("Unexpected end of array"),$N=Error("Integer out of Range");class $O{constructor(e){this.arr=e,this.pos=0}}let $M=e=>new $O(e),$I=e=>{var t;let n;return t=$R(e),n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t),e.pos+=t,n},$D=e=>e.arr[e.pos++],$R=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(127&r)*n,n*=128,r<128)return t;if(t>j4)throw $N}throw $_},$z=e=>{let t=e.arr[e.pos++],n=63&t,r=64,i=(64&t)>0?-1:1;if((128&t)==0)return i*n;let o=e.arr.length;for(;e.pos<o;){if(n+=(127&(t=e.arr[e.pos++]))*r,r*=128,t<128)return i*n;if(n>j4)throw $N}throw $_},$L=$i?e=>$i.decode($I(e)):e=>{let t=$R(e);if(0===t)return"";{let n=String.fromCodePoint($D(e));if(--t<100)for(;t--;)n+=String.fromCodePoint($D(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},$P=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},$j=[e=>void 0,e=>null,$z,e=>$P(e,4).getFloat32(0,!1),e=>$P(e,8).getFloat64(0,!1),e=>$P(e,8).getBigInt64(0,!1),e=>!1,e=>!0,$L,e=>{let t=$R(e),n={};for(let r=0;r<t;r++)n[$L(e)]=$$(e);return n},e=>{let t=$R(e),n=[];for(let r=0;r<t;r++)n.push($$(e));return n},$I],$$=e=>$j[127-$D(e)](e);class $F extends $O{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){0===this.count&&(this.s=this.reader(this),this.pos!==this.arr.length?this.count=$R(this)+1:this.count=-1);return this.count--,this.s}}
154class $B extends $O{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=$z(this);let e=j3(this.s);this.count=1,e&&(this.s=-this.s,this.count=$R(this)+2)}return this.count--,this.s}}class $H extends $O{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){let e=$z(this);this.diff=j0(e/2),this.count=1,1&e&&(this.count=$R(this)+2)}return this.s+=this.diff,this.count--,this.s}}class $U{constructor(e){this.decoder=new $B(e),this.str=$L(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}crypto.subtle;let $V=crypto.getRandomValues.bind(crypto),$q=Math.random,$G=()=>$V(new Uint32Array(1))[0],$W=Date.now,$K=e=>new Promise(e);Promise.all.bind(Promise);var $J=e.i(838551);let $Y=e=>void 0===e?null:e,$X=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}};try{"u">typeof localStorage&&localStorage&&($X=localStorage)}catch(e){}let $Q=$X,$Z=Symbol("Equality"),$0=(e,t)=>e===t||!!e?.[$Z]?.(t),$1=Object.assign,$2=Object.keys,$5=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},$3=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),$4=Object.freeze,$6=e=>{for(let t in e){let n=e[t];("object"==typeof n||"function"==typeof n)&&$6(e[t])}return $4(e)},$8=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&$8(e,t,n+1)}},$9=(e,t)=>
154{if(e===t)return!0;if(null==e||null==t||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(null!=e[$Z])return e[$Z](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!$9(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if($2(e).length!==$2(t).length)return!1;for(let n in e)if(!$3(e,n)||!$9(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$9(e[n],t[n]))return!1;break;default:return!1}return!0},$7=void 0!==ee.default&&ee.default.release&&/node|io\.js/.test(ee.default.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==ee.default?ee.default:0),Fe="u">typeof window&&"u">typeof document&&!$7;"u">typeof navigator&&/Mac/.test(navigator.platform);let Ft=[],Fn=e=>(()=>{if(void 0===o)if($7){o=jU();let e=ee.default.argv,t=null;for(let n=0;n<e.length;n++){let r=e[n];"-"===r[0]?(null!==t&&o.set(t,""),t=r):null!==t?(o.set(t,r),t=null):Ft.push(r)}null!==t&&o.set(t,"")}else"object"==typeof location?(o=jU(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){let[t,n]=e.split("=");o.set(`--${$t(t,"-")}`,n),o.set(`-${$t(t,"-")}`,n)}})):o=jU();return o}
154)().has(e),Fr=e=>$7?$Y(ee.default.env[e.toUpperCase().replaceAll("-","_")]):$Y($Q.getItem(e)),Fi=e=>Fn("--"+e)||null!==Fr(e),Fo=Fi("production"),Fs=$7&&["true","1","2"].includes(ee.default.env.FORCE_COLOR)||!Fn("--no-colors")&&!Fi("no-color")&&(!$7||ee.default.stdout.isTTY)&&(!$7||Fn("--color")||null!==Fr("COLORTERM")||(Fr("TERM")||"").includes("color")),Fa=Fe?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=j9(e[n]);return btoa(t)}:e=>$J.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64");class Fl{constructor(e,t){this.left=e,this.right=t}}let Fc=(e,t)=>new Fl(e,t),Fd=e=>e.next()>=.5,Fu=(e,t,n)=>j0(e.next()*(n+1-t)+t),Fh=(e,t,n)=>j0(e.next()*(n+1-t)+t),Fp=e=>j9(Fh(e,97,122)),Ff=(e,t)=>t[Fh(e,0,t.length-1)],Fm=Symbol("0schema");class Fg{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push($o(" ",(this._rerrs.length-t)*2)+`${null!=n.path?`[${n.path}] `:""}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join("\n")}}let Fy=(e,t)=>e===t||null!=e&&null!=t&&e.constructor===t.constructor&&(e[$Z]?$0(e,t):jQ(e)?jY(e,e=>jX(t,t=>Fy(e,t))):"object"==typeof e&&$5(e,(e,n)=>Fy(e,t[n])));class Fb{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),Fy(t,n)}equals(e){return this.constructor===e.constructor&&$9(this.shape,e.shape)}[Fm](){return!0}[$Z](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){$C()}get nullable(){return FK(this,F7)}get optional(){return new FN(this)}cast(e){return Br(e,this),e}expect(e){return Br(e,this),e}}class Fv extends Fb{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e?.constructor===this.shape&&(null==this._c||this._c(e));return n||t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor!==this.shape?"Constructor match failed":"Check failed"),n}}let Fk=(e,t=null)=>new Fv(e,t);Fk(Fv);class Fx extends Fb{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape(e);return n||t?.extend(null,"custom prop",e?.constructor.name,"failed to check custom prop"),n}}let Fw=e=>new Fx(e);Fk(Fx);class FE extends Fb{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape.some(t=>t===e);return n||t?.extend(null,this.shape.join(" | "),e.toString()),n}}let FT=(...e)=>new FE(e),FS=Fk(FE),FC=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>"\\"+e)),FA=e=>F3.check(e)?[FC(e)]:FS.check(e)?e.shape.map(e=>e+""):F5.check(e)?["[+-]?\\d+.?\\d*"]:F4.check(e)?[".*"]:FJ.check(e)?e.shape.map(FA).flat(1):void $A();Fk(class extends Fb{constructor(e){super(),this.shape=e,this._r=RegExp("^"+e.map(FA).map(e=>`(${e.join("|")})`).join("")+"$")}check(e,t){let n=null!=this._r.exec(e);return n||t?.extend(null,this._r.toString(),e.toString(),"String doesn't match string template."),n}});let F_=Symbol("optional");class FN extends Fb{constructor(e){super(),this.shape=e}check(e,t){let n=void 0===e||this.shape.check(e);return n||t?.extend(null,"undefined (optional)","()"),n}get[F_](){return!0}}let FO=Fk(FN);class FM extends Fb{check(e,t){return t?.extend(null,"never",typeof e),!1}}new FM,Fk(FM);class FI extends Fb{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new FI(this.shape,!0)}check(e,t){return null==e?(t?.extend(null,"object","null"),!1):$5(this.shape,(n,r)=>{let i=this._isPartial&&!$3(e,r)||n.check(e[r],t);return i||t?.extend(r.toString(),n.toString(),typeof e[r],"Object property does not match"),i})}}let FD=Fk(FI),FR=Fw(e=>null!=e&&(e.constructor===Object||null==e.constructor));class Fz extends Fb{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return null!=e&&$5(e,(n,r)=>{let i=this.shape.keys.check(r,t);return i||t?.extend(r+"","Record",typeof e,i?"Key doesn't match schema":"Value doesn't match value"),i&&this.shape.values.check(n,t)})}}let FL=(e,t)=>new Fz(e,t),FP=Fk(Fz);class Fj extends Fb{constructor(e){super(),this.shape=e}check(e,t){return null!=e&&$5(this.shape,(n,r)=>{let i=n.check(e[r],t);return i||t?.extend(r.toString(),"Tuple",typeof n),i})}}Fk(Fj);class F$ extends Fb{constructor(e){super(),this.shape=1===e.length?e[0]:new FW(e)}check(e,t){let n=jQ(e)&&jY(e,e=>this.shape.check(e));return n||t?.extend(null,"Array",""),n}}let FF=(...e)=>new F$(e),FB=Fk(F$),FH=Fw(e=>jQ(e));class FU extends Fb{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e instanceof this.shape&&(null==this._c||this._c(e));
154return n||t?.extend(null,this.shape.name,e?.constructor.name),n}}Fk(FU);let FV=((e,t=null)=>new FU(e,t))(Fb),Fq=Fk(class extends Fb{constructor(e){super(),this.len=e.length-1,this.args=((...e)=>new Fj(e))(...e.slice(-1)),this.res=e[this.len]}check(e,t){let n=e.constructor===Function&&e.length<=this.len;return n||t?.extend(null,"function",typeof e),n}}),FG=Fw(e=>"function"==typeof e);Fk(class extends Fb{constructor(e){super(),this.shape=e}check(e,t){let n=jY(this.shape,n=>n.check(e,t));return n||t?.extend(null,"Intersectinon",typeof e),n}},e=>e.shape.length>0);class FW extends Fb{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){let n=jX(this.shape,n=>n.check(e,t));return t?.extend(null,"Union",typeof e),n}}let FK=(...e)=>e.findIndex(e=>FJ.check(e))>=0?FK(...e.map(e=>Bn(e)).map(e=>FJ.check(e)?e.shape:[e]).flat(1)):1===e.length?e[0]:new FW(e),FJ=Fk(FW),FY=()=>!0,FX=Fw(FY),FQ=Fk(Fx,e=>e.shape===FY),FZ=Fw(e=>"bigint"==typeof e),F0=Fw(e=>e===FZ),F1=Fw(e=>"symbol"==typeof e);Fw(e=>e===F1);let F2=Fw(e=>"number"==typeof e),F5=Fw(e=>e===F2),F3=Fw(e=>"string"==typeof e),F4=Fw(e=>e===F3),F6=Fw(e=>"boolean"==typeof e),F8=Fw(e=>e===F6),F9=FT(void 0);Fk(FE,e=>1===e.shape.length&&void 0===e.shape[0]),FT(void 0);let F7=FT(null),Be=Fk(FE,e=>1===e.shape.length&&null===e.shape[0]);Fk(Uint8Array),Fk(Fv,e=>e.shape===Uint8Array);let Bt=FK(F2,F3,F7,F9,FZ,F6,F1);l=FF(FX),c=FL(F3,FX),d=FK(F2,F3,F7,F6,l,c),l.shape=d,c.shape.values=d;let Bn=e=>{if(FV.check(e))return e;if(FR.check(e)){let t={};for(let n in e)t[n]=Bn(e[n]);return new FI(t)}if(FH.check(e))return FK(...e.map(Bn));if(Bt.check(e))return FT(e);if(FG.check(e))return Fk(e);$A()},Br=Fo?()=>{}:(e,t)=>{let n=new Fg;if(!t.check(e,n))throw Error(`Expected value to be of type ${t.constructor.name}. 155${n.toString()}`)},Bi=new class e{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:Bn(e),h:t}),this}else(e){return this.if(FX,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){let r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw Error("Unhandled pattern")}}}(FX).if(F5,(e,t)=>Fu(t,j6,j4)).if(F4,(e,t)=>((e,t=0,n=20)=>{let r=Fh(e,t,n),i="";for(let t=0;t<r;t++)i+=Fp(e);return i})(t)).if(F8,(e,t)=>Fd(t)).if(F0,(e,t)=>BigInt(Fu(t,j6,j4))).if(FJ,(e,t)=>Bo(t,Ff(t,e.shape))).if(FD,(e,t)=>{let n={};for(let r in e.shape){let i=e.shape[r];if(FO.check(i)){if(Fd(t))continue;i=i.shape}n[r]=Bi(i,t)}return n}).if(FB,(e,t)=>{let n=[],r=Fh(t,0,42);for(let i=0;i<r;i++)n.push(Bo(t,e.shape));return n}).if(FS,(e,t)=>Ff(t,e.shape)).if(Be,(e,t)=>null).if(Fq,(e,t)=>{let n=Bo(t,e.res);return()=>n}).if(FQ,(e,t)=>Bo(t,Ff(t,[F2,F3,F7,F9,FZ,F6,FF(F2),FL(FK("a","b","c"),F2)]))).if(FP,(e,t)=>{let n={},r=Fu(t,0,3);for(let i=0;i<r;i++){let r=Bo(t,e.shape.keys),i=Bo(t,e.shape.values);n[r]=i}return n}).done(),Bo=(e,t)=>Bi(Bn(t),e),Bs="u">typeof document?document:{};Fw(e=>e.nodeType===Bu),"u">typeof DOMParser&&new DOMParser,Fw(e=>e.nodeType===Bl),Fw(e=>e.nodeType===Bc);let Ba=e=>((e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n})(e,(e,t)=>`${t}:${e};`).join(""),Bl=Bs.ELEMENT_NODE,Bc=Bs.TEXT_NODE;Bs.CDATA_SECTION_NODE,Bs.COMMENT_NODE;let Bd=Bs.DOCUMENT_NODE;Bs.DOCUMENT_TYPE_NODE;let Bu=Bs.DOCUMENT_FRAGMENT_NODE;Fw(e=>e.nodeType===Bd);let Bh=e=>class{constructor(e){this._=e}destroy(){e(this._)}},Bp=Bh(clearTimeout),Bf=(e,t)=>new Bp(setTimeout(t,e));Bh(clearInterval),Bh(e=>"u">typeof requestAnimationFrame&&cancelAnimationFrame(e)),Bh(e=>"u">typeof cancelIdleCallback&&cancelIdleCallback(e));let Bm=Symbol,Bg=Bm(),By=Bm(),Bb=Bm(),Bv=Bm(),Bk=Bm(),Bx=Bm(),Bw=Bm(),BE=Bm(),BT=Bm();$W();let BS={[Bg]:Fc("font-weight","bold"),[By]:Fc("font-weight","normal"),[Bb]:Fc("color","blue"),[Bk]:Fc("color","green"),[Bv]:Fc("color","grey"),[Bx]:Fc("color","red"),[Bw]:Fc("color","purple"),[BE]:Fc("color","orange"),[BT]:Fc("color","black")},BC=Fs?e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=jU(),i=[],o=0;for(;o<e.length;o++){let i=e[o],s=BS[i];if(void 0!==s)r.set(s.left,s.right);else{if(void 0===i)break;if(i.constructor===String||i.constructor===Number){let e=Ba(r);o>0||e.length>
1550?(t.push("%c"+i),n.push(e)):t.push(i)}else break}}for(o>0&&(i=n).unshift(t.join(""));o<e.length;o++){let t=e[o];t instanceof Symbol||i.push(t)}return i}:e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(void 0===n)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(""));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n},BA=(...e)=>{console.warn(...BC(e)),e.unshift(BE),B_.forEach(t=>t.print(e))},B_=jG(),BN=e=>({[Symbol.iterator](){return this},next:e}),BO=(e,t)=>BN(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}});class BM{constructor(e,t){this.clock=e,this.len=t}}class BI{constructor(){this.clients=new Map}}let BD=(e,t,n)=>t.clients.forEach((t,r)=>{let i=e.doc.store.clients.get(r);if(null!=i){let r=i[i.length-1],o=r.id.clock+r.length;for(let r=0,s=t[r];r<t.length&&s.clock<o;s=t[++r])Hp(e,i,s.clock,s.len,n)}}),BR=(e,t)=>{let n=e.clients.get(t.client);return void 0!==n&&null!==((e,t)=>{let n=0,r=e.length-1;for(;n<=r;){let i=j0((n+r)/2),o=e[i],s=o.clock;if(s<=t){if(t<s+o.len)return i;n=i+1}else r=i-1}return null})(n,t.clock)},Bz=e=>{e.clients.forEach(e=>{let t,n;for(e.sort((e,t)=>e.clock-t.clock),t=1,n=1;t<e.length;t++){let r=e[n-1],i=e[t];r.clock+r.len>=i.clock?e[n-1]=new BM(r.clock,j5(r.len,i.clock+i.len-r.clock)):(n<t&&(e[n]=i),n++)}e.length=n})},BL=e=>{let t=new BI;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){let o=r.slice();for(let t=n+1;t<e.length;t++)jK(o,e[t].clients.get(i)||[]);t.clients.set(i,o)}});return Bz(t),t},BP=(e,t,n,r)=>{jq(e.clients,t,()=>[]).push(new BM(n,r))},Bj=()=>new BI,B$=(e,t)=>
155{$d(e.restEncoder,t.clients.size),jJ(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),$d(e.restEncoder,t);let r=n.length;$d(e.restEncoder,r);for(let t=0;t<r;t++){let r=n[t];e.writeDsClock(r.clock),e.writeDsLen(r.len)}})},BF=(e,t,n)=>{let r=new BI,i=$R(e.restDecoder);for(let o=0;o<i;o++){e.resetDsCurVal();let i=$R(e.restDecoder),o=$R(e.restDecoder),s=n.clients.get(i)||[],a=Hs(n,i);for(let n=0;n<o;n++){let n=e.readDsClock(),o=n+e.readDsLen();if(n<a){a<o&&BP(r,i,a,o-a);let e=Hl(s,n),l=s[e];for(!l.deleted&&l.id.clock<n&&(s.splice(e+1,0,UH(t,l,n-l.id.clock)),e++);e<s.length;)if((l=s[e++]).id.clock<o)l.deleted||(o<l.id.clock+l.length&&s.splice(e,0,UH(t,l,o-l.id.clock)),l.delete(t));else break}else BP(r,i,n,o-n)}}if(r.clients.size>0){let e=new BW;return $d(e.restEncoder,0),B$(e,r),e.toUint8Array()}return null};class BB extends jZ{constructor({guid:e="10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^$G()&15>>e/4).toString(16)),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:o=!1,shouldLoad:s=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=$G(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new Hi,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=s,this.autoLoad=o,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=$K(e=>{this.on("load",()=>{this.isLoaded=!0,e(this)})});const a=()=>$K(e=>{let t=n=>{(void 0===n||!0===n)&&(this.off("sync",t),e())};this.on("sync",t)});this.on("sync",e=>{!1===e&&this.isSynced&&(this.whenSynced=a()),this.isSynced=void 0===e||!0===e,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=a()}load(){let e=this._item;null===e||this.shouldLoad||Hv(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(jJ(this.subdocs).map(e=>e.guid))}transact(e,t=null){return Hv(this,e,t)}get(e,t=HB){let n=jq(this.share,e,()=>{let e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==HB&&r!==t)if(r===HB){let r=new t;r._map=n._map,n._map.forEach(e=>{for(;null!==e;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;null!==e;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}else throw Error(`Type with the name ${e} has already been defined with a different constructor`);return n}getArray(e=""){return this.get(e,H3)}getText(e=""){return this.get(e,Uh)}getMap(e=""){return this.get(e,H6)}getXmlElement(e=""){return this.get(e,Um)}getXmlFragment(e=""){return this.get(e,Uf)}toJSON(){let e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,jJ(this.subdocs).forEach(e=>e.destroy());let e=this._item;if(null!==e){this._item=null;let t=e.content;t.doc=new BB({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,Hv(e.parent.doc,n=>{let r=t.doc;e.deleted||n.subdocsAdded.add(r),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class BH{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=$R(this.restDecoder),this.dsCurrVal}readDsLen(){let e=$R(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class BU extends BH{constructor(e){super(e),this.keys=[],$R(e),this.keyClockDecoder=new $H($I(e)),this.clientDecoder=new $B($I(e)),this.leftClockDecoder=new $H($I(e)),this.rightClockDecoder=new $H($I(e)),this.infoDecoder=new $F($I(e),$D),this.stringDecoder=new $U($I(e)),this.parentInfoDecoder=new $F($I(e),$D),this.typeRefDecoder=new $B($I(e)),this.lenDecoder=new $B($I(e))}readLeftID(){return new B0(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new B0(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return 1===this.parentInfoDecoder.read()}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return $$(this.restDecoder)}readBuf(){return $I(this.restDecoder)}readJSON(){return $$(this.restDecoder)}readKey(){let e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{let e=this.stringDecoder.read();return this.keys.push(e),e}}}class BV{constructor(){this.restEncoder=$a()}
155toUint8Array(){return $l(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){$d(this.restEncoder,e)}writeDsLen(e){$d(this.restEncoder,e)}}class Bq extends BV{writeLeftID(e){$d(this.restEncoder,e.client),$d(this.restEncoder,e.clock)}writeRightID(e){$d(this.restEncoder,e.client),$d(this.restEncoder,e.clock)}writeClient(e){$d(this.restEncoder,e)}writeInfo(e){$c(this.restEncoder,e)}writeString(e){$f(this.restEncoder,e)}writeParentInfo(e){$d(this.restEncoder,+!!e)}writeTypeRef(e){$d(this.restEncoder,e)}writeLen(e){$d(this.restEncoder,e)}writeAny(e){$v(this.restEncoder,e)}writeBuf(e){$g(this.restEncoder,e)}writeJSON(e){$f(this.restEncoder,JSON.stringify(e))}writeKey(e){$f(this.restEncoder,e)}}class BG{constructor(){this.restEncoder=$a(),this.dsCurrVal=0}toUint8Array(){return $l(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){let t=e-this.dsCurrVal;this.dsCurrVal=e,$d(this.restEncoder,t)}writeDsLen(e){0===e&&$A(),$d(this.restEncoder,e-1),this.dsCurrVal+=e}}class BW extends BG{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new $T,this.clientEncoder=new $w,this.leftClockEncoder=new $T,this.rightClockEncoder=new $T,this.infoEncoder=new $k($c),this.stringEncoder=new $S,this.parentInfoEncoder=new $k($c),this.typeRefEncoder=new $w,this.lenEncoder=new $w}toUint8Array(){let e=$a();return $d(e,0),$g(e,this.keyClockEncoder.toUint8Array()),$g(e,this.clientEncoder.toUint8Array()),$g(e,this.leftClockEncoder.toUint8Array()),$g(e,this.rightClockEncoder.toUint8Array()),$g(e,$l(this.infoEncoder)),$g(e,this.stringEncoder.toUint8Array()),$g(e,$l(this.parentInfoEncoder)),$g(e,this.typeRefEncoder.toUint8Array()),$g(e,this.lenEncoder.toUint8Array()),$m(e,$l(this.restEncoder)),$l(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(+!!e)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){$v(this.restEncoder,e)}writeBuf(e){$g(this.restEncoder,e)}writeJSON(e){$v(this.restEncoder,e)}writeKey(e){let t=this.keyMap.get(e);void 0===t?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}let BK=(e,t,n)=>{let r=new Map;n.forEach((e,n)=>{Hs(t,n)>e&&r.set(n,e)}),Ho(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),$d(e.restEncoder,r.size),jJ(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{((e,t,n,r)=>{r=j5(r,t[0].id.clock);let i=Hl(t,r);$d(e.restEncoder,t.length-i),e.writeClient(n),$d(e.restEncoder,r);let o=t[i];o.write(e,r-o.id.clock);for(let n=i+1;n<t.length;n++)t[n].write(e,0)})(e,t.clients.get(n),n,r)})},BJ=(e,t,n,r=BU)=>{let i=$M(t);((e,t,n,r=new BU(e))=>Hv(t,e=>{e.local=!1;let t=!1,n=e.doc,i=n.store,o=((e,t,n)=>{let r=[],i=jJ(n.keys()).sort((e,t)=>e-t);if(0===i.length)return null;let o=()=>{if(0===i.length)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;){if(i.pop(),!(i.length>0))return null;e=n.get(i[i.length-1])}return e},s=o();if(null===s)return null;let a=new Hi,l=new Map,c=(e,t)=>{let n=l.get(e);(null==n||n>t)&&l.set(e,t)},d=s.refs[s.i++],u=new Map,h=()=>{for(let e of r){let t=e.id.client,r=n.get(t);r?(r.i--,a.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):a.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(d.constructor!==UK){let i=jq(u,d.id.client,()=>Hs(t,d.id.client))-d.id.clock;if(i<0)r.push(d),c(d.id.client,d.id.clock-1),h();else{let o=d.getMissing(e,t);if(null!==o){r.push(d);let e=n.get(o)||{refs:[],i:0};if(e.refs.length===e.i)c(o,Hs(t,o)),h();else{d=e.refs[e.i++];continue}}else(0===i||i<d.length)&&(d.integrate(e,i),u.set(d.id.client,d.id.clock+d.length))}}if(r.length>0)d=r.pop();else if(null!==s&&s.i<s.refs.length)d=s.refs[s.i++];else{if(null===(s=o()))break;d=s.refs[s.i++]}}if(a.clients.size>0){let e=new BW;return BK(e,a,new Map),$d(e.restEncoder,0),{missing:l,update:e.toUint8Array()}}return null})(e,i,((e,t)=>{let n=jU(),r=$R(e.restDecoder);for(let i=0;i<r;i++){let r=$R(e.restDecoder),i=Array(r),o=e.readClient(),s=$R(e.restDecoder);n.set(o,{i:0,refs:i});for(let n=0;n<r;n++){let r=e.readInfo();switch(31&r){case 0:{let t=e.readLen();i[n]=new Uk(B2(o,s),t),s+=t;break}case 10:{let t=$R(e.restDecoder);i[n]=new UK(B2(o,s),t),s+=t;break}default:{let a=(192&r)==0,l=new Uq(B2(o,s),null,(128&r)==128?e.readLeftID():null,null,(64&r)==64?e.readRightID():null,a?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,a&&(32&r)==32?e.readString():null,UG(e,r));i[n]=l,s+=l.length}}}}return n})(r,n)),s=i.pendingStructs;if(s){for(let[e,n]of s.missing)if(n<Hs(i,e)){t=!0;break}if(o){for(let[e,t]of o.missing){let n=s.missing.get(e);(null==n||n>t)&&s.missing.set(e,t)}s.update=HA([s.update,o.update])}}else i.pendingStructs=o;let a=BF(r,e,i);if(i.pendingDs){let t=new BU($M(i.pendingDs));$R(t.restDecoder);let n=BF(t,e,i);a&&n?i.pendingDs=HA([a,n]):i.pendingDs=a||n}else i.pendingDs=a;if(t){let t=i.pendingStructs.update;
155i.pendingStructs=null,BJ(e.doc,t)}},n,!1))(i,e,n,new r(i))};class BY{constructor(){this.l=[]}}let BX=()=>new BY,BQ=(e,t)=>{let n=e.l,r=n.length;e.l=n.filter(e=>t!==e),r===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},BZ=(e,t,n)=>$8(e.l,[t,n]);class B0{constructor(e,t){this.client=e,this.clock=t}}let B1=(e,t)=>e===t||null!==e&&null!==t&&e.client===t.client&&e.clock===t.clock,B2=(e,t)=>new B0(e,t),B5=e=>{for(let[t,n]of e.doc.share.entries())if(n===e)return t;throw $A()},B3=(e,t)=>{for(;null!==t;){if(t.parent===e)return!0;t=t.parent._item}return!1};class B4{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}}class B6{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}}let B8=(e,t,n)=>{let r=null,i=null;return null===e._item?i=B5(e):r=B2(e._item.id.client,e._item.id.clock),new B4(r,i,t,n)},B9=(e,t,n=0)=>{let r=e._start;if(n<0){if(0===t)return B8(e,null,n);t--}for(;null!==r;){if(!r.deleted&&r.countable){if(r.length>t)return B8(e,B2(r.id.client,r.id.clock+t),n);t-=r.length}if(null===r.right&&n<0)return B8(e,r.lastId,n);r=r.right}return B8(e,null,n)};class B7{constructor(e,t){this.ds=e,this.sv=t}}let He=(e,t)=>new B7(e,t);He(Bj(),new Map);let Ht=e=>{var t;let n;return He((t=e.store,n=Bj(),t.clients.forEach((e,t)=>{let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(n.deleted){let i=n.id.clock,o=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[++t+1])o+=n.length;r.push(new BM(i,o))}}r.length>0&&n.clients.set(t,r)}),n),Ho(e.store))},Hn=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!BR(t.ds,e.id),Hr=(e,t)=>{let n=jq(e.meta,Hr,jG),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<Hs(r,n)&&Hu(e,B2(n,t))}),BD(e,t.ds,e=>{}),n.add(t))};class Hi{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}let Ho=e=>{let t=new Map;return e.clients.forEach((e,n)=>{let r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},Hs=(e,t)=>{let n=e.clients.get(t);if(void 0===n)return 0;let r=n[n.length-1];return r.id.clock+r.length},Ha=(e,t)=>{let n=e.clients.get(t.id.client);if(void 0===n)n=[],e.clients.set(t.id.client,n);else{let e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw $A()}n.push(t)},Hl=(e,t)=>{let n=0,r=e.length-1,i=e[r],o=i.id.clock;if(o===t)return r;let s=j0(t/(o+i.length-1)*r);for(;n<=r;){if((o=(i=e[s]).id.clock)<=t){if(t<o+i.length)return s;n=s+1}else r=s-1;s=j0((n+r)/2)}throw $A()},Hc=(e,t)=>{let n=e.clients.get(t.client);return n[Hl(n,t.clock)]},Hd=(e,t,n)=>{let r=Hl(t,n),i=t[r];return i.id.clock<n&&i instanceof Uq?(t.splice(r+1,0,UH(e,i,n-i.id.clock)),r+1):r},Hu=(e,t)=>{let n=e.doc.store.clients.get(t.client);return n[Hd(e,n,t.clock)]},Hh=(e,t,n)=>{let r=t.clients.get(n.client),i=Hl(r,n.clock),o=r[i];return n.clock!==o.id.clock+o.length-1&&o.constructor!==Uk&&r.splice(i+1,0,UH(e,o,n.clock-o.id.clock+1)),o},Hp=(e,t,n,r,i)=>{let o;if(0===r)return;let s=n+r,a=Hd(e,t,n);do s<(o=t[a++]).id.clock+o.length&&Hd(e,t,s),i(o);while(a<t.length&&t[a].id.clock<s)};class Hf{constructor(e,t,n){this.doc=e,this.deleteSet=new BI,this.beforeState=Ho(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}let Hm=(e,t)=>(0!==t.deleteSet.clients.size||!!((e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1})(t.afterState,(e,n)=>t.beforeState.get(n)!==e))&&(Bz(t.deleteSet),BK(e,t.doc.store,t.beforeState),B$(e,t.deleteSet),!0),Hg=(e,t,n)=>{let r=t._item;(null===r||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&jq(e.changed,t,jG).add(n)},Hy=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0;n=r,r=e[--i-1]){if(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n)){n instanceof Uq&&null!==n.parentSub&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);continue}break}let o=t-i;return o&&e.splice(t+1-o,o),o},Hb=(e,t)=>{if(t<e.length){let n=e[t],r=n.doc,i=r.store,o=n.deleteSet,s=n._mergeStructs;try{Bz(o),n.afterState=Ho(n.doc.store),r.emit("beforeObserverCalls",[n,r]);let e=[];n.changed.forEach((t,r)=>e.push(()=>{null!==r._item&&r._item.deleted||r._callObserver(n,t)})),e.push(()=>
155{n.changedParentTypes.forEach((t,r)=>{r._dEH.l.length>0&&(null===r._item||!r._item.deleted)&&((t=t.filter(e=>null===e.target._item||!e.target._item.deleted)).forEach(e=>{e.currentTarget=r,e._path=null}),t.sort((e,t)=>e.path.length-t.path.length),e.push(()=>{BZ(r._dEH,t,n)}))}),e.push(()=>r.emit("afterTransaction",[n,r])),e.push(()=>{n._needFormattingCleanup&&Uc(n)})}),$8(e,[])}finally{r.gc&&((e,t,n)=>{for(let[r,i]of e.clients.entries()){let e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){let o=i[r],s=o.clock+o.len;for(let r=Hl(e,o.clock),i=e[r];r<e.length&&i.id.clock<s;i=e[++r]){let i=e[r];if(o.clock+o.len<=i.id.clock)break;i instanceof Uq&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}})(o,i,r.gcFilter),o.clients.forEach((e,t)=>{let n=i.clients.get(t);for(let t=e.length-1;t>=0;t--){let r=e[t],i=j2(n.length-1,1+Hl(n,r.clock+r.len-1));for(let e=i,t=n[e];e>0&&t.id.clock>=r.clock;t=n[e])e-=1+Hy(n,e)}}),n.afterState.forEach((e,t)=>{let r=n.beforeState.get(t)||0;if(r!==e){let e=i.clients.get(t),n=j5(Hl(e,r),1);for(let t=e.length-1;t>=n;)t-=1+Hy(e,t)}});for(let e=s.length-1;e>=0;e--){let{client:t,clock:n}=s[e].id,r=i.clients.get(t),o=Hl(r,n);!(o+1<r.length&&Hy(r,o+1)>1)&&o>0&&Hy(r,o)}if(n.local||n.afterState.get(r.clientID)===n.beforeState.get(r.clientID)||(((...e)=>{console.log(...BC(e)),B_.forEach(t=>t.print(e))})(BE,Bg,"[yjs] ",By,Bx,"Changed the client-id because another client seems to be using it."),r.clientID=$G()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){let e=new Bq;Hm(e,n)&&r.emit("update",[e.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){let e=new BW;Hm(e,n)&&r.emit("updateV2",[e.toUint8Array(),n.origin,r,n])}let{subdocsAdded:a,subdocsLoaded:l,subdocsRemoved:c}=n;(a.size>0||c.size>0||l.size>0)&&(a.forEach(e=>{e.clientID=r.clientID,null==e.collectionid&&(e.collectionid=r.collectionid),r.subdocs.add(e)}),c.forEach(e=>r.subdocs.delete(e)),r.emit("subdocs",[{loaded:l,added:a,removed:c},r,n]),c.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,e])):Hb(e,t+1)}}},Hv=(e,t,n=null,r=!0)=>{let i=e._transactionCleanups,o=!1,s=null;null===e._transaction&&(o=!0,e._transaction=new Hf(e,n,r),i.push(e._transaction),1===i.length&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{s=t(e._transaction)}finally{if(o){let t=e._transaction===i[0];e._transaction=null,t&&Hb(i,0)}}return s};class Hk{constructor(e,t){this.insertions=t,this.deletions=e,this.meta=new Map}}let Hx=(e,t,n)=>{BD(e,n.deletions,n=>{n instanceof Uq&&t.scope.some(t=>t===e.doc||B3(t,n))&&UB(n,!1)})},Hw=(e,t,n)=>{let r=null,i=e.doc,o=e.scope;Hv(i,n=>{for(;t.length>0&&null===e.currStackItem;){let r=i.store,s=t.pop(),a=new Set,l=[],c=!1;BD(n,s.insertions,e=>{if(e instanceof Uq){if(null!==e.redone){let{item:t,diff:i}=UF(r,e.id);i>0&&(t=Hu(n,B2(t.id.client,t.id.clock+i))),e=t}!e.deleted&&o.some(t=>t===n.doc||B3(t,e))&&l.push(e)}}),BD(n,s.deletions,e=>{e instanceof Uq&&o.some(t=>t===n.doc||B3(t,e))&&!BR(s.insertions,e.id)&&a.add(e)}),a.forEach(t=>{c=null!==UV(n,t,a,s.insertions,e.ignoreRemoteMapChanges,e)||c});for(let t=l.length-1;t>=0;t--){let r=l[t];e.deleteFilter(r)&&(r.delete(n),c=!0)}e.currStackItem=c?s:null}n.changed.forEach((e,t)=>{e.has(null)&&t._searchMarker&&(t._searchMarker.length=0)}),r=n},e);let s=e.currStackItem;if(null!=s){let t=r.changedParentTypes;e.emit("stack-item-popped",[{stackItem:s,type:n,changedParentTypes:t,origin:e},e]),e.currStackItem=null}return s};class HE extends jZ{constructor(e,{captureTimeout:t=500,captureTransaction:n=e=>!0,deleteFilter:r=()=>!0,trackedOrigins:i=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:s=jQ(e)?e[0].doc:e instanceof BB?e:e.doc}={}){super(),this.scope=[],this.doc=s,this.addToScope(e),this.deleteFilter=r,i.add(this),this.trackedOrigins=i,this.captureTransaction=n,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.currStackItem=null,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=t,this.afterTransactionHandler=e=>{if(!this.captureTransaction(e)||!this.scope.some(t=>
155e.changedParentTypes.has(t)||t===this.doc)||!this.trackedOrigins.has(e.origin)&&(!e.origin||!this.trackedOrigins.has(e.origin.constructor)))return;let t=this.undoing,n=this.redoing,r=t?this.redoStack:this.undoStack;t?this.stopCapturing():n||this.clear(!1,!0);let i=new BI;e.afterState.forEach((t,n)=>{let r=e.beforeState.get(n)||0,o=t-r;o>0&&BP(i,n,r,o)});let o=$W(),s=!1;if(this.lastChange>0&&o-this.lastChange<this.captureTimeout&&r.length>0&&!t&&!n){let t=r[r.length-1];t.deletions=BL([t.deletions,e.deleteSet]),t.insertions=BL([t.insertions,i])}else r.push(new Hk(e.deleteSet,i)),s=!0;t||n||(this.lastChange=o),BD(e,e.deleteSet,t=>{t instanceof Uq&&this.scope.some(n=>n===e.doc||B3(n,t))&&UB(t,!0)});let a=[{stackItem:r[r.length-1],origin:e.origin,type:t?"redo":"undo",changedParentTypes:e.changedParentTypes},this];s?this.emit("stack-item-added",a):this.emit("stack-item-updated",a)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(e){let t=new Set(this.scope);(e=jQ(e)?e:[e]).forEach(e=>{t.has(e)||(t.add(e),(e instanceof HB?e.doc!==this.doc:e!==this.doc)&&BA("[yjs#509] Not same Y.Doc"),this.scope.push(e))})}addTrackedOrigin(e){this.trackedOrigins.add(e)}removeTrackedOrigin(e){this.trackedOrigins.delete(e)}clear(e=!0,t=!0){(e&&this.canUndo()||t&&this.canRedo())&&this.doc.transact(n=>{e&&(this.undoStack.forEach(e=>Hx(n,this,e)),this.undoStack=[]),t&&(this.redoStack.forEach(e=>Hx(n,this,e)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:e,redoStackCleared:t}])})}stopCapturing(){this.lastChange=0}undo(){let e;this.undoing=!0;try{e=Hw(this,this.undoStack,"undo")}finally{this.undoing=!1}return e}redo(){let e;this.redoing=!0;try{e=Hw(this,this.redoStack,"redo")}finally{this.redoing=!1}return e}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}class HT{constructor(e,t){this.gen=function*(e){let t=$R(e.restDecoder);for(let n=0;n<t;n++){let t=$R(e.restDecoder),n=e.readClient(),r=$R(e.restDecoder);for(let i=0;i<t;i++){let t=e.readInfo();if(10===t){let t=$R(e.restDecoder);yield new UK(B2(n,r),t),r+=t}else if((31&t)!=0){let i=(192&t)==0,o=new Uq(B2(n,r),null,(128&t)==128?e.readLeftID():null,null,(64&t)==64?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&(32&t)==32?e.readString():null,UG(e,t));yield o,r+=o.length}else{let t=e.readLen();yield new Uk(B2(n,r),t),r+=t}}}}(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&&null!==this.curr&&this.curr.constructor===UK)return this.curr}}class HS{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}let HC=(e,t)=>{if(e.constructor===Uk){let{client:n,clock:r}=e.id;return new Uk(B2(n,r+t),e.length-t)}if(e.constructor===UK){let{client:n,clock:r}=e.id;return new UK(B2(n,r+t),e.length-t)}{let{client:n,clock:r}=e.id;return new Uq(B2(n,r+t),null,B2(n,r+t-1),null,e.rightOrigin,e.parent,e.parentSub,e.content.splice(t))}},HA=(e,t=BU,n=BW)=>{if(1===e.length)return e[0];let r=e.map(e=>new t($M(e))),i=r.map(e=>new HT(e,!0)),o=null,s=new n,a=new HS(s);for(;(i=i.filter(e=>null!==e.curr)).sort((e,t)=>{if(e.curr.id.client!==t.curr.id.client)return t.curr.id.client-e.curr.id.client;{let n=e.curr.id.clock-t.curr.id.clock;return 0===n?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===UK?1:-1:n}}),0!==i.length;){let e=i[0],t=e.curr.id.client;if(null!==o){let n=e.curr,r=!1;for(;null!==n&&n.id.clock+n.length<=o.struct.id.clock+o.struct.length&&n.id.client>=o.struct.id.client;)n=e.next(),r=!0;if(null===n||n.id.client!==t||r&&n.id.clock>o.struct.id.clock+o.struct.length)continue;if(t!==o.struct.id.client)HN(a,o.struct,o.offset),o={struct:n,offset:0},e.next();else if(o.struct.id.clock+o.struct.length<n.id.clock)if(o.struct.constructor===UK)o.struct.length=n.id.clock+n.length-o.struct.id.clock;else{HN(a,o.struct,o.offset);let e=n.id.clock-o.struct.id.clock-o.struct.length;o={struct:new UK(B2(t,o.struct.id.clock+o.struct.length),e),offset:0}}else{let t=o.struct.id.clock+o.struct.length-n.id.clock;t>0&&(o.struct.constructor===UK?o.struct.length-=t:n=HC(n,t)),o.struct.mergeWith(n)||(HN(a,o.struct,o.offset),o={struct:n,offset:0},e.next())}}else o={struct:e.curr,offset:0},e.next();for(let n=e.curr;null!==n&&n.id.client===t&&n.id.clock===o.struct.id.clock+o.struct.length&&n.constructor!==UK;n=e.next())HN(a,o.struct,o.offset),o={struct:n,offset:0}}return null!==o&&(HN(a,o.struct,o.offset),o=null),HO(a),B$(s,BL(r.map(e=>(e=>{let t=new BI,n=$R(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();let n=$R(e.restDecoder),r=$R(e.restDecoder);if(r>0){let i=jq(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new BM(e.readDsClock(),e.readDsLen()))}}return t})(e)))),s.toUint8Array()},H_=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:$l(e.encoder.restEncoder)}
155),e.encoder.restEncoder=$a(),e.written=0)},HN=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&H_(e),0===e.written&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),$d(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},HO=e=>{H_(e);let t=e.encoder.restEncoder;$d(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){let r=e.clientStructs[n];$d(t,r.written),$m(t,r.restEncoder)}},HM="You must not compute changes after the event-handler fired.";class HI{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=HD(this.currentTarget,this.target))}deletes(e){return BR(this.transaction.deleteSet,e.id)}get keys(){if(null===this._keys){if(0===this.transaction.doc._transactionCleanups.length)throw Error(HM);let e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(null!==n){let r,i,o=t._map.get(n);if(this.adds(o)){let e=o.left;for(;null!==e&&this.adds(e);)e=e.left;if(this.deletes(o))if(!(null!==e&&this.deletes(e)))return;else r="delete",i=jW(e.content.getContent());else null!==e&&this.deletes(e)?(r="update",i=jW(e.content.getContent())):(r="add",i=void 0)}else{if(!this.deletes(o))return;r="delete",i=jW(o.content.getContent())}e.set(n,{action:r,oldValue:i})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(null===e){if(0===this.transaction.doc._transactionCleanups.length)throw Error(HM);let t=this.target,n=jG(),r=jG(),i=[];if(e={added:n,deleted:r,delta:i,keys:this.keys},this.transaction.changed.get(t).has(null)){let e=null,o=()=>{e&&i.push(e)};for(let i=t._start;null!==i;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&((null===e||void 0===e.delete)&&(o(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?((null===e||void 0===e.insert)&&(o(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):((null===e||void 0===e.retain)&&(o(),e={retain:0}),e.retain+=i.length);null!==e&&void 0===e.retain&&o()}this._changes=e}return e}}let HD=(e,t)=>{let n=[];for(;null!==t._item&&t!==e;){if(null!==t._item.parentSub)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&null!==r;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},HR=()=>{BA("Invalid access: Add Yjs type to a document before reading data.")},Hz=0;class HL{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=Hz++}}let HP=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=Hz++},Hj=(e,t)=>{if(null===e._start||0===t||null===e._searchMarker)return null;let n=0===e._searchMarker.length?null:e._searchMarker.reduce((e,n)=>j1(t-e.index)<j1(t-n.index)?e:n),r=e._start,i=0;for(null!==n&&(r=n.p,i=n.index,n.timestamp=Hz++);null!==r.right&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;null!==r.left&&i>t;)!(r=r.left).deleted&&r.countable&&(i-=r.length);for(;null!==r.left&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)!(r=r.left).deleted&&r.countable&&(i-=r.length);if(null!==n&&j1(n.index-i)<r.parent.length/80)return HP(n,r,i),n;var o=e._searchMarker,s=r,a=i;if(o.length>=80){let e=o.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return HP(e,s,a),e}{let e=new HL(s,a);return o.push(e),e}},H$=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){let i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)(t=t.left)&&!t.deleted&&t.countable&&(i.index-=t.length);if(null===t||!0===t.marker){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=j5(t,i.index+n))}},HF=(e,t,n)=>{let r=e,i=t.changedParentTypes;for(;jq(i,e,()=>[]).push(n),null!==e._item;)e=e._item.parent;BZ(r._eH,n,t)};class HB{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=BX(),this._dEH=BX(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw $C()}clone(){throw $C()}_write(e){}get _first(){let e=this._start;for(;null!==e&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){let t;t=this._eH,t.l.push(e)}observeDeep(e){let t;t=this._dEH,t.l.push(e)}unobserve(e){BQ(this._eH,e)}unobserveDeep(e){BQ(this._dEH,e)}toJSON(){}}let HH=(e,t,n)=>{e.doc??HR(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t,i=[],o=e._start;for(;null!==o&&r>0;){if(o.countable&&!o.deleted){let e=o.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}o=o.right}return i},HU=e=>{e.doc??HR();let t=[],n=e._start;for(;null!==n;){if(n.countable&&!n.deleted){let e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},HV=(e,t)=>{let n=[],r=e._start;for(;null!==r;){if(r.countable&&Hn(r,t)){let e=r.content.getContent();for(let t=0;t<e.length;t++)n.push(e[t])}r=r.right}return n},Hq=(e,t)=>{let n=0,r=e._start;for(e.doc??HR();null!==r;){if(r.countable&&!r.deleted){let i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},HG=(e,t)=>
155{let n=[];return Hq(e,(r,i)=>{n.push(t(r,i,e))}),n},HW=(e,t)=>{e.doc??HR();let n=Hj(e,t),r=e._start;for(null!==n&&(r=n.p,t-=n.index);null!==r;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},HK=(e,t,n,r)=>{let i=n,o=e.doc,s=o.clientID,a=o.store,l=null===n?t._start:n.right,c=[],d=()=>{c.length>0&&((i=new Uq(B2(s,Hs(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new UN(c))).integrate(e,0),c=[])};r.forEach(n=>{if(null===n)c.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(n);break;default:switch(d(),n.constructor){case Uint8Array:case ArrayBuffer:(i=new Uq(B2(s,Hs(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new Ux(new Uint8Array(n)))).integrate(e,0);break;case BB:(i=new Uq(B2(s,Hs(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new UT(n))).integrate(e,0);break;default:if(n instanceof HB)(i=new Uq(B2(s,Hs(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new U$(n))).integrate(e,0);else throw Error("Unexpected content type in insert operation")}}}),d()},HJ=(e,t,n,r)=>{if(n>t._length)throw Error("Length exceeded!");if(0===n)return t._searchMarker&&H$(t._searchMarker,n,r.length),HK(e,t,null,r);let i=n,o=Hj(t,n),s=t._start;for(null!==o&&(s=o.p,0==(n-=o.index)&&(n+=(s=s.prev)&&s.countable&&!s.deleted?s.length:0));null!==s;s=s.right)if(!s.deleted&&s.countable){if(n<=s.length){n<s.length&&Hu(e,B2(s.id.client,s.id.clock+n));break}n-=s.length}return t._searchMarker&&H$(t._searchMarker,i,r.length),HK(e,t,s,r)},HY=(e,t,n,r)=>{if(0===r)return;let i=n,o=r,s=Hj(t,n),a=t._start;for(null!==s&&(a=s.p,n-=s.index);null!==a&&n>0;a=a.right)!a.deleted&&a.countable&&(n<a.length&&Hu(e,B2(a.id.client,a.id.clock+n)),n-=a.length);for(;r>0&&null!==a;)a.deleted||(r<a.length&&Hu(e,B2(a.id.client,a.id.clock+r)),a.delete(e),r-=a.length),a=a.right;if(r>0)throw Error("Length exceeded!");t._searchMarker&&H$(t._searchMarker,i,-o+r)},HX=(e,t,n)=>{let r=t._map.get(n);void 0!==r&&r.delete(e)},HQ=(e,t,n,r)=>{let i,o=t._map.get(n)||null,s=e.doc,a=s.clientID;if(null==r)i=new UN([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:i=new UN([r]);break;case Uint8Array:i=new Ux(r);break;case BB:i=new UT(r);break;default:if(r instanceof HB)i=new U$(r);else throw Error("Unexpected content type")}new Uq(B2(a,Hs(s.store,a)),o,o&&o.lastId,null,null,t,n,i).integrate(e,0)},HZ=(e,t)=>{e.doc??HR();let n=e._map.get(t);return void 0===n||n.deleted?void 0:n.content.getContent()[n.length-1]},H0=e=>{let t={};return e.doc??HR(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},H1=(e,t)=>{e.doc??HR();let n=e._map.get(t);return void 0!==n&&!n.deleted},H2=e=>{let t,n;return e.doc??HR(),t=e._map.entries(),n=e=>!e[1].deleted,BN(()=>{let e;do e=t.next();while(!e.done&&!n(e.value))return e})};class H5 extends HI{}class H3 extends HB{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){let t=new H3;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new H3}clone(){let e=new H3;return e.insert(0,this.toArray().map(e=>e instanceof HB?e.clone():e)),e}get length(){return this.doc??HR(),this._length}_callObserver(e,t){super._callObserver(e,t),HF(this,e,new H5(this,e))}insert(e,t){null!==this.doc?Hv(this.doc,n=>{HJ(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}push(e){null!==this.doc?Hv(this.doc,t=>{((e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;return HK(e,t,r,n)})(t,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){null!==this.doc?Hv(this.doc,n=>{HY(n,this,e,t)}):this._prelimContent.splice(e,t)}get(e){return HW(this,e)}toArray(){return HU(this)}slice(e=0,t=this.length){return HH(this,e,t)}toJSON(){return this.map(e=>e instanceof HB?e.toJSON():e)}map(e){return HG(this,e)}forEach(e){Hq(this,e)}[Symbol.iterator](){let e,t,n;return e=this._start,t=null,n=0,{[Symbol.iterator](){return this},next:()=>{if(null===t){for(;null!==e&&e.deleted;)e=e.right;if(null===e)return{done:!0,value:void 0};t=e.content.getContent(),n=0,e=e.right}let r=t[n++];return t.length<=n&&(t=null),{done:!1,value:r}}}}_write(e){e.writeTypeRef(UI)}}class H4 extends HI{constructor(e,t,n){super(e,t),this.keysChanged=n}}class H6 extends HB{constructor(e){super(),this._prelimContent=null,void 0===e?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new H6}clone(){let e=new H6;return this.forEach((t,n)=>{e.set(n,t instanceof HB?t.clone():t)}),e}_callObserver(e,t){HF(this,e,new H4(this,e,t))}toJSON(){this.doc??HR();let e={};
155return this._map.forEach((t,n)=>{if(!t.deleted){let r=t.content.getContent()[t.length-1];e[n]=r instanceof HB?r.toJSON():r}}),e}get size(){return[...H2(this)].length}keys(){return BO(H2(this),e=>e[0])}values(){return BO(H2(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return BO(H2(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??HR(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){null!==this.doc?Hv(this.doc,t=>{HX(t,this,e)}):this._prelimContent.delete(e)}set(e,t){return null!==this.doc?Hv(this.doc,n=>{HQ(n,this,e,t)}):this._prelimContent.set(e,t),t}get(e){return HZ(this,e)}has(e){return H1(this,e)}clear(){null!==this.doc?Hv(this.doc,e=>{this.forEach(function(t,n,r){HX(e,r,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(UD)}}let H8=(e,t)=>{let n,r;return e===t||"object"==typeof e&&"object"==typeof t&&e&&t&&((n=e)===(r=t)||$2(n).length===$2(r).length&&$5(n,(e,t)=>(void 0!==e||$3(r,t))&&$0(r[t],e)))};class H9{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){null===this.right&&$A(),this.right.content.constructor===UC?this.right.deleted||Un(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}}let H7=(e,t,n)=>{for(;null!==t.right&&n>0;)t.right.content.constructor===UC?t.right.deleted||Un(t.currentAttributes,t.right.content):t.right.deleted||(n<t.right.length&&Hu(e,B2(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length),t.left=t.right,t.right=t.right.right;return t},Ue=(e,t,n,r)=>{let i=new Map,o=r?Hj(t,n):null;return o?H7(e,new H9(o.p.left,o.p,o.index,i),n-o.index):H7(e,new H9(null,t._start,0,i),n)},Ut=(e,t,n,r)=>{for(;null!==n.right&&(!0===n.right.deleted||n.right.content.constructor===UC&&H8(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();let i=e.doc,o=i.clientID;r.forEach((r,s)=>{let a=n.left,l=n.right,c=new Uq(B2(o,Hs(i.store,o)),a,a&&a.lastId,l,l&&l.id,t,null,new UC(s,r));c.integrate(e,0),n.right=c,n.forward()})},Un=(e,t)=>{let{key:n,value:r}=t;null===r?e.delete(n):e.set(n,r)},Ur=(e,t)=>{for(;null!==e.right&&(e.right.deleted||e.right.content.constructor===UC&&H8(t[e.right.content.key]??null,e.right.content.value));){;e.forward()}},Ui=(e,t,n,r)=>{let i=e.doc,o=i.clientID,s=new Map;for(let a in r){let l=r[a],c=n.currentAttributes.get(a)??null;if(!H8(c,l)){s.set(a,c);let{left:r,right:d}=n;n.right=new Uq(B2(o,Hs(i.store,o)),r,r&&r.lastId,d,d&&d.id,t,null,new UC(a,l)),n.right.integrate(e,0),n.forward()}}return s},Uo=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{void 0===i[t]&&(i[t]=null)});let o=e.doc,s=o.clientID;Ur(n,i);let a=Ui(e,t,n,i),l=r.constructor===String?new UO(r):r instanceof HB?new U$(r):new US(r),{left:c,right:d,index:u}=n;t._searchMarker&&H$(t._searchMarker,n.index,l.getLength()),(d=new Uq(B2(s,Hs(o.store,s)),c,c&&c.lastId,d,d&&d.id,t,null,l)).integrate(e,0),n.right=d,n.index=u,n.forward(),Ut(e,t,n,a)},Us=(e,t,n,r,i)=>{let o=e.doc,s=o.clientID;Ur(n,i);let a=Ui(e,t,n,i);for(;null!==n.right&&(r>0||a.size>0&&(n.right.deleted||n.right.content.constructor===UC));){if(!n.right.deleted)if(n.right.content.constructor===UC){let{key:t,value:o}=n.right.content,s=i[t];if(void 0!==s){if(H8(s,o))a.delete(t);else{if(0===r)break;a.set(t,o)}n.right.delete(e)}else n.currentAttributes.set(t,o)}else r<n.right.length&&Hu(e,B2(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;n.forward()}if(r>0){let i="";for(;r>0;r--)i+="\n";n.right=new Uq(B2(s,Hs(o.store,s)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new UO(i)),n.right.integrate(e,0),n.forward()}Ut(e,t,n,a)},Ua=(e,t,n,r,i)=>{let o=t,s=jU();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===UC){let e=o.content;s.set(e.key,e)}o=o.right}let a=0,l=!1;for(;t!==o;){if(n===t&&(l=!0),!t.deleted){let n=t.content;if(n.constructor===UC){let{key:o,value:c}=n,d=r.get(o)??null;(s.get(o)!==n||d===c)&&(t.delete(e),a++,l||(i.get(o)??null)!==c||d===c||(null===d?i.delete(o):i.set(o,d))),l||t.deleted||Un(i,n)}}t=t.right}return a},Ul=e=>{let t=0;return Hv(e.doc,n=>{let r=e._start,i=e._start,o=jU(),s=jV(o);for(;i;)!1===i.deleted&&(i.content.constructor===UC?Un(s,i.content):(t+=Ua(n,r,i,o,s),o=jV(s),r=i)),i=i.right}),t},Uc=e=>{let t=new Set,n=e.doc;for(let[r,i]of e.afterState.entries()){let o=e.beforeState.get(r)||0;i!==o&&Hp(e,n.store.clients.get(r),o,i,e=>{e.deleted||e.content.constructor!==UC||e.constructor===Uk||t.add(e.parent)})}Hv(n,n=>{for(let r of(BD(e,e.deleteSet,e=>{if(e instanceof Uk||!e.parent._hasFormatting||t.has(e.parent))return;let r=e.parent;if(e.content.constructor===UC)t.add(r);else{for(var i=e;
155i&&i.right&&(i.right.deleted||!i.right.countable);)i=i.right;let t=new Set;for(;i&&(i.deleted||!i.countable);){if(!i.deleted&&i.content.constructor===UC){let e=i.content.key;t.has(e)?i.delete(n):t.add(e)}i=i.left}}}),t))Ul(r)})},Ud=(e,t,n)=>{let r=n,i=jV(t.currentAttributes),o=t.right;for(;n>0&&null!==t.right;){if(!1===t.right.deleted)switch(t.right.content.constructor){case U$:case US:case UO:n<t.right.length&&Hu(e,B2(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e)}t.forward()}o&&Ua(e,o,t.right,i,t.currentAttributes);let s=(t.left||t.right).parent;return s._searchMarker&&H$(s._searchMarker,t.index,-r+n),t};class Uu extends HI{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{null===e?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){if(null===this._changes){let e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(null===this._delta){let e=this.target.doc,t=[];Hv(e,e=>{let n=new Map,r=new Map,i=this.target._start,o=null,s={},a="",l=0,c=0,d=()=>{if(null!==o){let e=null;switch(o){case"delete":c>0&&(e={delete:c}),c=0;break;case"insert":("object"==typeof a||a.length>0)&&(e={insert:a},n.size>0&&(e.attributes={},n.forEach((t,n)=>{null!==t&&(e.attributes[n]=t)}))),a="";break;case"retain":l>0&&(e={retain:l},(e=>{for(let t in e)return!1;return!0})(s)||(e.attributes=$1({},s))),l=0}e&&t.push(e),o=null}};for(;null!==i;){switch(i.content.constructor){case U$:case US:this.adds(i)?this.deletes(i)||(d(),o="insert",a=i.content.getContent()[0],d()):this.deletes(i)?("delete"!==o&&(d(),o="delete"),c+=1):i.deleted||("retain"!==o&&(d(),o="retain"),l+=1);break;case UO:this.adds(i)?this.deletes(i)||("insert"!==o&&(d(),o="insert"),a+=i.content.str):this.deletes(i)?("delete"!==o&&(d(),o="delete"),c+=i.length):i.deleted||("retain"!==o&&(d(),o="retain"),l+=i.length);break;case UC:{let{key:t,value:a}=i.content;if(this.adds(i))this.deletes(i)||(H8(n.get(t)??null,a)?null!==a&&i.delete(e):("retain"===o&&d(),H8(a,r.get(t)??null)?delete s[t]:s[t]=a));else if(this.deletes(i)){r.set(t,a);let e=n.get(t)??null;H8(e,a)||("retain"===o&&d(),s[t]=e)}else if(!i.deleted){r.set(t,a);let n=s[t];void 0!==n&&(H8(n,a)?null!==n&&i.delete(e):("retain"===o&&d(),null===a?delete s[t]:s[t]=a))}i.deleted||("insert"===o&&d(),Un(n,i.content))}}i=i.right}for(d();t.length>0;){let e=t[t.length-1];if(void 0!==e.retain&&void 0===e.attributes)t.pop();else break}}),this._delta=t}return this._delta}}class Uh extends HB{constructor(e){super(),this._pending=void 0!==e?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??HR(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(e){console.error(e)}this._pending=null}_copy(){return new Uh}clone(){let e=new Uh;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);let n=new Uu(this,e,t);HF(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??HR();let e="",t=this._start;for(;null!==t;)!t.deleted&&t.countable&&t.content.constructor===UO&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){null!==this.doc?Hv(this.doc,n=>{let r=new H9(null,this._start,0,new Map);for(let i=0;i<e.length;i++){let o=e[i];if(void 0!==o.insert){let s=t||"string"!=typeof o.insert||i!==e.length-1||null!==r.right||"\n"!==o.insert.slice(-1)?o.insert:o.insert.slice(0,-1);("string"!=typeof s||s.length>0)&&Uo(n,this,r,s,o.attributes||{})}else void 0!==o.retain?Us(n,this,r,o.retain,o.attributes||{}):void 0!==o.delete&&Ud(n,r,o.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,t,n){this.doc??HR();let r=[],i=new Map,o=this.doc,s="",a=this._start;function l(){if(s.length>0){let e={},t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});let n={insert:s};t&&(n.attributes=e),r.push(n),s=""}}let c=()=>{for(;null!==a;){if(Hn(a,e)||void 0!==t&&Hn(a,t))switch(a.content.constructor){case UO:{let r=i.get("ychange");void 0===e||Hn(a,e)?void 0===t||Hn(a,t)?void 0!==r&&(l(),i.delete("ychange")):(void 0===r||r.user!==a.id.client||"added"!==r.type)&&(l(),i.set("ychange",n?n("added",a.id):{type:"added"})):(void 0===r||r.user!==a.id.client||"removed"!==r.type)&&(l(),i.set("ychange",n?n("removed",a.id):{type:"removed"})),s+=a.content.str;break}case U$:case US:{l();
155let e={insert:a.content.getContent()[0]};if(i.size>0){let t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case UC:Hn(a,e)&&(l(),Un(i,a.content))}a=a.right}l()};return e||t?Hv(o,n=>{e&&Hr(n,e),t&&Hr(n,t),c()},"cleanup"):c(),r}insert(e,t,n){if(t.length<=0)return;let r=this.doc;null!==r?Hv(r,r=>{let i=Ue(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),Uo(r,this,i,t,n)}):this._pending.push(()=>this.insert(e,t,n))}insertEmbed(e,t,n){let r=this.doc;null!==r?Hv(r,r=>{let i=Ue(r,this,e,!n);Uo(r,this,i,t,n||{})}):this._pending.push(()=>this.insertEmbed(e,t,n||{}))}delete(e,t){if(0===t)return;let n=this.doc;null!==n?Hv(n,n=>{Ud(n,Ue(n,this,e,!0),t)}):this._pending.push(()=>this.delete(e,t))}format(e,t,n){if(0===t)return;let r=this.doc;null!==r?Hv(r,r=>{let i=Ue(r,this,e,!1);null!==i.right&&Us(r,this,i,t,n)}):this._pending.push(()=>this.format(e,t,n))}removeAttribute(e){null!==this.doc?Hv(this.doc,t=>{HX(t,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,t){null!==this.doc?Hv(this.doc,n=>{HQ(n,this,e,t)}):this._pending.push(()=>this.setAttribute(e,t))}getAttribute(e){return HZ(this,e)}getAttributes(){return H0(this)}_write(e){e.writeTypeRef(UR)}}class Up{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??HR()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(null!==e&&(!this._firstCall||e.deleted||!this._filter(t)))do if(t=e.content.type,e.deleted||t.constructor!==Um&&t.constructor!==Uf||null===t._start)for(;null!==e;){let t=e.next;if(null!==t){e=t;break}e=e.parent===this._root?null:e.parent._item}else e=t._start;while(null!==e&&(e.deleted||!this._filter(e.content.type)))return(this._firstCall=!1,null===e)?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class Uf extends HB{constructor(){super(),this._prelimContent=[]}get firstChild(){let e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Uf}clone(){let e=new Uf;return e.insert(0,this.toArray().map(e=>e instanceof HB?e.clone():e)),e}get length(){return this.doc??HR(),null===this._prelimContent?this._length:this._prelimContent.length}createTreeWalker(e){return new Up(this,e)}querySelector(e){e=e.toUpperCase();let t=new Up(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),jJ(new Up(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){HF(this,e,new Ug(this,t,e))}toString(){return HG(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},n){let r=e.createDocumentFragment();return void 0!==n&&n._createAssociation(r,this),Hq(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){null!==this.doc?Hv(this.doc,n=>{HJ(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(null!==this.doc)Hv(this.doc,n=>{HK(n,this,e&&e instanceof HB?e._item:e,t)});else{let n=this._prelimContent,r=null===e?0:n.findIndex(t=>t===e)+1;if(0===r&&null!==e)throw Error("Reference item not found");n.splice(r,0,...t)}}delete(e,t=1){null!==this.doc?Hv(this.doc,n=>{HY(n,this,e,t)}):this._prelimContent.splice(e,t)}toArray(){return HU(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return HW(this,e)}slice(e=0,t=this.length){return HH(this,e,t)}forEach(e){Hq(this,e)}_write(e){e.writeTypeRef(UL)}}class Um extends Uf{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new Um(this.nodeName)}clone(){let e=new Um(this.nodeName);var t,n,r=this.getAttributes();for(let i in r){t=r[i],n=i,e.setAttribute(n,t)}return e.insert(0,this.toArray().map(e=>e instanceof HB?e.clone():e)),e}toString(){let e=this.getAttributes(),t=[],n=[];for(let t in e)n.push(t);n.sort();let r=n.length;for(let i=0;i<r;i++){let r=n[i];t.push(r+'="'+e[r]+'"')}let i=this.nodeName.toLocaleLowerCase(),o=t.length>0?" "+t.join(" "):"";return`<${i}${o}>${super.toString()}</${i}>`}removeAttribute(e){null!==this.doc?Hv(this.doc,t=>{HX(t,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,t){null!==this.doc?Hv(this.doc,n=>
155{HQ(n,this,e,t)}):this._prelimAttrs.set(e,t)}getAttribute(e){return HZ(this,e)}hasAttribute(e){return H1(this,e)}getAttributes(e){let t;return e?(t={},this._map.forEach((n,r)=>{let i=n;for(;null!==i&&(!e.sv.has(i.id.client)||i.id.clock>=(e.sv.get(i.id.client)||0));)i=i.left;null!==i&&Hn(i,e)&&(t[r]=i.content.getContent()[i.length-1])}),t):H0(this)}toDOM(e=document,t={},n){let r=e.createElement(this.nodeName),i=this.getAttributes();for(let e in i){let t=i[e];"string"==typeof t&&r.setAttribute(e,t)}return Hq(this,i=>{r.appendChild(i.toDOM(e,t,n))}),void 0!==n&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(Uz),e.writeKey(this.nodeName)}}class Ug extends HI{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{null===e?this.childListChanged=!0:this.attributesChanged.add(e)})}}class Uy extends H6{constructor(e){super(),this.hookName=e}_copy(){return new Uy(this.hookName)}clone(){let e=new Uy(this.hookName);return this.forEach((t,n)=>{e.set(n,t)}),e}toDOM(e=document,t={},n){let r,i=t[this.hookName];return(r=void 0!==i?i.createDom(this):document.createElement(this.hookName)).setAttribute("data-yjs-hook",this.hookName),void 0!==n&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(UP),e.writeKey(this.hookName)}}class Ub extends Uh{get nextSibling(){let e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){let e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new Ub}clone(){let e=new Ub;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,n){let r=e.createTextNode(this.toString());return void 0!==n&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{let t=[];for(let n in e.attributes){let r=[];for(let t in e.attributes[n])r.push({key:t,value:e.attributes[n][t]});r.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:n,attrs:r})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n="";for(let e=0;e<t.length;e++){let r=t[e];n+=`<${r.nodeName}`;for(let e=0;e<r.attrs.length;e++){let t=r.attrs[e];n+=` ${t.key}="${t.value}"`}n+=">"}n+=e.insert;for(let e=t.length-1;e>=0;e--)n+=`</${t[e].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Uj)}}class Uv{constructor(e,t){this.id=e,this.length=t}get deleted(){throw $C()}mergeWith(e){return!1}write(e,t,n){throw $C()}integrate(e,t){throw $C()}}class Uk extends Uv{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),Ha(e.doc.store,this)}write(e,t){e.writeInfo(0),e.writeLen(this.length-t)}getMissing(e,t){return null}}class Ux{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new Ux(this.content)}splice(e){throw $C()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class Uw{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new Uw(this.len)}splice(e){let t=new Uw(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){BP(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}let UE=(e,t)=>new BB({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class UT{constructor(e){e._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),null!==e.meta&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new UT(UE(this.doc.guid,this.opts))}splice(e){throw $C()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class US{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new US(this.embed)}splice(e){throw $C()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class UC{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new UC(this.key,this.value)}splice(e){throw $C()}mergeWith(e){return!1}integrate(e,t){let n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}class UA{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new UA(this.arr)}splice(e){let t=new UA(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeString(void 0===t?"undefined":JSON.stringify(t))}}getRef(){return 2}}let U_="development"===Fr("node_env");class UN{constructor(e){this.arr=e,U_&&$6(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new UN(this.arr)}splice(e){let t=new UN(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){let n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){let t=this.arr[r];e.writeAny(t)}}getRef(){return 8}}class UO{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new UO(this.str)}splice(e){let t=new UO(this.str.slice(e));this.str=this.str.slice(0,e);let n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"�",t.str="�"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(0===t?this.str:this.str.slice(t))}getRef(){return 4}}let UM=[e=>new H3,e=>new H6,e=>new Uh,e=>new Um(e.readKey()),e=>new Uf,e=>new Uy(e.readKey()),e=>new Ub],UI=0,UD=1,UR=2,Uz=3,UL=4,UP=5,Uj=6;class U${constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}
155copy(){return new U$(this.type._copy())}splice(e){throw $C()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;null!==t;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;null!==t;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;null!==t;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}let UF=(e,t)=>{let n,r=t,i=0;do i>0&&(r=B2(r.client,r.clock+i)),n=Hc(e,r),i=r.clock-n.id.clock,r=n.redone;while(null!==r&&n instanceof Uq)return{item:n,diff:i}},UB=(e,t)=>{for(;null!==e&&e.keep!==t;)e.keep=t,e=e.parent._item},UH=(e,t,n)=>{let{client:r,clock:i}=t.id,o=new Uq(B2(r,i+n),t,B2(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),null!==t.redone&&(o.redone=B2(t.redone.client,t.redone.clock+n)),t.right=o,null!==o.right&&(o.right.left=o),e._mergeStructs.push(o),null!==o.parentSub&&null===o.right&&o.parent._map.set(o.parentSub,o),t.length=n,o},UU=(e,t)=>jX(e,e=>BR(e.deletions,t)),UV=(e,t,n,r,i,o)=>{let s,a=e.doc,l=a.store,c=a.clientID,d=t.redone;if(null!==d)return Hu(e,d);let u=t.parent._item,h=null;if(null!==u&&!0===u.deleted){if(null===u.redone&&(!n.has(u)||null===UV(e,u,n,r,i,o)))return null;for(;null!==u.redone;)u=Hu(e,u.redone)}let p=null===u?t.parent:u.content.type;if(null===t.parentSub){for(h=t.left,s=t;null!==h;){let t=h;for(;null!==t&&t.parent._item!==u;)t=null===t.redone?null:Hu(e,t.redone);if(null!==t&&t.parent._item===u){h=t;break}h=h.left}for(;null!==s;){let t=s;for(;null!==t&&t.parent._item!==u;)t=null===t.redone?null:Hu(e,t.redone);if(null!==t&&t.parent._item===u){s=t;break}s=s.right}}else{if(s=null,t.right&&!i){for(h=t;null!==h&&null!==h.right&&(h.right.redone||BR(r,h.right.id)||UU(o.undoStack,h.right.id)||UU(o.redoStack,h.right.id));)for(h=h.right;h.redone;)h=Hu(e,h.redone);if(h&&null!==h.right)return null}else h=p._map.get(t.parentSub)||null;null!==h&&h.parent._item!==u&&(h=p._map.get(t.parentSub)||null)}let f=Hs(l,c),m=B2(c,f),g=new Uq(m,h,h&&h.lastId,s,s&&s.id,p,t.parentSub,t.content.copy());return t.redone=m,UB(g,!0),g.integrate(e,0),g};class Uq extends Uv{constructor(e,t,n,r,i,o,s,a){super(e,a.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=o,this.parentSub=s,this.redone=null,this.content=a,this.info=2*!!this.content.isCountable()}set marker(e){(8&this.info)>0!==e&&(this.info^=8)}get marker(){return(8&this.info)>0}get keep(){return(1&this.info)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(2&this.info)>0}get deleted(){return(4&this.info)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Hs(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Hs(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===B0&&this.id.client!==this.parent.client&&this.parent.clock>=Hs(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=Hh(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Hu(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Uk||this.right&&this.right.constructor===Uk)this.parent=null;else if(this.parent){if(this.parent.constructor===B0){let e=Hc(t,this.parent);e.constructor===Uk?this.parent=null:this.parent=e.content.type}}else this.left&&this.left.constructor===Uq?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===Uq&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=Hh(e,e.doc.store,B2(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||null!==this.right.left)||this.left&&this.left.right!==this.right){let t,n=this.left;if(null!==n)t=n.right;else if(null!==this.parentSub)for(t=this.parent._map.get(this.parentSub)||null;null!==t&&null!==t.left;)t=t.left;else t=this.parent._start;let r=new Set,i=new Set;for(;null!==t&&t!==this.right;){if(i.add(t),r.add(t),B1(this.origin,t.origin)){if(t.id.client<this.id.client)n=t,r.clear();else if(B1(this.rightOrigin,t.rightOrigin))break}else if(null!==t.origin&&i.has(Hc(e.doc.store,t.origin)))r.has(Hc(e.doc.store,t.origin))||(n=t,r.clear());else break;t=t.right}this.left=n}if(null!==this.left){let e=this.left.right;this.right=e,this.left.right=this}else{let e;if(null!==this.parentSub)for(e=this.parent._map.get(this.parentSub)||null;null!==e&&null!==e.left;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}null!==this.right?this.right.left=this:null!==this.parentSub&&(this.parent._map.set(this.parentSub,this),null!==this.left&&this.left.delete(e)),null===this.parentSub&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Ha(e.doc.store,this),this.content.integrate(e,this),Hg(e,this.parent,this.parentSub),(null!==this.parent._item&&this.parent._item.deleted||null!==this.parentSub&&null!==this.right)&&this.delete(e)}else new Uk(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;null!==e&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;null!==e&&e.deleted;)e=e.left;return e}get lastId(){return 1===this.length?this.id:B2(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&B1(e.origin,this.lastId)&&this.right===e&&B1(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&null===this.redone&&null===e.redone&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){let t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,null!==this.right&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){let t=this.parent;this.countable&&null===this.parentSub&&(t._length-=this.length),this.markDeleted(),BP(e.deleteSet,this.id.client,this.id.clock,this.length),Hg(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw $A();if(this.content.gc(e),t){var n;let t;n=new Uk(this.id,this.length),(t=e.clients.get(this.id.client))[Hl(t,this.id.clock)]=n}else this.content=new Uw(this.length)}write(e,t){let n=t>0?B2(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,o=31&this.content.getRef()|128*(null!==n)|64*(null!==r)|32*(null!==i);if(e.writeInfo(o),null!==n&&e.writeLeftID(n),null!==r&&e.writeRightID(r),null===n&&null===r){let t=this.parent;if(void 0!==t._item){let n=t._item;if(null===n){let n=B5(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===B0?(e.writeParentInfo(!1),e.writeLeftID(t)):$A();null!==i&&e.writeString(i)}this.content.write(e,t)}}let UG=(e,t)=>
155UW[31&t](e),UW=[()=>{$A()},e=>new Uw(e.readLen()),e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++){let t=e.readString();"undefined"===t?n.push(void 0):n.push(JSON.parse(t))}return new UA(n)},e=>new Ux(e.readBuf()),e=>new UO(e.readString()),e=>new US(e.readJSON()),e=>new UC(e.readKey(),e.readJSON()),e=>new U$(UM[e.readTypeRef()](e)),e=>{let t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new UN(n)},e=>new UT(UE(e.readString(),e.readAny())),()=>{$A()}];class UK extends Uv{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){$A()}write(e,t){e.writeInfo(10),$d(e.restEncoder,this.length-t)}getMissing(e,t){return null}}let UJ="u">typeof globalThis?globalThis:"u">typeof window?window:e.g,UY="__ $YJS$ __";!0===UJ[UY]&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),UJ[UY]=!0;let UX=/[\uD800-\uDBFF]/,UQ=/[\uDC00-\uDFFF]/,UZ=(e,t)=>e>>>t|e<<32-t,U0=e=>UZ(e,2)^UZ(e,13)^UZ(e,22),U1=e=>UZ(e,6)^UZ(e,11)^UZ(e,25),U2=e=>UZ(e,7)^UZ(e,18)^e>>>3,U5=e=>UZ(e,17)^UZ(e,19)^e>>>10,U3=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),U4=new Uint32Array([0x6a09e66
1557,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]);class U6{constructor(){const e=new ArrayBuffer(320);this._H=new Uint32Array(e,0,8),this._H.set(U4),this._W=new Uint32Array(e,64,64)}_updateHash(){let e=this._H,t=this._W;for(let e=16;e<64;e++)t[e]=U5(t[e-2])+t[e-7]+U2(t[e-15])+t[e-16];let n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7];for(let e=0,d,u;e<64;e++)d=c+U1(s)+(s&a^~s&l)+U3[e]+t[e]>>>0,u=U0(n)+(n&r^n&i^r&i)>>>0,c=l,l=a,a=s,s=o+d>>>0,o=i,i=r,r=n,n=d+u>>>0;e[0]+=n,e[1]+=r,e[2]+=i,e[3]+=o,e[4]+=s,e[5]+=a,e[6]+=l,e[7]+=c}digest(e){let t=0;for(;t+56<=e.length;){let n=0;for(;n<16&&t+3<e.length;n++)this._W[n]=e[t++]<<24|e[t++]<<16|e[t++]<<8|e[t++];if(t%64!=0){for(this._W.fill(0,n,16);t<e.length;)this._W[n]|=e[t]<<(3-t%4)*8,t++;this._W[n]|=128<<(3-t%4)*8}this._updateHash()}let n=t%64!=0;this._W.fill(0,0,16);let r=0;for(;t<e.length;r++)for(let n=3;n>=0&&t<e.length;n--)this._W[r]|=e[t++]<<8*n;n||(this._W[r-(t%4!=0)]|=128<<(3-t%4)*8),this._W[14]=e.byteLength/0x20000000,this._W[15]=8*e.byteLength,this._updateHash();let i=new Uint8Array(32);for(let e=0;e<this._H.length;e++)for(let t=0;t<4;t++)i[4*e+t]=this._H[e]>>>(3-t)*8;return i}}let U8=new aO("y-sync"),U9=new aO("y-undo");new aO("yjs-cursor");let U7=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!BR(t.ds,e.id),Ve=[{light:"#ecd44433",dark:"#ecd444"}],Vt=(e,t)=>{let n=t.selection.jsonID;return{type:n,depth:"nodeRange"===n?t.selection.depth:void 0,anchor:Vx(t.selection.anchor,e.type,e.mapping),head:Vx(t.selection.head,e.type,e.mapping)}};class Vn{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this.mapping=t,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{null===this.beforeTransactionSelection&&null!=this.prosemirrorView&&(this.beforeTransactionSelection=Vt(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return!!this.prosemirrorView.hasFocus()&&(Fe&&null===this._domSelectionInView&&(Bf(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView)}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(null==e||null==e.anchorNode)return!1;let t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),0===t.getClientRects().length&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=Bs.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||(t=He(Bj(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(U8,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>Vi(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new o1(oJ.from(e),0,0));t.setMeta(U8,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=null!==this.beforeTransactionSelection?null:this.prosemirrorView.state.selection,t=this.type.toArray().map(e=>Vi(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new o1(oJ.from(t),0,0));if(e){let t=j2(j5(e.anchor,0),n.doc.content.size),r=j2(j5(e.head,0),n.doc.content.size);n.setSelection(ap.create(n.doc,t,r))}this.prosemirrorView.dispatch(n.setMeta(U8,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let r=this.doc,i=this.type;if(e||(e=Ht(this.doc)),e instanceof Uint8Array||t instanceof Uint8Array)if(e instanceof Uint8Array&&t instanceof Uint8Array||$A(),BJ(r=new BB({gc:!1}),t),t=Ht(r),BJ(r,e),e=Ht(r),null===i._item){let e=Array.from(this.doc.share.keys()).find(e=>this.doc.share.get(e)===this.type);i=r.getXmlFragment(e)}else{let e=r.store.clients.get(i._item.id.client)??[],t=Hl(e,i._item.id.clock);i=e[t].content.type}this.mapping.clear(),this.mux(()=>{r.transact(r=>{let o=n.permanentUserData;
155o&&o.dss.forEach(e=>{BD(r,e,e=>{})});let s=(e,t)=>{let r="added"===e?o.getUserByClientId(t.client):o.getUserByDeletedId(t);return{user:r,type:e,color:((e,t,n)=>{if(!e.has(n)){let r;if(e.size<t.length){let n=jG();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,(r=t)[j0($q()*r.length)])}return e.get(n)})(n.colorMapping,n.colors,r)}},a=HV(i,new B7(t.ds,e.sv)).map(n=>!n._item.deleted||U7(n._item,e)||U7(n._item,t)?Vi(n,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,t,s):null).filter(e=>null!==e),l=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new o1(oJ.from(a),0,0));this.prosemirrorView.dispatch(l.setMeta(U8,{isChangeOrigin:!0}))},U8)})}_typeChanged(e,t){if(null==this.prosemirrorView)return;let n=U8.getState(this.prosemirrorView.state);0===e.length||null!=n.snapshot||null!=n.prevSnapshot?this.renderSnapshot(n.snapshot,n.prevSnapshot):this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);BD(t,t.deleteSet,e=>{if(e.constructor===Uq){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>Vr(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new o1(oJ.from(n),0,0));((e,t,n)=>{if(null!==t&&null!==t.anchor&&null!==t.head)if("all"===t.type)e.setSelection(new ay(e.doc));else if("node"===t.type){var r,i;let o,s=VE(n.doc,n.type,t.anchor,n.mapping);null!==s&&e.setSelection((r=e,i=s,(o=r.doc.resolve(i)).nodeAfter?am.create(r.doc,i):ap.near(o)))}else if("nodeRange"===t.type){let r=((e,t,n,r)=>{if(null===t||null===n)return null;
155let i=Math.min(Math.max(t,0),e.doc.content.size),o=Math.min(Math.max(n,0),e.doc.content.size);try{let t=ac.fromJSON(e.doc,{type:"nodeRange",anchor:i,head:o,depth:r});if(!t.ranges.length)return ap.near(e.doc.resolve(i));return t}catch(t){return ap.near(e.doc.resolve(i))}})(e,VE(n.doc,n.type,t.anchor,n.mapping),VE(n.doc,n.type,t.head,n.mapping),t.depth);null!==r&&e.setSelection(r)}else{let r=VE(n.doc,n.type,t.anchor,n.mapping),i=VE(n.doc,n.type,t.head,n.mapping);null!==r&&null!==i&&e.setSelection(ap.between(e.doc.resolve(r),e.doc.resolve(i)))}})(r,this.beforeTransactionSelection,this),r=r.setMeta(U8,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof HE}),null!==this.beforeTransactionSelection&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{Vv(this.doc,this.type,e,this),this.beforeTransactionSelection=Vt(this,this.prosemirrorView.state)},U8)}initView(e){null!=this.prosemirrorView&&this.destroy(),this.prosemirrorView=e,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){null!=this.prosemirrorView&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}let Vr=(e,t,n,r,i,o)=>{let s=n.mapping.get(e);if(void 0===s)if(e instanceof Um)return Vi(e,t,n,r,i,o);else throw $C();return s},Vi=(e,t,n,r,i,o)=>{let s=[],a=e=>{if(e instanceof Um){let a=Vr(e,t,n,r,i,o);null!==a&&s.push(a)}else{let a=e._item.right?.content?.type;a instanceof Uh&&!a._item.deleted&&a._item.id.client===a.doc.clientID&&(e.applyDelta([{retain:e.length},...a.toDelta()]),a.doc.transact(e=>{a._item.delete(e)}));let l=Vo(e,t,n,r,i,o);null!==l&&l.forEach(e=>{null!==e&&s.push(e)})}};void 0===r||void 0===i?e.toArray().forEach(a):HV(e,new B7(i.ds,r.sv)).forEac
155h(a);try{let a=e.getAttributes(r);void 0!==r&&(U7(e._item,r)?U7(e._item,i)||(a.ychange=o?o("added",e._item.id):{type:"added"}):a.ychange=o?o("removed",e._item.id):{type:"removed"});let l=t.node(e.nodeName,a,s);return n.mapping.set(e,l),l}catch(t){return e.doc.transact(t=>{e._item.delete(t)},U8),n.mapping.delete(e),null}},Vo=(e,t,n,r,i,o)=>{let s=[],a=e.toDelta(r,i,o);try{for(let e=0;e<a.length;e++){let n=a[e];s.push(t.text(n.insert,Vy(n.attributes,t)))}}catch(t){return e.doc.transact(t=>{e._item.delete(t)},U8),null}return s},Vs=(e,t)=>{let n,r;return e instanceof Array?(n=new Ub,r=e.map(e=>({insert:e.text,attributes:Vb(e.marks,t)})),n.applyDelta(r),t.mapping.set(n,e),n):((e,t)=>{let n=new Um(e.type.name);for(let t in e.attrs){let r=e.attrs[t];null!==r&&"ychange"!==t&&n.setAttribute(t,r)}return n.insert(0,Vc(e).map(e=>Vs(e,t))),t.mapping.set(n,e),n})(e,t)},Va=e=>"object"==typeof e&&null!==e,Vl=(e,t)=>{let n=Object.keys(e).filter(t=>null!==e[t]),r=n.length===Object.keys(t).filter(e=>null!==t[e]).length;for(let i=0;i<n.length&&r;i++){let o=n[i],s=e[o],a=t[o];r="ychange"===o||s===a||Va(s)&&Va(a)&&Vl(s,a)}return r},Vc=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},Vd=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&$2(e.attributes||{}).length===t[n].marks.length&&$5(e.attributes,(e,r)=>{let i=Vg(r),o=t[n].marks;return!!o.find(e=>e.type.name===i)&&Vl(e,o.find(e=>e.type.name===i)?.attrs)}))},Vu=(e,t)=>{if(e instanceof Um&&!(t instanceof Array)&&Vk(e,t)){let n=Vc(t);return e._length===n.length&&Vl(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>Vu(e,n[t]))}return e instanceof Ub&&t instanceof Array&&Vd(e,t)},Vh=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),Vp=(e,t,n)=>{let r=e.toArray(),i=Vc(t),o=i.length,s=r.length,a=j2(s,o),l=0,c=0,d=!1;for(;l<a;l++){let e=r[l],t=i[l];if(Vh(n.mapping.get(e),t))d=!0;else if(!Vu(e,t))break}for(;l+c<a;c++){let e=r[s-c-1],t=i[o-c-1];if(Vh(n.mapping.get(e),t))d=!0;else if(!Vu(e,t))break}return{equalityFactor:l+c,foundMappedChild:d}}
155,Vf=(e,t,n)=>{n.mapping.set(e,t);let{nAttrs:r,str:i}=(e=>{let t="",n=e._start,r={};for(;null!==n;)!n.deleted&&(n.countable&&n.content instanceof UO?t+=n.content.str:n.content instanceof UC&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}})(e),o=t.map(e=>({insert:e.text,attributes:Object.assign({},r,Vb(e.marks,n))})),{insert:s,remove:a,index:l}=((e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&UX.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&UQ.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}})(i,o.map(e=>e.insert).join(""));e.delete(l,a),e.insert(l,s),e.applyDelta(o.map(e=>({retain:e.insert.length,attributes:e.attributes})))},Vm=/(.*)(--[a-zA-Z0-9+/=]{8})$/,Vg=e=>Vm.exec(e)?.[1]??e,Vy=(e,t)=>{let n=[];for(let r in e)n.push(t.mark(Vg(r),e[r]));return n},Vb=(e,t)=>{let n={};return e.forEach(e=>{if("ychange"!==e.type.name){var r;let i,o;n[jq(t.isOMark,e.type,()=>!e.type.excludes(e.type))?`${e.type.name}--${Fa((e=>{for(let t=6;t<e.length;t++)e[t%6]=e[t%6]^e[t];return e.slice(0,6)})((r=e.toJSON(),(e=>$v(e,r))(i=$a()),o=$l(i),new U6().digest(o))))}`:e.type.name]=e.attrs}}),n},Vv=(e,t,n,r)=>{if(t instanceof Um&&t.nodeName!==n.type.name)throw Error("node name mismatch!");if(r.mapping.set(t,n),t instanceof Um){let e=t.getAttributes(),r=n.attrs;for(let n in r)null!==r[n]?e[n]!==r[n]&&"ychange"!==n&&t.setAttribute(n,r[n]):t.removeAttribute(n);for(let n in e)void 0===r[n]&&t.removeAttribute(n)}let i=Vc(n),o=i.length,s=t.toArray(),a=s.length,l=j2(o,a),c=0,d=0;for(;c<l;c++){let e=s[c],t=i[c];if(!Vh(r.mapping.get(e),t))if(Vu(e,t))r.mapping.set(e,t);else break}for(;d+c+1<l;d++){let e=s[a-d-1],t=i[o-d-1];if(!Vh(r.mapping.get(e),t))if(Vu(e,t))r.mapping.set(e,t);else break}e.transact(()=>{for(;a-c-d>0&&o-c-d>0;){let n=s[c],l=i[c],u=s[a-d-1],h=i[o-d-1];if(n instanceof Ub&&l instanceof Array)Vd(n,l)||Vf(n,l,r),c+=1;else{let i=n instanceof Um&&Vk(n,l),o=u instanceof Um&&Vk(u,h);if(i&&o){let e=Vp(n,l,r),t=Vp(u,h,r);e.foundMappedChild&&!t.foundMappedChild?o=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?i=!1:o=!1}i?(Vv(e,n,l,r),c+=1):o?(Vv(e,u,h,r),d+=1):(r.mapping.delete(t.get(c)),t.delete(c,1),t.insert(c,[Vs(l,r)]),c+=1)}}let n=a-c-d;if(1===a&&0===o&&s[0]instanceof Ub?(r.mapping.delete(s[0]),s[0].delete(0,s[0].length)):n>0&&(t.slice(c,c+n).forEach(e=>r.mapping.delete(e)),t.delete(c,n)),c+d<o){let e=[];for(let t=c;t<o-d;t++)e.push(Vs(i[t],r));t.insert(c,e)}},U8)},Vk=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name,Vx=(e,t,n)=>{if(0===e)return B9(t,0,-1);let r=null===t._first?null:t._first.content.type;for(;null!==r&&t!==r;){if(r instanceof Ub){if(r._length>=e)return B9(r,e,-1);if(e-=r._length,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{do r=null===r._item?null:r._item.parent,e--;while(r!==t&&null!==r&&null!==r._item&&null===r._item.next)null!==r&&r!==t&&(r=null===r._item?null:r._item.next.content.type)}}else{let i=(n.get(r)||{nodeSize:0}).nodeSize;if(null!==r._first&&e<i)r=r._first.content.type,e--;else{if(1===e&&0===r._length&&i>1)return new B4(null===r._item?null:r._item.id,null===r._item?B5(r):null,null);if(e-=i,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{if(0===e)return new B4(null===(r=null===r._item?r:r._item.parent)._item?null:r._item.id,null===r._item?B5(r):null,null);do r=r._item.parent,e--;while(r!==t&&null===r._item.next)r!==t&&(r=r._item.next.content.type)}}}if(null===r)throw $A();if(0===e&&r.constructor!==Ub&&r!==t)return Vw(r._item.parent,r._item)}return B9(t,t._length,-1)},Vw=(e,t)=>{let n=null,r=null;return null===e._item?r=B5(e):n=B2(e._item.id.client,e._item.id.clock),new B4(n,r,t.id)},VE=(e,t,n,r)=>{let i=((e,t,n=!0)=>{let r=t.store,i=e.item,o=e.type,s=e.tname,a=e.assoc,l=null,c=0;if(null!==i){let e,t;if(Hs(r,i.client)<=i.clock)return null;let o=n?UF(r,i):(e=Hc(r,i),t=i.clock-e.id.clock,{item:e,diff:t}),s=o.item;if(!(s instanceof Uq))return null;if(null===(l=s.parent)._item||!l._item.deleted){c=s.deleted||!s.countable?0:o.diff+(a>=0?0:1);let e=s.left;for(;null!==e;)!e.deleted&&e.countable&&(c+=e.length),e=e.left}}else{if(null!==s)l=t.get(s);else if(null!==o){if(Hs(r,o.client)<=o.clock)return null;let{item:e}=n?UF(r,o):{item:Hc(r,o)};if(!(e instanceof Uq)||!(e.content instanceof U$))return null;l=e.content.type}else throw $A();c=a>=0?l._length:0}return((e,t,n=0)=>new B6(e,t,n))(l,c,e.assoc)})(n,e);if(null===i||i.type!==t&&!B3(t,i.type._item))return null;let o=i.type,s=0;if(o.constructor===Ub)s=i.index;else if(null===o._item||!o._item.deleted){let e=o._first,t=0;for(;t<o._length&&t<i.index&&null!==e;){if(!e.deleted){let n=e.content.type;if(t++,n instanceof Ub)s+=n._length;else{let e=r.get(n);if(null==e)return null;s+=e.nodeSize}}e=e.right}s+=1}for(;o!==t&&null!==o._item;){let e=o._item.parent;if(null===e._item||!e._item.deleted){s+=1;let t=e._first;for(;null!==t;){let e=t.content.type;if(e===o)break;if(!t.deleted)if(e instanceof Ub)s+=e._length;else{let t=r.get(e);if(null==t)return null;s+=t.nodeSize}t=t.right}}o=e}return s-1},VT=new Set(["paragraph"]);function VS(e){return!!e.getMeta(U8)}function VC(e,t){let n=U8.getState(e);return Vx(t,n.type,n.binding.mapping)}var VA=class e extends hl{constructor(e,t){super(e),this.yRelativePosition=t}static fromJSON(t){return new e(t.position,t.yRelativePosition)}toJSON(){return{position:this.position,yRelativePosition:this.yRelativePosition}}};function V_(e){if(!e.length)return dr.empty;let t=[],n=e[0].$from.node(0);
155return e.forEach(e=>{let n=e.$from.pos,r=e.$from.nodeAfter;r&&t.push(de.node(n,n+r.nodeSize,{class:"ProseMirror-selectednoderange"}))}),dr.create(n,t)}function VN(e,t,n,r={}){let i=[],o=e.node(0),{extendOnBoundaryOverlap:s=!0}=r;"number"==typeof n&&n>=0||(n=e.sameParent(t)?Math.max(0,e.sharedDepth(t.pos)-1):e.sharedDepth(t.pos));let a=new sn(e,t,n),l=0===a.depth?0:o.resolve(a.start).posAtIndex(0);return a.parent.forEach((n,r)=>{var c;let d,u=l+r,h=u+n.nodeSize,p=(c=n.nodeSize,{start:u+(d=n.isText||n.isAtom?0:1),end:u+c-d}),f=s?t.pos>=p.start&&e.pos<=p.end:t.pos>p.start&&e.pos<p.end;if(u<a.start||u>=a.end||!f)return;let m=new ad(o.resolve(u),o.resolve(h));i.push(m)}),i}h1.create({name:"collaboration",priority:1e3,addOptions:()=>({document:null,field:"default",fragment:null,provider:null}),addStorage:()=>({isDisabled:!1}),onCreate(){this.editor.extensionManager.extensions.find(e=>"undoRedo"===e.name)&&console.warn('[tiptap warn]: "@tiptap/extension-collaboration" comes with its own history support and is not compatible with "@tiptap/extension-undo-redo".')},onBeforeCreate(){this.editor.utils.getUpdatedPosition=(e,t)=>(function(e,t,n){let r=e instanceof VA?e.yRelativePosition:null;if(VS(t)&&r){let e;return{position:new VA(VE((e=U8.getState(n)).doc,e.type,r,e.binding.mapping)||0,r),mapResult:null}}let i=hc(e,t),o=i.position.position;return{position:new VA(o,null!=r?r:VC(n,o)),mapResult:i.mapResult}})(e,t,this.editor.state),this.editor.utils.createMappablePosition=e=>{let t;return t=VC(this.editor.state,e),new VA(e,t)}},addCommands:()=>({undo:()=>({tr:e,state:t,dispatch:n})=>{if(e.setMeta("preventDispatch",!0),0===U9.getState(t).undoManager.undoStack.length)return!1;if(!n)return!0;let r=U9.getState(t).undoManager;return null!=r?(r.undo(),!0):void 0},redo:()=>({tr:e,state:t,dispatch:n})=>{if(e.setMeta("preventDispatch",!0),0===U9.getState(t).undoManager.redoStack.length)return!1;if(!n)return!0;let r=U9.getState(t).undoManager;return null!=r?(r.redo(),!0):void 0}}),addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo()}},addProseMirrorPlugins(){let e=this.options.fragment?this.options.fragment:this.options.document.getXmlFragment(this.options.field),t=(({protectedNodes:e=VT,trackedOrigins:t=[],undoManager:n=null}={})=>new aA({key:U9,state:{init:(r,i)=>{let o=U8.getState(i),s=n;if(!s){let n=o.doc,r=new Set(n?n._observers.get("destroy"):[]);s=new HE(o.type,{trackedOrigins:new Set([U8].concat(t)),deleteFilter:t=>!(t instanceof Uq)||!(t.content instanceof U$)||!(t.content.type instanceof Uh||t.content.type instanceof Um&&e.has(t.content.type.nodeName))||0===t.content.type._length,captureTransaction:e=>!1!==e.meta.get("addToHistory")});let i=n?n._observers.get("destroy"):new Set;s._yTiptapDocDestroyListeners=Array.from(i||[]).filter(e=>!r.has(e))}return{undoManager:s,prevSel:null,hasUndoOps:s.undoStack.length>0,hasRedoOps:s.redoStack.length>0}},apply:(e,t,n,r)=>{let i=U8.getState(r).binding,o=t.undoManager,s=o.undoStack.length>0,a=o.redoStack.length>0;return i?{undoManager:o,prevSel:Vt(i,n),hasUndoOps:s,hasRedoOps:a}:s!==t.hasUndoOps||a!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:o.undoStack.length>0,hasRedoOps:o.redoStack.length>0}):t}},view:e=>{let t=U8.getState(e.state),n=U9.getState(e.state).undoManager;return n.on("stack-item-added",({stackItem:n})=>{let r=t.binding;r&&n.meta.set(r,U9.getState(e.state).prevSel)}),n.on("stack-item-popped",({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy();let e=n._yTiptapDocDestroyListeners;e&&n.doc&&(e.forEach(e=>n.doc.off("destroy",e)),n._yTiptapDocDestroyListeners=null)}}}}))(this.options.yUndoOptions),n=t.spec.view;return t.spec.view=e=>{let{undoManager:t}=U9.getState(e.state);t.restore&&(t.restore(),t.restore=()=>{});let r=n?n(e):void 0;return{destroy:()=>{let e=t.trackedOrigins.has(t),n=t._observers;t.restore=()=>{e&&t.trackedOrigins.add(t),t.doc.on("afterTransaction",t.afterTransactionHandler),t._observers=n},(null==r?void 0:r.destroy)&&r.destroy()}}},[((e,{colors:t=Ve,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{},mapping:o}={})=>{let s=!1,a=new Vn(e,o),l=new aA({props:{editable:e=>{let t=U8.getState(e);return null==t.snapshot&&null==t.prevSnapshot}},key:U8,state:{init:(i,o)=>({type:e,doc:e.doc,binding:a,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(U8);if(void 0!==n)for(let e in t=Object.assign({},t),n)t[e]=n[e];return t.addToHistory=!1!==e.getMeta("addToHistory"),t.isChangeOrigin=void 0!==n&&!!n.isChangeOrigin,t.isUndoRedoOperation=void 0!==n&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,null!==a.prosemirrorView&&void 0!==n&&(null!=n.snapshot||null!=n.prevSnapshot)&&Bf(0,()=>{null!=a.prosemirrorView&&(null==n.restore?a._renderSnapshot(n.snapshot,n.prevSnapshot,t):(a._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,a.mux(()=>{a._prosemirrorChanged(a.prosemirrorView.state.doc)})))}),t}},view:e=>(a.initView(e),null==o&&a._forceRerender(),i(),{update:()=>{let t=l.getState(e.state);if(null==t.snapshot&&null==t.prevSnapshot&&(s||null!==e.state.doc.
155content.findDiffStart(e.state.doc.type.createAndFill().content))){if(s=!0,!1===t.addToHistory&&!t.isChangeOrigin){let t=U9.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}a.mux(()=>{t.doc.transact(n=>{n.meta.set("addToHistory",t.addToHistory),a._prosemirrorChanged(e.state.doc)},U8)})}},destroy:()=>{a.destroy()}})});return l})(e,{...this.options.ySyncOptions,onFirstRender:this.options.onFirstRender}),t,this.editor.options.enableContentCheck&&new aA({key:new aO("filterInvalidContent"),filterTransaction:t=>{if(!VS(t))return!0;if(this.storage.isDisabled)return!1;if(!t.docChanged)return!0;try{return t.doc.check(),!0}catch(t){return this.storage.isDisabled=!0,this.editor.emit("contentError",{error:t,editor:this.editor,disableCollaboration:()=>{var t;null==(t=e.doc)||t.destroy()}}),!0}}})].filter(Boolean)}});var VO=class e{constructor(e,t,n){this.anchor=e,this.head=t,this.depth=null!=n?n:0}map(t){return new e(t.map(this.anchor),t.map(this.head),this.depth)}resolve(e){return new VM(e.resolve(this.anchor),e.resolve(this.head),this.depth)}},VM=class e extends ac{constructor(e,t,n,r=1){const{doc:i}=e,o=e===t,s=e.pos===i.content.size&&t.pos===i.content.size,a=o&&!s?i.resolve(t.pos+(r>0?1:-1)):t,l=o&&s?i.resolve(e.pos-(r>0?1:-1)):e,c=VN(l.min(a),l.max(a),n);super(a.pos>=e.pos?c[0].$from:c[c.length-1].$to,a.pos>=e.pos?c[c.length-1].$to:c[0].$from,c),this.depth=n}get $to(){return this.ranges[this.ranges.length-1].$to}eq(t){return t instanceof e&&t.$from.pos===this.$from.pos&&t.$to.pos===this.$to.pos}map(t,n){return new e(t.resolve(n.map(this.anchor)),t.resolve(n.map(this.head)),this.depth)}toJSON(){return{type:"nodeRange",anchor:this.anchor,head:this.head,depth:this.depth}}get isForwards(){return this.head>=this.anchor}get isBackwards(){return!this.isForwards}extendBackwards(){let{doc:t}=this.$from;if(this.isForwards&&this.ranges.length>1){let t=this.ranges.slice(0,-1);return new e(t[0].$from,t[t.length-1].$to,this.depth)}let n=this.ranges[0],r=t.resolve(Math.max(0,n.$from.pos-1));return new e(this.$anchor,r,this.depth)}extendForwards(){let{doc:t}=this.$from;if(this.isBackwards&&this.ranges.length>1){let t=this.ranges.slice(1),n=t[0].$from;return new e(t[t.length-1].$to,n,this.depth)}let n=this.ranges[this.ranges.length-1],r=t.resolve(Math.min(t.content.size,n.$to.pos+1));return new e(this.$anchor,r,this.depth)}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head),n.depth)}static create(e,t,n,r,i=1){return new this(e.resolve(t),e.resolve(n),r,i)}getBookmark(){return new VO(this.anchor,this.head,this.depth)}};VM.prototype.visible=!1;try{ac.jsonID("nodeRange",VM)}catch{}function VI(e){return e instanceof VM}h1.create({name:"nodeRange",addOptions:()=>({depth:void 0,key:"Mod"}),addKeyboardShortcuts(){return{"Shift-ArrowUp":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,selection:o,tr:s}=r,{anchor:a,head:l}=o;if(!VI(o)){let e=VM.create(i,a,l,t,-1);return s.setSelection(e),n.dispatch(s),!0}let c=o.extendBackwards();return s.setSelection(c),n.dispatch(s),!0},"Shift-ArrowDown":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,selection:o,tr:s}=r,{anchor:a,head:l}=o;if(!VI(o)){let e=VM.create(i,a,l,t);return s.setSelection(e),n.dispatch(s),!0}let c=o.extendForwards();return s.setSelection(c),n.dispatch(s),!0},"Mod-a":({editor:e})=>{let{depth:t}=this.options,{view:n,state:r}=e,{doc:i,tr:o}=r,s=VM.create(i,0,i.content.size,t);return o.setSelection(s),n.dispatch(o),!0}}},onSelectionUpdate(){let{selection:e}=this.editor.state;VI(e)&&this.editor.view.dom.classList.add("ProseMirror-noderangeselection")},addProseMirrorPlugins(){let e=!1,t=!1;return[new aA({key:new aO("nodeRange"),props:{attributes:()=>e?{class:"ProseMirror-noderangeselection"}:{class:""},handleDOMEvents:{mousedown:(e,n)=>{let{key:r}=this.options,i=/Mac/.test(navigator.platform),o=!!n.shiftKey,s=!!n.ctrlKey,a=!!n.altKey,l=!!n.metaKey;return(null==r||"Shift"===r&&o||"Control"===r&&s||"Alt"===r&&a||"Meta"===r&&l||"Mod"===r&&(i?l:s))&&(t=!0),!!t&&(document.addEventListener("mouseup",()=>{t=!1;let{state:n}=e,{doc:r,selection:i,tr:o}=n,{$anchor:s,$head:a}=i;if(s.sameParent(a))return;let l=VM.create(r,s.pos,a.pos,this.options.depth);o.setSelection(l),e.dispatch(o)},{once:!0}),!1)}},decorations:n=>{let{selection:r}=n,i=VI(r);if(e=!1,!t)return i?(e=!0,V_(r.ranges)):null;let{$from:o,$to:s}=r;if(!i&&o.sameParent(s))return null;let a=VN(o,s,this.options.depth);return a.length?(e=!0,V_(a)):null}}})]}});var VD=[{id:"listItemFirstChild",evaluate:({parent:e,isFirst:t})=>
155t&&e&&["listItem","taskItem"].includes(e.type.name)?1e3:0},{id:"listWrapperDeprioritize",evaluate:({node:e})=>{let t=e.firstChild;return t&&["listItem","taskItem"].includes(t.type.name)?1e3:0}},{id:"tableStructure",evaluate:({node:e,parent:t})=>["tableRow","tableCell","tableHeader"].includes(e.type.name)||t&&"tableHeader"===t.type.name?1e3:0},{id:"inlineContent",evaluate:({node:e})=>e.isInline||e.isText?1e3:0}],VR={edges:["left","top"],threshold:12,strength:500};function Vz(e){return void 0===e||"left"===e?{...VR}:"right"===e?{edges:["right","top"],threshold:12,strength:500}:"both"===e?{edges:["left","right","top"],threshold:12,strength:500}:"none"===e?{edges:[],threshold:0,strength:0}:{...VR,...e}}function VL(e,t,n,r){var i;let o=1e3,s=!1;if(t.every(t=>{let n=t.evaluate(e);return!((o-=n)<=0)||(s=!0,!1)}),s)return -1;let a=e.view.nodeDOM(e.pos);return(o-=(i=e.depth,a&&0!==n.edges.length?!function(e,t,n){if(0===n.edges.length)return!1;let r=t.getBoundingClientRect(),{threshold:i,edges:o}=n;return o.some(t=>"left"===t?e.x-r.left<i:"right"===t?r.right-e.x<i:"top"===t?e.y-r.top<i:"bottom"===t&&r.bottom-e.y<i)}(r,a,n)?0:n.strength*i:0))<=0?-1:o}function VP(e,t,n){return Array.from({length:t},(e,n)=>t-1-n).some(t=>n.includes(e.node(t).type.name))}function Vj(e){return Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)&&e.width>0&&e.height>0}var V$=e=>{let t,n,{x:r,y:i,editor:o,nestedOptions:s}=e,{view:a,state:l}=o,c=function(e,t,n,r=5){if(!Number.isFinite(t)||!Number.isFinite(n))return null;let i=e.dom,o=i.firstElementChild,s=i.lastElementChild;if(!o||!s)return null;let a=o.getBoundingClientRect(),l=s.getBoundingClientRect();if(!Vj(a)||!Vj(l))return null;let c=Math.min(Math.max(a.top+r,n),l.bottom-r),d=.5>Math.abs(a.left-l.left),u=.5>Math.abs(a.right-l.right),h=a;d&&u&&(h=a);let p=Math.min(Math.max(h.left+r,t),h.right-r);return Number.isFinite(p)&&Number.isFinite(c)?{x:p,y:c}:null}(a,r,i,5);if(!c)return{resultElement:null,resultNode:null,pos:null};let{x:d,y:u}=c;if(null==s?void 0:s.enabled){let e=function(e,t,n){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))return null;let r=e.posAtCoords({left:t.x,top:t.y});if(!r)return null;let{doc:i}=e.state,o=i.resolve(r.pos),s=[];n.defaultRules&&s.push(...VD),s.push(...n.rules);let a=Array.from({length:o.depth},(e,t)=>o.depth-t).map(r=>{let i=o.node(r),a=o.before(r);if(n.allowedContainers&&r>0&&!VP(o,r,n.allowedContainers))return null;let l=r>0?o.node(r-1):null,c=r>0?o.index(r-1):0,d=l?l.childCount:1,u=VL({node:i,pos:a,depth:r,parent:l,index:c,isFirst:0===c,isLast:c===d-1,$pos:o,view:e},s,n.edgeDetection,t);if(u<0)return null;let h=e.nodeDOM(a);return{node:i,pos:a,depth:r,score:u,dom:h}}).filter(e=>null!==e),l=o.nodeAfter;if(l&&l.isAtom&&!l.isInline){let i=r.pos,c=o.depth+1,d=o.parent,u=o.index(),h=d.childCount,p=!0;if(n.allowedContainers&&(p=VP(o,c,n.allowedContainers)),p){let r=VL({node:l,pos:i,depth:c,parent:d,index:u,isFirst:0===u,isLast:u===h-1,$pos:o,view:e},s,n.edgeDetection,t);if(r>=0){let t=e.nodeDOM(i);t&&a.push({node:l,pos:i,depth:c,score:r,dom:t})}}}if(0===a.length)return null;a.sort((e,t)=>t.score!==e.score?t.score-e.score:t.depth-e.depth);let c=a[0];return c.dom?{node:c.node,pos:c.pos,dom:c.dom}:null}(a,{x:d,y:u},s);return e?{resultElement:e.dom,resultNode:e.node,pos:e.pos}:{resultElement:null,resultNode:null,pos:null}}let h=a.root.elementsFromPoint(d,u);if(Array.prototype.some.call(h,e=>{if(!a.dom.contains(e))return!1;let n=function(e,t){let n=e;for(;(null==n?void 0:n.parentElement)&&n.parentElement!==t.dom;)n=n.parentElement;return(null==n?void 0:n.parentElement)===t.dom?n:void 0}(e,a);return!!n&&(t=n,!0)}),!t){let e=a.posAtCoords({left:d,top:u});if(e){let t=l.doc.resolve(e.pos),n=Math.min(t.depth,1),r=n>0?t.before(n):t.pos,i=l.doc.nodeAt(r);if(i){let e=a.nodeDOM(r);return{resultElement:e instanceof HTMLElement?e:null,resultNode:i,pos:r}}}return{resultElement:null,resultNode:null,pos:null}}try{n=a.posAtDOM(t,0)}catch{return{resultElement:null,resultNode:null,pos:null}}let p=l.doc.nodeAt(n);if(!p){let e=l.doc.resolve(n),r=e.parent;return{resultElement:t,resultNode:r,pos:e.start()}}return{resultElement:t,resultNode:p,pos:n}};function VF(e){var t;null==(t=e.parentNode)||t.removeChild(e)}var VB=(e,t)=>{let n=e.resolve(t),{depth:r}=n;return 0===r?t:n.pos-n.parentOffset-1},VH=(e,t)=>{let n=e.nodeAt(t),r=e.resolve(t),{depth:i}=r,o=n;for(;i>0;){let e=r.node(i);0==(i-=1)&&(o=e)}return o},VU=(e,t)=>{let n=U8.getState(e);return n?Vx(t,n.type,n.binding.mapping):null},VV=(e,t)=>{let n=t;for(;(null==n?void 0:n.parentNode)&&n.parentNode!==e.dom;)n=n.parentNode;return n}
155,Vq=new aO("dragHandle"),VG=({pluginKey:e=Vq,element:t,editor:n,computePositionConfig:r,getReferencedVirtualElement:i,onNodeChange:o,onElementDragStart:s,onElementDragEnd:a,nestedOptions:l})=>{let c,d=document.createElement("div"),u=!1,h=null,p=-1,f=null,m=null;function g(){t&&(t.style.visibility="hidden",t.style.pointerEvents="none")}function y(e){let n=(null==i?void 0:i())||{getBoundingClientRect:()=>e.getBoundingClientRect()};(0,PN.computePosition)(n,t,r).then(e=>{Object.assign(t.style,{position:e.strategy,left:`${e.x}px`,top:`${e.y}px`})})}function b(e){null==s||s(e),function(e,t,n,r){let i,o,{view:s}=t;if(!e.dataTransfer)return;let{empty:a,$from:l,$to:c}=s.state.selection,d=function(e,t,n,r){let{doc:i}=t.view.state;if((null==n?void 0:n.enabled)&&(null==r?void 0:r.node)&&r.pos>=0){let e=r.pos,t=r.pos+r.node.nodeSize;return[{$from:i.resolve(e),$to:i.resolve(t)}]}let o=V$({editor:t,x:e.clientX,y:e.clientY,direction:"right",nestedOptions:n});if(!o.resultNode||null===o.pos)return[];let s=o.resultNode.isText||o.resultNode.isAtom?0:-1;return VN(i.resolve(o.pos),i.resolve(o.pos+o.resultNode.nodeSize+s),0,{extendOnBoundaryOverlap:!1})}(e,t,n,r),u=VN(l,c,0,{extendOnBoundaryOverlap:!1}),h=u.some(e=>d.find(t=>t.$from===e.$from&&t.$to===e.$to)),p=a||!h?d:u;if(!p.length)return;let{tr:f}=s.state,m=document.createElement("div"),g=p[0].$from.pos,y=p[p.length-1].$to.pos;m.setAttribute("dir",function(e,t){let n=null,r=e.nodeDOM(t);if(r instanceof Element)n=r;else{let{node:r,offset:i}=e.domAtPos(t),o=r.childNodes[i];o instanceof Element?n=o:r instanceof Element?n=r:r.nodeType===Node.TEXT_NODE&&r.parentElement&&(n=r.parentElement)}return(n?getComputedStyle(n).direction:getComputedStyle(e.dom).direction)||"ltr"}(s,g)),(null==n?void 0:n.enabled)&&(null==r?void 0:r.node)?(i=s.state.doc.slice(g,y),o=am.create(s.state.doc,g)):i=(o=VM.create(s.state.doc,g,y)).content(),p.forEach(e=>{var t;let n,r,i,o=(n=(t=s.nodeDOM(e.$from.pos)).cloneNode(!0),r=[t,...Array.from(t.getElementsByTagName("*"))],i=[n,...Array.from(n.getElementsByTagName("*"))],r.forEach((e,t)=>{i[t].style.cssText=function(e){let t="",n=getComputedStyle(e);for(let e=0;e<n.length;e+=1)t+=`${n[e]}:${n.getPropertyValue(n[e])};`;return t}(e)}),n);m.append(o)}),m.style.position="absolute",m.style.top="-10000px",document.body.append(m),e.dataTransfer.clearData();let b=m.getBoundingClientRect(),v=e.clientX-b.left;e.dataTransfer.setDragImage(m,Math.max(0,Math.min(v,b.width)),0);let k=!1,x=()=>{k||(k=!0,VF(m),document.removeEventListener("drop",x),document.removeEventListener("dragend",x))};s.dragging={slice:i,move:!0,node:o instanceof am?o:void 0},f.setSelection(o),s.dispatch(f),document.addEventListener("drop",x),document.addEventListener("dragend",x)}(e,n,l,{node:h,pos:p}),t&&(t.dataset.dragging="true"),setTimeout(()=>{t&&(t.style.pointerEvents="none")},0)}function v(e){null==a||a(e),g(),t&&(t.style.pointerEvents="auto",t.dataset.dragging="false")}function k(){if("u">typeof navigator&&/Firefox/.test(navigator.userAgent)){let e=n.view.dom;requestAnimationFrame(()=>{e.isContentEditable&&(e.contentEditable="false",e.contentEditable="true")})}}return d.appendChild(t),{unbind(){t.removeEventListener("dragstart",b),t.removeEventListener("dragend",v),document.removeEventListener("drop",k),f&&(cancelAnimationFrame(f),f=null,m=null)},plugin:new aA({key:"string"==typeof e?new aO(e):e,state:{init:()=>({locked:!1}),apply(e,r,i,s){let a=e.getMeta("lockDragHandle"),l=e.getMeta("hideDragHandle");if(void 0!==a&&(u=a),l)return g(),u=!1,h=null,p=-1,null==o||o({editor:n,node:null,pos:-1}),r;if(e.docChanged&&-1!==p&&t)if(VS(e)){var d;let e,t=(d=c,(e=U8.getState(s))?VE(e.doc,e.type,d,e.binding.mapping)||0:-1);t!==p&&(p=t)}else{let t=e.mapping.map(p);t!==p&&(c=VU(s,p=t))}return r}},view:e=>{var r;return t.draggable=!0,t.style.pointerEvents="auto",t.dataset.dragging="false",null==(r=n.view.dom.parentElement)||r.appendChild(d),d.style.pointerEvents="none",d.style.position="absolute",d.style.top="0",d.style.left="0",t.addEventListener("dragstart",b),t.addEventListener("dragend",v),document.addEventListener("drop",k),{update(r,i){if(!t)return;if(!n.isEditable)return void g();if(u?t.draggable=!1:t.draggable=!0,e.state.doc.eq(i.doc)||-1===p)return;let s=e.nodeDOM(p);if((s=VV(e,s))===e.dom||(null==s?void 0:s.nodeType)!==1)return;let a=e.posAtDOM(s,0),l=VH(n.state.doc,a),d=VB(n.state.doc,a);h=l,p=d,c=VU(e.state,p),null==o||o({editor:n,node:h,pos:p}),y(s)},destroy(){t.removeEventListener("dragstart",b),t.removeEventListener("dragend",v),document.removeEventListener("drop",k),f&&(cancelAnimationFrame(f),f=null,m=null),t&&VF(d)}}},props:{handleDOMEvents:{keydown:e=>!!t&&!u&&(e.hasFocus()&&(g(),h=null,p=-1,null==o||o({editor:n,node:null,pos:-1})),!1),mouseleave:(e,t)=>
155!u&&(t.target&&!d.contains(t.relatedTarget)&&(g(),h=null,p=-1,null==o||o({editor:n,node:null,pos:-1})),!1),mousemove:(e,r)=>!!t&&!u&&(m={x:r.clientX,y:r.clientY},!f&&(f=requestAnimationFrame(()=>{if(f=null,!m)return;let{x:r,y:i}=m;m=null;let s=V$({x:r,y:i,direction:"right",editor:n,nestedOptions:l});if(!s.resultElement)return;let a=s.resultElement,d=s.resultNode,u=s.pos;if(!(null==l?void 0:l.enabled)){if((a=VV(e,a))===e.dom||(null==a?void 0:a.nodeType)!==1)return;let t=e.posAtDOM(a,0);d=VH(n.state.doc,t),u=VB(n.state.doc,t)}d!==h&&(h=d,p=null!=u?u:-1,c=VU(e.state,p),null==o||o({editor:n,node:h,pos:p}),y(a),function(){if(t){if(!n.isEditable)return g();t.style.visibility="",t.style.pointerEvents="auto"}}())}),!1))}}})}};function VW(e){var t,n;return!1===e||void 0===e?{enabled:!1,rules:[],defaultRules:!0,allowedContainers:void 0,edgeDetection:Vz("none")}:!0===e?{enabled:!0,rules:[],defaultRules:!0,allowedContainers:void 0,edgeDetection:Vz("left")}:{enabled:!0,rules:null!=(t=e.rules)?t:[],defaultRules:null==(n=e.defaultRules)||n,allowedContainers:e.allowedContainers,edgeDetection:Vz(e.edgeDetection)}}var VK={placement:"left-start",strategy:"absolute"};h1.create({name:"dragHandle",addOptions:()=>({render(){let e=document.createElement("div");return e.classList.add("drag-handle"),e},computePositionConfig:{},locked:!1,onNodeChange:()=>null,onElementDragStart:void 0,onElementDragEnd:void 0,nested:!1}),addCommands(){return{lockDragHandle:()=>({editor:e})=>(this.options.locked=!0,e.commands.setMeta("lockDragHandle",this.options.locked)),unlockDragHandle:()=>({editor:e})=>(this.options.locked=!1,e.commands.setMeta("lockDragHandle",this.options.locked)),toggleDragHandle:()=>({editor:e})=>(this.options.locked=!this.options.locked,e.commands.setMeta("lockDragHandle",this.options.locked))}},addProseMirrorPlugins(){let e=this.options.render(),t=VW(this.options.nested);return[VG({computePositionConfig:{...VK,...this.options.computePositionConfig},getReferencedVirtualElement:this.options.getReferencedVirtualElement,element:e,editor:this.editor,onNodeChange:this.options.onNodeChange,onElementDragStart:this.options.onElementDragStart,onElementDragEnd:this.options.onElementDragEnd,nestedOptions:t}).plugin]}});let VJ=h1.create({name:"okBlockDragHandle",addProseMirrorPlugins(){let e,t,n,r=this.editor,i=null,o=-1,{container:s,addBtn:a,grip:l}=((e=document.createElement("div")).className="ok-block-controls",(t=document.createElement("button")).type="button",t.className="ok-block-btn",t.setAttribute("aria-label","Add block below"),t.innerHTML='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>',t.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),(n=document.createElement("button")).type="button",n.className="ok-block-btn ok-block-grip",n.setAttribute("aria-label","Drag to move"),n.setAttribute("tabindex","-1"),n.innerHTML='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"/><circle cx="9" cy="5" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="19" r="1"/></svg>',e.append(t,n),{container:e,addBtn:t,grip:n});return a.addEventListener("click",()=>{i&&o>=0&&function(e,t,n){let{state:r,view:i}=e,o=t+n.nodeSize;if(o>r.doc.content.size)return;let s=r.schema.nodes.paragraph?.create();if(!s)return;let a=r.tr.insert(o,s);a.setSelection(ap.near(a.doc.resolve(o+1))).scrollIntoView(),i.dispatch(a),i.focus(),e.commands.insertContent("/")}(r,o,i)}),l.addEventListener("click",()=>{if(!(o<0))try{r.chain().focus().setNodeSelection(o).run()}catch{}}),[VG({editor:r,element:s,nestedOptions:VW(!1),computePositionConfig:{placement:"left-start",strategy:"absolute",middleware:[(0,PN.offset)(({rects:e})=>({mainAxis:6,crossAxis:((e.reference.height<=44?e.reference.height:26)-24)/2}))]},onNodeChange:({node:e,pos:t})=>{i=e,o=t}}).plugin]}});function VY({mode:e,onChange:t}){return(0,Z.jsxs)("div",{className:"ok-mode-toggle",children:[(0,Z.jsxs)("button",{type:"button","aria-pressed":"visual"===e,"aria-label":"Visual editor","data-active":"visual"===e,className:"ok-mode-toggle-btn",onClick:()=>t("visual"),children:[(0,Z.jsx)(VX,{className:"ok-mode-toggle-icon"}),"Visual"]}),(0,Z.jsxs)("button",{type:"button","aria-pressed":"source"===e,"aria-label":"Markdown source editor","data-active":"source"===e,className:"ok-mode-toggle-btn",onClick:()=>t("source"),children:[(0,Z.jsx)(VQ,{className:"ok-mode-toggle-icon"}),"Markdown"]})]})}function VX({className:e}){return(0,Z.jsx)("svg",{className:e,viewBox:"0 0 256 256",fill:"currentColor","aria-hidden":"true",children:(0,Z.jsx)("path",{d:"M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z"})})}function VQ({className:e}){return(0,Z.jsx)("svg",{className:e,viewBox:"0 0 256 256",fill:"currentColor","aria-hidden":"true",children:(0,Z.jsx)("path",{d:"M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z"})})}let VZ=(0,J.default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),V0=[{name:"--chart-1",light:"oklch(0.62 0.19 259)",dark:"oklch(0.72 0.14 259)"}
155,{name:"--chart-2",light:"oklch(0.58 0.14 145)",dark:"oklch(0.73 0.13 145)"},{name:"--chart-3",light:"oklch(0.62 0.15 70)",dark:"oklch(0.77 0.14 70)"},{name:"--chart-4",light:"oklch(0.55 0.18 290)",dark:"oklch(0.72 0.16 290)"},{name:"--chart-5",light:"oklch(0.58 0.21 25)",dark:"oklch(0.72 0.2 25)"},{name:"--primary",light:"oklch(0.5621 0.1983 259.59)",dark:"#69a3ff"},{name:"--primary-foreground",light:"oklch(0.985 0 0)",dark:"oklch(0.205 0 0)"},{name:"--foreground",light:"oklch(0.145 0 0)",dark:"oklch(0.985 0 0)"},{name:"--background",light:"oklch(1 0 0)",dark:"oklch(0.145 0 0)"},{name:"--card",light:"oklch(1 0 0)",dark:"oklch(0.205 0 0)"},{name:"--card-foreground",light:"oklch(0.145 0 0)",dark:"oklch(0.985 0 0)"},{name:"--muted-foreground",light:"oklch(0.556 0 0)",dark:"oklch(0.708 0 0)"},{name:"--border",light:"oklch(0.922 0 0)",dark:"oklch(1 0 0 / 10%)"},{name:"--destructive",light:"oklch(0.577 0.245 27.325)",dark:"oklch(0.704 0.191 22.216)"},{name:"--radius",light:"0.625rem",dark:"0.625rem"}].map(e=>`${e.name}:${e.light}`).join(";");function V1({node:e,deleteNode:t}){let n="string"==typeof e.attrs.language?e.attrs.language:"",r="string"==typeof e.attrs.meta?e.attrs.meta:"";if("html"===n&&/\bpreview\b/.test(r)){var i;let n;return(0,Z.jsxs)(Pk,{className:"ok-embed-preview",contentEditable:!1,children:[(0,Z.jsx)("iframe",{sandbox:"allow-scripts",srcDoc:(i=e.textContent,`<!doctype html><html><head><meta charset="utf-8"><style> 156:root{${V0};--chart-1:#93c5fd;--chart-2:#60a5fa;--chart-3:#3784ff;--chart-4:#2563eb;--chart-5:#1d4ed8} 157html,body{margin:0;height:100%;background:transparent;color:var(--foreground);font-family:system-ui,-apple-system,sans-serif} 158/* Embeds are static, sized-to-fit content â never show the iframe's OS 159 scrollbar (a sub-pixel overflow shouldn't paint a thick gutter). */ 160html{scrollbar-width:none} 161html::-webkit-scrollbar{width:0;height:0;display:none} 162*{box-sizing:border-box} 163</style></head><body>${i}</body></html>`),title:"Embedded preview",className:"ok-embed-iframe",style:{height:`${(n=/\bh=(\d+)\b/.exec(r))?Number(n[1]):230}px`}}),(0,Z.jsx)("button",{type:"button",className:"ok-embed-delete","aria-label":"Delete embed",onMouseDown:e=>e.preventDefault(),onClick:()=>t(),children:(0,Z.jsx)(VZ,{className:"size-3.5"})}),(0,Z.jsx)("pre",{hidden:!0,children:(0,Z.jsx)(Pv,{})})]})}return(0,Z.jsx)(Pk,{children:(0,Z.jsx)("pre",{className:"ok-code-block",children:(0,Z.jsx)(Pv,{})})})}let V2=NL.extend({addNodeView:()=>e=>e.editor.contentComponent?new PT(V1,e,void 0):{}}),V5=`# Launch week recap 164 165v2.0 went public on June 3 â the end of a quiet QA window and the start of launch week. 166 16747 PRs merged across the cycle. Activity stayed close to zero through QA, then spiked on launch day as the announcement went live.`,V3=["- [ ] Shipped v2.0 to public on Jun 3","- [ ] 1.4k new signups in the first 24 hours","- [ ] Hit #1 on Product Hunt and front of Hacker News"],V4={title:"Launch week recap",tags:["launch","retro","v2"]},V6=["---",`title: ${V4.title}`,"tags:",...V4.tags.map(e=>` - ${e}`),"---"].join("\n"),V8=`<div style="font-family:system-ui,-apple-system,sans-serif;height:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:13px 16px 11px;color:var(--foreground)"> 168 <div style="flex:none;font-size:15px;font-weight:500;margin-bottom:16px">PRs merged per day \xb7 last 30 days</div> 169 <div id="plot" style="position:relative;flex:1 1 auto;min-height:0" aria-label="Daily PRs merged, peaking on launch day"></div> 170 <script> 171 var data=[11,4,1,0.5,0,0,0,0,0,0,0,0,0,0,0,2,0.5,0,0,0,0,1,1.2,1,24,8,1,0.2,0,0.5,0]; 172 var max=24,n=data.length,PADL=26,PADR=6,PADT=6,PADB=18; 173 var xN=function(i){return (i/(n-1)*1000).toFixed(1);}; 174 var yN=function(v){return ((1-v/max)*1000).toFixed(1);}; 175 var base=1000,pts=data.map(function(v,i){return {x:+xN(i),y:+yN(v)};}); 176 var line='M '+pts[0].x+' '+pts[0].y; 177 for(var i=0;i<pts.length-1;i++){ 178 var p0=pts[i-1]||pts[i],p1=pts[i],p2=pts[i+1],p3=pts[i+2]||p2; 179 var c1x=p1.x+(p2.x-p0.x)/6,c2x=p2.x-(p3.x-p1.x)/6; 180 var c1y=Math.min(base,p1.y+(p2.y-p0.y)/6),c2y=Math.min(base,p2.y-(p3.y-p1.y)/6); 181 line+=' C '+c1x.toFixed(1)+' '+c1y.toFixed(1)+', '+c2x.toFixed(1)+' '+c2y.toFixed(1)+', '+p2.x+' '+p2.y; 182 } 183 var area=line+' L '+pts[n-1].x+' '+base+' L '+pts[0].x+' '+base+' Z'; 184 var ticks=[0,6,12,18,24]; 185 var grid=ticks.map(function(t){return '<line x1="0" x2="1000" y1="'+yN(t)+'" y2="'+yN(t)+'" vector-effect="non-scaling-stroke" style="stroke:color-mix(in srgb, var(--border) 65%, transparent)" stroke-width="1"/>';}).join(''); 186 var svg='<div style="position:absolute;
186left:'+PADL+'px;right:'+PADR+'px;top:'+PADT+'px;bottom:'+PADB+'px"><svg viewBox="0 0 1000 1000" preserveAspectRatio="none" style="display:block;width:100%;height:100%;overflow:visible">' 187 +'<defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" style="stop-color:var(--primary);stop-opacity:0.16"/><stop offset="100%" style="stop-color:var(--primary);stop-opacity:0.015"/></linearGradient></defs>' 188 +grid+'<path d="'+area+'" style="fill:url(#g)"/>' 189 +'<path d="'+line+'" vector-effect="non-scaling-stroke" style="fill:none;stroke:color-mix(in oklab, var(--primary) 78%, white);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round"/></svg></div>'; 190 var ylab=ticks.map(function(t){var top='calc('+PADT+'px + '+(1-t/max).toFixed(4)+' * (100% - '+(PADT+PADB)+'px))';return '<div style="position:absolute;left:0;top:'+top+';width:'+(PADL-8)+'px;text-align:right;transform:translateY(-50%);font-size:10px;line-height:1;color:var(--muted-foreground)">'+t+'</div>';}).join(''); 191 var xlab=[[0,'May 10'],[15,'May 25'],[30,'Jun 9']].map(function(d){var left='calc('+PADL+'px + '+(d[0]/(n-1)).toFixed(4)+' * (100% - '+(PADL+PADR)+'px))';return '<div style="position:absolute;bottom:0;left:'+left+';transform:translateX(-50%);font-size:10px;line-height:1;white-space:nowrap;color:var(--muted-foreground)">'+d[1]+'</div>';}).join(''); 192 document.getElementById('plot').innerHTML=svg+ylab+xlab; 193 </script> 194</div>`;function V9(e){let t=V5;e>=1&&(t+="\n\n## Highlights");let n=e<=1?0:Math.min(V3.length,e-1);return n>0&&(t+=` 195 196${V3.slice(0,n).join("\n")}`),e>=5&&(t+=` 197 198\`\`\`html preview h=224 199${V8} 200\`\`\``),t}let V7=V9(5);function qe(e){var t;let{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:o,startOfLine:s,$position:a}=e,l=r&&!i,c=n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),d=RegExp(`\\s${c}$`),u=s?"^":"",h=i?"":c,p=l?RegExp(`${u}${c}.*?(?=\\s${h}|$)`,"gm"):RegExp(`${u}(?:^)?${c}[^\\s${h}]*`,"gm"),f=(null==(t=a.nodeBefore)?void 0:t.isText)&&a.nodeBefore.text;if(!f)return null;let m=a.pos-f.length,g=Array.from(f.matchAll(p)).pop();if(!g||void 0===g.input||void 0===g.index)return null;let y=g.input.slice(Math.max(0,g.index-1),g.index),b=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(y);if(null!==o&&!b)return null;let v=m+g.index,k=v+g[0].length;return(l&&d.test(f.slice(k-1,k+1))&&(g[0]+=" ",k+=1),v<a.pos&&k>=a.pos)?{range:{from:v,to:k},query:g[0].slice(n.length),text:g[0]}:null}e.s(["HERO_FRONTMATTER",0,V4,"HERO_FRONTMATTER_YAML",0,V6,"HERO_SEED_MARKDOWN",0,V7,"heroRevealMarkdown",0,V9],803781);var qt=new aO("suggestion"),qn=function({pluginKey:e=qt,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:o=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:h=()=>[],minQueryLength:p=0,debounce:f=0,initialItems:m,placement:g="bottom-start",offset:y={},container:b,flip:v=!0,floatingUi:k,dismissOnOutsideClick:x=!0,render:w=()=>({}),allow:E=()=>!0,findSuggestionMatch:T=qe,shouldShow:S,shouldResetDismissed:C}){let A=null==w?void 0:w(),_=r&&!i,N=(n,r)=>(function(e,t,n,r){if(!n)return()=>{let t=e.state.selection.$anchor.pos,{top:n,right:r,bottom:i,left:o}=e.view.coordsAtPos(t);try{return new DOMRect(o,n,r-o,i-n)}catch{return null}};return()=>{let n=r.getState(e.state),i=null==n?void 0:n.decorationId,o=t.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==o?void 0:o.getBoundingClientRect())||null}})(t,n,r,e),O=t=>(function({view:e,pluginKeyRef:t}){let n=e.state.tr.setMeta(t,{exit:!0});e.dispatch(n)})({view:t,pluginKeyRef:e});return new aA({key:e,view:()=>(function({editor:e,pluginKey:t,items:n,renderer:r,minQueryLength:i,debounce:o,initialItems:s,placement:a,offset:l,container:c,flip:d,floatingUi:u,dismissOnOutsideClick:h,command:p,clientRectFor:f,dispatchExit:m}){let g,y=function({editor:e,items:t}){let n=null,r=null,i=null,o=()=>{null==n||n.abort(),null!==r&&(clearTimeout(r),r=null),null==i||i(),i=null,n=null},s=async(s,a)=>{o();let l=n=new AbortController;if(a>0&&await new Promise(e=>{i=e,r=setTimeout(()=>{r=null;let e=i;i=null,null==e||e()},a)}),n!==l||l.signal.aborted)return{status:"aborted"};try{let r=await t({editor:e,query:s,signal:l.signal});if(n!==l||l.signal.aborted)return{status:"aborted"};return{status:"resolved",items:r}}catch{if(n!==l||l.signal.aborted)return{status:"aborted"};return{status:"error"}}};return{abort:o,fetch:s}}({editor:e,items:n}),b=function({placement:e,offset:t,flip:n,floatingUi:r}){var i,o,s,a;let l=[(0,PN.offset)({mainAxis:null!=(i=t.mainAxis)?i:4,crossAxis:null!=(o=t.crossAxis)?o:0})];return n&&l.push((0,PN.flip)()),(null==(s=null==r?void 0:r.middleware)?void 0:s.length)&&l.push(...r.middleware),{placement:e,strategy:null!=(a=null==r?void 0:r.strategy)?a:"absolute",middleware:l}}({placement:a,offset:l,flip:d,floatingUi:u});function v(e,t){var n,i,o;switch(e){case"started":null==(n=null==r?void 0:r.onStart)||n.call(r,t);break;case"updated":null==(i=null==r?void 0:r.onUpdate)||i.call(r,t);break;case"stopped":null==(o=null==r?void 0:r.onExit)||o.call(r,t)}}return{update:async(n,u)=>{var k,x,w,E;let T=t.getState(u),S=t.getState(n.state);if(!T||!S)return;let C=null,A=T.query!==S.query,_=T.text!==S.text,N=T.range.from!==S.range.from||T.range.to!==S.range.to;if(!T.active&&S.active)C="started";else if(T.active&&!S.active)C="stopped";else{if(!S.active||!A&&!_&&!N)return;C="updated"}let O="stopped"===C?T:S,M=n.dom.querySelector(`[data-decoration-id="${O.decorationId}"]`),I=f(n,M),D=0===i||!!O.query&&O.query.length>=i,R=("started"===C||"updated"===C)&&D;if(g={editor:e,range:O.range,query:O.query||"",text:O.text||"",items:null!=s?s:[],command:t=>p({editor:e,range:O.range,props:t}),decorationNode:M,clientRect:I,loading:R,placement:a,offset:{mainAxis:null!=(k=l.mainAxis)?k:4,crossAxis:null!=(x=l.crossAxis)?x:0},container:c,flip:d,floatingUi:b,mount:function({getReferenceRect:e,contextElement:t,config:n,container:r,dismissOnOutsideClick:i,dismiss:o}){return(s,a={})=>{let l,c={getBoundingClientRect:()=>{var t;return null!=(t=e())?t:new DOMRect},contextElement:t},d=!1,u=!s.isConnected;u&&(function(e){if(e instanceof HTMLElement)return e;if("string"==typeof e)try{let t=document.querySelector(e);
200if(t)return t}catch{}return document.body})(r).appendChild(s),a.onPosition||(s.style.visibility="hidden",s.style.width="max-content");let h=(0,PN.autoUpdate)(c,s,()=>{(0,PN.computePosition)(c,s,{placement:n.placement,strategy:n.strategy,middleware:n.middleware}).then(({x:e,y:t,placement:n,strategy:r})=>{a.onPosition?a.onPosition({x:e,y:t,placement:n,strategy:r}):(Object.assign(s.style,{position:r,left:`${e}px`,top:`${t}px`}),d||(d=!0,s.style.visibility=""))})},a.autoUpdate);return i&&(l=e=>{let n=e.target;!(n instanceof Node)||s.contains(n)||t.contains(n)||o()},document.addEventListener("pointerdown",l,!0)),()=>{h(),l&&document.removeEventListener("pointerdown",l,!0),u&&s.remove()}}}({getReferenceRect:I,contextElement:n.dom,config:b,container:c,dismissOnOutsideClick:h,dismiss:()=>m(e.view)})},"started"===C&&(null==(w=null==r?void 0:r.onBeforeStart)||w.call(r,g)),"updated"===C&&(null==(E=null==r?void 0:r.onBeforeUpdate)||E.call(r,g)),"started"===C&&v(C,g),"started"===C||"updated"===C)if(R){v(C="updated",g={...g,items:null!=s?s:[],loading:!0});let e=await y.fetch(O.query||"",o);if("aborted"===e.status)return;let r=t.getState(n.state);if(!(null==r?void 0:r.active))return void y.abort();g="resolved"===e.status?{...g,items:e.items,loading:!1}:{...g,loading:!1}}else y.abort(),g={...g,items:null!=s?s:[],loading:!1};if("stopped"===C){y.abort(),v(C,g),g=void 0;return}"updated"===C&&v(C,g)},destroy:()=>{var e;y.abort(),g&&(null==(e=null==r?void 0:r.onExit)||e.call(r,g))}}})({editor:t,pluginKey:e,items:h,renderer:A,minQueryLength:p,debounce:f,initialItems:m,placement:g,offset:y,container:b,flip:v,floatingUi:k,dismissOnOutsideClick:x,command:u,clientRectFor:N,dispatchExit:O}),state:function({editor:e,char:t,effectiveAllowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:o,findSuggestionMatch:s,allow:a,shouldShow:l,shouldKeepDismissed:c,pluginKey:d}){return{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}),apply(u,h,p,f){let{isEditable:m}=e,{composing:g}=e.view,{selection:y}=u,{empty:b,from:v}=y,k={...h},x=u.getMeta(d);if(x&&x.exit)return k.active=!1,k.decorationId=null,k.range={from:0,to:0},k.query=null,k.text=null,k.dismissedRange=h.active?{...h.range}:h.dismissedRange,k;if(k.composing=g,u.docChanged&&null!==k.dismissedRange&&(k.dismissedRange={from:u.mapping.map(k.dismissedRange.from),to:u.mapping.map(k.dismissedRange.to)}),m&&(b||e.view.composing)){(v<h.range.from||v>h.range.to)&&!g&&!h.composing&&(k.active=!1);let d=s({char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:o,$position:y.$from}),p=`id_${Math.floor(0xffffffff*Math.random())}`;d&&a({editor:e,state:f,range:d.range,isActive:h.active})&&(!l||l({editor:e,range:d.range,query:d.query,text:d.text,transaction:u}))?(null===k.dismissedRange||c({match:d,dismissedRange:k.dismissedRange,state:f,transaction:u})||(k.dismissedRange=null),null===k.dismissedRange?(k.active=!0,k.decorationId=h.decorationId||p,k.range=d.range,k.query=d.query,k.text=d.text):k.active=!1):(d||(k.dismissedRange=null),k.active=!1)}else k.active=!1;return k.active||(k.decorationId=null,k.range={from:0,to:0},k.query=null,k.text=null),k}}}({editor:t,char:n,effectiveAllowSpaces:_,allowToIncludeChar:i,allowedPrefixes:o,startOfLine:s,findSuggestionMatch:T,allow:E,shouldShow:S,shouldKeepDismissed:function(e){return function({match:e,dismissedRange:t,state:n,transaction:r,editor:i,shouldResetDismissed:o,effectiveAllowSpaces:s}){return(null==o?!void 0:!o({editor:i,state:n,range:t,match:e,transaction:r,allowSpaces:s}))&&(s?e.range.from===t.from:e.range.from===t.from&&!(r.docChanged&&r.steps.some(e=>{let t=e.slice;if(!(null==t?void 0:t.content))return!1;let n=t.content.textBetween(0,t.content.size,"\n");return/\s/.test(n)})))}({...e,editor:t,shouldResetDismissed:C,effectiveAllowSpaces:_})},pluginKey:e}),props:function({pluginKey:e,decorationTag:t,decorationClass:n,decorationContent:r,decorationEmptyClass:i,renderer:o,dispatchExit:s}){return{handleKeyDown(t,n){var r,i;let a=e.getState(t.state);return!!a.active&&("Escape"===n.key||"Esc"===n.key?(null==(r=null==o?void 0:o.onKeyDown)||r.call(o,{view:t,event:n,range:a.range}),s(t),!0):(null==(i=null==o?void 0:o.onKeyDown)?void 0:i.call(o,{view:t,event:n,range:a.range}))||!1)},decorations(o){let{active:s,range:a,decorationId:l,query:c}=e.getState(o);if(!s)return null;let d=!(null==c?void 0:c.length),u=[n];return d&&u.push(i),dr.create(o.doc,[de.inline(a.from,a.to,{nodeName:t,class:u.join(" "),"data-decoration-id":l||void 0,"data-decoration-content":r})])}}}({pluginKey:e,decorationTag:a,decorationClass:l,decorationContent:c,decorationEmptyClass:d,renderer:A,dispatchExit:O})})};let qr=(0,J.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var qi=e.i(686844);let qo=(0,J.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),qs=`<div style="font-family:system-ui,-apple-system,sans-serif;padding:13px 16px 11px;color:var(--foreground)"> 201 <h3 style="margin:0 0 16px;font-size:15px;font-weight:500">Revenue by region</h3> 202 <div id="bars" style="display:flex;align-items:flex-end;
202gap:14px;height:170px"></div> 203 <script> 204 var data = [['North', 42], ['South', 58], ['East', 71], ['West', 64], ['Central', 80]]; 205 var max = Math.max.apply(null, data.map(function (d) { return d[1]; })); 206 document.getElementById('bars').innerHTML = data.map(function (d, i) { 207 return '<div style="flex:1;display:flex;flex-direction:column;align-items:center;' + 208 'gap:6px;height:100%;justify-content:flex-end">' + 209 '<span style="font-size:12px;color:var(--muted-foreground)">' + d[1] + '</span>' + 210 '<div style="width:100%;height:' + (d[1] / max * 100) + '%;' + 211 'background:var(--chart-' + (i + 1) + ');' + 212 'border-radius:var(--radius) var(--radius) 0 0"></div>' + 213 '<span style="font-size:12px;color:var(--muted-foreground)">' + d[0] + '</span>' + 214 '</div>'; 215 }).join(''); 216 </script> 217</div>`,qa=[{name:"heading1",label:"Heading 1",icon:P2,aliases:["h1","title"],command:e=>e.chain().focus().toggleHeading({level:1}).run()},{name:"heading2",label:"Heading 2",icon:P5,aliases:["h2"],command:e=>e.chain().focus().toggleHeading({level:2}).run()},{name:"heading3",label:"Heading 3",icon:P3,aliases:["h3"],command:e=>e.chain().focus().toggleHeading({level:3}).run()},{name:"bulletList",label:"Bullet List",icon:P4,aliases:["ul","unordered"],command:e=>e.chain().focus().toggleBulletList().run()},{name:"orderedList",label:"Numbered List",icon:P6,aliases:["ol","ordered","numbered"],command:e=>e.chain().focus().toggleOrderedList().run()},{name:"taskList",label:"Task List",icon:P8,aliases:["todo","checklist","checkbox"],command:e=>e.chain().focus().toggleTaskList().run()},{name:"blockquote",label:"Quote",icon:P7,aliases:["quote"],command:e=>e.chain().focus().toggleBlockquote().run()},{name:"codeBlock",label:"Code Block",icon:qi.Code2,aliases:["code","fence"],command:e=>e.chain().focus().toggleCodeBlock({language:"js"}).run()},{name:"separator",label:"Separator",icon:qo,aliases:["hr","divider","rule"],command:e=>e.chain().focus().setHorizontalRule().run()},{name:"chart",label:"Chart",icon:qr,aliases:["embed","graph","html"],command:e=>e.chain().focus().insertContent({type:"codeBlock",attrs:{language:"html",meta:"preview h=230"},content:[{type:"text",text:qs}]}).run()}];function ql({items:e,selectedIndex:t,onSelect:n,onHoverIndex:r}){return 0===e.length?(0,Z.jsx)("div",{className:"ok-slash-empty",role:"status",children:"No results"}):(0,Z.jsx)("div",{className:"ok-slash-menu",role:"listbox","aria-label":"Insert block",children:e.map((e,i)=>{let o=e.icon;return(0,Z.jsxs)("button",{type:"button",role:"option","aria-selected":i===t,"data-active":i===t,className:"ok-slash-item",onMouseDown:t=>{t.preventDefault(),n(e)},onMouseEnter:()=>r(i),children:[(0,Z.jsx)(o,{className:"ok-slash-item-icon"}),(0,Z.jsx)("span",{children:e.label})]},e.name)})})}let qc=new aO("okSlashCommand"),qd=h1.create({name:"okSlashCommand",addProseMirrorPlugins(){return[qn({editor:this.editor,pluginKey:qc,char:"/",items:({query:e})=>(function(e){if(!e)return[...qa];let t=e.toLowerCase();return qa.filter(e=>e.label.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.aliases?.some(e=>e.toLowerCase().includes(t)))})(e),command:({editor:e,range:t,props:n})=>{e.chain().focus().deleteRange(t).run(),n.command(e)},render:()=>{let e=null,t=null,n=null,r=0,i=null,o={getBoundingClientRect:()=>n?.clientRect?.()??new DOMRect,get contextElement(){return n?.editor.view.dom}},s=()=>{t&&(0,PN.computePosition)(o,t,{strategy:"fixed",placement:"bottom-start",middleware:[(0,PN.offset)(6),(0,PN.flip)(),(0,PN.shift)({padding:8})]}).then(({x:e,y:r})=>{if(!t)return;t.style.left=`${e}px`,t.style.top=`${r}px`;let i=n?.clientRect?.(),o=!!i&&i.bottom>0&&i.top<window.innerHeight;t.style.visibility=o?"visible":"hidden"})},a=()=>{e&&n&&e.updateProps({items:n.items,selectedIndex:r,onSelect:n.command,onHoverIndex:e=>{r=e,a()}})};return{onStart(l){n=l,r=0,(t=document.createElement("div")).className="ok-slash-popup",t.style.visibility="hidden",document.body.appendChild(t),e=new PE(ql,{props:{items:l.items,selectedIndex:r,onSelect:l.command,onHoverIndex:e
217=>{r=e,a()}},editor:l.editor}),t.appendChild(e.element),i=(0,PN.autoUpdate)(o,t,s)},onUpdate(e){n=e,r=Math.min(r,Math.max(0,e.items.length-1)),a(),s()},onKeyDown({event:e}){if(!n||0===n.items.length)return!1;let t=n.items;if("ArrowDown"===e.key)return r=(r+1)%t.length,a(),!0;if("ArrowUp"===e.key)return r=(r-1+t.length)%t.length,a(),!0;if("Enter"===e.key||"Tab"===e.key){let e=t[r];return e&&n.command(e),!0}return!1},onExit(){i?.(),e?.destroy(),t?.remove(),i=null,e=null,t=null,n=null,r=0}}}})]}}),qu=(0,P_.default)(()=>e.A(648479).then(e=>e.SourceEditor),{loadableGenerated:{modules:[146560]},ssr:!1}),qh=new DV({extensions:OI}),qp=[...OI.map(e=>"codeBlock"===e.name?V2:e),bb,qd,VJ,bf.configure({placeholder:"Type '/' for commands",showOnlyCurrent:!0})],qf={words:0,chars:0,tokens:0},qm=(0,LL.createContext)(null);function qg(){let e=(0,LL.use)(qm);if(!e)throw Error("OkEditor components must be rendered inside <OkEditorProvider>");return e}e.s(["OkEditorBody",0,function(){let{editor:e,mode:t,sourceDoc:n,sourceViewRef:r}=qg(),i=(0,LL.useRef)(null),[o,s]=(0,LL.useState)(null);return(0,LL.useEffect)(()=>{s(i.current)},[]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{ref:i,className:"ok-editor-visual",hidden:"visual"!==t}),o&&(0,LP.createPortal)((0,Z.jsx)(Pl,{editor:e}
217),o),e&&"visual"===t&&(0,Z.jsx)(jH,{editor:e}),"source"===t&&(0,Z.jsx)(qu,{initialDoc:n,viewRef:r})]})},"OkEditorModeToggle",0,function(){let{mode:e,switchMode:t}=qg();return(0,Z.jsx)(VY,{mode:e,onChange:t})},"OkEditorProvider",0,function({children:e,initialMarkdown:t,frontmatter:n}){let[r,i]=(0,LL.useState)("visual"),[o,s]=(0,LL.useState)(""),a=(0,LL.useRef)(null),[l]=(0,LL.useState)(()=>qh.parse(t??V7)),c=function(e={},t=[]){let n=(0,LL.useRef)(e);n.current=e;let[r]=(0,LL.useState)(()=>new Pf(n)),i=(0,Lj.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,LL.useDebugValue)(i),(0,LL.useEffect)(r.onRender(t)),Pu({editor:i,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),i}({extensions:qp,content:l,editable:!0,immediatelyRender:!1,editorProps:{attributes:{class:"ok-editor-prose focus:outline-none",spellcheck:"false"}}});return(0,Z.jsx)(qm,{value:{editor:c,mode:r,switchMode:function(e){if(e!==r&&c){if("source"===e){let e=qh.serialize(c.getJSON());s(n?`${n} 218 219${e}`:e)}else{let e=(a.current?.state.doc.toString()??o).replace(/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n)*/,"");c.commands.setContent(qh.parse(e))}i(e)}},sourceDoc:o,sourceViewRef:a},children:e})},"parseEditorMarkdown",0,function(e){return qh.parse(e)},"useEditorDocStats",0,function(){let{editor:e}=qg();return Pu({editor:e,selector:({editor:e})=>{let t,n;return e?(t="",n=0,e.state.doc.descendants(e=>{if("codeBlock"===e.type.name){let t="string"==typeof e.attrs.meta?e.attrs.meta:"";if("html"===e.attrs.language&&/\bpreview\b/.test(t))return!1}if(e.isText){let r=e.text??"";return t+=r,n+=r.length,!0}return e.type.isBlock&&t.length>0&&!t.endsWith("\n")&&(t+="\n"),!0}),{words:t.trim()?t.trim().match(/\S+/g)?.length??0:0,chars:n,tokens:Math.ceil(n/4)}):qf}})??qf},"useOkEditor",0,qg],181232)},769127,e=>{"use strict";let t=(0,e.i(918260).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["BookOpen",0,t],769127)},445912,370931,e=>{"use strict";let t=(0,e.i(918260).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t],370931),e.s(["Check",0,t],445912)},100736,e=>{"use strict";let t=(0,e.i(918260).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},481503,e=>{"use strict";var t=e.i(100736);e.s(["ChevronRight",()=>t.default])},686844,e=>{"use strict";let t=(0,e.i(918260).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],686844)},593843,e=>{"use strict";let t=(0,e.i(918260).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],593843)},15130,e=>{"use strict";let t=(0,e.i(918260).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],15130)},906464,210393,e=>{"use strict";let t=(0,e.i(918260).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],906464);var n=e.i(245157);e.s(["useRafElapsed",0,function(e,t){let r=(0,n.useRef)(t);(0,n.useEffect)(()=>{r.current=t}),(0,n.useEffect)(()=>{if(!e)return;let t=0,n=performance.now(),i=e=>{r.current(e-n),t=requestAnimationFrame(i)};return t=requestAnimationFrame(i),()=>cancelAnimationFrame(t)},[e])}],210393)},165923,e=>{"use strict";let t=(0,e.i(918260).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],165923)},928818,343148,e=>{"use strict";let t=(0,e.i(918260).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",0,t],928818);var n=e.i(245157),r=e.i(291967),i=e.i(161116),o=e.i(493942),s=e.i(559290),a=e.i(710690),l=e.i(392476),c=e.i(925720),d=e.i(747686),u=e.i(21438),h=e.i(989200),p=e.i(872249),f=e.i(602408),m=e.i(73772),g=e.i(719422),y=e.i(959557),b="Dialog",[v,k]=(0,o.createContextScope)(b),[x,w]=v(b),E=e=>{let{__scopeDialog:t,children:r,open:i,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,d=n.useRef(null),u=n.useRef(null),[h,p]=(0,a.useControllableState)({prop:i,defaultProp:o??!1,onChange:l,caller:b});return(0,y.jsx)(x,{scope:t,triggerRef:d,contentRef:u,contentId:(0,s.useId)(),titleId:(0,s.useId)(),descriptionId:(0,s.useId)(),open:h,onOpenChange:p,onOpenToggle:n.useCallback(()=>p(e=>!e),[p]),modal:c,children:r})};E.displayName=b;var T="DialogTrigger",S=n.forwardRef((e,t)=>
219{let{__scopeDialog:n,...o}=e,s=w(T,n),a=(0,i.useComposedRefs)(t,s.triggerRef);return(0,y.jsx)(h.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":q(s.open),...o,ref:a,onClick:(0,r.composeEventHandlers)(e.onClick,s.onOpenToggle)})});S.displayName=T;var C="DialogPortal",[A,_]=v(C,{forceMount:void 0}),N=e=>{let{__scopeDialog:t,forceMount:r,children:i,container:o}=e,s=w(C,t);return(0,y.jsx)(A,{scope:t,forceMount:r,children:n.Children.map(i,e=>(0,y.jsx)(u.Presence,{present:r||s.open,children:(0,y.jsx)(d.Portal,{asChild:!0,container:o,children:e})}))})};N.displayName=C;var O="DialogOverlay",M=n.forwardRef((e,t)=>{let n=_(O,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=w(O,e.__scopeDialog);return o.modal?(0,y.jsx)(u.Presence,{present:r||o.open,children:(0,y.jsx)(D,{...i,ref:t})}):null});M.displayName=O;var I=(0,g.createSlot)("DialogOverlay.RemoveScroll"),D=n.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(O,n);return(0,y.jsx)(f.RemoveScroll,{as:I,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(h.Primitive.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),R="DialogContent",z=n.forwardRef((e,t)=>{let n=_(R,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=w(R,e.__scopeDialog);return(0,y.jsx)(u.Presence,{present:r||o.open,children:o.modal?(0,y.jsx)(L,{...i,ref:t}):(0,y.jsx)(P,{...i,ref:t})})});z.displayName=R;var L=n.forwardRef((e,t)=>{let o=w(R,e.__scopeDialog),s=n.useRef(null),a=(0,i.useComposedRefs)(t,o.contentRef,s);return n.useEffect(()=>{let e=s.current;if(e)return(0,m.hideOthers)(e)},[]),(0,y.jsx)(j,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:(0,r.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),P=n.forwardRef((e,t)=>{let r=w(R,e.__scopeDialog),i=n.useRef(!1),o=n.useRef(!1);return(0,y.jsx)(j,{...e,ref:t,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()}})}),j=n.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,...d}=e,u=w(R,r),h=n.useRef(null),f=(0,i.useComposedRefs)(t,h);return(0,p.useFocusGuards)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:a,children:(0,y.jsx)(l.DismissableLayer,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":q(u.open),...d,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(J,{titleId:u.titleId}),(0,y.jsx)(Y,{contentRef:h,descriptionId:u.descriptionId})]})]})}),$="DialogTitle",F=n.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w($,n);return(0,y.jsx)(h.Primitive.h2,{id:i.titleId,...r,ref:t})});F.displayName=$;var B="DialogDescription",H=n.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(B,n);return(0,y.jsx)(h.Primitive.p,{id:i.descriptionId,...r,ref:t})});H.displayName=B;var U="DialogClose",V=n.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(U,n);return(0,y.jsx)(h.Primitive.button,{type:"button",...i,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,()=>o.onOpenChange(!1))})});function q(e){return e?"open":"closed"}V.displayName=U;var G="DialogTitleWarning",[W,K]=(0,o.createContext)(G,{contentName:R,titleName:$,docsSlug:"dialog"}),J=({titleId:e})=>{let t=K(G),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 220 221If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 222 223For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return n.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Y=({contentRef:e,descriptionId:t})=>{let r=K("DialogDescriptionWarning"),i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return n.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null};e.s(["Close",0,V,"Content",0,z,"Description",0,H,"Dialog",0,E,"DialogClose",0,V,"DialogContent",0,z,"DialogDescription",0,H,"DialogOverlay",0,M,"DialogPortal",0,N,"DialogTitle",0,F,"DialogTrigger",0,S,"Overlay",0,M,"Portal",0,N,"Root",0,E,"Title",0,F,"Trigger",0,S,"WarningProvider",0,W,"createDialogScope",0,k],485336);var X=e.i(485336);e.s(["Dialog",0,X],343148)},924442,e=>{"use strict";var t=e.i(928818);e.s(["X",()=>t.default])},310556,(e,t,n)=>{"use strict";let{flatTokensSymbol:r,htmlFlowSymbol:i,newlineRe:o}=e.r(437724);function s(e){return!!e[i]}function a(e,t,n){let r=[],i=[{array:e,index:0}];for(;i.length>0;){let e=i[i.length-1],{array:o,index:s}=e;if(s<o.length){let s=o[e.index++];t(s)&&r.push(s);let{children:a}=s;if(a.length>0){let e=n?n(s):a;i.push({array:e,index:0})}}else i.pop()}return r}function l(e,t,n){let i=e=>t.includes(e.type)&&(n||!s(e)),o=e[r];return o?o.filter(i):a(e,i)}function c(e,t){let n=Array.isArray(e)?e:[e];for(let e of t){let t=t=>Array.isArray(e)?e.includes(t.type):e===t.type;n=n.flatMap(e=>e.children.filter(t))}return n}let d=/^#tab\//;t.exports={addRangeToSet:function(e,t,n){for(let r=t;r<=n;r++)e.add(r)},filterByPredicate:a,filterByTypes:l,getBlockQuotePrefixText:function(e,t,n=1){return l(e,["blockQuotePrefix","linePrefix"]).filter(e=>e.startLine===t).map(e=>e.text).join("").trimEnd().concat("\n").repeat(n)},getDescendantsByType:c,getHeadingLevel:function(e){let t=1,{text:n}=e.children.find(e=>["atxHeadingSequence","setextHeadingLine"].includes(e.type));return"#"===n[0]?t=Math.min(n.length,6):"-"===n[0]&&(t=2),t},getHeadingStyle:function(e){return"setextHeading"===e.type?"setext":1===e.children.filter(e=>"atxHeadingSequence"===e.type).length?"atx":"atx_closed"},getHeadingText:function(e){return c(e,[["atxHeadingText","setextHeadingText"]]).flatMap(e=>e.children.filter(e=>"htmlText"!==e.type)).map(e=>e.text).join("").replace(o," ")},getHtmlTagInfo:function(e){if("htmlText"===e.type){let t=/^<([^!>][^/\s>]*)/.exec(e.text);if(t){let e=t[1],n=e.startsWith("/");return{close:n,name:n?e.slice(1):e}}}return null},getParentOfType:function(e,t){let n=e;for(;
223(n=n.parent)&&!t.includes(n.type););return n},inHtmlFlow:s,isDocfxTab:function(e){if(e?.type==="atxHeading"){let t=c(e,["atxHeadingText"]);if(1===t.length&&1===t[0].children.length&&"link"===t[0].children[0].type){let e=l(t[0].children[0].children,["resourceDestinationString"]);return 1===e.length&&d.test(e[0].text)}}return!1},isHtmlFlowComment:function(e){let{text:t,type:n}=e;if("htmlFlow"===n&&t.startsWith("<!--")&&t.endsWith("-->")){let e=t.slice(4,-3);return!e.startsWith(">")&&!e.startsWith("->")&&!e.endsWith("-")}return!1},nonContentTokens:new Set(["blockQuoteMarker","blockQuotePrefix","blockQuotePrefixWhitespace","gfmFootnoteDefinitionIndent","lineEnding","lineEndingBlank","linePrefix","listItemIndent","undefinedReference","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"])}},496118,(e,t,n)=>{"use strict";let r=e.r(310556),{newlineRe:i,nextLinesRe:o}=e.r(437724);t.exports.newLineRe=i,t.exports.nextLinesRe=o,t.exports.frontMatterRe=/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m,t.exports.inlineCommentStartRe=/(<!--\s*markdownlint-(disable|enable|capture|restore|disable-file|enable-file|disable-line|disable-next-line|configure-file))(?:\s|-->)/gi,t.exports.endOfLineHtmlEntityRe=/&(?:#\d+|#[xX][\da-fA-F]+|[a-zA-Z]{2,31}|blk\d{2}|emsp1[34]|frac\d{2}|sup\d|there4);$/,t.exports.endOfLineGemojiCodeRe=/:(?:[abmovx]|[-+]1|100|1234|(?:1st|2nd|3rd)_place_medal|8ball|clock\d{1,4}|e-mail|non-potable_water|o2|t-rex|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|[a-z]{2,15}2?|[a-z]{1,14}(?:_[a-z\d]{1,16})+):$/;let s=".,;:!?ãï¼ï¼ï¼ï¼ï¼";function a(e){return!!e&&Object.getPrototypeOf(e)===URL.prototype}t.exports.allPunctuation=s,t.exports.allPunctuationNoQuestion=s.replace(/[?ï¼]/gu,""),t.exports.isNumber=function(e){return"number"==typeof e},t.exports.isString=function(e){return"string"==typeof e},t.exports.isEmptyString=function(e){return 0===e.length},t.exports.isObject=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)},t.exports.isUrl=a,t.exports.cloneIfArray=function(e){return Array.isArray(e)?[...e]:e},t.exports.cloneIfUrl=function(e){return a(e)?new URL(e):e},t.exports.getHtmlAttributeRe=function(e){return RegExp(`\\s${e}\\s*=\\s*['"]?([^'"\\s>]*)`,"iu")},t.exports.isBlankLine=function(e){return!e||!e.trim()||!(e=>{for(;;){let t=e.indexOf("<!--"),n=e.indexOf("-->");if(-1!==n&&(-1===t||n<t))e=e.slice(n+3);else if(-1!==t&&-1!==n)e=e.slice(0,t)+e.slice(n+3);else{if(-1===t||-1!==n)return e;e=e.slice(0,t)}}})(e).replace(/>/g,"").trim()};let l="<!--",c=/^ *\|/,d=/[^\r\n]/g,u=/[^ \r\n]/g,h=/ +[\r\n]/g,p=e=>e.replace(d,".");function f(e,t,n){return e.length<=30||(e=t&&n?e.slice(0,15)+"..."+e.slice(-15):n?"..."+e.slice(-30):e.slice(0,30)+"..."),e}function m(e,t,n,r,i,o){e({lineNumber:t,detail:n,context:r,range:i,fixInfo:o})}t.exports.clearHtmlCommentText=function(e){let t=0;for(;-1!==(t=e.indexOf(l,t));){let n=e.indexOf("-->",t+2);if(-1===n)break;if(n>t+l.length){let r=e.slice(t+l.length,n),i=e.lastIndexOf("\n",t)+1,o=e.slice(i,t),s=0===o.trim().length,a=c.test(o)&&r.includes("\n");if(s||!(a||r.startsWith(">")||r.startsWith("->")||r.endsWith("-")||r.includes("--"))){let i=r.replace(u,".").replace(h,p);e=e.slice(0,t+l.length)+i+e.slice(n)}}t=n+3}return e},t.exports.escapeForRegExp=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")},t.exports.ellipsify=f,t.exports.addError=m,t.exports.addErrorDetailIf=function(e,t,n,r,i,o,s,a){n!==r&&m(e,t,"Expected: "+n+"; Actual: "+r+(i?"; "+i:""),o,s,a)},t.exports.addErrorContext=function(e,t,n,r,o,s,a){m(e,t,void 0,n=f(n.replace(i,"\n"),r,o),s,a)};let g=(e,t,n,r)=>e<n||e===n&&t<=r;function y(e){let t={ruleNames:[],lineNumber:-1};return e.filter((e,n,r)=>{delete e.fixInfo,delete e.severity;let i=r[n-1]||t;return e.ruleNames[0]!==i.ruleNames[0]||e.lineNumber!==i.lineNumber})}function b(e,t){let n={};for(let r of Object.keys(e)){let i=e[r].map(e=>({...e}));n[r]=t(i)}return n}t.exports.hasOverlap=function(e,t){let n=g(e.startLine,e.startColumn,t.startLine,t.startColumn),r=n?e:t,i=n?t:e;return g(i.startLine,i.startColumn,r.endLine,r.endColumn)},t.exports.frontMatterHasTitle=function(e,t){let n=RegExp(String(t||'^\\s*"?title"?\\s*[:=]'),"i");return!(void 0!==t&&!t)&&e.some(e=>n.test(e))},t.exports.getReferenceLinkImageData=function(e){let t=e=>e.toLowerCase().trim().replace(/\s+/g," "),n=e=>e?.children.filter(e=>"blockQuotePrefix"!==e.type).map(e=>e.text).join(""),i=new Map,o=new Map,s=(e,n,r)=>{let s=[e.startLine-1,e.startColumn-1,e.text.length],a=t(n),l=r?o:i,c=l.get(a)||[];c.push(s),l.set(a,c)},a=new Map,l=[],c=[];for(let i of r.filterByTypes(e,["definition","gfmFootnoteDefinition","definitionLabelString","gfmFootnoteDefinitionLabelString","gfmFootnoteCall","image","link","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"])){let e="";switch(i.type){case"definition":case"gfmFootnoteDefinition":for(let e=i.startLine;e<=i.endLine;e++)l.push(e-1);break;case"gfmFootnoteDefinitionLabelString":e="^";case"definitionLabelString":{let n=t(`${e}${i.text}`);if(a.has(n))c.push([n,i.startLine-1]);else{let e=r.getParentOfType(i,["definition"]),t=e&&r.getDescendantsByType(e,["definitionDestination","definitionDestinationRaw","definitionDestinationString"])[0]?.text;a.set(n,[i.startLine-1,t||""])}break}case"gfmFootnoteCall":case"image":case"link":{let e=1===i.children.length,t=2===i.children.length&&!i.children.some(e=>"resource"===e.type),[o]=r.getDescendantsByType(i,["label","labelText"]),[a]=r.getDescendantsByType(i,["reference","referenceString"]),l=n(o);if(!e&&!t){let[t,n]=i.children.filter(e=>["gfmFootnoteCallMarker","gfmFootnoteCallString"].includes(e.type));t&&n&&(l=`${t.text}${n.text}`,e=!0)}(e||t)&&s(i,n(a)||l,e);break}case"undefinedReferenceCollapsed":case"undefinedReferenceFull":case"undefinedReferenceShortcut":{let e=r.getDescendantsByType(i,["undefinedReference"])[0].children.map(e=>e.text).join(""),t="undefinedReferenceShortcut"===i.type;s(i,e,t)}}}return{references:i,shortcuts:o,definitions:a,duplicateDefinitions:c,definitionLineIndices:l}},t.exports.getPreferredLineEnding=function(e,t){let n=0,r=0,o=0;for(let t of e.match(i)||[])switch(t){case"\r":n++;break;case"\n":r++;break;case"\r\n":o++}return n||r||o?r>=o&&r>=n?"\n":o>=n?"\r\n":"\r":t&&t.EOL||"\n"},t.exports.expandTildePath=function(e,t){let n=t&&t.homedir&&t.homedir();return n?e.replace(/^~($|\/|\\)/,`${n}$1`):e}
223,t.exports.convertToResultVersion0=function(e){return b(e,e=>(function(e){let t={};for(let n of e){let e=n.ruleNames[0],r=t[e]||[];r.push(n.lineNumber),t[e]=r}return t})(y(e)))},t.exports.convertToResultVersion1=function(e){return b(e,e=>(function(e){for(let t of e)t.ruleName=t.ruleNames[0],t.ruleAlias=t.ruleNames[1]||t.ruleName,delete t.ruleNames;return e})(y(e)))},t.exports.convertToResultVersion2=function(e){return b(e,y)},t.exports.formatLintResults=function(e){let t=[],n=Object.entries(e||{});for(let[e,r]of(n.sort((e,t)=>e[0].localeCompare(t[0])),n))for(let n of r){let{lineNumber:r,ruleNames:i,ruleDescription:o,errorDetail:s,errorContext:a,errorRange:l,severity:c}=n,d=i.join("/"),u=`:${r}`,h=l&&l[0]||0,p=h?`:${h}`:"",f=s?` [${s}]`:"",m=a?` [Context: "${a}"]`:"";t.push(`${e}${u}${p} ${c} ${d} ${o}${f}${m}`)}return t}},34009,(e,t,n)=>{"use strict";t.exports={requireMarkdownItCjs:function(){return e.r(987055)}}},853526,(e,t,n)=>{"use strict";e.i(347374),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o=e.r(836437),s=e.r(588899),a=e.r(252980),l=o._(e.r(379996));function c(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/vc-ap-c5a1c4/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let d=a.Image},299228,(e,t,n)=>{t.exports=e.r(853526)},331912,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let r=e.r(891600);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},19086,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let o=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw o}getStore(){}run(){throw o}exit(){throw o}enterWith(){throw o}static bind(e){return e}}let a="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return a?new a:new s}function c(e){return a?a.bind(e):s.bind(e)}function d(){return a?a.snapshot():function(e,...t){return e(...t)}}},106819,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(19086).createAsyncLocalStorage)()},656176,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(106819)},893722,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},284536,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return l}});let r=e.r(959557),i=e.r(632717),o=e.r(656176),s=e.r(893722),a=e.r(784857);function l({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,a.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},82153,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let r=e.r(959557),i=e.r(245157),o=e.r(331912),s=e.r(284536);function a(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},n=(0,i.lazy)(()=>t.loader().then(a)),c=t.loading;function d(e){let a=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?i.Suspense:i.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:a}:{},children:u})}return d.displayName="LoadableComponent",d}},974163,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(836437)._(e.r(82153));function i(e,t){let n={};"function"==typeof e&&(n.loader=e);let i={...n,...t};return(0,r.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
223dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},71526,(e,t,n)=>{"use strict";var r=e.r(245157),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var d="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,d=r[1];return a(function(){i.value=n,i.getSnapshot=t,c(i)&&d({inst:i})},[e,n,t]),s(function(){return c(i)&&d({inst:i}),e(function(){c(i)&&d({inst:i})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},938001,(e,t,n)=>{"use strict";e.i(347374),t.exports=e.r(71526)},935250,(e,t,n)=>{"use strict";var r=e.r(245157),i=e.r(938001),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,d=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var u=a(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;var p=s(e,(u=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]))[0],u[1]);return l(function(){h.hasValue=!0,h.value=p},[p]),d(p),p}},168446,(e,t,n)=>{"use strict";
223e.i(347374),t.exports=e.r(935250)},33831,e=>{"use strict";var t=e.i(959557),n=e.i(276398);e.s(["AgentMark",0,function({agent:e,className:r}){let{Icon:i,iconUrl:o,brandColor:s}=e;return i?(0,t.jsx)(i,{className:r,"aria-hidden":"true",style:{color:s}}):void 0===o?null:(0,t.jsx)("img",{src:o,alt:"","aria-hidden":"true",width:16,height:16,loading:"lazy",decoding:"async",fetchPriority:"low",className:(0,n.cn)("opacity-70",r)})}])},378515,e=>{"use strict";var t=e.i(959557),n=e.i(299228),r=e.i(245157),i=e.i(152712),o=e.i(276398);let s=e=>Math.min(1,Math.max(-1,e));e.s(["AppIconGlass",0,function({className:e}){let a=(0,r.useRef)(null),l=(0,r.useRef)(null),c=(0,r.useRef)(null),d=(0,i.usePrefersReducedMotion)();return(0,t.jsx)("div",{ref:a,onPointerMove:e=>{if(d)return;let t=a.current,n=l.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=(r.width-96)/2||1,o=(r.height-96)/2||1,u=s((e.clientX-(r.left+r.width/2))/i),h=s((e.clientY-(r.top+r.height/2))/o);n.style.setProperty("--ry",`${(14*u).toFixed(2)}deg`),n.style.setProperty("--rx",`${(-(14*h)).toFixed(2)}deg`);let p=c.current;if(p){let e=(50+40*u).toFixed(1),t=(50+40*h).toFixed(1);p.style.background=`radial-gradient(120px 120px at ${e}% ${t}%, color-mix(in srgb, var(--card) 50%, transparent), transparent 60%)`,p.style.opacity="1"}},onPointerLeave:()=>{let e=l.current;e&&(e.style.setProperty("--rx","0deg"),e.style.setProperty("--ry","0deg")),c.current&&(c.current.style.opacity="0")},className:(0,o.cn)("inline-flex",e),style:{padding:48,perspective:"900px"},children:(0,t.jsxs)("div",{ref:l,className:"relative aspect-square w-32 transform-3d transition-transform will-change-transform motion-reduce:transition-none",style:{transform:"rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))",transitionDuration:"180ms",transitionTimingFunction:"cubic-bezier(0.2, 0.7, 0.2, 1)"},children:[(0,t.jsx)(n.default,{src:"/marketing-assets/app-icon.png",alt:"OpenKnowledge app icon",width:360,height:360,priority:!0,draggable:!1,className:"h-full w-full select-none"}),(0,t.jsx)("span",{ref:c,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-0 mix-blend-screen transition-opacity duration-200 ease-out motion-reduce:hidden",style:{borderRadius:"23%"}})]})})}])},854422,e=>{"use strict";var t=e.i(959557);e.s(["CLAUDE_BRAND_COLOR",0,"#D97757","ClaudeIcon",0,function(e){return(0,t.jsxs)("svg",{role:"img","aria-label":"Claude icon",fill:"none",height:24,width:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("title",{children:"Claude icon"}),(0,t.jsx)("g",{clipPath:"url(#clip0_claude)",children:(0,t.jsx)("path",{d:"M4.704 15.96L9.432 13.32L9.504 13.08L9.432 12.96H9.192L8.4 12.912L5.712 12.84L3.36 12.72L1.08 12.6L0.504 12.48L0 11.76L0.048 11.4L0.528 11.088L1.224 11.136L2.736 11.256L5.016 11.4L6.672 11.496L9.12 11.784H9.504L9.552 11.616L9.432 11.52L9.336 11.424L6.96 9.84L4.416 8.16L3.072 7.176L2.352 6.696L1.992 6.216L1.848 5.208L2.496 4.488L3.384 4.56L3.6 4.608L4.488 5.304L6.408 6.768L8.88 8.64L9.24 8.928L9.384 8.832L9.408 8.76L9.24 8.496L7.92 6L6.48 3.504L5.832 2.472L5.664 1.848C5.592 1.608 5.568 1.368 5.568 1.128L6.288 0.12L6.72 0L7.728 0.144L8.112 0.48L8.736 1.92L9.72 4.152L11.28 7.176L11.76 8.088L12 8.904L12.072 9.144H12.24V9.024L12.36 7.296L12.6 5.208L12.84 2.52L12.912 1.752L13.296 0.84L14.016 0.36L14.64 0.624L15.12 1.32L15.048 1.752L14.784 3.6L14.16 6.504L13.8 8.472H14.016L14.256 8.208L15.24 6.912L16.896 4.848L17.616 4.008L18.48 3.12L19.032 2.688H20.064L20.808 3.816L20.472 4.992L19.416 6.336L18.528 7.464L17.256 9.168L16.488 10.536L16.56 10.632H16.728L19.608 10.008L21.144 9.744L22.968 9.432L23.808 9.816L23.904 10.2L23.568 11.016L21.6 11.496L19.296 11.976L15.864 12.768L15.816 12.792L15.864 12.864L17.4 13.008L18.072 13.056H19.704L22.728 13.296L23.52 13.776L23.976 14.424L23.904 14.904L22.68 15.528L21.048 15.144L17.208 14.232L15.912 13.92H15.72V14.016L16.824 15.096L18.816 16.896L21.36 19.224L21.48 19.8L21.168 20.28L20.832 20.232L18.624 18.552L17.76 17.832L15.84 16.2H15.72V16.368L16.152 17.016L18.504 20.544L18.624 21.624L18.456 21.96L17.832 22.2L17.184 22.056L15.792 20.136L14.352 17.976L13.224 16.008L13.104 16.104L12.408 23.352L12.096 23.712L11.376 24L10.776 23.52L10.44 22.8L10.776 21.312L11.16 19.392L11.472 17.856L11.76 15.96L11.928 15.336V15.288H11.76L10.32 17.28L8.16 20.232L6.432 22.056L6.024 22.224L5.304 21.864L5.376 21.192L5.76 20.64L8.16 17.568L9.6 15.672L10.56 14.568L10.536 14.448H10.464L4.128 18.576L3 18.72L2.52 18.24L2.568 17.52L2.808 17.28L4.728 15.96H4.704Z",fill:"currentColor"})}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_claude",children:(0,t.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}])},365317,e=>{"use strict";var t=e.i(959557),n=e.i(245157);e.s(["CODEX_BRAND_COLOR",0,"#7A9DFF","CodexBrandIcon",0,function(e){let r=`codex-brand-gradient-${(0,n.useId)().replace(/:/g,"")}`;return(0,t.jsxs)("svg",{role:"img","aria-label":"Codex icon",xmlns:"http://www.w3.org/2000/svg",width:9,height:9,fill:"none",viewBox:"0 0 9 9",...e,children:[(0,t.jsx)("title",{children:"Codex icon"}),(0,t.jsx)("path",{d:"M3.03191 0.172167C3.39319 0.023523 3.7865 -0.030181 4.17441 0.0161665C4.67441 0.0736665 5.11991 0.286167 5.51091 0.653667C5.51591 0.658667 5.52291 0.662167 5.52941 0.664167C5.53647 0.665904 5.54385 0.665904 5.55091 0.664167C6.05923 0.532896 6.59731 0.581475 7.07391 0.801667L7.09741 0.812666L7.15541 0.841167C7.65429 1.09402 8.04342 1.52067 8.24941 2.04067C8.35391 2.29567 8.40591 2.56117 8.40691 2.83817C8.41442 3.04417 8.39185 3.25017 8.33991 3.44967C8.33735 3.45974 8.33738 3.47029 8.34 3.48035C8.34263 3.4904 8.34775 3.49963 8.35491 3.50717C8.65191 3.81067 8.84891 4.17217 8.94641 4.59217C9.09091 5.30467 8.94291 5.94717 8.50291 6.51917L8.43491 6.60217C8.14349 6.93574 7.761 7.17695 7.33441 7.29617C7.32515 7.29888 7.31666 7.30373 7.30962 7.31033C7.30259 7.31694 7.2972 7.3251 7.29391 7.33417C7.19841 7.60967 7.10241 7.84567 6.92391 8.08117C6.47391 8.67467 5.81291 9.00417 5.06841 9.00017C4.47491 8.99717 3.94891 8.78017 3.48991 8.34917C3.483 8.3427 3.4745 8.33819 3.46528 8.33608C3.45606 8.33397 3.44644 8.33435 3.43741 8.33717C3.24341 8.39967 3.04741 8.40867 2.83541 8.40617C2.49774 8.40346 2.16514 8.32377 1.86291 8.17317C1.54632 8.01629 1.27069 7.78773 1.05791 7.50567C0.981908 7.40467 0.906408 7.30967 0.850908 7.19717C0.775141 7.04279
2230.713231 6.88199 0.665908 6.71667C0.566008 6.34048 0.563599 5.94504 0.658908 5.56767C0.662042 5.55869 0.663069 5.54911 0.661908 5.53967C0.660196 5.53039 0.655446 5.52195 0.648408 5.51567C0.417442 5.28189 0.240911 5.00002 0.131408 4.69017C0.0585831 4.49931 0.0162322 4.29818 0.00590778 4.09417C-0.0122568 3.82546 0.0115281 3.55556 0.0764078 3.29417C0.244908 2.73817 0.567408 2.30167 1.04291 1.98517C1.14891 1.91467 1.24941 1.85967 1.34341 1.82017C1.45091 1.77567 1.55841 1.73817 1.66641 1.70667C1.67413 1.70427 1.68113 1.70001 1.6868 1.69425C1.69247 1.68849 1.69663 1.68142 1.69891 1.67367C1.78091 1.37919 1.92194 1.10446 2.11341 0.866166C2.35477 0.559671 2.67114 0.320634 3.03191 0.172167ZM4.77291 5.45467C4.69165 5.45922 4.61522 5.49471 4.55931 5.55385C4.5034 5.61299 4.47225 5.69128 4.47225 5.77267C4.47225 5.85405 4.5034 5.93235 4.55931 5.99148C4.61522 6.05062 4.69165 6.08611 4.77291 6.09067H6.59091C6.63417 6.09309 6.67747 6.08667 6.71816 6.07178C6.75885 6.0569 6.79608 6.03387 6.82756 6.0041C6.85905 5.97433 6.88413 5.93846 6.90127 5.89866C6.91841 5.85887 6.92725 5.81599 6.92725 5.77267C6.92725 5.72934 6.91841 5.68647 6.90127 5.64667C6.88413 5.60688 6.85905 5.571 6.82756 5.54123C6.79608 5.51146 6.75885 5.48843 6.71816 5.47355C6.67747 5.45866 6.63417 5.45224 6.59091 5.45467H4.77291ZM2.73091 3.11517C2.68764 3.04469 2.61865 2.99381 2.53854 2.97328C2.45844 2.95275 2.37348 2.96419 2.30165 3.00517C2.22982 3.04615 2.17675 3.11346 2.15366 3.19287C2.13056 3.27228 2.13926 3.35756 2.17791 3.43067L2.81391 4.54267L2.18091 5.61067C2.1596 5.64662 2.14558 5.68641 2.13966 5.72778C2.13373 5.76914 2.13601 5.81127 2.14636 5.85176C2.15671 5.89225 2.17494 5.9303 2.2 5.96374C2.22506 5.99718 2.25646 6.02536 2.29241 6.04667C2.32836 6.06797 2.36815 6.08199 2.40952 6.08792C2.45088 6.09385 2.49301 6.09157 2.5335 6.08121C2.57399 6.07086 2.61204 6.05263 2.64548 6.02758C2.67892 6.00252 2.7071 5.97112 2.72841 5.93517L3.45541 4.70767C3.48407 4.65931 3.4994 4.60422 3.49984 4.548C3.50028 4.49179 3.48581 4.43647 3.45791 4.38767L2.73091 3.11517Z",fill:`url(#${r})`}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:r,x1:"4.49991",y1:"0.000166496",x2:"4.49991",y2:"9.00017",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:"#B1A7FF"}),(0,t.jsx)("stop",{offset:"0.5",stopColor:"#7A9DFF"}),(0,t.jsx)("stop",{offset:"1",stopColor:"#3941FF"})]})})]})}])},721305,e=>{"use strict";var t=e.i(959557);e.s(["COPILOT_BRAND_COLOR",0,"var(--foreground)","CopilotIcon",0,function(e){return(0,t.jsxs)("svg",{role:"img","aria-label":"GitHub Copilot icon",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 12 12",fill:"none",...e,children:[(0,t.jsx)("title",{children:"GitHub Copilot icon"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M9.6225 2.682C10.2835 3.362 10.561 4.29 10.6775 5.5905C10.9885 5.5905 11.2775 5.658 11.4735 5.9175L11.8385 6.3995C11.9435 6.5385 12 6.7045 12 6.877V8.187C12 8.3565 11.9135 8.5215 11.7735 8.621C10.1195 9.801 8.0785 10.75 6 10.75C3.7 10.75 1.3975 9.4585 0.2265 8.621C0.0865 8.521 0.0005 8.356 0 8.187V6.877C0 6.7045 0.0565 6.5375 0.1605 6.399L0.5255 5.9175C0.7215 5.659 1.0125 5.5905 1.322 5.5905L1.3365 5.442C1.4615 4.219 1.7415 3.3355 2.3775 2.682C3.608 1.412 5.2325 1.2565 5.9505 1.25H6.0495C6.7675 1.2565 8.392 1.4115 9.6225 2.682ZM6.0005 4.846C5.8585 4.846 5.694 4.854 5.5195 4.871C5.458 5.0945 5.367 5.296 5.2345 5.425C4.7095 5.9365 4.0765 6.015 3.7375 6.015C3.4185 6.015 3.0845 5.95 2.812 5.783C2.554 5.8655 2.306 5.9845 2.29 6.281C2.26898 6.76138 2.25847 7.24216 2.2585 7.723L2.2575 7.963C2.2565 8.2445 2.255 8.526 2.251 8.808C2.252 8.971 2.353 9.123 2.506 9.1905C3.747 9.7415 4.921 10.019 6.001 10.019C7.079 10.019 8.253 9.7415 9.4935 9.1905C9.56814 9.15767 9.63181 9.10416 9.677 9.03628C9.72219 8.96841 9.747 8.88902 9.7485 8.8075C9.7635 7.9665 9.7515 7.1215 9.7105 6.281C9.695 5.983 9.4465 5.866 9.1875 5.783C8.9145 5.9495 8.5815 6.015 8.2625 6.015C7.924 6.015 7.2915 5.9365 6.766 5.425C6.633 5.296 6.5425 5.0945 6.481 4.871C6.321 4.855 6.1605 4.8465 6.0005 4.846ZM4.738 6.8525C5.0075 6.8525 5.226 7.0655 5.226 7.3275V8.204C5.226 8.4665 5.0075 8.679 4.738 8.679C4.61033 8.6806 4.48725 8.63149 4.39576 8.54243C4.30426 8.45338 4.25184 8.33166 4.25 8.204V7.328C4.25 7.0655 4.4685 6.8525 4.738 6.8525ZM7.238 6.8525C7.5075 6.8525 7.726 7.0655 7.726 7.3275V8.204C7.726 8.4665 7.5075 8.679 7.238 8.679C7.11033 8.6806 6.98725 8.63149 6.89576 8.54243C6.80426 8.45338 6.75184 8.33166 6.75 8.204V7.328C6.75 7.0655 6.9
223685 6.8525 7.238 6.8525ZM3.8175 2.5435C3.2925 2.5945 2.85 2.7625 2.625 2.9965C2.1375 3.515 2.2425 4.8305 2.52 5.1085C2.7225 5.3055 3.105 5.437 3.5175 5.437H3.5625C3.887 5.4305 4.455 5.349 4.9275 4.882C5.145 4.677 5.28 4.1655 5.265 3.647C5.25 3.23 5.13 2.887 4.95 2.7405C4.755 2.5725 4.3125 2.4995 3.8175 2.5435ZM7.05 2.7405C6.87 2.8865 6.75 3.2305 6.735 3.647C6.72 4.1655 6.855 4.677 7.0725 4.882C7.5565 5.3605 8.1405 5.434 8.4605 5.437H8.4825C8.895 5.437 9.2775 5.3055 9.48 5.1085C9.7575 4.8305 9.8625 3.515 9.375 2.9965C9.15 2.7625 8.7075 2.5945 8.1825 2.5435C7.6875 2.4995 7.245 2.5725 7.05 2.7405ZM6 3.8075C5.88 3.8075 5.7375 3.815 5.58 3.8295C5.595 3.9095 5.6025 3.9975 5.61 4.0925L5.6095 4.172C5.60894 4.21375 5.60661 4.25545 5.6025 4.297C5.715 4.286 5.815 4.2835 5.9085 4.283H6.0915C6.185 4.283 6.285 4.286 6.3975 4.297C6.39 4.224 6.39 4.1585 6.39 4.0925C6.3975 3.9975 6.405 3.91 6.42 3.8295C6.2804 3.81583 6.14026 3.80849 6 3.8075Z"})]})}])},777025,e=>{"use strict";var t=e.i(959557);e.s(["CursorIcon",0,function(e){return(0,t.jsxs)("svg",{role:"img","aria-label":"Cursor icon",fill:"none",height:24,width:24,viewBox:"0 0 466.73 532.09",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,t.jsx)("title",{children:"Cursor icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z"})]})}])},76403,e=>{"use strict";var t=e.i(959557),n=e.i(63290),r=e.i(445912),i=e.i(593843),o=e.i(15130),s=e.i(611821),a=e.i(245157);let l="/marketing-assets/brand/openknowledge-logo.svg",c="/marketing-assets/brand/openknowledge-logo.png",d="openknowledge-logo";async function u(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.status}`);await navigator.clipboard.writeText(await t.text())}var h=e.i(291967),p=e.i(493942),f=e.i(989200),m=e.i(288826),g=e.i(987458),y=e.i(710690),b="ContextMenu",[v,k]=(0,p.createContextScope)(b,[m.createMenuScope]),x=(0,m.createMenuScope)(),[w,E]=v(b),T=e=>{let{__scopeContextMenu:n,children:r,onOpenChange:i,dir:o,modal:s=!0}=e,[l,c]=a.useState(!1),d=x(n),u=(0,g.useCallbackRef)(i),h=a.useCallback(e=>{c(e),u(e)},[u]);return(0,t.jsx)(w,{scope:n,open:l,onOpenChange:h,modal:s,children:(0,t.jsx)(m.Root,{...d,dir:o,open:l,onOpenChange:h,modal:s,children:r})})};T.displayName=b;var S="ContextMenuTrigger",C=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,disabled:i=!1,...o}=e,s=E(S,r),l=x(r),c=a.useRef({x:0,y:0}),d=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),u=a.useRef(0),p=a.useCallback(()=>window.clearTimeout(u.current),[]),g=e=>{c.current={x:e.clientX,y:e.clientY},s.onOpenChange(!0)};return a.useEffect(()=>p,[p]),a.useEffect(()=>void(i&&p()),[i,p]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Anchor,{...l,virtualRef:d}),(0,t.jsx)(f.Primitive.span,{"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,...o,ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:i?e.onContextMenu:(0,h.composeEventHandlers)(e.onContextMenu,e=>{p(),g(e),e.preventDefault()}),onPointerDown:i?e.onPointerDown:(0,h.composeEventHandlers)(e.onPointerDown,U(e=>{p(),u.current=window.setTimeout(()=>g(e),700)})),onPointerMove:i?e.onPointerMove:(0,h.composeEventHandlers)(e.onPointerMove,U(p)),onPointerCancel:i?e.onPointerCancel:(0,h.composeEventHandlers)(e.onPointerCancel,U(p)),onPointerUp:i?e.onPointerUp:(0,h.composeEventHandlers)(e.onPointerUp,U(p))})]})});C.displayName=S;var A=e=>{let{__scopeContextMenu:n,...r}=e,i=x(n);return(0,t.jsx)(m.Portal,{...i,...r})};A.displayName="ContextMenuPortal";var _="ContextMenuContent",N=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=E(_,r),s=x(r),l=a.useRef(!1);return(0,t.jsx)(m.Content,{...s,...i,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&l.current&&t.preventDefault(),l.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||o.modal||(l.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});N.displayName=_;
223var O=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.Group,{...o,...i,ref:n})});O.displayName="ContextMenuGroup";var M=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.Label,{...o,...i,ref:n})});M.displayName="ContextMenuLabel";var I=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.Item,{...o,...i,ref:n})});I.displayName="ContextMenuItem";var D=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.CheckboxItem,{...o,...i,ref:n})});D.displayName="ContextMenuCheckboxItem";var R=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.RadioGroup,{...o,...i,ref:n})});R.displayName="ContextMenuRadioGroup";var z=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.RadioItem,{...o,...i,ref:n})});z.displayName="ContextMenuRadioItem";var L=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.ItemIndicator,{...o,...i,ref:n})});L.displayName="ContextMenuItemIndicator";var P=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.Separator,{...o,...i,ref:n})});P.displayName="ContextMenuSeparator";var j=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.Arrow,{...o,...i,ref:n})});j.displayName="ContextMenuArrow";var $="ContextMenuSub",F=e=>{let{__scopeContextMenu:n,children:r,onOpenChange:i,open:o,defaultOpen:s}=e,a=x(n),[l,c]=(0,y.useControllableState)({prop:o,defaultProp:s??!1,onChange:i,caller:$});return(0,t.jsx)(m.Sub,{...a,open:l,onOpenChange:c,children:r})};F.displayName=$;var B=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.SubTrigger,{...o,...i,ref:n})});B.displayName="ContextMenuSubTrigger";var H=a.forwardRef((e,n)=>{let{__scopeContextMenu:r,...i}=e,o=x(r);return(0,t.jsx)(m.SubContent,{...o,...i,ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});function U(e){return t=>"mouse"!==t.pointerType?e(t):void 0}H.displayName="ContextMenuSubContent",e.s(["Arrow",0,j,"CheckboxItem",0,D,"Content",0,N,"ContextMenu",0,T,"ContextMenuArrow",0,j,"ContextMenuCheckboxItem",0,D,"ContextMenuContent",0,N,"ContextMenuGroup",0,O,"ContextMenuItem",0,I,"ContextMenuItemIndicator",0,L,"ContextMenuLabel",0,M,"ContextMenuPortal",0,A,"ContextMenuRadioGroup",0,R,"ContextMenuRadioItem",0,z,"ContextMenuSeparator",0,P,"ContextMenuSub",0,F,"ContextMenuSubContent",0,H,"ContextMenuSubTrigger",0,B,"ContextMenuTrigger",0,C,"Group",0,O,"Item",0,I,"ItemIndicator",0,L,"Label",0,M,"Portal",0,A,"RadioGroup",0,R,"RadioItem",0,z,"Root",0,T,"Separator",0,P,"Sub",0,F,"SubContent",0,H,"SubTrigger",0,B,"Trigger",0,C,"createContextMenuScope",0,k],77039);var V=e.i(77039),V=V,q=e.i(276398);function G({...e}){return(0,t.jsx)(V.Root,{"data-slot":"context-menu",...e})}function W({...e}){return(0,t.jsx)(V.Trigger,{"data-slot":"context-menu-trigger",...e})}function K({className:e,...n}){return(0,t.jsx)(V.Portal,{children:(0,t.jsx)(V.Content,{"data-slot":"context-menu-content",className:(0,q.cn)("z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-card p-1 text-foreground shadow-md data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function J({className:e,inset:n,variant:r="default",...i}){return(0,t.jsx)(V.Item,{"data-slot":"context-menu-item","data-inset":n,"data-variant":r,className:(0,q.cn)("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-foreground
223/[0.06] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...i})}function Y({className:e,...n}){return(0,t.jsx)(V.Separator,{"data-slot":"context-menu-separator",className:(0,q.cn)("-mx-1 my-1 h-px bg-border-strong",e),...n})}e.s(["LogoContextMenu",0,function({children:e}){let[h,p]=(0,a.useState)(!1);async function f(){try{await u(l),p(!0),setTimeout(()=>p(!1),1500)}catch{}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"sr-only",role:"status",children:h?"Copied to clipboard":""}),(0,t.jsxs)(G,{children:[(0,t.jsx)(W,{asChild:!0,children:e}),(0,t.jsxs)(K,{className:"w-56",children:[(0,t.jsxs)(J,{onSelect:e=>{e.preventDefault(),f()},children:[h?(0,t.jsx)(r.Check,{className:"text-primary"}):(0,t.jsx)(i.Copy,{}),h?"Copied":"Copy as SVG"]}),(0,t.jsx)(J,{asChild:!0,children:(0,t.jsxs)("a",{href:l,download:`${d}.svg`,children:[(0,t.jsx)(o.Download,{}),"Download SVG"]})}),(0,t.jsx)(J,{asChild:!0,children:(0,t.jsxs)("a",{href:c,download:`${d}.png`,children:[(0,t.jsx)(o.Download,{}),"Download PNG"]})}),(0,t.jsx)(Y,{}),(0,t.jsx)(J,{asChild:!0,children:(0,t.jsxs)(s.default,{href:"/brand",children:[(0,t.jsx)(n.ArrowRight,{}),"All brand assets"]})})]})]})]})}],76403)},307845,446621,e=>{"use strict";var t=e.i(959557);e.s(["MAC_WINDOW_SURFACE",0,"#fdfdfc","MacOsWindowControls",0,function(){return(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:[(0,t.jsx)("span",{className:"size-[11px] rounded-full bg-[#ff5f57]"}),(0,t.jsx)("span",{className:"size-[11px] rounded-full bg-[#febc2e]"}),(0,t.jsx)("span",{className:"size-[11px] rounded-full bg-[#28c840]"})]})}],307845);var n=e.i(245157);e.s(["OkIcon",0,function(e){let r=(0,n.useId)();return(0,t.jsxs)("svg",{width:"227",height:"252",viewBox:"0 0 227 252",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img",...e,children:[(0,t.jsx)("title",{children:"OpenKnowledge"}),(0,t.jsxs)("g",{filter:`url(#${r})`,children:[(0,t.jsx)("path",{d:"M195.615 47.322C170.404 11.5418 135.032 -1.78461 87.4933 6.60183C62.581 10.9903 39.3632 28.1768 25.382 52.5836C11.5214 76.7664 8.72979 104.499 17.7136 128.665C27.2431 154.312 48.887 171.24 70.8583 185.71C75.4421 188.731 76.4301 192.419 77.0735 201.989C77.5617 209.22 78.3717 221.323 89.7335 227.521C93.0479 229.325 96.6954 230.244 100.584 230.244C108.436 230.244 115.232 226.481 118.494 224.678C137.755 214.022 201.457 174.865 212.445 118.388C217.414 92.8442 207.574 64.2844 195.621 47.322H195.615Z",fill:"white"}),(0,t.jsx)("path",{d:"M109.438 208.318C84.1921 222.282 107.582 187.513 81.142 170.097C63.2778 158.333 43.248 143.697 35.2406 122.156C19.7257 80.4194 51.307 31.9562 90.7404 25.0115C132.179 17.7107 159.952 29.1703 180.332 58.092C190.7 72.8085 197.696 96.2618 194.083 114.821C186.26 155.036 143.512 189.466 109.438 208.318Z",fill:"#69A3FF"}),(0,t.jsx)("path",{d:"M154.195 85.8131C156.366 83.6428 159.884 83.6428 162.055 85.8131V85.8131C164.225 87.9834 164.225 91.5021 162.055 93.6724L144.061 111.666L136.202 103.807L154.195 85.8131Z",fill:"#D5E5FF"}),(0,t.jsx)("path",{d:"M162.054 113.942C164.224 116.112 164.224 119.631 162.054 121.801V121.801C159.883 123.971 156.365 123.971 154.194 121.801L136.201 103.807L144.06 95.9481L162.054 113.942Z",fill:"#D5E5FF"})]}),(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:r,x:"0",y:"0",width:"226.296",height:"251.133",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"8.35549"}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"6.26662"}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}
223),(0,t.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,t.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]})})]})}],446621)},973731,e=>{"use strict";var t=e.i(959557);e.s(["OkWordmark",0,function(e){return(0,t.jsxs)("svg",{width:"1307",height:"252",viewBox:"0 0 1307 252",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img",...e,children:[(0,t.jsx)("title",{children:"OpenKnowledge"}),(0,t.jsxs)("g",{filter:"url(#ok-wordmark-shadow)",children:[(0,t.jsx)("path",{d:"M195.615 47.322C170.404 11.5418 135.032 -1.78461 87.4933 6.60183C62.581 10.9903 39.3632 28.1768 25.382 52.5836C11.5214 76.7664 8.72979 104.499 17.7136 128.665C27.2431 154.312 48.887 171.24 70.8583 185.71C75.4421 188.731 76.4301 192.419 77.0735 201.989C77.5617 209.22 78.3717 221.323 89.7335 227.521C93.0479 229.325 96.6954 230.244 100.584 230.244C108.436 230.244 115.232 226.481 118.494 224.678C137.755 214.022 201.457 174.865 212.445 118.388C217.414 92.8442 207.574 64.2844 195.621 47.322H195.615Z",fill:"white"}),(0,t.jsx)("path",{d:"M109.438 208.318C84.1921 222.282 107.582 187.513 81.142 170.097C63.2778 158.333 43.248 143.697 35.2406 122.156C19.7257 80.4194 51.307 31.9562 90.7404 25.0115C132.179 17.7107 159.952 29.1703 180.332 58.092C190.7 72.8085 197.696 96.2618 194.083 114.821C186.26 155.036 143.512 189.466 109.438 208.318Z",fill:"#69A3FF"}),(0,t.jsx)("path",{d:"M154.195 85.8131C156.366 83.6428 159.884 83.6428 162.055 85.8131V85.8131C164.225 87.9834 164.225 91.5021 162.055 93.6724L144.061 111.666L136.202 103.807L154.195 85.8131Z",fill:"#D5E5FF"}),(0,t.jsx)("path",{d:"M162.054 113.942C164.224 116.112 164.224 119.631 162.054 121.801V121.801C159.883 123.971 156.365 123.971 154.194 121.801L136.201 103.807L144.06 95.9481L162.054 113.942Z",fill:"#D5E5FF"})]}),(0,t.jsx)("path",{d:"M357.843 150.449C348.511 160.764 336.035 165.921 320.416 165.921C304.796 165.921 292.271 160.764 282.841 150.449C273.508 140.134 268.842 126.971 268.842 110.959C268.842 94.9465 273.508 81.783 282.841 71.4684C292.271 61.1537 304.796 55.9964 320.416 55.9964C336.035 55.9964 348.511 61.1537 357.843 71.4684C367.274 81.783 371.989 94.9465 371.989 110.959C371.989 126.971 367.274 140.134 357.843 150.449ZM292.419 142.197C299.099 150.253 308.431 154.28 320.416 154.28C332.4 154.28 341.733 150.253 348.412 142.197C355.092 134.142 358.432 123.729 358.432 110.959C358.432 98.1882 355.092 87.7753 348.412 79.7201C341.733 71.5666 332.4 67.4899 320.416 67.4899C308.431 67.4899 299.099 71.5666 292.419 79.7201C285.739 87.7753 282.399 98.1882 282.399 110.959C282.399 123.729 285.739 134.142 292.419 142.197ZM383.081 188.171V87.5298H395.016V98.2865H395.311C401.5 89.9365 409.653 85.7615 419.771 85.7615C429.595 85.7615 437.503 89.3471 443.495 96.5182C449.487 103.591 452.483 113.365 452.483 125.841C452.483 138.121 449.536 147.895 443.642 155.164C437.748 162.336 429.644 165.921 419.329 165.921C409.113 165.921 401.107 162.188 395.311 154.722H395.016V188.171H383.081ZM418.445 155.901C425.518 155.901 430.921 153.151 434.654 147.649C438.387 142.148 440.253 134.928 440.253 125.989C440.253 117.049 438.387 109.829 434.654 104.328C430.921 98.7285 425.567 95.9288 418.592 95.9288C410.635 95.9288 404.594 98.7776 400.468 104.475C396.342 110.075 394.279 117.246 394.279 125.989C394.279 134.928 396.244 142.148 400.173 147.649C404.103 153.151 410.193 155.901 418.445 155.901ZM494.001 165.774C482.704 165.774 473.716 161.992 467.036 154.428C460.454 146.765 457.163 137.187 457.163 125.694C457.163 114.397 460.503 104.917 467.183 97.255C473.961 89.4944 482.655 85.6142 493.264 85.6142C504.463 85.6142 513.108 89.5436 519.198 97.4023C525.289 105.163 528.334 115.527 528.334 128.494H469.393C469.884 136.549 472.242 143.131 476.466 148.239C480.788 153.249 486.633 155.754 494.001 155.754C505.396 155.754 512.42 150.547 515.072 140.134H526.713C524.945 148.288 521.212 154.624 515.514 159.143C509.817 163.563 502.646 165.774 494.001 165.774ZM509.178 101.528C505.347 97.2059 500.042 95.0447 493.264 95.0447C486.486 95.0447 481.083 97.3041 477.056 101.823C473.126 106.342 470.67 112.236 469.688 119.505H515.514C515.121 111.843 513.009
223105.851 509.178 101.528ZM548.993 87.5298V97.5497H549.288C555.182 89.6909 563.237 85.7615 573.454 85.7615C581.509 85.7615 587.796 87.8736 592.315 92.0977C596.834 96.3218 599.093 102.363 599.093 110.222V163.711H587.157V111.253C587.157 106.342 585.635 102.56 582.59 99.9073C579.544 97.1568 575.32 95.7815 569.917 95.7815C563.827 95.7815 558.817 97.7462 554.887 101.676C550.958 105.605 548.993 110.664 548.993 116.853V163.711H537.058V87.5298H548.993ZM634.236 163.711V58.354H647.498V110.664L699.366 58.354H716.017L673.432 100.497L719.553 163.711H704.081L664.444 109.485L647.498 126.431V163.711H634.236ZM736.286 87.5298V97.5497H736.581C742.475 89.6909 750.53 85.7615 760.746 85.7615C768.802 85.7615 775.089 87.8736 779.607 92.0977C784.126 96.3218 786.386 102.363 786.386 110.222V163.711H774.45V111.253C774.45 106.342 772.927 102.56 769.882 99.9073C766.837 97.1568 762.613 95.7815 757.21 95.7815C751.119 95.7815 746.109 97.7462 742.18 101.676C738.251 105.605 736.286 110.664 736.286 116.853V163.711H724.35V87.5298H736.286ZM858.488 154.28C851.808 161.943 842.918 165.774 831.817 165.774C820.717 165.774 811.777 161.943 804.999 154.28C798.319 146.618 794.979 137.089 794.979 125.694C794.979 114.299 798.319 104.77 804.999 97.1076C811.777 89.4453 820.717 85.6142 831.817 85.6142C842.918 85.6142 851.808 89.4453 858.488 97.1076C865.168 104.77 868.508 114.299 868.508 125.694C868.508 137.089 865.168 146.618 858.488 154.28ZM813.546 147.355C817.868 152.954 823.959 155.754 831.817 155.754C839.676 155.754 845.718 152.954 849.942 147.355C854.166 141.657 856.278 134.437 856.278 125.694C856.278 116.853 854.117 109.633 849.794 104.033C845.57 98.3356 839.578 95.4868 831.817 95.4868C823.959 95.4868 817.868 98.3356 813.546 104.033C809.322 109.731 807.21 116.951 807.21 125.694C807.21 134.437 809.322 141.657 813.546 147.355ZM892.676 163.711L868.51 87.5298H881.33L894.739 134.535L898.865 150.891H899.16C900.633 144.211 901.91 138.857 902.991 134.83L915.81 87.5298H928.335L940.713 134.83L944.397 150.891H944.691C946.263 144.211 947.688 138.759 948.965 134.535L963.11 87.5298H975.488L950.585 163.711H938.355L925.683 117.59L921.999 101.676H921.704C920.329 108.061 919.052 113.365 917.873 117.59L905.054 163.711H892.676ZM981.732 163.711V58.354H993.667V163.711H981.732ZM1039.98 165.774C1028.68 165.774 1019.69 161.992 1013.01 154.428C1006.43 146.765 1003.14 137.187 1003.14 125.694C1003.14 114.397 1006.48 104.917 1013.16 97.255C1019.94 89.4944 1028.63 85.6142 1039.24 85.6142C1050.44 85.6142 1059.08 89.5436 1065.17 97.4023C1071.26 105.163 1074.31 115.527 1074.31 128.494H1015.37C1015.86 136.549 1018.22 143.131 1022.44 148.239C1026.76 153.249 1032.61 155.754 1039.98 155.754C1051.37 155.754 1058.39 150.547 1061.05 140.134H1072.69C1070.92 148.288 1067.19 154.624 1061.49 159.143C1055.79 163.563 1048.62 165.774 1039.98 165.774ZM1055.15 101.528C1051.32 97.2059 1046.02 95.0447 1039.24 95.0447C1032.46 95.0447 1027.06 97.3041 1023.03 101.823C1019.1 106.342 1016.64 112.236 1015.66 119.505H1061.49C1061.1 111.843 1058.98 105.851 1055.15 101.528ZM1112.5 165.921C1102.09 165.921 1093.84 162.336 1087.75 155.164C1081.75 147.895 1078.76 138.121 1078.76 125.841C1078.76 113.464 1081.9 103.689 1088.19 96.5182C1094.48 89.3471 1102.48 85.7615 1112.21 85.7615C1122.52 85.7615 1130.48 89.9365 1136.08 98.2865H1136.37V58.354H1148.31V163.711H1136.37V154.428H1136.08C1130.09 162.09 1122.23 165.921 1112.5 165.921ZM1112.94 155.901C1121.1 155.901 1127.14 153.2 1131.07 147.797C1135.1 142.394 1137.11 135.124 1137.11 125.989C1137.11 116.951 1134.95 109.682 1130.63 104.181C1126.4 98.6794 1120.46 95.9288 1112.8 95.9288C1105.82 95.9288 1100.42 98.7285 1096.59 104.328C1092.86 109.829 1090.99 117.049 1090.99 125.989C1090.99 134.928 1092.86 142.148 1096.59 147.649C1100.42 153.151 1105.87 155.901 1112.94 155.901ZM1191.89 189.055C1182.16 189.055 1174.5 187.189 1168.9 183.456C1163.4 179.821 1160.3 174.664 1159.62 167.984H1170.67C1171.75 175.745 1178.72 179.625 1191.59 179.625C1206.13 179.625 1213.4 173.092 1213.4 160.027V149.27H1213.1C1210.06 153.2 1206.82 156.147 1203.38 158.111C1199.94 160.076 1195.67 161.058 1190.56 161.058C1180.74 161.058 1172.73 157.522 1166.54 150.449C1160.35 143.376 1157.26 134.339 1157.26 123.336C1157.26 111.843 1160.35 102.707 1166.54 95.9288C1172.83 89.1506 1180.59 85.7615 1189.82 85.7615C1199.84 85.7615 1207.6 89.5927 1213.1 97.255H1213.4V87.5298H1225.34V159.585C1225.34 169.31 1222.34 176.629 1216.35 181.54C1210.45 186.55 1202.3 189.055 1191.89 189.055ZM1191.15 151.039C1206.57 151.039 1214.28 141.608 1214.28 122.747C1214.28 104.77 1206.52 95.7815 1191 95.7815C1184.03 95.7815 1178.67 98.2865 1174.94 103.296C1171.31 108.306 1169.49 115.035 1169.49 123.484C1169.49 131.932 1171.36 138.661 1175.09 143.671C1178.82 148.583 1184.17 151.039 1191.15 151.039ZM1271.16 165.774C1259.86 165.774 1250.87 161.992 1244.19 154.428C1237.61 146.765 1234.32 137.187 1234.32 125.694C1234.32 114.397 1237.66 104.917 1244.34 97.255C1251.12 89.4944 1259.81 85.6142 1270.42 85.6142C1281.62 85.6142 1290.26 89.5436 1296.35 97.4023C1302.44 105.163 1305.49 115.527 1305.49 128.494H1246.55C1247.04 136.549 1249.4 143.131 1253.62 148.239C1257.94 153.249 1263.79 155.754 1271.16 155.754C1282.55 155.754 1289.58 150.547 1292.23 140.134H1303.87C1302.1 148.288 1298.37 154.624 1292.67 159.143C1286.97 163.563 1279.8 165.774 1271.16 165.774ZM1286.33 101.528C1282.5 97.2059 1277.2 95.0447 1270.42 95.0447C1263.64 95.0447 1258.24 97.3041 1254.21 101.823C1250.28 106.342 1247.83 112.236 1246.84 119.505H1292.67C1292.28 111.843 129
2230.17 105.851 1286.33 101.528Z",fill:"currentColor"}),(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"ok-wordmark-shadow",x:"-2.95639e-05",y:"-1.04904e-05",width:"226.297",height:"251.133",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"8.35549"}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"6.26662"}),(0,t.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),(0,t.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]})})]})}])},892495,e=>{"use strict";var t=e.i(959557),n=e.i(276398);let r=({children:e,className:r})=>(0,t.jsx)("span",{className:(0,n.cn)("text-base text-primary-strong font-mono font-medium uppercase tracking-wide",r),children:e}),i=({children:e,className:r})=>(0,t.jsx)("p",{className:(0,n.cn)("text-xl leading-snug text-muted-foreground",r),children:e});e.s(["SectionHeading",0,({children:e,tag:o,description:s,className:a,headingClassName:l,tagClassName:c,descriptionClassName:d,as:u="h2"})=>(0,t.jsxs)("div",{className:(0,n.cn)("flex items-left gap-3 flex-col",a),children:[o&&(0,t.jsx)(r,{className:c,children:o}),(0,t.jsx)(u,{className:(0,n.cn)("text-4xl font-light leading-tight tracking-tight text-foreground sm:text-5xl",l),children:e}),s&&(0,t.jsx)(i,{className:d,children:s})]})])},784528,e=>{"use strict";var t=e.i(959557),n=e.i(928818),n=n,r=e.i(343148),i=e.i(276398);function o({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function s({className:e,...n}){return(0,t.jsx)(r.Dialog.Overlay,{"data-slot":"sheet-overlay",className:(0,i.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...n})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"sheet",...e})},"SheetClose",0,function({...e}){return(0,t.jsx)(r.Dialog.Close,{"data-slot":"sheet-close",...e})},"SheetContent",0,function({className:e,children:a,side:l="right",showCloseButton:c=!0,...d}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(r.Dialog.Content,{"data-slot":"sheet-content",className:(0,i.cn)("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500","right"===l&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm","left"===l&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm","top"===l&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top","bottom"===l&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...d,children:[a,c&&(0,t.jsxs)(r.Dialog.Close,{className:"absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-foreground
223/5",children:[(0,t.jsx)(n.default,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...n}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"sheet-description",className:(0,i.cn)("text-sm text-muted-foreground",e),...n})},"SheetFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sheet-footer",className:(0,i.cn)("mt-auto flex flex-col gap-2 p-4",e),...n})},"SheetHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,i.cn)("flex flex-col gap-1.5 p-4",e),...n})},"SheetTitle",0,function({className:e,...n}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"sheet-title",className:(0,i.cn)("font-semibold text-foreground",e),...n})},"SheetTrigger",0,function({...e}){return(0,t.jsx)(r.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}],784528)},739497,e=>{"use strict";var t=e.i(959557),n=e.i(299228),r=e.i(611821),i=e.i(245157),o=e.i(448791),s=e.i(871910),a=e.i(818775),l=e.i(892495),c=e.i(276398),d=e.i(295605);function u({src:e,width:r,height:i,settled:o,wrapperClassName:s,imageClassName:a,fromX:l,toX:d}){return(0,t.jsx)("div",{"aria-hidden":!0,className:(0,c.cn)("pointer-events-none absolute left-1/2 z-0 -translate-x-1/2 -translate-y-1/2 select-none mix-blend-multiply dark:mix-blend-screen",s),children:(0,t.jsx)(n.default,{src:e,alt:"",width:r,height:i,className:(0,c.cn)("h-auto opacity-30 transition-[transform,filter] duration-1400 motion-reduce:transition-none",a),style:{transform:`translateX(${o?d:l})`,filter:o?"blur(12.58px)":"blur(0px)",transitionTimingFunction:"cubic-bezier(0.25, 0.46, 0.45, 0.94)"}})})}e.s(["CallToAction",0,function({initialPlatform:e}){let[n,c]=(0,o.useIsInView)("-15%"),[h,p]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{c&&p(!0)},[c]),(0,t.jsxs)(a.Section,{className:"relative overflow-hidden",children:[(0,t.jsx)(s.DotTexture,{variant:"right",className:"top-0 right-0 w-40 sm:w-72 lg:w-lg"}),(0,t.jsx)(s.DotTexture,{variant:"left",className:"-bottom-50 left-0 w-32 sm:w-60 lg:w-96"}),(0,t.jsxs)("div",{ref:n,className:"relative flex min-h-112 items-center justify-center sm:min-h-136 lg:min-h-160",children:[(0,t.jsx)(u,{src:"/marketing-assets/images/home/cta-shape-left.svg",width:606,height:585,settled:h,wrapperClassName:"top-1/2",imageClassName:"w-72 sm:w-96 lg:w-152",fromX:"-32%",toX:"-18%"}),(0,t.jsx)(u,{src:"/marketing-assets/images/home/cta-shape-right.svg",width:700,height:697,settled:h,wrapperClassName:"top-11/20",imageClassName:"w-80 sm:w-112 lg:w-175",fromX:"32%",toX:"18%"}),(0,t.jsxs)("div",{className:"container relative z-10 flex flex-col items-center",children:[(0,t.jsx)(l.SectionHeading,{tag:"Get started",className:"items-center",headingClassName:"text-center",children:"Start building knowledge."}),(0,t.jsxs)("div",{className:"mt-10 flex flex-wrap items-center justify-center gap-5",children:[(0,t.jsx)(d.DownloadOsButton,{cta:"landing-cta",size:"lg",initialPlatform:e}),(0,t.jsx)(r.default,{href:"/download",className:"font-mono text-base text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline",children:"All platforms"})]})]})]})]})}])},682120,e=>{"use strict";var t=e.i(854422),n=e.i(365317),r=e.i(721305),i=e.i(777025),o=e.i(959557),s=e.i(245157);let a=[{id:"claude",label:"Claude",Icon:t.ClaudeIcon,brandColor:t.CLAUDE_BRAND_COLOR},{id:"codex",label:"Codex",Icon:n.CodexBrandIcon,brandColor:n.CODEX_BRAND_COLOR},{id:"cursor",label:"Cursor",Icon:i.CursorIcon,brandColor:"var(--foreground)"},{id:"gemini",label:"Gemini",Icon:function(e){return(0,o.jsxs)("svg",{role:"img","aria-label":"Gemini icon",fill:"none",height:24,width:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsx)("title",{children:"Gemini icon"}),(0,o.jsx)("path",{fill:"currentColor",d:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"})]})},brandColor:"#4285F4"},{id:"copilot",label:"Copilot",Icon:r.CopilotIcon,brandColor:r.COPILOT_BRAND_COLOR},{id:"openclaw",label:"OpenClaw",Icon:function(e){let t=`openclaw-gradient-${(0,s.useId)().replace(/:/g,"")}`;return(0,o.jsxs)("svg",{role:"img","aria-label":"OpenClaw icon",fill:"none",height:24,width:24,viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsx)("title",{children:"OpenClaw icon"}),(0,o.jsx)("path",{d:"M60 10 C30 10 15 35 15 55 C15 75 30 95 45 100 L45 110 L55 110 L55 100 C55 100 60 102 65 100 L65 110 L75 110 L75 100 C90 95 105 75 105 55 C105 35 90 10 60 10Z",fill:`url(#${t})`}),(0,o.jsx)("path",{d:"M20 45 C5 40 0 50 5 60 C10 70 20 65 25 55 C28 48 25 45 20 45Z",fill:`url(#${t})`}),(0,o.jsx)("path",{d:"M100 45 C115 40 120 50 115 60 C110 70 100 65 95 55 C92 48 95 45 100 45Z",fill:`url(#${t})`}),(0,o.jsx)("path",{d:"M45 15 Q35 5 30 8",stroke:"#F5654A",strokeWidth:2,strokeLinecap:"round"}),(0,o.jsx)("path",{d:"M75 15 Q85 5 90 8",stroke:"#F5654A",strokeWidth:2,strokeLinecap:"round"}),(0,o.jsx)("circle",{cx:"45",cy:"35",r:"6",fill:"#101012"}),(0,o.jsx)("circle",{cx:"75",cy:"35",r:"6",fill:"#101012"}),(0,o.jsx)("circle",{cx:"46",cy:"34",r:"2",fill:"#4FC8AE"}),(0,o.jsx)("circle",{cx:"76",cy:"34",r:"2",fill:"#4FC8AE"}),(0,o.jsx)("defs",{children:(0,o.jsxs)("linearGradient",{id:t,x1:"0%",y1:"0%",x2:"100%",y2:"100%",gradientUnits:"objectBoundingBox",children:[(0,o.jsx)("stop",{offset:"0%",stopColor:"#F5654A"}),(0,o.jsx)("stop",{offset:"100%",stopColor:"#B23A28"})]})})]})},brandColor:"#F5654A"},{id:"opencode",label:"OpenCode",Icon:function(e){return(0,o.jsxs)("svg",{role:"img","aria-label":"OpenCode icon",fill:"none",height:24,width:24,viewBox:"-30 0 300 300",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsx)("title",{children:"OpenCode icon"}),(0,o.jsx)("path",{d:"M180 240H60V120H180V240Z",fill:"#CFCECD"}),(0,o.jsx)("path",{fillRule:"evenodd",d:"M180 60H60V240H180V60ZM240 300H0V0H240V300Z",fill:"#201D1D"})]})},brandColor:"#201D1D"},{id:"pi",label:"Pi",Icon:function(e){return(0,o.jsxs)("svg",{role:"img","aria-label":"Pi icon",fill:"none",height:24,width:24,viewBox:"0 0 800 800",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsx)("title",{children:"Pi icon"}
223),(0,o.jsx)("path",{fillRule:"evenodd",d:"M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M517.36 400 H634.72 V634.72 H517.36 Z",fill:"currentColor"})]})},brandColor:"#09090B"},{id:"hermes",label:"Hermes",Icon:function(e){return(0,o.jsxs)("svg",{role:"img","aria-label":"Hermes icon",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"currentColor",fillRule:"evenodd",viewBox:"0 0 24 24",...e,children:[(0,o.jsx)("title",{children:"Hermes icon"}),(0,o.jsx)("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),(0,o.jsx)("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),(0,o.jsx)("path",{clipRule:"evenodd",d:
vendor: 17,805 bytes, line 223
223"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"
223})]})},brandColor:"var(--foreground)"}],l=a[0].id;e.s(["DEFAULT_HERO_AGENT_ID",0,l,"buildHeroAgents",0,function(e){let t=new Set(a.map(e=>e.id));return[...a,...e.filter(e=>!t.has(e.id))]},"heroAgentById",0,function(e,t){return e.find(e=>e.id===t)??e[0]}],682120)},224537,e=>{"use strict";var t=e.i(959557),n=e.i(972605),r=e.i(445912),i=e.i(738362),o=e.i(126314),s=e.i(906464),a=e.i(245157),l=e.i(181232),c=e.i(803781),d=e.i(448791),u=e.i(152712),h=e.i(210393),p=e.i(33831),f=e.i(307845),m=e.i(446621),g=e.i(973731),y=e.i(276398),b=e.i(682120);let v="Help me write up our launch week",k="Drafting your launch recap in OpenKnowledge.",x="retros/launch-week",w=[{phase:"rest",ms:800},{phase:"user-typing",ms:800},{phase:"agent-status",ms:500},{phase:"tool-appear",ms:400},{phase:"tool-filling",ms:2e3},{phase:"tool-done",ms:600},{phase:"hold",ms:2200},{phase:"reset",ms:500}],E=w.filter(e=>"reset"!==e.phase).reduce((e,t)=>e+t.ms,0),T={phase:"hold",userTypedLen:v.length,agentTypedLen:k.length,contentStep:5},S=[0,450,900,1350];function C(e){let t=0;for(let n of w){if(e<t+n.ms){let r=e-t,i=r/n.ms;return function(e,t,n){switch(e){case"rest":return{phase:e,userTypedLen:0,agentTypedLen:0,contentStep:0};case"user-typing":return{phase:e,userTypedLen:Math.floor(n*v.length),agentTypedLen:0,contentStep:0};case"agent-status":return{phase:e,userTypedLen:v.length,agentTypedLen:Math.floor(n*k.length),contentStep:0};case"tool-appear":return{phase:e,userTypedLen:v.length,agentTypedLen:k.length,contentStep:1};case"tool-filling":{let n=1;for(let e=0;e<S.length;e++)t>=S[e]&&(n=2+e);return{phase:e,userTypedLen:v.length,agentTypedLen:k.length,contentStep:n}}case"tool-done":case"hold":case"reset":return{phase:e,userTypedLen:v.length,agentTypedLen:k.length,contentStep:5}}}(n.phase,r,i)}t+=n.ms}return{phase:"hold",userTypedLen:v.length,agentTypedLen:k.length,contentStep:5}}function A({agent:e,phase:r,userTypedLen:i,agentTypedLen:o}){let s=(0,a.useRef)(null),l=v.slice(0,i),c=v.slice(i),d=k.slice(0,o),u=k.slice(o),h=i>0,m="user-typing"===r,g="agent-status"===r||"tool-appear"===r||"tool-filling"===r||"tool-done"===r||"hold"===r,y="agent-status"===r,b="tool-appear"===r||"tool-filling"===r||"tool-done"===r||"hold"===r,w="tool-done"===r||"hold"===r,E="reset"===r;return(0,a.useEffect)(()=>{if("reset"===r)return;let e=s.current;if(!e)return;let t=()=>{let t="rest"===r?0:e.scrollHeight;e.scrollTo({top:t,behavior:"smooth"})};t();let n=window.setTimeout(t,350);return()=>window.clearTimeout(n)},[r]),(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col border-b border-border lg:border-b-0",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-6 px-4 py-3",children:[(0,t.jsx)(f.MacOsWindowControls,{}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground",style:{fontSize:"12.5px"},children:[(0,t.jsx)(p.AgentMark,{agent:e,className:"size-4"}),(0,t.jsx)("span",{children:e.label})]})]}),(0,t.jsxs)("div",{ref:s,className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-hidden px-4 pt-1 pb-3 text-left",children:[(0,t.jsx)("div",{className:"flex justify-end transition-opacity duration-300",style:{opacity:E?0:+!!h},"aria-hidden":!h,children:(0,t.jsxs)("div",{style:{maxWidth:"88%"}
223,className:"rounded-2xl rounded-br-sm bg-foreground/[0.05] px-3 py-2 text-left text-sm leading-snug text-foreground mb-4",children:[(0,t.jsx)("span",{children:l}),m&&(0,t.jsx)("span",{className:"ml-px inline-block translate-y-px motion-safe:animate-pulse bg-foreground/60 align-middle",style:{height:"0.9em",width:"1.5px"},"aria-hidden":"true"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"invisible",children:c})]})}),(0,t.jsxs)("div",{className:"flex items-start gap-2 transition-opacity duration-300",style:{opacity:E?0:+!!g},"aria-hidden":!g,children:[(0,t.jsx)(p.AgentMark,{agent:e,className:"mt-0.75 size-4 shrink-0"}),(0,t.jsxs)("div",{className:"text-sm leading-snug text-foreground",children:[(0,t.jsx)("span",{children:d}),y&&(0,t.jsx)("span",{className:"ml-px inline-block translate-y-px motion-safe:animate-pulse bg-foreground/60 align-middle",style:{height:"0.9em",width:"1.5px"},"aria-hidden":"true"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"invisible",children:u})]})]}),(0,t.jsx)(_,{phase:r,visible:b,isResetting:E}),(0,t.jsxs)("div",{className:"flex items-start gap-2 transition-opacity duration-300",style:{opacity:E?0:+!!w},"aria-hidden":!w,children:[(0,t.jsx)(p.AgentMark,{agent:e,className:"mt-0.75 size-4 shrink-0"}),(0,t.jsxs)("div",{className:"text-sm leading-snug text-foreground",children:["Updated ",(0,t.jsxs)("span",{className:"text-primary",children:[x,".md"]}),' â added a "Highlights" section with three wins and the daily activity chart.']})]})]}),(0,t.jsx)("div",{className:"shrink-0 px-4 pt-2 pb-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-xl bg-card px-3 py-2 shadow-toolbar",children:[(0,t.jsx)("span",{className:"flex-1 text-left text-sm text-muted-foreground/60",children:"Ask anything"}),(0,t.jsx)("span",{className:"flex size-5 items-center justify-center rounded-full","aria-hidden":"true",children:(0,t.jsx)(n.ArrowUp,{className:"size-3.5 text-muted-foreground opacity-60",strokeWidth:2.5})})]})})]})}function _({phase:e,visible:n,isResetting:i}){let o="tool-done"===e||"hold"===e;return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-xl border px-3 py-2 text-left transition-[opacity,transform] duration-300 ease-out",style:{opacity:i?0:n?"tool-appear"===e?.85:1:0,transform:"tool-appear"===e?"translateY(4px)":"translateY(0)"},"aria-hidden":!n,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 font-mono text-muted-foreground",style:{fontSize:"12px"},children:(0,t.jsx)("span",{className:"truncate text-foreground/70",children:"open-knowledge · write"})}),"tool-appear"===e||"tool-filling"===e?(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 font-mono text-2xs uppercase tracking-wide text-muted-foreground",children:[(0,t.jsx)(s.Loader2,{className:"size-3 animate-spin","aria-hidden":"true"}),"Calling"]}):(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 font-mono text-2xs uppercase tracking-wide text-success",children:[(0,t.jsx)(r.Check,{className:"size-3","aria-hidden":"true"}),"Done"]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 leading-snug text-muted-foreground transition-opacity duration-300",style:{fontSize:"12px",opacity:+!!o},"aria-hidden":!o,children:[(0,t.jsxs)("span",{className:"font-mono text-foreground/70",children:[x,".md"]}),(0,t.jsx)("span",{className:"text-1sm",children:"Create recap + add daily activity chart"})]})]})}function N({contentStep:e,agent:n,animationDone:r}){return(0,t.jsx)(l.OkEditorProvider,{initialMarkdown:(0,c.heroRevealMarkdown)(e),frontmatter:c.HERO_FRONTMATTER_YAML,children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col bg-card lg:overflow-hidden lg:rounded-lg lg:shadow-window",children:[(0,t.jsxs)("div",{className:"relative flex shrink-0 flex-col gap-3 px-4 py-3 text-left",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-foreground
223/[0.04] px-3 py-1.5 text-muted-foreground",style:{fontSize:"11.5px"},children:[(0,t.jsx)(o.Globe,{className:"size-3.5 shrink-0 opacity-50","aria-hidden":"true"}),(0,t.jsxs)("span",{className:"truncate",children:["https://openknowledge.ai/",x]})]}),(0,t.jsxs)("div",{className:"grid items-center gap-3",style:{gridTemplateColumns:"1fr auto 1fr"},children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 truncate text-2xs text-muted-foreground",children:[(0,t.jsx)(m.OkIcon,{className:"size-6 shrink-0 lg:hidden","aria-hidden":"true"}),(0,t.jsx)(g.OkWordmark,{"aria-label":"OpenKnowledge",className:"hidden h-6 w-auto shrink-0 lg:block"})]}),(0,t.jsx)("div",{className:"justify-self-center",children:r?(0,t.jsx)(l.OkEditorModeToggle,{}):(0,t.jsx)(R,{})}),(0,t.jsx)("div",{className:"flex justify-self-end",children:(0,t.jsx)("div",{className:"flex size-6 items-center justify-center rounded-full",style:n.brandColor?{"--agent-brand":n.brandColor,backgroundColor:"color-mix(in srgb, var(--agent-brand) 18%, transparent)"}:void 0,title:`${n.label} is editing`,children:(0,t.jsx)(p.AgentMark,{agent:n,className:"size-3.5"})})})]}),(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-full z-10 h-3 bg-linear-to-b from-card to-transparent"})]}),(0,t.jsxs)("div",{"data-revealing":r?void 0:"true",className:"flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto px-6 pt-1 pb-4 text-left subtle-scrollbar",children:[(0,t.jsx)(D,{}),(0,t.jsx)(l.OkEditorBody,{}),(0,t.jsx)(O,{step:e,live:r})]}),(0,t.jsxs)("div",{className:"relative flex shrink-0 items-center justify-between bg-card px-6 py-2 font-mono text-2xs text-muted-foreground tabular-nums",children:[(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-full h-3 bg-linear-to-t from-card to-transparent"}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(i.GitBranch,{size:11})," main"]}),(0,t.jsxs)("span",{className:"relative inline-grid",children:[(0,t.jsx)("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:"76 words · 385 chars · ~97 tokens"}),(0,t.jsx)(M,{})]})]})]})})}function O({step:e,live:t}){let{editor:n}=(0,l.useOkEditor)(),r=(0,a.useRef)(e);return(0,a.useEffect)(()=>{if(n){if(r.current!==e){r.current=e;let t=(0,l.parseEditorMarkdown)((0,c.heroRevealMarkdown)(e));queueMicrotask(()=>{n.isDestroyed||n.commands.setContent(t)})}n.setEditable(t)}},[n,e,t]),null}function M(){let{words:e,chars:n,tokens:r}=(0,l.useEditorDocStats)();return(0,t.jsxs)("span",{className:"col-start-1 row-start-1",children:[e," words · ",n," chars · ~",r," tokens"]})}function I({label:e,value:n}){return(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"w-12 shrink-0 text-muted-foreground/70",children:e}),(0,t.jsx)("span",{className:"text-foreground",children:n})]})}function D(){let{mode:e}=(0,l.useOkEditor)();return"source"===e?null:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 pl-6 text-1sm",children:[(0,t.jsx)(I,{label:"title",value:c.HERO_FRONTMATTER.title}),(0,t.jsx)(I,{label:"tags",value:(0,t.jsx)("span",{className:"inline-flex flex-wrap gap-1.5",children:c.HERO_FRONTMATTER.tags.map(e=>(0,t.jsxs)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["#",e]},e))})})]})}function R(){return(0,t.jsxs)("div",{className:"inline-flex shrink-0 items-center gap-0.5 rounded-lg p-0.5",style:{backgroundColor:"color-mix(in srgb, var(--foreground) 5%, transparent)"},children:[(0,t.jsxs)("span",{className:"flex h-6 items-center gap-1 rounded-md px-1.5 font-mono font-medium uppercase tracking-wide",style:{fontSize:"10px",color:"var(--foreground)",backgroundColor:"var(--card)",boxShadow:"var(--shadow-tab)"},children:[(0,t.jsx)(z,{className:"size-3 shrink-0"}),"Visual"]}),(0,t.jsxs)("span",{className:"flex h-6 items-center gap-1 rounded-md px-1.5 font-mono font-medium uppercase tracking-wide text-muted-foreground",style:{fontSize:"10px"},children:[(0,t.jsx)(L,{className:"size-3 shrink-0"}),"Markdown"]})]})}function z({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 256 256",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z"})})}function L({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 256 256",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z"})})}e.s(["HeroPreview",0,function({activeAgentId:e,agents:n}){let r=(0,b.heroAgentById)(n,e),[i,o]=(0,a.useState)({slots:[e,e],active:0,shownId:e});if(i.shownId!==e){let t=+(0===i.active),n=[...i.slots];n[t]=e,o({slots:n,active:t,shownId:e})}let[s,l]=(0,a.useState)(()=>C(0)),[c,p]=(0,a.useState)(!1),[m,g]=(0,d.useIsInView)("100px"),v=(0,u.usePrefers
223ReducedMotion)();(0,a.useEffect)(()=>{!c&&v&&(l(T),p(!0))},[v,c]);let k=(0,a.useRef)({phase:null,userLen:-1,agentLen:-1,step:-1});(0,h.useRafElapsed)(!c&&!v&&g,e=>{if(e>=E){l(T),p(!0);return}let t=C(e),n=k.current;(t.phase!==n.phase||t.userTypedLen!==n.userLen||t.agentTypedLen!==n.agentLen||t.contentStep!==n.step)&&(k.current={phase:t.phase,userLen:t.userTypedLen,agentLen:t.agentTypedLen,step:t.contentStep},l(t))});let x="rest"===s.phase||"user-typing"===s.phase||"agent-status"===s.phase||"tool-appear"===s.phase?"chat":"editor";return(0,t.jsx)("div",{ref:m,className:"flex h-full w-full font-(family-name:--font-inter)",style:{backgroundColor:f.MAC_WINDOW_SURFACE},children:(0,t.jsx)("div",{className:"relative h-full w-full overflow-hidden",children:(0,t.jsxs)("div",{className:(0,y.cn)("flex h-full w-(--track-w)",v?"":"transition-transform duration-500 ease-out","editor"===x?"-translate-x-1/2":"translate-x-0","lg:grid lg:h-full lg:w-full lg:flex-none lg:grid-cols-(--panes) lg:grid-rows-1","lg:translate-x-0 lg:transition-none"),style:{"--track-w":"200%","--panes":"minmax(0,1fr) minmax(0,1.55fr)"},children:[(0,t.jsx)("div",{className:"relative h-full w-1/2 shrink-0 lg:w-auto",children:i.slots.map((e,r)=>{let o=(0,b.heroAgentById)(n,e);return(0,t.jsx)("div",{"aria-hidden":i.active!==r,className:(0,y.cn)("absolute inset-0 transition-opacity duration-500 ease-out",i.active===r?"opacity-100":"pointer-events-none opacity-0"),children:(0,t.jsx)(A,{agent:o,phase:s.phase,userTypedLen:s.userTypedLen,agentTypedLen:s.agentTypedLen})},r)})}),(0,t.jsx)("div",{className:"flex h-full w-1/2 shrink-0 flex-col lg:block lg:w-auto lg:p-2",children:(0,t.jsx)(N,{contentStep:s.contentStep,agent:r,animationDone:c})})]})})})}])},686399,e=>{"use strict";var t=e.i(959557),n=e.i(299228),r=e.i(611821),i=e.i(245157),o=e.i(740935),s=e.i(152712),a=e.i(33831),l=e.i(871910),c=e.i(818775),d=e.i(892495),u=e.i(276398),h=e.i(295605),p=e.i(682120),f=e.i(224537);function m({agent:e,active:n,onSelect:r}){let{label:i}=e;return(0,t.jsxs)("button",{type:"button",role:"radio",onClick:r,"aria-checked":n,className:(0,u.cn)("group inline-flex shrink-0 items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-semibold outline-none transition-colors focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",n?"bg-card text-foreground shadow-sm ring-1 ring-border-strong/20":"text-foreground/70 hover:text-foreground"),children:[(0,t.jsx)(a.AgentMark,{agent:e,className:(0,u.cn)("size-4",n?"opacity-100":"group-hover:opacity-100")}),i]})}e.s(["Hero",0,function({acpAgents:e=[],initialPlatform:a}){let g=(0,i.useMemo)(()=>(0,p.buildHeroAgents)(e),[e]),[y,b]=(0,i.useState)(p.DEFAULT_HERO_AGENT_ID),v=(0,i.useRef)(null),k=(0,i.useRef)(0),x=(0,i.useRef)(null),w=(0,i.useRef)(null),E=(0,i.useRef)(0),T=(0,s.usePrefersReducedMotion)(),[S,C]=(0,i.useState)(!0),[A,_]=(0,i.useState)(!1),[N,O]=(0,i.useState)(0),M=(0,i.useRef)(0),I=()=>{let e=v.current;e&&(C(e.scrollLeft<=1),_(e.scrollLeft>=M.current-1))},D=()=>{null!=x.current&&cancelAnimationFrame(x.current),x.current=null,w.current=null};(0,i.useEffect)(()=>()=>{null!=x.current&&cancelAnimationFrame(x.current)},[]),(0,i.useEffect)(()=>{let e=v.current,t=e?.firstElementChild;if(!e||!(t instanceof HTMLElement))return;let n=()=>{M.current=e.scrollWidth-e.clientWidth;let n=t.getBoundingClientRect().left,r=e.clientWidth,i=0;for(let e of t.children){if(!(e instanceof HTMLElement)||"true"===e.ariaHidden)continue;let t=e.getBoundingClientRect();t.left-n+t.width>r&&(i+=1)}O(i)};n();let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[]),(0,i.useEffect)(()=>{if(!T)return;let e=v.current,t=k.current;e&&0!==t&&(k.current=0,null!=x.current&&cancelAnimationFrame(x.current),x.current=null,w.current=null,e.scrollLeft=t>0?M.current:0,C(e.scrollLeft<=1),_(e.scrollLeft>=M.current-1))},[T]);let R=e=>{let t=v.current;if(!t||0===k.current)return D();null==w.current&&(w.current=e,E.current=t.scrollLeft);let n=(e-w.current)/1e3;w.current=e;let r=M.current,i=Math.min(150,Math.max(80,r/6));if(E.current=Math.max(0,Math.min(r,E.current+k.current*i*n)),t.scrollLeft=E.current,I(),k.current>0?E.current>=r:E.current<=0)return k.current=0,D();x.current=requestAnimationFrame(R)},z=e=>{let t=v.current;if(t){if(T){t.scrollLeft=e>0?M.current:0,I();return}k.current=e,null==x.current&&(w.current=null,x.current=requestAnimationFrame(R))}},L=()=>{k.current=0,D()};return(0,t.jsxs)(c.Section,{className:"relative min-h-screen overflow-hidden",children:[(0,t.jsx)(l.DotTexture,{variant:"right",className:"top-0 right-0 w-60 sm:w-170"}),(0,t.jsx)(l.DotTexture,{variant:"left",className:"bottom-0 left-0 w-40 sm:w-72 lg:w-128.75"}),(0,t.jsxs)("div",{className:"container relative z-10 mx-auto flex flex-col items-center text-center",children:[(0,t.jsx)(d.SectionHeading,{as:"h1",className:"items-center",tag:"Open source",headingClassName:"sm:text-6xl text-5xl",description:"A rich text editor and knowledge base for you and your agents.",children:o.SITE_HEADLINE}),(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-4",children:[(0,t.jsx)(h.DownloadOsButton,{cta:"landing-hero",size:"md",initialPlatform:a}),(0,t.jsx)(r.default,{href:"/download",className:"font-mono text-sm text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline",children:"All platforms"})]}),(0,t.jsx)("div",{className:"mt-16 flex justify-center",children:(0,t.jsxs)("div",{className:"relative inline-flex items-center gap-3 rounded-full border bg-background py-1.5 pr-1.5 pl-5",id:"hero-agent-label",children:[(0,t.jsx)("span",{className:"font-mono text-sm uppercase tracking-wide text-muted-foreground",children:"Use with"}),(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsx)("div",{ref:v,role:"radiogroup","aria-labelledby":"hero-agent-label",onScroll:I,className:"-my-2 w-130 max-w-[70vw] overflow-x-auto overscroll-x-contain py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:(0,t.jsxs)("div",{className:"flex w-max items-center gap-1 pl-2",children:[g.map(e=>(0,t.jsx)(m,{agent:e,active:y===e.id,onSelect:()=>b(e.id)},e.id)),(0,t.jsx)("div",{"aria-hidden":"true",className:"w-2 shrink-0"})]})}),(0,t.jsx)("div",{"aria-hidden":"true",className:(0,u.cn)("pointer-events-none absolute inset-y-0 left-0 w-12 bg-linear-to-r from-background to-transparent transition-opacity duration-200",S?"opacity-0":"opacity-100")}),(0,t.jsx)("div",{"aria-hidden":"true",onMouseEnter:()=>z(1),onMouseLeave:L,className:(0,u.cn)("absolute inset-y-0 right-0 flex w-14 items-center justify-end bg-linear-to-l from-background to-transparent pr-1 transition-opacity duration-200",A?"pointer-events-none opacity-0":"cursor-pointer opacity-100"),children:N>0&&(0,t.jsxs)("span",{className:"rounded-full bg-card px-1.5 py-0.5 text-2xs font-semibold text-muted-foreground shadow-sm ring-1 ring-border-strong/20",children:["+",N]})})]}),(0,t.jsx)("div",{"aria-hidden":"true",onMouseEnter:()=>z(-1),onMouseLeave:L,className:(0,u.cn)("absolute inset-y-0 left-0 w-32",S?"pointer-events-none":"cursor-pointer")})]})}),(0,t.jsxs)("div",{className:"relative mt-4 w-full overflow-hidden rounded-glass",children:[(0,t.jsx)(n.default,{src:"/marketing-assets/images/home/hero-box-background.webp",alt:"","aria-hidden":!0,fill:!0,sizes:"(min-width: 1024px) 80vw, 100vw",priority:!0,className:"object-cover"}),(0,t.jsx)("div",{className:"relative z-10 flex h-155 w-full flex-col overflow-hidden rounded-glass border border-(--glass-border) p-3 backdrop-blur-glass sm:p-4 lg:aspect-video lg:h-auto lg:p-5",style:{backgroundColor:"var(--glass)",boxShadow:"var(--shadow-glass)"},children:(0,t.jsx)("div",{className:"relative min-h-0 w-full flex-1 overflow-hidden rounded-xl",children:(0,t.jsx)(f.HeroPreview,{activeAgentId:y,agents:g})})})]})]})]})}])},708912,e=>{"use strict";var t=e.i(959557),n=e.i(445912),r=e.i(906464);let i=(0,e.i(918260).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var o=e.i(245157),s=e.i(448791),a=e.i(152712),l=e.i(210393),c=e.i(854422);let d=[{label:"docName",value:"decisions/api-strategy"},{label:"position",value:"replace"},{label:"summary",value:"Capture API choice decision"}
223],u={writer:"claude-code",timeAgo:"just now",summary:"Capture API choice decision",path:"decisions/api-strategy"},h=[{writer:"claude-code",timeAgo:"18 min ago",summary:"Add migration runbook section",path:"runbooks/db-migrations"},{writer:"claude-code",timeAgo:"1 hr ago",summary:"Sync standup notes",path:"team/standup-notes"}],p="cubic-bezier(0.16, 1, 0.3, 1)";function f(e){return{opacity:+!!e,transform:e?"translateY(0)":"translateY(6px)",transition:`opacity 480ms ${p}, transform 480ms ${p}`}}function m({highlighted:e}){let[n,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=requestAnimationFrame(()=>r(!0));return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)("div",{style:{opacity:+!!n,transform:n?"translateY(0)":"translateY(-10px)",transition:`opacity 480ms ${p}, transform 480ms ${p}`},children:(0,t.jsx)(g,{entry:u,highlighted:e})})}function g({entry:e,highlighted:n=!1}){return(0,t.jsxs)("div",{className:"rounded-lg border p-2 @[320px]:p-3",style:{borderColor:n?"color-mix(in srgb, var(--primary) 55%, transparent)":"color-mix(in srgb, var(--foreground) 10%, transparent)",backgroundColor:n?"color-mix(in srgb, var(--primary) 5%, transparent)":"transparent",boxShadow:n?"0 8px 22px -10px color-mix(in srgb, var(--primary) 35%, transparent)":"none",transition:`border-color 700ms ${p}, background-color 700ms ${p}, box-shadow 700ms ${p}`},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.ClaudeIcon,{className:"size-3.5 shrink-0","aria-hidden":"true",style:{color:c.CLAUDE_BRAND_COLOR}}),(0,t.jsx)("span",{className:"font-medium text-foreground",style:{fontSize:"12px"},children:e.writer}),(0,t.jsxs)("span",{className:"ml-auto inline-flex items-center gap-2 text-muted-foreground",style:{fontSize:"10px"},children:[e.timeAgo,(0,t.jsx)("span",{className:"h-3 w-px bg-muted-foreground/30","aria-hidden":"true"}),(0,t.jsx)(i,{className:"size-3","aria-hidden":"true"})]})]}),(0,t.jsxs)("div",{className:"mt-1 flex flex-col gap-0.5 pl-5.5 @[320px]:mt-1.5",children:[(0,t.jsxs)("div",{className:"text-foreground/90",style:{fontSize:"12px"},children:["⢠",e.summary]}),(0,t.jsx)("div",{className:"font-mono text-muted-foreground/80",style:{fontSize:"10px"},children:e.path})]})]})}e.s(["MadeForAgentsPreview",0,function(){let[e,i]=(0,o.useState)(0),[u,y]=(0,s.useIsInView)(),b=(0,a.usePrefersReducedMotion)();(0,o.useEffect)(()=>{b&&i(6100)},[b]),(0,l.useRafElapsed)(y&&!b,e=>{i(e%8800)});let v=e<8200,k=e<4700,x=e>=4700&&v,w=k&&v,E=e>=300&&k,T=e>=900&&k,S=[e>=1200&&k,e>=1400&&k,e>=1600&&k],C=e>=2750&&k,A=e>=3050&&k,_=e>=3300&&k;return(0,t.jsxs)("div",{ref:u,className:"@container relative grid h-full w-full overflow-hidden rounded-xl bg-card",style:{gridTemplateAreas:'"scene"'},children:[(0,t.jsxs)("div",{"aria-hidden":!w,className:"flex flex-col gap-2 p-3 @[320px]:gap-4 @[320px]:p-4 @sm:gap-5 @sm:p-5 @md:gap-6 @md:p-6",style:{gridArea:"scene",opacity:+!!w,transform:w?"translateX(0)":"translateX(-14px)",transition:`opacity 520ms ${p}, transform 520ms ${p}`,pointerEvents:w?"auto":"none"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.ClaudeIcon,{className:"size-4","aria-hidden":"true",style:{color:c.CLAUDE_BRAND_COLOR}}),(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Claude"})]}),(0,t.jsx)("div",{style:f(E),children:(0,t.jsx)("p",{className:"leading-relaxed text-muted-foreground",style:{fontSize:"13px"},children:"I'll capture this as a decision doc."})}),(0,t.jsxs)("div",{style:f(T),className:"overflow-hidden rounded-lg border border-foreground
223/10",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-foreground/10 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-2xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Used"}),(0,t.jsx)("span",{className:"text-foreground",children:"open-knowledge:"}),(0,t.jsx)("span",{className:"text-primary",children:"write"})]}),(0,t.jsxs)("span",{className:"relative inline-flex h-4 min-w-16 items-center justify-end font-mono uppercase tracking-wide",style:{fontSize:"10px"},children:[(0,t.jsxs)("span",{className:"absolute right-0 inline-flex items-center gap-1.5 text-muted-foreground",style:{opacity:+!!(e>=2250&&e<2750),transition:`opacity 240ms ${p}`},children:[(0,t.jsx)(r.Loader2,{className:"size-3 animate-spin","aria-hidden":"true"}),"Calling"]}),(0,t.jsxs)("span",{className:"absolute right-0 inline-flex items-center gap-1.5 text-success",style:{opacity:+!!C,transition:`opacity 240ms ${p}`},children:[(0,t.jsx)(n.Check,{className:"size-3","aria-hidden":"true"}),"200 ok"]})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-1 px-3 py-2.5 font-mono text-2xs",children:d.map((e,n)=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5",style:f(S[n]??!1),children:[(0,t.jsx)("span",{className:"text-muted-foreground/70",children:e.label}),(0,t.jsx)("span",{className:"text-muted-foreground/40",children:":"}),(0,t.jsx)("span",{className:"text-foreground",children:e.value})]},e.label))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("p",{className:"leading-relaxed text-muted-foreground",style:{...f(A),fontSize:"13px"},children:"Done â edit landed:"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-1.5 leading-relaxed",style:{...f(_),fontSize:"13px"},children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"1."}),(0,t.jsx)("span",{className:"font-medium text-primary",children:"decisions/api-strategy.md"}),(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"â"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Capture API choice decision."})]})]})]}),(0,t.jsxs)("div",{"aria-hidden":!x,className:"flex flex-col gap-2 p-3 @[320px]:gap-3 @[320px]:p-4 @sm:p-5 @md:p-6",style:{gridArea:"scene",opacity:+!!x,transform:x?"translateX(0)":"translateX(14px)",transition:`opacity 520ms ${p}, transform 520ms ${p}`,pointerEvents:x?"auto":"none"},children:[(0,t.jsx)("span",{className:"font-mono uppercase text-muted-foreground",style:{fontSize:"10px",letterSpacing:"0.18em"},children:"Timeline"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 @[320px]:gap-2",children:[e>=5500&&x&&(0,t.jsx)(m,{highlighted:e>=5500&&e<6500}),h.map(e=>(0,t.jsx)(g,{entry:e},e.path))]})]})]})}],708912)},931169,e=>{"use strict";var t=e.i(959557),n=e.i(769127),r=e.i(481503),i=e.i(686844),o=e.i(918260);let s=(0,o.default)("compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),a=(0,o.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var l=e.i(257522);let c=(0,o.default)("layout-panel-top",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]]),d=(0,o.default)("message-square-warning",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]]),u=(0,o.default)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),h=(0,o.default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var p=e.i(165923);let f=(0,o.default)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}
223]]),m=(0,o.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var g=e.i(299228),y=e.i(245157),b=e.i(448791),v=e.i(152712),k=e.i(818775),x=e.i(892495),w=e.i(276398);function E({children:e,className:n}){return(0,t.jsx)("div",{className:(0,w.cn)("rounded-2xl bg-background p-6 overflow-hidden",n),children:e})}function T({title:e,description:n,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-4 lg:grid lg:row-span-2 lg:grid-rows-subgrid",children:[(0,t.jsx)(E,{className:"lg:min-h-65 xl:min-h-80 flex items-center justify-center",children:r}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-foreground leading-snug",children:e}),(0,t.jsx)("p",{className:"text-base leading-snug text-muted-foreground",children:n})]})]})}let S=[{label:"Callout",description:"Highlight a tip, warning, or aside inline.",render:()=>(0,t.jsxs)("div",{className:"relative rounded-md bg-primary/8 py-1.5 pl-3.5 pr-2",children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute top-1.5 bottom-1.5 left-1.5 w-0.5 rounded-full bg-primary"}),(0,t.jsxs)("div",{className:"flex items-center gap-1 font-medium text-primary",style:{fontSize:"10.5px"},children:[(0,t.jsx)(l.Info,{className:"size-3"}),"Tip"]}),(0,t.jsx)("p",{className:"mt-1 leading-snug text-foreground",style:{fontSize:"9px"},children:"Pin key context next to the section that needs it."})]})},{label:"Accordion",description:"Collapsible section with a clickable summary.",render:()=>(0,t.jsx)("div",{className:"overflow-hidden rounded-md border bg-card",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5",children:[(0,t.jsx)(r.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-2xs font-semibold text-foreground/70",children:"Click to expand"})]})})},{label:"Tabs",description:"Switch between content panes inline.",render:()=>(0,t.jsxs)("div",{className:"overflow-hidden rounded-md border bg-card",children:[(0,t.jsxs)("div",{className:"flex border-b",children:[(0,t.jsx)("div",{className:"-mb-px border-b-2 border-primary px-2 py-1 font-semibold text-foreground",style:{fontSize:"10px"},children:"Setup"}),(0,t.jsx)("div",{className:"px-2 py-1 text-muted-foreground",style:{fontSize:"10px"},children:"Run"}),(0,t.jsx)("div",{className:"px-2 py-1 text-muted-foreground",style:{fontSize:"10px"},children:"Ship"})]}),(0,t.jsx)("div",{className:"px-2 py-1.5 text-muted-foreground",style:{fontSize:"9px"},children:"Install deps and run init."})]})},{label:"Mermaid",description:"Render flowcharts and diagrams from text.",render:()=>{let e="color-mix(in srgb, var(--primary) 10%, white)",n="color-mix(in srgb, var(--primary) 38%, white)",r="color-mix(in srgb, var(--primary) 45%, white)",i="color-mix(in srgb, var(--primary) 80%, black)";return(0,t.jsx)("div",{className:"flex items-center justify-center rounded-md border border-border-strong/50 bg-card px-2 py-2.5",children:(0,t.jsxs)("svg",{viewBox:"0 0 142 26",className:"w-full max-w-37.5","aria-hidden":"true",children:[(0,t.jsx)("title",{children:"Flowchart preview"}),(0,t.jsx)("rect",{x:"1",y:"5",width:"34",height:"16",rx:"3",fill:e,stroke:n}),(0,t.jsx)("text",{x:"18",y:"13",textAnchor:"middle",dominantBaseline:"central",fontSize:"7",fill:i,fontFamily:"ui-sans-serif, system-ui, sans-serif",children:"draft"}),(0,t.jsx)("line",{x1:"35",y1:"13",x2:"48",y2:"13",stroke:r}),(0,t.jsx)("polygon",{points:"48,13 45,11 45,15",fill:r}),(0,t.jsx)("polygon",{points:"71,1 93,13 71,25 49,13",fill:e,stroke:n}),(0,t.jsx)("text",{x:"71",y:"13",textAnchor:"middle",dominantBaseline:"central",fontSize:"7",fill:i,fontFamily:"ui-sans-serif, system-ui, sans-serif",children:"review"}),(0,t.jsx)("line",{x1:"93",y1:"13",x2:"106",y2:"13",stroke:r}),(0,t.jsx)("polygon",{points:"106,13 103,11 103,15",fill:r}),(0,t.jsx)("rect",{x:"107",y:"5",width:"34",height:"16",rx:"3",fill:e,stroke:n}),(0,t.jsx)("text",{x:"124",y:"13",textAnchor:"middle",dominantBaseline:"central",fontSize:"7",fill:i,fontFamily:"ui-sans-serif, system-ui, sans-serif",children:"ship"})]})})}},{label:"Image",description:"Drop in images with captions and resize controls.",render:()=>(0,t.jsx)("div",{className:"overflow-hidden rounded-md border",children:(0,t.jsx)(g.default,{src:"/marketing-assets/images/home/block-components/image-preview.png",alt:"",width:300,height:186,className:"block h-auto w-full"})})},{label:"Video",description:"Embed videos with playback controls inline.",render:()=>(0,t.jsxs)("div",{className:"relative overflow-hidden rounded-md border",children:[(0,t.jsx)(g.default,{src:"/marketing-assets/images/home/block-components/video-preview.png",alt:"",width:300,height:186,className:"block h-auto w-full"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"flex size-6 items-center justify-center rounded-full bg-card/90 shadow-sm",children:(0,t.jsx)(p.Play,{className:"size-3 fill-foreground text-foreground"})})})]})}];function C(){let e=[{heading:"Components",items:[{icon:d,label:"Callout"},{icon:r.ChevronRight,label:"Accordion"},{icon:c,label:"Tabs"},{icon:m,label:"Mermaid"}]},{heading:"Media",items:[{icon:a,label:"Image"},{icon:f,label:"Video"}]}
223],[n,i]=(0,b.useIsInView)(),o=(0,v.usePrefersReducedMotion)(),[s,l]=(0,y.useState)(0);(0,y.useEffect)(()=>{if(!i||o)return;let e=window.setInterval(()=>{l(e=>(e+1)%S.length)},2400);return()=>window.clearInterval(e)},[i,o]);let u=S[s].label,h=(0,y.useRef)({}),p=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let e=p.current,t=h.current[u];if(!e||!t)return;if(u===S[0].label)return void e.scrollTo({top:0,behavior:"smooth"});let n=t.offsetTop,r=n+t.offsetHeight,i=e.scrollTop,o=i+e.clientHeight;n-i<12?e.scrollTo({top:n-12,behavior:"smooth"}):r-o>-12&&e.scrollTo({top:r-e.clientHeight+12,behavior:"smooth"})},[u]),(0,t.jsx)("div",{ref:n,className:"flex w-full items-center justify-center [container-type:inline-size]",children:(0,t.jsx)("div",{className:"w-70 flex-none [transform-origin:center_center]",style:{transform:"scale(min(1, calc(100cqw / 280px)))"},children:(0,t.jsxs)("div",{className:"flex w-full items-start gap-2",children:[(0,t.jsx)("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded-xl bg-card shadow-sm",children:(0,t.jsx)("div",{ref:p,className:"relative max-h-37.5 overflow-y-auto p-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-2 pt-1.5 pb-1 font-semibold uppercase tracking-wide text-muted-foreground",style:{fontSize:"9px"},children:e.heading}),(0,t.jsx)("div",{className:"flex flex-col",children:e.items.map(({icon:e,label:n})=>{let r=n===u;return(0,t.jsxs)("div",{ref:e=>{h.current[n]=e},className:(0,w.cn)("flex items-center gap-2 rounded-md px-2 py-1 text-2xs",r?"bg-background text-foreground":"text-muted-foreground"),children:[(0,t.jsx)(e,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:n})]},n)})})]},e.heading))})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 rounded-xl bg-card p-2 shadow-sm",children:[(0,t.jsx)("div",{className:"relative flex min-h-32.5 items-center justify-center rounded-lg bg-background p-2.5",children:S.map((e,n)=>(0,t.jsx)("div",{className:"absolute inset-2.5 flex items-center justify-center transition-opacity duration-300 ease-out",style:{opacity:+(n===s)},"aria-hidden":n!==s,children:(0,t.jsx)("div",{className:"w-full",children:e.render()})},e.label))}),(0,t.jsx)("div",{className:"relative mt-1.5 min-h-6",children:S.map((e,n)=>(0,t.jsx)("p",{className:"absolute inset-0 px-0.5 leading-snug text-muted-foreground transition-opacity duration-300 ease-out",style:{fontSize:"9px",opacity:+(n===s)},"aria-hidden":n!==s,children:e.description},e.label))})]})]})})})}let A=[{Icon:n.BookOpen,widths:["w-3/4","w-1/2","w-2/3"]},{Icon:h,widths:["w-2/3","w-3/4","w-1/2"]},{Icon:u,widths:["w-1/2","w-2/3","w-3/5"]},{Icon:s,widths:["w-3/5","w-1/2","w-2/3"]}];function _(){let[e,n]=(0,b.useIsInView)(),r=(0,v.usePrefersReducedMotion)(),[i,o]=(0,y.useState)(1);return(0,y.useEffect)(()=>{if(!n||r)return;let e=window.setInterval(()=>{o(e=>(e+1)%A.length)},1800);return()=>window.clearInterval(e)},[n,r]),(0,t.jsx)("div",{ref:e,className:"grid w-full max-w-60 grid-cols-2 gap-2",children:A.map(({Icon:e,widths:n},r)=>{let o=r===i;return(0,t.jsxs)("div",{className:(0,w.cn)("relative flex flex-col gap-2 rounded-lg bg-card p-2.5","transition-[box-shadow] duration-500 ease-out","opacity-0 [animation:rich-fade-up_500ms_ease-out_forwards]",o&&"z-10"),style:{animationDelay:`${80*r}ms`,boxShadow:o?"0 0 0 1px color-mix(in srgb, var(--primary) 50%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--primary) 35%, transparent), var(--shadow-hairline-strong)":"var(--shadow-hairline)"},children:[(0,t.jsx)(e,{className:(0,w.cn)("size-3.5 transition-colors duration-500",o?"text-primary":"text-muted-foreground opacity-70")}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:n.map((e,n)=>(0,t.jsx)("div",{className:(0,w.cn)("h-1 rounded-full bg-muted-foreground/15",e)},n))})]},r)})})}function N({src:e,children:n}){return(0,t.jsxs)("div",{className:"flex w-full max-w-65 flex-col items-stretch",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-card px-2.5 py-2 shadow-sm",children:[(0,t.jsx)(i.Code2,{className:"size-3.5 shrink-0 text-primary"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground
223/70",children:e})]}),(0,t.jsx)("div",{className:"mx-auto h-7 w-px bg-border-strong"}),(0,t.jsx)("div",{className:"rounded-lg bg-card p-4 shadow-sm",children:n})]})}let O=[.62,-.41,.87,-.9,.23,-.68,.05,.94,-.27,.49,-.81,.36,-.06,.73,-.55,.18];function M({value:e}){return(0,t.jsx)("span",{className:"relative inline-block overflow-hidden align-baseline",style:{height:"1em",width:"1ch"},"aria-hidden":"true",children:(0,t.jsx)("span",{className:"absolute top-0 left-0 flex flex-col",style:{transform:`translateY(-${e}em)`,transition:"transform 550ms cubic-bezier(0.4, 0, 0.2, 1)"},children:[0,1,2,3,4,5,6,7,8,9].map(e=>(0,t.jsx)("span",{className:"block text-center",style:{height:"1em",lineHeight:"1em"},children:e},e))})})}function I({value:e}){let n=e.toFixed(2);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"sr-only",children:["$",n]}),(0,t.jsxs)("span",{className:"inline-flex items-baseline","aria-hidden":"true",children:[(0,t.jsx)("span",{children:"$"}),n.split("").map((e,n)=>"."===e?(0,t.jsx)("span",{children:"."},n):(0,t.jsx)(M,{value:parseInt(e,10)},n))]})]})}function D({stock:e}){let[n,r]=(0,b.useIsInView)(),i=e.price/(1+e.percent/100),o=function(e,t){let[n,r]=(0,y.useState)(e),i=(0,y.useRef)(0),o=(0,v.usePrefersReducedMotion)();return(0,y.useEffect)(()=>{if(!t||o)return;let n=window.setInterval(()=>{let t=.08*O[i.current%O.length];i.current+=1,r(n=>n+(e-n)*.35+t)},1400);return()=>window.clearInterval(n)},[e,.08,1400,t,o]),n}(e.price,r),s=(o/i-1)*100,a=s>
223=0,l=a?"text-primary":"text-rose-600 dark:text-rose-400";return(0,t.jsx)(N,{src:'<iframe src="ticker.app" />',children:(0,t.jsxs)("div",{ref:n,className:"flex flex-col gap-3.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col space-y-0.5",children:[(0,t.jsx)("span",{className:"font-bold leading-tight text-foreground",style:{fontSize:"14px"},children:e.symbol}),(0,t.jsx)("span",{className:"truncate leading-tight text-muted-foreground",style:{fontSize:"10px"},children:e.name})]}),(0,t.jsxs)("span",{className:(0,w.cn)("shrink-0 text-2xs font-medium leading-tight tabular-nums",l),children:[a?"+":"â",Math.abs(s).toFixed(2),"%"]})]}),(0,t.jsx)("div",{className:(0,w.cn)("font-mono text-2xl font-bold leading-none tabular-nums tracking-tight",l),children:(0,t.jsx)(I,{value:o})})]})})}let R={symbol:"INKP",name:"Inkeep, Inc.",price:147.85,percent:3.01};function z(){return(0,t.jsx)("div",{className:"flex w-full items-center justify-center [container-type:inline-size]",children:(0,t.jsx)("div",{className:"w-65 flex-none [transform-origin:center_center]",style:{transform:"scale(min(1, calc(100cqw / 260px)))"},children:(0,t.jsx)(D,{stock:R})})})}function L(){return(0,t.jsx)("style",{children:` 224 @keyframes rich-fade-up { 225 from { opacity: 0; transform: translateY(8px); } 226 to { opacity: 1; transform: translateY(0); } 227 } 228 `})}e.s(["RichEditing",0,function(){return(0,t.jsxs)(k.Section,{className:"container flex flex-col gap-12 lg:gap-16",children:[(0,t.jsx)(L,{}),(0,t.jsx)(x.SectionHeading,{tag:"The editor",description:"A Notion-like editor that's just markdown under the hood.",className:"max-w-2xl",children:"A canvas for your knowledge."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-y-12 lg:grid-cols-3 lg:grid-rows-(--rows) lg:gap-x-8 lg:gap-y-5",style:{"--rows":"auto auto"},children:[(0,t.jsx)(T,{title:"Rich elements",description:"Tables, images, code, diagrams, and more.",children:(0,t.jsx)(C,{})}),(0,t.jsx)(T,{title:"Embeddable HTML",description:"Drop-in apps, previews, and visualizations.",children:(0,t.jsx)(z,{})}),(0,t.jsx)(T,{title:"Templates",description:"Ready-made and customizable templates.",children:(0,t.jsx)(_,{})})]})]})}],931169)},528134,906508,961457,354173,910142,362494,e=>{"use strict";var t=e.i(959557),n=e.i(769127),r=e.i(918260);let i=(0,r.default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]),o=(0,r.default)("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]]),s=(0,r.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var a=e.i(924442),l=e.i(611821),c=e.i(359336),d=e.i(245157),u=e.i(357644),h=e.i(740935);function p(e){return(0,t.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",height:24,width:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9554 2.4189-2.1568 2.4189Z"})})}function f(e){return(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",height:24,width:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}function m(e){return(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",height:24,width:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})})}e.s(["DiscordIcon",0,p],906508),e.s(["GitHubIcon",0,f],961457),e.s(["XIcon",0,m],354173);var g=e.i(76403),y=e.i(973731),b=e.i(784528),v=e.i(295605),k=e.i(63290);let x=(0,r.default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594
2281.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,x],910142);var w=e.i(971393),E=e.i(583542);function T(e){var t=(0,c.usePathname)();if(t===E.LAUNCH_WEEK_ROUTE)return"down";let n=(0,E.latestRevealedDay)(e);if(null==n)return"forward";let r=e.days.find(e=>e.n===n);return!r||r.sealed?"forward":t===(0,u.blogPostRoute)(r.slug)?"arrived":"forward"}function S(){let[e,t]=(0,d.useState)(null);return(0,d.useEffect)(()=>{},[]),{config:e?(0,E.previewLaunchWeek)(e):E.LAUNCH_WEEK}}let C=()=>()=>{};function A(e){return(0,d.useSyncExternalStore)(C,()=>{let t;return!Number.isFinite(t=new Date(e.bannerEndsAt).getTime())||Date.now()>=t},()=>!1)}e.s(["LAUNCH_WEEK_PREVIEW_EVENT",0,"lw-preview","useLaunchWeekBannerExpired",0,A,"useLaunchWeekBannerGlyph",0,T,"useLaunchWeekBannerPreview",0,S],362494);var _=e.i(216123);function N({children:n,protectRef:r}){let i=(0,_.useElementCaptureCapable)(),[o,s]=(0,d.useState)(null);return((0,d.useEffect)(()=>{if(!i||o)return;let t=!1;return e.A(631384).then(e=>{t||s(()=>e.BannerAsciifyImpl)}).catch(e=>{console.warn("launch-week: banner effect chunk failed to load",e)}),()=>{t=!0}},[i,o]),i&&o)?(0,t.jsx)(o,{protectRef:r,children:n}):(0,t.jsx)(t.Fragment,{children:n})}var O=e.i(276398);function M({position:e}){return(0,t.jsx)("div",{"aria-hidden":"true",style:{"--glow-x":e},className:"absolute top-1/2 left-(--glow-x) -z-10 -translate-y-1/2 transform-gpu blur-2xl",children:(0,t.jsx)("div",{className:"aspect-577/310 w-144 bg-linear-to-r from-crystal-blue to-azure-blue opacity-30",style:{clipPath:"polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"}})})}function I({payload:e,glyph:n,arrowRef:r}){let i=null!=r;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,O.cn)("truncate",i&&"invisible"),children:"Launch week"}),(0,t.jsx)("span",{"aria-hidden":"true",className:(0,O.cn)("shrink-0 opacity-50",i&&"invisible"),children:"//"}),(0,t.jsx)("span",{className:(0,O.cn)("shrink-0 text-primary-strong tabular-nums",i&&"invisible"),children:e}),i?(0,t.jsx)("span",{ref:r,"data-launch-week-banner-arrow":"",className:"relative flex size-3.5 shrink-0 items-center justify-center text-primary transition-colors duration-150 ease-out group-hover:text-primary-strong",children:(0,t.jsx)("span",{"data-launch-week-banner-arrow-response":"",className:"flex size-full items-center justify-center motion-safe:transition-[scale] motion-safe:duration-150 motion-safe:ease-out motion-safe:group-hover:scale-108",children:(0,t.jsxs)("span",{"data-launch-week-banner-arrow-rotation":"",className:"relative flex size-full items-center justify-center",children:[(0,t.jsx)(k.ArrowRight,{"aria-hidden":"true","data-launch-week-banner-arrow-glyph":"",strokeWidth:2.5,className:(0,O.cn)("absolute size-3.5 transition-[opacity,scale,rotate] duration-300 ease-out motion-reduce:transition-none","down"===n&&"rotate-90 scale-100 opacity-100","forward"===n&&"rotate-0 scale-100 opacity-100","arrived"===n&&"rotate-45 scale-75 opacity-0")}),(0,t.jsx)(x,{"aria-hidden":"true","data-launch-week-banner-sparkle-glyph":"",strokeWidth:2.5,className:(0,O.cn)("absolute size-3.5 transition-[opacity,scale,rotate] duration-300 ease-out motion-reduce:transition-none","arrived"===n?"scale-100 rotate-0 opacity-100":"-rotate-45 scale-75 opacity-0")})]})})}):(0,t.jsx)("span",{"aria-hidden":"true","data-launch-week-banner-arrow-slot":"",className:"size-3.5 shrink-0"})]})}let D="bg-warm-subtle transition-colors group-hover:bg-warm";function R({payload:e,ariaLabel:n,glyph:r="forward",onClick:i}){let o=(0,d.useRef)(null),s=(0,t.jsxs)("span",{"data-launch-week-banner-capture":"","aria-hidden":"true",className:(0,O.cn)("relative isolate flex h-full w-full overflow-clip items-center justify-center gap-x-2.5 px-4",D),children:[(0,t.jsx)(M,{position:"max(-7rem, calc(50% - 52rem))"}),(0,t.jsx)(M,{position:"max(45rem, calc(50% + 8rem))"}),(0,t.jsx)(I,{payload:e,glyph:r})]});return(0,t.jsxs)(l.default,{href:E.LAUNCH_WEEK_ROUTE,"aria-label":n,onClick:i,className:(0,O.cn)("group relative isolate block h-10 w-full overflow-hidden","border-b border-border font-mono text-xs text-foreground uppercase tracking-wider","focus-visible:outline-none"),children:[(0,t.jsxs)("span",{"aria-hidden":"true","data-launch-week-banner-underlay":"",className:(0,O.cn)("absolute inset-0 isolate flex items-center justify-center gap-x-2.5 overflow-clip px-4",D),children:[(0,t.jsx)(M,{position:"max(-7rem, calc(50% - 52rem))"}),(0,t.jsx)(M,{position:"max(45rem, calc(50% + 8rem))"}),(0,t.jsx)(I,{payload:e,glyph:r})]}),(0,t.jsx)(N,{protectRef:o,children:s}),(0,t.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center gap-x-2.5 px-4",children:(0,t.jsx)(I,{payload:e,glyph:r,arrowRef:o})}),(0,t.jsx)("span",{"aria-hidden":"true","data-launch-week-banner-focus":"",className:"pointer-events-none absolute inset-0 z-20 ring-inset group-focus-visible:ring-2 group-focus-visible:ring-primary"})]})}function z(){let{config:e}=S(),n=A(e),r=T(e),i=(0,E.launchWeekPhase)(e),o="live"===i?(0,E.latestRevealedDay)(e):null;if(n)return null;let s="live"===i&&null!=o?`Day ${o}`:e.rangeLabel;return(0,t.jsx)(R,{payload:s,ariaLabel:function(e,t,n){switch(e){case"live":return null!=t?`Launch week, day ${t} is live. See the week.`:`Launch week, ${n}. See what's coming.`;case"complete":return"Launch week recap: all five updates are open.";
228case"teaser":return`Launch week, ${n}. See what's coming.`;default:return e}}(i,o,e.rangeLabel),glyph:r,onClick:()=>{w.default.capture("banner_launch_week_clicked",{banner_state:i,banner_variant:"a",...null!=o?{banner_day:String(o)}:{}})}})}let L={href:"/docs",label:"Docs",external:!1,icon:n.BookOpen,desktopIconHidden:!0},P={href:u.BLOG_ROUTE,label:"Blog",external:!1,icon:o,desktopIconHidden:!0},j=[{href:h.X_URL,label:"X (Twitter)",external:!0,icon:m,iconOnly:!0},{href:h.DISCORD_URL,label:"Discord",external:!0,icon:p,iconOnly:!0}],$={href:h.GITHUB_URL,label:"GitHub",external:!0,icon:f,showStars:!0},F=[L,P,...j,$],B=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}),H=new Intl.NumberFormat("en-US");function U({link:e,surface:n}){let r=e.icon,i=!!r&&("mobile"===n||!e.desktopIconHidden),o="mobile"===n||!e.iconOnly;return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(r,{className:"size-4 shrink-0","aria-hidden":"true"}):null,o?e.label:null]})}function V({link:e,className:n,surface:r,onSelect:i}){let o="desktop"===r&&e.iconOnly?e.label:void 0;return e.external?(0,t.jsx)("a",{href:e.href,target:"_blank",rel:"noreferrer","aria-label":o,onClick:i,className:n,children:(0,t.jsx)(U,{link:e,surface:r})}):(0,t.jsx)(l.default,{href:e.href,"aria-label":o,onClick:i,className:n,children:(0,t.jsx)(U,{link:e,surface:r})})}function q({stars:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s,{className:"size-3.5 shrink-0 text-golden-sun-300 fill-golden-sun-300","aria-hidden":"true"}),B.format(e)]})}function G({link:e,stars:n,variant:r,onSelect:i}){let o=e.icon,s=null!=n?`${H.format(n)} GitHub stars`:void 0;return"badge"===r?(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noreferrer",title:s,"aria-label":e.label,onClick:i,className:"inline-flex h-9 items-center gap-1.5 rounded-full border px-2.5 tabular-nums text-muted-foreground transition-colors hover:bg-card hover:text-foreground text-sm",children:[o?(0,t.jsx)(o,{className:"size-4 shrink-0","aria-hidden":"true"}):null,null!=n?(0,t.jsx)(q,{stars:n}):null]}):"row"===r?(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noreferrer",title:s,onClick:i,className:"flex items-center justify-between gap-2 rounded-md px-3 py-2 text-foreground transition-colors hover:bg-card",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[o?(0,t.jsx)(o,{className:"size-4 shrink-0","aria-hidden":"true"}):null,e.label]}),null!=n?(0,t.jsx)("span",{className:"flex items-center gap-1.5 tabular-nums text-muted-foreground",children:(0,t.jsx)(q,{stars:n})}):null]}):(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noreferrer",className:"inline-flex items-stretch overflow-hidden rounded-full border text-muted-foreground hover:text-foreground transition-colors hover:bg-card h-9",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 px-2.5 py-1.5",children:[o?(0,t.jsx)(o,{className:"size-4 shrink-0","aria-hidden":"true"}):null,e.label]}),null!=n?(0,t.jsx)("span",{title:s,className:"flex items-center gap-1.5 border-l px-2.5 py-1.5 tabular-nums",children:(0,t.jsx)(q,{stars:n})}):null]})}e.s(["SiteNav",0,function({stars:e}){let n="/download"===(0,c.usePathname)(),[r,o]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{let e=window.matchMedia("(min-width: 768px)"),t=()=>{e.matches&&o(!1)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,t.jsxs)("header",{className:"sticky top-0 z-50 bg-surface/80 backdrop-blur supports-backdrop-filter:bg-surface/70",children:[(0,t.jsx)(z,{}),(0,t.jsxs)("div",{className:"container mx-auto flex h-16 items-center justify-between px-6",children:[(0,t.jsx)(g.LogoContextMenu,{children:(0,t.jsx)(l.default,{href:"/","aria-label":"OpenKnowledge home",className:"inline-flex items-center",children:(0,t.jsx)(y.OkWordmark,{"aria-label":"OpenKnowledge",className:"h-8 w-auto text-foreground"})})}),(0,t.jsxs)("nav",{"aria-label":"Secondary",className:"hidden items-center gap-6 text-sm text-muted-foreground md:flex uppercase font-mono",children:[(0,t.jsx)(V,{link:L,surface:"desktop",className:"inline-flex items-center gap-1.5 transition-colors hover:text-foreground"}),(0,t.jsx)(V,{link:P,surface:"desktop",className:"inline-flex items-center gap-1.5 transition-colors hover:text-foreground"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"h-5 w-px bg-border-strong"}),j.map(e=>(0,t.jsx)(V,{link:e,surface:"desktop",className:"inline-flex items-center gap-1.5 transition-colors hover:text-foreground"},e.href)),(0,t.jsx)("span",{"aria-hidden":"true",className:"h-5 w-px bg-border-strong"}),(0,t.jsx)(G,{link:$,stars:e,variant:"pill"}),(0,t.jsx)(v.DownloadOsButton,{cta:"landing-nav",size:"sm",shortLabel:!0,showIcon:!1,assumeDefaultArchitecture:n})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 md:hidden",children:[(0,t.jsx)(G,{link:$,stars:e,variant:"badge"}),(0,t.jsxs)(b.Sheet,{open:r,onOpenChange:o,children:[(0,t.jsx)(b.SheetTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground opacity-60 transition-colors hover:bg-card hover:text-foreground","aria-label":"Open menu",children:(0,t.jsx)(i,{className:"size-5","aria-hidden":"true"})})}),(0,t.jsxs)(b.SheetContent,{side:"bottom","aria-describedby":void 0,showCloseButton:!1,className:"border-t bg-surface md:hidden z-1300",children:[(0,t.jsx)(b.SheetTitle,{className:"sr-only",children:"Site navigation"}),(0,t.jsxs)("nav",{"aria-label":"Mobile",className:"container mx-auto flex flex-col gap-1 px-6 pt-4 pb-6 text-base uppercase font-mono overscroll-contain",children:[(0,t.jsx)(b.SheetClose,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"Close menu",className:"mb-1 inline-flex h-10 w-10 items-center justify-center self-end rounded-md text-muted-foreground opacity-60 transition-colors hover:bg-card hover:text-foreground",children:(0,t.jsx)(a.X,{className:"size-5","aria-hidden":"true"})})}),F.map(n=>n.showStars?(0,t.jsx)(G,{link:n,stars:e,variant:"row",onSelect:()=>o(!1)},n.href):(0,t.jsx)(V,{link:n,surface:"mobile",onSelect:()=>o(!1),className:"flex items-center gap-2 rounded-md px-3 py-2 text-foreground transition-colors hover:bg-card"},n.href)),(0,t.jsx)(v.DownloadOsButton,{cta:"landing-nav-mobile",size:"md",assumeDefaultArchitecture:n,onNavigate:()=>o(!1)}),n?null:(0,t.jsx)(l.default,{href:"/download",onClick:()=>o(!1),className:"mt-1 self-center px-3 py-2 font-mono text-sm text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline",children:"All platforms"})]})]})]})]})]})]})}],528134)},448791,e=>{"use strict";var t=e.i(245157);e.s(["useIsInView",0,function(e="64px"){let n=(0,t.useRef)(null),[r,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let t=n.current;if(!t||"u"<typeof IntersectionObserver)return;let r=new IntersectionObserver(([e])=>i(e.isIntersecting),{rootMargin:e,threshold:0});return r.observe(t),()=>r.disconnect()},[e]),[n,r]}])}]);
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.