@octane-xplat/lexical 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -7
- package/dist/macos/browser.js +1 -1
- package/dist/native/index3.js +38 -21
- package/dist/native/octane-client-build.json +1 -1
- package/dist/web/index2.js +24 -21
- package/dist/web/octane-client-build.json +1 -1
- package/package.json +7 -5
- package/src/LexicalEditor.mobile.test.ts +229 -0
- package/src/LexicalEditor.tsrx +52 -20
- package/src/LexicalEditor.web.test.tsrx +111 -0
- package/src/LexicalEditor.web.tsrx +19 -12
- package/src/types.ts +32 -6
package/dist/macos/browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by build-browser.mjs; local WebKit editor document.
|
|
2
|
-
export default "<!doctype html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; script-src 'nonce-xplat-editor'; style-src 'unsafe-inline'; img-src data:\"><style>html,body{margin:0;height:100%;font:14px system-ui} .ProseMirror,.vx-lexical-input{min-height:100px;padding:8px;outline:none} .ProseMirror:empty:before{content:attr(data-placeholder);opacity:.5} </style></head><body><div id=\"root\"></div><script nonce=\"xplat-editor\">(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=16,r=32,i=Reflect.apply,a=Symbol.for,o=null;try{let e=i(Function.prototype.toString,a,[]);typeof a==`function`&&typeof e==`string`&&/^function for\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}$/.test(e)&&(o=a)}catch{}var s=[];function c(e){return s[e]??={prefix:``,tag:``,size:0,value:``,path:``,slots:null}}function l(e,t,a,s=!1){let l=e.length,u=a?`@octane:universal-hook:`:`@octane:hook:`,d=l<n;for(let n=0;n<=l;n++){let f=n===l,p=f?t:e[n];d&&=p===null||typeof p!=`object`&&typeof p!=`function`;let m,h,g,_;if(!a&&f&&t===void 0)m=``,h=0,g=``;else if(!a)m=typeof p==`number`?`n`:s&&typeof p==`string`?`t`:`s`,g=typeof p==`number`?String(p):s&&typeof p==`string`?p:p.description??``,h=g.length,(typeof g!=`string`||typeof h!=`number`)&&(_=m+h+`:`+g,d=!1);else{m=typeof p==`symbol`?`s`:`v`,h=typeof p==`symbol`?p.description?.length??0:String(p).length;let e=typeof h==`number`?void 0:`${m}${h}:`;g=typeof p==`symbol`?p.description??``:String(p),(e!==void 0||typeof g!=`string`)&&(_=`${e??`${m}${h}:`}${g}`,d=!1)}if(f){let e=Symbol,n=e.for;if(!d||n!==o){let t=u+(_??(m===``?``:m+h+`:`+g));return n===o?n(t):i(n,e,[t])}let a=c(l),s=a.slots??=new Map,f=s.get(t);if(f!==void 0&&f.prefix===u&&f.tag===m&&f.size===h&&f.value===g)return f.resolved;let p=n(u+(m===``?``:m+h+`:`+g));return f===void 0?s.size<r&&s.set(t,{prefix:u,tag:m,size:h,value:g,resolved:p}):(f.prefix=u,f.tag=m,f.size=h,f.value=g,f.resolved=p),p}if(!d){u+=_??m+h+`:`+g;continue}let v=c(n);(v.prefix!==u||v.tag!==m||v.size!==h||v.value!==g)&&(v.prefix=u,v.tag=m,v.size=h,v.value=g,v.path=u+m+h+`:`+g),u=v.path}throw Error(`Unreachable hook path`)}var u=new Set;for(let e of`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.boxFlex.boxFlexGroup.boxOrdinalGroup.columnCount.columns.flex.flexGrow.flexPositive.flexShrink.flexNegative.flexOrder.gridArea.gridRow.gridRowEnd.gridRowSpan.gridRowStart.gridColumn.gridColumnEnd.gridColumnSpan.gridColumnStart.fontWeight.lineClamp.lineHeight.opacity.order.orphans.scale.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth`.split(`.`)){let t=e.toLowerCase();u.add(t),u.add(`webkit`+t),u.add(`ms`+t),u.add(`moz`+t),u.add(`o`+t)}var d=new Map;function f(e){let t=d.get(e);if(t!==void 0)return t;let n=u.has(e.replaceAll(`-`,``).toLowerCase());return d.set(e,n),n}function p(e,t){return typeof t==`number`&&t!==0&&e.charCodeAt(0)!==45&&!f(e)?t+`px`:typeof t==`string`?t.trim():``+t}function m(e){if(e===`cssFloat`)return`float`;if(e.charCodeAt(0)===45)return e;let t=!1;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=65&&r<=90){t=!0;break}}if(!t)return e;let n=``;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);n+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[t]}return n.charCodeAt(0)===109&&n.charCodeAt(1)===115&&n.charCodeAt(2)===45&&(n=`-`+n),n}function h(e){if(typeof e==`string`)return e;if(typeof e!=`object`)return typeof e==`number`&&e?``+e:``;if(e===null)return``;let t=``;if(Array.isArray(e))for(let n=0;n<e.length;n++){let r=e[n];if(r){let e=h(r);e&&(t=t?t+` `+e:e)}}else for(let n in e)e[n]&&(t=t?t+` `+n:n);return t}var g=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i,_=`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`,v=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function y(e){let t=e.charCodeAt(0);return t>32&&t<127&&t!==74&&t!==106?e:g.test(e)?_:e}function b(e,t){return e=e===void 0?void 0:e.toLowerCase(),e!==void 0&&e.includes(`-`)&&!v.has(e)?!1:(t=t.toLowerCase(),t===`src`||t===`href`||t===`action`||t===`formaction`||t===`xlink:href`||t===`xlinkhref`||t===`data`&&e===`object`)}function x(e,t,n){return b(e,t)?y(n):n}var S=`data-octane-input`,C=`data-octane-signal-control`,ee=`[b;`,te=`;b;`,ne=`[f0`+te,re=`[f1`+te,ie=ne.length,ae=ee.length,oe=`;root`;function se(e){let t=e.startsWith(ne)||e.startsWith(re);if(!t&&!e.startsWith(ee))return!1;let n=t?ie:ae,r=e.indexOf(`;`,n);if(r<=n||r===e.length-1)return!1;if(t)return e.indexOf(`;`,r+1)===-1;if(e.length-r===5&&e.endsWith(oe))return!0;let i=e.indexOf(`;`,r+1);if(i<=r+1||i===e.length-1)return!1;let a=i+1;if(e.length===a+1){let t=e.charCodeAt(a);return t===116||t===118||t===115||t===111||t>=48&&t<=57}if(e.charCodeAt(a)===107&&e.charCodeAt(a+1)===59)return(e.charCodeAt(a+2)===115||e.charCodeAt(a+2)===110)&&e.charCodeAt(a+3)===58&&e.length>a+4;if(e.length===a+2&&e.endsWith(`-1`))return!0;if(e.charCodeAt(a)<49||e.charCodeAt(a)>57)return!1;for(let t=a+1;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return!0}var ce=`data-oct-b`;function le(e,t){let n=t?`[`:`]`;if(e===n||t&&(e===`[f0`||e===`[f1`)||t&&(e.startsWith(ee)||e.startsWith(`[f`))&&se(e))return 1;if(e.length<2||e.charCodeAt(0)!==n.charCodeAt(0))return 0;let r=e.charCodeAt(1);if(r<49||r>57)return 0;let i=r-48;for(let t=2;t<e.length;t++){let n=e.charCodeAt(t)-48;if(n<0||n>9||(i=i*10+n,!Number.isSafeInteger(i)))return 0}return i>=2?i:0}function ue(e){return e!==null&&e.nodeType===8&&le(e.data,!0)!==0}function de(e){if(!ue(e))return null;let t=0,n=e.nextSibling;for(;n!==null;){if(n.nodeType===8){let e=n.data;if(le(e,!0)!==0)t++;else if(le(e,!1)!==0){if(t===0)return n;t--}}n=n.nextSibling}return null}function fe(e){return e!==null&&/^os[a-zA-Z0-9_-]+-[0-9a-z]+$/.test(e)}function pe(e){if(e===null)return null;let t=e.lastIndexOf(`-`);if(t<=2||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!fe(n)||!/^(?:0|[1-9a-z][0-9a-z]*)$/.test(r)?null:n}function me(e,t){if(e.localName!==`template`)return!1;let n=pe(e.getAttribute(ce));if(n===null||t!==void 0&&n!==t)return!1;let r=e.previousSibling;return ue(r)&&r.nextSibling===e&&de(r)!==null}var he=`https://octanejs.dev/errors/`,ge=/[\\uD800-\\uDFFF]/gu;function _e(e){return encodeURIComponent(String(e).replace(ge,`�`))}function ve(e,t){let n=he+e;for(let e=0;e<t.length;e++)n+=`${e===0?`?`:`&`}args[]=${_e(t[e])}`;return`Minified Octane error #${e}; visit ${n} for the full message or use a development build for full errors and additional helpful warnings.`}function w(e,...t){return ve(e,t)}var ye=class extends Error{constructor(e){super(e),this.name=`SignalSerializationError`}};function be(){throw new ye(`Signal request arguments and seeds require acyclic plain data: undefined, null, booleans, finite numbers, strings, dense arrays, and plain objects with enumerable string data properties.`)}function xe(e,t=new Set){if(e==null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:be();if(typeof e!=`object`||t.has(e))return be();let n=Object.getPrototypeOf(e);if(!Array.isArray(e)&&n!==Object.prototype&&n!==null)return be();t.add(e);try{let n=Reflect.ownKeys(e);if(Array.isArray(e)){if(n.length!==e.length+1)return be();let r=[];for(let n=0;n<e.length;n++){let i=Object.getOwnPropertyDescriptor(e,String(n));if(!i||!i.enumerable||!(`value`in i))return be();r.push(xe(i.value,t))}return Object.freeze(r)}if(n.some(e=>typeof e!=`string`))return be();let r={};for(let i of n.sort()){let n=Object.getOwnPropertyDescriptor(e,i);if(!n.enumerable||!(`value`in n))return be();Object.defineProperty(r,i,{value:xe(n.value,t),enumerable:!0})}return Object.freeze(r)}finally{t.delete(e)}}function Se(e){if(!Array.isArray(e))return be();let[t,n]=e;switch(t){case`undefined`:return e.length===1?void 0:be();case`null`:return e.length===1?null:be();case`boolean`:return e.length!==2||typeof n!=`boolean`?be():n;case`number`:return e.length===2?n===`-0`?-0:typeof n!=`number`||!Number.isFinite(n)||Object.is(n,-0)?be():n:be();case`string`:return e.length!==2||typeof n!=`string`?be():n;case`array`:return e.length!==2||!Array.isArray(n)?be():Object.freeze(n.map(e=>Se(e)));case`object`:{if(e.length!==2||!Array.isArray(n))return be();let t={},r;for(let e of n){if(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`||r!==void 0&&e[0]<=r)return be();r=e[0],Object.defineProperty(t,e[0],{value:Se(e[1]),enumerable:!0})}return Object.freeze(t)}default:return be()}}var Ce=`oct-native-fresh:`;function we(e){return(e.read??`value`)+`:`+e.key}function Te(e){return JSON.stringify(xe({...e,read:e.read??`value`}))}var Ee=new WeakMap;function De(e,t){let n=Ee.get(e);if(n!==void 0){if(t!==void 0&&n.seed.scopeKey!==t)throw Error(w(170));return n}let r=xe(e);if(typeof r!=`object`||!r||r.version!==1||typeof r.scopeKey!=`string`||!r.scopeKey.trim()||t!==void 0&&r.scopeKey!==t||!Array.isArray(r.entries))throw Error(w(170));let i=new Map,a=new Map;for(let e of r.entries){let t=e?.read??`value`;if(typeof e!=`object`||!e||typeof e.key!=`string`||!e.key.trim()||![`signal`,`derived`,`async`].includes(e.kind)||![`value`,`latest`,`snapshot`].includes(t)||typeof e.complete!=`boolean`||!Array.isArray(e.value)||e.available!==void 0&&(t!==`latest`||typeof e.available!=`boolean`)||e.refreshing!==void 0&&typeof e.refreshing!=`boolean`||e.connection!==void 0&&![`none`,`connecting`,`open`,`closed`].includes(e.connection)||i.has(we(e)))throw Error(w(171));if(e.available===!1){if(e.complete||e.request!==void 0||e.value.length!==1||e.value[0]!==`undefined`)throw Error(w(172))}else if(e.kind===`async`){let t=e.request;if(typeof t!=`object`||!t||typeof t.queryKey!=`string`||!t.queryKey.trim()||![`promise`,`stream`].includes(t.kind)||!Array.isArray(t.argument))throw Error(w(173));Se(t.argument)}else if(e.request!==void 0)throw Error(w(174));Se(e.value);let n=we(e);i.set(n,e),a.set(n,Te(e))}let o={seed:r,entries:i,signatures:a};return Ee.set(r,o),o}function Oe(e){return ke(JSON.parse(e))}function ke(e){if(typeof e!=`object`||!e||e.version!==1&&e.version!==2||!Array.isArray(e.scopes))throw Error(w(181));let t=e,n=new Set;for(let e of t.scopes){if(typeof e!=`object`||!e||e.version!==1||typeof e.scopeKey!=`string`||e.scopeKey.length===0||!Array.isArray(e.entries)||n.has(e.scopeKey))throw Error(w(182));n.add(e.scopeKey)}if(t.version===2){let e=t.initialDocument;if(typeof e!=`object`||!e||typeof e.scopeKey!=`string`||!e.scopeKey.trim()||!Array.isArray(e.entries)||e.entries.length===0)throw Error(w(183));let n=new Set;for(let t of e.entries){if(typeof t!=`object`||!t||typeof t.key!=`string`||!t.key.trim()||![`value`,`latest`,`snapshot`].includes(t.read)||n.has(we(t)))throw Error(w(184));n.add(we(t))}}return t}function Ae(e,t){if(e.version===1)return e;if(ke(e),t===void 0)throw Error(w(185));let n=e.initialDocument,r=De(t,n.scopeKey),i=new Map;for(let e of n.entries){let t=we(e),n=r.entries.get(t);if(n===void 0||i.has(t))throw Error(w(186));i.set(t,n)}for(let t of e.scopes)if(t.scopeKey===n.scopeKey)for(let e of t.entries){let t=we(e);if(i.has(t))throw Error(w(187));i.set(t,e)}return{version:1,scopes:[...e.scopes.filter(e=>e.scopeKey!==n.scopeKey),{version:1,scopeKey:n.scopeKey,entries:Array.from(i.values())}]}}function je(e,t){let n=Ae(e,t),r=new Map(n.scopes.map(e=>[e.scopeKey,e])),i=new Map,a=new Map,o=!1;return{resolve(e){if(o)return;let t=r.get(e.scopeKey);if(t===void 0)return;let n=a.get(e.scopeKey);if(n!==void 0&&n!==e)throw Error(w(188,e.scopeKey));let s=i.get(e);return s===void 0&&(s=e.beginAdoption(t),a.set(e.scopeKey,e),i.set(e,s)),s},release(){if(o)return;o=!0;let e,t=!1;try{for(let n of i.values())try{n.release()}catch(n){t||(e=n),t=!0}}finally{i.clear(),a.clear(),r.clear()}if(t)throw e}}}function Me(e){return`Minified Octane error #`+e+`; visit https://octanejs.dev/errors/`+e+` for the full message or use a development build for full errors and additional helpful warnings.`}var Ne,Pe=null,Fe,Ie;function Le(){return Ne===void 0?Pe??Fe?.()??null:Ne.current()??Pe}function Re(){return Ne?.current()??Pe}function ze(e){if(typeof e!=`function`)throw TypeError(Me(190));let t=Fe;return Fe=e,()=>{Fe===e&&(Fe=t)}}function Be(e,t){if(typeof t!=`function`)throw TypeError(Me(191));if(Ne)return Ne.run(e,t);let n=Pe;Pe=e;try{return t()}finally{Pe=n}}function Ve(e){Ie?.(e)}var He=Symbol(`octane.transitionConsumer`),Ue;function We(e){let t=Ue;return Ue=e,t}var Ge=null,Ke=class extends Error{scopeKey;nodeKey;read;constructor(e,t,n=`value`){super(w(194,n,e,t)),this.name=`NativeAdoptionMiss`,this.scopeKey=e,this.nodeKey=t,this.read=n}};function qe(e){let t=Ge;return Ge=e,t}var Je=null;function Ye(){let e=Je;return e?.startBatch(),e}function Xe(e){e?.endBatch()}function Ze(e){let t=Ye();try{return e()}finally{Xe(t)}}var Qe=new WeakMap;function $e(e){e.owner=void 0}function et(e,t,n){let r=Qe.get(e),i=r?.get(t)??0,a=n?2:1;return(i&a)!==0&&((i&~a)===0?r.delete(t):r.set(t,i&~a),!0)}function tt(e){Qe.delete(e)}var nt=globalThis[Symbol.for(`octane.contextEpoch`)]??={value:0};function rt(){return nt.value}function it(){nt.value++}var at=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),ot=new Set([`allowfullscreen`,`async`,`autoplay`,`controls`,`credentialless`,`default`,`defer`,`disabled`,`disablepictureinpicture`,`disableremoteplayback`,`formnovalidate`,`hidden`,`inert`,`itemscope`,`loop`,`nomodule`,`novalidate`,`open`,`playsinline`,`readonly`,`required`,`reversed`,`scoped`,`seamless`]),st=new Set([`size`,`cols`,`rows`,`span`]),ct=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.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.filter.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),lt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`],[`xlinkActuate`,`xlink:actuate`],[`xlinkArcrole`,`xlink:arcrole`],[`xlinkHref`,`xlink:href`],[`xlinkRole`,`xlink:role`],[`xlinkShow`,`xlink:show`],[`xlinkTitle`,`xlink:title`],[`xlinkType`,`xlink:type`],[`xmlBase`,`xml:base`],[`xmlLang`,`xml:lang`],[`xmlSpace`,`xml:space`],[`tabIndex`,`tabindex`]]);function ut(e){switch(e.length){case 10:return e.toLowerCase()===`spellcheck`;case 9:return e.toLowerCase()===`draggable`;case 15:return e.toLowerCase()===`contenteditable`}return!1}var dt=`oct-suspense:`,ft=`data-octane-suspense-seeds`,pt=`data-octane-suspense-signals`,mt=Symbol.for(`octane.external-hydration-promise`),ht=Symbol.for(`octane.hydration-range-boundary`),gt=`oct-seed:`,_t=at,vt=ot,yt=st,bt=/^[^\\s\"'>\\/=\\u0000-\\u001F]+$/,xt=ct,St=lt,Ct=ut,wt=p,Tt=`Abort AnimationEnd AnimationIteration AnimationStart AuxClick BeforeInput BeforeToggle Blur Cancel CanPlay CanPlayThrough Change Click Close CompositionEnd CompositionStart CompositionUpdate ContextMenu Copy Cut DoubleClick Drag DragEnd DragEnter DragExit DragLeave DragOver DragStart Drop DurationChange Emptied Encrypted Ended Error Focus GotPointerCapture Input Invalid KeyDown KeyPress KeyUp Load LoadedData LoadedMetadata LoadStart LostPointerCapture MouseDown MouseEnter MouseLeave MouseMove MouseOut MouseOver MouseUp Paste Pause Play Playing PointerCancel PointerDown PointerEnter PointerLeave PointerMove PointerOut PointerOver PointerUp Progress RateChange Reset Resize Scroll ScrollEnd Seeked Seeking Select Stalled Submit Suspend TimeUpdate Toggle TouchCancel TouchEnd TouchMove TouchStart TransitionCancel TransitionEnd TransitionRun TransitionStart VolumeChange Waiting Wheel`,Et;function Dt(e){if(Et===void 0){Et=new Set;for(let e of Tt.split(` `))Et.add(`on`+e),Et.add(`on`+e+`Capture`)}return Et.has(e)}var Ot=Object.prototype.hasOwnProperty;function kt(e,t){let n=e?.defaultProps;if(n!=null)for(let e in n)t[e]===void 0&&(t[e]=n[e])}function At(e){if(typeof e!=`object`||!e)return null;let t=typeof Symbol==`function`&&e[Symbol.iterator]||e[`@@iterator`];return typeof t==`function`?t:null}var jt=`__octaneEarlyHydrationIntents`,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakSet;function Lt(e){return typeof e==`object`&&!!e&&`documentOwner`in e}function Rt(e){return Lt(e)?e.instanceOwner:e}function zt(e,t,n){return JSON.stringify([e,t,n])}function Bt(e,t){Mt.set(Rt(e),t),Lt(e)&&Mt.set(e.documentOwner,t)}function Vt(e){let t=e.getAttribute(C);if(t===null)return null;try{let e=JSON.parse(t);if(!Array.isArray(e)||e.length!==3||e[0]!==1||typeof e[1]!=`string`||!Array.isArray(e[2]))return null;let n=[];for(let t of e[2]){if(!Array.isArray(t)||t.length!==3||typeof t[0]!=`string`||typeof t[1]!=`string`||t[2]!==`value`&&t[2]!==`checked`)return null;n.push(t)}return{ownerKey:e[1],bindings:n}}catch{return null}}function Ht(e,t){return t===`checked`?e.checked:e.localName===`select`&&e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value}function Ut(e,t){let n=Vt(e);if(n!==null){let r=Nt.get(e.ownerDocument);r===void 0&&Nt.set(e.ownerDocument,r=new Map);for(let[i,a,o]of n.bindings){let s=zt(n.ownerKey,i,a),c=r.get(s);(It.has(e.ownerDocument)||c===void 0||t>=c.revision)&&r.set(s,{revision:t,value:Ht(e,o)})}}let r=Pt.get(e);if(r!==void 0)for(let[t,n]of r)n(Ht(e,t))}function Wt(e,t,n){let r=Pt.get(e);return r===void 0&&Pt.set(e,r=new Map),r.set(t,n),()=>{r.get(t)===n&&(r.delete(t),r.size===0&&Pt.delete(e))}}function Gt(e){return Ft.get(e)??0}function Kt(e){Ft.delete(e)}function qt(e){It.add(e)}function Jt(e,t){It.has(e.ownerDocument)||(Ft.set(e,t),Ut(e,t))}if(typeof globalThis<`u`){let e=globalThis;e.__octanePublishSignalControl=Jt;let t=e.__octaneEarlySignalControls;if(t!==void 0){t.p=Jt;let e=t.q.splice(0);for(let[t,n]of e)Jt(t,n)}}var Yt=new WeakSet;function Xt([e,t,n,r,i,a,,,o],s){return!o&&e.target===t&&t.isConnected&&n.isConnected&&t.ownerDocument===s&&n.ownerDocument===s&&t.closest(`[data-octane-hydrate-independent]`)===n&&n.getAttribute(`data-octane-hydrate-id`)===r&&n.getAttribute(`data-octane-hydrate-when`)===i&&n.getAttribute(`data-octane-hydrate-interaction-events`)===a}function Zt(e){return e!==null&&e.nodeType===1}var Qt=new WeakMap;function $t(e){if(!Zt(e))return null;let t=e.localName;return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?e:null}function en(e){let t=Qt.get(e);if(t===void 0){let n=Gt(e);t={editRevision:n,selectionRevision:0,revision:n,composing:!1},Qt.set(e,t)}return t}function tn(e){let t=$t(e.target);if(t===null)return;let n=en(t);switch(e.type){case`input`:n.editRevision++,n.revision++,Ut(t,n.revision);break;case`compositionstart`:n.composing=!0,n.revision++;break;case`compositionupdate`:n.revision++;break;case`compositionend`:n.composing=!1,n.revision++;break;case`focusin`:case`focusout`:n.revision++}}function nn(e){let t=e.currentTarget,n=$t(t.activeElement);if(n===null)return;let r=en(n);r.selectionRevision++,r.revision++}function rn(e){if($t(e)===null)return null;let t=Qt.get(e),n=t===void 0?Gt(e):0,r=e,i,a,o,s=null,c=null,l=null;if(e.localName===`select`){let e=r;i=e.value,e.multiple&&(o=Array.from(e.selectedOptions,e=>e.value))}else if(e.isContentEditable)i=e.textContent??``;else{i=r.value,e.localName===`input`&&(a=r.checked);try{s=r.selectionStart,c=r.selectionEnd,l=r.selectionDirection}catch{}}return{editRevision:t?.editRevision??n,selectionRevision:t?.selectionRevision??0,revision:t?.revision??n,value:i,...a===void 0?{}:{checked:a},...o===void 0?{}:{selectedValues:o},selectionStart:s,selectionEnd:c,selectionDirection:l,focused:e.ownerDocument.activeElement===e,composing:t?.composing??!1}}function an(e,t){if(e.localName!==`textarea`||typeof t!=`string`||Qt.get(e)?.composing===!0)return!1;let n=e,r=n.defaultValue.replace(/\\r\\n?/g,`\n`);return t.replace(/\\r\\n?/g,`\n`)===r&&n.value!==r}function on(e,t){sn(e.ownerDocument);let n=en(e);return n.revision===t&&(n.editRevision=0,n.selectionRevision=0,Kt(e),!0)}function sn(e){let t=e??(typeof document>`u`?void 0:document);if(t===void 0||Yt.has(t))return;Yt.add(t);let n=t[jt],r=typeof n?.stop==`function`?t.defaultView??t:t,i=r===t?tn:e=>{e.target?.ownerDocument===t&&tn(e)};for(let e of[`input`,`compositionstart`,`compositionupdate`,`compositionend`,`focusin`,`focusout`])r.addEventListener(e,i,!0);t.addEventListener(`selectionchange`,nn,!0),qt(t);for(let e of n?.q??[]){let[n]=e,r=$t(n.target);r!==null&&Xt(e,t)&&(n.type===`input`&&Gt(r)>0||tn(n))}}var cn=Symbol.for(`octane.flags.component`);function ln(e,t,n,r){return Object.defineProperty(e,cn,{value:t}),Object.defineProperty(e,\"name\",{value:n,configurable:!0}),r!==void 0&&Object.defineProperty(e,r,{get(){return this===e}}),e}function un(e,t){return typeof e==`function`&&Ot.call(e,cn)&&(e[cn]&t)===t}var dn=Symbol.for(`octane.element`),fn=Symbol.for(`octane.portal`),pn=Symbol.for(`octane.Fragment`),mn=Symbol.for(`octane.context`),hn=Symbol.for(`octane.suspense`),gn=Symbol.for(`octane.childrenBlock`),_n=Symbol.for(`react.context`);function vn(e,t,n,r,i){let a=t===r;if(!a&&r!==null&&t.nodeType===1){let e=r;do{if(t.contains(e)){a=!0;break}e=e.getRootNode().host}while(e!==void 0)}if(!a){e.insertBefore(t,n);return}let o=e.moveBefore;if(!i&&typeof o==`function`){o.call(e,t,n);return}if(t.parentNode!==e||n!==null&&n.parentNode!==e){e.insertBefore(t,n);return}if(t!==n&&t.nextSibling!==n){if(n===null||(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){let r=t.nextSibling;for(;r!==n;){let n=r.nextSibling;e.insertBefore(r,t),r=n}}else{let r=t.nextSibling,i=n;for(;i!==t;){let t=i.nextSibling;e.insertBefore(i,r),i=t}}}}var yn=new WeakSet;function bn(e){return yn.has(e)}var xn=Symbol.for(`octane.contextIdentities`);function Sn(e){let t=globalThis[xn];t??(t=new WeakSet,globalThis[xn]=t),t.add(e)}var Cn=[];function wn(e){return Cn.push(e),()=>{let t=Cn.indexOf(e);t!==-1&&Cn.splice(t,1)}}var Tn,En;function Dn(e){let t=On,n=We(null);On=void 0;try{return e()}finally{On=t,We(n)}}var On;function kn(e){let t=On;return On=e,t}var An=null;function jn(e){let t=An?.get(e);if(t!==void 0)return t.depth++,t;let n=Ye();if(n===null)return null;let r={hooks:n,depth:1,closed:!1};return(An??=new WeakMap).set(e,r),r}function Mn(e,t){if(t.closed)return;t.closed=!0,An?.get(e)===t&&An.delete(e);let n=t.hooks;t.hooks=null,Xe(n)}function Nn(e,t,n,r){if(t===null||t.closed||--t.depth!==0)return;if(!n){Mn(e,t);return}let i=()=>{if(!(t.depth!==0||t.closed))try{Mn(e,t)}catch(e){r(e)}},a=e.target;e.type===`change`&&a?.localName===`input`&&(a.type===`checkbox`||a.type===`radio`)?setTimeout(i,0):queueMicrotask(i)}function Pn(e){return`Minified Octane error #`+e+`; visit https://octanejs.dev/errors/`+e+` for the full message or use a development build for full errors and additional helpful warnings.`}var Fn=new WeakMap,In=!1,Ln=!1,Rn;function zn(e){let t=e.nodeType===9?e:e.ownerDocument;if(t===null)throw TypeError(Pn(123));let n=Fn.get(t);return n===void 0&&(n=Object.freeze({scopeKey:`octane:document`}),Fn.set(t,n)),Bt(n,t),n}function Bn(e=1){if(e!==1)throw TypeError(Pn(74));Ln=!0,!In&&(In=!0,typeof document<`u`&&ze(()=>zn(document)))}var Vn=Symbol.for(`octane.signal-handle`),Hn=Symbol.for(`octane.signal-binding-read`),Un=Symbol.for(`octane.signal-binding-subscribe`);function Wn(e,t){let n=h(e),r=h(t);return n?r?n+` `+r:n:r}var Gn=new Map;function Kn(e){let t=Gn.get(e);if(t!==void 0)return t;let n=m(e);return Gn.set(e,n),n}function qn(e){return e.hooks??=new Map}function Jn(e,t){(e.cleanups??=[]).push(t)}var Yn=null,Xn=null,Zn=null,Qn=!1,$n=new WeakMap,er,tr=new WeakMap;function nr(e){let t=e;for(;t!==null;){let e=t.__trySlot;if(e!==void 0&&!e.propagateSuspense)return e;t=t.parentBlock}}function rr(e){Qr++;let t=Yn?.pauseLifecycle()??-1;try{Ve(e)}finally{t>=0&&Yn.resumeLifecycle(t),Qr--}}function ir(e,t){let n=e.children;if(n!==null)for(let e of n){if(e.scope===t)return[`scope`,e.key];let n=ir(e.scope,t);if(n!==null)return[`scope`,e.key,...n]}let r=t.block;for(let t=0;t<e.slots.length;t++){let n=e.slots[t];if(typeof n==`object`&&n){if(r.forSlot!==null&&(n===r.forSlot||n.forSlot===r.forSlot))return[`slot`,t,`item`,r.key];if(n.block===r||n.tryBlock===r||n.emptyBlock===r)return[`slot`,t,n.__kind,n.tryBlock===r?`primary`:n.branch,n.emptyBlock===r?`empty`:n.currentIsBodyFn?void 0:n.currentComp,n.prevKey]}}return null}function ar(e,t){if(e===t)return[];let n=tr.get(e),r=n?.parent??e.parent??e.block.parentBlock;for(;r instanceof pl;)r=r.parentBlock;if(r===null)return null;let i=n===void 0?ir(r,e):[`slot`,n.slot,n.kind,n.branch,n.component,n.key];if(i===null)return null;let a=ar(r,t);return a===null?null:a.concat(i)}function or(e,t,n){let r=e.paths;for(let e of t){let t=r.children?.get(e);if(t===void 0){if(!n)return;t={},(r.children??=new Map).set(e,t)}r=t}return r}function sr(e,t,n,r=!1){let i=$n.get(e);if(i){let r=ar(e,t);if(r!==null){let e=n.retrySignalOwners??={paths:{},owners:new Set},t=or(e,r,!0),a=t.owner;t.owner=i,e.owners.add(i),a!==void 0&&a!==i&&(e.owners.delete(a),rr(a))}}if(r)ex(e,e=>sr(e,t,n,!0));else if(e.children!==null)for(let r of e.children)sr(r.scope,t,n)}function cr(e){let t=e.retrySignalOwners;if(t!==void 0){e.retrySignalOwners=void 0;for(let e of t.owners)rr(e)}}function lr(e,t){let n=er;if(ud(t)){let t=e.idState.renderOwner,n=nr(e),r=n?.tryBlock??t?.current,i=n??t;i!==void 0&&r!=null&&(sr(e,r,i,!0),er=i.retrySignalOwners)}try{j(e,I()===null&&!D?.hydrating&&!D?.retainedCreated?.has(e))}finally{er=n}}function ur(e,t,n){for(;e instanceof pl;)e=e.parentBlock;for(let r=0;r<e.slots.length;r++){let i=e.slots[r];if(i===t||i?.forSlot===t){let t=ar(e,n);return t===null?null:t.concat(`slot`,r,`item`)}}if(e.children!==null)for(let r of e.children){let e=ur(r.scope,t,n);if(e!==null)return e}return null}function dr(e,t,n){if(e.owner!==void 0&&(t.owners.delete(e.owner),n.push(e.owner),e.owner=void 0),e.children!==void 0)for(let r of e.children.values())dr(r,t,n)}function fr(e,t,n,r){let i=nr(e),a=e.idState.renderOwner,o=i?.retrySignalOwners??a?.retrySignalOwners,s=i?.retrySignalOwners===void 0?a?.current:i.tryBlock;if(o===void 0||s==null)return;let c=ur(e,t,s),l=c===null?void 0:or(o,c,!1);if(l?.children===void 0)return;let u=e=>{let t=new Set(e),n=[];for(let[e,r]of l.children)t.has(e)||(l.children.delete(e),dr(r,o,n));for(let e of n)rr(e)};if(typeof r!=`function`){u(r);return}if(n===0){u([]);return}let d=new Map,f=!1;return(e,t)=>{f||(d.set(e,t),d.size===n&&(f=!0,u(d.values())))}}function pr(e=1,t=!1){if(e!==1)throw TypeError(w(74));Qn=!0,t||Bn(e)}function mr(e,t){if(e===null)return`null`;let n=typeof e;return n===`string`||n===`number`||n===`bigint`||n===`boolean`?n.charCodeAt(0).toString(36)+`:`+String(e):n===`undefined`?`u:`:{value:e,position:t}}function hr(e,t,n,r,i,a){if(typeof e==`string`)return e;let o=t+JSON.stringify([n??`legacy`,r,i]),s=a.signalState??={prefix:a.prefix,next:0},c=s.opaqueKeys??=new Map,l=c.get(o);l===void 0&&(l={objects:new WeakMap,symbols:new Map,used:new Set,next:0},c.set(o,l));let u=e.value,d=typeof u==`symbol`?l.symbols.get(u):l.objects.get(u);if(d===void 0){if(d=e.position,d===void 0||l.used.has(d)){for(;l.used.has(l.next);)l.next++;d=l.next++}l.used.add(d),typeof u==`symbol`?l.symbols.set(u,d):l.objects.set(u,d)}return`o:`+d.toString(36)}function gr(e){return JSON.stringify([e.signalState?.prefix??e.prefix,`root`])}function _r(e){let t=e.signalInstanceResolved;if(t!==void 0)return t;let n=e.signalInstanceParent;if(n===null)return;let r=yr(n,e.signalInstanceSite,e.signalInstanceValue,e.signalInstanceHasKey);return e.signalInstanceResolved=r,r}function vr(e,t){if(typeof t==`string`){e.signalInstanceResolved=t;return}e.signalInstanceParent=t.parentScope,e.signalInstanceSite=t.invocationSite,e.signalInstanceValue=t.key,e.signalInstanceHasKey=t.hasKey,e.signalInstanceResolved=void 0}function yr(e,t,n,r){let i=_r(e),a=[],o=new Set,s=e;for(;i===void 0&&s!==null;){let e=s.block;o.has(e)||(o.add(e),e.forSlot!==null&&a.push(mr(e.key,e.itemIndex)),i=_r(e)),s=s.parent,i===void 0&&s!==null&&(i=_r(s))}let c=e.block;for(;i===void 0&&c!==null;)o.has(c)||(o.add(c),c.forSlot!==null&&a.push(mr(c.key,c.itemIndex))),i=_r(c),c=c.parentBlock;i??=gr(e.block.idState),a.reverse();let l=e.block.idState,u=a;for(let e of a)if(typeof e!=`string`){u=[];for(let e of a)u.push(hr(e,i,t,u,!1,l));break}return i+JSON.stringify([t??`legacy`,u,r?hr(mr(n),i,t,u,!0,l):``])}function br(e){if(e===null)return;let t=e.block.idState.renderOwner,n=t?.signalOwner;if(n===void 0&&Ln&&(n=zn(e.block.parentNode),t!==void 0&&(t.signalOwner=n)),n===void 0)return;let r=$n.get(e);if((r===void 0||r===!1)&&e.block.forSlot===null&&e.signalInstanceParent===null&&e.signalInstanceResolved===void 0){let t=e.parent??e.block.parentBlock;for(;t!==null&&!(t instanceof pl||t.signalInstanceParent!==null||t.signalInstanceResolved!==void 0);){if(t.block.forSlot?.signalSite!==void 0)return $n.set(e,!1),br(t);t=t.parent??t.block.parentBlock}}let i=r===null;if(!r||r.documentOwner!==n){let a=e.block.idState;r=void 0;let o=nr(e.block),s=o?.retrySignalOwners??t?.retrySignalOwners,c=o?.retrySignalOwners===void 0?t?.current:o.tryBlock;if(s!==void 0&&!i&&!e.block.disposed&&c!=null){let t=ar(e,c),n=t===null?void 0:or(s,t,!1);n?.owner!==void 0&&(r=n.owner,n.owner=void 0,s.owners.delete(r))}if(r===void 0||r.documentOwner!==n){let t={scopeKey:n.scopeKey,documentOwner:n,instanceOwner:e,instanceKey:_r(e)??(e.block.forSlot?.signalSite===void 0?gr(a):yr(e,e.block.forSlot.signalSite,void 0,!1))};t.instanceOwner=t,r=Object.freeze(t)}$n.set(e,r),i&&rr(r)}return Bt(r,e.block.parentNode.ownerDocument),r}function xr(e,t){let n=br(e);return n!==void 0&&Rn?.(n),n===void 0||Le()===n?t():Be(n,t)}function Sr(e){let t=T;return t===null?-1:Yn.beginScope(e,t)}function Cr(e){let t=Vu===0?null:Hu(e);if(t!==null){rl(e,t.block),t.activationRequested&&(t.serverActivationStarted=!1,Cs(t.parentBlock));return}rl(e,e);let n=As?.holdsNativeRead(e)===!0;n&&oi++;try{Cs(e)}finally{n&&oi--}}function wr(e,t,n=!1){let r=Yn;if(r===null)return!1;if(hc?.stageAction(()=>wr(e,t,n))===!0)return!0;let i=r.acceptCapture(e);if(t===void 0)return!1;let a=n&&r.replayDeferredRefs(e,t);return(i||a||r.hasPublication(t))&&r.stampPublication(t,[e.effects[$o],e.effects[es],e.effects[ts],e.events,e.refs]),!1}function Tr(e,t,n){let r=je(t,e.block.idState.renderOwner?.initialDocumentSignals);Jn(e,()=>{r.release(),(!Ra||e.block.idState.renderOwner?.disposed)&&n?.()});let i=e=>{e?r.release():((Zn??=[]).push(r),n?.())};return k===null?i(!1):(k.renderCleanups??=[]).push(i),r}function Er(){let e=Zn;if(e!==null){Zn=null;for(let t of e)t.release()}}function Dr(e,t,n,r){if(e===null||t?.nodeType!==8)return null;let i=(M?.view(t)??t).data;if(!i.startsWith(`oct-native-fresh:`))return null;let a=i.slice(Ce.length);if(!/^(?:0|[1-9]\\d*)$/.test(a))return null;let o=Number(a);return Number.isSafeInteger(o)?(Uu(r,o),ax(t,n),e.node=n,{prefix:r.prefix+`n`+(Fr++).toString(36)+`-`,next:0,renderOwner:r.renderOwner}):null}var Or=0;function kr(e){let t=Or;return Or+=e,t}function Ar(e,t){let n=e.locs;if(n===void 0)return``;let r=n[t];return r===void 0?``:`${e.locFile??`<unknown>`}:${r[0]}:${r[1]}`}function jr(e){return e!==null&&e.__oct_suppress===!0}var Mr=0,Nr=1,Pr=2,Fr=0,Ir=null,T=null,Lr=0,Rr=0,zr=1,Br=[],Vr=1,Hr=0,Ur=new WeakMap,Wr=0,Gr=new WeakMap,Kr=0,qr=-1,Jr=0,Yr=null,Xr=0,Zr=0,Qr=0;function $r(e,t=null){Qr++;let n=Yn?.pauseLifecycle()??-1;try{Ln||t?.block.idState.renderOwner?.signalOwner!==void 0?xr(t,e):e()}finally{n>=0&&Yn.resumeLifecycle(n),Qr--}}function ei(e,t=-1,n=null){let r=qr;qr=t,Kr++;try{$r(e,n)}finally{Kr--,qr=r}}var ti=[],ni=0,ri=!1,ii=!1,ai=!1,oi=0,si=0,ci=null;function li(){ci??={render:E_,commit:j_,dispose:M_,splice:O_,begin:ia,end:aa,beginUrgent:al,endUrgent:ol,holdRoot:ha,retryRoot:ga,commitRoot:_a,discardRoot:va,keepsRoot:ma,cancelEqual:Zi,hasHeld:Xi,heldUpdate:Yi,rebaseHeld:Qi}}var ui=null,di=null;function fi(e){ui.queue(e)}function pi(e){ui.prepare(e)}function mi(e){ui?.retire(e)}function hi(){!ri&&!ii&&(ri=!0,queueMicrotask(Ps))}var gi=null,_i=null,vi=!1;function yi(e){let t=e.native;return t!==void 0&&!t.validate()&&(t.hasWrites()?t.rebase():(t.discard(),t=void 0)),t??=e.native=Tn?.(),t!==void 0&&ui===null&&(ui=En({get attempt(){return di},set attempt(e){di=e},get visibility(){return As},get rollback(){return Ra},get fallbackTimeout(){return Qv},schedule:hi,beginRoot:Va,endRoot:Ha,beginAttempt:ia,endAttempt:aa,invalidate:rl,render:A,journal:Do,journalProperty:O,isSuspense:ud,releaseHookHolder:Ii,rebaseUpdate:Ci,flushBatch:Ei,currentPresentations:mf,validateCapture:e=>Yn===null||Yn.validateCapture(e),acceptCapture:wr,commitRoots:io,rollbackRoot:no,applyMemoSwap:ca,handleError:zb,reportError:Mb,unsupportedError:()=>TypeError(w(79))})),t}function bi(){vi||=!0}function xi(){return{updates:new Map,pendingActions:0,closed:!1,flushed:!1,hook:null,hooks:null,hooksPending:!1}}function Si(){return gi===null?ii||nh>0?null:_i:gi}function Ci(e){if(e.state!==void 0||e.reducer!==void 0||Object.is(e.baseValue,e.slot.value))return e.value;let t=e.slot.value;for(let n of e.operations)t=n(t);return e.baseValue=e.slot.value,e.value=t,e.slot.pendingActionBatch!==void 0&&(e.slot.pendingActionValue=t),t}function wi(e,t){let n=Si();if(n===null)return e.value;let r=n.updates.get(e);if(r!==void 0)return Ci(r);if(e.renderTransition!==void 0)return e.renderTransition.value;let i=t===void 0?void 0:ci?.heldUpdate(e,t);return i===void 0?e.value:i.value}function Ti(e,t,n,r,i=!1){let a=Si();if(a===null)return null;let o=typeof n==`function`?n:()=>n,s=a.updates.get(e);return s===void 0?(s={batch:a,slot:e,block:t,operations:[o],baseValue:e.value,value:r,forceRender:i},a.updates.set(e,s)):(s.operations.push(o),s.value=r,s.forceRender||=i),e.pendingActionBatch=a,e.pendingActionValue=r,s}function Ei(e){if(!e.flushed){if(e.native!==void 0){if(e.native.hasWrites()){Fi(e,e),fi(e),_i===e&&(_i=null);return}e.native.discard(),e.native=void 0}e.flushed=!0;for(let t of e.updates.values()){let{slot:n,block:r,forceRender:i}=t,a=t.state===void 0&&t.reducer===void 0?Ci(t):t.value;if(n.pendingActionBatch===e&&(n.pendingActionBatch=void 0,n.pendingActionValue=void 0),r.disposed)continue;let o=t.state,s=t.reducer,c=o?.renderTransition??s?.renderTransition;(o!==void 0||s!==void 0)&&(t.baseValue=c===void 0?n.value:c.baseValue,o===void 0?s!==void 0&&(s.renderPhaseActions=void 0):o.updates=void 0);let l=!Object.is(n.value,a);(l||i||t.previous!==void 0)&&(l&&(n.value=a),t.reducer!==void 0&&(t.reducer.renderTransition=t),t.state!==void 0&&(t.state.renderTransition=t),Cs(r))}if(e.updates.size>0){let t=[];for(let n of e.updates.values())n.block.disposed||t.push(n);t.length>0&&Wi.push(t)}e.updates.clear(),_i===e&&(_i=null)}}function Di(e){e.closed&&e.pendingActions===0&&Ei(e)}var Oi=!1,ki=0,Ai=new Set,ji=null;function Mi(e,t){if(e.hook===null)e.hook=t;else if(e.hook!==t){let n=e.hooks;if(n===null)e.hooks=[t];else if(n.includes(t))return;else n.push(t)}else return;e.hooksPending&&(t.pendingBatches++,t.publish(!0))}function Ni(e){let t=e.hook;if(t===null||e.hooksPending)return;e.hooksPending=!0,t.pendingBatches++,t.publish(!0);let n=e.hooks;if(n!==null)for(let e=0;e<n.length;e++)n[e].pendingBatches++,n[e].publish(!0)}function Pi(e){if(!e.workComplete||e.pendingActions!==0||(e.pendingHolds??0)!==0||!e.hooksPending)return;e.hooksPending=!1;let t=e.hook;--t.pendingBatches===0&&t.publish(!1);let n=e.hooks;if(n!==null)for(let e=0;e<n.length;e++)--n[e].pendingBatches===0&&n[e].publish(!1)}function Fi(e,t){if(t.hook===null)return;let n=ji??=new WeakMap,r=n.get(e);r===void 0&&n.set(e,r=new Set),!r.has(t)&&(r.add(t),t.pendingHolds=(t.pendingHolds??0)+1,Ni(t))}function Ii(e){let t=ji?.get(e);if(t!==void 0){ji.delete(e);for(let e of t)e.pendingHolds--,Pi(e)}}function Li(e,t){for(let n of Wi)for(let r of n)r.batch!==void 0&&Od(r.block,t)&&Fi(e,r.batch)}var Ri=0,zi=new Set,Bi=new Set,Vi=!1,Hi=!1,Ui=null,Wi=[],Gi=null;function Ki(e){return oi===0&&(T!==e||e.currentRenderMode!==`transition`)&&(ii||nh>0||si===0)}function qi(e){for(;e.next?.batch?.flushed===!0&&!e.next.superseded;)e=e.next;return e}function Ji(e,t){if(Ki(t))return Yi(e,t)}function Yi(e,t){if(t.disposed)return;let n=t.idState.renderOwner?.transition;if(Gi===null&&n===void 0&&Wi.length===0)return;let r=[Gi?.entries,n?.entries];for(let t of r)if(t!==void 0)for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.slot===e&&!r.superseded&&Object.is(e.value,r.baseValue))return qi(r)}for(let t=Wi.length-1;t>=0;t--){let n=Wi[t];for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.slot===e&&!r.superseded&&Object.is(e.value,r.baseValue)&&(r.state===void 0&&r.reducer===void 0||e.renderTransition!==void 0))return qi(r)}}}function Xi(e,t){return Ji(e,t)!==void 0}function Zi(e,t){if(!Ki(t))return!1;let n=t.idState.renderOwner?.transition;if(Gi===null&&n===void 0&&Wi.length===0)return!1;let r=!1,i=t=>{if(t!==void 0)for(let n of t)n.slot===e&&!n.superseded&&(n.superseded=!0,r=!0)};i(Gi?.entries),i(n?.entries);for(let e of Wi)i(e);return r}function Qi(e,t,n,r){let i=Ji(e,t);if(i===void 0||e.pendingActionBatch?.flushed===!1)return;let a=i.value;for(let e of n)a=r?r(a,e):typeof e==`function`?e(a):e;if(Object.is(a,i.baseValue)){Zi(e,t);return}let o=!Object.is(a,i.value);for(let e=i;e;e=e.previous)e.value=a;for(let e of n)i.operations.push(r?t=>r(t,e):typeof e==`function`?e:()=>e);o&&$i(i,t)}function $i(e,t){let n=Gi;if(n!==null&&n.entries.includes(e)){if(n.replayScheduled)return;n.replayScheduled=!0,queueMicrotask(()=>{Gi===n&&(n.replayScheduled=!1,da())});return}let r=t.idState.renderOwner,i=r?.transition;i!==void 0&&i.entries.includes(e)&&!i.replayScheduled&&(i.replayScheduled=!0,queueMicrotask(()=>{r.transition===i&&(i.replayScheduled=!1,ga(r))}))}var ea=null,ta=null;function na(e){let t=[];for(let n=Wi.length-1;n>=0;n--){let r=Wi[n],i=!0;for(let t=0;t<r.length;t++)if(r[t].block!==e){i=!1;break}if(i){for(let e=0;e<r.length;e++)t.push(r[e]);Wi.splice(n,1)}}return t}function ra(e,t){if(t!==null)for(let e=0;e<t.length;e++)t[e].taken=!1;let n=e=>{let r=e.block.__warmCache;if(r!==void 0)for(let[e,n]of r)for(let r=0;r<n.length;r++){let i=n[r];if(i.available){let n={slot:e,deps:i.deps,value:i.value,taken:!1};i.nativeWitness!==void 0&&(n.nativeWitness=i.nativeWitness),(t??=[]).push(n)}}ex(e,n)};return n(e),t}function ia(e){let t=e.idState.renderOwner;if(t?.transition!==void 0&&!t.transition.promoted&&!pa(t.transition)&&va(t),e.pendingMode!==`transition`||Ui!==null)return null;E??=[],ka??=new Map,ja.push(Aa),Pa.push(Ma),Aa=E.length,Ma=++Na,Fa++;let n=k,r=n?.effects??ns,i={origin:e,capture:n,journalCheckpoint:E.length,effects:[r[0].length,r[1].length,r[2].length],effectEvents:(n?.events??rs).length,effectEventActions:(n?.eventActions??is).length,stores:(n?.stores??ss).length,refAttach:(n?.refs??cs).length,refDetach:n===null?ec.length:n.detaches?.length??0,effectDeps:D===null?fb(e):null,heldSlots:null,memoSwaps:null};return Ui=i,i}function aa(e){if(e===null)return;Ui=null;let t=e.heldSlots;(t===null||t.size===0)&&(ea=null,ta=null);let n=null;if(t!==null&&t.size>0&&(n=na(e.origin)),t!==null&&t.size>0&&n!==null&&n.length>0){Xo(e.journalCheckpoint,e.origin);let r=e.capture,i=r?.effects??ns;for(let t=0;t<3;t++)i[t].length=e.effects[t];(r?.events??rs).length=e.effectEvents,(r?.eventActions??is).length=e.effectEventActions;let a=r?.stores??ss;for(let t=e.stores;t<a.length;t++)a[t].queued=!1;a.length=e.stores,(r?.refs??cs).length=e.refAttach,r===null?ec.length=e.refDetach:r.detaches!==void 0&&(r.detaches.length=e.refDetach),e.effectDeps!==null&&pb(e.origin,e.effectDeps);let o=ea!==null||ta!==null,s=e.memoSwaps;if(o)ea!==null&&(s=s===null?ea:ea.concat(s),ea=null);else if(s!==null)for(let e=s.length-1;e>=0;e--)ca(s[e],!1);for(let e=0;e<n.length;e++)n[e].slot.value=n[e].baseValue;let c=ra(e.origin,ta);ta=null,Gi={origin:e.origin,entries:n,memoSwaps:s,warmHarvest:c,holders:new Set(t)},o||Cs(e.origin)}Aa=ja.pop(),Ma=Pa.pop(),--Fa===0&&(E=null,ka=null,Jo())}function oa(e,t,n){let r=Ui;if(r===null)return;let i=qn(e);(r.memoSwaps??=[]).push([0,i,t,i.get(t),n])}function sa(e,t,n){let r=Ui;r!==null&&(r.memoSwaps??=[]).push([1,e,t,e.slice(t,t+n.length),n])}function ca(e,t){if(e[0]===0){let n=t?e[4]:e[3];!t&&n===void 0?e[1].delete(e[2]):e[1].set(e[2],n);return}let n=t?e[4]:e[3];for(let t=0;t<n.length;t++)e[1][e[2]+t]=n[t]}function la(e){let t=Gi;if(t===null||!t.holders.has(e))return!1;for(let e=0;e<t.entries.length;e++){let n=t.entries[e];if(n.superseded||!Object.is(n.slot.value,n.baseValue))return!1}return!0}function ua(e){for(let t of e)if(!t.superseded&&t.slot.pendingActionBatch?.flushed===!1)return!0;return!1}function da(){let e=Gi;if(e===null||ua(e.entries))return!1;Gi=null;let t=[];for(let n=0;n<e.entries.length;n++){let r=e.entries[n];!r.superseded&&Object.is(r.slot.value,r.baseValue)&&(r.slot.value=r.value,r.block.disposed||t.push(r))}if(t.length===0)return ea=null,ta=null,!1;let n=e.memoSwaps;if(n!==null){for(let e=0;e<n.length;e++)ca(n[e],!0);ea=ea===null?n:ea.concat(n)}ta=e.warmHarvest,oi++;try{for(let e=0;e<t.length;e++)Cs(t[e].block)}finally{oi--}return Wi.push(t),!0}function fa(e){let t=Gi;t!==null&&t.holders.delete(e)&&t.holders.size===0&&(Gi=null,ea=null,ta=null)}function pa(e){for(let t=0;t<e.entries.length;t++){let n=e.entries[t];if(n.superseded||!Object.is(n.slot.value,n.baseValue))return!1}return!0}function ma(e,t=!1){let n=e.transition;return n!==void 0&&!n.origin.disposed&&(n.promoted?t:pa(n))}function ha(e,t,n){let r=e.transition;if(n===null||!n.origin.mounted||n.origin.disposed||Qa(t,n.origin)||n.heldSlots!==null&&n.heldSlots.size!==0)return r!==void 0&&!pa(r)&&va(e),!1;let i=r?.promoted===!0,a=i?r.origin:n.origin;if(a.idState.renderOwner!==e||!Od(n.origin,a))return!1;let o=na(a);if(o.length===0)return r!==void 0&&!pa(r)&&va(e),!1;if(no(t),e.disposed||a.disposed)return va(e),!0;let s=n.memoSwaps;if(i)r.memoSwaps!==null&&(s=s===null?r.memoSwaps:r.memoSwaps.concat(s));else if(s!==null)for(let e=s.length-1;e>=0;e--)ca(s[e],!1);for(let e=0;e<o.length;e++)o[e].slot.value=o[e].baseValue;e.transition={origin:a,entries:o,memoSwaps:s,warmHarvest:ra(a,i?r.warmHarvest:null),promoted:!1,cue:!i};for(let t of o)t.batch!==void 0&&Fi(e,t.batch);return(r===void 0||r.promoted)&&Qo(1),!0}function ga(e){let t=e.transition;if(t===void 0)return!1;if(t.origin.disposed||!pa(t))return va(e),!1;if(ua(t.entries))return!0;if(t.promoted=!0,t.cue=!1,t.memoSwaps!==null)for(let e=0;e<t.memoSwaps.length;e++)ca(t.memoSwaps[e],!0);oi++;try{Qo(-1),Ii(e);for(let e=0;e<t.entries.length;e++){let n=t.entries[e];n.slot.value=n.value,n.block.disposed||Cs(n.block)}Wi.push(t.entries),e.retry()}finally{oi--}return!0}function _a(e,t){let n=e.transition;if(n!==void 0){if(e.disposed||n.origin.disposed){va(e);return}if(t.aborted){n.cue&&e.transaction===null&&(n.cue=!1,Cs(n.origin));return}(n.promoted||!pa(n))&&va(e)}}function va(e){let t=e.transition;t!==void 0&&(e.transition=void 0,e.wakeable=null,e.generation++,t.promoted||Qo(-1),Ii(e))}var ya=0,ba=1,xa=2,Sa=3,Ca=4,wa=5,Ta=6,Ea=7,Da=8,Oa=9,E=null,ka=null,Aa=0,ja=[],Ma=0,Na=0,Pa=[],Fa=0,Ia=!1,D=null,La=[],Ra=!1,za=0;function Ba(e,t=!1){let n=e.block.idState.renderOwner;return n===void 0||n.disposed||t&&!n.transaction?.rootRequest?null:n.retryKey??={}}function Va(e){if(e===void 0||D===e.transaction&&D!==null)return null;let t=e.transaction;if(t===null){e.nativeRetry?.clear();let n=ds();n.rootTransaction=!0,t={owner:e,log:[],bags:new Map,capture:n,created:null,createdStamp:++za,bagWindow:++Na,retainedCreated:null,retired:null,structures:null,commit:null,parked:null,aborted:!1,rootRequest:!1},e.transaction=t,La.push(t)}let n={transaction:t,previous:D,log:E,bags:ka,checkpoint:Aa,bagWindow:Ma,depth:Fa,parked:Po,capture:k};return hc?.recordRootTransaction(t),D=t,E=t.log,ka=t.bags,Aa=0,Ma=t.bagWindow,Fa=1,Po=t.parked,k=t.capture,n}function Ha(e){e!==null&&(e.transaction.parked=Po,D=e.previous,E=e.log,ka=e.bags,Aa=e.checkpoint,Ma=e.bagWindow,Fa=e.depth,Po=e.parked,k=e.capture)}function Ua(e){E.push(Ta,e,null,null)}function O(e,t,n){D===null||Ra||E.push(Sa,e,t,n)}function Wa(e,t,n,r){let i=D;if(i===null||i.aborted||Ra)return;let a=i.structures??=new Map;(a.get(e)??-1)>=Aa||(a.set(e,E.length),Do(e),Ua(()=>{a.delete(e)}),lf?.revision===void 0&&Ga(t,n,r))}function Ga(e,t,n){let r=D?.owner.bindingLeases,i=[];for(let r=t===null?P(e):F(t);r!==null&&r!==n;r=F(r))i.push(r);Ua(()=>{let a=i;for(let t of r??[]){if(t.end===void 0||!t.active())continue;let n=e;for(;n!==null&&n.parentNode!==t.root.parentNode;)n=n.parentNode;for(let e=t.root;e!==null;e=e.nextSibling){if(e===n)return;if(e===t.end)break}let r=a.indexOf(t.root),i=a.indexOf(t.end);if(r<0||i<r||t.root.parentNode!==e)continue;let o=[];for(let e=t.root;e!==null&&(o.push(e),e!==t.end);e=e.nextSibling);a=[...a.slice(0,r),...o,...a.slice(i+1)]}if(t!==null&&(M?.view(t)??t).parentNode!==e||n!==null&&(M?.view(n)??n).parentNode!==e)return;let o=t!==null&&(M?.view(t)??t).parentNode===e?F(t):P(e),s=n!==null&&(M?.view(n)??n).parentNode===e?n:null,c=new Set(a);for(;o!==null&&o!==s;){let t=F(o);c.has(o)||(M?.view(e)??e).removeChild(o),o=t}qa(e,a,s)})}function Ka(e){let t=D;if(t===null||Ra)return;let n=t.structures??=new Map;(n.get(e)??-1)>=Aa||(n.set(e,E.length),Ua(()=>{n.delete(e)}),Ga(e,null,null))}function qa(e,t,n){for(let r=t.length-1;r>=0;r--){let i=t[r];((M?.view(i)??i).parentNode!==e||F(i)!==n)&&(Vs===null?(M?.view(e)??e).insertBefore(i,n):(qs(e,Vs),Ex(e,i,n,Vs))),n=i}}function Ja(e){let t=D;if(t===null||t.aborted||Ra||e.idState.renderOwner!==t.owner)return;let n=t.retired??=new Set;n.has(e)||(n.add(e),E.push(Ea,n,e,null)),e.pending&&=(O(e,`pending`,e.pending),!1)}function Ya(e,t,n,r,i){Ja(e),Xa(t,n,r,()=>{e.disposed||j(e,!1)},i)}function Xa(e,t,n,r,i){let a=[];if(t!==null&&n!==null)for(let e=t;e!==null&&(a.push(e),e!==n);e=F(e));let o=!1;Ua(()=>{o=!0}),(D.commit??=[]).push(()=>{if(!o){r?.();for(let t of a)(M?.view(t)??t).parentNode===e&&(M?.view(e)??e).removeChild(t);i?.()}})}function Za(e,t){let n=D;if(n===null||n.aborted||Ra||e.idState.renderOwner!==n.owner||!e.mounted||Qa(n,e))return!1;Ja(e);let r=e.startMarker,i=e.endMarker,a=[],o=null,s=null;if(r!==null&&i!==null&&(M?.view(r)??r).parentNode!==null){o=(M?.view(r)??r).parentNode;let n=e.exclusiveMarkers||!t&&r!==i;s=n?i:F(i);for(let e=n?F(r):r;e!==null&&e!==s;e=F(e))a.push(e)}else if(e.kind===`root`){o=e.parentNode;for(let e=P(o);e!==null;e=F(e))a.push(e)}let c=!1;Ua(()=>{if(c=!0,o!==null){let e=(M?.view(s)??s)?.parentNode===o?s:null;qa(o,a,e)}});let l=rc;if((n.commit??=[]).push(()=>{if(c||e.disposed)return;if(o!==null){let e=(M?.view(s)??s)?.parentNode===o?s:null;for(let t of a)(M?.view(t)??t).parentNode!==o&&(M?.view(o)??o).insertBefore(t,e)}let t=rc;rc=l;try{j(e,!1)}finally{rc=t}if(o!==null)for(let e of a)(M?.view(e)??e).parentNode===o&&(M?.view(o)??o).removeChild(e)}),t&&o!==null)for(let e of a)(M?.view(o)??o).removeChild(e);return!0}function Qa(e,t){return t.createdStamp===e.createdStamp}function $a(e,t){let n=ec.length;j(e,(!t.hydrating||e.kind===`portal`)&&!t.retainedCreated?.has(e)),ec.length=n}function eo(e){let t=D;t===null||Ra||Qa(t,e)||(e.createdStamp=t.createdStamp,lf?.revision!==void 0&&to(e),(t.created??=[]).push(e),E.push(Ca,e,t,null))}function to(e){D!==null&&(D.retainedCreated??=new Set).add(e)}function no(e){if(e.aborted)return;e.aborted=!0,e.owner.retrySignalOwners!==void 0&&e.owner.retrySignalOwners!==er&&cr(e.owner);let t=Va(e.owner),n=Ra;Ra=!0;try{let t=e.owner.current;if(t!==null)Xo(0,t);else{for(let t=e.log.length-4;t>=0;t-=4)if(e.log[t]===Ta)e.log[t+1]();else if(e.log[t]===Ca)$a(e.log[t+1],e.log[t+2]);else if(e.log[t]===Ea)e.log[t+1].delete(e.log[t+2]);else if(e.log[t]===Oa){let n=e.log[t+1],r=e.log[t+2],i=e.log[t+3];i===void 0?n.delete(r):n.set(r,i)}e.log.length=0}k_(e.capture),e.commit=null;let n=ec.length;Jo(),ec.length=n}finally{Ra=n,Ha(t)}}function ro(e){for(let t of e.bindingLeases){let n=t.host!==void 0&&!t.active()?uf.get(t):void 0;if(!(n===void 0?e.bindingContainer.contains(t.anchor):!n.scope.block.disposed)){e.bindingLeases.delete(t),uf.delete(t),$e(t);try{t.retire()}catch(t){Ix(e.current,t)||console.error(t)}}}}function io(){let e=La;if(e.length!==0){La=[];for(let t of e){let e=t.owner,n=hc?.enterRootCommit(e);try{if(t.aborted||e.disposed){e.transaction===t&&(e.transaction=null),e.transition!==void 0&&ci.commitRoot(e,t);continue}if(!t.nativeAdmitted&&(!mf(t.capture)||Yn!==null&&!Yn.validateCapture(t.capture))){let n=!mf(t.capture);no(t),e.transaction===t&&(e.transaction=null),e.disposed||(e.wakeable=null,e.generation++,n?hf(t.capture):e.retry());continue}e.transaction===t&&(e.transaction=null),t.capture.presentations!==void 0&&gc!==null&&(_c(gc,e),gc.owners.get(e).presentation=t),t.rootRequest&&(e.transition===void 0||!ci.keepsRoot(e))&&(e.wakeable=null,e.generation++),e.wakeable===null&&(e.retryKey=null,e.nativeRetry?.clear(),e.retrySignalOwners!==void 0&&cr(e));let n=wr(t.capture,e,!0),r=e.generation,i=t.commit;if(i!==null)for(let t of i){if(e.disposed||e.generation!==r)break;t()}let a=t.parked;if(a!==null)for(let t of a){if(e.disposed||e.generation!==r)break;Yo(t)}if(Yn!==null&&hc?.stageAction(()=>Yn.pruneDeferredRefs(e))!==!0&&Yn.pruneDeferredRefs(e),e.disposed||e.generation!==r){k_(t.capture);continue}D_(t.capture,n),e.bindingLeases!==void 0&&e.bindingLeases.size>0&&hc?.stageAction(()=>ro(e))!==!0&&ro(e),e.transition!==void 0&&ci.commitRoot(e,t)}finally{n?.()}}}}function ao(e,t,n){let r=e.idState.renderOwner;if(r===void 0||r.disposed)return!1;let i=r.transaction;if(i===null)return!1;if(ci===null||!ci.holdRoot(r,i,n)){if(_d&&i.created!==null)for(let e of i.created)(e.parentBlock===null||!Qa(i,e.parentBlock))&&Dd(e);let e=er,t=r.current;if(t!==null&&i.created!==null&&r.signalOwner!==void 0){for(let e of i.created)e.disposed||sr(e,t,r);er=r.retrySignalOwners}try{no(i)}finally{er=e}}r.wakeable=t;let a=++r.generation,o=!1,s=()=>{o||(o=!0,queueMicrotask(()=>{r.disposed||r.generation!==a||r.wakeable!==t||(r.wakeable=null,(r.transition===void 0||!ci.retryRoot(r))&&r.retry())}))};return t.then(s,s),!0}var oo=Symbol();function so(e){return{...e}}function co(e){return{...e}}function lo(e){return{...e}}function uo(e){return{...e}}function fo(e){return{...e}}function po(e){return{...e}}function mo(e){return{...e}}function ho(e){return{...e}}function go(e){return{...e}}function _o(e){return{...e}}function vo(e){return{...e}}function yo(e){return{...e}}function bo(e){return{...e}}function xo(e){return{...e}}function So(e){return{...e}}function Co(e){return{...e}}function wo(e){return{...e}}function To(e,t){switch(t){case 0:return so(e);case 1:return co(e);case 2:return lo(e);case 3:return uo(e);case 4:return fo(e);case 5:return po(e);case 6:return mo(e);case 7:return ho(e);case 8:return go(e);case 9:return _o(e);case 10:return vo(e);case 11:return yo(e);case 12:return bo(e);case 13:return xo(e);case 14:return So(e);case 15:return Co(e);case 16:return wo(e);default:return{...e}}}function Eo(){let e=Ir;if(e===null)return;let t=D;if(t!==null&&!t.hydrating&&t.retainedCreated===null&&Fa===1&&e.block.createdStamp===t.createdStamp)return;let n=e.slots[0];if(typeof n!=`object`||!n)return;let r=n[oo];if(r!==void 0){let e=Ma;if(n.__journalWindow===e)return;let t=To(n,r);E.push(xa,n,t,null),n.__journalWindow=e;return}n.__kind===void 0&&Do(n)}function Do(e){let t=ka;(t.get(e)??-1)>=Aa||(t.set(e,E.length),E.push(xa,e,{...e},Array.isArray(e)?e.length:null))}function Oo(e){if(D!==null&&e.ownerDocument.activeElement===e){let t=(M?.view(e)??e).selectionStart,n=(M?.view(e)??e).selectionEnd,r=(M?.view(e)??e).selectionDirection;t!==null&&n!==null&&Ua(()=>(M?.view(e)??e).setSelectionRange(t,n,r??void 0))}}function ko(e,t,n){t===`value`&&Oo(e);let r=E;r.push(Sa,e,t,(M?.view(e)??e)[t]),r.push(Sa,e,n,(M?.view(e)??e)[n]);let i=lg(e);i!==void 0&&Do(i);let a=e;t===`checked`&&(M?.view(a)??a).type===`radio`&&(M?.view(a)??a).name!==``&&Mo(a),Eo()}function Ao(e){Oo(e),e.localName===`textarea`?(D===null?E.push(Sa,e,`defaultValue`,(M?.view(e)??e).defaultValue):Ka(e),Eo()):Go(e,`value`)}function jo(e){let t=(M?.view(e)??e).form;if(t!==null)return(M?.view(t)??t).elements;let n=(M?.view(e)??e).getRootNode();return n.nodeType===9?(M?.view(n)??n).getElementsByName((M?.view(e)??e).name):(M?.view(n)??n).querySelectorAll(`input[type=\"radio\"]`)}function Mo(e){let t=(M?.view(e)??e).name,n=jo(e);for(let r=0;r<n.length;r++){let i=n[r];i!==e&&(M?.view(i)??i).checked&&i.localName===`input`&&(M?.view(i)??i).type===`radio`&&(M?.view(i)??i).name===t&&(M?.view(i)??i).form===(M?.view(e)??e).form&&E.push(Sa,i,`checked`,!0)}}function No(e,t){E.push(Sa,e,`selected`,(M?.view(e)??e).selected),t&&E.push(Sa,e,`defaultSelected`,(M?.view(e)??e).defaultSelected)}var Po=null;function Fo(e,t){let n=Po;if(n!==null)for(let r of n){let n=r.block;if(n.forSlot===e||n.exclusiveMarkers&&n.startMarker===e.start&&n.endMarker===e.end)for(let e of r.nodes)(t??=new Set).add(e)}let r=D.retired;if(r!==null)for(let n of r){if(n.forSlot!==e)continue;let r=n.startMarker;r!==null&&r===n.endMarker&&(t??=new Set).add(r)}return t}function Io(e,t){let n=D!==null&&!Ra;n&&Ja(e);let r=t!==void 0&&n?Fo(t,null):null,i=[],a=e.startMarker,o=e.endMarker;if(a&&o){let t=(M?.view(a)??a).parentNode;if(t!==null){let s=e.exclusiveMarkers,c=s?F(a):a,l=s?o:F(o);if(r===null)for(;c!==null&&c!==l;){let e=F(c);n||(M?.view(t)??t).removeChild(c),i.push(c),c=e}else for(;c!==null&&c!==l;){let e=F(c);r.has(c)||(n||(M?.view(t)??t).removeChild(c),i.push(c)),c=e}}}(Po??=[]).push({block:e,nodes:i})}function Lo(){return E!==null}function Ro(e){return E!==null&&ka.has(e)}function zo(e){let t=ka;if((t.get(e)??-1)>=Aa)return;if(t.set(e,E.length),D!==null&&(D.hydrating===!0&&I()!==null||e.adopt!==null)){Ua(()=>{t.delete(e)}),Ga(N(e.start).parentNode,e.start,e.end);return}let n=[];for(let t=e.head;t!==null;t=t.nextSibling)n.push(t);let r=null,i=0;for(let t of e.items.values())r===null&&n[i]!==t&&(r=n.slice(0,i)),r?.push(t),i++;r===null&&i!==n.length&&(r=n.slice(0,i));let a={empty:e.emptyBlock,mapOrder:r};Ua(()=>{Vo(e,a,n),ka.delete(e)})}function Bo(e){let t=ka,n=e.items;t.set(e,E.length);let r={head:e.head,tail:e.tail,size:e.size,empty:e.emptyBlock,entries:n};Ua(()=>{Vo(e,r,null),t.delete(e)}),e.items=new Map}function Vo(e,t,n){let r=n===null?t.entries:null,i=n===null?null:new Set(n);for(let t=e.head;t!==null;t=t.nextSibling)(r!==null||!i.has(t))&&j(t,!1);if(N(e.end).parentNode===null)return;if(e.head=n===null?t.head:n[0]??null,e.tail=n===null?t.tail:n[n.length-1]??null,e.size=n===null?t.size:n.length,r!==null)e.items=r;else{let r=n;e.items.clear();for(let e=0;e<r.length;e++){let t=r[e];t.nextSibling=r[e+1]??null,t.prevSibling=r[e-1]??null}let i=t.mapOrder??r;for(let t=0;t<i.length;t++){let n=i[t];e.items.set(n.key,n)}}let a=[];for(let t=e.head;t!==null;t=t.nextSibling){let e=Ho(t);if(e!==null)for(let t of e)a.push(t);else if(t.startMarker!==null&&t.startMarker===t.endMarker)a.push(t.startMarker);else for(let e of Uo(t))a.push(e)}if(e.emptyBlock!==t.empty&&(e.emptyBlock!==null&&j(e.emptyBlock,!1),e.emptyBlock=t.empty),N(e.end).parentNode===null)return;if(t.empty!==null){let e=Ho(t.empty)??Uo(t.empty);for(let t of e)a.push(t)}let o=N(e.end).parentNode,s=new Set(a);D!==null&&Fo(e,s);let c=F(e.start);for(;c!==null&&c!==e.end;){let e=F(c);s.has(c)||(M?.view(o)??o).removeChild(c),c=e}let l=e.end;for(let e=a.length-1;e>=0;e--){let t=a[e];((M?.view(t)??t).parentNode!==o||F(t)!==l)&&(Vs===null?(M?.view(o)??o).insertBefore(t,l):Ex(o,t,l,Vs)),l=t}}function Ho(e){let t=Po;if(t===null)return null;for(let n=0;n<t.length;n++)if(t[n].block===e){let e=t[n].nodes;return t.splice(n,1),e}return null}function Uo(e){let t=[],n=e.startMarker,r=e.endMarker;if(!n||!r||(M?.view(n)??n).parentNode===null)return t;let i=e.exclusiveMarkers,a=i?F(n):n,o=i?r:F(r);for(;a!==null&&a!==o;)t.push(a),a=F(a);return t}function Wo(e,t){E.push(ya,e,t,null),Eo()}function Go(e,t){E.push(ba,e,t,(M?.view(e)??e).getAttribute(t)),Eo()}function Ko(e){return!e.hasResolved||e.hiddenDom!==null||!(e.transitionHeld||(e.tryBlock?.pendingMode??T?.currentRenderMode)===`transition`)?-1:(E??=[],ka??=new Map,ja.push(Aa),Pa.push(Ma),Aa=E.length,Ma=++Na,Fa++,E.length)}function qo(e){e<0||(Aa=ja.pop(),Ma=Pa.pop(),--Fa===0&&(E=null,ka=null,Jo()))}function Jo(){let e=Po;if(e!==null){Po=null;for(let t=0;t<e.length;t++)Yo(e[t])}}function Yo(e){try{j(e.block,!1)}finally{for(let t of e.nodes)(M?.view(t)??t).parentNode!==null&&N((M?.view(t)??t).parentNode).removeChild(t)}}function Xo(e,t){if(e<0)return;let n=E;if(n===null)return;let r=Ia;Ia=!0;try{for(let r=n.length-4;r>=e;r-=4){let e=n[r+1],i=n[r+2],a=n[r+3];switch(n[r]){case ya:(M?.view(e)??e).nodeValue=i;break;case ba:a===null?(M?.view(e)??e).removeAttribute(i):(M?.view(e)??e).setAttribute(i,a);break;case Sa:(M!==null&&e?.nodeType!==void 0?M?.view(e)??e:e)[i]=a;break;case Da:e.extra=a,e.props=i;break;case Ca:$a(e,i);break;case Ea:e.delete(i);break;case wa:!e.disposed&&(e===t||Tc(t,e))&&rl(e,t);break;case Ta:e();break;case Oa:a===void 0?e.delete(i):e.set(i,a);break;default:for(let t of Reflect.ownKeys(e))!Object.prototype.hasOwnProperty.call(i,t)&&Object.prototype.propertyIsEnumerable.call(e,t)&&delete e[t];for(let t of Reflect.ownKeys(i))(typeof t!=`symbol`||!Reflect.set(e,t,i[t])&&!Object.is(e[t],i[t]))&&(e[t]=i[t]);a!==null&&(e.length=a),ka.delete(e)}}n.length=e}finally{Ia=r}}var Zo=null;function Qo(e){ki+=e,ki<0&&(ki=0),Ri++;try{for(let e of Ai)try{e()}catch(e){console.error(e)}}finally{Ri--}}var $o=0,es=1,ts=2,ns=[[],[],[]],rs=[],is=[],as=!1,os=0,ss=[],cs=[];function ls(e){e._reapply(),fp(e._currentRef,e)}var k=null,us=null;function ds(){return{rootTransaction:!1,renderRoot:null,renderedBlocks:null,effects:[[],[],[]],events:[],eventActions:[],refs:[],detaches:void 0,stores:[],suspenseCommits:void 0,renderCleanups:void 0}}var fs=rs,ps=is,ms=new Set;function hs(){if(ms.size!==0)for(let e of ms)e._reapply()}var gs=0,_s=null,vs=50,ys=0;function bs(){return Kr>0||Xr>0||Zr>0}var xs=class extends Error{};function Ss(){return new xs(w(1))}function Cs(e){if(e.disposed)return;let t=T===e;T!==null&&!t&&Ri===0&&Qr===0&&(e.crossRenderUpdate=!0);let n=oi>0||t&&e.currentRenderMode===`transition`||!ii&&nh===0&&si>0?`transition`:`urgent`,r=Oi||t&&e.currentRenderDeferred;if(hc?.schedulePending(e),e.pending){n===`urgent`&&(e.pendingMode=`urgent`,e.pendingDeferred=!1);return}qr===ts&&!ii||(bs()?(e.nestedUpdateChain!==ys&&(e.nestedUpdateChain=ys,e.nestedUpdateCount=0),++e.nestedUpdateCount>vs&&(e.nestedUpdateError=!0)):T===null&&(ys++,e.nestedUpdateChain=ys,e.nestedUpdateCount=0,e.nestedUpdateError=!1)),e.pending=!0,e.pendingMode=n,e.pendingDeferred=r,ti.push(e),!ii&&(ri||(ri=!0,queueMicrotask(Ps)))}var ws=0,Ts=25;function Es(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n===t)return!0;return!1}function Ds(e){let t=null,n=0,r=0,i=ni;try{for(;n<ti.length;){let a=ti[n++];if(!Es(a,e)){ti[r++]=a;continue}if(!(!a.pending&&!a.nestedUpdateError||a.disposed)){try{if(a.nestedUpdateError)throw a.nestedUpdateError=!1,Ss();let e=(t??=new Map).get(a)??0,n=a.crossRenderUpdate;if(e>=(n?vs:Ts))throw n?Ss():Error(w(9));t.set(a,e+1),a.crossRenderUpdate=!1,A(a)}catch(e){Rb(a,e)}i!==ni&&(i=ni,n=0,r=0)}}}finally{if(i===ni){for(;n<ti.length;)ti[r++]=ti[n++];ti.length=r,ni++}}}function Os(e,t){let n=-t;for(let t=0;t<e.length;t++){let r=e[t];if(r.drainStamp===n)continue;let i=r,a=0;for(;i!==null&&i.drainStamp!==n;)a++,i=i.parentBlock;for(a+=i===null?-1:i.drainRenders,i=r;i!==null&&i.drainStamp!==n;)i.drainStamp!==void 0&&(i.drainStamp=n,i.drainRenders=a),a--,i=i.parentBlock}return e.sort(ks),e}function ks(e,t){return e.drainRenders-t.drainRenders}var As=null;function js(){As??={find:lb,holdsNativeRead:Ms,reveal:xb,hidePending:tb,visible:zy,rehide:Xb,retryActivity:$b}}function Ms(e){for(let t of zi){let n=t.tryBlock;if(t.transitionHeld&&t.hiddenDom===null&&n!==null&&(n===e||Tc(n,e)||Tc(e,n)))return!0}return!1}function Ns(){let e=null,t=null,n=++ws;ti.length>1&&Os(ti,n);for(let r=0;r<ti.length;r++){let i=ti[r];if(!i.pending&&!i.nestedUpdateError)continue;if(i.pending=!1,i.disposed){i.nestedUpdateError=!1;continue}let a=i.idState.renderOwner?.transaction;if(a?.aborted===!0)continue;let o=a?.retired;if(o!=null&&o.size!==0){let e=i;for(;e!==null&&!o.has(e);)e=e.parentBlock;if(e!==null)continue}let s=i.crossRenderUpdate;i.crossRenderUpdate=!1;let c=As,l=c===null?null:c.find(i,!0,i.pendingMode??`urgent`),u=null,d=null,f=null;l!==null&&(l.__kind===`trySlotSlot`?l.hiddenDom===null?f=l:d=l:u=l);let p=Va(i.idState.renderOwner),m=null;try{if(i.kind===`root`&&!i.mounted&&eo(i),i.nestedUpdateError)throw i.nestedUpdateError=!1,Ss();if(i.drainStamp===n){if(++i.drainRenders>(s?vs:Ts))throw s?Ss():Error(w(9))}else i.drainStamp=n,i.drainRenders=1;if(d!==null){c.reveal(d,i.pendingMode??`urgent`);continue}if(u!==null&&u.pendingThenable!==null){c.retryActivity(u,!0);continue}let e=ci;m=e===null?null:e.begin(i);try{if(u!==null)c.retryActivity(u,!1,i);else if(f!==null)c.visible(f,i);else{let e=i.idState.renderOwner;if(e!==void 0&&e.current===i&&e.request!==null){let t=e.request;e.request=null;let n=i.pendingMode??`urgent`;i.pendingMode=null,t(n)}else A(i)}}finally{e!==null&&e.end(m)}}catch(t){try{Rb(i,t,m)}catch(t){let n=i.idState.renderOwner?.transaction;n!=null&&no(n);let r=t instanceof df&&Object.prototype.hasOwnProperty.call(t,`failure`)?t.failure:t;Ix(i,r)||(e===null?e={err:r,all:[r]}:(e.all.push(r),e.err=typeof AggregateError==`function`?AggregateError(e.all,w(13)):e.all[0]));let a=i;for(;a.parentBlock!==null;)a=a.parentBlock;a.kind===`root`&&!a.disposed&&(t instanceof df&&a.idState.renderOwner!==void 0?(a.idState.renderOwner.preservePresentation=!0,Gr.get(a)?.()):j(a))}}finally{Ha(p),u!==null&&(t??=new Set).add(u)}}if(ti.length=0,ni++,t!==null)for(let e of t)As.rehide(e);return io(),ui?.flush(),e}function Ps(){if(ri=!1,ai){(ti.length>0||La.length>0)&&!ri&&(ri=!0,queueMicrotask(Ps));return}if(Cc()||ec.length!==0||cs.length!==0||ms.size!==0||Wi.length!==0||Zo!==null)try{if(Zo?.routeFlush()===!0)return;Ys()}catch(e){if(gs===0)throw e;(_s??=[]).push(e)}}function Fs(e){try{let t=e.activeElement;if(t===e.body&&(t=t?.shadowRoot?.activeElement??null,t===null))return null;for(;t!==null;){if(t.localName===`iframe`){let e;try{e=t.contentDocument}catch{break}if(e===null)break;let n=e.activeElement;if(n===null)break;t=n;continue}let e=t.shadowRoot?.activeElement;if(e==null)break;t=e}return t}catch{return null}}function Is(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch((M?.view(e)??e).type){case`text`:case`search`:case`tel`:case`url`:case`password`:return!0}return!1}function Ls(e,t,n,r,i){let a=e,o=null,s=0,c=-1,l=-1,u=0,d=0;selection:for(;;){for(;;){if(a===t&&(n===0||a.nodeType===3)&&(c=s+n),a===r&&(i===0||a.nodeType===3)&&(l=s+i),c!==-1&&l!==-1)break selection;a.nodeType===3&&(s+=(M?.view(a)??a).nodeValue.length);let e=P(a);if(e===null)break;o=a,a=e}for(;;){if(a===e||(o===t&&++u===n&&(c=s),o===r&&++d===i&&(l=s),c!==-1&&l!==-1))break selection;let f=F(a);if(f!==null){a=f;break}a=o,o=(M?.view(a)??a).parentNode}}return c===-1||l===-1?null:{focused:e,start:c,end:l,contentEditable:!0}}function Rs(e){let t=Fs(e);if(t===null||t===t.ownerDocument.body)return null;if(Is(t)){let e=t;return{focused:t,start:(M?.view(e)??e).selectionStart??0,end:(M?.view(e)??e).selectionEnd??0,contentEditable:!1}}if(t.contentEditable===`true`||(M?.view(t)??t).getAttribute(`contenteditable`)===`true`){let e=t.ownerDocument.getSelection();if(e!==null&&e.anchorNode!==null&&e.focusNode!==null&&(M?.view(t)??t).contains(e.anchorNode)&&(M?.view(t)??t).contains(e.focusNode)){let n=e.anchorNode,r=e.focusNode;if(n===r&&n.nodeType===3){if(n===P(t))return{focused:t,start:e.anchorOffset,end:e.focusOffset,contentEditable:!0};if((M?.view(n)??n).nodeValue.length<256){let r=t.ownerDocument.createRange();r.selectNodeContents(t),r.setEnd(n,e.anchorOffset);let i=r.toString().length;return{focused:t,start:i,end:i+e.focusOffset-e.anchorOffset,contentEditable:!0}}}let i=Ls(t,n,e.anchorOffset,r,e.focusOffset);if(i!==null)return i}}return{focused:t,start:-1,end:-1,contentEditable:!1}}function zs(e,t){let n=e.ownerDocument.createTreeWalker(e,4),r=n.nextNode(),i=null;for(;r!==null;){let e=(M?.view(r)??r).textContent?.length??0;if(t<=e)return[r,t];t-=e,i=r,r=n.nextNode()}return i===null?[e,0]:[i,(M?.view(i)??i).textContent?.length??0]}function Bs(e){if(e===null)return;let{focused:t}=e,n=t.ownerDocument;if(Fs(n)===t||!(M?.view(t)??t).isConnected)return;if(e.start!==-1){if(e.contentEditable){let r=n.getSelection();if(r!==null){let[i,a]=zs(t,e.start),[o,s]=zs(t,e.end),c=n.createRange();c.setStart(i,a),c.collapse(!0),r.removeAllRanges(),r.addRange(c),r.extend(o,s)}}else{let n=t;(M?.view(n)??n).setSelectionRange(e.start,Math.min(e.end,(M?.view(n)??n).value.length))}}let r=[],i=(M?.view(t)??t).parentElement;for(;i!==null;)r.push({element:i,left:(M?.view(i)??i).scrollLeft,top:(M?.view(i)??i).scrollTop}),i=(M?.view(i)??i).parentElement;(M?.view(t)??t).focus();for(let e=0;e<r.length;e++){let t=r[e];N(t.element).scrollLeft=t.left,N(t.element).scrollTop=t.top}}var Vs=null,Hs=null;function Us(){if(ti.length===0)return null;let e=ti[0].parentNode.ownerDocument;if(e===null)return null;let t=Rs(e),n=null;for(let r=1;r<ti.length;r++){let i=ti[r].parentNode.ownerDocument;if(i===null||i===e||n?.includes(i))continue;(n??=[e]).push(i);let a=Rs(i);a!==null&&(t===null?t=a:Array.isArray(t)?t.push(a):t=[t,a])}return t}function Ws(e){if(Array.isArray(e))for(let t=0;t<e.length;t++)Bs(e[t]);else Bs(e)}function Gs(e){if(e===null&&Vs===null)return Ns();let t=Vs,n=Hs;Vs=e,Hs=null;try{return Ns()}finally{try{Ks()}finally{Hs=n,Vs=t}}}function Ks(){if(Hs!==null)for(let e=0;e<Hs.length;e++){let t=Hs[e],n=t.snapshot;if(n.contentEditable){let e=n.focused.ownerDocument,t=e.getSelection();if(t!==null&&Fs(e)===n.focused){let[r,i]=zs(n.focused,n.start),[a,o]=zs(n.focused,n.end);if(t.anchorNode!==r||t.anchorOffset!==i||t.focusNode!==a||t.focusOffset!==o){let n=e.createRange();n.setStart(r,i),n.collapse(!0),t.removeAllRanges(),t.addRange(n),t.extend(a,o)}}}for(let e=0;e<t.ancestors.length;e++){let n=t.ancestors[e];N(n.element).scrollLeft=n.left,N(n.element).scrollTop=n.top}}}function qs(e,t){let n=null;if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r].focused.ownerDocument===e.ownerDocument){n=t[r];break}}else t.focused.ownerDocument===e.ownerDocument&&(n=t);if(n===null||!(M?.view(e)??e).contains(n.focused))return;if(Hs!==null){for(let e=0;e<Hs.length;e++)if(Hs[e].snapshot===n)return}let r=[];for(let e=N(n.focused).parentElement;e!==null;e=(M?.view(e)??e).parentElement)r.push({element:e,left:(M?.view(e)??e).scrollLeft,top:(M?.view(e)??e).scrollTop});(Hs??=[]).push({snapshot:n,ancestors:r})}function Js(e){for(let t=0;(ti.length>0||La.length>0)&&t<Qs;t++){Xs();let t=ti.length===0?null:Us(),n=Gs(t);t!==null&&Ws(t),n!==null&&e===null&&(e=n),yc()}return e}function Ys(){ai=!0;let e=Wi.length>0,t=Zo,n=t?.shouldClearTypesAfterFlush()===!0;try{ti.length>0&&Xs();let e=ti.length===0?null:Us(),t=Gs(e);if(e!==null&&Ws(e),yc(),hc?.capturing()!==!0&&(ti.length>0||La.length>0)&&(t=Js(t)),t!==null)throw t.err}finally{ai=!1,(e||Wi.length>0)&&(Wi.length=0),n&&t.clearTypes()}}function Xs(){if(ns[ts].length>0||Rc.length>0){if(hc?.holdPassivesBeforeRender()===!0)return;Sc()}}function Zs(e){if(ai)return Ze(e);Zo?.interrupt();let t=ii;ii=!0;try{let t=Ze(e);ai=!0;let n=null;try{ti.length>0&&Xs();let e=ti.length===0?null:Us();n=Gs(e),e!==null&&Ws(e),yc(),(ti.length>0||La.length>0)&&(n=Js(n))}finally{ai=!1}if((ti.length>0||La.length>0)&&!ri&&(ri=!0,queueMicrotask(Ps)),n!==null)throw n.err;return t}finally{ii=t}}var Qs=50;function $s(e,t,n){up?.(e.block,n);let r={ref:t,el:n,block:e.block};if((k===null?cs:k.refs).push(r),k===null&&Yn!==null){let t=e.block.idState.renderOwner;t!==void 0&&Yn.stampQueuedPublication(t,r)}}var ec=[];function tc(e,t){if(e==null||ic(t))return;if(t!==null&&Yn?.unpublishedRef(t,e)){Yn.forgetUnpublishedRef(t);return}let n=t===null?void 0:lp?.get(t);if(n?.hidden&&n.connected!==e)return;let r=D?.aborted&&!Ra?null:k;(r===null?ec:r.detaches??=[]).push(e,t,hl,gl)}function nc(e,t){e!=null&&Object.prototype.propertyIsEnumerable.call(Object(e),`ref`)&&e.ref!=null&&tc(e.ref,t)}var rc=null;function ic(e){if(e===null)return!1;for(let t=rc;t!==null;t=t.parent)if(t.elements.has(e))return!0;return!1}function ac(e,t){if(e===null||e.length===0)return t();let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].el;r!==null&&n.add(r)}if(n.size===0)return t();let r=rc;rc={elements:n,parent:r};try{return t()}finally{rc=r}}function oc(){if(ec.length===0)return;let e=ec.splice(0);for(let t=0;t<e.length;t+=4)try{Xr++;try{fp(e[t],null,e[t+1])}finally{Xr--}}catch(n){if(n instanceof xs)throw n;let r=e[t+2],i=e[t+3];r===null?Ix(i,n)||console.error(n):Mx(i,n,r(n))}}function sc(){if(cs.length===0)return;let e=cs.splice(0);if(e.length>1){let t=e[0].block?.parentBlock??null;for(let n=1;n<e.length;n++)if((e[n].block?.parentBlock??null)!==t){e.sort(Oc);break}}for(let t of e){if(dc(t.block))continue;if(Yn!==null&&!Yn.publicationCurrent(t)){Yn.deferRef(t,t.el,t.ref===ls?t.el._currentRef:t.ref);continue}let e=lp?.get(t.el);if(e!==void 0&&db(t.block)!==null){e.hidden=!0;continue}try{Yn?.forgetUnpublishedRef(t.el),Xr++;try{fp(t.ref,t.el)}finally{Xr--}}catch(e){if(e instanceof xs)throw e;let n=Lb(t.block);n?Mx(t.block,e,n(e)):Ix(t.block,e)||console.error(e)}}}var cc=null,lc=!1;function uc(e=null){let t=cc,n=lc;cc=e,lc=!0;try{oc(),sc()}finally{let e=cc;if(cc=t,lc=n,e!==null){Xr++;try{for(let[t,n]of e)n.block.disposed||Object.is(t.value,n.previous)||Cs(n.block)}finally{Xr--}}}}function dc(e){let t=e;for(;t!==null;){if(t.disposed)return!0;t=t.parentBlock}return!1}function fc(e,t,n){return e!==null&&e.get(t)===n}function pc(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i],o=a.block;if(o===t||o!==null&&Tc(t,o)){n.set(a.el,a.ref===ls?a.el._currentRef:a.ref);continue}e[r++]=a}e.length=r}function mc(e,t=new Map){return pc(cs,e,t),k!==null&&pc(k.refs,e,t),hc?.discardRefs(e,t),t}var hc=null,gc=null;function _c(e,t){if(t===void 0)return;let n=e.owners.get(t);if(n===void 0){let r={generation:t.generation,current:t.current,guard:()=>!t.disposed&&t.generation===r.generation};n=r,e.owners.set(t,n)}return n.guard}function vc(){return E!==null&&!Ra&&!Ia}function yc(){if(hc?.stageEffects()===!0)return;if(rs.length===0&&is.length===0&&ns[$o].length===0&&ns[es].length===0&&ec.length===0&&cs.length===0&&ss.length===0&&Zn===null&&ms.size===0&&!ig()){if(hc?.defer(null,null)===!0)return;(ns[ts].length>0||Rc.length>0)&&hc?.beforeCommit(),(ns[ts].length>0||Rc.length>0)&&!as&&bc();return}hc?.beforeCommit();let e=Yn?.pauseLifecycle()??-1;Jr++;try{wc();let e=Lc();Tg();let t=Pc();if(hc?.defer(t,e)===!0)return;uc(),hs(),t!==null&&Fc(t),e!==null&&Fx(e),Er(),Vc(),(ns[ts].length>0||Rc.length>0)&&!as&&bc()}finally{e>=0&&Yn.resumeLifecycle(e),kc()}}function bc(){as=!0,Yc(xc)}function xc(){as=!1,Ic()}function Sc(){as=!1,Gc(),Ic()}function Cc(){return ti.length>0||La.length>0||ui?.hasWork()===!0||rs.length>0||is.length>0||ns[$o].length>0||ns[es].length>0||ns[ts].length>0||Rc.length>0||ss.length>0||Zn!==null||ig()}function wc(){if(rs.length===0)return;let e=rs.splice(0);for(let t=0;t<e.length;t++){let n=e[t],r=n.block;if(!n.cell.active||Yn?.publicationCurrent(n)===!1||dc(r))continue;let i=lb(r,!0);if(r.renderStatus===Mr||i!==null){if(i!==null&&i.__kind===`trySlotSlot`){ql(i,()=>{n.cell.active&&!dc(r)&&r.effectEventRenderVersion===n.renderVersion&&r.effectEventCompletedVersion===n.renderVersion&&(n.cell.impl=n.nextImpl)});continue}r.effectEventRenderVersion===n.renderVersion&&r.effectEventCompletedVersion===n.renderVersion&&(n.cell.impl=n.nextImpl)}}}function Tc(e,t){for(let n=t.parentBlock;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function Ec(e,t,n,r){if(e!==n&&e!==null&&n!==null){let i=e.parentBlock,a=n.parentBlock;if(i===n)return-1;if(a===e)return 1;if(i===a)return t-r;for(let t=a;t!==null;t=t.parentBlock)if(t===e)return 1;for(let e=i;e!==null;e=e.parentBlock)if(e===n)return-1}return t-r}function Dc(e,t){return e.scope===t.scope?e.order-t.order||e.seq-t.seq:Ec(e.scope.block,e.seq,t.scope.block,t.seq)}function Oc(e,t){return Ec(e.block,0,t.block,0)}function kc(){if(--Jr!==0||Yr===null)return;let e=Yr;Yr=null;for(let{block:t,error:n,handler:r}of e)Ac(t,n,r)}function Ac(e,t,n){if(Jr>0){(Yr??=[]).push({block:e,error:t,handler:n});return}let r=n===void 0?Lb(e):n;if(r!==null){Mx(e,t,r(t));return}let i=e;for(;i!==null&&i.parentBlock!==null;)i=i.parentBlock;i!==null&&i.kind===`root`&&!i.disposed&&(j(i),oc()),Ix(e,t)||console.error(t)}function jc(e){let t=e.scope.hooks?.get(e.slot);if(t===void 0||t.revision!==e.revision||!Nc(e,t))return;let n=e.fn===null,r=t.cleanup;if(n&&(t.connectedFn=null,t.connectedArgs=void 0,t.disconnected=!1),r){t.cleanup=void 0;try{ei(r,e.phase,e.scope)}catch(t){if(t instanceof xs)throw t;Ac(e.scope.block,t)}}}function Mc(e){if(e.fn===null)return;let t,n=e.scope.hooks?.get(e.slot);if(n!==void 0&&n.revision===e.revision&&Nc(e,n)){n.connectedFn=e.fn,n.connectedArgs=e.args,n.disconnected=!1;try{let n=qr;qr=e.phase,Kr++;try{t=Ln||e.scope.block.idState.renderOwner?.signalOwner!==void 0?xr(e.scope,()=>e.fn.apply(null,e.args)):e.fn.apply(null,e.args)}finally{Kr--,qr=n}}catch(t){if(t instanceof xs)throw t;Ac(e.scope.block,t);return}typeof t==`function`&&(n.cleanup=t)}}function Nc(e,t){return Yn?.publicationCurrent(e)!==!1||(D!==null&&Do(t),t.deps=void 0,t.active=t.connectedFn!==null,!e.scope.block.idState.renderOwner?.disposed&&!dc(e.scope.block)&&Cr(e.scope.block),!1)}function Pc(){let e=ns[$o],t=ns[es];if(e.length===0&&t.length===0)return null;let n=e.length===0?t.splice(0):t.length===0?e.splice(0):e.splice(0).concat(t.splice(0));n.sort(Dc);let r=n.length,i=0;for(;i<r;){let e=n[i].scope,t=i+1;for(;t<r&&n[t].scope===e;)t++;for(let e=i;e<t;e++){let t=n[e];t.phase===$o&&!t.scope.block.disposed&&jc(t)}for(let e=i;e<t;e++){let t=n[e];t.phase===$o&&!t.scope.block.disposed&&Mc(t)}for(let e=i;e<t;e++){let t=n[e];t.phase===es&&!t.scope.block.disposed&&(t.fn===null||!Ql(t.scope.block))&&jc(t)}i=t}return n}function Fc(e){for(let t=0;t<e.length;t++){let n=e[t];n.phase===es&&(n.scope.block.disposed||Ql(n.scope.block)||Mc(n))}}function Ic(){Jr++;try{zc();let e=ns[ts];if(e.length===0)return;let t=e.splice(0);t.sort(Dc);for(let e=0;e<t.length;e++){let n=t[e];n.scope.block.disposed||n.fn!==null&&Ql(n.scope.block)||jc(n)}for(let e=0;e<t.length;e++){let n=t[e];n.scope.block.disposed||Ql(n.scope.block)||Mc(n)}}finally{kc()}}function Lc(){if(is.length===0)return null;let e=is.splice(0),t=null;for(let n=0;n<e.length;n++)try{let r=e[n]();r!==void 0&&(t??=[]).push(r)}catch(e){console.error(e)}return t}var Rc=[];function zc(){if(Rc.length===0)return;let e=Rc.splice(0);for(let t=0;t<e.length;t+=3)try{ei(e[t],ts,e[t+2])}catch(n){if(n instanceof xs)throw n;let r=e[t+1],i=e[t+2];Ac(i,n,r)}}function Bc(e){try{return!Object.is(e.value,e.getSnapshot())}catch{return!0}}function Vc(){if(ss.length===0)return;let e=ss.splice(0);Zr++;try{for(let t=0;t<e.length;t++){let n=e[t];n.queued=!1,!(n.block.disposed||Ql(n.block))&&(n.value=n.pending,Bc(n)&&n.forceUpdate())}}finally{Zr--}}var Hc=[],Uc=null,Wc=0;function Gc(){Hc.length!==0&&(Hc=[],Wc++,Uc!==null&&(clearTimeout(Uc),Uc=null))}function Kc(e){if(e!==void 0&&e!==Wc)return;let t=Hc;if(t.length!==0){Gc();for(let e=0;e<t.length;e++)t[e]()}}var qc;function Jc(){if(qc===void 0){if(typeof MessageChannel>`u`)qc=e=>setTimeout(()=>Kc(e),0);else{let e=new MessageChannel;e.port1.onmessage=e=>Kc(e?.data),qc=t=>e.port2.postMessage(t)}}return qc}function Yc(e){if(Hc.push(e),Hc.length!==1)return;let t=Jc(),n=++Wc,r=typeof document<`u`&&document.visibilityState===`hidden`,i=typeof requestAnimationFrame==`function`;Uc=setTimeout(()=>Kc(n),r||!i?0:250),!r&&i&&requestAnimationFrame(()=>{t(n)})}var Xc=class{constructor(e,t,n,r,i,a,o,s,c){this.body=a,this.props=o,this.extra=s,this.outputHandler=c,this.memoInChain=a?.__memo===!0||t!==null&&t.memoInChain===!0,this.parentNode=n,this.parentBlock=t,this.idState=t?.idState??{prefix:``,next:0},this.startMarker=r,this.endMarker=i,this.exclusiveMarkers=!1,this.itemIndex=0,this.pending=!1,this.disposed=!1,this.mounted=!1,this.renderStatus=Mr,this.pendingMode=null,this.currentRenderMode=null,this.pendingDeferred=!1,this.currentRenderDeferred=!1,this.inactive=!1,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxDirect=null,this.$$ctxDepsEpoch=-1,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.$$implicitBail=!1,this.__thenableIdx=0,this.drainStamp=0,this.drainRenders=0,this.crossRenderUpdate=!1,this.nestedUpdateChain=-1,this.nestedUpdateCount=0,this.nestedUpdateError=!1,this.effectEventRenderVersion=0,this.effectEventCompletedVersion=0,this.deoptNode=null,this.deoptRefs=!1,this.slots=[],this.compilerMemo=null,this.forSlot=null,this.prevSibling=null,this.nextSibling=null,this.key=null,this.vt=null,this.parent=null,this.block=this,this.kind=e,this.createdStamp=0,this.__warmEpisode=void 0,this.__thenableDone=void 0,this.__thenables=void 0,this.$$tryHandler=void 0,this.__suspenseHandler=void 0,this.__trySlot=void 0,this.__activitySlot=void 0,this.__warmCache=void 0,this.__warmCacheEpisode=void 0,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}},Zc=class{constructor(e,t){this.block=t,this.parent=e,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.mounted=!1,this.slots=[],this.compilerMemo=null,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}};function Qc(e,t,n,r,i,a,o,s,c=null){let l=new Xc(e,t,n,r,i,a,o,s,c);return t!==null&&l.idState.renderOwner===D?.owner&&eo(l),l}var $c=null,el=null;function tl(e,t){let n=el??=new Map;n.has(e)||n.set(e,{value:e.value,queue:e[t]?.slice(),key:t})}function A(e){if(Ln||e.idState.renderOwner?.signalOwner!==void 0){let t=br(e);if(t!==void 0&&Rn?.(t),t!==void 0&&Le()!==t){Be(t,()=>A(e));return}}let t=I();if(t!==null&&(!t.owns(e)||e.kind===`dynamic`&&e.endMarker!==null&&t.isFresh(e.endMarker))){t.suspend(()=>A(e));return}let n=$c,r=el;$c=e,el=null;try{let t=0;for(;sl(e);){if(e.nestedUpdateError)throw e.nestedUpdateError=!1,Ss();if(++t>Ts)throw Error(w(9))}Ln&&e.__trySlot?.tryBlock===e&&e.__trySlot.retrySignalOwners!==void 0&&cr(e.__trySlot);let i=el;if(i!==null&&n!==null&&Tc(n,e)){r??=new Map;for(let[e,t]of i)r.has(e)||r.set(e,t)}}catch(t){let n=el;if(n!==null){for(let[e,t]of n)e.value=t.value,e[t.key]=t.queue;e.crossRenderUpdate||(e.pending=!1)}throw e.idState.renderOwner?.signalOwner!==void 0&&!e.mounted&&e.forSlot!==null&&e.forSlot.items.get(e.key)!==e&&lr(e,t),t}finally{$c=n,el=r}}function nl(e){hc?.recordStageEntry(e),ps.push(e)}function rl(e,t=null){if(!e.disposed)for(let n=e;n!==null&&(n.block===n&&(n.renderStatus=Nr,n.forSlot!==null&&(n.forSlot.cachedDeps=null)),!(n===t||t===null&&n.inactive));n=n.parentBlock);}function il(e,t){if(e.rootTransaction===!0)return;let n=e.renderRoot??=t;(t===n||Tc(n,t))&&(e.renderedBlocks??=new Set).add(t)}function al(e,t){let n=new Map;for(let r of Wi)for(let i of r){if(i.block!==e||i.superseded)continue;let r=n.get(i.slot);r===void 0?(n.set(i.slot,t.cells.length),t.cells.push({update:i,baseValue:i.baseValue,value:i.slot.value,hook:void 0})):t.cells[r].update=i}for(let e of t.cells)e.hook=Wl(e.update),e.hook===null&&(e.update.slot.value=e.baseValue)}function ol(e,t){for(let n=t.cells.length-1;n>=0;n--){let r=t.cells[n];r.hook!==void 0&&(r.hook===null?!e.disposed&&!r.update.superseded&&Object.is(r.update.slot.value,r.baseValue)&&(r.update.slot.value=r.value):Gl(r.hook))}e.disposed||e.pending&&e.pendingMode===`urgent`||t.cells.length!==0&&t.cells.every(e=>e.update.superseded)||(e.pending=!0,e.pendingMode=`transition`,e.pendingDeferred=t.pendingDeferred,t.queueEpoch!==ni&&!ti.includes(e)&&ti.push(e))}function sl(e){e.renderStatus===Nr&&(e.renderStatus=Pr),k!==null&&k.rootTransaction!==!0&&il(k,e),E!==null&&E.push(wa,e,null,null);let t=Ir,n=T,r=Lr,i=Rr,a=Hr,o=Br.length,s=fs,c=ps,l=k?.events??s,u=k?.eventActions??c,d=l.length,f=u.length;Ir=e,T=e,Lr=e.effectSlots===null?0:zr++,Rr=0;let p=n!==null&&Od(n,e),m=e.pending&&e.pendingMode===`transition`&&p&&n.currentRenderMode===`urgent`?ci:null,h=m===null?null:{pendingDeferred:e.pendingDeferred,queueEpoch:ni,cells:[]};if(p)Hr===0&&(Hr=Vr++);else{let t=n===null&&md?e.__warmEpisode:void 0;Hr=typeof t==`number`?t:Vr++}e.__warmEpisode=Hr,fs=l,ps=u,e.effectEventRenderVersion!==0&&e.effectEventRenderVersion++,e.pending=!1,e.crossRenderUpdate=!1,e.__thenableIdx=0;{let t=e.__thenables;t!==void 0&&t.length!==0&&(!md||e.__thenableDone===!0)&&(t.length=0),e.__thenableDone=!1}if(e.$$ctxReads!==null&&e.$$ctxReads.clear(),e.$$ctxDirect!==null){let t=e.slots[0];t?.__kind===`hydrateBlockSlot`&&t.parentBlock===e&&!t.independent&&!t.hydrated&&(t.contextChanged=e.$$ctxDepsEpoch!==rt()&&Hv(e)),e.$$ctxDirect.clear()}e.$$ctxDepsEpoch=rt(),e.currentRenderMode=h===null?e.pendingMode??n?.currentRenderMode??`urgent`:`urgent`,e.currentRenderDeferred=h===null?e.pendingMode===null?n?.currentRenderDeferred??!1:e.pendingDeferred:!1,e.pendingMode=null,e.pendingDeferred=!1;let g,_=!1,v=!1;Yn?.beginRender(e),Xn?.get(e)?.clear();try{h!==null&&m.beginUrgent(e,h);let t=e.body(e.props,e,e.extra);if(e.pending&&!e.crossRenderUpdate)return v=!0,!0;e.outputHandler!==null&&(t!==void 0||e.slots[0]?.returnedOutput===!0)&&e.outputHandler(e,t??null),e.effectSlots!==null&&eu(e),e.mounted||=!0,e.renderStatus===Pr&&(e.renderStatus=Mr),e.effectEventRenderVersion!==0&&(e.effectEventCompletedVersion=e.effectEventRenderVersion),_=!0,e.__thenableDone=!0}catch(e){if(typeof e==`object`&&e)try{typeof e.then==`function`&&(e=new ld(e))}catch{}throw g=e,e}finally{if(!_){if(v&&(e.renderStatus=Nr),e.renderStatus!==Nr){let t=null,n=ud(g);if(n||!$u(g)){for(let r=e;r!==null;r=r.parentBlock)if(n?r.__suspenseHandler:r.$$tryHandler&&r.__trySlot?.catchBody!==null){t=r;break}}rl(e,t)}l.length=d,u.length=f}fs=s,ps=c,Br.length=o,Hr=a,Lr=r,Rr=i,Ir=t,T=n;try{Yn?.endRender(e,_,ud(g))}finally{h!==null&&m.endUrgent(e,h)}}}var cl=null;function ll(e,t){e.returnedOutput!==t&&(E!==null&&!Ra&&E.push(Sa,e,`returnedOutput`,e.returnedOutput),e.returnedOutput=t)}function ul(e,t){let n=[t?.end,t?.block?.endMarker,t?.hostNode,t?.text,e.endMarker,N(e.parentNode).lastChild];for(let t=0;t<n.length;t++){let r=n[t];if(r!=null&&(M?.view(r)??r).parentNode===e.parentNode)return r}return null}function dl(e,t,n){let r=cl;cl=e;try{if(n===!0){let t=e.slots[0];t!==void 0&&fl(e,t);return}let r=t!==null&&t.$$kind===dn&&t.key==null&&typeof t.type==`function`,i=e.slots[0],a=null,o=null,s=r&&(t.type.$$singleRoot===!0||I()?.passthroughRanges===!0||i!==void 0&&i.__kind===`componentSlotSlot`&&i.currentComp===t.type);if(i!==void 0&&i.__kind!==(s?`componentSlotSlot`:`childSlot`)){let n=ci,r=e.currentRenderMode===`transition`,s=n!==null&&I()===null&&Bb(e),c=D===null||s?n:null,l=c!==null&&!r&&I()===null&&s;if(c!==null&&I()===null&&(r||l)){let n=ul(e,i);if(n!==null){let r=c.render(e,e.parentNode,n,Bx,t,dl);if(c.dispose(r.wip),r.failed)throw r.error;if(r.suspended)throw new ld(r.suspended)}}if(D!==null&&!i.inherited&&!i.borrowed&&i.ownerHost==null){let t=i.start??i.hostNode??i.text??i.block?.startMarker??i.end??null,n=i.end??i.block?.endMarker??t;Wb(e,t,n)&&(a=t,o=n)}if(fl(e,i),e.disposed)return}if(s){let n=t;S_(e,0,e.parentNode,n.type,n.props,e.endMarker,n.key??void 0,!0,void 0,I()!==null&&Gg(n),n.__octaneInvocationSite)}else{let n=I();if(n!==null&&e.slots[0]===void 0&&e.startMarker!==null&&e.endMarker!==null&&e.startMarker!==e.endMarker&&e.startMarker.nodeType===8&&e.endMarker.nodeType===8&&(F(e.startMarker)===e.endMarker||n.isUnframedRootRange(e.startMarker,e.endMarker))){let t={__kind:`childSlot`,start:e.startMarker,end:e.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null};e.slots[0]=t,xl(e,t)}Iv(e,0,e.parentNode,t,e.endMarker)}if(a!==null){let t=e.slots[0],n=t.start??t.hostNode??t.text??t.block?.startMarker??t.end??null,r=t.end??t.block?.endMarker??n;Ub(e,a,o,n,r)}let c=e.slots[0];!e.disposed&&c!==void 0&&c.returnedOutput!==!0&&(E!==null&&!Ra&&E.push(Sa,c,`returnedOutput`,c.returnedOutput),c.returnedOutput=!0)}finally{cl=r}}function fl(e,t){let n=t.__kind,r=(n===`ifBlockSlot`||n===`switchBlockSlot`)&&t.start===null&&t.block?.endMarker!=null?t.block.endMarker:t.end,i=D;if(i!==null&&!i.aborted&&!Ra){let n=t.ownerHost??e.parentNode,i=t.inherited===!0||t.borrowed===!0,a=t.ownerHost!=null||i&&t.start===null?P(n):i?F(t.start):t.start??t.hostNode??t.text??t.block?.startMarker??r??null;i&&a===r&&(a=null);let o=a===null?null:t.ownerHost!=null||i&&r===null?(M?.view(n)??n).lastChild:i?N(r).previousSibling:r??t.block?.endMarker??a;Wa(t,n,i?t.start:a===null?(M?.view(n)??n).lastChild:(M?.view(a)??a).previousSibling,i?r:(M?.view(o)??o)?.nextSibling??null);let s=t.block??t.portal?.block;if(s!=null&&Ja(s),t.forSlot!=null){for(let e=t.forSlot.head;e!==null;e=e.nextSibling)Ja(e);t.forSlot.emptyBlock!==null&&Ja(t.forSlot.emptyBlock)}Xa(n,a,o,()=>Ol(t,!1)),O(e.slots,0,e.slots[0]);let c=e._slots;if(c!==null){let e=c.indexOf(t);e!==-1&&(Ua(()=>c.splice(e,0,t)),c.splice(e,1))}e.slots[0]=void 0;return}if(n===`childSlot`){if(t.portal&&=(zg(t.portal),null),t.forSlot){for(let e=t.forSlot.head;e!==null;e=e.nextSibling)j(e,!0);t.forSlot.emptyBlock&&j(t.forSlot.emptyBlock,!0),t.forSlot=null}N_(t),t.borrowed||(N(t.start)?.remove(),N(r)?.remove())}else n===`componentSlotSlot`?t.block&&j(t.block,!0):Ol(t,!0),!t.inherited&&!t.borrowed&&(N(t.start)?.remove?.(),N(r)?.remove?.());let a=e._slots;if(a!==null){let e=a.indexOf(t);e!==-1&&a.splice(e,1)}e.slots[0]=void 0}var pl=class{constructor(e,t,n){this.parentNode=e,this.endMarker=t,this.parentBlock=n,this.$$ctxValues=null,this.idState=n.idState,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}},ml=0,hl=null,gl=null,_l=null;function vl(e){hl===null?Ix(gl,e)||console.error(e):(_l??=[]).push(e)}function yl(){let e=_l,t=hl,n=gl;if(_l=null,hl=null,gl=null,e!==null&&t!==null)for(let r=0;r<e.length;r++)Mx(n,e[r],t(e[r]))}function j(e,t=!0){if(!e.disposed&&(Ra&&D!==null&&(D.retainedCreated?.has(e)||D.hydrating&&e.kind!==`portal`)&&(t=!1),!Za(e,t))){ml===0&&(hl=Lb(e.parentBlock)??Xu(e),gl=e),ml++;try{bl(e,t)}finally{--ml===0&&yl()}}}function bl(e,t){e.disposed=!0;let n=e.idState.renderOwner;n?.current===e&&(n.generation++,n.wakeable=null,n.request=null,n.transition!==void 0&&ci.discardRoot(n)),Zo?.unregister(e),e.deoptNode!==null&&e.deoptRefs&&rx(e.deoptNode,null);let r=t&&(e.kind===`root`||e.startMarker!==null&&e.endMarker!==null&&N(e.startMarker).parentNode!==null);if(Cl(e,t&&!r),n?.current===e&&Yn?.clearDeferredRefs(n),t){if(e.startMarker&&e.endMarker){let t=N(e.startMarker).parentNode;if(t){let n=e.exclusiveMarkers,r=n?F(e.startMarker):e.startMarker,i=n?e.endMarker:F(e.endMarker);for(;r&&r!==i;){let e=F(r);(M?.view(t)??t).removeChild(r),r=e}}}else if(e.kind===`root`){let t;for(;(t=P(e.parentNode))!==null;)N(e.parentNode).removeChild(t)}}}function xl(e,t){let n=e._slots,r=D;r!==null&&e.mounted&&!Qa(r,e.block)&&Ua(()=>{Ol(t,!0);let r=e.slots.indexOf(t);if(r!==-1&&(e.slots[r]=void 0),n===null)e._slots=null;else{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}),n===null?e._slots=[t]:n.push(t)}var Sl=1;function Cl(e,t=!0){let n=e.effectSlots;if(n!==null)for(let t=0;t<n.length;t++){let r=n[t],i=r.cleanup;if(i!==void 0){if(r.cleanup=void 0,r.phase===ts)Rc.push(i,hl,gl),as||bc();else{if(gc!==null&&hc.stageTeardown(i,r.phase,e)===!0)continue;try{ei(i,r.phase,e)}catch(e){vl(e)}}}}let r=null;e.mounted!==!0&&(r=[],nx(e,r)),ac(r,()=>{El(e,t)})}function wl(e,t){let n=e.cleanups;if(n!==null){for(let t=n.length-1;t>=0;t--)if(gc===null||hc.stageTeardown(n[t],-1,e)!==!0)try{$r(n[t],e)}catch(e){vl(e)}}let r=$n.get(e);if(r){if(er?.owners.has(r)||gc!==null&&hc.stageAction(()=>{t?$n.set(e,null):$n.delete(e),rr(r)},!0))return;t?$n.set(e,null):$n.delete(e),rr(r)}else if(t&&r===!1){if(gc!==null&&hc.stageAction(()=>Tl(e),!0))return;Tl(e)}}function Tl(e){let t=$n.get(e);t===!1?$n.set(e,null):t&&($n.set(e,null),rr(t))}function El(e,t,n=!0){wl(e,n),Dl(e,t)}function Dl(e,t){let n=e.children;if(n!==null)for(let e=0,r=n.length;e<r;e++)Cl(n[e].scope,t);let r=e._slots;if(r!==null)for(let e=0,n=r.length;e<n;e++){let n=r[e];Ol(n,t)}}function Ol(e,t){(e.__flags&Sl)!==0&&e.__teardown(e,t);let n=e.__kind;if(n===`ifBlockSlot`||n===`switchBlockSlot`||n===`activityBlockSlot`)e.block&&j(e.block,t);else if(n===`forBlockSlot`){for(let n=e.head;n!==null;n=n.nextSibling)j(n,t);e.emptyBlock&&j(e.emptyBlock,t)}else if(n===`hydrateBlockSlot`)e.block&&j(e.block,t);else if(n===`childSlot`){if(e.block&&j(e.block,t),e.forSlot){for(let n=e.forSlot.head;n!==null;n=n.nextSibling)j(n,t);e.forSlot.emptyBlock&&j(e.forSlot.emptyBlock,t)}e.portal&&zg(e.portal),e.hostNode!=null&&rx(e.hostNode,null)}else{let r=n===`portalSlotSlot`||t;e.block&&j(e.block,r),n===`portalSlotSlot`&&e.target&&(Pg(e.target,e),eh(e.target))}}function kl(e){throw Error(w(15,e))}var Al=[],jl=null;function Ml(e,t,n){let r=jl??={pending:Al[Al.length-1],active:!1},i=r.pending,a=r.active;r.pending=void 0,r.active=!0;try{if(i===void 0)return Reflect.apply(e,t,n);switch(n.length){case 0:return e.call(t,i);case 1:return e.call(t,n[0],i);case 2:return e.call(t,n[0],n[1],i);case 3:return e.call(t,n[0],n[1],n[2],i);case 4:return e.call(t,n[0],n[1],n[2],n[3],i);default:{let r=Array(n.length+1);for(let e=0;e<n.length;e++)r[e]=n[e];return r[n.length]=i,e.apply(t,r)}}}finally{r.pending=i,r.active=a}}function Nl(e,t,...n){let r=jl,i=r?.pending,a=r?.active??!1;r!==null&&(r.pending=e,r.active=!1),Al.push(e);try{return t(...n)}finally{Al.pop(),jl!==null&&(jl.pending=r===null?Al[Al.length-1]:i,jl.active=a)}}function Pl(e,t){let n=typeof t==`number`?String(t):t.description??``;return e+(typeof t==`number`?`n`:`s`)+n.length+`:`+n}function Fl(e){let t=Al.length;return t===0?e:e===void 0&&t===1?Al[0]:l(Al,e,!1)}function Il(e,t,n,r){r=Fl(r),(r===void 0||Ir===null)&&kl(e);let i=Ir,a=i.hooks?.get(r);if(a===void 0){a={nativeValue:t()},qn(i).set(r,a);let e=a.nativeValue;Jn(i,()=>n(e))}return a.nativeValue}wn(()=>Ir===null?null:Il);function Ll(e,t){let n=Rl(e,t,arguments.length===1);return[n.value,n.setter]}function Rl(e,t,n){t===void 0&&typeof e==`symbol`&&n&&(Al.length===0||jl?.active===!0)&&(t=e,e=void 0),t=Fl(t),t===void 0&&kl(`useState`);let r=Ir,i=T,a=r.hooks?.get(t);if(a===void 0&&(a={value:typeof e==`function`?e():e,setter:e=>{if(i.disposed)return;if(a.pendingActionBatch!==void 0&&Si()===null&&Hl(a,e),(a.updates!==void 0||a.renderTransition!==void 0||typeof e==`function`&&ki>0&&ci?.hasHeld(a,i)||i.pending&&typeof e==`function`)&&Si()===null){T===i&&tl(a,`updates`),(a.updates??=[]).push(e),Cs(i);return}let t=wi(a,i),n,r=!1;try{n=typeof e==`function`?e(t):e}catch{if(Si()===null){T===i&&tl(a,`updates`),(a.updates??=[]).push(e),Cs(i);return}n=t,r=!0}let o=r||a.updates!==void 0||a.renderTransition!==void 0||a.pendingActionBatch!==void 0||i.pending&&typeof e==`function`;if(Object.is(n,t)&&!o){typeof e!=`function`&&ci?.cancelEqual(a,i)&&Cs(i);return}let s=Ti(a,i,e,n,o);if(s!==null){s.state===void 0&&(s.state=a,Vl(s,a));return}if(lc&&Xr>0&&!o){let e=cc??=new Map,t=a;if(!e.has(t)){let n={block:i,previous:a.value};e.set(t,n)}a.value=n;return}T===i&&tl(a,`updates`),a.value=n,i.disposed,Cs(i)},updates:void 0,renderTransition:void 0,urgentTransition:void 0,getter:void 0,pendingActionBatch:void 0,pendingActionValue:void 0},qn(r).set(t,a)),a.renderTransition!==void 0||a.updates!==void 0){let e=zl(a);!a.urgentTransition&&a.updates!==void 0&&Object.is(e,a.value)&&ci?.rebaseHeld(a,i,a.updates),a.value=e,a.urgentTransition||(a.renderTransition!==void 0&&(Ul(a.renderTransition,a.value),a.renderTransition=void 0),a.updates=void 0)}return a}function zl(e){let t=e.renderTransition,n=t===void 0?e.value:Bl(t,e.urgentTransition===!0);if(e.updates!==void 0)for(let t of e.updates)n=typeof t==`function`?t(n):t;return n}function Bl(e,t,n){let r=e;for(;r.previous!==void 0;)r=r.previous;let i=r.replayBaseValue;for(let a=r;;a=a.next){if(a.stateUpdates!==void 0)for(let e of a.stateUpdates)i=typeof e==`function`?e(i):e;if(a.reducerActions!==void 0)for(let e of a.reducerActions)i=n(i,e);if((t||a.superseded)&&a.urgentOperations!==void 0)for(let e of a.urgentOperations)i=a.operations[e](i);else if(!t&&!a.superseded)for(let e of a.operations)i=e(i);if(a===e)return i}}function Vl(e,t){e.replayBaseValue=t.value;let n=t.renderTransition??ci?.heldUpdate(t,e.block);n!==void 0&&(e.previous=n,n.next=e),e.state===void 0?e.reducerActions=e.reducer.renderPhaseActions?.slice():e.stateUpdates=e.state.updates?.slice()}function Hl(e,t){let n=e.pendingActionBatch.updates.get(e);n!==void 0&&((n.urgentOperations??=[]).push(n.operations.length),n.operations.push(typeof t==`function`?t:()=>t),n.forceRender=!0)}function Ul(e,t){for(let n=e;n;n=n.previous)n.value=t,n!==e&&Object.is(t,n.baseValue)&&(n.superseded=!0)}function Wl(e){let t=e.state??e.reducer;return e.block.disposed||e.superseded||t===void 0||t.renderTransition===void 0?null:(t.urgentTransition=!0,t.value=e.baseValue,{update:e,cell:t})}function Gl(e){let{update:t,cell:n}=e;if(n.urgentTransition=!1,t.block.disposed||t.superseded){n.renderTransition=void 0;return}for(let e=t;e;e=e.previous)e.baseValue=n.value}var Kl=null;function ql(e,t){let n=Kl??=new WeakMap,r=n.get(e);r===void 0&&(r={entries:[],live:0},n.set(e,r));let i={action:t,active:!0,queue:r};return r.entries.push(i),r.live++,i}function Jl(e,t){let n=t.queue;return Kl?.get(e)!==n||!t.active?null:(t.active=!1,--n.live===0&&Kl.delete(e),t.action)}function Yl(e,t){let n=t.queue;Jl(e,t)!==null&&n.live!==0&&n.entries.length>n.live*2&&(n.entries=n.entries.filter(e=>e.active))}function Xl(e){let t=Kl?.get(e);if(t===void 0)return;let n=t.entries;if(e.__kind===`activityBlockSlot`){let t=n.length;for(let r=0;r<t;r++){let t=n[r];t.active&&nl(()=>{let n=Jl(e,t);if(n!==null)return n()})}return}Kl.delete(e);for(let e=0;e<n.length;e++){let t=n[e];t.active&&nl(t.action)}}function Zl(e,t,n=!1){if(e===void 0||t===void 0)return!0;let r=e.length;if(r!==t.length){if(!n)return!0;r=Math.min(r,t.length)}for(let n=0;n<r;n++)if(!Object.is(e[n],t[n]))return!0;return!1}function Ql(e){for(let t=e;t!==null;t=t.parentBlock)if(t.inactive)return!0;return!1}function $l(){return Lr===0&&(Lr=zr++),Lr}function eu(e){let t=e.effectSlots;if(t!==null&&Lr!==0&&Rr!==t.length)for(let n=0;n<t.length;n++){let r=t[n];if(r.renderVersion===Lr||(r.phase===$o&&hb(r),!r.active))continue;D!==null&&Do(r),r.deps=void 0,r.active=!1;let i=++r.revision,a=k===null?ns[r.phase]:k.effects[r.phase];a.push({scope:e,slot:r.slot,fn:null,order:r.order,revision:i,args:void 0,phase:r.phase,seq:os++}),gb(r,r.phase,a)}}function tu(e,t,n,r){let i=Ir,a=i.hooks?.get(e);r===$o&&(a===void 0?dp?.(i.block):hb(a));let o=$l(),s=a!==void 0&&a.renderVersion!==o;if(s&&(Rr++,a.renderVersion=o),r!==$o&&Ql(i.block)){rl(i.block),a&&!a.active&&(D!==null&&Do(a),a.active=!0,a.revision++);return}if(a){let e=Zl(a.deps,n,!0);if(a.active&&!e)return;D!==null&&Do(a);let t=!1;if(a.active||(a.active=!0,a.revision++,t=!0),!e)return;s&&!t&&a.revision++}let c;if(a)a.deps=n,c=a;else{if(D!==null){let t=i.effectSlots,n=t?.length??0;Ua(()=>{i.hooks?.delete(e),t===null?i.effectSlots=null:t.length=n})}Rr++;let t={deps:n,cleanup:void 0,renderVersion:o,revision:0,active:!0,order:i.effectSlots===null?0:i.effectSlots.length,effect:!0,phase:r,slot:e,connectedFn:null,connectedArgs:void 0,disconnected:!1};qn(i).set(e,t),i.effectSlots===null?i.effectSlots=[t]:i.effectSlots.push(t),c=t}let l={scope:i,slot:e,fn:t,order:c.order,revision:c.revision,args:n,phase:r,seq:os++},u=k===null?ns[r]:k.effects[r];u.push(l),gb(c,r,u)}function nu(e,t,n){return n===void 0&&typeof t==`symbol`&&(n=t,t=void 0),t===null&&(t=void 0),n=Fl(n),n===void 0&&kl(e),[t,n]}function ru(e,t,n){let[r,i]=nu(`useEffect`,t,n);tu(i,e,r,ts)}function iu(e,t,n){let[r,i]=nu(`useLayoutEffect`,t,n);tu(i,e,r,es)}function au(e,t){return t.warmEpisode!==Hr&&Td(e,t.deps,t)&&(t.warmEpisode=Hr),t}function ou(e,t,n){let r=jd(t,n);if(r===xd)return null;let i={deps:n,value:r.value,warmEpisode:Hr,warmRecord:void 0,nativeWitness:void 0};return Ui!==null&&oa(e,t,i),qn(e).set(t,i),Ed(r,i),i}function su(e,t,n,r,i){let a={deps:n,value:r,warmEpisode:void 0,warmRecord:void 0,nativeWitness:i};return Ui!==null&&oa(e,t,a),qn(e).set(t,a),n!==void 0&&Td(t,n,a)&&(a.warmEpisode=Hr),r}var cu=Object.is;function lu(e,t){let n=e.compilerMemo;return n!==null&&n.bodyId===t?n:uu(e,t,n)}function uu(e,t,n){if(n===null)return e.compilerMemo={bodyId:t,auto:void 0,hooks:void 0,overflow:null};let r=n.overflow;r===null&&(n.overflow=r=new Map);let i=r.get(t);return i===void 0&&(i={bodyId:t,auto:void 0,hooks:void 0,overflow:null},r.set(t,i)),i}function du(e){return Array(e).fill(null)}function fu(e,t,n){return Ui!==null&&sa(e,t,[!0,n]),e[t+1]=n,e[t]=!0,n}function pu(e,t,n,r){return Ui!==null&&sa(e,t,[!0,r,n]),e[t+2]=n,e[t+1]=r,e[t]=!0,n}function mu(e,t){t===void 0&&typeof e==`symbol`&&arguments.length===1&&(Al.length===0||jl?.active===!0)&&(t=e,e=void 0),t=Fl(t),t===void 0&&kl(`useRef`);let n=Ir,r=n.hooks?.get(t);return r===void 0&&(r={current:e},qn(n).set(t,r)),r}function hu(e,t){let n=[],r,i=!1;function a(e){if(e!=null){if(Array.isArray(e)){for(let t=0;t<e.length;t++)a(e[t]);return}if(i||=(r=t(),!0),typeof e==`function`){let t=e(r);n.push(typeof t==`function`?t:()=>e(null))}else{let t=e;t.current=r,n.push(()=>{t.current=null})}}}function o(){let e,t=!1;for(let r of n)try{r()}catch(n){t||=(e=n,!0)}if(n.length=0,t)throw e}try{a(e)}catch(e){try{o()}finally{throw e}}return o}function gu(e,t,n,r){let[i,a]=nu(`useImperativeHandle`,n,r);n=i,r=a;let o=n===void 0?void 0:[...n,e];tu(r,()=>{if(Array.isArray(e))return hu(e,t);let n;return typeof e==`function`?n=e(t()):e!=null&&(e.current=t()),()=>{if(typeof n==`function`){n();return}typeof e==`function`?e(null):e!=null&&(e.current=null)}},o,es)}var _u=new Map;function vu(e){let t=_u.get(e);if(t===void 0){let n=Pl(`@octane:uses:`,e);t={inst:Symbol.for(n+`:uses:inst`),effect:Symbol.for(n+`:uses:effect`)},_u.set(e,t)}return t}function yu(e,t,n){e.pending=t,e.subscribe=n,!e.queued&&(e.queued=!0,(k===null?ss:k.stores).push(e))}function bu(e,t){return Bc(e)&&e.forceUpdate(),t(e.onStoreChange)}function xu(e){let t=oi,n=si;oi=0,si=0;try{Cs(e)}finally{oi=t,si=n}}function Su(e,t,n=void 0,r){let i=arguments.length,a=i>4?arguments[i-1]:i===4?r:n;a=Fl(a),a===void 0&&kl(`useSyncExternalStore`);let o=i>=4?n:void 0,s=vu(a),c=(I()!==null&&o!==void 0?o:t)(),l=Ir,u=l.hooks?.get(s.inst);if(u===void 0){let n=T,r={value:c,getSnapshot:t,pending:c,subscribe:e,effectDeps:null,forceUpdate:()=>xu(n),onStoreChange:()=>{n.disposed||(T!==null||!n.pending||n.pendingMode!==`urgent`||n.pendingDeferred)&&Bc(r)&&r.forceUpdate()},block:n,queued:!1};u=r,r.effectDeps=[r,e],qn(l).set(s.inst,u),yu(u,c,e)}else u.getSnapshot=t,(!Object.is(c,u.value)||e!==u.subscribe)&&yu(u,c,e);return u.effectDeps[1]!==e&&(u.effectDeps=[u,e]),ru(bu,u.effectDeps,s.effect),c}function Cu(e){let t=function(e,n){return Tu(t,e,n)};return wu(t,e)}function wu(e,t){return e.$$kind=mn,e.defaultValue=t,e.$$version=0,Sn(e),e}function Tu(e,t,n){let r=e,i=n;Au(i,r,t.value);let a=t.children;if(a!=null){let e=typeof a==`function`?a[ju]??a:2,t=i.hooks?.get(Ru);if(t!==e){if(t!==void 0&&(t===2||e===2)){if(zu(i),i.block.disposed)return}else if(t!==void 0&&(Ou(i),E!==null&&!Ra)){let e=i.hooks;Ua(()=>e.set(Ru,t))}qn(i).set(Ru,e)}Du(Iu(a),void 0,i,void 0)}}var Eu=null;function Du(e,t,n,r){let i=Eu;Eu=n;try{return e(t,n,r)}finally{Eu=i}}function Ou(e){let t=e.slots[0];e===e.block&&e.block.outputHandler!==null&&(t?.__kind===`childSlot`||t?.__kind===`componentSlotSlot`||t?.__kind===`ifBlockSlot`||t?.__kind===`switchBlockSlot`||t?.__kind===`activityBlockSlot`)&&ll(t,!0);let n=e.compilerMemo;if(n!==null&&(ku(n),n.overflow!==null))for(let e of n.overflow.values())ku(e)}function ku(e){e.auto!==void 0&&(E!==null&&!Ra&&E.push(Sa,e,`auto`,e.auto),e.auto=void 0)}function Au(e,t,n){e.$$ctxValues===null&&(e.$$ctxValues=new Map);let r=e.$$ctxValues,i=r.has(t),a=i?r.get(t):void 0;i&&Object.is(a,n)||(D!==null&&Ua(()=>{i?r.set(t,a):r.delete(t)}),i&&(t.$$version++,it()),r.set(t,n))}var ju=Symbol.for(`octane.childrenBody`),Mu=Symbol.for(`octane.childrenCaptures`);function Nu(e){return e.$$singleRoot=!0,e}function Pu(e,t,n){return typeof e==`function`&&(e[gn]=!0,t!==void 0&&(e[ju]=t),n!==void 0&&(e[Mu]=n)),e}function Fu(e){return typeof e==`function`&&e[gn]===!0}function Iu(e){return typeof e==`function`?e:(t,n)=>{Iv(n,0,n.block.parentNode,e,n.block.endMarker)}}function Lu(e){return qg.has(e)?(t,n,r)=>Iu(e.children)(void 0,n,r):Iu(e.children)}var Ru=Symbol(`octane.childrenDialect`);function zu(e,t=!0){let n=e.block;ml===0&&(hl=Lb(n.parentBlock)??Xu(n),gl=n),ml++;try{El(e,t,!1);let r=n.startMarker;t&&ax(r===null?P(n.parentNode):F(r),n.endMarker),e.children=null,e.cleanups=null,e._slots=null,e.effectSlots=null,e.hooks=null,e.slots=[],e.compilerMemo=null,e.refFields=null}finally{--ml===0&&yl()}}`${ce}`;var Bu=null,Vu=0;function Hu(e){let t=null;for(let n=e;n!==null;n=n.parentBlock){if(n.block!==n)continue;let e=n.slots[0];e?.__kind===`hydrateBlockSlot`&&!e.hydrated&&Bu?.has(e)&&(t=e)}return t}function Uu(e,t){let n=e;for(;t>0;){for(;n.limit!==void 0&&n.next>=n.limit&&n.overflow!==void 0;)n=n.overflow;if(n.limit===void 0||n.overflow===void 0){n.next+=t;return}let e=n.limit-n.next,r=Math.min(t,e);n.next+=r,t-=r}}var Wu=ln(function(e,t){let n=t.block;Ry(t,0,n.parentNode,Lu(e),null,(t,n)=>{Iv(n,1,n.block.parentNode,e.fallback,n.block.endMarker)},n.endMarker)},1,`Suspense`,hn),Gu=ln(function(e,t){let n=t.block,r=Ry(t,0,n.parentNode,Lu(e),(t,n)=>{let r=typeof e.fallback==`function`?e.fallback(t.err,t.reset):e.fallback;Iv(n,1,n.block.parentNode,r,n.block.endMarker)},null,n.endMarker,void 0,!0),i=t.slots[1];i!==e.resetRef&&(i?.current===r&&(i.current=null),t.slots[1]=e.resetRef),e.resetRef&&(e.resetRef.current=r)},1,`ErrorBoundary`);function Ku(e,t){if(typeof e==`object`&&e){let n=Yu(T)?.resolveForeignContext?.(e);if(n!=null)return cd(n);if(e.$$typeof===_n)throw Error(w(18,t))}throw Error(w(12,t))}function qu(e){return e&&e.$$kind===mn?cd(e):Ku(e,`useContext`)}var Ju=Symbol(`octane.ctx.default`);function Yu(e){if(Wr===0)return null;let t=e;for(;t!==null&&t.parentBlock!==null;)t=t.parentBlock;if(t===null)return null;let n=Ur.get(t);return n!==void 0&&n.active?n:null}function Xu(e){let t=Yu(e);return t===null?null:e=>{if(!t.routeError(e))throw e}}function Zu(e){let t=Yu(e);return t===null?null:e=>{if(!t.routeSuspense(e))throw new ld(e)}}var Qu=Symbol.for(`octane.host-context-request`);function $u(e){return typeof e==`object`&&!!e&&e.$$kind===Qu}function ed(e,t){if(e!==null&&e.memoInChain){(e.$$ctxDirect??=new Map).set(t,t.$$version);for(let n=e;n!==null;n=n.parentBlock)(n.body?.__memo===!0||n.$$implicitBail===!0)&&(n.$$ctxReads??=new Map).set(t,t.$$version)}}var td=!1,nd=null;function rd(e){if(e===null)return!1;for(let[t,n]of e)if(t.$$version!==n)return!0;return!1}function id(e,t){for(let[n,r]of e)t!==null&&ed(t,n),td&&(nd??=new Map).set(n,r)}function ad(e){let t=!1,n=null,r=null,i;return()=>{let a=Ir,o=n===a||n!==null&&a!==null&&a.block.parentBlock===n.block&&a.$$ctxValues===null;if(!t||rd(r)||r!==null&&!o){let o=td,s=nd;td=!0,nd=null;let c,l;try{c=e()}finally{l=nd,td=o,nd=s,o&&l!==null&&id(l,null)}n=a,r=l,i=c,t=!0}else n=a,r!==null&&id(r,T);return i}}function od(e,t,n){if(e===null)return;let r=e.$$ctxCache;if(r===null){e.$$ctxCache=t,e.$$ctxCacheOwner=n;return}let i=e.$$ctxCacheOwner;if(i!==null){let a=new Map;a.set(r,i),a.set(t,n),e.$$ctxCache=a,e.$$ctxCacheOwner=null}else r.set(t,n)}function sd(e,t,n){if(td&&(nd??=new Map).set(n,n.$$version),e!==null){let r=e.$$ctxCache,i=r===n?e.$$ctxCacheOwner:r!==null&&e.$$ctxCacheOwner===null?r.get(n):void 0;if(i!=null){if(i===Ju){let e=Yu(t);return e===null?n.defaultValue:e.readContext(n)}return i.$$ctxValues.get(n)}}let r=e;for(;r!==null;){let t=r.$$ctxValues;if(t!==null&&t.has(n))return od(e,n,r),t.get(n);r=r.parent}let i=t?.parentBlock??null;for(;i!==null;){let t=i.$$ctxValues;if(t!==null&&t.has(n))return od(e,n,i),t.get(n);i=i.parentBlock}let a=Yu(t);return a===null?(od(e,n,Ju),n.defaultValue):a.readContext(n)}function cd(e){return ed(T,e),sd(Ir,T,e)}var ld=class{constructor(e){this.thenable=e}thenable;__isSuspense=!0};function ud(e){return typeof e==`object`&&!!e&&e.__isSuspense===!0}function dd(e){try{return e[mt]===!0}catch{return!1}}function fd(e,t=!1){let n=T,r=n.__thenables??=[],i=n.__thenableIdx;n.__thenableIdx=i+1;let a=I();if(!dd(e)&&a!==null&&a.seeds!==null&&a.seedCursor<a.seeds.length)return a.useSeed(e,r,i,t);let o=r[i];if(o===e){if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:new ld(e)}if(o!==void 0&&md&&!t){if(o.status===`fulfilled`)return o.value;throw o.status===`rejected`?o.reason:new ld(o)}if(r[i]=e,pd(e),e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:new ld(e)}function pd(e){e.status===void 0&&(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))}var md=!1;function hd(e,t){Br.push(T,e,t)}var gd=null,_d=!1,vd=0,yd=0,bd=64,xd=Symbol(`octane.warm.miss`),Sd=null;function Cd(e){for(let t=e;t!==null;t=t.parentBlock)if(t.__suspenseHandler)return null;return Ba(e)}function wd(e){for(let t=e;t!==null;t=t.parentBlock){if(t.__warmCacheEpisode!==Hr)continue;let e=t.__warmCache;if(e!==void 0)return e}let t=Cd(e),n=t===null?void 0:Sd?.get(t);return n===void 0&&(n=new Map,t!==null&&(Sd??=new WeakMap).set(t,n)),e.__warmCache=n,e.__warmCacheEpisode=Hr,Hr>vd&&(vd=Hr),n}function Td(e,t,n){let r=T;if(r===null)return!1;let i=null;for(let e=0;e<Br.length;e+=3){let t=Br[e];if(Od(t,r)){i=t;break}}if(i===null)return!1;let a=wd(i),o=a.get(e);o===void 0&&(o=[],a.set(e,o));let s={deps:t,value:void 0,available:!1,source:n};return o.push(s),n.warmRecord=s,_d=!0,!0}function Ed(e,t){`available`in e&&(e.source=t,e.value=void 0,t.warmRecord=e)}function Dd(e){if(_d){if(e.hooks!==null)for(let t of e.hooks.values()){let e=t,n=e?.warmRecord;n!==void 0&&n.source===e&&(n.source=void 0,n.value=e.value,n.available=!0,e.nativeWitness!==void 0&&(n.nativeWitness=e.nativeWitness),e.warmRecord=void 0)}ex(e,Dd)}}function Od(e,t){for(let n=t;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function kd(e,t){if(gd===null||e==null)return;let n=e.__warm;if(typeof n==`function`&&!(yd>=bd)){yd++;try{n(t)}catch{}finally{yd--}}}function Ad(e,t){return Object.defineProperty(e,\"__warm\",{configurable:!0,get(){return this===e?t:void 0}}),e}function jd(e,t,n){let r=Hr<=vd?T:null;for(;r!==null;){let i=r.__warmCache;if(r.__warmCacheEpisode===Hr&&i!==void 0){let r=Md(i,e,t,n);if(r!==xd)return r}r=r.parentBlock}let i=T?.idState.renderOwner?.retryKey,a=i==null?void 0:Sd?.get(i);if(a!==void 0){let r=Md(a,e,t,n);if(r!==xd)return r}let o=T?.idState.renderOwner?.transition,s=(o?.warmHarvest!=null&&Od(o.origin,T)?o.warmHarvest:null)??Gi?.warmHarvest??ta;if(s!=null)for(let r=0;r<s.length;r++){let i=s[r];if(!i.taken&&i.slot===e&&!Zl(i.deps,t)&&(n===void 0||n(i)))return i.taken=!0,i}return xd}function Md(e,t,n,r){let i=e.get(t);if(i!==void 0){for(let e of i)if(e.available&&!Zl(e.deps,n)&&(r===void 0||r(e)))return e.available=!1,e}return xd}function Nd(e,t){let n=Fl(e);return n===void 0&&kl(t),n}function Pd(e,t){let n=Ir,r=n.hooks?.get(e);if(r!==void 0){let n=r.deps;if(n!==void 0&&n.length===1&&Object.is(n[0],t))return au(e,r)}return _d?ou(n,e,[t]):null}function Fd(e,t,n){let r=Ir,i=r.hooks?.get(e);if(i!==void 0){let r=i.deps;if(r!==void 0&&r.length===2&&Object.is(r[0],t)&&Object.is(r[1],n))return au(e,i)}return _d?ou(r,e,[t,n]):null}function Id(e,t,n,r){let i=Ir,a=i.hooks?.get(e);if(a!==void 0){let i=a.deps;if(i!==void 0&&i.length===3&&Object.is(i[0],t)&&Object.is(i[1],n)&&Object.is(i[2],r))return au(e,a)}return _d?ou(i,e,[t,n,r]):null}function Ld(e,t,...n){return su(Ir,e,n,t)}var Rd=Symbol.for(`octane.lazyBodyCheck`),M=null;function N(e){return M===null||e==null?e:M.view(e)}var zd,Bd;function P(e){return M===null?zd===void 0?e.firstChild:zd.call(e):M.view(e).firstChild}function F(e){return M===null?Bd===void 0?e.nextSibling:Bd.call(e):M.view(e).nextSibling}function Vd(e,t,n=!0){t in e||(n?e[t]=void 0:Object.defineProperty(e,t,{value:void 0,writable:!0,configurable:!0}))}var Hd=!1;function Ud(){if(Hd||typeof Element>`u`)return;Hd=!0;let e=Node.prototype;zd=Object.getOwnPropertyDescriptor(e,`firstChild`)?.get,Bd=Object.getOwnPropertyDescriptor(e,`nextSibling`)?.get;let t=Element.prototype;Object.isExtensible(t)&&(Vd(t,`$$portalParent`),Vd(t,`$$portalEnd`),Vd(t,`$$deoptKey`),Vd(t,`$$ctrl`),Vd(t,`__oct_suppress`),Vd(t,`__oct_frag`),Vd(t,`__oct_vfrag`),Vd(t,Xf,!1),Vd(t,Qf,!1),Vd(t,$f,!1),Vd(t,q_,!1),Vd(t,xg,!1)),typeof CharacterData<`u`&&Object.isExtensible(CharacterData.prototype)&&(Vd(CharacterData.prototype,`$$portalEnd`),Vd(CharacterData.prototype,`$$deoptKey`),Vd(CharacterData.prototype,q_,!1))}var Wd=Symbol(`octane.lazy-template`);function Gd(e){for(let t of(M?.view(e)??e).querySelectorAll(`*`))if(t.localName.includes(`-`)||(M?.view(t)??t).hasAttribute(`is`))return e.__oct_frag=!0,e;let t=(M?.view(document)??document).createDocumentFragment(),n;for(;(n=P(e))!==null;)(M?.view(t)??t).appendChild(n);return t.__oct_frag=!0,t}function Kd(e,t,n){Ud();let r=(M?.view(document)??document).createElement(`template`);if(t===0){(M?.view(r)??r).innerHTML=n?`<octane-frag>${e}</octane-frag>`:e;let t=P(r.content);return t.nodeType===1&&t.localName===`octane-frag`?Gd(t):t}let i=t===1?`svg`:`math`;(M?.view(r)??r).innerHTML=`<${i}>${e}</${i}>`;let a=P(r.content);return n?Gd(a):P(a)}function qd(e,t=0,n=0){return{[Wd]:{html:e,ns:t===1?1:t===2?2:t===3?3:0,frag:n,parsed:[null,null,null],root:0}}}function Jd(e){let t;if(e.ns===3){let e=Ir===null?void 0:Np(Ir.block.parentNode);t=e===Op?1:e===kp?2:0}else t=e.ns;let n=e.parsed[t];return n===null&&(n=Kd(e.html,t,e.frag),e.parsed[t]=n),n}var Yd=null;function I(){let e=Yd;return e!==null&&e.isActive()?e:null}function Xd(e){return e.nodeType===1&&e.localName===`style`&&(M?.view(e)??e).hasAttribute(`data-octane`)}var Zd=null;function Qd(e,t,n){if(Zd!==null&&Zd.node!==null){let t=Zd.node;Zd.node=null;let n=e.nodeType===void 0?(M?.view(e)??e)[Wd]:void 0,r=n===void 0?e:Jd(n);if(t.localName===r.localName&&t.namespaceURI===r.namespaceURI){for(let e=P(t);e!==null;e=F(e))rx(e,null);(M?.view(t)??t).replaceChildren();for(let e=P(r);e!==null;e=F(e))(M?.view(t)??t).appendChild((M?.view(e)??e).cloneNode(!0));return t}let i=(M?.view(r)??r).cloneNode(!0),a=Ir.block;return rx(t,null),N((M?.view(t)??t).parentNode).replaceChild(i,t),a.startMarker===t&&(a.startMarker=i),a.endMarker===t&&(a.endMarker=i),a.deoptNode=null,i}let r=e.nodeType===void 0?(M?.view(e)??e)[Wd]:void 0;if(r!==void 0){let e=I();if(e!==null)return e.cloneLazy(r,t);let i=Jd(r);return e===null?(M?.view(i)??i).cloneNode(!0):e.clone(i,t,n)}let i=I();return i===null?(M?.view(e)??e).cloneNode(!0):i.clone(e,t,n)}function $d(e,t,n){if(I()!==null&&e.__oct_vfrag===!0)return;if(lf?.revision!==void 0&&pf(!1),e.nodeType===11){(M?.view(t)??t).insertBefore(e,n);return}let r;for(;(r=P(e))!==null;)(M?.view(t)??t).insertBefore(r,n)}function ef(e,t,n){if(t!==null){let n=e.block,r=I();if(r===null||r.isFresh(t)||(M?.view(t)??t).parentNode!==n.parentNode){let e=n.parentNode;(M?.view(e)??e).insertBefore(t,n.endMarker)}}return e.slots[0]=n,n}function tf(e,t,n,r,i){return ef(e,t,{a:n,b:r,c:i,__journalWindow:0,[oo]:3})}function nf(e,t,n,r,i,a){return ef(e,t,{a:n,b:r,c:i,d:a,__journalWindow:0,[oo]:4})}function rf(e,t,n,r,i,a,o){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,__journalWindow:0,[oo]:5})}function af(e,t,n,r,i,a,o,s){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,__journalWindow:0,[oo]:6})}function of(e,t,n,r,i,a,o,s,c,l,u,d){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,g:c,h:l,i:u,j:d,__journalWindow:0,[oo]:10})}function sf(e,t,n){return ef(e,t,n)}function cf(e){return e==null||e===!1?``:typeof e==`string`?e:String(e)}var lf=null,uf=new WeakMap,df=class extends Error{constructor(e,t,n=lf?.revision){super(w(75)),this.lease=e,this.retry=t,this.revision=n}lease;retry;revision};function ff(e){return e instanceof Ke||e instanceof df}function pf(e=!0){throw new df(lf?.lease,e)}function mf(e){return e.presentations?.every(e=>e.current(e))!==!1}function hf(e){let t=new Set;for(let n of e.presentations??[])uf.delete(n.lease),n.hydration?.retryPresentation&&t.add(n.hydration.retryPresentation);for(let e of t)e()}var gf=Symbol.for(`octane.binding.children-site`);function _f(e,t,n,r){let i=t===null?void 0:e.lease.ranges?.().get(t);return(e.lease.revision?.()!==e.revision||t?.nodeType!==8||t.data!==n||i?.kind!==r||i.end.parentNode!==t.parentNode||I()?.close(t)!==i.end)&&pf(),i}function vf(e,t){let n=t?`[`:`]`;if(e===n||t&&(e===`[f0`||e===`[f1`)||t&&(e.startsWith(ee)||e.startsWith(`[f`))&&se(e))return 1;if(e.length<2||e.charCodeAt(0)!==n.charCodeAt(0))return 0;let r=e.charCodeAt(1);if(r<49||r>57)return 0;let i=r-48;for(let t=2;t<e.length;t++){let n=e.charCodeAt(t)-48;if(n<0||n>9||(i=i*10+n,!Number.isSafeInteger(i)))return 0}return i>=2?i:0}function yf(e){if(e===null||e.nodeType!==8)return!1;let t=(M?.view(e)??e).data;return t===`]`||vf(t,!1)>1}function bf(e){return Yd===null?P(e):(M?.view(e)??e).firstChild}function xf(e,t=1){let n=I();if(n!==null)return n.sibling(e,t);let r=e;for(let e=0;e<t;e++){if(r===null)return null;r=F(r)}return r}var Sf=null,Cf=null;function wf(e,t){if(Sf!==null&&Sf(e,t))return;let n=(M?.view(e)??e).nodeValue;n!==t&&(E!==null&&Wo(e,n),(M?.view(e)??e).nodeValue=t)}function Tf(e,t){Zo?.markDirty(),E!==null&&Wo(e,(M?.view(e)??e).nodeValue);let n=cf(t);Sf!==null&&Sf(e,n)||((M?.view(e)??e).nodeValue=n)}var Ef=Symbol(`octane.direct-signal-binding`);function Df(e){return(typeof e==`object`||typeof e==`function`)&&e!==null&&e[Vn]===!0}function Of(e){return e[Hn]()}function kf(e,t){return Object.assign(t,{[He]:{active:()=>!e.disposed&&!e.scope.block.disposed,prepare:()=>pi(e.scope.block)}})}function Af(e){return Df(e)&&e.kind===`signal`&&typeof e.set==`function`}function jf(e){if(!e.disposed&&hc?.stageAction(()=>jf(e))!==!0){e.disposed=!0;try{e.unsubscribe?.()}finally{mi(e.scope.block),e.controlWriterCleanup?.(),e.input!==void 0&&N(e.target).removeEventListener(`input`,e.input)}}}function Mf(e,t){let n=(M?.view(e)??e).getAttribute(S);if(n===null&&I()===null){(M?.view(e)??e).setAttribute(S,t);return}if(n!==t)throw Error(w(67,t))}function Nf(e,t){E!==null&&Do(e),e.policy.writeBinding(e,t),e.value=t}function Pf(e,t){Ff(e.target,t,`attribute`,void 0,e.name,e.attributeKind)}function Ff(e,t,n,r,i,a){let o=e;return a===`class`?o.namespaceURI===Ap?Lp(o,t):Rp(o,t):a(o,i,t),t}var If={kind:`attribute`,writeBinding:Pf,write:Ff};function Lf(e){if(!(e.disposed||e.pendingControl||e.handle===null||e.scope.block.disposed))try{xr(e.scope,()=>{let t=Of(e.handle);Object.is(e.value,t)||Nf(e,t)})}catch{Cs(e.scope.block)}}function Rf(e,t){e.disposed||(e.handle!==null&&(e.unsubscribe=e.handle[Un](kf(e,()=>Lf(e)))),t!==void 0&&e.policy.control.activate(e,t))}function zf(e,t,n,r,i,a,o,s){i.control?.validateNew(e,t,i.kind);let c=Df(n)?n:null,l={[Ef]:!0,scope:e,policy:i,target:t,site:r,name:a,attributeKind:o,handle:c,value:e,disposed:!1};s!==void 0&&(l.text=s);let u=i.control?.snapshot(t,r)??null,d=c===null?n:Of(c);return l.pendingControl=I()!==null&&Af(c)&&u!==null&&(u.editRevision>0||i.control.restored(t,d)),l.pendingControl&&(l.value=d),l.pendingControl||Nf(l,d),gc===null?Rf(l,u?.revision):hc.stageAction(()=>{xr(e,()=>Rf(l,u?.revision)),Lf(l)}),l.pendingControl&&i.control.adopt(l),Jn(e,()=>jf(l)),l}function Bf(e,t,n,r,i,a,o,s){let c=a.kind,l=typeof t==`object`&&t&&t[Ef]===!0?t:null,u=Df(r)?r:null;if(u!==null&&(!Ln||Le()!==$n.get(e))&&(Ln||pr(),Le()!==br(e)))return xr(e,()=>Bf(e,t,n,r,i,a,o,s));if(u===null&&l===null){if(c===`attribute`&&t===r){let e=r===void 0?I():null;if(e===null||e.isFresh(n))return t}E!==null&&Eo();let e=(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n;return a.write(e,r,c,t,o,s)}if(l!==null&&!l.disposed&&l.target===n&&l.policy===a&&l.site===i&&l.name===o&&l.attributeKind===s&&l.handle===u){if(l.pendingControl)return a.control.adopt(l),l;let e=Of(u);return Object.is(l.value,e)||Nf(l,e),l}if(E!==null&&Eo(),u===null){let e=c===`text`||c===`textOnlyChild`?l?.text??l?.target??n:n,i=a.write(e,r,c,c===`text`||c===`textOnlyChild`?l?.text:l?.value??t,o,s);if(l!==null){let e=e=>{e||jf(l)};k===null?e(!1):(k.renderCleanups??=[]).push(e)}return i}let d=zf(e,(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n,r,i,a,o,s,c===`text`||c===`textOnlyChild`?l?.text??(t instanceof Text?t:void 0):void 0);if(l!==null){let e=e=>jf(e?d:l);k===null?e(!1):(k.renderCleanups??=[]).push(e)}return d}function Vf(e,t,n,r,i,a,o){return t===i&&i!==void 0&&(i===null||typeof i!=`object`&&typeof i!=`function`)?t:Bf(e,t,n,i,a,If,r,o)}function Hf(e,t){let n=t==null?``:String(t),r=P(e);r!==null&&r===(M?.view(e)??e).lastChild&&r.nodeType===3?wf(r,n):(D!==null&&(Eo(),Ga(e,null,null)),(M?.view(e)??e).textContent=n)}var Uf=/(<\\/|<)(s)(cript)/gi;function Wf(e){return e.replace(Uf,(e,t,n,r)=>`${t}${n===`s`?`\\\\u0073`:`\\\\u0053`}${r}`)}var Gf=/\\r\\n?|\\u0000/g;function Kf(e){return e.replace(Gf,e=>e===`\\0`?`�`:`\n`)}function qf(e,t){let n=e.ownerDocument,r=e.namespaceURI,i=r===`http://www.w3.org/2000/svg`||r===`http://www.w3.org/1998/Math/MathML`?(M?.view(n)??n).createElementNS(r,e.tagName):(M?.view(n)??n).createElement(e.tagName);return(M?.view(i)??i).innerHTML=t,(M?.view(i)??i).innerHTML}function Jf(e,t){let n=t==null?``:String(t),r=I();if(r!==null&&!r.isFresh(e)){if((e.localName===`script`?(M?.view(e)??e).textContent??``:(M?.view(e)??e).innerHTML)===(e.localName===`script`?Kf(Wf(n)):qf(e,n))){if(e.localName!==`script`){let t=M?.view(e)??e;O(e,Yf,t[Yf]),t[Yf]=n}return}if(jr(e))return;e.__oct_loc;return}if(e.localName===`script`){Hf(e,n);return}let i=M?.view(e)??e;if(i[Yf]!==n){if(O(e,Yf,i[Yf]),D!==null&&!Ra){Eo(),Ga(e,null,null),Xa(e,P(e),(M?.view(e)??e).lastChild);let t=(M?.view(e)??e).cloneNode(!1);for((M?.view(t)??t).innerHTML=n;P(t)!==null;)(M?.view(e)??e).appendChild(P(t))}else(M?.view(e)??e).innerHTML=n;i[Yf]=n}}var Yf=Symbol(`octane.dangerHTMLValue`),Xf=`__oct_dangerHTML`,Zf=!1,Qf=`__oct_dangerChild`,$f=`__oct_dangerSpreadChild`,ep=`__oct_dangerResolved`,tp=`__oct_dangerResolvedChild`;function np(){return Error(w(5))}function rp(e){if(e!=null&&(typeof e!=`object`||!(`__html`in e)))throw Error(w(6))}function ip(e,t){rp(t),O(e,Xf,(M?.view(e)??e)[Xf]);let n=(M?.view(e)??e)[Xf]===!0;if(t==null){if((M?.view(e)??e)[Xf]=!1,n){Jf(e,null);let t=M?.view(e)??e;t[Yf]!==void 0&&(O(e,Yf,t[Yf]),t[Yf]=void 0)}return}if(t!=null&&_t.has(e.localName))throw Error(w(7,e.localName));if(t!=null&&((M?.view(e)??e)[Qf]===!0||(M?.view(e)??e)[$f]!=null))throw np();(M?.view(e)??e)[Xf]=!0,Zf=!0,Jf(e,t.__html)}function ap(e,t,n=!1){let r=!1,i=null,a=!1,o=null;for(let e of t){let[t,s]=e;if(!t){e.length===2?(r=!0,i=s):s===`dangerouslySetInnerHTML`?(r=!0,i=e[2]):!n&&s===`children`&&(a=!0,o=e[2]);continue}if(!(s==null||typeof s!=`object`&&typeof s!=`function`))for(let e of Object.keys(Object(s)))e===`dangerouslySetInnerHTML`?(r=!0,i=s[e]):!n&&e===`children`&&(a=!0,o=s[e])}let s=r&&i!=null?i:null,c=a?o:null;if(_t.has(e.localName)&&(s!==null||c!=null))throw Error(w(8,e.localName));if(s!==null&&c!=null)throw np();rp(s),!(Ot.call(e,ep)&&Object.is((M?.view(e)??e)[ep],s)&&Object.is((M?.view(e)??e)[tp],c))&&(O(e,$f,(M?.view(e)??e)[$f]),O(e,ep,(M?.view(e)??e)[ep]),O(e,tp,(M?.view(e)??e)[tp]),(M?.view(e)??e)[$f]=c,ip(e,s),(M?.view(e)??e)[ep]=s,(M?.view(e)??e)[tp]=c)}function op(e,t){if(!Zf||e.nodeType!==1||(M?.view(e)??e)[Xf]!==!0)return!1;if(t!=null)throw np();return!0}var sp=new WeakMap,cp=new WeakMap,lp=null,up=null,dp=null;function fp(e,t,n){if(e==null)return;let r=t??n,i=r==null?void 0:lp?.get(r);if(i!==void 0){if(t!==null)i.hidden=!1,i.connected=e;else if(n!=null){if(i.hidden&&i.connected!==e)return;i.connected===e&&(i.connected=null)}}pp(e,t,n)}function pp(e,t,n){if(e!=null){if(typeof e==`function`){if(t===null){let t=sp.get(e),r=n??cp.get(e),i=t!==void 0&&r!=null?t.get(r):void 0;i===void 0?e(null):(t.delete(r),cp.get(e)===r&&cp.delete(e),i())}else{let n=e(t);if(typeof n==`function`){let r=sp.get(e);r===void 0&&sp.set(e,r=new WeakMap),r.set(t,n),cp.set(e,t)}}return}if(Array.isArray(e)){for(let r=0;r<e.length;r++)pp(e[r],t,n);return}e.current=t}}var mp=pn,hp=null,gp=class{_ownerBlock;_startMarker;_endMarker;_destroyed;_children;_pendingChildren;_portalAnchors;_listeners;_observers;_currentRef;constructor(e,t,n){this._ownerBlock=e,this._startMarker=t,this._endMarker=n,this._destroyed=!1,this._children=new Set,this._pendingChildren=new Set,this._portalAnchors=null,this._listeners=null,this._observers=null,this._currentRef=null;for(let e of vp(this))this._children.add(e),this._attachChild(e);ms.add(this)}_destroy(){this._destroyed=!0,ms.delete(this);for(let e of this._children)this._detachChild(e);this._children.clear(),this._pendingChildren.clear(),this._portalAnchors?.clear(),this._portalAnchors=null,this._listeners=null,this._observers=null}_registerPortal(e,t){if(this._destroyed)return;let n=this._portalAnchors??=new Map,r=n.get(t);r===void 0&&n.set(t,r=new Set),r.add(e)}_unregisterPortal(e,t){let n=this._portalAnchors,r=n?.get(t);if(r===void 0||!r.delete(e))return;r.size===0&&n.delete(t),n.size===0&&(this._portalAnchors=null);let i=N(e.start)?.nextSibling??null;for(;i!==null&&i!==e.end;){let e=F(i);(i.nodeType===1||i.nodeType===3)&&this._children.delete(i)&&this._detachChild(i),i=e}}_attachChild(e){if(this._listeners!==null)for(let t of this._listeners)(M?.view(e)??e).addEventListener(t.type,t.listener,t.options);if(e.nodeType===1&&this._observers!==null)for(let t of this._observers)t.observe(e);let t=e;(t.reactFragments??=new Set).add(this)}_detachChild(e){if(this._listeners!==null)for(let t of this._listeners)(M?.view(e)??e).removeEventListener(t.type,t.listener,t.options);e.reactFragments?.delete(this)}_reapply(){if(this._destroyed)return;let e=this._children,t=this._pendingChildren;for(let n of vp(this))t.add(n),e.has(n)||this._attachChild(n);for(let n of e)t.has(n)||this._detachChild(n);e.clear(),this._children=t,this._pendingChildren=e}focus(e){if(!this._destroyed){for(let t of bp(this))if(xp(t,e))return}}focusLast(e){if(this._destroyed)return;let t=Array.from(bp(this));for(let n=t.length-1;n>=0;n--)if(xp(t[n],e))return}blur(){if(this._destroyed)return;let e=this._startMarker.ownerDocument||document,t=e.activeElement;if(t&&t!==e.body){for(let e of yp(this))if(e===t||(M?.view(e)??e).contains(t)){(M?.view(t)??t).blur();return}}}addEventListener(e,t,n){if(this._destroyed)return;let r=_p(n);this._listeners||=[];for(let n of this._listeners)if(n.type===e&&n.listener===t&&_p(n.options)===r)return;this._listeners.push({type:e,listener:t,options:n});for(let r of vp(this))(M?.view(r)??r).addEventListener(e,t,n)}removeEventListener(e,t,n){if(this._destroyed||!this._listeners)return;let r=_p(n);for(let n=this._listeners.length-1;n>=0;n--){let i=this._listeners[n];if(i.type===e&&i.listener===t&&_p(i.options)===r){for(let n of vp(this))(M?.view(n)??n).removeEventListener(e,t,i.options);this._listeners.splice(n,1);return}}}observeUsing(e){if(!this._destroyed){this._observers||=new Set,this._observers.add(e);for(let t of yp(this))e.observe(t)}}unobserveUsing(e){if(!this._destroyed&&this._observers!==null&&this._observers.has(e)){this._observers.delete(e);for(let t of yp(this))e.unobserve(t)}}getClientRects(){let e=[];if(this._destroyed)return e;for(let t of vp(this))if(t.nodeType===3){let n=t.ownerDocument.createRange();if(n.selectNodeContents(t),typeof n.getClientRects!=`function`)continue;let r=n.getClientRects();for(let t=0;t<r.length;t++)e.push(r[t])}else{let n=t.getClientRects();for(let t=0;t<n.length;t++)e.push(n[t])}return e}getRootNode(e){if(this._destroyed)return this;let t=N(this._startMarker).parentNode;return t===null?this:(M?.view(t)??t).getRootNode(e)}compareDocumentPosition(e){if(this._destroyed)return Node.DOCUMENT_POSITION_DISCONNECTED;let t=N(this._startMarker).parentNode;if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;let n=null,r=null;for(let i of vp(this))if(n??=i,r=i,i===e||i.nodeType===1&&(M?.view(i)??i).contains(e))return(M?.view(t)??t).contains(i)?Node.DOCUMENT_POSITION_CONTAINED_BY:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;if(n===null||r===null){let n=this._startMarker.$$portalParent??t,r=(M?.view(n)??n).compareDocumentPosition(e);if(n===e)r=Node.DOCUMENT_POSITION_CONTAINS;else if((r&Node.DOCUMENT_POSITION_CONTAINED_BY)!==0){let t=Sp(this._endMarker,!0);r=t!==null&&(t===e||((M?.view(t)??t).compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING}return r|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}let i=(M?.view(n)??n).compareDocumentPosition(e);if((i&Node.DOCUMENT_POSITION_DISCONNECTED)!==0)return i;let a=(M?.view(r)??r).compareDocumentPosition(e);if((M?.view(t)??t).contains(n)&&(M?.view(t)??t).contains(r)&&(i&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&(a&Node.DOCUMENT_POSITION_PRECEDING)!==0)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;let o=this._startMarker,s=o.$$portalParent;if(s!==void 0&&s!==t&&(M?.view(s)??s).contains(e)){let t=o.$$portalSourceAnchor;if(t===void 0)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;let n=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_FOLLOWING,r=(M?.view(t)??t).compareDocumentPosition(e)&n;if((i&n)!==r)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}return i}dispatchEvent(e){if(this._destroyed)return!0;let t=N(this._startMarker).parentNode;if(!t)return!0;let n=this._listeners;if(e.bubbles&&(n===null||n.length===0))return t.dispatchEvent(e);let r=N(t.ownerDocument||document).createTextNode(``);if(n!==null)for(let e of n)(M?.view(r)??r).addEventListener(e.type,e.listener,e.options);(M?.view(t)??t).appendChild(r);try{return r.dispatchEvent(e)}finally{if(n!==null)for(let e of n)(M?.view(r)??r).removeEventListener(e.type,e.listener,e.options);(M?.view(r)??r).parentNode===t&&(M?.view(t)??t).removeChild(r)}}scrollIntoView(e){if(typeof e==`object`)throw Error(w(49));if(this._destroyed)return;let t=e!==!1,n=Array.from(vp(this));if(n.length===0){let n=Sp(this._endMarker,!0),r=Sp(this._startMarker,!1),i=t?n||r||N(this._startMarker).parentNode:r||n;if(i==null||i.nodeType===9)return;if(i.nodeType===11){let t=i.host;t&&t.scrollIntoView(e);return}i.nodeType===3?Cp(i,t):i.scrollIntoView(e);return}for(let r=t?n.length-1:0;t?r>=0:r<n.length;r+=t?-1:1){let i=n[r];i.nodeType===3?Cp(i,t):i.scrollIntoView(e)}}};function _p(e){return e==null?!1:typeof e==`boolean`?e:!!e.capture}function*vp(e){let t=e._portalAnchors,n=F(e._startMarker);for(;n!==null;){let r=F(n),i=t===null?void 0:t.get(n);if(i!==void 0){if(i.size===0){let e=n.$$portalEnd;if(e!==void 0){n=hv(n,e);continue}}for(let e of i){if(e.block===null||db(e.block)!==null)continue;let t=N(e.start)?.nextSibling??null;for(;t!==null&&t!==e.end;){let e=F(t);(t.nodeType===1||t.nodeType===3)&&by(t)&&(yield t),t=e}}}if(n===e._endMarker)return;(n.nodeType===1||n.nodeType===3)&&by(n)&&(yield n),n=r}}function*yp(e){for(let t of vp(e))t.nodeType===1&&(yield t)}function*bp(e){for(let t of yp(e)){yield t;let e=(t.ownerDocument||document).createTreeWalker(t,1),n=e.nextNode();for(;n;)yield n,n=e.nextNode()}}function xp(e,t){let n=e,r=n.ownerDocument;if(r.activeElement===n)return!0;let i=!1,a=()=>{i=!0};(M?.view(r)??r).addEventListener(`focus`,a,!0);try{((M?.view(n)??n).focus||HTMLElement.prototype.focus).call(n,t)}finally{(M?.view(r)??r).removeEventListener(`focus`,a,!0)}return i}function Sp(e,t){let n=t?F(e):(M?.view(e)??e).previousSibling;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=t?F(n):(M?.view(n)??n).previousSibling}return null}function Cp(e,t){let n=e.ownerDocument.createRange();if(n.selectNodeContents(e),typeof n.getBoundingClientRect!=`function`)return;let r=n.getBoundingClientRect(),i=e.ownerDocument.defaultView||window,a=t?i.scrollY+r.top:i.scrollY+r.bottom-i.innerHeight;i.scrollTo(i.scrollX+r.left,a)}function wp(e,t,n,r){let i=new gp(e.block,t,n);return i._currentRef=r,$s(e,ls,i),(e.cleanups??=[]).push(()=>{tc(i._currentRef,i),i._destroy()}),i}var Tp=`http://www.w3.org/1999/xlink`,Ep=`http://www.w3.org/XML/1998/namespace`,Dp=`http://www.w3.org/2000/xmlns/`,Op=`http://www.w3.org/2000/svg`,kp=`http://www.w3.org/1998/Math/MathML`,Ap=`http://www.w3.org/1999/xhtml`;function jp(e){return e.namespaceURI===Ap&&e.localName.indexOf(`-`)!==-1}function Mp(e,t){return e===`svg`?Op:e===`math`?kp:t===void 0&&xt.has(e)?Op:t}function Np(e){if(e.nodeType!==1)return;let t=e;if(t.namespaceURI===Op)return t.localName===`foreignObject`?void 0:Op;if(t.namespaceURI===kp)return kp}function Pp(e){if(e===`xmlns`)return Dp;let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(0,t);return n===`xlink`?Tp:n===`xml`?Ep:n===`xmlns`?Dp:null}function Fp(e,t,n){if(t===`innerText`||t===`textContent`)return;if(t===`dangerouslySetInnerHTML`){ip(e,n);return}if(t===`suppressContentEditableWarning`||t===`suppressNativeChangeWarning`||t===`__octaneNativeChangeDiagnostic`)return;switch(t.length){case 5:if(t===`value`){let t=e.localName;if(t===`input`||t===`textarea`)return mg(e,n);if(t===`select`)return vg(e,n)}else if(t===`muted`&&!jp(e)){(M?.view(e)??e).muted=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 7:if(t===`checked`&&e.localName===`input`)return _g(e,n);break;case 8:if((t===`multiple`||t===`selected`)&&!jp(e)){if(t===`selected`){let t=I();if(t!==null&&!t.isFresh(e))return}(M?.view(e)??e)[t]=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 9:if(t===`autoFocus`&&!jp(e))return ag(e,n);break;case 12:if(t===`defaultValue`){let t=e.localName;if(t===`input`||t===`textarea`||t===`select`)return bg(e,n)}break;case 14:if(t===`defaultChecked`&&e.localName===`input`)return Cg(e,n)}if(t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&jp(e)&&(typeof n==`function`||e.$$ceListeners?.[t]!==void 0)){let r=t.endsWith(`Capture`),i=r?t.slice(2,-7):t.slice(2),a=e.$$ceListeners??={},o=a[t];if(o!==void 0&&o!==n&&(M?.view(e)??e).removeEventListener(i,o,r),typeof n==`function`){o!==n&&(M?.view(e)??e).addEventListener(i,n,r),a[t]=n,(M?.view(e)??e).removeAttribute(t);return}delete a[t]}if(!jp(e)){let e=St.get(t);e!==void 0&&(t=e)}let r=Ip(e,t,n);r!==null&&(r=x(e.localName,t,r));let i=I();if(i!==null&&!i.allowAttribute(e,t,r))return;let a=Pp(t);if(E!==null&&Go(e,t),r===null){if(a){let n=t.indexOf(`:`);(M?.view(e)??e).removeAttributeNS(a,n>=0?t.slice(n+1):t)}else(M?.view(e)??e).removeAttribute(t);return}bt.test(t)&&(a?(M?.view(e)??e).setAttributeNS(a,t,r):(M?.view(e)??e).setAttribute(t,r))}function Ip(e,t,n){if(t.charCodeAt(0)===97&&t.startsWith(`aria-`))return n==null||typeof n==`function`||typeof n==`symbol`?null:String(n);let r=typeof n;if(r===`boolean`&&Ct(t)||r===`boolean`&&t.startsWith(`data-`))return n?`true`:`false`;if(r===`function`||r===`symbol`)return null;if(!jp(e)){let e=t.toLowerCase();if(vt.has(e)||r===`boolean`&&(e===`download`||e===`capture`))return n?``:null;if(r===`boolean`||yt.has(e)&&!(Number(n)>=1)||(e===`rowspan`||e===`start`)&&Number.isNaN(Number(n))||t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110)return null}if(n==null||n===!1)return null;let i;return i=n===!0?``:String(n),i===``&&(t===`src`||t===`href`&&e.nodeName!==`A`&&e.nodeName!==`AREA`||t===`data`&&e.nodeName===`OBJECT`)?null:i}function Lp(e,t){let n=h(t),r=I();if(r!==null){r.queueClass(e,n,!0,!1,t==null||t===!1);return}E!==null&&Go(e,`class`),t==null||t===!1?(M?.view(e)??e).removeAttribute(`class`):(M?.view(e)??e).className=n}function Rp(e,t){let n=t==null||t===!1?null:h(t),r=I();if(r!==null){r.queueClass(e,n,!1,!0,n===null);return}E!==null&&Go(e,`class`),n===null?(M?.view(e)??e).removeAttribute(`class`):(M?.view(e)??e).setAttribute(`class`,n)}function zp(e,t){e.namespaceURI===Op?Rp(e,t):Lp(e,t)}var Bp=`!important`;function Vp(e,t,n){let r=(M?.view(e)??e).style,i=I();i!==null&&i.applyStyle(e,t,n)||(E!==null&&Go(e,`style`),!(Cf!==null&&Cf(e,t,n))&&Hp(e,r,t,n))}function Hp(e,t,n,r){if(n==null||n===!1||n===``){if(r&&typeof r==`object`)for(let e in r)t.removeProperty(Kn(e));else typeof r==`string`&&(t.cssText=``);return}if(typeof n==`string`){r!==n&&(t.cssText=n);return}if(r&&typeof r==`object`){for(let e in r)e in n||t.removeProperty(Kn(e));for(let i in n){let a=n[i];a!==r[i]&&(a==null||typeof a==`boolean`?t.removeProperty(Kn(i)):Up(e,t,i,a))}}else{typeof r==`string`&&(t.cssText=``);for(let r in n){let i=n[r];i!=null&&typeof i!=`boolean`&&Up(e,t,r,i)}}}function Up(e,t,n,r){let i=Kn(n),a;a=wt(n,r);let o=a.trimEnd();o.endsWith(Bp)?t.setProperty(i,o.slice(0,o.length-10).trimEnd(),`important`):t.setProperty(i,a)}function Wp(e){let t=e.charCodeAt(2);return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&t>=65&&t<=90}var Gp=`$$capture:`;function Kp(e){return e===`DoubleClick`?`dblclick`:e===`Focus`?`focusin`:e===`Blur`?`focusout`:e.toLowerCase()}var qp;function Jp(e,t){if(!Wp(e)||t!==void 0&&jp(t)&&!Dt(e))return null;let n=qp?.get(e);if(n!==void 0)return n;let r=e.slice(2),i=!1;r.length>7&&r.endsWith(`Capture`)&&e!==`onGotPointerCapture`&&e!==`onLostPointerCapture`&&(i=!0,r=r.slice(0,r.length-7));let a=Kp(r),o={type:a,key:i?Gp+a:`$$`+a,capture:i};return Dt(e)&&(qp??=new Map).set(e,o),o}function Yp(e,t,n){if(t===`class`||t===`className`)E!==null&&Go(e,`class`),(M?.view(e)??e).removeAttribute(`class`);else if(t===`style`)Vp(e,null,n);else if(t===`dangerouslySetInnerHTML`)ip(e,null);else if(t===`suppressHydrationWarning`)e.__oct_suppress=!1;else if(t!==`suppressNativeChangeWarning`&&t!==`__octaneNativeChangeDiagnostic`){let r=Zp(e,t);if(r!==null){Kh(e,r,null,n);return}let i=Jp(t,e);i?Sm(e,i.key,null):Fp(e,t,null)}}function Xp(e){if(e==null)return null;let t=Object(e),n=Object.create(null);for(let e of Reflect.ownKeys(t)){if(!Object.prototype.propertyIsEnumerable.call(t,e))continue;let r=t[e];typeof e==`string`&&(n[e]=r)}return n}function Zp(e,t){return t===`action`&&e.localName===`form`?`action`:(t===`formAction`||t===`formaction`)&&(e.localName===`button`||e.localName===`input`)?`formaction`:null}function Qp(e){return e===`ref`||e===`children`||e===`dangerouslySetInnerHTML`||e===`suppressHydrationWarning`||e===`suppressContentEditableWarning`||e===`suppressNativeChangeWarning`||e===`__octaneNativeChangeDiagnostic`||e===`autoFocus`||e===`value`||e===`defaultValue`||e===`checked`||e===`defaultChecked`||e===`multiple`||Wp(e)}function $p(e,t){if(t===`class`||t===`className`)return`class`;let n=Zp(e,t);return n===null?jp(e)?t:St.get(t)??t:n}function em(e,t,n,r){let i=null,a=0;function o(e,t){if(typeof e!=`string`)return;let r=a++,i=n.get(e);i===void 0?n.set(e,{name:e,value:t,firstOrder:r,lastOrder:r}):(i.value=t,i.lastOrder=r)}for(let e of t){if(!e[0]){let t=e[1];if(e[3]===!0&&typeof t==`string`&&(t===`class`||t===`className`)){(i??=[]).push({rawName:t,value:e[2],order:a++});continue}o(t,e[2]);continue}let t=e[1];if(!(t==null||typeof t!=`object`&&typeof t!=`function`))for(let e of Object.keys(Object(t)))o(e,t[e])}let s=new Map,c=e.namespaceURI===`http://www.w3.org/1999/xhtml`,l=!1;for(let t of n.values()){let n=t.name;if(n===`key`)continue;let r=Qp(n),i=r?n:$p(e,n),a=c&&!r?i.toLowerCase():i,o=s.get(a);if(o!==void 0){if(o.lastOrder>=t.lastOrder)continue;l=!0}t.name=i,s.set(a,t)}if(i!==null)for(let e of i){let t=s.get(`class`);t===void 0?s.set(`class`,{name:`class`,value:e.value,firstOrder:e.order,lastOrder:e.order}):(t.value=Wn(t.value,e.value),t.lastOrder=e.order)}let u=Object.create(null),d=l?[...s.values()].sort((e,t)=>e.firstOrder-t.firstOrder):s.values();for(let{name:e,value:t}of d)u[e]=t;return r!==void 0&&`style`in u&&(u.style=r(u.style)),u}function tm(e,t,n,r,i=!1,a,o=!1){let s=new Map,c=em(e,t,s,a),l=e.localName,u=l===`input`||l===`textarea`||l===`select`;return gm(e,c,n,r,!0,u),ap(e,t,i),u&&!o&&wg(e,l,s.get(`value`)?.value,s.get(`defaultValue`)?.value,s.get(`checked`)?.value,s.get(`defaultChecked`)?.value,s.get(`multiple`)?.value),c}var nm=Symbol(`octane.signal-host-prop-sources`);function rm(e,t,n){if(Df(e))return t.add(e),n(e);if(typeof e!=`object`||!e||Array.isArray(e))return e;let r;for(let i of Object.keys(e)){let a=e[i];Df(a)&&(t.add(a),r??={...e},r[i]=n(a))}return r??e}function im(e,t,n=Of){let r=new Set,i;for(let a=0;a<e.length;a++){let o=e[a];if(!o[0]){let s=o[1]===`children`||o[1]===`style`&&t!==void 0?o[2]:o[1]===`style`?rm(o[2],r,n):Df(o[2])?(r.add(o[2]),n(o[2])):o[2];s!==o[2]&&(i??=e.slice(),i[a]=[!1,o[1],s,o[3]]);continue}let s=o[1];if(typeof s!=`object`||!s)continue;let c;for(let e of Object.keys(s)){let i=s[e],a=e===`children`||e===`style`&&t!==void 0?i:e===`style`?rm(i,r,n):Df(i)?(r.add(i),n(i)):i;a!==i&&(c??={...s},c[e]=a)}c!==void 0&&(i??=e.slice(),i[a]=[!0,c])}return{sources:i??e,handles:r}}function am(e,t){let n;for(let r of e){if(!r[0]){r[1]===t&&(n=r[2]);continue}let e=r[1];typeof e==`object`&&e&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n=e[t])}return Df(n)?n:null}function om(e){if(!(e.disposed||e.pendingControl||e.scope.block.disposed))try{xr(e.scope,()=>{let t=im(e.sources,e.readStyle);e.resolved=tm(e.element,t.sources,e.resolved,e.scope,e.hasNestedChildren,e.readStyle)})}catch{Cs(e.scope.block)}}function sm(e,t){let n=t[Un](kf(e,()=>om(e)));return e.subscriptions.set(t,n),n}function cm(e,t){for(let[n,r]of e.subscriptions)t.has(n)||(r(),e.subscriptions.delete(n),E!==null&&Ua(()=>{e.disposed||e.scope.block.disposed||xr(e.scope,()=>sm(e,n))}));for(let n of t){if(e.subscriptions.has(n))continue;let t=sm(e,n);E!==null&&Ua(()=>{t(),e.subscriptions.delete(n)})}}function lm(e,t){let n=Wt(e.element,t,n=>{Dn(()=>xr(e.scope,()=>{let r=am(e.sources,t);!e.disposed&&!e.pendingControl&&Af(r)&&r.set(n)}))});return e.controlWriters.set(t,n),n}function um(e){let t=e.element,n=am(e.sources,`value`),r=am(e.sources,`checked`),i=Af(n)||Af(r);for(let[t,i]of e.controlWriters)t===`value`&&Af(n)||t===`checked`&&Af(r)||(i(),e.controlWriters.delete(t),E!==null&&Ua(()=>{!e.disposed&&!e.scope.block.disposed&&lm(e,t)}));if(Af(n)&&!e.controlWriters.has(`value`)){let t=lm(e,`value`);E!==null&&Ua(()=>{t(),e.controlWriters.delete(`value`)})}if(Af(r)&&!e.controlWriters.has(`checked`)){let t=lm(e,`checked`);E!==null&&Ua(()=>{t(),e.controlWriters.delete(`checked`)})}if(!i){if(e.input!==void 0){let n=e.input;(M?.view(t)??t).removeEventListener(`input`,n),E!==null&&Ua(()=>{!e.disposed&&!e.scope.block.disposed&&(M?.view(t)??t).addEventListener(`input`,n)}),e.input=void 0}return}if(Mf(t,e.site),e.input!==void 0)return;let a=()=>{if(e.disposed||e.pendingControl)return;let n=rn(t);n!==null&&Dn(()=>xr(e.scope,()=>{let t=am(e.sources,`value`),r=am(e.sources,`checked`);Af(r)&&n.checked!==void 0&&r.set(n.checked),Af(t)&&t.set(n.selectedValues??n.value)}))};e.input=a,(M?.view(t)??t).addEventListener(`input`,a),E!==null&&Ua(()=>(M?.view(t)??t).removeEventListener(`input`,a))}function dm(e){if(!e.disposed&&hc?.stageAction(()=>dm(e))!==!0){e.disposed=!0;for(let t of e.subscriptions.values())t();mi(e.scope.block),e.subscriptions.clear();for(let t of e.controlWriters.values())t();e.controlWriters.clear(),e.input!==void 0&&N(e.element).removeEventListener(`input`,e.input),nc(e.resolved,e.element)}}function fm(e,t){nl(()=>{e.disposed||e.scope.block.disposed||!e.pendingControl||Dn(()=>xr(e.scope,()=>{let n=rn(e.element),r=am(e.sources,`value`);if(n.editRevision>0||e.element.localName===`textarea`&&Af(r)&&Object.is(Of(r),t)){let t=am(e.sources,`checked`);Af(t)&&n.checked!==void 0&&t.set(n.checked),Af(r)&&r.set(n.selectedValues??n.value)}if(!(e.disposed||e.scope.block.disposed)){if(!on(e.element,n.revision)){fm(e,t);return}e.pendingControl=!1,om(e)}}))})}function pm(e,t,n,r,i,a){let o={[nm]:!0,scope:e,element:t,site:r,hasNestedChildren:i,readStyle:a,sources:n,resolved:void 0,subscriptions:new Map,controlWriters:new Map,disposed:!1};return Jn(e,()=>dm(o)),o}function mm(e,t,n,r,i,a=!1,o){let s=typeof t==`object`&&t&&t[nm]===!0?t:void 0;s===void 0?s=pm(e,n,r,i,a,o):gc===null&&(E!==null&&Do(s),s.sources=r);let c=s;if(gc!==null){let e=gc.signalHosts??=new Map;s=e.get(c),s===void 0?(s={...c},e.set(c,s),vc()&&Ua(()=>e.delete(c))):E!==null&&Do(s),s.sources=r}let l=am(r,`value`);l!==null&&e.block.idState.renderOwner?.controlLeases?.has(n)&&pf(!1);let u=am(r,`checked`),d=Af(l)||Af(u)?rn(n):null;d!==null&&(Mf(n,i),s.pendingControl||=I()!==null&&(d.editRevision>0||Af(l)&&an(n,Of(l))));let f=im(r,o);return s.resolved=tm(n,f.sources,s.resolved,e,a,o,s.pendingControl),gc===null?(cm(s,f.handles),um(s),!s.pendingControl&&d!==null&&on(n,d.revision)):hc.stageAction(()=>{c.disposed||(c.sources=s.sources,c.resolved=s.resolved,c.pendingControl=s.pendingControl,xr(e,()=>{cm(c,f.handles),um(c)}),!c.pendingControl&&d!==null&&on(n,d.revision),om(c))}),s.pendingControl&&fm(c,s.resolved?.value),c}function hm(e,t){switch(e.localName){case`input`:return t===`value`||t===`defaultValue`||t===`checked`||t===`defaultChecked`;case`textarea`:return t===`value`||t===`defaultValue`;case`select`:return t===`value`||t===`defaultValue`||t===`multiple`}return!1}function gm(e,t,n,r,i=!1,a=!1){if(t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),`suppressHydrationWarning`)&&(e.__oct_suppress=t.suppressHydrationWarning===!0),!i){if(t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),`children`)){if((M?.view(e)??e)[$f]=t.children,t.children!=null&&(M?.view(e)??e)[Xf]===!0)throw np()}else n!=null&&Object.prototype.propertyIsEnumerable.call(Object(n),`children`)&&((M?.view(e)??e)[$f]=void 0)}if(n){for(let r of Object.keys(Object(n)))if(r!==`key`&&r!==`children`&&!(i&&r===`dangerouslySetInnerHTML`)&&!(a&&hm(e,r))){if(r===`ref`){let r=t?t.ref:void 0;n.ref!=null&&n.ref!==r&&tc(n.ref,e);continue}t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),r)||Yp(e,r,n[r])}}if(t==null)return;let o=n===void 0?I():null,s=o!==null&&!o.isFresh(e);for(let o of Object.keys(Object(t))){if(o===`key`||o===`children`||i&&o===`dangerouslySetInnerHTML`||a&&hm(e,o))continue;let c=t[o],l=n?n[o]:void 0;if(o===`ref`){if(c===l)continue;r?$s(r,c,e):fp(c,e);continue}if(o===`suppressHydrationWarning`||o===`suppressNativeChangeWarning`||o===`__octaneNativeChangeDiagnostic`)continue;if(o===`class`||o===`className`){if(c===l&&!s)continue;Rp(e,c);continue}if(o===`style`){Vp(e,c,l);continue}if(o===`dangerouslySetInnerHTML`){ip(e,c);continue}let u=Zp(e,o);if(u!==null){if(c===l&&!s)continue;Kh(e,u,c,l);continue}if(c===l&&!Ag(e,o)&&!s)continue;let d=Jp(o,e);if(d){if(c===l)continue;d.capture?Um.has(d.type)||Qm([d.type]):Mm.has(d.type)||Zm([d.type]),Sm(e,d.key,c);continue}(n===void 0||o!==`autoFocus`||jp(e))&&Fp(e,o,c)}}var _m=Symbol(),vm=1;function ym(e){return typeof e==`object`&&!!e&&e[_m]===vm}var bm=[],xm=null;function Sm(e,t,n){t!==void 0&&(E!==null&&(E.push(Sa,e,t,(M?.view(e)??e)[t]),Eo()),(M?.view(e)??e)[t]=n);let r=Pe!==null||Ne!==void 0?Re():null;if(Qn||Ln||r!==null||xm!==null){let t=r??(Ln||Ir?.block.idState.renderOwner?.signalOwner!==void 0?Ir===null?Le():$n.get(Ir)||Ir:Ir);if(t!==null){(t instanceof Zc||t instanceof Xc)&&$n.get(t)===void 0&&$n.set(t,!1);let n=xm??=new WeakMap;if(gc!==null)hc.stageAction(()=>{n.get(e)!==t&&n.set(e,t)});else{let r=n.get(e);r!==t&&(E!==null&&E.push(Oa,n,e,r),n.set(e,t))}}}}var Cm=1,wm=2,Tm=4,Em=8,Dm=16,Om=32,km=64,Am=128,jm=256,Mm=new Map,Nm=new Map,Pm=new WeakMap,Fm=0,Im=Symbol(`octane.portalPathLength`),Lm=new WeakMap,Rm=0,zm=Symbol(`octane.rootEpoch`);function Bm(e,t){let n=Lm.get(e);Lm.set(e,{count:(n?.count||0)+t,since:++Rm,previous:n}),n!==void 0&&setTimeout(()=>{let t=Lm.get(e);t!==void 0&&(t.previous=void 0)},0)}function Vm(e,t){let n=Lm.get(e);for(;n!==void 0&&n.since>t;)n=n.previous;return n!==void 0&&n.count>0}function Hm(e,t){if(Nm.size===1&&Fm===0){tt(e),e[zm]=Rm;return}let n=e.composedPath();if(Nm.size===1)return tt(e),e[zm]=Rm,Fm!==0&&(xh(n,Rm),e[Im]=n.length),n;for(let r=n.length-1;r>=0;r--)if(Nm.has(n[r])){n[r]===t?(tt(e),e[zm]=Rm,Fm!==0&&(xh(n,Rm),e[Im]=n.length)):Fm!==0&&n.length>(e[Im]||0)&&(xh(n,e[zm]??Rm),e[Im]=n.length);break}return n}var Um=new Map,Wm=`abort.beforetoggle.cancel.canplay.canplaythrough.close.durationchange.emptied.encrypted.ended.error.load.loadeddata.loadedmetadata.loadstart.pause.play.playing.progress.ratechange.resize.seeked.seeking.stalled.suspend.timeupdate.toggle.volumechange.waiting`.split(`.`),Gm=new Set([`focus`,`blur`,`invalid`,`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`,...Wm]),Km=e=>Gm.has(e),qm={passive:!1},Jm={capture:!0,passive:!1};function Ym(e,t){return e===`touchstart`||e===`touchmove`?t?Jm:qm:t}var Xm=new Set([`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`]);function Zm(e){let t=typeof Element<`u`&&Object.isExtensible(Element.prototype);for(let n=0;n<e.length;n++){let r=e[n];if(Mm.has(r))continue;let i=Um.get(r)??rh(r);i.flags|=Cm,Mm.set(r,i),t&&Vd(Element.prototype,`$$`+r);for(let e of Nm.keys())Km(r)&&Um.has(r)||(e.addEventListener(r,kh,Ym(r,Km(r))),Km(r)||e.addEventListener(r,Ah,Ym(r,!0)))}}function Qm(e){let t=typeof Element<`u`&&Object.isExtensible(Element.prototype);for(let n=0;n<e.length;n++){let r=e[n];if(Um.has(r))continue;let i=Mm.get(r)??rh(r);i.flags|=wm,Um.set(r,i),t&&Vd(Element.prototype,Gp+r);for(let e of Nm.keys())Mm.has(r)||e.addEventListener(r,Km(r)?kh:Ah,Ym(r,!0))}}function $m(e,t=!1){if(hc?.stageDelegation(e,t,!0)===!0)return;Ud(),t&&Bm(e,1);let n=Nm.get(e)||0;if(Nm.set(e,n+1),n===0){e.onclick==null&&e.nodeType===1&&(e.onclick=jh);for(let t of Mm.keys())e.addEventListener(t,kh,Ym(t,Km(t))),Km(t)||e.addEventListener(t,Ah,Ym(t,!0));for(let t of Um.keys())Mm.has(t)||e.addEventListener(t,Km(t)?kh:Ah,Ym(t,!0))}}function eh(e,t=!1){if(hc?.stageDelegation(e,t,!1)===!0)return;t&&Bm(e,-1);let n=Nm.get(e);if(n){if(n===1){Nm.delete(e);for(let t of Mm.keys())e.removeEventListener(t,kh,Km(t)),Km(t)||e.removeEventListener(t,Ah,!0);for(let t of Um.keys())e.removeEventListener(t,Km(t)?kh:Ah,!0)}else Nm.set(e,n-1)}}var th=new Set(`auxclick.beforeblur.beforeinput.blur.cancel.change.click.close.compositionend.compositionstart.compositionupdate.contextmenu.copy.cut.dblclick.dragend.dragstart.drop.focus.focusin.focusout.fullscreenchange.gotpointercapture.hashchange.input.invalid.keydown.keypress.keyup.lostpointercapture.mousedown.mouseup.paste.pause.play.pointercancel.pointerdown.pointerup.popstate.ratechange.reset.resize.seeked.select.selectionchange.selectstart.submit.textInput.touchcancel.touchend.touchstart.volumechange`.split(`.`)),nh=0;function rh(e){return{name:e,bubbleKey:`$$`+e,captureKey:Gp+e,flags:(Km(e)?Tm:0)|(Xm.has(e)?Em:0)|(th.has(e)?Dm:0)|(Xh.has(e)?Om:0)|(e===`click`||e===`dblclick`||e===`mousedown`||e===`mousemove`||e===`mouseup`?km:0)|(e===`mouseenter`?Am:0)|(e===`invalid`||Wm.includes(e)?jm:0)}}var ih=Symbol(`octane.bubbleVersion`),ah=[],oh=0;function sh(e){for(let t=oh-1;t>=0;t--){let n=ah[t];if(n.event===e)return n}}function ch(){let e=sh(this);e!==void 0&&(e.flags|=1);let t=e?.stop||this.stopPropagation;(t===ch?Event.prototype.stopPropagation:t).call(this)}function lh(){let e=sh(this);e!==void 0&&(e.flags|=2);let t=e?.immediate||this.stopImmediatePropagation;(t===lh?Event.prototype.stopImmediatePropagation:t).call(this)}var uh={configurable:!0,writable:!0,value:ch},dh={configurable:!0,writable:!0,value:lh};function fh(e,t,n,r){n?.configurable===!1?n.writable&&Object.defineProperty(e,t,{value:r.value}):Object.defineProperty(e,t,r)}function ph(e,t,n){let r=ah[oh];return r===void 0&&(r={event:null,flags:0,stop:null,immediate:null,currentTarget:null},ah.push(r)),oh++,r.event=e,r.flags=0,r.stop=e.stopPropagation,fh(e,`stopPropagation`,t,uh),n!==null&&(r.immediate=e.stopImmediatePropagation,fh(e,`stopImmediatePropagation`,n,dh)),r}function mh(e,t,n){let r=ah[--oh];r.event=null,r.stop=null,r.immediate=null,r.currentTarget=null,t===void 0?delete e.stopPropagation:Object.defineProperty(e,\"stopPropagation\",t),n!==null&&(n===void 0?delete e.stopImmediatePropagation:Object.defineProperty(e,\"stopImmediatePropagation\",n))}var hh={configurable:!0,get(){return sh(this)?.currentTarget}},gh=[],_h=[],vh=null;function yh(e,t,n){let r=n?t.captureKey:t.bubbleKey,i=(t.flags&km)!==0||!n&&(t.flags&Am)!==0,a=!1;for(let t=e;t<gh.length;t++){let e=gh[t],n=e[r],o=n!=null&&i&&e.disabled&&(e.localName===`button`||e.localName===`input`||e.localName===`select`||e.localName===`textarea`)?null:n;_h[t]=o,o!=null&&(a=!0,xm!==null&&((vh??=[])[t]=xm.get(e)))}return a}function bh(e){if(e.$$portalParent!=null||(M?.view(e)??e).parentNode===null)return;let t=(M?.view(e)??e).parentNode,n=Pm.get(t);if(n===void 0)return;let r,i=(M?.view(e)??e).previousSibling,a=n.size;for(;i!==null;){let o=i.$$portalEventStart,s=o?.$$portalEventRange;if(a!==0&&o!==void 0&&s!==void 0&&n.has(s)&&s.start===o&&s.end===i&&(M?.view(o)??o).parentNode===t){a--,i=(M?.view(o)??o).previousSibling;continue}let c=i.$$portalEventRange,l=c?.end;if(c!==void 0&&n.has(c)&&c.start===i&&l!=null&&(M?.view(l)??l).parentNode===t&&((M?.view(i)??i).compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&((M?.view(e)??e).compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){r=c;break}i=(M?.view(i)??i).previousSibling}r!==void 0&&(D!==null&&(O(e,`$$portalParent`,e.$$portalParent),O(e,`$$portalContainer`,e.$$portalContainer)),e.$$portalParent=r.host,e.$$portalContainer=t)}function xh(e,t){for(let n=0;n<e.length;n++){let r=Sh(e[n]);if(r===null)continue;bh(r);let i=r.$$portalParent;for(;i!=null&&!Vm(i,t)&&e.indexOf(i)<0;)bh(i),i=i.$$portalParent||(M?.view(i)??i).parentNode}}function Sh(e){return e!=null&&typeof e.nodeType==`number`?e:null}function Ch(e,t,n=e.composedPath()){let r=gh,i=r.length,a=e[zm]??Rm,o=Fm!==0||a!==Rm,s=n.indexOf(t);if(s<0)return 0;if(Nm.size===1&&a===Rm&&Vm(t,a)){let e=0;for(;e<s;e++){let t=Sh(n[e]);if(t===null||o&&t.$$portalParent!=null)break;r.push(t)}if(e===s)return r.length-i;r.length=i}let c=Sh(n[0]);if(c===null)return 0;let l=0,u=!1;for(;;){r.length=i;let e=c,d=l,f=null,p=!1,m=!1;for(;e!==null;){if(Vm(e,a)&&!(e===c&&u)){f??=e,e===t&&(f===e?p=!0:m=!0);break}r.push(e);let s=o?e.$$portalParent:void 0;if(s!=null){let a=e.$$portalContainer;if(a==null)return r.length=i,0;f??=a,a===t&&(f===a?p=!0:m=!0),e=s,d=n.indexOf(s)}else e=d>=0?Sh(n[++d]):(M?.view(e)??e).parentNode}if(m)return r.length=i,0;if(p)return r.length-i;if(f===null)return r.length=i,0;let h=n.indexOf(f);if(h<l||h>=s||h===l&&u)return r.length=i,0;c=f,l=h,u=!0}}function wh(e,t,n){let r=Ir,i=T;Ir=null,T=null;let a=()=>{if(typeof e==`function`){e(t);return}if(ym(e)){let n=e,r=n.args;if(typeof r!=`number`)switch(r.length){case 0:n.fn();break;case 1:n.fn(r[0]);break;case 2:n.fn(r[0],r[1]);break;default:n.fn.apply(null,r)}else r===1?n.fn(n.a0):r===2?n.fn(n.a0,n.a1):r===-1?n.fn(t,n.a0):n.fn(t,n.a0,n.a1);return}Th(`${t.type} event`,e,t)};try{let e=n instanceof Zc||n instanceof Xc?br(n):n;e===void 0||Le()===e?a():Be(e,a)}catch(e){Eh(e)}finally{Ir=r,T=i}}function Th(e,t,n){if(t)throw Error(w(46,e,typeof t));t(n)}function Eh(e){if(typeof reportError==`function`){reportError(e);return}if(typeof window<`u`&&typeof ErrorEvent==`function`){let t=new ErrorEvent(`error`,{error:e,message:String(e?.message??e),cancelable:!0});window.dispatchEvent(t),t.defaultPrevented||console.error(e);return}console.error(e)}function Dh(e){nh===0&&(e.flags&Dm)!==0&&Zh.length>0&&(!ai&&Cc()&&(Zo?.queueAllTransition()===!0?Ps():Zs(jh)),kg()),e.name===`click`&&(Qh=null)}function Oh(e,t){if(!e.bubbles||e.cancelBubble||(t.flags&Cm)===0){e.bubbles&&(t.flags&Cm)!==0&&jg(e,t),Dh(t);return}if((t.flags&Dm)===0)return;if(Zh.length===0){if((t.flags&Om)===0)return;let n=e.target?.localName;if(n!==`input`&&n!==`textarea`&&n!==`select`)return}let n=e[ih],r=()=>{e[ih]===n&&(jg(e,t),Dh(t))};e.isTrusted?setTimeout(r,0):queueMicrotask(r)}function kh(e){let t=Mm.get(e.type)??Um.get(e.type);if(t===void 0)return;let n=(t.flags&Tm)!==0,r=n?Hm(e,this):void 0;e[ih]=(e[ih]||0)+1,jg(e,t);let i=(t.flags&Em)!==0;nh++;let a=e.target,o=zh,s=e.type===`submit`&&a!=null&&a.nodeName===`FORM`?Rh(a,e):null;s!==null&&(zh=s);let c=jn(e),l=gh.length,u,d=!1,f;try{if(n&&(t.flags&wm)!==0&&(r??=e.composedPath(),Ah.call(this,e,r,t))||(t.flags&Cm)===0||a?.nodeType===1&&jp(a)&&(t.flags&jm)!==0||(Ch(e,this,r),!yh(l,t,!1)&&s===null))return;u=Object.getOwnPropertyDescriptor(e,`stopPropagation`),d=!0,f=ph(e,u,null);for(let t=l;t<gh.length;t++){let n=gh[t];if(i&&n!==e.target)break;let r=_h[t];if(r!=null&&!et(e,n,!1)&&(Mh(e,n,f),wh(r,e,vh?.[t]),f.flags&1)||i)break}s!==null&&Bh!==null&&!e.defaultPrevented&&gh.includes(s.form,l)&&Bh(s.form,e,s.action,s.submitter)}finally{gh.length=l,_h.length=l,vh!==null&&(vh.length=l),d&&mh(e,u,null),s!==null&&(zh=o,Vh(s)),d&&Nh(e);try{Nn(e,c,!1,Eh)}catch(e){Eh(e)}nh--,Dh(t)}}function Ah(e,t,n=Mm.get(e.type)??Um.get(e.type)){if(t??=Hm(e,this),n===void 0||(n.flags&wm)===0)return!1;t??=e.composedPath(),(!e.bubbles||(n.flags&Cm)===0)&&jg(e,n);let r=gh.length;Ch(e,this,t);let i=yh(r,n,!0),a=i?Object.getOwnPropertyDescriptor(e,`stopPropagation`):void 0,o=i&&(n.flags&Tm)!==0?Object.getOwnPropertyDescriptor(e,`stopImmediatePropagation`):null,s=e.cancelBubble,c=!1;nh++;let l=jn(e),u;try{if(i){u=ph(e,a,o);for(let t=gh.length-1;t>=r;t--){let n=_h[t];if(n!=null&&!et(e,gh[t],!0)&&(Mh(e,gh[t],u),wh(n,e,vh?.[t]),u.flags&1))break}}}finally{c=(u===void 0?i:u.flags!==0)||!s&&e.cancelBubble,gh.length=r,_h.length=r,vh!==null&&(vh.length=r),i&&(mh(e,a,o),Nh(e));try{Nn(e,l,e.bubbles&&!e.cancelBubble&&(n.flags&Cm)!==0,Eh)}catch(e){Eh(e)}nh--,Oh(e,n)}return c}function jh(){}function Mh(e,t,n){n.currentTarget=t,Object.defineProperty(e,\"currentTarget\",hh)}function Nh(e){delete e.currentTarget}var Ph={pending:!1,data:null,method:null,action:null},Fh=new WeakMap,Ih=new WeakMap;function Lh(e,t){Fh.set(e,t);let n=Ih.get(e);if(n)for(let e of n)e()}function Rh(e,t){let n=t.submitter,r=e.$$formAction;if(n!=null){let e=n.$$formAction??(M?.view(n)??n).getAttribute(`formaction`);e!=null&&(r=e,n=null)}return{form:e,event:t,action:r,submitter:n??null,transitions:0,published:!1,intercepted:!1}}var zh=null,Bh=null;function Vh(e){if(e.intercepted||e.transitions===0||!e.event.defaultPrevented)return;let t=e.form,n=null;try{n=new FormData(t);let r=e.event.submitter;r&&(M?.view(r)??r).name&&n.append((M?.view(r)??r).name,(M?.view(r)??r).value??``)}catch{}let r=t;r.$$pendingSubmits=(r.$$pendingSubmits||0)+1,e.published=!0,Lh(t,{pending:!0,data:n,method:t.method||`get`,action:r.$$formAction??(M?.view(t)??t).getAttribute(`action`)})}function Hh(e){if(e.transitions--,e.transitions!==0||!e.published)return;let t=e.form;t.$$pendingSubmits=Math.max(0,(t.$$pendingSubmits||1)-1),t.$$pendingSubmits===0&&Lh(e.form,Ph)}var Uh=null;function Wh(e){try{e.reset(),Mg(e)}catch{}}function Gh(){if(Uh===null||oi>0||si>0)return;let e=Uh;Uh=null;for(let t of e)Wh(t)}function Kh(e,t,n,r){if(typeof n==`function`){(M?.view(e)??e).$$formAction=n,e.$$formSubmitWired||(e.$$formSubmitWired=!0,Bh=qh,Zm([`submit`])),(M?.view(e)??e).removeAttribute(t);return}(M?.view(e)??e).$$formAction=void 0,Fp(e,t,n)}function qh(e,t,n,r){if(typeof n!=`function`)return;t.preventDefault(),zh!==null&&zh.form===e&&(zh.intercepted=!0);let i=new FormData(e);r&&(M?.view(r)??r).name&&i.append((M?.view(r)??r).name,(M?.view(r)??r).value??``);let a=n,o=e;o.$$pendingSubmits=(o.$$pendingSubmits||0)+1,Lh(e,{pending:!0,data:i,method:`post`,action:a});let s=a.$$isActionDispatcher===!0,c=t=>{if(o.$$pendingSubmits=Math.max(0,(o.$$pendingSubmits||1)-1),o.$$pendingSubmits===0&&Lh(e,Ph),t&&!s)try{e.reset(),Mg(e)}catch{}},l;try{s?l=a(i):Ab(()=>(l=a(i),l))}catch(e){c(!1),console.error(e);return}Promise.resolve(l).then(()=>c(!0),()=>c(!1))}var Jh=Symbol(`octane.uncontrolled`),Yh=[`input`,`change`,`click`],Xh=new Set(Yh),Zh=[],Qh=null,$h=null,eg=[],tg=[],ng=[];function rg(e,t){t!==null&&(typeof t==`object`||typeof t==`function`)&&hc?.recordStageEntry(t),e.push(t),D!==null&&Ua(()=>{let n=e.lastIndexOf(t);n!==-1&&e.splice(n,1)})}function ig(){return eg.length>0||tg.length>0||ng.length>0}function ag(e,t){if(e.$$afSeen!==void 0||(e.$$afSeen=!0,!t))return;switch(e.localName){case`button`:case`input`:case`select`:case`textarea`:break;default:return}let n=I();(n===null||n.isFresh(e))&&rg(ng,e)}function og(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch((M?.view(e)??e).type){case`text`:case`search`:case`url`:case`tel`:case`password`:case`email`:case`number`:return!0}return!1}function sg(e){let t=e.currentTarget,n=t.$$ctrl;n!==void 0&&(n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&(clearTimeout(n.compositionEndTask),n.compositionEndTask=null),n.composing=!0,(M?.view(t)??t).addEventListener(`blur`,cg))}function cg(e){let t=e.currentTarget,n=t.$$ctrl;if(n===void 0)return;(M?.view(t)??t).removeEventListener(`blur`,cg),n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&clearTimeout(n.compositionEndTask),n.composing=!0;let r=()=>{n.compositionEndTask=null,n.composing=!1,Eg(t)};n.compositionEndTask=e.type===`blur`?setTimeout(r,0):setTimeout(()=>{n.compositionEndTask=setTimeout(r,0)},0)}function lg(e){let t=(M?.view(e)??e).$$ctrl;return t===void 0?void 0:hc?.projectControlled(t)??t}function ug(e){let t=lg(e);return t===void 0&&(t={v:Jh,c:-1,sv:null,sawV:!1,sawC:!1,sawDC:!1,dvv:Jh,composing:!1,compositionEndTask:void 0,queued:!1,formSeen:!1,formMultiple:!1},(M?.view(e)??e).$$ctrl=t,Zm(Yh)),t}function dg(e){let t=lg(e);return t===void 0&&(t=ug(e)),t.compositionEndTask===void 0&&og(e)&&(t.compositionEndTask=null,(M?.view(e)??e).addEventListener(`compositionstart`,sg),(M?.view(e)??e).addEventListener(`compositionend`,cg)),t}function fg(e){return typeof e==`string`?e:typeof e==`function`||typeof e==`symbol`?``:String(e)}function pg(e,t){return(M?.view(e)??e).type===`number`?t===0&&(M?.view(e)??e).value===``||(M?.view(e)??e).value!=t:(M?.view(e)??e).value!==fg(t)}function mg(e,t){Ir?.block.idState.renderOwner?.controlLeases?.has(e)&&pf(!1);let n=e,r=dg(e);E!==null&&ko(e,`value`,`defaultValue`);let i=!r.sawV;if(r.sawV=!0,t==null){r.v=Jh;return}let a=fg(t);if(i){r.v=t;let i=I();if(i!==null&&!i.isFresh(e))return;(M?.view(n)??n).value!==a&&((M?.view(n)??n).value=a),(M?.view(n)??n).defaultValue=a;return}let o=r.v;if(r.v=t,!(r.composing&&Object.is(o,t))&&pg(n,t)&&((M?.view(n)??n).value=a),(M?.view(n)??n).defaultValue!==a){let t=M===null&&e.localName===`textarea`?P(e):null;t!==null&&t.nodeType===3&&F(t)===null?N(t).data=a:(M?.view(n)??n).defaultValue=a}}function hg(e,t,n){let r=!n.sawC;if(n.sawC=!0,t==null){n.c=-1;return}let i=!!t;if($h??=Dg,r){n.c=i;let t=I();if(t!==null&&!t.isFresh(e)){(M?.view(e)??e).checked=(M?.view(e)??e).checked,n.sawDC=!0;return}(M?.view(e)??e).checked=i,(M?.view(e)??e).defaultChecked=i,n.sawDC=!0;return}let a=i!==n.c;n.c=i,(a||!gg(e))&&(M?.view(e)??e).checked!==i&&((M?.view(e)??e).checked=i)}function gg(e){let t=Qh;return t===null?!1:e===t||(M?.view(e)??e).type===`radio`&&(M?.view(t)??t).type===`radio`&&(M?.view(e)??e).name!==``&&(M?.view(e)??e).name===(M?.view(t)??t).name&&(M?.view(e)??e).form===(M?.view(t)??t).form&&((M?.view(e)??e).form!==null||(M?.view(e)??e).getRootNode()===(M?.view(t)??t).getRootNode())}function _g(e,t){let n=dg(e);E!==null&&ko(e,`checked`,`defaultChecked`),hg(e,t,n)}function vg(e,t){let n=e,r=dg(e);if(E!==null&&(Do(r),Eo()),r.sawV,r.sawV=!0,t==null){r.sv=null;return}if((M?.view(n)??n).multiple){if(!Array.isArray(t))return;let e=new Set;for(let n=0;n<t.length;n++)e.add(fg(t[n]));r.sv=e}else{if(Array.isArray(t))return;r.sv=fg(t)}let i=I();(i===null||i.isFresh(e))&&(yg(n,r.sv,!1),r.queued||(r.queued=!0,rg(eg,n)))}function yg(e,t,n){let r=(M?.view(e)??e).options;if(E!==null)for(let e=0;e<r.length;e++)No(r[e],n);if(typeof t!=`string`){for(let e=0;e<r.length;e++){let i=r[e],a=t.has((M?.view(i)??i).value);(M?.view(i)??i).selected!==a&&((M?.view(i)??i).selected=a),n&&((M?.view(i)??i).defaultSelected=a)}return}let i=null;for(let e=0;e<r.length;e++){let a=r[e];if((M?.view(a)??a).value===t){(M?.view(a)??a).selected=!0,n&&((M?.view(a)??a).defaultSelected=!0);return}i===null&&!(M?.view(a)??a).disabled&&(i=a)}i!==null&&((M?.view(i)??i).selected=!0)}function bg(e,t,n){let r=dg(e),i=I();if(e.localName===`select`){let n=r.dvv===Jh,a=(M?.view(e)??e).multiple,o=r.formMultiple!==a;if(n||o){if(E!==null&&(Do(r),Eo()),r.dvv=t,r.formMultiple=a,i!==null&&!i.isFresh(e))return;t==null?o&&yg(e,a?new Set:``,!1):rg(tg,{el:e,value:t})}return}let a=n??!r.sawV,o=r.dvv;E!==null&&Do(r),r.sawV=!0,r.dvv=t;let s=i!==null&&!i.isFresh(e);if(r.v!==Jh)return;let c=e;if(t==null){o!==Jh&&o!=null&&(E!==null&&Ao(c),e.localName===`input`?(M?.view(c)??c).removeAttribute(`value`):(M?.view(c)??c).defaultValue=``);return}let l=fg(t);a&&!s&&(M?.view(c)??c).value!==l&&(E!==null&&ko(e,`value`,`defaultValue`),(M?.view(c)??c).value=l),((M?.view(c)??c).defaultValue!==l||l===``&&e.localName===`input`&&!(M?.view(c)??c).hasAttribute(`value`))&&(E!==null&&Ao(c),(M?.view(c)??c).defaultValue=l)}var xg=Symbol(`octane.defaultValue`),Sg=Symbol(`octane.defaultCheckedInitialized`);function Cg(e,t){let n=dg(e),r=e,i=I(),a=i!==null&&!i.isFresh(e),o=!n.sawDC;if(o&&(E!==null&&(Do(n),Eo()),n.sawDC=!0),a){o&&((M?.view(r)??r).checked=(M?.view(r)??r).checked);return}if(n.c!==-1||(o&&!(Sg in r)&&(E!==null&&(E.push(Sa,r,`checked`,(M?.view(r)??r).checked),(M?.view(r)??r).type===`radio`&&(M?.view(r)??r).name!==``&&t&&Mo(r)),(M?.view(r)??r).checked=t==null?(M?.view(r)??r).checked:!!t),t==null))return;let s=!!t;(M?.view(r)??r).defaultChecked!==s&&(E!==null&&((M?.view(r)??r).type===`radio`&&(M?.view(r)??r).name!==``&&Mo(r),Go(r,`checked`)),(M?.view(r)??r).defaultChecked=s)}function wg(e,t,n,r,i,a,o){let s=dg(e),c=!s.formSeen,l=s.formMultiple;if(E!==null&&(Do(s),Eo()),s.formSeen=!0,t===`input`){let t=e,o=r==null?null:fg(r);mg(t,n),n??bg(t,o,c),_g(t,i),i==null&&(a!=null||c)&&Cg(t,a);return}if(t===`textarea`){let t=e;mg(t,n),n??(r==null?!c&&(M?.view(t)??t).defaultValue!==``&&((M?.view(t)??t).defaultValue=``):bg(t,r,c));return}let u=e,d=typeof o,f=!!o&&d!==`function`&&d!==`symbol`;if(s.formMultiple=f,(M?.view(u)??u).multiple!==f){if(E!==null){for(let e=0;e<(M?.view(u)??u).options.length;e++)No((M?.view(u)??u).options[e],!1);E.push(Sa,u,`multiple`,(M?.view(u)??u).multiple)}(M?.view(u)??u).multiple=f}!c&&l!==f&&n==null&&(r==null?yg(u,f?new Set:``,!1):s.dvv=Jh),vg(u,n),r==null?c&&(s.dvv=void 0):bg(u,r)}function Tg(){if(ng.length>0){let e=ng;ng=[];for(let t=0;t<e.length;t++)N(e[t]).isConnected&&N(e[t]).focus()}if(tg.length>0){let e=tg;tg=[];for(let t=0;t<e.length;t++){let n=e[t].el,r=n.$$ctrl;if(r!==void 0&&r.sv!==null)continue;let i=e[t].value,a=(M?.view(n)??n).multiple?Array.isArray(i)?new Set(i.map(fg)):null:fg(i);a!==null&&yg(n,a,!0)}}if(eg.length>0){let e=eg;eg=[];for(let t=0;t<e.length;t++){let n=e[t].$$ctrl;n!==void 0&&(n.queued=!1,n.sv!==null&&yg(e[t],n.sv,!1))}}}function Eg(e){let t=e.$$ctrl;if(t!==void 0&&!t.composing&&(M?.view(e)??e).isConnected){if(e.localName===`select`){t.sv!==null&&yg(e,t.sv,!1);return}$h?.(e,t),t.v!==Jh&&pg(e,t.v)&&((M?.view(e)??e).value=fg(t.v))}}function Dg(e,t){t.c!==-1&&((M?.view(e)??e).checked!==t.c&&((M?.view(e)??e).checked=t.c),(M?.view(e)??e).type===`radio`&&(M?.view(e)??e).name!==``&&Og(e))}function Og(e){let t=(M?.view(e)??e).name,n=jo(e);for(let r=0;r<n.length;r++){let i=n[r];if(i===e||i.localName!==`input`||(M?.view(i)??i).type!==`radio`||(M?.view(i)??i).name!==t||(M?.view(i)??i).form!==(M?.view(e)??e).form)continue;let a=i.$$ctrl;a!==void 0&&a.c!==-1&&(M?.view(i)??i).checked!==a.c&&((M?.view(i)??i).checked=a.c)}}function kg(){let e=Zh;Zh=[];for(let t=0;t<e.length;t++)Eg(e[t])}function Ag(e,t){switch(t.length){case 5:if(t!==`value`)return!1;break;case 7:if(t!==`checked`)return!1;break;default:return!1}let n=e.localName;return n===`input`||n===`textarea`||n===`select`}function jg(e,t){let n=e.target;if(n===null||n.$$ctrl===void 0||(t.flags&Om)===0)return;let r=n.$$ctrl;if(e.type===`input`&&r.compositionEndTask!==void 0){let t=e,i=t.inputType;t.isComposing===!0||i===`insertCompositionText`||i===`deleteCompositionText`?(r.compositionEndTask!==null&&(clearTimeout(r.compositionEndTask),r.compositionEndTask=null),r.composing||n.addEventListener(`blur`,cg),r.composing=!0):r.composing&&typeof t.isComposing==`boolean`&&(r.compositionEndTask!==null&&(clearTimeout(r.compositionEndTask),r.compositionEndTask=null),n.removeEventListener(`blur`,cg),r.composing=!1)}let i=n.localName===`input`&&(n.type===`checkbox`||n.type===`radio`);if(e.type===`click`){i&&(r.c!==-1&&(Qh=n),n.$$checkableActivation=!0,setTimeout(()=>{n.$$checkableActivation===!0&&(n.$$checkableActivation=!1,n===Qh&&(Qh=null),Eg(n))},0));return}if(n===Qh&&(Qh=null),e.type===`input`&&n.localName===`select`){n.$$selectPick=!0,setTimeout(()=>{n.$$selectPick===!0&&(n.$$selectPick=!1,Eg(n))},0);return}e.type===`input`&&i&&n.$$checkableActivation===!0||(e.type===`change`&&(i&&(n.$$checkableActivation=!1),n.localName===`select`&&(n.$$selectPick=!1)),Zh.indexOf(n)===-1&&Zh.push(n))}function Mg(e){let t=e.elements;for(let e=0;e<t.length;e++)t[e].$$ctrl!==void 0&&Eg(t[e])}function Ng(e,t){if(hc?.stageAction(()=>Ng(e,t))===!0)return;let n=Pm.get(e);n===void 0&&(n=new Set,Pm.set(e,n),Fm++,Rm++),n.add(t),t.start.$$portalEventRange=t,t.end.$$portalEventStart=t.start}function Pg(e,t){if(hc?.stageAction(()=>Pg(e,t),!0)===!0)return;let n=t.start,r=t.end;n?.$$portalEventRange===t&&delete n.$$portalEventRange,r?.$$portalEventStart===n&&delete r.$$portalEventStart;let i=Pm.get(e);i!==void 0&&(i.delete(t),i.size===0&&(Pm.delete(e),Fm--,Rm++))}function Fg(e,t,n){let r=e.fragmentOwners;if(r!==void 0){if(e.fragmentAnchor===n){if(!Array.isArray(r)&&!Array.isArray(t)&&r===t)return;if(Array.isArray(r)&&Array.isArray(t)&&r.length===t.length){let e=!0;for(let n=0;n<r.length;n++)if(r[n]!==t[n]){e=!1;break}if(e)return}}Ig(e)}if(e.fragmentOwners=t,e.fragmentAnchor=n,Array.isArray(t))for(let r of t)r._registerPortal(e,n);else t._registerPortal(e,n);r===void 0&&(e.block.cleanups??=[]).push(()=>Ig(e))}function Ig(e){let t=e.fragmentOwners,n=e.fragmentAnchor;if(t!==void 0&&n!==void 0){if(e.fragmentOwners=void 0,e.fragmentAnchor=void 0,Array.isArray(t))for(let r of t)r._unregisterPortal(e,n);else t._unregisterPortal(e,n)}}function Lg(e,t,n){let r=null,i=null;for(let e of ms){let a=e._ownerBlock;(a===t||Tc(a,t))&&N(e._startMarker).parentNode===(M?.view(n)??n).parentNode&&(N(e._startMarker).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&(N(e._endMarker).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)!==0&&(r===null?r=e:(i??=[r]).push(e))}r!==null&&Fg(e,i??r,n)}function Rg(e,t,n,r,i,a,o,s=null){let c=I();if(c!==null)return c.suspend(()=>Rg(e,t,n,r,i,a,o,s));let l=Bg(r,i),u=e;if(u===null||u.target!==n||u.key!==s){u!==null&&zg(u);let e=(M?.view(document)??document).createComment(`portal`),r=(M?.view(document)??document).createComment(`/portal`);e.$$portalEnd=r,(M?.view(n)??n).appendChild(e),(M?.view(n)??n).appendChild(r);let i=Qc(`portal`,t,n,e,r,l.body,l.props,o,dl);if(u={__kind:`portalSlotSlot`,block:i,target:n,key:s,host:a,start:e,end:r},Ng(n,u),qb?.(i),$m(n),D!==null){let e=u;Ua(()=>{Pg(n,e),eh(n)})}A(i)}else u.host!==a&&O(u,`host`,u.host),u.host=a,u.block.body!==l.body&&O(u.block,`body`,u.block.body),u.block.props!==l.props&&O(u.block,`props`,u.block.props),u.block.extra!==o&&O(u.block,`extra`,u.block.extra),u.block.body=l.body,u.block.props=l.props,u.block.extra=o,A(u.block);let d=F(u.start);if(u.interleavedFragment===void 0)for(;d!==null&&d!==u.end;)d.$$portalParent=a,d.$$portalContainer=n,d=F(d);else for(;d!==null&&d!==u.end;){let e=d.$$portalEnd;if(e!==void 0){d=hv(d,e);continue}d.$$portalParent=a,d.$$portalContainer=n,d=F(d)}return u}function zg(e){let t=D;if(t!==null&&!t.aborted&&!Ra&&e.block?.mounted&&!Qa(t,e.block)&&e.target!==null){Xa(e.target,e.start,e.end,()=>zg(e));return}e.block&&=(j(e.block,!0),null),e.target&&=(Pg(e.target,e),eh(e.target),null)}function Bg(e,t){return typeof e==`function`?{body:e,props:t}:e!=null&&e.$$kind===dn&&typeof e.type==`function`?{body:e.type,props:e.props}:{body:Vg,props:e}}function Vg(e,t){Iv(t,0,t.parentNode,e,t.endMarker)}function Hg(e){return typeof e==`string`||typeof e==`number`?String(e):null}function Ug(e,t,n=void 0){let r=Hg(n);return{$$kind:fn,body:e,target:t,key:r,props:r===null?n:void 0}}var Wg=new WeakSet;function Gg(e){return e.key!==null||Wg.has(e)}var Kg=new WeakSet,qg=new WeakSet,Jg=Symbol(`octane.scopedChildren`),Yg={configurable:!0,enumerable:!0,get:function(){return this[Jg]()}};function Xg(e){return e==null||typeof e!=`object`&&typeof e!=`function`?!1:e.key!==void 0}function Zg(e){let t={};if(e==null)return t;for(let n in e)n!==`key`&&Ot.call(e,n)&&(t[n]=e[n]);return t}function Qg(e,t,n){let r=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);return r?.get===void 0&&r?.set===void 0?!1:(Object.defineProperty(e,\"children\",{configurable:!0,enumerable:!0,writable:!0,value:n}),!0)}function $g(e,t,n){if(t!=null&&Ot.call(t,`__proto__`)||Ot.call(Object.prototype,`children`)){let r=Zg(t);return kt(e,r),Object.defineProperty(r,Jg,{value:n}),Object.defineProperty(r,\"children\",Yg),qg.add(r),r}let r={};Object.defineProperty(r,Jg,{value:n});let i,a=!1,o=!1;if(t!=null){for(let e in t)if(e!==`key`&&Ot.call(t,e)){if(e===`children`)i=t[e],Object.defineProperty(r,\"children\",Yg),a=!0;else{let n=t[e];a&&!o&&!Ot.call(r,e)&&Qg(r,e,i)&&(o=!0),r[e]=n}}}let s=e?.defaultProps;if(s!=null)for(let e in s)e===`children`?(o?r.children:a?i:r.children)===void 0&&(i=s[e],o?r.children=i:a||(`children`in r?r.children=i:(Object.defineProperty(r,\"children\",Yg),a=!0))):(a&&!o&&!Ot.call(r,e)&&Qg(r,e,i)&&(o=!0),r[e]===void 0&&(r[e]=s[e]));return(o||!a)&&Object.defineProperty(r,\"children\",Yg),qg.add(r),r}function e_(e,t,n,r,i,a){let o={$$kind:dn,type:e,props:t,key:n,ref:r};return a!==void 0&&(o.__octaneInvocationSite=a),Object.defineProperty(o,Jg,{value:i}),Object.defineProperty(o,\"children\",Yg),o}function t_(e){return e}var n_=Symbol(`octane.scopedValue`);function r_(){return this[n_]().type}function i_(){return this[n_]().props}function a_(){let e=this[n_](),t=e.key;return t===null&&Wg.has(e)&&Wg.add(this),t}function o_(){return this[n_]().ref}function s_(){return this[n_]().children}function c_(){return this[n_]().__octaneInvocationSite}var l_={type:{configurable:!0,enumerable:!0,get:r_},props:{configurable:!0,enumerable:!0,get:i_},key:{configurable:!0,enumerable:!0,get:a_},ref:{configurable:!0,enumerable:!0,get:o_},children:{configurable:!0,enumerable:!0,get:s_},__octaneInvocationSite:{configurable:!0,enumerable:!0,get:c_}};function u_(e){return d_(ad(e))}function d_(e){let t={$$kind:dn};return Object.defineProperty(t,n_,{value:e}),Object.defineProperty(t,\"type\",l_.type),Object.defineProperty(t,\"props\",l_.props),Object.defineProperty(t,\"key\",l_.key),Object.defineProperty(t,\"ref\",l_.ref),Object.defineProperty(t,\"children\",l_.children),Object.defineProperty(t,\"__octaneInvocationSite\",l_.__octaneInvocationSite),t}function f_(e,t,n,r){return p_(e,t,ad(n),r)}function p_(e,t,n,r){let i=t??null,a=Xg(i)?``+i.key:null,o=$g(e,i,n),s=e_(e,o,a,o.ref===void 0?null:o.ref,n,r);return a===null&&i!=null&&(typeof i==`object`||typeof i==`function`)&&`key`in i&&Wg.add(s),t_(s)}function m_(e,t,...n){return h_(void 0,e,t,n)}function h_(e,t,n,r=bm){typeof t==`function`&&bn(t);let i=n??null,a=Xg(i)?``+i.key:null,o=r.length>0,s=o?r.length===1?r[0]:r:i?.children;r.length>1&&I_.add(r);let c=Zg(i);o&&(c.children=s),kt(t,c),s=c.children;let l={$$kind:dn,type:t,props:c,key:a,ref:c.ref===void 0?null:c.ref,children:s??null};return e!==void 0&&(l.__octaneInvocationSite=e),a===null&&i!=null&&(typeof i==`object`||typeof i==`function`)&&`key`in i&&Wg.add(l),t_(l)}function g_(e){return e!=null&&e.$$kind===dn}function __(e){return e!=null&&e.$$kind===dn&&typeof e.type==`string`}function v_(e){let t;try{t=String(e)}catch{return`object with keys {`+Object.keys(e).join(`, `)+`}`}return t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t}function y_(e){let t=v_(e);return Error(w(3,t))}function b_(e){let t=e===null?`null`:e===void 0?`undefined`:typeof e==`object`?v_(e):JSON.stringify(e);return Error(w(24,t))}var x_=Symbol(`NO_KEY`);function S_(e,t,n,r,i,a,o,s,c,l,u){let d=hp,f=d!==null&&r===d.type;if(!f&&typeof r!=`function`&&typeof r!=`string`)throw b_(r);let p=f?d.body:typeof r==`string`?xv:r;f&&(s=!1,c=!1,!l&&o===void 0&&Xg(i)&&(o=i.key,l=!0)),w_(dl,e,t,n,p,r,i,typeof r==`string`?{$$kind:dn,type:r,props:i,key:null,ref:i!=null&&i.ref!==void 0?i.ref:null,children:i==null?null:i.children}:i,a,o,s,c,l,u)}function C_(e,t,n,r,i,a,o,s,c,l,u){if(typeof r!=`function`)throw b_(r);w_(null,e,t,n,r,r,i,i,a,o,s,c,l,u)}function w_(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(T?.pending&&!T.crossRenderUpdate)return;if(n===0&&t!==cl){let e=t.slots[0];if(e?.returnedOutput===!0){if(e.__kind===`componentSlotSlot`)ll(e,!1);else{let e=t.block;if(e.outputHandler(e,null,!0),e.disposed)return}}}let m=t.block,h=I();if(h!==null&&(c!=null&&h.isFresh(c)||h.isFresh(r))){h.suspend(()=>w_(e,t,n,r,i,a,o,s,c,l,u,d,f,p));return}let g=t.slots[n],_=null;if(g===void 0){let e=null,i=null,o=!1,s=h===null?void 0:a[ht],p=h?.passthroughRanges===!0,v=p&&s!==`owner`;if(p&&s===`owner`&&(h.passthroughRanges=!1),!v&&d===!0&&un(a,1)&&(d=!1),v)o=!0;else if(d===!0&&m!==null){let t=m.startMarker,n=m.endMarker;t!=null&&n!=null&&t!==n&&t.nodeType===8&&n.nodeType===8?(e=t,i=n,o=!0):t===null&&n===null&&(o=!0)}let y=null;if(!o&&h!==null&&h.isOpen(c??null))y=c,_=y;else if(!o&&h!==null&&!h.isOpen(c??null)){let e=h.node;(e===null||(M?.view(e)??e).parentNode!==r)&&(e=P(r)),_=e,e!==null&&h.isOpen(e)&&(y=e)}if(!o){if(y!==null)e=y,i=h.close(y),m===h.rootBlock&&h.claimRootRemainder(F(i)),h.node=F(e);else if(u===!0||u===2&&a.$$singleRoot===!0)e=null,i=null;else{if(h!==null){let e=_;Ar(t,n),Rx(()=>Error(w(55)));let r=e;for(;r!==null&&r!==c&&!yf(r);){let e=F(r);(M?.view(r)??r).remove(),r=e}}e=(M?.view(document)??document).createComment(`comp`),i=(M?.view(document)??document).createComment(`/comp`),(M?.view(r)??r).insertBefore(e,c??null),(M?.view(r)??r).insertBefore(i,c??null),h!==null&&(h.markFresh(e),h.markFresh(i),h.node=i)}}g={__kind:`componentSlotSlot`,start:e,end:i,anchor:c??null,singleRoot:e===null&&!o,inherited:o,block:null,currentComp:null,prevKey:x_,keyed:f===!0||l!==void 0},t.slots[n]=g,xl(t,g)}let v=l===void 0?x_:``+l,y=l!==void 0&&g.prevKey!==x_&&v!==g.prevKey,b=a!==g.currentComp||y,x=D!==null&&g.block!==null&&b;if(x){if(g.inherited)Wa(g,r,g.start,g.end);else{let e=g.start??g.block.startMarker,t=g.end??g.block.endMarker;if(e!==null&&t!==null&&(M?.view(e)??e).parentNode===r&&(M?.view(t)??t).parentNode===r)Wa(g,r,(M?.view(e)??e).previousSibling,F(t));else{let e=g.anchor;Wa(g,r,e===null?(M?.view(r)??r).lastChild:(M?.view(e)??e).previousSibling,e)}}}if((f===!0||l!==void 0)&&!g.keyed&&(x||O(g,`keyed`,g.keyed),g.keyed=!0),y&&(g.currentComp=null),!x&&!Object.is(g.prevKey,v)&&O(g,`prevKey`,g.prevKey),g.prevKey=v,b){let o=Qn||Ln?{parentScope:t,invocationSite:p,key:l,hasKey:l!=null}:void 0,c=g.block===null||!g.block.mounted||m.idState.renderOwner?.signalOwner===void 0?void 0:{parent:t,slot:n,kind:g.__kind,branch:void 0,component:a,key:v},u=ci,d=m.currentRenderMode===`transition`,f=u!==null&&g.block!==null&&g.block.mounted&&h===null,y=f&&Bb(m),b=D===null||y?u:null,x=f&&!d&&y,S=x&&!d,C=D;if(C!==null&&!y&&h===null&&g.block!==null&&g.block.mounted&&!Qa(C,g.block)){let t=g.block,n=t.startMarker,l=t.endMarker,u=g.inherited,d=u?g.start===null?P(r):F(g.start):g.start??n;u&&d===g.end&&(d=null);let f=u?d===null?null:g.end===null?(M?.view(r)??r).lastChild:N(g.end).previousSibling:g.end??l,p=d===null?u?g.start:null:f;if(p!==null&&(M?.view(p)??p).parentNode===r){let h=E_(m,r,p,i,s,e,`dynamic`,void 0,!1,o,c);if(h.suspended||h.failed)throw M_(h.wip),h.suspended===null?h.error:new ld(h.suspended);N(h.wip.start).data=`comp`,N(h.wip.end).data=`/comp`,g.start=h.wip.start,g.end=h.wip.end,g.singleRoot=!1,g.inherited=!1,g.block=h.wip.block,g.currentComp=a,u||Ub(m,n,l,h.wip.start,h.wip.end),O_(h.wip),Ya(t,r,d,f);return}}if(b!==null&&f&&(d||x)){if(!S&&!g.singleRoot&&!g.inherited&&g.end!==null){let t=b.render(m,r,g.end,i,s,e,`dynamic`,void 0,!1,o,c);if(t.suspended||t.failed)throw b.dispose(t.wip),t.failed?t.error:new ld(t.suspended);N(t.wip.start).data=`comp`,N(t.wip.end).data=`/comp`;let n=g.block;g.start=t.wip.start,g.end=t.wip.end,g.block=t.wip.block,g.currentComp=a,b.splice(t.wip),j(n),m.disposed||g.block!==t.wip.block||t.wip.block.disposed;return}let t=g.end??g.anchor;if(t!==null){let n=b.render(m,r,t,i,s,e,`dynamic`,void 0,!1,o,c);if(b.dispose(n.wip),n.failed)throw n.error;if(n.suspended)throw new ld(n.suspended)}}if(g.block){if(g.inherited){if(j(g.block),m.disposed)return;if(g.start===null)for(;P(r);)(M?.view(r)??r).removeChild(P(r))}else if(g.singleRoot){if(j(g.block),m.disposed)return}else{let e=F(g.end);if(j(g.block),m.disposed)return;let t=(M?.view(document)??document).createComment(`comp`),n=(M?.view(document)??document).createComment(`/comp`);(M?.view(r)??r).insertBefore(t,e),(M?.view(r)??r).insertBefore(n,e),g.start=t,g.end=n}}if(g.currentComp=a,g.singleRoot){let t=g.anchor?N(g.anchor).previousSibling:(M?.view(r)??r).lastChild,n=Qc(`dynamic`,m,r,null,g.anchor,i,s,void 0,e);o!==void 0&&vr(n,o),g.block=n;try{A(n)}finally{if(h!==null&&_!==null&&(M?.view(_)??_).parentNode===r)n.startMarker=_,n.endMarker=_;else{let e=g.anchor?N(g.anchor).previousSibling:(M?.view(r)??r).lastChild;e!==null&&e!==t&&(n.startMarker=e,n.endMarker=e)}}}else{let t=Qc(`dynamic`,m,r,g.start,g.end,i,s,void 0,e);o!==void 0&&vr(t,o),g.inherited&&(t.exclusiveMarkers=!0),g.block=t,A(t)}}else if(g.block){if(Gv(g.block,a,o))return;g.block.props!==s&&O(g.block,`props`,g.block.props),g.block.props=s,A(g.block)}h!==null&&!g.inherited&&g.end!==null&&(h.node=F(g.end))}function T_(e){return e==null||e===!1||e===!0?``:String(e)}function E_(e,t,n,r,i,a,o=`dynamic`,s,c=!1,l,u){let d=(M?.view(document)??document).createComment(`wip`),f=(M?.view(document)??document).createComment(`/wip`),p=F(n);(M?.view(t)??t).insertBefore(d,p),(M?.view(t)??t).insertBefore(f,p);let m=ds(),h=ec.length,g=k;k=m;let _=Qc(o,e,t,d,f,r,i,s,a);l!==void 0&&vr(_,l),u!==void 0&&tr.set(_,u),c&&(_.$$implicitBail=!0,_.memoInChain=!0);let v=null,y=null,b=!1;try{A(_)}catch(e){ud(e)?v=e.thenable:(y=e,b=!0)}finally{k=g}let x={block:_,start:d,end:f,capture:m,domParent:t,refDetachCheckpoint:h};if(v!==null&&u!==void 0){let t=e.idState.renderOwner,n=nr(e),r=n?.tryBlock??t?.current,i=n??t;if(i!==void 0&&r!=null){sr(_,r,i,!0);for(let e of D?.created??[])!e.disposed&&Tc(_,e)&&sr(e,r,i);x.retrySignalOwners=i.retrySignalOwners}}return{wip:x,suspended:v,error:y,failed:b}}function D_(e,t=!1){e.presentations!==void 0&&k!==null&&(k.presentations??=[]).push(...e.presentations),(k!==null||!t)&&Yn?.spliceCapture(e,k);let n=e.renderedBlocks;if(e.renderedBlocks=null,e.renderRoot=null,n!==null&&k!==null)for(let e of n)il(k,e);for(let t=0;t<3;t++){let n=e.effects[t],r=k===null?ns[t]:k.effects[t];for(let e=0;e<n.length;e++)r.push(n[e])}let r=k===null?rs:k.events;for(let t=0;t<e.events.length;t++)r.push(e.events[t]);let i=k===null?is:k.eventActions;for(let t=0;t<e.eventActions.length;t++)i.push(e.eventActions[t]);let a=k===null?cs:k.refs;for(let t=0;t<e.refs.length;t++)a.push(e.refs[t]);if(e.detaches!==void 0){let t=k===null?ec:k.detaches??=[];for(let n of e.detaches)t.push(n)}let o=k===null?ss:k.stores;for(let t=0;t<e.stores.length;t++)o.push(e.stores[t]);if(e.suspenseCommits!==void 0)for(let t of e.suspenseCommits)us(t);let s=e.renderCleanups;if(s!==void 0){if(e.renderCleanups=void 0,k!==null){let e=k.renderCleanups??=[];for(let t of s)e.push(t)}else for(let e of s)hc?.stageAction(()=>e(!1))!==!0&&e(!1)}}function O_(e){D_(e.capture)}function k_(e){if(e===null)return;Yn?.discardCapture(e);let t=e.renderedBlocks,n=e.renderRoot;if(e.renderedBlocks=null,e.renderRoot=null,t!==null)for(let e of t)rl(e,n);for(let t=0;t<e.stores.length;t++)e.stores[t].queued=!1;let r=e.renderCleanups;if(r!==void 0){e.renderCleanups=void 0;for(let e of r)e(!0)}}function A_(e,t){let n=e.domParent,r=e.start;for(;r!==null;){let i=F(r);if((M?.view(n)??n).insertBefore(r,t),r===e.end)break;r=i}}function j_(e,t){A_(e,t),O_(e)}function M_(e){let t=k,n=er;e.retrySignalOwners!==void 0&&(er=e.retrySignalOwners),k=e.capture;try{j(e.block,!0)}finally{er=n,k=t,ec.splice(e.refDetachCheckpoint),k_(e.capture)}}function N_(e){let t=D;if(t!==null&&!t.aborted&&!Ra){if(e.block===null&&e.forSlot===null&&e.text===null&&e.hostNode===null)return;let t=e.ownerHost??N(e.start)?.parentNode??N(e.text)?.parentNode??N(e.hostNode)?.parentNode??e.block?.parentNode??null;if(t!==null){Ov(e,t);let n=e.ownerHost!==null||e.borrowed&&e.start===null?P(t):e.start===null?e.text??e.hostNode:F(e.start),r=e.ownerHost===null?e.start!==null||e.borrowed?e.end:(M?.view(n)??n)?.nextSibling??null:null;n===r&&(n=null);let i=n===null?null:r===null?(M?.view(t)??t).lastChild:(M?.view(r)??r).previousSibling,a=e.block,o=e.forSlot,s=e.hostNode;if(a!==null)Ya(a,t,n,i);else{if(o!==null){for(let e=o.head;e!==null;e=e.nextSibling)Ja(e);o.emptyBlock!==null&&Ja(o.emptyBlock)}Xa(t,n,i,()=>{if(o!==null){for(let e=o.head;e!==null;e=e.nextSibling)j(e,!1);o.emptyBlock!==null&&j(o.emptyBlock,!1)}else s!==null&&rx(s,null)})}e.block=null,e.forSlot=null,e.text=null,e.hostNode=null,e.currentComp=null,e.ownerHost!==null&&(e.start=null,e.end=null);return}}let n=e.block!==null;if(e.block!==null&&(j(e.block,!1),e.block=null),e.ownerHost!==null){let t=e.ownerHost,r=P(t);for(;r!==null;){let e=F(r);n||rx(r,null),(M?.view(t)??t).removeChild(r),r=e}e.start=null,e.end=null}else if(e.start!==null){let t=N(e.start).parentNode;if(t!==null){let r=F(e.start);for(;r!==null&&r!==e.end;){let e=F(r);n||rx(r,null),(M?.view(t)??t).removeChild(r),r=e}}}else e.text===null?e.hostNode!==null&&N(e.hostNode).parentNode!==null&&(rx(e.hostNode,null),N(N(e.hostNode).parentNode).removeChild(e.hostNode)):N(e.text).remove();e.text=null,e.currentComp=null,e.hostNode=null}function P_(e,t){if(D!==null&&!Ra){let n=e.ownerHost??N(e.start)?.parentNode??t.parentNode,r=e.ownerHost===null?N(e.start)?.nextSibling??null:P(n),i=e.ownerHost===null?e.end:null;r===i&&(r=null);let a=r===null?null:i===null?(M?.view(n)??n).lastChild:(M?.view(i)??i).previousSibling;Ya(t,n,r,a);return}if(j(t,!1),e.ownerHost!==null){let t=P(e.ownerHost);for(;t!==null;){let n=F(t);N(e.ownerHost).removeChild(t),t=n}}else if(e.start!==null){let t=N(e.start).parentNode;if(t!==null){let n=F(e.start);for(;n!==null&&n!==e.end;){let e=F(n);(M?.view(t)??t).removeChild(n),n=e}}}}function F_(e,t){let n=e!=null&&e.$$kind===dn;return e?.$$kind===fn&&e.key!=null||n&&e.key!=null&&!Kg.has(e)||n&&e.key!=null?e.key:t}var I_=new WeakSet;function L_(e,t){return e!=null&&(e.$$kind===dn||e.$$kind===fn)&&e.key!=null?e.key:t}function R_(e){return I_.add(e),e}var z_=!1;function B_(e){z_=!0;let t=e;for(;t!==null&&!t.deoptRefs;)t.deoptRefs=!0,t=t.parentBlock}function V_(e,t,n,r){let i=Zp(e,t);if(i!==null){Kh(e,i,n,void 0);return}if(t===`ref`)n!=null&&(B_(r),$s(r,n,e));else if(t===`className`||t===`class`)zp(e,n);else if(t===`style`)Vp(e,n,void 0);else{let r=Jp(t,e);r===null?Fp(e,t,n):(Sm(e,r.key,n),r.capture?Um.has(r.type)||Qm([r.type]):Mm.has(r.type)||Zm([r.type]))}}function H_(e){if(e==null||e.dangerouslySetInnerHTML==null)return!1;if(rp(e.dangerouslySetInnerHTML),e.children!=null)throw np();return!0}function U_(e){return H_(e.props)||e.type===`textarea`&&(e.props?.value!=null||e.props?.defaultValue!=null)}function W_(e){(M?.view(e)??e).checked=(M?.view(e)??e).checked,(M?.view(e)??e)[Sg]=!0}function G_(e,t,n){if(t==null){e.localName===`input`&&W_(e);return}let r=e.localName===`input`;for(let i in t){if(i===`key`||i===`children`)continue;if(i===`suppressHydrationWarning`){e.__oct_suppress=t[i]===!0;continue}let a=t[i];r&&(i===`defaultChecked`||i===`checked`&&a!=null)&&(r=!1),V_(e,i,a,n)}r&&W_(e)}function K_(e,t,n,r){let i=t?.ref,a=n?.ref;if(i!=null&&i!==a&&tc(i,e),t!=null)for(let r in t)r!==`key`&&r!==`children`&&r!==`ref`&&(n==null||!(r in n))&&Yp(e,r,t[r]);if(n!=null)for(let i in n){if(i===`key`||i===`children`)continue;if(i===`suppressHydrationWarning`){e.__oct_suppress=n[i]===!0;continue}let a=n[i];if(t==null||t[i]!==a||Ag(e,i)){if(i===`autoFocus`&&!jp(e))continue;i===`style`?Vp(e,a,t?.style):V_(e,i,a,r)}}}var q_=Symbol(`octane.deoptDesc`);function J_(e){let t=P(e);for(;t!==null;){let e=t.$$portalEnd;if(e!=null){t=hv(t,e);continue}if(t.$$deoptKey!==void 0||Y_(t)!==void 0)return!0;t=F(t)}return!1}function Y_(e){return(M?.view(e)??e)[q_]}function X_(e,t,n){return e!==void 0&&e.type===t.type&&e.props===t.props&&e.key===t.key&&e.ref===t.ref&&e.children===n}function Z_(e,t){let n=t[n_];if(n===void 0&&t[Jg]===void 0)return!0;let r=n===void 0?t:n(),i=e.deoptNode===null?void 0:Y_(e.deoptNode);return i===r||X_(i,r,r.children)}function Q_(e,t){let n=t[n_],r=n===void 0?t:n();if(r[Jg]!==void 0){let t=r.children,n=Y_(e);r=X_(n,r,t)?n:{$$kind:dn,type:r.type,props:r.props,key:r.key,ref:r.ref,children:t}}E!==null&&E.push(Sa,e,q_,Y_(e)),(M?.view(e)??e)[q_]=r}function $_(e){return g_(e)&&e.type===mp}function ev(e){let t=e.children;return t==null?[]:Array.isArray(t)?t:[t]}function tv(e){return{$$kind:dn,type:nv,props:e,key:e.key,ref:null,children:null}}function nv(e,t){let n=t.block,r=n.slots[1];if(r===void 0){let i=I(),a,o,s=i?.node;if(s?.nodeType===8&&(M?.view(s)??s).data===`frag`){a=s;let e=1,t=F(a);for(;t!==null;){if(t.nodeType===8){if((M?.view(t)??t).data===`frag`)e++;else if((M?.view(t)??t).data===`/frag`&&--e===0)break}t=F(t)}if(t===null)throw Error(w(50));o=t,i.node=F(a)}else a=(M?.view(document)??document).createComment(`frag`),o=(M?.view(document)??document).createComment(`/frag`),N(n.parentNode).insertBefore(a,n.endMarker),N(n.parentNode).insertBefore(o,n.endMarker);r=wp(t,a,o,e.ref),n.slots[0]={a:r},n.slots[1]=r,n.refFields=[`f`,`a`,``]}else r._currentRef!==e.ref&&(O(r,`_currentRef`,r._currentRef),r._currentRef!=null&&tc(r._currentRef,r),e.ref!=null&&$s(t,e.ref,r),r._currentRef=e.ref);Iv(t,2,n.parentNode,e.children,r._endMarker);let i=I();i!==null&&(i.node=F(r._endMarker))}function rv(e){return I_.has(e)?`fragment`:`array`}var iv=JSON.stringify,av=String;function ov(e){if(JSON.stringify!==iv||`toJSON`in e)return null;for(let t=0;t<e.length;t++){let n=typeof e[t];if(n!==`string`&&n!==`number`)return null}return`[`+JSON.stringify(e)+`,`}function sv(e,t,n,r,i,a){let o=(g_(n)||n?.$$kind===fn)&&n.key!=null;return t.length===0?(e.push(o?`k`+String(i):r),a):a!==null&&(!o||typeof i==`string`&&String===av)&&JSON.stringify===iv&&!(`toJSON`in t)&&(a===void 0&&(a=ov(t)),a!==null)?(e.push(o?a+`\"key\",`+JSON.stringify(String(i))+`]`:a+`\"index\",`+r+`]`),a):(e.push(JSON.stringify([t,o?`key`:`index`,o?String(i):r])),null)}function cv(e,t,n,r,i){let a=r===`fragment`?L_:F_,o=n.length,s=o>1?void 0:null;for(let c=0;c<o;c++){let l=n[c];if($_(l)){if(l.ref!=null||Ot.call(l.props,`ref`)){e.push(tv(l)),s=sv(t,i,l,c,a(l,c),s);continue}let n=ev(l);l.key==null?cv(e,t,n,`fragment`,r===`fragment`?[...i,`wrapper`,o===1?0:c]:o===1?i:[...i,`position`,c,`fragment`]):cv(e,t,n,`fragment`,[...i,`keyed-fragment`,l.key]);continue}if(Array.isArray(l)){let n=rv(l);cv(e,t,l,n,n===r?[...i,`wrapper`,o===1?0:c]:o===1?i:[...i,`position`,c,n]);continue}e.push(l),s=sv(t,i,l,c,a(l,c),s)}}function lv(e,t){return(g_(e)||e?.$$kind===fn)&&e.key!=null?`k`+String(t):0}function uv(e,t=!1,n=!0){if($_(e)){if(e.ref!=null||Ot.call(e.props,`ref`))return{items:[tv(e)],keys:[lv(e,e.key??0)]};let t=[],n=[],r=e.key==null?[]:[`keyed-fragment`,e.key];return cv(t,n,ev(e),`fragment`,r),{items:t,keys:n}}if(Array.isArray(e)){let t=[],n=[];return cv(t,n,e,rv(e),[]),{items:t,keys:n}}return n&&g_(e)&&e.key!=null?{items:[e],keys:[lv(e,e.key)]}:t?{items:[e],keys:[lv(e,L_(e,0))]}:null}function dv(e){if(e==null||typeof e==`string`||Array.isArray(e)||g_(e))return null;let t=At(e);if(t===null)return null;let n=[],r=t.call(e),i;for(;!(i=r.next()).done;)n.push(i.value);return n}function fv(e,t,n,r){if(n==null||n===!1||n===!0||n===``)return;if(Array.isArray(n)){let i=I_.has(n)?L_:F_;for(let a=0;a<n.length;a++){let o=n[a];if(Array.isArray(o))fv(e,t,o,r+`:`+a);else if(o!=null&&o!==!1&&o!==!0&&o!==``){e.push(o);let n=i(o,a);if(r===``)t.push(typeof n==`string`&&n[0]===`:`?`:`+n:n);else{let e=o?.$$kind===dn&&o.key!=null;t.push(r+`:`+(e?`k`:`i`)+String(n))}}}return}e.push(n);let i=n?.$$kind===dn&&n.key!=null?n.key:0;t.push(r===``?typeof i==`string`&&i[0]===`:`?`:`+i:i:r+`:i0`)}function pv(e,t,n,r){if(t==null||t===!1||t===!0||t===``)return null;let i=typeof t;if(i===`string`||i===`number`||i===`bigint`){let n=String(t);if(e!==null&&e.nodeType===3){let t=I();return t!==null&&!t.isFresh((M?.view(e)??e).parentNode)?t.htextSwap(e,n):(wf(e,n),e)}return(M?.view(document)??document).createTextNode(n)}if(__(t)){let i=Mp(t.type,r),a;return e!==null&&e.nodeType===1&&e.localName===t.type&&e.namespaceURI===(i??Ap)?(a=e,K_(a,Y_(a)?.props??null,t.props,n)):(a=i===void 0?(M?.view(document)??document).createElement(t.type):(M?.view(document)??document).createElementNS(i,t.type),I()?.markFresh(a),G_(a,t.props,n)),Q_(a,t),U_(t)||mv(a,t.children,n),a}if(g_(t))throw Error(w(25));if(i===`object`)throw y_(t);return null}function mv(e,t,n){let r=typeof t;if(r===`string`&&t!==``||r===`number`||r===`bigint`){let n=P(e);if(n!==null&&n.nodeType===3&&F(n)===null&&n.$$deoptKey===0&&n.$$portalEnd==null){let r=I();r!==null&&!r.isFresh(e)?r.htextSwap(n,String(t)):wf(n,String(t));return}}if((t==null||r===`boolean`||t===``)&&P(e)===null)return;let i=Np(e),a=[],o=[];fv(a,o,t,``);let s=P(e),c=D!==null&&(M?.view(e)??e).parentNode!==null&&(n.mounted||D.hydrating||D.retainedCreated?.has(n));if(s===null){for(let t=0;t<a.length;t++){let r=pv(null,a[t],n,i);r!==null&&(c&&Ka(e),r.$$deoptKey=o[t],(M?.view(e)??e).appendChild(r))}return}if(a.length===0&&I()===null&&!J_(e))return;let l=[],u=!1,d,f=null,p=[],m=s;for(;m!==null;){let e=m.$$portalEnd;if(e!=null){u=!0,m=hv(m,e);continue}let t=m.$$deoptKey,n=t===void 0?Y_(m):void 0;if(t===void 0&&n===void 0&&!(d??=I()!==null)){u=!0,m=F(m);continue}l.push(m);let r=t??n?.key;if(r!=null&&(f===null&&(f=new Map),!f.has(r))){f.set(r,m),m=F(m);continue}p.push(m),m=F(m)}let h=0,g=[];for(let e=0;e<a.length;e++){let t=a[e],r=o[e],s=null;f!==null&&(s=f.get(r)??null,s!==null&&f.delete(r)),s===null&&h<p.length&&(s=p[h++]);let c=pv(s,t,n,i);c!==null&&(c.$$deoptKey=r,g.push(c))}let _=g.length>0?new Set(g):null;for(let t=l.length-1;t>=0;t--){let r=l[t];if(_===null||!_.has(r)){let t=I();t!==null&&!t.isFresh(e)&&Rx(()=>Error(w(62)),n),c?(Ka(e),Xa(e,r,r,()=>rx(r,null))):(rx(r,null),(M?.view(e)??e).removeChild(r))}}let v=P(e);for(let t=0;t<g.length;t++){let n=g[t],r=u?gv(v,d===!0):v;r!==n&&(c&&Ka(e),Vs===null?(M?.view(e)??e).insertBefore(n,r):(qs(e,Vs),Ex(e,n,r,Vs))),v=F(n)}}function hv(e,t){let n=e;for(;n!==null&&n!==t;)n=F(n);return F(n??e)}function gv(e,t){for(;e!==null;){let n=e.$$portalEnd;if(n!=null){e=hv(e,n);continue}if(!t&&e.$$deoptKey===void 0&&Y_(e)===void 0){e=F(e);continue}return e}return null}function _v(e,t){let n=t.block,r=I(),i=t.slots[0],a=__(e)&&i?.__kind===`childSlot`&&i.currentComp===bv||yv(e),o=n.startMarker;if(o!==null&&o===n.endMarker&&o.nodeType!==8&&(M?.view(o)??o).parentNode!==null&&(a||!__(e))){let e=(M?.view(o)??o).parentNode;D!==null&&(Ga(e,(M?.view(o)??o).previousSibling,F(o)),O(n,`startMarker`,n.startMarker),O(n,`endMarker`,n.endMarker));let t=(M?.view(document)??document).createComment(`it`),r=(M?.view(document)??document).createComment(`/it`);(M?.view(e)??e).insertBefore(t,o),(M?.view(e)??e).insertBefore(r,F(o)),n.startMarker=t,n.endMarker=r}if(a){let i=n.deoptNode,a=null;if(i!=null){if(O(n,`deoptNode`,n.deoptNode),t.slots[0]===void 0&&i.nodeType===1&&__(e)&&i.localName===e.type&&(M?.view(i)??i).parentNode===n.parentNode)a=i;else if((M?.view(i)??i).parentNode===n.parentNode){if(D!==null)Ga(n.parentNode,(M?.view(i)??i).previousSibling,F(i)),Xa(n.parentNode,i,i,()=>rx(i,null));else{rx(i,null);let e=n.parentNode;(M?.view(e)??e).removeChild(i)}}n.deoptNode=null}if(r!==null&&t.slots[0]===void 0&&r.isOpen(n.startMarker)){let e={__kind:`childSlot`,start:n.startMarker,end:n.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null};t.slots[0]=e,xl(t,e)}if(r===null&&t.slots[0]===void 0&&n.startMarker!==null&&n.endMarker!==null&&n.startMarker!==n.endMarker&&n.startMarker.nodeType===8&&n.endMarker.nodeType===8){let e={__kind:`childSlot`,start:n.startMarker,end:n.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:a,portal:null};t.slots[0]=e,xl(t,e)}else if(a!==null&&(M?.view(a)??a).parentNode!==null){rx(a,null);let e=(M?.view(a)??a).parentNode;(M?.view(e)??e).removeChild(a)}Iv(t,0,n.parentNode,e,n.endMarker,void 0,void 0,void 0,!1);return}t.slots[0]!==void 0&&t.slots[0]!==null&&t.slots[0].__kind===`childSlot`&&Iv(t,0,n.parentNode,null,n.endMarker);let s=n.endMarker,c=n.deoptNode;if(c===null&&r!==null){let e=n.startMarker;c=e==null?null:F(e),c===s&&(c=null)}let l=pv(c,e,n,Np(n.parentNode));if(l!==c){if(O(n,`deoptNode`,n.deoptNode),c!=null&&c!==l&&(M?.view(c)??c).parentNode===n.parentNode){if(D!==null&&Ga(n.parentNode,(M?.view(c)??c).previousSibling,F(c)),l!==null){let e=n.parentNode;(M?.view(e)??e).insertBefore(l,c)}if(D!==null){let e=c;Xa(n.parentNode,e,e,()=>rx(e,null))}else{rx(c,null);let e=n.parentNode;(M?.view(e)??e).removeChild(c)}}else if(l!==null){D!==null&&n.mounted&&Ga(n.parentNode,(M?.view(s)??s)?.previousSibling??N(n.parentNode).lastChild,s);let e=n.parentNode;(M?.view(e)??e).insertBefore(l,s)}c!==null&&n.startMarker===c&&(O(n,`startMarker`,n.startMarker),O(n,`endMarker`,n.endMarker),n.startMarker=l,n.endMarker=l)}n.deoptNode=l}function vv(e,t){let n=t.slots[0],r=t.block;if(g_(e)&&typeof e.type==`function`){if(n===void 0||n.__kind===`componentSlotSlot`){let n=r.deoptNode;n!==null&&(rx(n,null),(M?.view(n)??n).parentNode===r.parentNode&&N(r.parentNode).removeChild(n),r.deoptNode=null),S_(t,0,r.parentNode,e.type,e.props,r.endMarker,void 0,!0,!0,void 0,e.__octaneInvocationSite);return}}else if(n?.__kind===`componentSlotSlot`){let e=r.startMarker;if(e!==null&&e===r.endMarker&&e.nodeType!==8&&(M?.view(e)??e).parentNode!==null){let t=(M?.view(document)??document).createComment(`it`),n=(M?.view(document)??document).createComment(`/it`);N((M?.view(e)??e).parentNode).insertBefore(t,e),N((M?.view(e)??e).parentNode).insertBefore(n,F(e)),r.startMarker=t,r.endMarker=n}fl(r,n),r.deoptNode=null}_v(e,t)}function yv(e){if(typeof e==`function`)return!0;if(typeof e!=`object`||!e)return!1;if(typeof e.then==`function`)return!0;if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(yv(e[t]))return!0;return!1}return!g_(e)&&At(e)!==null?!0:e.$$kind===dn?e.type===mp||hp!==null&&e.type===hp.type||typeof e.type==`function`||yv(e.children):e.$$kind===fn}function bv(e,t){let n=t.deoptNode,r=I(),i=Mp(e.type,Np(t.parentNode));if(n===null&&r!==null&&r.node!==null&&r.node.nodeType===1&&r.node.localName===e.type&&(i===void 0||r.node.namespaceURI===i)){n=r.node,t.deoptNode=n,G_(n,e.props,t),Q_(n,e);let i=F(r.node);U_(e)||(r.node=P(n),Iv(t,0,n,e.children,null,!1,n)),r.node=i;return}if(n===null&&r!==null&&r.node!==null){let a=r.node;if(r.isOpen(a)){let e=r.close(a);r.node=F(e),r.removeRange(a,e)}else r.node=F(a),(M?.view(a)??a).remove();n=i===void 0?(M?.view(document)??document).createElement(e.type):(M?.view(document)??document).createElementNS(i,e.type),r.markFresh(n),t.deoptNode=n;let o=t.parentNode;(M?.view(o)??o).insertBefore(n,t.endMarker),G_(n,e.props,t),Q_(n,e),U_(e)||r.suspend(()=>Iv(t,0,n,e.children,null,!1,n));return}if(n===null||n.localName!==e.type||i!==void 0&&n.namespaceURI!==i){if(n!==null){let e=n;D!==null&&(Ga(t.parentNode,(M?.view(e)??e).previousSibling,F(e)),O(t,`deoptNode`,t.deoptNode));let r=t.slots[0];r!==void 0&&fl(t,r);let i=()=>{let t=Y_(e)?.props?.ref;t!=null&&tc(t,e)};D===null?(i(),(M?.view(e)??e).remove()):Xa(t.parentNode,e,e,i)}n=i===void 0?(M?.view(document)??document).createElement(e.type):(M?.view(document)??document).createElementNS(i,e.type),r!==null&&r.markFresh(n),t.deoptNode=n;let a=t.parentNode;(M?.view(a)??a).insertBefore(n,t.endMarker),G_(n,e.props,t)}else K_(n,Y_(n)?.props??null,e.props,t);Q_(n,e),U_(e)||Iv(t,0,n,e.children,null,!1,n)}function xv(e,t){let n=e.type,r=t.deoptNode,i=I(),a=Mp(n,Np(t.parentNode));if(r===null){if(i!==null&&i.node!==null&&i.node.nodeType===1&&i.node.localName===n&&(a===void 0||i.node.namespaceURI===a)){r=i.node,t.deoptNode=r,G_(r,e.props,t),Q_(r,e);let n=F(i.node);U_(e)||(i.node=P(r),Sv(e,t,r)),i.node=n;return}if(i!==null&&i.node!==null){Rx(()=>Error(w(51)));let o=i.node;if(i.isOpen(o)){let e=i.close(o);i.node=F(e),i.removeRange(o,e)}else i.node=F(o),(M?.view(o)??o).remove();r=a===void 0?(M?.view(document)??document).createElement(n):(M?.view(document)??document).createElementNS(a,n),i.markFresh(r),t.deoptNode=r;let s=t.parentNode;(M?.view(s)??s).insertBefore(r,t.endMarker),G_(r,e.props,t),Q_(r,e),U_(e)||i.suspend(()=>Sv(e,t,r));return}r=a===void 0?(M?.view(document)??document).createElement(n):(M?.view(document)??document).createElementNS(a,n),i!==null&&i.markFresh(r),t.deoptNode=r;let o=t.parentNode;(M?.view(o)??o).insertBefore(r,t.endMarker),G_(r,e.props,t)}else K_(r,Y_(r)?.props??null,e.props,t);Q_(r,e),U_(e)||Sv(e,t,r)}function Sv(e,t,n){let r=e.children;if(r!=null){if(typeof r==`function`){let e=t.slots[0];e===void 0?(e={__kind:`hostTagChildrenSlot`,block:Qc(`dynamic`,t,n,null,null,r,{},void 0,dl)},t.slots[0]=e,xl(t,e)):e.block.body=r,A(e.block);return}Iv(t,1,n,r,null,!1,n)}}function Cv(e){let t=e.forSlot;Sx(t,t.items),t.head=null,t.tail=null,t.size=0,e.forSlot=null}var wv=null;function Tv(e,t){if(Array.isArray(e)){let n=[],r=e.length;for(let i=0;i<r;i++)n[i]=Tv(e[i],t);return I_.has(e)&&I_.add(n),n}if(e==null||e===!1||e===!0||e===``)return e;let n=typeof e,r=g_(e);if(!r&&n!==`string`&&n!==`number`&&n!==`bigint`)return e;let i=t.node;return i===null||i===t.end?e:(t.node=F(i),r?Y_(i)??e:e)}function Ev(e,t,n){let{items:r,keys:i}=uv(Tv(e,{node:F(t),end:n}),!0),a=[],o=F(t);for(let e=0;e<r.length;e++){let t=r[e];if(t==null||t===!1||t===!0||t===``)continue;if(o===null||o===n)break;let s=typeof t;if(!(s===`string`||s===`number`||s===`bigint`?o.nodeType===3:__(t)&&o.nodeType===1&&o.localName===t.type))break;a.push({key:i[e],node:o}),o=F(o)}return a}function Dv(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n.kind===`portal`&&n.parentNode===t)return!0;return!1}Array.prototype.map,Object.getOwnPropertyDescriptor(Array,Symbol.species)?.get;function Ov(e,t){if(!(D===null||D.aborted||Ra)){if(Eo(),e.ownerHost!==null)Wa(e,e.ownerHost,null,null);else if(e.start!==null)Wa(e,t,e.borrowed?e.start:N(e.start).previousSibling,e.borrowed?e.end:N(e.end)?.nextSibling??null);else if(e.borrowed&&e.block!==null&&e.block.startMarker===null)Wa(e,t,null,e.end);else{let n=e.text??e.hostNode??e.block?.startMarker??e.end,r=e.end??e.block?.endMarker??n,i=(M?.view(r)??r)?.nextSibling??null;Wa(e,t,n===null?(M?.view(t)??t).lastChild:(M?.view(n)??n).previousSibling,i)}}}function kv(e,t,n,r,i,a,o,s,c,l,u,d){let f=i?.passthroughRanges===!0&&e.borrowed,p=null,m=null;if(r.items.length===0&&i===null&&e.ownerHost!==null){e.forSlot!==null&&D===null&&Cv(e),N_(e);return}if(e.forSlot===null){if(i===null&&!a&&N_(e),e.end!==null&&N(e.end).parentNode===null&&(e.end=null,e.start=null),e.end===null){e.end=(M?.view(document)??document).createComment(``);let r=null;if(f){for(let e=t;e!==null;e=e.parentBlock)if(e.forSlot!==null&&e.endMarker!==null&&N(e.endMarker).parentNode===n){r=e.endMarker;break}if(r===null){let e=(M?.view(n)??n).lastChild;for(;e!==null&&Xd(e);)r=e,e=(M?.view(e)??e).previousSibling}}if((M?.view(n)??n).insertBefore(e.end,r),f&&(i.markFresh(e.end),m=e.end,E!==null)){let t=e.end;Ua(()=>(M?.view(t)??t).remove())}}if(e.start===null){e.start=(M?.view(document)??document).createComment(``);let t=f?i.node:null;if((M?.view(n)??n).insertBefore(e.start,a?P(n):t!==null&&N(t).parentNode===n?t:e.end),f&&(i.markFresh(e.start),p=e.start,E!==null)){let t=e.start;Ua(()=>(M?.view(t)??t).remove())}}e.forSlot={__kind:`forBlockSlot`,start:e.start,end:e.end,items:new Map,head:null,tail:null,size:0,cachedDeps:null,emptyBlock:null,env:void 0,adopt:null,plainDeopt:!1,mappedNative:void 0,selectionItems:void 0,signalSite:void 0},a&&(e.forSlot.adopt=Ev(o,e.start,e.end))}let{items:h,keys:g}=r,_=d===!0&&i!==null&&!i.isOpen(i.node),v=c||g,y=!!c,b=e.forSlot.mappedNative===!0,x=s||(d===!0?vv:_v);if(s===void 0&&b&&e.forSlot.size>0)for(let t=0;t<h.length;t++){let n=h[t];if(!__(n))continue;let r=e.forSlot.items.get(mx(v,n,t,y));if(r!==void 0&&r.startMarker!==null&&r.startMarker===r.endMarker&&r.startMarker.nodeType===1&&r.startMarker.localName===n.type){let e=r.startMarker,t=P(e);if(t?.nodeType===3&&F(t)===null){let e=Object.getOwnPropertyDescriptor(n,`children`);if(e!==void 0&&`value`in e&&(typeof e.value==`string`||typeof e.value==`number`||typeof e.value==`bigint`))t.$$deoptKey=0;else if(e?.get!==void 0){let e=r.slots[0];if(e!=null){for(let n in e)if(e[n]===t){t.$$deoptKey=0;break}}}}r.deoptNode=r.startMarker}}if(s!==void 0&&(e.forSlot.mappedNative===!1&&(x=(e,t,n)=>{let r=t.slots[0]===void 0?t.block.deoptNode:null;if(r===null||r.nodeType!==1){s(e,t,n);return}let i=Zd,a={node:r};Zd=a;try{s(e,t,n),a.node===null&&(t.block.deoptNode=null)}finally{Zd=i}}),e.forSlot.mappedNative=!0),_){let e=x;x=(t,n)=>{let r=n.block.startMarker;r!==null&&r===n.block.endMarker&&r.nodeType===1&&n.block.deoptNode===null&&(n.block.deoptNode=r),e(t,n)}}let S=s===void 0&&d!==!0;e.forSlot.plainDeopt=S;let C=l||0,ee=s===void 0?_||S:!!(C&16),te=!!(C&1),ne=!1;if(s!==void 0&&(e.forSlot.env=u,C&4&&u!==void 0&&(e.forSlot.cachedDeps!==null&&ox(e.forSlot.cachedDeps,u)?te=!0:ne=!0,e.forSlot.cachedDeps=u)),e.forSlot.size===0)try{hx(t,e.forSlot,h,v,x,s===void 0?2:!!(C&2),ee,y,f)}catch(t){throw p!==null&&((M?.view(p)??p).remove(),e.start=null),m!==null&&((M?.view(m)??m).remove(),e.end=null),(p!==null||m!==null)&&(e.forSlot=null),t}else vx(t,e.forSlot,h,v,x,te,s===void 0?2:!!(C&2),ne,!!(C&8),ee,y);if(e.forSlot.adopt!==null){let t=e.forSlot.adopt;for(let e=0;e<t.length;e++){let n=t[e].node;(M?.view(n)??n).parentNode!==null&&(D===null?(rx(n,null),N((M?.view(n)??n).parentNode).removeChild(n)):Xa((M?.view(n)??n).parentNode,n,n,()=>rx(n,null)))}e.forSlot.adopt=null}f&&!i.passthroughRanges&&(i.node=F(e.forSlot.end))}var Av=Symbol(`octane.direct-signal-child`),jv=0;function Mv(e){e.disposed||(e.disposed=!0,e.unsubscribe?.(),mi(e.scope.block))}function Nv(e){if(!(e.disposed||e.scope.block.disposed))try{xr(e.scope,()=>{let t=Of(e.handle);if(Object.is(e.value,t))return;let n=e.scope.slots[e.slotKey],r=typeof t,i=t==null||r!==`object`&&r!==`function`?T_(t):null;if(n===void 0&&e.text!=null&&i!==null&&i!==``){Tf(e.text,i),e.value=t;return}if(n===e.state&&n?.block===null&&n.forSlot===null&&n.hostNode===null&&n.portal===null&&i!==null&&i!==``&&n.text!==null){Tf(n.text,i),e.value=t;return}Cs(e.scope.block)})}catch{Cs(e.scope.block)}}function Pv(e,t,n,r,i,a,o,s,c,l,u,d){let f=typeof t==`object`&&t&&t[Av]===!0?t:null,p=f?.text??(t instanceof Text?t:null);if(!Df(i)){let t=u?Bv(e,n,r,i,p):(d===void 0?Iv(e,n,r,i,o,s,c,l):Fv(e,n,r,i,d,o,s),null);if(f!==null){E!==null&&Eo();let e=e=>{e||Mv(f)};k===null?e(!1):(k.renderCleanups??=[]).push(e)}return t}if(f!==null&&!f.disposed&&f.handle===i){let t=Of(i);return E!==null&&Do(f),u?f.text=Bv(e,n,r,t,p):d===void 0?Iv(e,n,r,t,o,s,c,l):Fv(e,n,r,t,d,o,s),f.value=t,f.state=e.slots[n],f}let m=Of(i),h=u?Bv(e,n,r,m,p):(d===void 0?Iv(e,n,r,m,o,s,c,l):Fv(e,n,r,m,d,o,s),null);E!==null&&Eo();let g={[Av]:!0,scope:e,slotKey:n,handle:i,text:h,state:e.slots[n],value:m,disposed:!1};if(g.unsubscribe=i[Un](kf(g,()=>Nv(g))),Jn(e,()=>Mv(g)),f!==null){let e=e=>Mv(e?g:f);k===null?e(!1):(k.renderCleanups??=[]).push(e)}return g}function Fv(e,t,n,r,i,a,o){let s=lf;if(s?.revision!==void 0){let e=I()?.resolveOpen(a??null,n)??null,t=_f(s,e,i,`slot`);(r==null?t.slot!==void 0||F(e)!==t.end:t.slot===void 0||typeof r!=`function`||r[gf]!==t.slot)&&pf(!1)}Iv(e,t,n,r,a,o,void 0,!1,!0,void 0,void 0,void 0,void 0,void 0,i)}function Iv(e,t,n,r,i,a,o,s,c=!0,l,u,d,f,p,m){if(T?.pending&&!T.crossRenderUpdate)return;if(t===0&&e!==cl){let t=e.slots[0];if(t?.returnedOutput===!0){if(t.__kind===`childSlot`)ll(t,!1);else{let t=e.block;if(t.outputHandler(t,null,!0),t.disposed)return}}}if(jv===0){let c=e.slots[t]?.implicitSignal;if(Df(r)||c!==void 0){Df(r)&&pr(),jv++;let l;try{l=xr(e,()=>Pv(e,c,t,n,r,`runtime:${t}`,i,a,o,s,void 0,m))}finally{jv--}let u=e.slots[t];u!==void 0&&(u.implicitSignal=l);return}}if(r!=null&&c&&n.nodeType===1&&_t.has(n.localName)&&!Dv(e.block,n))throw Error(w(26,n.localName));if(op(n,r))return;let h=e.block,g=I();if(g!==null&&(i!=null&&g.isFresh(i)||g.isFresh(n))){g.suspend(()=>Iv(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m));return}for(;r!==null&&(typeof r==`object`||typeof r==`function`);){if(r.$$kind===mn){r=cd(r);continue}if(typeof r.then==`function`){r=fd(r);continue}break}let _=typeof r==`function`?r:g_(r)&&typeof r.type==`function`?r.type:null,v=g?.passthroughRanges===!0&&_?.[ht]!==`owner`;g?.passthroughRanges===!0&&!v&&(g.passthroughRanges=!1);let y=dv(r);y!==null&&(r=y);let b=l===void 0?uv(r,!1,c):{items:r,keys:null},x=e.slots[t],S=b===null&&__(r)&&x?.currentComp!==bv&&!yv(r),C=!1;if(x!==void 0&&D!==null){let e=S||b!==null?null:__(r)?bv:_,t=b!==null&&x.forSlot!==null,i=x.block!==null&&e!==null&&(e===x.currentComp||typeof r==`function`&&x.currentIsBodyFn),a=S&&x.hostNode!==null&&x.block===null&&x.hostNode.nodeType===1&&x.hostNode.localName===r.type,o=r==null||typeof r!=`object`&&typeof r!=`function`,s=o?T_(r):null,c=o&&x.block===null&&x.forSlot===null&&x.hostNode===null&&x.portal===null&&x.text===null==(s===``);!t&&!i&&!a&&!c&&(Ov(x,n),C=!0)}let ee=x===void 0&&g!==null&&h===g.rootBlock&&g.node!==null&&N(g.node).parentNode===n&&b===null&&g_(r)&&typeof r.type==`function`&&!g.isOpen(i??null)&&!g.isOpen(g.node);if(x===void 0&&g!==null&&!v&&h===g.rootBlock&&!g.isOpen(i??null)&&!g.isOpen(g.node)){let h=g.node;if(!(r===null||r===``?h===null:typeof r==`string`&&h?.nodeType===3||ee)){g.abandonRoot(void 0),Iv(e,t,n,r,(M?.view(i)??i)?.parentNode===n?i:null,a,o,s,c,l,u,d,f,p,m);return}}if(x===void 0){let r=D;if(r!==null&&!r.aborted&&!Ra&&e.mounted&&!Qa(r,h)){Eo();let e=o===void 0?i??null:null;Ga(n,o===void 0?e===null?(M?.view(n)??n).lastChild:(M?.view(e)??e).previousSibling:null,e)}let c,l;v?(c=null,l=null):ee?[c,l]=g.wrapUnframedRoot(g.node):g!==null&&g.isOpen(i??null)?(c=i,l=g.close(i),h===g.rootBlock&&g.claimRootRemainder(F(l)),g.node=F(c)):g!==null&&g.isOpen(g.node)?(c=g.node,l=g.close(g.node),h===g.rootBlock&&(g.protectRootAnchor(l),g.claimRootRemainder(F(l))),g.node=F(c)):m===void 0?a&&i!=null?(c=null,l=i):g===null&&o!==void 0||g===null&&S?(c=null,l=null):(c=null,l=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(l,i??null),g!==null&&h===g.rootBlock&&g.protectRootAnchor(l)):(c=(M?.view(document)??document).createComment(m),l=a&&i!=null?i:(M?.view(document)??document).createComment(`]`),(M?.view(l)??l).data=`]`,(M?.view(n)??n).insertBefore(c,i??null),l!==i&&(M?.view(n)??n).insertBefore(l,i??null)),x={__kind:`childSlot`,start:c,end:l,ownerHost:g===null?o??null:null,borrowed:v,compactable:s===!0,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null,implicitSignal:void 0},e.slots[t]=x,xl(e,x)}s===!0&&(x.compactable=!0);let te,ne=!1;if(wv!==null&&wv.block===e.block&&o!==void 0&&(D!==null&&Ka(n),te=wv.children,ne=!0,wv=null),x.end===null&&!S&&x.ownerHost===null&&!x.borrowed){let e=(M?.view(document)??document).createComment(``),t=(M?.view(document)??document).createComment(``),r=x.hostNode;if(r!==null&&(M?.view(r)??r).parentNode!==null){let n=(M?.view(r)??r).parentNode;(M?.view(n)??n).insertBefore(e,r),(M?.view(n)??n).insertBefore(t,F(r)),Ub(h,r,r,e,t)}else(M?.view(n)??n).insertBefore(e,i??null),(M?.view(n)??n).insertBefore(t,i??null);x.start=e,x.end=t}let re=r!=null&&r.$$kind===fn?r:null;if(re===null&&x.portal!=null&&(zg(x.portal),x.portal=null),re!==null){x.forSlot!==null&&(D!==null&&g===null?N_(x):Cv(x)),(x.block!==null||x.text!==null||x.hostNode!==null)&&N_(x),x.portal=Rg(x.portal,h,re.target,re.body,re.props,n,void 0,re.key),ms.size!==0&&x.end!==null&&Lg(x.portal,h,x.end);return}if(b!==null){kv(x,h,n,b,g,ne,te,l,u,d,f,p);return}if(x.forSlot!==null&&(D!==null&&g===null?N_(x):Cv(x)),ne&&x.hostNode===null&&x.block===null){let e=P(n);if(e!==null&&F(e)===null&&(e.nodeType===1||e.nodeType===3))x.hostNode=e;else{let e=P(n);for(;e!==null;){let t=F(e);if(D!==null){let t=e;Xa(n,t,t,()=>rx(t,null))}else rx(e,null),(M?.view(n)??n).removeChild(e);e=t}}}let ie=null,ae={},oe=!1,se,ce,le=!1;if(__(r)){if(S){if((x.block!==null||x.text!==null)&&N_(x),x.end===null){let e=x.hostNode,t=pv(e,r,h,Np(n));if(t!==e){if(e!==null&&(M?.view(e)??e).parentNode!==null){let n=(M?.view(e)??e).parentNode;D===null?(t!==null&&(M?.view(n)??n).insertBefore(t,e),rx(e,null),(M?.view(n)??n).removeChild(e)):(Ov(x,n),Xa(n,e,e,()=>rx(e,null)),t!==null&&(M?.view(n)??n).insertBefore(t,e))}else t!==null&&(M?.view(n)??n).insertBefore(t,i??null)}x.hostNode=t;return}x.start===null&&(x.start=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(x.start,x.end));let e=x.hostNode;e===null&&g!==null&&(e=F(x.start),e===x.end&&(e=null));let t=pv(e,r,h,Np(n));if(t!==e){if(e!=null&&e!==t&&(M?.view(e)??e).parentNode!==null){if(D!==null){Ov(x,n);let t=e;Xa((M?.view(e)??e).parentNode,e,e,()=>rx(t,null))}else rx(e,null),N((M?.view(e)??e).parentNode).removeChild(e)}t!==null&&N(N(x.start).parentNode).insertBefore(t,x.end)}x.hostNode=t;return}ie=bv,ae=r}else if(typeof r==`function`)ie=r,oe=!0;else if(g_(r)){let e=hp,t=e!==null&&r.type===e.type;if(!t&&typeof r.type!=`function`&&typeof r.type!=`string`)throw b_(r.type);ie=t?e.body:r.type,ae=r.props,se=r.__octaneInvocationSite,ce=r.key,le=r.key!=null}if(ie!==null){if(oe&&x.block!==null&&x.currentIsBodyFn){let e=Fu(ie),t=x.block.$$implicitBail;if(e&&!t&&(x.block.$$implicitBail=!0,x.block.memoInChain=!0),t&&e&&ie===x.currentComp&&Kv(x.block))return;x.block.body!==ie&&O(x.block,`body`,x.block.body),x.currentComp!==ie&&O(x,`currentComp`,x.currentComp),x.block.body=ie,A(x.block),x.currentComp=ie;return}if(x.block!==null&&ie===x.currentComp){if(Gv(x.block,ie,ae)||ae===x.block.props&&(ie!==bv||Z_(x.block,ae))&&Kv(x.block))return;x.block.props!==ae&&O(x.block,`props`,x.block.props),x.block.props=ae,A(x.block);return}let r=Qn||Ln?{parentScope:e,invocationSite:se,key:ce,hasKey:le}:void 0,i=x.block===null&&x.hostNode===null&&x.text===null||h.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:x.__kind,branch:void 0,component:oe?void 0:ie,key:void 0},a=ci,o=h.currentRenderMode===`transition`,s=a!==null&&x.block!==null&&x.block.mounted&&g===null&&Bb(h),c=D===null||s?a:null,l=c!==null&&x.block!==null&&x.block.mounted&&x.end!==null&&g===null,u=l&&!o&&s,d=u&&!o;if(l&&(o||u)){let e=c.render(h,n,x.end,ie,ae,dl,`dynamic`,void 0,!1,r,i);if(e.suspended||e.failed)throw c.dispose(e.wip),e.failed?e.error:new ld(e.suspended);if(x.borrowed||d)c.dispose(e.wip);else{let t=x.block;if(x.block=e.wip.block,x.currentComp=ie,x.currentIsBodyFn=oe,c.splice(e.wip),P_(x,t),h.disposed||x.block!==e.wip.block||e.wip.block.disposed)return;A_(e.wip,x.end);return}}if(g===null&&ie===bv&&x.block===null&&x.hostNode!==null&&x.hostNode.nodeType===1&&x.hostNode.localName===ae.type&&x.hostNode.namespaceURI===(Mp(ae.type,Np(n))??Ap)&&!H_(ae.props)&&!H_(Y_(x.hostNode)?.props??null)){let e=x.hostNode;x.hostNode=null,x.currentComp=ie,x.currentIsBodyFn=!1;let t=Qc(`dynamic`,h,n,x.start,x.end,ie,ae,void 0,dl);r!==void 0&&vr(t,r),to(t),x.borrowed&&(t.exclusiveMarkers=!0),t.$$implicitBail=!0,t.memoInChain=!0,t.deoptNode=e,x.block=t,wv={block:t,children:Y_(e)?.children};try{A(t)}finally{wv=null}return}if(D!==null&&C&&(e.mounted||D.retainedCreated?.has(h))&&!s&&g===null){let t=x.ownerHost!==null||x.borrowed&&x.start===null?(M?.view(n)??n).lastChild:x.end===null?x.block?.endMarker??x.text??x.hostNode:N(x.end).previousSibling;if(t!==null&&(M?.view(t)??t).parentNode===n){N_(x);let a=!oe||Fu(ie),o=E_(h,n,t,ie,ae,dl,`dynamic`,void 0,a,r,i);if(o.suspended||o.failed)throw M_(o.wip),o.suspended===null?o.error:new ld(o.suspended);if(e===h&&h.forSlot!==null&&!h.exclusiveMarkers&&x.borrowed&&Wb(h,x.start,x.end)){let e=x.start,t=x.end;x.start=o.wip.start,x.end=o.wip.end,O(o.wip.block,`exclusiveMarkers`,o.wip.block.exclusiveMarkers),o.wip.block.exclusiveMarkers=!0,Ub(h,e,t,x.start,x.end),Xa(n,e,e),Xa(n,t,t)}x.start===null&&x.ownerHost===null&&!x.borrowed&&(x.start=o.wip.start),x.block=o.wip.block,x.currentComp=ie,x.currentIsBodyFn=oe,O_(o.wip);return}}if(g===null&&(N_(x),h.disposed))return;x.currentComp=ie,x.currentIsBodyFn=oe,x.start===null&&x.ownerHost===null&&!x.borrowed&&(x.start=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(x.start,x.end));let f=Qc(`dynamic`,h,n,x.start,x.end,ie,ae,void 0,dl);r!==void 0&&vr(f,r),x.borrowed&&(f.exclusiveMarkers=!0),(!oe||Fu(ie))&&(f.$$implicitBail=!0,f.memoInChain=!0),x.block=f,A(f),g!==null&&!x.borrowed&&x.end!==null&&(g.node=F(x.end));return}if(typeof r==`object`&&r)throw y_(r);(x.block!==null||x.hostNode!==null)&&N_(x);let ue=T_(r);if(ue===``){x.text!==null&&(D===null?(N(x.text).remove(),x.text=null):N_(x));return}if(x.text!==null){wf(x.text,ue);return}if(g!==null){let e=g.node;if(e!==null&&e!==x.end&&e.nodeType===3){x.text=e,g.node=F(e),wf(e,ue);return}}let de=(M?.view(document)??document).createTextNode(ue);(M?.view(n)??n).insertBefore(de,x.end),x.text=de}function Lv(e,t,n,r,i,a,o){Iv(e,t,n,r,i,a,void 0,o);let s=e.slots[t];return s.block===null&&s.forSlot===null&&s.hostNode===null?s.text:null}function Rv(e,t,n,r,i,a,o,s,c){if(r===null||typeof r!=`object`&&typeof r!=`function`){if(a===r)return i;if(i!=null&&r!==null)return Tf(i,r===!0?``:r),i}return Lv(e,t,n,r,o,s,c)}function zv(e,t,n,r,i,a){if(r===null||typeof r!=`object`&&typeof r!=`function`){if(a===r)return i;if(i!=null&&r!==null)return Tf(i,r===!0?``:r),i}return Bv(e,t,n,r,i)}function Bv(e,t,n,r,i){if(n.nodeType===1&&_t.has(n.localName)&&!Dv(e.block,n)&&r!=null)throw Error(w(26,n.localName));if(op(n,r))return null;let a=typeof r,o=e.slots[t];if(D!==null&&o===void 0&&e.mounted&&(Eo(),Ga(n,null,null),O(e.slots,t,e.slots[t])),o===void 0&&a!==`object`&&a!==`function`){let o=r==null||r===!1||r===!0?``:a===`string`?r:String(r);if(o===``)return i!==null&&(M?.view(i)??i).remove(),null;if(i!==null)return wf(i,o),i;let s=I();if(s!==null)return s.htext(n,o,Ar(e,t));let c=(M?.view(document)??document).createTextNode(o);return(M?.view(n)??n).appendChild(c),c}o===void 0&&i!==null&&(M?.view(i)??i).remove();let s=I();s!==null&&o===void 0&&(s.node=P(n)),Iv(e,t,n,r,null,!1,n);let c=e.slots[t];return c.block===null&&c.forSlot===null&&c.hostNode===null?c.text:null}function Vv(e){let t=e.$$ctxReads;if(t===null)return!1;for(let[e,n]of t)if(e.$$version!==n)return!0;return!1}function Hv(e){let t=e.$$ctxDirect;if(t===null)return!1;for(let[e,n]of t)if(e.$$version!==n)return!0;return!1}function Uv(e){if(e.$$ctxDepsEpoch!==rt()){if(Hv(e))return!1;Vv(e)?Wv(e):e.$$ctxDepsEpoch=rt()}return!0}function Wv(e){let t=e._slots;if(t!==null)for(let e=0,n=t.length;e<n;e++){let n=t[e];if(n.__kind===`forBlockSlot`){let e=n.items;for(let t of e.values())Jv(t);n.emptyBlock&&Jv(n.emptyBlock)}else if(n.block)Jv(n.block);else if(n.__kind===`childSlot`&&n.forSlot){let e=n.forSlot.items;for(let t of e.values())Jv(t)}else n.__kind===`childSlot`&&n.portal!==null&&n.portal.block!==null&&Jv(n.portal.block)}}function Gv(e,t,n){if(t.__memo!==!0||!e.mounted||e.renderStatus!==Mr)return!1;let r=t.__compare;return!(r?t[Rd]===void 0?r(e.props,n):r(e.props,n,e):Xv(e.props,n))||!Uv(e)?!1:(qv(e),vb(e),!0)}function Kv(e){if(e.$$implicitBail!==!0||!e.mounted||e.renderStatus!==Mr)return!1;let t=e.body[Rd];return t!==void 0&&!t(e)||!Uv(e)?!1:(qv(e),vb(e),!0)}function qv(e){let t=e.$$ctxReads,n=e.$$ctxDirect,r=t!==null&&t.size>0,i=n!==null&&n.size>0;if(r||i)for(let a=e.parentBlock;a!==null;a=a.parentBlock){if(a.body?.__memo!==!0&&a.$$implicitBail!==!0)continue;let e=a.$$ctxReads??=new Map;if(r)for(let[n,r]of t){let t=e.get(n);if(t!==r){let i=n.$$version;(t===void 0||t===i)&&(e.set(n,r),r!==i&&(a.$$ctxDepsEpoch=-1))}}if(i)for(let[t,r]of n){let n=e.get(t);if(n!==r){let i=t.$$version;(n===void 0||n===i)&&(e.set(t,r),r!==i&&(a.$$ctxDepsEpoch=-1))}}}}function Jv(e){let t=e.$$ctxDepsEpoch===rt();!t&&Hv(e)?A(e):e.body?.__memo===!0||e.$$implicitBail===!0?t||(Vv(e)?Wv(e):e.$$ctxDepsEpoch=rt()):(t||(e.$$ctxDepsEpoch=rt()),Wv(e))}var Yv=Object.prototype;function Xv(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t);if(n!==Yv&&n!==null||r!==Yv&&r!==null)return Zv(e,t);let i=0;for(let n in e){let r=e[n];if(!Ot.call(t,n)||!Object.is(r,t[n]))return!1;i++}for(let e in t)i--;return i===0}function Zv(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Ot.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}var Qv=1/0,$v=300,ey=-1/0,ty=new Map,ny=!1;function ry(e){for(;e.parentBlock!==null;)e=e.parentBlock;return e}function iy(e){let t=e.afterCommit;t!==void 0&&(e.afterCommit=void 0,queueMicrotask(()=>{for(let e of t)e()}))}function ay(e,t){t.states.size!==0||t.flushing||(t.timer!==null&&clearTimeout(t.timer),ty.delete(e),ty.size===0&&(As.find=lb))}function oy(e){if(ty.size===0)return;let t=ry(e.parentBlock),n=ty.get(t);n!==void 0&&n.states.delete(e)&&(ay(t,n),iy(n))}function sy(e,t){t.queued||t.flushing||(t.queued=!0,queueMicrotask(()=>{if(t.queued=!1,ty.get(e)!==t)return;t.timer!==null&&clearTimeout(t.timer),t.timer=null;let n=ey+$v-performance.now();gs!==0||n<=10?dy(e,t):t.timer=setTimeout(()=>dy(e,t),n)}))}function cy(e,t){let n=ry(e.parentBlock),r=ty.get(n);r===void 0&&(r={states:new Map,timer:null,queued:!1,flushing:!1},ty.set(n,r),As.find=ly),r.states.set(e,t??e.stagedCapture),sy(n,r)}function ly(e,t,n){if(e!==null){let t=ry(e),n=ty.get(t);n!==void 0&&sy(t,n)}return t?lb(e,!0,n):lb(e,!1)}function uy(e){if(!e.parentBlock.disposed){if(k!==null){us??=uy,(k.suspenseCommits??=new Set).add(e);return}ub(e.parentBlock)===null&&(ey=performance.now())}}function dy(e,t){if(ty.get(e)!==t)return;t.timer!==null&&clearTimeout(t.timer),t.timer=null;let n=()=>{if(ty.get(e)!==t)return;t.flushing=!0;let n=[...t.states].sort(([e],[t])=>Eb(e,t)),r=Hi,i=ny;Hi=!0,ny=!0;try{for(let[e,r]of n)t.states.has(e)&&t.states.get(e)===r&&(t.states.delete(e),!(e.parentBlock.disposed||e.branch!==2||e.pendingThenable!==null)&&(r!==null&&`error`in r?zb(e.tryBlock??e.parentBlock,r.error):(r!==null&&Db(r),sb(e))))}finally{Hi=r,ny=i,t.flushing=!1,ay(e,t),t.states.size!==0&&sy(e,t),r||yc(),iy(t)}};Zo?.wrapResume(n,()=>[...t.states.keys()].map(e=>e.parentBlock))!==!0&&n()}var fy=new WeakMap,py=new WeakMap,my=0,hy=0,gy=null,_y=0;function vy(e){let t=gy??=new WeakMap;t.set(e,(t.get(e)??0)+1),_y++}function yy(e){let t=gy,n=t?.get(e);n!==void 0&&(n===1?t.delete(e):t.set(e,n-1),_y--)}function by(e){if(_y===0)return!0;let t=gy;for(let n=e;n!==null;n=(M?.view(n)??n).parentNode)if(t.has(n))return!1;return!0}function xy(e){let t=fy.get(e),n=t!==void 0&&t.importantOwners>0?`important`:``,r=(M?.view(e)??e).style;(r.getPropertyValue(`display`)!==`none`||r.getPropertyPriority(`display`)!==n)&&r.setProperty(`display`,`none`,n)}function Sy(e,t){t.value===``?(M?.view(e)??e).style.removeProperty(`display`):(M?.view(e)??e).style.setProperty(`display`,t.value,t.priority),!t.hadStyle&&(M?.view(e)??e).getAttribute(`style`)===``&&(M?.view(e)??e).removeAttribute(`style`)}function Cy(e,t,n,r){let i=fy.get(e);if(i===void 0)return!1;E!==null&&E.push(Sa,i,`value`,i.value,Sa,i,`priority`,i.priority,Sa,i,`hadStyle`,i.hadStyle),Sy(e,i);try{r===void 0?Hp(e,(M?.view(e)??e).style,t,n):t==null||typeof t==`boolean`?(M?.view(e)??e).style.removeProperty(Kn(r)):Up(e,(M?.view(e)??e).style,r,t)}finally{i.value=(M?.view(e)??e).style.getPropertyValue(`display`),i.priority=(M?.view(e)??e).style.getPropertyPriority(`display`),i.hadStyle=(M?.view(e)??e).hasAttribute(`style`),xy(e)}return!0}function wy(e,t){let n=py.get(e);return n!==void 0&&(E!==null&&E.push(Sa,n,`data`,n.data),n.data=t,!0)}function Ty(e,t){let n=fy.get(e);n===void 0?(my++,Cf=Cy,fy.set(e,{owners:1,importantOwners:+!!t,value:(M?.view(e)??e).style.getPropertyValue(`display`),priority:(M?.view(e)??e).style.getPropertyPriority(`display`),hadStyle:(M?.view(e)??e).hasAttribute(`style`)})):(n.owners++,t&&n.importantOwners++),xy(e)}function Ey(e,t,n=!0){let r=fy.get(e);r!==void 0&&(t&&r.importantOwners--,--r.owners===0?(fy.delete(e),--my===0&&(Cf=null),n&&Sy(e,r)):xy(e))}function Dy(e){(M?.view(e)??e).data!==``&&((M?.view(e)??e).data=``)}function Oy(e){let t=py.get(e);t===void 0?(hy++,Sf=wy,py.set(e,{owners:1,data:(M?.view(e)??e).data})):t.owners++}function ky(e,t=!0){let n=py.get(e);n!==void 0&&(--n.owners===0?(py.delete(e),--hy===0&&(Sf=null),t&&((M?.view(e)??e).data=n.data)):Dy(e))}function Ay(e,t){e.retrySignalOwners!==void 0&&cr(e),Uy?.delete(e),oy(e),Kl?.delete(e),e.block!==null&&j(e.block,t),k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null;let n=e.detachedRefs!==null;if(e.detachedRefs=null,e.pendingThenable=null,e.tryBlock!==null&&e.tryBlock!==e.block){let t=e.tryBlock,r=null;n&&(r=[],nx(t,r)),Zy(e),ac(r,()=>{j(t,!0)}),e.tryBlock=null}Qy(e),Ny(e,-1),e.block=null}function jy(e){let t=k===null?Va(e.parentBlock.idState.renderOwner):null;return D!==null&&!Ra&&(N(e.start).parentNode===e.domParent&&N(e.end).parentNode===e.domParent?Wa(e,e.domParent,e.start,e.end):Do(e)),t}function My(e){e!==null&&(Ha(e),D===null&&io(),!ii&&!ri&&(ri=!0,queueMicrotask(Ps)))}function Ny(e,t){e.branch=t}function Py(e){let t=e.block,n=e.tryBlock;t!==null&&j(t),n!==null&&n!==t&&j(n),e.block=null,e.tryBlock=null}function Fy(e,t,n=!1,r=!1){if(ff(t)||(Py(e),e.pendingThenable=null,Ny(e,0),e.err=t,e.catchBody===null))throw t;let i=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.catchBody,{err:t,reset:e.reset},e.env);e.block=i;try{let t=I();if(r&&t!==null){let n=e.domParent,r=(M?.view(n)??n).lastChild;t.suspend(()=>A(i));let a=r===null?P(n):F(r);for(;a!==null;)t.markFresh(a),a=F(a)}else A(i)}finally{n&&Px(e)}}function Iy(e,t){if(Py(e),Ny(e,2),e.pendingThenable=t,e.pendingBody!==null){let t=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.pendingBody,void 0,e.env);e.block=t,A(t)}let n=()=>{e.pendingThenable!==t||e.parentBlock.disposed||(e.pendingThenable=null,Ny(e,-1),Cs(e.parentBlock))};t.then(n,n)}function Ly(e){if(e.branch===0&&e.block!==null){e.block.body=e.catchBody,e.block.props={err:e.err,reset:e.reset},e.block.extra=e.env,A(e.block);return}if(e.branch===2){e.block!==null&&e.pendingBody!==null&&(e.block.body=e.pendingBody,e.block.extra=e.env,A(e.block));return}let t=e.tryBlock;t===null||t.disposed?(e.block!==null&&j(e.block),t=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.tryBody,void 0,e.env),e.tryBlock=t,e.block=t,Ny(e,1),t.$$tryHandler=t=>{try{Fy(e,t)}catch(t){let n=Lb(e.parentBlock);n===null?console.error(t):n(t)}},e.propagateSuspense||(t.__suspenseHandler=t=>{Iy(e,t)})):(t.body=e.tryBody,t.extra=e.env);let n=I(),r=n?.passthroughRanges===!0;try{A(t),e.hasResolved=!0}catch(t){if(ud(t)){if(e.propagateSuspense||r&&!n.passthroughRanges)throw t;Iy(e,t.thenable)}else Fy(e,t,!0,r&&!n.passthroughRanges)}}function Ry(e,t,n,r,i,a,o,s,c=!1){c||=a===null,a!==null&&(li(),js());let l=e.block,u=I(),d=e.slots[t],f=!1;if(d===void 0){let f,p,m=u?.passthroughRanges===!0,h=m?null:u?.resolveOpen(o??null,n)??null;m?(f=(M?.view(document)??document).createComment(`passthrough-try`),p=(M?.view(document)??document).createComment(`/passthrough-try`)):h===null?(f=(M?.view(document)??document).createComment(`try`),p=(M?.view(document)??document).createComment(`/try`),(M?.view(n)??n).insertBefore(f,o??null),(M?.view(n)??n).insertBefore(p,o??null)):(f=h,p=u.close(h));let g;g={__kind:`trySlotSlot`,__flags:Sl,__teardown:Ay,start:f,end:p,branch:-1,block:null,tryBlock:null,hiddenDom:null,tryBody:r,catchBody:i,pendingBody:a,propagateSuspense:c,env:s,hasResolved:!1,err:null,pendingThenable:null,stagedCapture:null,stagedEffectDeps:null,transitionHeld:!1,transitionTimeoutId:null,detachedRefs:null,domParent:n,parentBlock:l,idState:l.idState,passthrough:m,reset:()=>Nb(g)},e.slots[t]=g,xl(e,g),d=g}else f=(d.branch===2||d.retrySignalOwners!==void 0)&&(d.tryBody!==r||d.env!==s&&Zl(d.env,s)),d.retrySignalOwners!==void 0&&f&&cr(d),d.tryBody=r,d.catchBody=i,d.pendingBody=a,d.propagateSuspense=c,Ui!==null&&d.env!==s&&E.push(Sa,d,`env`,d.env),d.env=s;let p=d,m=Uy?.get(p);return m===void 0&&u!==null&&p.branch===-1&&!p.propagateSuspense&&(m=Ky(p,u)??void 0,m!==void 0&&(Uy??=new WeakMap).set(p,m)),m===void 0?p.passthrough?(Ly(p),p.reset):(p.branch===0?(p.block.body=p.catchBody,p.block.props={err:p.err,reset:p.reset},p.block.extra=p.env,A(p.block)):p.branch===2&&p.tryBlock&&!p.tryBlock.disposed&&p.hiddenDom?(xb(p,void 0,f?`parent`:`update`),p.branch===2&&ab(p)):p.branch===2?qy(p):p.branch===1&&p.tryBlock?zy(p):qy(p),p.reset):(Gy(p,m),p.reset)}function zy(e,t){let n=e.tryBlock;n.body=e.tryBody,n.extra=e.env,t!==void 0&&(n.pendingMode!==`urgent`&&(n.pendingMode=t.pendingMode??`urgent`),n.pendingDeferred=t.pendingDeferred,rl(t,n));let r=Ko(e),i=k,a=r<0?null:ds(),o=a!==null&&(D===null||e.propagateSuspense||(n.pendingMode??T?.currentRenderMode)!==`transition`||n.pending&&n.pendingMode===`transition`&&T!==null&&T.currentRenderMode===`urgent`&&Od(T,n)&&ci!==null)?fb(n):null,s=ec.length,c=!1,l;a!==null&&(k=a);try{A(n)}catch(e){c=!0,l=e}finally{k=i}try{if(c){if(a!==null&&(ec.splice(s),o!==null&&pb(n,o),k_(a)),$u(l)||ff(l))throw l;if(ud(l)){if(e.propagateSuspense)throw l;$y(e,l.thenable,n,r,t??n)}else Fb(e,l,!0)}else a!==null&&D_(a),la(e)||(Qy(e),e.pendingThenable=null)}finally{qo(r)}}function By(e,t,n){let r=Qc(`control-flow`,e.parentBlock,e.domParent,t,n,e.tryBody,void 0,e.env);return r.idState=e.idState,r.__trySlot=e,r.$$tryHandler=t=>(Fb(e,t),e.block),e.propagateSuspense||(r.__suspenseHandler=(t,n)=>{$y(e,t,n)}),e.tryBlock=r,r}function Vy(e){e.retrySignalOwners!==void 0&&cr(e),Kl?.delete(e);let t=e.tryBlock,n=[];return nx(t,n),Zy(e),e.tryBlock=null,ac(n,()=>j(t)),e.parentBlock.disposed||e.tryBlock!==null||e.branch!==2?null:Hy(e)}function Hy(e){let t=(M?.view(document)??document).createComment(`try-b`),n=(M?.view(document)??document).createComment(`/try-b`),r=e.block?.startMarker??e.end;N(e.domParent).insertBefore(t,r),N(e.domParent).insertBefore(n,r);let i=By(e,t,n);return e.detachedRefs=[],Xy(e),i}var Uy=null,Wy=null,Gy=null;function Ky(e,t){let n=F(e.start);if(n?.nodeType!==8)return null;let r=(M?.view(n)??n).data;if(r.startsWith(`oct-seed:`)){let i=r.slice(gt.length),a=F(n);if(!t.isOpen(a))return null;let o=t.close(a),s=typeof window<`u`?window.$OCTS:void 0,c=n,l=Wy?.get(c);return l===void 0&&(l={seedRaw:typeof s?.[i]==`string`?s[i]:null,nativeRaw:typeof s?.[i+`$signals`]==`string`?s[i+`$signals`]:null},(Wy??=new WeakMap).set(c,l),s!==void 0&&(delete s[i],delete s[i+`$signals`])),e.idState={prefix:e.parentBlock.idState.prefix+`b`+i+`-`,next:0,renderOwner:e.parentBlock.idState.renderOwner,signalState:e.parentBlock.idState.signalState},{metadata:[n],start:a,end:o,idStart:0,...l,consume:()=>{Wy?.delete(c)}}}if(!r.startsWith(`oct-suspense:`))return null;let i=r.slice(dt.length);if(!/^(?:0|[1-9]\\d*)$/.test(i))return null;let a=Number(i);if(!Number.isSafeInteger(a))return null;let o=F(n),s=null,c=null,l=[];for(let e of[ft,pt]){if(o?.nodeType!==1)continue;let t=o;t.localName===`script`&&(M?.view(t)??t).getAttribute(`type`)===`application/json`&&(M?.view(t)??t).hasAttribute(e)&&(e===`data-octane-suspense-seeds`?s=(M?.view(t)??t).textContent:c=(M?.view(t)??t).textContent,l.push(t),o=F(t))}if(!t.isOpen(o))return null;let u=t.close(o),d=e.idState,f=d.next;return Uu(d,a),e.idState={prefix:d.prefix,next:f,limit:f+a,overflow:d,renderOwner:d.renderOwner},{metadata:[n,...l],start:o,end:u,idStart:f,seedRaw:s,nativeRaw:c}}function qy(e){e.retrySignalOwners!==void 0&&cr(e),oy(e),Kl?.delete(e);let t=e.branch===2,n=I();k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null,e.detachedRefs=null;let r=e.tryBlock;r&&(Zy(e),j(r),e.tryBlock=null),e.block&&e.block!==r&&j(e.block),e.block=null,e.hiddenDom=null,e.hasResolved=!1,Ny(e,1);let i,a,o=null,s,c=!1,l=!1,u=F(e.start),d=null;if(n!==null&&u!==null&&u.nodeType===8&&(M?.view(u)??u).data.startsWith(`oct-seed:`)){c=!0,d=(M?.view(u)??u).data.slice(gt.length);let e=typeof window<`u`?window.$OCTS:void 0,t=e===void 0?void 0:e[d];typeof t==`string`&&(o=n.parseSeeds(t));let r=e?.[d+`$signals`];typeof r==`string`&&(s=r),u=F(u)}else if(n!==null&&u!==null&&u.nodeType===1&&me(u)){c=!0,l=!0,d=(M?.view(u)??u).getAttribute(ce);let t=u;for(;t!==null&&t!==e.end;){let e=F(t);(M?.view(t)??t).remove(),t=e}u=e.end,n.node=e.end}d!==null&&(e.idState={prefix:e.parentBlock.idState.prefix+`b`+d+`-`,next:0,renderOwner:e.parentBlock.idState.renderOwner,signalState:e.parentBlock.idState.signalState});let f=Dr(n,u,e.end,e.idState);f!==null&&(e.idState=f,l=!0,u=e.end,o=null,s=void 0),n!==null&&n.isOpen(u)?(i=u,a=n.close(i),n.node=F(i)):(o=null,i=(M?.view(document)??document).createComment(`try-b`),a=(M?.view(document)??document).createComment(`/try-b`),N(e.domParent).insertBefore(i,e.end),N(e.domParent).insertBefore(a,e.end),n!==null&&(n.markFresh(i),n.markFresh(a)));let p=By(e,i,a);e.block=p;let m;if(s!==void 0&&!l){let e=d;m=Tr(p,Oe(s),()=>{let t=typeof window<`u`?window.$OCTS:void 0;t!==void 0&&(delete t[e+`$signals`],delete t[e])})}let h=n?.seeds??null,g=n?.seedCursor??0;c&&(n.seeds=o,n.seedCursor=0);let _=c||l?qe(m?.resolve??null):void 0;l&&n.depth++;try{A(p),e.hasResolved=!0,t&&uy(e)}catch(t){if($u(t)||ff(t))throw t;if(ud(t)){if(e.propagateSuspense)throw t;$y(e,t.thenable,p)}else{let r=n?.isRejection(t)===!0;e.tryBlock&&(j(e.tryBlock,!r),e.tryBlock=null,e.block=null),Fb(e,t,!0,r?i:void 0,r?a:void 0)}}finally{l&&n.depth--,_!==void 0&&qe(_),c&&(n.seeds=h,n.seedCursor=g)}}function Jy(e,t){let n=F(e.startMarker);for(;n!==null&&n!==e.endMarker;){if(n.nodeType===1){let e=n;t.displays.has(e)?xy(e):(t.displays.add(e),Ty(e,!0))}else if(n.nodeType===3){let e=n;t.texts.has(e)||(t.texts.add(e),Oy(e)),Dy(e)}n=F(n)}}function Yy(e,t){ex(e,e=>{let n=e.block===e?e:null;n?.kind===`portal`&&Jy(n,t),Yy(e,t)})}function Xy(e){let t=e.tryBlock;if(t===null||e.hiddenDom!==null)return;let n={displays:new Set,texts:new Set,active:!0};e.hiddenDom=n,E!==null&&Ua(()=>{if(e.hiddenDom===n&&(e.hiddenDom=null),n.active){n.active=!1;for(let e of n.displays)Ey(e,!0);for(let e of n.texts)ky(e)}}),Jy(t,n),Yy(t,n)}function Zy(e){let t=e.hiddenDom;if(t!==null&&(e.hiddenDom=null,E!==null&&Ua(()=>{if(e.hiddenDom=t,!t.active){t.active=!0;for(let e of t.displays)Ty(e,!0);for(let e of t.texts)Oy(e),Dy(e)}}),t.active)){t.active=!1;for(let e of t.displays)Ey(e,!0);for(let e of t.texts)ky(e)}}function Qy(e){fa(e),e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),wb(e),e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null)}function $y(e,t,n,r=-1,i=n){if(di!==null)throw di.suspensions.set(e,t),new ld(t);js();let a=n.currentRenderMode===`transition`;if(a&&e.hasResolved&&e.branch===1&&e.hiddenDom===null){Xo(r,e.tryBlock??n),Ui!==null&&(Ui.heldSlots??=new Set).add(e),Li(e,i),e.transitionHeld||(e.transitionHeld=!0,Qo(1)),Cb(e),e.pendingBody!==null&&Qv!==1/0&&Qv>=0&&(e.transitionTimeoutId===null||e.pendingThenable!==t)&&(e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null),e.transitionTimeoutId=setTimeout(()=>{e.transitionTimeoutId=null,e.pendingThenable===t&&e.transitionHeld&&e.branch===1&&ob(e)},Qv)),kb(e,t);return}a||Qy(e),tb(e,t)}function eb(e){let t=k===null?ns:k.effects;for(let n=es;n<=ts;n++){let r=t[n];for(let t=0;t<r.length;t++){let n=r[t],i=n.scope.block;if(i.disposed||i!==e&&!Tc(e,i))continue;let a=n.scope.hooks?.get(n.slot);a!==void 0&&a.revision===n.revision&&(D!==null&&Do(a),a.revision++,a.active=a.connectedFn!==null,a.deps=a.connectedFn===null?void 0:a.connectedArgs,rl(i,e))}}}function tb(e,t){let n=jy(e);try{return nb(e,t)}catch(e){throw n!==null&&no(n.transaction),e}finally{My(n)}}function nb(e,t){let n=e.branch===2,r=I();if(r!==null&&!e.hasResolved&&e.tryBlock!==null){let t=e.tryBlock;j(t),e.tryBlock=null,e.block===t&&(e.block=null),r.node=e.end}else Xy(e);let i=e.block!==null&&e.block!==e.tryBlock?e.block:null;if(e.block=null,Ny(e,2),i!==null&&(j(i),e.parentBlock.disposed||e.block!==null||e.branch!==2))return!1;if(e.tryBlock){let t=e.tryBlock,n=mc(t);eb(t),O(t,`inactive`,t.inactive),t.inactive=!0;let r=()=>rb(e,t,n);hc?.recordStageEntry(r),k===null?is.push(r):(k.renderCleanups??=[]).push(e=>{e||is.push(r)})}return!ib(e)||e.parentBlock.disposed||e.branch!==2?!1:(n||uy(e),t!==void 0&&kb(e,t),!e.parentBlock.disposed&&e.branch===2)}function rb(e,t,n){if(dc(t)||e.tryBlock!==t||e.branch!==2)return;let r=e.parentBlock.idState.renderOwner,i=r?.generation;ix(t,!1),!(dc(t)||e.tryBlock!==t||e.branch!==2||r?.generation!==i)&&(e.detachedRefs===null&&(e.detachedRefs=[],tx(t,e.detachedRefs,!0,!1,n)),!(dc(t)||e.tryBlock!==t||r?.generation!==i)&&mc(t,n))}function ib(e){if(e.pendingBody){let t=(M?.view(document)??document).createComment(`pend-b`),n=(M?.view(document)??document).createComment(`/pend-b`);N(e.domParent).insertBefore(t,e.end),N(e.domParent).insertBefore(n,e.end);let r=Qc(`control-flow`,e.parentBlock,e.domParent,t,n,e.pendingBody,void 0,e.env);r.idState=e.idState,r.__trySlot=e,e.block=r;try{A(r)}catch(t){return!Pb(r,t)&&(e.block&&=(j(e.block),null),Fb(e,t),!1)}}return!0}function ab(e){if(e.branch!==2)return;let t=e.block===e.tryBlock?null:e.block;if(e.pendingBody===null){t&&j(t),e.block=null;return}if(t===null){ib(e);return}t.body=e.pendingBody,t.extra=e.env;try{A(t)}catch(n){if(Pb(t,n))return;j(t),e.block=null,Fb(e,n)}}function ob(e){e.pendingBody&&e.branch===1&&e.tryBlock&&(Gi!==null&&Gi.holders.has(e)&&da(),tb(e))}function sb(e){(Vi||ny||Zo?.wrapResume(()=>cb(e),()=>[e.parentBlock])!==!0)&&cb(e)}function cb(e){if(e.parentBlock.disposed)return;let t=!1;if(Yn!==null&&e.hiddenDom!==null){let n=e.stagedCapture;if(n===null||!Yn.validateCapture(n)){let t=md;md=!0,e.transitionHeld&&e.tryBlock!==null&&(e.tryBlock.pendingMode=`transition`);try{xb(e,`urgent`),Hi||yc()}finally{md=t}return}k===null&&(t=wr(n,e.parentBlock.idState.renderOwner))}let n=e.branch===2,r=db(e.parentBlock),i=e.transitionHeld,a=i;i&&(e.transitionHeld=!1),zi.delete(e),Bi.delete(e);try{let r=e.tryBlock;if(r&&!r.disposed){let o=e.hiddenDom!==null,s=e.stagedCapture;if(e.stagedCapture=null,e.stagedEffectDeps=null,e.hiddenDom){if(e.block&&e.block!==r){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||r.disposed||e.tryBlock!==r||e.block!==null){k_(s);return}}Zy(e)}if(e.block=r,Ny(e,1),r.body=e.tryBody,i&&(r.pendingMode=`transition`),r.inactive=!1,s!==null)r.pendingMode=null,r.pendingDeferred=!1,e.detachedRefs!==null&&(s.refs.length=0),D_(s,t),e.hasResolved=!0;else{let n=Ko(e),s=ds(),c=fb(r),l=k,u=ec.length,d=md;md=!0,k=s;let f=!1,p=null,m=!1;try{o?yb(r,s):A(r),Yn!==null&&(m=!Yn.validateCapture(s),!m&&l===null&&(t=wr(s,e.parentBlock.idState.renderOwner)))}catch(e){f=!0,p=e}finally{k=l,md=d,!f&&!m&&qo(n)}if(m){try{Xo(n,r),ec.splice(u),pb(r,c),k_(s),i&&(e.transitionHeld=!0,zi.add(e),a=!1),rl(r,r),Cs(r)}finally{qo(n)}return}if(!f)e.detachedRefs!==null&&(ec.splice(u),s.refs.length=0),D_(s,t),e.hasResolved=!0;else{try{ec.splice(u),pb(r,c),k_(s),ud(p)?$y(e,p.thenable,r,n):zb(r,p)}finally{qo(n)}if(e.parentBlock.disposed)return}}e.branch===1&&(n&&uy(e),Xl(e),bb(e))}else qy(e);Hi||yc()}finally{r!==null&&Xb(r),a&&(Qo(-1),Ii(e))}}function lb(e,t,n=null){let r=null,i=null;for(let a=e;a!==null;a=a.parentBlock){if(t&&r===null&&a.inactive){let e=a.__activitySlot;e!==void 0&&e.block===a&&e.hidden&&(r=e)}let e=a.__trySlot;if(e!==void 0&&e.tryBlock===a){if(e.hiddenDom!==null)return e;n!==null&&!e.propagateSuspense&&e.hasResolved&&e.branch===1&&(e.transitionHeld||n===`transition`)&&(i=e)}}return r??i}function ub(e){return lb(e,!1)}function db(e){for(let t=e;t!==null;t=t.parentBlock){if(!t.inactive)continue;let e=t.__activitySlot;if(e!==void 0&&e.block===t&&e.hidden)return e}return null}function fb(e,t){let n=new Map,r=e=>{let i=e.effectSlots;if(i!==null)for(let e=0;e<i.length;e++){let r=i[e];(t===void 0||r.phase===t)&&n.set(r,{deps:r.deps,revision:r.revision,active:r.active})}ex(e,r)};return r(e),n}function pb(e,t,n){let r=e=>{let i=e.effectSlots;if(i!==null)for(let e=0;e<i.length;e++){let r=i[e];if(n!==void 0&&r.phase!==n)continue;let a=t.get(r);a===void 0?(r.deps=void 0,r.revision=0,r.active=!1):(r.deps=a.deps,r.revision=a.revision,r.active=a.active)}ex(e,r)};r(e)}var mb=null;function hb(e){for(let t=mb;t!==null;t=t.parent)t.insertionReplays?.delete(e)}function gb(e,t,n){for(let r=mb;r!==null;r=r.parent)r.queues[t]===n&&r.queuedSlots.add(e)}function _b(e,t,n){for(let r=mb;r!==null;r=r.parent)if(r.queues[t]===n){for(let t of e)r.queuedSlots.delete(t);for(let t=0;t<n.length;t++){let i=n[t],a=i.scope.hooks?.get(i.slot);a!==void 0&&e.has(a)&&a.revision===i.revision&&r.queuedSlots.add(a)}}}function vb(e){let t=mb;if(t===null||e!==t.root&&!Tc(t.root,e))return;let n=[],r=e=>{let i=e.effectSlots;if(i!==null)for(let r=0;r<i.length;r++){let a=i[r];if(t.queuedSlots.has(a))continue;let o=t.insertionReplays?.get(a);if(o!==void 0){n.push({scope:e,effect:a,replay:o});continue}a.active&&a.disconnected&&a.connectedFn!==null&&n.push({scope:e,effect:a,replay:null})}ex(e,r)};r(e);for(let e=0;e<n.length;e++){let{scope:r,effect:i,replay:a}=n[e],o=t.queues[i.phase];if(a!==null){let e=a[a.length-1];D!==null&&Do(i),i.active=e.fn!==null,i.deps=e.fn===null?void 0:e.args;let t=++i.revision;for(let e=0;e<a.length;e++)o.push({...a[e],revision:t,seq:os++})}else o.push({scope:r,slot:i.slot,fn:i.connectedFn,order:i.order,revision:i.revision,args:i.connectedArgs,phase:i.phase,seq:os++});gb(i,i.phase,o)}}function yb(e,t,n=null){let r=t===null?ns:t.effects,i=new Set;for(let e=0;e<r.length;e++){let t=r[e];for(let e=0;e<t.length;e++){let n=t[e],r=n.scope.hooks?.get(n.slot);r?.effect===!0&&r.revision===n.revision&&i.add(r)}}let a=mb;mb={root:e,queues:r,queuedSlots:i,insertionReplays:n,parent:a};try{A(e)}finally{mb=a}}function bb(e){if(e.detachedRefs===null||e.tryBlock===null)return;e.detachedRefs=null;let t=[];nx(e.tryBlock,t);for(let e=0;e<t.length;e++){let n=t[e];$s(n.scope,n.ref,n.el)}}function xb(e,t,n=`update`){let r=db(e.tryBlock),i=md;n===`retry`&&(md=!0);try{Sb(e,t,n)}finally{md=i,r!==null&&Xb(r)}}function Sb(e,t,n=`update`){if(e.nativeTransition!==void 0&&di===null){fi(e.nativeTransition);return}let r=n===`retry`,i=e.tryBlock;if(i===null||i.disposed||e.hiddenDom===null)return;let a=ub(i.parentBlock);if(a!==null){Sb(a,t,n);return}if(oy(e),Bi.delete(e),e.stagedCapture!==null){let t=e.stagedCapture,n=e.stagedEffectDeps;e.stagedCapture=null,e.stagedEffectDeps=null,n!==null&&pb(i,n),k_(t),ix(i,!1)}let o=fb(i);if(n===`parent`&&!md&&!e.hasResolved){let t=!0;for(let e of o.keys())if(e.phase===$o&&e.connectedFn!==null){t=!1;break}if(t){if(i=Vy(e),i===null)return;o.clear()}}Zy(e),i.body=e.tryBody,i.extra=e.env,i.inactive=!1;let s=(t??i.pendingMode??T?.currentRenderMode??`urgent`)===`transition`&&zi.has(e),c=ds(),l=!1,u=k,d=ec.length;k=c;let f=!1,p=null;try{yb(i,c)}catch(e){f=!0,p=e}finally{k=u}if(ec.splice(d),c.refs.length=0,f){if(pb(i,o),k_(c),di!==null)throw p;ud(p)?(ix(i,!1),Xy(e),i.inactive=!0,kb(e,p.thenable)):r?(Xy(e),i.inactive=!0,e.pendingThenable=null,cy(e,{error:p})):(zb(i,p),!ai&&T===null&&yc());return}if(s||r){e.pendingThenable=null,e.stagedCapture=c,e.stagedEffectDeps=o,Xy(e),i.inactive=!0,s?(Bi.add(e),queueMicrotask(Tb)):cy(e);return}if(Yn!==null){if(!Yn.validateCapture(c)){pb(i,o),k_(c),Xy(e),i.inactive=!0,rl(i,i),Cs(i);return}k===null&&(l=wr(c,e.parentBlock.idState.renderOwner))}try{if(e.block!==null&&e.block!==i){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||i.disposed||e.tryBlock!==i||e.block!==null){k_(c);return}}e.block=i,Ny(e,1),e.hasResolved=!0,e.pendingThenable=null,D_(c,l),uy(e),Xl(e),bb(e),e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null),e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),zi.has(e)&&(zi.delete(e),Bi.delete(e),queueMicrotask(Tb))}catch(t){Fb(e,t)}}function Cb(e){zi.add(e),Bi.delete(e)}function wb(e){zi.has(e)&&(zi.delete(e),Bi.delete(e),Tb())}function Tb(){for(let e of Bi)zi.has(e)||Bi.delete(e);if(Bi.size!==0&&Bi.size===zi.size){for(let e of zi)if(!Bi.has(e))return;Ob()}}function Eb(e,t){if(e===t)return 0;let n=N(e.start).compareDocumentPosition(t.start);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}function Db(e){let t=e.effects[$o].concat(e.effects[es],e.effects[ts]).sort((e,t)=>e.seq-t.seq);for(let e=0;e<t.length;e++)t[e].seq=os++}function Ob(){if(!Vi){if(Gi!==null){let e=!0;for(let t of Gi.holders)if(t.hiddenDom!==null){e=!1;break}if(e&&ua(Gi.entries))return;if(e&&da()){Bi.clear(),Ps();return}}Vi=!0;try{let e=()=>{let e=[...Bi];Bi.clear();let t=e.every(e=>e.stagedCapture!==null);if(t){e.sort(Eb);for(let t of e)Db(t.stagedCapture)}let n=Hi;Hi=t;try{for(let t of e)t.tryBlock!==null&&t.tryBlock.disposed||sb(t)}finally{Hi=n,t&&yc()}};Zo?.wrapResume(e,()=>[...Bi].map(e=>e.parentBlock))!==!0&&e()}finally{Vi=!1}}}function kb(e,t){if(e.pendingThenable===t)return;e.pendingThenable=t;let n=()=>{if(e.pendingThenable!==t)return;e.pendingThenable=null,e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null);let n=e.tryBlock;if(n!==null&&!n.disposed){let e=ub(n.parentBlock);if(e!==null){xb(e,zi.has(e)?`transition`:`urgent`,zi.has(e)?`update`:`retry`);return}}if(zi.has(e)){if(e.hiddenDom!==null){xb(e,`transition`);return}if(Bi.add(e),Bi.size<zi.size)return;Ob();return}e.branch===2&&(e.tryBlock===null||e.tryBlock.disposed)&&Hy(e),e.hiddenDom===null?sb(e):xb(e,`urgent`,`retry`)};t.then(n,n)}function Ab(e){jb(e)}function jb(e,t){li(),bi(),oi++;let n=gi,r=_i,i=n??r??xi(),a=n===null&&r===null;gi=i,t!==void 0&&(Mi(i,t),Ni(i));let o=zh;o!==null&&o.transitions++;let s;try{Qo(1);try{let t=On,n=We(()=>{let e=yi(i);return kn(e),e});try{s=e()}finally{kn(t),We(n)}s!=null&&typeof s.then==`function`&&(i.pendingActions++,_i=i),a&&(i.closed=!0,Di(i))}catch(e){throw a&&(i.closed=!0,Di(i)),e}finally{gi=n,oi--}}catch(e){Qo(-1),o!==null&&Hh(o),Gh(),i.workComplete=!0,Pi(i),Mb(e,t);return}if(s!=null&&typeof s.then==`function`){si++;let e=!1,n=()=>{e||(e=!0,i.pendingActions--,Di(i),Qo(-1),si--,o!==null&&Hh(o),Gh(),queueMicrotask(()=>{i.workComplete=!0,Pi(i)}))};s.then(n,e=>{n(),Mb(e,t)})}else queueMicrotask(()=>{Qo(-1),o!==null&&Hh(o),Gh(),i.workComplete=!0,Pi(i)})}function Mb(e,t){t!==void 0&&!t.block.disposed?(t.error={value:e},Cs(t.block)):Eh(e)}function Nb(e){e.parentBlock.disposed||e.branch!==0||(Ny(e,-1),e.err=null,e.hasResolved=!1,e.detachedRefs=null,Cs(e.parentBlock))}function Pb(e,t){if(!ud(t))return!1;if(T!==null)throw t;return zb(e,t),!0}function Fb(e,t,n=!1,r,i){if(ff(t))throw t;let a=jy(e);try{Ib(e,t,n,r,i)}catch(e){throw a!==null&&no(a.transaction),e}finally{My(a)}}function Ib(e,t,n,r,i){e.retrySignalOwners!==void 0&&cr(e),oy(e),Kl?.delete(e);let a=I();k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null;let o=e.detachedRefs!==null;e.detachedRefs=null,e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null);let s=e.tryBlock,c=e.block;if(s){let t=null;if(o&&(t=[],nx(s,t)),Zy(e),e.tryBlock=null,ac(t,()=>{j(s)}),e.parentBlock.disposed||e.tryBlock!==null||e.block!==c)return}if(e.hiddenDom=null,e.block&&e.block!==s){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||e.block!==null)return}else e.block=null;if(e.hasResolved=!1,e.pendingThenable=null,e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),wb(e),e.catchBody===null){if(T!==null)throw t;let n=Lb(e.parentBlock);n?n(t):console.error(`tryBlock with no catch arm received error:`,t);return}let l=a?.isRejection(t)===!0,u=l?t.reason:t;Ny(e,0),e.err=u;let d=r!==void 0&&i!==void 0,f=r??(M?.view(document)??document).createComment(`catch-b`),p=i??(M?.view(document)??document).createComment(`/catch-b`);d?a!==null&&(a.node=F(f)):(a!==null&&(a.isClose(e.end)&&(ax(F(e.start),e.end),a.node=e.end),a.markFresh(f),a.markFresh(p)),N(e.domParent).insertBefore(f,e.end),N(e.domParent).insertBefore(p,e.end));let m=Qc(`control-flow`,e.parentBlock,e.domParent,f,p,e.catchBody,{err:u,reset:()=>Nb(e)},e.env);m.idState=e.idState,e.block=m,d&&a!==null&&a.rootBlock.disposed&&a.rootBlock.startMarker===f&&a.rootBlock.endMarker===p&&(a.rootBlock=m);try{!d&&a!==null?a.suspend(()=>A(m)):A(m)}catch(n){if(Pb(m,n))return;let r=l&&Object.is(n,u),i=d&&r;e.block&&=(j(e.block,!i),null);let a=r?t:n;if(T!==null&&(r||Lb(e.parentBlock)!==null))throw a;let o=Lb(e.parentBlock);o?o(a):console.error(`catch body threw, no outer tryBlock:`,n)}finally{n&&Px(e)}}function Lb(e){let t=e,n=e;for(;n;){let e=n.$$tryHandler;if(e&&n.__trySlot?.catchBody!==null)return e;n=n.parentBlock}return Xu(t)}function Rb(e,t,n=null){if(ff(t))throw t;if($u(t)){let n=Yu(e);if(n!==null&&n.routeSuspense(t.thenable))return;t=Error(w(27))}if(ud(t)){let r=e;for(;r;){let n=r.__suspenseHandler;if(n){n(t.thenable,e);return}r=r.parentBlock}let i=Zu(e);if(i!==null){i(t.thenable);return}if(ao(e,t.thenable,n))return;throw t}let r=Lb(e);if(r)Mx(e,t,r(t));else throw t}function zb(e,t){try{Rb(e,t)}catch(t){if(T!==null||ai)throw t;let n=ry(e);Ix(e,t)||console.error(t),n.kind===`root`&&!n.disposed&&j(n)}}function Bb(e){for(let t=e;t!==null;t=t.parentBlock){let e=t.__trySlot;if(e!==void 0&&e.tryBlock===t&&e.pendingBody!==null&&e.hasResolved&&e.branch===1&&e.hiddenDom===null)return!0}return!1}function Vb(e,t,n,r=null){let i=0,a=e._slots;if(a!==null)for(let e=0;e<a.length;e++){let o=a[e];o.anchor===n&&(o.__kind===`ifBlockSlot`||o.__kind===`switchBlockSlot`||o.__kind===`componentSlotSlot`&&o.block?.parentNode===t)&&(i++,r!==null&&(O(o,`anchor`,o.anchor),o.anchor=r))}let o=e.children;if(o!==null)for(let a=0;a<o.length;a++){let s=o[a].scope,c=s.block;c!==e.block&&c.parentNode===t&&c.endMarker===n&&(i+=Vb(s,t,n,r)||1,r!==null&&(O(c,`endMarker`,c.endMarker),c.endMarker=r))}return i}function Hb(e,t,n,r,i,a){if(e.markerlessBefore=void 0,e.borrowed&&e.start===null)return;let o=i?F(i):P(t),s=a?(M?.view(a)??a).previousSibling:(M?.view(t)??t).lastChild;if(s!==null&&o===s&&o.nodeType===1&&Vb(n,t,a)<=1)n.startMarker=o,n.endMarker=o,e.end=o;else{let i=(M?.view(document)??document).createComment(r),s=(M?.view(document)??document).createComment(`/`+r);(M?.view(t)??t).insertBefore(i,o??a),(M?.view(t)??t).insertBefore(s,a),n.startMarker=i,n.endMarker=s,n.exclusiveMarkers=!0,e.start=i,e.end=s,Vb(n,t,a,s)}}function Ub(e,t,n,r,i){if(t===null||n===null)return;let a=e;for(;a!==null&&a.startMarker===t&&a.endMarker===n;)O(a,`startMarker`,a.startMarker),O(a,`endMarker`,a.endMarker),a.startMarker=r,a.endMarker=i,a=a.parentBlock}function Wb(e,t,n){return e!==null&&t!==null&&n!==null&&e.startMarker===t&&e.endMarker===n}function Gb(e,t,n,r,i,a,o,s){if(T?.pending&&!T.crossRenderUpdate)return;let c=e.block,l=I();if(i!==n.branch){if(D!==null&&(n.branch!==-1||l!==null)){let e=n.block;if(n.markerlessBefore!==void 0&&e!==null)Wa(n,r,n.markerlessBefore,e.endMarker);else if(n.start!==null)Wa(n,r,n.borrowed?n.start:N(n.start).previousSibling,n.borrowed?n.end:N(n.end)?.nextSibling??null);else if(n.borrowed&&e?.startMarker==null)Wa(n,r,null,null);else{let t=e?.startMarker??null,i=e?.endMarker??null;if(t!==null&&i!==null&&(M?.view(t)??t).parentNode===r&&(M?.view(i)??i).parentNode===r)Wa(n,r,(M?.view(t)??t).previousSibling,F(i));else{let e=n.anchor;Wa(n,r,e===null?(M?.view(r)??r).lastChild:(M?.view(e)??e).previousSibling,e)}}}let u=ci,d=c.currentRenderMode===`transition`,f=u!==null&&n.block!==null&&n.block.mounted&&n.markerlessBefore===void 0&&a!==null&&l===null&&Bb(c),p=D===null||f?u:null,m=!d&&f,h=null,g=n.markerlessBefore;if(g!==void 0&&n.block!==null){let e=n.block;h=e.endMarker;let t=g?F(g):P(r);if(n.block=null,n.markerlessBefore=void 0,j(e,!1),c.disposed)return;for(;t!==null&&t!==h;){let e=F(t);(M?.view(t)??t).parentNode===r&&(M?.view(r)??r).removeChild(t),t=e}}let _=h===null&&n.start===null&&n.block!==null&&n.block.endMarker!==null?n.block.endMarker:n.end,v=D;if(v!==null&&!f&&l===null&&n.block!==null&&n.block.mounted&&!Qa(v,n.block)){let l=n.block,u=l.startMarker,d=l.endMarker,f=n.borrowed,p=f?n.start===null?P(r):F(n.start):n.start??u;f&&p===n.end&&(p=null);let m=f?p===null?null:n.end===null?(M?.view(r)??r).lastChild:N(n.end).previousSibling:_;if(a===null){if(n.start!==null)p=F(n.start),p===n.end&&(p=null),m=p===null?null:N(n.end).previousSibling;else{let e=m===null?n.anchor:F(m);if(Wb(c,u,d)){let t=(M?.view(document)??document).createComment(o),i=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(t,e),(M?.view(r)??r).insertBefore(i,e),n.start=t,n.end=i,n.borrowed=!1,Ub(c,u,d,t,i)}else n.anchor=e,n.end=null}n.block=null,n.branch=i,Ya(l,r,p,m);return}let h=p===null?f?n.start:null:m;if(h!==null&&(M?.view(h)??h).parentNode===r){let g=E_(c,r,h,a,void 0,null,`control-flow`,s,!1,void 0,c.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:n.__kind,branch:i,component:void 0,key:void 0});if(g.suspended||g.failed)throw M_(g.wip),g.suspended===null?g.error:new ld(g.suspended);N(g.wip.start).data=o,N(g.wip.end).data=`/`+o,n.start=g.wip.start,n.end=g.wip.end,n.borrowed=!1,n.block=g.wip.block,n.branch=i,f||Ub(c,u,d,g.wip.start,g.wip.end),O(g.wip.block,`exclusiveMarkers`,g.wip.block.exclusiveMarkers),g.wip.block.exclusiveMarkers=!0,O_(g.wip),Ya(l,r,p,m);return}}if(p!==null&&n.block!==null&&a!==null&&l===null&&(d||m)&&_!==null){let l=n.block,u=l.startMarker,d=l.endMarker,f=p.render(c,r,_,a,void 0,null,`control-flow`,s,!1,void 0,c.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:n.__kind,branch:i,component:void 0,key:void 0});if(f.suspended||f.failed)throw p.dispose(f.wip),f.failed?f.error:new ld(f.suspended);if(n.borrowed)p.dispose(f.wip);else{N(f.wip.start).data=o,N(f.wip.end).data=`/`+o;let e=n.start,t=n.end,r=n.block;n.start=f.wip.start,n.end=f.wip.end,n.block=f.wip.block,n.branch=i,Ub(c,u,d,f.wip.start,f.wip.end),f.wip.block.exclusiveMarkers=!0,p.splice(f.wip),j(r),e!==null&&((M?.view(e)??e).remove(),(M?.view(t)??t)?.remove()),c.disposed||n.block!==f.wip.block||f.wip.block.disposed;return}}let y=h??(_===null?n.anchor:F(_)),b=n.block,x=b?.startMarker??null,S=b?.endMarker??null,C=Wb(c,x,S);if(n.block){if(j(n.block),c.disposed)return;n.block=null}if(n.branch=i,n.start===null&&a!==null&&C){let e=(M?.view(document)??document).createComment(o),t=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(e,y),(M?.view(r)??r).insertBefore(t,y),n.start=e,n.end=t,Ub(c,x,S,e,t)}if(n.start!==null){if(a){let e,t,i=!1,o=!1,u=null,d=null;if(l!==null&&l.isOpen(F(n.start))&&(u=F(n.start),d=l.close(u),d!==n.end&&F(d)!==n.end)){if(lf?.revision!==void 0)throw Error(w(75));ax(F(n.start),n.end),u=null,o=!0}u===null?(e=n.start,t=n.end,i=!0,l!==null&&(l.node=F(n.start))):(e=u,t=d,l.node=F(u));let f=Qc(`control-flow`,c,r,e,t,a,void 0,s);i&&(f.exclusiveMarkers=!0),n.block=f,o?(l.suspend(()=>A(f)),l.node=F(n.end)):A(f)}else if(l!==null&&F(n.start)!==n.end){if(lf?.revision!==void 0)throw Error(w(75));ax(F(n.start),n.end)}}else if(a){let e=y?(M?.view(y)??y).previousSibling:(M?.view(r)??r).lastChild,t=Qc(`control-flow`,c,r,null,y,a,void 0,s);n.block=t,n.markerlessBefore=e,A(t),Hb(n,r,t,o,e,y),Ub(c,x,S,t.startMarker,t.endMarker)}else if(!C)n.anchor=y,n.end=null;else{let e=(M?.view(document)??document).createComment(o),t=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(e,y),(M?.view(r)??r).insertBefore(t,y),n.start=e,n.end=t,Ub(c,x,S,e,t)}}else if(n.block){n.block.body!==a&&O(n.block,`body`,n.block.body),n.block.extra!==s&&O(n.block,`extra`,n.block.extra),n.block.body=a,n.block.extra=s,A(n.block);let e=n.markerlessBefore;e!==void 0&&Hb(n,r,n.block,o,e,n.block.endMarker)}l!==null&&!n.borrowed&&n.end!==null&&(l.node=F(n.end))}function Kb(e,t,n,r,i,a,o,s){let c=e.slots[t];if(t===0&&e!==cl&&c?.returnedOutput===!0){if(T?.pending&&!T.crossRenderUpdate)return;if(c.__kind===`ifBlockSlot`)ll(c,!1);else{let t=e.block;if(t.outputHandler(t,null,!0),t.disposed)return;c=void 0}}if(c===void 0){let r=I(),i=null,a=null,s=r?.passthroughRanges===!0,l=s?null:r?.resolveOpen(o??null,n)??null;l!==null&&(i=l,a=r.close(l)),c={__kind:`ifBlockSlot`,anchor:o??null,start:i,end:a,borrowed:s,branch:-1,block:null,markerlessBefore:void 0},e.slots[t]=c,xl(e,c)}let l=+!!r;Gb(e,t,c,n,l,l?i:a,`if`,s)}var qb=null;function Jb(e,t){let n=F(e.startMarker);for(;n!==null&&n!==e.endMarker;){let e=n.$$portalEnd;if(e!==void 0){n=hv(n,e);continue}if(n.nodeType===1){let e=n;t.nextDisplays.has(e)||(t.nextDisplays.add(e),t.displays.has(e)?xy(e):(vy(e),Ty(e,!0)))}else if(n.nodeType===3){let e=n;t.nextTexts.has(e)||(t.nextTexts.add(e),t.texts.has(e)||(vy(e),Oy(e)),Dy(e))}n=F(n)}}function Yb(e){let t=e.block;if(!t)return;let n=e.hiddenDom??={displays:new Set,texts:new Set,nextDisplays:new Set,nextTexts:new Set};if(e.fragmentVisibilityCleanupRegistered||(e.fragmentVisibilityCleanupRegistered=!0,(t.cleanups??=[]).push(()=>Zb(e,!1))),Jb(t,n),e.portals!==null)for(let t of e.portals)t.disposed||Jb(t,n);for(let e of n.displays)n.nextDisplays.has(e)||(yy(e),Ey(e,!0));for(let e of n.texts)n.nextTexts.has(e)||(yy(e),ky(e));let r=n.displays,i=n.texts;n.displays=n.nextDisplays,n.texts=n.nextTexts,n.nextDisplays=r,n.nextTexts=i,r.clear(),i.clear()}function Xb(e){let t=e.block;t===null||!e.hidden||e.deactivationPending||dc(t)||Yb(e)}function Zb(e,t){t||Kl?.delete(e);let n=e.hiddenDom;if(n!==null){for(let e of n.displays)yy(e),Ey(e,!0,t);n.displays.clear();for(let e of n.texts)yy(e),ky(e,t);n.texts.clear()}}function Qb(e,t){if(e.pendingThenable===t)return;e.pendingThenable=t;let n=e.block,r=()=>{e.pendingThenable===t&&e.hidden&&!dc(n)&&Cs(n)};t.then(r,r)}function $b(e,t=!1,n=e.block){let r=md;t&&(md=!0);let i=(k===null?ns:k.effects)[$o],a=i.length,o=e.hasInsertionEffects?fb(n,$o):null;try{e.pendingInsertions===null?A(n):yb(n,k,e.pendingInsertions),e.pendingThenable=null,e.pendingInsertions=null}catch(t){if(!ud(t))throw t;for(let r=n;r!==null&&r!==e.block;r=r.parentBlock)if(r.__suspenseHandler)throw t;let r=null;if(i.length>a){let t=new Map;for(let e=a;e<i.length;e++){let n=i[e],a=n.scope.hooks?.get(n.slot);if(a?.effect!==!0||(mb!==null&&(r??=new Set).add(a),a.revision!==n.revision||dc(n.scope.block)))continue;let o=t.get(a);o===void 0?t.set(a,[n]):o.push(n)}i.length=a;for(let e of t.keys())hb(e);if(e.pendingInsertions===null)e.pendingInsertions=t.size===0?null:t;else for(let[n,r]of t)e.pendingInsertions.set(n,r)}(o!==null||e.pendingInsertions!==null)&&pb(n,o??new Map,$o),r!==null&&_b(r,$o,i),Qb(e,t.thenable)}finally{md=r}}function ex(e,t,n=!0){let r=e.children;if(r!==null)for(let e=0,n=r.length;e<n;e++)t(r[e].scope);let i=e._slots;if(i!==null)for(let e=0,r=i.length;e<r;e++){let r=i[e];if(r.__kind===`forBlockSlot`){for(let e=r.head;e!==null;e=e.nextSibling)t(e);r.emptyBlock&&t(r.emptyBlock)}else if(r.__kind===`childSlot`){if(r.block&&t(r.block),r.forSlot){for(let e=r.forSlot.head;e!==null;e=e.nextSibling)t(e);r.forSlot.emptyBlock&&t(r.forSlot.emptyBlock)}r.portal?.block&&t(r.portal.block)}else r.block&&(t(r.block),n&&r.__kind===`trySlotSlot`&&r.tryBlock&&r.tryBlock!==r.block&&t(r.tryBlock))}}function tx(e,t,n=!0,r=!0,i=null,a=null){let o=e.deoptNode;o!=null&&rx(o,t,n,e,i,a);let s=e.refFields;if(s!==null){let r=e.slots[0];if(r!=null)for(let o=0,c=s.length;o<c;o+=3){let c=s[o];if(c===`r`){let c=r[s[o+2]],l=r[s[o+1]]??a?.get(c)?.connected;if(l==null)continue;t.push({ref:l,el:c,scope:e}),n&&!fc(i,c,l)&&fp(l,null,c)}else if(c===`s`){let c=r[s[o+2]];if(c==null)continue;let l=r[s[o+1]],u=(l?.[nm]===!0?l.resolved:l)?.ref??a?.get(c)?.connected;if(u==null)continue;t.push({ref:u,el:c,scope:e}),n&&!fc(i,c,u)&&fp(u,null,c)}else{let c=r[s[o+1]];if(c==null)continue;let l=c._currentRef??a?.get(c)?.connected;if(l==null)continue;t.push({ref:l,el:c,scope:e}),n&&!fc(i,c,l)&&fp(l,null,c)}}}let c=e.slots;for(let r=0,o=c.length;r<o;r++){let o=c[r];if(typeof o==`object`&&o){if(o.anchor!==void 0&&o.el instanceof Element){let r=o.ref??a?.get(o.el)?.connected;r!=null&&(t.push({ref:r,el:o.el,scope:e}),n&&!fc(i,o.el,r)&&fp(r,null,o.el))}o.__kind===`childSlot`&&o.hostNode!=null&&rx(o.hostNode,t,n,e,i,a)}}ex(e,e=>tx(e,t,n,r,i,a),r)}function nx(e,t,n=null){tx(e,t,!1,!1,null,n)}function rx(e,t,n=!0,r,i=null,a=null){if(!z_)return;let o=Y_(e)?.props?.ref??a?.get(e)?.connected;o!=null&&(t===null?tc(o,e):(t.push({ref:o,el:e,scope:r}),n&&!fc(i,e,o)&&fp(o,null,e)));let s=P(e);for(;s!==null;){let e=s.$$portalEnd;if(e!=null){s=hv(s,e);continue}rx(s,t,n,r,i,a),s=F(s)}}function ix(e,t=!0){let n=e.effectSlots;if(n!==null)for(let r=0;r<n.length;r++){let i=n[r];if(i.phase===$o||!t&&i.phase===ts&&i.connectedFn!==null)continue;let a=gc!==null&&hc.stageDeactivation(i,e)===!0;if(typeof i.cleanup==`function`){let t=i.cleanup;i.cleanup=void 0;try{a||ei(t,i.phase,e)}catch(t){if(t instanceof xs)throw t;let n=Lb(e.block);n===null?console.error(t):n(t)}}i.deps=void 0,i.connectedFn!==null&&(i.disconnected=!0)}ex(e,e=>ix(e,t))}function ax(e,t){let n=e;for(;n!==null&&n!==t;){let e=F(n);(M?.view(n)??n).remove(),n=e}}function ox(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function sx(e,t,n){if(E===null&&Yn===null){t(e.props,e,n);return}let r=Ir;Ir=e;let i=Yn===null?-1:Sr(e);try{t(e.props,e,n)}finally{i>=0&&Yn.endScope(i),Ir=r}}var cx=4,lx=new Int32Array(cx),ux=16384,dx=null,fx=null;function px(e,t,n,r,i,a,o,s){let c=D!==null&&!Ra;c&&e.itemIndex!==n&&O(e,`itemIndex`,e.itemIndex),c&&e.body!==r&&O(e,`body`,e.body),i&&e.props===t&&(o||e.itemIndex===n)?(e.itemIndex=n,e.body=r):(c&&(e.props!==t||e.extra!==s)&&E.push(Da,e,e.props,e.extra),e.props=t,e.body=r,e.itemIndex=n,e.extra=s,a?sx(e,r,s):A(e))}function mx(e,t,n,r){return typeof e==`function`?r?`k`+String(e(t,n)):e(t,n):e[n]}function hx(e,t,n,r,i,a,o,s=!1,c=!1){let l=n.length,u=e.idState.renderOwner?.signalOwner===void 0?void 0:fr(e,t,l,r);if(l===0)return;E!==null&&zo(t);let d=t.items,f=N(t.end).parentNode,p=t.adopt,m=null,h=null;if(p!==null){m=new Map;for(let e=0;e<p.length;e++){let t=p[e];m.has(t.key)||m.set(t.key,t)}}let g=null;try{for(let p=0;p<l;p++){let l=n[p],_=mx(r,l,p,s);u!==void 0&&u(p,_);let v=null,y=t.end;if(m!==null){y=F(g===null?t.start:g.endMarker);let e=m.get(_);e!==void 0&&(v=e.node,m.delete(_),(h??=new Set).add(v),v!==y&&(Vs===null?(M?.view(f)??f).insertBefore(v,y):(qs(f,Vs),Ex(f,v,y,Vs))))}let b=c?gx(e,f,y,l,p,_,i,t):Cx(e,f,y,l,p,_,i,t,a,o,v);d.set(_,b),b.prevSibling=g,b.nextSibling=null,g?g.nextSibling=b:t.head=b,g=b}t.tail=g,t.size=l}catch(e){for(;g!==null;){let t=g;g=t.prevSibling,d.delete(t.key);let n=c?t.startMarker:null,r=c?t.endMarker:null,i=c&&!ud(e)&&!$u(e)&&!ff(e);i&&n!==null&&N(n).parentNode!==null&&Ka(N(n).parentNode),ud(e)&&Dd(t),t.idState.renderOwner?.signalOwner===void 0?j(t,!D?.retainedCreated?.has(t)):lr(t,e),n!==null&&r!==null&&_x(n,r,i)}throw t.head=null,t.tail=null,t.size=0,e}if(m!==null){let e=0;for(let t=0;t<p.length;t++){let n=p[t];h?.has(n.node)||(p[e++]=n)}p.length=e}}function gx(e,t,n,r,i,a,o,s){let c=I(),l=c.node,u=l!==null&&N(l).parentNode===t?l:n,d=(M?.view(document)??document).createComment(`it`),f=(M?.view(document)??document).createComment(`/it`);(M?.view(t)??t).insertBefore(d,u),(M?.view(t)??t).insertBefore(f,n),E!==null&&Ua(()=>{(M?.view(d)??d).remove(),(M?.view(f)??f).remove()});let p=Qc(`control-flow`,e,t,d,f,o,r,s.env);p.forSlot=s,p.key=a,p.itemIndex=i,to(p);let m=l===null||l===n||c.isFresh(l),h=c.passthroughRanges;c.passthroughRanges=!0;try{m?c.suspend(()=>A(p)):A(p)}catch(e){ud(e)&&Dd(p);let n=h&&!c.passthroughRanges&&!ud(e)&&!$u(e)&&!ff(e);throw n&&Ka(t),j(p,!1),_x(d,f,n),e}finally{c.passthroughRanges=h&&c.passthroughRanges}let g=c.node;if((M?.view(t)??t).insertBefore(f,g!==null&&N(g).parentNode===t?g:n),c.node=F(f),c.markFresh(d),c.markFresh(f),m)for(let e=F(d);e!==null&&e!==f;e=F(e))c.markFresh(e);return p}function _x(e,t,n){if(!n){(M?.view(e)??e).remove(),(M?.view(t)??t).remove();return}for(let n=e;n!==null;){let e=F(n);if(Xd(n)||(M?.view(n)??n).remove(),n===t)break;n=e}}function vx(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=!1){let d=t.items,f=t.size,p=n.length,m=N(t.end).parentNode,h=E!==null;if(f===0){hx(e,t,n,r,i,o,l,u);return}let g=e.idState.renderOwner?.signalOwner===void 0?void 0:fr(e,t,p,r);if(p===0){let e=h&&bx(t);e&&(ka.get(t)??-1)<Aa?Bo(t):h&&zo(t),Sx(t,e?t.items:d,e),t.head=null,t.tail=null,t.size=0;return}let _=t.head,v=0;for(;_!==null&&v<p;){let e=n[v],o=mx(r,e,v,u);if(_.key!==o)break;g!==void 0&&g(v,o);let l=_;(!a||l.props!==e||l.body!==i||l.itemIndex!==v)&&px(l,e,v,i,a,s,c,t.env),_=l.nextSibling,v++}if(v===p&&_===null)return;let y=t.tail,b=p-1,x=f-v;for(;y!==null&&x>0&&b>=v;){let e=n[b],o=mx(r,e,b,u);if(y.key!==o)break;g!==void 0&&g(b,o);let l=y;(!a||l.props!==e||l.body!==i||l.itemIndex!==b)&&px(l,e,b,i,a,s,c,t.env),y=l.prevSibling,b--,x--}let S,C;if(x===0?(C=_,S=C?C.prevSibling:t.tail):(S=_.prevSibling,C=y.nextSibling),x===0){h&&zo(t);let a=C?C.startMarker:t.end,s=S;for(let c=v;c<=b;c++){let f=n[c],p=mx(r,f,c,u);g!==void 0&&g(c,p);let h=Cx(e,m,a,f,c,p,i,t,o,l);d.set(p,h),h.prevSibling=s,h.nextSibling=C,s?s.nextSibling=h:t.head=h,s=h}C?C.prevSibling=s:t.tail=s,t.size+=b-v+1;return}if(v>b){h&&zo(t);let e=_,n=0;for(;e!==C;){let t=e.nextSibling;Lo()?Io(e):j(e),d.delete(e.key),e=t,n++}S?S.nextSibling=C:t.head=C,C?C.prevSibling=S:t.tail=S,t.size-=n;return}let ee=b-v+1,te=[],ne=new Map;for(let e=0;e<ee;e++){let t=mx(r,n[v+e],v+e,u);te[e]=t,ne.set(t,e),g!==void 0&&g(v+e,t)}if(S===null&&C===null&&!ne.has(_.key)){let r=!1,a=_.nextSibling;for(;a!==null;){if(ne.has(a.key)){r=!0;break}a=a.nextSibling}if(!r){h&&zo(t),Sx(t,d),t.head=null,t.tail=null,t.size=0;let r=null;for(let a=0;a<p;a++){let s=n[a],c=te[a],u=Cx(e,m,t.end,s,a,c,i,t,o,l);d.set(c,u),u.prevSibling=r,u.nextSibling=null,r?r.nextSibling=u:t.head=u,r=u}t.tail=r,t.size=p;return}}let re=dx,ie;re!==null&&re.length>=ee?(dx=null,ie=re):ie=new Int32Array(ee);try{for(let e=0;e<ee;e++)ie[e]=-1;let r=!1,u=0,f=0,p=_,g=0;for(;p!==C;){let e=p.nextSibling,o=ne.get(p.key);if(o===void 0)h&&=(zo(t),!1),Lo()?Io(p):j(p),d.delete(p.key),t.size--;else{ie[o]=g,o<u?r=!0:u=o,f++;let e=v+o,l=n[e];(!a||p.props!==l||p.body!==i||p.itemIndex!==e)&&px(p,l,e,i,a,s,c,t.env)}p=e,g++}if(!r&&f===ee){if(x!==f){let e=S;for(let n=0;n<ee;n++){let r=d.get(te[n]);r.prevSibling=e,e?e.nextSibling=r:t.head=r,e=r}e.nextSibling=C,C?C.prevSibling=e:t.tail=e}return}if(h&&zo(t),r&&f===ee){let e=0;for(let t=0;t<ee;t++)if(ie[t]!==t){if(e===cx){e=5;break}lx[e++]=t}if(e<=cx){let n=C?C.startMarker:t.end;for(let t=e-1;t>=0;t--){let e=lx[t];wx(d.get(te[e]),e+1<ee?d.get(te[e+1]).startMarker:n)}for(let n=0;n<e;n++){let e=lx[n],r=d.get(te[e]),i=e>0?d.get(te[e-1]):S,a=e+1<ee?d.get(te[e+1]):C;r.prevSibling=i,r.nextSibling=a,i?i.nextSibling=r:t.head=r,a?a.prevSibling=r:t.tail=r}let r=d.get(te[0]),i=d.get(te[ee-1]);r.prevSibling=S,i.nextSibling=C,S?S.nextSibling=r:t.head=r,C?C.prevSibling=i:t.tail=i;return}}let y=C?C.startMarker:t.end;if(f===ee){let e=Dx(ie,ee),n=e.length-1,r=C;for(let i=ee-1;i>=0;i--){let a=d.get(te[i]);n<0||i!==e[n]?wx(a,r?r.startMarker:y):n--,a.nextSibling=r,r?r.prevSibling=a:t.tail=a,r=a}r.prevSibling=S,S?S.nextSibling=r:t.head=r;return}if(r){let e=Dx(ie,ee),t=e.length-1,n=y;for(let r=ee-1;r>=0;r--){if(ie[r]===-1)continue;let i=d.get(te[r]);t<0||r!==e[t]?wx(i,n):t--,n=i.startMarker}}let b=S,re=0;for(let r=0;r<ee;r++){let a=te[r],s;if(ie[r]===-1){if(re<=r)for(re=r+1;re<ee&&ie[re]===-1;)re++;let c=re<ee?d.get(te[re]).startMarker:y,u=r+v;s=Cx(e,m,c,n[u],u,a,i,t,o,l),d.set(a,s),t.size++}else s=d.get(a);s.prevSibling=b,b?b.nextSibling=s:t.head=s,b=s}b.nextSibling=C,C?C.prevSibling=b:t.tail=b}finally{ie.length<=ux&&(dx===null||dx.length<ie.length)&&(dx=ie)}}var yx=512;function bx(e){let t=D,n=N(e.start).parentNode;if(t===null||t.aborted||Ra||t.hydrating===!0||e.adopt!==null||e.size<16||n===null||n.nodeType!==1&&n.nodeType!==11||N(e.end).parentNode!==n||N(e.start).previousSibling!==null||F(e.end)!==null)return!1;let r=e.head;for(let e=r;e!==null;e=e.nextSibling)if(!e.mounted||e.idState.renderOwner!==t.owner||e.startMarker===null||e.startMarker!==e.endMarker||e.hooks!==null||e.effectSlots!==null||e.cleanups!==null||e.children!==null||e._slots!==null||e.refFields!==null||e.deoptNode!==null||e.vt!==null)return!1;return!0}function xx(e,t=!1){if(!t&&!bx(e))return!1;let n=D,r=N(e.start).parentNode,i=e.head,a=n.retired??=new Set,o=[];for(let e=i;e!==null;e=e.nextSibling)a.has(e)||(a.add(e),o.push(e)),e.pending&&(O(e,`pending`,e.pending),e.pending=!1);let s=!1;Ua(()=>{s=!0;for(let e=0;e<o.length;e++)a.delete(o[e])});let c=e.start,l=e.end;return(n.commit??=[]).push(()=>{if(s)return;let t=e.size===0&&(M?.view(c)??c).parentNode===r&&(M?.view(l)??l).parentNode===r&&(M?.view(c)??c).previousSibling===null&&F(l)===null;if(t){let e=F(c);for(let n=i;n!==null;n=n.nextSibling){if(e!==n.startMarker){t=!1;break}e=F(e)}e!==l&&(t=!1)}for(let e=i;e!==null;e=e.nextSibling)e.disposed=!0;if(t)(M?.view(r)??r).textContent=``,(M?.view(r)??r).appendChild(c),(M?.view(r)??r).appendChild(l);else for(let e=i;e!==null;e=e.nextSibling){let t=e.startMarker;(M?.view(t)??t).parentNode!==null&&N((M?.view(t)??t).parentNode).removeChild(t)}}),!0}function Sx(e,t,n=!1){if(Ro(e)){if(xx(e,n)){t.clear();return}let r;for(let t=e.head;t!==null;t=r)r=t.nextSibling,Io(t);t.clear();return}let r=N(e.start).parentNode;if(N(e.start).previousSibling===null&&F(e.end)===null)(M?.view(r)??r).textContent=``,(M?.view(r)??r).appendChild(e.start),(M?.view(r)??r).appendChild(e.end);else if(t.size<yx)ax(F(e.start),e.end);else if(M!==null)M.clearBetween(e.start,e.end);else{let t=document.createRange();t.setStartAfter(e.start),t.setEndBefore(e.end),t.deleteContents()}for(let t=e.head;t!==null;t=t.nextSibling)t.cleanups!==null||t.children!==null||t._slots!==null?j(t,!1):(t.deoptNode!==null&&t.deoptRefs&&rx(t.deoptNode,null),t.disposed=!0);t.clear()}function Cx(e,t,n,r,i,a,o,s,c,l,u=null){let d=I();if(d!==null){if(l&&!d.isOpen(d.node)&&(c!==2||s.plainDeopt!==!0||__(r)&&!yv(r))){if(d.node!==null&&d.node!==s.end&&(c!==2||s.plainDeopt!==!0||d.node.nodeType===1&&N(d.node).parentNode===t)){let n=d.node,l=Qc(`control-flow`,e,t,n,n,o,r,s.env);return l.forSlot=s,l.key=a,l.itemIndex=i,c===2&&s.plainDeopt===!0&&(l.deoptNode=n),A(l),d.node=N(l.endMarker)?.nextSibling??F(n),l}return d.suspend(()=>Cx(e,t,n,r,i,a,o,s,c,l))}if(!d.isOpen(d.node))return d.suspend(()=>Cx(e,t,n,r,i,a,o,s,c,l));let u=d.node,f=d.close(u);d.node=F(u);let p=Qc(`control-flow`,e,t,u,f,o,r,s.env);return p.forSlot=s,p.key=a,p.itemIndex=i,A(p),d.node=F(f),p}if(c===!0||c===2&&__(r)&&!yv(r)){if(u!==null){let n=Qc(`control-flow`,e,t,u,u,o,r,s.env);return n.forSlot=s,n.key=a,n.itemIndex=i,n.deoptNode=u,to(n),A(n),n}let c=Qc(`control-flow`,e,t,null,n,o,r,s.env);c.forSlot=s,c.key=a,c.itemIndex=i,A(c);let l=(M?.view(n)??n).previousSibling;return c.startMarker=l,c.endMarker=l,c}let f=(M?.view(document)??document).createComment(`it`),p=(M?.view(document)??document).createComment(`/it`);u===null?((M?.view(t)??t).insertBefore(f,n),(M?.view(t)??t).insertBefore(p,n)):((M?.view(t)??t).insertBefore(f,u),(M?.view(t)??t).insertBefore(p,F(u)));let m=Qc(`control-flow`,e,t,f,p,o,r,s.env);m.forSlot=s,m.key=a,m.itemIndex=i,u!==null&&(m.deoptNode=u,to(m));try{A(m)}catch(e){throw ud(e)&&Dd(m),j(m,!D?.retainedCreated?.has(m)),e}return m}function wx(e,t){let n=N(e.startMarker).parentNode,r=e.endMarker,i=e.startMarker;if(Vs!==null){qs(n,Vs),Tx(n,i,r,t,Vs);return}for(;i;){let e=i===r,a=F(i);if((M?.view(n)??n).insertBefore(i,t),e)break;i=a}}function Tx(e,t,n,r,i){let a=t;for(;a!==null;){let t=a===n,o=F(a);if(Ex(e,a,r,i),t)break;a=o}}function Ex(e,t,n,r){let i=null;if(Array.isArray(r)){for(let e=0;e<r.length;e++)if(r[e].focused.ownerDocument===t.ownerDocument){i=r[e];break}}else r.focused.ownerDocument===t.ownerDocument&&(i=r);if(M===null){vn(e,t,n,i?.focused??null,i?.contentEditable??!1);return}let a=i?.focused??null,o=t===a;if(!o&&a!==null&&t.nodeType===1){let e=a;do{if(M.view(t).contains(e)){o=!0;break}e=M.view(e).getRootNode().host}while(e!==void 0)}if(!o){(M?.view(e)??e).insertBefore(t,n);return}let s=(M?.view(e)??e).moveBefore;if(!i.contentEditable&&typeof s==`function`){s.call(e,t,n);return}if(M.view(t).parentNode!==e||n!==null&&M.view(n).parentNode!==e){M.view(e).insertBefore(t,n);return}if(t!==n&&F(t)!==n){if(n===null||((M?.view(t)??t).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){let r=F(t);for(;r!==n;){let n=F(r);(M?.view(e)??e).insertBefore(r,t),r=n}}else{let r=F(t),i=n;for(;i!==t;){let t=F(i);(M?.view(e)??e).insertBefore(i,r),i=t}}}}function Dx(e,t){let n=fx;(n===null||n.length<t)&&(n=new Int32Array(t),t<=ux&&(fx=n));let r=[];for(let i=0;i<t;i++){let t=e[i];if(t===-1)continue;if(r.length===0||e[r[r.length-1]]<t){n[i]=r.length===0?-1:r[r.length-1],r.push(i);continue}let a=0,o=r.length-1;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}t<e[r[a]]&&(n[i]=a>0?r[a-1]:-1,r[a]=i)}let i=r.length,a=r[i-1];for(;i-->0;)r[i]=a,a=n[a];return r}var Ox=null;function kx(e,t){if(t===void 0)return;let{onCaughtError:n,onUncaughtError:r,onRecoverableError:i}=t;(n!==void 0||r!==void 0||i!==void 0)&&(Ox??=new WeakMap).set(e,{onCaughtError:n,onUncaughtError:r,onRecoverableError:i})}function Ax(e){if(Ox===null||e===null)return null;let t=e;for(;t.parentBlock!==null;)t=t.parentBlock;return Ox.get(t)??null}function jx(e,t){try{e(t)}catch(e){console.error(e)}}function Mx(e,t,n){let r=Ax(e)?.onCaughtError;if(!(r===void 0||n===null||n?.disposed)){if(n!==void 0){let e=ub(n);if(e!==null){let i=()=>{if(n.disposed)return;let e=ub(n);if(e!==null){ql(e,i);return}jx(r,t)};ql(e,i);return}}jx(r,t)}}function Nx(e){let t=lb(e,!0);if(t!==null)return t;for(let t=mb;t!==null;t=t.parent){let n=t.root;if(n!==e&&!Tc(n,e))continue;let r=n.__trySlot;if(r!==void 0&&r.tryBlock===n)return r;let i=n.__activitySlot;if(i!==void 0&&i.block===n)return i}if(!e.mounted)for(let t=e.parentBlock;t!==null;t=t.parentBlock){let e=t.__trySlot;if(e!==void 0&&e.tryBlock===t&&!e.propagateSuspense)return e}return null}function Px(e){if(Ox===null||e.branch!==0)return;let t=e.block;if(t===null)return;let n=Ax(t)?.onCaughtError;if(n===void 0)return;let r=e.err,i=null,a=!1,o=s=>{if(i=null,t.disposed||e.block!==t)return;let c=s??lb(t,!0);if(c!==null){a||(a=!0,(t.cleanups??=[]).push(()=>{let e=i;i=null,e!==null&&Yl(e.owner,e.entry)})),i={owner:c,entry:ql(c,o)};return}return{state:e,block:t,error:r,handler:n,resume:o}},s=Nx(t);s===null?nl(o):o(s)}function Fx(e){for(let t=0;t<e.length;t++){let n=e[t];if(!(n.block.disposed||n.state.block!==n.block)){if(lb(n.block,!0)!==null){n.resume();continue}jx(n.handler,n.error)}}}function Ix(e,t){let n=Ax(e)?.onUncaughtError;return n!==void 0&&(jx(n,t),!0)}var Lx=null;function Rx(e,t=null){if(Ox===null)return;let n=t??T,r=Ax(n)?.onRecoverableError;if(r===void 0)return;let i=n;for(;i.parentBlock!==null;)i=i.parentBlock;let a=Lx??=new WeakSet;a.has(i)||(a.add(i),queueMicrotask(()=>{a.delete(i),jx(r,e())}))}var zx=null,Bx=(e=>e===void 0?null:e);function Vx(e){if(typeof e!=`object`||!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(w(63))}function Hx(e){if(e.nodeType!==9){(M?.view(e)??e).textContent=``;return}for(let t=P(e);t!==null;){let n=F(t);t.nodeType!==10&&(M?.view(e)??e).removeChild(t),t=n}}function Ux(e){return null}function Wx(e,t){t!==null&&t===void 0&&zx.delete(e)}function Gx(e){if(!g_(e))return e}function Kx(e,t,n,r,i,a,o,s,c){let l,u=!1,d=-1,f=0,p=e=>{let n=!1;Gr.set(e,()=>{if(!(n||t!==e)){n=!0;try{l.unmount()}finally{n=!1}}})},m={current:t,signalOwner:s,retry:jh,request:null,generation:0,wakeable:null,retryKey:null,transaction:null,disposed:!1};i.renderOwner=m;let h=(o,s,d,f)=>{if(u)return;if(it(),t&&!t.disposed&&n===o&&Object.is(r,d)){let e=t;m.request=t=>{m.transaction.rootRequest=!0;let n=e.props;n!==s&&O(e,`props`,n),e.props=s,e.pendingMode=t,A(e)},Cs(t);return}if(f===void 0&&t!==null&&!t.disposed&&(oi>0||si>0)){m.request=e=>h(o,s,d,e),Cs(t);return}if(!ai&&T===null&&f===void 0&&oi===0&&si===0&&(Zo?.interrupt(),u))return;let g=Va(m);m.transaction.rootRequest=!0;let _=t,v=n,y=r,b=e.nodeType!==9&&_!==null&&_.mounted&&!_.disposed&&!Qa(m.transaction,_),x=b?P(e):null,S=b?(M?.view(e)??e).lastChild:null;Ua(()=>{t=_,n=v,r=y,m.current=_,_!==null&&p(_)});try{t&&(Gr.delete(t),b||j(t),t=null,n=null,r=null);let u=null,h=null;if(b?(u=(M?.view(document)??document).createComment(`root`),h=(M?.view(document)??document).createComment(`/root`),(M?.view(e)??e).append(u,h)):Hx(e),t=Qc(`root`,null,e,u,h,o,s,void 0,a),t.idState=i,m.current=t,eo(t),kx(t,c),p(t),n=o,r=d,f===void 0&&(oi>0||si>0)){t.pending=!0,t.pendingMode=`transition`,ti.push(t),!ii&&!ri&&(ri=!0,queueMicrotask(Ps));return}let g=t;g.pendingMode=f??null;try{A(g),ti.length>0&&Ds(g)}catch(e){try{Rb(g,e)}catch(e){let n=m.transaction;if(n!==null&&no(n),t!==null&&!t.disposed&&j(t),!Ix(g,e))throw e;return}m.wakeable===null&&l.unmount();return}b&&Ya(_,e,x,S),!ii&&!ri&&(ri=!0,queueMicrotask(Ps))}finally{Ha(g),!ai&&D===null&&io()}};return l={render(e,i){if(u)throw Error(w(29));if(!ai&&T===null&&!bs()&&oi===0&&si===0&&(Zo?.interrupt(),u))return;if(bs()||T!==null){if(d!==ys&&(d=ys,f=0),++f>vs){t!==null&&!t.disposed&&(t.nestedUpdateError=!0,Cs(t));return}}else ys++,d=ys,f=0;let a,o=null;g_(e)?(arguments.length,o=e.key??null,typeof e.type==`function`?(a=e.type,i=e.props):(a=Bx,i=e)):typeof e==`function`?a=e:(a=Bx,i=typeof e==`symbol`?null:e),m.transition!==void 0&&t!==null&&!t.disposed&&n===a&&Object.is(r,o)&&ci.keepsRoot(m,!0)||(m.transition!==void 0&&ci.discardRoot(m),m.generation++,m.wakeable=null),t!==null&&!t.disposed&&n===a&&Object.is(r,o)&&(ai?hc?.refreshPublishingOwner(m):Zo?.refreshPendingOwner(m)),m.nativeRetry?.clear(),m.retrySignalOwners!==void 0&&cr(m),m.retryKey=null,m.request=null,m.transaction?.aborted===!0&&(m.transaction=null),m.retry=()=>h(a,i,o),h(a,i,o)},unmount(){if(arguments.length,u)return;let a=null;if(m.bindingLeases!==void 0)for(let e of m.bindingLeases){let t=uf.get(e);t?.revision!==void 0&&nx(t.scope,a??=[])}if(a!==null&&m.generation++,!(!ai&&T===null&&!bs()&&Qr===0&&(Zo?.interrupt(),u))){if(!ai&&T===null&&!bs()&&Qr===0&&ys++,u=!0,m.disposed=!0,m.controlLeases!==void 0){for(let e of m.controlLeases.values())e!==void 0&&(e.owner=void 0);m.controlLeases.clear()}if(m.bindingLeases!==void 0){for(let e of m.bindingLeases){$e(e),uf.delete(e);try{m.preservePresentation||e.retire()}catch(e){Ix(t,e)||console.error(e)}}m.bindingLeases.clear()}m.nativeRetry?.clear(),m.retrySignalOwners!==void 0&&cr(m),m.retry=jh,m.transition!==void 0&&ci.discardRoot(m),m.generation++,m.wakeable=null,m.request=null,m.transaction!==null&&no(m.transaction);try{t&&(Gr.delete(t),ac(a,()=>j(t,!1)),oc(),m.preservePresentation||Hx(e),zc(),t=null,n=null,r=null)}finally{i.signalState?.opaqueKeys?.clear(),Yn?.clearDeferredRefs(m),m.current=null,m.retry=jh,m.adopt=void 0,m.initialDocumentSignals=void 0,m.retryKey=null,m.transaction=null,eh(e,!0),Wx(e,o)}}}},t!==null&&(p(t),m.adopt=e=>{t!==null&&Gr.delete(t),t=e,m.current=e,p(e)}),l}function qx(e,t,n){if(Vx(e),t?.bindingLeases!==void 0||t?.controlLeases!==void 0)throw Error(w(76));t=Gx(t);let r=Ux(e);$m(e,!0);let i=(t?.identifierPrefix??``)+`r`+(Fr++).toString(36)+`-`;return Kx(e,null,null,null,{prefix:i,next:0,signalState:{prefix:t?.signalInstancePrefix??i,next:0}},n,r,t?.signalOwner??(Ln?zn(e):void 0),t)}function Jx(e,t){return qx(e,t,dl)}function Yx(e={}){let t=new Map,n=e.slotlessPrefix===void 0?null:new Map,r=e.parentPrefix??``,i=e.tagPrefix??`:`,a=e.parentDescriptionFallback??``,o=e.includeParentDescription!==!1,s=e.global===!1?Symbol:Symbol.for,c=e.slotlessGlobal===!1||e.slotlessGlobal===void 0&&e.global===!1?Symbol:Symbol.for;return(l,u)=>{if(l===void 0){if(n===null)return;let t=n.get(u);return t===void 0&&(t=c(e.slotlessPrefix+u),n.set(u,t)),t}let d=t.get(l);d===void 0&&t.set(l,d=new Map);let f=d.get(u);if(f===void 0){let e=o?l.description??a:``;f=s(r+e+i+u),d.set(u,f)}return f}}var Xx=Yx(),Zx=Cu(null);function Qx(e,t){let n=null;e!=null&&(n=e[1]);function r(){return t??(n==null?null:n.getTheme())}return{getTheme:r}}function $x(){return Ml(eS,this,arguments)}function eS(){let e=qu(Zx);if(e==null)throw Error(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);return e}var tS=t({$addUpdateTag:()=>fM,$applyNodeReplacement:()=>SM,$assumeActiveEditor:()=>Pk,$caretFromPoint:()=>wA,$caretRangeFromSelection:()=>OA,$cloneWithProperties:()=>pN,$cloneWithPropertiesEphemeral:()=>mN,$comparePointCaretNext:()=>$P,$copyNode:()=>xM,$create:()=>XN,$createChildrenArray:()=>QN,$createLineBreakNode:()=>yA,$createNodeSelection:()=>$O,$createParagraphNode:()=>GA,$createPoint:()=>bO,$createRangeSelection:()=>QO,$createRangeSelectionFromDom:()=>ek,$createTabNode:()=>_O,$createTextNode:()=>pO,$exportNodeJSON:()=>rC,$extendCaretToRange:()=>YP,$findMatchingParent:()=>ZN,$flushSyncAfterUpdate:()=>Xk,$formatText:()=>MO,$fullReconcile:()=>Ik,$generateNodesFromRawText:()=>mk,$getAdjacentChildCaret:()=>WP,$getAdjacentNode:()=>oM,$getAdjacentSiblingOrParentSiblingCaret:()=>LA,$getCaretInDirection:()=>JP,$getCaretRange:()=>ZP,$getCaretRangeInDirection:()=>FA,$getCharacterOffsets:()=>PO,$getChildCaret:()=>HP,$getChildCaretAtIndex:()=>IA,$getChildCaretOrSelf:()=>UP,$getCollapsedCaretRange:()=>XP,$getCommonAncestor:()=>rF,$getCommonAncestorResultBranchOrder:()=>eF,$getDOMSlot:()=>aN,$getDOMTextNode:()=>lN,$getDocument:()=>PM,$getEditor:()=>rN,$getEditorDOMRenderConfig:()=>iN,$getNearestNodeFromDOMNode:()=>Nj,$getNearestRootOrShadowRoot:()=>vM,$getNodeByKey:()=>kj,$getNodeByKeyOrThrow:()=>wM,$getNodeFromDOMNode:()=>Aj,$getPreviousSelection:()=>rk,$getRoot:()=>Ij,$getSelection:()=>nk,$getSelectionSlotFrame:()=>sP,$getSiblingCaret:()=>RP,$getSlot:()=>uP,$getSlotFrame:()=>oP,$getSlotHost:()=>iP,$getSlotNameWithinHost:()=>aP,$getSlotNames:()=>lP,$getState:()=>cw,$getStateChange:()=>lw,$getTextContent:()=>hk,$getTextNodeOffset:()=>BP,$getTextPointCaret:()=>zP,$getTextPointCaretSlice:()=>VP,$getWritableNodeState:()=>mw,$hasAncestor:()=>mM,$hasUpdateTag:()=>dM,$insertNodeToNearestRootAtCaret:()=>VA,$insertNodes:()=>fk,$isBlockElementNode:()=>XO,$isBlockFullySelected:()=>HA,$isChildCaret:()=>PP,$isCompactExport:()=>nC,$isDecoratorNode:()=>cA,$isEditorState:()=>mA,$isElementDOMSlot:()=>cN,$isElementNode:()=>V,$isExtendableTextPointCaret:()=>PA,$isInlineElementOrDecoratorNode:()=>_M,$isInlineFormattable:()=>rO,$isLeafNode:()=>Sj,$isLexicalNode:()=>wD,$isLineBreakNode:()=>bA,$isNodeCaret:()=>MP,$isNodeSelection:()=>kO,$isParagraphNode:()=>KA,$isRangeSelection:()=>B,$isRootNode:()=>uA,$isRootOrShadowRoot:()=>bM,$isSelectionCapturedInDecoratorInput:()=>lj,$isShadowRootNode:()=>yM,$isSiblingCaret:()=>NP,$isSlotChild:()=>nP,$isSlotHost:()=>tP,$isTabNode:()=>vO,$isTextNode:()=>z,$isTextPointCaret:()=>jP,$isTextPointCaretSlice:()=>qP,$isTokenOrSegmented:()=>_j,$isTokenOrTab:()=>gj,$markSlotEditable:()=>bN,$needsBlockCursorBeside:()=>TM,$nodesOfType:()=>iM,$normalizeCaret:()=>NA,$normalizeSelection__EXPERIMENTAL:()=>ww,$onUpdate:()=>pM,$parseSerializedNode:()=>Hk,$removeFromParent:()=>wj,$removeSlot:()=>xP,$removeTextFromCaretRange:()=>MA,$rewindSiblingCaret:()=>kA,$selectAll:()=>eM,$setCompositionKey:()=>Dj,$setDirectionFromDOM:()=>gN,$setFormatFromDOM:()=>_N,$setPointFromCaret:()=>TA,$setSelection:()=>Rj,$setSelectionFromCaretRange:()=>EA,$setSlot:()=>bP,$setState:()=>uw,$setTextFormat:()=>jO,$splitAtPointCaretNext:()=>BA,$splitNode:()=>GM,$updateDOMSelection:()=>dk,$updateRangeSelectionFromCaretRange:()=>DA,$withCompactExport:()=>tC,ArtificialNode__DO_NOT_USE:()=>gA,BEFORE_INPUT_COMMAND:()=>kT,BLUR_COMMAND:()=>bE,CAN_REDO_COMMAND:()=>_E,CAN_UNDO_COMMAND:()=>vE,CAN_USE_BEFORE_INPUT:()=>fS,CAN_USE_DOM:()=>iS,CLEAR_EDITOR_COMMAND:()=>hE,CLEAR_HISTORY_COMMAND:()=>gE,CLICK_COMMAND:()=>OT,COLLABORATION_TAG:()=>kD,COMMAND_PRIORITY_BEFORE_CRITICAL:()=>-4,COMMAND_PRIORITY_BEFORE_EDITOR:()=>-8,COMMAND_PRIORITY_BEFORE_HIGH:()=>-5,COMMAND_PRIORITY_BEFORE_LOW:()=>-7,COMMAND_PRIORITY_BEFORE_NORMAL:()=>-6,COMMAND_PRIORITY_CRITICAL:()=>4,COMMAND_PRIORITY_EDITOR:()=>0,COMMAND_PRIORITY_HIGH:()=>3,COMMAND_PRIORITY_LOW:()=>1,COMMAND_PRIORITY_NORMAL:()=>2,COMPOSITION_END_COMMAND:()=>MT,COMPOSITION_END_TAG:()=>FD,COMPOSITION_START_COMMAND:()=>jT,COMPOSITION_START_TAG:()=>PD,CONTROLLED_TEXT_INSERTION_COMMAND:()=>IT,CONTROL_OR_ALT:()=>wE,CONTROL_OR_META:()=>CE,CONTROL_OR_OTHER_KEY:()=>LS,COPY_COMMAND:()=>fE,CUT_COMMAND:()=>pE,CUT_TAG:()=>`cut`,DEFAULT_EDITOR_DOM_CONFIG:()=>XA,DELETE_CHARACTER_COMMAND:()=>NT,DELETE_LINE_COMMAND:()=>BT,DELETE_WORD_COMMAND:()=>zT,DRAGEND_COMMAND:()=>dE,DRAGOVER_COMMAND:()=>uE,DRAGSTART_COMMAND:()=>lE,DROP_COMMAND:()=>sE,DecoratorNode:()=>sA,ElementNode:()=>aA,FOCUS_COMMAND:()=>yE,FORMAT_ELEMENT_COMMAND:()=>cE,FORMAT_TEXT_COMMAND:()=>VT,HISTORIC_TAG:()=>TD,HISTORY_MERGE_TAG:()=>DD,HISTORY_PUSH_TAG:()=>ED,INDENT_CONTENT_COMMAND:()=>aE,INPUT_COMMAND:()=>AT,INSERT_LINE_BREAK_COMMAND:()=>PT,INSERT_PARAGRAPH_COMMAND:()=>FT,INSERT_TAB_COMMAND:()=>iE,INTERNAL_$expandSelectionToWholeDocument:()=>IO,INTERNAL_$isBlock:()=>nN,IS_ALL_FORMATTING:()=>xS,IS_ANDROID:()=>hS,IS_ANDROID_CHROME:()=>vS,IS_APPLE:()=>lS,IS_APPLE_WEBKIT:()=>yS,IS_BOLD:()=>1,IS_CHROME:()=>_S,IS_CODE:()=>16,IS_FIREFOX:()=>uS,IS_HIGHLIGHT:()=>128,IS_IOS:()=>mS,IS_ITALIC:()=>2,IS_SAFARI:()=>gS,IS_STRIKETHROUGH:()=>4,IS_SUBSCRIPT:()=>32,IS_SUPERSCRIPT:()=>64,IS_UNDERLINE:()=>8,KEY_ARROW_DOWN_COMMAND:()=>ZT,KEY_ARROW_LEFT_COMMAND:()=>JT,KEY_ARROW_RIGHT_COMMAND:()=>KT,KEY_ARROW_UP_COMMAND:()=>XT,KEY_BACKSPACE_COMMAND:()=>eE,KEY_DELETE_COMMAND:()=>nE,KEY_DOWN_COMMAND:()=>GT,KEY_ENTER_COMMAND:()=>QT,KEY_ESCAPE_COMMAND:()=>tE,KEY_MODIFIER_COMMAND:()=>xE,KEY_SPACE_COMMAND:()=>$T,KEY_TAB_COMMAND:()=>rE,LineBreakNode:()=>_A,MOVE_TO_END:()=>qT,MOVE_TO_START:()=>YT,NODE_STATE_DIRECT:()=>iw,NODE_STATE_KEY:()=>`$`,NODE_STATE_LATEST:()=>aw,OUTDENT_CONTENT_COMMAND:()=>oE,PASTE_COMMAND:()=>LT,PASTE_TAG:()=>OD,ParagraphNode:()=>UA,REDO_COMMAND:()=>WT,REMOVE_TEXT_COMMAND:()=>RT,RootNode:()=>lA,SELECTION_CHANGE_COMMAND:()=>ET,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:()=>DT,SELECT_ALL_COMMAND:()=>mE,SET_TEXT_FORMAT_COMMAND:()=>HT,SKIP_COLLAB_TAG:()=>AD,SKIP_DOM_SELECTION_TAG:()=>MD,SKIP_SCROLL_INTO_VIEW_TAG:()=>jD,SKIP_SELECTION_FOCUS_TAG:()=>ND,TEXT_TYPE_TO_FORMAT:()=>AS,TabNode:()=>gO,TextNode:()=>iO,UNDO_COMMAND:()=>UT,addClassNamesToElement:()=>uF,aliasTableOf:()=>bC,aliasedValue:()=>XC,arrayValue:()=>$C,booleanValue:()=>UC,buildImportMap:()=>yD,compileKeyboardShortcuts:()=>OE,configExtension:()=>aF,createCommand:()=>R,createEditor:()=>ZA,createRefCountedRegistry:()=>kE,createSharedNodeState:()=>dw,createState:()=>sw,declarePeerDependency:()=>oF,declaredAccepts:()=>EC,defineExtension:()=>iF,enumValue:()=>WC,findAllLexicalElementsDeep:()=>MM,flipDirection:()=>DP,getActiveElement:()=>HM,getActiveElementDeep:()=>UM,getComposedEventTarget:()=>WM,getComposedSchemaFields:()=>PN,getComposedStaticRange:()=>FM,getDOMOwnerDocument:()=>uM,getDOMSelection:()=>DM,getDOMSelectionFromTarget:()=>OM,getDOMSelectionPoints:()=>LM,getDOMSelectionRange:()=>IM,getDOMSelectionRangeAndPoints:()=>RM,getDOMShadowRoots:()=>jM,getDOMTextNode:()=>bj,getDeclaredSlots:()=>gP,getEditorPropertyFromDOMNode:()=>mj,getNearestEditorFromDOMNode:()=>pj,getParentElement:()=>lM,getRegisteredNode:()=>sj,getRegisteredNodeOrThrow:()=>oj,getRegisteredSubtypeMap:()=>YN,getRootOwnerDocument:()=>NM,getStaticNodeConfig:()=>UN,getStyleObjectFromCSS:()=>KD,getTextDirection:()=>hj,getTransformSetFromKlass:()=>YA,getterTableOf:()=>vC,isBlockDomNode:()=>tN,isCurrentlyReadOnlyMode:()=>Ak,isDOMCapturingSelection:()=>xN,isDOMDocumentNode:()=>yj,isDOMNode:()=>XM,isDOMShadowRoot:()=>kM,isDOMTextNode:()=>vj,isDOMUnmanaged:()=>yN,isDocumentFragment:()=>ZM,isExactShortcutMatch:()=>Zj,isHTMLAnchorElement:()=>KM,isHTMLElement:()=>YM,isHTMLTableCellElement:()=>JM,isHTMLTableRowElement:()=>qM,isInlineDomNode:()=>$M,isLastChildInBlockNode:()=>SA,isLexicalEditor:()=>fj,isModifierMatch:()=>Xj,isOnlyChildInBlockNode:()=>xA,isSchemaField:()=>_C,isSelectionCapturedInDecoratorInput:()=>uj,isSelectionWithinEditor:()=>dj,iterStaticNodeConfigChain:()=>JN,keyboardEventMaskForPlatform:()=>Jj,makeStepwiseIterator:()=>QP,mergeRegister:()=>fF,mountSlotContainer:()=>oN,nodeSchema:()=>YC,normalizeClassNames:()=>lF,nullable:()=>GC,numberValue:()=>HC,objectValue:()=>ew,optional:()=>KC,rawValue:()=>QC,registerEventListener:()=>AE,registerEventListeners:()=>pF,removeClassNamesFromElement:()=>dF,removeFromParent:()=>Tj,resetRandomKey:()=>aj,safeCast:()=>sF,setDOMStyleFromCSS:()=>YD,setDOMStyleObject:()=>JD,setDOMUnmanaged:()=>vN,setNodeIndentFromDOM:()=>hN,setterDefaultOf:()=>xC,setterTableOf:()=>yC,shallowMergeConfig:()=>cF,stopLexicalPropagation:()=>mD,stringValue:()=>BC,toggleTextFormatType:()=>xj,tokenizeRawText:()=>pk,transformValue:()=>ZC,unionValue:()=>JC,unmountSlotContainer:()=>sN,withAccessors:()=>nw,withField:()=>tw});function L(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function nS(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function rS(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var iS=rS();function aS(){return iS&&`documentMode`in document?document.documentMode:null}var oS=aS();function sS(e){return iS&&e.test(navigator.platform)}function cS(e){return iS&&e.test(navigator.userAgent)}var lS=sS(/Mac|iPod|iPhone|iPad/),uS=cS(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function dS(){return!(!iS||!(`InputEvent`in window)||oS)&&`getTargetRanges`in new window.InputEvent(`input`)}var fS=dS();function pS(){return iS&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var mS=pS(),hS=cS(/Android/),gS=cS(/Version\\/[\\d.]+.*Safari/)&&!hS,_S=cS(/^(?=.*Chrome).*/i),vS=iS&&hS&&_S,yS=cS(/AppleWebKit\\/[\\d.]+/)&&lS&&!_S;function bS(){return 2047}var xS=bS(),SS=gS||mS||yS?`\\xA0`:``,CS=`\n\n`,wS=uS?`\\xA0`:SS,TS=`֑-߿יִ-﷽ﹰ-ﻼ`,ES=`A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--`;function DS(e,t){return RegExp(`^[^`+e+`]*[`+t+`]`)}var OS=DS(ES,TS),kS=DS(TS,ES),AS={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},jS={directionless:1,unmergeable:2},MS={center:2,end:6,justify:4,left:1,right:3,start:5};function NS(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var PS=NS(MS),FS={normal:0,segmented:2,token:1},IS=NS(FS),LS=Symbol.for(`@lexical/ctrlOrOtherKey`),RS=`$config`;function zS(){return rN()._blockCursorElement}function BS(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var VS=yS||mS||gS;function HS(){let e=PM().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function US(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var WS=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&L(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&L(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&L(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=GS(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=GS(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function GS(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var KS=class e extends WS{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;BS(t);)e=t,t=t.nextSibling;US(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===zS()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;BS(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===zS()&&(t=t.previousSibling);return US(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(HS(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(HS(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&BS(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&VS;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=PM().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),n.insertBefore(i,r),e){let e=PM().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=zS(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=qS(t,n);i.push(r);let a=qS(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function qS(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&L(225),n.reverse()}function JS(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`\"<unknown>+source\"`}var YS=JS(),XS=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},ZS=null;function QS(e,t=1e3){return e instanceof $S?e.clone():e.size<t?new Map(e):new $S().init(new Map(e),void 0,e.size)}var $S=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===ZS?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===ZS?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==ZS&&n!==void 0||(this._size++,n===ZS&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,ZS),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==ZS&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===ZS||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},eC=!1;function tC(e,t,...n){let r=eC,i;try{eC=e,i=t()}finally{eC=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||L(421),i}function nC(){return eC}function rC(e){let t=e.exportJSON(eC),n=e.constructor;return t.type!==n.getType()&&L(130,n.name),V(e)&&!Array.isArray(t.children)&&L(59,n.name),t}function iC(e,t,n,r,i,a){if(V(e)){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&((V(o)||tP(o)&&o.__slots!==null)&&iC(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of tP(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&nP(e)&&e.__slotHost===t&&((V(e)||tP(e)&&e.__slots!==null)&&iC(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var aC=!1,oC=0;function sC(e){oC=e.timeStamp}function cC(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Mj(e,n)!==void 0}function lC(e,t,n){let r=DM(gM(n)),i=r&&LM(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Kj(t,s,a,o,!1)}function uC(e,t,n){if(B(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return vj(t)&&n.isAttached()}function dC(e,t,n){for(let r=e;r&&!yN(r);r=lM(r)){let e=Mj(r,t);if(e!==void 0){let t=kj(e,n);if(t)return cA(t)||!YM(r)?void 0:[r,t]}}}function fC(e,t,n){aC=!0;let r=performance.now()-oC>100;try{Qk(e,()=>{let i=nk()||function(e){return e.read(`latest`,()=>{let e=nk();return e===null?null:e.clone()})}(e),a=new Map,o=e._editorState,s=e._blockCursorElement,c=!1,l=``;for(let n=0;n<t.length;n++){let u=t[n],d=u.type,f=u.target,p=dC(f,e,o);if(!p)continue;let[m,h]=p;if(d===`characterData`)r&&z(h)&&vj(f)&&uC(i,f,h)&&lC(f,h,e);else if(d===`childList`){c=!0;let t=u.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Aj(r),a=r.parentNode;if(!(a==null||r===s||i!==null||cC(r,a,e)||US(r)||e._slotsUsed&&YM(r)&&r.hasAttribute(`data-lexical-slot`)||yN(r))){if(uS){let e=(YM(r)?r.innerText:null)||r.nodeValue;e&&(l+=e)}a.removeChild(r)}}let n=u.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];cC(r,f,e)||s===r?(f.appendChild(r),t++):US(r)&&t++}r!==t&&a.set(m,h)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let u=n.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let n=u[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||cC(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(c&&Rj(i),uS&&sM(e)&&i.insertRawText(l))})}finally{aC=!1}}function pC(e){let t=e._observer;t!==null&&fC(e,t.takeRecords(),t)}function mC(e){(function(e){oC===0&&gM(e).addEventListener(`textInput`,sC,!0)})(e),e._observer=new MutationObserver((t,n)=>{fC(e,t,n)})}function hC(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function gC(e,t){return hC(e,t,e.defaultValue)}function _C(e){return typeof e==`object`&&!!e}function vC(e,t){let n=CC(e,t).getter;return _C(n)&&n.getterTable!==void 0||L(405,t),SC(n.getterTable)}function yC(e,t){let n=CC(e,t).setter;return _C(n)&&n.setterTable!==void 0||L(406,t),SC(n.setterTable)}function bC(e,t,n){let{meta:r}=CC(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return SC(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:L(407,t,String(n))}function xC(e,t){let n=CC(e,t),{setter:r}=n;_C(r)&&r.setterTable!==void 0||L(408,t);let i=String(n.defaultValue);return LC(r.setterTable,i)||L(409,t,i),r.setterTable[i]}function SC(e){return Object.assign(Object.create(null),e)}function CC(e,t){let n=e.get(t);return n===void 0&&L(410,t),n}function wC(e,t,n,r,i){i!==void 0&&TC.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&kC(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var TC=new WeakSet;function EC(e){let{accepts:t}=e;return t===void 0||TC.has(t)?void 0:t}var DC=new WeakSet;function OC(e){return typeof e==`object`&&e&&DC.add(e),e}function kC(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!DC.has(e)){Object.freeze(e);for(let t of Object.values(e))kC(t)}}function AC(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function jC(e,t){return n=>t(n)||MC(e,n)}function MC(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return MC(e,t)?{parsed:e(t)}:void 0;let r=e(t);return gC(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}var NC=new WeakMap;function PC(e){let t=NC.get(e);if(t!==void 0)return t;let n=function(e){let t=e.meta;if(t==null||EC(e)!==void 0)return!1;switch(t.kind){case`raw`:return!0;case`union`:return t.members!=null&&t.members.length>0&&t.members.every(e=>PC(e));case`nullable`:case`optional`:case`transform`:case`aliased`:return t.inner!=null&&PC(t.inner);default:return!1}}(e);return NC.set(e,n),n}function FC(e,t){let n=e.meta;if(n==null)return MC(e,t)?1:4;let r=EC(e),i=r!==void 0;if(i&&!r.call(e,t))return 4;let a=function(e,t,n,r){switch(t.kind){case`raw`:return r?1:2;case`array`:{if(!Array.isArray(n))return 4;if(t.item==null)return 1;let e=1;for(let r=0;r<n.length;r++)if(n[r]!==void 0){let i=FC(t.item,n[r]);i>e&&(e=i)}return e>=3?3:e}case`object`:{let e=t.fields;if(!RC(n))return 4;if(e==null)return 1;if(!r&&zC(n,e))return 4;let i=1;for(let t of Object.keys(n))if(LC(e,t)){let r=FC(e[t],n[t]);r>i&&(i=r)}return i>=3?3:i}case`union`:return t.members==null?1:IC(t.members,n).fit;case`aliased`:case`nullable`:case`optional`:case`transform`:return(t.kind===`aliased`?typeof n==`string`&&t.aliases!=null&&LC(t.aliases,n):t.kind===`nullable`?n==null:t.kind===`optional`&&n===void 0)||t.inner==null?1:FC(t.inner,n);default:return r||MC(e,n)?1:4}}(e,n,t,i);return i&&a===4?3:a}function IC(e,t){let n,r=4,i=4;for(let a=0;a<e.length;a++){let o=e[a],s=FC(o,t),c=s<3&&PC(o)?3:s;if(c<r&&(n=o,r=c,i=s,c===1))break}return{fit:i,member:n}}function LC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function RC(e){if(!function(e){return function(e){return typeof e==`object`&&!!e}(e)&&!Array.isArray(e)}(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function zC(e,t){for(let n of Object.keys(e))if(!LC(t,n))return!0;return!1}function BC(e=``){return wC(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var VC=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function HC(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&VC.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return wC(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function UC(e=!1){return wC(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function WC(e,...t){let n=OC(t.length===0?e[0]:t[0]),r=new Set(e);return wC(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function GC(e,t={}){let{defaultAsNull:n}=t;return wC(t=>{if(t==null)return null;let r=e(t);return n&&gC(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,AC(e),jC(e,e=>e==null))}function KC(e,t={}){let{omitDefault:n}=t;return wC(t=>{if(t===void 0)return;let r=e(t);return n&&gC(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,AC(e),jC(e,e=>e===void 0))}function qC(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!qC(e[n],t[n]))return!1;return!0}if(!RC(e)||!RC(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>LC(t,n)&&qC(e[n],t[n]))}function JC(e,...t){let n=t.length===0?e[0].defaultValue:OC(t[0]),r=t=>{let n=function(e,t){return IC(e,t).member}(e,t);return n===void 0?void 0:{member:n,parsed:n(t)}};return wC(e=>{if(e===void 0)return n;let t=r(e);return t===void 0?n:t.parsed},{kind:`union`,members:e},n,qC,t=>(t!==void 0||n===void 0)&&e.some(e=>MC(e,t)))}function YC(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function XC(e,t){let n=e=>typeof e==`string`&&LC(t,e);return wC(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||MC(e,t))}function ZC(e,t,n={}){return wC(n=>t(e(n)),{inner:e,kind:`transform`},OC(t(e.defaultValue)),n.isEqual,t=>MC(e,t))}function QC(){return wC(e=>e===void 0?void 0:e,{kind:`raw`},void 0,void 0,()=>!0)}function $C(e){return wC(t=>{if(!Array.isArray(t))return[];let n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n},{item:e,kind:`array`},void 0,(t,n)=>{if(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!hC(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function ew(e){return function(e,t){let n=Object.entries(t);return wC(e=>{let t=typeof e==`object`&&e?e:{},r={};for(let e=0;e<n.length;e++){let[i,a]=n[e];r[i]=a(t[i])}return r},{fields:t,kind:`object`},void 0,(e,r)=>RC(e)&&RC(r)&&!zC(e,t)&&!zC(r,t)&&n.every(([t,n])=>hC(n,e[t],r[t])),e=>RC(e)&&!zC(e,t))}(0,e)}function tw(e,t){return rw(`withField`,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}})}function nw(e,t){return rw(`withAccessors`,e,t)}function rw(e,t,n){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var iw=`direct`,aw=`latest`,ow=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;schema;constructor(e,t){this.key=e;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||_w).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>hC(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function sw(e,t){return new ow(e,t)}function cw(e,t,n=aw){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function lw(e,t,n){let r=cw(e,n,iw),i=cw(t,n,iw);return n.isEqual(r,i)?null:[r,i]}function uw(e,t,n){let r;if(jk(),typeof n==`function`){let i=e.getLatest(),a=cw(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return mw(i).updateFromKnown(t,r),i}function dw(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of JN(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var fw=new Set([`__proto__`,`constructor`,`prototype`]),pw=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return gw(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(fw.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=gw(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(fw.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function mw(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new pw(t,function(e){return e.__state?e.__state.sharedNodeState:oj(rN(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function hw(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&mw(e).updateFromJSON(r),n}function gw(e){if(e)for(let t in e)return e}function _w(e){return e}function vw(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function yw(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function bw(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function xw(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&vw(n,e,t)||t&&vw(n,t,e)||e&&yw(n,e,t)||t&&yw(n,t,e))}(c,l))}function Sw(e,t){let n=e.mergeWithSibling(t),r=Fk()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Cw(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(xw(t,r)){r=Sw(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(xw(r,n)){r=Sw(r,n);break}break}n.remove()}}else r.remove()}function ww(e){return Tw(e.anchor),Tw(e.focus),e}function Tw(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),z(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!V(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Ew=Symbol.for(`@lexical/CachedTextSize`);function Dw(e,t){return Ww.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Uw.get(r);if(i===void 0&&L(345,r),V(i)){let a=Gw.get(r);if(a!==void 0&&V(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Kw.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&L(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[Ew];e===void 0&&L(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:jw})}function Ow(e){V(e)||e[Ew]===void 0&&(e[Ew]=z(e)?e.__text.length:e.getTextContentSize())}var kw=4,Aw,jw,Mw,Nw=``,Pw=null,Fw=null,Iw=null;function Lw(){return{firstTextKey:Iw,format:Pw,style:Fw}}function Rw(e){e.firstTextKey!==null&&(Pw=e.format,Fw=e.style,Iw=e.firstTextKey)}function zw(e){if(Iw!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&L(348),t===null)return;let n=Gw.get(t);z(n)&&(Pw=n.getFormat(),Fw=n.getStyle(),Iw=t)}var Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw=!1,Zw=!1;function Qw(e,t){let n=Uw.get(e),r=Gw.has(e);if(t!==null){let n=wT(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(jw._keyToDOMMap.delete(e),V(n)){let e=QN(n,Uw);$w(e,0,e.length-1,null)}if(n!==void 0){for(let e of cT(n).values()){let t=uT(e);Qw(e,null),t!==null&&t.remove()}rM(Jw,Mw,Bw,n,`destroyed`)}}}function $w(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Qw(t,r)}}function eT(e,t){e.setProperty(`text-align`,t)}var tT=`40px`;function nT(e,t){let n=Aw.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${tT}))`),tM(e,`class`),tM(e,`style`)}function rT(e,t){let n=e.style;t===0?eT(n,``):t===1?eT(n,`left`):t===2?eT(n,`center`):t===3?eT(n,`right`):t===4?eT(n,`justify`):t===5?eT(n,`start`):t===6&&eT(n,`end`),tM(e,`style`)}function iT(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(uA(e))return null;let n=e.getParent();return n===null||bM(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function aT(e){let t=PM().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function oT(e,t,n){t||e.contentEditable===`false`?bN(n,jw):n.removeAttribute(`contenteditable`)}function sT(e,t,n){let r=Nw,i=Lw();Nw=``;let a=``,o=cA(e);for(let[r,i]of n){let n=aT(r);oT(t,o,n),t.appendChild(n),Nw=``;let s=Lw();fT(i,aN(e,n,jw)),Rw(s),lT(e,r,t,n),a+=Nw}return Rw(i),Nw=r,a}function cT(e){return tP(e)&&e.__slots!==null?e.__slots:eP}function lT(e,t,n,r){let i=Yw.$getSlotTargetElement(e,t,n,jw);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function uT(e){let t=Kw.get(e);return t===void 0?null:t.parentElement}function dT(e,t,n){let r=cT(e),i=cT(t);for(let[e,t]of r)if(!i.has(e)){let e=uT(t);Qw(t,null),e!==null&&e.remove()}let a=Nw,o=Lw(),s=``,c=null,l=cA(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:uT(i);Nw=``;let u=Lw();if(o===null){o=aT(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),fT(a,aN(t,o,jw))}else i===a?yT(a,o):(i!==void 0&&Qw(i,o),fT(a,aN(t,o,jw)));if(Rw(u),oT(n,l,o),lT(t,e,n,o),s+=Nw,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Rw(o),Nw=a,s}function fT(e,t){let n=Gw.get(e);if(n===void 0&&L(60),t!==null){let r=Uw.get(e);if(r!==void 0){let i=Kw.get(e);if(i!==void 0){let a=nP(r)?r.__slotHost:null,o=nP(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),yT(e,t.element)}}}let r=Yw.$createDOM(n,jw);if(function(e,t,n){let r=n._keyToDOMMap;jj(t,n,e),r.set(e,t)}(e,r,jw),z(n)?r.setAttribute(`data-lexical-text`,`true`):cA(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),vN(r,{captureSelection:!0})),V(n)){let e=n.__indent,t=n.__size;iT(r,n),e!==0&&nT(r,e);let i=cT(n),a=i.size>0?sT(n,r,i):``;if(t===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Nw+=a,i.size>0&&(r.__lexicalSlotTextLength=a.length);else{let e=Nw,o=t-1;if(pT(QN(n,Gw),n,0,o,aN(n,r,jw)),a!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=a+t,Nw=e+a+t}i.size>0&&(r.__lexicalSlotTextLength=a.length)}let o=n.__format;o!==0&&rT(r,o),n.isInline()||(gT(null,n,r),hT(n,r))}else{let t=n.getTextContent();if(cA(n)){let t=n.decorate(jw,Aw);t!==null&&bT(e,t),r.contentEditable=`false`;let i=cT(n);i.size>0&&sT(n,r,i)}Nw+=t}return t!==null&&t.insertChild(r),Yw.$decorateDOM(n,null,r,jw),Ow(n),rM(Jw,Mw,Bw,n,`created`),r}function pT(e,t,n,r,i){let a=Nw,o=Lw();Nw=``,Pw=null,Fw=null,Iw=null;let s=n;for(;s<=r;++s){let t=Lw();fT(e[s],i);let n=Gw.get(e[s]);n!==null&&z(n)?Pw===null&&(Pw=n.getFormat(),Fw=n.getStyle(),Iw=n.__key):V(n)&&s<r&&!n.isInline()&&(Nw+=CS),Rw(t)}let c=jw._keyToDOMMap.get(t.__key);c===void 0&&L(349,t.__key),c.__lexicalTextContent=Nw,c.__lexicalFirstTextKey=Iw,Nw=a+Nw,Rw(o)}function mT(e,t){if(!e)return!1;let n=t.get(e);return cA(n)&&!n.isInline()}function hT(e,t){let n=aN(e,t,jw);n.setDecoratorBoundaryAnchor(`leading`,mT(e.__first,Gw)),n.setDecoratorBoundaryAnchor(`trailing`,mT(e.__last,Gw))}function gT(e,t,n){let r=aN(t,n,jw),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return bA(e)?`line-break`:cA(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,Gw);r.setManagedLineBreak(i)}function _T(e,t,n){var r;Pw=null,Fw=null,Iw=null,function(e,t,n){let r=Nw,i=e.__size,a=t.__size;Nw=``;let o=n.element,s=jw._keyToDOMMap.get(t.__key);s===void 0&&L(351,t.__key);let c=a-i;if(!Xw&&Math.abs(c)<=1&&i>=kw&&e.__first===t.__first&&(c!==0||!jw._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=qw.get(e.__key);if(!Xw&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Gw.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Dw(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Gw.get(n);if(e===void 0)break;let t=Lw();yT(n,o),z(e)&&Pw===null&&(Pw=e.getFormat(),Fw=e.getStyle(),Iw=e.__key),Rw(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Gw.get(n);if(e===void 0)break;let t;if(V(e)){let r=jw._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&V(e)&&!e.isInline()&&(d+=CS),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,Nw=r+m,vT(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Uw.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Gw.get(a),d=Uw.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Gw.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Uw.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Dw(l,c);for(let e of _){let t=Lw();if(e.kind===`reconcile`)yT(e.key,n.element);else if(e.kind===`destroy`)Qw(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=jw._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}fT(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Gw.get(e.key);t&&z(t)&&Pw===null&&(Pw=t.getFormat(),Fw=t.getStyle(),Iw=t.__key)}Rw(t)}let x=``;for(let e=0;e<o;e++){let t=Gw.get(f[e]);if(t===void 0)return!1;let n;if(V(t)){let r=jw._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&V(t)&&!t.isInline()&&(x+=CS)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&L(353),Nw=r+e,vT(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Gw.get(t);if(e===void 0)break;let r=Xw||Hw.has(t)||Vw.has(t),i=Lw();if(r)yT(t,o);else{let n,r;if(V(e)){r=Kw.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(354,e.getType()),n=i}else n=e.getTextContent();Nw+=n,r!==void 0&&zw(r)}z(e)?Pw===null&&(Pw=e.getFormat(),Fw=e.getStyle(),Iw=e.__key):V(e)&&n<a-1&&!e.isInline()&&(Nw+=CS),Rw(i),t=e.__next,n++}s.__lexicalTextContent=Nw,s.__lexicalFirstTextKey=Iw,Nw=r+Nw;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)yT(r,o);else{let e=wT(r),t=fT(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}Qw(r,null)}let a=Gw.get(i);z(a)&&Pw===null&&(Pw=a.getFormat(),Fw=a.getStyle(),Iw=a.__key)}else{let r=QN(e,Uw),s=QN(t,Gw);if(r.length!==i&&L(227),s.length!==a&&L(228),i===0)a!==0&&pT(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&cT(t).size===0&&n.element.__lexicalLineBreak==null;$w(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Lw();if(e===r)u=xT(yT(r,a.element)),d++,f++;else{if(l===void 0&&(l=ST(n,f)),c===void 0)c=ST(t,d);else if(!c.has(e)){d++,Rw(i);continue}if(!l.has(e)){u=xT(wT(e)),Qw(e,a.element),d++,c.delete(e),Rw(i);continue}if(c.has(r)){let e=cM(jw,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=xT(yT(r,a.element)),d++,f++}else fT(r,a.withBefore(u??a.before)),f++}let o=Gw.get(r);o!==null&&z(o)?Pw===null&&(Pw=o.getFormat(),Fw=o.getStyle(),Iw=o.__key):V(o)&&f<=s&&!o.isInline()&&(Nw+=CS),Rw(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:jw.getElementByKey(t);pT(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&$w(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=Nw,s.__lexicalFirstTextKey=Iw,Nw=r+Nw}(e,t,aN(t,n,jw)),bM(t)||(r=t,Pw==null||Pw===r.__textFormat||Zw||r.setTextFormat(Pw),function(e){Fw==null||Fw===e.__textStyle||Zw||e.setTextStyle(Fw)}(t))}function vT(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Gw.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Gw.get(r);if(z(e))return Pw=e.getFormat(),void(Fw=e.getStyle())}}t.__lexicalFirstTextKey=Iw}function yT(e,t){let n=Uw.get(e),r=Gw.get(e);n!==void 0&&r!==void 0||L(61);let i=Xw||Hw.has(e)||Vw.has(e),a=cM(jw,e);if(n===r&&!i){let e;if(V(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&L(355,n.getType()),e=t,zw(a)}else e=n.getTextContent();return Nw+=e,a}if(n!==r&&i&&rM(Jw,Mw,Bw,r,`updated`),Yw.$updateDOM(r,n,a,jw)){let n=fT(e,null);return t===null&&L(62),t.replaceChild(n,a),Qw(e,null),n}if(V(n)){V(r)||L(334,e);let t=r.__indent;(Xw||t!==n.__indent)&&nT(a,t);let o=r.__format;(Xw||o!==n.__format)&&rT(a,o);let s=i&&(cT(r).size>0||cT(n).size>0)?dT(n,r,a):``;if(i){let e=Nw;if(_T(n,r,a),r.isInline()||(uA(r)||gT(0,r,a),hT(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,Nw=e+s+t,a.__lexicalSlotTextLength=s.length}else(cT(r).size>0||cT(n).size>0)&&(a.__lexicalSlotTextLength=0)}else{let e=a.__lexicalTextContent;typeof e!=`string`&&L(356,n.getType()),Nw+=e,zw(a)}if((Xw||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(iT(a,r),uA(r)&&!Xw))for(let e of r.getChildren())V(e)&&iT(cM(jw,e.getKey()),e)}else{let t=r.getTextContent();if(cA(r)){let t=r.decorate(jw,Aw);t!==null&&bT(e,t),i&&(cT(r).size>0||cT(n).size>0)&&dT(n,r,a)}Nw+=t}if(!Zw&&uA(r)){let e=r.getLatest();if(e.__cachedText!==Nw){let t=e.getWritable();t.__cachedText=Nw,r=t}}return Yw.$decorateDOM(r,n,a,jw),Ow(r),a}function bT(e,t){let n=jw._pendingDecorators,r=jw._decorators;if(n===null){if(r[e]===t)return;n=Pj(jw)}n[e]=t}function xT(e){let t=e.nextSibling;return t!==null&&t===jw._blockCursorElement&&(t=t.nextSibling),t}function ST(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function CT(e,t,n,r,i,a){Nw=``,Pw=null,Fw=null,Iw=null,Xw=r===2,jw=n,Aw=n._config,Yw=n._config.dom||XA,Mw=n._nodes,Bw=jw._listeners.mutation,Vw=i,Hw=a,Uw=e._nodeMap,Ww=e,Gw=t._nodeMap,Zw=t._readOnly,Kw=QS(n._keyToDOMMap),qw=function(){let e=new Map,t=t=>{for(let n of t){let t=Gw.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Vw.keys()),t(Hw),e}();let o=new Map;return Jw=o,yT(`root`,null),jw=void 0,Mw=void 0,Vw=void 0,Hw=void 0,Uw=void 0,Ww=void 0,Gw=void 0,Aw=void 0,Kw=void 0,qw=void 0,Jw=void 0,Yw=XA,o}function wT(e){let t=Kw.get(e);return t===void 0&&L(75,e),t}function TT(e){return()=>{}}function R(e){return{type:e}}var ET=R(`SELECTION_CHANGE_COMMAND`),DT=R(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),OT=R(`CLICK_COMMAND`),kT=R(`BEFORE_INPUT_COMMAND`),AT=R(`INPUT_COMMAND`),jT=R(`COMPOSITION_START_COMMAND`),MT=R(`COMPOSITION_END_COMMAND`),NT=R(`DELETE_CHARACTER_COMMAND`),PT=R(`INSERT_LINE_BREAK_COMMAND`),FT=R(`INSERT_PARAGRAPH_COMMAND`),IT=R(`CONTROLLED_TEXT_INSERTION_COMMAND`),LT=R(`PASTE_COMMAND`),RT=R(`REMOVE_TEXT_COMMAND`),zT=R(`DELETE_WORD_COMMAND`),BT=R(`DELETE_LINE_COMMAND`),VT=R(`FORMAT_TEXT_COMMAND`),HT=R(`SET_TEXT_FORMAT_COMMAND`),UT=R(`UNDO_COMMAND`),WT=R(`REDO_COMMAND`),GT=R(`KEYDOWN_COMMAND`),KT=R(`KEY_ARROW_RIGHT_COMMAND`),qT=R(`MOVE_TO_END`),JT=R(`KEY_ARROW_LEFT_COMMAND`),YT=R(`MOVE_TO_START`),XT=R(`KEY_ARROW_UP_COMMAND`),ZT=R(`KEY_ARROW_DOWN_COMMAND`),QT=R(`KEY_ENTER_COMMAND`),$T=R(`KEY_SPACE_COMMAND`),eE=R(`KEY_BACKSPACE_COMMAND`),tE=R(`KEY_ESCAPE_COMMAND`),nE=R(`KEY_DELETE_COMMAND`),rE=R(`KEY_TAB_COMMAND`),iE=R(`INSERT_TAB_COMMAND`),aE=R(`INDENT_CONTENT_COMMAND`),oE=R(`OUTDENT_CONTENT_COMMAND`),sE=R(`DROP_COMMAND`),cE=R(`FORMAT_ELEMENT_COMMAND`),lE=R(`DRAGSTART_COMMAND`),uE=R(`DRAGOVER_COMMAND`),dE=R(`DRAGEND_COMMAND`),fE=R(`COPY_COMMAND`),pE=R(`CUT_COMMAND`),mE=R(`SELECT_ALL_COMMAND`),hE=R(`CLEAR_EDITOR_COMMAND`),gE=R(`CLEAR_HISTORY_COMMAND`),_E=R(`CAN_REDO_COMMAND`),vE=R(`CAN_UNDO_COMMAND`),yE=R(`FOCUS_COMMAND`),bE=R(`BLUR_COMMAND`),xE=R(`KEY_MODIFIER_COMMAND`);function SE(e,t){return{...t,[LS]:e}}var CE=SE(`metaKey`,{ctrlKey:!lS,metaKey:lS}),wE=SE(`altKey`,{altKey:lS,ctrlKey:!lS}),TE=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function EE(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var DE=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||L(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of TE){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))EE(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?EE(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&EE(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of TE)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function OE(e){let t=new DE;for(let n of e)t.add(n);return t}function kE(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function AE(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}var jE=Object.freeze({}),ME;function NE(){if(ME!==void 0)return ME;let e=[[`keydown`,iD],[`pointerdown`,UE],[`compositionstart`,QE],[`compositionend`,rD],[`input`,XE],[`click`,HE],[`cut`,jE],[`copy`,jE],[`dragstart`,jE],[`dragover`,jE],[`dragend`,jE],[`paste`,jE],[`focus`,jE],[`blur`,jE],[`drop`,jE]];return fS&&e.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||uS&&sM(t)||n!==`insertCompositionText`&&Qk(t,()=>{JE(e,t)||H(t,kT,e)},{event:e})}(e,t)]),ME=e,e}var PE=new WeakMap,FE=new WeakMap,IE=kE(e=>(e.addEventListener(`selectionchange`,pD),()=>e.removeEventListener(`selectionchange`,pD)));function LE(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=Fk(),u;if(a!==void 0)u=a;else{let e=DM(gM(l));u=e===null?null:LM(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!z(c)||(!i&&(!fS||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Vj(n))&&o.offset!==s.offset&&!c.isComposing()||_j(c)||c.isDirty()&&m>1||(i||!fS)&&p!==null&&!c.isComposing()&&d!==lN(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=gj(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(z(t)||V(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function RE(e,t){return vj(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function zE(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=LM(e,t._rootElement),s=t._inputState,c=s.isSelectionChangeFromDOMUpdate;if(c){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,RE(r,i)&&RE(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}Qk(t,()=>{if(!n)return void Rj(null);if(!dj(t,r,a))return;let l=nk();if(s.postDeleteSelectionToRestore&&B(l)&&l.isCollapsed()){let e=l.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),Rj(l))}if(s.postDeleteSelectionToRestore=null,B(l)){let n=l.anchor,c=n.getNode();if(l.isCollapsed()){e.type===`Range`&&r===a&&(l.dirty=!0);let i=gM(t).event,o=i?i.timeStamp:performance.now(),{format:u,style:d,offset:f,key:p,timeStamp:m}=s.collapsedSelectionFormat,h=Ij(),g=!1===t.isComposing()&&h.getTextContent()===``;if(o<m+200&&n.offset===f&&n.key===p)BE(l,u,d);else if(n.type===`text`)z(c)||L(141),VE(l,c);else if(n.type===`element`&&!g){V(c)||L(259);let e=n.getNode();e.isEmpty()?function(e,t){BE(e,t.getTextFormat(),t.getTextStyle())}(l,e):BE(l,l.format,``)}}else{let e=n.key,t=l.focus.key,r=l.getNodes(),a=r.length,s=l.isBackward(),c=s?o:i,u=s?i:o,d=s?t:e,f=s?e:t,p=xS,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(z(t)&&n!==0&&!(e===0&&t.__key===d&&c===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}l.format=m?p:0}}let u=rk();(c||(l===null?u!==null:l.dirty||!B(l)||!l.is(u)))&&H(t,ET)})}function BE(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function VE(e,t){BE(e,t.getFormat(),t.getStyle())}function HE(e,t){Qk(t,()=>{let n=nk(),r=DM(gM(t)),i=rk();if(r){if(B(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!uA(t)&&Ij().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=LM(r,t._rootElement).anchorNode;(YM(n)||vj(n))&&Rj(tk(i,r,t,e))}}if(uS&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(YM(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=tk(i,r,t,e);s===null?r.removeAllRanges():Rj(s)}}H(t,OT,e)})}function UE(e,t){let n=WM(e),r=e.pointerType;XM(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Qk(t,()=>{xN(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}function WE(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function GE(e){let{lastKeyCode:t}=Fk()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`\n`:t===`Tab`?`\t`:null;if(!n)return;let r=nk();if(!B(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!z(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`\n`){if(mS)return;if(bA(e))e.selectEnd();else if(!e){let e=ZN(i,XO),t=e&&e.getNextSibling();V(t)&&t.selectStart()}}else n===`\t`?vO(e)&&e.selectEnd():z(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else i.getTextContent()[a]===n&&i.select(a+1,a+1)}function KE(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function qE(e){KE(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>KE(e),0)}function JE(e,t){let n=WM(e);if(YM(n)&&xN(n,t))return!0;let r=t.getRootElement();if(r===null)return!1;let i=UM(r.ownerDocument);return i!==null&&r.contains(i)&&xN(i,t)}function YE(e){let t=e.inputType,n=WE(e),r=Fk(),i=r._inputState,a=nk();if(t===`insertText`&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(KE(i),e.preventDefault(),B(a)&&!a.isCollapsed()){let e=a.isBackward()?a.anchor:a.focus;a.anchor.set(e.key,e.offset,e.type),a.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(a===null){let e=rk();if(!B(e))return!0;Rj(e.clone())}if(B(a)){let t=a.anchor.key===a.focus.key;if(function(e,t){return e.lastKeyCode===`MediaLast`&&t<e.lastKeyDownTimeStamp+30}(i,e.timeStamp)&&r.isComposing()&&t){if(Dj(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Qk(r,()=>{Dj(null)})},30),B(a)){let e=a.anchor.getNode();e.markDirty(),z(e)||L(142),VE(a,e)}}else{if(Dj(null),mS&&n!==null&&!n.collapsed&&(a.applyDOMRange(n),!a.isCollapsed()))return e.preventDefault(),a.removeText(),!0;e.preventDefault();let o=a.anchor.getNode(),s=o.getTextContent(),c=o.canInsertTextAfter(),l=a.anchor.offset===0&&a.focus.offset===s.length,u=vS&&t&&!l&&c;if(u&&a.isCollapsed()&&(u=!cA(oM(a.anchor,!0))),!u){H(r,NT,!0);let e=nk();vS&&B(e)&&e.isCollapsed()&&(i.postDeleteSelectionToRestore=e,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!B(a))return t!==`historyUndo`&&t!==`historyRedo`||(e.preventDefault(),H(r,t===`historyUndo`?UT:WT)),!0;let o=e.data;i.unprocessedBeforeInputData!==null&&Gj(!1,r,i.unprocessedBeforeInputData),a.dirty&&i.unprocessedBeforeInputData===null||!a.isCollapsed()||uA(a.anchor.getNode())||n===null||a.applyDOMRange(n),i.unprocessedBeforeInputData=null;let s=a.anchor,c=a.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`\n`)e.preventDefault(),H(r,PT,!1);else if(o===CS)e.preventDefault(),H(r,FT);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else o!=null&&LE(a,n,o,e.timeStamp,!0)?(e.preventDefault(),H(r,IT,o),GE(o)):i.unprocessedBeforeInputData=o;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:H(r,IT,e),GE((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:{let t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;let n=r._compositionKey;Dj(null),t||H(r,IT,e),tD(n);break}case`insertLineBreak`:Dj(null),H(r,PT,!1);break;case`insertParagraph`:Dj(null),i.isInsertLineBreak&&!mS?(i.isInsertLineBreak=!1,H(r,PT,!1)):H(r,FT);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:H(r,LT,e);break;case`deleteByComposition`:(function(e,t){return e!==t||V(e)||V(t)||!gj(e)||!gj(t)})(l,u)&&H(r,RT,e);break;case`deleteByDrag`:fM(ND),H(r,RT,e);break;case`deleteByCut`:H(r,RT,e);break;case`deleteContent`:H(r,NT,!1);break;case`deleteWordBackward`:H(r,zT,!0);break;case`deleteWordForward`:H(r,zT,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:H(r,BT,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:H(r,BT,!1);break;case`formatStrikeThrough`:H(r,VT,`strikethrough`);break;case`formatBold`:H(r,VT,`bold`);break;case`formatItalic`:H(r,VT,`italic`);break;case`formatUnderline`:H(r,VT,`underline`);break;case`historyUndo`:H(r,UT);break;case`historyRedo`:H(r,WT)}return!0}function XE(e,t){e.stopPropagation();let n=t._inputState;KE(n),Qk(t,()=>{JE(e,t)||t.dispatchCommand(AT,e)},{event:e}),n.unprocessedBeforeInputData=null}function ZE(e){let t=Fk(),n=t._inputState,r=nk(),i=e.data,a=WE(e),o=!1;if(i!=null&&B(r)){let s=DM(gM(t)),c=s===null?null:LM(s,t._rootElement),l=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&!t.isComposing();l&&(n.hadOrphanedCompositionEvents=!0);let u=r.anchor.getNode(),d=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&t.isComposing()&&z(u)&&_j(u);if(!l&&!d&&LE(r,a,i,e.timeStamp,!1,c)){if(o=!0,n.compositionPhase===`ending-firefox`){let e=nD(t,i);if(n.compositionPhase=`idle`,e)return fM(FD),zj(),!0}let a=r.anchor.getNode();if(s===null||c===null)return!0;let l=r.isBackward(),u=l?r.anchor.offset:r.focus.offset,d=l?r.focus.offset:r.anchor.offset;fS&&!r.isCollapsed()&&z(a)&&c.anchorNode!==null&&a.getTextContent().slice(0,u)+i+a.getTextContent().slice(u+d)===Wj(c.anchorNode)||H(t,IT,i);let f=i.length;uS&&f>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(r.anchor.offset-=f,r._cachedNodes=null,r._cachedIsBackward=null),vS&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,Dj(null))}}return o||(Gj(!1,t,i===null?void 0:i),n.compositionPhase===`ending-firefox`&&(nD(t,i||void 0),fM(`composition-end`),n.compositionPhase=`idle`)),zj(),!0}function QE(e,t){H(t,jT,e)}function $E(e){let t=Fk(),n=t._inputState,r=nk();if(B(r)&&!t.isComposing()){n.compositionPhase=`composing`,n.hadOrphanedCompositionEvents=!1;let i=r.anchor,a=r.anchor.getNode();if(Dj(i.key),fM(`composition-start`),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type===`element`||!r.isCollapsed()||!vS&&(a.getFormat()!==r.format||z(a)&&a.getStyle()!==r.style)||z(a)&&(_j(a)||i.offset===0&&!a.canInsertTextBefore()||i.offset===a.getTextContentSize()&&!a.canInsertTextAfter())){H(t,IT,wS);let e=nk();B(e)&&Dj(e.anchor.key)}}return!0}function eD(e){let t=Fk();return t._inputState.compositionPhase=`idle`,nD(t,e.data),fM(FD),!0}function tD(e){if(e===null)return;let t=kj(e);if(!z(t)||t.getType()===`text`||_j(t)||!t.isAttached())return;let n=nk(),r=B(n)&&n.anchor.key===e?n.anchor.offset:null,i=pO(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){let e=Math.min(r,i.getTextContentSize());i.select(e,e)}}function nD(e,t){let n=e._compositionKey;if(Dj(null),n!==null&&t!=null){if(t===``){let t=kj(n),r=e.getElementByKey(n),i=r!==null&&z(t)?lN(t,r,e):null;if(i!==null&&i.nodeValue!==null&&z(t)){let n=DM(gM(e)),r=n&&LM(n,e._rootElement),a=null,o=null;r!==null&&r.anchorNode===i&&(a=r.anchorOffset,o=r.focusOffset),Kj(t,i.nodeValue,a,o,!0)}return tD(n),!1}if(t[t.length-1]===`\n`){let t=nk();if(B(t)||kO(t)){if(B(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return H(e,QT,null),tD(n),!1}}let r=kj(n);if(r!==null&&z(r)&&_j(r)){r.markDirty();let e=nk(),i=r.getTextContentSize(),a=B(e)&&e.anchor.key===n?e.anchor.offset:i;return r.select(a,a).insertText(t),!0}}return Gj(!0,e,t),tD(n),!1}function rD(e,t){let n=t._inputState;uS?n.compositionPhase=`ending-firefox`:mS||!gS&&!yS?H(t,MT,e):(n.compositionPhase=`ending-safari`,n.compositionEndData=e.data)}function iD(e,t){let n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!==`Backspace`&&KE(n),t.isComposing()||H(t,GT,e)}var aD={altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:`any`},oD={ctrlKey:!0},sD={metaKey:!0},cD={shiftKey:`any`},lD={altKey:`any`,shiftKey:`any`};function uD(e){let t=Fk(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase===`ending-safari`){let r=function(e){return e.key===`Backspace`}(e);if(r&&Qk(t,()=>{nD(t,n.compositionEndData)}),n.compositionPhase=`idle`,n.compositionEndData=``,r)return!0}let r=t._keyDownShortcuts;r===null&&(r=OE(function(){let e=(e,t,n)=>({key:e,modifiers:t,onMatch:(e,t)=>{H(t,n,e)}}),t=(e,t,n,r)=>({key:e,modifiers:t,onMatch:(e,t)=>{e.preventDefault(),H(t,n,r)}}),n=(e,t)=>({key:`Enter`,modifiers:e,onMatch:(e,n)=>{n._inputState.isInsertLineBreak=t,H(n,QT,e)}}),r=(e,t)=>({key:e,modifiers:CE,onMatch:(e,n)=>{let r=n._editorState._selection;r===null||B(r)||(e.preventDefault(),H(n,t,e))}});return[e(`ArrowRight`,cD,KT),e(`ArrowLeft`,cD,JT),e(`ArrowUp`,lD,XT),e(`ArrowDown`,lD,ZT),n({...aD,shiftKey:!0},!0),n({...aD,shiftKey:!1},!1),e(` `,aD,$T),{key:`Backspace`,modifiers:cD,onMatch:(e,t)=>{H(t,eE,e)&&qE(t._inputState)}},e(`Escape`,aD,tE),e(`Delete`,{},nE),t(`Backspace`,wE,zT,!0),t(`Delete`,wE,zT,!1),t(`b`,CE,VT,`bold`),t(`u`,CE,VT,`underline`),t(`i`,CE,VT,`italic`),e(`Tab`,cD,rE),t(`z`,CE,UT,void 0),t(`z`,{...CE,shiftKey:!0},WT,void 0),...lS?[{key:`o`,modifiers:oD,onMatch:(e,t)=>{e.preventDefault(),t._inputState.isInsertLineBreak=!0,H(t,PT,!0)}},e(`ArrowLeft`,{metaKey:!0,...cD},YT),e(`ArrowRight`,{metaKey:!0,...cD},qT),t(`h`,oD,NT,!0),t(`d`,oD,NT,!1),t(`Backspace`,sD,BT,!0),t(`Delete`,sD,BT,!1),t(`k`,oD,BT,!1)]:[e(`Home`,cD,YT),e(`End`,cD,qT),t(`y`,oD,WT,void 0)],{key:`a`,modifiers:CE,onMatch:(e,t)=>{e.preventDefault(),H(t,mE,e)&&qE(t._inputState)}},r(`c`,fE),r(`x`,pE)]}()),t._keyDownShortcuts=r);let i=r.match(e);return i&&i.onMatch(e,t),function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(xE,e),!0}function dD(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var fD=new Map;function pD(e){let t=OM(e.target);if(t===null)return;let n=uM(e.target),r=null,i=null,a=n===null?void 0:FE.get(n);if(n!==null){if(a!==void 0){let e=a.editors,n=a.hasShadowEditor;if(n===void 0){n=!1;for(let t of e)if(t._rootElement!==null&&kM(t._rootElement.getRootNode())){n=!0;break}a.hasShadowEditor=n}if(n){let n=null,a=null;for(let o of e){let e=o._rootElement;if(e===null)continue;let s=LM(t,e).anchorNode;if(s!==null&&pj(s)===o){if(kM(e.getRootNode())){r=o,i=s;break}n===null&&(n=o,a=s)}}r===null&&n!==null&&(r=n,i=a)}else{let e=t.anchorNode;e===null||YM(e)&&e.shadowRoot!==null||(r=pj(e),r!==null&&(i=e))}}if(r===null){let e=UM(n);r=e===null?null:pj(e)}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(a!==void 0)for(let e of a.editors)e._inputState.isSelectionChangeFromMouseDown=!1;Qk(r,()=>{let n=rk(),a=i??LM(t,r._rootElement).anchorNode;(YM(a)||vj(a))&&Rj(tk(n,t,r,e))})}let o=Hj(r),s=o[o.length-1],c=s._key,l=fD.get(c),u=l||s;u!==r&&zE(t,u,!1),zE(t,r,!0),r===s?l&&fD.delete(c):fD.set(c,r)}function mD(e){e._lexicalHandled=!0}function hD(e){return!0===e._lexicalHandled}var gD=TT();function _D(e){let t=PE.get(e);if(t===void 0)return void gD();let n=FE.get(t);if(n===void 0)return void gD();PE.delete(e);let r=mj(e);fj(r)?(function(e){if(e._parentEditor!==null){let t=Hj(e),n=t[t.length-1]._key;fD.get(n)===e&&fD.delete(n)}else fD.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&L(198);let i=dD(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function vD(e,t,n){jk();let r=e.__key,i=e.getParent();if(i===null)return void(rP(e)!==null&&L(367,r,String(rP(e))));let a=function(e){let t=nk();if(!B(t)||!V(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return mM(i,e)&&n.set(e.__key,0,`element`),mM(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(B(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(sk(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(sk(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else kO(a)&&t&&e.isSelected()&&e.selectPrevious();if(B(a)&&t&&!o&&ik(a,i)){let t=e.getIndexWithinParent();wj(e),ak(a,i,t,-1)}else wj(e);n||bM(i)||i.canBeEmpty()||!i.isEmpty()||vD(i,t),t&&a&&uA(i)&&i.isEmpty()&&i.selectEnd()}function yD(e){return e}var bD=Symbol.for(`ephemeral`);function xD(e){return e[bD]||!1}var SD={configurable:!0,enumerable:!1,value:void 0,writable:!0},CD=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=UN(this);return e===void 0&&L(64,this.name),e}static clone(e){L(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||$N(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,\"__state\",SD),Object.defineProperty(this,Ew,SD),Cj(this,e)}getType(){return this.__type}isInline(){L(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=kj(e);if(t===null)break;e=t.__parent===null?rP(t):t.__parent}return!1}isSelected(e){let t=e||nk();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(z(this))return n;if(B(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(cA(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:kj(e)}getParentOrThrow(){let e=this.getParent();return e===null&&L(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(bM(t)||rP(e)!==null)return V(e)||e===this&&cA(e)||L(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&L(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:kj(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:kj(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=V(this)?this:this.getParent(),n=V(e)?e:e.getParent(),r=t&&n?rF(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=rF(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?eF(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&L(279),!1)))}isParentOf(e){return mM(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=V(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&L(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=Fk()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(xD(this))return this;let e=kj(this.__key);return e===null&&L(113),e}getWritable(){if(xD(this))return this;jk();let e=Nk(),t=Fk(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=nk();if(o!==null&&o.setCachedNodes(null),a.has(r))return Ej(i),i;let s=pN(i);return a.add(r),Ej(s),n.set(r,s),s}getTextContent(){return _P(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){L(70)}updateDOM(e,t,n){L(71)}getDOMSlot(e){return new WS(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(e=!1){let t=function(e,t){let n=TN(wN(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return V(e)&&(r.children=[]),(function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=RN(e)[a.field];o=a.getterTable===void 0?t:LC(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!zN(a,o)&&a.when.call(e)||(o=void 0)),r&&zN(a,o)||(n[a.key]=o)}})(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){L(18,this.name)}updateFromJSON(e){return HN(hw(this,e),e)}static transform(){return null}remove(e){vD(this,!0,e)}replace(e,t){jk();let n=nk();n!==null&&(n=n.clone()),CM(this,e);let r=this.getLatest(),i=this.__key,a=iP(r);a!==null&&L(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent(),d=u!==null&&B(n)&&ik(n,u),f=d?s.getIndexWithinParent():-1;wj(s),d&&u!==null&&B(n)&&ak(n,u,f,-1);let p=r.getPreviousSibling(),m=r.getNextSibling(),h=r.__prev,g=r.__next,_=r.__parent;vD(r,!1,!0),p===null?c.__first=o:p.getWritable().__next=o,s.__prev=h,m===null?c.__last=o:m.getWritable().__prev=o,s.__next=g,s.__parent=_,c.__size=u!==null&&u.is(c)?l-1:l;let v=0;if(t&&(V(this)&&V(s)||L(139),v=s.getChildrenSize(),s.splice(v,0,this.getChildren())),B(n)){Rj(n);let e=n.anchor,r=n.focus;e.key===i&&(t&&e.type===`element`?e.set(s.__key,v+e.offset,`element`):SO(e,s)),r.key===i&&(t&&r.type===`element`?r.set(s.__key,v+r.offset,`element`):SO(r,s))}return Oj()===i&&Dj(o),s}insertAfter(e,t=!0){jk(),CM(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.getParent(),a=nk(),o=!1,s=!1,c=-1;if(i!==null&&t&&B(a)&&ik(a,i)){let t=i.__key,n=a.anchor,r=a.focus;c=e.getIndexWithinParent(),o=n.type===`element`&&n.key===t&&n.offset===c+1,s=r.type===`element`&&r.key===t&&r.offset===c+1}wj(r),c!==-1&&i!==null&&B(a)&&ak(a,i,c,-1);let l=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,f=n.__next;if(l===null?u.__last=d:l.getWritable().__prev=d,u.__size++,n.__next=d,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&B(a)){let e=u.__key;if(o||s||ik(a,u)){let t=this.getIndexWithinParent();ak(a,u,t+1),o&&a.anchor.set(e,t+2,`element`),s&&a.focus.set(e,t+2,`element`)}}return e}insertBefore(e,t=!0){jk(),CM(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.__key,a=nk(),o=r.getParent(),s=o!==null&&t&&B(a)&&ik(a,o),c=s?r.getIndexWithinParent():-1;wj(r),s&&o!==null&&B(a)&&ak(a,o,c,-1);let l=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),d=n.__prev,f=t&&B(a)&&ik(a,u),p=f?this.getIndexWithinParent():-1;return l===null?u.__first=i:l.getWritable().__next=i,u.__size++,n.__prev=i,r.__prev=d,r.__next=n.__key,r.__parent=n.__parent,f&&B(a)&&ak(a,u,p),e}isParentRequired(){return!1}createParentElementNode(){return GA()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){jk();let n=iP(this);if(n!==null)return n.selectPrevious(e,t);let r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(V(r))return r.select();if(!z(r)){let e=r.getIndexWithinParent()+1;return i.select(e,e)}return r.select(e,t)}selectNext(e,t){jk();let n=iP(this);if(n!==null)return n.selectNext(e,t);let r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(V(r))return r.select(0,0);if(!z(r)){let e=r.getIndexWithinParent();return i.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function wD(e){return e instanceof CD}var TD=`historic`,ED=`history-push`,DD=`history-merge`,OD=`paste`,kD=`collaboration`,AD=`skip-collab`,jD=`skip-scroll-into-view`,MD=`skip-dom-selection`,ND=`skip-selection-focus`,PD=`composition-start`,FD=`composition-end`,ID=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function LD(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!ID.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function RD(e,t,n,r,i){let a=LD(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var zD=e=>{let t=vC(e,`format`),n=yC(e,`format`),r=xC(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=RD(t.indent,0,0,1/0),e.__textFormat=LD(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function BD(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var VD=e=>{let t=vC(e,`mode`),n=bC(e,`detail`,0),r=bC(e,`format`,0),i=yC(e,`mode`),a=xC(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:LD(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:LD(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:BD}},HD=e=>{let t=vC(e,`format`),n=yC(e,`format`),r=xC(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=RD(t.indent,0,0,1/0),e.__textFormat=LD(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},UD=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),WD=e=>{let t=vC(e,`mode`),n=bC(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:LD(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},GD=`!important`;function KD(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`\"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function qD(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===GD?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function JD(e,t){for(let n in t){let r=t[n];r==null?e.removeProperty(n):qD(e,n,r)}}function YD(e,t,n=``){if(t===n)return;let r=KD(n),i=KD(t);for(let t in i)delete r[t],qD(e,t,i[t]);for(let t in r)e.removeProperty(t)}var XD=YC()({detail:tw(XC(HC(),jS),{field:`__detail`}),format:tw(XC(HC(),AS),{field:`__format`}),mode:tw(WC([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:IS,setterTable:FS}),style:tw(BC(),{field:`__style`}),text:tw(BC(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function ZD(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function QD(e,t){return 1&t?`strong`:2&t?`em`:`span`}function $D(e,t,n,r,i){let a=r.classList,o=nM(i,`base`);o!==void 0&&a.add(...o),o=nM(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in AS){let r=AS[e];if(o=nM(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}tM(r,`class`)}function eO(e,t,n){let r=n.isComposing(),i=e+(r?SS:``),a=rN(),o=iN(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(PM().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||uS){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);t!==0&&c.deleteData(e,t),c.insertData(e,n)}else c.nodeValue=i}}function tO(e,t,n,r,i,a){eO(i,e,t);let o=a.theme.text;o!==void 0&&$D(0,0,r,e,o)}function nO(e,t){let n=PM().createElement(t);return n.appendChild(e),n}function rO(e){return e!=null&&!0===e.__isInlineFormattable}var iO=class extends CD{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:CD,generated:VD,importDOM:{\"#text\":()=>({conversion:lO,priority:0}),b:()=>({conversion:oO,priority:0}),code:()=>({conversion:fO,priority:0}),em:()=>({conversion:fO,priority:0}),i:()=>({conversion:fO,priority:0}),mark:()=>({conversion:fO,priority:0}),s:()=>({conversion:fO,priority:0}),span:()=>({conversion:aO,priority:0}),strong:()=>({conversion:fO,priority:0}),sub:()=>({conversion:fO,priority:0}),sup:()=>({conversion:fO,priority:0}),u:()=>({conversion:fO,priority:0})},json:XD})}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return IS[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Oj()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=AS[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return xj(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=ZD(0,n),i=QD(0,n),a=r===null?i:r,o=PM().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=PM().createElement(i),o.appendChild(s)),tO(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&YD(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=ZD(0,i),s=ZD(0,a),c=QD(0,i),l=QD(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??L(48);let i=PM().createElement(l);return tO(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??L(49)),eO(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&$D(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(YD(t.style,p,f),tM(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return YM(t)||L(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=nO(t,`b`)),this.hasFormat(`italic`)&&(t=nO(t,`i`)),this.hasFormat(`strikethrough`)&&(t=nO(t,`s`)),this.hasFormat(`underline`)&&(t=nO(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?AS[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?jS[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=xj(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=FS[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){jk();let n=e,r=t,i=nk(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!B(i))return ZO(o,n,o,r,`text`,`text`);{let e=Oj();e!==i.anchor.key&&e!==i.focus.key||Dj(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=nk();if(r&&B(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){jk();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Oj(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=nk();if(B(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=pO(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=bw(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=pO(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=bw(t,n);let a=n.__key;i===r&&Dj(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Ej(t),n!==null&&Ej(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),B(v)&&ak(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||L(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Oj()===r&&Dj(n);let o=nk();if(B(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&ck(i,t,n,e,a),s!==null&&s.key===r&&ck(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function aO(e){return{forChild:mO(e.style),node:null}}function oO(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:mO(t.style,n?void 0:`bold`),node:null}}var sO=new WeakMap;function cO(e){if(!YM(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function lO(e){let t=e;e.parentElement===null&&L(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=sO.get(n))===void 0&&!cO(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)sO.set(r[e],i);return i}(t)!==null)return{node:mk(n)};if(n=n.replace(/\\r/g,``).replace(/[ \\t\\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=uO(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \\t\\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=uO(e,!0))!==null;)if((e.textContent||``).replace(/^( |\\t|\\r?\\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:pO(n)}}function uO(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,YM(n)){let e=n.style.display;if(e===``&&!$M(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(vj(n))return n;if(n.nodeName===`BR`)return null}}var dO={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function fO(e){let t=dO[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:mO(e.style,t),node:null}}function pO(e=``){return SM(new iO(e))}function z(e){return e instanceof iO}function mO(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>z(e)||rO(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var hO=YC()({detail:nw(HC(2),{getter:{field:`__detail`},setter:null}),mode:nw(WC([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:nw(BC(`\t`),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),gO=class extends iO{$config(){return this.config(`tab`,{extends:iO,generated:WD,json:hO})}constructor(e=void 0){super(`\t`,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=nM(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(`\t`)}spliceText(e,t,n,r){return n===``&&t===0||n===`\t`&&t===1||L(286),this}setDetail(e){return e!==2&&L(127),this}setMode(e){return e!==`normal`&&L(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function _O(){return SM(new gO)}function vO(e){return e instanceof gO}var yO=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:$P(NA(wA(this,`next`)),NA(wA(e,`next`)))<0}getNode(){let e=kj(this.key);return e===null&&L(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,Ak()||(Oj()===a&&Dj(e),i!==null&&(i.setCachedNodes(null),B(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function bO(e,t,n){return new yO(e,t,n)}function xO(e,t){let n=t.__key,r=e.offset,i=`element`;if(z(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!V(t)){let e=t.getNextSibling();if(z(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function SO(e,t){if(V(t)){let n=t.getLastDescendant();V(n)||z(n)?xO(e,n):xO(e,t)}else xO(e,t)}function CO(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=pO();if(o.setFormat(n),o.setStyle(r),KA(a))a.splice(0,0,[o]);else if(a!==null){let e=bM(i)?GA().append(o):o;a.insertBefore(e)}else if(bM(i)){let e=i.getLastChild();V(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(GA().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}function wO(e,t,n,r){let i=e.anchor.getNode();z(i)||L(398);let a=e.anchor.offset,o=pO(t);o.setFormat(n),o.setStyle(r);let s=i.getParentOrThrow();if(a===0)s.isInline()&&!i.__prev?s.insertBefore(o):i.insertBefore(o,!1);else if(a===i.getTextContentSize())s.isInline()&&!i.__next?s.insertAfter(o):i.insertAfter(o,!1);else{let[e]=i.splitText(a);e.insertAfter(o,!1)}i.getTextContent()===``&&i.isAttached()&&i.remove(),o.selectEnd(),o.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}var TO=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!kO(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes().filter(e=>rP(e)===null),n=t.length;if(n===0)return;let r=t[n-1],i;if(z(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=kj(e);t!==null&&n.push(t)}return Ak()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>rP(e)===null);if((nk()||rk())===this&&e[0]){let t=RP(e[0],`next`);EA(ZP(t,t))}for(let t of e)t.remove();EO()}};function EO(){let e=Ij();if(e.isEmpty()){let t=GA();e.append(t),t.select()}}function DO(e){let t=function(e){let t=e.getNode();if(e.offset>0)return e.type===`element`&&V(t)?t.getChildAtIndex(e.offset-1):null;for(let e=t;e!==null&&!nN(e)&&!bM(e);e=e.getParent()){let t=e.getPreviousSibling();if(t!==null)return t}return null}(e);return bA(t)&&bA(t.getPreviousSibling())}function B(e){return e instanceof OO}var OO=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!B(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(PP(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;V(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),NP(e.focus)&&V(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=HP(e.focus.origin,`previous`);PP(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=WP(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!V(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=NA(e.anchor),r=NA(e.anchor.getFlipped()),i=e=>jP(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(FA(OA(this),`next`));return Ak()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=PO(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(V(d)&&!d.isInline()){l||(c+=`\n`);let e=``;for(let t of lP(d)){let n=uP(d,t);n!==null&&(e+=n.getTextContent())}e===``?l=!d.isEmpty():(c+=e,l=!1)}else if(l=!1,z(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!cA(d)&&!bA(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=Fk(),n=t.getEditorState()._selection,r=YO(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),ww(this)}clone(){let t=this.anchor,n=this.focus;return new e(bO(t.key,t.offset,t.type),bO(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=xj(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=AS[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(mk(e))}insertText(e){let t=this.format,n=this.style;if(!this.isCollapsed()){let r=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(z(r)&&(t=r.getFormat(),n=r.getStyle()),this.removeText(),this.format=t,this.style=n,e===``)return;if(Oj()===null)return this.anchor.type===`element`&&CO(this.anchor,this.focus,t,n),void wO(this,e,t,n)}this.anchor.type===`element`&&CO(this.anchor,this.focus,t,n);let r=this.anchor.getNode();z(r)||L(398);let i=this.anchor.offset,a=r.getParentOrThrow(),o=r.getTextContentSize();if(_j(r)||i===0&&(!r.canInsertTextBefore()||!a.canInsertTextBefore()&&!r.__prev)||i===o&&(!r.canInsertTextAfter()||!a.canInsertTextAfter()&&!r.__next)){if(r.isSegmented()&&i!==0&&i!==o){if(Oj()!==null)r.setMode(`normal`).setFormat(t).setStyle(n);else{let e=pO(r.getTextContent());e.setFormat(t),e.setStyle(n);let a=nk()===this;r.replace(e),this.setTextNodeRange(e,i,e,i),a&&nk()!==this&&Rj(this)}e!==``&&this.insertText(e);return}if(e===``)return;if(i===0){let i=r.getPreviousSibling();if(z(i)&&i.canInsertTextAfter()&&!_j(i))i.select();else{let e=pO();e.setFormat(t),e.setStyle(n),a.canInsertTextBefore()?r.insertBefore(e):a.insertBefore(e),e.select()}this.insertText(e);return}if(i===o){let i=r.getNextSibling();if(z(i)&&i.canInsertTextBefore()&&!_j(i))i.select(0,0);else{let e=pO();e.setFormat(t),e.setStyle(n),a.canInsertTextAfter()?r.insertAfter(e):a.insertAfter(e),e.select(0,0)}this.insertText(e);return}let s=pO(e);s.setFormat(t),s.setStyle(n),r.replace(s),s.select();return}if(e===``)return;let s=a.isInline()&&i===0&&!r.__prev,c=a.isInline()&&i===o&&!r.__next,l=r.getFormat()!==t||r.getStyle()!==n;if(s||c||l){if(r.getTextContent()!==``||s||c)return void wO(this,e,t,n);r.setFormat(t),r.setStyle(n)}r.spliceText(i,0,e,!0),r.isComposing()&&this.anchor.type===`text`&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){let e=nk()===this,t=this.anchor.key;DA(this,MA(OA(this))),this.isCollapsed()&&function(e,t){let n=e.anchor;if(n.key===t)return;let r=n.getNode(),i=0,a=``;z(r)?(i=r.getFormat(),a=r.getStyle()):V(r)&&(i=r.getTextFormat(),a=r.getTextStyle()),e.format===i&&e.style===a||(e.format=i,e.style=a,e.dirty=!0)}(this,t),e&&nk()!==this&&Rj(this)}formatText(e,t=null){MO(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();let t=this.anchor.getNode();if(this.anchor.type===`element`&&V(t)&&t.isShadowRoot()&&rP(t)!==null){let n=t.getFirstChild()??t.append(GA()).getFirstChild();if(n!==null&&!V(n)){let e=GA();n.insertBefore(e),n=e}if(n!==null){n.selectStart();let t=nk();return B(t)||L(369),t.insertNodes(e)}}if(this.anchor.type===`element`&&bM(t)){let n=bk(e),r=n.getLastDescendant();t.splice(this.anchor.offset,0,n.getChildren()),r!==null&&r.selectEnd();return}let n=this.isBackward()?this.focus:this.anchor,r=n.getNode(),i=ZN(r,nN),a=e[e.length-1];if(V(i)&&`__language`in i){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let[,t]=_k(this);i.splice(t,0,e),a.selectEnd()}return}if(!e.some(e=>(V(e)||cA(e))&&!e.isInline())){V(i)||L(211,r.constructor.name,r.getType());let[t,n]=_k(this,!0);(V(t)?t:i).splice(n,0,e),a.selectEnd();return}if(V(i)&&rP(i)!==null){let[,t]=_k(this),n=gk(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}if(i===null){let t=bk(e),n=t.getLastDescendant(),r=wA(this.anchor,`next`);for(let e of t.getChildren())r=VA(e,r);n!==null&&n.selectEnd();return}if(V(i)&&!i.isParentRequired()&&!bM(i.getParentOrThrow())){let[,t]=_k(this),n=gk(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}let o=bk(e),s=o.getLastDescendant(),c=o.getChildren(),l=DO(n),u=!V(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(r=this.anchor.getNode(),i=ZN(r,nN));let d=c[c.length-1],f=c[0];var p=f;l||!V(p)||!nN(p)||p.isEmpty()||!V(i)||i.isEmpty()&&!i.canMergeWhenEmpty()||(V(i)||L(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&L(212,r.constructor.name,r.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||L(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(i,f));let m=ZN(s,nN),h=s.selectEnd();u&&(V(m)&&(u.canMergeWhenEmpty()||nN(d))?(m.append(...u.getChildren()),u.remove()):u.isEmpty()&&u.remove()),V(i)&&i.isEmpty()&&i.remove();let g=V(i)?i.getLastChild():null;bA(g)&&m!==i&&g.remove();let _=NA(wA(h.anchor,`next`));TA(h.anchor,_),TA(h.focus,_)}insertParagraph(){this.isCollapsed()||this.removeText();let e=this.anchor.getNode();if(this.anchor.type===`element`&&bM(e)){let t=GA();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let[,t]=_k(this),n=ZN(this.anchor.getNode(),nN);if(n!==null&&rP(n)!==null)return null;V(n)||L(213);let r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=yA();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=PO(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(z(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(z(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),z(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(xk(this,e,t,n))return;let r=e===`move`,i=Fk(),a=DM(gM(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();s===null||o===null||!V(c)||c.isInline()||c.canBeEmpty()||EM(o,i,s);let l=cM(i,this.focus.key),u=l;if(this.focus.type===`text`&&(u=z(c)?lN(c,l,i):null),this.dirty){let e=cM(i,this.anchor.key),t=e;if(this.anchor.type===`text`){let n=this.anchor.getNode();t=z(n)?lN(n,e,i):null}t&&u&&lk(a,t,this.anchor.offset,u,this.focus.offset)}if(n===`character`&&z(c)&&c.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){let e=RP(c,t?`previous`:`next`).getNodeAtCaret();if(z(e)){if(!r){let n=e.getTextContentSize();t?this.focus.set(e.__key,n-1,`text`):this.focus.set(e.__key,1,`text`),this.dirty=!0;return}{let n=i.getElementByKey(e.getKey()),r=n?lN(e,n,i):null;if(r){let e=t?r.length:0;lk(a,r,e,r,e)}}}}if(RO(a,e,t?`backward`:`forward`,n,s),a.rangeCount>0){let e=FM(a,i._rootElement),n=e||a.getRangeAt(0),o=this.anchor.getNode(),s=uA(o)?o:vM(o);this.applyDOMRange(n),this.dirty=!0,!r&&(zO(this,t,s),(e?a.direction!==`backward`:a.anchorNode===n.startContainer&&a.anchorOffset===n.startOffset)||LO(this))}n===`lineboundary`&&xk(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&V(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(V(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e)){let e=V(n)?n.getNextSibling():null;if(!(V(n)&&n.isEmpty()&&V(e)&&e.isShadowRoot()))return}let r=wA(t,e?`previous`:`next`),i=YP(r);if(i.getTextSlices().every(e=>e===null||e.distance===0)){if(t.type===`element`){let e=r.getNodeAtCaret();if(V(e)&&TM(e)){let t=e.getParent();e.remove();let n=Lj(t,e);n!==null&&n.selectStart();return}}let e={type:`initial`};for(let t of i.iterNodeCarets(`shadowRoot`))if(PP(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(V(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=NA(t);DA(this,ZP(e,e)),i.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(NP(t)){if(V(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(i.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(cA(t.origin)){if(!t.origin.isIsolated()){if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&V(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=$O();e.add(t.origin.getKey()),Rj(e)}else{let e=t.origin,n=e.getParent();e.remove();let r=Lj(n,e);r!==null&&r.selectStart()}}return}if(bA(t.origin))return void t.origin.remove();break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return lP(n).length>0?void 0:t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(DA(this,ZP(!t.origin.isEmpty()&&n.isEmpty()?kA(RP(n,t.direction)):i.anchor,t)),this.removeText())}for(let e=t.getNode();e!==null;){if(rP(e)!==null)return;if(V(e)&&e.isShadowRoot())break;e=e.getParent()}}let a=this.focus;if(BO(this,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&FO(this,t.getNode()))return}else{let r=a.type===`text`?a.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=a.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&t!==0)return void UO(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void UO(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(Vj(e)||HO(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(t||IO(this),this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&uA(e.getParent())&&e.getPreviousSibling()===null&&FO(this,e),EO()}}deleteLine(e){let t=this.isCollapsed(),n=KO(this.anchor);if(n!==null&&cA(iP(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&BO(this,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):ZN(this.anchor.getNode(),nN)===ZN(this.focus.getNode(),nN)?(t||IO(this),this.removeText()):(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e))}deleteWord(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;BO(this,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):(t||IO(this),this.removeText())}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return Ak()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function kO(e){return e instanceof TO}function AO(e,t){if(kO(e)){for(let n of e.getNodes())rO(n)&&n.setFormat(t(n.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Dj(null);let n=[];for(let r of e.getNodes())z(r)?n.push(r):V(r)?r.setTextFormat(t(r.getTextFormat())):rO(r)&&r.setFormat(t(r.getFormat()));let r=n.length;if(r===0)return e.setFormat(t(e.format)),void Dj(null);let i=e.anchor,a=e.focus,o=e.isBackward(),s=o?a:i,c=o?i:a,l=0,u=n[0],d=s.type===`element`?0:s.offset;if(s.type===`text`&&d===u.getTextContentSize()&&(l=1,u=n[1],d=0),u==null)return;let f=r-1,p=n[f],m=c.type===`text`?c.offset:p.getTextContentSize();if(u.is(p)){if(d===m)return;let n=t(u.getFormat());if(_j(u)||d===0&&m===u.getTextContentSize())u.setFormat(n);else{let e=u.splitText(d,m),t=d===0?e[0]:e[1];t.setFormat(n),s.type===`text`&&s.set(t.__key,0,`text`),c.type===`text`&&c.set(t.__key,m-d,`text`)}e.format=n;return}d===0||_j(u)||([,u]=u.splitText(d),d=0);let h=t(u.getFormat());u.setFormat(h);let g=t(p.getFormat());m>0&&(m===p.getTextContentSize()||_j(p)||([p]=p.splitText(m)),p.setFormat(g));for(let e=l+1;e<f;e++){let r=n[e];r.setFormat(t(r.getFormat()))}s.type===`text`&&s.set(u.__key,d,`text`),c.type===`text`&&c.set(p.__key,m,`text`),e.format=h|g}function jO(e,t){let n=[];for(let[e,r]of Object.entries(t))typeof r==`boolean`&&n.push([e,r]);n.length!==0&&AO(e,e=>{for(let[t,r]of n)e=xj(e,t,r?AS[t]:0);return e})}function MO(e,t,n=null){let r=n===null&&B(e)?xj(e.format,t,null):n;AO(e,e=>xj(e,t,r))}function NO(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function PO(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[NO(n),NO(r)]}function FO(e,t){for(let n=t;n;n=n.getParent()){if(V(n)){if(n.collapseAtStart(e))return!0;if(bM(n))break}if(n.getPreviousSibling())break}return!1}function IO(e){let t=Ij();!t.isEmpty()&&HA(t,e)&&(e.anchor.set(t.getKey(),0,`element`),e.focus.set(t.getKey(),t.getChildrenSize(),`element`))}function LO(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}function RO(e,t,n,r,i){let a=r===`character`?LM(e,i):null,o=a&&a.focusNode,s=a?a.focusOffset:0;if(e.modify(t,n,r),a===null||!function(e,t,n){return e!==null&&e.nodeType===3&&(n===`backward`?t>0:n===`forward`&&t<e.length)}(o,s,n))return;let c=LM(e,i);c.focusNode===o&&c.focusOffset===s&&e.modify(t,n,r)}function zO(e,t,n){let r=e.getNodes(),i=r.filter(e=>mM(e,n));if(i.length===0||i.length===r.length)return!1;let a=t?i[0]:i[i.length-1],o=V(a)?a:a.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function BO(e,t,n){if(xk(e,`extend`,t,n))return;let r=Fk(),i=DM(gM(r));if(!i||typeof i.modify!=`function`)return;let a=r._blockCursorElement,o=r._rootElement,s=e.anchor,c=e.focus.getNode();o===null||a===null||!V(c)||c.isInline()||c.canBeEmpty()||EM(a,r,o);let l=e=>{let t=e.getNode(),n=r.getElementByKey(e.key);return n!==null&&e.type===`text`&&z(t)?lN(t,n,r):n},u=s.getNode(),d=l(s);if(d===null)return;let f=s.offset,p=e.isCollapsed(),m=e.focus,h=p?d:l(m);if(h===null)return;let g=m.offset;if(lk(i,h,g,h,g),RO(i,`move`,t?`backward`:`forward`,n,o),i.rangeCount===0)return;let _=FM(i,o)||i.getRangeAt(0),v=_.startContainer,y=_.startOffset;if(p&&n===`character`&&s.type===`text`&&z(u)&&u.isUnmergeable()&&f===(t?0:u.getTextContentSize())){let n=RP(u,t?`previous`:`next`).getNodeAtCaret();if(z(n)){let r=t?n.getTextContentSize()-1:1;e.focus.set(n.__key,r,`text`),e.dirty=!0;return}}if(p&&n===`character`&&s.type===`text`){let n=t?0:u.getTextContentSize(),r=v===d?y:f===n?-1:n;if(r>=0)return void(r!==f&&(e.focus.set(s.key,r,`text`),e.dirty=!0))}let[b,x,S,C]=t?[v,y,d,f]:[d,f,v,y],ee=uA(u)?u:vM(u);e.applyDOMRange({collapsed:!1,endContainer:S,endOffset:C,startContainer:b,startOffset:x}),e.dirty=!0,!zO(e,t,ee)&&t&&LO(e),n===`lineboundary`&&xk(e,`extend`,t,n,`decorators`)}function VO(){try{let e=RegExp(`\\\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1}var HO=VO();function UO(e,t,n){let r=e,i=r.getTextContent().split(/(?=\\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function WO(e,t,n,r){let i,a=t,o=!1;if(YM(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),Mj(e,r)!==void 0||xN(e,r)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=Bj(d),z(i))a=BP(i,s?`next`:`previous`);else{let c=Bj(e);if(c===null)return null;if(V(c)){let o=r.getElementByKey(c.getKey());o===null&&L(214);let l=aN(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),V(c)||L(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if(V(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=V(u)?u:u.getParentOrThrow()),a=0}z(u)?(i=u,c=null,a=BP(u,s?`next`:`previous`)):u!==c&&s&&!f&&(V(c)||L(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=iP(c),i=n===null?c:n,o=i.getIndexWithinParent(),s=r.getElementByKey(c.getKey()),l=`after`;if(s!==null&&Bj(e)===c){let n=aN(c,s,r);n.element===s?t===0&&cA(c)&&(l=`before`):l=n.resolveLeafPosition(s,e,t)}a=l===`before`?o:o+1,c=i.getParentOrThrow()}if(V(c))return[bO(c.__key,a,`element`),o]}}else i=Bj(e);return z(i)?[bO(i.__key,BP(i,a,`clamp`),`text`),o]:null}function GO(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&V(a)&&a.isInline()){let t=a.getPreviousSibling();z(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else V(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):z(r)&&!i.isUnmergeable()&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&V(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&V(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){let t=a.getNextSibling();z(t)&&e.set(t.__key,0,`text`)}}}function KO(e){let t=kj(e.key);return t===null?null:oP(t)}function qO(e,t,n){let r=KO(e),i=KO(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;let a=n(r,i);if(r!==null)return V(r)?t.set(r.getKey(),a?r.getChildrenSize():0,`element`):t.set(r.getKey(),a?r.getTextContentSize():0,`text`),!0;let o=iP(i);if(o===null)return!1;let s=o.getParent();if(s===null)return!1;let c=o.getIndexWithinParent();return t.set(s.getKey(),a?c+1:c,`element`),!0}function JO(e){let t=qO(e.anchor,e.focus,(t,n)=>function(e,t,n,r){if(n!==null&&r!==null){let e=iP(n),t=iP(r);if(e!==null&&e.is(t)){for(let t of cP(e).values()){if(t===n.getKey())return!0;if(t===r.getKey())return!1}return!0}return e===null||t===null||e.isBefore(t)}if(n!==null){let e=iP(n),r=kj(t.key);return e===null||r===null||!(!e.is(r)&&!e.isParentOf(r))||e.isBefore(r)}let i=iP(r),a=kj(e.key);return i!==null&&a!==null&&!i.is(a)&&!i.isParentOf(a)&&a.isBefore(i)}(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function YO(e,t,n,r,i,a){if(e===null||n===null||!dj(i,e,n))return null;let o=WO(e,t,B(a)?a.anchor:null,i);if(o===null)return null;let s=WO(n,r,B(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=Bj(e),r=Bj(n);if(cA(t)&&cA(r))return null}let f=i._slotsUsed&&qO(c,u,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return function(e,t){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);GO(e,n,r),GO(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}(c,u),[c,u,l||d||f]}function XO(e){return V(e)&&!e.isInline()}function ZO(e,t,n,r,i,a){let o=Nk(),s=new OO(bO(e,t,i),bO(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function QO(){return new OO(bO(`root`,0,`element`),bO(`root`,0,`element`),0,``)}function $O(){return new TO(new Set)}function ek(e,t){return tk(null,e,t,null)}function tk(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!aC&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(B(e)&&!c)return e.clone();{if(t===null)return null;let r=LM(t,n._rootElement);if(l=r.anchorNode,u=r.focusNode,d=r.anchorOffset,f=r.focusOffset,(s||o===void 0)&&B(e)&&!dj(n,l,u))return e.clone()}let p=YO(l,d,u,f,n,e);if(p===null)return null;let[m,h,g]=p,_=0,v=``;if(B(e)){let t=e.anchor;if(m.key===t.key)_=e.format,v=e.style;else{let e=m.getNode();z(e)?(_=e.getFormat(),v=e.getStyle()):V(e)&&(_=e.getTextFormat(),v=e.getTextStyle())}}let y=new OO(m,h,_,v);return g&&(y.dirty=!0),y}function nk(){return Nk()._selection}function rk(){return Fk()._editorState._selection}function ik(e,t){let n=t.__key;return e.anchor.key===n||e.focus.key===n}function ak(e,t,n,r=1){if(!ik(e,t))return;let i=e.anchor,a=e.focus,o=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(o,n,`element`),a.set(o,n,`element`),ok(e)}}else{let s=e.isBackward(),c=s?a:i,l=c.getNode(),u=s?i:a,d=u.getNode();if(t.is(l)){let e=c.offset;(n<=e&&r>0||n<e&&r<0)&&c.set(o,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(o,Math.max(0,e+r),`element`)}}ok(e)}function ok(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!V(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(z(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(V(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(z(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(V(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(z(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function sk(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,z(i)?s=`text`:V(i)&&(s=`element`)):(a=r.__key,z(r)?(o=r.getTextContentSize(),s=`text`):V(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function ck(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function lk(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function uk(e,t,n){let r=cM(e,t.getKey());if(V(t)){let i=aN(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function dk(e,t,n,r,i,a){let o=a.getRootNode(),s=yj(o)||kM(o)?UM(o):null;if(i.has(`collaboration`)&&s!==a||s!==null&&lj(s,s))return;let c=LM(r,a),l;if(!B(t))return void(e!==null&&dj(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());let u=t.anchor,d=t.focus,f=u.getNode(),p=d.getNode(),[m,h]=uk(n,f,u.offset),[g,_]=uk(n,p,d.offset),v=t.format,y=t.style,b=t.isCollapsed(),x=m,S=g,C=!1;if(u.type===`text`?(x=z(f)?lN(f,m,n):null,C=f.getFormat()!==v||f.getStyle()!==y):B(e)&&e.anchor.type===`text`&&(C=!0),d.type===`text`&&(S=z(p)?lN(p,g,n):null),x!==null&&S!==null){if(b&&(e===null||C||B(e)&&(e.format!==v||e.style!==y))&&function(e,t,n,r,i,a){e._inputState.collapsedSelectionFormat={format:t,key:i,offset:r,style:n,timeStamp:a}}(n,v,y,h,u.key,performance.now()),(r.type!==`Range`||!b)&&c.anchorOffset===h&&c.focusOffset===_&&c.anchorNode===x&&c.focusNode===S){if(s===null||!a.contains(s)){let e=s===null?null:pj(s);e!==null&&e!==n||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0})}if(u.type!==`element`)return}if(lk(r,x,h,S,_),uS&&t.isCollapsed()&&a!==null&&!i.has(`skip-selection-focus`)){let e=HM(a);if(e===null||!a.contains(e)){let e=UM(a.ownerDocument),t=e===null?null:pj(e);t!==null&&t!==n||a.focus({preventScroll:!0})}}if(!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===HM(a)){let e=B(t)&&t.anchor.type===`element`?x.childNodes[h]||null:(l===void 0&&(l=IM(r,a)),l);if(e!==null){let t;if(vj(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=uM(n),i=hM(r);if(r===null||i===null)return;let a=n.getBoundingClientRect();if(t.bottom<a.top)return;let{top:o,bottom:s}=t,c=0,l=0,u=n;for(;u!==null;){let t=u===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;c=e,l=e+t.height}else c=0,l=gM(e).innerHeight;let n=i.getComputedStyle(r.documentElement),a=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(a)&&(c+=a),isFinite(o)&&(l-=o)}else{let e=u===n?a:u.getBoundingClientRect();c=e.top,l=e.bottom}let d=0;if(o<c?d=-(c-o):s>l&&(d=s-l),d!==0){if(t)i.scrollBy(0,d);else{let e=u.scrollTop;u.scrollTop+=d;let t=u.scrollTop-e;o-=t,s-=t}}if(t)break;u=lM(u)}})(n,t,a)}}(function(e,t,n,r,i){let a=e._inputState;a.isSelectionChangeFromDOMUpdate=!0,a.selectionChangeFromDOMUpdatePoints=t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0?{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:i}:null})(n,x,h,S,_)}}function fk(e){let t=nk()||rk();t===null&&(t=Ij().selectEnd()),t.insertNodes(e)}function pk(e,t){for(let n of e.split(/(\\r?\\n|\\t)/))n===`\n`||n===`\\r\n`?t.linebreak():n===`\t`?t.tab():n!==``&&t.text(n)}function mk(e){let t=[];return pk(e,{linebreak:()=>t.push(yA()),tab:()=>t.push(_O()),text:e=>t.push(pO(e))}),t}function hk(){let e=nk();return e===null?``:e.getTextContent()}function gk(e){let t=[];for(let n of e)bA(n)||(!V(n)&&!cA(n)||n.isInline()?t.push(n):V(n)&&t.push(...gk(n.getChildren())));return t}function _k(e,t=!1){let n=e;e.isCollapsed()||n.removeText();let r=nk();B(r)&&(n=r),B(n)||L(161);let i=n.anchor,a=i.getNode(),o=i.offset;for(;!nN(a)&&rP(a)===null;){let e=a;if([a,o]=vk(a,o,t),e.is(a))break}return[a,o]}function vk(e,t,n=!1){let r=e.getParent();if(!r){let e=GA();return Ij().append(e),e.select(),[Ij(),0]}if(z(e)){let n=e.splitText(t);if(n.length===0)return[r,e.getIndexWithinParent()];let i=t===0?0:1;return[r,n[0].getIndexWithinParent()+i]}if(!V(e)||t===0)return[r,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let r=new OO(bO(e.__key,t,`element`),bO(e.__key,t,`element`),0,``),a=e.insertNewAfter(r);if(a)a.append(i,...i.getNextSiblings());else if(n)return[e,t]}return[r,e.getIndexWithinParent()+1]}function yk(e){return bA(e)||_M(e)||z(e)||e.isParentRequired()}function bk(e){let t=GA(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(yk(i)){if(n===null){n=i.createParentElementNode(),t.append(n);let a=e[r+1];if(bA(i)&&(a===void 0||!yk(a)))continue}n.append(i)}else t.append(i),n=null}return t}function xk(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=wA(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`,u=!1;if(!PA(c)){for(let e of c){l=!1;let{origin:t}=e;if(cA(t)){if(t.isIsolated()){u=!0;break}if(c=e,o&&t.isInline())continue}break}if(u)return!0;if(l)for(let e of YP(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(PP(e))e.origin.isInline()||(c=e);else{if(V(e.origin))continue;cA(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&cA(c.origin)&&c.origin.isKeyboardSelectable()){let e=$O();return e.add(c.origin.getKey()),Rj(e),!0}return c=NA(c),s&&TA(e.anchor,c),TA(e.focus,c),l||!o}var Sk=null,Ck=null,wk=!1,Tk=!1,Ek=!1,Dk=new Set,Ok=0,kk={characterData:!0,childList:!0,subtree:!0};function Ak(){return wk||Sk!==null&&Sk._readOnly}function jk(){wk&&L(13)}function Mk(){Ok>99&&L(14)}function Nk(){return Sk===null&&L(195,Lk()),Sk}function Pk(e){Nk()!==null&&Ck===null&&(Ck=e),Ck!==e&&nS(378)}function Fk(){return Ck===null&&L(337,Lk()),Ck}function Ik(){Fk()._dirtyType=2}function Lk(){let e=0,t=new Set,n=ej.version;if(typeof window<`u`)for(let r of MM(document)){let i=mj(r);if(fj(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Rk(){return Ck}function zk(e,t,n){let r=t.__type,i=oj(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Bk(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Vk(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Hk(e){return Uk(e,Fk()._nodes)}function Uk(e,t){let n=e.type,r=t.get(n);r===void 0&&L(17,n);let i=r.klass;e.type!==i.getType()&&L(18,i.name);let a=i.importJSON(e),o=e.children;if(V(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Uk(o[e],t);a.append(n)}let s=e.$slots;if(s){tP(a)||L(379,i.name);for(let e in s)bP(a,e,Uk(s[e],t))}return a}function Wk(e,t,n){let r=Sk,i=wk,a=Ck;Sk=t,wk=!0,Ck=e;try{return n()}finally{Sk=r,wk=i,Ck=a}}function Gk(e,t){let n=Ek;Ek=!0;try{(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&Jk(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=Sk,u=wk,d=Ck,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){Ck=e,Sk=n,wk=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=CT(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),Tk)throw t;JA(e,null,r,n),mC(e),e._dirtyType=2,Tk=!0,Gk(e,a),Tk=!1;return}finally{p.observe(r,kk),e._updating=f,Sk=l,wk=u,Ck=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set,function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=Pj(e)),delete r[a])}(e,n);let y=i?null:DM(gM(e));if(e._editable&&y!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){Ck=e,Sk=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&EM(t,e,r),dk(o,s,e,y,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(B(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(HM(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())TM(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&TM(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=aN(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=PM().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=lF(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&EM(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,kk),Ck=d,Sk=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),B(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(ET);let b=e._pendingDecorators;b!==null&&(e._decorators=b,e._pendingDecorators=null,Kk(`decorator`,e,!0,b)),function(e,t,n){let r=Fj(t),i=Fj(n);r!==i&&Kk(`textcontent`,e,!0,i)}(e,t||a,n),Kk(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),!f&&Jk(e,e._deferred),(function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Dk.has(e)||(Dk.add(e),setTimeout(()=>{Dk.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,r]=n;Zk(e,t,r)}})(e)})(e,t)}finally{Ek=n}}function Kk(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function qk(e,t,n,r){let i=Hj(e),a;if(!Ek)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Qk(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{qk(a,t,n,r)}),!1}function Jk(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Yk(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&L(191),a._flushSync=!0),o&&e._deferred.push(o),Vk(e,i.tag)),a==null?Zk(e,n,i):n()}}return r}function Xk(){let e=Nk();jk(),e._flushSync=!0}function Zk(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,Vk(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=dA(c||s),l=!0),c._flushSync=o;let u=Sk,d=wk,f=Ck,p=e._updating;Sk=c,wk=!1,e._updating=!0,Ck=e;let m=e._headless||e.getRootElement()===null;nj(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=DM(gM(e));return B(n)||n==null?tk(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Yk(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(B(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Cw(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Oj(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);z(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Cw(r),r!==void 0&&Bk(r,a)&&zk(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){Ok++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Bk(c,a)&&zk(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,Ok++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Yk(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(V(t)&&iC(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(tP(t)&&t.__slots!==null&&iC(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}for(let e of o)a.delete(e);let s=Fk(),c=s._compositionKey;c===null||a.has(c)||(s._compositionKey=null)}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(B(i)){e._slotsUsed&&JO(i);let t=c._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||L(19)}else kO(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Gk(e);return}finally{Sk=u,wk=d,Ck=f,e._updating=p,Ok=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Gk(e)):l&&cj(()=>{Gk(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Qk(e,t,n){Ck===e&&n===void 0?Ak()?Zk(e,t,n):t():Zk(e,t,n)}function $k(){return{...PS,0:``}}function eA(){return{...MS,\"\":0}}var tA=$k(),nA=eA(),rA=YC()({direction:tw(WC([null,`ltr`,`rtl`]),{field:`__dir`}),format:tw(WC([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:tA,setter:`setFormat`,setterTable:nA}),indent:tw(HC(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:nw(HC(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:nw(BC(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function iA(e){if(bM(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var aA=class extends CD{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:iA,extends:CD,generated:zD,json:rA})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return PS[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&lP(this).length===0}isDirty(){let e=Fk()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of lP(this)){let n=uP(this,t);if(V(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(z(t)&&e.push(t),V(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;V(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;V(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return V(e)&&e.getLastDescendant()||e||null}let r=t[e];return V(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:kj(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&L(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:kj(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&L(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=_P(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),V(i)&&r!==n-1&&!i.isInline()&&(e+=CS)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of lP(e)){let r=uP(e,n);r!==null&&(t+=r.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),V(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=MS[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=AS[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return xj(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){jk();let n=nk(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(z(e)||V(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(z(e)||V(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return B(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):ZO(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&MS[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){xD(this)&&L(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||L(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&L(100);let t=e.getNextSibling(),n=e.__key;wj(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,wj(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&L(76),t.__parent=a,o.push(n),d=e}if(c===null)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else{let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=nk();if(B(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;oA(r,t,n)&&sk(r,r.getNode(),this,l,c),oA(i,t,n)&&sk(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||bM(this)||this.remove()}}return i}getDOMSlot(e){return new KS(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(YM(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(bM(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(z(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=aN(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function V(e){return e instanceof aA}function oA(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var sA=class extends CD{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function cA(e){return e instanceof sA}var lA=class extends aA{__cachedText;$config(){return this.config(`root`,{extends:aA})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){L(51)}getTextContent(){let e=this.__cachedText;return e===null||!Ak()&&Fk()._dirtyType!==0?super.getTextContent():e}remove(){L(52)}replace(e){L(53)}insertBefore(e){L(54)}insertAfter(e){L(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)V(e)||cA(e)||L(282);return super.splice(e,t,n)}static importJSON(e){return Ij().updateFromJSON(e)}collapseAtStart(){return!0}};function uA(e){return e instanceof lA}function dA(e){return new hA(QS(e._nodeMap),null,e._slotsUsed)}function fA(){return new hA(new Map([[`root`,new lA]]),null,!1)}function pA(e){let t=e.constructor,n=rC(e);if(V(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(pA(r[e]))}let r=lP(e);if(r.length>0){let i={};for(let n of r){let r=uP(e,n);r===null&&L(366,t.name,n),i[n]=pA(r)}n.$slots=i}return n}function mA(e){return e instanceof hA}var hA=class e{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return Wk(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return tC(typeof e==`boolean`&&e,()=>Wk(null,this,()=>({root:pA(Ij())})))}},gA=class extends aA{$config(){return this.config(`artificial`,{extends:aA})}createDOM(e){return PM().createElement(`div`)}},_A=class extends CD{$config(){return this.config(`linebreak`,{extends:CD,generated:UD,importDOM:{br:e=>xA(e)||SA(e)?null:{conversion:vA,priority:0}}})}getTextContent(){return`\n`}createDOM(){return PM().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function vA(e){return{node:yA()}}function yA(){return SM(new _A)}function bA(e){return e instanceof _A}function xA(e){let t=e.parentElement;if(t!==null&&tN(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&CA(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&CA(n))return!0}}return!1}function SA(e){let t=e.parentElement;if(t!==null&&tN(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&CA(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&CA(r))return!0}return!1}function CA(e){return vj(e)&&/^( |\\t|\\r?\\n)+$/.test(e.textContent||``)}function wA(e,t){let{type:n,key:r,offset:i}=e,a=wM(e.key);return n===`text`?(z(a)||L(266,a.getType(),r),zP(a,t,i)):(V(a)||L(267,a.getType(),r),IA(a,e.offset,t))}function TA(e,t){let{origin:n,direction:r}=t,i=r===`next`;jP(t)?e.set(n.getKey(),t.offset,`text`):NP(t)?z(n)?e.set(n.getKey(),BP(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(PP(t)&&V(n)||L(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function EA(e){let t=nk(),n=B(t)?t:QO();return DA(n,e),Rj(n),n}function DA(e,t){TA(e.anchor,t.anchor),TA(e.focus,t.focus)}function OA(e){let{anchor:t,focus:n}=e,r=wA(t,`next`),i=wA(n,`next`),a=$P(r,i)<=0?`next`:`previous`;return ZP(JP(r,a),JP(i,a))}function kA(e){let{direction:t,origin:n}=e,r=RP(n,DP(t)).getNodeAtCaret();return r?RP(r,t):HP(n.getParentOrThrow(),t)}function AA(e,t=`root`){let n=[e];for(let r=PP(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(kA(r));return n}function jA(e){return!!e&&e.origin.isAttached()}function MA(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=FA(e,r),o=a.anchor.origin;for(;o!==null&&!bM(o);)o=o.getParent();let s=V(o)?o.getFirstChild():null,c=AA(a.anchor,n),l=AA(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(PP(e))u.add(e.origin.getKey());else if(NP(e)){let{origin:t}=e;V(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),wj(e)}for(let e of f)!e.canBeEmpty()&&!bM(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=kA(RP(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=pO(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=zP(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p,m;for(let e of c)if(jA(e)){p=NA(e);break}for(let e of l)if(jA(e)){m=NA(e);break}let h=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c=0;for(;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(bM(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,nN),d=u&&l(o,e=>n.has(e.getKey())&&nN(e));return d&&lP(d).length>0?null:u&&d?[u,d]:null}(p,m,u);if(h){let[e,t]=h;HP(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(PP(e)){let t=e.origin;if(nN(t))return t}else{let t=e.getParentAtCaret();if(t&&nN(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(yM);if(e&&t&&!uA(t)&&e.isEmpty()&&u.has(e.getKey())&&lP(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!uA(n)&&n.isEmpty();){let e=n.getParent();if(e&&uA(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Lj(o,s)===null&&Lj(Ij(),null);let g=[p,m,...c,...l].find(jA);if(g)return XP(JP(NA(g),e.direction));L(269,JSON.stringify(c.map(e=>e.origin.__key)))}function NA(e){let t=function(e){let t=e;for(;PP(t);){let e=WP(t);if(!PP(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(z(t.origin))return jP(t)?t:zP(t.origin,n,n);let r=t.getAdjacentCaret();return NP(r)&&z(r.origin)?zP(r.origin,n,DP(n)):t}function PA(e){return jP(e)&&e.offset!==BP(e.origin,e.direction)}function FA(e,t){return e.direction===t?e:ZP(JP(e.focus,t),JP(e.anchor,t))}function IA(e,t,n){let r=HP(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return JP(r,n)}function LA(e,t=`root`){let n=0,r=e,i=WP(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=WP(r)}return i&&[i,n]}function RA(e){let{origin:t,offset:n,direction:r}=e;if(n===BP(t,r))return e.getSiblingCaret();if(n===BP(t,DP(r)))return kA(e.getSiblingCaret());let[i]=t.splitText(n);return z(i)||L(281),JP(RP(i,`next`),r)}function zA(e,t){return!0}function BA(e,{$copyElementNode:t=xM,$splitTextPointCaretNext:n=RA,rootMode:r=`shadowRoot`,$shouldSplit:i=zA,removeEmptyDestination:a=!1}={}){if(jP(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(PP(e)){let e=kA(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function VA(e,t,n){let r=JP(t,`next`);jP(r)&&(r.offset===0?r=RP(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=RP(r.origin,`next`))),r.origin.is(e)&&(NP(r)||L(342,e.getKey(),e.getType()),r=kA(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=BA(e,n))r=e;return jP(r)&&L(283),r.insert(e.isInline()?GA().append(e):e),JP(RP(e.getLatest(),`next`),t.direction)}function HA(e,t){let n=FA(B(t)?OA(t):t,`next`),r=oP(n.anchor.origin),i=oP(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=NA(HP(e,`next`)),o=JP(NA(HP(e,`previous`)),`next`);return $P(n.anchor,a)<=0&&$P(n.focus,o)>=0}var UA=class extends aA{$config(){return this.config(`paragraph`,{extends:aA,generated:HD,importDOM:{p:()=>({conversion:WA,priority:0})}})}createDOM(e){let t=PM().createElement(`p`),n=nM(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(YM(t)){this.isEmpty()&&t.append(PM().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(z),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!B(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(HA(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=GA();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>z(e)&&!/\\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function WA(e){let t=GA();if(_N(t,e),hN(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in MS&&t.setFormat(n)}return gN(t,e),{node:t}}function GA(){return SM(new UA)}function KA(e){return e instanceof UA}function qA(e){console.warn(e)}function JA(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=fA(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){let n=`__lexicalKey_${t._key}`;delete e[n]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),jj(n,e,`root`))}function YA(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of JN(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var XA={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=sj(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>V(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>V(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function ZA(e){let t=e||{},n=Rk(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=fA(),s=t.namespace||(i===null?Uj():i._config.namespace),c=t.editorState,l=[lA,iO,_A,gO,UA,gA,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===CD||n.prototype instanceof CD)){let r=`<unknown>`;try{r=JSON.parse(YS)}catch{}L(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}UN(n);let a=n.getType(),o=YA(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:dw(l[e]),transforms:o})}}let h=new ej(o,i,m,{disableEvents:a,dom:{...XA,...e&&e.dom},namespace:s,theme:r},u||console.error,d||qA,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(kT,YE,0),e.registerCommand(AT,ZE,0),e.registerCommand(jT,$E,0),e.registerCommand(MT,eD,0),e.registerCommand(GT,uD,0)}(h),h}function QA(e,t){let n=e.get(t);e.delete(t),n&&n()}function $A(e,t,n){return e.set(t,n),QA.bind(null,e,t)}var ej=class{static version=YS;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_keyDownShortcuts;_inputState;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new $S,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Uj(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return $A(this._listeners.update,e)}registerEditableListener(e){return $A(this._listeners.editable,e)}registerDecoratorListener(e){return $A(this._listeners.decorator,e)}registerTextContentListener(e){return $A(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return fF($A(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&L(35);let r=this._commands;r.has(e)||r.set(e,[new XS,new XS,new XS,new XS,new XS]);let i=r.get(e);i===void 0&&L(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&L(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=fN(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=fN(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=kj(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:DD}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return H(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=nM(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,JA(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||_D(t),n!=null&&t.classList.remove(...n)),e!==null){let t=hM(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,mC(this),this._updateTags.add(DD),Gk(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;PE.set(e,n);let r=FE.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},FE.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=dD(e);i.push(IE.register(n));let a=NE();for(let n=0;n<a.length;n++){let[r,o]=a[n],s=typeof o==`function`?e=>{hD(e)||(mD(e),(t.isEditable()||r===`click`)&&o(e,t))}:e=>{if(hD(e))return;mD(e);let n=t.isEditable();switch(r){case`cut`:return n&&H(t,pE,e);case`copy`:return H(t,fE,e);case`paste`:return n&&H(t,LT,e);case`dragstart`:return n&&H(t,lE,e);case`dragover`:return n&&H(t,uE,e);case`dragend`:return n&&H(t,dE,e);case`focus`:return n&&H(t,yE,e);case`blur`:return n&&H(t,bE,e);case`drop`:return n&&H(t,sE,e)}};i.push(AE(e,r,s))}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(DD),Gk(this);Kk(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&L(38);let n=e;n._readOnly&&(n=dA(e),n._selection=e._selection?e._selection.clone():null),pC(this);let r=this._pendingEditorState,i=t===void 0?null:t.tag;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),Gk(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Qk(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(let[e,t]of n._nodeMap.entries())V(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=fA(),i=Sk,a=wk,o=Ck,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,Sk=r,wk=!1,Ck=t,nj(null);try{let i=t._nodes;Uk(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,Sk=i,wk=a,Ck=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&Gk(this),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Zk(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Qk(this,()=>{let r=nk(),i=Ij();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Rj(r.clone()),fM(`focus`),pM(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=DM(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Kk(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Ik()))}toJSON(){return{editorState:this._editorState.toJSON(nC())}}},tj=null;function nj(e){tj=e}var rj=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),ij=1;function aj(){ij=1}function oj(e,t){let n=sj(e,t);return n===void 0&&L(30,t),n}function sj(e,t){return e._nodes.get(t)}var cj=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function lj(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return yj(t)||kM(t)?UM(t):null})():t;if(!YM(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=Nj(n),i=n.nodeName;return wD(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&mj(n)==null)}var uj=lj;function dj(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return pj(t)===e&&e.read(`latest`,()=>!lj(t))}function fj(e){return e instanceof ej}function pj(e){let t=e;for(;t!=null;){let e=mj(t);if(fj(e))return e;t=lM(t)}return null}function mj(e){return e?e.__lexicalEditor:null}function hj(e){return OS.test(e)?`rtl`:kS.test(e)?`ltr`:null}function gj(e){return vO(e)||e.isToken()}function _j(e){return gj(e)||e.isSegmented()}function vj(e){return XM(e)&&e.nodeType===3}function yj(e){return XM(e)&&e.nodeType===9}function bj(e){let t=e;for(;t!=null;){if(vj(t))return t;t=t.firstChild}return null}function xj(e,t,n){let r=AS[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~AS.superscript:t===`superscript`?i&=~AS.subscript:t===`lowercase`?(i&=~AS.uppercase,i&=~AS.capitalize):t===`uppercase`?(i&=~AS.lowercase,i&=~AS.capitalize):t===`capitalize`&&(i&=~AS.lowercase,i&=~AS.uppercase),i}function Sj(e){return z(e)||bA(e)||cA(e)}function Cj(e,t){let n=function(){let e=tj;return tj=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);jk(),Mk();let r=Fk(),i=Nk(),a=``+ij++;i._nodeMap.set(a,e),V(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function wj(e){rP(e)!==null&&L(380,e.__key,String(rP(e)));let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}var Tj=wj;function Ej(e){Mk(),xD(e)&&L(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent===null?nP(t)?t.__slotHost:null:t.__parent,r=Nk(),i=Fk(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?nP(e)?e.__slotHost:null:e.__parent}}(n,a,o);let s=t.__key;i._dirtyType===0&&(i._dirtyType=1),V(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function Dj(e){jk();let t=Fk(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=kj(n);e!==null&&e.getWritable()}if(e!==null){let t=kj(e);t!==null&&t.getWritable()}}}function Oj(){return Ak()?null:Fk()._compositionKey}function kj(e,t){let n=(t||Nk())._nodeMap.get(e);return n===void 0?null:n}function Aj(e,t){let n=Mj(e,Fk());return n===void 0?null:kj(n,t)}function jj(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Mj(e,t){return e[`__lexicalKey_${t._key}`]}function Nj(e,t){let n=e;for(;n!=null;){let e=Aj(n,t);if(e!==null)return e;n=lM(n)}return null}function Pj(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Fj(e){return e.read(()=>Ij().getTextContent())}function Ij(){return Nk()._nodeMap.get(`root`)}function Lj(e,t){if(!(bM(e)&&e.isAttached()&&e.isEmpty()&&(uA(e)||t!==null&&nN(t))))return null;let n=GA();return e.append(n),n}function Rj(e){jk();let t=Nk();e!==null&&(e.dirty=!0,e.setCachedNodes(null),B(e)&&Fk()._slotsUsed&&JO(e)),t._selection=e}function zj(){jk(),pC(Fk())}function Bj(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Mj(n,t);if(e!==void 0)return e;n=lM(n)}return null}(e,Fk());return t===null?null:kj(t)}function Vj(e){return/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g.test(e)}function Hj(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function Uj(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function Wj(e){return vj(e)?e.nodeValue:null}function Gj(e,t,n){let r=DM(gM(t));if(r===null)return;let i=LM(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=Wj(a),r=Nj(a);if(t!==null&&z(r)){if((t===SS||t===wS)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&Kj(r,t,o,s,e)}}}function Kj(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing();if(a.isToken()&&o)return;let s=t;if((o||i)&&(t.endsWith(SS)&&(s=t.slice(0,-SS.length)),i)){let e=wS,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){let t=nk();if(s===``){if(Dj(null),gS||mS||yS)a.remove();else{let e=Fk();qj(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let i=a.getParent(),c=rk(),l=a.getTextContentSize(),u=Oj(),d=a.getKey();if(a.isToken()&&!o||u!==null&&d===u&&!o||B(c)&&(i!==null&&!i.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!a.canInsertTextBefore()&&!o||c.focus.key===e.__key&&c.focus.offset===l&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!B(t)||n===null||r===null)return void qj(a,s,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=pO(a.getTextContent());a.replace(e),a=e}qj(a,s,t)}}}function qj(e,t,n){if(e.setTextContent(t),B(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=BP(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Jj(e,t){let n=e[LS];return n&&t!==lS?{...e,ctrlKey:e[n],[n]:e.ctrlKey}:e}function Yj(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function Xj(e,t){return Yj(e,t,`altKey`)&&Yj(e,t,`ctrlKey`)&&Yj(e,t,`shiftKey`)&&Yj(e,t,`metaKey`)}function Zj(e,t,n){if(!Xj(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith(`Digit`)&&/^\\d$/.test(t))return e.code===`Digit${t}`;let r=`Key`+t.toUpperCase();return e.code===r}function Qj(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(uA(e))return t;t=e}return null}function $j(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(ww(e),!uA(t))return e;let u=Qj(n.getNode());return V(u)&&u.isShadowRoot()&&u.is(Qj(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function eM(e){let t=Ij();if(B(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(uA(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),$j(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(V(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),$j(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),$j(e,a),e)}{let e=t.select(0,t.getChildrenSize());return Rj($j(e,t)),e}}function tM(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function nM(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=lF(i);return n[t]=e,e}return i}function rM(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&L(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function iM(e){let t=e.getType(),n=Nk();if(n._readOnly){let e=fN(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function aM(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function oM(e,t){let n=e.offset;if(e.type===`element`)return aM(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?aM(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function sM(e){let t=gM(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function H(e,t,...n){return qk(e,t,n[0],e)}function cM(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&L(75,t),n}function lM(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return kM(n)?n.host:null}function uM(e){return yj(e)?e:YM(e)?e.ownerDocument:null}function dM(e){return Fk()._updateTags.has(e)}function fM(e){jk(),Fk()._updateTags.add(e)}function pM(e){jk(),Fk()._deferred.push(e)}function mM(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function hM(e){let t=uM(e);return t?t.defaultView:null}function gM(e){let t=e._window;return t===null&&L(78),t}function _M(e){return V(e)&&e.isInline()||cA(e)&&e.isInline()}function vM(e){let t=e.getLatest();for(;t!==null;){if(rP(t)!==null&&V(t))return t;let e=t.getParentOrThrow();if(bM(e))return e;t=e}return t}function yM(e){return V(e)&&e.isShadowRoot()}function bM(e){return uA(e)||yM(e)}function xM(e,t=!1){let n=e.constructor.clone(e,rj);return Cj(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function SM(e){let t=Fk(),n=e.getType(),r=sj(t,n);r===void 0&&L(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||L(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||L(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&L(203,e.constructor.name,n,r.name,r.getType()),t}return e}function CM(e,t){!uA(e.getParent())||V(t)||cA(t)||L(99)}function wM(e){let t=kj(e);return t===null&&L(63,e),t}function TM(e){if(!e||e.isInline())return!1;if(cA(e))return!0;if(V(e)){if(e.isShadowRoot()){let t=e.getParent();return!(V(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function EM(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function DM(e){return iS?(e||window).getSelection():null}function OM(e){let t=hM(e);return t?t.getSelection():null}function kM(e){return ZM(e)&&`host`in e}var AM=[];function jM(e){let t=e.getRootNode();if(t===e||!kM(t))return AM;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!kM(e))break;n.push(e),r=e.host}return n}function*MM(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor=\"true\"]`);let e=(yj(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function NM(e){return e===null?document:e.ownerDocument}function PM(){let e=Rk();return NM(e===null?null:e._rootElement)}function FM(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=jM(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function IM(e,t){let n=FM(e,t);if(n!==null){let e=zM(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function LM(e,t){let n=FM(e,t);return n===null?e:BM(n,VM(e))}function RM(e,t){let n=FM(e,t);if(n===null)return{points:e,range:e.rangeCount>0?e.getRangeAt(0):null};let r=zM(n)??(e.rangeCount>0?e.getRangeAt(0):null);return{points:BM(n,VM(e)),range:r}}function zM(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function BM(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function VM(e){return e.direction}function HM(e){let t=e.getRootNode();return yj(t)||kM(t)?t.activeElement:null}function UM(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function WM(e){let t=e.target;if(t!==null&&YM(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function GM(e,t){let n=e.getChildAtIndex(t);n??=e,bM(e)&&L(102);let r=e=>{let t=e.getParentOrThrow(),i=bM(t),a=e!==n||i?xM(e):e;if(i)return V(e)&&V(a)||L(133),e.insertAfter(a),[e,a,a];{let[n,i,o]=r(t),s=e.getNextSiblings();return o.append(a,...s),[n,i,a]}},[i,a]=r(n);return[i,a]}function KM(e){return YM(e)&&e.tagName===`A`}function qM(e){return YM(e)&&e.tagName===`TR`}function JM(e){return YM(e)&&(e.tagName===`TD`||e.tagName===`TH`)}function YM(e){return XM(e)&&e.nodeType===1}function XM(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function ZM(e){return XM(e)&&e.nodeType===11}var QM=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function $M(e){return!(!YM(e)||!e.style.display.startsWith(`inline`))||QM.test(e.nodeName)}var eN=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function tN(e){return(!YM(e)||!e.style.display.startsWith(`inline`))&&eN.test(e.nodeName)}function nN(e){if(cA(e)&&!e.isInline())return!0;if(!V(e)||bM(e))return!1;let t=e.getFirstChild(),n=t===null||bA(t)||z(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function rN(){return Fk()}function iN(e=rN()){return e._config.dom||XA}function aN(e,t,n=rN()){let r=iN(n).$getDOMSlot(e,t,n);return V(e)&&(cN(r)||L(344,e.getKey(),e.getType())),r}function oN(e,t,n,r){let i=e.read(`latest`,()=>{let r=kj(t);return r===null?null:function(e,t,n=rN()){let r=uP(e,t);if(r===null)return null;let i=n.getElementByKey(r.getKey());return i===null?null:i.parentElement}(r,n,e)});return i!==null&&(i.parentElement!==r&&r.appendChild(i),i.style.display=``),i}function sN(e,t,n){n.style.display=`none`;let r=e.getElementByKey(t);r!==null&&n.parentElement!==r&&r.insertBefore(n,r.firstChild)}function cN(e){return e instanceof KS}function lN(e,t,n=rN()){return bj(aN(e,t,n).element)}var uN=new WeakMap,dN=new Map;function fN(e){if(!e._readOnly&&e.isEmpty())return dN;e._readOnly||L(192);let t=uN.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),uN.set(e,t)),t}function pN(e){let t=e.constructor.clone(e,rj);return t.afterCloneFrom(e),t}function mN(e){return(t=pN(e))[bD]=!0,t;var t}function hN(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function gN(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function _N(e,t){let n=t.style.textAlign;return n&&n in MS?e.setFormat(n):e}function vN(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function yN(e){return!0===e.__lexicalUnmanaged}function bN(e,t=rN()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function xN(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(YM(n)&&n.hasAttribute(`data-lexical-slot`)||Mj(n,t)!==void 0)return!1;n=lM(n)}return!1}function SN(e,t){return LC(e,t)&&e[t]!==CD[t]}var CN=new WeakMap;function wN(e){let t=CN.get(e);return t===void 0?function(e){let t=e.prototype!=null&&RS in e.prototype?e.prototype[RS]():void 0,n=function(e){if(!(e===CD||e.prototype instanceof CD)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{ej.version&&(n=JSON.parse(ej.version))}catch{}L(290,e.name,t,n)}return e===sA||e===aA||e===CD}(e),r=!n&&SN(e,`getType`)?e.getType:void 0,i=r&&!(EN in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:LC(e.prototype,RS),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};CN.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=NN(e);for(let[i,a]of r){let r=LN(e,i,a);if(r===null)continue;if(_C(r)){let t=r.field;if(t===`__proto__`&&L(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])LC(t,String(r))||L(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&L(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?DN:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of NN(e).fieldsDerivedFirst){let a=IN(e,r,i);if(a===null)continue;if(_C(a)){let o=a.field;o===`__proto__`&&L(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&L(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&L(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?FN:[...n.values()]}(e),i=NN(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of JN(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,TN(wN(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:BN(r),setters:t},function(e,t,n,r){if(!t&&n){if(!SN(e,`getType`)){let t=e,r=function(){return this===t?n:CD.getType.call(this)};r[EN]=!0,e.getType=r}if(SN(e,`clone`)||(e.clone=(t,n)=>{nj(t);let r=new e;return n!==rj&&r.afterCloneFrom(t),r}),SN(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=XN(e);return n.updateFromJSON===CD.prototype.updateFromJSON?function(e,t){return HN(e.__state||t.$!==void 0?hw(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!SN(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of JN(e)){let e=t.prototype;if(LC(e,`afterCloneFrom`))continue;let r=qN(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?TN(wN(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[GN]=!0}}(e)}catch(t){throw CN.delete(e),t}return s}(e):t}function TN(e){let{compiled:t}=e;return t===void 0&&L(422,e.config.klass.name),t}var EN=Symbol(`lexical.synthesizedGetType`),DN=[];function ON(e,t,n,r){let i=n.method===void 0?r:n.method,a=NN(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return kN(o,s,i)&&kN(o,s,r)?n:i}function kN(e,t,n){return e[n]===t[n]}function AN(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function jN(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var MN={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function NN(e){let t=wN(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of JN(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?MN:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}function PN(e){let{fieldsDerivedFirst:t,flatStates:n}=NN(e),r={};for(let e of n)e.schema&&(r[e.key]=e.schema);for(let[e,n]of t)r[e]=n;return r}var FN=[];function IN(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?jN(t):r;return _C(i)?ON(e,t,i,jN(t)):i}function LN(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?AN(t):r;return _C(i)?ON(e,t,i,AN(t)):i}function RN(e){return e}function zN(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function BN(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&zN(i,r)}}function VN(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function HN(e,t){let{flatStates:n,generated:r,setters:i}=TN(wN(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=uw(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?RN(e)[i.field]=i.setterTable===void 0?a:LC(i.setterTable,a)?i.setterTable[a]:VN(i):i.setter.call(e,a)}return e}(a,t,i)}function UN(e){return wN(e).config}function WN(e){let t=[];for(let n of[e.getter,e.setter])_C(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var GN=`__lexicalSynthesizedAfterCloneFrom`;function KN(e){let{declaredBy:t,fieldsBaseFirst:n}=NN(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of WN(a))r.includes(e)||r.push(e);return r}function qN(e){let t=KN(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of JN(e))if(t!==e)for(let e of KN(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*JN(e){for(let t=e;t&&(t===CD||wD(t.prototype));){let e=UN(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||$N(t)}}function YN(e){let t=new Map,n=new Map;for(let r of e){let{ownNodeType:e}=UN(r);e&&(n.set(e,r),t.set(e,new Set))}for(let[e,r]of n)for(let{ownNodeType:n}of JN(r)){let r=n&&t.get(n);r&&r.add(e)}return t}function XN(e){let t=rN();jk();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:SM(r)}var ZN=(e,t)=>{let n=e;for(;n!=null&&!uA(n);){if(t(n))return n;n=n.getParent()}return null};function QN(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?kj(r):t.get(r);e??L(174),n.push(r),r=e.__next}return n}function $N(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}var eP=new Map;function tP(e){return V(e)||cA(e)}function nP(e){return V(e)||cA(e)}function rP(e){let t=e.getLatest();return nP(t)?t.__slotHost:null}function iP(e){let t=rP(e);if(t===null)return null;let n=kj(t);return V(n)||cA(n)||L(370),n}function aP(e){let t=iP(e);if(t===null)return null;let n=e.getLatest().__key;for(let[e,r]of cP(t))if(r===n)return e;return null}function oP(e){let t=e.getLatest();for(;t!==null;){if(rP(t)!==null)return t;t=t.getParent()}return null}function sP(e){if(e===null)return null;let t=B(e)?e.anchor.getNode():e.getNodes()[0]??null;return t===null?null:oP(t)}function cP(e){let t=e.getLatest();return tP(t)&&t.__slots!==null?t.__slots:eP}function lP(e){return Array.from(cP(e).keys())}function uP(e,t){let n=cP(e).get(t);return n===void 0?null:kj(n)}var dP=[`__proto__`,`constructor`,`prototype`],fP=Symbol(`slotMapOwner`);function pP(e){let t=e.__slots;return t!==null&&t[fP]===e||(t=new Map(t),t[fP]=e,e.__slots=t),t}var mP=new WeakMap,hP=[];function gP(e){for(let{ownNodeConfig:t}of JN(e)){let e=t&&t.slots;if(e)return e}return hP}function _P(e){let t=``;for(let n of lP(e)){let r=uP(e,n);r!==null&&(t+=r.getTextContent())}return t}function vP(e,t,n){let r=n.get(e),i=n.get(t);return r===void 0?i===void 0?e<t?-1:+(e>t):1:i===void 0?-1:r-i}function yP(e){let t=e.__slots;if(t===null||t.size<2)return;let n=function(e){let t=mP.get(e);if(t===void 0){let n=gP(e),r=new Map;for(let t of n)dP.includes(t)&&L(371,e.name,t),r.has(t)&&L(372,e.name,t),r.set(t,r.size);t=r,mP.set(e,t)}return t}(e.constructor),r=null,i=!0;for(let e of t.keys()){if(r!==null&&vP(r,e,n)>0){i=!1;break}r=e}if(i)return;let a=Array.from(t).sort(([e],[t])=>vP(e,t,n));t.clear();for(let[e,n]of a)t.set(e,n)}function bP(e,t,n){t!==`__proto__`&&t!==`constructor`&&t!==`prototype`||L(373,t);let r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!V(n)&&!cA(n)||n.isInline())&&L(374,n.__key);let i=e.getWritable(),a=pP(i),o=a.get(t);o!==void 0&&SP(o);let s=n.getWritable(),c=iP(s);if(c!==null){let e=aP(s);e!==null&&pP(c.getWritable()).delete(e),s.__slotHost=null}return wj(s),s.__slotHost=i.__key,a.set(t,s.__key),yP(i),Fk()._slotsUsed=!0,Nk()._slotsUsed=!0,i}function xP(e,t){let n=e.getWritable();if(n.__slots===null)return n;let r=n.__slots.get(t);return r!==void 0&&(SP(r),pP(n).delete(t)),n}function SP(e){let t=kj(e);if(t===null)return;let n=t.getWritable();nP(n)||L(377,e),n.__slotHost=null,n.remove()}var CP={next:`previous`,previous:`next`},wP=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return QP({hasNext:NP,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return RP(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return RP(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&L(263,Array.from(o).join(` `))}else i.insert(e);i=RP(e,this.direction)}for(let e of o.values())e.remove();return this}},TP=class e extends wP{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:HP(e,this.direction)}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=DP(this.direction);return RP(this.getNodeAtCaret(),e)||HP(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},EP={root:uA,shadowRoot:bM};function DP(e){return CP[e]}function OP(e,t=`root`){return e===null||EP[t](e)?null:rP(e)===null?e:null}var kP=class e extends wP{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:RP(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return V(this.origin)?HP(this.origin,this.direction):null}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=DP(this.direction);return RP(this.getNodeAtCaret(),e)||HP(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof AP)&&this.direction===t.direction&&this.origin.is(t.origin)}},AP=class e extends wP{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:zP(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){return zP(this.origin,DP(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof kP||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return RP(this.origin,this.direction)}};function jP(e){return e instanceof AP}function MP(e){return e instanceof wP}function NP(e){return e instanceof kP}function PP(e){return e instanceof TP}var FP={next:class extends AP{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends AP{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},IP={next:class extends kP{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends kP{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},LP={next:class extends TP{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends TP{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function RP(e,t){return e?new IP[t](e):null}function zP(e,t,n){return e?new FP[t](e,BP(e,n)):null}function BP(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&nS(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function VP(e,t){return new KP(e,t)}function HP(e,t){return V(e)?new LP[t](e):null}function UP(e){return e&&e.getChildCaret()||e}function WP(e){return e&&UP(e.getAdjacentCaret())}var GP=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return jP(t)?function(e,t){let{direction:n,origin:r}=e;return VP(e,BP(r,t===`focus`?DP(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[VP(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=jP(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=jP(n),i=t=>t.isSameNodeCaret(n)?null:WP(t)||t.getParentCaret(e);return QP({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},KP=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return zP(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function qP(e){return e instanceof KP}function JP(e,t){return e.direction===t?e:e.getFlipped()}function YP(e){return ZP(e,JP(HP(Ij(),DP(e.direction)),e.direction))}function XP(e){return ZP(e,e)}function ZP(e,t){return e.direction!==t.direction&&L(265),new GP(e,t,e.direction)}function QP(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function $P(e,t){let n=rF(e.origin,t.origin);switch(n===null&&L(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return eF(n)}}function eF(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function tF(e,t){return t.is(e)}function nF(e){return V(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function rF(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=nF(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=nF(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(tF(e,r)||L(276),{commonAncestor:r,type:`ancestor`}):i===null?(tF(t,r)||L(277),{commonAncestor:r,type:`descendant`}):((V(a)||tF(e,a))&&(V(i)||tF(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||L(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function iF(e){return e}function aF(...e){return e}function oF(...e){return e}function sF(e){return e}function cF(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function lF(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\\S+/g))t.push(e);return t}function uF(e,...t){let n=lF(...t);n.length>0&&e.classList.add(...n)}function dF(e,...t){let n=lF(...t);n.length>0&&e.classList.remove(...n)}function fF(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function pF(e,t,n){return fF(...Object.entries(t).map(([t,r])=>AE(e,t,r,n)))}var U=tS,mF=U.$addUpdateTag,hF=U.$applyNodeReplacement,gF=U.$assumeActiveEditor,_F=U.$caretFromPoint,vF=U.$caretRangeFromSelection,yF=U.$cloneWithProperties,bF=U.$cloneWithPropertiesEphemeral,xF=U.$comparePointCaretNext,SF=U.$copyNode,CF=U.$create;U.$createChildrenArray;var wF=U.$createLineBreakNode,TF=U.$createNodeSelection,EF=U.$createParagraphNode,DF=U.$createPoint,OF=U.$createRangeSelection;U.$createRangeSelectionFromDom;var kF=U.$createTabNode,AF=U.$createTextNode,jF=U.$exportNodeJSON,MF=U.$extendCaretToRange,NF=U.$findMatchingParent,PF=U.$flushSyncAfterUpdate,FF=U.$formatText,IF=U.$fullReconcile,LF=U.$generateNodesFromRawText,RF=U.$getAdjacentChildCaret;U.$getAdjacentNode;var zF=U.$getAdjacentSiblingOrParentSiblingCaret;U.$getCaretInDirection;var BF=U.$getCaretRange,VF=U.$getCaretRangeInDirection,HF=U.$getCharacterOffsets,UF=U.$getChildCaret,WF=U.$getChildCaretAtIndex,GF=U.$getChildCaretOrSelf,KF=U.$getCollapsedCaretRange;U.$getCommonAncestor,U.$getCommonAncestorResultBranchOrder;var qF=U.$getDOMSlot,JF=U.$getDOMTextNode,YF=U.$getDocument,XF=U.$getEditor,ZF=U.$getEditorDOMRenderConfig,QF=U.$getNearestNodeFromDOMNode;U.$getNearestRootOrShadowRoot;var $F=U.$getNodeByKey;U.$getNodeByKeyOrThrow;var eI=U.$getNodeFromDOMNode,tI=U.$getPreviousSelection,nI=U.$getRoot,W=U.$getSelection,rI=U.$getSelectionSlotFrame,iI=U.$getSiblingCaret,aI=U.$getSlot,oI=U.$getSlotFrame,sI=U.$getSlotHost;U.$getSlotNameWithinHost;var cI=U.$getSlotNames,lI=U.$getState;U.$getStateChange,U.$getTextContent,U.$getTextNodeOffset;var uI=U.$getTextPointCaret;U.$getTextPointCaretSlice,U.$getWritableNodeState;var dI=U.$hasAncestor;U.$hasUpdateTag;var fI=U.$insertNodeToNearestRootAtCaret,pI=U.$insertNodes,mI=U.$isBlockElementNode,hI=U.$isBlockFullySelected,gI=U.$isChildCaret;U.$isCompactExport;var _I=U.$isDecoratorNode,vI=U.$isEditorState;U.$isElementDOMSlot;var G=U.$isElementNode,yI=U.$isExtendableTextPointCaret;U.$isInlineElementOrDecoratorNode,U.$isInlineFormattable;var bI=U.$isLeafNode,xI=U.$isLexicalNode,SI=U.$isLineBreakNode;U.$isNodeCaret;var CI=U.$isNodeSelection,wI=U.$isParagraphNode,K=U.$isRangeSelection,TI=U.$isRootNode,EI=U.$isRootOrShadowRoot,DI=U.$isSelectionCapturedInDecoratorInput,OI=U.$isShadowRootNode,kI=U.$isSiblingCaret;U.$isSlotChild;var AI=U.$isSlotHost,jI=U.$isTabNode,q=U.$isTextNode,MI=U.$isTextPointCaret;U.$isTextPointCaretSlice;var NI=U.$isTokenOrSegmented;U.$isTokenOrTab,U.$markSlotEditable;var PI=U.$needsBlockCursorBeside;U.$nodesOfType;var FI=U.$normalizeCaret,II=U.$normalizeSelection__EXPERIMENTAL;U.$onUpdate;var LI=U.$parseSerializedNode;U.$removeFromParent,U.$removeSlot;var RI=U.$removeTextFromCaretRange,zI=U.$rewindSiblingCaret,BI=U.$selectAll;U.$setCompositionKey;var VI=U.$setDirectionFromDOM,HI=U.$setFormatFromDOM,UI=U.$setPointFromCaret,WI=U.$setSelection,GI=U.$setSelectionFromCaretRange;U.$setSlot;var KI=U.$setState,qI=U.$setTextFormat,JI=U.$splitAtPointCaretNext,YI=U.$splitNode,XI=U.$updateDOMSelection;U.$updateRangeSelectionFromCaretRange,U.$withCompactExport;var ZI=U.ArtificialNode__DO_NOT_USE;U.BEFORE_INPUT_COMMAND,U.BLUR_COMMAND;var QI=U.CAN_REDO_COMMAND,$I=U.CAN_UNDO_COMMAND,eL=U.CAN_USE_BEFORE_INPUT,tL=U.CAN_USE_DOM,nL=U.CLEAR_EDITOR_COMMAND,rL=U.CLEAR_HISTORY_COMMAND,iL=U.CLICK_COMMAND,aL=U.COLLABORATION_TAG,oL=U.COMMAND_PRIORITY_BEFORE_CRITICAL,sL=U.COMMAND_PRIORITY_BEFORE_EDITOR;U.COMMAND_PRIORITY_BEFORE_HIGH,U.COMMAND_PRIORITY_BEFORE_LOW,U.COMMAND_PRIORITY_BEFORE_NORMAL;var cL=U.COMMAND_PRIORITY_CRITICAL,lL=U.COMMAND_PRIORITY_EDITOR;U.COMMAND_PRIORITY_HIGH;var uL=U.COMMAND_PRIORITY_LOW,dL=U.COMMAND_PRIORITY_NORMAL;U.COMPOSITION_END_COMMAND;var fL=U.COMPOSITION_END_TAG,pL=U.COMPOSITION_START_COMMAND,mL=U.COMPOSITION_START_TAG,hL=U.CONTROLLED_TEXT_INSERTION_COMMAND,gL=U.CONTROL_OR_ALT,_L=U.CONTROL_OR_META;U.CONTROL_OR_OTHER_KEY;var vL=U.COPY_COMMAND,yL=U.CUT_COMMAND,bL=U.CUT_TAG,xL=U.DEFAULT_EDITOR_DOM_CONFIG,SL=U.DELETE_CHARACTER_COMMAND,CL=U.DELETE_LINE_COMMAND,wL=U.DELETE_WORD_COMMAND;U.DRAGEND_COMMAND;var TL=U.DRAGOVER_COMMAND,EL=U.DRAGSTART_COMMAND,DL=U.DROP_COMMAND,OL=U.DecoratorNode,kL=U.ElementNode;U.FOCUS_COMMAND;var AL=U.FORMAT_ELEMENT_COMMAND,jL=U.FORMAT_TEXT_COMMAND,ML=U.HISTORIC_TAG,NL=U.HISTORY_MERGE_TAG,PL=U.HISTORY_PUSH_TAG,FL=U.INDENT_CONTENT_COMMAND;U.INPUT_COMMAND;var IL=U.INSERT_LINE_BREAK_COMMAND,LL=U.INSERT_PARAGRAPH_COMMAND,RL=U.INSERT_TAB_COMMAND,zL=U.INTERNAL_$expandSelectionToWholeDocument,BL=U.INTERNAL_$isBlock;U.IS_ALL_FORMATTING;var VL=U.IS_ANDROID,HL=U.IS_ANDROID_CHROME,UL=U.IS_APPLE,WL=U.IS_APPLE_WEBKIT,GL=U.IS_BOLD,KL=U.IS_CHROME,qL=U.IS_CODE,JL=U.IS_FIREFOX,YL=U.IS_HIGHLIGHT,XL=U.IS_IOS,ZL=U.IS_ITALIC,QL=U.IS_SAFARI,$L=U.IS_STRIKETHROUGH,eR=U.IS_SUBSCRIPT,tR=U.IS_SUPERSCRIPT,nR=U.IS_UNDERLINE,rR=U.KEY_ARROW_DOWN_COMMAND,iR=U.KEY_ARROW_LEFT_COMMAND,aR=U.KEY_ARROW_RIGHT_COMMAND,oR=U.KEY_ARROW_UP_COMMAND,sR=U.KEY_BACKSPACE_COMMAND,cR=U.KEY_DELETE_COMMAND,lR=U.KEY_DOWN_COMMAND,uR=U.KEY_ENTER_COMMAND,dR=U.KEY_ESCAPE_COMMAND;U.KEY_MODIFIER_COMMAND;var fR=U.KEY_SPACE_COMMAND,pR=U.KEY_TAB_COMMAND,mR=U.LineBreakNode,hR=U.MOVE_TO_END,gR=U.MOVE_TO_START;U.NODE_STATE_DIRECT,U.NODE_STATE_KEY,U.NODE_STATE_LATEST;var _R=U.OUTDENT_CONTENT_COMMAND,vR=U.PASTE_COMMAND,yR=U.PASTE_TAG,bR=U.ParagraphNode,xR=U.REDO_COMMAND,SR=U.REMOVE_TEXT_COMMAND,CR=U.RootNode,wR=U.SELECTION_CHANGE_COMMAND,TR=U.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,ER=U.SELECT_ALL_COMMAND,DR=U.SET_TEXT_FORMAT_COMMAND;U.SKIP_COLLAB_TAG;var OR=U.SKIP_DOM_SELECTION_TAG,kR=U.SKIP_SCROLL_INTO_VIEW_TAG,AR=U.SKIP_SELECTION_FOCUS_TAG,jR=U.TEXT_TYPE_TO_FORMAT,MR=U.TabNode,NR=U.TextNode,PR=U.UNDO_COMMAND,FR=U.addClassNamesToElement,IR=U.aliasTableOf,LR=U.aliasedValue;U.arrayValue;var RR=U.booleanValue,zR=U.buildImportMap,BR=U.compileKeyboardShortcuts,VR=U.configExtension,HR=U.createCommand,UR=U.createEditor,WR=U.createRefCountedRegistry;U.createSharedNodeState;var GR=U.createState,KR=U.declarePeerDependency;U.declaredAccepts;var qR=U.defineExtension,JR=U.enumValue,YR=U.findAllLexicalElementsDeep,XR=U.flipDirection,ZR=U.getActiveElement,QR=U.getActiveElementDeep,$R=U.getComposedEventTarget;U.getComposedSchemaFields,U.getComposedStaticRange,U.getDOMOwnerDocument;var ez=U.getDOMSelection;U.getDOMSelectionFromTarget;var tz=U.getDOMSelectionPoints;U.getDOMSelectionRange,U.getDOMSelectionRangeAndPoints;var nz=U.getDOMShadowRoots,rz=U.getDOMTextNode;U.getDeclaredSlots;var iz=U.getEditorPropertyFromDOMNode,az=U.getNearestEditorFromDOMNode,oz=U.getParentElement;U.getRegisteredNode,U.getRegisteredNodeOrThrow;var sz=U.getRegisteredSubtypeMap,cz=U.getRootOwnerDocument,lz=U.getStaticNodeConfig,uz=U.getStyleObjectFromCSS,dz=U.getTextDirection;U.getTransformSetFromKlass;var fz=U.getterTableOf,pz=U.isBlockDomNode;U.isCurrentlyReadOnlyMode,U.isDOMCapturingSelection;var mz=U.isDOMDocumentNode,hz=U.isDOMNode,gz=U.isDOMShadowRoot,_z=U.isDOMTextNode;U.isDOMUnmanaged;var vz=U.isDocumentFragment,yz=U.isExactShortcutMatch,bz=U.isHTMLAnchorElement,J=U.isHTMLElement;U.isHTMLTableCellElement,U.isHTMLTableRowElement;var xz=U.isInlineDomNode,Sz=U.isLastChildInBlockNode,Cz=U.isLexicalEditor;U.isModifierMatch;var wz=U.isOnlyChildInBlockNode;U.isSchemaField,U.isSelectionCapturedInDecoratorInput;var Tz=U.isSelectionWithinEditor,Ez=U.iterStaticNodeConfigChain,Dz=U.keyboardEventMaskForPlatform,Oz=U.makeStepwiseIterator,kz=U.mergeRegister;U.mountSlotContainer;var Az=U.nodeSchema,jz=U.normalizeClassNames,Mz=U.nullable,Nz=U.numberValue;U.objectValue;var Pz=U.optional;U.rawValue;var Fz=U.registerEventListener,Iz=U.registerEventListeners,Lz=U.removeClassNamesFromElement;U.removeFromParent,U.resetRandomKey;var Rz=U.safeCast,zz=U.setDOMStyleFromCSS;U.setDOMStyleObject,U.setDOMUnmanaged;var Bz=U.setNodeIndentFromDOM,Vz=U.setterDefaultOf,Hz=U.setterTableOf,Uz=U.shallowMergeConfig,Wz=U.stopLexicalPropagation,Gz=U.stringValue,Kz=U.toggleTextFormatType,qz=U.tokenizeRawText;U.transformValue,U.unionValue,U.unmountSlotContainer;var Jz=U.withAccessors,Yz=U.withField,Xz=qd(`<!>`,0,1),Zz=kr(2),Qz={},$z={tag:NL};function eB(e,t){if(t!==null){if(t===void 0)e.update(()=>{let t=nI();if(t.isEmpty()){let n=EF();t.append(n);let r=e.getRootElement(),i=tL&&r!==null?ZR(r):null;(W()!==null||i!==null&&i===r)&&n.select()}},$z);else if(t!==null)switch(typeof t){case`string`:{let n=e.parseEditorState(t);e.setEditorState(n,$z);break}case`object`:e.setEditorState(t,$z);break;case`function`:e.update(()=>{nI().isEmpty()&&t(e)},$z)}}}var tB=function(e,t,n){let r=t.block,i=lu(t,Zz+0),a=i.hooks;a===void 0&&(i.hooks=a=du(2));let o=e.initialConfig,s;if(a[0]!==!0){let e;__hkl:{let{theme:t,namespace:n,nodes:r,onError:i,onWarn:a,editorState:s,html:c}=o,l=Qx(null,t),u=UR({editable:o.editable,html:c,namespace:n,nodes:r,onError:e=>i(e,u),...a?{onWarn:e=>a(e,u)}:{},theme:t});eB(u,s),e=[u,l];break __hkl}s=e,fu(a,0,s)}s=a[1];let c=s;if(iu(()=>{let e=o.editable,[t]=c;t.setEditable(e===void 0||e)},[],Zz+0),t.block.pending&&!t.block.crossRenderUpdate)return;function l(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r=Qd(Xz);e=i.parentNode,t=bf(r),$d(r,i.parentNode,i.endMarker),a=nf(n,null,e,t,null,void 0)}{let t=e.children;a.c=Rv(n,1,a.a,t,a.c,a.d,a.b,!0,!0),a.d=t}}S_(t,0,r.parentNode,Zx,{value:c,children:Pu(l,Qz)},r.endMarker,void 0,void 0,!0,void 0,`c:a79f02fd`)},nB=t({$canShowPlaceholder:()=>oB,$canShowPlaceholderCurry:()=>sB,$findTextIntersectionFromCharacters:()=>cB,$isRootTextContentEmpty:()=>iB,$isRootTextContentEmptyCurry:()=>aB,$rootTextContent:()=>rB,registerLexicalTextEntity:()=>uB});function rB(){return nI().getTextContent()}function iB(e,t=!0){if(e)return!1;let n=rB();return t&&(n=n.trim()),n===``}function aB(e,t){return()=>iB(e,t)}function oB(e){if(!iB(e,!1))return!1;let t=nI().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if(_I(n))return!1;if(G(n)){if(!wI(n)||n.__indent!==0)return!1;let e=n.getChildren(),t=e.length;for(let n=0;n<t;n++){let t=e[n];if(!q(t))return!1}}}return!0}function sB(e){return()=>oB(e)}function cB(e,t){let n=e.getFirstChild(),r=0;t:for(;n!==null;){if(G(n)){let e=n.getFirstChild();if(e!==null){n=e;continue}}else if(q(n)){let e=n.getTextContentSize();if(r+e>t)return{node:n,offset:t-r};r+=e}let e=n.getNextSibling();if(e!==null){n=e;continue}let i=n.getParent();for(;i!==null;){let e=i.getNextSibling();if(e!==null){n=e;continue t}i=i.getParent()}break}return null}function lB(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function uB(e,t,n,r){let i=e=>e instanceof n,a=e=>{let t=AF(e.getTextContent()).setFormat(e.getFormat()).setStyle(e.getStyle()).setDetail(e.getDetail());e.replace(t)};return[e.registerNodeTransform(NR,e=>{if(!e.isSimpleText())return;let n,o=e.getPreviousSibling(),s=e.getTextContent(),c=e;if(q(o)){let n=o.getTextContent(),r=t(n+s);if(i(o)){if(r===null||(e=>e.getLatest().__mode)(o)!==0)return void a(o);{let t=r.end-n.length;if(t>0){let r=n+s.slice(0,t);if(o.select(),o.setTextContent(r),t===s.length)e.remove();else{let n=s.slice(t);e.setTextContent(n)}return}}}else if(r===null||r.start<n.length)return}let l=0;for(;;){let e=s;n=t(e);let u=n===null?``:e.slice(n.end);if(s=u,u===``){let r=c.getNextSibling();if(q(r)){let o=t(e+r.getTextContent());if(o===null)return void(i(r)?a(r):r.markDirty());if(n===null||o.start!==n.start)return}}if(n===null)return;if(n.start===0&&q(o)&&o.isTextEntity()){l+=n.end;continue}let d;n.start===0?[d,c]=c.splitText(n.end):[,d,c]=c.splitText(n.start+l,n.end+l),d===void 0&&lB(165,`nodeToReplace`);let f=r(d);if(f.setFormat(d.getFormat()).setStyle(d.getStyle()).setDetail(d.getDetail()),d.replace(f),c==null)return;l=0,o=f}}),e.registerNodeTransform(n,e=>{let n=e.getTextContent(),r=t(n);if(r===null||r.start!==0)return void a(e);if(n.length>r.end)return void e.splitText(r.end);let o=e.getPreviousSibling();q(o)&&o.isTextEntity()&&(a(o),a(e));let s=e.getNextSibling();q(s)&&s.isTextEntity()&&(a(s),i(e)&&a(e))})]}var dB=nB;dB.$canShowPlaceholder;var fB=dB.$canShowPlaceholderCurry;dB.$findTextIntersectionFromCharacters,dB.$isRootTextContentEmpty,dB.$isRootTextContentEmptyCurry,dB.$rootTextContent,dB.registerLexicalTextEntity;function pB(e){return e.read(`latest`,fB(e.isComposing()))}function mB(e,t){return Ml(hB,this,arguments)}function hB(e,t){let[n,r]=Ll(()=>pB(e),Xx(t,`ucsp:state`));return iu(()=>{function t(){r(pB(e))}return t(),kz(e.registerUpdateListener(()=>t()),e.registerEditableListener(()=>t()))},[e],Xx(t,`ucsp:le`)),n}pr(1,!0);var gB=qd(`<div></div>`),_B=kr(2),vB=[`s`,`y`,`x`],yB=new Set([`editor`,`ariaActiveDescendant`,`ariaAutoComplete`,`ariaControls`,`ariaDescribedBy`,`ariaErrorMessage`,`ariaExpanded`,`ariaInvalid`,`ariaLabel`,`ariaLabelledBy`,`ariaMultiline`,`ariaOwns`,`ariaRequired`,`autoCapitalize`,`className`,`contentEditable`,`id`,`role`,`spellCheck`,`style`,`tabIndex`,`ref`,`placeholder`,`data-testid`]),bB=Nu(function(e,t,n){let r=lu(t,_B+0),i=r.hooks;i===void 0&&(r.hooks=i=du(3));let a,o=e.editor,[s,c]=Ll(o.isEditable(),_B+0),l=(a=o,i[0]!==!0||!cu(i[1],a)?pu(i,0,e=>{e&&e.ownerDocument&&e.ownerDocument.defaultView?o.setRootElement(e):o.setRootElement(null)},a):i[2]);iu(()=>(c(o.isEditable()),o.registerEditableListener(e=>{c(e)})),[o],_B+1);let u=e.role==null?`textbox`:e.role,d={};for(let t in e)yB.has(t)||(d[t]=e[t]);if(e.className!=null&&(d.class=e.className),t.block.pending&&!t.block.crossRenderUpdate)return;let f=t.slots[0];if(f===void 0){let n,r,i,a,o,c,p,m,h,g,_,v,y,b,x,S,C,ee,te,ne,re,ie,ae,oe,se,ce=Qd(gB);n=e.ref==null?l:[e.ref,l],r=s?e.ariaActiveDescendant:void 0,i=s?e.ariaAutoComplete:`none`,a=s?e.ariaControls:void 0,o=e.ariaDescribedBy,c=e.ariaErrorMessage==null?void 0:e.ariaErrorMessage,p=s&&u===`combobox`?String(!!e.ariaExpanded):void 0,m=e.ariaInvalid==null?void 0:e.ariaInvalid,h=e.ariaLabel,g=e.ariaLabelledBy,_=e.ariaMultiline,v=s?e.ariaOwns:void 0,y=s?void 0:`true`,b=e.ariaRequired==null?void 0:String(e.ariaRequired),x=e.autoCapitalize,S=s?`true`:`false`,C=e[`data-testid`],ee=e.id,te=u,ne=e.spellCheck===!1?`false`:`true`,re=e.style,ie=e.tabIndex??(s?void 0:-1),ae=Xp(d),oe=ce,se=mm(t,void 0,ce,[[!1,`ref`,n],[!1,`aria-activedescendant`,r],[!1,`aria-autocomplete`,i],[!1,`aria-controls`,a],[!1,`aria-describedby`,o],[!1,`aria-errormessage`,c],[!1,`aria-expanded`,p],[!1,`aria-invalid`,m],[!1,`aria-label`,h],[!1,`aria-labelledby`,g],[!1,`aria-multiline`,_],[!1,`aria-owns`,v],[!1,`aria-readonly`,y],[!1,`aria-required`,b],[!1,`autoCapitalize`,x],[!1,`contentEditable`,S],[!1,`data-testid`,C],[!1,`id`,ee],[!1,`role`,te],[!1,`spellCheck`,ne],[!1,`style`,re],[!1,`tabIndex`,ie],[!0,ae]],`b:4240a10f`,!1),f=sf(t,ce,{a:n,b:r,c:i,d:a,e:o,f:c,g:p,h:m,i:h,j:g,k:_,l:v,m:y,n:b,o:x,p:S,q:C,r:ee,s:te,t:ne,u:re,v:ie,w:ae,x:oe,y:se,z:null,A:void 0}),t.refFields=vB}else{{let t=e.ref==null?l:[e.ref,l];f.a!==t&&(f.a=t)}{let t=s?e.ariaActiveDescendant:void 0;f.b!==t&&(f.b=t)}{let t=s?e.ariaAutoComplete:`none`;f.c!==t&&(f.c=t)}{let t=s?e.ariaControls:void 0;f.d!==t&&(f.d=t)}{let t=e.ariaDescribedBy;f.e!==t&&(f.e=t)}{let t=e.ariaErrorMessage==null?void 0:e.ariaErrorMessage;f.f!==t&&(f.f=t)}{let t=s&&u===`combobox`?String(!!e.ariaExpanded):void 0;f.g!==t&&(f.g=t)}{let t=e.ariaInvalid==null?void 0:e.ariaInvalid;f.h!==t&&(f.h=t)}{let t=e.ariaLabel;f.i!==t&&(f.i=t)}{let t=e.ariaLabelledBy;f.j!==t&&(f.j=t)}{let t=e.ariaMultiline;f.k!==t&&(f.k=t)}{let t=s?e.ariaOwns:void 0;f.l!==t&&(f.l=t)}{let e=s?void 0:`true`;f.m!==e&&(f.m=e)}{let t=e.ariaRequired==null?void 0:String(e.ariaRequired);f.n!==t&&(f.n=t)}{let t=e.autoCapitalize;f.o!==t&&(f.o=t)}{let e=s?`true`:`false`;f.p!==e&&(f.p=e)}{let t=e[`data-testid`];f.q!==t&&(f.q=t)}{let t=e.id;f.r!==t&&(f.r=t)}{let e=u;f.s!==e&&(f.s=e)}{let t=e.spellCheck===!1?`false`:`true`;f.t!==t&&(f.t=t)}{let t=e.style;f.u!==t&&(f.u=t)}{let t=e.tabIndex??(s?void 0:-1);f.v!==t&&(f.v=t)}f.w=Xp(d),f.y=mm(t,f.y,f.x,[[!1,`ref`,f.a],[!1,`aria-activedescendant`,f.b],[!1,`aria-autocomplete`,f.c],[!1,`aria-controls`,f.d],[!1,`aria-describedby`,f.e],[!1,`aria-errormessage`,f.f],[!1,`aria-expanded`,f.g],[!1,`aria-invalid`,f.h],[!1,`aria-label`,f.i],[!1,`aria-labelledby`,f.j],[!1,`aria-multiline`,f.k],[!1,`aria-owns`,f.l],[!1,`aria-readonly`,f.m],[!1,`aria-required`,f.n],[!1,`autoCapitalize`,f.o],[!1,`contentEditable`,f.p],[!1,`data-testid`,f.q],[!1,`id`,f.r],[!1,`role`,f.s],[!1,`spellCheck`,f.t],[!1,`style`,f.u],[!1,`tabIndex`,f.v],[!0,f.w]],`b:4240a10f`,!1)}f.B=Pv(t,f.B,1,f.x,Object.prototype.propertyIsEnumerable.call(f.y.resolved,`children`)?f.y.resolved.children:void 0,`b:4240a10f`,null,void 0,void 0,void 0,!0)}),xB=qd(`<div aria-hidden=\"true\"></div>`),SB=qd(`<!><!>`,3,1),CB=kr(6),wB=Symbol(CB);function TB(e,t,n){}function EB(e,t,n){}function DB(e,t,n){let r=n[0],i=t.slots[0];if(i===void 0){let e,n=Qd(xB);e=n,i=tf(t,n,e,null,void 0)}{let e=r;i.b=zv(t,1,i.a,e,i.b,i.c),i.c=e}}function OB(e,t,n){let r=t.block,i=n[0],a=n[1].content,o=null;typeof a==`function`?o=a(i):a!==null&&(o=a),(!t.block.pending||t.block.crossRenderUpdate)&&Kb(t,0,r.parentNode,o===null,EB,DB,r.endMarker,[o])}var kB=Symbol(CB+3),AB=function(e,t,n){let r=t.block,i=e.editor,a=Nl(wB,mB,i),[o,s]=Ll(i.isEditable(),CB+1);iu(()=>(s(i.isEditable()),i.registerEditableListener(e=>{s(e)})),[i],CB+2),(!t.block.pending||t.block.crossRenderUpdate)&&Kb(t,0,r.parentNode,!a,TB,OB,r.endMarker,[o,e])},jB=function(e,t,n){let r=t.block,[i]=Nl(kB,$x);if(t.block.pending&&!t.block.crossRenderUpdate)return;let a=t.slots[0];if(a===void 0){let e,n,i,o=Qd(SB);e=r.parentNode;let s=bf(o);n=s,i=xf(s,1),$d(o,r.parentNode,r.endMarker),a=rf(t,null,e,n,i,null,void 0)}C_(t,1,a.a,bB,{editor:i,...e},a.b,void 0,void 0,void 0,void 0,`c:2d560ff1`);{let n=e.placeholder==null?null:u_(()=>h_(`c:55f46946`,AB,{editor:i,content:e.placeholder}));a.d=Rv(t,2,a.a,n,a.d,a.e,a.c,!0),a.e=n}};function MB(e,t){return Ml(NB,this,arguments)}function NB(e,t){let n,r,i,a,[o]=$x(),s=(r=o,i=e,n=Nd(Xx(t,`uls:memo`),`useMemo`),a=Fd(n,r,i),a===null?Ld(n,e(o),r,i):a.value),[c,l]=Ll(()=>s.initialValueFn(),Xx(t,`uls:state`)),u=mu(c,Xx(t,`uls:ref`));return iu(()=>{let{initialValueFn:e,subscribe:t}=s,n=e();return u.current!==n&&(u.current=n,l(n)),t(e=>{u.current=e,l(e)})},[s,e],Xx(t,`uls:le`)),c}function PB(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function FB(e){return Ml(IB,this,arguments)}function IB(e){return MB(PB,e)}var LB=Symbol.for(`preact-signals`);function RB(){if(GB>1){GB--;return}let e,t=!1;for((function(){let e=WB;for(WB=void 0;e!==void 0;){let t=e.S;if(t.v===e.v)for(let n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();HB!==void 0;){let n=HB;for(HB=void 0,KB++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&$B(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(KB=0,GB--,t)throw e}function zB(e){if(GB>0)return e();JB=++qB,GB++;try{return e()}finally{RB()}}var BB,VB,HB;function UB(e){let t=BB,n=VB;BB=void 0,VB=void 0;try{return e()}finally{BB=t,VB=n}}var WB,GB=0,KB=0,qB=0,JB=0,YB=0;function XB(e){if(BB===void 0)return;let t=e.n;if(t===void 0||t.t!==BB)return t={i:0,S:e,p:BB.s,n:void 0,t:BB,e:void 0,x:void 0,r:t},BB.s!==void 0&&(BB.s.n=t),BB.s=t,e.n=t,32&BB.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=BB.s,t.n=void 0,BB.s.n=t,BB.s=t),t}function ZB(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ZB.prototype.brand=LB,ZB.prototype.h=function(){return!0},ZB.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?UB(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},ZB.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&UB(()=>{var e;(e=this.Z)==null||e.call(this)}))}},ZB.prototype.subscribe=function(e){return cV(()=>{let t=this.value;UB(()=>e(t))},{name:`sub`})},ZB.prototype.valueOf=function(){return this.value},ZB.prototype.toString=function(){return this.value+``},ZB.prototype.toJSON=function(){return this.value},ZB.prototype.peek=function(){return UB(()=>this.value)},Object.defineProperty(ZB.prototype,\"value\",{get(){let e=XB(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(KB>100)throw Error(`Cycle detected`);(function(e){GB!==0&&KB===0&&e.l!==JB&&(e.l=JB,WB={S:e,v:e.v,i:e.i,o:WB})})(this),this.v=e,this.i++,YB++,GB++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{RB()}}}});function QB(e,t){return new ZB(e,t)}function $B(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function eV(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function tV(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function nV(e,t){ZB.call(this,void 0,t),this.x=e,this.s=void 0,this.g=YB-1,this.f=4}nV.prototype=new ZB,nV.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===YB))return!0;if(this.g=YB,this.f|=1,this.i>0&&!$B(this))return this.f&=-2,!0;let e=BB;try{eV(this),BB=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return BB=e,tV(this),this.f&=-2,!0},nV.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}ZB.prototype.S.call(this,e)},nV.prototype.U=function(e){if(this.t!==void 0&&(ZB.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},nV.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(nV.prototype,\"value\",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=XB(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rV(e,t){return new nV(e,t)}function iV(e){let t=e.m;if(e.m=void 0,typeof t==`function`){GB++;let n=BB;BB=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,aV(e),t}finally{BB=n,RB()}}}function aV(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,iV(e)}function oV(e){if(BB!==this)throw Error(`Out-of-order effect`);tV(this),BB=e,this.f&=-2,8&this.f&&aV(this),RB()}function sV(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,VB&&VB.push(this)}sV.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},sV.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,iV(this),eV(this),GB++;let e=BB;return BB=this,oV.bind(this,e)},sV.prototype.N=function(){2&this.f||(this.f|=2,this.u=HB,HB=this)},sV.prototype.d=function(){this.f|=8,1&this.f||aV(this)},sV.prototype.dispose=function(){this.d()};function cV(e,t){let n=new sV(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}var lV=t({batch:()=>zB,computed:()=>rV,effect:()=>cV,signal:()=>QB,untracked:()=>UB}),uV=lV.batch,dV=lV.computed,fV=lV.effect,pV=lV.signal,mV=lV.untracked,hV=t({namedSignals:()=>gV});function gV(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=pV(i===void 0?e[r]:i)}return n}var _V=hV.namedSignals,vV=t({watchedSignal:()=>yV});function yV(e,t){let n;return pV(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}var bV=vV.watchedSignal,xV=t({DragonExtension:()=>AV,installDragonSupport:()=>wV,registerDragonSupport:()=>OV}),SV={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},CV=Symbol.for(`@lexical/dragon/WindowState`);function wV(e=function(){return typeof window<`u`?window:void 0}()){return e?TV(e,Symbol(`@lexical/dragon/globalInstall`),void 0):()=>{}}function TV(e,t,n){let r=function(e){let t=e[CV];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[CV]=t),t}(e);if(r.installs.size===0){let t=kV.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return EV.bind(null,e,r,t,n)}function EV(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[CV])}function DV(e){return e&&e.ownerDocument.defaultView}function OV(e){let t=bV(()=>DV(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=DV(e)}));return fV(()=>{let n=t.value;if(n)return TV(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function kV(e){if(e.origin!==this.location.origin)return;let t=function(e){let t=e[CV];if(t===void 0)return null;let n=iz(QR(e.document));return Cz(n)&&t.editors.has(n)?n:null}(this);if(t===null)return;let n=e.data;if(typeof n==`string`){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol===`nuanria_messaging`&&r.type===`request`){let n=r.payload;if(n&&n.functionId===`makeChanges`){let r=n.args;if(Array.isArray(r)){let[n,i,a,o,s,c]=r;if(![n,i,o,s].every(Number.isFinite)||typeof a!=`string`&&a!==-1)return;t.update(()=>{let t=W();if(K(t)){let r=t.anchor,l=r.getNode(),u=0,d=0;if(q(l)&&n>=0&&i>=0&&(u=n,d=n+i,t.setTextNodeRange(l,u,l,d)),typeof a!=`string`||u===d&&a===``||(t.insertRawText(a),l=r.getNode()),q(l)){let e=l.getTextContentSize();u=Math.min(Math.max(o,0),e),d=o<0||s<0?u:Math.min(o+s,e),t.setTextNodeRange(l,u,l,d)}if(typeof c==`string`&&s>0&&!t.isCollapsed()){let e=SV[c];e!==void 0&&t.formatText(e)}e.stopImmediatePropagation()}})}}}}}var AV={build:(e,t,n)=>_V(t),config:{disabled:typeof window>`u`},name:`@lexical/dragon`,register:(e,t,n)=>fV(()=>n.getOutput().disabled.value?void 0:OV(e))},jV=xV,MV=jV.DragonExtension;jV.installDragonSupport;var NV=jV.registerDragonSupport,PV=t({getKnownTypesAndNodes:()=>FV,getNodeConfig:()=>IV});function FV(e){let t=new Set,n=new Set;for(let r of IV(e)){let e=typeof r==`function`?r:r.replace;lz(e),t.add(e.getType()),n.add(e)}return{nodes:n,types:t}}function IV(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}var LV=PV,RV=LV.getKnownTypesAndNodes,zV=LV.getNodeConfig,BV=t({InitialStateExtension:()=>UV}),VV={tag:NL};function HV(){let e=nI();e.isEmpty()&&e.append(EF())}var UV={config:{setOptions:VV,updateOptions:VV},init:({$initialEditorState:e=HV})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(vI(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[CR,NR,mR,MR,bR]},WV=BV.InitialStateExtension,GV=t({LexicalBuilder:()=>gH,buildEditorFromExtensions:()=>dH,builderSymbol:()=>uH});function KV(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function qV(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`\"<unknown>+source\"`}var JV=qV(),YV=new Set([`__proto__`,`constructor`,`prototype`]);function XV(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!YV.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=XV(n[e],r[e]));return e}return t}var ZV=0,QV=1,$V=2,eH=3,tH=4,nH=5,rH=6,iH=7;function aH(e){return e.id===ZV}function oH(e){return e.id===$V}function sH(e){return function(e){return e.id===QV}(e)||KV(305,String(e.id),String(QV)),Object.assign(e,{id:$V})}var cH=new Set,lH=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:ZV}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Uz;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;oH(t)||KV(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:eH,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:tH,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==tH&&KV(307,String(t.id),String(nH)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:nH,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==nH&&KV(308,String(n.id),String(nH));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:rH})}(n),()=>{let e=this.state;e.id!==iH&&KV(309,String(n.id),String(iH)),this.state=function(e){return Object.assign(e,{id:nH})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==rH&&KV(310,String(t.id),String(rH)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:iH})}(t),n}getSignal(){return this._signal===void 0&&KV(311),this._signal}getInitResult(){this.extension.init===void 0&&KV(312,this.extension.name);let e=this.state;return function(e){return e.id>=tH}(e)||KV(313,String(e.id),String(tH)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=eH}(e)||KV(314,String(e.id),String(eH)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&KV(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&KV(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=iH}(e)||KV(316,String(e.id),String(iH)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||cH}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=nH})(e)||KV(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},uH=Symbol.for(`@lexical/extension/LexicalBuilder`);function dH(...e){return gH.fromExtensions(e).buildEditor()}function fH(){}function pH(e){throw e}function mH(e){return Array.isArray(e)?e:[e]}var hH=JV,gH=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=hH,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[mH(WV)];for(let e of t)n.push(mH(e));return new e(n)}static maybeFromEditor(t){let n=t[uH];return n&&(n.PACKAGE_VERSION!==hH&&KV(292,n.PACKAGE_VERSION,hH),n instanceof e||KV(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&KV(294),n}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(UR({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[uH]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=fH;function t(){try{e()}finally{e=fH}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=kz(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&KV(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);if(r){let e=r.get(t);e?e.push(...n):r.set(t,n)}else this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&KV(296);let[t]=mH(e);typeof t.name!=`string`&&KV(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&KV(298,t.name),!n){n=new lH(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&KV(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&KV(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=mH(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(oH(i))return;let a=n.extension.name;var o;aH(i)||KV(300,a,r||`[unknown]`),aH(o=i)||KV(304,String(o.id),String(ZV)),i=Object.assign(o,{id:QV}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=sH(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())aH(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&KV(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return kz(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of zV(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&KV(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&XV(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=Array.from(t));let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=pH,e}},_H=GV,vH=_H.LexicalBuilder,yH=_H.buildEditorFromExtensions;_H.builderSymbol;var bH=t({getPeerDependencyFromEditor:()=>xH,getPeerDependencyFromEditorOrThrow:()=>SH});function xH(e,t){let n=vH.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function SH(e,t){let n=xH(e,t);return n===void 0&&function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(291,t),n}var CH=bH,wH=CH.getPeerDependencyFromEditor,TH=CH.getPeerDependencyFromEditorOrThrow,EH=t({$addNodeStyle:()=>BH,$cloneWithProperties:()=>yF,$copyBlockFormatIndent:()=>GH,$ensureForwardRangeSelection:()=>WH,$forEachSelectedTextNode:()=>UH,$getComputedStyleForElement:()=>PH,$getComputedStyleForParent:()=>FH,$getSelectionStyleValueForProperty:()=>aU,$isAtEdgeOfElement:()=>KH,$isAtNodeEnd:()=>RH,$isParentElementRTL:()=>nU,$isParentRTL:()=>IH,$moveCaretSelection:()=>tU,$moveCharacter:()=>rU,$patchStyleText:()=>HH,$selectAll:()=>BI,$setBlocksType:()=>qH,$shouldOverrideDefaultCharacterSelection:()=>eU,$sliceSelectedTextNodeContent:()=>LH,$trimTextContentFromAnchor:()=>zH,$wrapNodes:()=>XH,createDOMRange:()=>jH,createRectsFromDOMRange:()=>MH,getCSSFromStyleObject:()=>NH,getStyleObjectFromCSS:()=>oU,trimTextContentFromAnchor:()=>sU});function DH(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function OH(e){return()=>{}}function kH(e){let t=e;for(;t!=null;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function AH(e){let t=e.parentNode;if(t==null)throw Error(`Should never happen`);return[t,Array.from(t.childNodes).indexOf(e)]}function jH(e,t,n,r,i){let a=t.getKey(),o=r.getKey(),s=cz(e.getRootElement()).createRange(),c=e.getElementByKey(a),l=e.getElementByKey(o),u=n,d=i;if(q(t)&&(c=kH(c)),q(r)&&(l=kH(l)),t===void 0||r===void 0||c===null||l===null)return null;c.nodeName===`BR`&&([c,u]=AH(c)),l.nodeName===`BR`&&([l,d]=AH(l));let f=c.firstChild;c===l&&f!=null&&f.nodeName===`BR`&&u===0&&d===0&&(d=1);try{s.setStart(c,u),s.setEnd(l,d)}catch{return null}return!s.collapsed||u===d&&a===o||(s.setStart(l,d),s.setEnd(c,u)),s}function MH(e,t){let n=e.getRootElement();if(n===null)return[];let r=n.getBoundingClientRect(),i=getComputedStyle(n),a=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=Array.from(t.getClientRects()),s,c=o.length;o.sort((e,t)=>{let n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n});for(let e=0;e<c;e++){let t=o[e],n=s&&s.top<=t.top&&s.top+s.height>t.top&&s.left+s.width>t.left,i=t.width+a===r.width;n||i?(o.splice(e--,1),c--):s=t}return o}function NH(e){let t=``;for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function PH(e){let t=XF().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function FH(e){let t=TI(e)?e:e.getParent();return t&&PH(t)}function IH(e){let t=FH(e);return t!==null&&t.direction===`rtl`}function LH(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!NI(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=HF(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=bF(t)),t.__text=p)}}return t}function RH(e){if(e.type===`text`)return e.offset===e.getNode().getTextContentSize();let t=e.getNode();return G(t)||DH(177),e.offset===t.getChildrenSize()}function zH(e,t,n){let r=t.getNode(),i=n;if(G(r)){let e=r.getDescendantByIndex(t.offset);e!==null&&(r=e)}for(;i>0&&r!==null;){if(G(r)){let e=r.getLastDescendant();e!==null&&(r=e)}let n=r.getPreviousSibling(),a=0;if(n===null){let e=r.getParentOrThrow(),t=e.getPreviousSibling();for(;t===null;){if(e=e.getParent(),e===null){n=null;break}t=e.getPreviousSibling()}e!==null&&(a=e.isInline()?0:2,n=t)}let o=r.getTextContent();o===``&&G(r)&&!r.isInline()&&(o=`\n\n`);let s=o.length;if(!q(r)||i>=s){let e=r.getParent();r.remove(),e==null||e.getChildrenSize()!==0||TI(e)||e.remove(),i-=s+a,r=n}else{let n=r.getKey(),a=e.read(`latest`,()=>{let e=$F(n);return q(e)&&e.isSimpleText()?e.getTextContent():null}),c=s-i,l=o.slice(0,c);if(a!==null&&a!==o){let e=tI(),t=r;if(r.isSimpleText())r.setTextContent(a);else{let e=AF(a);r.replace(e),t=e}if(K(e)&&e.isCollapsed()){let n=e.anchor.offset;t.select(n,n)}}else if(r.isSimpleText()){let e=t.key===n,a=t.offset;a<i&&(a=s);let o=e?a-i:0,l=e?a:c;if(e&&o===0){let[e]=r.splitText(o,l);e.remove()}else{let[,e]=r.splitText(o,l);e.remove()}}else{let e=AF(l);r.replace(e)}i=0}}}var BH=OH();function VH(e,t){(K(e)?e.isCollapsed():q(e)||G(e))||DH(280);let n=uz(K(e)?e.style:q(e)?e.getStyle():e.getTextStyle()),r=NH(Object.entries(t).reduce((t,[r,i])=>(typeof i==`function`?t[r]=i(n[r],e):i===null?delete t[r]:t[r]=i,t),{...n}));K(e)||q(e)?e.setStyle(r):e.setTextStyle(r)}function HH(e,t){let n=new Set;if(K(e)&&e.isCollapsed()){VH(e,t);let r=e.anchor.getNode();G(r)&&r.isEmpty()&&(n.add(r.getKey()),VH(r,t))}UH(e=>{VH(e,t)});let r=e.getNodes();if(r.length>0)for(let e of r){if(!G(e)||!e.canBeEmpty()||e.getChildrenSize()!==0)continue;let r=e.getKey();n.has(r)||(n.add(r),VH(e,t))}}function UH(e){let t=W();if(!t)return;let n=new Map,r=e=>n.get(e.getKey())||[0,e.getTextContentSize()];if(K(t))for(let e of vF(t).getTextSlices())e&&n.set(e.caret.origin.getKey(),e.getSliceIndices());let i=t.getNodes();for(let t of i){if(!q(t)||!t.canHaveFormat())continue;let[n,i]=r(t);i!==n&&(NI(t)||n===0&&i===t.getTextContentSize()?e(t):e(t.splitText(n,i)[n===0?0:1]))}K(t)&&t.anchor.type===`text`&&t.focus.type===`text`&&t.anchor.key===t.focus.key&&WH(t)}function WH(e){if(e.isBackward()){let{anchor:t,focus:n}=e,{key:r,offset:i,type:a}=t;t.set(n.key,n.offset,n.type),n.set(r,i,a)}}function GH(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function KH(e,t,n){let r=_F(e,n);if(yI(r))return!1;for(;r;r=r.getParentCaret()){let e=r.getParentAtCaret();if(!e||r.getNodeAtCaret())return!1;if(t.is(e))return!0}return!1}function qH(e,t,n=GH){if(!e)return;let r=e.getStartEndPoints(),i=!1,a=null,o=new Map;if(r){let[t,n]=r,s=NF(t.getNode(),BL);a=NF(n.getNode(),BL);let c=e.isBackward()?`previous`:`next`;i=G(a)&&!a.is(s)&&function(e,t,n){let r=e.getNode();return(!G(r)||!r.isEmpty())&&KH(e,t,n)}(n,a,XR(c)),G(s)&&o.set(s.getKey(),s),G(a)&&!i&&o.set(a.getKey(),a)}for(let t of e.getNodes())if(G(t)&&BL(t)){if(i&&t.is(a))continue;o.set(t.getKey(),t)}else if(!r){let e=NF(t,BL);G(e)&&o.set(e.getKey(),e)}for(let e of o.values()){if(sI(e)!==null)continue;let r=t();n(e,r),e.replace(r,!0)}}function JH(e){return e.getNode().isAttached()}function YH(e){let t=e;for(;t!==null&&!EI(t);){let e=t.getLatest(),n=t.getParent();e.getChildrenSize()===0&&t.remove(!0),t=n}}function XH(e,t,n=null){let r=e.getStartEndPoints(),i=r?r[0]:null,a=e.getNodes(),o=a.length;if(i!==null){let e=oI(i.getNode());if(e!==null&&!EI(e))return}if(i!==null&&(o===0||o===1&&i.type===`element`&&i.getNode().getChildrenSize()===0)){let e=i.type===`text`?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren(),a=t();a.setFormat(e.getFormatType()),a.setIndent(e.getIndent()),r.forEach(e=>a.append(e)),n&&(a=n.append(a)),e.replace(a);return}let s=null,c=[];for(let r=0;r<o;r++){let i=a[r];EI(i)?(ZH(e,c,c.length,t,n),c=[],s=i):s===null||s!==null&&dI(i,s)?c.push(i):(ZH(e,c,c.length,t,n),c=[i])}ZH(e,c,c.length,t,n)}function ZH(e,t,n,r,i=null){if(t.length===0)return;let a=t[0],o=new Map,s=[],c=G(a)?a:a.getParentOrThrow(),l=c.isInline()?c.getParentOrThrow():c,u=!1;for(;l!==null;){let e=l.getPreviousSibling();if(e!==null){l=e,u=!0;break}if(l=l.getParentOrThrow(),EI(l))break}let d=new Set;for(let e=0;e<n;e++){let n=t[e];G(n)&&n.getChildrenSize()===0&&d.add(n.getKey())}let f=new Set;for(let e=0;e<n;e++){let n=t[e],i=n.getParent();if(i!==null&&i.isInline()&&(i=i.getParent()),i!==null&&bI(n)&&!f.has(n.getKey())){let e=i.getKey();if(o.get(e)===void 0){let t=r();t.setFormat(i.getFormatType()),t.setIndent(i.getIndent()),s.push(t),o.set(e,t);let n=i.getChildren();t.splice(t.getChildrenSize(),0,n);for(let e of n)if(f.add(e.getKey()),G(e))for(let t of e.getChildrenKeys())f.add(t);YH(i)}}else if(d.has(n.getKey())){G(n)||DH(179);let e=r();e.setFormat(n.getFormatType()),e.setIndent(n.getIndent()),s.push(e),n.remove(!0)}}if(i!==null)for(let e=0;e<s.length;e++){let t=s[e];i.append(t)}let p=null;if(EI(l)){if(u){if(i!==null)l.insertAfter(i);else for(let e=s.length-1;e>=0;e--){let t=s[e];l.insertAfter(t)}}else{let e=l,t=e.getFirstChild();if(G(t)&&(l=t),t===null){if(i)e.append(i);else for(let t=0;t<s.length;t++){let n=s[t];e.append(n),p=n}}else if(i!==null)t.insertBefore(i);else for(let e=0;e<s.length;e++){let n=s[e];t.insertBefore(n),p=n}}}else if(i)l.insertAfter(i);else for(let e=s.length-1;e>=0;e--){let t=s[e];l.insertAfter(t),p=t}let m=tI();K(m)&&JH(m.anchor)&&JH(m.focus)?WI(m.clone()):p===null?e.dirty=!0:p.selectEnd()}function QH(e){let t=$H(e);return t!==null&&t.writingMode===`vertical-rl`}function $H(e){let t=e.anchor.getNode();return G(t)?PH(t):FH(t)}function eU(e,t){let n=QH(e)?!t:t;nU(e)&&(n=!n);let r=_F(e.focus,n?`previous`:`next`);if(yI(r))return!1;if(MI(r)&&!jI(r.origin)&&r.origin.isUnmergeable()){let e=r.getNodeAtCaret();if(q(e)&&!jI(e))return!0}for(let e of MF(r)){if(gI(e))return!e.origin.isInline();if(!G(e.origin)){if(_I(e.origin))return!0;break}}return!1}function tU(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function nU(e){let t=$H(e);return t!==null&&t.direction===`rtl`}function rU(e,t,n){let r=nU(e),i;i=QH(e)||r?!n:n,tU(e,t,i,`character`)}function iU(e,t,n){let r=uz(e.getStyle());return r!==null&&r[t]||n}function aU(e,t,n=``){let r=null,i=e.getNodes(),a,o;if(K(e)){if(e.isCollapsed()&&e.style!==``){let n=uz(e.style);if(n!==null&&t in n)return n[t]}let{anchor:n,focus:r}=e,i=e.isBackward(),s=i?r.getNode():n.getNode(),c=i?n.getNode():r.getNode(),l=i?r.offset:n.offset,u=i?n.offset:r.offset;q(s)&&l===s.getTextContentSize()&&(a=s),u===0&&(o=c)}for(let e=0;e<i.length;e++){let s=i[e];if(q(s)&&!s.is(e===0?a:o)){let e=iU(s,t,n);if(r===null)r=e;else if(r!==e){r=``;break}}}return r===null?n:r}var oU=uz,sU=zH,cU=EH;cU.$addNodeStyle,cU.$cloneWithProperties,cU.$copyBlockFormatIndent,cU.$ensureForwardRangeSelection,cU.$forEachSelectedTextNode,cU.$getComputedStyleForElement,cU.$getComputedStyleForParent,cU.$getSelectionStyleValueForProperty;var lU=cU.$isAtEdgeOfElement;cU.$isAtNodeEnd,cU.$isParentElementRTL;var uU=cU.$isParentRTL;cU.$moveCaretSelection;var dU=cU.$moveCharacter;cU.$patchStyleText,cU.$selectAll;var fU=cU.$setBlocksType,pU=cU.$shouldOverrideDefaultCharacterSelection,mU=cU.$sliceSelectedTextNodeContent;cU.$trimTextContentFromAnchor,cU.$wrapNodes,cU.createDOMRange;var hU=cU.createRectsFromDOMRange;cU.getCSSFromStyleObject,cU.getStyleObjectFromCSS,cU.trimTextContentFromAnchor;var gU=t({$descendantsMatching:()=>lW,$dfs:()=>kU,$dfsIterator:()=>MU,$dfsWithSlots:()=>NU,$dfsWithSlotsIterator:()=>PU,$filter:()=>tW,$findMatchingParent:()=>NF,$firstToLastIterator:()=>uW,$getAdjacentCaret:()=>AU,$getAdjacentSiblingOrParentSiblingCaret:()=>zF,$getDepth:()=>zU,$getNearestBlockElementAncestorOrThrow:()=>qU,$getNearestNodeOfType:()=>KU,$getNextRightPreorderNode:()=>BU,$getNextSiblingOrParentSibling:()=>RU,$handleIndentAndOutdent:()=>nW,$insertFirst:()=>rW,$insertNodeIntoLeaf:()=>ZU,$insertNodeToNearestRoot:()=>XU,$insertNodeToNearestRootAtCaret:()=>fI,$isAtEndOfNode:()=>vW,$isAtStartOfNode:()=>_W,$isBlockFullySelected:()=>hI,$isEditorIsNestedEditor:()=>oW,$lastToFirstIterator:()=>dW,$onEscapeDown:()=>gW,$onEscapeUp:()=>hW,$restoreEditorState:()=>YU,$reverseDfs:()=>jU,$reverseDfsIterator:()=>VU,$reverseDfsWithSlots:()=>HU,$reverseDfsWithSlotsIterator:()=>UU,$splitNode:()=>YI,$unwrapAndFilterDescendants:()=>sW,$unwrapNode:()=>pW,$wrapNodeInElement:()=>QU,CAN_USE_BEFORE_INPUT:()=>eL,CAN_USE_DOM:()=>tL,IS_ANDROID:()=>VL,IS_ANDROID_CHROME:()=>HL,IS_APPLE:()=>UL,IS_APPLE_WEBKIT:()=>WL,IS_CHROME:()=>KL,IS_FIREFOX:()=>JL,IS_IOS:()=>XL,IS_SAFARI:()=>QL,addClassNamesToElement:()=>FR,calculateZoomLevel:()=>aW,dedupeSelectionRects:()=>vU,eventFiles:()=>eW,getScrollParent:()=>EU,isBlockDomNode:()=>pz,isHTMLAnchorElement:()=>bz,isHTMLElement:()=>J,isInlineDomNode:()=>xz,isMimeType:()=>DU,makeStateWrapper:()=>mW,markSelection:()=>wU,mediaFileReader:()=>OU,mergeRegister:()=>kz,objectKlassEquals:()=>$U,positionNodeOnRange:()=>xU,registerNestedElementResolver:()=>JU,removeClassNamesFromElement:()=>Lz,selectionAlwaysOnDisplay:()=>TU});function _U(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vU(e){let t=(e,t)=>t.left>=e.left-1&&t.top>=e.top-1&&t.right<=e.right+1&&t.bottom<=e.bottom+1,n=[];for(let r of Array.from(e))if(!(r.width<.5||r.height<.5||n.some(e=>t(r,e)))){for(let e=n.length-1;e>=0;e--)t(n[e],r)&&n.splice(e,1);n.push(r)}return n}function yU(e){return`${e}px`}var bU={attributes:!0,characterData:!0,childList:!0,subtree:!0};function xU(e,t,n){let r=null,i=null,a=null,o=[],s=cz(e.getRootElement()).createElement(`div`);function c(){r===null&&_U(182),i===null&&_U(183);let{left:a,top:c}=i.getBoundingClientRect(),l=vU(hU(e,t));var u,d;s.isConnected||(d=s,(u=i).insertBefore(d,u.firstChild));let f=!1;for(let e=0;e<l.length;e++){let t=l[e],n=o[e]||cz(r).createElement(`div`),i=n.style;i.position!==`absolute`&&(i.position=`absolute`,f=!0);let u=yU(t.left-a);i.left!==u&&(i.left=u,f=!0);let d=yU(t.top-c);i.top!==d&&(n.style.top=d,f=!0);let p=yU(t.width);i.width!==p&&(n.style.width=p,f=!0);let m=yU(t.height);i.height!==m&&(n.style.height=m,f=!0),n.parentNode!==s&&(s.append(n),f=!0),o[e]=n}for(;o.length>l.length;){let e=o.pop();e!=null&&(e.remove(),f=!0)}f&&n(o)}function l(){i=null,r=null,a!==null&&a.disconnect(),a=null,s.remove();for(let e of o)e.remove();o=[]}function u(){let t=e.getRootElement();if(t===null)return l();let n=t.parentElement;if(!J(n))return l();l(),r=t,i=n,a=new MutationObserver(t=>{let n=e.getRootElement(),a=n&&n.parentElement;if(n!==r||a!==i)return u();for(let e of t)if(!s.contains(e.target))return c()}),a.observe(n,bU),c()}s.style.position=`relative`;let d=e.registerRootListener(()=>(u(),l));return()=>{d(),l()}}function SU(e,t,n,r){if(t.type!==`text`&&G(n)){let i=qF(n,r,e);return[i.element,i.getFirstChildOffset()+t.offset]}return[(q(n)?JF(n,r,e):rz(r))||r,t.offset]}function CU(e){for(let t of e){let e=t.style;e.background!==`Highlight`&&(e.background=`Highlight`),e.color!==`HighlightText`&&(e.color=`HighlightText`),e.marginTop!==yU(-1.5)&&(e.marginTop=yU(-1.5)),e.paddingTop!==yU(4)&&(e.paddingTop=yU(4)),e.paddingBottom!==yU(0)&&(e.paddingBottom=yU(0))}}function wU(e,t=CU){let n=null,r=null,i=null,a=null,o=null,s=null,c=()=>{};function l(l){l.read(()=>{let l=W();if(!K(l))return n=null,i=null,a=null,s=null,c(),void(c=()=>{});let[u,d]=function(e){let t=e.getStartEndPoints();return e.isBackward()?[t[1],t[0]]:t}(l),f=u.getNode(),p=f.getKey(),m=u.offset,h=d.getNode(),g=h.getKey(),_=d.offset,v=e.getElementByKey(p),y=e.getElementByKey(g),b=n===null||v!==r||m!==i||p!==n.getKey(),x=a===null||y!==o||_!==s||g!==a.getKey();if((b||x)&&v!==null&&y!==null){let n=function(e,t,n,r,i,a,o){let s=(e._window?e._window.document:document).createRange();return s.setStart(...SU(e,t,n,r)),s.setEnd(...SU(e,i,a,o)),s}(e,u,f,v,d,h,y);c(),c=xU(e,n,t)}n=f,r=v,i=m,a=h,o=y,s=_},{editor:e})}return l(e.getEditorState()),kz(e.registerUpdateListener(({editorState:e})=>l(e)),()=>{c()})}function TU(e,t){let n=null,r=()=>{let r=e.getRootElement(),i=r===null?null:r.ownerDocument.defaultView,a=i===null?null:i.getSelection(),o=a===null?null:tz(a,r).anchorNode;o!==null&&r!==null&&r.contains(o)?n!==null&&(n(),n=null):n===null&&(n=wU(e,t))};return e.registerRootListener(e=>{if(e){let t=e.ownerDocument,i=kz(Fz(t,`selectionchange`,r),()=>{n!==null&&n()});return r(),i}})}function EU(e,t){let n=e.ownerDocument,r=n.defaultView||window,i=r.getComputedStyle(e),a=i.position===`absolute`,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(i.position===`fixed`)return n.body;for(let t=e;t=oz(t);)if(i=r.getComputedStyle(t),(!a||i.position!==`static`)&&o.test(i.overflow+i.overflowY+i.overflowX))return t;return n.body}function DU(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function OU(e,t){let n=e[Symbol.iterator]();return new Promise((e,r)=>{let i=[],a=()=>{let{done:o,value:s}=n.next();if(o)return e(i);let c=new FileReader;c.addEventListener(`error`,r),c.addEventListener(`load`,()=>{let e=c.result;typeof e==`string`&&i.push({file:s,result:e}),a()}),DU(s,t)?c.readAsDataURL(s):a()};a()})}function kU(e,t){return Array.from(MU(e,t))}function AU(e){return e?e.getAdjacentCaret():null}function jU(e,t){return Array.from(VU(e,t))}function MU(e,t){return LU(`next`,e,t)}function NU(e,t){return Array.from(PU(e,t))}function*PU(e,t){for(let n of LU(`next`,e,t)){yield n;let{node:e,depth:r}=n;if(AI(e)&&!e.is(t))for(let t of cI(e)){let n=aI(e,t);n!==null&&(yield*FU(n,r+1))}}}function*FU(e,t){yield{depth:t,node:e};let n=t+1;if(AI(e))for(let t of cI(e)){let r=aI(e,t);r!==null&&(yield*FU(r,n))}if(G(e))for(let t of e.getChildren())yield*FU(t,n)}function IU(e,t){let n=zF(iI(e,t));return n&&n[0]}function LU(e,t,n){let r=nI(),i=t||r,a=G(i)?UF(i,e):iI(i,e),o=zU(i),s=n?RF(GF(iI(n,e)))||IU(n,e):IU(i,e),c=o;return Oz({hasNext:e=>e!==null,initial:a,map:e=>({depth:c,node:e.origin}),step:e=>{if(e.isSameNodeCaret(s))return null;gI(e)&&c++;let t=zF(e);return!t||t[0].isSameNodeCaret(s)?null:(c+=t[1],t[0])}})}function RU(e){let t=zF(iI(e,`next`));return t&&[t[0].origin,t[1]]}function zU(e){let t=-1;for(let n=e;n!==null;n=n.getParent()??sI(n))t++;return t}function BU(e){let t=zF(GF(iI(e,`previous`)),`root`);return t&&t[0].origin}function VU(e,t){return LU(`previous`,e,t)}function HU(e,t){return Array.from(UU(e,t))}function*UU(e,t){let n=[];for(let r of LU(`previous`,e,t)){for(;n.length>0&&r.depth<=n[n.length-1].depth;){let e=n.pop();yield*WU(e.node,e.depth+1)}yield r;let{node:e,depth:i}=r;AI(e)&&cI(e).length>0&&!e.is(t)&&n.push({depth:i,node:e})}for(;n.length>0;){let e=n.pop();yield*WU(e.node,e.depth+1)}}function*WU(e,t){let n=cI(e);for(let r=n.length-1;r>=0;r--){let i=aI(e,n[r]);i!==null&&(yield*GU(i,t))}}function*GU(e,t){yield{depth:t,node:e};let n=t+1;if(G(e)){let t=e.getChildren();for(let e=t.length-1;e>=0;e--)yield*GU(t[e],n)}AI(e)&&(yield*WU(e,n))}function KU(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function qU(e){let t=NF(e,e=>G(e)&&!e.isInline());return G(t)||_U(4,e.__key),t}function JU(e,t,n,r){let i=e=>e instanceof t;return e.registerNodeTransform(t,e=>{let t=(e=>{let t=e.getChildren();for(let e=0;e<t.length;e++){let n=t[e];if(i(n))return null}let n=e,r=e;for(;n!==null;)if(r=n,n=n.getParent(),i(n))return{child:r,parent:n};return null})(e);if(t!==null){let{child:i,parent:a}=t;if(i.is(e)){r(a,e);let t=i.getNextSiblings(),o=t.length;if(a.insertAfter(i),o!==0){let e=n(a);i.insertAfter(e);for(let n=0;n<o;n++)e.append(t[n])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})}function YU(e,t){let n=new Map,r=e._pendingEditorState;for(let[e,r]of t._nodeMap)n.set(e,yF(r));r&&(r._nodeMap=n),IF();let i=t._selection;WI(i===null?null:i.clone())}function XU(e){let t=W()||tI(),n;if(K(t))n=_F(t.focus,`next`);else{if(t!=null){let e=t.getNodes(),r=e[e.length-1];r&&(n=iI(r,`next`))}n||=UF(nI(),`previous`).getFlipped().insert(EF())}let r=fI(e,n,yI(i=n)||zF(MI(i)?i.getSiblingCaret():i,`shadowRoot`)!==null?{$shouldSplit:(e,t)=>t!==`last`}:void 0);var i;let a=RF(r);return GI(KF(gI(a)?FI(a):r)),e.getLatest()}function ZU(e){let t=W();if(!K(t))return void(t&&t.insertNodes([e]));let n=VF(RI(vF(t)),`next`).anchor;if(MI(n)){let e=JI(n);if(!e)return;n=e}let r=n.getFlipped();r.insert(e),GI(BF(r,r))}function QU(e,t){let n=t();return e.replace(n),n.append(e),n}function $U(e,t){if(e==null)return!1;let n=Object.getPrototypeOf(e);return n!=null&&n.constructor!=null&&n.constructor.name===t.name}function eW(e){let t=null;if($U(e,DragEvent)?t=e.dataTransfer:$U(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function tW(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);i!==null&&n.push(i)}return n}function nW(e){let t=W();if(!K(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],a=i.getKey();if(n.has(a))continue;let o=NF(i,e=>G(e)&&!e.isInline());if(o===null)continue;let s=o.getKey();o.canIndent()&&!n.has(s)&&(n.add(s),e(o))}return n.size>0}function rW(e,t){UF(e,`next`).insert(t)}var iW=!(JL||!tL)&&void 0;function aW(e,t=!1){let n=1;if(function(){if(iW===void 0){let e=document.createElement(`div`);e.style.position=`absolute`,e.style.opacity=`0`,e.style.width=`100px`,e.style.left=`-1000px`,document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty(`zoom`,`2`),iW=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return iW}()||t){let t=e&&e.ownerDocument.defaultView||window;for(;e;)n*=Number(t.getComputedStyle(e).getPropertyValue(`zoom`)),e=oz(e)}return n}function oW(e){return e._parentEditor!==null}function sW(e,t){return cW(e,t,null)}function cW(e,t,n){let r=!1;for(let i of dW(e))t(i)?n!==null&&n(i):(r=!0,G(i)&&cW(i,t,n||(e=>i.insertAfter(e))),i.remove());return r}function lW(e,t){let n=[],r=Array.from(e).reverse();for(let e=r.pop();e!==void 0;e=r.pop())if(t(e))n.push(e);else if(G(e))for(let t of dW(e))r.push(t);return n}function uW(e){return fW(UF(e,`next`))}function dW(e){return fW(UF(e,`previous`))}function fW(e){return Oz({hasNext:kI,initial:e.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function pW(e){zI(iI(e,`next`)).splice(1,e.getChildren())}function mW(e){let t=t=>lI(t,e),n=(t,n)=>KI(t,e,n);return{$get:t,$set:n,accessors:[t,n],makeGetterMethod:()=>function(){return t(this)},makeSetterMethod:()=>function(e){return n(this,e)},stateConfig:e}}function hW(e,t){let n=W();if(K(n)&&n.isCollapsed()){let r=NF(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getFirstChild()===r&&_W(n.anchor,r))return r.insertBefore(EF()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function gW(e,t){let n=W();if(K(n)&&n.isCollapsed()){let r=NF(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getLastChild()===r&&vW(n.anchor,r))return r.insertAfter(EF()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function _W(e,t){return lU(e,t,`previous`)}function vW(e,t){return lU(e,t,`next`)}var Y=gU;Y.$descendantsMatching,Y.$dfs,Y.$dfsIterator,Y.$dfsWithSlots,Y.$dfsWithSlotsIterator,Y.$filter,Y.$findMatchingParent,Y.$firstToLastIterator,Y.$getAdjacentCaret,Y.$getAdjacentSiblingOrParentSiblingCaret,Y.$getDepth;var yW=Y.$getNearestBlockElementAncestorOrThrow,bW=Y.$getNearestNodeOfType;Y.$getNextRightPreorderNode,Y.$getNextSiblingOrParentSibling;var xW=Y.$handleIndentAndOutdent;Y.$insertFirst,Y.$insertNodeIntoLeaf;var SW=Y.$insertNodeToNearestRoot;Y.$insertNodeToNearestRootAtCaret,Y.$isAtEndOfNode,Y.$isAtStartOfNode,Y.$isBlockFullySelected,Y.$isEditorIsNestedEditor,Y.$lastToFirstIterator;var CW=Y.$onEscapeDown,wW=Y.$onEscapeUp;Y.$restoreEditorState,Y.$reverseDfs,Y.$reverseDfsIterator,Y.$reverseDfsWithSlots,Y.$reverseDfsWithSlotsIterator,Y.$splitNode,Y.$unwrapAndFilterDescendants,Y.$unwrapNode,Y.$wrapNodeInElement,Y.CAN_USE_BEFORE_INPUT,Y.CAN_USE_DOM,Y.IS_ANDROID,Y.IS_ANDROID_CHROME,Y.IS_APPLE,Y.IS_APPLE_WEBKIT,Y.IS_CHROME,Y.IS_FIREFOX,Y.IS_IOS,Y.IS_SAFARI,Y.addClassNamesToElement;var TW=Y.calculateZoomLevel;Y.dedupeSelectionRects;var EW=Y.eventFiles;Y.getScrollParent,Y.isBlockDomNode,Y.isHTMLAnchorElement,Y.isHTMLElement,Y.isInlineDomNode,Y.isMimeType,Y.makeStateWrapper,Y.markSelection,Y.mediaFileReader,Y.mergeRegister;var DW=Y.objectKlassEquals;Y.positionNodeOnRange,Y.registerNestedElementResolver,Y.removeClassNamesFromElement;var OW=Y.selectionAlwaysOnDisplay,kW=t({EditorStateExtension:()=>AW}),AW={build:e=>bV(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:`@lexical/extension/EditorState`},jW=kW.EditorStateExtension,MW=t({NodeSelectionExtension:()=>PW}),NW=new Set,PW={build(e,t,n){let r=n.getDependency(jW).output,i=pV({watchedNodeKeys:new Map}),a=bV(()=>{},()=>fV(()=>{let e=a.peek(),{watchedNodeKeys:t}=i.value,n,o=!1;r.value.read(()=>{if(W())for(let[r,i]of t.entries()){if(i.size===0){t.delete(r);continue}let a=$F(r),s=a&&a.isSelected()||!1;o||=s!==(!!e&&e.has(r)),s&&(n||=new Set,n.add(r))}}),!o&&n&&e&&n.size===e.size||(a.value=n)}));return{watchNodeKey:function(e){let t=dV(()=>(a.value||NW).has(e)),{watchedNodeKeys:n}=i.peek(),r=n.get(e),o=r!==void 0;return r||=new Set,r.add(t),o||(n.set(e,r),i.value={watchedNodeKeys:n}),t}}},dependencies:[jW],name:`@lexical/extension/NodeSelection`},FW=MW.NodeSelectionExtension,IW=t({$createHorizontalRuleNode:()=>BW,$isHorizontalRuleNode:()=>VW,HorizontalRuleExtension:()=>HW,HorizontalRuleNode:()=>RW,INSERT_HORIZONTAL_RULE_COMMAND:()=>LW}),LW=HR(`INSERT_HORIZONTAL_RULE_COMMAND`),RW=class extends OL{$config(){return this.config(`horizontalrule`,{extends:OL,importDOM:{hr:()=>({conversion:zW,priority:0})}})}exportDOM(){return{element:YF().createElement(`hr`)}}createDOM(e){let t=YF().createElement(`hr`);return FR(t,e.theme.hr),t}getTextContent(){return`\n`}isInline(){return!1}updateDOM(){return!1}};function zW(){return{node:BW()}}function BW(){return CF(RW)}function VW(e){return e instanceof RW}var HW={dependencies:[jW,FW],name:`@lexical/extension/HorizontalRule`,nodes:()=>[RW],register(e,t,n){let{watchNodeKey:r}=n.getDependency(FW).output,i=pV({nodeSelections:new Map}),a=e._config.theme.hrSelected??`selected`;return kz(e.registerCommand(LW,e=>{let t=W();return K(t)?(t.focus.getNode()!==null&&SW(BW()),!0):!1},lL),e.registerCommand(iL,e=>{if(hz(e.target)){let t=eI(e.target);if(VW(t))return function(e,t=!1){let n=W(),r=e.isSelected(),i=e.getKey(),a;t&&CI(n)?a=n:(a=TF(),WI(a)),r?a.delete(i):a.add(i)}(t,e.shiftKey),!0}return!1},uL),e.registerMutationListener(RW,(t,n)=>{uV(()=>{let n=!1,{nodeSelections:a}=i.peek();for(let[i,o]of t.entries())if(o===`destroyed`)a.delete(i),n=!0;else{let t=a.get(i),o=e.getElementByKey(i);t?t.domNode.value=o:(n=!0,a.set(i,{domNode:pV(o),selectedSignal:r(i)}))}n&&(i.value={nodeSelections:a})})}),fV(()=>{let e=[];for(let{domNode:t,selectedSignal:n}of i.value.nodeSelections.values())e.push(fV(()=>{let e=t.value;e&&(n.value?FR(e,a):Lz(e,a))}));return kz(...e)}))}},UW=IW,WW=UW.$createHorizontalRuleNode,GW=UW.$isHorizontalRuleNode,KW=UW.HorizontalRuleExtension,qW=UW.HorizontalRuleNode,JW=UW.INSERT_HORIZONTAL_RULE_COMMAND,YW=t({getExtensionDependencyFromEditor:()=>XW});function XW(e,t){let n=vH.fromEditor(e).getExtensionRep(t);return n===void 0&&function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(303,t.name),n.getExtensionDependency()}var ZW=YW.getExtensionDependencyFromEditor,QW=t({$getExtensionDependency:()=>$W,$getExtensionOutput:()=>eG,$getPeerDependency:()=>tG});function $W(e){return ZW(XF(),e)}function eG(e){return $W(e).output}function tG(e){return wH(XF(),e)}var nG=QW,rG=nG.$getExtensionDependency,iG=nG.$getExtensionOutput,aG=nG.$getPeerDependency,oG=t({$appendNodeToHTML:()=>Fq,$distributeInlineWrapper:()=>VK,$generateDOMFromNodes:()=>jq,$generateDOMFromRoot:()=>Mq,$generateHtmlFromNodes:()=>Nq,$generateNodesFromDOM:()=>Aq,$generateNodesFromDOMViaExtension:()=>Cq,$getImportContextValue:()=>RK,$getRenderContextValue:()=>jG,$getSessionDOMRenderConfig:()=>FG,$inlineStylesFromStyleSheets:()=>bG,$isBlockLevel:()=>BK,$propagateTextAlignToBlockChildren:()=>HK,$setRenderContextValue:()=>NG,$updateRenderContextValue:()=>PG,$withImportContext:()=>zK,$withRenderContext:()=>IG,BlockSchema:()=>WK,CoreImportExtension:()=>wq,CoreImportRules:()=>lq,DOMImportExtension:()=>Sq,DOMRenderExtension:()=>cK,HorizontalRuleImportExtension:()=>Dq,HorizontalRuleImportRules:()=>Eq,ImportOverlays:()=>FK,ImportSource:()=>OK,ImportSourceDataTransfer:()=>kK,ImportTextFormat:()=>AK,ImportTextStyle:()=>jK,ImportWhitespaceConfig:()=>PK,InlineSchema:()=>GK,NestedBlockSchema:()=>KK,RenderContextExport:()=>kG,RenderContextRoot:()=>OG,RootSchema:()=>qK,contextUpdater:()=>gG,contextValue:()=>hG,createImportState:()=>DK,createRenderState:()=>DG,defaultIsInline:()=>NK,defaultPreservesWhitespace:()=>MK,defineImportRule:()=>Tq,defineOverlayRules:()=>gq,domOverride:()=>LG,isElementOfTag:()=>SK,parseSelector:()=>EK,sel:()=>Oq});function sG(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var cG;function lG(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function uG(e){return cG&&cG.editor===e?cG:void 0}function dG(e,t){let n=uG(t);return n&&n[e]}function fG(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(lG(e,n))]}return t}function pG(e,t){let n=t;for(let r of e){let[e,i]=fG(n,r),a=e.key;if(n===t&&lG(n,e)===i)continue;let o=n===t||n===void 0?mG(t):n;o[a]=i,n=o}return n}function mG(e){return Object.create(e||null)}function hG(e,t){return[e,t]}function gG(e,t){return{cfg:e,updater:t}}function _G(e,t,n,r=XF()){let i=cG,a=uG(r);try{return cG={...a,editor:r,[e]:t},n()}finally{cG=i}}function vG(e,t=()=>{}){return(n,r=XF())=>i=>{let a=uG(r),o=a&&a[e],s=pG(n,o||t(r));return s&&s!==o?_G(e,s,i,r):i()}}function yG(e,t,n,r){return Object.assign(GR(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}var bG=(e,t,n)=>{xG(e),n()};function xG(e){if(!mz(e))return;let t=e;if(t.querySelector(`style`)===null)return;let n=new Map;function r(e){let t=n.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);n.set(e,t)}return t}try{for(let e of Array.from(t.styleSheets)){let n;try{n=e.cssRules}catch{continue}for(let e of Array.from(n)){if(!DW(e,CSSStyleRule))continue;let n;try{n=t.querySelectorAll(e.selectorText)}catch{continue}for(let t of Array.from(n)){if(!J(t))continue;let n=r(t);for(let r=0;r<e.style.length;r++){let i=e.style[r];n.has(i)||t.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var SG=`@lexical/html/DOM`,CG=Symbol.for(`@lexical/html/DOMExportContext`),wG=`@lexical/html/DOMImport`,TG=Symbol.for(`@lexical/html/DOMImportContext`),EG=()=>!0;function DG(e,t,n){return yG(CG,e,t,n)}var OG=DG(`root`,Boolean),kG=DG(`isExport`,Boolean);function AG(e){let t=wH(e,SG);return t?t.output.defaults:void 0}function jG(e,t=XF()){return lG(function(e){return dG(CG,e)||AG(e)}(t),e)}function MG(e){let t=wH(e,SG);return t?t.output.runtime:void 0}function NG(e,t,n=XF()){let r=MG(n);r&&r.setContextValue(e,t)}function PG(e,t,n=XF()){let r=MG(n);r&&r.setContextValue(e,t(lG(r.editorContext,e)))}function FG(e=XF()){let t=MG(e);return t?t.getSessionConfig():ZF(e)}var IG=vG(CG,AG);function LG(e,t,n){return{...t,...n,nodes:e}}function RG(e){return t=>t instanceof e}function zG(e,{nodes:t}){if(t===`*`)return EG;let n={},r=[];for(let i of t)if(`getType`in i){let t=i.getType();if(n){let r=e.get(t);r===void 0&&sG(339,i.name,t);for(let e of r)n[e]=!0}r.push(RG(i))}else n=void 0,r.push(i);return n||(r.length===1?r[0]:e=>{for(let t of r)if(t(e))return!0;return!1})}function BG(e){return(t,n,r)=>e(t,r)}function VG(e){return(t,n,r,i)=>e(t,n,i)}function HG(e){return(t,n,r,i,a)=>e(t,n,r,a)}function UG(e){return(t,n,r,i,a,o)=>e(t,n,r,i,o)}function WG(e,t){return(n,r)=>{let i=()=>e(n,r),a=t(n);return a?a(n,i,r):i()}}function GG(e,t){return(n,r,i)=>{let a=()=>e(n,r,i),o=t(n);return o?o(n,r,a,i):a()}}var KG=GG,qG=VG;function JG(e,t){return(n,r,i,a)=>{let o=()=>e(n,r,i,a),s=t(n);return s?s(n,r,i,o,a):o()}}function YG(e,t){return(n,r,i,a,o)=>{let s=()=>e(n,r,i,a,o),c=t(n);return c?c(n,r,i,a,s,o):s()}}function XG(e,t){return(n,r,i,a)=>{e(n,r,i,a);let o=t(n);o&&o(n,r,i,a)}}function ZG(e,t,n,r,i){let a=n[t];for(let n of e[t])if(typeof n[0]==`function`){let[e,t]=n;a=r(a,n=>e(n)&&t||void 0)}else{let e=n[1],t={};for(let n in e){let i=e[n];i&&(t[n]=i.reduce((e,t)=>r(e,()=>t),a))}a=r(a,e=>{let n=t[e.getType()];return n&&i(n)})}n[t]=a}function QG(e,t,n,r){if(!r)return;let i=e[t];if(typeof n==`function`)i.push([n,r]);else{let e=i[i.length-1],t;e&&e[0]===`types`?t=e[1]:(t={},i.push([`types`,t]));for(let e in n){let n=t[e]||[];t[e]=n,n.push(r)}}}function $G(e){return e.nodes===`*`}function eK(e,t){let n=sz(RV(e).nodes),r={$createDOM:[],$decorateDOM:[],$exportDOM:[],$extractWithChild:[],$getDOMSlot:[],$getSlotTargetElement:[],$shouldExclude:[],$shouldInclude:[],$updateDOM:[]};for(let e of function(e){let t=[],n=[],r=[];for(let i of e)if($G(i))t.push(i);else if(Array.isArray(i.nodes))for(let e of i.nodes)xI(e.prototype)?r.push(i.nodes.length===1?i:{...i,nodes:[e]}):n.push(i.nodes.length===1?i:{...i,nodes:[e]});let i=new Map,a=e=>{let t=i.get(e);if(t===void 0){t=-1;for(let n of Ez(e))t++;i.set(e,t)}return t};return r.sort((e,t)=>a(e.nodes[0])-a(t.nodes[0])),[...r,...n,...t]}(t)){let t=zG(n,e);for(let n in r)QG(r,n,t,e[n])}return r}function tK(e){return e}function nK(e,{overrides:t}){let n=eK(e,t),r={...xL,...e.dom};return ZG(n,`$createDOM`,r,WG,BG),ZG(n,`$exportDOM`,r,WG,BG),ZG(n,`$extractWithChild`,r,YG,UG),ZG(n,`$getDOMSlot`,r,KG,qG),ZG(n,`$shouldExclude`,r,GG,VG),ZG(n,`$shouldInclude`,r,GG,VG),ZG(n,`$getSlotTargetElement`,r,JG,HG),ZG(n,`$updateDOM`,r,JG,HG),ZG(n,`$decorateDOM`,r,XG,tK),r}function rK(e){return{get:t=>lG(e,t)}}function iK(e){let t=Object.create(null);return pG(e,t)||t}function aK(e,t){let n=rK(t);return e.filter(e=>!(e.disabledForEditor&&e.disabledForEditor(n)))}function oK(e){if(e.nodes===`*`)return()=>!0;let t=e.nodes.map(e=>{let t=e;return xI(t.prototype)?e=>e instanceof t:e});return e=>t.some(t=>t(e))}var sK=class{editor;initialEditorConfig;overrides;editorContext;hasSessionGates;installed;sessionCache=new Map;constructor(e,t,n,r){this.editor=e,this.initialEditorConfig=t,this.overrides=n,this.editorContext=r,this.installed=aK(n,r),this.hasSessionGates=n.some(e=>e.disabledForSession)}setContextValue(e,t){let n=this.installed;this.editorContext[e.key]=t;let r=aK(this.overrides,this.editorContext);if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,r))return;let i=function(e,t){let n=new Set(e),r=new Set(t),i=[];for(let t of e)r.has(t)||i.push(t);for(let e of t)n.has(e)||i.push(e);return i}(n,r);this.installed=r,this.sessionCache.clear();let a=nK(this.initialEditorConfig,{overrides:r});this.editor._config.dom=a;let o=function(e){let t=[];for(let n of e)(n.$createDOM||n.$getDOMSlot||n.$decorateDOM)&&t.push(oK(n));return t.length===0?null:e=>t.some(t=>t(e))}(i);if(!o)return;let s=a.$updateDOM;a.$updateDOM=(e,t,n,r)=>!!o(e)||s(e,t,n,r),this.editor.update(IF,{discrete:!0}),a.$updateDOM=s}getSessionConfig(){let e=this.editor._config.dom||xL;if(!this.hasSessionGates)return e;let t=rK(dG(CG,this.editor)||this.editorContext),n=[],r=[];if(this.installed.forEach((e,i)=>{e.disabledForSession&&e.disabledForSession(t)?n.push(String(i)):r.push(e)}),n.length===0)return e;let i=n.join(`,`),a=this.sessionCache.get(i);return a||(a=nK(this.initialEditorConfig,{overrides:r}),this.sessionCache.set(i,a)),a}},cK={build(e,t,n){let{initialEditorConfig:r}=n.getInitResult(),i=iK(t.contextDefaults);return{defaults:i,runtime:new sK(e,r,t.overrides,i)}},config:{contextDefaults:[],overrides:[]},html:{export:new Map([[CR,()=>{let e=YF().createElement(`div`);return e.role=`textbox`,{element:e}}]])},init(e,t){let n={dom:e.dom,nodes:e.nodes},r=iK(t.contextDefaults);return e.dom=nK(e,{overrides:aK(t.overrides,r)}),{initialEditorConfig:n}},mergeConfig(e,t){let n=Uz(e,t);for(let r of[`overrides`,`contextDefaults`])t[r]&&(n[r]=[...e[r],...t[r]]);return n},name:SG},lK=Symbol.for(`@lexical/html/SelectorImpl`);function uK(e,t){let n={kind:`element`,predicate:(r=t,r.length===0?J:r.length===1?r[0]:(e,t)=>{for(let n of r)if(!n(e,t))return!1;return!0}),tags:e};var r;let i=n=>uK(e,[...t,n]);return{[lK]:n,attr:(e,t,n)=>i(pK(e,t,n)),classAll:(...e)=>i(fK(e)),classAny:(...e)=>i(function(e){let t=dK(e);return t.length===0?()=>!1:e=>{if(!J(e))return!1;let n=e.classList;for(let e of t)if(n.contains(e))return!0;return!1}}(e)),styleAny:(e,t,n)=>i(function(e,t,n){if(typeof t==`string`)return n=>J(n)&&n.style.getPropertyValue(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!J(t))return!1;let a=t.style.getPropertyValue(e);if(!a)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}sG(362,JSON.stringify(e))}(e,t,n))}}function dK(e){let t=[];for(let n of e)n&&t.push(n);return t}function fK(e){let t=dK(e);return t.length===0?()=>!0:e=>{if(!J(e))return!1;let n=e.classList;for(let e of t)if(!n.contains(e))return!1;return!0}}function pK(e,t,n){if(!0===t)return t=>J(t)&&t.hasAttribute(e);if(typeof t==`string`)return n=>J(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!J(t))return!1;let a=t.getAttribute(e);if(a==null)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}sG(361,JSON.stringify(e))}function mK(e){return{[lK]:e}}var hK=mK({kind:`text`,predicate:_z,tags:new Set}),gK=mK({kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set});function _K(){return uK(new Set,[])}function vK(){return gK}function yK(...e){e.length>0||sG(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return uK(t,[])}function bK(){return hK}var xK={any:_K,comment:vK,tag:yK,text:bK};function SK(e,t){return J(e)&&e.nodeName===t.toUpperCase()}var CK=/[A-Za-z0-9_-]/,wK=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&CK.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`\"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\\\(.)/g,`$1`)}assert(e,t){e||sG(364,String(this.pos+1),t,this.source)}};function TK(e){let t=new Set,n=[],r=[],i=!1;if(e.skipWhitespace(),e.peek()===`*`)e.consume(),i=!0;else if(CK.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after \".\"`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after \"#\"`),n.push(pK(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after \"[\"`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`\"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected \"]\"`),e.consume(),n.push(pK(t,r))}}}return r.length>0&&n.push(fK(r)),e.assert(i||t.size>0||n.length>0,`expected a selector`),{predicates:n,tags:t}}function EK(e){let t=new wK(e,0),n=[];for(;n.push(TK(t)),t.skipWhitespace(),!t.eof();)t.assert(t.peek()===`,`,`expected \",\" (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace();if(n.length===1)return uK(n[0].tags,n[0].predicates);let r=new Set;if(n.every(e=>e.tags.size>0))for(let e of n)for(let t of e.tags)r.add(t);return uK(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}function DK(e,t,n){return yG(TG,e,t,n)}var OK=DK(`importSource`,()=>`unknown`),kK=DK(`importSourceDataTransfer`,()=>null),AK=DK(`textFormat`,()=>0),jK=DK(`textStyle`,()=>({}));function MK(e){if(!J(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function NK(e){if(_z(e))return!0;if(!J(e))return!1;let t=e.style.display;return t?t.startsWith(`inline`):!pz(e)&&xz(e)}var PK=DK(`whitespaceConfig`,()=>({isInline:NK,preservesWhitespace:MK})),FK=DK(`importOverlays`,()=>[]),IK=class{constructor(e){this.record=e}get(e){return lG(this.record,e)}set(e,t){this.record[e.key]=t}update(e,t){this.record[e.key]=t(lG(this.record,e))}has(e){return Object.prototype.hasOwnProperty.call(this.record,e.key)}};function LK(e){let t=wH(e,wG);return t?t.output.defaults:void 0}function RK(e,t=XF()){return lG(function(e){return dG(TG,e)||LK(e)}(t),e)}var zK=vG(TG,LK);function BK(e){return mI(e)||_I(e)&&!e.isInline()}function VK(e,t){let n=[],r=[],i=()=>{r.length!==0&&(n.push(t().splice(0,0,r)),r=[])};for(let a of e)if(BK(a)){if(i(),G(a)){let e=VK(a.getChildren(),t);a.splice(0,a.getChildrenSize(),e)}n.push(a)}else r.push(a);return i(),n}function HK(e,t){if(!J(t))return e;let n=t.style.textAlign;if(!XK(n))return e;for(let t of e)mI(t)&&t.getFormatType()===``&&t.setFormat(n);return e}function UK(e,t,n){e.length===1&&SI(e[0])&&(e=[]);let r=EF();if(J(n)){let e=n.style.textAlign;XK(e)&&r.setFormat(e)}return[r.splice(0,0,e)]}var WK={$accepts:BK,$packageRun:UK,name:`BlockSchema`},GK={$accepts:e=>!BK(e),name:`InlineSchema`},KK={$accepts:BK,$packageRun:e=>e,name:`NestedBlockSchema`},qK={$accepts:BK,$packageRun:UK,name:`RootSchema`},JK=xK,YK=new Set([`center`,`end`,`justify`,`left`,`right`,`start`]);function XK(e){return YK.has(e)}var ZK={B:{fontWeight:`bold`},EM:{fontStyle:`italic`},I:{fontStyle:`italic`},S:{textDecoration:`line-through`},STRONG:{fontWeight:`bold`},SUB:{verticalAlign:`sub`},SUP:{verticalAlign:`super`},U:{textDecoration:`underline`}},QK={CODE:qL,MARK:YL},$K=new Set([`font-weight`,`font-style`,`text-decoration`,`text-transform`,`vertical-align`]),eq={$import:(e,t)=>{let n=e.get(AK),r=ZK[t.nodeName],i=function(e){return{fontStyle:e.style.fontStyle,fontWeight:e.style.fontWeight,textDecoration:e.style.textDecoration,textTransform:e.style.textTransform,verticalAlign:e.style.verticalAlign}}(t),a=r?(o=r,{fontStyle:(s=i).fontStyle||o.fontStyle,fontWeight:s.fontWeight||o.fontWeight,textDecoration:s.textDecoration||o.textDecoration,textTransform:s.textTransform||o.textTransform,verticalAlign:s.verticalAlign||o.verticalAlign}):i;var o,s;let c=(l=n,u=function(e){let t=0,n=0,{fontWeight:r,fontStyle:i,textDecoration:a,textTransform:o,verticalAlign:s}=e;if(r===`700`||r===`bold`?t|=GL:r!==`normal`&&r!==`400`||(n|=GL),i===`italic`?t|=ZL:i===`normal`&&(n|=ZL),a){let e=a.split(` `);e.includes(`underline`)&&(t|=nR),e.includes(`line-through`)&&(t|=$L),e.includes(`none`)&&(n|=nR|$L)}return o===`lowercase`?(t|=jR.lowercase,n|=jR.uppercase|jR.capitalize):o===`uppercase`?(t|=jR.uppercase,n|=jR.lowercase|jR.capitalize):o===`capitalize`?(t|=jR.capitalize,n|=jR.lowercase|jR.uppercase):o===`none`&&(n|=jR.lowercase|jR.uppercase|jR.capitalize),s===`sub`?(t|=eR,n|=tR):s===`super`?(t|=tR,n|=eR):s===`baseline`&&(n|=eR|tR),{clear:n,set:t}}(a),l&~u.clear|u.set);var l,u;let d=QK[t.nodeName];return d&&(c|=d),c===n?e.$importChildren(t):e.$importChildren(t,{context:[hG(AK,c)]})},match:JK.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),name:`@lexical/html/inline-format`};function tq(e,t,n){let r=e;for(;;){let e=null;for(;(e=t?r.nextSibling:r.previousSibling)===null;){let e=r.parentNode;if(e===null)return null;r=e}if(r=e,!n.isInline(r))return null;let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(_z(r))return r;if(r.nodeName===`BR`)return null}}function nq(e,t){return t!==0&&q(e)?e.setFormat(t):e}function rq(e,t){if(q(e)){let n=function(e){let t=``;for(let n in e)$K.has(n)||(t+=`${n}: ${e[n]}; `);return t.trimEnd()}(t);n!==``&&e.setStyle(n)}return e}var iq={$import:(e,t)=>{let n=e.get(AK),r=e.get(jK),i=e.get(PK);if(function(e,t){let n=e.parentNode;for(;n!==null;){if(t.preservesWhitespace(n))return!0;n=n.parentNode}return!1}(t,i)){let e=LF(t.textContent||``);for(let t of e)nq(t,n),rq(t,r);return e}let a=function(e,t){let n=(e.textContent||``).replace(/\\r/g,``).replace(/[ \\t\\n]+/g,` `);if(n.length===0)return``;if(n[0]===` `){let r=e,i=!0;for(;r!==null&&(r=tq(r,!1,t))!==null;){let e=r.textContent||``;if(e.length>0){/[ \\t\\n]$/.test(e)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n.length>0&&n[n.length-1]===` `){let r=e,i=!0;for(;r!==null&&(r=tq(r,!0,t))!==null;)if((r.textContent||``).replace(/^( |\\t|\\r?\\n)+/,``).length>0){i=!1;break}i&&(n=n.slice(0,-1))}return n}(t,i);if(a===``)return[];let o=AF(a);return nq(o,n),rq(o,r),[o]},match:JK.text(),name:`@lexical/html/#text`},aq={$import:()=>[],match:JK.tag(`script`,`style`),name:`@lexical/html/script-style-ignore`},oq={$import:(e,t)=>wz(t)||Sz(t)?[]:[wF()],match:JK.tag(`br`),name:`@lexical/html/br`},sq={$import:(e,t)=>{let n=EF();if(HI(n,t),Bz(t,n),n.getFormatType()===``){let e=t.getAttribute(`align`);e&&XK(e)&&n.setFormat(e)}return VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:JK.tag(`p`),name:`@lexical/html/p`},cq={$import:(e,t,n)=>XF().hasNode(qW)?[WW()]:n(),match:JK.tag(`hr`),name:`@lexical/html/hr`},lq=[aq,sq,cq,{$import:(e,t,n)=>pz(t)?HK(e.$importChildren(t,{schema:WK}),t):n(),match:JK.any(),name:`@lexical/html/transparent-block`},iq,oq,eq];function uq(e,t){let n=[],r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}function dq(e){let t=[],n=new Map,r=[],i=[],a=[],o=new Set;e.forEach((e,s)=>{let c=function(e){let t=e[lK];return t===void 0&&sG(360),t}(e.match),l=e.name||function(e,t){return e.kind===`text`?`#text@${t}`:e.kind===`comment`?`#comment@${t}`:e.tags.size===0?`*@${t}`:`${Array.from(e.tags).join(`,`).toLowerCase()}@${t}`}(c,s);if(e.name&&o.add(e.name),t.push({$import:e.$import,name:l,predicate:c.predicate}),c.kind===`text`)i.push(s);else if(c.kind===`comment`)a.push(s);else if(c.tags.size===0)r.push(s);else for(let e of c.tags){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(s)}});let s=new Map;if(r.length===0)for(let[e,t]of n)s.set(e,t);else for(let[e,t]of n)s.set(e,uq(t,r));return{byTag:s,commentIndices:a,rules:t,textIndices:i,wildcardIndices:r}}function fq(e,t){return _z(t)?e.textIndices:t.nodeType===8?e.commentIndices:J(t)?e.byTag.get(t.nodeName)||e.wildcardIndices:pq}var pq=Object.freeze([]);function mq(e){let t=[];for(let n of e)if(hq(n))for(let e of n.rules)t.push(e);else t.push(n);return t}function hq(e){return typeof e==`object`&&!!e&&`__type`in e&&e.__type===`CompiledOverlayRules`}function gq(e){let t=mq(e);return{__type:`CompiledOverlayRules`,dispatch:dq(t),rules:t}}var _q=Object.freeze({});function vq(e,t){return{$importChildren:(t,n)=>function(e,t,n){let r=n&&n.rules?n.rules.dispatch:void 0;r&&e.overlays.push(r);try{let r=()=>yq(e,t,n);return n&&n.context?zK(n.context,e.editor)(r):r()}finally{r&&e.overlays.pop()}}(e,t,n),$importOne:(t,n)=>bq(e,t,n),captures:t,get:t=>RK(t,e.editor),session:e.session}}function yq(e,t,n){let r=n&&n.$onChild,i=[];for(let n of Array.from(t.childNodes)){let t=bq(e,n,void 0);for(let e of t){let t=r?r(e):e;t!=null&&i.push(t)}}let a=n&&n.$after?n.$after(i):i,o=n&&n.schema;return o?function(e,t,n,r){let i=[],a=null,o=()=>{if(a===null)return;let t=a;if(a=null,e.$packageRun){let a=e.$packageRun(t,n,r);if(a.length>0){for(let e of a)i.push(e);return}}if(e.onReject===`hoist`)for(let e of t)i.push(e)};for(let r of t)e.$accepts(r,n)?(o(),i.push(r)):(a===null&&(a=[]),a.push(r));return o(),e.$finalize?e.$finalize(i,n):i}(o,a,null,t):a}function bq(e,t,n){let r=()=>function(e,t){let n=function(e,t){let n=[];for(let r=e.overlays.length-1;r>=0;r--){let i=e.overlays[r],a=fq(i,t);a.length>0&&n.push({dispatch:i,indices:a})}let r=fq(e.dispatch,t);return r.length>0&&n.push({dispatch:e.dispatch,indices:r}),n}(e,t);if(n.length===0)return xq(e,t);let r=0,i=0,a=()=>{for(;r<n.length;){let{dispatch:o,indices:s}=n[r];for(;i<s.length;){let n=s[i++],r=o.rules[n],c={};if(r.predicate(t,c)){let n=vq(e,Object.keys(c).length===0?_q:c);try{return r.$import(n,t,a)}catch(e){throw e}}}r++,i=0}return xq(e,t)};return a()}(e,t);return n&&n.context?zK(n.context,e.editor)(r):r()}function xq(e,t){if(t.childNodes.length===0)return[];let n=[];for(let r of Array.from(t.childNodes)){let t=bq(e,r,void 0);for(let e of t)n.push(e)}return n}var Sq={build(e,t){let n=dq(mq(t.rules)),r=pG(t.contextDefaults,void 0),i=t.preprocess;return{$generateNodesFromDOM:(t,a)=>{let o=dG(TG,e)||r,s=a&&a.context?pG(a.context,o):o,c=s!==void 0&&s!==o?s:Object.create(o||null),l=new IK(c),u={session:l};return function(e,t,n){let r=e.length-1,i=()=>{for(;r>=0;)return void(0,e[r--])(t,n,i)};i()}(a&&a.preprocess?[...i,...a.preprocess]:i,t,u),_G(TG,c,()=>function(e,t,n,r){return yq({dispatch:e,editor:t,overlays:r.get(FK).map(e=>e.dispatch),session:r},mz(n)?n.body:n,{schema:qK})}(n,e,t,l),e)},defaults:r}},config:{contextDefaults:[],preprocess:[bG],rules:[{$import:(e,t)=>e.$importChildren(t),match:xK.any(),name:`@lexical/html/default-hoist`}]},mergeConfig:(e,t)=>Uz(e,{...t,...t.contextDefaults&&{contextDefaults:[...e.contextDefaults,...t.contextDefaults]},...t.preprocess&&{preprocess:[...e.preprocess,...t.preprocess]},...t.rules&&{rules:[...t.rules,...e.rules]}}),name:wG};function Cq(e,t){return iG(Sq).$generateNodesFromDOM(e,t)}var wq={dependencies:[[Sq,{rules:lq}]],name:`@lexical/html/CoreImport`};function Tq(e){return e}var Eq=[cq],Dq={dependencies:[KW,wq],name:`@lexical/html/HorizontalRuleImport`},Oq={any:_K,comment:vK,css:EK,tag:yK,text:bK},kq=new Set([`STYLE`,`SCRIPT`]);function Aq(e,t){xG(t);let n=mz(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!kq.has(t.nodeName)){let n=Iq(t,e,i,!1);if(n!==null)for(let e of n)r.push(e)}return function(e){for(let t of e)t.getParent()&&t.getNextSibling()instanceof ZI&&t.insertAfter(wF());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(i),r}function jq(e,t=null,n=XF()){return IG([hG(kG,!0)],n)(()=>{let r=nI(),i=FG(n),a=rI(t),o=e.append.bind(e);for(let e of(G(a)?a:r).getChildren())Pq(n,e,o,t,i);return e})}function Mq(e,t=nI()){let n=XF();return IG([hG(kG,!0),hG(OG,!0)],n)(()=>{let r=FG(n),i=e.append.bind(e);return Pq(n,t,i,null,r),e})}function Nq(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&sG(338),gF(e),jq(YF().createElement(`div`),t,e).innerHTML}function Pq(e,t,n,r=null,i=ZF(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&q(t)&&(s=mU(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=YF().createDocumentFragment(),p=d?d():G(s)?s.getChildren():[],m=a&&CI(r)&&G(t)?null:r,h=f.append.bind(f),g=null;for(let n of p){let o=Pq(e,n,h,m,i);o&&(g=n),!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((J(c)||vz(c))&&(u?u(f):c.append(f),function(e,t){let n=e.lastChild;if(SI(t)&&J(e)&&pz(e)&&n!==null&&n.nodeName===`BR`){let t=YF().createElement(`br`);t.setAttribute(`data-lexical-managed-linebreak`,`true`),e.append(t)}}(c,g)),vz(c)){if(l){let e=l.call(s,c);e&&c.replaceChildren(e)}n(c)}else if(n(c),l){let e=l.call(s,c);e&&c.replaceWith(e)}}else n(f);return a}function Fq(e,t,n,r=null){return Pq(e,t,n.append.bind(n),r,FG(e))}function Iq(e,t,n,r,i=new Map,a){let o=[];if(kq.has(e.nodeName))return o;let s=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,t),l=c?c(e):null,u=null;if(l!==null){u=l.after;let t=l.node;if(s=Array.isArray(t)?t[t.length-1]:t,s!==null){for(let[,e]of i)if(s=e(s,a),!s)break;s&&o.push(...Array.isArray(t)?t:[s])}l.forChild!=null&&i.set(e.nodeName,l.forChild)}let d=e.childNodes,f=[],p=(s==null||!EI(s))&&(s!=null&&mI(s)||r);for(let e=0;e<d.length;e++)f.push(...Iq(d[e],t,n,p,new Map(i),s));if(u!=null&&(f=u(f)),pz(e)&&(f=Lq(e,f,p?()=>{let e=new ZI;return n.push(e),e}:EF)),s==null){if(f.length>0)for(let e of f)o.push(e);else pz(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:xz(e.nextSibling)&&xz(e.previousSibling)}(e)&&o.push(wF())}else G(s)&&s.append(...f);return o}function Lq(e,t,n){let r=e.style.textAlign,i=[],a=[];for(let e=0;e<t.length;e++){let o=t[e];if(mI(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),e===t.length-1||e<t.length-1&&mI(t[e+1])){let e=n();e.setFormat(r),e.append(...a),i.push(e),a=[]}}return i}var X=oG;X.$appendNodeToHTML;var Rq=X.$distributeInlineWrapper;X.$generateDOMFromNodes,X.$generateDOMFromRoot;var zq=X.$generateHtmlFromNodes,Bq=X.$generateNodesFromDOM,Vq=X.$generateNodesFromDOMViaExtension;X.$getImportContextValue,X.$getRenderContextValue,X.$getSessionDOMRenderConfig,X.$inlineStylesFromStyleSheets;var Hq=X.$isBlockLevel,Uq=X.$propagateTextAlignToBlockChildren;X.$setRenderContextValue,X.$updateRenderContextValue,X.$withImportContext,X.$withRenderContext;var Wq=X.BlockSchema,Gq=X.CoreImportExtension;X.CoreImportRules;var Kq=X.DOMImportExtension;X.DOMRenderExtension,X.HorizontalRuleImportExtension,X.HorizontalRuleImportRules;var qq=X.ImportOverlays,Jq=X.ImportSource,Yq=X.ImportSourceDataTransfer;X.ImportTextFormat,X.ImportTextStyle,X.ImportWhitespaceConfig;var Xq=X.InlineSchema;X.NestedBlockSchema,X.RenderContextExport,X.RenderContextRoot,X.RootSchema,X.contextUpdater;var Zq=X.contextValue,Qq=X.createImportState;X.createRenderState,X.defaultIsInline,X.defaultPreservesWhitespace,X.defineImportRule;var $q=X.defineOverlayRules;X.domOverride;var eJ=X.isElementOfTag;X.parseSelector;var tJ=X.sel,nJ=t({$exportMimeTypeFromSelection:()=>IJ,$generateJSONFromSelectedNodes:()=>TJ,$generateNodesFromSerializedNodes:()=>EJ,$getClipboardDataFromSelection:()=>jJ,$getHtmlContent:()=>mJ,$getLexicalContent:()=>hJ,$handlePlainTextDrop:()=>SJ,$handleRichTextDrop:()=>xJ,$insertDataTransferForPlainText:()=>gJ,$insertDataTransferForRichText:()=>_J,$insertGeneratedNodes:()=>CJ,$writeDragSourceToDataTransfer:()=>yJ,ClipboardDOMImportExtension:()=>pJ,ClipboardImportExtension:()=>fJ,DEFAULT_IMPORT_MIME_TYPE:()=>cJ,DEFAULT_IMPORT_MIME_TYPE_PRIORITY:()=>aJ,GetClipboardDataExtension:()=>LJ,caretFromPoint:()=>rJ,copyToClipboard:()=>OJ,setLexicalClipboardDataTransfer:()=>MJ});function rJ(e,t,n=null){let r=cz(n),i=n?nz(n):[],a=n!==null&&i.length>0;if(a&&typeof r.caretPositionFromPoint==`function`){let a=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&function(e,t){for(let n=e;n!==null;){if(n===t)return!0;n=oz(n)}return!1}(a.offsetNode,n))return{node:a.offsetNode,offset:a.offset}}if(a){let i=n.getRootNode();if(gz(i)){let a=i.elementFromPoint(e,t);if(a!==null&&n.contains(a)){let n=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,t,a,r);if(n!==null)return n}}}if(typeof r.caretRangeFromPoint==`function`){let n=r.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(typeof r.caretPositionFromPoint==`function`){let n=r.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function iJ(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var aJ={\"application/x-lexical-editor\":0,\"text/html\":10,\"text/plain\":20,\"text/uri-list\":30};function oJ(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var sJ=(e,t)=>{if(!K(t))return t.insertRawText(e),!0;t!==W()&&WI(t);let n=e=>{let t=W();K(t)&&e(t)};return qz(e,{linebreak:()=>n(e=>e.insertParagraph()),tab:()=>n(e=>e.insertNodes([kF()])),text:e=>n(t=>t.insertText(e))}),!0},cJ={\"application/x-lexical-editor\":[(e,t,n)=>{try{let n=XF(),r=JSON.parse(e);if(r&&r.namespace===n._config.namespace&&Array.isArray(r.nodes))return CJ(n,EJ(r.nodes),t),!0}catch(e){console.error(e)}return n()}],\"text/html\":[(e,t,n)=>{try{let n=XF();return CJ(n,Bq(n,new DOMParser().parseFromString(oJ(e),`text/html`)),t),!0}catch(e){return console.error(e),n()}}],\"text/plain\":[sJ],\"text/uri-list\":[sJ]};function lJ(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function uJ(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&lJ(e.$importMimeType[i],a,n,t))return!0}return!1}var dJ={$importMimeType:cJ,$insertDataTransfer:(e,t)=>uJ({$importMimeType:cJ,priority:aJ},e,t),priority:aJ},fJ={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>uJ(t,e,n),priority:t.priority}),config:{$importMimeType:cJ,priority:aJ},mergeConfig(e,t){let n=Uz(e,t);if(t.$importMimeType){let r={...e.$importMimeType};for(let[e,n]of Object.entries(t.$importMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:`@lexical/clipboard/Import`},pJ={dependencies:[Gq,[fJ,{$importMimeType:{\"text/html\":[(e,t,n,r)=>{let i=Vq(new DOMParser().parseFromString(oJ(e),`text/html`),{context:[Zq(Jq,`paste`),Zq(Yq,r)]});return CJ(XF(),i,t),!0}]}}]],name:`@lexical/clipboard/DOMImport`};function mJ(e,t=W()){return t??iJ(166),K(t)&&t.isCollapsed()||t.getNodes().length===0?``:zq(e,t)}function hJ(e,t=W()){return t??iJ(166),K(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(TJ(e,t))}function gJ(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}function _J(e,t,n){(function(){let e=aG(fJ.name);return e?e.output:dJ})().$insertDataTransfer(e,t)}var vJ=`application/x-lexical-drag`;function yJ(e,t){let n={editorKey:t.getKey()};e.setData(vJ,JSON.stringify(n))}function bJ(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(vJ);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e,t){let n=rJ(e.clientX,e.clientY,t.getRootElement());if(n===null)return null;let r=QF(n.node);if(r===null)return null;if(q(r))return uI(r,`next`,n.offset);if(G(r))return WF(r,n.offset,`next`);let i=r.getParent();return i===null?null:WF(i,r.getIndexWithinParent()+1,`next`)}(e,t);if(a===null)return!1;let o=JI(a);if(o===null)return!1;let s=i.editorKey===t.getKey(),c=W();if(s){if(!K(c)||c.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=VF(vF(t),`next`);return xF(n,e)<0&&xF(e,r)<0}(a,c))return e.preventDefault(),!0;c.removeText()}if(!o.origin.isAttached())return e.preventDefault(),!0;if(n(r,GI(KF(o)),t),!s){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){for(let n of YR(t)){let t=iz(n);if(Cz(t)&&t.getKey()===e&&J(n))return n}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function xJ(e,t){return bJ(e,t,_J)}function SJ(e,t){return bJ(e,t,(e,t)=>gJ(e,t))}function CJ(e,t,n){e.dispatchCommand(TR,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(K(e)&&e.isCollapsed()){let t=e.anchor,n=null,r=_F(t,`previous`);if(r){if(MI(r))n=r.origin;else{let e=BF(r,UF(nI(),`next`).getFlipped());for(let t of e){if(q(t.origin)){n=t.origin;break}if(G(t.origin)&&!t.origin.isInline())break}}}if(n&&q(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}function wJ(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=G(n)&&n.excludeFromCopy(`clone`),o=n;t!==null&&q(o)&&(o=mU(t,o,`clone`));let s=jF(o),c=G(o)?o.getChildren():[],l=s.children||[];q(o)&&o.getTextContentSize()===0&&(i=!1);let u=i&&CI(t)&&G(n)?null:t;for(let r=0;r<c.length;r++){let a=c[r],o=wJ(e,u,a,l);!i&&G(n)&&o&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a){let t=cI(o);if(t.length>0){let n={};for(let r of t){let t=aI(o,r);t===null&&iJ(366,o.constructor.name,r);let i=[];wJ(e,null,t,i),(i.length!==1||G(t)&&t.excludeFromCopy(`clone`))&&iJ(435,r,o.constructor.name,String(i.length)),n[r]=i[0]}s.$slots=n}}if(i&&!a)r.push(s);else for(let e=0;e<l.length;e++)r.push(l[e]);return i}function TJ(e,t){let n=[],r=nI(),i=rI(t),a=(G(i)?i:r).getChildren();for(let r=0;r<a.length;r++)wJ(e,t,a[r],n);return{namespace:e._config.namespace,nodes:n}}function EJ(e){let t=[];for(let n of e)t.push(LI(n));return t}var DJ=null;async function OJ(e,t,n){if(DJ!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(kJ(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,o=ez(i);if(r===null||o===null)return!1;let s=a.createElement(`span`);s.style.position=`fixed`,s.style.top=`-1000px`,s.append(a.createTextNode(`#`)),r.append(s);let c=a.createRange();return c.setStart(s,0),c.setEnd(s,1),o.removeAllRanges(),o.addRange(c),new Promise((t,r)=>{let o=e.registerCommand(vL,r=>(DW(r,ClipboardEvent)&&(o(),DJ!==null&&(i.clearTimeout(DJ),DJ=null),t(kJ(e,r,n))),!0),cL);DJ=i.setTimeout(()=>{o(),DJ=null,t(!1)},50),a.execCommand(`copy`),s.remove()})}function kJ(e,t,n){if(n===void 0){let t=ez(e._window),r=W();if(!r||r.isCollapsed()||!t)return!1;let i=tz(t,e.getRootElement()),a=i.anchorNode,o=i.focusNode;if(a!==null&&o!==null&&!Tz(e,a,o))return!1;n=jJ(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(MJ(r,n),!0)}var AJ=[[`text/html`,mJ],[`application/x-lexical-editor`,hJ]];function jJ(e=W()){return function(e,t){let n={\"text/plain\":``};for(let[r,i]of Object.entries(e))if(i){let e=FJ(i,t);e!==null&&(n[r]=e)}return n}(NJ(),e)}function MJ(e,t){for(let[n]of AJ)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function NJ(e=XF()){let t=wH(e,LJ.name);return t?t.output:PJ}var PJ={\"application/x-lexical-editor\":[(e,t)=>e?hJ(XF(),e):t()],\"text/html\":[(e,t)=>e?mJ(XF(),e):t()],\"text/plain\":[(e,t)=>e?e.getTextContent():t()]};function FJ(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}function IJ(e,t=W()){return FJ(NJ()[e]||[],t)}var LJ={build:(e,t,n)=>t.$exportMimeType,config:{$exportMimeType:PJ},mergeConfig(e,t){let n=Uz(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$exportMimeType=r}return n},name:`@lexical/clipboard/GetClipboardData`},RJ=nJ;RJ.$exportMimeTypeFromSelection,RJ.$generateJSONFromSelectedNodes,RJ.$generateNodesFromSerializedNodes;var zJ=RJ.$getClipboardDataFromSelection;RJ.$getHtmlContent,RJ.$getLexicalContent,RJ.$handlePlainTextDrop;var BJ=RJ.$handleRichTextDrop;RJ.$insertDataTransferForPlainText;var VJ=RJ.$insertDataTransferForRichText;RJ.$insertGeneratedNodes;var HJ=RJ.$writeDragSourceToDataTransfer;RJ.ClipboardDOMImportExtension,RJ.ClipboardImportExtension,RJ.DEFAULT_IMPORT_MIME_TYPE,RJ.DEFAULT_IMPORT_MIME_TYPE_PRIORITY,RJ.GetClipboardDataExtension;var UJ=RJ.caretFromPoint,WJ=RJ.copyToClipboard,GJ=RJ.setLexicalClipboardDataTransfer,KJ=t({RootElementExtension:()=>qJ}),qJ={build:e=>bV(()=>e.getRootElement(),t=>e.registerRootListener(e=>{t.value=e})),name:`@lexical/extension/RootElement`},JJ=KJ.RootElementExtension,YJ=t({AriaLiveRegionExtension:()=>tY,EditorModeAnnounceExtension:()=>rY,FocusManagerExtension:()=>oY,FocusTrapExtension:()=>iY,HistoryAnnounceExtension:()=>nY,RovingTabIndexExtension:()=>aY}),XJ=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type=\"hidden\"])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex=\"-1\"])`,`[contenteditable=\"true\"]`].join(`,`);function ZJ(e){return Array.from(e.querySelectorAll(XJ))}function QJ(e,t){let n=t;for(;n!==null;){if(n===e)return!0;n=gz(n)?n.host:n.parentNode}return!1}function $J(e,t={}){let n=t.initialFocus??`firstFocusable`,r=e.ownerDocument,i=QR(r),a=J(i)?i:null,o=ZJ(e);return n===`container`&&e.hasAttribute(`tabindex`)?e.focus():o.length>0?o[0].focus():e.hasAttribute(`tabindex`)&&e.focus(),kz(()=>{a!==null&&typeof a.focus==`function`&&QJ(r,a)&&a.focus()},Fz(e,`keydown`,t=>{if(t.key!==`Tab`)return;let n=ZJ(e);if(n.length===0)return void t.preventDefault();t.preventDefault();let i=n[0],a=n[n.length-1],o=QR(r),s=J(o)&&QJ(e,o)?n.indexOf(o):-1;t.shiftKey?(s<=0?a:n[s-1]).focus():(s===-1||s===n.length-1?i:n[s+1]).focus()}),Fz(r,`focusin`,n=>{let r=$R(n);if(!J(r)||QJ(e,r)||t.allowOutside!=null&&t.allowOutside(r))return;let i=ZJ(e);i.length>0?i[0].focus():e.hasAttribute(`tabindex`)&&e.focus()}))}function eY(e,t={}){let n=t.orientation??`horizontal`,r=t.itemSelector??`:scope > button:not([disabled])`,i=()=>Array.from(e.querySelectorAll(r)),a=(e,t)=>{e.forEach((e,n)=>{e.tabIndex=n===t?0:-1})};return(()=>{let t=i();if(t.length===0)return;let n=QR(e.ownerDocument),r=t.findIndex(e=>e===n);a(t,r>=0?r:0)})(),kz(Fz(e,`keydown`,t=>{let r=i();if(r.length===0)return;let o=QR(e.ownerDocument),s=r.findIndex(e=>e===o);if(s<0)return void(t.key!==`ArrowRight`&&t.key!==`ArrowDown`&&t.key!==`ArrowLeft`&&t.key!==`ArrowUp`&&t.key!==`Home`&&t.key!==`End`||(t.preventDefault(),a(r,0),r[0].focus()));let c=n===`horizontal`||n===`both`,l=n===`vertical`||n===`both`,u=s;switch(t.key){case`ArrowRight`:if(!c)return;u=s+1;break;case`ArrowLeft`:if(!c)return;u=s-1;break;case`ArrowDown`:if(!l)return;u=s+1;break;case`ArrowUp`:if(!l)return;u=s-1;break;case`Home`:u=0;break;case`End`:u=r.length-1;break;default:return}t.preventDefault(),u=(u+r.length)%r.length,a(r,u),r[u].focus()}),()=>{i().forEach(e=>{e.tabIndex=0})})}var tY={build(e,t,n){let r=n.getInitResult();return{..._V(t),announce(e){r.value=e===r.peek()?e+``:e}}},config:{owner:null,politeness:`polite`},dependencies:[JJ],init:()=>pV(``),name:`@lexical/a11y/AriaLiveRegion`,register(e,t,n){let r=n.getInitResult(),{owner:i,politeness:a}=n.getOutput(),o=n.getDependency(JJ).output,s=pV(null);return kz(fV(()=>{let e=i.value,t=e?null:o.value,n=e??(t?t.ownerDocument.body:null);if(!n)return;let r=function(e){let t=e.ownerDocument.createElement(`div`);return t.setAttribute(`aria-atomic`,`true`),t.setAttribute(`role`,`status`),function(e){let t=e.style;t.border=`0`,t.clip=`rect(0 0 0 0)`,t.height=`1px`,t.margin=`-1px`,t.overflow=`hidden`,t.padding=`0`,t.position=`absolute`,t.whiteSpace=`nowrap`,t.width=`1px`}(t),e.appendChild(t),t}(n);return s.value=r,()=>{r.remove(),s.value=null}}),fV(()=>{let e=s.value;e&&e.setAttribute(`aria-live`,a.value)}),fV(()=>{let e=r.value,t=s.peek();t&&(t.textContent=e)}))}},nY={build:(e,t)=>_V(t),config:{disabled:!1,redone:`Redone`,undone:`Undone`},dependencies:[tY],name:`@lexical/a11y/HistoryAnnounce`,register(e,t,n){let{disabled:r,redone:i,undone:a}=n.getOutput(),{announce:o}=n.getDependency(tY).output;return fV(()=>r.value?void 0:kz(e.registerCommand(PR,()=>(o(a.peek()),!1),uL),e.registerCommand(xR,()=>(o(i.peek()),!1),uL)))}},rY={build:(e,t)=>_V(t),config:{disabled:!1,editable:`Editor is editable`,readOnly:`Editor is read-only`},dependencies:[tY],name:`@lexical/a11y/EditorModeAnnounce`,register(e,t,n){let{disabled:r,editable:i,readOnly:a}=n.getOutput(),{announce:o}=n.getDependency(tY).output;return fV(()=>r.value?void 0:e.registerEditableListener(e=>{o(e?i.peek():a.peek())}))}},iY={build:()=>WR($J),name:`@lexical/a11y/FocusTrap`,register:(e,t,n)=>()=>n.getOutput().dispose()},aY={build:()=>WR(eY),name:`@lexical/a11y/RovingTabIndex`,register:(e,t,n)=>()=>n.getOutput().dispose()},oY={build:e=>WR((t,n)=>function(e,t,n={}){let r=n.toolbarItemSelector??`:scope > button:not([disabled]), :scope > [tabindex=\"0\"]`;return kz(e.registerCommand(lR,e=>{if(!e.altKey||e.key!==`F10`)return!1;let n=t.querySelector(`[tabindex=\"0\"]`)??t.querySelector(r);return n!==null&&(e.preventDefault(),n.focus(),!0)},uL),Fz(t,`keydown`,n=>{if(n.key!==`Escape`)return;let i=$R(n);if(J(i)){let e=t.querySelectorAll(r),n=!1;for(let t of e)if(t===i||QJ(t,i)){n=!0;break}if(!n)return}let a=e.getRootElement();a!==null&&(n.preventDefault(),n.stopPropagation(),e.focus(),a.focus())}))}(e,t,n)),name:`@lexical/a11y/FocusManager`,register:(e,t,n)=>()=>n.getOutput().dispose()},sY=YJ,cY=sY.AriaLiveRegionExtension;sY.EditorModeAnnounceExtension,sY.FocusManagerExtension,sY.FocusTrapExtension,sY.HistoryAnnounceExtension,sY.RovingTabIndexExtension;var lY=t({NormalizeInlineElementsExtension:()=>dY});function uY(e){G(e)&&e.isInline()&&e.isEmpty()&&e.remove()}var dY={build:(e,t,n)=>_V(t),config:{disabled:!1},name:`@lexical/NormalizeInlineElements`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value){let t=[];for(let{klass:n,transforms:r}of e._nodes.values())n.prototype instanceof kL&&n.prototype.isInline!==kL.prototype.isInline&&(r.add(uY),t.push(()=>r.delete(uY)));return()=>t.forEach(e=>e())}})}},fY=lY.NormalizeInlineElementsExtension,pY=t({NormalizeTripleClickSelectionExtension:()=>hY}),mY=new Set([AR,kR]),hY={build:(e,t,n)=>_V(t),config:{$fixFocusOverselection:function(){let e=W();if(K(e)&&!e.isCollapsed()){let t=VF(vF(e),`next`),n=t.focus;for(MI(n)&&t.anchor.origin!==n.origin&&n.offset===0&&(n=zI(n.getSiblingCaret())),kI(n)&&t.anchor.origin!==n.origin&&SI(n.origin)&&(n=zI(n));gI(n)&&t.anchor.origin!==n.origin;)n=zI(iI(n.origin,`next`));if(kI(n)&&G(n.origin)&&(n=FI(UF(n.origin,`previous`)).getFlipped()),n=FI(n),!n.isSamePointCaret(t.focus)){let e=GI(BF(t.anchor,n)),r=XF().getRootElement(),i=r&&ez(r.ownerDocument.defaultView);i&&XI(tI(),e,XF(),i,mY,r)}}},dateNow:()=>Date.now(),disabled:!1,thresholdMsec:100},name:`@lexical/NormalizeTripleClickSelection`,register:(e,t,n)=>fV(()=>{let t=n.getOutput();if(!t.disabled.value)return e.registerRootListener(n=>{if(!n)return;let r=0,i=e=>{if(e?e.detail>2:r>0){let n=t.dateNow.peek()();r=e&&e.type===`mousedown`||n-r<=t.thresholdMsec.peek()?n:0}return r};return kz(e.registerCommand(wR,()=>(i(null)&&(r=0,t.$fixFocusOverselection.peek()()),!1),oL),Iz(n,{mousedown:i,mouseup:i},!0))})})},gY=pY.NormalizeTripleClickSelectionExtension,_Y=t({$createHeadingNode:()=>UY,$createQuoteNode:()=>IY,$isHeadingNode:()=>WY,$isQuoteNode:()=>LY,DRAG_DROP_PASTE:()=>NY,HeadingAnnounceExtension:()=>TY,HeadingNode:()=>zY,QuoteNode:()=>FY,RichTextExtension:()=>jY,RichTextImportExtension:()=>MY,RichTextImportRules:()=>kY,ShadowRootQuoteRule:()=>OY,defaultShouldHandlePasteAsFiles:()=>oX,eventFiles:()=>EW,quoteShadowRootState:()=>PY,registerRichText:()=>sX}),vY=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function yY(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!vY.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function bY(e,t,n,r,i){let a=yY(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}function xY(e,t){e.__tag=t.__tag}var SY=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],tag:e.__tag,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__tag;o!==void 0&&o!==`h1`&&(a.tag=o);let s=e.__dir;s!=null&&(a.direction=s);let c=t[e.__format];c!==void 0&&c!==``&&(a.format=c);let l=e.__indent;return l!==void 0&&l!==0&&(a.indent=l),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=bY(t.indent,0,0,1/0),e.__textFormat=yY(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.tag;return e.__tag=s===`h1`||s===`h2`||s===`h3`||s===`h4`||s===`h5`||s===`h6`?s:`h1`,e},afterCloneFrom:xY}},CY=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=bY(t.indent,0,0,1/0),e.__textFormat=yY(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function wY(e){let t=$F(e);return WY(t)?t.getTag():null}var TY={build:(e,t)=>_V(t),config:{created:`Heading level %s`,destroyed:`Heading level %s removed`,disabled:!1},dependencies:[cY],name:`@lexical/rich-text/HeadingAnnounce`,register(e,t,n){let{created:r,destroyed:i,disabled:a}=n.getOutput(),{announce:o}=n.getDependency(cY).output;return fV(()=>a.value?void 0:e.registerMutationListener(zY,(t,{prevEditorState:n})=>{let a=null,s=null;for(let[r,i]of t)i===`created`&&a===null?a=e.read(`latest`,()=>wY(r)):i===`destroyed`&&s===null&&(s=n.read(()=>wY(r)));a===null?s!==null&&o(i.peek().replace(`%s`,s.slice(1))):o(r.peek().replace(`%s`,a.slice(1)))},{skipInitialization:!0}))}},EY={$import:(e,t)=>{let n=UY(t.nodeName.toLowerCase());return Bz(t,n),HI(n,t),VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:tJ.tag(`h1`,`h2`,`h3`,`h4`,`h5`,`h6`),name:`@lexical/rich-text/heading`},DY={$import:(e,t)=>{let n=IY();return HI(n,t),Bz(t,n),VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:tJ.tag(`blockquote`),name:`@lexical/rich-text/blockquote`},OY={$import:(e,t)=>{let n=IY({shadowRoot:!0});return HI(n,t),Bz(t,n),VI(n,t),[n.splice(0,0,e.$importChildren(t,{schema:Wq}))]},match:tJ.tag(`blockquote`),name:`@lexical/rich-text/blockquote-shadow-root`},kY=[EY,DY,{$import:(e,t,n)=>{let r=t.firstChild;return r&&J(i=r)&&i.nodeName===`SPAN`&&i.style.fontSize===`26pt`?e.$importChildren(t):n();var i},match:tJ.tag(`p`),name:`@lexical/rich-text/google-docs-title-p`},{$import:(e,t,n)=>t.style.fontSize===`26pt`?[UY(`h1`).splice(0,0,e.$importChildren(t))]:n(),match:tJ.tag(`span`),name:`@lexical/rich-text/google-docs-title-span`}];function AY(e,t){return e&&t!==null?Uz(e,t):t}var jY={build:(e,t)=>_V(t),config:{escapeFormatTriggers:{capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}},shouldHandlePasteAsFiles:oX},conflictsWith:[`@lexical/plain-text`],dependencies:[TY,MV,fY,gY,Gq,[Kq,{rules:kY}]],mergeConfig:function(e,t){let n=Uz(e,t);return t.escapeFormatTriggers&&(n.escapeFormatTriggers=function(e,t){let n=Uz(e,t);for(let r of Object.keys(t))n[r]=AY(e[r],t[r]);return n}(e.escapeFormatTriggers,t.escapeFormatTriggers)),n},name:`@lexical/rich-text`,nodes:()=>[zY,FY],register:(e,t,n)=>fV(()=>{let{escapeFormatTriggers:t,shouldHandlePasteAsFiles:r}=n.getOutput();return sX(e,t,r)})},MY={dependencies:[jY],name:`@lexical/rich-text/Import`},NY=HR(`DRAG_DROP_PASTE_FILE`),PY=GR(`shadowRoot`,{parse:RR()}),FY=class extends kL{$config(){return this.config(`quote`,{extends:kL,generated:CY,importDOM:{blockquote:()=>({conversion:HY,priority:0})},stateConfigs:[{flat:!0,stateConfig:PY}]})}isShadowRoot(){return lI(this,PY)}setIsShadowRoot(e){return KI(this,PY,e)}createDOM(e){let t=YF().createElement(`blockquote`);return FR(t,e.theme.quote),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(YF().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return IY().updateFromJSON(e)}insertNewAfter(e,t){let n=EF();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.isShadowRoot()){for(let e of this.getChildren())this.insertBefore(e);return this.remove(),!0}let e=EF();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function IY(e){let t=hF(new FY);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function LY(e){return e instanceof FY}var RY=Az()({tag:Yz(JR([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]),{field:`__tag`})}),zY=class extends kL{__tag;$config(){return this.config(`heading`,{extends:kL,generated:SY,importDOM:{h1:()=>({conversion:VY,priority:0}),h2:()=>({conversion:VY,priority:0}),h3:()=>({conversion:VY,priority:0}),h4:()=>({conversion:VY,priority:0}),h5:()=>({conversion:VY,priority:0}),h6:()=>({conversion:VY,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&BY(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>BY(e)?{conversion:()=>({node:UY(`h1`)}),priority:3}:null},json:RY})}constructor(e=`h1`,t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){let t=this.getWritable();return t.__tag=e,t}createDOM(e){let t=this.__tag,n=YF().createElement(t),r=e.theme.heading;if(r!==void 0){let e=r[t];FR(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(YF().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?EF():UY(this.getTag()).setFormat(this.getFormatType()).setStyle(this.getStyle()),a=this.getDirection();if(i.setDirection(a),this.insertAfter(i,t),n===0&&!this.isEmpty()&&e){let e=EF();e.select(),this.replace(e,!0)}return i}collapseAtStart(){if(this.isEmpty()){let e=EF();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function BY(e){return e.nodeName.toLowerCase()===`span`&&e.style.fontSize===`26pt`}function VY(e){let t=e.nodeName.toLowerCase(),n=null;return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`||(n=UY(t),Bz(e,n),HI(n,e),VI(n,e)),{node:n}}function HY(e){let t=IY();return HI(t,e),Bz(e,t),VI(t,e),{node:t}}function UY(e=`h1`){return hF(new zY(e))}function WY(e){return e instanceof zY}function GY(e){return _I(QF(e))}function KY(e){let t=e.focus;return t.key===`root`&&t.offset===nI().getChildrenSize()}function qY(e){let t=e.focus;return t.key===`root`&&t.offset===0}function JY(e,t){if(!e.isCollapsed())return!1;let n=t===`next`;if(!(n?KY(e):qY(e)))return!1;let r=e.focus.offset;return PI(nI().getChildAtIndex(n?r-1:r))}function YY(e,t,n,r){let i=!1,a=null;if(e.isCollapsed()&&e.anchor.type===`text`){let t=e.anchor.getNode();if(q(t)){a=t;let r=e.anchor.offset,o=r===t.getTextContentSize()&&t.getNextSibling()===null,s=r===0&&t.getPreviousSibling()===null;i=n===`end`&&o||n===`start`&&s||n===`both`&&(o||s)}}let o=!1;for(let[n,s]of Object.entries(r)){if(s==null||!s[t])continue;let r=n;if(s.onlyAtBoundary){if(!(i&&a&&q(a)&&a.hasFormat(r)))continue;o=!0}e.hasFormat(r)&&e.toggleFormat(r)}o&&e.setStyle(``)}var XY={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function ZY(e,t){return function(e,t){if(!e.isCollapsed())return!1;let n=_F(e.focus,t),r=NF(n.origin,OI);if(!r)return!1;let i=e.focus.getNode();if(!r.is(i)&&!dI(i,r))return!1;let a=BF(n,iI(r,t));if(a.getTextSlices().some(e=>e&&e.getTextContentSize()>0))return!1;let o=BF(a.anchor.getSiblingCaret(),a.focus),s=o.anchor.origin;for(let e of o){if(!kI(e)||!e.origin.is(s.getParent()))return!1;s=e.origin}let c=r;for(let e of MF(iI(r,t))){if(!e.origin.is(c.getParent())){if(PI(e.origin)){let e=iI(c,t);return GI(BF(e,e)),!0}break}if(!OI(e.origin))break;c=e.origin}return!1}(e,t)||function(e,t){if(!e.isCollapsed()||e.anchor.type!==`element`)return!1;let n=_F(e.anchor,t).getNodeAtCaret();return!(!OI(n)||n.isInline()||(GI(KF(FI(UF(n,t)))),0))}(e,t)}function QY(e){return _I(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function $Y(e){let t=TF();t.add(e),WI(t)}function eX(e,t){if(!e.isCollapsed())return!1;let n=e.focus,r=n.getNode(),i=t?`previous`:`next`,a=_F(n,i);if(n.type===`element`&&G(r)&&EI(r)){let e=a.getNodeAtCaret();return!(e===null||!QY(e))&&($Y(e.__key),!0)}let o=NF(G(r)?r:r.getParentOrThrow(),e=>G(e)&&!e.isInline()&&EI(e.getParent()));if(o===null)return!1;let s=iI(o,i).getNodeAtCaret();if(s===null||!QY(s))return!1;if(o.getTextContentSize()===0)return $Y(s.__key),!0;let c=XF().getRootElement();if(c===null)return!1;let l=ez(c.ownerDocument.defaultView);if(l===null||l.rangeCount===0)return!1;let u=l.anchorNode,d=l.anchorOffset,f=l.focusNode,p=l.focusOffset;l.modify(`move`,t?`backward`:`forward`,`line`);let m=l.anchorNode,h=l.anchorOffset;if(m===null)return tX(l,u,d,f,p),!1;let g=QF(m);return tX(l,u,d,f,p),g!==null&&(m===u&&h===d||!g.is(o)&&!dI(g,o))&&($Y(s.__key),!0)}function tX(e,t,n,r,i){t!==null&&r!==null&&e.setBaseAndExtent(t,n,r,i)}function nX(e,t){if(!e.isCollapsed())return!1;let n=e.focus.getNode(),r=NF(G(n)?n:n.getParentOrThrow(),e=>G(e)&&!e.isInline());if(r===null)return!1;let i=XF(),a=i.getRootElement();if(a===null)return!1;let o=a.ownerDocument.defaultView;if(o===null)return!1;let s=!1;for(let e of r.getChildren())if(G(e)&&e.isInline()){let t=i.getElementByKey(e.getKey());if(t!==null){let e=o.getComputedStyle(t).display;if(e===`inline-grid`||e===`inline-flex`){s=!0;break}}}if(!s)return!1;let c=iI(r,t?`previous`:`next`).getNodeAtCaret();if(c===null||!G(c)){if(t){let e=r.getFirstDescendant();q(e)?e.select(0,0):r.select(0,0)}else{let e=r.getLastDescendant();if(q(e)){let t=e.getTextContentSize();e.select(t,t)}else{let e=r.getChildrenSize();r.select(e,e)}}return!0}let l=i.getElementByKey(c.getKey());if(l===null)return!1;let u=ez(o);if(u===null||u.rangeCount===0)return!1;let d=u.getRangeAt(0).cloneRange();d.collapse(!0);let f=d.getBoundingClientRect(),p=l.getBoundingClientRect(),m=p.top+p.height/2;if(f.height>0){let t=UJ(f.left,m,a);if(t!==null&&l.contains(t.node)){let n=a.ownerDocument.createRange();return n.setStart(t.node,t.offset),n.collapse(!0),e.applyDOMRange(n),e.dirty=!0,!0}}let h=t?c.getLastDescendant():c.getFirstDescendant();if(q(h)){let e=t?h.getTextContentSize():0;h.select(e,e)}else{let e=c.getChildrenSize();c.select(t?e:0,t?e:0)}return!0}function rX(e,t){let n=iI(e,t),r=n.getAdjacentCaret();r!==null&&G(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?GI(KF(n)):t===`next`?e.selectNext(0,0):e.selectPrevious()}function iX(e,t){let n=e.getNodes().map(e=>iI(e,`next`)).sort(xF),r=n[0],i=n[n.length-1];if(!r||!i)return!1;for(let e=0;e<n.length-1;e++)if(!n[e+1].origin.is(n[e].getNodeAtCaret()))return!1;return GI(VF(BF(zI(r),i),t)),PF(),!0}function aX(e,t,n){n.preventDefault(),n.stopPropagation();let r=e.getNodes();if(r.length===0)return!0;let i=r.map(e=>iI(e,`next`)).sort(xF),a=(t?i[0]:i[i.length-1]).origin,o=NF(a,e=>e!==a&&G(e)&&!e.isInline())??nI(),s=t?0:o.getChildrenSize();return o.select(s,s),!0}function oX(e,t){return e.length>0&&!t}function sX(e,t=pV(XY),n=pV(oX)){return kz(e.registerCommand(iL,n=>{let r=W();if(CI(r)){let t=n.target;if(J(t))for(let n of r.getNodes()){let r=e.getElementByKey(n.getKey());if(r!==null&&r.contains(t))return!1}return r.clear(),!0}return K(r)&&YY(r,`click`,`both`,t.peek()),!1},lL),e.registerCommand(SL,e=>{let t=W();return K(t)?(t.deleteCharacter(e),!0):!!CI(t)&&(t.deleteNodes(),!0)},lL),e.registerCommand(wL,e=>{let t=W();return!!K(t)&&(t.deleteWord(e),!0)},lL),e.registerCommand(CL,e=>{let t=W();return!!K(t)&&(t.deleteLine(e),!0)},lL),e.registerCommand(hL,t=>{let n=W();if(typeof t==`string`)n!==null&&n.insertText(t);else{if(n===null)return!1;let r=t.dataTransfer;if(r!=null)VJ(r,n,e);else if(K(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},lL),e.registerCommand(SR,()=>{let e=W();return!!K(e)&&(e.removeText(),!0)},lL),e.registerCommand(jL,e=>{let t=W();return!(!K(t)&&!CI(t))&&(FF(t,e),!0)},lL),e.registerCommand(DR,e=>{let t=W();return!(!K(t)&&!CI(t))&&(qI(t,e),!0)},lL),e.registerCommand(AL,e=>{let t=W();if(!K(t)&&!CI(t))return!1;let n=t.getNodes();for(let t of n){let n=NF(t,e=>G(e)&&!e.isInline());n!==null&&n.setFormat(e)}return!0},lL),e.registerCommand(IL,e=>{let t=W();return!!K(t)&&(t.insertLineBreak(e),!0)},lL),e.registerCommand(LL,()=>{let e=W();return!!K(e)&&(e.insertParagraph(),!0)},lL),e.registerCommand(RL,()=>{let e=kF(),t=W();return K(t)&&(e.setFormat(t.format),e.setStyle(t.style)),pI([e]),!0},lL),e.registerCommand(FL,()=>xW(e=>{let t=e.getIndent();e.setIndent(t+1)}),lL),e.registerCommand(_R,()=>xW(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),lL),e.registerCommand(oR,e=>{let t=W();if(CI(t)){let n=t.getNodes();if(n.length>0){if(!e.shiftKey||!iX(t,`previous`))return e.preventDefault(),rX(n[0],`previous`),!0;t=W()}}return K(t)&&(qY(t)||!e.shiftKey&&ZY(t,`previous`)||!e.shiftKey&&eX(t,!0)||!e.shiftKey&&nX(t,!0))?(e.preventDefault(),!0):!1},lL),e.registerCommand(rR,e=>{let t=W();if(CI(t)){let n=t.getNodes();if(n.length>0){if(!e.shiftKey||!iX(t,`next`))return e.preventDefault(),rX(n[0],`next`),!0;t=W()}}return K(t)&&(KY(t)||!e.shiftKey&&ZY(t,`next`)||!e.shiftKey&&eX(t,!1)||!e.shiftKey&&nX(t,!1))?(e.preventDefault(),!0):!1},lL),e.registerCommand(iR,e=>{let n=W();if(CI(n)){let t=n.getNodes();if(t.length>0){let r=uU(t[0])?`next`:`previous`;if(!e.shiftKey||!iX(n,r))return e.preventDefault(),rX(t[0],r),!0;n=W()}}if(!K(n))return!1;let r=uU(n.anchor.getNode())?`next`:`previous`;if(JY(n,r)||!e.shiftKey&&ZY(n,r))return e.preventDefault(),!0;if(e.shiftKey||YY(n,`arrow`,`start`,t.peek()),pU(n,!0)){let t=e.shiftKey;return e.preventDefault(),dU(n,t,!0),!0}return!1},lL),e.registerCommand(aR,e=>{let n=W();if(CI(n)){let t=n.getNodes();if(t.length>0){let r=uU(t[0])?`previous`:`next`;if(!e.shiftKey||!iX(n,r))return e.preventDefault(),rX(t[0],r),!0;n=W()}}if(!K(n))return!1;let r=uU(n.anchor.getNode())?`previous`:`next`;if(JY(n,r)||!e.shiftKey&&ZY(n,r))return e.preventDefault(),!0;if(e.shiftKey||YY(n,`arrow`,`end`,t.peek()),pU(n,!1)){let t=e.shiftKey;return e.preventDefault(),dU(n,t,!1),!0}return!1},lL),e.registerCommand(sR,t=>{let n=W();if(!CI(n)&&GY(t.target))return!1;if(K(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(t.offset!==0)return!1;let n=t.getNode();if(TI(n))return!1;let r=yW(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(_R);if(XL&&eL)return!1}else if(!CI(n))return!1;return t.preventDefault(),e.dispatchCommand(SL,!0)},lL),e.registerCommand(cR,t=>{let n=W();return!(!CI(n)&&GY(t.target))&&!(!K(n)&&!CI(n))&&(t.preventDefault(),e.dispatchCommand(SL,!1))},lL),e.registerCommand(uR,n=>{let r=W();if(CI(r)){let e=r.getNodes();e.length===1&&_I(e[0])&&!e[0].isInline()&&(r=e[0].selectNext())}if(!K(r))return!1;if(YY(r,`enter`,`both`,t.peek()),n!==null){if((XL||QL||WL)&&eL)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(IL,!1)}return e.dispatchCommand(LL)},lL),e.registerCommand(dR,()=>!!K(W())&&(e.blur(),!0),lL),e.registerCommand(DL,t=>{let[,n]=EW(t);if(n.length>0){let r=t.clientX,i=t.clientY,a=UJ(r,i,e.getRootElement());if(a!==null){let{offset:e,node:t}=a,n=QF(t);if(n!==null){let t=OF();if(q(n))t.anchor.set(n.getKey(),e,`text`),t.focus.set(n.getKey(),e,`text`);else{let e=n.getParentOrThrow().getKey(),r=n.getIndexWithinParent()+1;t.anchor.set(e,r,`element`),t.focus.set(e,r,`element`)}WI(II(t))}}return e.dispatchCommand(NY,n),t.preventDefault(),!0}return BJ(t,e)},lL),e.registerCommand(EL,t=>{let[n]=EW(t),r=W();return!(n&&!K(r))&&(K(r)&&!r.isCollapsed()&&t.dataTransfer!==null&&(GJ(t.dataTransfer,zJ(r)),HJ(t.dataTransfer,e)),!0)},lL),e.registerCommand(TL,t=>{let[n]=EW(t),r=W();if(n&&!K(r))return!1;let i=t.clientX,a=t.clientY,o=UJ(i,a,e.getRootElement());return o!==null&&_I(QF(o.node))&&t.preventDefault(),!0},lL),e.registerCommand(ER,()=>{let e=W();return BI(K(e)&&oI(e.anchor.getNode())!==null?e:null),!0},lL),e.registerCommand(vL,t=>(WJ(e,DW(t,ClipboardEvent)?t:null),!0),lL),e.registerCommand(yL,t=>(async function(e,t){t.update(()=>{let e=W();K(e)&&!e.isCollapsed()&&zL(e)},{discrete:!0,tag:bL}),await WJ(t,DW(e,ClipboardEvent)?e:null),t.update(()=>{let e=W();K(e)?e.removeText():CI(e)&&e.getNodes().forEach(e=>e.remove())},{tag:bL})}(t,e),!0),lL),e.registerCommand(vR,t=>{let[,r,i]=EW(t);return n.peek()(r,i)&&e.dispatchCommand(NY,r)?!0:hz(t.target)&&DI(t.target)?!1:W()!==null&&(function(e,t){e.preventDefault(),t.update(()=>{let n=W(),r=DW(e,InputEvent)||DW(e,KeyboardEvent)?null:e.clipboardData;r!=null&&n!==null&&VJ(r,n,t)},{tag:yR})}(t,e),!0)},lL),e.registerCommand(fR,()=>{let e=W();return K(e)&&YY(e,`space`,`both`,t.peek()),!1},lL),e.registerCommand(pR,()=>{let e=W();return K(e)&&YY(e,`tab`,`both`,t.peek()),!1},lL),e.registerCommand(hR,e=>{let t=W();if(CI(t))return aX(t,!1,e);if(!K(t))return!1;let{anchor:n}=t;if(n.type!==`element`||n.offset!==0)return!1;let r=n.getNode();if(!G(r))return!1;let i=r.getFirstChild();if(!_I(i)||!i.isInline())return!1;let a=r.getKey(),o=r.selectEnd();return e.shiftKey&&o.anchor.set(a,0,`element`),e.preventDefault(),e.stopPropagation(),!0},lL),e.registerCommand(gR,e=>{let t=W();if(CI(t))return aX(t,!0,e);if(!K(t))return!1;let{anchor:n,focus:r}=t,i=NF(r.getNode(),e=>G(e)&&!e.isInline());if(i===null)return!1;let a=i.getFirstChild();if(!_I(a)||!a.isInline()||NF(n.getNode(),e=>G(e)&&!e.isInline())!==i)return!1;let o=i.getKey();return(r.type!==`element`||r.key!==o||r.offset!==0)&&(t.focus.set(o,0,`element`),e.shiftKey||t.anchor.set(o,0,`element`),e.preventDefault(),e.stopPropagation(),!0)},lL))}var cX=_Y,lX=cX.$createHeadingNode,uX=cX.$createQuoteNode,dX=cX.$isHeadingNode,fX=cX.$isQuoteNode;cX.DRAG_DROP_PASTE,cX.HeadingAnnounceExtension;var pX=cX.HeadingNode,mX=cX.QuoteNode;cX.RichTextExtension,cX.RichTextImportExtension,cX.RichTextImportRules,cX.ShadowRootQuoteRule,cX.defaultShouldHandlePasteAsFiles,cX.eventFiles,cX.quoteShadowRootState;var hX=cX.registerRichText;function gX(e,t){return Ml(_X,this,arguments)}function _X(e,t){iu(()=>kz(hX(e),NV(e)),[e],t)}var vX=kr(5),yX=Symbol(vX),bX=Symbol(vX+1),xX=Symbol(vX+2),SX=Symbol(vX+3),CX=Symbol(vX+4);function wX(e){return m_(e.ErrorBoundary,{onError:e.onError,children:m_(Wu,{fallback:null,children:e.decorator})})}function TX(e){return Ug(wX,e.element,e.bodyProps)}function EX(e){let t,n,r,i,a,o,s,c,l,u,d,f,p,m=e.editor,h=e.ErrorBoundary,[g,_]=(n=m,t=Nd(yX,`useMemo`),r=Pd(t,n),r===null?Ld(t,[e=>m.registerDecoratorListener(e),()=>m.getDecorators()],n):r.value),v=Su(g,_,_,bX),[y,b]=(a=m,i=Nd(xX,`useMemo`),o=Pd(i,a),o===null?Ld(i,[m.registerRootListener.bind(m),m.getRootElement.bind(m)],a):o.value),x=Su(y,b,b,SX);if(l=v,u=m,d=x,c=Nd(CX,`useMemo`),p=Id(c,l,u,d),p===null){__hkl:{let e=[],t=Object.keys(v);for(let n=0;n<t.length;n++){let r=t[n],i=m.getElementByKey(r);i!==null&&e.push({nodeKey:r,element:i,decorator:v[r]})}f=e;break __hkl}s=Ld(c,f,l,u,d)}else s=p.value;let S=s;return S.length===0?null:f_(mp,{},()=>R_([S.map(e=>h_(`c:b96296df`,TX,{key:e.nodeKey,element:e.element,bodyProps:{ErrorBoundary:h,onError:e=>m._onError(e),decorator:e.decorator}}))]))}var DX=qd(`<!><!><!>`,3,1),OX=kr(5),kX=Symbol(OX),AX=Symbol(OX+1),jX=Symbol(OX+2),MX=Symbol(OX+3),NX=Symbol(OX+4);function PX(e){let[t]=Nl(kX,$x),n=Nl(AX,mB,t),r=Nl(jX,FB);if(!n)return null;let i=e.content;return typeof i==`function`?i(r):i??null}var FX=Ad(function e(t,n,r){let i=n.block,[a]=Nl(MX,$x);Nl(NX,gX,a);let o=e.__warm;if(typeof o==`function`?hd(o,t):hd(()=>{kd(PX,{content:t.placeholder})},void 0),n.block.pending&&!n.block.crossRenderUpdate)return;let s=n.slots[0];if(s===void 0){let e,t,r,a,o=Qd(DX);e=i.parentNode;let c=bf(o);t=c;let l=xf(c,1);r=l,a=xf(l,1),$d(o,i.parentNode,i.endMarker),s=af(n,null,e,t,null,void 0,r,a)}{let e=t.contentEditable;s.c=Rv(n,1,s.a,e,s.c,s.d,s.b,!0),s.d=e}S_(n,2,s.a,PX,{content:t.placeholder},s.e,void 0,void 0,void 0,void 0,`c:c4d00643`),S_(n,3,s.a,EX,{editor:a,ErrorBoundary:t.ErrorBoundary},s.f,void 0,2,void 0,void 0,`c:92b1a51d`)},e=>{kd(PX,{content:e.placeholder})}),IX=kr(5);IX+1,IX+2,IX+3,IX+4;var LX=qd(`<!>`,0,1),RX={},zX=function(e,t,n){let r=t.block;function i(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r=Qd(LX);e=i.parentNode,t=bf(r),$d(r,i.parentNode,i.endMarker),a=nf(n,null,e,t,null,void 0)}{let t=e.children;a.c=Rv(n,1,a.a,t,a.c,a.d,a.b,!0,!0),a.d=t}}S_(t,0,r.parentNode,Gu,{fallback:(t,n)=>(e.onError&&e.onError(t instanceof Error?t:Error(String(t),{cause:t}),{componentStack:``}),e.fallback===void 0?u_(()=>m_(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`}},`An error was thrown.`)):e.fallback),children:Pu(i,RX)},r.endMarker,void 0,void 0,void 0,void 0,`c:e58a7932`)},BX=t({HistoryExtension:()=>qX,SharedHistoryExtension:()=>YX,createEmptyHistoryState:()=>KX,registerHistory:()=>GX});function VX(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(K(a)&&K(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||TI(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&q(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!q(l)||!q(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function HX(e,t,n){let r=n(),i=0,a=r,o=0,s=null;return(c,l,u,d,f,p)=>{let m=n();if(p.has(mL)&&(a=r,o=i,s=c),p.has(ML))return i=0,r=m,2;p.has(fL)&&s&&(r=a,i=o,c=s);let h=p.has(yR)||p.has(bL)?0:VX(c,l,d,f,e.isComposing()),g=(()=>{let n=u===null||u.editor===e,a=p.has(PL);if(!a&&n&&p.has(NL))return 0;if(h===1)return 2;if(c===null)return 1;let o=l._selection;if(!(d.size>0||f.size>0))return o===null?2:0;let s=typeof t==`number`?t:t.peek();return!1===a&&h!==0&&h===i&&m<r+s&&n||d.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(K(a)&&K(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!q(r)||!q(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(d)[0],c,l)?0:1})();return r=m,i=h,g}}function UX(e,t){if(t!==null&&t.editor===e.editor)return t;let{editor:n}=e,r=n.getEditorState();return r.isEmpty()?null:{editor:n,editorState:r}}function WX(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function GX(e,t,n,r=Date.now,i,a=null){let o=HX(e,n,r),s=()=>{i&&i(t)};return s(),kz(e.registerCommand(PR,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();if(o){let t=UX(o,a);t!==null&&(r.push(t),e.dispatchCommand(QI,!0))}i.length===0&&e.dispatchCommand($I,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:ML})}}(e,t,i),!0),lL),e.registerCommand(xR,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current,o=r.pop();if(o){let t=UX(o,a);t!==null&&(i.push(t),e.dispatchCommand($I,!0))}r.length===0&&e.dispatchCommand(QI,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:ML})}}(e,t,i),!0),lL),e.registerCommand(nL,()=>(WX(t,i),!1),lL),e.registerCommand(rL,()=>(WX(t,i),e.dispatchCommand(QI,!1),e.dispatchCommand($I,!1),!0),lL),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){d.length!==0&&(t.redoStack=[],e.dispatchCommand(QI,!1));let n=function(e,t,n){return n===null?null:n.editor===e?{...n}:t.isEmpty()?null:{editor:e,editorState:t}}(e,r,u);if(n!==null){f.push(n);let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand($I,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function KX(){return{current:null,redoStack:[],undoStack:[]}}var qX={build:(e,{delay:t,createInitialHistoryState:n,disabled:r,maxDepth:i,now:a},o)=>({..._V({delay:t,disabled:r,historyState:n(e),maxDepth:i,now:a}),...o.getInitResult()}),config:{createInitialHistoryState:KX,delay:300,disabled:typeof window>`u`,maxDepth:null,now:()=>Date.now()},init:()=>({canRedo:pV(!1),canUndo:pV(!1)}),name:`@lexical/history/History`,register:(e,t,n)=>{let{canUndo:r,canRedo:i}=n.getInitResult(),a=n.getOutput(),o=e=>uV(()=>{r.value=e!=null&&e.undoStack.length>0,i.value=e!=null&&e.redoStack.length>0});return fV(()=>{if(!a.disabled.value)return GX(e,a.historyState.value,a.delay,()=>a.now.peek()(),o,a.maxDepth);o(null)})}};function JX(e){let t=e?wH(e,`@lexical/extension/HMR`):void 0;return t?t.output.restoreCount.value:0}var YX={build:(e,{disabled:t,parentEditor:n})=>_V({disabled:t,parentEditor:n||e._parentEditor}),config:{disabled:!1,parentEditor:null},dependencies:[[qX,{disabled:!0}]],name:`@lexical/history/SharedHistory`,register:(e,t,n)=>fV(()=>{let{disabled:t,parentEditor:r}=n.getOutput();if(!t.value){let{output:t}=n.getDependency(qX);JX(e),JX(r.value);let i=function(e){return e?wH(e,qX.name):null}(r.value);if(!i)return;let a=i.output;uV(()=>{t.delay.value=a.delay.value,t.historyState.value=a.historyState.value,t.now.value=a.now.value,t.maxDepth.value=a.maxDepth.value,t.disabled.value=a.disabled.value})}})},XX=BX;XX.HistoryExtension,XX.SharedHistoryExtension;var ZX=XX.createEmptyHistoryState,QX=XX.registerHistory,$X=kr(3),eZ=Symbol($X),tZ=Symbol($X+1),nZ=Symbol($X+2);function rZ(e){let t,n,r,[i]=Nl(eZ,$x),a=e.externalHistoryState,o=e.delay===void 0?1e3:e.delay,s=(n=a,t=Nd(tZ,`useMemo`),r=Pd(t,n),r===null?Ld(t,a||ZX(),n):r.value);return ru(()=>QX(i,s,o),[o,i,s],nZ),null}var iZ=kr(2),aZ=Symbol(iZ),oZ=Symbol(iZ+1);function sZ(e){let[t]=Nl(aZ,$x),n=e.ignoreHistoryMergeTagChange===void 0||e.ignoreHistoryMergeTagChange,r=e.ignoreSelectionChange!==void 0&&e.ignoreSelectionChange,i=e.onChange;return iu(()=>{if(i)return t.registerUpdateListener(({editorState:e,dirtyElements:a,dirtyLeaves:o,prevEditorState:s,tags:c})=>{r&&a.size===0&&o.size===0||n&&c.has(NL)||s.isEmpty()||i(e,t,c)})},[t,n,r,i],oZ),null}var cZ=kr(2),lZ=Symbol(cZ),uZ=Symbol(cZ+1);function dZ(e){let[t]=Nl(lZ,$x),n=e.defaultSelection;return ru(()=>{t.focus(()=>{let e=t.getRootElement(),n=e===null?null:ZR(e);e!==null&&(n===null||!e.contains(n))&&e.focus({preventScroll:!0})},{defaultSelection:n})},[n,t],uZ),null}var fZ=t({AutoFocusExtension:()=>pZ}),pZ={build:(e,t,n)=>_V(t),config:{defaultSelection:`rootEnd`,disabled:!1},name:`@lexical/extension/AutoFocus`,register(e,t,n){let r=n.getOutput();return fV(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=t===null?null:ZR(t);t===null||e!==null&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}},mZ=fZ.AutoFocusExtension,hZ=t({ClearEditorExtension:()=>vZ,registerClearEditor:()=>_Z});function gZ(){let e=nI(),t=W(),n=EF();e.clear(),e.append(n),t!==null&&n.select(),K(t)&&(t.format=0)}function _Z(e,t=gZ){return e.registerCommand(nL,()=>(t(),!0),lL)}var vZ={build:(e,t,n)=>_V(t),config:{$onClear:gZ},name:`@lexical/extension/ClearEditor`,register(e,t,n){let{$onClear:r}=n.getOutput();return fV(()=>_Z(e,r.value))}},yZ=hZ,bZ=yZ.ClearEditorExtension,xZ=yZ.registerClearEditor,SZ=t({$defaultShouldInsertAfter:()=>CZ,ClickAfterLastBlockExtension:()=>TZ});function CZ(e){return!!_I(e)||!(!G(e)||!e.isShadowRoot())}function wZ(e,t,n,r){return!!e.isEditable()&&n.target===t&&e.read(`latest`,()=>{let t=nI().getLastChild();if(t===null)return!1;let i=e.getElementByKey(t.getKey());return i!==null&&!(n.clientY<=i.getBoundingClientRect().bottom)&&r(t)})}var TZ={build:(e,t)=>_V(t),config:{$shouldInsertAfter:CZ,disabled:!1},name:`@lexical/ClickAfterLastBlock`,register:(e,t,n)=>fV(()=>{let t=n.getOutput();if(!t.disabled.value)return e.registerRootListener(n=>{if(n!==null)return Iz(n,{click:r=>{wZ(e,n,r,t.$shouldInsertAfter.peek())&&(r.preventDefault(),Wz(r),e.update(()=>{let e=nI().getLastChild();if(e===null||!t.$shouldInsertAfter.peek()(e))return;let n=EF();e.insertAfter(n),n.select()}))},mousedown:r=>{wZ(e,n,r,t.$shouldInsertAfter.peek())&&r.preventDefault()}},!0)})})},EZ=SZ,DZ=EZ.$defaultShouldInsertAfter,OZ=EZ.ClickAfterLastBlockExtension,kZ=t({$applyFormatToDom:()=>FZ,$isDecoratorTextNode:()=>MZ,DecoratorTextExtension:()=>RZ,DecoratorTextNode:()=>jZ,applyFormatFromStyle:()=>NZ,applyFormatToDom:()=>PZ}),AZ=GR(`format`,{parse:Nz()}),jZ=class extends OL{get __isInlineFormattable(){return!0}$config(){return this.config(`decorator-text`,{extends:OL,stateConfigs:[{flat:!0,stateConfig:AZ}]})}getFormat(e){return lI(this,AZ,e)}getFormatFlags(e,t){return Kz(this.getFormat(),e,t)}hasFormat(e){let t=jR[e];return(this.getFormat()&t)!==0}setFormat(e){return KI(this,AZ,e)}toggleFormat(e){let t=Kz(this.getFormat(),e,null);return this.setFormat(t)}isInline(){return!0}createDOM(e,t){return YF().createElement(`span`)}};function MZ(e){return e instanceof jZ}function NZ(e,t,n){let r=t.fontWeight,i=t.textDecoration.split(` `),a=r===`700`||r===`bold`,o=i.includes(`line-through`),s=t.fontStyle===`italic`,c=i.includes(`underline`),l=t.verticalAlign;return a&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),o&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),s&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),c&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),l!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),l!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),n&&!e.hasFormat(n)&&e.toggleFormat(n),e}function PZ(e,t,n=LZ){let r=t;for(let[t,i]of Object.entries(n))e.hasFormat(i)&&(r=IZ(r,t));return r}var FZ=PZ;function IZ(e,t){let n=e.ownerDocument.createElement(t);return n.appendChild(e),n}var LZ={b:`bold`,code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`},RZ={name:`@lexical/extension/DecoratorText`,nodes:()=>[jZ]},zZ=kZ,BZ=zZ.$applyFormatToDom,VZ=zZ.$isDecoratorTextNode,HZ=zZ.DecoratorTextExtension,UZ=zZ.DecoratorTextNode,WZ=zZ.applyFormatFromStyle,GZ=zZ.applyFormatToDom,KZ=t({WatchEditableExtension:()=>qZ}),qZ={build:e=>bV(()=>e.isEditable(),t=>e.registerEditableListener(e=>{t.value=e})),name:`@lexical/extension/WatchEditable`},JZ=KZ.WatchEditableExtension,YZ=t({HMRExtension:()=>uQ}),XZ={root:{children:[],direction:null,format:``,indent:0,type:`root`,version:1}};function ZZ(e){let t=e.exportJSON();delete t.children,delete t.$slots;let n={json:t,key:e.__key,next:e.__next,parent:e.__parent,prev:e.__prev};G(e)&&(n.first=e.__first,n.last=e.__last,n.size=e.__size);let{__slotHost:r,__slots:i}=e;return i!=null&&(n.slots=Array.from(i)),r!=null&&(n.slotHost=r),n}function QZ(e){let t=new Map,n=[];return{nodes:n,states:e.map(e=>e.read(()=>{let r=[];for(let i of e._nodeMap.values()){let e=t.get(i);e===void 0&&(e=n.length,t.set(i,e),n.push(ZZ(i))),r.push(e)}return{nodes:r,selection:(i=e._selection,K(i)?{anchor:{key:i.anchor.key,offset:i.anchor.offset,type:i.anchor.type},focus:{key:i.focus.key,offset:i.focus.offset,type:i.focus.type},format:i.format,style:i.style,type:`range`}:CI(i)?{keys:Array.from(i._nodes),type:`node`}:null)};var i}))}}function $Z(e){return typeof e==`object`&&!!e}function eQ(e){return e==null||typeof e==`string`}function tQ(e){if(!$Z(e))return!1;let{first:t,json:n,key:r,last:i,next:a,parent:o,prev:s,size:c,slotHost:l,slots:u}=e;return $Z(n)&&typeof n.type==`string`&&typeof r==`string`&&eQ(o)&&eQ(s)&&eQ(a)&&eQ(t)&&eQ(i)&&(c===void 0||typeof c==`number`)&&eQ(l)&&(u===void 0||Array.isArray(u)&&u.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`&&typeof e[1]==`string`))}function nQ(e){return $Z(e)&&typeof e.key==`string`&&typeof e.offset==`number`&&(e.type===`text`||e.type===`element`)}function rQ(e){if(!$Z(e))return!1;let{nodes:t,states:n}=e;return Array.isArray(t)&&Array.isArray(n)&&t.every(tQ)&&n.every(e=>$Z(e)&&Array.isArray(e.nodes)&&e.nodes.every(e=>typeof e==`number`&&e>=0&&e<t.length)&&function(e){return e==null||!!$Z(e)&&(e.type===`node`?Array.isArray(e.keys)&&e.keys.every(e=>typeof e==`string`):e.type===`range`&&nQ(e.anchor)&&nQ(e.focus)&&typeof e.format==`number`&&typeof e.style==`string`)}(e.selection))}function iQ(e,t){if(e.type!==`root`)return LI(e);let n;if(t.parseEditorState({root:e},()=>{n=nI()}),n===void 0)throw Error(`editorStateFamily: the root version did not parse`);return n}function aQ(e,t){let n=[],r=new Map,i=!1,a=!1,o=t.parseEditorState(XZ,()=>{for(let i of e.nodes){let e=null;try{e=iQ(i.json,t)}catch{n.push(null);continue}let a=r.get(i.key);a===void 0?r.set(i.key,e.__key):e.__key=a,n.push(e)}let o=e=>e===null?null:r.get(e)??null;for(let[t,r]of e.nodes.entries()){let e=n[t];if(e===null)continue;e.__parent=o(r.parent),e.__prev=o(r.prev),e.__next=o(r.next),G(e)&&(e.__first=o(r.first??null),e.__last=o(r.last??null),e.__size=r.size??0);let a=e;r.slots!==void 0&&(i=!0,a.__slots=new Map(r.slots.flatMap(([e,t])=>{let n=o(t);return n===null?[]:[[e,n]]}))),r.slotHost!==void 0&&(a.__slotHost=o(r.slotHost))}a=!0});return a?e.states.map(e=>{let t=new Map;for(let r of e.nodes){let e=n[r];if(e==null)return null;t.set(e.__key,e)}if(!t.has(`root`))return null;let a=o.clone(function(e,t){if(e==null)return null;if(e.type===`node`){let n=TF();for(let r of e.keys){let e=t.get(r);if(e===void 0)return null;n._nodes.add(e)}return n}let n=t.get(e.anchor.key),r=t.get(e.focus.key);if(n===void 0||r===void 0)return null;let i=OF();return i.anchor.key=n,i.anchor.offset=e.anchor.offset,i.anchor.type=e.anchor.type,i.focus.key=r,i.focus.offset=e.focus.offset,i.focus.type=e.focus.type,i.format=e.format,i.style=e.style,i}(e.selection,r));return a._nodeMap=t,a._slotsUsed=i,a._parsed=!1,a}):e.states.map(()=>null)}function oQ(e,t){return function(e,t){let n=`lexicalHMR:${encodeURIComponent(t)}`;return e===void 0?n:`${n}:${encodeURIComponent(e)}`}(t===``?void 0:t,sQ(e)?e._config.namespace:``)}function sQ(e){let t=vH.maybeFromEditor(e);if(!t)return!1;for(let n of t.extensionNameMap.values()){let{namespace:t}=n.extension;if(t&&t===e._config.namespace)return!0}return e._parentEditor!==null&&sQ(e._parentEditor)}function cQ(e,t){return e.data[t]}function lQ(e){if(typeof e!=`object`||!e)return!1;let t=e,n=e=>Object.prototype.hasOwnProperty.call(t,e);return n(`editable`)&&n(`editorState`)&&typeof t.editable==`boolean`&&function(e){return typeof e==`object`&&!!e&&typeof e.toJSON==`function`&&typeof e.isEmpty==`function`}(t.editorState)}var uQ={afterRegistration(e,{hot:t,id:n},r){if(!t)return()=>{};let i=oQ(e,n),a=wH(e,`@lexical/history/History`),o=!1,s=cQ(t,i);if(lQ(s))try{e.setEditable(s.editable);let t=typeof s.serialize==`function`?s.serialize():null;if(function(e){if(typeof e!=`object`||!e)return!1;let{family:t,history:n}=e;if(!rQ(t))return!1;if(n==null)return!0;let r=e=>typeof e==`number`&&e>=0&&e<t.states.length,{current:i,redoStack:a,undoStack:o}=n;return(i===null||r(i))&&Array.isArray(a)&&a.every(r)&&Array.isArray(o)&&o.every(r)}(t)){let n=aQ(t.family,e),r=n[0];r==null||r.isEmpty()||(r._parsed=!0,e.setEditorState(r,{tag:NL}),t.history!=null&&a&&(a.output.historyState.value=function(e,t,n){let r=e=>{let r=t[e];return r==null||r.isEmpty()?null:{editor:n,editorState:r}},i=e=>e.map(r).filter(e=>e!==null),a=e.current===null?null:r(e.current),o=i(e.undoStack);return{current:a,redoStack:i(e.redoStack),undoStack:o}}(t.history,n,e)),o=!0)}}catch{}o&&r.getInitResult().restoreCount.value++;let c=r.getDependency(jW).output,l=r.getDependency(JZ).output,u=r.getDependency(JJ).output,d=null;return fV(()=>{let n=c.value,r=l.value,o=u.value!==null,s=cQ(t,i);if(d!==null&&d.editorState===n&&d.editable===r)return void(lQ(s)&&s.owner===e&&(s.mounted=o));d={editable:r,editorState:n};let f={...(n.isEmpty()&&lQ(s)?s:null)??{editorState:n,serialize:()=>function(e,t,n){let r=[t],i=t=>t.editor===e,a=e=>r.push(e.editorState)-1,o=e=>e.filter(i).map(a),s=n?{current:n.current&&i(n.current)?a(n.current):null,redoStack:o(n.redoStack),undoStack:o(n.undoStack)}:null;return{family:QZ(r),history:s}}(e,n,a?a.output.historyState.peek():null)},editable:r,mounted:o,owner:e};t.data[i]=f})},build:(e,t,n)=>n.getInitResult(),config:{hot:null},dependencies:[jW,JJ,JZ],init:()=>({restoreCount:pV(0)}),name:`@lexical/extension/HMR`},dQ=YZ.HMRExtension,fQ=t({IMEExtension:()=>pQ}),pQ={build:e=>({composingTextNode:pV(null),compositionKey:pV(null)}),name:`@lexical/extension/IME`,register(e,t,n){let{compositionKey:r,composingTextNode:i}=n.getOutput();return kz(e.registerCommand(pL,()=>{let e=W();return K(e)&&(r.value=e.anchor.key),!1},sL),fV(()=>{let t=r.value;i.value=t===null?null:e.read(`latest`,()=>{let e=$F(t);return q(e)?e:null})}),e.registerUpdateListener(({tags:e,editorState:t})=>{e.has(mL)&&t.read(()=>{let e=W();if(!K(e))return;let t=e.anchor.getNode();q(t)&&(i.value=t)})}),e.registerRootListener(e=>e===null?void(r.value=null):Fz(e,`compositionend`,()=>{r.value=null})))}},mQ=fQ.IMEExtension,hQ=t({KeyboardShortcutsExtension:()=>CQ,formatKeyboardShortcut:()=>xQ}),gQ=[[`ctrlKey`,`Ctrl`],[`altKey`,`Alt`],[`shiftKey`,`Shift`],[`metaKey`,`Meta`]],_Q={\" \":`Space`};function vQ(e,t){return{...e,...t}}var yQ=vQ(_Q,{Alt:`⌥`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,ArrowUp:`↑`,Backspace:`⌫`,CapsLock:`⇪`,Ctrl:`⌃`,Delete:`⌦`,End:`↘`,Enter:`↩`,Escape:`⎋`,Home:`↖`,Meta:`⌘`,PageDown:`⇟`,PageUp:`⇞`,Shift:`⇧`,Tab:`⇥`}),bQ=vQ(yQ,{Tab:`⇤`});function xQ(e,t={}){let{isApple:n=UL}=t,{unshiftedKey:r,key:i}=e,a=Dz(e.modifiers||{},n),o=[],s=n?!0===a.shiftKey?bQ:yQ:_Q;for(let[e,t]of gQ)if(!0===a[e]){if(n&&e===`shiftKey`&&r&&i.length===1)continue;o.push(s[t]||t)}return o.push(s[i]||!n&&!0===a.shiftKey&&r||i.length===1&&i.toUpperCase()||i),o}function SQ(e){return t=e,Array.isArray(t)?e:e?[e]:[];var t}var CQ={build:(e,t,n)=>_V(t),config:{disabled:!1,priority:dL,shortcuts:{}},mergeConfig(e,t){let n=Uz(e,t);return n.shortcuts=function(e,t){if(!t)return e;let n={...t};for(let[t,r]of Object.entries(e))n[t]===void 0&&(n[t]=r);return n}(e.shortcuts,t.shortcuts),n},name:`@lexical/extension/KeyboardShortcuts`,register(e,t,n){let{disabled:r,priority:i,shortcuts:a}=n.getOutput();return fV(()=>{if(!r.value){let t=[];for(let e of Object.values(a.value))for(let n of SQ(e))t.push(n);return function(e,t,n){let r=BR(t);return e.registerCommand(lR,(t,n)=>{let i;for(let a of r.matches(t)){if(e!==n&&!a.bubbleFromNestedEditors||a.$disabled&&(i===void 0&&(i=W()),a.$disabled(i,n)))continue;let r=n.dispatchCommand.bind(n,a.command,t);if(a.$dispatch?a.$dispatch(a.command,t,r,n):r())return!0}return!1},n)}(e,t,i.value)}})}},wQ=hQ,TQ=wQ.KeyboardShortcutsExtension,EQ=wQ.formatKeyboardShortcut,DQ=t({NestedEditorExtension:()=>OQ}),OQ={build:(e,t)=>_V({inheritEditableFromParent:t.inheritEditableFromParent}),config:{$getParentEditor:function(){let e=XF();return vH.fromEditor(e),e},inheritEditableFromParent:!1},init:(e,t,n)=>{let r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},name:`@lexical/extension/NestedEditor`,register:(e,t,n)=>fV(()=>{let t=e._parentEditor;if(t&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(t.isEditable()),t.registerEditableListener(e.setEditable.bind(e))})},kQ=DQ.NestedEditorExtension,AQ=t({NodeSelectionDataSelectedExtension:()=>MQ});function jQ(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var MQ={config:{attribute:`data-selected`,nodes:[]},init(e,t){let n=new Set,r=sz(RV(e).nodes);for(let e of t.nodes){let t=e.getType(),i=r.get(t);i===void 0&&jQ(339,e.name,t),n.add(t);for(let e of i)n.add(e)}return{matchTypes:n}},mergeConfig:(e,t)=>Uz(e,{...t,...t.nodes&&{nodes:[...e.nodes,...t.nodes]}}),name:`@lexical/extension/NodeSelectionDataSelected`,register(e,t,n){let{attribute:r}=t,{matchTypes:i}=n.getInitResult(),a=new Map,o=t=>{let n=new Set;t.read(()=>{let e=W();if(CI(e))for(let t of e.getNodes())i.has(t.getType())&&n.add(t.getKey())});for(let[e,t]of a)n.has(e)||(t.removeAttribute(r),a.delete(e));for(let t of n){let n=e.getElementByKey(t);n!==null&&(n.setAttribute(r,`true`),a.set(t,n))}};o(e.getEditorState());let s=e.registerUpdateListener(({editorState:e})=>o(e));return()=>{s();for(let e of a.values())e.removeAttribute(r);a.clear()}}},NQ=AQ.NodeSelectionDataSelectedExtension,PQ=t({PreventSelectAllExtension:()=>IQ});function FQ(e){let t=e.target;yz(e,`a`,_L)&&J(t)&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)&&t.addEventListener(`keydown`,Wz,{once:!0})}var IQ={build:(e,t,n)=>_V(t),config:{disabled:!1},name:`@lexical/extension/PreventSelectAll`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return e.registerRootListener(e=>{if(e)return Fz(e,`keydown`,FQ,!0)})})}},LQ=PQ.PreventSelectAllExtension,RQ=t({SelectBlockExtension:()=>zQ}),zQ={build:(e,t,n)=>_V(t),config:{cascadeSelection:!1,disabled:!1},dependencies:[LQ],name:`@lexical/extension/SelectBlock`,register:(e,t,n)=>{let r=n.getOutput(),i=n.getDependency(LQ).output;return kz(fV(()=>{i.disabled.value=r.disabled.value}),fV(()=>{if(!r.disabled.value)return e.registerCommand(ER,(t,n)=>{if(n!==e)return r.cascadeSelection.peek()?!!n.read(`pending`,()=>{let e=W();return K(e)&&hI(nI(),e)})&&(BI(),!0):!1;let i=W();if(CI(i)){let e=i.getNodes(),t=e[0];if(!t)return!1;let n=t.getTopLevelElement();return!n||TI(n)||n.is(t)||e.length>1&&(a=n,!e.every(e=>a.is(e.getTopLevelElement())))?BI():G(n)&&n.select(0,n.getChildrenSize()),!0}var a;if(!K(i))return!1;let o=i.anchor.getNode(),s=o.getTopLevelElement();if(s&&s.is(i.focus.getNode().getTopLevelElement())&&!hI(s,i))return s.select(0,s.getChildrenSize()),!0;let c=oI(o);for(;c!==null;){if(G(c)&&!hI(c,i))return c.select(0,c.getChildrenSize()),!0;let e=sI(c);c=e===null?null:oI(e)}return hI(nI(),i)||BI(),!0},uL)}))}},BQ=RQ.SelectBlockExtension,VQ=t({SelectionAlwaysOnDisplayExtension:()=>HQ}),HQ={build:(e,t,n)=>_V(t),config:{disabled:!1,onReposition:void 0},name:`@lexical/utils/SelectionAlwaysOnDisplay`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return OW(e,r.onReposition.value)})}},UQ=VQ.SelectionAlwaysOnDisplayExtension,WQ=t({TabIndentationExtension:()=>qQ,registerTabIndentation:()=>KQ});function GQ(e){return e.canIndent()}function KQ(e,t,n=GQ){return kz(e.registerCommand(pR,t=>{let n=W();if(!K(n))return!1;t.preventDefault();let r=function(e){if(e.getNodes().filter(e=>mI(e)&&e.canIndent()).length>0)return!0;let t=e.anchor,n=e.focus,r=n.isBefore(t)?n:t,i=yW(r.getNode());if(i.canIndent()){let e=i.getKey(),t=OF();if(t.anchor.set(e,0,`element`),t.focus.set(e,0,`element`),t=II(t),t.anchor.is(r))return!0}return!1}(n)?t.shiftKey?_R:FL:RL;return e.dispatchCommand(r)},lL),e.registerCommand(FL,()=>{let e=typeof t==`number`?t:t?t.peek():null;if(!K(W()))return!1;let r=typeof n==`function`?n:n.peek();return xW(t=>{if(r(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},cL))}var qQ={build:(e,t,n)=>_V(t),config:{$canIndent:GQ,disabled:!1,maxIndent:null},name:`@lexical/extension/TabIndentation`,register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:a}=n.getOutput();return fV(()=>{if(!r.value)return KQ(e,i,a)})}},JQ=WQ,YQ=JQ.TabIndentationExtension,XQ=JQ.registerTabIndentation,Z=t({$applyFormatToDom:()=>BZ,$createHorizontalRuleNode:()=>WW,$defaultShouldInsertAfter:()=>DZ,$getExtensionDependency:()=>rG,$getExtensionOutput:()=>iG,$getPeerDependency:()=>aG,$isDecoratorTextNode:()=>VZ,$isHorizontalRuleNode:()=>GW,AutoFocusExtension:()=>mZ,CONTROL_OR_ALT:()=>gL,CONTROL_OR_META:()=>_L,ClearEditorExtension:()=>bZ,ClickAfterLastBlockExtension:()=>OZ,DecoratorTextExtension:()=>HZ,DecoratorTextNode:()=>UZ,EditorStateExtension:()=>jW,HMRExtension:()=>dQ,HorizontalRuleExtension:()=>KW,HorizontalRuleNode:()=>qW,IMEExtension:()=>mQ,INSERT_HORIZONTAL_RULE_COMMAND:()=>JW,InitialStateExtension:()=>WV,KeyboardShortcutsExtension:()=>TQ,LexicalBuilder:()=>vH,NestedEditorExtension:()=>kQ,NodeSelectionDataSelectedExtension:()=>NQ,NodeSelectionExtension:()=>FW,NormalizeInlineElementsExtension:()=>fY,NormalizeTripleClickSelectionExtension:()=>gY,PreventSelectAllExtension:()=>LQ,RootElementExtension:()=>JJ,SelectBlockExtension:()=>BQ,SelectionAlwaysOnDisplayExtension:()=>UQ,TabIndentationExtension:()=>YQ,WatchEditableExtension:()=>JZ,applyFormatFromStyle:()=>WZ,applyFormatToDom:()=>GZ,batch:()=>uV,buildEditorFromExtensions:()=>yH,compileKeyboardShortcuts:()=>BR,computed:()=>dV,configExtension:()=>VR,declarePeerDependency:()=>KR,defineExtension:()=>qR,effect:()=>fV,formatKeyboardShortcut:()=>EQ,getExtensionDependencyFromEditor:()=>ZW,getKnownTypesAndNodes:()=>RV,getPeerDependencyFromEditor:()=>wH,getPeerDependencyFromEditorOrThrow:()=>TH,namedSignals:()=>_V,registerClearEditor:()=>xZ,registerTabIndentation:()=>XQ,safeCast:()=>Rz,shallowMergeConfig:()=>Uz,signal:()=>pV,untracked:()=>mV,watchedSignal:()=>bV});Z.$applyFormatToDom;var ZQ=Z.$createHorizontalRuleNode;Z.$defaultShouldInsertAfter,Z.$getExtensionDependency,Z.$getExtensionOutput,Z.$getPeerDependency,Z.$isDecoratorTextNode;var QQ=Z.$isHorizontalRuleNode;Z.AutoFocusExtension,Z.CONTROL_OR_ALT,Z.CONTROL_OR_META,Z.ClearEditorExtension,Z.ClickAfterLastBlockExtension,Z.DecoratorTextExtension,Z.DecoratorTextNode,Z.EditorStateExtension,Z.HMRExtension,Z.HorizontalRuleExtension;var $Q=Z.HorizontalRuleNode;Z.IMEExtension;var e$=Z.INSERT_HORIZONTAL_RULE_COMMAND;Z.InitialStateExtension,Z.KeyboardShortcutsExtension,Z.LexicalBuilder,Z.NestedEditorExtension,Z.NodeSelectionDataSelectedExtension,Z.NodeSelectionExtension,Z.NormalizeInlineElementsExtension,Z.NormalizeTripleClickSelectionExtension,Z.PreventSelectAllExtension,Z.RootElementExtension,Z.SelectBlockExtension,Z.SelectionAlwaysOnDisplayExtension,Z.TabIndentationExtension,Z.WatchEditableExtension,Z.applyFormatFromStyle,Z.applyFormatToDom,Z.batch,Z.buildEditorFromExtensions,Z.compileKeyboardShortcuts,Z.computed,Z.configExtension,Z.declarePeerDependency,Z.defineExtension,Z.effect,Z.formatKeyboardShortcut,Z.getExtensionDependencyFromEditor,Z.getKnownTypesAndNodes,Z.getPeerDependencyFromEditor,Z.getPeerDependencyFromEditorOrThrow;var t$=Z.namedSignals;Z.registerClearEditor,Z.registerTabIndentation,Z.safeCast,Z.shallowMergeConfig,Z.signal,Z.untracked,Z.watchedSignal,kr(2)+1;var n$=t({$createListItemNode:()=>j$,$createListNode:()=>L$,$getListDepth:()=>i$,$handleListInsertParagraph:()=>y$,$insertList:()=>d$,$isListItemNode:()=>Q,$isListNode:()=>$,$removeList:()=>h$,CheckListExtension:()=>c1,INSERT_CHECK_LIST_COMMAND:()=>z$,INSERT_ORDERED_LIST_COMMAND:()=>r1,INSERT_UNORDERED_LIST_COMMAND:()=>n1,ListExtension:()=>s1,ListImportExtension:()=>l1,ListImportRules:()=>e1,ListItemNode:()=>D$,ListNode:()=>P$,ListSchema:()=>$$,REMOVE_LIST_COMMAND:()=>i1,UPDATE_LIST_START_COMMAND:()=>t1,WordListImportExtension:()=>w1,registerCheckList:()=>B$,registerList:()=>a1,registerListStrictIndentTransform:()=>o1});function r$(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function i$(e){let t=1,n=e.getParent();for(;n!=null;){if(Q(n)){let e=n.getParent();if($(e)){t++,n=e.getParent();continue}r$(40)}return t}return t}function a$(e){let t=e.getParent();$(t)||r$(40);let n=t,r=t;for(;r!==null;)r=r.getParent(),$(r)&&(n=r);return n}function o$(e){let t=[],n=e.getChildren().filter(Q);for(let e=0;e<n.length;e++){let r=n[e],i=r.getFirstChild();$(i)?t=t.concat(o$(i)):t.push(r)}return t}function s$(e){return Q(e)&&$(e.getFirstChild())}function c$(e,t){return t.getValue()}function l$(e,t){return Q(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function u$(e,t){return $(e)?SF(e).setListType(t):L$(t)}function d$(e){let t=W();if(t!==null){let n=t.getNodes();if(K(t)){let[r]=t.getStartEndPoints(),i=r.getNode(),a=i.getParent();if(EI(i)){let e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=EF();i.append(e),n=e.select().getNodes()}}else if(l$(i,n)){if(EI(a)){let t=L$(e);i.replace(t);let n=j$();G(i)&&(n.setFormat(i.getFormatType()),n.setIndent(i.getIndent())),t.append(n)}else if(Q(i)){let t=i.getParentOrThrow();if(sI(t)===null){let n=u$(t,e);f$(n,t.getChildren()),t.replace(n)}}return}}let r=new Set;for(let t=0;t<n.length;t++){let i=n[t];if(G(i)&&i.isEmpty()&&!Q(i)&&sI(i)===null&&!r.has(i.getKey())){p$(i,e);continue}let a=bI(i)?i.getParent():Q(i)&&i.isEmpty()?i:null;for(;a!=null;){let t=a.getKey();if($(a)){if(!r.has(t)&&sI(a)===null){let n=u$(a,e);f$(n,a.getChildren()),a.replace(n),r.add(t)}break}{let n=a.getParent();if(EI(n)&&!r.has(t)){r.add(t),p$(a,e);break}a=n}}}}}function f$(e,t){e.splice(e.getChildrenSize(),0,t)}function p$(e,t){if($(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=j$(),a;if(f$(i,e.getChildren()),$(n)&&t===n.getListType())n.append(i),$(r)&&t===r.getListType()&&(f$(n,r.getChildren()),r.remove()),a=n;else if($(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{let n=L$(t);n.append(i),e.replace(n),a=n}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());let o=W();return K(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,`element`),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,`element`)),e.remove(),a}function m$(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&s$(n)&&s$(r)&&n.getFirstChild().getListType()===r.getFirstChild().getListType()&&(m$(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function h$(){let e=W();if(K(e)){let t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(l$(r,n))t.add(a$(r));else for(let e=0;e<n.length;e++){let r=n[e];if(bI(r)){let e=bW(r,D$);e!=null&&t.add(a$(e))}}for(let n of t){if(sI(n)!==null)continue;let t=n,r=o$(n);for(let n of r){let r=EF().setTextStyle(e.style).setTextFormat(e.format);r.setFormat(n.getFormatType()).setIndent(n.getIndent()).setDirection(n.getDirection()).setStyle(n.getStyle()),f$(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&UI(e.anchor,FI(UF(r,`next`))),n.__key===e.focus.key&&UI(e.focus,FI(UF(r,`next`))),n.remove()}n.remove()}}}function g$(e){let t=e.getListType()!==`check`,n=e.getStart();for(let r of e.getChildren())Q(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),$(r.getFirstChild())||n++)}function _$(e){let t=new Set;if(s$(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(s$(r)&&s$(i)){let n=i.getFirstChild();if($(n)){n.append(e);let i=r.getFirstChild();$(i)&&n.getListType()===i.getListType()&&(f$(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(s$(r)){let t=r.getFirstChild();if($(t)){let n=t.getFirstChild();n!==null&&n.insertBefore(e)}}else if(s$(i)){let t=i.getFirstChild();$(t)&&t.append(e)}else if($(n)){let t=SF(e),a=SF(n);t.append(a),a.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function v$(e){if(s$(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if($(n?n.getParent():void 0)&&Q(n)&&$(t)){let r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=SF(e),i=SF(t);r.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));let a=SF(e),o=SF(t);a.append(o),f$(o,e.getNextSiblings()),n.insertBefore(r),n.insertAfter(a),n.replace(e)}}}function y$(e=!1){let t=W();if(!K(t)||!t.isCollapsed())return!1;let n=t.anchor.getNode(),r=null;if(Q(n)&&n.getChildrenSize()===0)r=n;else if(q(n)){let e=n.getParent();Q(e)&&e.getChildren().every(e=>q(e)&&e.getTextContent().trim()===``)&&(r=e)}if(r===null)return!1;let i=a$(r),a=r.getParent();$(a)||r$(40);let o=a.getParent(),s;if(EI(o))s=EF(),i.insertAfter(s);else{if(!Q(o))return!1;s=SF(o),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=e?c$(0,r):1,n=SF(a).setStart(t);if(Q(s)){let e=SF(s);e.append(n),s.insertAfter(e)}else s.insertAfter(n);n.append(...c)}return function(e){let t=e;for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!Q(e)&&!$(e))break;t=e}t.remove()}(r),!0}var b$=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function x$(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!b$.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function S$(e,t){e.__listType=t.__listType,e.__start=t.__start,e.__tag=t.__tag}var C$=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`),i=IR(e,`listType`,0);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],listType:e.__listType,start:e.__start,tag:e.__tag,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__listType;o!==void 0&&o!==`number`&&(a.listType=o);let s=e.__start;s!==void 0&&s!==1&&(a.start=s);let c=e.__dir;c!=null&&(a.direction=c);let l=t[e.__format];l!==void 0&&l!==``&&(a.format=l);let u=e.__indent;return u!==void 0&&u!==0&&(a.indent=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let a=t.direction;e.__dir=a===null||a===`ltr`||a===`rtl`?a:null;let o=t.format;e.__format=typeof o==`string`&&o in n?n[o]:r,e.__indent=function(e,t,n,r){let i=x$(e,t);return i>=n&&i<=r&&Number.isInteger(i)?i:t}(t.indent,0,0,1/0),e.__textFormat=x$(t.textFormat,0);let s=t.textStyle;e.__textStyle=typeof s==`string`?s:``;let c=t.listType;return e.setListType(typeof c==`string`&&c in i?i[c]:c===`number`||c===`bullet`||c===`check`?c:`number`),e.__start=x$(t.start,1),e},afterCloneFrom:S$}};function w$(e,t){e.__checked=t.__checked,e.__value=t.__value}var T$=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],checked:e.getChecked(),indent:e.getIndent(),value:e.__value,direction:e.__dir,format:t[e.__format],textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.getChecked();o!==void 0&&(a.checked=o);let s=e.getIndent();s!==void 0&&s!==0&&(a.indent=s);let c=e.__value;c!==void 0&&c!==1&&(a.value=c);let l=e.__dir;l!=null&&(a.direction=l);let u=t[e.__format];return u!==void 0&&u!==``&&(a.format=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.setIndent(function(e,t,n,r){let i=x$(e,NaN);return Number.isFinite(i)&&Number.isInteger(i)?i<n?n:i>r?r:i:t}(t.indent,0,0,128)),e.__textFormat=x$(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.checked;return e.__checked=s===void 0?void 0:typeof s==`boolean`&&s,e.__value=x$(t.value,1),e},afterCloneFrom:w$}},E$=Az()({checked:Jz(Pz(RR()),{setter:{field:`__checked`}}),indent:Nz(0,{clamp:!0,integer:!0,max:128,min:0}),value:Yz(Nz(1),{field:`__value`})}),D$=class extends kL{__value;__checked;$config(){return this.config(`listitem`,{$transform:e=>{let t=e.getParent();if($(t))t.getListType()!==`check`&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){let n=e.createParentElementNode();$(n)||r$(340);let r=[e];for(let t of[`previous`,`next`]){r.reverse();for(let{origin:n}of iI(e,t)){if(!Q(n))break;r.push(n)}}e.insertBefore(n),n.splice(0,0,r),EI(t)||(fI(n,zI(iI(n,`next`)),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:kL,generated:T$,importDOM:zR({li:()=>({conversion:O$,priority:0})}),json:E$})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}createDOM(e){let t=YF().createElement(`li`);return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(e,t){let n=t.getParent();!$(n)||n.getListType()!==`check`||$(t.getFirstChild())?(e.removeAttribute(`role`),e.removeAttribute(`tabIndex`),e.removeAttribute(`aria-checked`)):(e.setAttribute(`role`,`checkbox`),e.setAttribute(`tabIndex`,`-1`),e.setAttribute(`aria-checked`,t.getChecked()?`true`:`false`))})(t,this),t.value=this.__value,function(e,t,n){let r=t.list;if(!r)return;let i=r.listitem,a=r.nested&&r.nested.listitem,o=n.getParent(),s=$(o)&&o.getListType()===`check`,c=n.getChecked(),l=n.getChildren().some(e=>$(e)),u=[];r.listitemChecked!==void 0&&u.push(r.listitemChecked),r.listitemUnchecked!==void 0&&u.push(r.listitemUnchecked),a!==void 0&&u.push(...jz(a)),u.length>0&&Lz(e,...u);let d=[];if(i!==void 0&&d.push(...jz(i)),s){let e=c?r.listitemChecked:r.listitemUnchecked;e!==void 0&&d.push(e)}a!==void 0&&l&&d.push(...jz(a)),d.length>0&&FR(e,...d)}(t,n.theme,this);let r=e?e.__style:``,i=this.__style;r!==i&&zz(t.style,i,r),function(e,t,n){let r=t.__textStyle,i=n?n.__textStyle:``;if(n!==null&&i===r)return;let a=uz(r);for(let t in a)e.style.setProperty(`--listitem-marker-${t}`,a[t]);if(i!==``)for(let t in uz(i))t in a||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){let r=t;return this.updateListItemDOM(e,r,n),!1}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),s$(this)?{after(e){if(J(e)){let t=e.previousElementSibling;if(J(t)&&t.nodeName===`LI`){for(;e.firstChild;)t.append(e.firstChild);e.remove()}}return e},element:t}:{element:t}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if(G(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(Q(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!$(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=SF(n),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}let r=this.__key,i=0;if(t&&(G(e)||r$(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&G(e)){let t=W();if(K(t))for(let n of t.getStartEndPoints())n.key===r&&n.type===`element`&&n.set(e.getKey(),i+n.offset,`element`)}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if($(n)||r$(39),Q(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){let i=SF(n),a=r[0];i.getListType()===`number`&&Q(a)&&i.setStart(c$(0,a)),r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&s$(t)&&s$(n)&&t.getFirstChild().getListType()===n.getFirstChild().getListType()&&(m$(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){let n=SF(this);return this.insertAfter(n,t),n}collapseAtStart(e){if(s$(this))return!1;let t=this.getParentOrThrow();if(Q(t.getParentOrThrow()))return v$(this),!0;let n=EF().append(...this.getChildren()),r=this.getNextSiblings();if(r.length>0){let e=SF(t);e.append(...r),t.insertAfter(e)}return t.insertAfter(n),this.remove(),t.getChildrenSize()===0&&t.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,n=this.getParent();return $(n)&&(t=n.getListType()),t===`check`?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;Q(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!=`number`&&r$(117),(e=Math.floor(e))>=0||r$(199);let t=e,n=this.getIndent();for(;n!==t;)n<t?(_$(this),n++):(v$(this),n--);return this}canInsertAfter(e){return Q(e)}canReplaceWith(e){return Q(e)}canMergeWith(e){return Q(e)||wI(e)}extractWithChild(e,t){if(!K(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return L$(`bullet`)}canMergeWhenEmpty(){return!0}};function O$(e){if(e.classList.contains(`task-list-item`)){for(let t of e.children)if(t.tagName===`INPUT`)return k$(t)}if(e.classList.contains(`joplin-checkbox`)){for(let t of e.children)if(t.classList.contains(`checkbox-wrapper`)&&t.children.length>0&&t.children[0].tagName===`INPUT`)return k$(t.children[0])}let t=e.getAttribute(`aria-checked`),n=j$(t===`true`||t!==`false`&&void 0);return HI(n,e),{after:A$.bind(null,n),node:VI(n,e)}}function k$(e){if(e.getAttribute(`type`)!==`checkbox`)return{node:null};let t=j$(e.hasAttribute(`checked`));return{after:A$.bind(null,t),node:t}}function A$(e,t){let n=t[0];return t.length===1&&wI(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function j$(e){return hF(new D$(void 0,e))}function Q(e){return e instanceof D$}var M$={ol:`number`,ul:`bullet`},N$=Az()({listType:Jz(LR(JR([`number`,`bullet`,`check`]),M$),{getter:{field:`__listType`}}),start:Yz(Nz(1),{field:`__start`}),tag:Jz(JR([`ul`,`ol`]),{getter:{field:`__tag`},setter:null})}),P$=class extends kL{__tag;__start;__listType;$config(){return this.config(`list`,{$transform:e=>{(function(e){let t=e.getNextSibling();$(t)&&e.getListType()===t.getListType()&&m$(e,t)})(e),g$(e)},extends:kL,generated:C$,importDOM:zR({ol:()=>({conversion:I$,priority:0}),ul:()=>({conversion:I$,priority:0})}),json:N$})}constructor(e=`number`,t=1,n){super(n);let r=M$[e]||e;this.__listType=r,this.__tag=r===`number`?`ol`:`ul`,this.__start=t}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e===`number`?`ol`:`ul`,t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=YF().createElement(n);return this.__start!==1&&r.setAttribute(`start`,String(this.__start)),r.__lexicalListType=this.__listType,F$(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(F$(t,n.theme,this),e.__start!==this.__start&&t.setAttribute(`start`,String(this.__start)),!1)}exportDOM(e){let t=this.createDOM(e._config,e);if(J(t)){this.__start!==1&&t.setAttribute(`start`,String(this.__start)),this.__listType===`check`&&t.setAttribute(`__lexicalListType`,`check`);let e=this.getDirection();e&&(t.dir=e)}return{element:t}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];if(!Q(t)){r===n&&(r=[...n]);let i=this.createListItemNode();!G(t)||$(t)||t.isInline()?i.append(t):i.append(...t.getChildren()),r[e]=i}}return super.splice(e,t,r)}extractWithChild(e){return Q(e)}createListItemNode(){return j$()}};function F$(e,t,n){let r=[],i=[],a=t.list;if(a!==void 0){let e=a[`${n.__tag}Depth`]||[],t=i$(n)-1,o=t%e.length,s=e[o],c=a[n.__tag],l,u=a.nested,d=a.checklist;if(u!==void 0&&u.list&&(l=u.list),c!==void 0&&r.push(c),d!==void 0&&n.__listType===`check`&&r.push(d),s!==void 0){r.push(...jz(s));for(let t=0;t<e.length;t++)t!==o&&i.push(...jz(e[t]))}if(l!==void 0){let e=jz(l);t>1?r.push(...e):i.push(...e)}}i.length>0&&Lz(e,...i),r.length>0&&FR(e,...r)}function I$(e){let t;if(function(e){return J(e)&&e.nodeName.toLowerCase()===`ol`}(e)){let n=e.start;t=L$(`number`,n)}else t=function(e){if(e.getAttribute(`__lexicallisttype`)===`check`||e.classList.contains(`contains-task-list`)||e.getAttribute(`data-is-checklist`)===`1`)return!0;for(let t of e.childNodes)if(J(t)&&t.hasAttribute(`aria-checked`))return!0;return!1}(e)?L$(`check`):L$(`bullet`);return VI(t,e),{after:e=>function(e,t){let n=t.createListItemNode.bind(t),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(Q(i)){r.push(i);let e=i.getChildren();e.length>1&&e.forEach(e=>{$(e)&&r.push(n().append(e))})}else r.push(n().append(i))}return r}(e,t),node:t}}function L$(e=`number`,t=1){return hF(new P$(e,t))}function $(e){return e instanceof P$}var R$=new Set([` `,`Alt`,`ArrowDown`,`ArrowLeft`,`ArrowUp`,`CapsLock`,`Control`,`Escape`,`Meta`,`Shift`]),z$=HR(`INSERT_CHECK_LIST_COMMAND`);function B$(e,t){let n=t&&t.disableTakeFocusOnClick||!1,r=typeof n==`boolean`?()=>n:n.peek.bind(n),i=e=>{let t=e.target;if(!J(t))return!1;let n=t.__lexicalCheckListLastHandled;return n!==void 0&&e.timeStamp-n<500},a=e=>{e.pointerType===`touch`&&(i(e)||((e=>{let t=e.target;J(t)&&(t.__lexicalCheckListLastHandled=e.timeStamp)})(e),H$(e,r())))},o=`none`,s=e=>{o=function(e,t){let n=!1;return V$(e,()=>{n=!0,e.preventDefault(),t&&e.stopPropagation()}),n}(e,r())?`checkMark`:`content`},c=()=>{o===`content`&&U$(e),o=`none`};return kz(e.registerCommand(z$,()=>(d$(`check`),!0),uL),e.registerCommand(rR,t=>K$(t,e,!1),uL),e.registerCommand(oR,t=>K$(t,e,!0),uL),e.registerCommand(dR,()=>G$(e)!=null&&(e.getRootElement()?.focus(),!0),uL),e.registerCommand(fR,t=>{let n=G$(e);return!(n==null||!e.isEditable())&&(e.update(()=>{let e=QF(n);Q(e)&&(t.preventDefault(),e.toggleChecked())}),!0)},uL),e.registerCommand(iR,t=>G$(e)===null?e.read(`latest`,()=>{let n=W();if(K(n)&&n.isCollapsed()){let{anchor:r}=n,i=r.type===`element`;if(i||r.offset===0){let n=r.getNode(),a=NF(n,e=>G(e)&&!e.isInline());if(Q(a)){let r=a.getParent();if($(r)&&r.getListType()===`check`&&(i||a.getFirstDescendant()===n)){let n=e.getElementByKey(a.__key);if(n!=null&&ZR(n)!==n)return n.focus(),t.preventDefault(),!0}}}}return!1}):(U$(e),!1),uL),e.registerRootListener(t=>{if(t!==null)return kz(Iz(t,{click:e=>{c(),(e=>{i(e)||H$(e,r())})(e)},pointerup:e=>{c(),a(e)}}),Iz(t,{beforeinput:()=>U$(e),focusin:()=>{JL&&o===`content`&&U$(e)},keydown:t=>{R$.has(t.key)||U$(e)},mousedown:s,pointerdown:s},{capture:!0}),Fz(t,`touchstart`,s,{capture:!0,passive:!1}))}))}function V$(e,t){let n=e.target;if(!J(n))return;let r=n.firstChild;if(J(r)&&(r.tagName===`UL`||r.tagName===`OL`))return;let i=n.parentNode;if(!i||i.__lexicalListType!==`check`)return;let a=null,o=null;if(`clientX`in e)a=e.clientX;else if(`touches`in e){let t=e.touches;t.length>0&&(a=t[0].clientX,o=`touch`)}if(a==null)return;let s=n.getBoundingClientRect(),c=a/TW(n),l=n.ownerDocument.defaultView,u=l?l.getComputedStyle(n,`::before`):{width:`0px`},d=parseFloat(u.width),f=o===`touch`||`pointerType`in e&&e.pointerType===`touch`?32:0;(n.dir===`rtl`?c<s.right+f&&c>s.right-d-f:c>s.left-f&&c<s.left+d+f)&&t()}function H$(e,t){V$(e,()=>{if(J(e.target)){let n=e.target,r=az(n);r!=null&&r.isEditable()&&r.update(()=>{let e=QF(n);Q(e)&&(t?(mF(AR),mF(OR)):n.focus(),e.toggleChecked())})}})}function U$(e){let t=e.getRootElement(),n=t?ZR(t):null;t!==null&&J(n)&&W$(n)&&t.focus({preventScroll:!0})}function W$(e){let t=e.parentNode;return e.tagName===`LI`&&t!=null&&t.__lexicalListType===`check`}function G$(e){let t=e.getRootElement(),n=t?ZR(t):null;return J(n)&&W$(n)?n:null}function K$(e,t,n){let r=G$(t);if(r!=null){let i=null;t.update(()=>{let a=QF(r);if(!Q(a))return;let o=function(e,t){let n=t?e.getPreviousSibling():e.getNextSibling(),r=e;for(;n==null&&Q(r);)r=r.getParentOrThrow().getParent(),r!=null&&(n=t?r.getPreviousSibling():r.getNextSibling());for(;Q(n);){let e=t?n.getLastChild():n.getFirstChild();if(!$(e))return n;n=t?e.getLastChild():e.getFirstChild()}return null}(a,n);o!=null&&(o.selectStart(),t.getElementByKey(o.__key)!=null&&(e.preventDefault(),i=o.__key))},{onUpdate:()=>{(i===null?null:t.getElementByKey(i))?.focus()}})}return!1}function q$(e,t){let n=[];for(let r of e)if(Q(r)){n.push(r);let e=r.getChildren();if(e.length>1)for(let r of e)$(r)&&n.push(t.createListItemNode().append(r))}else n.push(t.createListItemNode().append(r));return n}var J$={$import:(e,t)=>{let n;var r;return n=eJ(t,`ol`)?L$(`number`,t.start):(r=t).matches(`[__lexicallisttype=\"check\"], .contains-task-list, [data-is-checklist=\"1\"]`)||r.querySelector(`:scope > [aria-checked]`)!==null?L$(`check`):L$(`bullet`),VI(n,t),[n.splice(0,0,Uq(q$(e.$importChildren(t),n),t))]},match:tJ.tag(`ol`,`ul`),name:`@lexical/list/list`};function Y$(e,t){if(t.length!==1)return t;let n=t[0];return wI(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function X$(e){let t=e=>Hq(e)&&!$(e);if(!e.some(t))return e;let n=[],r=[],i=()=>{r.length>0&&(n.push(r),r=[])};for(let a of e)t(a)?(i(),n.push(G(a)?a.getChildren():[a])):r.push(a);i();let a=[];for(let e of n)a.length>0&&a.push(wF()),a.push(...e);return a}var Z$={$import:(e,t)=>{let n=t.getAttribute(`aria-checked`),r=j$(n===`true`||n!==`false`&&void 0);return HI(r,t),VI(r,t),[r.splice(0,0,X$(Y$(r,e.$importChildren(t))))]},match:tJ.tag(`li`),name:`@lexical/list/li`};function Q$(e,t,n){let r=eJ(n,`input`)?n:n.querySelector(`input[type=\"checkbox\"]`);if(!r||r.getAttribute(`type`)!==`checkbox`)return[];let i=j$(r.hasAttribute(`checked`));return HI(i,t),VI(i,t),[i.splice(0,0,X$(Y$(i,e.$importChildren(t))))]}var $$={$accepts:e=>Q(e)||$(e),$packageRun:e=>[j$().splice(0,0,e)],name:`ListSchema`},e1=[{$import:(e,t,n)=>{let r=t.querySelector(`:scope > input[type=\"checkbox\"]`);return r?Q$(e,t,r):n()},match:tJ.tag(`li`).classAll(`task-list-item`),name:`@lexical/list/li-task-list-item`},{$import:(e,t,n)=>{let r=t.querySelector(`:scope > .checkbox-wrapper`);if(!r)return n();let i=r.querySelector(`:scope > input[type=\"checkbox\"]`);return i?Q$(e,t,i):n()},match:tJ.tag(`li`).classAll(`joplin-checkbox`),name:`@lexical/list/li-joplin-checkbox`},J$,Z$],t1=HR(`UPDATE_LIST_START_COMMAND`),n1=HR(`INSERT_UNORDERED_LIST_COMMAND`),r1=HR(`INSERT_ORDERED_LIST_COMMAND`),i1=HR(`REMOVE_LIST_COMMAND`);function a1(e,t){return kz(e.registerCommand(r1,()=>(d$(`number`),!0),uL),e.registerCommand(t1,e=>{let{listNodeKey:t,newStart:n}=e,r=$F(t);return!!$(r)&&(r.getListType()===`number`&&(r.setStart(n),g$(r)),!0)},uL),e.registerCommand(n1,()=>(d$(`bullet`),!0),uL),e.registerCommand(i1,()=>(h$(),!0),uL),e.registerCommand(LL,()=>y$(!!(t&&t.restoreNumbering)),uL),e.registerCommand(sR,e=>{let t=W();if(!K(t)||!t.isCollapsed())return!1;let{anchor:n}=t;if(n.offset!==0)return!1;let r=n.getNode();for(;!Q(r);){if(r.getPreviousSibling()!==null)return!1;let e=r.getParent();if(e===null)return!1;r=e}return!(!Q(r)||!r.collapseAtStart(t))&&(e.preventDefault(),!0)},sL),e.registerNodeTransform(D$,e=>{let t=e.getFirstChild();if(t){if(q(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=W();K(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(NR,e=>{let t=e.getParent();if(Q(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}function o1(e){let t=e=>{let t=e.getParent();if($(e.getFirstChild())||!$(t))return;let n=NF(e,e=>Q(e)&&$(e.getParent())&&Q(e.getPreviousSibling()));if(n===null&&e.getIndent()>0)e.setIndent(0);else if(Q(n)){let r=n.getPreviousSibling();if(Q(r)){let n=function(e){let t=e,n=t.getFirstChild();for(;$(n);){let e=n.getLastChild();if(!Q(e))break;t=e,n=t.getFirstChild()}return t}(r).getParent();if($(n)){let r=i$(n);r+1<i$(t)&&e.setIndent(r)}}}};return e.registerNodeTransform(P$,e=>{let n=[e];for(;n.length>0;){let e=n.shift();if($(e)){for(let r of e.getChildren())if(Q(r)){t(r);let e=r.getFirstChild();$(e)&&n.push(e)}}}})}var s1={build:(e,t,n)=>_V(t),config:{hasStrictIndent:!1,shouldPreserveNumbering:!1},dependencies:[Gq,[Kq,{rules:e1}]],name:`@lexical/list/List`,nodes:()=>[P$,D$],register(e,t,n){let r=n.getOutput();return kz(fV(()=>a1(e,{restoreNumbering:r.shouldPreserveNumbering.value})),fV(()=>r.hasStrictIndent.value?o1(e):void 0))}},c1={build:(e,t)=>_V(t),config:{disableTakeFocusOnClick:!1},dependencies:[s1],name:`@lexical/list/CheckList`,register:(e,t,n)=>B$(e,n.getOutput())},l1={dependencies:[s1],name:`@lexical/list/Import`},u1=/^MsoListParagraph(CxSp(First|Middle|Last))?$/,d1=/^[A-Za-z0-9]+[.)]/,f1=/Microsoft Word/i,p1=`data-mso-list`;function m1(e){let t=(e.getAttribute(p1)||``).match(/level(\\d+)/);return t?parseInt(t[1],10):1}function h1(e){return e.querySelector(`span[${p1}=\"Ignore\"]`)}function g1(e){let t=h1(e);return t?(t.textContent||``).trim():``}function _1(e){return d1.test(e)?`number`:`bullet`}function v1(e){let t=h1(e);if(!t)return;let n=t;for(;n.parentElement&&n.parentElement!==e&&n.parentElement.nodeName===`SPAN`;)n=n.parentElement;n.remove()}function y1(e){return J(e)&&u1.test(e.className)}function b1(e,t){let n=L$(_1(t[0].marker)),r=[{level:t[0].level,list:n}];for(let n of t){for(;r.length>1&&r[r.length-1].level>n.level;)r.pop();if(n.level>r[r.length-1].level){let e=L$(_1(n.marker));r[r.length-1].list.append(j$().append(e)),r.push({level:n.level,list:e})}v1(n.el),r[r.length-1].list.append(j$().splice(0,0,e.$importChildren(n.el,{schema:Xq})))}return n}var x1=Qq(`@lexical/list/word-consumed-list-items`,()=>null),S1={$import:(e,t)=>{let n=e.session.get(x1);if(n===null&&(n=new WeakSet,e.session.set(x1,n)),n.has(t))return[];let r=[],i=t;for(;i&&y1(i)&&(n.add(i),r.push({el:i,level:m1(i),marker:g1(i)}),!i.classList.contains(`MsoListParagraphCxSpLast`)&&i.className!==`MsoListParagraph`);)i=i.nextElementSibling;return[b1(e,r)]},match:tJ.tag(`p`).classAny(`MsoListParagraph`,`MsoListParagraphCxSpFirst`,`MsoListParagraphCxSpMiddle`,`MsoListParagraphCxSpLast`),name:`@lexical/list/word-list-paragraph`},C1=$q([{$import:()=>[],match:tJ.tag(`o:p`),name:`@lexical/list/word-o-p`},S1]),w1={dependencies:[s1,[Kq,{preprocess:[(e,t,n)=>{let r=e.querySelector(`meta[name=\"Generator\"]`);if(r&&f1.test(r.getAttribute(`content`)||``)){for(let t of Array.from(e.querySelectorAll(`[style*=\"mso-list\"]`))){let e=uz(t.getAttribute(`style`)||``)[`mso-list`];e&&t.setAttribute(p1,e)}t.session.update(qq,e=>[...e,C1])}n()}]}]],name:`@lexical/list/WordListImport`},T1=n$,E1=T1.$createListItemNode,D1=T1.$createListNode;T1.$getListDepth,T1.$handleListInsertParagraph,T1.$insertList;var O1=T1.$isListItemNode,k1=T1.$isListNode;T1.$removeList,T1.CheckListExtension;var A1=T1.INSERT_CHECK_LIST_COMMAND,j1=T1.INSERT_ORDERED_LIST_COMMAND,M1=T1.INSERT_UNORDERED_LIST_COMMAND;T1.ListExtension,T1.ListImportExtension,T1.ListImportRules;var N1=T1.ListItemNode,P1=T1.ListNode;T1.ListSchema,T1.REMOVE_LIST_COMMAND,T1.UPDATE_LIST_START_COMMAND,T1.WordListImportExtension,T1.registerCheckList;var F1=T1.registerList,I1=T1.registerListStrictIndentTransform,L1=kr(4),R1=Symbol(L1),z1=Symbol(L1+1),B1=Symbol(L1+2),V1=Symbol(L1+3);function H1(e){let[t]=Nl(R1,$x),n=e.hasStrictIndent!==void 0&&e.hasStrictIndent,r=e.shouldPreserveNumbering!==void 0&&e.shouldPreserveNumbering;return ru(()=>{if(!t.hasNodes([P1,N1]))throw Error(`ListPlugin: ListNode and/or ListItemNode not registered on editor`)},[t],z1),ru(()=>kz(F1(t,{restoreNumbering:r}),n?I1(t):()=>{}),[t,n,r],B1),ru(()=>F1(t),[t],V1),null}kr(2)+1;var U1=t({$createAutoLinkNode:()=>c0,$createLinkNode:()=>i0,$isAutoLinkNode:()=>l0,$isLinkNode:()=>a0,$toggleLink:()=>f0,AutoLinkAnnounceExtension:()=>h0,AutoLinkExtension:()=>B0,AutoLinkNode:()=>s0,ClickableLinkExtension:()=>x0,LinkExtension:()=>v0,LinkImportExtension:()=>y0,LinkImportRules:()=>g0,LinkNode:()=>$1,TOGGLE_LINK_COMMAND:()=>u0,autoLinkEmailMatcher:()=>T0,autoLinkUrlMatcher:()=>w0,createLinkMatcherWithRegExp:()=>S0,formatUrl:()=>m0,registerAutoLink:()=>z0,registerClickableLink:()=>b0,registerLink:()=>_0}),W1=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function G1(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!W1.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function K1(e,t,n,r,i){let a=G1(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}function q1(e,t){e.__rel=t.__rel,e.__target=t.__target,e.__title=t.__title,e.__url=t.__url}var J1=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],rel:e.__rel,target:e.__target,title:e.__title,url:e.__url,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__rel;o!=null&&(a.rel=o);let s=e.__target;s!=null&&(a.target=s);let c=e.__title;c!=null&&(a.title=c);let l=e.__url;l!==void 0&&l!==``&&(a.url=l);let u=e.__dir;u!=null&&(a.direction=u);let d=t[e.__format];d!==void 0&&d!==``&&(a.format=d);let f=e.__indent;return f!==void 0&&f!==0&&(a.indent=f),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=K1(t.indent,0,0,1/0),e.__textFormat=G1(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.rel;e.__rel=typeof s==`string`&&s!==``?s:null;let c=t.target;e.__target=typeof c==`string`&&c!==``?c:null;let l=t.title;e.__title=typeof l==`string`&&l!==``?l:null;let u=t.url;return e.__url=typeof u==`string`?u:``,e},afterCloneFrom:q1}};function Y1(e,t){e.__isUnlinked=t.__isUnlinked}var X1=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title,url:e.__url,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__isUnlinked;o!==void 0&&!1!==o&&(a.isUnlinked=o);let s=e.__rel;s!=null&&(a.rel=s);let c=e.__target;c!=null&&(a.target=c);let l=e.__title;l!=null&&(a.title=l);let u=e.__url;u!==void 0&&u!==``&&(a.url=u);let d=e.__dir;d!=null&&(a.direction=d);let f=t[e.__format];f!==void 0&&f!==``&&(a.format=f);let p=e.__indent;return p!==void 0&&p!==0&&(a.indent=p),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=K1(t.indent,0,0,1/0),e.__textFormat=G1(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.rel;e.__rel=typeof s==`string`&&s!==``?s:null;let c=t.target;e.__target=typeof c==`string`&&c!==``?c:null;let l=t.title;e.__title=typeof l==`string`&&l!==``?l:null;let u=t.url;e.__url=typeof u==`string`?u:``;let d=t.isUnlinked;return e.__isUnlinked=typeof d==`boolean`&&d,e},afterCloneFrom:Y1}},Z1=new Set([`http:`,`https:`,`mailto:`,`sms:`,`tel:`]),Q1=Az()({rel:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__rel`}),target:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__target`}),title:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__title`}),url:Yz(Gz(),{field:`__url`,getter:`getURL`,setter:`setURL`})}),$1=class extends kL{__url;__target;__rel;__title;$config(){return this.config(`link`,{extends:kL,generated:J1,importDOM:{a:()=>({conversion:r0,priority:1})},json:Q1})}constructor(e=``,t={},n){super(n);let{target:r=null,rel:i=null,title:a=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=a}createDOM(e){let t=YF().createElement(`a`);return this.updateLinkDOM(null,t,e),FR(t,e.theme.link),t}updateLinkDOM(e,t,n){if(bz(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let n of[`target`,`rel`,`title`]){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}sanitizeUrl(e){let t=e;e=m0(e);try{let t=new URL(m0(e));if(!Z1.has(t.protocol))return`about:blank`}catch{let e=t.replace(/[\\u0000-\\u001F\\u007F\\s]/g,``).match(/^([a-z][a-z0-9+.-]*):/i);if(e!=null&&!Z1.has(`${e[1].toLowerCase()}:`))return`about:blank`}return e}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=SF(this);return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!K(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return(this.is(r)||this.isParentOf(r))&&(this.is(i)||this.isParentOf(i))&&t.getTextContent().length>0}isEmailURI(){return this.getURL().startsWith(`mailto:`)}isWebSiteURI(){let e=this.getURL();return e.startsWith(`https://`)||e.startsWith(`http://`)}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.getURL()===e.getURL()&&this.getTarget()===e.getTarget()&&this.getRel()===e.getRel()&&this.getTitle()===e.getTitle()}};function e0(e){let t=_F(e,`next`);return[t,t.getFlipped()]}function t0(e,t){for(let n of t)if(n.origin.isAttached()){UI(e,FI(n));return}}function n0(e){let t=W(),n=null,r=null;function i(){K(t)&&(t0(t.anchor,n),t0(t.focus,r),II(t))}K(t)&&(n=e0(t.anchor),r=e0(t.focus));let a=!1;for(let t of UF(e,`next`)){let n=t.origin;if(G(n)&&!n.isInline()){let r=n.getChildren();if(r.length>0){let t=SF(e);t.append(...r),n.append(t),a=!0}fI(n,zI(t),{$shouldSplit:()=>!1})}}function o(e,t,n){let[r,i]=e,a=e=>kI(e)&&e.origin.is(t);if(!a(r)&&!a(i))return e;let o=FI(UF(n,`next`));return[o,o.getFlipped()]}if(e.isAttached()){let t=e.getPreviousSibling();if(a0(t)&&t.shouldMergeAdjacentLink(e))return n&&=o(n,t,e),r&&=o(r,t,e),t.append(...e.getChildren()),e.remove(),void i();let s=e.getNextSibling();a0(s)&&e.shouldMergeAdjacentLink(s)&&(n&&=o(n,e,s),r&&=o(r,e,s),e.append(...s.getChildren()),s.remove(),a=!0)}if(a){if(!e.canBeEmpty()&&e.isEmpty()){let t=e.getParent();e.remove(),t&&t.isEmpty()&&t.remove()}i()}}function r0(e){let t=null;if(bz(e)){let n=e.textContent;(n!==null&&n!==``||e.children.length>0)&&(t=i0(e.getAttribute(`href`)||``,{rel:e.getAttribute(`rel`),target:e.getAttribute(`target`),title:e.getAttribute(`title`)}))}return{node:t}}function i0(e=``,t){return hF(new $1(e,t))}function a0(e){return e instanceof $1}var o0=Az()({isUnlinked:Yz(RR(),{field:`__isUnlinked`})}),s0=class extends $1{__isUnlinked;constructor(e=``,t={},n){super(e,t,n),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}$config(){return this.config(`autolink`,{extends:$1,generated:X1,json:o0})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.getLatest().__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?YF().createElement(`span`):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}};function c0(e=``,t){return hF(new s0(e,t))}function l0(e){return e instanceof s0}var u0=HR(`TOGGLE_LINK_COMMAND`);function d0(e,t){if(e.type===`element`){let n=e.getNode();return G(n)||function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function f0(e,t={}){let n;if(e&&typeof e==`object`){let{url:r,...i}=e;n=r,t={...i,...t}}else n=e;let{target:r,title:i}=t,a=t.rel===void 0?`noreferrer`:t.rel,o=W();if(o===null||!K(o)&&!CI(o))return;if(CI(o)){let e=o.getNodes();if(e.length===0)return;e.forEach(e=>{if(n===null){let t=NF(e,e=>!l0(e)&&a0(e));t&&(t.insertBefore(e),t.getChildren().length===0&&t.remove())}else{let t=NF(e,e=>!l0(e)&&a0(e));if(t)t.setURL(n),r!==void 0&&t.setTarget(r),a!==void 0&&t.setRel(a),i!==void 0&&t.setTitle(i);else{let t=i0(n,{rel:a,target:r,title:i});e.insertBefore(t),t.append(e)}}});return}if(o.isCollapsed()&&n===null)for(let e of o.getNodes()){let t=NF(e,e=>!l0(e)&&a0(e));t!==null&&(t.getParentOrThrow().splice(t.getIndexWithinParent(),0,t.getChildren()),t.remove());return}let s=o.extract();if(n===null){let e=new Set;s.forEach(t=>{let n=NF(t,e=>!l0(e)&&a0(e));if(n!==null){let t=n.getKey();if(e.has(t))return;(function(e,t){let n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),i=r=>n.has(r.getKey())||G(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),a=r.filter(i);if(a.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();let o=r.findIndex(i),s=r.findLastIndex(i),c=o===0,l=s===r.length-1;if(c)a.forEach(t=>e.insertBefore(t));else if(l)for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);else{for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);let t=r.slice(s+1);if(t.length>0){let n=SF(e);a[a.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}})(n,s),e.add(t)}});return}let c=new Set,l=e=>{c.has(e.getKey())||(c.add(e.getKey()),e.setURL(n),r!==void 0&&e.setTarget(r),a!==void 0&&e.setRel(a),i!==void 0&&e.setTitle(i))};if(s.length===1){let e=s[0],t=NF(e,a0);if(t!==null)return l(t)}(function(e){let t=W();if(!K(t))return e();let n=II(t),r=n.isBackward(),i=d0(n.anchor,r?-1:0),a=d0(n.focus,r?0:-1);if(e(),i||a){let e=W();if(K(e)){let t=e.clone();if(i){let e=i.getParent();e&&t.anchor.set(e.getKey(),i.getIndexWithinParent()+ +!!r,`element`)}if(a){let e=a.getParent();e&&t.focus.set(e.getKey(),a.getIndexWithinParent()+ +!r,`element`)}WI(II(t))}}})(()=>{let e=null;for(let t of s){if(!t.isAttached())continue;let o=NF(t,a0);if(o){l(o);continue}if(G(t)){if(!t.isInline())continue;if(a0(t)){if(!(l0(t)||e!==null&&e.getParentOrThrow().isParentOf(t))){l(t),e=t;continue}for(let e of t.getChildren())t.insertBefore(e);t.remove();continue}}let s=t.getPreviousSibling();a0(s)&&s.is(e)?s.append(t):(e=i0(n,{rel:a,target:r,title:i}),t.insertAfter(e),e.append(t))}})}var p0=/^\\+?[0-9\\s()-]{5,}$/;function m0(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes(`@`)?`mailto:${e}`:p0.test(e)?`tel:${e}`:`https://${e}`}var h0={build:(e,t)=>_V(t),config:{created:`Link`,createdMany:`%s links`,destroyed:`Link removed`,destroyedMany:`%s links removed`,disabled:!1},dependencies:[cY],name:`@lexical/link/AutoLinkAnnounce`,register(e,t,n){let{created:r,createdMany:i,destroyed:a,destroyedMany:o,disabled:s}=n.getOutput(),{announce:c}=n.getDependency(cY).output;return fV(()=>s.value?void 0:e.registerMutationListener(s0,e=>{let t=0,n=0;for(let[,r]of e)r===`created`?t++:r===`destroyed`&&n++;t>0&&n===0?c(t===1?r.peek():i.peek().replace(`%s`,String(t))):n>0&&t===0&&c(n===1?a.peek():o.peek().replace(`%s`,String(n)))},{skipInitialization:!0}))}},g0=[{$import:(e,t)=>{if(!t.textContent&&t.children.length===0)return[];let n=t.getAttribute(`href`)||``,r={rel:t.getAttribute(`rel`),target:t.getAttribute(`target`),title:t.getAttribute(`title`)};return Rq(e.$importChildren(t),()=>i0(n,r))},match:tJ.tag(`a`),name:`@lexical/link/a`}];function _0(e,t){return kz(e.registerNodeTransform($1,n0),e.registerCommand(u0,e=>{let n=t.validateUrl.peek(),r=t.attributes.peek();if(e===null)return f0(null),!0;if(typeof e==`string`)return!(n!==void 0&&!n(e))&&(f0(e,r),!0);{let{url:t,...i}=e;return!(n!==void 0&&!n(t))&&(f0(t,{...r,...i}),!0)}},lL),fV(()=>{let n=t.validateUrl.value;if(!n)return;let r=t.attributes.value;return e.registerCommand(vR,t=>{let i=W();if(!K(i)||i.isCollapsed()||!DW(t,ClipboardEvent)||t.clipboardData===null)return!1;let a=t.clipboardData.getData(`text`);return n(a)?!i.getNodes().some(e=>G(e)||q(e)&&!e.isSimpleText())&&(e.dispatchCommand(u0,{...r,url:a}),t.preventDefault(),!0):!1},uL)}))}var v0={build:(e,t,n)=>_V(t),config:{attributes:void 0,validateUrl:void 0},dependencies:[Gq,[Kq,{rules:g0}]],mergeConfig(e,t){let n=Uz(e,t);return e.attributes&&(n.attributes=Uz(e.attributes,n.attributes)),n},name:`@lexical/link/Link`,nodes:()=>[$1],register:(e,t,n)=>_0(e,n.getOutput())},y0={dependencies:[v0],name:`@lexical/link/Import`};function b0(e,t,n={}){let r=n=>{let r=n.button===1;if(n.type===`auxclick`&&!r)return;let i=n.target;if(!hz(i))return;let a=az(i);if(a===null)return;let o=null,s=null,c=!1;if(a.update(()=>{let e=QF(i);if(e!==null){let n=NF(e,G);if(!t.disabled.peek()){if(a0(n))c=l0(n)&&n.getIsUnlinked(),o=n.sanitizeUrl(n.getURL()),s=n.getTarget();else{let e=function(e,t){let n=e;for(;n!=null;){if(t(n))return n;n=n.parentNode}return null}(i,bz);e!==null&&(o=e.href,s=e.target)}}}}),o===null||o===``||c)return;let l=e.read(`latest`,W);(!K(l)||l.isCollapsed())&&window.open(o,t.newTab.peek()||r||n.metaKey||n.ctrlKey||s===`_blank`?`_blank`:`_self`),n.preventDefault()};return e.registerRootListener(e=>{if(e)return Iz(e,{auxclick:r,click:r},n)})}var x0={build:(e,t,n)=>_V(t),config:{disabled:!1,newTab:!1},dependencies:[v0],name:`@lexical/link/ClickableLink`,register:(e,t,n)=>b0(e,n.getOutput())};function S0(e,t=e=>e){return n=>{let r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}var C0=(()=>{try{return RegExp(`((https?:\\\\/\\\\/(www\\\\.)?)|(www\\\\.))[-\\\\p{L}\\\\p{N}@:%._+~#=]{1,256}\\\\.[\\\\p{L}\\\\p{N}]{1,6}(?:[-\\\\p{L}\\\\p{N}()@:%_+.~#?&//=]*[\\\\p{L}\\\\p{N}()@_~#?&//=])?`,`u`)}catch{return/((https?:\\/\\/(www\\.)?)|(www\\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9]{1,6}(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*[a-zA-Z0-9()@_~#?&//=])?/}})(),w0=e=>{let t=C0.exec(e);if(t===null)return null;let n=t[0],r=0;for(let e of n)e===`(`?r++:e===`)`&&r--;for(;r<0&&n.endsWith(`)`);)n=n.slice(0,-1),r++;return{index:t.index,length:n.length,text:n,url:n.startsWith(`http`)?n:`https://${n}`}},T0=S0(/(([^<>()[\\]\\\\.,;:\\s@\"]{1,64}(\\.[^<>()[\\]\\\\.,;:\\s@\"]{1,64}){0,63})|(\".{1,255}\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]{1,63}\\.){1,127}[a-zA-Z]{2,63}))/,e=>`mailto:${e}`);function E0(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}var D0=/[.,;\\s]/;function O0(e,t){return t.test(e)}function k0(e,t){return O0(e[e.length-1],t)}function A0(e,t){return O0(e[0],t)}function j0(e,t){let n=e.getPreviousSibling();return G(n)&&(n=n.getLastDescendant()),n===null||SI(n)||q(n)&&k0(n.getTextContent(),t)}function M0(e,t){let n=e.getNextSibling();return G(n)&&(n=n.getFirstDescendant()),n===null||SI(n)||q(n)&&A0(n.getTextContent(),t)}function N0(e,t,n,r,i){return(e>0?O0(r[e-1],n):j0(i[0],n))?t<r.length?O0(r[t],n):M0(i[i.length-1],n):!1}function P0(e,t,n){let r=[],i=[],a=[],o=0,s=0,c=[...e];for(;c.length>0;){let e=c[0],l=e.getTextContent().length,u=s;s+l<=t?(r.push(e),o+=l):u>=n?a.push(e):i.push(e),s+=l,c.shift()}return[o,r,i,a]}function F0(e,t,n,r){let i=c0(r.url,r.attributes);if(e.length===1){let a,o=e[0];t===0?[a,o]=o.splitText(n):[,a,o]=o.splitText(t,n);let s=AF(r.text);return s.setFormat(a.getFormat()),s.setDetail(a.getDetail()),s.setStyle(a.getStyle()),i.append(s),a.replace(i),o}if(e.length>1){let r=e[0],a,o=r.getTextContent().length;t===0?a=r:[,a]=r.splitText(t);let s=[],c;for(let t=1;t<e.length;t++){let r=e[t],i=r.getTextContent().length,a=o;if(a<n){if(o+i<=n)s.push(r);else{let[e,t]=r.splitText(n-a);s.push(e),c=t}}o+=i}let l=W(),u=l?l.getNodes().find(q):void 0,d=AF(a.getTextContent());return d.setFormat(a.getFormat()),d.setDetail(a.getDetail()),d.setStyle(a.getStyle()),i.append(d,...s),u&&u===a&&(K(l)?d.select(l.anchor.offset,l.focus.offset):CI(l)&&d.select(0,d.getTextContent().length)),a.replace(i),c}}function I0(e,t,n,r){let i=e.getChildren(),a=i.length;for(let t=0;t<a;t++){let r=i[t];if(!q(r)||!r.isSimpleText())return L0(e),void n(null,e.getURL())}let o=e.getTextContent(),s=E0(o,t);if(s===null||s.text!==o||!j0(e,r)||!M0(e,r))return L0(e),void n(null,e.getURL());let c=e.getURL();c!==s.url&&(e.setURL(s.url),n(s.url,c)),s.attributes&&(e.getRel()!==s.attributes.rel&&e.setRel(s.attributes.rel||null),e.getTarget()!==s.attributes.target&&e.setTarget(s.attributes.target||null),e.getTitle()!==s.attributes.title&&e.setTitle(s.attributes.title||null))}function L0(e){let t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}var R0={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:D0};function z0(e,t=R0){let{matchers:n,changeHandlers:r,excludeParents:i,separatorRegex:a=D0}=t,o=(e,t)=>{for(let n of r)n(e,t)};return kz(e.registerNodeTransform(NR,e=>{let t=e.getParentOrThrow(),r=e.getPreviousSibling();l0(t)?I0(t,n,o,a):!a0(t)&&!i.some(e=>e(t))&&(e.isSimpleText()&&(A0(e.getTextContent(),a)||!l0(r))&&(function(e,t,n,r){for(let t of e){let e=t.getParent();if(l0(e)&&!e.getIsUnlinked())return}let i=[...e],a=i.map(e=>e.getTextContent()).join(``),o,s=a,c=0;for(;(o=E0(s,t))&&o!==null;){let e=o.index,t=e+o.length;if(N0(c+e,c+t,r,a,i)){let[r,,a,l]=P0(i,c+e,c+t),u=!1;for(let e of a){let t=e.getParent();if(l0(t)&&!t.getIsUnlinked()){u=!0;break}}if(u){c+=t,s=s.substring(t);continue}let d=F0(a,c+e-r,c+t-r,o);i=d?[d,...l]:l,n(o.url,null),c=0}else c+=t;s=s.substring(t)}})(function(e){let t=[e],n=e.getNextSibling();for(;n!==null&&q(n)&&n.isSimpleText()&&(t.push(n),!/[\\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e),n,o,a),(function(e,t,n,r){let i=e.getParent(),a=e.getPreviousSibling(),o=e.getNextSibling(),s=e.getTextContent();if(!l0(i)||i.getIsUnlinked()){if(l0(a)&&!a.getIsUnlinked()&&a.is(e.getPreviousSibling())&&e.getParent()===a.getParent()){if(!A0(s,r))return L0(a),void n(null,a.getURL());if(c=s,a.isEmailURI()?/^\\.[a-zA-Z]{2,}/.test(c):/^\\.[a-zA-Z0-9]{1,}/.test(c)){let i=a.getTextContent()+s,o=E0(i,t);o!==null&&o.text===i&&(a.append(e),I0(a,t,n,r),n(null,a.getURL()))}}var c;!l0(o)||o.getIsUnlinked()||k0(s,r)||o.is(e.getNextSibling())&&e.getParent()===o.getParent()&&(L0(o),n(null,o.getURL()))}})(e,n,o,a))}),e.registerCommand(u0,e=>{let t=W();return e!==null||!K(t)||t.extract().forEach(e=>{let t=e.getParent();l0(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1},uL))}var B0={config:R0,dependencies:[h0,v0],mergeConfig(e,t){let n=Uz(e,t);for(let r of[`matchers`,`changeHandlers`,`excludeParents`]){let i=t[r];Array.isArray(i)&&(n[r]=[...e[r],...i])}return n},name:`@lexical/link/AutoLink`,nodes:[s0],register:z0},V0=U1;V0.$createAutoLinkNode;var H0=V0.$createLinkNode,U0=V0.$isAutoLinkNode,W0=V0.$isLinkNode;V0.$toggleLink,V0.AutoLinkAnnounceExtension,V0.AutoLinkExtension;var G0=V0.AutoLinkNode;V0.ClickableLinkExtension,V0.LinkExtension,V0.LinkImportExtension,V0.LinkImportRules;var K0=V0.LinkNode,q0=V0.TOGGLE_LINK_COMMAND;V0.autoLinkEmailMatcher,V0.autoLinkUrlMatcher,V0.createLinkMatcherWithRegExp,V0.formatUrl,V0.registerAutoLink,V0.registerClickableLink;var J0=V0.registerLink,Y0=kr(3),X0=Symbol(Y0),Z0=Symbol(Y0+1),Q0=Symbol(Y0+2);function $0(e){let[t]=Nl(X0,$x),n=e.validateUrl,r=e.attributes;return ru(()=>{if(!t.hasNodes([K0]))throw Error(`LinkPlugin: LinkNode not registered on editor`)},null,Z0),ru(()=>J0(t,t$({attributes:r,validateUrl:n})),[t,n,r],Q0),null}var e2=kr(3);e2+1,e2+2,kr(2)+1,kr(2)+1;var t2=t({$createCodeHighlightNode:()=>R2,$createCodeNode:()=>E2,$getCodeLineDirection:()=>s2,$getEndOfCodeInLine:()=>l2,$getFirstCodeNodeOfLine:()=>a2,$getLastCodeNodeOfLine:()=>o2,$getStartOfCodeInLine:()=>c2,$isCodeHighlightNode:()=>z2,$isCodeNode:()=>D2,$outdentLeadingSpaces:()=>d2,$plainifyCodeContent:()=>u2,CodeExtension:()=>$2,CodeHighlightNode:()=>I2,CodeImportExtension:()=>e4,CodeImportRules:()=>Q2,CodeIndentExtension:()=>s4,CodeNode:()=>T2,DEFAULT_CODE_LANGUAGE:()=>v2,getDefaultCodeLanguage:()=>y2,registerCodeIndentation:()=>o4});function n2(e){return()=>{}}function r2(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function i2(e,t){let n=e;for(let r=iI(e,t);r&&(z2(r.origin)||jI(r.origin));r=r.getAdjacentCaret())n=r.origin;return n}function a2(e){return i2(e,`previous`)}function o2(e){return i2(e,`next`)}function s2(e){let t=a2(e),n=o2(e),r=t;for(;r!==null;){if(z2(r)){let e=dz(r.getTextContent());if(e!==null)return e}if(r===n)break;r=r.getNextSibling()}let i=t.getParent();if(G(i)){let e=i.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function c2(e,t){let n=null,r=null,i=e,a=t,o=e.getTextContent();for(;;){if(a===0){let e=i.getPreviousSibling();if(e===null){i=null;break}if(z2(e)||jI(e)||SI(e)||r2(167),i=e,SI(i)){n={node:i,offset:1};break}a=Math.max(0,i.getTextContentSize()-1),o=i.getTextContent()}else a--;let e=o[a];z2(i)&&e!==` `&&(r={node:i,offset:a})}if(r!==null)return r;let s=null;if(t<e.getTextContentSize())z2(e)&&(s=e.getTextContent()[t]);else{let t=e.getNextSibling();z2(t)&&(s=t.getTextContent()[0])}if(s!==null&&s!==` `)return n;{let r=function(e,t){let n=e,r=t,i=e.getTextContent(),a=e.getTextContentSize();for(;;){if(!z2(n)||r===a){if(n=n.getNextSibling(),n===null||SI(n))return null;z2(n)&&(r=0,i=n.getTextContent(),a=n.getTextContentSize())}if(z2(n)){if(i[r]!==` `)return{node:n,offset:r};r++}}}(e,t);return r===null?n:r}}function l2(e){let t=o2(e);return SI(t)&&r2(168),t}function u2(e){let t=[];return qz(e,{linebreak:()=>t.push(wF()),tab:()=>t.push(kF()),text:e=>t.push(R2(e))}),t}function d2(e,t,n){if(!Number.isInteger(t)||t<=0)return!1;let r=e.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;let a=Math.min(t,i[0].length),o=e.getKey(),s=n.anchor.key===o&&n.anchor.type===`text`?n.anchor.offset:null,c=n.focus.key===o&&n.focus.type===`text`?n.focus.offset:null;return e.spliceText(0,a,``),s!==null&&n.anchor.set(o,Math.max(0,s-a),`text`),c!==null&&n.focus.set(o,Math.max(0,c-a),`text`),!0}var f2=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function p2(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!f2.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}var m2=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],language:e.__language,theme:e.__theme,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__language;o!==void 0&&(a.language=o);let s=e.__theme;s!==void 0&&(a.theme=s);let c=e.__dir;c!=null&&(a.direction=c);let l=t[e.__format];l!==void 0&&l!==``&&(a.format=l);let u=e.__indent;return u!==void 0&&u!==0&&(a.indent=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=function(e,t,n,r){let i=p2(e,t);return i>=n&&i<=r&&Number.isInteger(i)?i:t}(t.indent,0,0,1/0),e.__textFormat=p2(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.language;e.setLanguage(s==null||typeof s==`string`?s:``);let c=t.theme;return e.setTheme(c===void 0?void 0:typeof c==`string`?c:``),e}}};function h2(e,t){e.__highlightType=t.__highlightType}var g2=e=>{let t=fz(e,`mode`),n=IR(e,`detail`,0),r=IR(e,`format`,0),i=Hz(e,`mode`),a=Vz(e,`mode`);return{exportJSON:function(e){return{highlightType:e.__highlightType,detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__highlightType;r!==void 0&&(n.highlightType=r);let i=e.__detail;i!==void 0&&i!==0&&(n.detail=i);let a=e.__format;a!==void 0&&a!==0&&(n.format=a);let o=t[e.__mode];o!==void 0&&o!==`normal`&&(n.mode=o);let s=e.__style;s!==void 0&&s!==``&&(n.style=s);let c=e.__text;return c!==void 0&&c!==``&&(n.text=c),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:p2(o,0);let s=t.format;e.setFormat(typeof s==`string`&&s in r?r[s]:p2(s,0));let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;e.__text=typeof u==`string`?u:``;let d=t.highlightType;return e.setHighlightType(d==null||typeof d==`string`?d:``),e},afterCloneFrom:h2}},_2=Az()({language:Jz(Pz(Mz(Gz())),{getter:{field:`__language`}}),theme:Jz(Pz(Gz()),{getter:{field:`__theme`}})}),v2=`javascript`,y2=()=>v2;function b2(e,t){for(let n of e.childNodes)if(J(n)&&n.tagName===t||b2(n,t))return!0;return!1}var x2=`data-language`,S2=`data-highlight-language`,C2=`data-theme`,w2=n2(),T2=class extends kL{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config(`code`,{extends:kL,generated:m2,importDOM:{code:e=>e.textContent!=null&&(/\\r?\\n/.test(e.textContent)||b2(e,`BR`))?{conversion:O2,priority:1}:null,div:()=>({conversion:k2,priority:1}),pre:()=>({conversion:O2,priority:0}),table:e=>N2(e)?{conversion:A2,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&N2(n)?{conversion:j2,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&N2(t)?{conversion:j2,priority:3}:null}},json:_2})}constructor(e=void 0,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),function(e,t){e.__language=t.__language,e.__theme=t.__theme}(this,e),this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=YF().createElement(`code`);FR(t,e.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(x2,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(S2,n));let r=this.getTheme();r&&t.setAttribute(C2,r);let i=this.getStyle();return i&&zz(t.style,i),t}updateDOM(e,t,n){let r=this.__language,i=e.__language;r?r!==i&&t.setAttribute(x2,r):i&&t.removeAttribute(x2);let a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?a&&r?r!==i&&t.setAttribute(S2,r):t.removeAttribute(S2):a&&r&&t.setAttribute(S2,r);let o=this.__theme,s=e.__theme;o?o!==s&&t.setAttribute(C2,o):s&&t.removeAttribute(C2);let c=this.__style,l=e.__style;return c!==l&&zz(t.style,c,l),!1}exportDOM(e){let t=YF().createElement(`pre`);FR(t,e._config.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(x2,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(S2,n));let r=this.getTheme();r&&t.setAttribute(C2,r);let i=this.getStyle();return i&&zz(t.style,i),{element:t}}insertNewAfter(e,t=!0){if(!wH(XF(),`@lexical/code`)){w2();let t=P2(e);if(t)return t}let{anchor:n,focus:r}=e,i=(n.isBefore(r)?n:r).getNode();if(q(i)){let e=a2(i),t=[];for(;;)if(jI(e))t.push(kF()),e=e.getNextSibling();else{if(!z2(e))break;{let n=0,r=e.getTextContent(),i=e.getTextContentSize();for(;n<i&&r[n]===` `;)n++;if(n!==0&&t.push(R2(` `.repeat(n))),n!==i)break;e=e.getNextSibling()}}let r=i.splitText(n.offset)[0],a=n.offset===0?0:1,o=r.getIndexWithinParent()+a,s=i.getParentOrThrow(),c=[wF(),...t];s.splice(o,0,c);let l=t[t.length-1];l?l.select():n.offset===0?r.selectPrevious():r.getNextSibling().selectNext(0,0)}if(D2(i)){let{offset:t}=e.anchor;i.splice(t,0,[wF()]),i.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){let e=EF();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function E2(e,t){return CF(T2).setLanguage(e).setTheme(t)}function D2(e){return e instanceof T2}function O2(e){return{node:E2(e.getAttribute(x2),e.getAttribute(C2))}}function k2(e){let t=e,n=M2(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(M2(t))return!0;t=t.parentElement}return!1}(t)?{node:n?E2():null}:{node:null}}function A2(){return{node:E2()}}function j2(){return{node:null}}function M2(e){return e.style.fontFamily.match(`monospace`)!==null}function N2(e){return e.classList.contains(`js-file-line-container`)}function P2(e){let{anchor:t}=e;if(e.isCollapsed()&&t.type===`element`){let e=t.getNode();if(D2(e)){let n=e.getChildrenSize();if(n>=2&&t.offset===n){let t=e.getLastChild();if(SI(t)&&SI(t.getPreviousSibling())){let t=EF();return e.splice(n-2,2,[]).insertAfter(t,!1),t.select(),t}}}}return null}var F2=Az()({highlightType:Jz(Pz(Mz(Gz())),{getter:{field:`__highlightType`}})}),I2=class extends NR{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}$config(){return this.config(`code-highlight`,{extends:NR,generated:g2,json:F2})}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e);return FR(t,L2(e.theme,this.__highlightType)),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n),i=L2(n.theme,e.__highlightType),a=L2(n.theme,this.__highlightType);return i!==a&&(i&&Lz(t,i),a&&FR(t,a)),r}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return E2()}};function L2(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function R2(e=``,t){return hF(new I2(e,t))}function z2(e){return e instanceof I2}var B2=`data-language`,V2=`data-theme`;function H2(e){return e.style.fontFamily.match(`monospace`)!==null}function U2(e){let t=e.parentElement;for(;t!==null;){if(H2(t))return!0;t=t.parentElement}return!1}var W2=$q([{$import:(e,t)=>e.$importChildren(t),match:tJ.tag(`tr`,`td`),name:`@lexical/code/github-code-table/unwrap`}]),G2={$import:(e,t)=>[E2(t.getAttribute(B2),t.getAttribute(V2)).splice(0,0,e.$importChildren(t))],match:tJ.tag(`pre`),name:`@lexical/code/pre`},K2={$import:(e,t,n)=>{let r=t.textContent||``;return/\\r?\\n/.test(r)||t.querySelector(`br`)!==null?[E2(t.getAttribute(B2),t.getAttribute(V2)).splice(0,0,e.$importChildren(t))]:n()},match:tJ.tag(`code`),name:`@lexical/code/code-multiline`};function q2(e){if(!J(e))return!1;let t=e.style.fontFamily,n=e.style.whiteSpace;return typeof t==`string`&&/monospace/i.test(t)&&typeof n==`string`&&n.startsWith(`pre`)}function J2(e){let t=!1,n=[],r=``,i=!1,a=()=>{i&&=(n.push(r),r=``,!1)};for(let o of Array.from(e.childNodes))if(J(o))o.tagName===`DIV`?(a(),n.push(o.textContent||``),t=!0):o.tagName===`BR`?(a(),n.push(``),t=!0):(r+=o.textContent||``,i=!0);else if(_z(o)){let e=o.textContent||``;e.length>0&&(r+=e,i=!0)}return a(),t?n:null}function Y2(e){for(let t of Array.from(e.children)){if(J(t)&&q2(t)){if(J2(t)!==null)return!0;let e=t.nextElementSibling;if(e&&q2(e))return!0;continue}if(Y2(t))return!0}return!1}var X2=$q([{$import:(e,t,n)=>{if(!q2(t)||U2(t))return n();let r=J2(t);return r===null||r.length===0?n():[E2().splice(0,0,LF(r.join(`\n`)))]},match:tJ.tag(`div`),name:`@lexical/code/vscode-wrapper`},{$import:(e,t,n)=>{if(!q2(t)||U2(t))return n();let r=t.previousElementSibling;if(r&&q2(r))return[];let i=[],a=t;for(;a&&q2(a);)i.push(a.tagName===`BR`?``:a.textContent||``),a=a.nextElementSibling;return i.length<2?n():[E2().splice(0,0,LF(i.join(`\n`)))]},match:tJ.tag(`div`,`br`),name:`@lexical/code/vscode-line-run`}]),Z2={$import:(e,t,n)=>H2(t)?[E2().splice(0,0,e.$importChildren(t))]:U2(t)?e.$importChildren(t):n(),match:tJ.tag(`div`),name:`@lexical/code/div`},Q2=[{$import:(e,t)=>[E2().splice(0,0,e.$importChildren(t,{rules:W2}))],match:tJ.tag(`table`).classAll(`js-file-line-container`),name:`@lexical/code/github-code-table`},{$import:(e,t)=>e.$importChildren(t),match:tJ.tag(`td`).classAll(`js-file-line`),name:`@lexical/code/github-code-cell-by-class`},K2,G2,Z2],$2={dependencies:[Gq,[Kq,{preprocess:[(e,t,n)=>{Y2(mz(e)?e.body:e)&&t.session.update(qq,e=>[...e,X2]),n()}],rules:Q2}]],name:`@lexical/code`,nodes:()=>[T2,I2],register:e=>kz(e.registerCommand(uR,e=>{let t=W();return!(!K(t)||!P2(t))&&(e!==null&&e.preventDefault(),!0)},uL),e.registerNodeTransform(MR,e=>{e.getFormat()!==0&&D2(e.getParent())&&e.setFormat(0)}))},e4={dependencies:[$2],name:`@lexical/code/Import`};function t4(e){if(!K(e))return!1;let t=e.anchor.getNode(),n=D2(t)?t:t.getParent(),r=e.focus.getNode(),i=D2(r)?r:r.getParent();return D2(n)&&n.is(i)}function n4(e){let t=e.getNodes(),n=[];if(t.length===1&&D2(t[0]))return n;let r=[];for(let e=0;e<t.length;e++){let i=t[e];z2(i)||jI(i)||SI(i)||r2(169),SI(i)?r.length>0&&(n.push(r),r=[]):r.push(i)}if(r.length>0){let t=e.isBackward()?e.anchor:e.focus,i=DF(r[0].getKey(),0,`text`);t.is(i)||n.push(r)}return n}function r4(e,t){let n=W();if(!K(n)||!t4(n))return!1;let r=n4(n),i=r.length;if(i===0&&n.isCollapsed())return e===FL?n.insertNodes([kF()]):function(e,t){let n=e.anchor.getNode();if(!z2(n)&&!jI(n))return;let r=a2(n);jI(r)?r.remove():t!==void 0&&z2(r)&&d2(r,t,e)}(n,t),!0;if(i===0&&e===FL&&n.getTextContent()===`\n`){let e=kF(),t=wF(),r=n.isBackward()?`previous`:`next`;return n.insertNodes([e,t]),GI(VF(BF(uI(e,`next`,0),FI(iI(t,`next`))),r)),!0}for(let a=0;a<i;a++){let i=r[a];if(i.length>0){let r=i[0];if(a===0&&(r=a2(r)),e===FL){let e=kF();if(r.insertBefore(e),a===0){let t=n.isBackward()?`focus`:`anchor`,i=DF(r.getKey(),0,`text`);n[t].is(i)&&n[t].set(e.getKey(),0,`text`)}}else jI(r)?r.remove():t!==void 0&&z2(r)&&d2(r,t,n)}}return!0}function i4(e,t){let n=W();if(!K(n))return!1;let{anchor:r,focus:i}=n,a=r.offset,o=i.offset,s=r.getNode(),c=i.getNode(),l=e===oR;if(!t4(n)||!z2(s)&&!jI(s)||!z2(c)&&!jI(c))return!1;if(!t.altKey){if(n.isCollapsed()){let e=s.getParentOrThrow();if(l&&a===0&&s.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),t.preventDefault(),!1}else if(!l&&a===s.getTextContentSize()&&s.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),t.preventDefault(),!1}return!1}let u,d;if(s.isBefore(c)?(u=a2(s),d=o2(c)):(u=a2(c),d=o2(s)),u==null||d==null)return!1;let f=u.getNodesBetween(d);for(let e=0;e<f.length;e++){let t=f[e];if(!z2(t)&&!jI(t)&&!SI(t))return!1}t.preventDefault(),t.stopPropagation();let p=l?u.getPreviousSibling():d.getNextSibling();if(!SI(p))return!0;let m=l?p.getPreviousSibling():p.getNextSibling();if(m==null)return!0;let h=SI(m),g=(h||!z2(m)&&!jI(m)?null:l?a2(m):o2(m))??m;return p.remove(),f.forEach(e=>e.remove()),h?(f.forEach(e=>{g.insertAfter(e),g=e}),g.insertAfter(p)):e===oR?(f.forEach(e=>g.insertBefore(e)),g.insertBefore(p)):(g.insertAfter(p),g=p,f.forEach(e=>{g.insertAfter(e),g=e})),n.setTextNodeRange(s,a,c,o),!0}function a4(e,t){let n=W();if(!K(n))return!1;let{anchor:r,focus:i}=n,a=r.getNode(),o=i.getNode(),s=e===gR;if(!t4(n)||!z2(a)&&!jI(a)||!z2(o)&&!jI(o))return!1;let c=o,l=s2(c)===`rtl`?!s:s,u=r.key,d=r.offset,f=r.type;if(l){let e=c2(c,i.offset);if(e!==null){let{node:t,offset:r}=e;SI(t)?t.selectNext(0,0):n.setTextNodeRange(t,r,t,r)}else c.getParentOrThrow().selectStart()}else l2(c).select();return t.shiftKey&&n.anchor.set(u,d,f),t.preventDefault(),t.stopPropagation(),!0}function o4(e,t,n){return kz(...n?[e.registerCommand(rR,e=>!e.altKey&&CW(D2,e),uL),e.registerCommand(aR,e=>CW(D2,e),uL),e.registerCommand(oR,e=>!e.altKey&&wW(D2,e),uL),e.registerCommand(iR,e=>wW(D2,e),uL)]:[],e.registerCommand(pR,t=>{let n=function(e){let t=W();if(!K(t)||!t4(t))return null;let n=e?_R:FL,r=e?_R:RL,i=t.anchor,a=t.focus;if(i.is(a))return r;let o=n4(t);if(o.length!==1)return n;let s=o[0],c,l;s.length===0&&r2(285),t.isBackward()?(c=a,l=i):(c=i,l=a);let u=a2(s[0]),d=o2(s[0]),f=DF(u.getKey(),0,`text`),p=DF(d.getKey(),d.getTextContentSize(),`text`);return c.isBefore(f)||p.isBefore(l)?n:f.isBefore(c)||l.isBefore(p)?r:n}(t.shiftKey);return n!==null&&(t.preventDefault(),e.dispatchCommand(n),!0)},uL),e.registerCommand(RL,()=>!!t4(W())&&(pI([kF()]),!0),uL),e.registerCommand(FL,()=>r4(FL),uL),e.registerCommand(_R,()=>r4(_R,t),uL),e.registerCommand(oR,e=>{let t=W();if(!K(t))return!1;let{anchor:n}=t,r=n.getNode();if(!t4(t))return!1;let i=r.getParent();return t.isCollapsed()&&n.offset===0&&r.getPreviousSibling()===null&&D2(i)&&i.getPreviousSibling()===null?(e.preventDefault(),!0):i4(oR,e)},uL),e.registerCommand(rR,e=>{let t=W();if(!K(t))return!1;let{anchor:n}=t,r=n.getNode();return!!t4(t)&&(t.isCollapsed()&&n.offset===r.getTextContentSize()&&r.getNextSibling()===null&&D2(r.getParentOrThrow())&&r.getParentOrThrow().getNextSibling()===null?(e.preventDefault(),!0):i4(rR,e))},uL),e.registerCommand(gR,e=>a4(gR,e),uL),e.registerCommand(hR,e=>a4(hR,e),uL))}var s4={build:(e,t)=>_V(t),config:{disabled:!1,escapeWithArrows:!1,tabSize:void 0},dependencies:[$2],name:`@lexical/code-indent`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return o4(e,r.tabSize.value,r.escapeWithArrows.value)})}},c4=t2,l4=c4.$createCodeHighlightNode,u4=c4.$createCodeNode,d4=c4.$getCodeLineDirection,f4=c4.$getEndOfCodeInLine,p4=c4.$getFirstCodeNodeOfLine,m4=c4.$getLastCodeNodeOfLine,h4=c4.$getStartOfCodeInLine,g4=c4.$isCodeHighlightNode,_4=c4.$isCodeNode,v4=c4.$outdentLeadingSpaces;c4.$plainifyCodeContent;var y4=c4.CodeExtension,b4=c4.CodeHighlightNode;c4.CodeImportExtension,c4.CodeImportRules;var x4=c4.CodeIndentExtension,S4=c4.CodeNode,C4=c4.DEFAULT_CODE_LANGUAGE,w4=c4.getDefaultCodeLanguage;c4.registerCodeIndentation;var T4=t({$convertFromMarkdownString:()=>s6,$convertSelectionToMarkdownString:()=>u6,$convertToMarkdownString:()=>l6,$generateNodesFromMarkdownString:()=>c6,BOLD_ITALIC_STAR:()=>y3,BOLD_ITALIC_UNDERSCORE:()=>b3,BOLD_STAR:()=>x3,BOLD_UNDERSCORE:()=>S3,CHECK_LIST:()=>h3,CODE:()=>p3,ELEMENT_TRANSFORMERS:()=>O3,HEADING:()=>d3,HIGHLIGHT:()=>v3,INLINE_CODE:()=>_3,ITALIC_STAR:()=>w3,ITALIC_UNDERSCORE:()=>T3,LINK:()=>D3,MULTILINE_ELEMENT_TRANSFORMERS:()=>k3,ORDERED_LIST:()=>g3,QUOTE:()=>f3,STRIKETHROUGH:()=>C3,TEXT_FORMAT_TRANSFORMERS:()=>A3,TEXT_MATCH_TRANSFORMERS:()=>j3,TRANSFORMERS:()=>N3,UNORDERED_LIST:()=>m3,isTableRowDivider:()=>U4,registerMarkdownShortcuts:()=>o6});function E4(e,t){let n={};for(let r of e){let e=t(r);e&&(n[e]?n[e].push(r):n[e]=[r])}return n}function D4(e){let t=E4(e,e=>e.type);return{element:t.element||[],multilineElement:t[`multiline-element`]||[],textFormat:t[`text-format`]||[],textMatch:t[`text-match`]||[]}}var O4=/[!-/:-@[-`{-~\\s]/,k4=/\\s/,A4=/[!\"#$%&'()*+,\\-./:;<=>?@[\\]^_`{|}~]/,j4=/^\\s{0,3}$/;function M4(e){if(!wI(e))return!1;let t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&q(t)&&j4.test(t.getTextContent())}function N4(e){return e.replace(/\\\\([!-/:-@[-`{-~])/g,`$1`).replace(/&#(\\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}var P4=/^(\\s*)(\\d{1,})\\.\\s/,F4=/^(\\s*)[-*+]\\s/,I4=/^(\\s*)(?:[-*+]\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,L4=/^(#{1,6})\\s/,R4=/^>\\s/,z4=/^([ \\t]*`{3,})([\\w-]+)?[ \\t]?/,B4=/^[ \\t]*`{3,}$/,V4=/^[ \\t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,H4=/^(?:\\|)(.+)(?:\\|)\\s?$/;function U4(e){if(e[0]!==`|`)return!1;let{length:t}=e,n=1,r=0;for(;n<t;){let t=n;for(e[t]===` `&&t++,e[t]===`:`&&t++;e[t]===`-`;)t++;if(e[t]===`:`&&t++,e[t]===` `&&t++,e[t]!==`|`)break;r++,n=t+1}return r>0&&(n===t||n===t-1&&/\\s/.test(e[n]))}var W4=/^<[a-z_][\\w-]*(?:\\s[^<>]*)?\\/?>/i,G4=/^<\\/[a-z_][\\w-]*\\s*>/i,K4=e=>RegExp(`(?:${e.source})$`,e.flags),q4=GR(`mdListMarker`,{parse:e=>typeof e==`string`&&/^[-*+]$/.test(e)?e:`-`,resetOnCopyNode:!0}),J4=GR(`mdCodeFence`,{parse:e=>typeof e==`string`&&/^`{3,}$/.test(e)?e:\"```\",resetOnCopyNode:!0}),Y4=GR(`mdCodeMeta`,{parse:e=>typeof e==`string`?e:``,resetOnCopyNode:!0}),X4=GR(`mdHardLineBreak`,{parse:e=>typeof e==`string`&&/^(\\\\| {2,})$/.test(e)?e:``,resetOnCopyNode:!0});function Z4(e){if(e.endsWith(`\\\\`)){let t=0;for(let n=e.length-1;n>=0&&e[n]===`\\\\`;n--)t++;return t%2==1?[e.slice(0,-1),`\\\\`]:null}let t=e.match(/^(.*?\\S)( {2,})$/);return t?[t[1],t[2]]:null}function Q4(e){let t=e.getChildren(),n=t.length-1,r=t[n];if(!q(r))return null;let i=r.getTextContent(),a=Z4(i);if(a!==null){let[e,t]=a;return r.setTextContent(e),t}return/^ {2,}$/.test(i)&&function(e,t){for(let n=t-1;n>=0;n--){if(SI(e[n]))return!1;if(/\\S/.test(e[n].getTextContent()))return!0}return!1}(t,n)?(r.setTextContent(``),i):null}function $4(e){let t=wF(),n=Q4(e);return n!==null&&KI(t,X4,n),t}function e3(e){return fX(e)}function t3(e,t){let n=0;for(;n<t&&(e[n]===` `||e[n]===`\t`);)n++;return e.slice(n)}function n3(e,t){let n=e.getLastChild();t&&_4(n)&&KI(n,Y4,t)}var r3=e=>(t,n,r,i)=>{let a=e(r);a.append(...n),t.replace(a),i||a.select(0,0)};function i3(e){let t=0;for(let n of e)t+=n===`\t`?4-t%4:1;return t}var a3=null,o3=!1;function s3(e,t,n,r){for(let n=e.length;n<t;n++)e[n]=4*(n+1);e.length=t,e[t]=function(e,t){let n=e[0];if(t===`check`){let t=n.slice(e[1].length).match(/^[-*+]\\s/);t&&(n=e[1]+t[0])}return Math.min(i3(n),i3(e[1])+4)}(n,r)}var c3=e=>(t,n,r,i)=>{if(dX(t)||!i&&e3(t))return!1;let a=t.getPreviousSibling(),o=t.getNextSibling(),s=E1(e===`check`?/^x$/i.test(r[3]||``):void 0),c=r[0].trim()[0],l=e!==`bullet`&&e!==`check`||c!==q4.parse(c)?void 0:c,u=a3,d=a;if(u!==null){if(o3)for(;d!==null&&M4(d);)d=d.getPreviousSibling();k1(d)||(u.length=0)}let f=u===null||u.length===0?function(e){let t=e.match(/\\t/g),n=e.match(/ /g),r=0;return t&&(r+=t.length),n&&(r+=Math.floor(n.length/4)),r}(r[1]):function(e,t){let n=i3(t);for(let t=e.length-1;t>=0;t--)if(n>=e[t])return t+1;return 0}(u,r[1]);if(k1(o)&&o.getListType()===e){let n=o.getFirstChild();n===null?o.append(s):n.insertBefore(s),e===`number`&&f===0&&o.setStart(Number(r[2])),t.remove()}else if(k1(d)&&(d.getListType()===e||f>0))d.append(s),t.remove();else{let n=D1(e,e===`number`?Number(r[2]):void 0);n.append(s),t.replace(n)}s.append(...n),i||s.select(0,0),f&&(s.setIndent(f),function(e,t,n){let r=e.getParent();if(!k1(r)||r.getListType()===t)return;let i=r.getParent();if(!O1(i))return;let a=D1(t,t===`number`?Number(n[2]):void 0),o=e.getPreviousSibling()===null;a.append(e);let s=E1();s.append(a),o?i.insertBefore(s):i.insertAfter(s),r.getChildrenSize()===0&&i.remove()}(s,e,r));let p=s.getParent();l&&k1(p)&&KI(p,q4,l),u!==null&&s3(u,f,r,e)},l3=(e,t,n,r)=>{let i=[],a=e.getChildren(),o=0;for(let s of a)if(O1(s)){if(s.getChildrenSize()===1){let e=s.getFirstChild();if(k1(e)){let a=l3(e,t,n+1,r);a&&i.push(a);continue}}if(r&&!s.getChildren().some(e=>e.isSelected(r)))continue;let a=` `.repeat(4*n),c=e.getListType(),l=lI(e,q4),u=c===`number`?`${e.getStart()+o}. `:c===`check`?`${l} [${s.getChecked()?`x`:` `}] `:l+` `,d=t(s);c!==`number`&&(d=d.replace(/^(\\s{0,3}\\d+)(\\.\\s)/,`$1\\\\$2`)),i.push(a+u+d),o++}return i.join(`\n`)},u3=r3(e=>lX(`h`+e[1].length)),d3={dependencies:[pX],export:(e,t)=>{if(!dX(e))return null;let n=Number(e.getTag().slice(1));return`#`.repeat(n)+` `+t(e)},regExp:L4,replace:(e,t,n,r)=>!(!r&&e3(e))&&u3(e,t,n,r),triggerOnEnter:!0,type:`element`},f3={dependencies:[mX],export:(e,t)=>{if(!fX(e))return null;let n=t(e).split(`\n`),r=[];for(let e of n)r.push(`> `+e);return r.join(`\n`)},regExp:R4,replace:(e,t,n,r)=>{if(r){let n=e.getPreviousSibling();if(fX(n))return n.splice(n.getChildrenSize(),0,[$4(n),...t]),void e.remove()}let i=uX();i.append(...t),e.replace(i),r||i.select(0,0)},triggerOnEnter:!0,type:`element`},p3={dependencies:[S4],export:e=>{if(!_4(e))return null;let t=e.getTextContent(),n=lI(e,J4);if(t.indexOf(n)>-1){let e=t.match(/`{3,}/g);if(e){let t=Math.max(...e.map(e=>e.length));n=\"`\".repeat(t+1)}}let r=e.getLanguage()||``,i=r?lI(e,Y4):``;return n+r+(i?` `+i:``)+(t?`\n`+t:``)+`\n`+n},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{let i=r[1],a=i.trim().length,o=e[n],s=r.index+i.length,c=o.slice(s),l=RegExp(`\\`{${a},}$`);if(l.test(c)){let e=c.match(l),i=c.slice(0,c.lastIndexOf(e[0])),a=[...r];return a[2]=``,p3.replace(t,null,a,e,[i],!0),[!0,n]}let u=RegExp(`^[ \\\\t]*\\`{${a},}$`);for(let i=n+1;i<e.length;i++){let a=e[i];if(u.test(a)){let s=a.match(u),c=e.slice(n+1,i),l=r[2]?o.slice(r[0].length).trim():``;return c.unshift(l?``:o.slice(r[0].length)),p3.replace(t,null,r,s,c,!0),n3(t,l),[!0,i]}}let d=e.slice(n+1);return d.unshift(o.slice(r[0].length)),p3.replace(t,null,r,null,d,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:B4},regExpStart:z4,replace:(e,t,n,r,i,a)=>{let o,s,c=n[1]?n[1].trim():\"```\",l=n[2]||void 0,u=n[1]?n[1].length-n[1].trimStart().length:0;if(!t&&i){if(i.length===1)r?(o=u4(l),s=t3(i[0],u)):(o=u4(l),s=i[0].startsWith(` `)?i[0].slice(1):i[0]);else{for(o=u4(l),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(` `)&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.map(e=>t3(e,u)).join(`\n`)}KI(o,J4,c);let t=AF(s);o.append(t),e.append(o)}else if(t){if(!a&&e3(e))return!1;r3(e=>u4(e?e[2]:void 0))(e,t,n,a)}},type:`multiline-element`},m3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:F4,replace:c3(`bullet`),triggerOnEnter:!0,type:`element`},h3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:I4,replace:c3(`check`),triggerOnEnter:!0,type:`element`},g3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:P4,replace:c3(`number`),triggerOnEnter:!0,type:`element`},_3={format:[`code`],tag:\"`\",type:`text-format`},v3={format:[`highlight`],tag:`==`,type:`text-format`},y3={format:[`bold`,`italic`],tag:`***`,type:`text-format`},b3={format:[`bold`,`italic`],intraword:!1,tag:`___`,type:`text-format`},x3={format:[`bold`],tag:`**`,type:`text-format`},S3={format:[`bold`],intraword:!1,tag:`__`,type:`text-format`},C3={format:[`strikethrough`],tag:`~~`,type:`text-format`},w3={format:[`italic`],tag:`*`,type:`text-format`},T3={format:[`italic`],intraword:!1,tag:`_`,type:`text-format`};function E3(e){return e.replace(/&(?=#\\d+;|#[Xx][\\dA-Fa-f]+;|[A-Za-z][\\dA-Za-z]*;)/g,`&`)}var D3={dependencies:[K0],export:(e,t,n)=>{if(!W0(e)||U0(e))return null;let r=t(e),i=e.getTitle();i!=null&&(i=E3(i).replace(/([\\\\\"])/g,`\\\\$1`));let a=e.getURL(),o=E3(a),s=a===``||/\\s/.test(a)?`<${o.replace(/([\\\\<>])/g,`\\\\$1`).replace(/\\r/g,` `).replace(/\\n/g,` `)}>`:o.replace(/([\\\\()])/g,`\\\\$1`).replace(/^</,`\\\\<`);return i?`[${r}](${s} \"${i}\")`:`[${r}](${s})`},importRegExp:/(?:\\[(.+?)\\])(?:\\(\\s*(?:(?:<((?:\\\\.|[^<>\\n\\\\])*)>|((?!<)(?:\\\\[^\\s]|\\\\(?=\\s)|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\])*\\))*\\))*\\)|[^\\s()\\\\])+))(?:\\s+(?:\"((?:[^\"]*\\\\\")*[^\"]*)\"|'((?:[^']*\\\\')*[^']*)'|\\(((?:\\\\.|[^()\\\\])*)\\)))?\\s*)?\\))/,regExp:/(?:\\[([^[\\]]*(?:\\[[^[\\]]*\\][^[\\]]*)*)\\])(?:\\(\\s*(?:(?:<((?:\\\\.|[^<>\\n\\\\])*)>|((?!<)(?:\\\\[^\\s]|\\\\(?=\\s)|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\])*\\))*\\))*\\)|[^\\s()\\\\])+))(?:\\s+(?:\"((?:[^\"]*\\\\\")*[^\"]*)\"|'((?:[^']*\\\\')*[^']*)'|\\(((?:\\\\.|[^()\\\\])*)\\)))?\\s*)?\\))$/,replace:(e,t)=>{if(NF(e,W0))return;let[,n,r,i,a,o,s]=t,c=N4(r??i??``),l=a??o??s,u=H0(c,{title:l==null?void 0:N4(l)}),d=n.split(`[`).length-1,f=n.split(`]`).length-1,p=n,m=``;if(d<f)return;if(d>f){let e=n.split(`[`);m=`[`+e[0],p=e.slice(1).join(`[`)}let h=e.getFormat(),g=AF(p);return g.setFormat(h),u.append(g),e.replace(u),m&&u.insertBefore(AF(m).setFormat(h)),g},trigger:`)`,type:`text-match`},O3=[d3,f3,m3,g3],k3=[p3],A3=[_3,y3,b3,x3,S3,v3,w3,T3,C3],j3=[D3];function M3(...e){return e.flat()}var N3=M3(O3,k3,A3,j3);function P3(e,t=!1){let n=e.split(`\n`),r=0,i=[];for(let e=0;e<n.length;e++){let a=n[e],o=a.trimEnd(),s=i[i.length-1],c=e<n.length-1?Z4(a):null,l=s!==void 0&&Z4(s)!==null;if(V4.test(o))i.push(o);else if(r===0){{let e=o.match(z4);if(e){r=e[1].trim().length,i.push(o);continue}}o===``||s===``||!s||L4.test(s)||L4.test(o)||R4.test(o)||P4.test(o)||F4.test(o)||I4.test(o)||H4.test(o)||U4(o)||l||!t||W4.test(o)||G4.test(o)||K4(G4).test(s)||K4(W4).test(s)||B4.test(s)?i.push(!t&&o!==``||c!==null?a:o):i[i.length-1]=s+` `+(c===null?o:a).trimStart()}else{if(B4.test(o)&&o.trim().length>=r){r=0,i.push(o);continue}i.push(a)}}return i.join(`\n`)}function F3(e,t,n,r,i,a){let o=e.isSelected(t);for(let s of n){if(!s.export)continue;let n=s.export(e,e=>I3(e,t,r,i,a).markdown,t);if(n!=null)return!o&&G(e)&&I3(e,t,r,i,a).shouldInclude&&(o=!0),{markdown:n,shouldInclude:o}}if(G(e)){let n=I3(e,t,r,i,a);return{markdown:n.markdown,shouldInclude:o||n.shouldInclude}}return _I(e)?{markdown:e.getTextContent(),shouldInclude:o}:{markdown:null,shouldInclude:o}}function I3(e,t,n,r,i,a,o){let s=[],c=e.getChildren(),l=!1;a||=[],o||=[];t:for(let e of c){let c=e.isSelected(t);for(let u of r){if(!u.export)continue;let d=u.export(e,e=>I3(e,t,n,r,i,a,[...o,...a]).markdown,(e,r)=>B3(e,mU(t,e,`clone`).getTextContent(),n,a,o,i));if(d!=null){!c&&G(e)&&e.getChildren().some(e=>e.isSelected(t))&&e.extractWithChild(e,t,`html`)&&(c=!0),c&&(s.push(d),l=!0);continue t}}if(SI(e))c&&(s.push(z3(e)),l=!0);else if(q(e)){if(c){let r=mU(t,e,`clone`);s.push(B3(e,r.getTextContent(),n,a,o,i)),l=!0}}else if(G(e)){let u=I3(e,t,n,r,i,a,o);!c&&u.shouldInclude&&e.extractWithChild(e,t,`html`)&&(c=!0),(c||u.shouldInclude)&&(s.push(u.markdown),l=!0)}else _I(e)&&c&&(s.push(e.getTextContent()),l=!0)}return{markdown:s.join(``),shouldInclude:l}}function L3(e,t,n,r,i){for(let a of t){if(!a.export)continue;let t=a.export(e,e=>R3(e,n,r,void 0,void 0,i));if(t!=null)return t}return G(e)?R3(e,n,r,void 0,void 0,i):_I(e)?e.getTextContent():null}function R3(e,t,n,r,i,a=!1){let o=[],s=e.getChildren();r||=[],i||=[];t:for(let e of s){for(let s of n){if(!s.export)continue;let c=s.export(e,e=>R3(e,t,n,r,[...i,...r],a),(e,n)=>B3(e,n,t,r,i,a));if(c!=null){o.push(c);continue t}}SI(e)?o.push(z3(e)):q(e)?o.push(B3(e,e.getTextContent(),t,r,i,a)):G(e)?o.push(R3(e,t,n,r,i,a)):_I(e)&&o.push(e.getTextContent())}return o.join(``)}function z3(e){return lI(e,X4)+`\n`}function B3(e,t,n,r,i,a=!1){let o=e.hasFormat(`code`),s,c,l,u,d=t;if(o||(d=a?d.replace(/([*_`~])/g,`\\\\$1`):d.replace(/([*_`~\\\\])/g,`\\\\$1`)),o){let{fence:e,padded:n}=function(e){let t=e.match(/`+/g),n=t?Math.max(...t.map(e=>e.length)):0;return{fence:\"`\".repeat(n+1),padded:e.length===0||e.includes(\"`\")||/^\\s/.test(e)&&/\\s$/.test(e)?` ${e} `:e}}(t);s=``,l=``,c=e+n+e,u=!1}else{let e=d.match(/^(\\s*)(.*?)(\\s*)$/s)||[``,``,d,``];s=e[1],c=e[2],l=e[3],u=c===``}let f=``,p=``,m=``,h=V3(e,!0),g=V3(e,!1),_=new Set;for(let t of n){let n=t.format[0],i=t.tag;n!==`code`&&(u||!U3(e,n)||_.has(n)||(_.add(n),U3(h,n)&&r.find(e=>e.tag===i)||(r.push({format:n,tag:i}),f+=i)))}for(let t=0;t<r.length;t++){let n=H3(e,r[t].format),a=H3(g,r[t].format);if(n&&a)continue;let o=[...r];for(;o.length>t;){let e=o.pop();i&&e&&i.find(t=>t.tag===e.tag)||(e&&typeof e.tag==`string`&&(n?a||(m+=e.tag):p+=e.tag),r.pop())}break}return u&&!e.hasFormat(`code`)?p+d:p+s+f+c+m+l}function V3(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();return q(n)?n:null}function H3(e,t){return q(e)&&e.hasFormat(t)}function U3(e,t){return!!H3(e,t)&&(t===`code`||!e||!/^\\s*$/.test(e.getTextContent()))}function W3(e,t){let n=e.getTextContent(),r=t.transformersByTag[\"`\"],i=[],a=null;if(r){let e=function(e){let t=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\\\`;r--)n++;return n%2==1},n=[],r=0;for(;r<e.length;)if(e[r]===\"`\"){let t=1;for(;r+t<e.length&&e[r+t]===\"`\";)t++;n.push({index:r,length:t}),r+=t}else r++;let i=[],a=0;for(;a<n.length;){let r=n[a];if(t(r.index)){a++;continue}let o=-1;for(let e=a+1;e<n.length;e++)if(n[e].length===r.length){o=e;break}if(o===-1){a++;continue}let s=n[o],c=e.slice(r.index+r.length,s.index);c.length>=2&&c.startsWith(` `)&&c.endsWith(` `)&&/[^ ]/.test(c)&&(c=c.slice(1,-1)),i.push({content:c,endIndex:s.index+s.length,startIndex:r.index}),a=o+1}return i}(n);for(let t of e)a||={content:t.content,endIndex:t.endIndex,startIndex:t.startIndex,tag:\"`\"},i.push({end:t.endIndex,start:t.startIndex})}let o=function(e,t,n=[]){let r=[],i=new Set(Object.keys(t.transformersByTag).filter(e=>e[0]!==\"`\").map(e=>e[0])),a=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\\\`;r--)n++;return n%2==1},o=e=>n.some(t=>e>=t.start&&e<t.end),s=0;for(;s<e.length;){let t=e[s];if(!i.has(t)||a(s)||o(s)){s++;continue}let n=1;for(;s+n<e.length&&e[s+n]===t;)n++;let c=G3(t,e,s,n,!0),l=G3(t,e,s,n,!1);(c||l)&&r.push({active:!0,canClose:l,canOpen:c,char:t,index:s,length:n}),s+=n}return r}(n,t,i),s=o.length>0?function(e,t,n){let r={},i=0,a=null;for(;i<t.length;){let o=t[i];if(!o.active||!o.canClose||o.length===0){i++;continue}let s=`${o.char}${o.canOpen}${o.length%3}`,c=r[s]??-1,l=!1;for(let r=i-1;r>c;r--){let s=t[r];if(!s.active||!s.canOpen||s.length===0||s.char!==o.char||(s.canClose||o.canOpen)&&(s.length+o.length)%3==0&&s.length%3!=0&&o.length%3!=0)continue;let c=Math.min(s.length,o.length),u=Object.keys(n.transformersByTag).filter(e=>e[0]===s.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!u)continue;l=!0;let d=u.length,f={content:e.slice(s.index+s.length,o.index),endIndex:o.index+d,startIndex:s.index+(s.length-d),tag:u};(!a||f.startIndex<a.startIndex||f.startIndex===a.startIndex&&f.endIndex>a.endIndex)&&(a=f);for(let e=r+1;e<i;e++)t[e].active=!1;s.length-=d,o.length-=d,s.active=s.length>0,o.length>0?o.index+=d:(o.active=!1,i++);break}l||(r[s]=i-1,o.canOpen||(o.active=!1),i++)}return a}(n,o,t):null,c=null,l=null;if(a&&s?s.startIndex<=a.startIndex&&s.endIndex>=a.endIndex?(c=s,l=t.transformersByTag[s.tag]):(c=a,l=r):a?(c=a,l=r):s&&(c=s,l=t.transformersByTag[s.tag]),!c||!l)return null;let u=[n.slice(c.startIndex,c.endIndex),c.tag,c.content];return u.index=c.startIndex,u.input=n,{endIndex:c.endIndex,isCodeSpan:l===r,match:u,startIndex:c.startIndex,transformer:l}}function G3(e,t,n,r,i){if(!K3(t,n,r,i))return!1;if(e===`*`)return!0;if(e===`_`){if(!K3(t,n,r,!i))return!0;let e=i?t[n-1]:t[n+r];return e!==void 0&&A4.test(e)}return!0}function K3(e,t,n,r){let i=e[t-1],a=e[t+n],[o,s]=r?[a,i]:[i,a];return o!==void 0&&!k4.test(o)&&(!A4.test(o)||s===void 0||k4.test(s)||A4.test(s))}function q3(e){return q(e)&&!e.hasFormat(`code`)}function J3(e,t,n){let r=W3(e,t),i=function(e,t){let n=e,r,i,a,o;for(let e of t){if(!e.replace||!e.importRegExp)continue;let t=n.getTextContent().match(e.importRegExp);if(!t)continue;let s=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):s+t[0].length;!1!==c&&(r===void 0||i===void 0||s<r&&(c>i||c<=r))&&(r=s,i=c,a=e,o=t)}return r===void 0||i===void 0||a===void 0||o===void 0?null:{endIndex:i,match:o,startIndex:r,transformer:a}}(e,n);if(r&&i&&(r.isCodeSpan?i.startIndex<=r.startIndex&&i.endIndex>=r.endIndex?r=null:i=null:r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){let i=function(e,t,n,r,i){let a=e.getTextContent(),o,s,c;if(i[0]===a?o=e:t===0?[o,s]=e.splitText(n):[c,o,s]=e.splitText(t,n),o.setTextContent(i[2]),r)for(let e of r.format)o.hasFormat(e)||o.toggleFormat(e);return{nodeAfter:s,nodeBefore:c,transformedNode:o}}(e,r.startIndex,r.endIndex,r.transformer,r.match);q3(i.nodeAfter)&&J3(i.nodeAfter,t,n),q3(i.nodeBefore)&&J3(i.nodeBefore,t,n),q3(i.transformedNode)&&J3(i.transformedNode,t,n)}else if(i){let r=function(e,t,n,r,i){let a,o,s;return t===0?[a,o]=e.splitText(n):[s,a,o]=e.splitText(t,n),r.replace?{nodeAfter:o,nodeBefore:s,transformedNode:r.replace(a,i)||void 0}:null}(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!r)return;q3(r.nodeAfter)&&J3(r.nodeAfter,t,n),q3(r.nodeBefore)&&J3(r.nodeBefore,t,n),q3(r.transformedNode)&&J3(r.transformedNode,t,n)}let a=N4(e.getTextContent());e.setTextContent(a)}function Y3(e,t,n,r=!1){let i=D4(n),a=function(e){let t={},n={},r=[];for(let i of e){let{tag:e}=i;t[e]=i;let a=e.replace(/(\\*|\\^|\\+)/g,`\\\\$1`);r.push(a),n[e]=e.length===1?RegExp(e===\"`\"?\"(^|[^\\\\\\\\`])(`)((?:\\\\\\\\`|[^`])+?)(`)(?!`)\":`(^|[^\\\\\\\\${a}])(${a})((\\\\\\\\${a})?.*?[^${a}\\\\s](\\\\\\\\${a})?)(${a})(?![\\\\\\\\${a}])`):RegExp(`(^|[^\\\\\\\\])(${a})((\\\\\\\\${a})?.*?[^\\\\s](\\\\\\\\${a})?)(${a})(?!\\\\\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:RegExp(`(${r.join(`|`)})`,`g`),transformersByTag:t}}(i.textFormat),o=e.split(`\n`),s=o.length;(function(e,t){let n=a3,r=o3;a3=[],o3=e;try{return t()}finally{a3=n,o3=r}})(!r,()=>{for(let e=0;e<s;e++){let n=o[e],[s,c]=X3(o,e,i.multilineElement,t);s?e=c:Z3(n,t,i.element,a,i.textMatch,r)}});let c=t.getChildren();for(let e of c)if(!r&&M4(e)&&t.getChildrenSize()>1)e.remove();else if(G(e))for(let t of e.getAllTextNodes())Q3(t)}function X3(e,t,n,r){for(let i of n){let{handleImportAfterStartMatch:n,regExpEnd:a,regExpStart:o,replace:s}=i,c=e[t].match(o);if(!c)continue;if(n){let a=n({lines:e,rootNode:r,startLineIndex:t,startMatch:c,transformer:i});if(a===null)continue;if(a)return a}let l=typeof a==`object`&&`regExp`in a?a.regExp:a,u=a&&typeof a==`object`&&`optional`in a?a.optional:!a,d=t,f=e.length;for(;d<f;){let n=l?e[d].match(l):null;if(!n&&(!u||u&&d<f-1)){d++;continue}if(n&&t===d&&n.index===c.index){d++;continue}let i=[];if(n&&t===d)i.push(e[t].slice(c[0].length,-n[0].length));else for(let r=t;r<=d;r++)if(r===t){let t=e[r].slice(c[0].length);i.push(t)}else if(r===d&&n){let t=e[r].slice(0,-n[0].length);i.push(t)}else i.push(e[r]);if(!1!==s(r,null,c,n,i,!0))return[!0,d];break}}return[!1,t]}function Z3(e,t,n,r,i,a){let o=AF(e),s=EF();s.append(o),t.append(s);for(let{regExp:t,replace:r}of n){let n=e.match(t);if(n&&(o.setTextContent(e.slice(n[0].length)),!1!==r(s,[o],n,!0)))break}if(J3(o,r,i),s.getParent()!==null&&e.length>0){let e=s.getPreviousSibling();if(!a&&(wI(e)||fX(e)||k1(e))){let t=e;if(k1(e)){let n=e.getLastDescendant();t=n==null?null:NF(n,O1)}t!=null&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[$4(t),...s.getChildren()]),s.remove())}}}function Q3(e){if(jI(e))return;let t=e.getTextContent();if(!t.includes(`\t`))return;let n=e.getFormat(),r=e.getStyle(),i=[],a=0;for(let e=t.indexOf(`\t`);e!==-1;e=t.indexOf(`\t`,e+1))e>a&&i.push(AF(t.slice(a,e)).setFormat(n).setStyle(r)),i.push(kF()),a=e+1;a<t.length&&i.push(AF(t.slice(a)).setFormat(n).setStyle(r)),e.getParentOrThrow().splice(e.getIndexWithinParent(),1,i)}function $3(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e6(e,t,n,r,i){if(!EI(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExp:o,replace:s}of r){let r=a.match(o),c=i||r&&r[0].endsWith(` `)?n:n-1;if(r&&r[0].length===c){let i=t.getNextSiblings(),[a,o]=t.splitText(n);if(!1!==s(e,o?[o,...i]:i,r,!1))return a.remove(),!0}}return!1}function t6(e,t,n,r,i){if(!EI(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExpStart:o,replace:s,regExpEnd:c}of r){if(c&&!(`optional`in c)||c&&`optional`in c&&!c.optional)continue;let r=a.match(o);if(r){let a=i||r[0].endsWith(` `)?n:n-1;if(r[0].length!==a)continue;let o=t.getNextSiblings(),[c,l]=t.splitText(n);if(!1!==s(e,l?[l,...o]:o,r,null,null,!1))return c.remove(),!0}}return!1}function n6(e,t){let n=0,r=e.getTextContent();for(let e=0;e<t;e++)r[e]===\"`\"&&n++;return n%2!=0}function r6(e,t,n){let r=n.length;for(let i=t;i>=r;i--){let t=i-r;if(a6(e,t,n,0,r)&&e[t+r]!==` `)return t}return-1}function i6(e){let t=e.getNode(),n=0;if(q(t))n=e.offset;else if(G(t))for(let r of t.getChildren().slice(0,e.offset))n+=r.getTextContentSize();for(let e=t.getPreviousSibling();e!==null;e=e.getPreviousSibling())n+=e.getTextContentSize();return n}function a6(e,t,n,r,i){for(let a=0;a<i;a++)if(e[t+a]!==n[r+a])return!1;return!0}function o6(e,t=N3){let n=D4(t),r=n.element.filter(e=>e.triggerOnEnter),i=E4(n.textFormat,({tag:e})=>e[e.length-1]),a=E4(n.textMatch,({trigger:e})=>e),o=new Set([` `]);for(let e of n.textFormat)o.add(e.tag.slice(-1));for(let e of n.textMatch)e.trigger!==void 0&&o.add(e.trigger);for(let n of t){let t=n.type;if(t===`element`||t===`text-match`||t===`multiline-element`){let t=n.dependencies;for(let n of t)e.hasNode(n)||$3(173,n.getType())}}let s=(e,t,r)=>!!e6(e,t,r,n.element)||!!t6(e,t,r,n.multilineElement)||!!function(e,t,n){let r=e.getTextContent(),i=n[r[t-1]];if(i==null)return!1;t<r.length&&(r=r.slice(0,t));for(let t of i){if(!t.replace||!t.regExp)continue;let n=r.match(t.regExp);if(n===null)continue;let i=n.index||0,a=i+n[0].length,o;return i===0?[o]=e.splitText(a):[,o]=e.splitText(i,a),o.selectNext(0,0),t.replace(o,n),!0}return!1}(t,r,a)||!!function(e,t,n){let r=e.getTextContent(),i=t-1,a=r[i],o=n[a];if(!o)return!1;for(let t of o){let{tag:n}=t,o=n.length,s=i-o+1;if(o>1&&!a6(r,s,n,0,o)||r[s-1]===` `)continue;let c=r[i+1];if(!1===t.intraword&&c&&!O4.test(c))continue;let l=e,u=l,d=r6(r,s,n),f=u;for(;d<0&&(f=f.getPreviousSibling())&&!SI(f);)if(q(f)){if(f.hasFormat(`code`))continue;let e=f.getTextContent();u=f,d=r6(e,e.length,n)}if(d<0||u===l&&d+o===s)continue;let p=u.getTextContent();if(d>0&&p[d-1]===a)continue;let m=p[d-1];if(!1===t.intraword&&m&&!O4.test(m)||!t.format.includes(`code`)&&n6(u,d))continue;let h=l.getTextContent(),g=h.slice(0,s)+h.slice(i+1);l.setTextContent(g);let _=u===l?g:p;u.setTextContent(_.slice(0,d)+_.slice(d+o));let v=W(),y=OF();WI(y);let b=i-o*(u===l?2:1)+1;y.anchor.set(u.__key,d,`text`),y.focus.set(l.__key,b,`text`);for(let e of t.format)y.formatText(e,jR[e]);y.anchor.set(y.focus.key,y.focus.offset,y.focus.type);for(let e of t.format)y.hasFormat(e)&&y.toggleFormat(e);return K(v)&&(y.format=v.format),!0}return!1}(t,r,i);return kz(e.registerUpdateListener(({tags:t,dirtyLeaves:n,editorState:r,prevEditorState:i})=>{if(t.has(aL)||t.has(ML)||e.isComposing())return;let a=t.has(fL),c=r.read(W),l=i.read(W);if(!K(l)||!K(c)||!c.isCollapsed()||c.is(l)&&!a)return;let u=c.anchor.key,d=c.anchor.offset,f=r._nodeMap.get(u);if(q(f)&&n.has(u)&&(a||d===1||!(r.read(()=>i6(c.anchor))>i.read(()=>i6(l.anchor))+1))){if(a){let e=r.read(()=>f.getTextContent())[d-1];if(!o.has(e))return}e.update(()=>{if(!q3(f))return;let e=f.getParent();e===null||_4(e)||s(e,f,c.anchor.offset)&&mF(PL)})}}),e.registerCommand(uR,e=>{if(e!==null&&e.shiftKey)return!1;let t=W();if(!K(t)||!t.isCollapsed())return!1;let i=t.anchor.offset,a=t.anchor.getNode();if(!q(a)||!q3(a))return!1;let o=a.getParent();return o===null||_4(o)?!1:i===a.getTextContent().length&&!(!t6(o,a,i,n.multilineElement,!0)&&!e6(o,a,i,r,!0))&&(e!==null&&e.preventDefault(),!0)},uL))}function s6(e,t=N3,n,r=!1,i=!1){let a=r?e:P3(e,i),o=n||nI();o.clear(),Y3(a,o,t,r),W()!==null&&o.selectStart()}function c6(e,t=N3,n=!1,r=!1){let i=n?e:P3(e,r),a=new ZI;return Y3(i,a,t,n),a.getChildren()}function l6(e=N3,t,n=!1){return function(e,t=!1){let n=D4(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let o=[],s=(e||nI()).getChildren();for(let e=0;e<s.length;e++){let c=s[e],l=L3(c,r,a,n.textMatch,t);l!=null&&o.push(i&&e>0&&!M4(c)&&!M4(s[e-1])?`\n${l}`:l)}return o.join(`\n`)}}(e,n)(t)}function u6(e=N3,t,n=!1){return!t||K(t)&&t.isCollapsed()?``:function(e,t=!1){let n=D4(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let o=[],s=null;for(let c of nI().getChildren()){let{shouldInclude:l,markdown:u}=F3(c,e,r,a,n.textMatch,t);l&&u!=null&&(o.push(!i||s===null||M4(c)||M4(s)?u:`\n${u}`),s=c)}return o.join(`\n`)}}(e,n)(t)}var d6=T4;d6.$convertFromMarkdownString,d6.$convertSelectionToMarkdownString,d6.$convertToMarkdownString,d6.$generateNodesFromMarkdownString,d6.BOLD_ITALIC_STAR,d6.BOLD_ITALIC_UNDERSCORE,d6.BOLD_STAR,d6.BOLD_UNDERSCORE,d6.CHECK_LIST,d6.CODE,d6.ELEMENT_TRANSFORMERS,d6.HEADING,d6.HIGHLIGHT,d6.INLINE_CODE,d6.ITALIC_STAR,d6.ITALIC_UNDERSCORE,d6.LINK,d6.MULTILINE_ELEMENT_TRANSFORMERS,d6.ORDERED_LIST,d6.QUOTE,d6.STRIKETHROUGH,d6.TEXT_FORMAT_TRANSFORMERS,d6.TEXT_MATCH_TRANSFORMERS;var f6=d6.TRANSFORMERS;d6.UNORDERED_LIST,d6.isTableRowDivider,d6.registerMarkdownShortcuts,kr(2)+1;var p6={dependencies:[$Q],export:e=>QQ(e)?`***`:null,regExp:/^(---|\\*\\*\\*|___)\\s?$/,replace:(e,t,n,r)=>{let i=ZQ();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},triggerOnEnter:!0,type:`element`};function m6(){return[p6,...f6]}m6();var h6=kr(7);h6+1,h6+2,h6+3,h6+4,h6+5,h6+6;var g6=kr(3);g6+1,g6+2;var _6=kr(2),v6=Symbol(_6),y6=Symbol(_6+1);function b6(e){let[t]=Nl(v6,$x),n=e.editorRef;return ru(()=>{typeof n==`function`?n(t):typeof n==`object`&&n&&(n.current=t)},[t],y6),null}var x6=kr(4);x6+1,x6+2,x6+3,kr(2)+1,HR(`SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND`),Zm([`click`,`mouseenter`]);var S6=kr(9);S6+1,S6+2,S6+3,S6+4,S6+5,S6+6,S6+7,S6+8;var C6=kr(7);C6+1,C6+2,C6+3,C6+4,C6+5,C6+6;var w6=kr(8);w6+1,w6+2,w6+3,w6+4,w6+5,w6+6,w6+7,kr(2)+1,kr(2)+1;var T6=[[`Cat`,`rgb(125, 50, 0)`],[`Dog`,`rgb(100, 0, 0)`],[`Rabbit`,`rgb(150, 0, 0)`],[`Frog`,`rgb(200, 0, 0)`],[`Fox`,`rgb(200, 75, 0)`],[`Hedgehog`,`rgb(0, 75, 0)`],[`Pigeon`,`rgb(0, 125, 0)`],[`Squirrel`,`rgb(75, 100, 0)`],[`Bear`,`rgb(125, 100, 0)`],[`Tiger`,`rgb(0, 0, 150)`],[`Leopard`,`rgb(0, 0, 200)`],[`Zebra`,`rgb(0, 0, 250)`],[`Wolf`,`rgb(0, 100, 150)`],[`Owl`,`rgb(0, 100, 100)`],[`Gull`,`rgb(100, 0, 100)`],[`Squid`,`rgb(150, 0, 150)`]],E6;function D6(){return E6===void 0&&(E6=T6[Math.floor(Math.random()*T6.length)]),E6}function O6(){let[e,t]=D6();return{color:t,isCollabActive:!1,name:e,yjsDocMap:new Map}}O6();var k6=t({default:()=>A6});function A6(e){return()=>{}}var j6=k6.default,M6=kr(4);M6+1,M6+2,M6+3,j6(`LexicalNestedComposer initialNodes is deprecated and will be removed in v0.32.0, it has never worked correctly.\nYou can configure your editor's nodes with createEditor({nodes: [], parentEditor: $getEditor()})`),j6(`LexicalNestedComposer initialEditor should explicitly initialize its namespace when the node configuration differs from the parentEditor. For backwards compatibility, the namespace will be initialized from parentEditor until v0.32.0, but this has always had incorrect copy/paste behavior when the configuration differed.\nYou can configure your editor's namespace with createEditor({namespace: 'nested-editor-namespace', nodes: [], parentEditor: $getEditor()}).`),Az()({format:Yz(JR([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`})}),pr(1,!0);var N6=kr(4);N6+1,N6+2,N6+3,pr(1,!0);var P6=kr(4);P6+1,P6+2,P6+3;var F6=kr(3);F6+1,F6+2,HR(`INSERT_EMBED_COMMAND`);var I6=kr(10);I6+1,I6+2,I6+3,I6+4,I6+5,I6+6,I6+7,I6+8,I6+9,Zm([`dragend`,`dragstart`]);var L6=kr(10);L6+1,L6+2,L6+3,L6+4,L6+5,L6+6,L6+7,L6+8,L6+9,pr(1,!0);var R6=kr(13);R6+6,R6+7,R6+8,R6+9,R6+10,R6+11;var z6=t({$createCodeHighlightNode:()=>l4,$createCodeNode:()=>u4,$getCodeLineDirection:()=>d4,$getEndOfCodeInLine:()=>f4,$getFirstCodeNodeOfLine:()=>p4,$getLastCodeNodeOfLine:()=>m4,$getStartOfCodeInLine:()=>h4,$isCodeHighlightNode:()=>g4,$isCodeNode:()=>_4,$outdentLeadingSpaces:()=>v4,CodeExtension:()=>y4,CodeHighlightNode:()=>b4,CodeIndentExtension:()=>x4,CodeNode:()=>S4,DEFAULT_CODE_LANGUAGE:()=>C4,getDefaultCodeLanguage:()=>w4});z6.$createCodeHighlightNode;var B6=z6.$createCodeNode;z6.$getCodeLineDirection,z6.$getEndOfCodeInLine,z6.$getFirstCodeNodeOfLine,z6.$getLastCodeNodeOfLine,z6.$getStartOfCodeInLine,z6.$isCodeHighlightNode;var V6=z6.$isCodeNode;z6.$outdentLeadingSpaces,z6.CodeExtension,z6.CodeHighlightNode,z6.CodeIndentExtension;var H6=z6.CodeNode;z6.DEFAULT_CODE_LANGUAGE,z6.getDefaultCodeLanguage,pr(1,!0);var U6=qd(`<!><!><!><!><!><!><!>`,3,1),W6=qd(`<div></div>`),G6=kr(11),K6={},q6=[pX,mX,P1,N1,K0,G0,H6,$Q],J6={heading1:`h1`,heading2:`h2`,heading3:`h3`,heading4:`h4`,heading5:`h5`,heading6:`h6`},Y6={bold:`bold`,italic:`italic`,underline:`underline`,strikethrough:`strikethrough`,code:`code`,highlight:`highlight`,subscript:`subscript`,superscript:`superscript`},X6={alignLeft:`left`,alignCenter:`center`,alignRight:`right`};function Z6(e,t,n,r){e.update(()=>{let e=W();if(!K(e))return;let i=NF(e.anchor.getNode(),t),a=i!=null&&(!r||r(i));fU(e,()=>a?EF():n())})}function Q6(e,t){let n=Y6[t];if(n){e.dispatchCommand(jL,n);return}let r=X6[t];if(r){e.dispatchCommand(AL,r);return}let i=J6[t];if(i){Z6(e,dX,()=>lX(i),e=>e.getTag()===i);return}switch(t){case`paragraph`:Z6(e,()=>!0,()=>EF(),()=>!1);break;case`blockquote`:Z6(e,fX,()=>uX());break;case`codeBlock`:Z6(e,V6,()=>B6());break;case`bulletList`:e.dispatchCommand(M1,void 0);break;case`orderedList`:e.dispatchCommand(j1,void 0);break;case`taskList`:e.dispatchCommand(A1,void 0);break;case`horizontalRule`:e.dispatchCommand(e$,void 0)}}function $6(e,t){return e.read(()=>{let e=W();if(e==null)return!1;let n=Y6[t];if(n)return K(e)&&e.hasFormat(n);let r=X6[t];if(r)return e.getNodes().some(e=>{let t=NF(e,e=>e.getFormatType!=null);return t!=null&&t.getFormatType()===r});let i=J6[t];if(i)return e.getNodes().some(e=>NF(e,dX)?.getTag()===i);switch(t){case`blockquote`:return e.getNodes().some(e=>NF(e,fX)!=null);case`codeBlock`:return e.getNodes().some(e=>NF(e,V6)!=null);case`bulletList`:case`orderedList`:case`taskList`:{let n=t===`bulletList`?`bullet`:t===`orderedList`?`number`:`check`;return e.getNodes().some(e=>NF(e,k1)?.getListType()===n)}case`link`:return e.getNodes().some(e=>W0(e)||W0(NF(e,W0)));case`horizontalRule`:return CI(e)&&e.getNodes().some(QQ);case`paragraph`:return e.getNodes().some(e=>NF(e,e=>e.getType?.()===`paragraph`));default:return!1}})}function e8(e,t,n){let r=e=>e.getKey()===t||(e.getChildren?.()??[]).some(r),i=0,a=e=>{if(e.getKey()===t)return i+=n,!0;for(let t of e.getChildren?.()??[])if(r(t)){if(a(t))return!0}else i+=t.getTextContentSize?.()??0;return!1};return a(e),i}function t8(e){let t=[];for(let n of Object.keys(Y6))$6(e,n)&&t.push(n);for(let n of[`paragraph`,`heading1`,`heading2`,`heading3`,`heading4`,`heading5`,`heading6`,`blockquote`,`bulletList`,`orderedList`,`taskList`,`codeBlock`,`link`])$6(e,n)&&t.push(n);return t}var n8=Nu(function(e,t,n){t.block;let r=mu(null,G6+0),i=mu(void 0,G6+1),a=mu(void 0,G6+2),o=mu(JSON.stringify([e.json!==void 0,e.value]),G6+3),s=mu(JSON.stringify(e.json),G6+4),c=mu(void 0,G6+5),[l,u]=Ll(null,G6+6);gu(e.ref,()=>l,[l],G6+7);let d={namespace:`octane-xplat/lexical`,nodes:q6,editable:e.editable!==!1,editorState:e.json==null?e.value==null?void 0:t=>{let n=Bq(t,new DOMParser().parseFromString(e.value,`text/html`));nI().append(...n)}:JSON.stringify(e.json),onError:e=>{throw e}},f=t=>{t&&c.current?.native!==t&&(r.current=t,c.current={getHTML:()=>t.read(()=>zq(t)),setHTML:e=>t.update(()=>{let n=Bq(t,new DOMParser().parseFromString(e,`text/html`));nI().clear().append(...n)}),getJSON:()=>t.getEditorState().toJSON(),setJSON:e=>t.setEditorState(t.parseEditorState(JSON.stringify(e))),apply:e=>{t.focus(),Q6(t,e)},linkTo:(e,n)=>{n!=null&&n!==``?t.update(()=>{let t=H0(e);t.append(AF(n));let r=W();K(r)&&r.insertNodes([t])}):t.dispatchCommand(q0,e)},removeLink:()=>t.dispatchCommand(q0,null),isActive:e=>$6(t,e),undo:()=>t.dispatchCommand(PR,void 0),redo:()=>t.dispatchCommand(xR,void 0),focus:()=>t.focus(),blur:()=>t.blur(),isFocused:()=>{let e=t.getRootElement();return e!=null&&e===document.activeElement},native:t},u(c.current),e.onReady?.())};ru(()=>{if(!r.current)return;let t=JSON.stringify([e.json!==void 0,e.value]);t!==o.current&&(o.current=t,e.json===void 0&&e.value!==void 0&&e.value!==i.current&&c.current?.setHTML(e.value))},[l,e.value,e.json],G6+8),ru(()=>{if(!r.current)return;let t=JSON.stringify(e.json);t!==s.current&&(s.current=t,e.json!==void 0&&t!==a.current&&c.current?.setJSON(e.json))},[l,e.json],G6+9),ru(()=>{r.current?.setEditable(e.editable!==!1)},[l,e.editable],G6+10);let p=(t,n)=>{let r=t.read(()=>zq(n));i.current=r,e.onChange?.(r);let o=t.toJSON();a.current=JSON.stringify(o),e.onJSONChange?.(o),t.read(()=>{let t=W();if(K(t)&&e.onSelectionChange){let r=nI();e.onSelectionChange({start:e8(r,t.anchor.key,t.anchor.offset),end:e8(r,t.focus.key,t.focus.offset),active:t8(n)})}})};function m(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r,o,s,c,l,u,d=Qd(U6);e=i.parentNode;let f=bf(d);t=f;let p=xf(f,1);r=p;let m=xf(p,1);o=m;let h=xf(m,1);s=h;let g=xf(h,1);c=g;let _=xf(g,1);l=_,u=xf(_,1),$d(d,i.parentNode,i.endMarker),a=of(n,null,e,t,r,o,s,c,null,void 0,l,u)}S_(n,1,a.a,FX,{contentEditable:u_(()=>h_(`c:7597daf3`,jB,{id:e.id,\"aria-placeholder\":e.placeholder??``,placeholder:null,className:`vx-lexical-input`,style:{outline:`none`}})),placeholder:e.placeholder?u_(()=>f_(`div`,{className:`vx-lexical-placeholder`,style:{position:`absolute`,inset:`8px auto auto 10px`,pointerEvents:`none`,opacity:.5}},()=>e.placeholder)):null,ErrorBoundary:zX},a.b,void 0,2,void 0,void 0,`c:1283dc87`),S_(n,2,a.a,rZ,{},a.c,void 0,2,void 0,void 0,`c:1dd1c554`),S_(n,3,a.a,H1,{},a.d,void 0,2,void 0,void 0,`c:4bb68e0f`),S_(n,4,a.a,$0,{},a.e,void 0,2,void 0,void 0,`c:5c76533c`),a.k=Pv(n,a.k,5,a.a,e.autofocus?h_(`c:980e387e`,dZ,{}):null,`b:928b159c`,a.f,!0,void 0,void 0,void 0),S_(n,6,a.a,sZ,{onChange:p},a.i,void 0,2,void 0,void 0,`c:079f6eaf`),S_(n,7,a.a,b6,{editorRef:f},a.j,void 0,2,void 0,void 0,`c:230323aa`)}let h=t.slots[0];if(h===void 0){let e,n=Qd(W6);e=n,h=tf(t,n,void 0,e,void 0)}h.a=Vf(t,h.a,h.b,`class`,e.className,`b:db7e728b`,`class`);{let t={position:`relative`,...e.style};h.c!==t&&(Vp(h.b,t,h.c),h.c=t)}S_(t,1,h.b,tB,{initialConfig:d,children:Pu(m,K6)},void 0,void 0,void 0,void 0,void 0,`c:9d1ef90e`)}),r8=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`blockquote`,`bulletList`,`orderedList`,`taskList`,`codeBlock`,`horizontalRule`,`highlight`,`subscript`,`superscript`,`paragraph`,`heading1`,`heading2`,`heading3`,`heading4`,`heading5`,`heading6`,`alignLeft`,`alignCenter`,`alignRight`,`link`];function i8(e){let t=null,n=[],r={start:0,end:0,active:[]},i=(e,n={})=>{let i={event:e,html:t?.getHTML()??``,json:t?.getJSON?.()??null,focused:t?.isFocused()??!1,selection:r,...n};window.webkit.messageHandlers.editor.postMessage(JSON.stringify(i))},a=e=>{setTimeout(()=>{t&&(r={...r,active:r8.filter(e=>t.isActive(e))},i(e))},0)},o=r=>{r.method===`props`?(e({...r.args[0],...s}),t&&a(`snapshot`)):t?[`setHTML`,`setJSON`,`apply`,`linkTo`,`removeLink`,`undo`,`redo`,`focus`,`blur`].includes(r.method)&&(t[r.method]?.(...r.args),a(`snapshot`)):n.push(r)},s={ref(e){if(e&&e!==t){t=e,a(`ready`);for(let e of n.splice(0))o(e)}},onChange:()=>a(`change`),onSelectionChange(e){r=e,a(`selection`)},onFocus:()=>a(`focus`),onBlur:()=>a(`blur`)};window.__xplatEditorReceive=e=>{try{o(JSON.parse(e))}catch(e){i(`error`,{message:String(e)})}},window.addEventListener(`error`,e=>i(`error`,{message:e.message})),window.addEventListener(`unhandledrejection`,e=>i(`error`,{message:String(e.reason)})),i(`boot`)}var a8=Jx(document.getElementById(`root`));i8(e=>a8.render(u_(()=>h_(`c:967f4e02`,n8,{...e}))))})();</script></body></html>"
|
|
2
|
+
export default "<!doctype html><html><head><meta charset=\"utf-8\"><meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; script-src 'nonce-xplat-editor'; style-src 'unsafe-inline'; img-src data:\"><style>html,body{margin:0;height:100%;font:14px system-ui} .ProseMirror,.vx-lexical-input{min-height:100px;padding:8px;outline:none} .ProseMirror:empty:before{content:attr(data-placeholder);opacity:.5} </style></head><body><div id=\"root\"></div><script nonce=\"xplat-editor\">(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=16,r=32,i=Reflect.apply,a=Symbol.for,o=null;try{let e=i(Function.prototype.toString,a,[]);typeof a==`function`&&typeof e==`string`&&/^function for\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}$/.test(e)&&(o=a)}catch{}var s=[];function c(e){return s[e]??={prefix:``,tag:``,size:0,value:``,path:``,slots:null}}function l(e,t,a,s=!1){let l=e.length,u=a?`@octane:universal-hook:`:`@octane:hook:`,d=l<n;for(let n=0;n<=l;n++){let f=n===l,p=f?t:e[n];d&&=p===null||typeof p!=`object`&&typeof p!=`function`;let m,h,g,_;if(!a&&f&&t===void 0)m=``,h=0,g=``;else if(!a)m=typeof p==`number`?`n`:s&&typeof p==`string`?`t`:`s`,g=typeof p==`number`?String(p):s&&typeof p==`string`?p:p.description??``,h=g.length,(typeof g!=`string`||typeof h!=`number`)&&(_=m+h+`:`+g,d=!1);else{m=typeof p==`symbol`?`s`:`v`,h=typeof p==`symbol`?p.description?.length??0:String(p).length;let e=typeof h==`number`?void 0:`${m}${h}:`;g=typeof p==`symbol`?p.description??``:String(p),(e!==void 0||typeof g!=`string`)&&(_=`${e??`${m}${h}:`}${g}`,d=!1)}if(f){let e=Symbol,n=e.for;if(!d||n!==o){let t=u+(_??(m===``?``:m+h+`:`+g));return n===o?n(t):i(n,e,[t])}let a=c(l),s=a.slots??=new Map,f=s.get(t);if(f!==void 0&&f.prefix===u&&f.tag===m&&f.size===h&&f.value===g)return f.resolved;let p=n(u+(m===``?``:m+h+`:`+g));return f===void 0?s.size<r&&s.set(t,{prefix:u,tag:m,size:h,value:g,resolved:p}):(f.prefix=u,f.tag=m,f.size=h,f.value=g,f.resolved=p),p}if(!d){u+=_??m+h+`:`+g;continue}let v=c(n);(v.prefix!==u||v.tag!==m||v.size!==h||v.value!==g)&&(v.prefix=u,v.tag=m,v.size=h,v.value=g,v.path=u+m+h+`:`+g),u=v.path}throw Error(`Unreachable hook path`)}var u=new Set;for(let e of`animationIterationCount.aspectRatio.borderImageOutset.borderImageSlice.borderImageWidth.boxFlex.boxFlexGroup.boxOrdinalGroup.columnCount.columns.flex.flexGrow.flexPositive.flexShrink.flexNegative.flexOrder.gridArea.gridRow.gridRowEnd.gridRowSpan.gridRowStart.gridColumn.gridColumnEnd.gridColumnSpan.gridColumnStart.fontWeight.lineClamp.lineHeight.opacity.order.orphans.scale.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeOpacity.strokeWidth`.split(`.`)){let t=e.toLowerCase();u.add(t),u.add(`webkit`+t),u.add(`ms`+t),u.add(`moz`+t),u.add(`o`+t)}var d=new Map;function f(e){let t=d.get(e);if(t!==void 0)return t;let n=u.has(e.replaceAll(`-`,``).toLowerCase());return d.set(e,n),n}function p(e,t){return typeof t==`number`&&t!==0&&e.charCodeAt(0)!==45&&!f(e)?t+`px`:typeof t==`string`?t.trim():``+t}function m(e){if(e===`cssFloat`)return`float`;if(e.charCodeAt(0)===45)return e;let t=!1;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=65&&r<=90){t=!0;break}}if(!t)return e;let n=``;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);n+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[t]}return n.charCodeAt(0)===109&&n.charCodeAt(1)===115&&n.charCodeAt(2)===45&&(n=`-`+n),n}function h(e){if(typeof e==`string`)return e;if(typeof e!=`object`)return typeof e==`number`&&e?``+e:``;if(e===null)return``;let t=``;if(Array.isArray(e))for(let n=0;n<e.length;n++){let r=e[n];if(r){let e=h(r);e&&(t=t?t+` `+e:e)}}else for(let n in e)e[n]&&(t=t?t+` `+n:n);return t}var g=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i,_=`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`,v=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function y(e){let t=e.charCodeAt(0);return t>32&&t<127&&t!==74&&t!==106?e:g.test(e)?_:e}function b(e,t){return e=e===void 0?void 0:e.toLowerCase(),e!==void 0&&e.includes(`-`)&&!v.has(e)?!1:(t=t.toLowerCase(),t===`src`||t===`href`||t===`action`||t===`formaction`||t===`xlink:href`||t===`xlinkhref`||t===`data`&&e===`object`)}function x(e,t,n){return b(e,t)?y(n):n}var S=`data-octane-input`,C=`data-octane-signal-control`,ee=`[b;`,te=`;b;`,ne=`[f0`+te,re=`[f1`+te,ie=ne.length,ae=ee.length,oe=`;root`;function se(e){let t=e.startsWith(ne)||e.startsWith(re);if(!t&&!e.startsWith(ee))return!1;let n=t?ie:ae,r=e.indexOf(`;`,n);if(r<=n||r===e.length-1)return!1;if(t)return e.indexOf(`;`,r+1)===-1;if(e.length-r===5&&e.endsWith(oe))return!0;let i=e.indexOf(`;`,r+1);if(i<=r+1||i===e.length-1)return!1;let a=i+1;if(e.length===a+1){let t=e.charCodeAt(a);return t===116||t===118||t===115||t===111||t>=48&&t<=57}if(e.charCodeAt(a)===107&&e.charCodeAt(a+1)===59)return(e.charCodeAt(a+2)===115||e.charCodeAt(a+2)===110)&&e.charCodeAt(a+3)===58&&e.length>a+4;if(e.length===a+2&&e.endsWith(`-1`))return!0;if(e.charCodeAt(a)<49||e.charCodeAt(a)>57)return!1;for(let t=a+1;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return!0}var ce=`data-oct-b`;function le(e,t){let n=t?`[`:`]`;if(e===n||t&&(e===`[f0`||e===`[f1`)||t&&(e.startsWith(ee)||e.startsWith(`[f`))&&se(e))return 1;if(e.length<2||e.charCodeAt(0)!==n.charCodeAt(0))return 0;let r=e.charCodeAt(1);if(r<49||r>57)return 0;let i=r-48;for(let t=2;t<e.length;t++){let n=e.charCodeAt(t)-48;if(n<0||n>9||(i=i*10+n,!Number.isSafeInteger(i)))return 0}return i>=2?i:0}function ue(e){return e!==null&&e.nodeType===8&&le(e.data,!0)!==0}function de(e){if(!ue(e))return null;let t=0,n=e.nextSibling;for(;n!==null;){if(n.nodeType===8){let e=n.data;if(le(e,!0)!==0)t++;else if(le(e,!1)!==0){if(t===0)return n;t--}}n=n.nextSibling}return null}function fe(e){return e!==null&&/^os[a-zA-Z0-9_-]+-[0-9a-z]+$/.test(e)}function pe(e){if(e===null)return null;let t=e.lastIndexOf(`-`);if(t<=2||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!fe(n)||!/^(?:0|[1-9a-z][0-9a-z]*)$/.test(r)?null:n}function me(e,t){if(e.localName!==`template`)return!1;let n=pe(e.getAttribute(ce));if(n===null||t!==void 0&&n!==t)return!1;let r=e.previousSibling;return ue(r)&&r.nextSibling===e&&de(r)!==null}var he=`https://octanejs.dev/errors/`,ge=/[\\uD800-\\uDFFF]/gu;function _e(e){return encodeURIComponent(String(e).replace(ge,`�`))}function ve(e,t){let n=he+e;for(let e=0;e<t.length;e++)n+=`${e===0?`?`:`&`}args[]=${_e(t[e])}`;return`Minified Octane error #${e}; visit ${n} for the full message or use a development build for full errors and additional helpful warnings.`}function w(e,...t){return ve(e,t)}var ye=class extends Error{constructor(e){super(e),this.name=`SignalSerializationError`}};function be(){throw new ye(`Signal request arguments and seeds require acyclic plain data: undefined, null, booleans, finite numbers, strings, dense arrays, and plain objects with enumerable string data properties.`)}function xe(e,t=new Set){if(e==null||typeof e==`boolean`||typeof e==`string`)return e;if(typeof e==`number`)return Number.isFinite(e)?e:be();if(typeof e!=`object`||t.has(e))return be();let n=Object.getPrototypeOf(e);if(!Array.isArray(e)&&n!==Object.prototype&&n!==null)return be();t.add(e);try{let n=Reflect.ownKeys(e);if(Array.isArray(e)){if(n.length!==e.length+1)return be();let r=[];for(let n=0;n<e.length;n++){let i=Object.getOwnPropertyDescriptor(e,String(n));if(!i||!i.enumerable||!(`value`in i))return be();r.push(xe(i.value,t))}return Object.freeze(r)}if(n.some(e=>typeof e!=`string`))return be();let r={};for(let i of n.sort()){let n=Object.getOwnPropertyDescriptor(e,i);if(!n.enumerable||!(`value`in n))return be();Object.defineProperty(r,i,{value:xe(n.value,t),enumerable:!0})}return Object.freeze(r)}finally{t.delete(e)}}function Se(e){if(!Array.isArray(e))return be();let[t,n]=e;switch(t){case`undefined`:return e.length===1?void 0:be();case`null`:return e.length===1?null:be();case`boolean`:return e.length!==2||typeof n!=`boolean`?be():n;case`number`:return e.length===2?n===`-0`?-0:typeof n!=`number`||!Number.isFinite(n)||Object.is(n,-0)?be():n:be();case`string`:return e.length!==2||typeof n!=`string`?be():n;case`array`:return e.length!==2||!Array.isArray(n)?be():Object.freeze(n.map(e=>Se(e)));case`object`:{if(e.length!==2||!Array.isArray(n))return be();let t={},r;for(let e of n){if(!Array.isArray(e)||e.length!==2||typeof e[0]!=`string`||r!==void 0&&e[0]<=r)return be();r=e[0],Object.defineProperty(t,e[0],{value:Se(e[1]),enumerable:!0})}return Object.freeze(t)}default:return be()}}var Ce=`oct-native-fresh:`;function we(e){return(e.read??`value`)+`:`+e.key}function Te(e){return JSON.stringify(xe({...e,read:e.read??`value`}))}var Ee=new WeakMap;function De(e,t){let n=Ee.get(e);if(n!==void 0){if(t!==void 0&&n.seed.scopeKey!==t)throw Error(w(170));return n}let r=xe(e);if(typeof r!=`object`||!r||r.version!==1||typeof r.scopeKey!=`string`||!r.scopeKey.trim()||t!==void 0&&r.scopeKey!==t||!Array.isArray(r.entries))throw Error(w(170));let i=new Map,a=new Map;for(let e of r.entries){let t=e?.read??`value`;if(typeof e!=`object`||!e||typeof e.key!=`string`||!e.key.trim()||![`signal`,`derived`,`async`].includes(e.kind)||![`value`,`latest`,`snapshot`].includes(t)||typeof e.complete!=`boolean`||!Array.isArray(e.value)||e.available!==void 0&&(t!==`latest`||typeof e.available!=`boolean`)||e.refreshing!==void 0&&typeof e.refreshing!=`boolean`||e.connection!==void 0&&![`none`,`connecting`,`open`,`closed`].includes(e.connection)||i.has(we(e)))throw Error(w(171));if(e.available===!1){if(e.complete||e.request!==void 0||e.value.length!==1||e.value[0]!==`undefined`)throw Error(w(172))}else if(e.kind===`async`){let t=e.request;if(typeof t!=`object`||!t||typeof t.queryKey!=`string`||!t.queryKey.trim()||![`promise`,`stream`].includes(t.kind)||!Array.isArray(t.argument))throw Error(w(173));Se(t.argument)}else if(e.request!==void 0)throw Error(w(174));Se(e.value);let n=we(e);i.set(n,e),a.set(n,Te(e))}let o={seed:r,entries:i,signatures:a};return Ee.set(r,o),o}function Oe(e){return ke(JSON.parse(e))}function ke(e){if(typeof e!=`object`||!e||e.version!==1&&e.version!==2||!Array.isArray(e.scopes))throw Error(w(181));let t=e,n=new Set;for(let e of t.scopes){if(typeof e!=`object`||!e||e.version!==1||typeof e.scopeKey!=`string`||e.scopeKey.length===0||!Array.isArray(e.entries)||n.has(e.scopeKey))throw Error(w(182));n.add(e.scopeKey)}if(t.version===2){let e=t.initialDocument;if(typeof e!=`object`||!e||typeof e.scopeKey!=`string`||!e.scopeKey.trim()||!Array.isArray(e.entries)||e.entries.length===0)throw Error(w(183));let n=new Set;for(let t of e.entries){if(typeof t!=`object`||!t||typeof t.key!=`string`||!t.key.trim()||![`value`,`latest`,`snapshot`].includes(t.read)||n.has(we(t)))throw Error(w(184));n.add(we(t))}}return t}function Ae(e,t){if(e.version===1)return e;if(ke(e),t===void 0)throw Error(w(185));let n=e.initialDocument,r=De(t,n.scopeKey),i=new Map;for(let e of n.entries){let t=we(e),n=r.entries.get(t);if(n===void 0||i.has(t))throw Error(w(186));i.set(t,n)}for(let t of e.scopes)if(t.scopeKey===n.scopeKey)for(let e of t.entries){let t=we(e);if(i.has(t))throw Error(w(187));i.set(t,e)}return{version:1,scopes:[...e.scopes.filter(e=>e.scopeKey!==n.scopeKey),{version:1,scopeKey:n.scopeKey,entries:Array.from(i.values())}]}}function je(e,t){let n=Ae(e,t),r=new Map(n.scopes.map(e=>[e.scopeKey,e])),i=new Map,a=new Map,o=!1;return{resolve(e){if(o)return;let t=r.get(e.scopeKey);if(t===void 0)return;let n=a.get(e.scopeKey);if(n!==void 0&&n!==e)throw Error(w(188,e.scopeKey));let s=i.get(e);return s===void 0&&(s=e.beginAdoption(t),a.set(e.scopeKey,e),i.set(e,s)),s},release(){if(o)return;o=!0;let e,t=!1;try{for(let n of i.values())try{n.release()}catch(n){t||(e=n),t=!0}}finally{i.clear(),a.clear(),r.clear()}if(t)throw e}}}function Me(e){return`Minified Octane error #`+e+`; visit https://octanejs.dev/errors/`+e+` for the full message or use a development build for full errors and additional helpful warnings.`}var Ne,Pe=null,Fe,Ie;function Le(){return Ne===void 0?Pe??Fe?.()??null:Ne.current()??Pe}function Re(){return Ne?.current()??Pe}function ze(e){if(typeof e!=`function`)throw TypeError(Me(190));let t=Fe;return Fe=e,()=>{Fe===e&&(Fe=t)}}function Be(e,t){if(typeof t!=`function`)throw TypeError(Me(191));if(Ne)return Ne.run(e,t);let n=Pe;Pe=e;try{return t()}finally{Pe=n}}function Ve(e){Ie?.(e)}var He=Symbol(`octane.transitionConsumer`),Ue;function We(e){let t=Ue;return Ue=e,t}var Ge=null,Ke=class extends Error{scopeKey;nodeKey;read;constructor(e,t,n=`value`){super(w(194,n,e,t)),this.name=`NativeAdoptionMiss`,this.scopeKey=e,this.nodeKey=t,this.read=n}};function qe(e){let t=Ge;return Ge=e,t}var Je=null;function Ye(){let e=Je;return e?.startBatch(),e}function Xe(e){e?.endBatch()}function Ze(e){let t=Ye();try{return e()}finally{Xe(t)}}var Qe=new WeakMap;function $e(e){e.owner=void 0}function et(e,t,n){let r=Qe.get(e),i=r?.get(t)??0,a=n?2:1;return(i&a)!==0&&((i&~a)===0?r.delete(t):r.set(t,i&~a),!0)}function tt(e){Qe.delete(e)}var nt=globalThis[Symbol.for(`octane.contextEpoch`)]??={value:0};function rt(){return nt.value}function it(){nt.value++}var at=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),ot=new Set([`allowfullscreen`,`async`,`autoplay`,`controls`,`credentialless`,`default`,`defer`,`disabled`,`disablepictureinpicture`,`disableremoteplayback`,`formnovalidate`,`hidden`,`inert`,`itemscope`,`loop`,`nomodule`,`novalidate`,`open`,`playsinline`,`readonly`,`required`,`reversed`,`scoped`,`seamless`]),st=new Set([`size`,`cols`,`rows`,`span`]),ct=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.defs.desc.ellipse.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.filter.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),lt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`],[`xlinkActuate`,`xlink:actuate`],[`xlinkArcrole`,`xlink:arcrole`],[`xlinkHref`,`xlink:href`],[`xlinkRole`,`xlink:role`],[`xlinkShow`,`xlink:show`],[`xlinkTitle`,`xlink:title`],[`xlinkType`,`xlink:type`],[`xmlBase`,`xml:base`],[`xmlLang`,`xml:lang`],[`xmlSpace`,`xml:space`],[`tabIndex`,`tabindex`]]);function ut(e){switch(e.length){case 10:return e.toLowerCase()===`spellcheck`;case 9:return e.toLowerCase()===`draggable`;case 15:return e.toLowerCase()===`contenteditable`}return!1}var dt=`oct-suspense:`,ft=`data-octane-suspense-seeds`,pt=`data-octane-suspense-signals`,mt=Symbol.for(`octane.external-hydration-promise`),ht=Symbol.for(`octane.hydration-range-boundary`),gt=`oct-seed:`,_t=at,vt=ot,yt=st,bt=/^[^\\s\"'>\\/=\\u0000-\\u001F]+$/,xt=ct,St=lt,Ct=ut,wt=p,Tt=`Abort AnimationEnd AnimationIteration AnimationStart AuxClick BeforeInput BeforeToggle Blur Cancel CanPlay CanPlayThrough Change Click Close CompositionEnd CompositionStart CompositionUpdate ContextMenu Copy Cut DoubleClick Drag DragEnd DragEnter DragExit DragLeave DragOver DragStart Drop DurationChange Emptied Encrypted Ended Error Focus GotPointerCapture Input Invalid KeyDown KeyPress KeyUp Load LoadedData LoadedMetadata LoadStart LostPointerCapture MouseDown MouseEnter MouseLeave MouseMove MouseOut MouseOver MouseUp Paste Pause Play Playing PointerCancel PointerDown PointerEnter PointerLeave PointerMove PointerOut PointerOver PointerUp Progress RateChange Reset Resize Scroll ScrollEnd Seeked Seeking Select Stalled Submit Suspend TimeUpdate Toggle TouchCancel TouchEnd TouchMove TouchStart TransitionCancel TransitionEnd TransitionRun TransitionStart VolumeChange Waiting Wheel`,Et;function Dt(e){if(Et===void 0){Et=new Set;for(let e of Tt.split(` `))Et.add(`on`+e),Et.add(`on`+e+`Capture`)}return Et.has(e)}var Ot=Object.prototype.hasOwnProperty;function kt(e,t){let n=e?.defaultProps;if(n!=null)for(let e in n)t[e]===void 0&&(t[e]=n[e])}function At(e){if(typeof e!=`object`||!e)return null;let t=typeof Symbol==`function`&&e[Symbol.iterator]||e[`@@iterator`];return typeof t==`function`?t:null}var jt=`__octaneEarlyHydrationIntents`,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakSet;function Lt(e){return typeof e==`object`&&!!e&&`documentOwner`in e}function Rt(e){return Lt(e)?e.instanceOwner:e}function zt(e,t,n){return JSON.stringify([e,t,n])}function Bt(e,t){Mt.set(Rt(e),t),Lt(e)&&Mt.set(e.documentOwner,t)}function Vt(e){let t=e.getAttribute(C);if(t===null)return null;try{let e=JSON.parse(t);if(!Array.isArray(e)||e.length!==3||e[0]!==1||typeof e[1]!=`string`||!Array.isArray(e[2]))return null;let n=[];for(let t of e[2]){if(!Array.isArray(t)||t.length!==3||typeof t[0]!=`string`||typeof t[1]!=`string`||t[2]!==`value`&&t[2]!==`checked`)return null;n.push(t)}return{ownerKey:e[1],bindings:n}}catch{return null}}function Ht(e,t){return t===`checked`?e.checked:e.localName===`select`&&e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value}function Ut(e,t){let n=Vt(e);if(n!==null){let r=Nt.get(e.ownerDocument);r===void 0&&Nt.set(e.ownerDocument,r=new Map);for(let[i,a,o]of n.bindings){let s=zt(n.ownerKey,i,a),c=r.get(s);(It.has(e.ownerDocument)||c===void 0||t>=c.revision)&&r.set(s,{revision:t,value:Ht(e,o)})}}let r=Pt.get(e);if(r!==void 0)for(let[t,n]of r)n(Ht(e,t))}function Wt(e,t,n){let r=Pt.get(e);return r===void 0&&Pt.set(e,r=new Map),r.set(t,n),()=>{r.get(t)===n&&(r.delete(t),r.size===0&&Pt.delete(e))}}function Gt(e){return Ft.get(e)??0}function Kt(e){Ft.delete(e)}function qt(e){It.add(e)}function Jt(e,t){It.has(e.ownerDocument)||(Ft.set(e,t),Ut(e,t))}if(typeof globalThis<`u`){let e=globalThis;e.__octanePublishSignalControl=Jt;let t=e.__octaneEarlySignalControls;if(t!==void 0){t.p=Jt;let e=t.q.splice(0);for(let[t,n]of e)Jt(t,n)}}var Yt=new WeakSet;function Xt([e,t,n,r,i,a,,,o],s){return!o&&e.target===t&&t.isConnected&&n.isConnected&&t.ownerDocument===s&&n.ownerDocument===s&&t.closest(`[data-octane-hydrate-independent]`)===n&&n.getAttribute(`data-octane-hydrate-id`)===r&&n.getAttribute(`data-octane-hydrate-when`)===i&&n.getAttribute(`data-octane-hydrate-interaction-events`)===a}function Zt(e){return e!==null&&e.nodeType===1}var Qt=new WeakMap;function $t(e){if(!Zt(e))return null;let t=e.localName;return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?e:null}function en(e){let t=Qt.get(e);if(t===void 0){let n=Gt(e);t={editRevision:n,selectionRevision:0,revision:n,composing:!1},Qt.set(e,t)}return t}function tn(e){let t=$t(e.target);if(t===null)return;let n=en(t);switch(e.type){case`input`:n.editRevision++,n.revision++,Ut(t,n.revision);break;case`compositionstart`:n.composing=!0,n.revision++;break;case`compositionupdate`:n.revision++;break;case`compositionend`:n.composing=!1,n.revision++;break;case`focusin`:case`focusout`:n.revision++}}function nn(e){let t=e.currentTarget,n=$t(t.activeElement);if(n===null)return;let r=en(n);r.selectionRevision++,r.revision++}function rn(e){if($t(e)===null)return null;let t=Qt.get(e),n=t===void 0?Gt(e):0,r=e,i,a,o,s=null,c=null,l=null;if(e.localName===`select`){let e=r;i=e.value,e.multiple&&(o=Array.from(e.selectedOptions,e=>e.value))}else if(e.isContentEditable)i=e.textContent??``;else{i=r.value,e.localName===`input`&&(a=r.checked);try{s=r.selectionStart,c=r.selectionEnd,l=r.selectionDirection}catch{}}return{editRevision:t?.editRevision??n,selectionRevision:t?.selectionRevision??0,revision:t?.revision??n,value:i,...a===void 0?{}:{checked:a},...o===void 0?{}:{selectedValues:o},selectionStart:s,selectionEnd:c,selectionDirection:l,focused:e.ownerDocument.activeElement===e,composing:t?.composing??!1}}function an(e,t){if(e.localName!==`textarea`||typeof t!=`string`||Qt.get(e)?.composing===!0)return!1;let n=e,r=n.defaultValue.replace(/\\r\\n?/g,`\n`);return t.replace(/\\r\\n?/g,`\n`)===r&&n.value!==r}function on(e,t){sn(e.ownerDocument);let n=en(e);return n.revision===t&&(n.editRevision=0,n.selectionRevision=0,Kt(e),!0)}function sn(e){let t=e??(typeof document>`u`?void 0:document);if(t===void 0||Yt.has(t))return;Yt.add(t);let n=t[jt],r=typeof n?.stop==`function`?t.defaultView??t:t,i=r===t?tn:e=>{e.target?.ownerDocument===t&&tn(e)};for(let e of[`input`,`compositionstart`,`compositionupdate`,`compositionend`,`focusin`,`focusout`])r.addEventListener(e,i,!0);t.addEventListener(`selectionchange`,nn,!0),qt(t);for(let e of n?.q??[]){let[n]=e,r=$t(n.target);r!==null&&Xt(e,t)&&(n.type===`input`&&Gt(r)>0||tn(n))}}var cn=Symbol.for(`octane.flags.component`);function ln(e,t,n,r){return Object.defineProperty(e,cn,{value:t}),Object.defineProperty(e,\"name\",{value:n,configurable:!0}),r!==void 0&&Object.defineProperty(e,r,{get(){return this===e}}),e}function un(e,t){return typeof e==`function`&&Ot.call(e,cn)&&(e[cn]&t)===t}var dn=Symbol.for(`octane.element`),fn=Symbol.for(`octane.portal`),pn=Symbol.for(`octane.Fragment`),mn=Symbol.for(`octane.context`),hn=Symbol.for(`octane.suspense`),gn=Symbol.for(`octane.childrenBlock`),_n=Symbol.for(`react.context`);function vn(e,t,n,r,i){let a=t===r;if(!a&&r!==null&&t.nodeType===1){let e=r;do{if(t.contains(e)){a=!0;break}e=e.getRootNode().host}while(e!==void 0)}if(!a){e.insertBefore(t,n);return}let o=e.moveBefore;if(!i&&typeof o==`function`){o.call(e,t,n);return}if(t.parentNode!==e||n!==null&&n.parentNode!==e){e.insertBefore(t,n);return}if(t!==n&&t.nextSibling!==n){if(n===null||(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){let r=t.nextSibling;for(;r!==n;){let n=r.nextSibling;e.insertBefore(r,t),r=n}}else{let r=t.nextSibling,i=n;for(;i!==t;){let t=i.nextSibling;e.insertBefore(i,r),i=t}}}}var yn=new WeakSet;function bn(e){return yn.has(e)}var xn=Symbol.for(`octane.contextIdentities`);function Sn(e){let t=globalThis[xn];t??(t=new WeakSet,globalThis[xn]=t),t.add(e)}var Cn=[];function wn(e){return Cn.push(e),()=>{let t=Cn.indexOf(e);t!==-1&&Cn.splice(t,1)}}var Tn,En;function Dn(e){let t=On,n=We(null);On=void 0;try{return e()}finally{On=t,We(n)}}var On;function kn(e){let t=On;return On=e,t}var An=null;function jn(e){let t=An?.get(e);if(t!==void 0)return t.depth++,t;let n=Ye();if(n===null)return null;let r={hooks:n,depth:1,closed:!1};return(An??=new WeakMap).set(e,r),r}function Mn(e,t){if(t.closed)return;t.closed=!0,An?.get(e)===t&&An.delete(e);let n=t.hooks;t.hooks=null,Xe(n)}function Nn(e,t,n,r){if(t===null||t.closed||--t.depth!==0)return;if(!n){Mn(e,t);return}let i=()=>{if(!(t.depth!==0||t.closed))try{Mn(e,t)}catch(e){r(e)}},a=e.target;e.type===`change`&&a?.localName===`input`&&(a.type===`checkbox`||a.type===`radio`)?setTimeout(i,0):queueMicrotask(i)}function Pn(e){return`Minified Octane error #`+e+`; visit https://octanejs.dev/errors/`+e+` for the full message or use a development build for full errors and additional helpful warnings.`}var Fn=new WeakMap,In=!1,Ln=!1,Rn;function zn(e){let t=e.nodeType===9?e:e.ownerDocument;if(t===null)throw TypeError(Pn(123));let n=Fn.get(t);return n===void 0&&(n=Object.freeze({scopeKey:`octane:document`}),Fn.set(t,n)),Bt(n,t),n}function Bn(e=1){if(e!==1)throw TypeError(Pn(74));Ln=!0,!In&&(In=!0,typeof document<`u`&&ze(()=>zn(document)))}var Vn=Symbol.for(`octane.signal-handle`),Hn=Symbol.for(`octane.signal-binding-read`),Un=Symbol.for(`octane.signal-binding-subscribe`);function Wn(e,t){let n=h(e),r=h(t);return n?r?n+` `+r:n:r}var Gn=new Map;function Kn(e){let t=Gn.get(e);if(t!==void 0)return t;let n=m(e);return Gn.set(e,n),n}function qn(e){return e.hooks??=new Map}function Jn(e,t){(e.cleanups??=[]).push(t)}var Yn=null,Xn=null,Zn=null,Qn=!1,$n=new WeakMap,er,tr=new WeakMap;function nr(e){let t=e;for(;t!==null;){let e=t.__trySlot;if(e!==void 0&&!e.propagateSuspense)return e;t=t.parentBlock}}function rr(e){Qr++;let t=Yn?.pauseLifecycle()??-1;try{Ve(e)}finally{t>=0&&Yn.resumeLifecycle(t),Qr--}}function ir(e,t){let n=e.children;if(n!==null)for(let e of n){if(e.scope===t)return[`scope`,e.key];let n=ir(e.scope,t);if(n!==null)return[`scope`,e.key,...n]}let r=t.block;for(let t=0;t<e.slots.length;t++){let n=e.slots[t];if(typeof n==`object`&&n){if(r.forSlot!==null&&(n===r.forSlot||n.forSlot===r.forSlot))return[`slot`,t,`item`,r.key];if(n.block===r||n.tryBlock===r||n.emptyBlock===r)return[`slot`,t,n.__kind,n.tryBlock===r?`primary`:n.branch,n.emptyBlock===r?`empty`:n.currentIsBodyFn?void 0:n.currentComp,n.prevKey]}}return null}function ar(e,t){if(e===t)return[];let n=tr.get(e),r=n?.parent??e.parent??e.block.parentBlock;for(;r instanceof pl;)r=r.parentBlock;if(r===null)return null;let i=n===void 0?ir(r,e):[`slot`,n.slot,n.kind,n.branch,n.component,n.key];if(i===null)return null;let a=ar(r,t);return a===null?null:a.concat(i)}function or(e,t,n){let r=e.paths;for(let e of t){let t=r.children?.get(e);if(t===void 0){if(!n)return;t={},(r.children??=new Map).set(e,t)}r=t}return r}function sr(e,t,n,r=!1){let i=$n.get(e);if(i){let r=ar(e,t);if(r!==null){let e=n.retrySignalOwners??={paths:{},owners:new Set},t=or(e,r,!0),a=t.owner;t.owner=i,e.owners.add(i),a!==void 0&&a!==i&&(e.owners.delete(a),rr(a))}}if(r)ex(e,e=>sr(e,t,n,!0));else if(e.children!==null)for(let r of e.children)sr(r.scope,t,n)}function cr(e){let t=e.retrySignalOwners;if(t!==void 0){e.retrySignalOwners=void 0;for(let e of t.owners)rr(e)}}function lr(e,t){let n=er;if(ud(t)){let t=e.idState.renderOwner,n=nr(e),r=n?.tryBlock??t?.current,i=n??t;i!==void 0&&r!=null&&(sr(e,r,i,!0),er=i.retrySignalOwners)}try{j(e,I()===null&&!D?.hydrating&&!D?.retainedCreated?.has(e))}finally{er=n}}function ur(e,t,n){for(;e instanceof pl;)e=e.parentBlock;for(let r=0;r<e.slots.length;r++){let i=e.slots[r];if(i===t||i?.forSlot===t){let t=ar(e,n);return t===null?null:t.concat(`slot`,r,`item`)}}if(e.children!==null)for(let r of e.children){let e=ur(r.scope,t,n);if(e!==null)return e}return null}function dr(e,t,n){if(e.owner!==void 0&&(t.owners.delete(e.owner),n.push(e.owner),e.owner=void 0),e.children!==void 0)for(let r of e.children.values())dr(r,t,n)}function fr(e,t,n,r){let i=nr(e),a=e.idState.renderOwner,o=i?.retrySignalOwners??a?.retrySignalOwners,s=i?.retrySignalOwners===void 0?a?.current:i.tryBlock;if(o===void 0||s==null)return;let c=ur(e,t,s),l=c===null?void 0:or(o,c,!1);if(l?.children===void 0)return;let u=e=>{let t=new Set(e),n=[];for(let[e,r]of l.children)t.has(e)||(l.children.delete(e),dr(r,o,n));for(let e of n)rr(e)};if(typeof r!=`function`){u(r);return}if(n===0){u([]);return}let d=new Map,f=!1;return(e,t)=>{f||(d.set(e,t),d.size===n&&(f=!0,u(d.values())))}}function pr(e=1,t=!1){if(e!==1)throw TypeError(w(74));Qn=!0,t||Bn(e)}function mr(e,t){if(e===null)return`null`;let n=typeof e;return n===`string`||n===`number`||n===`bigint`||n===`boolean`?n.charCodeAt(0).toString(36)+`:`+String(e):n===`undefined`?`u:`:{value:e,position:t}}function hr(e,t,n,r,i,a){if(typeof e==`string`)return e;let o=t+JSON.stringify([n??`legacy`,r,i]),s=a.signalState??={prefix:a.prefix,next:0},c=s.opaqueKeys??=new Map,l=c.get(o);l===void 0&&(l={objects:new WeakMap,symbols:new Map,used:new Set,next:0},c.set(o,l));let u=e.value,d=typeof u==`symbol`?l.symbols.get(u):l.objects.get(u);if(d===void 0){if(d=e.position,d===void 0||l.used.has(d)){for(;l.used.has(l.next);)l.next++;d=l.next++}l.used.add(d),typeof u==`symbol`?l.symbols.set(u,d):l.objects.set(u,d)}return`o:`+d.toString(36)}function gr(e){return JSON.stringify([e.signalState?.prefix??e.prefix,`root`])}function _r(e){let t=e.signalInstanceResolved;if(t!==void 0)return t;let n=e.signalInstanceParent;if(n===null)return;let r=yr(n,e.signalInstanceSite,e.signalInstanceValue,e.signalInstanceHasKey);return e.signalInstanceResolved=r,r}function vr(e,t){if(typeof t==`string`){e.signalInstanceResolved=t;return}e.signalInstanceParent=t.parentScope,e.signalInstanceSite=t.invocationSite,e.signalInstanceValue=t.key,e.signalInstanceHasKey=t.hasKey,e.signalInstanceResolved=void 0}function yr(e,t,n,r){let i=_r(e),a=[],o=new Set,s=e;for(;i===void 0&&s!==null;){let e=s.block;o.has(e)||(o.add(e),e.forSlot!==null&&a.push(mr(e.key,e.itemIndex)),i=_r(e)),s=s.parent,i===void 0&&s!==null&&(i=_r(s))}let c=e.block;for(;i===void 0&&c!==null;)o.has(c)||(o.add(c),c.forSlot!==null&&a.push(mr(c.key,c.itemIndex))),i=_r(c),c=c.parentBlock;i??=gr(e.block.idState),a.reverse();let l=e.block.idState,u=a;for(let e of a)if(typeof e!=`string`){u=[];for(let e of a)u.push(hr(e,i,t,u,!1,l));break}return i+JSON.stringify([t??`legacy`,u,r?hr(mr(n),i,t,u,!0,l):``])}function br(e){if(e===null)return;let t=e.block.idState.renderOwner,n=t?.signalOwner;if(n===void 0&&Ln&&(n=zn(e.block.parentNode),t!==void 0&&(t.signalOwner=n)),n===void 0)return;let r=$n.get(e);if((r===void 0||r===!1)&&e.block.forSlot===null&&e.signalInstanceParent===null&&e.signalInstanceResolved===void 0){let t=e.parent??e.block.parentBlock;for(;t!==null&&!(t instanceof pl||t.signalInstanceParent!==null||t.signalInstanceResolved!==void 0);){if(t.block.forSlot?.signalSite!==void 0)return $n.set(e,!1),br(t);t=t.parent??t.block.parentBlock}}let i=r===null;if(!r||r.documentOwner!==n){let a=e.block.idState;r=void 0;let o=nr(e.block),s=o?.retrySignalOwners??t?.retrySignalOwners,c=o?.retrySignalOwners===void 0?t?.current:o.tryBlock;if(s!==void 0&&!i&&!e.block.disposed&&c!=null){let t=ar(e,c),n=t===null?void 0:or(s,t,!1);n?.owner!==void 0&&(r=n.owner,n.owner=void 0,s.owners.delete(r))}if(r===void 0||r.documentOwner!==n){let t={scopeKey:n.scopeKey,documentOwner:n,instanceOwner:e,instanceKey:_r(e)??(e.block.forSlot?.signalSite===void 0?gr(a):yr(e,e.block.forSlot.signalSite,void 0,!1))};t.instanceOwner=t,r=Object.freeze(t)}$n.set(e,r),i&&rr(r)}return Bt(r,e.block.parentNode.ownerDocument),r}function xr(e,t){let n=br(e);return n!==void 0&&Rn?.(n),n===void 0||Le()===n?t():Be(n,t)}function Sr(e){let t=T;return t===null?-1:Yn.beginScope(e,t)}function Cr(e){let t=Vu===0?null:Hu(e);if(t!==null){rl(e,t.block),t.activationRequested&&(t.serverActivationStarted=!1,Cs(t.parentBlock));return}rl(e,e);let n=As?.holdsNativeRead(e)===!0;n&&oi++;try{Cs(e)}finally{n&&oi--}}function wr(e,t,n=!1){let r=Yn;if(r===null)return!1;if(hc?.stageAction(()=>wr(e,t,n))===!0)return!0;let i=r.acceptCapture(e);if(t===void 0)return!1;let a=n&&r.replayDeferredRefs(e,t);return(i||a||r.hasPublication(t))&&r.stampPublication(t,[e.effects[$o],e.effects[es],e.effects[ts],e.events,e.refs]),!1}function Tr(e,t,n){let r=je(t,e.block.idState.renderOwner?.initialDocumentSignals);Jn(e,()=>{r.release(),(!Ra||e.block.idState.renderOwner?.disposed)&&n?.()});let i=e=>{e?r.release():((Zn??=[]).push(r),n?.())};return k===null?i(!1):(k.renderCleanups??=[]).push(i),r}function Er(){let e=Zn;if(e!==null){Zn=null;for(let t of e)t.release()}}function Dr(e,t,n,r){if(e===null||t?.nodeType!==8)return null;let i=(M?.view(t)??t).data;if(!i.startsWith(`oct-native-fresh:`))return null;let a=i.slice(Ce.length);if(!/^(?:0|[1-9]\\d*)$/.test(a))return null;let o=Number(a);return Number.isSafeInteger(o)?(Uu(r,o),ax(t,n),e.node=n,{prefix:r.prefix+`n`+(Fr++).toString(36)+`-`,next:0,renderOwner:r.renderOwner}):null}var Or=0;function kr(e){let t=Or;return Or+=e,t}function Ar(e,t){let n=e.locs;if(n===void 0)return``;let r=n[t];return r===void 0?``:`${e.locFile??`<unknown>`}:${r[0]}:${r[1]}`}function jr(e){return e!==null&&e.__oct_suppress===!0}var Mr=0,Nr=1,Pr=2,Fr=0,Ir=null,T=null,Lr=0,Rr=0,zr=1,Br=[],Vr=1,Hr=0,Ur=new WeakMap,Wr=0,Gr=new WeakMap,Kr=0,qr=-1,Jr=0,Yr=null,Xr=0,Zr=0,Qr=0;function $r(e,t=null){Qr++;let n=Yn?.pauseLifecycle()??-1;try{Ln||t?.block.idState.renderOwner?.signalOwner!==void 0?xr(t,e):e()}finally{n>=0&&Yn.resumeLifecycle(n),Qr--}}function ei(e,t=-1,n=null){let r=qr;qr=t,Kr++;try{$r(e,n)}finally{Kr--,qr=r}}var ti=[],ni=0,ri=!1,ii=!1,ai=!1,oi=0,si=0,ci=null;function li(){ci??={render:E_,commit:j_,dispose:M_,splice:O_,begin:ia,end:aa,beginUrgent:al,endUrgent:ol,holdRoot:ha,retryRoot:ga,commitRoot:_a,discardRoot:va,keepsRoot:ma,cancelEqual:Zi,hasHeld:Xi,heldUpdate:Yi,rebaseHeld:Qi}}var ui=null,di=null;function fi(e){ui.queue(e)}function pi(e){ui.prepare(e)}function mi(e){ui?.retire(e)}function hi(){!ri&&!ii&&(ri=!0,queueMicrotask(Ps))}var gi=null,_i=null,vi=!1;function yi(e){let t=e.native;return t!==void 0&&!t.validate()&&(t.hasWrites()?t.rebase():(t.discard(),t=void 0)),t??=e.native=Tn?.(),t!==void 0&&ui===null&&(ui=En({get attempt(){return di},set attempt(e){di=e},get visibility(){return As},get rollback(){return Ra},get fallbackTimeout(){return Qv},schedule:hi,beginRoot:Va,endRoot:Ha,beginAttempt:ia,endAttempt:aa,invalidate:rl,render:A,journal:Do,journalProperty:O,isSuspense:ud,releaseHookHolder:Ii,rebaseUpdate:Ci,flushBatch:Ei,currentPresentations:mf,validateCapture:e=>Yn===null||Yn.validateCapture(e),acceptCapture:wr,commitRoots:io,rollbackRoot:no,applyMemoSwap:ca,handleError:zb,reportError:Mb,unsupportedError:()=>TypeError(w(79))})),t}function bi(){vi||=!0}function xi(){return{updates:new Map,pendingActions:0,closed:!1,flushed:!1,hook:null,hooks:null,hooksPending:!1}}function Si(){return gi===null?ii||nh>0?null:_i:gi}function Ci(e){if(e.state!==void 0||e.reducer!==void 0||Object.is(e.baseValue,e.slot.value))return e.value;let t=e.slot.value;for(let n of e.operations)t=n(t);return e.baseValue=e.slot.value,e.value=t,e.slot.pendingActionBatch!==void 0&&(e.slot.pendingActionValue=t),t}function wi(e,t){let n=Si();if(n===null)return e.value;let r=n.updates.get(e);if(r!==void 0)return Ci(r);if(e.renderTransition!==void 0)return e.renderTransition.value;let i=t===void 0?void 0:ci?.heldUpdate(e,t);return i===void 0?e.value:i.value}function Ti(e,t,n,r,i=!1){let a=Si();if(a===null)return null;let o=typeof n==`function`?n:()=>n,s=a.updates.get(e);return s===void 0?(s={batch:a,slot:e,block:t,operations:[o],baseValue:e.value,value:r,forceRender:i},a.updates.set(e,s)):(s.operations.push(o),s.value=r,s.forceRender||=i),e.pendingActionBatch=a,e.pendingActionValue=r,s}function Ei(e){if(!e.flushed){if(e.native!==void 0){if(e.native.hasWrites()){Fi(e,e),fi(e),_i===e&&(_i=null);return}e.native.discard(),e.native=void 0}e.flushed=!0;for(let t of e.updates.values()){let{slot:n,block:r,forceRender:i}=t,a=t.state===void 0&&t.reducer===void 0?Ci(t):t.value;if(n.pendingActionBatch===e&&(n.pendingActionBatch=void 0,n.pendingActionValue=void 0),r.disposed)continue;let o=t.state,s=t.reducer,c=o?.renderTransition??s?.renderTransition;(o!==void 0||s!==void 0)&&(t.baseValue=c===void 0?n.value:c.baseValue,o===void 0?s!==void 0&&(s.renderPhaseActions=void 0):o.updates=void 0);let l=!Object.is(n.value,a);(l||i||t.previous!==void 0)&&(l&&(n.value=a),t.reducer!==void 0&&(t.reducer.renderTransition=t),t.state!==void 0&&(t.state.renderTransition=t),Cs(r))}if(e.updates.size>0){let t=[];for(let n of e.updates.values())n.block.disposed||t.push(n);t.length>0&&Wi.push(t)}e.updates.clear(),_i===e&&(_i=null)}}function Di(e){e.closed&&e.pendingActions===0&&Ei(e)}var Oi=!1,ki=0,Ai=new Set,ji=null;function Mi(e,t){if(e.hook===null)e.hook=t;else if(e.hook!==t){let n=e.hooks;if(n===null)e.hooks=[t];else if(n.includes(t))return;else n.push(t)}else return;e.hooksPending&&(t.pendingBatches++,t.publish(!0))}function Ni(e){let t=e.hook;if(t===null||e.hooksPending)return;e.hooksPending=!0,t.pendingBatches++,t.publish(!0);let n=e.hooks;if(n!==null)for(let e=0;e<n.length;e++)n[e].pendingBatches++,n[e].publish(!0)}function Pi(e){if(!e.workComplete||e.pendingActions!==0||(e.pendingHolds??0)!==0||!e.hooksPending)return;e.hooksPending=!1;let t=e.hook;--t.pendingBatches===0&&t.publish(!1);let n=e.hooks;if(n!==null)for(let e=0;e<n.length;e++)--n[e].pendingBatches===0&&n[e].publish(!1)}function Fi(e,t){if(t.hook===null)return;let n=ji??=new WeakMap,r=n.get(e);r===void 0&&n.set(e,r=new Set),!r.has(t)&&(r.add(t),t.pendingHolds=(t.pendingHolds??0)+1,Ni(t))}function Ii(e){let t=ji?.get(e);if(t!==void 0){ji.delete(e);for(let e of t)e.pendingHolds--,Pi(e)}}function Li(e,t){for(let n of Wi)for(let r of n)r.batch!==void 0&&Od(r.block,t)&&Fi(e,r.batch)}var Ri=0,zi=new Set,Bi=new Set,Vi=!1,Hi=!1,Ui=null,Wi=[],Gi=null;function Ki(e){return oi===0&&(T!==e||e.currentRenderMode!==`transition`)&&(ii||nh>0||si===0)}function qi(e){for(;e.next?.batch?.flushed===!0&&!e.next.superseded;)e=e.next;return e}function Ji(e,t){if(Ki(t))return Yi(e,t)}function Yi(e,t){if(t.disposed)return;let n=t.idState.renderOwner?.transition;if(Gi===null&&n===void 0&&Wi.length===0)return;let r=[Gi?.entries,n?.entries];for(let t of r)if(t!==void 0)for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.slot===e&&!r.superseded&&Object.is(e.value,r.baseValue))return qi(r)}for(let t=Wi.length-1;t>=0;t--){let n=Wi[t];for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.slot===e&&!r.superseded&&Object.is(e.value,r.baseValue)&&(r.state===void 0&&r.reducer===void 0||e.renderTransition!==void 0))return qi(r)}}}function Xi(e,t){return Ji(e,t)!==void 0}function Zi(e,t){if(!Ki(t))return!1;let n=t.idState.renderOwner?.transition;if(Gi===null&&n===void 0&&Wi.length===0)return!1;let r=!1,i=t=>{if(t!==void 0)for(let n of t)n.slot===e&&!n.superseded&&(n.superseded=!0,r=!0)};i(Gi?.entries),i(n?.entries);for(let e of Wi)i(e);return r}function Qi(e,t,n,r){let i=Ji(e,t);if(i===void 0||e.pendingActionBatch?.flushed===!1)return;let a=i.value;for(let e of n)a=r?r(a,e):typeof e==`function`?e(a):e;if(Object.is(a,i.baseValue)){Zi(e,t);return}let o=!Object.is(a,i.value);for(let e=i;e;e=e.previous)e.value=a;for(let e of n)i.operations.push(r?t=>r(t,e):typeof e==`function`?e:()=>e);o&&$i(i,t)}function $i(e,t){let n=Gi;if(n!==null&&n.entries.includes(e)){if(n.replayScheduled)return;n.replayScheduled=!0,queueMicrotask(()=>{Gi===n&&(n.replayScheduled=!1,da())});return}let r=t.idState.renderOwner,i=r?.transition;i!==void 0&&i.entries.includes(e)&&!i.replayScheduled&&(i.replayScheduled=!0,queueMicrotask(()=>{r.transition===i&&(i.replayScheduled=!1,ga(r))}))}var ea=null,ta=null;function na(e){let t=[];for(let n=Wi.length-1;n>=0;n--){let r=Wi[n],i=!0;for(let t=0;t<r.length;t++)if(r[t].block!==e){i=!1;break}if(i){for(let e=0;e<r.length;e++)t.push(r[e]);Wi.splice(n,1)}}return t}function ra(e,t){if(t!==null)for(let e=0;e<t.length;e++)t[e].taken=!1;let n=e=>{let r=e.block.__warmCache;if(r!==void 0)for(let[e,n]of r)for(let r=0;r<n.length;r++){let i=n[r];if(i.available){let n={slot:e,deps:i.deps,value:i.value,taken:!1};i.nativeWitness!==void 0&&(n.nativeWitness=i.nativeWitness),(t??=[]).push(n)}}ex(e,n)};return n(e),t}function ia(e){let t=e.idState.renderOwner;if(t?.transition!==void 0&&!t.transition.promoted&&!pa(t.transition)&&va(t),e.pendingMode!==`transition`||Ui!==null)return null;E??=[],ka??=new Map,ja.push(Aa),Pa.push(Ma),Aa=E.length,Ma=++Na,Fa++;let n=k,r=n?.effects??ns,i={origin:e,capture:n,journalCheckpoint:E.length,effects:[r[0].length,r[1].length,r[2].length],effectEvents:(n?.events??rs).length,effectEventActions:(n?.eventActions??is).length,stores:(n?.stores??ss).length,refAttach:(n?.refs??cs).length,refDetach:n===null?ec.length:n.detaches?.length??0,effectDeps:D===null?fb(e):null,heldSlots:null,memoSwaps:null};return Ui=i,i}function aa(e){if(e===null)return;Ui=null;let t=e.heldSlots;(t===null||t.size===0)&&(ea=null,ta=null);let n=null;if(t!==null&&t.size>0&&(n=na(e.origin)),t!==null&&t.size>0&&n!==null&&n.length>0){Xo(e.journalCheckpoint,e.origin);let r=e.capture,i=r?.effects??ns;for(let t=0;t<3;t++)i[t].length=e.effects[t];(r?.events??rs).length=e.effectEvents,(r?.eventActions??is).length=e.effectEventActions;let a=r?.stores??ss;for(let t=e.stores;t<a.length;t++)a[t].queued=!1;a.length=e.stores,(r?.refs??cs).length=e.refAttach,r===null?ec.length=e.refDetach:r.detaches!==void 0&&(r.detaches.length=e.refDetach),e.effectDeps!==null&&pb(e.origin,e.effectDeps);let o=ea!==null||ta!==null,s=e.memoSwaps;if(o)ea!==null&&(s=s===null?ea:ea.concat(s),ea=null);else if(s!==null)for(let e=s.length-1;e>=0;e--)ca(s[e],!1);for(let e=0;e<n.length;e++)n[e].slot.value=n[e].baseValue;let c=ra(e.origin,ta);ta=null,Gi={origin:e.origin,entries:n,memoSwaps:s,warmHarvest:c,holders:new Set(t)},o||Cs(e.origin)}Aa=ja.pop(),Ma=Pa.pop(),--Fa===0&&(E=null,ka=null,Jo())}function oa(e,t,n){let r=Ui;if(r===null)return;let i=qn(e);(r.memoSwaps??=[]).push([0,i,t,i.get(t),n])}function sa(e,t,n){let r=Ui;r!==null&&(r.memoSwaps??=[]).push([1,e,t,e.slice(t,t+n.length),n])}function ca(e,t){if(e[0]===0){let n=t?e[4]:e[3];!t&&n===void 0?e[1].delete(e[2]):e[1].set(e[2],n);return}let n=t?e[4]:e[3];for(let t=0;t<n.length;t++)e[1][e[2]+t]=n[t]}function la(e){let t=Gi;if(t===null||!t.holders.has(e))return!1;for(let e=0;e<t.entries.length;e++){let n=t.entries[e];if(n.superseded||!Object.is(n.slot.value,n.baseValue))return!1}return!0}function ua(e){for(let t of e)if(!t.superseded&&t.slot.pendingActionBatch?.flushed===!1)return!0;return!1}function da(){let e=Gi;if(e===null||ua(e.entries))return!1;Gi=null;let t=[];for(let n=0;n<e.entries.length;n++){let r=e.entries[n];!r.superseded&&Object.is(r.slot.value,r.baseValue)&&(r.slot.value=r.value,r.block.disposed||t.push(r))}if(t.length===0)return ea=null,ta=null,!1;let n=e.memoSwaps;if(n!==null){for(let e=0;e<n.length;e++)ca(n[e],!0);ea=ea===null?n:ea.concat(n)}ta=e.warmHarvest,oi++;try{for(let e=0;e<t.length;e++)Cs(t[e].block)}finally{oi--}return Wi.push(t),!0}function fa(e){let t=Gi;t!==null&&t.holders.delete(e)&&t.holders.size===0&&(Gi=null,ea=null,ta=null)}function pa(e){for(let t=0;t<e.entries.length;t++){let n=e.entries[t];if(n.superseded||!Object.is(n.slot.value,n.baseValue))return!1}return!0}function ma(e,t=!1){let n=e.transition;return n!==void 0&&!n.origin.disposed&&(n.promoted?t:pa(n))}function ha(e,t,n){let r=e.transition;if(n===null||!n.origin.mounted||n.origin.disposed||Qa(t,n.origin)||n.heldSlots!==null&&n.heldSlots.size!==0)return r!==void 0&&!pa(r)&&va(e),!1;let i=r?.promoted===!0,a=i?r.origin:n.origin;if(a.idState.renderOwner!==e||!Od(n.origin,a))return!1;let o=na(a);if(o.length===0)return r!==void 0&&!pa(r)&&va(e),!1;if(no(t),e.disposed||a.disposed)return va(e),!0;let s=n.memoSwaps;if(i)r.memoSwaps!==null&&(s=s===null?r.memoSwaps:r.memoSwaps.concat(s));else if(s!==null)for(let e=s.length-1;e>=0;e--)ca(s[e],!1);for(let e=0;e<o.length;e++)o[e].slot.value=o[e].baseValue;e.transition={origin:a,entries:o,memoSwaps:s,warmHarvest:ra(a,i?r.warmHarvest:null),promoted:!1,cue:!i};for(let t of o)t.batch!==void 0&&Fi(e,t.batch);return(r===void 0||r.promoted)&&Qo(1),!0}function ga(e){let t=e.transition;if(t===void 0)return!1;if(t.origin.disposed||!pa(t))return va(e),!1;if(ua(t.entries))return!0;if(t.promoted=!0,t.cue=!1,t.memoSwaps!==null)for(let e=0;e<t.memoSwaps.length;e++)ca(t.memoSwaps[e],!0);oi++;try{Qo(-1),Ii(e);for(let e=0;e<t.entries.length;e++){let n=t.entries[e];n.slot.value=n.value,n.block.disposed||Cs(n.block)}Wi.push(t.entries),e.retry()}finally{oi--}return!0}function _a(e,t){let n=e.transition;if(n!==void 0){if(e.disposed||n.origin.disposed){va(e);return}if(t.aborted){n.cue&&e.transaction===null&&(n.cue=!1,Cs(n.origin));return}(n.promoted||!pa(n))&&va(e)}}function va(e){let t=e.transition;t!==void 0&&(e.transition=void 0,e.wakeable=null,e.generation++,t.promoted||Qo(-1),Ii(e))}var ya=0,ba=1,xa=2,Sa=3,Ca=4,wa=5,Ta=6,Ea=7,Da=8,Oa=9,E=null,ka=null,Aa=0,ja=[],Ma=0,Na=0,Pa=[],Fa=0,Ia=!1,D=null,La=[],Ra=!1,za=0;function Ba(e,t=!1){let n=e.block.idState.renderOwner;return n===void 0||n.disposed||t&&!n.transaction?.rootRequest?null:n.retryKey??={}}function Va(e){if(e===void 0||D===e.transaction&&D!==null)return null;let t=e.transaction;if(t===null){e.nativeRetry?.clear();let n=ds();n.rootTransaction=!0,t={owner:e,log:[],bags:new Map,capture:n,created:null,createdStamp:++za,bagWindow:++Na,retainedCreated:null,retired:null,structures:null,commit:null,parked:null,aborted:!1,rootRequest:!1},e.transaction=t,La.push(t)}let n={transaction:t,previous:D,log:E,bags:ka,checkpoint:Aa,bagWindow:Ma,depth:Fa,parked:Po,capture:k};return hc?.recordRootTransaction(t),D=t,E=t.log,ka=t.bags,Aa=0,Ma=t.bagWindow,Fa=1,Po=t.parked,k=t.capture,n}function Ha(e){e!==null&&(e.transaction.parked=Po,D=e.previous,E=e.log,ka=e.bags,Aa=e.checkpoint,Ma=e.bagWindow,Fa=e.depth,Po=e.parked,k=e.capture)}function Ua(e){E.push(Ta,e,null,null)}function O(e,t,n){D===null||Ra||E.push(Sa,e,t,n)}function Wa(e,t,n,r){let i=D;if(i===null||i.aborted||Ra)return;let a=i.structures??=new Map;(a.get(e)??-1)>=Aa||(a.set(e,E.length),Do(e),Ua(()=>{a.delete(e)}),lf?.revision===void 0&&Ga(t,n,r))}function Ga(e,t,n){let r=D?.owner.bindingLeases,i=[];for(let r=t===null?P(e):F(t);r!==null&&r!==n;r=F(r))i.push(r);Ua(()=>{let a=i;for(let t of r??[]){if(t.end===void 0||!t.active())continue;let n=e;for(;n!==null&&n.parentNode!==t.root.parentNode;)n=n.parentNode;for(let e=t.root;e!==null;e=e.nextSibling){if(e===n)return;if(e===t.end)break}let r=a.indexOf(t.root),i=a.indexOf(t.end);if(r<0||i<r||t.root.parentNode!==e)continue;let o=[];for(let e=t.root;e!==null&&(o.push(e),e!==t.end);e=e.nextSibling);a=[...a.slice(0,r),...o,...a.slice(i+1)]}if(t!==null&&(M?.view(t)??t).parentNode!==e||n!==null&&(M?.view(n)??n).parentNode!==e)return;let o=t!==null&&(M?.view(t)??t).parentNode===e?F(t):P(e),s=n!==null&&(M?.view(n)??n).parentNode===e?n:null,c=new Set(a);for(;o!==null&&o!==s;){let t=F(o);c.has(o)||(M?.view(e)??e).removeChild(o),o=t}qa(e,a,s)})}function Ka(e){let t=D;if(t===null||Ra)return;let n=t.structures??=new Map;(n.get(e)??-1)>=Aa||(n.set(e,E.length),Ua(()=>{n.delete(e)}),Ga(e,null,null))}function qa(e,t,n){for(let r=t.length-1;r>=0;r--){let i=t[r];((M?.view(i)??i).parentNode!==e||F(i)!==n)&&(Vs===null?(M?.view(e)??e).insertBefore(i,n):(qs(e,Vs),Ex(e,i,n,Vs))),n=i}}function Ja(e){let t=D;if(t===null||t.aborted||Ra||e.idState.renderOwner!==t.owner)return;let n=t.retired??=new Set;n.has(e)||(n.add(e),E.push(Ea,n,e,null)),e.pending&&=(O(e,`pending`,e.pending),!1)}function Ya(e,t,n,r,i){Ja(e),Xa(t,n,r,()=>{e.disposed||j(e,!1)},i)}function Xa(e,t,n,r,i){let a=[];if(t!==null&&n!==null)for(let e=t;e!==null&&(a.push(e),e!==n);e=F(e));let o=!1;Ua(()=>{o=!0}),(D.commit??=[]).push(()=>{if(!o){r?.();for(let t of a)(M?.view(t)??t).parentNode===e&&(M?.view(e)??e).removeChild(t);i?.()}})}function Za(e,t){let n=D;if(n===null||n.aborted||Ra||e.idState.renderOwner!==n.owner||!e.mounted||Qa(n,e))return!1;Ja(e);let r=e.startMarker,i=e.endMarker,a=[],o=null,s=null;if(r!==null&&i!==null&&(M?.view(r)??r).parentNode!==null){o=(M?.view(r)??r).parentNode;let n=e.exclusiveMarkers||!t&&r!==i;s=n?i:F(i);for(let e=n?F(r):r;e!==null&&e!==s;e=F(e))a.push(e)}else if(e.kind===`root`){o=e.parentNode;for(let e=P(o);e!==null;e=F(e))a.push(e)}let c=!1;Ua(()=>{if(c=!0,o!==null){let e=(M?.view(s)??s)?.parentNode===o?s:null;qa(o,a,e)}});let l=rc;if((n.commit??=[]).push(()=>{if(c||e.disposed)return;if(o!==null){let e=(M?.view(s)??s)?.parentNode===o?s:null;for(let t of a)(M?.view(t)??t).parentNode!==o&&(M?.view(o)??o).insertBefore(t,e)}let t=rc;rc=l;try{j(e,!1)}finally{rc=t}if(o!==null)for(let e of a)(M?.view(e)??e).parentNode===o&&(M?.view(o)??o).removeChild(e)}),t&&o!==null)for(let e of a)(M?.view(o)??o).removeChild(e);return!0}function Qa(e,t){return t.createdStamp===e.createdStamp}function $a(e,t){let n=ec.length;j(e,(!t.hydrating||e.kind===`portal`)&&!t.retainedCreated?.has(e)),ec.length=n}function eo(e){let t=D;t===null||Ra||Qa(t,e)||(e.createdStamp=t.createdStamp,lf?.revision!==void 0&&to(e),(t.created??=[]).push(e),E.push(Ca,e,t,null))}function to(e){D!==null&&(D.retainedCreated??=new Set).add(e)}function no(e){if(e.aborted)return;e.aborted=!0,e.owner.retrySignalOwners!==void 0&&e.owner.retrySignalOwners!==er&&cr(e.owner);let t=Va(e.owner),n=Ra;Ra=!0;try{let t=e.owner.current;if(t!==null)Xo(0,t);else{for(let t=e.log.length-4;t>=0;t-=4)if(e.log[t]===Ta)e.log[t+1]();else if(e.log[t]===Ca)$a(e.log[t+1],e.log[t+2]);else if(e.log[t]===Ea)e.log[t+1].delete(e.log[t+2]);else if(e.log[t]===Oa){let n=e.log[t+1],r=e.log[t+2],i=e.log[t+3];i===void 0?n.delete(r):n.set(r,i)}e.log.length=0}k_(e.capture),e.commit=null;let n=ec.length;Jo(),ec.length=n}finally{Ra=n,Ha(t)}}function ro(e){for(let t of e.bindingLeases){let n=t.host!==void 0&&!t.active()?uf.get(t):void 0;if(!(n===void 0?e.bindingContainer.contains(t.anchor):!n.scope.block.disposed)){e.bindingLeases.delete(t),uf.delete(t),$e(t);try{t.retire()}catch(t){Ix(e.current,t)||console.error(t)}}}}function io(){let e=La;if(e.length!==0){La=[];for(let t of e){let e=t.owner,n=hc?.enterRootCommit(e);try{if(t.aborted||e.disposed){e.transaction===t&&(e.transaction=null),e.transition!==void 0&&ci.commitRoot(e,t);continue}if(!t.nativeAdmitted&&(!mf(t.capture)||Yn!==null&&!Yn.validateCapture(t.capture))){let n=!mf(t.capture);no(t),e.transaction===t&&(e.transaction=null),e.disposed||(e.wakeable=null,e.generation++,n?hf(t.capture):e.retry());continue}e.transaction===t&&(e.transaction=null),t.capture.presentations!==void 0&&gc!==null&&(_c(gc,e),gc.owners.get(e).presentation=t),t.rootRequest&&(e.transition===void 0||!ci.keepsRoot(e))&&(e.wakeable=null,e.generation++),e.wakeable===null&&(e.retryKey=null,e.nativeRetry?.clear(),e.retrySignalOwners!==void 0&&cr(e));let n=wr(t.capture,e,!0),r=e.generation,i=t.commit;if(i!==null)for(let t of i){if(e.disposed||e.generation!==r)break;t()}let a=t.parked;if(a!==null)for(let t of a){if(e.disposed||e.generation!==r)break;Yo(t)}if(Yn!==null&&hc?.stageAction(()=>Yn.pruneDeferredRefs(e))!==!0&&Yn.pruneDeferredRefs(e),e.disposed||e.generation!==r){k_(t.capture);continue}D_(t.capture,n),e.bindingLeases!==void 0&&e.bindingLeases.size>0&&hc?.stageAction(()=>ro(e))!==!0&&ro(e),e.transition!==void 0&&ci.commitRoot(e,t)}finally{n?.()}}}}function ao(e,t,n){let r=e.idState.renderOwner;if(r===void 0||r.disposed)return!1;let i=r.transaction;if(i===null)return!1;if(ci===null||!ci.holdRoot(r,i,n)){if(_d&&i.created!==null)for(let e of i.created)(e.parentBlock===null||!Qa(i,e.parentBlock))&&Dd(e);let e=er,t=r.current;if(t!==null&&i.created!==null&&r.signalOwner!==void 0){for(let e of i.created)e.disposed||sr(e,t,r);er=r.retrySignalOwners}try{no(i)}finally{er=e}}r.wakeable=t;let a=++r.generation,o=!1,s=()=>{o||(o=!0,queueMicrotask(()=>{r.disposed||r.generation!==a||r.wakeable!==t||(r.wakeable=null,(r.transition===void 0||!ci.retryRoot(r))&&r.retry())}))};return t.then(s,s),!0}var oo=Symbol();function so(e){return{...e}}function co(e){return{...e}}function lo(e){return{...e}}function uo(e){return{...e}}function fo(e){return{...e}}function po(e){return{...e}}function mo(e){return{...e}}function ho(e){return{...e}}function go(e){return{...e}}function _o(e){return{...e}}function vo(e){return{...e}}function yo(e){return{...e}}function bo(e){return{...e}}function xo(e){return{...e}}function So(e){return{...e}}function Co(e){return{...e}}function wo(e){return{...e}}function To(e,t){switch(t){case 0:return so(e);case 1:return co(e);case 2:return lo(e);case 3:return uo(e);case 4:return fo(e);case 5:return po(e);case 6:return mo(e);case 7:return ho(e);case 8:return go(e);case 9:return _o(e);case 10:return vo(e);case 11:return yo(e);case 12:return bo(e);case 13:return xo(e);case 14:return So(e);case 15:return Co(e);case 16:return wo(e);default:return{...e}}}function Eo(){let e=Ir;if(e===null)return;let t=D;if(t!==null&&!t.hydrating&&t.retainedCreated===null&&Fa===1&&e.block.createdStamp===t.createdStamp)return;let n=e.slots[0];if(typeof n!=`object`||!n)return;let r=n[oo];if(r!==void 0){let e=Ma;if(n.__journalWindow===e)return;let t=To(n,r);E.push(xa,n,t,null),n.__journalWindow=e;return}n.__kind===void 0&&Do(n)}function Do(e){let t=ka;(t.get(e)??-1)>=Aa||(t.set(e,E.length),E.push(xa,e,{...e},Array.isArray(e)?e.length:null))}function Oo(e){if(D!==null&&e.ownerDocument.activeElement===e){let t=(M?.view(e)??e).selectionStart,n=(M?.view(e)??e).selectionEnd,r=(M?.view(e)??e).selectionDirection;t!==null&&n!==null&&Ua(()=>(M?.view(e)??e).setSelectionRange(t,n,r??void 0))}}function ko(e,t,n){t===`value`&&Oo(e);let r=E;r.push(Sa,e,t,(M?.view(e)??e)[t]),r.push(Sa,e,n,(M?.view(e)??e)[n]);let i=lg(e);i!==void 0&&Do(i);let a=e;t===`checked`&&(M?.view(a)??a).type===`radio`&&(M?.view(a)??a).name!==``&&Mo(a),Eo()}function Ao(e){Oo(e),e.localName===`textarea`?(D===null?E.push(Sa,e,`defaultValue`,(M?.view(e)??e).defaultValue):Ka(e),Eo()):Go(e,`value`)}function jo(e){let t=(M?.view(e)??e).form;if(t!==null)return(M?.view(t)??t).elements;let n=(M?.view(e)??e).getRootNode();return n.nodeType===9?(M?.view(n)??n).getElementsByName((M?.view(e)??e).name):(M?.view(n)??n).querySelectorAll(`input[type=\"radio\"]`)}function Mo(e){let t=(M?.view(e)??e).name,n=jo(e);for(let r=0;r<n.length;r++){let i=n[r];i!==e&&(M?.view(i)??i).checked&&i.localName===`input`&&(M?.view(i)??i).type===`radio`&&(M?.view(i)??i).name===t&&(M?.view(i)??i).form===(M?.view(e)??e).form&&E.push(Sa,i,`checked`,!0)}}function No(e,t){E.push(Sa,e,`selected`,(M?.view(e)??e).selected),t&&E.push(Sa,e,`defaultSelected`,(M?.view(e)??e).defaultSelected)}var Po=null;function Fo(e,t){let n=Po;if(n!==null)for(let r of n){let n=r.block;if(n.forSlot===e||n.exclusiveMarkers&&n.startMarker===e.start&&n.endMarker===e.end)for(let e of r.nodes)(t??=new Set).add(e)}let r=D.retired;if(r!==null)for(let n of r){if(n.forSlot!==e)continue;let r=n.startMarker;r!==null&&r===n.endMarker&&(t??=new Set).add(r)}return t}function Io(e,t){let n=D!==null&&!Ra;n&&Ja(e);let r=t!==void 0&&n?Fo(t,null):null,i=[],a=e.startMarker,o=e.endMarker;if(a&&o){let t=(M?.view(a)??a).parentNode;if(t!==null){let s=e.exclusiveMarkers,c=s?F(a):a,l=s?o:F(o);if(r===null)for(;c!==null&&c!==l;){let e=F(c);n||(M?.view(t)??t).removeChild(c),i.push(c),c=e}else for(;c!==null&&c!==l;){let e=F(c);r.has(c)||(n||(M?.view(t)??t).removeChild(c),i.push(c)),c=e}}}(Po??=[]).push({block:e,nodes:i})}function Lo(){return E!==null}function Ro(e){return E!==null&&ka.has(e)}function zo(e){let t=ka;if((t.get(e)??-1)>=Aa)return;if(t.set(e,E.length),D!==null&&(D.hydrating===!0&&I()!==null||e.adopt!==null)){Ua(()=>{t.delete(e)}),Ga(N(e.start).parentNode,e.start,e.end);return}let n=[];for(let t=e.head;t!==null;t=t.nextSibling)n.push(t);let r=null,i=0;for(let t of e.items.values())r===null&&n[i]!==t&&(r=n.slice(0,i)),r?.push(t),i++;r===null&&i!==n.length&&(r=n.slice(0,i));let a={empty:e.emptyBlock,mapOrder:r};Ua(()=>{Vo(e,a,n),ka.delete(e)})}function Bo(e){let t=ka,n=e.items;t.set(e,E.length);let r={head:e.head,tail:e.tail,size:e.size,empty:e.emptyBlock,entries:n};Ua(()=>{Vo(e,r,null),t.delete(e)}),e.items=new Map}function Vo(e,t,n){let r=n===null?t.entries:null,i=n===null?null:new Set(n);for(let t=e.head;t!==null;t=t.nextSibling)(r!==null||!i.has(t))&&j(t,!1);if(N(e.end).parentNode===null)return;if(e.head=n===null?t.head:n[0]??null,e.tail=n===null?t.tail:n[n.length-1]??null,e.size=n===null?t.size:n.length,r!==null)e.items=r;else{let r=n;e.items.clear();for(let e=0;e<r.length;e++){let t=r[e];t.nextSibling=r[e+1]??null,t.prevSibling=r[e-1]??null}let i=t.mapOrder??r;for(let t=0;t<i.length;t++){let n=i[t];e.items.set(n.key,n)}}let a=[];for(let t=e.head;t!==null;t=t.nextSibling){let e=Ho(t);if(e!==null)for(let t of e)a.push(t);else if(t.startMarker!==null&&t.startMarker===t.endMarker)a.push(t.startMarker);else for(let e of Uo(t))a.push(e)}if(e.emptyBlock!==t.empty&&(e.emptyBlock!==null&&j(e.emptyBlock,!1),e.emptyBlock=t.empty),N(e.end).parentNode===null)return;if(t.empty!==null){let e=Ho(t.empty)??Uo(t.empty);for(let t of e)a.push(t)}let o=N(e.end).parentNode,s=new Set(a);D!==null&&Fo(e,s);let c=F(e.start);for(;c!==null&&c!==e.end;){let e=F(c);s.has(c)||(M?.view(o)??o).removeChild(c),c=e}let l=e.end;for(let e=a.length-1;e>=0;e--){let t=a[e];((M?.view(t)??t).parentNode!==o||F(t)!==l)&&(Vs===null?(M?.view(o)??o).insertBefore(t,l):Ex(o,t,l,Vs)),l=t}}function Ho(e){let t=Po;if(t===null)return null;for(let n=0;n<t.length;n++)if(t[n].block===e){let e=t[n].nodes;return t.splice(n,1),e}return null}function Uo(e){let t=[],n=e.startMarker,r=e.endMarker;if(!n||!r||(M?.view(n)??n).parentNode===null)return t;let i=e.exclusiveMarkers,a=i?F(n):n,o=i?r:F(r);for(;a!==null&&a!==o;)t.push(a),a=F(a);return t}function Wo(e,t){E.push(ya,e,t,null),Eo()}function Go(e,t){E.push(ba,e,t,(M?.view(e)??e).getAttribute(t)),Eo()}function Ko(e){return!e.hasResolved||e.hiddenDom!==null||!(e.transitionHeld||(e.tryBlock?.pendingMode??T?.currentRenderMode)===`transition`)?-1:(E??=[],ka??=new Map,ja.push(Aa),Pa.push(Ma),Aa=E.length,Ma=++Na,Fa++,E.length)}function qo(e){e<0||(Aa=ja.pop(),Ma=Pa.pop(),--Fa===0&&(E=null,ka=null,Jo()))}function Jo(){let e=Po;if(e!==null){Po=null;for(let t=0;t<e.length;t++)Yo(e[t])}}function Yo(e){try{j(e.block,!1)}finally{for(let t of e.nodes)(M?.view(t)??t).parentNode!==null&&N((M?.view(t)??t).parentNode).removeChild(t)}}function Xo(e,t){if(e<0)return;let n=E;if(n===null)return;let r=Ia;Ia=!0;try{for(let r=n.length-4;r>=e;r-=4){let e=n[r+1],i=n[r+2],a=n[r+3];switch(n[r]){case ya:(M?.view(e)??e).nodeValue=i;break;case ba:a===null?(M?.view(e)??e).removeAttribute(i):(M?.view(e)??e).setAttribute(i,a);break;case Sa:(M!==null&&e?.nodeType!==void 0?M?.view(e)??e:e)[i]=a;break;case Da:e.extra=a,e.props=i;break;case Ca:$a(e,i);break;case Ea:e.delete(i);break;case wa:!e.disposed&&(e===t||Tc(t,e))&&rl(e,t);break;case Ta:e();break;case Oa:a===void 0?e.delete(i):e.set(i,a);break;default:for(let t of Reflect.ownKeys(e))!Object.prototype.hasOwnProperty.call(i,t)&&Object.prototype.propertyIsEnumerable.call(e,t)&&delete e[t];for(let t of Reflect.ownKeys(i))(typeof t!=`symbol`||!Reflect.set(e,t,i[t])&&!Object.is(e[t],i[t]))&&(e[t]=i[t]);a!==null&&(e.length=a),ka.delete(e)}}n.length=e}finally{Ia=r}}var Zo=null;function Qo(e){ki+=e,ki<0&&(ki=0),Ri++;try{for(let e of Ai)try{e()}catch(e){console.error(e)}}finally{Ri--}}var $o=0,es=1,ts=2,ns=[[],[],[]],rs=[],is=[],as=!1,os=0,ss=[],cs=[];function ls(e){e._reapply(),fp(e._currentRef,e)}var k=null,us=null;function ds(){return{rootTransaction:!1,renderRoot:null,renderedBlocks:null,effects:[[],[],[]],events:[],eventActions:[],refs:[],detaches:void 0,stores:[],suspenseCommits:void 0,renderCleanups:void 0}}var fs=rs,ps=is,ms=new Set;function hs(){if(ms.size!==0)for(let e of ms)e._reapply()}var gs=0,_s=null,vs=50,ys=0;function bs(){return Kr>0||Xr>0||Zr>0}var xs=class extends Error{};function Ss(){return new xs(w(1))}function Cs(e){if(e.disposed)return;let t=T===e;T!==null&&!t&&Ri===0&&Qr===0&&(e.crossRenderUpdate=!0);let n=oi>0||t&&e.currentRenderMode===`transition`||!ii&&nh===0&&si>0?`transition`:`urgent`,r=Oi||t&&e.currentRenderDeferred;if(hc?.schedulePending(e),e.pending){n===`urgent`&&(e.pendingMode=`urgent`,e.pendingDeferred=!1);return}qr===ts&&!ii||(bs()?(e.nestedUpdateChain!==ys&&(e.nestedUpdateChain=ys,e.nestedUpdateCount=0),++e.nestedUpdateCount>vs&&(e.nestedUpdateError=!0)):T===null&&(ys++,e.nestedUpdateChain=ys,e.nestedUpdateCount=0,e.nestedUpdateError=!1)),e.pending=!0,e.pendingMode=n,e.pendingDeferred=r,ti.push(e),!ii&&(ri||(ri=!0,queueMicrotask(Ps)))}var ws=0,Ts=25;function Es(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n===t)return!0;return!1}function Ds(e){let t=null,n=0,r=0,i=ni;try{for(;n<ti.length;){let a=ti[n++];if(!Es(a,e)){ti[r++]=a;continue}if(!(!a.pending&&!a.nestedUpdateError||a.disposed)){try{if(a.nestedUpdateError)throw a.nestedUpdateError=!1,Ss();let e=(t??=new Map).get(a)??0,n=a.crossRenderUpdate;if(e>=(n?vs:Ts))throw n?Ss():Error(w(9));t.set(a,e+1),a.crossRenderUpdate=!1,A(a)}catch(e){Rb(a,e)}i!==ni&&(i=ni,n=0,r=0)}}}finally{if(i===ni){for(;n<ti.length;)ti[r++]=ti[n++];ti.length=r,ni++}}}function Os(e,t){let n=-t;for(let t=0;t<e.length;t++){let r=e[t];if(r.drainStamp===n)continue;let i=r,a=0;for(;i!==null&&i.drainStamp!==n;)a++,i=i.parentBlock;for(a+=i===null?-1:i.drainRenders,i=r;i!==null&&i.drainStamp!==n;)i.drainStamp!==void 0&&(i.drainStamp=n,i.drainRenders=a),a--,i=i.parentBlock}return e.sort(ks),e}function ks(e,t){return e.drainRenders-t.drainRenders}var As=null;function js(){As??={find:lb,holdsNativeRead:Ms,reveal:xb,hidePending:tb,visible:zy,rehide:Xb,retryActivity:$b}}function Ms(e){for(let t of zi){let n=t.tryBlock;if(t.transitionHeld&&t.hiddenDom===null&&n!==null&&(n===e||Tc(n,e)||Tc(e,n)))return!0}return!1}function Ns(){let e=null,t=null,n=++ws;ti.length>1&&Os(ti,n);for(let r=0;r<ti.length;r++){let i=ti[r];if(!i.pending&&!i.nestedUpdateError)continue;if(i.pending=!1,i.disposed){i.nestedUpdateError=!1;continue}let a=i.idState.renderOwner?.transaction;if(a?.aborted===!0)continue;let o=a?.retired;if(o!=null&&o.size!==0){let e=i;for(;e!==null&&!o.has(e);)e=e.parentBlock;if(e!==null)continue}let s=i.crossRenderUpdate;i.crossRenderUpdate=!1;let c=As,l=c===null?null:c.find(i,!0,i.pendingMode??`urgent`),u=null,d=null,f=null;l!==null&&(l.__kind===`trySlotSlot`?l.hiddenDom===null?f=l:d=l:u=l);let p=Va(i.idState.renderOwner),m=null;try{if(i.kind===`root`&&!i.mounted&&eo(i),i.nestedUpdateError)throw i.nestedUpdateError=!1,Ss();if(i.drainStamp===n){if(++i.drainRenders>(s?vs:Ts))throw s?Ss():Error(w(9))}else i.drainStamp=n,i.drainRenders=1;if(d!==null){c.reveal(d,i.pendingMode??`urgent`);continue}if(u!==null&&u.pendingThenable!==null){c.retryActivity(u,!0);continue}let e=ci;m=e===null?null:e.begin(i);try{if(u!==null)c.retryActivity(u,!1,i);else if(f!==null)c.visible(f,i);else{let e=i.idState.renderOwner;if(e!==void 0&&e.current===i&&e.request!==null){let t=e.request;e.request=null;let n=i.pendingMode??`urgent`;i.pendingMode=null,t(n)}else A(i)}}finally{e!==null&&e.end(m)}}catch(t){try{Rb(i,t,m)}catch(t){let n=i.idState.renderOwner?.transaction;n!=null&&no(n);let r=t instanceof df&&Object.prototype.hasOwnProperty.call(t,`failure`)?t.failure:t;Ix(i,r)||(e===null?e={err:r,all:[r]}:(e.all.push(r),e.err=typeof AggregateError==`function`?AggregateError(e.all,w(13)):e.all[0]));let a=i;for(;a.parentBlock!==null;)a=a.parentBlock;a.kind===`root`&&!a.disposed&&(t instanceof df&&a.idState.renderOwner!==void 0?(a.idState.renderOwner.preservePresentation=!0,Gr.get(a)?.()):j(a))}}finally{Ha(p),u!==null&&(t??=new Set).add(u)}}if(ti.length=0,ni++,t!==null)for(let e of t)As.rehide(e);return io(),ui?.flush(),e}function Ps(){if(ri=!1,ai){(ti.length>0||La.length>0)&&!ri&&(ri=!0,queueMicrotask(Ps));return}if(Cc()||ec.length!==0||cs.length!==0||ms.size!==0||Wi.length!==0||Zo!==null)try{if(Zo?.routeFlush()===!0)return;Ys()}catch(e){if(gs===0)throw e;(_s??=[]).push(e)}}function Fs(e){try{let t=e.activeElement;if(t===e.body&&(t=t?.shadowRoot?.activeElement??null,t===null))return null;for(;t!==null;){if(t.localName===`iframe`){let e;try{e=t.contentDocument}catch{break}if(e===null)break;let n=e.activeElement;if(n===null)break;t=n;continue}let e=t.shadowRoot?.activeElement;if(e==null)break;t=e}return t}catch{return null}}function Is(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch((M?.view(e)??e).type){case`text`:case`search`:case`tel`:case`url`:case`password`:return!0}return!1}function Ls(e,t,n,r,i){let a=e,o=null,s=0,c=-1,l=-1,u=0,d=0;selection:for(;;){for(;;){if(a===t&&(n===0||a.nodeType===3)&&(c=s+n),a===r&&(i===0||a.nodeType===3)&&(l=s+i),c!==-1&&l!==-1)break selection;a.nodeType===3&&(s+=(M?.view(a)??a).nodeValue.length);let e=P(a);if(e===null)break;o=a,a=e}for(;;){if(a===e||(o===t&&++u===n&&(c=s),o===r&&++d===i&&(l=s),c!==-1&&l!==-1))break selection;let f=F(a);if(f!==null){a=f;break}a=o,o=(M?.view(a)??a).parentNode}}return c===-1||l===-1?null:{focused:e,start:c,end:l,contentEditable:!0}}function Rs(e){let t=Fs(e);if(t===null||t===t.ownerDocument.body)return null;if(Is(t)){let e=t;return{focused:t,start:(M?.view(e)??e).selectionStart??0,end:(M?.view(e)??e).selectionEnd??0,contentEditable:!1}}if(t.contentEditable===`true`||(M?.view(t)??t).getAttribute(`contenteditable`)===`true`){let e=t.ownerDocument.getSelection();if(e!==null&&e.anchorNode!==null&&e.focusNode!==null&&(M?.view(t)??t).contains(e.anchorNode)&&(M?.view(t)??t).contains(e.focusNode)){let n=e.anchorNode,r=e.focusNode;if(n===r&&n.nodeType===3){if(n===P(t))return{focused:t,start:e.anchorOffset,end:e.focusOffset,contentEditable:!0};if((M?.view(n)??n).nodeValue.length<256){let r=t.ownerDocument.createRange();r.selectNodeContents(t),r.setEnd(n,e.anchorOffset);let i=r.toString().length;return{focused:t,start:i,end:i+e.focusOffset-e.anchorOffset,contentEditable:!0}}}let i=Ls(t,n,e.anchorOffset,r,e.focusOffset);if(i!==null)return i}}return{focused:t,start:-1,end:-1,contentEditable:!1}}function zs(e,t){let n=e.ownerDocument.createTreeWalker(e,4),r=n.nextNode(),i=null;for(;r!==null;){let e=(M?.view(r)??r).textContent?.length??0;if(t<=e)return[r,t];t-=e,i=r,r=n.nextNode()}return i===null?[e,0]:[i,(M?.view(i)??i).textContent?.length??0]}function Bs(e){if(e===null)return;let{focused:t}=e,n=t.ownerDocument;if(Fs(n)===t||!(M?.view(t)??t).isConnected)return;if(e.start!==-1){if(e.contentEditable){let r=n.getSelection();if(r!==null){let[i,a]=zs(t,e.start),[o,s]=zs(t,e.end),c=n.createRange();c.setStart(i,a),c.collapse(!0),r.removeAllRanges(),r.addRange(c),r.extend(o,s)}}else{let n=t;(M?.view(n)??n).setSelectionRange(e.start,Math.min(e.end,(M?.view(n)??n).value.length))}}let r=[],i=(M?.view(t)??t).parentElement;for(;i!==null;)r.push({element:i,left:(M?.view(i)??i).scrollLeft,top:(M?.view(i)??i).scrollTop}),i=(M?.view(i)??i).parentElement;(M?.view(t)??t).focus();for(let e=0;e<r.length;e++){let t=r[e];N(t.element).scrollLeft=t.left,N(t.element).scrollTop=t.top}}var Vs=null,Hs=null;function Us(){if(ti.length===0)return null;let e=ti[0].parentNode.ownerDocument;if(e===null)return null;let t=Rs(e),n=null;for(let r=1;r<ti.length;r++){let i=ti[r].parentNode.ownerDocument;if(i===null||i===e||n?.includes(i))continue;(n??=[e]).push(i);let a=Rs(i);a!==null&&(t===null?t=a:Array.isArray(t)?t.push(a):t=[t,a])}return t}function Ws(e){if(Array.isArray(e))for(let t=0;t<e.length;t++)Bs(e[t]);else Bs(e)}function Gs(e){if(e===null&&Vs===null)return Ns();let t=Vs,n=Hs;Vs=e,Hs=null;try{return Ns()}finally{try{Ks()}finally{Hs=n,Vs=t}}}function Ks(){if(Hs!==null)for(let e=0;e<Hs.length;e++){let t=Hs[e],n=t.snapshot;if(n.contentEditable){let e=n.focused.ownerDocument,t=e.getSelection();if(t!==null&&Fs(e)===n.focused){let[r,i]=zs(n.focused,n.start),[a,o]=zs(n.focused,n.end);if(t.anchorNode!==r||t.anchorOffset!==i||t.focusNode!==a||t.focusOffset!==o){let n=e.createRange();n.setStart(r,i),n.collapse(!0),t.removeAllRanges(),t.addRange(n),t.extend(a,o)}}}for(let e=0;e<t.ancestors.length;e++){let n=t.ancestors[e];N(n.element).scrollLeft=n.left,N(n.element).scrollTop=n.top}}}function qs(e,t){let n=null;if(Array.isArray(t)){for(let r=0;r<t.length;r++)if(t[r].focused.ownerDocument===e.ownerDocument){n=t[r];break}}else t.focused.ownerDocument===e.ownerDocument&&(n=t);if(n===null||!(M?.view(e)??e).contains(n.focused))return;if(Hs!==null){for(let e=0;e<Hs.length;e++)if(Hs[e].snapshot===n)return}let r=[];for(let e=N(n.focused).parentElement;e!==null;e=(M?.view(e)??e).parentElement)r.push({element:e,left:(M?.view(e)??e).scrollLeft,top:(M?.view(e)??e).scrollTop});(Hs??=[]).push({snapshot:n,ancestors:r})}function Js(e){for(let t=0;(ti.length>0||La.length>0)&&t<Qs;t++){Xs();let t=ti.length===0?null:Us(),n=Gs(t);t!==null&&Ws(t),n!==null&&e===null&&(e=n),yc()}return e}function Ys(){ai=!0;let e=Wi.length>0,t=Zo,n=t?.shouldClearTypesAfterFlush()===!0;try{ti.length>0&&Xs();let e=ti.length===0?null:Us(),t=Gs(e);if(e!==null&&Ws(e),yc(),hc?.capturing()!==!0&&(ti.length>0||La.length>0)&&(t=Js(t)),t!==null)throw t.err}finally{ai=!1,(e||Wi.length>0)&&(Wi.length=0),n&&t.clearTypes()}}function Xs(){if(ns[ts].length>0||Rc.length>0){if(hc?.holdPassivesBeforeRender()===!0)return;Sc()}}function Zs(e){if(ai)return Ze(e);Zo?.interrupt();let t=ii;ii=!0;try{let t=Ze(e);ai=!0;let n=null;try{ti.length>0&&Xs();let e=ti.length===0?null:Us();n=Gs(e),e!==null&&Ws(e),yc(),(ti.length>0||La.length>0)&&(n=Js(n))}finally{ai=!1}if((ti.length>0||La.length>0)&&!ri&&(ri=!0,queueMicrotask(Ps)),n!==null)throw n.err;return t}finally{ii=t}}var Qs=50;function $s(e,t,n){up?.(e.block,n);let r={ref:t,el:n,block:e.block};if((k===null?cs:k.refs).push(r),k===null&&Yn!==null){let t=e.block.idState.renderOwner;t!==void 0&&Yn.stampQueuedPublication(t,r)}}var ec=[];function tc(e,t){if(e==null||ic(t))return;if(t!==null&&Yn?.unpublishedRef(t,e)){Yn.forgetUnpublishedRef(t);return}let n=t===null?void 0:lp?.get(t);if(n?.hidden&&n.connected!==e)return;let r=D?.aborted&&!Ra?null:k;(r===null?ec:r.detaches??=[]).push(e,t,hl,gl)}function nc(e,t){e!=null&&Object.prototype.propertyIsEnumerable.call(Object(e),`ref`)&&e.ref!=null&&tc(e.ref,t)}var rc=null;function ic(e){if(e===null)return!1;for(let t=rc;t!==null;t=t.parent)if(t.elements.has(e))return!0;return!1}function ac(e,t){if(e===null||e.length===0)return t();let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].el;r!==null&&n.add(r)}if(n.size===0)return t();let r=rc;rc={elements:n,parent:r};try{return t()}finally{rc=r}}function oc(){if(ec.length===0)return;let e=ec.splice(0);for(let t=0;t<e.length;t+=4)try{Xr++;try{fp(e[t],null,e[t+1])}finally{Xr--}}catch(n){if(n instanceof xs)throw n;let r=e[t+2],i=e[t+3];r===null?Ix(i,n)||console.error(n):Mx(i,n,r(n))}}function sc(){if(cs.length===0)return;let e=cs.splice(0);if(e.length>1){let t=e[0].block?.parentBlock??null;for(let n=1;n<e.length;n++)if((e[n].block?.parentBlock??null)!==t){e.sort(Oc);break}}for(let t of e){if(dc(t.block))continue;if(Yn!==null&&!Yn.publicationCurrent(t)){Yn.deferRef(t,t.el,t.ref===ls?t.el._currentRef:t.ref);continue}let e=lp?.get(t.el);if(e!==void 0&&db(t.block)!==null){e.hidden=!0;continue}try{Yn?.forgetUnpublishedRef(t.el),Xr++;try{fp(t.ref,t.el)}finally{Xr--}}catch(e){if(e instanceof xs)throw e;let n=Lb(t.block);n?Mx(t.block,e,n(e)):Ix(t.block,e)||console.error(e)}}}var cc=null,lc=!1;function uc(e=null){let t=cc,n=lc;cc=e,lc=!0;try{oc(),sc()}finally{let e=cc;if(cc=t,lc=n,e!==null){Xr++;try{for(let[t,n]of e)n.block.disposed||Object.is(t.value,n.previous)||Cs(n.block)}finally{Xr--}}}}function dc(e){let t=e;for(;t!==null;){if(t.disposed)return!0;t=t.parentBlock}return!1}function fc(e,t,n){return e!==null&&e.get(t)===n}function pc(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i],o=a.block;if(o===t||o!==null&&Tc(t,o)){n.set(a.el,a.ref===ls?a.el._currentRef:a.ref);continue}e[r++]=a}e.length=r}function mc(e,t=new Map){return pc(cs,e,t),k!==null&&pc(k.refs,e,t),hc?.discardRefs(e,t),t}var hc=null,gc=null;function _c(e,t){if(t===void 0)return;let n=e.owners.get(t);if(n===void 0){let r={generation:t.generation,current:t.current,guard:()=>!t.disposed&&t.generation===r.generation};n=r,e.owners.set(t,n)}return n.guard}function vc(){return E!==null&&!Ra&&!Ia}function yc(){if(hc?.stageEffects()===!0)return;if(rs.length===0&&is.length===0&&ns[$o].length===0&&ns[es].length===0&&ec.length===0&&cs.length===0&&ss.length===0&&Zn===null&&ms.size===0&&!ig()){if(hc?.defer(null,null)===!0)return;(ns[ts].length>0||Rc.length>0)&&hc?.beforeCommit(),(ns[ts].length>0||Rc.length>0)&&!as&&bc();return}hc?.beforeCommit();let e=Yn?.pauseLifecycle()??-1;Jr++;try{wc();let e=Lc();Tg();let t=Pc();if(hc?.defer(t,e)===!0)return;uc(),hs(),t!==null&&Fc(t),e!==null&&Fx(e),Er(),Vc(),(ns[ts].length>0||Rc.length>0)&&!as&&bc()}finally{e>=0&&Yn.resumeLifecycle(e),kc()}}function bc(){as=!0,Yc(xc)}function xc(){as=!1,Ic()}function Sc(){as=!1,Gc(),Ic()}function Cc(){return ti.length>0||La.length>0||ui?.hasWork()===!0||rs.length>0||is.length>0||ns[$o].length>0||ns[es].length>0||ns[ts].length>0||Rc.length>0||ss.length>0||Zn!==null||ig()}function wc(){if(rs.length===0)return;let e=rs.splice(0);for(let t=0;t<e.length;t++){let n=e[t],r=n.block;if(!n.cell.active||Yn?.publicationCurrent(n)===!1||dc(r))continue;let i=lb(r,!0);if(r.renderStatus===Mr||i!==null){if(i!==null&&i.__kind===`trySlotSlot`){ql(i,()=>{n.cell.active&&!dc(r)&&r.effectEventRenderVersion===n.renderVersion&&r.effectEventCompletedVersion===n.renderVersion&&(n.cell.impl=n.nextImpl)});continue}r.effectEventRenderVersion===n.renderVersion&&r.effectEventCompletedVersion===n.renderVersion&&(n.cell.impl=n.nextImpl)}}}function Tc(e,t){for(let n=t.parentBlock;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function Ec(e,t,n,r){if(e!==n&&e!==null&&n!==null){let i=e.parentBlock,a=n.parentBlock;if(i===n)return-1;if(a===e)return 1;if(i===a)return t-r;for(let t=a;t!==null;t=t.parentBlock)if(t===e)return 1;for(let e=i;e!==null;e=e.parentBlock)if(e===n)return-1}return t-r}function Dc(e,t){return e.scope===t.scope?e.order-t.order||e.seq-t.seq:Ec(e.scope.block,e.seq,t.scope.block,t.seq)}function Oc(e,t){return Ec(e.block,0,t.block,0)}function kc(){if(--Jr!==0||Yr===null)return;let e=Yr;Yr=null;for(let{block:t,error:n,handler:r}of e)Ac(t,n,r)}function Ac(e,t,n){if(Jr>0){(Yr??=[]).push({block:e,error:t,handler:n});return}let r=n===void 0?Lb(e):n;if(r!==null){Mx(e,t,r(t));return}let i=e;for(;i!==null&&i.parentBlock!==null;)i=i.parentBlock;i!==null&&i.kind===`root`&&!i.disposed&&(j(i),oc()),Ix(e,t)||console.error(t)}function jc(e){let t=e.scope.hooks?.get(e.slot);if(t===void 0||t.revision!==e.revision||!Nc(e,t))return;let n=e.fn===null,r=t.cleanup;if(n&&(t.connectedFn=null,t.connectedArgs=void 0,t.disconnected=!1),r){t.cleanup=void 0;try{ei(r,e.phase,e.scope)}catch(t){if(t instanceof xs)throw t;Ac(e.scope.block,t)}}}function Mc(e){if(e.fn===null)return;let t,n=e.scope.hooks?.get(e.slot);if(n!==void 0&&n.revision===e.revision&&Nc(e,n)){n.connectedFn=e.fn,n.connectedArgs=e.args,n.disconnected=!1;try{let n=qr;qr=e.phase,Kr++;try{t=Ln||e.scope.block.idState.renderOwner?.signalOwner!==void 0?xr(e.scope,()=>e.fn.apply(null,e.args)):e.fn.apply(null,e.args)}finally{Kr--,qr=n}}catch(t){if(t instanceof xs)throw t;Ac(e.scope.block,t);return}typeof t==`function`&&(n.cleanup=t)}}function Nc(e,t){return Yn?.publicationCurrent(e)!==!1||(D!==null&&Do(t),t.deps=void 0,t.active=t.connectedFn!==null,!e.scope.block.idState.renderOwner?.disposed&&!dc(e.scope.block)&&Cr(e.scope.block),!1)}function Pc(){let e=ns[$o],t=ns[es];if(e.length===0&&t.length===0)return null;let n=e.length===0?t.splice(0):t.length===0?e.splice(0):e.splice(0).concat(t.splice(0));n.sort(Dc);let r=n.length,i=0;for(;i<r;){let e=n[i].scope,t=i+1;for(;t<r&&n[t].scope===e;)t++;for(let e=i;e<t;e++){let t=n[e];t.phase===$o&&!t.scope.block.disposed&&jc(t)}for(let e=i;e<t;e++){let t=n[e];t.phase===$o&&!t.scope.block.disposed&&Mc(t)}for(let e=i;e<t;e++){let t=n[e];t.phase===es&&!t.scope.block.disposed&&(t.fn===null||!Ql(t.scope.block))&&jc(t)}i=t}return n}function Fc(e){for(let t=0;t<e.length;t++){let n=e[t];n.phase===es&&(n.scope.block.disposed||Ql(n.scope.block)||Mc(n))}}function Ic(){Jr++;try{zc();let e=ns[ts];if(e.length===0)return;let t=e.splice(0);t.sort(Dc);for(let e=0;e<t.length;e++){let n=t[e];n.scope.block.disposed||n.fn!==null&&Ql(n.scope.block)||jc(n)}for(let e=0;e<t.length;e++){let n=t[e];n.scope.block.disposed||Ql(n.scope.block)||Mc(n)}}finally{kc()}}function Lc(){if(is.length===0)return null;let e=is.splice(0),t=null;for(let n=0;n<e.length;n++)try{let r=e[n]();r!==void 0&&(t??=[]).push(r)}catch(e){console.error(e)}return t}var Rc=[];function zc(){if(Rc.length===0)return;let e=Rc.splice(0);for(let t=0;t<e.length;t+=3)try{ei(e[t],ts,e[t+2])}catch(n){if(n instanceof xs)throw n;let r=e[t+1],i=e[t+2];Ac(i,n,r)}}function Bc(e){try{return!Object.is(e.value,e.getSnapshot())}catch{return!0}}function Vc(){if(ss.length===0)return;let e=ss.splice(0);Zr++;try{for(let t=0;t<e.length;t++){let n=e[t];n.queued=!1,!(n.block.disposed||Ql(n.block))&&(n.value=n.pending,Bc(n)&&n.forceUpdate())}}finally{Zr--}}var Hc=[],Uc=null,Wc=0;function Gc(){Hc.length!==0&&(Hc=[],Wc++,Uc!==null&&(clearTimeout(Uc),Uc=null))}function Kc(e){if(e!==void 0&&e!==Wc)return;let t=Hc;if(t.length!==0){Gc();for(let e=0;e<t.length;e++)t[e]()}}var qc;function Jc(){if(qc===void 0){if(typeof MessageChannel>`u`)qc=e=>setTimeout(()=>Kc(e),0);else{let e=new MessageChannel;e.port1.onmessage=e=>Kc(e?.data),qc=t=>e.port2.postMessage(t)}}return qc}function Yc(e){if(Hc.push(e),Hc.length!==1)return;let t=Jc(),n=++Wc,r=typeof document<`u`&&document.visibilityState===`hidden`,i=typeof requestAnimationFrame==`function`;Uc=setTimeout(()=>Kc(n),r||!i?0:250),!r&&i&&requestAnimationFrame(()=>{t(n)})}var Xc=class{constructor(e,t,n,r,i,a,o,s,c){this.body=a,this.props=o,this.extra=s,this.outputHandler=c,this.memoInChain=a?.__memo===!0||t!==null&&t.memoInChain===!0,this.parentNode=n,this.parentBlock=t,this.idState=t?.idState??{prefix:``,next:0},this.startMarker=r,this.endMarker=i,this.exclusiveMarkers=!1,this.itemIndex=0,this.pending=!1,this.disposed=!1,this.mounted=!1,this.renderStatus=Mr,this.pendingMode=null,this.currentRenderMode=null,this.pendingDeferred=!1,this.currentRenderDeferred=!1,this.inactive=!1,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxDirect=null,this.$$ctxDepsEpoch=-1,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.$$implicitBail=!1,this.__thenableIdx=0,this.drainStamp=0,this.drainRenders=0,this.crossRenderUpdate=!1,this.nestedUpdateChain=-1,this.nestedUpdateCount=0,this.nestedUpdateError=!1,this.effectEventRenderVersion=0,this.effectEventCompletedVersion=0,this.deoptNode=null,this.deoptRefs=!1,this.slots=[],this.compilerMemo=null,this.forSlot=null,this.prevSibling=null,this.nextSibling=null,this.key=null,this.vt=null,this.parent=null,this.block=this,this.kind=e,this.createdStamp=0,this.__warmEpisode=void 0,this.__thenableDone=void 0,this.__thenables=void 0,this.$$tryHandler=void 0,this.__suspenseHandler=void 0,this.__trySlot=void 0,this.__activitySlot=void 0,this.__warmCache=void 0,this.__warmCacheEpisode=void 0,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}},Zc=class{constructor(e,t){this.block=t,this.parent=e,this.hooks=null,this.cleanups=null,this.effectSlots=null,this.children=null,this._slots=null,this.refFields=null,this.$$ctxValues=null,this.$$ctxReads=null,this.$$ctxCache=null,this.$$ctxCacheOwner=null,this.mounted=!1,this.slots=[],this.compilerMemo=null,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}};function Qc(e,t,n,r,i,a,o,s,c=null){let l=new Xc(e,t,n,r,i,a,o,s,c);return t!==null&&l.idState.renderOwner===D?.owner&&eo(l),l}var $c=null,el=null;function tl(e,t){let n=el??=new Map;n.has(e)||n.set(e,{value:e.value,queue:e[t]?.slice(),key:t})}function A(e){if(Ln||e.idState.renderOwner?.signalOwner!==void 0){let t=br(e);if(t!==void 0&&Rn?.(t),t!==void 0&&Le()!==t){Be(t,()=>A(e));return}}let t=I();if(t!==null&&(!t.owns(e)||e.kind===`dynamic`&&e.endMarker!==null&&t.isFresh(e.endMarker))){t.suspend(()=>A(e));return}let n=$c,r=el;$c=e,el=null;try{let t=0;for(;sl(e);){if(e.nestedUpdateError)throw e.nestedUpdateError=!1,Ss();if(++t>Ts)throw Error(w(9))}Ln&&e.__trySlot?.tryBlock===e&&e.__trySlot.retrySignalOwners!==void 0&&cr(e.__trySlot);let i=el;if(i!==null&&n!==null&&Tc(n,e)){r??=new Map;for(let[e,t]of i)r.has(e)||r.set(e,t)}}catch(t){let n=el;if(n!==null){for(let[e,t]of n)e.value=t.value,e[t.key]=t.queue;e.crossRenderUpdate||(e.pending=!1)}throw e.idState.renderOwner?.signalOwner!==void 0&&!e.mounted&&e.forSlot!==null&&e.forSlot.items.get(e.key)!==e&&lr(e,t),t}finally{$c=n,el=r}}function nl(e){hc?.recordStageEntry(e),ps.push(e)}function rl(e,t=null){if(!e.disposed)for(let n=e;n!==null&&(n.block===n&&(n.renderStatus=Nr,n.forSlot!==null&&(n.forSlot.cachedDeps=null)),!(n===t||t===null&&n.inactive));n=n.parentBlock);}function il(e,t){if(e.rootTransaction===!0)return;let n=e.renderRoot??=t;(t===n||Tc(n,t))&&(e.renderedBlocks??=new Set).add(t)}function al(e,t){let n=new Map;for(let r of Wi)for(let i of r){if(i.block!==e||i.superseded)continue;let r=n.get(i.slot);r===void 0?(n.set(i.slot,t.cells.length),t.cells.push({update:i,baseValue:i.baseValue,value:i.slot.value,hook:void 0})):t.cells[r].update=i}for(let e of t.cells)e.hook=Wl(e.update),e.hook===null&&(e.update.slot.value=e.baseValue)}function ol(e,t){for(let n=t.cells.length-1;n>=0;n--){let r=t.cells[n];r.hook!==void 0&&(r.hook===null?!e.disposed&&!r.update.superseded&&Object.is(r.update.slot.value,r.baseValue)&&(r.update.slot.value=r.value):Gl(r.hook))}e.disposed||e.pending&&e.pendingMode===`urgent`||t.cells.length!==0&&t.cells.every(e=>e.update.superseded)||(e.pending=!0,e.pendingMode=`transition`,e.pendingDeferred=t.pendingDeferred,t.queueEpoch!==ni&&!ti.includes(e)&&ti.push(e))}function sl(e){e.renderStatus===Nr&&(e.renderStatus=Pr),k!==null&&k.rootTransaction!==!0&&il(k,e),E!==null&&E.push(wa,e,null,null);let t=Ir,n=T,r=Lr,i=Rr,a=Hr,o=Br.length,s=fs,c=ps,l=k?.events??s,u=k?.eventActions??c,d=l.length,f=u.length;Ir=e,T=e,Lr=e.effectSlots===null?0:zr++,Rr=0;let p=n!==null&&Od(n,e),m=e.pending&&e.pendingMode===`transition`&&p&&n.currentRenderMode===`urgent`?ci:null,h=m===null?null:{pendingDeferred:e.pendingDeferred,queueEpoch:ni,cells:[]};if(p)Hr===0&&(Hr=Vr++);else{let t=n===null&&md?e.__warmEpisode:void 0;Hr=typeof t==`number`?t:Vr++}e.__warmEpisode=Hr,fs=l,ps=u,e.effectEventRenderVersion!==0&&e.effectEventRenderVersion++,e.pending=!1,e.crossRenderUpdate=!1,e.__thenableIdx=0;{let t=e.__thenables;t!==void 0&&t.length!==0&&(!md||e.__thenableDone===!0)&&(t.length=0),e.__thenableDone=!1}if(e.$$ctxReads!==null&&e.$$ctxReads.clear(),e.$$ctxDirect!==null){let t=e.slots[0];t?.__kind===`hydrateBlockSlot`&&t.parentBlock===e&&!t.independent&&!t.hydrated&&(t.contextChanged=e.$$ctxDepsEpoch!==rt()&&Hv(e)),e.$$ctxDirect.clear()}e.$$ctxDepsEpoch=rt(),e.currentRenderMode=h===null?e.pendingMode??n?.currentRenderMode??`urgent`:`urgent`,e.currentRenderDeferred=h===null?e.pendingMode===null?n?.currentRenderDeferred??!1:e.pendingDeferred:!1,e.pendingMode=null,e.pendingDeferred=!1;let g,_=!1,v=!1;Yn?.beginRender(e),Xn?.get(e)?.clear();try{h!==null&&m.beginUrgent(e,h);let t=e.body(e.props,e,e.extra);if(e.pending&&!e.crossRenderUpdate)return v=!0,!0;e.outputHandler!==null&&(t!==void 0||e.slots[0]?.returnedOutput===!0)&&e.outputHandler(e,t??null),e.effectSlots!==null&&eu(e),e.mounted||=!0,e.renderStatus===Pr&&(e.renderStatus=Mr),e.effectEventRenderVersion!==0&&(e.effectEventCompletedVersion=e.effectEventRenderVersion),_=!0,e.__thenableDone=!0}catch(e){if(typeof e==`object`&&e)try{typeof e.then==`function`&&(e=new ld(e))}catch{}throw g=e,e}finally{if(!_){if(v&&(e.renderStatus=Nr),e.renderStatus!==Nr){let t=null,n=ud(g);if(n||!$u(g)){for(let r=e;r!==null;r=r.parentBlock)if(n?r.__suspenseHandler:r.$$tryHandler&&r.__trySlot?.catchBody!==null){t=r;break}}rl(e,t)}l.length=d,u.length=f}fs=s,ps=c,Br.length=o,Hr=a,Lr=r,Rr=i,Ir=t,T=n;try{Yn?.endRender(e,_,ud(g))}finally{h!==null&&m.endUrgent(e,h)}}}var cl=null;function ll(e,t){e.returnedOutput!==t&&(E!==null&&!Ra&&E.push(Sa,e,`returnedOutput`,e.returnedOutput),e.returnedOutput=t)}function ul(e,t){let n=[t?.end,t?.block?.endMarker,t?.hostNode,t?.text,e.endMarker,N(e.parentNode).lastChild];for(let t=0;t<n.length;t++){let r=n[t];if(r!=null&&(M?.view(r)??r).parentNode===e.parentNode)return r}return null}function dl(e,t,n){let r=cl;cl=e;try{if(n===!0){let t=e.slots[0];t!==void 0&&fl(e,t);return}let r=t!==null&&t.$$kind===dn&&t.key==null&&typeof t.type==`function`,i=e.slots[0],a=null,o=null,s=r&&(t.type.$$singleRoot===!0||I()?.passthroughRanges===!0||i!==void 0&&i.__kind===`componentSlotSlot`&&i.currentComp===t.type);if(i!==void 0&&i.__kind!==(s?`componentSlotSlot`:`childSlot`)){let n=ci,r=e.currentRenderMode===`transition`,s=n!==null&&I()===null&&Bb(e),c=D===null||s?n:null,l=c!==null&&!r&&I()===null&&s;if(c!==null&&I()===null&&(r||l)){let n=ul(e,i);if(n!==null){let r=c.render(e,e.parentNode,n,Bx,t,dl);if(c.dispose(r.wip),r.failed)throw r.error;if(r.suspended)throw new ld(r.suspended)}}if(D!==null&&!i.inherited&&!i.borrowed&&i.ownerHost==null){let t=i.start??i.hostNode??i.text??i.block?.startMarker??i.end??null,n=i.end??i.block?.endMarker??t;Wb(e,t,n)&&(a=t,o=n)}if(fl(e,i),e.disposed)return}if(s){let n=t;S_(e,0,e.parentNode,n.type,n.props,e.endMarker,n.key??void 0,!0,void 0,I()!==null&&Gg(n),n.__octaneInvocationSite)}else{let n=I();if(n!==null&&e.slots[0]===void 0&&e.startMarker!==null&&e.endMarker!==null&&e.startMarker!==e.endMarker&&e.startMarker.nodeType===8&&e.endMarker.nodeType===8&&(F(e.startMarker)===e.endMarker||n.isUnframedRootRange(e.startMarker,e.endMarker))){let t={__kind:`childSlot`,start:e.startMarker,end:e.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null};e.slots[0]=t,xl(e,t)}Iv(e,0,e.parentNode,t,e.endMarker)}if(a!==null){let t=e.slots[0],n=t.start??t.hostNode??t.text??t.block?.startMarker??t.end??null,r=t.end??t.block?.endMarker??n;Ub(e,a,o,n,r)}let c=e.slots[0];!e.disposed&&c!==void 0&&c.returnedOutput!==!0&&(E!==null&&!Ra&&E.push(Sa,c,`returnedOutput`,c.returnedOutput),c.returnedOutput=!0)}finally{cl=r}}function fl(e,t){let n=t.__kind,r=(n===`ifBlockSlot`||n===`switchBlockSlot`)&&t.start===null&&t.block?.endMarker!=null?t.block.endMarker:t.end,i=D;if(i!==null&&!i.aborted&&!Ra){let n=t.ownerHost??e.parentNode,i=t.inherited===!0||t.borrowed===!0,a=t.ownerHost!=null||i&&t.start===null?P(n):i?F(t.start):t.start??t.hostNode??t.text??t.block?.startMarker??r??null;i&&a===r&&(a=null);let o=a===null?null:t.ownerHost!=null||i&&r===null?(M?.view(n)??n).lastChild:i?N(r).previousSibling:r??t.block?.endMarker??a;Wa(t,n,i?t.start:a===null?(M?.view(n)??n).lastChild:(M?.view(a)??a).previousSibling,i?r:(M?.view(o)??o)?.nextSibling??null);let s=t.block??t.portal?.block;if(s!=null&&Ja(s),t.forSlot!=null){for(let e=t.forSlot.head;e!==null;e=e.nextSibling)Ja(e);t.forSlot.emptyBlock!==null&&Ja(t.forSlot.emptyBlock)}Xa(n,a,o,()=>Ol(t,!1)),O(e.slots,0,e.slots[0]);let c=e._slots;if(c!==null){let e=c.indexOf(t);e!==-1&&(Ua(()=>c.splice(e,0,t)),c.splice(e,1))}e.slots[0]=void 0;return}if(n===`childSlot`){if(t.portal&&=(zg(t.portal),null),t.forSlot){for(let e=t.forSlot.head;e!==null;e=e.nextSibling)j(e,!0);t.forSlot.emptyBlock&&j(t.forSlot.emptyBlock,!0),t.forSlot=null}N_(t),t.borrowed||(N(t.start)?.remove(),N(r)?.remove())}else n===`componentSlotSlot`?t.block&&j(t.block,!0):Ol(t,!0),!t.inherited&&!t.borrowed&&(N(t.start)?.remove?.(),N(r)?.remove?.());let a=e._slots;if(a!==null){let e=a.indexOf(t);e!==-1&&a.splice(e,1)}e.slots[0]=void 0}var pl=class{constructor(e,t,n){this.parentNode=e,this.endMarker=t,this.parentBlock=n,this.$$ctxValues=null,this.idState=n.idState,this.signalInstanceParent=null,this.signalInstanceSite=void 0,this.signalInstanceValue=void 0,this.signalInstanceHasKey=!1,this.signalInstanceResolved=void 0}},ml=0,hl=null,gl=null,_l=null;function vl(e){hl===null?Ix(gl,e)||console.error(e):(_l??=[]).push(e)}function yl(){let e=_l,t=hl,n=gl;if(_l=null,hl=null,gl=null,e!==null&&t!==null)for(let r=0;r<e.length;r++)Mx(n,e[r],t(e[r]))}function j(e,t=!0){if(!e.disposed&&(Ra&&D!==null&&(D.retainedCreated?.has(e)||D.hydrating&&e.kind!==`portal`)&&(t=!1),!Za(e,t))){ml===0&&(hl=Lb(e.parentBlock)??Xu(e),gl=e),ml++;try{bl(e,t)}finally{--ml===0&&yl()}}}function bl(e,t){e.disposed=!0;let n=e.idState.renderOwner;n?.current===e&&(n.generation++,n.wakeable=null,n.request=null,n.transition!==void 0&&ci.discardRoot(n)),Zo?.unregister(e),e.deoptNode!==null&&e.deoptRefs&&rx(e.deoptNode,null);let r=t&&(e.kind===`root`||e.startMarker!==null&&e.endMarker!==null&&N(e.startMarker).parentNode!==null);if(Cl(e,t&&!r),n?.current===e&&Yn?.clearDeferredRefs(n),t){if(e.startMarker&&e.endMarker){let t=N(e.startMarker).parentNode;if(t){let n=e.exclusiveMarkers,r=n?F(e.startMarker):e.startMarker,i=n?e.endMarker:F(e.endMarker);for(;r&&r!==i;){let e=F(r);(M?.view(t)??t).removeChild(r),r=e}}}else if(e.kind===`root`){let t;for(;(t=P(e.parentNode))!==null;)N(e.parentNode).removeChild(t)}}}function xl(e,t){let n=e._slots,r=D;r!==null&&e.mounted&&!Qa(r,e.block)&&Ua(()=>{Ol(t,!0);let r=e.slots.indexOf(t);if(r!==-1&&(e.slots[r]=void 0),n===null)e._slots=null;else{let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}),n===null?e._slots=[t]:n.push(t)}var Sl=1;function Cl(e,t=!0){let n=e.effectSlots;if(n!==null)for(let t=0;t<n.length;t++){let r=n[t],i=r.cleanup;if(i!==void 0){if(r.cleanup=void 0,r.phase===ts)Rc.push(i,hl,gl),as||bc();else{if(gc!==null&&hc.stageTeardown(i,r.phase,e)===!0)continue;try{ei(i,r.phase,e)}catch(e){vl(e)}}}}let r=null;e.mounted!==!0&&(r=[],nx(e,r)),ac(r,()=>{El(e,t)})}function wl(e,t){let n=e.cleanups;if(n!==null){for(let t=n.length-1;t>=0;t--)if(gc===null||hc.stageTeardown(n[t],-1,e)!==!0)try{$r(n[t],e)}catch(e){vl(e)}}let r=$n.get(e);if(r){if(er?.owners.has(r)||gc!==null&&hc.stageAction(()=>{t?$n.set(e,null):$n.delete(e),rr(r)},!0))return;t?$n.set(e,null):$n.delete(e),rr(r)}else if(t&&r===!1){if(gc!==null&&hc.stageAction(()=>Tl(e),!0))return;Tl(e)}}function Tl(e){let t=$n.get(e);t===!1?$n.set(e,null):t&&($n.set(e,null),rr(t))}function El(e,t,n=!0){wl(e,n),Dl(e,t)}function Dl(e,t){let n=e.children;if(n!==null)for(let e=0,r=n.length;e<r;e++)Cl(n[e].scope,t);let r=e._slots;if(r!==null)for(let e=0,n=r.length;e<n;e++){let n=r[e];Ol(n,t)}}function Ol(e,t){(e.__flags&Sl)!==0&&e.__teardown(e,t);let n=e.__kind;if(n===`ifBlockSlot`||n===`switchBlockSlot`||n===`activityBlockSlot`)e.block&&j(e.block,t);else if(n===`forBlockSlot`){for(let n=e.head;n!==null;n=n.nextSibling)j(n,t);e.emptyBlock&&j(e.emptyBlock,t)}else if(n===`hydrateBlockSlot`)e.block&&j(e.block,t);else if(n===`childSlot`){if(e.block&&j(e.block,t),e.forSlot){for(let n=e.forSlot.head;n!==null;n=n.nextSibling)j(n,t);e.forSlot.emptyBlock&&j(e.forSlot.emptyBlock,t)}e.portal&&zg(e.portal),e.hostNode!=null&&rx(e.hostNode,null)}else{let r=n===`portalSlotSlot`||t;e.block&&j(e.block,r),n===`portalSlotSlot`&&e.target&&(Pg(e.target,e),eh(e.target))}}function kl(e){throw Error(w(15,e))}var Al=[],jl=null;function Ml(e,t,n){let r=jl??={pending:Al[Al.length-1],active:!1},i=r.pending,a=r.active;r.pending=void 0,r.active=!0;try{if(i===void 0)return Reflect.apply(e,t,n);switch(n.length){case 0:return e.call(t,i);case 1:return e.call(t,n[0],i);case 2:return e.call(t,n[0],n[1],i);case 3:return e.call(t,n[0],n[1],n[2],i);case 4:return e.call(t,n[0],n[1],n[2],n[3],i);default:{let r=Array(n.length+1);for(let e=0;e<n.length;e++)r[e]=n[e];return r[n.length]=i,e.apply(t,r)}}}finally{r.pending=i,r.active=a}}function Nl(e,t,...n){let r=jl,i=r?.pending,a=r?.active??!1;r!==null&&(r.pending=e,r.active=!1),Al.push(e);try{return t(...n)}finally{Al.pop(),jl!==null&&(jl.pending=r===null?Al[Al.length-1]:i,jl.active=a)}}function Pl(e,t){let n=typeof t==`number`?String(t):t.description??``;return e+(typeof t==`number`?`n`:`s`)+n.length+`:`+n}function Fl(e){let t=Al.length;return t===0?e:e===void 0&&t===1?Al[0]:l(Al,e,!1)}function Il(e,t,n,r){r=Fl(r),(r===void 0||Ir===null)&&kl(e);let i=Ir,a=i.hooks?.get(r);if(a===void 0){a={nativeValue:t()},qn(i).set(r,a);let e=a.nativeValue;Jn(i,()=>n(e))}return a.nativeValue}wn(()=>Ir===null?null:Il);function Ll(e,t){let n=Rl(e,t,arguments.length===1);return[n.value,n.setter]}function Rl(e,t,n){t===void 0&&typeof e==`symbol`&&n&&(Al.length===0||jl?.active===!0)&&(t=e,e=void 0),t=Fl(t),t===void 0&&kl(`useState`);let r=Ir,i=T,a=r.hooks?.get(t);if(a===void 0&&(a={value:typeof e==`function`?e():e,setter:e=>{if(i.disposed)return;if(a.pendingActionBatch!==void 0&&Si()===null&&Hl(a,e),(a.updates!==void 0||a.renderTransition!==void 0||typeof e==`function`&&ki>0&&ci?.hasHeld(a,i)||i.pending&&typeof e==`function`)&&Si()===null){T===i&&tl(a,`updates`),(a.updates??=[]).push(e),Cs(i);return}let t=wi(a,i),n,r=!1;try{n=typeof e==`function`?e(t):e}catch{if(Si()===null){T===i&&tl(a,`updates`),(a.updates??=[]).push(e),Cs(i);return}n=t,r=!0}let o=r||a.updates!==void 0||a.renderTransition!==void 0||a.pendingActionBatch!==void 0||i.pending&&typeof e==`function`;if(Object.is(n,t)&&!o){typeof e!=`function`&&ci?.cancelEqual(a,i)&&Cs(i);return}let s=Ti(a,i,e,n,o);if(s!==null){s.state===void 0&&(s.state=a,Vl(s,a));return}if(lc&&Xr>0&&!o){let e=cc??=new Map,t=a;if(!e.has(t)){let n={block:i,previous:a.value};e.set(t,n)}a.value=n;return}T===i&&tl(a,`updates`),a.value=n,i.disposed,Cs(i)},updates:void 0,renderTransition:void 0,urgentTransition:void 0,getter:void 0,pendingActionBatch:void 0,pendingActionValue:void 0},qn(r).set(t,a)),a.renderTransition!==void 0||a.updates!==void 0){let e=zl(a);!a.urgentTransition&&a.updates!==void 0&&Object.is(e,a.value)&&ci?.rebaseHeld(a,i,a.updates),a.value=e,a.urgentTransition||(a.renderTransition!==void 0&&(Ul(a.renderTransition,a.value),a.renderTransition=void 0),a.updates=void 0)}return a}function zl(e){let t=e.renderTransition,n=t===void 0?e.value:Bl(t,e.urgentTransition===!0);if(e.updates!==void 0)for(let t of e.updates)n=typeof t==`function`?t(n):t;return n}function Bl(e,t,n){let r=e;for(;r.previous!==void 0;)r=r.previous;let i=r.replayBaseValue;for(let a=r;;a=a.next){if(a.stateUpdates!==void 0)for(let e of a.stateUpdates)i=typeof e==`function`?e(i):e;if(a.reducerActions!==void 0)for(let e of a.reducerActions)i=n(i,e);if((t||a.superseded)&&a.urgentOperations!==void 0)for(let e of a.urgentOperations)i=a.operations[e](i);else if(!t&&!a.superseded)for(let e of a.operations)i=e(i);if(a===e)return i}}function Vl(e,t){e.replayBaseValue=t.value;let n=t.renderTransition??ci?.heldUpdate(t,e.block);n!==void 0&&(e.previous=n,n.next=e),e.state===void 0?e.reducerActions=e.reducer.renderPhaseActions?.slice():e.stateUpdates=e.state.updates?.slice()}function Hl(e,t){let n=e.pendingActionBatch.updates.get(e);n!==void 0&&((n.urgentOperations??=[]).push(n.operations.length),n.operations.push(typeof t==`function`?t:()=>t),n.forceRender=!0)}function Ul(e,t){for(let n=e;n;n=n.previous)n.value=t,n!==e&&Object.is(t,n.baseValue)&&(n.superseded=!0)}function Wl(e){let t=e.state??e.reducer;return e.block.disposed||e.superseded||t===void 0||t.renderTransition===void 0?null:(t.urgentTransition=!0,t.value=e.baseValue,{update:e,cell:t})}function Gl(e){let{update:t,cell:n}=e;if(n.urgentTransition=!1,t.block.disposed||t.superseded){n.renderTransition=void 0;return}for(let e=t;e;e=e.previous)e.baseValue=n.value}var Kl=null;function ql(e,t){let n=Kl??=new WeakMap,r=n.get(e);r===void 0&&(r={entries:[],live:0},n.set(e,r));let i={action:t,active:!0,queue:r};return r.entries.push(i),r.live++,i}function Jl(e,t){let n=t.queue;return Kl?.get(e)!==n||!t.active?null:(t.active=!1,--n.live===0&&Kl.delete(e),t.action)}function Yl(e,t){let n=t.queue;Jl(e,t)!==null&&n.live!==0&&n.entries.length>n.live*2&&(n.entries=n.entries.filter(e=>e.active))}function Xl(e){let t=Kl?.get(e);if(t===void 0)return;let n=t.entries;if(e.__kind===`activityBlockSlot`){let t=n.length;for(let r=0;r<t;r++){let t=n[r];t.active&&nl(()=>{let n=Jl(e,t);if(n!==null)return n()})}return}Kl.delete(e);for(let e=0;e<n.length;e++){let t=n[e];t.active&&nl(t.action)}}function Zl(e,t,n=!1){if(e===void 0||t===void 0)return!0;let r=e.length;if(r!==t.length){if(!n)return!0;r=Math.min(r,t.length)}for(let n=0;n<r;n++)if(!Object.is(e[n],t[n]))return!0;return!1}function Ql(e){for(let t=e;t!==null;t=t.parentBlock)if(t.inactive)return!0;return!1}function $l(){return Lr===0&&(Lr=zr++),Lr}function eu(e){let t=e.effectSlots;if(t!==null&&Lr!==0&&Rr!==t.length)for(let n=0;n<t.length;n++){let r=t[n];if(r.renderVersion===Lr||(r.phase===$o&&hb(r),!r.active))continue;D!==null&&Do(r),r.deps=void 0,r.active=!1;let i=++r.revision,a=k===null?ns[r.phase]:k.effects[r.phase];a.push({scope:e,slot:r.slot,fn:null,order:r.order,revision:i,args:void 0,phase:r.phase,seq:os++}),gb(r,r.phase,a)}}function tu(e,t,n,r){let i=Ir,a=i.hooks?.get(e);r===$o&&(a===void 0?dp?.(i.block):hb(a));let o=$l(),s=a!==void 0&&a.renderVersion!==o;if(s&&(Rr++,a.renderVersion=o),r!==$o&&Ql(i.block)){rl(i.block),a&&!a.active&&(D!==null&&Do(a),a.active=!0,a.revision++);return}if(a){let e=Zl(a.deps,n,!0);if(a.active&&!e)return;D!==null&&Do(a);let t=!1;if(a.active||(a.active=!0,a.revision++,t=!0),!e)return;s&&!t&&a.revision++}let c;if(a)a.deps=n,c=a;else{if(D!==null){let t=i.effectSlots,n=t?.length??0;Ua(()=>{i.hooks?.delete(e),t===null?i.effectSlots=null:t.length=n})}Rr++;let t={deps:n,cleanup:void 0,renderVersion:o,revision:0,active:!0,order:i.effectSlots===null?0:i.effectSlots.length,effect:!0,phase:r,slot:e,connectedFn:null,connectedArgs:void 0,disconnected:!1};qn(i).set(e,t),i.effectSlots===null?i.effectSlots=[t]:i.effectSlots.push(t),c=t}let l={scope:i,slot:e,fn:t,order:c.order,revision:c.revision,args:n,phase:r,seq:os++},u=k===null?ns[r]:k.effects[r];u.push(l),gb(c,r,u)}function nu(e,t,n){return n===void 0&&typeof t==`symbol`&&(n=t,t=void 0),t===null&&(t=void 0),n=Fl(n),n===void 0&&kl(e),[t,n]}function ru(e,t,n){let[r,i]=nu(`useEffect`,t,n);tu(i,e,r,ts)}function iu(e,t,n){let[r,i]=nu(`useLayoutEffect`,t,n);tu(i,e,r,es)}function au(e,t){return t.warmEpisode!==Hr&&Td(e,t.deps,t)&&(t.warmEpisode=Hr),t}function ou(e,t,n){let r=jd(t,n);if(r===xd)return null;let i={deps:n,value:r.value,warmEpisode:Hr,warmRecord:void 0,nativeWitness:void 0};return Ui!==null&&oa(e,t,i),qn(e).set(t,i),Ed(r,i),i}function su(e,t,n,r,i){let a={deps:n,value:r,warmEpisode:void 0,warmRecord:void 0,nativeWitness:i};return Ui!==null&&oa(e,t,a),qn(e).set(t,a),n!==void 0&&Td(t,n,a)&&(a.warmEpisode=Hr),r}var cu=Object.is;function lu(e,t){let n=e.compilerMemo;return n!==null&&n.bodyId===t?n:uu(e,t,n)}function uu(e,t,n){if(n===null)return e.compilerMemo={bodyId:t,auto:void 0,hooks:void 0,overflow:null};let r=n.overflow;r===null&&(n.overflow=r=new Map);let i=r.get(t);return i===void 0&&(i={bodyId:t,auto:void 0,hooks:void 0,overflow:null},r.set(t,i)),i}function du(e){return Array(e).fill(null)}function fu(e,t,n){return Ui!==null&&sa(e,t,[!0,n]),e[t+1]=n,e[t]=!0,n}function pu(e,t,n,r){return Ui!==null&&sa(e,t,[!0,r,n]),e[t+2]=n,e[t+1]=r,e[t]=!0,n}function mu(e,t){t===void 0&&typeof e==`symbol`&&arguments.length===1&&(Al.length===0||jl?.active===!0)&&(t=e,e=void 0),t=Fl(t),t===void 0&&kl(`useRef`);let n=Ir,r=n.hooks?.get(t);return r===void 0&&(r={current:e},qn(n).set(t,r)),r}function hu(e,t){let n=[],r,i=!1;function a(e){if(e!=null){if(Array.isArray(e)){for(let t=0;t<e.length;t++)a(e[t]);return}if(i||=(r=t(),!0),typeof e==`function`){let t=e(r);n.push(typeof t==`function`?t:()=>e(null))}else{let t=e;t.current=r,n.push(()=>{t.current=null})}}}function o(){let e,t=!1;for(let r of n)try{r()}catch(n){t||=(e=n,!0)}if(n.length=0,t)throw e}try{a(e)}catch(e){try{o()}finally{throw e}}return o}function gu(e,t,n,r){let[i,a]=nu(`useImperativeHandle`,n,r);n=i,r=a;let o=n===void 0?void 0:[...n,e];tu(r,()=>{if(Array.isArray(e))return hu(e,t);let n;return typeof e==`function`?n=e(t()):e!=null&&(e.current=t()),()=>{if(typeof n==`function`){n();return}typeof e==`function`?e(null):e!=null&&(e.current=null)}},o,es)}var _u=new Map;function vu(e){let t=_u.get(e);if(t===void 0){let n=Pl(`@octane:uses:`,e);t={inst:Symbol.for(n+`:uses:inst`),effect:Symbol.for(n+`:uses:effect`)},_u.set(e,t)}return t}function yu(e,t,n){e.pending=t,e.subscribe=n,!e.queued&&(e.queued=!0,(k===null?ss:k.stores).push(e))}function bu(e,t){return Bc(e)&&e.forceUpdate(),t(e.onStoreChange)}function xu(e){let t=oi,n=si;oi=0,si=0;try{Cs(e)}finally{oi=t,si=n}}function Su(e,t,n=void 0,r){let i=arguments.length,a=i>4?arguments[i-1]:i===4?r:n;a=Fl(a),a===void 0&&kl(`useSyncExternalStore`);let o=i>=4?n:void 0,s=vu(a),c=(I()!==null&&o!==void 0?o:t)(),l=Ir,u=l.hooks?.get(s.inst);if(u===void 0){let n=T,r={value:c,getSnapshot:t,pending:c,subscribe:e,effectDeps:null,forceUpdate:()=>xu(n),onStoreChange:()=>{n.disposed||(T!==null||!n.pending||n.pendingMode!==`urgent`||n.pendingDeferred)&&Bc(r)&&r.forceUpdate()},block:n,queued:!1};u=r,r.effectDeps=[r,e],qn(l).set(s.inst,u),yu(u,c,e)}else u.getSnapshot=t,(!Object.is(c,u.value)||e!==u.subscribe)&&yu(u,c,e);return u.effectDeps[1]!==e&&(u.effectDeps=[u,e]),ru(bu,u.effectDeps,s.effect),c}function Cu(e){let t=function(e,n){return Tu(t,e,n)};return wu(t,e)}function wu(e,t){return e.$$kind=mn,e.defaultValue=t,e.$$version=0,Sn(e),e}function Tu(e,t,n){let r=e,i=n;Au(i,r,t.value);let a=t.children;if(a!=null){let e=typeof a==`function`?a[ju]??a:2,t=i.hooks?.get(Ru);if(t!==e){if(t!==void 0&&(t===2||e===2)){if(zu(i),i.block.disposed)return}else if(t!==void 0&&(Ou(i),E!==null&&!Ra)){let e=i.hooks;Ua(()=>e.set(Ru,t))}qn(i).set(Ru,e)}Du(Iu(a),void 0,i,void 0)}}var Eu=null;function Du(e,t,n,r){let i=Eu;Eu=n;try{return e(t,n,r)}finally{Eu=i}}function Ou(e){let t=e.slots[0];e===e.block&&e.block.outputHandler!==null&&(t?.__kind===`childSlot`||t?.__kind===`componentSlotSlot`||t?.__kind===`ifBlockSlot`||t?.__kind===`switchBlockSlot`||t?.__kind===`activityBlockSlot`)&&ll(t,!0);let n=e.compilerMemo;if(n!==null&&(ku(n),n.overflow!==null))for(let e of n.overflow.values())ku(e)}function ku(e){e.auto!==void 0&&(E!==null&&!Ra&&E.push(Sa,e,`auto`,e.auto),e.auto=void 0)}function Au(e,t,n){e.$$ctxValues===null&&(e.$$ctxValues=new Map);let r=e.$$ctxValues,i=r.has(t),a=i?r.get(t):void 0;i&&Object.is(a,n)||(D!==null&&Ua(()=>{i?r.set(t,a):r.delete(t)}),i&&(t.$$version++,it()),r.set(t,n))}var ju=Symbol.for(`octane.childrenBody`),Mu=Symbol.for(`octane.childrenCaptures`);function Nu(e){return e.$$singleRoot=!0,e}function Pu(e,t,n){return typeof e==`function`&&(e[gn]=!0,t!==void 0&&(e[ju]=t),n!==void 0&&(e[Mu]=n)),e}function Fu(e){return typeof e==`function`&&e[gn]===!0}function Iu(e){return typeof e==`function`?e:(t,n)=>{Iv(n,0,n.block.parentNode,e,n.block.endMarker)}}function Lu(e){return qg.has(e)?(t,n,r)=>Iu(e.children)(void 0,n,r):Iu(e.children)}var Ru=Symbol(`octane.childrenDialect`);function zu(e,t=!0){let n=e.block;ml===0&&(hl=Lb(n.parentBlock)??Xu(n),gl=n),ml++;try{El(e,t,!1);let r=n.startMarker;t&&ax(r===null?P(n.parentNode):F(r),n.endMarker),e.children=null,e.cleanups=null,e._slots=null,e.effectSlots=null,e.hooks=null,e.slots=[],e.compilerMemo=null,e.refFields=null}finally{--ml===0&&yl()}}`${ce}`;var Bu=null,Vu=0;function Hu(e){let t=null;for(let n=e;n!==null;n=n.parentBlock){if(n.block!==n)continue;let e=n.slots[0];e?.__kind===`hydrateBlockSlot`&&!e.hydrated&&Bu?.has(e)&&(t=e)}return t}function Uu(e,t){let n=e;for(;t>0;){for(;n.limit!==void 0&&n.next>=n.limit&&n.overflow!==void 0;)n=n.overflow;if(n.limit===void 0||n.overflow===void 0){n.next+=t;return}let e=n.limit-n.next,r=Math.min(t,e);n.next+=r,t-=r}}var Wu=ln(function(e,t){let n=t.block;Ry(t,0,n.parentNode,Lu(e),null,(t,n)=>{Iv(n,1,n.block.parentNode,e.fallback,n.block.endMarker)},n.endMarker)},1,`Suspense`,hn),Gu=ln(function(e,t){let n=t.block,r=Ry(t,0,n.parentNode,Lu(e),(t,n)=>{let r=typeof e.fallback==`function`?e.fallback(t.err,t.reset):e.fallback;Iv(n,1,n.block.parentNode,r,n.block.endMarker)},null,n.endMarker,void 0,!0),i=t.slots[1];i!==e.resetRef&&(i?.current===r&&(i.current=null),t.slots[1]=e.resetRef),e.resetRef&&(e.resetRef.current=r)},1,`ErrorBoundary`);function Ku(e,t){if(typeof e==`object`&&e){let n=Yu(T)?.resolveForeignContext?.(e);if(n!=null)return cd(n);if(e.$$typeof===_n)throw Error(w(18,t))}throw Error(w(12,t))}function qu(e){return e&&e.$$kind===mn?cd(e):Ku(e,`useContext`)}var Ju=Symbol(`octane.ctx.default`);function Yu(e){if(Wr===0)return null;let t=e;for(;t!==null&&t.parentBlock!==null;)t=t.parentBlock;if(t===null)return null;let n=Ur.get(t);return n!==void 0&&n.active?n:null}function Xu(e){let t=Yu(e);return t===null?null:e=>{if(!t.routeError(e))throw e}}function Zu(e){let t=Yu(e);return t===null?null:e=>{if(!t.routeSuspense(e))throw new ld(e)}}var Qu=Symbol.for(`octane.host-context-request`);function $u(e){return typeof e==`object`&&!!e&&e.$$kind===Qu}function ed(e,t){if(e!==null&&e.memoInChain){(e.$$ctxDirect??=new Map).set(t,t.$$version);for(let n=e;n!==null;n=n.parentBlock)(n.body?.__memo===!0||n.$$implicitBail===!0)&&(n.$$ctxReads??=new Map).set(t,t.$$version)}}var td=!1,nd=null;function rd(e){if(e===null)return!1;for(let[t,n]of e)if(t.$$version!==n)return!0;return!1}function id(e,t){for(let[n,r]of e)t!==null&&ed(t,n),td&&(nd??=new Map).set(n,r)}function ad(e){let t=!1,n=null,r=null,i;return()=>{let a=Ir,o=n===a||n!==null&&a!==null&&a.block.parentBlock===n.block&&a.$$ctxValues===null;if(!t||rd(r)||r!==null&&!o){let o=td,s=nd;td=!0,nd=null;let c,l;try{c=e()}finally{l=nd,td=o,nd=s,o&&l!==null&&id(l,null)}n=a,r=l,i=c,t=!0}else n=a,r!==null&&id(r,T);return i}}function od(e,t,n){if(e===null)return;let r=e.$$ctxCache;if(r===null){e.$$ctxCache=t,e.$$ctxCacheOwner=n;return}let i=e.$$ctxCacheOwner;if(i!==null){let a=new Map;a.set(r,i),a.set(t,n),e.$$ctxCache=a,e.$$ctxCacheOwner=null}else r.set(t,n)}function sd(e,t,n){if(td&&(nd??=new Map).set(n,n.$$version),e!==null){let r=e.$$ctxCache,i=r===n?e.$$ctxCacheOwner:r!==null&&e.$$ctxCacheOwner===null?r.get(n):void 0;if(i!=null){if(i===Ju){let e=Yu(t);return e===null?n.defaultValue:e.readContext(n)}return i.$$ctxValues.get(n)}}let r=e;for(;r!==null;){let t=r.$$ctxValues;if(t!==null&&t.has(n))return od(e,n,r),t.get(n);r=r.parent}let i=t?.parentBlock??null;for(;i!==null;){let t=i.$$ctxValues;if(t!==null&&t.has(n))return od(e,n,i),t.get(n);i=i.parentBlock}let a=Yu(t);return a===null?(od(e,n,Ju),n.defaultValue):a.readContext(n)}function cd(e){return ed(T,e),sd(Ir,T,e)}var ld=class{constructor(e){this.thenable=e}thenable;__isSuspense=!0};function ud(e){return typeof e==`object`&&!!e&&e.__isSuspense===!0}function dd(e){try{return e[mt]===!0}catch{return!1}}function fd(e,t=!1){let n=T,r=n.__thenables??=[],i=n.__thenableIdx;n.__thenableIdx=i+1;let a=I();if(!dd(e)&&a!==null&&a.seeds!==null&&a.seedCursor<a.seeds.length)return a.useSeed(e,r,i,t);let o=r[i];if(o===e){if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:new ld(e)}if(o!==void 0&&md&&!t){if(o.status===`fulfilled`)return o.value;throw o.status===`rejected`?o.reason:new ld(o)}if(r[i]=e,pd(e),e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:new ld(e)}function pd(e){e.status===void 0&&(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))}var md=!1;function hd(e,t){Br.push(T,e,t)}var gd=null,_d=!1,vd=0,yd=0,bd=64,xd=Symbol(`octane.warm.miss`),Sd=null;function Cd(e){for(let t=e;t!==null;t=t.parentBlock)if(t.__suspenseHandler)return null;return Ba(e)}function wd(e){for(let t=e;t!==null;t=t.parentBlock){if(t.__warmCacheEpisode!==Hr)continue;let e=t.__warmCache;if(e!==void 0)return e}let t=Cd(e),n=t===null?void 0:Sd?.get(t);return n===void 0&&(n=new Map,t!==null&&(Sd??=new WeakMap).set(t,n)),e.__warmCache=n,e.__warmCacheEpisode=Hr,Hr>vd&&(vd=Hr),n}function Td(e,t,n){let r=T;if(r===null)return!1;let i=null;for(let e=0;e<Br.length;e+=3){let t=Br[e];if(Od(t,r)){i=t;break}}if(i===null)return!1;let a=wd(i),o=a.get(e);o===void 0&&(o=[],a.set(e,o));let s={deps:t,value:void 0,available:!1,source:n};return o.push(s),n.warmRecord=s,_d=!0,!0}function Ed(e,t){`available`in e&&(e.source=t,e.value=void 0,t.warmRecord=e)}function Dd(e){if(_d){if(e.hooks!==null)for(let t of e.hooks.values()){let e=t,n=e?.warmRecord;n!==void 0&&n.source===e&&(n.source=void 0,n.value=e.value,n.available=!0,e.nativeWitness!==void 0&&(n.nativeWitness=e.nativeWitness),e.warmRecord=void 0)}ex(e,Dd)}}function Od(e,t){for(let n=t;n!==null;n=n.parentBlock)if(n===e)return!0;return!1}function kd(e,t){if(gd===null||e==null)return;let n=e.__warm;if(typeof n==`function`&&!(yd>=bd)){yd++;try{n(t)}catch{}finally{yd--}}}function Ad(e,t){return Object.defineProperty(e,\"__warm\",{configurable:!0,get(){return this===e?t:void 0}}),e}function jd(e,t,n){let r=Hr<=vd?T:null;for(;r!==null;){let i=r.__warmCache;if(r.__warmCacheEpisode===Hr&&i!==void 0){let r=Md(i,e,t,n);if(r!==xd)return r}r=r.parentBlock}let i=T?.idState.renderOwner?.retryKey,a=i==null?void 0:Sd?.get(i);if(a!==void 0){let r=Md(a,e,t,n);if(r!==xd)return r}let o=T?.idState.renderOwner?.transition,s=(o?.warmHarvest!=null&&Od(o.origin,T)?o.warmHarvest:null)??Gi?.warmHarvest??ta;if(s!=null)for(let r=0;r<s.length;r++){let i=s[r];if(!i.taken&&i.slot===e&&!Zl(i.deps,t)&&(n===void 0||n(i)))return i.taken=!0,i}return xd}function Md(e,t,n,r){let i=e.get(t);if(i!==void 0){for(let e of i)if(e.available&&!Zl(e.deps,n)&&(r===void 0||r(e)))return e.available=!1,e}return xd}function Nd(e,t){let n=Fl(e);return n===void 0&&kl(t),n}function Pd(e,t){let n=Ir,r=n.hooks?.get(e);if(r!==void 0){let n=r.deps;if(n!==void 0&&n.length===1&&Object.is(n[0],t))return au(e,r)}return _d?ou(n,e,[t]):null}function Fd(e,t,n){let r=Ir,i=r.hooks?.get(e);if(i!==void 0){let r=i.deps;if(r!==void 0&&r.length===2&&Object.is(r[0],t)&&Object.is(r[1],n))return au(e,i)}return _d?ou(r,e,[t,n]):null}function Id(e,t,n,r){let i=Ir,a=i.hooks?.get(e);if(a!==void 0){let i=a.deps;if(i!==void 0&&i.length===3&&Object.is(i[0],t)&&Object.is(i[1],n)&&Object.is(i[2],r))return au(e,a)}return _d?ou(i,e,[t,n,r]):null}function Ld(e,t,...n){return su(Ir,e,n,t)}var Rd=Symbol.for(`octane.lazyBodyCheck`),M=null;function N(e){return M===null||e==null?e:M.view(e)}var zd,Bd;function P(e){return M===null?zd===void 0?e.firstChild:zd.call(e):M.view(e).firstChild}function F(e){return M===null?Bd===void 0?e.nextSibling:Bd.call(e):M.view(e).nextSibling}function Vd(e,t,n=!0){t in e||(n?e[t]=void 0:Object.defineProperty(e,t,{value:void 0,writable:!0,configurable:!0}))}var Hd=!1;function Ud(){if(Hd||typeof Element>`u`)return;Hd=!0;let e=Node.prototype;zd=Object.getOwnPropertyDescriptor(e,`firstChild`)?.get,Bd=Object.getOwnPropertyDescriptor(e,`nextSibling`)?.get;let t=Element.prototype;Object.isExtensible(t)&&(Vd(t,`$$portalParent`),Vd(t,`$$portalEnd`),Vd(t,`$$deoptKey`),Vd(t,`$$ctrl`),Vd(t,`__oct_suppress`),Vd(t,`__oct_frag`),Vd(t,`__oct_vfrag`),Vd(t,Xf,!1),Vd(t,Qf,!1),Vd(t,$f,!1),Vd(t,q_,!1),Vd(t,xg,!1)),typeof CharacterData<`u`&&Object.isExtensible(CharacterData.prototype)&&(Vd(CharacterData.prototype,`$$portalEnd`),Vd(CharacterData.prototype,`$$deoptKey`),Vd(CharacterData.prototype,q_,!1))}var Wd=Symbol(`octane.lazy-template`);function Gd(e){for(let t of(M?.view(e)??e).querySelectorAll(`*`))if(t.localName.includes(`-`)||(M?.view(t)??t).hasAttribute(`is`))return e.__oct_frag=!0,e;let t=(M?.view(document)??document).createDocumentFragment(),n;for(;(n=P(e))!==null;)(M?.view(t)??t).appendChild(n);return t.__oct_frag=!0,t}function Kd(e,t,n){Ud();let r=(M?.view(document)??document).createElement(`template`);if(t===0){(M?.view(r)??r).innerHTML=n?`<octane-frag>${e}</octane-frag>`:e;let t=P(r.content);return t.nodeType===1&&t.localName===`octane-frag`?Gd(t):t}let i=t===1?`svg`:`math`;(M?.view(r)??r).innerHTML=`<${i}>${e}</${i}>`;let a=P(r.content);return n?Gd(a):P(a)}function qd(e,t=0,n=0){return{[Wd]:{html:e,ns:t===1?1:t===2?2:t===3?3:0,frag:n,parsed:[null,null,null],root:0}}}function Jd(e){let t;if(e.ns===3){let e=Ir===null?void 0:Np(Ir.block.parentNode);t=e===Op?1:e===kp?2:0}else t=e.ns;let n=e.parsed[t];return n===null&&(n=Kd(e.html,t,e.frag),e.parsed[t]=n),n}var Yd=null;function I(){let e=Yd;return e!==null&&e.isActive()?e:null}function Xd(e){return e.nodeType===1&&e.localName===`style`&&(M?.view(e)??e).hasAttribute(`data-octane`)}var Zd=null;function Qd(e,t,n){if(Zd!==null&&Zd.node!==null){let t=Zd.node;Zd.node=null;let n=e.nodeType===void 0?(M?.view(e)??e)[Wd]:void 0,r=n===void 0?e:Jd(n);if(t.localName===r.localName&&t.namespaceURI===r.namespaceURI){for(let e=P(t);e!==null;e=F(e))rx(e,null);(M?.view(t)??t).replaceChildren();for(let e=P(r);e!==null;e=F(e))(M?.view(t)??t).appendChild((M?.view(e)??e).cloneNode(!0));return t}let i=(M?.view(r)??r).cloneNode(!0),a=Ir.block;return rx(t,null),N((M?.view(t)??t).parentNode).replaceChild(i,t),a.startMarker===t&&(a.startMarker=i),a.endMarker===t&&(a.endMarker=i),a.deoptNode=null,i}let r=e.nodeType===void 0?(M?.view(e)??e)[Wd]:void 0;if(r!==void 0){let e=I();if(e!==null)return e.cloneLazy(r,t);let i=Jd(r);return e===null?(M?.view(i)??i).cloneNode(!0):e.clone(i,t,n)}let i=I();return i===null?(M?.view(e)??e).cloneNode(!0):i.clone(e,t,n)}function $d(e,t,n){if(I()!==null&&e.__oct_vfrag===!0)return;if(lf?.revision!==void 0&&pf(!1),e.nodeType===11){(M?.view(t)??t).insertBefore(e,n);return}let r;for(;(r=P(e))!==null;)(M?.view(t)??t).insertBefore(r,n)}function ef(e,t,n){if(t!==null){let n=e.block,r=I();if(r===null||r.isFresh(t)||(M?.view(t)??t).parentNode!==n.parentNode){let e=n.parentNode;(M?.view(e)??e).insertBefore(t,n.endMarker)}}return e.slots[0]=n,n}function tf(e,t,n,r,i){return ef(e,t,{a:n,b:r,c:i,__journalWindow:0,[oo]:3})}function nf(e,t,n,r,i,a){return ef(e,t,{a:n,b:r,c:i,d:a,__journalWindow:0,[oo]:4})}function rf(e,t,n,r,i,a,o){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,__journalWindow:0,[oo]:5})}function af(e,t,n,r,i,a,o,s){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,__journalWindow:0,[oo]:6})}function of(e,t,n,r,i,a,o,s,c,l,u,d){return ef(e,t,{a:n,b:r,c:i,d:a,e:o,f:s,g:c,h:l,i:u,j:d,__journalWindow:0,[oo]:10})}function sf(e,t,n){return ef(e,t,n)}function cf(e){return e==null||e===!1?``:typeof e==`string`?e:String(e)}var lf=null,uf=new WeakMap,df=class extends Error{constructor(e,t,n=lf?.revision){super(w(75)),this.lease=e,this.retry=t,this.revision=n}lease;retry;revision};function ff(e){return e instanceof Ke||e instanceof df}function pf(e=!0){throw new df(lf?.lease,e)}function mf(e){return e.presentations?.every(e=>e.current(e))!==!1}function hf(e){let t=new Set;for(let n of e.presentations??[])uf.delete(n.lease),n.hydration?.retryPresentation&&t.add(n.hydration.retryPresentation);for(let e of t)e()}var gf=Symbol.for(`octane.binding.children-site`);function _f(e,t,n,r){let i=t===null?void 0:e.lease.ranges?.().get(t);return(e.lease.revision?.()!==e.revision||t?.nodeType!==8||t.data!==n||i?.kind!==r||i.end.parentNode!==t.parentNode||I()?.close(t)!==i.end)&&pf(),i}function vf(e,t){let n=t?`[`:`]`;if(e===n||t&&(e===`[f0`||e===`[f1`)||t&&(e.startsWith(ee)||e.startsWith(`[f`))&&se(e))return 1;if(e.length<2||e.charCodeAt(0)!==n.charCodeAt(0))return 0;let r=e.charCodeAt(1);if(r<49||r>57)return 0;let i=r-48;for(let t=2;t<e.length;t++){let n=e.charCodeAt(t)-48;if(n<0||n>9||(i=i*10+n,!Number.isSafeInteger(i)))return 0}return i>=2?i:0}function yf(e){if(e===null||e.nodeType!==8)return!1;let t=(M?.view(e)??e).data;return t===`]`||vf(t,!1)>1}function bf(e){return Yd===null?P(e):(M?.view(e)??e).firstChild}function xf(e,t=1){let n=I();if(n!==null)return n.sibling(e,t);let r=e;for(let e=0;e<t;e++){if(r===null)return null;r=F(r)}return r}var Sf=null,Cf=null;function wf(e,t){if(Sf!==null&&Sf(e,t))return;let n=(M?.view(e)??e).nodeValue;n!==t&&(E!==null&&Wo(e,n),(M?.view(e)??e).nodeValue=t)}function Tf(e,t){Zo?.markDirty(),E!==null&&Wo(e,(M?.view(e)??e).nodeValue);let n=cf(t);Sf!==null&&Sf(e,n)||((M?.view(e)??e).nodeValue=n)}var Ef=Symbol(`octane.direct-signal-binding`);function Df(e){return(typeof e==`object`||typeof e==`function`)&&e!==null&&e[Vn]===!0}function Of(e){return e[Hn]()}function kf(e,t){return Object.assign(t,{[He]:{active:()=>!e.disposed&&!e.scope.block.disposed,prepare:()=>pi(e.scope.block)}})}function Af(e){return Df(e)&&e.kind===`signal`&&typeof e.set==`function`}function jf(e){if(!e.disposed&&hc?.stageAction(()=>jf(e))!==!0){e.disposed=!0;try{e.unsubscribe?.()}finally{mi(e.scope.block),e.controlWriterCleanup?.(),e.input!==void 0&&N(e.target).removeEventListener(`input`,e.input)}}}function Mf(e,t){let n=(M?.view(e)??e).getAttribute(S);if(n===null&&I()===null){(M?.view(e)??e).setAttribute(S,t);return}if(n!==t)throw Error(w(67,t))}function Nf(e,t){E!==null&&Do(e),e.policy.writeBinding(e,t),e.value=t}function Pf(e,t){Ff(e.target,t,`attribute`,void 0,e.name,e.attributeKind)}function Ff(e,t,n,r,i,a){let o=e;return a===`class`?o.namespaceURI===Ap?Lp(o,t):Rp(o,t):a(o,i,t),t}var If={kind:`attribute`,writeBinding:Pf,write:Ff};function Lf(e){if(!(e.disposed||e.pendingControl||e.handle===null||e.scope.block.disposed))try{xr(e.scope,()=>{let t=Of(e.handle);Object.is(e.value,t)||Nf(e,t)})}catch{Cs(e.scope.block)}}function Rf(e,t){e.disposed||(e.handle!==null&&(e.unsubscribe=e.handle[Un](kf(e,()=>Lf(e)))),t!==void 0&&e.policy.control.activate(e,t))}function zf(e,t,n,r,i,a,o,s){i.control?.validateNew(e,t,i.kind);let c=Df(n)?n:null,l={[Ef]:!0,scope:e,policy:i,target:t,site:r,name:a,attributeKind:o,handle:c,value:e,disposed:!1};s!==void 0&&(l.text=s);let u=i.control?.snapshot(t,r)??null,d=c===null?n:Of(c);return l.pendingControl=I()!==null&&Af(c)&&u!==null&&(u.editRevision>0||i.control.restored(t,d)),l.pendingControl&&(l.value=d),l.pendingControl||Nf(l,d),gc===null?Rf(l,u?.revision):hc.stageAction(()=>{xr(e,()=>Rf(l,u?.revision)),Lf(l)}),l.pendingControl&&i.control.adopt(l),Jn(e,()=>jf(l)),l}function Bf(e,t,n,r,i,a,o,s){let c=a.kind,l=typeof t==`object`&&t&&t[Ef]===!0?t:null,u=Df(r)?r:null;if(u!==null&&(!Ln||Le()!==$n.get(e))&&(Ln||pr(),Le()!==br(e)))return xr(e,()=>Bf(e,t,n,r,i,a,o,s));if(u===null&&l===null){if(c===`attribute`&&t===r){let e=r===void 0?I():null;if(e===null||e.isFresh(n))return t}E!==null&&Eo();let e=(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n;return a.write(e,r,c,t,o,s)}if(l!==null&&!l.disposed&&l.target===n&&l.policy===a&&l.site===i&&l.name===o&&l.attributeKind===s&&l.handle===u){if(l.pendingControl)return a.control.adopt(l),l;let e=Of(u);return Object.is(l.value,e)||Nf(l,e),l}if(E!==null&&Eo(),u===null){let e=c===`text`||c===`textOnlyChild`?l?.text??l?.target??n:n,i=a.write(e,r,c,c===`text`||c===`textOnlyChild`?l?.text:l?.value??t,o,s);if(l!==null){let e=e=>{e||jf(l)};k===null?e(!1):(k.renderCleanups??=[]).push(e)}return i}let d=zf(e,(c===`text`||c===`textOnlyChild`)&&t instanceof Text?t:n,r,i,a,o,s,c===`text`||c===`textOnlyChild`?l?.text??(t instanceof Text?t:void 0):void 0);if(l!==null){let e=e=>jf(e?d:l);k===null?e(!1):(k.renderCleanups??=[]).push(e)}return d}function Vf(e,t,n,r,i,a,o){return t===i&&i!==void 0&&(i===null||typeof i!=`object`&&typeof i!=`function`)?t:Bf(e,t,n,i,a,If,r,o)}function Hf(e,t){let n=t==null?``:String(t),r=P(e);r!==null&&r===(M?.view(e)??e).lastChild&&r.nodeType===3?wf(r,n):(D!==null&&(Eo(),Ga(e,null,null)),(M?.view(e)??e).textContent=n)}var Uf=/(<\\/|<)(s)(cript)/gi;function Wf(e){return e.replace(Uf,(e,t,n,r)=>`${t}${n===`s`?`\\\\u0073`:`\\\\u0053`}${r}`)}var Gf=/\\r\\n?|\\u0000/g;function Kf(e){return e.replace(Gf,e=>e===`\\0`?`�`:`\n`)}function qf(e,t){let n=e.ownerDocument,r=e.namespaceURI,i=r===`http://www.w3.org/2000/svg`||r===`http://www.w3.org/1998/Math/MathML`?(M?.view(n)??n).createElementNS(r,e.tagName):(M?.view(n)??n).createElement(e.tagName);return(M?.view(i)??i).innerHTML=t,(M?.view(i)??i).innerHTML}function Jf(e,t){let n=t==null?``:String(t),r=I();if(r!==null&&!r.isFresh(e)){if((e.localName===`script`?(M?.view(e)??e).textContent??``:(M?.view(e)??e).innerHTML)===(e.localName===`script`?Kf(Wf(n)):qf(e,n))){if(e.localName!==`script`){let t=M?.view(e)??e;O(e,Yf,t[Yf]),t[Yf]=n}return}if(jr(e))return;e.__oct_loc;return}if(e.localName===`script`){Hf(e,n);return}let i=M?.view(e)??e;if(i[Yf]!==n){if(O(e,Yf,i[Yf]),D!==null&&!Ra){Eo(),Ga(e,null,null),Xa(e,P(e),(M?.view(e)??e).lastChild);let t=(M?.view(e)??e).cloneNode(!1);for((M?.view(t)??t).innerHTML=n;P(t)!==null;)(M?.view(e)??e).appendChild(P(t))}else(M?.view(e)??e).innerHTML=n;i[Yf]=n}}var Yf=Symbol(`octane.dangerHTMLValue`),Xf=`__oct_dangerHTML`,Zf=!1,Qf=`__oct_dangerChild`,$f=`__oct_dangerSpreadChild`,ep=`__oct_dangerResolved`,tp=`__oct_dangerResolvedChild`;function np(){return Error(w(5))}function rp(e){if(e!=null&&(typeof e!=`object`||!(`__html`in e)))throw Error(w(6))}function ip(e,t){rp(t),O(e,Xf,(M?.view(e)??e)[Xf]);let n=(M?.view(e)??e)[Xf]===!0;if(t==null){if((M?.view(e)??e)[Xf]=!1,n){Jf(e,null);let t=M?.view(e)??e;t[Yf]!==void 0&&(O(e,Yf,t[Yf]),t[Yf]=void 0)}return}if(t!=null&&_t.has(e.localName))throw Error(w(7,e.localName));if(t!=null&&((M?.view(e)??e)[Qf]===!0||(M?.view(e)??e)[$f]!=null))throw np();(M?.view(e)??e)[Xf]=!0,Zf=!0,Jf(e,t.__html)}function ap(e,t,n=!1){let r=!1,i=null,a=!1,o=null;for(let e of t){let[t,s]=e;if(!t){e.length===2?(r=!0,i=s):s===`dangerouslySetInnerHTML`?(r=!0,i=e[2]):!n&&s===`children`&&(a=!0,o=e[2]);continue}if(!(s==null||typeof s!=`object`&&typeof s!=`function`))for(let e of Object.keys(Object(s)))e===`dangerouslySetInnerHTML`?(r=!0,i=s[e]):!n&&e===`children`&&(a=!0,o=s[e])}let s=r&&i!=null?i:null,c=a?o:null;if(_t.has(e.localName)&&(s!==null||c!=null))throw Error(w(8,e.localName));if(s!==null&&c!=null)throw np();rp(s),!(Ot.call(e,ep)&&Object.is((M?.view(e)??e)[ep],s)&&Object.is((M?.view(e)??e)[tp],c))&&(O(e,$f,(M?.view(e)??e)[$f]),O(e,ep,(M?.view(e)??e)[ep]),O(e,tp,(M?.view(e)??e)[tp]),(M?.view(e)??e)[$f]=c,ip(e,s),(M?.view(e)??e)[ep]=s,(M?.view(e)??e)[tp]=c)}function op(e,t){if(!Zf||e.nodeType!==1||(M?.view(e)??e)[Xf]!==!0)return!1;if(t!=null)throw np();return!0}var sp=new WeakMap,cp=new WeakMap,lp=null,up=null,dp=null;function fp(e,t,n){if(e==null)return;let r=t??n,i=r==null?void 0:lp?.get(r);if(i!==void 0){if(t!==null)i.hidden=!1,i.connected=e;else if(n!=null){if(i.hidden&&i.connected!==e)return;i.connected===e&&(i.connected=null)}}pp(e,t,n)}function pp(e,t,n){if(e!=null){if(typeof e==`function`){if(t===null){let t=sp.get(e),r=n??cp.get(e),i=t!==void 0&&r!=null?t.get(r):void 0;i===void 0?e(null):(t.delete(r),cp.get(e)===r&&cp.delete(e),i())}else{let n=e(t);if(typeof n==`function`){let r=sp.get(e);r===void 0&&sp.set(e,r=new WeakMap),r.set(t,n),cp.set(e,t)}}return}if(Array.isArray(e)){for(let r=0;r<e.length;r++)pp(e[r],t,n);return}e.current=t}}var mp=pn,hp=null,gp=class{_ownerBlock;_startMarker;_endMarker;_destroyed;_children;_pendingChildren;_portalAnchors;_listeners;_observers;_currentRef;constructor(e,t,n){this._ownerBlock=e,this._startMarker=t,this._endMarker=n,this._destroyed=!1,this._children=new Set,this._pendingChildren=new Set,this._portalAnchors=null,this._listeners=null,this._observers=null,this._currentRef=null;for(let e of vp(this))this._children.add(e),this._attachChild(e);ms.add(this)}_destroy(){this._destroyed=!0,ms.delete(this);for(let e of this._children)this._detachChild(e);this._children.clear(),this._pendingChildren.clear(),this._portalAnchors?.clear(),this._portalAnchors=null,this._listeners=null,this._observers=null}_registerPortal(e,t){if(this._destroyed)return;let n=this._portalAnchors??=new Map,r=n.get(t);r===void 0&&n.set(t,r=new Set),r.add(e)}_unregisterPortal(e,t){let n=this._portalAnchors,r=n?.get(t);if(r===void 0||!r.delete(e))return;r.size===0&&n.delete(t),n.size===0&&(this._portalAnchors=null);let i=N(e.start)?.nextSibling??null;for(;i!==null&&i!==e.end;){let e=F(i);(i.nodeType===1||i.nodeType===3)&&this._children.delete(i)&&this._detachChild(i),i=e}}_attachChild(e){if(this._listeners!==null)for(let t of this._listeners)(M?.view(e)??e).addEventListener(t.type,t.listener,t.options);if(e.nodeType===1&&this._observers!==null)for(let t of this._observers)t.observe(e);let t=e;(t.reactFragments??=new Set).add(this)}_detachChild(e){if(this._listeners!==null)for(let t of this._listeners)(M?.view(e)??e).removeEventListener(t.type,t.listener,t.options);e.reactFragments?.delete(this)}_reapply(){if(this._destroyed)return;let e=this._children,t=this._pendingChildren;for(let n of vp(this))t.add(n),e.has(n)||this._attachChild(n);for(let n of e)t.has(n)||this._detachChild(n);e.clear(),this._children=t,this._pendingChildren=e}focus(e){if(!this._destroyed){for(let t of bp(this))if(xp(t,e))return}}focusLast(e){if(this._destroyed)return;let t=Array.from(bp(this));for(let n=t.length-1;n>=0;n--)if(xp(t[n],e))return}blur(){if(this._destroyed)return;let e=this._startMarker.ownerDocument||document,t=e.activeElement;if(t&&t!==e.body){for(let e of yp(this))if(e===t||(M?.view(e)??e).contains(t)){(M?.view(t)??t).blur();return}}}addEventListener(e,t,n){if(this._destroyed)return;let r=_p(n);this._listeners||=[];for(let n of this._listeners)if(n.type===e&&n.listener===t&&_p(n.options)===r)return;this._listeners.push({type:e,listener:t,options:n});for(let r of vp(this))(M?.view(r)??r).addEventListener(e,t,n)}removeEventListener(e,t,n){if(this._destroyed||!this._listeners)return;let r=_p(n);for(let n=this._listeners.length-1;n>=0;n--){let i=this._listeners[n];if(i.type===e&&i.listener===t&&_p(i.options)===r){for(let n of vp(this))(M?.view(n)??n).removeEventListener(e,t,i.options);this._listeners.splice(n,1);return}}}observeUsing(e){if(!this._destroyed){this._observers||=new Set,this._observers.add(e);for(let t of yp(this))e.observe(t)}}unobserveUsing(e){if(!this._destroyed&&this._observers!==null&&this._observers.has(e)){this._observers.delete(e);for(let t of yp(this))e.unobserve(t)}}getClientRects(){let e=[];if(this._destroyed)return e;for(let t of vp(this))if(t.nodeType===3){let n=t.ownerDocument.createRange();if(n.selectNodeContents(t),typeof n.getClientRects!=`function`)continue;let r=n.getClientRects();for(let t=0;t<r.length;t++)e.push(r[t])}else{let n=t.getClientRects();for(let t=0;t<n.length;t++)e.push(n[t])}return e}getRootNode(e){if(this._destroyed)return this;let t=N(this._startMarker).parentNode;return t===null?this:(M?.view(t)??t).getRootNode(e)}compareDocumentPosition(e){if(this._destroyed)return Node.DOCUMENT_POSITION_DISCONNECTED;let t=N(this._startMarker).parentNode;if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;let n=null,r=null;for(let i of vp(this))if(n??=i,r=i,i===e||i.nodeType===1&&(M?.view(i)??i).contains(e))return(M?.view(t)??t).contains(i)?Node.DOCUMENT_POSITION_CONTAINED_BY:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;if(n===null||r===null){let n=this._startMarker.$$portalParent??t,r=(M?.view(n)??n).compareDocumentPosition(e);if(n===e)r=Node.DOCUMENT_POSITION_CONTAINS;else if((r&Node.DOCUMENT_POSITION_CONTAINED_BY)!==0){let t=Sp(this._endMarker,!0);r=t!==null&&(t===e||((M?.view(t)??t).compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING}return r|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}let i=(M?.view(n)??n).compareDocumentPosition(e);if((i&Node.DOCUMENT_POSITION_DISCONNECTED)!==0)return i;let a=(M?.view(r)??r).compareDocumentPosition(e);if((M?.view(t)??t).contains(n)&&(M?.view(t)??t).contains(r)&&(i&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&(a&Node.DOCUMENT_POSITION_PRECEDING)!==0)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;let o=this._startMarker,s=o.$$portalParent;if(s!==void 0&&s!==t&&(M?.view(s)??s).contains(e)){let t=o.$$portalSourceAnchor;if(t===void 0)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;let n=Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_FOLLOWING,r=(M?.view(t)??t).compareDocumentPosition(e)&n;if((i&n)!==r)return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}return i}dispatchEvent(e){if(this._destroyed)return!0;let t=N(this._startMarker).parentNode;if(!t)return!0;let n=this._listeners;if(e.bubbles&&(n===null||n.length===0))return t.dispatchEvent(e);let r=N(t.ownerDocument||document).createTextNode(``);if(n!==null)for(let e of n)(M?.view(r)??r).addEventListener(e.type,e.listener,e.options);(M?.view(t)??t).appendChild(r);try{return r.dispatchEvent(e)}finally{if(n!==null)for(let e of n)(M?.view(r)??r).removeEventListener(e.type,e.listener,e.options);(M?.view(r)??r).parentNode===t&&(M?.view(t)??t).removeChild(r)}}scrollIntoView(e){if(typeof e==`object`)throw Error(w(49));if(this._destroyed)return;let t=e!==!1,n=Array.from(vp(this));if(n.length===0){let n=Sp(this._endMarker,!0),r=Sp(this._startMarker,!1),i=t?n||r||N(this._startMarker).parentNode:r||n;if(i==null||i.nodeType===9)return;if(i.nodeType===11){let t=i.host;t&&t.scrollIntoView(e);return}i.nodeType===3?Cp(i,t):i.scrollIntoView(e);return}for(let r=t?n.length-1:0;t?r>=0:r<n.length;r+=t?-1:1){let i=n[r];i.nodeType===3?Cp(i,t):i.scrollIntoView(e)}}};function _p(e){return e==null?!1:typeof e==`boolean`?e:!!e.capture}function*vp(e){let t=e._portalAnchors,n=F(e._startMarker);for(;n!==null;){let r=F(n),i=t===null?void 0:t.get(n);if(i!==void 0){if(i.size===0){let e=n.$$portalEnd;if(e!==void 0){n=hv(n,e);continue}}for(let e of i){if(e.block===null||db(e.block)!==null)continue;let t=N(e.start)?.nextSibling??null;for(;t!==null&&t!==e.end;){let e=F(t);(t.nodeType===1||t.nodeType===3)&&by(t)&&(yield t),t=e}}}if(n===e._endMarker)return;(n.nodeType===1||n.nodeType===3)&&by(n)&&(yield n),n=r}}function*yp(e){for(let t of vp(e))t.nodeType===1&&(yield t)}function*bp(e){for(let t of yp(e)){yield t;let e=(t.ownerDocument||document).createTreeWalker(t,1),n=e.nextNode();for(;n;)yield n,n=e.nextNode()}}function xp(e,t){let n=e,r=n.ownerDocument;if(r.activeElement===n)return!0;let i=!1,a=()=>{i=!0};(M?.view(r)??r).addEventListener(`focus`,a,!0);try{((M?.view(n)??n).focus||HTMLElement.prototype.focus).call(n,t)}finally{(M?.view(r)??r).removeEventListener(`focus`,a,!0)}return i}function Sp(e,t){let n=t?F(e):(M?.view(e)??e).previousSibling;for(;n!==null;){if(n.nodeType===1||n.nodeType===3)return n;n=t?F(n):(M?.view(n)??n).previousSibling}return null}function Cp(e,t){let n=e.ownerDocument.createRange();if(n.selectNodeContents(e),typeof n.getBoundingClientRect!=`function`)return;let r=n.getBoundingClientRect(),i=e.ownerDocument.defaultView||window,a=t?i.scrollY+r.top:i.scrollY+r.bottom-i.innerHeight;i.scrollTo(i.scrollX+r.left,a)}function wp(e,t,n,r){let i=new gp(e.block,t,n);return i._currentRef=r,$s(e,ls,i),(e.cleanups??=[]).push(()=>{tc(i._currentRef,i),i._destroy()}),i}var Tp=`http://www.w3.org/1999/xlink`,Ep=`http://www.w3.org/XML/1998/namespace`,Dp=`http://www.w3.org/2000/xmlns/`,Op=`http://www.w3.org/2000/svg`,kp=`http://www.w3.org/1998/Math/MathML`,Ap=`http://www.w3.org/1999/xhtml`;function jp(e){return e.namespaceURI===Ap&&e.localName.indexOf(`-`)!==-1}function Mp(e,t){return e===`svg`?Op:e===`math`?kp:t===void 0&&xt.has(e)?Op:t}function Np(e){if(e.nodeType!==1)return;let t=e;if(t.namespaceURI===Op)return t.localName===`foreignObject`?void 0:Op;if(t.namespaceURI===kp)return kp}function Pp(e){if(e===`xmlns`)return Dp;let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(0,t);return n===`xlink`?Tp:n===`xml`?Ep:n===`xmlns`?Dp:null}function Fp(e,t,n){if(t===`innerText`||t===`textContent`)return;if(t===`dangerouslySetInnerHTML`){ip(e,n);return}if(t===`suppressContentEditableWarning`||t===`suppressNativeChangeWarning`||t===`__octaneNativeChangeDiagnostic`)return;switch(t.length){case 5:if(t===`value`){let t=e.localName;if(t===`input`||t===`textarea`)return mg(e,n);if(t===`select`)return vg(e,n)}else if(t===`muted`&&!jp(e)){(M?.view(e)??e).muted=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 7:if(t===`checked`&&e.localName===`input`)return _g(e,n);break;case 8:if((t===`multiple`||t===`selected`)&&!jp(e)){if(t===`selected`){let t=I();if(t!==null&&!t.isFresh(e))return}(M?.view(e)??e)[t]=n&&typeof n!=`function`&&typeof n!=`symbol`;return}break;case 9:if(t===`autoFocus`&&!jp(e))return ag(e,n);break;case 12:if(t===`defaultValue`){let t=e.localName;if(t===`input`||t===`textarea`||t===`select`)return bg(e,n)}break;case 14:if(t===`defaultChecked`&&e.localName===`input`)return Cg(e,n)}if(t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&jp(e)&&(typeof n==`function`||e.$$ceListeners?.[t]!==void 0)){let r=t.endsWith(`Capture`),i=r?t.slice(2,-7):t.slice(2),a=e.$$ceListeners??={},o=a[t];if(o!==void 0&&o!==n&&(M?.view(e)??e).removeEventListener(i,o,r),typeof n==`function`){o!==n&&(M?.view(e)??e).addEventListener(i,n,r),a[t]=n,(M?.view(e)??e).removeAttribute(t);return}delete a[t]}if(!jp(e)){let e=St.get(t);e!==void 0&&(t=e)}let r=Ip(e,t,n);r!==null&&(r=x(e.localName,t,r));let i=I();if(i!==null&&!i.allowAttribute(e,t,r))return;let a=Pp(t);if(E!==null&&Go(e,t),r===null){if(a){let n=t.indexOf(`:`);(M?.view(e)??e).removeAttributeNS(a,n>=0?t.slice(n+1):t)}else(M?.view(e)??e).removeAttribute(t);return}bt.test(t)&&(a?(M?.view(e)??e).setAttributeNS(a,t,r):(M?.view(e)??e).setAttribute(t,r))}function Ip(e,t,n){if(t.charCodeAt(0)===97&&t.startsWith(`aria-`))return n==null||typeof n==`function`||typeof n==`symbol`?null:String(n);let r=typeof n;if(r===`boolean`&&Ct(t)||r===`boolean`&&t.startsWith(`data-`))return n?`true`:`false`;if(r===`function`||r===`symbol`)return null;if(!jp(e)){let e=t.toLowerCase();if(vt.has(e)||r===`boolean`&&(e===`download`||e===`capture`))return n?``:null;if(r===`boolean`||yt.has(e)&&!(Number(n)>=1)||(e===`rowspan`||e===`start`)&&Number.isNaN(Number(n))||t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110)return null}if(n==null||n===!1)return null;let i;return i=n===!0?``:String(n),i===``&&(t===`src`||t===`href`&&e.nodeName!==`A`&&e.nodeName!==`AREA`||t===`data`&&e.nodeName===`OBJECT`)?null:i}function Lp(e,t){let n=h(t),r=I();if(r!==null){r.queueClass(e,n,!0,!1,t==null||t===!1);return}E!==null&&Go(e,`class`),t==null||t===!1?(M?.view(e)??e).removeAttribute(`class`):(M?.view(e)??e).className=n}function Rp(e,t){let n=t==null||t===!1?null:h(t),r=I();if(r!==null){r.queueClass(e,n,!1,!0,n===null);return}E!==null&&Go(e,`class`),n===null?(M?.view(e)??e).removeAttribute(`class`):(M?.view(e)??e).setAttribute(`class`,n)}function zp(e,t){e.namespaceURI===Op?Rp(e,t):Lp(e,t)}var Bp=`!important`;function Vp(e,t,n){let r=(M?.view(e)??e).style,i=I();i!==null&&i.applyStyle(e,t,n)||(E!==null&&Go(e,`style`),!(Cf!==null&&Cf(e,t,n))&&Hp(e,r,t,n))}function Hp(e,t,n,r){if(n==null||n===!1||n===``){if(r&&typeof r==`object`)for(let e in r)t.removeProperty(Kn(e));else typeof r==`string`&&(t.cssText=``);return}if(typeof n==`string`){r!==n&&(t.cssText=n);return}if(r&&typeof r==`object`){for(let e in r)e in n||t.removeProperty(Kn(e));for(let i in n){let a=n[i];a!==r[i]&&(a==null||typeof a==`boolean`?t.removeProperty(Kn(i)):Up(e,t,i,a))}}else{typeof r==`string`&&(t.cssText=``);for(let r in n){let i=n[r];i!=null&&typeof i!=`boolean`&&Up(e,t,r,i)}}}function Up(e,t,n,r){let i=Kn(n),a;a=wt(n,r);let o=a.trimEnd();o.endsWith(Bp)?t.setProperty(i,o.slice(0,o.length-10).trimEnd(),`important`):t.setProperty(i,a)}function Wp(e){let t=e.charCodeAt(2);return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&t>=65&&t<=90}var Gp=`$$capture:`;function Kp(e){return e===`DoubleClick`?`dblclick`:e===`Focus`?`focusin`:e===`Blur`?`focusout`:e.toLowerCase()}var qp;function Jp(e,t){if(!Wp(e)||t!==void 0&&jp(t)&&!Dt(e))return null;let n=qp?.get(e);if(n!==void 0)return n;let r=e.slice(2),i=!1;r.length>7&&r.endsWith(`Capture`)&&e!==`onGotPointerCapture`&&e!==`onLostPointerCapture`&&(i=!0,r=r.slice(0,r.length-7));let a=Kp(r),o={type:a,key:i?Gp+a:`$$`+a,capture:i};return Dt(e)&&(qp??=new Map).set(e,o),o}function Yp(e,t,n){if(t===`class`||t===`className`)E!==null&&Go(e,`class`),(M?.view(e)??e).removeAttribute(`class`);else if(t===`style`)Vp(e,null,n);else if(t===`dangerouslySetInnerHTML`)ip(e,null);else if(t===`suppressHydrationWarning`)e.__oct_suppress=!1;else if(t!==`suppressNativeChangeWarning`&&t!==`__octaneNativeChangeDiagnostic`){let r=Zp(e,t);if(r!==null){Kh(e,r,null,n);return}let i=Jp(t,e);i?Sm(e,i.key,null):Fp(e,t,null)}}function Xp(e){if(e==null)return null;let t=Object(e),n=Object.create(null);for(let e of Reflect.ownKeys(t)){if(!Object.prototype.propertyIsEnumerable.call(t,e))continue;let r=t[e];typeof e==`string`&&(n[e]=r)}return n}function Zp(e,t){return t===`action`&&e.localName===`form`?`action`:(t===`formAction`||t===`formaction`)&&(e.localName===`button`||e.localName===`input`)?`formaction`:null}function Qp(e){return e===`ref`||e===`children`||e===`dangerouslySetInnerHTML`||e===`suppressHydrationWarning`||e===`suppressContentEditableWarning`||e===`suppressNativeChangeWarning`||e===`__octaneNativeChangeDiagnostic`||e===`autoFocus`||e===`value`||e===`defaultValue`||e===`checked`||e===`defaultChecked`||e===`multiple`||Wp(e)}function $p(e,t){if(t===`class`||t===`className`)return`class`;let n=Zp(e,t);return n===null?jp(e)?t:St.get(t)??t:n}function em(e,t,n,r){let i=null,a=0;function o(e,t){if(typeof e!=`string`)return;let r=a++,i=n.get(e);i===void 0?n.set(e,{name:e,value:t,firstOrder:r,lastOrder:r}):(i.value=t,i.lastOrder=r)}for(let e of t){if(!e[0]){let t=e[1];if(e[3]===!0&&typeof t==`string`&&(t===`class`||t===`className`)){(i??=[]).push({rawName:t,value:e[2],order:a++});continue}o(t,e[2]);continue}let t=e[1];if(!(t==null||typeof t!=`object`&&typeof t!=`function`))for(let e of Object.keys(Object(t)))o(e,t[e])}let s=new Map,c=e.namespaceURI===`http://www.w3.org/1999/xhtml`,l=!1;for(let t of n.values()){let n=t.name;if(n===`key`)continue;let r=Qp(n),i=r?n:$p(e,n),a=c&&!r?i.toLowerCase():i,o=s.get(a);if(o!==void 0){if(o.lastOrder>=t.lastOrder)continue;l=!0}t.name=i,s.set(a,t)}if(i!==null)for(let e of i){let t=s.get(`class`);t===void 0?s.set(`class`,{name:`class`,value:e.value,firstOrder:e.order,lastOrder:e.order}):(t.value=Wn(t.value,e.value),t.lastOrder=e.order)}let u=Object.create(null),d=l?[...s.values()].sort((e,t)=>e.firstOrder-t.firstOrder):s.values();for(let{name:e,value:t}of d)u[e]=t;return r!==void 0&&`style`in u&&(u.style=r(u.style)),u}function tm(e,t,n,r,i=!1,a,o=!1){let s=new Map,c=em(e,t,s,a),l=e.localName,u=l===`input`||l===`textarea`||l===`select`;return gm(e,c,n,r,!0,u),ap(e,t,i),u&&!o&&wg(e,l,s.get(`value`)?.value,s.get(`defaultValue`)?.value,s.get(`checked`)?.value,s.get(`defaultChecked`)?.value,s.get(`multiple`)?.value),c}var nm=Symbol(`octane.signal-host-prop-sources`);function rm(e,t,n){if(Df(e))return t.add(e),n(e);if(typeof e!=`object`||!e||Array.isArray(e))return e;let r;for(let i of Object.keys(e)){let a=e[i];Df(a)&&(t.add(a),r??={...e},r[i]=n(a))}return r??e}function im(e,t,n=Of){let r=new Set,i;for(let a=0;a<e.length;a++){let o=e[a];if(!o[0]){let s=o[1]===`children`||o[1]===`style`&&t!==void 0?o[2]:o[1]===`style`?rm(o[2],r,n):Df(o[2])?(r.add(o[2]),n(o[2])):o[2];s!==o[2]&&(i??=e.slice(),i[a]=[!1,o[1],s,o[3]]);continue}let s=o[1];if(typeof s!=`object`||!s)continue;let c;for(let e of Object.keys(s)){let i=s[e],a=e===`children`||e===`style`&&t!==void 0?i:e===`style`?rm(i,r,n):Df(i)?(r.add(i),n(i)):i;a!==i&&(c??={...s},c[e]=a)}c!==void 0&&(i??=e.slice(),i[a]=[!0,c])}return{sources:i??e,handles:r}}function am(e,t){let n;for(let r of e){if(!r[0]){r[1]===t&&(n=r[2]);continue}let e=r[1];typeof e==`object`&&e&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n=e[t])}return Df(n)?n:null}function om(e){if(!(e.disposed||e.pendingControl||e.scope.block.disposed))try{xr(e.scope,()=>{let t=im(e.sources,e.readStyle);e.resolved=tm(e.element,t.sources,e.resolved,e.scope,e.hasNestedChildren,e.readStyle)})}catch{Cs(e.scope.block)}}function sm(e,t){let n=t[Un](kf(e,()=>om(e)));return e.subscriptions.set(t,n),n}function cm(e,t){for(let[n,r]of e.subscriptions)t.has(n)||(r(),e.subscriptions.delete(n),E!==null&&Ua(()=>{e.disposed||e.scope.block.disposed||xr(e.scope,()=>sm(e,n))}));for(let n of t){if(e.subscriptions.has(n))continue;let t=sm(e,n);E!==null&&Ua(()=>{t(),e.subscriptions.delete(n)})}}function lm(e,t){let n=Wt(e.element,t,n=>{Dn(()=>xr(e.scope,()=>{let r=am(e.sources,t);!e.disposed&&!e.pendingControl&&Af(r)&&r.set(n)}))});return e.controlWriters.set(t,n),n}function um(e){let t=e.element,n=am(e.sources,`value`),r=am(e.sources,`checked`),i=Af(n)||Af(r);for(let[t,i]of e.controlWriters)t===`value`&&Af(n)||t===`checked`&&Af(r)||(i(),e.controlWriters.delete(t),E!==null&&Ua(()=>{!e.disposed&&!e.scope.block.disposed&&lm(e,t)}));if(Af(n)&&!e.controlWriters.has(`value`)){let t=lm(e,`value`);E!==null&&Ua(()=>{t(),e.controlWriters.delete(`value`)})}if(Af(r)&&!e.controlWriters.has(`checked`)){let t=lm(e,`checked`);E!==null&&Ua(()=>{t(),e.controlWriters.delete(`checked`)})}if(!i){if(e.input!==void 0){let n=e.input;(M?.view(t)??t).removeEventListener(`input`,n),E!==null&&Ua(()=>{!e.disposed&&!e.scope.block.disposed&&(M?.view(t)??t).addEventListener(`input`,n)}),e.input=void 0}return}if(Mf(t,e.site),e.input!==void 0)return;let a=()=>{if(e.disposed||e.pendingControl)return;let n=rn(t);n!==null&&Dn(()=>xr(e.scope,()=>{let t=am(e.sources,`value`),r=am(e.sources,`checked`);Af(r)&&n.checked!==void 0&&r.set(n.checked),Af(t)&&t.set(n.selectedValues??n.value)}))};e.input=a,(M?.view(t)??t).addEventListener(`input`,a),E!==null&&Ua(()=>(M?.view(t)??t).removeEventListener(`input`,a))}function dm(e){if(!e.disposed&&hc?.stageAction(()=>dm(e))!==!0){e.disposed=!0;for(let t of e.subscriptions.values())t();mi(e.scope.block),e.subscriptions.clear();for(let t of e.controlWriters.values())t();e.controlWriters.clear(),e.input!==void 0&&N(e.element).removeEventListener(`input`,e.input),nc(e.resolved,e.element)}}function fm(e,t){nl(()=>{e.disposed||e.scope.block.disposed||!e.pendingControl||Dn(()=>xr(e.scope,()=>{let n=rn(e.element),r=am(e.sources,`value`);if(n.editRevision>0||e.element.localName===`textarea`&&Af(r)&&Object.is(Of(r),t)){let t=am(e.sources,`checked`);Af(t)&&n.checked!==void 0&&t.set(n.checked),Af(r)&&r.set(n.selectedValues??n.value)}if(!(e.disposed||e.scope.block.disposed)){if(!on(e.element,n.revision)){fm(e,t);return}e.pendingControl=!1,om(e)}}))})}function pm(e,t,n,r,i,a){let o={[nm]:!0,scope:e,element:t,site:r,hasNestedChildren:i,readStyle:a,sources:n,resolved:void 0,subscriptions:new Map,controlWriters:new Map,disposed:!1};return Jn(e,()=>dm(o)),o}function mm(e,t,n,r,i,a=!1,o){let s=typeof t==`object`&&t&&t[nm]===!0?t:void 0;s===void 0?s=pm(e,n,r,i,a,o):gc===null&&(E!==null&&Do(s),s.sources=r);let c=s;if(gc!==null){let e=gc.signalHosts??=new Map;s=e.get(c),s===void 0?(s={...c},e.set(c,s),vc()&&Ua(()=>e.delete(c))):E!==null&&Do(s),s.sources=r}let l=am(r,`value`);l!==null&&e.block.idState.renderOwner?.controlLeases?.has(n)&&pf(!1);let u=am(r,`checked`),d=Af(l)||Af(u)?rn(n):null;d!==null&&(Mf(n,i),s.pendingControl||=I()!==null&&(d.editRevision>0||Af(l)&&an(n,Of(l))));let f=im(r,o);return s.resolved=tm(n,f.sources,s.resolved,e,a,o,s.pendingControl),gc===null?(cm(s,f.handles),um(s),!s.pendingControl&&d!==null&&on(n,d.revision)):hc.stageAction(()=>{c.disposed||(c.sources=s.sources,c.resolved=s.resolved,c.pendingControl=s.pendingControl,xr(e,()=>{cm(c,f.handles),um(c)}),!c.pendingControl&&d!==null&&on(n,d.revision),om(c))}),s.pendingControl&&fm(c,s.resolved?.value),c}function hm(e,t){switch(e.localName){case`input`:return t===`value`||t===`defaultValue`||t===`checked`||t===`defaultChecked`;case`textarea`:return t===`value`||t===`defaultValue`;case`select`:return t===`value`||t===`defaultValue`||t===`multiple`}return!1}function gm(e,t,n,r,i=!1,a=!1){if(t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),`suppressHydrationWarning`)&&(e.__oct_suppress=t.suppressHydrationWarning===!0),!i){if(t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),`children`)){if((M?.view(e)??e)[$f]=t.children,t.children!=null&&(M?.view(e)??e)[Xf]===!0)throw np()}else n!=null&&Object.prototype.propertyIsEnumerable.call(Object(n),`children`)&&((M?.view(e)??e)[$f]=void 0)}if(n){for(let r of Object.keys(Object(n)))if(r!==`key`&&r!==`children`&&!(i&&r===`dangerouslySetInnerHTML`)&&!(a&&hm(e,r))){if(r===`ref`){let r=t?t.ref:void 0;n.ref!=null&&n.ref!==r&&tc(n.ref,e);continue}t!=null&&Object.prototype.propertyIsEnumerable.call(Object(t),r)||Yp(e,r,n[r])}}if(t==null)return;let o=n===void 0?I():null,s=o!==null&&!o.isFresh(e);for(let o of Object.keys(Object(t))){if(o===`key`||o===`children`||i&&o===`dangerouslySetInnerHTML`||a&&hm(e,o))continue;let c=t[o],l=n?n[o]:void 0;if(o===`ref`){if(c===l)continue;r?$s(r,c,e):fp(c,e);continue}if(o===`suppressHydrationWarning`||o===`suppressNativeChangeWarning`||o===`__octaneNativeChangeDiagnostic`)continue;if(o===`class`||o===`className`){if(c===l&&!s)continue;Rp(e,c);continue}if(o===`style`){Vp(e,c,l);continue}if(o===`dangerouslySetInnerHTML`){ip(e,c);continue}let u=Zp(e,o);if(u!==null){if(c===l&&!s)continue;Kh(e,u,c,l);continue}if(c===l&&!Ag(e,o)&&!s)continue;let d=Jp(o,e);if(d){if(c===l)continue;d.capture?Um.has(d.type)||Qm([d.type]):Mm.has(d.type)||Zm([d.type]),Sm(e,d.key,c);continue}(n===void 0||o!==`autoFocus`||jp(e))&&Fp(e,o,c)}}var _m=Symbol(),vm=1;function ym(e){return typeof e==`object`&&!!e&&e[_m]===vm}var bm=[],xm=null;function Sm(e,t,n){t!==void 0&&(E!==null&&(E.push(Sa,e,t,(M?.view(e)??e)[t]),Eo()),(M?.view(e)??e)[t]=n);let r=Pe!==null||Ne!==void 0?Re():null;if(Qn||Ln||r!==null||xm!==null){let t=r??(Ln||Ir?.block.idState.renderOwner?.signalOwner!==void 0?Ir===null?Le():$n.get(Ir)||Ir:Ir);if(t!==null){(t instanceof Zc||t instanceof Xc)&&$n.get(t)===void 0&&$n.set(t,!1);let n=xm??=new WeakMap;if(gc!==null)hc.stageAction(()=>{n.get(e)!==t&&n.set(e,t)});else{let r=n.get(e);r!==t&&(E!==null&&E.push(Oa,n,e,r),n.set(e,t))}}}}var Cm=1,wm=2,Tm=4,Em=8,Dm=16,Om=32,km=64,Am=128,jm=256,Mm=new Map,Nm=new Map,Pm=new WeakMap,Fm=0,Im=Symbol(`octane.portalPathLength`),Lm=new WeakMap,Rm=0,zm=Symbol(`octane.rootEpoch`);function Bm(e,t){let n=Lm.get(e);Lm.set(e,{count:(n?.count||0)+t,since:++Rm,previous:n}),n!==void 0&&setTimeout(()=>{let t=Lm.get(e);t!==void 0&&(t.previous=void 0)},0)}function Vm(e,t){let n=Lm.get(e);for(;n!==void 0&&n.since>t;)n=n.previous;return n!==void 0&&n.count>0}function Hm(e,t){if(Nm.size===1&&Fm===0){tt(e),e[zm]=Rm;return}let n=e.composedPath();if(Nm.size===1)return tt(e),e[zm]=Rm,Fm!==0&&(xh(n,Rm),e[Im]=n.length),n;for(let r=n.length-1;r>=0;r--)if(Nm.has(n[r])){n[r]===t?(tt(e),e[zm]=Rm,Fm!==0&&(xh(n,Rm),e[Im]=n.length)):Fm!==0&&n.length>(e[Im]||0)&&(xh(n,e[zm]??Rm),e[Im]=n.length);break}return n}var Um=new Map,Wm=`abort.beforetoggle.cancel.canplay.canplaythrough.close.durationchange.emptied.encrypted.ended.error.load.loadeddata.loadedmetadata.loadstart.pause.play.playing.progress.ratechange.resize.seeked.seeking.stalled.suspend.timeupdate.toggle.volumechange.waiting`.split(`.`),Gm=new Set([`focus`,`blur`,`invalid`,`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`,...Wm]),Km=e=>Gm.has(e),qm={passive:!1},Jm={capture:!0,passive:!1};function Ym(e,t){return e===`touchstart`||e===`touchmove`?t?Jm:qm:t}var Xm=new Set([`pointerenter`,`pointerleave`,`mouseenter`,`mouseleave`,`scroll`,`scrollend`]);function Zm(e){let t=typeof Element<`u`&&Object.isExtensible(Element.prototype);for(let n=0;n<e.length;n++){let r=e[n];if(Mm.has(r))continue;let i=Um.get(r)??rh(r);i.flags|=Cm,Mm.set(r,i),t&&Vd(Element.prototype,`$$`+r);for(let e of Nm.keys())Km(r)&&Um.has(r)||(e.addEventListener(r,kh,Ym(r,Km(r))),Km(r)||e.addEventListener(r,Ah,Ym(r,!0)))}}function Qm(e){let t=typeof Element<`u`&&Object.isExtensible(Element.prototype);for(let n=0;n<e.length;n++){let r=e[n];if(Um.has(r))continue;let i=Mm.get(r)??rh(r);i.flags|=wm,Um.set(r,i),t&&Vd(Element.prototype,Gp+r);for(let e of Nm.keys())Mm.has(r)||e.addEventListener(r,Km(r)?kh:Ah,Ym(r,!0))}}function $m(e,t=!1){if(hc?.stageDelegation(e,t,!0)===!0)return;Ud(),t&&Bm(e,1);let n=Nm.get(e)||0;if(Nm.set(e,n+1),n===0){e.onclick==null&&e.nodeType===1&&(e.onclick=jh);for(let t of Mm.keys())e.addEventListener(t,kh,Ym(t,Km(t))),Km(t)||e.addEventListener(t,Ah,Ym(t,!0));for(let t of Um.keys())Mm.has(t)||e.addEventListener(t,Km(t)?kh:Ah,Ym(t,!0))}}function eh(e,t=!1){if(hc?.stageDelegation(e,t,!1)===!0)return;t&&Bm(e,-1);let n=Nm.get(e);if(n){if(n===1){Nm.delete(e);for(let t of Mm.keys())e.removeEventListener(t,kh,Km(t)),Km(t)||e.removeEventListener(t,Ah,!0);for(let t of Um.keys())e.removeEventListener(t,Km(t)?kh:Ah,!0)}else Nm.set(e,n-1)}}var th=new Set(`auxclick.beforeblur.beforeinput.blur.cancel.change.click.close.compositionend.compositionstart.compositionupdate.contextmenu.copy.cut.dblclick.dragend.dragstart.drop.focus.focusin.focusout.fullscreenchange.gotpointercapture.hashchange.input.invalid.keydown.keypress.keyup.lostpointercapture.mousedown.mouseup.paste.pause.play.pointercancel.pointerdown.pointerup.popstate.ratechange.reset.resize.seeked.select.selectionchange.selectstart.submit.textInput.touchcancel.touchend.touchstart.volumechange`.split(`.`)),nh=0;function rh(e){return{name:e,bubbleKey:`$$`+e,captureKey:Gp+e,flags:(Km(e)?Tm:0)|(Xm.has(e)?Em:0)|(th.has(e)?Dm:0)|(Xh.has(e)?Om:0)|(e===`click`||e===`dblclick`||e===`mousedown`||e===`mousemove`||e===`mouseup`?km:0)|(e===`mouseenter`?Am:0)|(e===`invalid`||Wm.includes(e)?jm:0)}}var ih=Symbol(`octane.bubbleVersion`),ah=[],oh=0;function sh(e){for(let t=oh-1;t>=0;t--){let n=ah[t];if(n.event===e)return n}}function ch(){let e=sh(this);e!==void 0&&(e.flags|=1);let t=e?.stop||this.stopPropagation;(t===ch?Event.prototype.stopPropagation:t).call(this)}function lh(){let e=sh(this);e!==void 0&&(e.flags|=2);let t=e?.immediate||this.stopImmediatePropagation;(t===lh?Event.prototype.stopImmediatePropagation:t).call(this)}var uh={configurable:!0,writable:!0,value:ch},dh={configurable:!0,writable:!0,value:lh};function fh(e,t,n,r){n?.configurable===!1?n.writable&&Object.defineProperty(e,t,{value:r.value}):Object.defineProperty(e,t,r)}function ph(e,t,n){let r=ah[oh];return r===void 0&&(r={event:null,flags:0,stop:null,immediate:null,currentTarget:null},ah.push(r)),oh++,r.event=e,r.flags=0,r.stop=e.stopPropagation,fh(e,`stopPropagation`,t,uh),n!==null&&(r.immediate=e.stopImmediatePropagation,fh(e,`stopImmediatePropagation`,n,dh)),r}function mh(e,t,n){let r=ah[--oh];r.event=null,r.stop=null,r.immediate=null,r.currentTarget=null,t===void 0?delete e.stopPropagation:Object.defineProperty(e,\"stopPropagation\",t),n!==null&&(n===void 0?delete e.stopImmediatePropagation:Object.defineProperty(e,\"stopImmediatePropagation\",n))}var hh={configurable:!0,get(){return sh(this)?.currentTarget}},gh=[],_h=[],vh=null;function yh(e,t,n){let r=n?t.captureKey:t.bubbleKey,i=(t.flags&km)!==0||!n&&(t.flags&Am)!==0,a=!1;for(let t=e;t<gh.length;t++){let e=gh[t],n=e[r],o=n!=null&&i&&e.disabled&&(e.localName===`button`||e.localName===`input`||e.localName===`select`||e.localName===`textarea`)?null:n;_h[t]=o,o!=null&&(a=!0,xm!==null&&((vh??=[])[t]=xm.get(e)))}return a}function bh(e){if(e.$$portalParent!=null||(M?.view(e)??e).parentNode===null)return;let t=(M?.view(e)??e).parentNode,n=Pm.get(t);if(n===void 0)return;let r,i=(M?.view(e)??e).previousSibling,a=n.size;for(;i!==null;){let o=i.$$portalEventStart,s=o?.$$portalEventRange;if(a!==0&&o!==void 0&&s!==void 0&&n.has(s)&&s.start===o&&s.end===i&&(M?.view(o)??o).parentNode===t){a--,i=(M?.view(o)??o).previousSibling;continue}let c=i.$$portalEventRange,l=c?.end;if(c!==void 0&&n.has(c)&&c.start===i&&l!=null&&(M?.view(l)??l).parentNode===t&&((M?.view(i)??i).compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&((M?.view(e)??e).compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){r=c;break}i=(M?.view(i)??i).previousSibling}r!==void 0&&(D!==null&&(O(e,`$$portalParent`,e.$$portalParent),O(e,`$$portalContainer`,e.$$portalContainer)),e.$$portalParent=r.host,e.$$portalContainer=t)}function xh(e,t){for(let n=0;n<e.length;n++){let r=Sh(e[n]);if(r===null)continue;bh(r);let i=r.$$portalParent;for(;i!=null&&!Vm(i,t)&&e.indexOf(i)<0;)bh(i),i=i.$$portalParent||(M?.view(i)??i).parentNode}}function Sh(e){return e!=null&&typeof e.nodeType==`number`?e:null}function Ch(e,t,n=e.composedPath()){let r=gh,i=r.length,a=e[zm]??Rm,o=Fm!==0||a!==Rm,s=n.indexOf(t);if(s<0)return 0;if(Nm.size===1&&a===Rm&&Vm(t,a)){let e=0;for(;e<s;e++){let t=Sh(n[e]);if(t===null||o&&t.$$portalParent!=null)break;r.push(t)}if(e===s)return r.length-i;r.length=i}let c=Sh(n[0]);if(c===null)return 0;let l=0,u=!1;for(;;){r.length=i;let e=c,d=l,f=null,p=!1,m=!1;for(;e!==null;){if(Vm(e,a)&&!(e===c&&u)){f??=e,e===t&&(f===e?p=!0:m=!0);break}r.push(e);let s=o?e.$$portalParent:void 0;if(s!=null){let a=e.$$portalContainer;if(a==null)return r.length=i,0;f??=a,a===t&&(f===a?p=!0:m=!0),e=s,d=n.indexOf(s)}else e=d>=0?Sh(n[++d]):(M?.view(e)??e).parentNode}if(m)return r.length=i,0;if(p)return r.length-i;if(f===null)return r.length=i,0;let h=n.indexOf(f);if(h<l||h>=s||h===l&&u)return r.length=i,0;c=f,l=h,u=!0}}function wh(e,t,n){let r=Ir,i=T;Ir=null,T=null;let a=()=>{if(typeof e==`function`){e(t);return}if(ym(e)){let n=e,r=n.args;if(typeof r!=`number`)switch(r.length){case 0:n.fn();break;case 1:n.fn(r[0]);break;case 2:n.fn(r[0],r[1]);break;default:n.fn.apply(null,r)}else r===1?n.fn(n.a0):r===2?n.fn(n.a0,n.a1):r===-1?n.fn(t,n.a0):n.fn(t,n.a0,n.a1);return}Th(`${t.type} event`,e,t)};try{let e=n instanceof Zc||n instanceof Xc?br(n):n;e===void 0||Le()===e?a():Be(e,a)}catch(e){Eh(e)}finally{Ir=r,T=i}}function Th(e,t,n){if(t)throw Error(w(46,e,typeof t));t(n)}function Eh(e){if(typeof reportError==`function`){reportError(e);return}if(typeof window<`u`&&typeof ErrorEvent==`function`){let t=new ErrorEvent(`error`,{error:e,message:String(e?.message??e),cancelable:!0});window.dispatchEvent(t),t.defaultPrevented||console.error(e);return}console.error(e)}function Dh(e){nh===0&&(e.flags&Dm)!==0&&Zh.length>0&&(!ai&&Cc()&&(Zo?.queueAllTransition()===!0?Ps():Zs(jh)),kg()),e.name===`click`&&(Qh=null)}function Oh(e,t){if(!e.bubbles||e.cancelBubble||(t.flags&Cm)===0){e.bubbles&&(t.flags&Cm)!==0&&jg(e,t),Dh(t);return}if((t.flags&Dm)===0)return;if(Zh.length===0){if((t.flags&Om)===0)return;let n=e.target?.localName;if(n!==`input`&&n!==`textarea`&&n!==`select`)return}let n=e[ih],r=()=>{e[ih]===n&&(jg(e,t),Dh(t))};e.isTrusted?setTimeout(r,0):queueMicrotask(r)}function kh(e){let t=Mm.get(e.type)??Um.get(e.type);if(t===void 0)return;let n=(t.flags&Tm)!==0,r=n?Hm(e,this):void 0;e[ih]=(e[ih]||0)+1,jg(e,t);let i=(t.flags&Em)!==0;nh++;let a=e.target,o=zh,s=e.type===`submit`&&a!=null&&a.nodeName===`FORM`?Rh(a,e):null;s!==null&&(zh=s);let c=jn(e),l=gh.length,u,d=!1,f;try{if(n&&(t.flags&wm)!==0&&(r??=e.composedPath(),Ah.call(this,e,r,t))||(t.flags&Cm)===0||a?.nodeType===1&&jp(a)&&(t.flags&jm)!==0||(Ch(e,this,r),!yh(l,t,!1)&&s===null))return;u=Object.getOwnPropertyDescriptor(e,`stopPropagation`),d=!0,f=ph(e,u,null);for(let t=l;t<gh.length;t++){let n=gh[t];if(i&&n!==e.target)break;let r=_h[t];if(r!=null&&!et(e,n,!1)&&(Mh(e,n,f),wh(r,e,vh?.[t]),f.flags&1)||i)break}s!==null&&Bh!==null&&!e.defaultPrevented&&gh.includes(s.form,l)&&Bh(s.form,e,s.action,s.submitter)}finally{gh.length=l,_h.length=l,vh!==null&&(vh.length=l),d&&mh(e,u,null),s!==null&&(zh=o,Vh(s)),d&&Nh(e);try{Nn(e,c,!1,Eh)}catch(e){Eh(e)}nh--,Dh(t)}}function Ah(e,t,n=Mm.get(e.type)??Um.get(e.type)){if(t??=Hm(e,this),n===void 0||(n.flags&wm)===0)return!1;t??=e.composedPath(),(!e.bubbles||(n.flags&Cm)===0)&&jg(e,n);let r=gh.length;Ch(e,this,t);let i=yh(r,n,!0),a=i?Object.getOwnPropertyDescriptor(e,`stopPropagation`):void 0,o=i&&(n.flags&Tm)!==0?Object.getOwnPropertyDescriptor(e,`stopImmediatePropagation`):null,s=e.cancelBubble,c=!1;nh++;let l=jn(e),u;try{if(i){u=ph(e,a,o);for(let t=gh.length-1;t>=r;t--){let n=_h[t];if(n!=null&&!et(e,gh[t],!0)&&(Mh(e,gh[t],u),wh(n,e,vh?.[t]),u.flags&1))break}}}finally{c=(u===void 0?i:u.flags!==0)||!s&&e.cancelBubble,gh.length=r,_h.length=r,vh!==null&&(vh.length=r),i&&(mh(e,a,o),Nh(e));try{Nn(e,l,e.bubbles&&!e.cancelBubble&&(n.flags&Cm)!==0,Eh)}catch(e){Eh(e)}nh--,Oh(e,n)}return c}function jh(){}function Mh(e,t,n){n.currentTarget=t,Object.defineProperty(e,\"currentTarget\",hh)}function Nh(e){delete e.currentTarget}var Ph={pending:!1,data:null,method:null,action:null},Fh=new WeakMap,Ih=new WeakMap;function Lh(e,t){Fh.set(e,t);let n=Ih.get(e);if(n)for(let e of n)e()}function Rh(e,t){let n=t.submitter,r=e.$$formAction;if(n!=null){let e=n.$$formAction??(M?.view(n)??n).getAttribute(`formaction`);e!=null&&(r=e,n=null)}return{form:e,event:t,action:r,submitter:n??null,transitions:0,published:!1,intercepted:!1}}var zh=null,Bh=null;function Vh(e){if(e.intercepted||e.transitions===0||!e.event.defaultPrevented)return;let t=e.form,n=null;try{n=new FormData(t);let r=e.event.submitter;r&&(M?.view(r)??r).name&&n.append((M?.view(r)??r).name,(M?.view(r)??r).value??``)}catch{}let r=t;r.$$pendingSubmits=(r.$$pendingSubmits||0)+1,e.published=!0,Lh(t,{pending:!0,data:n,method:t.method||`get`,action:r.$$formAction??(M?.view(t)??t).getAttribute(`action`)})}function Hh(e){if(e.transitions--,e.transitions!==0||!e.published)return;let t=e.form;t.$$pendingSubmits=Math.max(0,(t.$$pendingSubmits||1)-1),t.$$pendingSubmits===0&&Lh(e.form,Ph)}var Uh=null;function Wh(e){try{e.reset(),Mg(e)}catch{}}function Gh(){if(Uh===null||oi>0||si>0)return;let e=Uh;Uh=null;for(let t of e)Wh(t)}function Kh(e,t,n,r){if(typeof n==`function`){(M?.view(e)??e).$$formAction=n,e.$$formSubmitWired||(e.$$formSubmitWired=!0,Bh=qh,Zm([`submit`])),(M?.view(e)??e).removeAttribute(t);return}(M?.view(e)??e).$$formAction=void 0,Fp(e,t,n)}function qh(e,t,n,r){if(typeof n!=`function`)return;t.preventDefault(),zh!==null&&zh.form===e&&(zh.intercepted=!0);let i=new FormData(e);r&&(M?.view(r)??r).name&&i.append((M?.view(r)??r).name,(M?.view(r)??r).value??``);let a=n,o=e;o.$$pendingSubmits=(o.$$pendingSubmits||0)+1,Lh(e,{pending:!0,data:i,method:`post`,action:a});let s=a.$$isActionDispatcher===!0,c=t=>{if(o.$$pendingSubmits=Math.max(0,(o.$$pendingSubmits||1)-1),o.$$pendingSubmits===0&&Lh(e,Ph),t&&!s)try{e.reset(),Mg(e)}catch{}},l;try{s?l=a(i):Ab(()=>(l=a(i),l))}catch(e){c(!1),console.error(e);return}Promise.resolve(l).then(()=>c(!0),()=>c(!1))}var Jh=Symbol(`octane.uncontrolled`),Yh=[`input`,`change`,`click`],Xh=new Set(Yh),Zh=[],Qh=null,$h=null,eg=[],tg=[],ng=[];function rg(e,t){t!==null&&(typeof t==`object`||typeof t==`function`)&&hc?.recordStageEntry(t),e.push(t),D!==null&&Ua(()=>{let n=e.lastIndexOf(t);n!==-1&&e.splice(n,1)})}function ig(){return eg.length>0||tg.length>0||ng.length>0}function ag(e,t){if(e.$$afSeen!==void 0||(e.$$afSeen=!0,!t))return;switch(e.localName){case`button`:case`input`:case`select`:case`textarea`:break;default:return}let n=I();(n===null||n.isFresh(e))&&rg(ng,e)}function og(e){if(e.localName===`textarea`)return!0;if(e.localName!==`input`)return!1;switch((M?.view(e)??e).type){case`text`:case`search`:case`url`:case`tel`:case`password`:case`email`:case`number`:return!0}return!1}function sg(e){let t=e.currentTarget,n=t.$$ctrl;n!==void 0&&(n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&(clearTimeout(n.compositionEndTask),n.compositionEndTask=null),n.composing=!0,(M?.view(t)??t).addEventListener(`blur`,cg))}function cg(e){let t=e.currentTarget,n=t.$$ctrl;if(n===void 0)return;(M?.view(t)??t).removeEventListener(`blur`,cg),n.compositionEndTask!==void 0&&n.compositionEndTask!==null&&clearTimeout(n.compositionEndTask),n.composing=!0;let r=()=>{n.compositionEndTask=null,n.composing=!1,Eg(t)};n.compositionEndTask=e.type===`blur`?setTimeout(r,0):setTimeout(()=>{n.compositionEndTask=setTimeout(r,0)},0)}function lg(e){let t=(M?.view(e)??e).$$ctrl;return t===void 0?void 0:hc?.projectControlled(t)??t}function ug(e){let t=lg(e);return t===void 0&&(t={v:Jh,c:-1,sv:null,sawV:!1,sawC:!1,sawDC:!1,dvv:Jh,composing:!1,compositionEndTask:void 0,queued:!1,formSeen:!1,formMultiple:!1},(M?.view(e)??e).$$ctrl=t,Zm(Yh)),t}function dg(e){let t=lg(e);return t===void 0&&(t=ug(e)),t.compositionEndTask===void 0&&og(e)&&(t.compositionEndTask=null,(M?.view(e)??e).addEventListener(`compositionstart`,sg),(M?.view(e)??e).addEventListener(`compositionend`,cg)),t}function fg(e){return typeof e==`string`?e:typeof e==`function`||typeof e==`symbol`?``:String(e)}function pg(e,t){return(M?.view(e)??e).type===`number`?t===0&&(M?.view(e)??e).value===``||(M?.view(e)??e).value!=t:(M?.view(e)??e).value!==fg(t)}function mg(e,t){Ir?.block.idState.renderOwner?.controlLeases?.has(e)&&pf(!1);let n=e,r=dg(e);E!==null&&ko(e,`value`,`defaultValue`);let i=!r.sawV;if(r.sawV=!0,t==null){r.v=Jh;return}let a=fg(t);if(i){r.v=t;let i=I();if(i!==null&&!i.isFresh(e))return;(M?.view(n)??n).value!==a&&((M?.view(n)??n).value=a),(M?.view(n)??n).defaultValue=a;return}let o=r.v;if(r.v=t,!(r.composing&&Object.is(o,t))&&pg(n,t)&&((M?.view(n)??n).value=a),(M?.view(n)??n).defaultValue!==a){let t=M===null&&e.localName===`textarea`?P(e):null;t!==null&&t.nodeType===3&&F(t)===null?N(t).data=a:(M?.view(n)??n).defaultValue=a}}function hg(e,t,n){let r=!n.sawC;if(n.sawC=!0,t==null){n.c=-1;return}let i=!!t;if($h??=Dg,r){n.c=i;let t=I();if(t!==null&&!t.isFresh(e)){(M?.view(e)??e).checked=(M?.view(e)??e).checked,n.sawDC=!0;return}(M?.view(e)??e).checked=i,(M?.view(e)??e).defaultChecked=i,n.sawDC=!0;return}let a=i!==n.c;n.c=i,(a||!gg(e))&&(M?.view(e)??e).checked!==i&&((M?.view(e)??e).checked=i)}function gg(e){let t=Qh;return t===null?!1:e===t||(M?.view(e)??e).type===`radio`&&(M?.view(t)??t).type===`radio`&&(M?.view(e)??e).name!==``&&(M?.view(e)??e).name===(M?.view(t)??t).name&&(M?.view(e)??e).form===(M?.view(t)??t).form&&((M?.view(e)??e).form!==null||(M?.view(e)??e).getRootNode()===(M?.view(t)??t).getRootNode())}function _g(e,t){let n=dg(e);E!==null&&ko(e,`checked`,`defaultChecked`),hg(e,t,n)}function vg(e,t){let n=e,r=dg(e);if(E!==null&&(Do(r),Eo()),r.sawV,r.sawV=!0,t==null){r.sv=null;return}if((M?.view(n)??n).multiple){if(!Array.isArray(t))return;let e=new Set;for(let n=0;n<t.length;n++)e.add(fg(t[n]));r.sv=e}else{if(Array.isArray(t))return;r.sv=fg(t)}let i=I();(i===null||i.isFresh(e))&&(yg(n,r.sv,!1),r.queued||(r.queued=!0,rg(eg,n)))}function yg(e,t,n){let r=(M?.view(e)??e).options;if(E!==null)for(let e=0;e<r.length;e++)No(r[e],n);if(typeof t!=`string`){for(let e=0;e<r.length;e++){let i=r[e],a=t.has((M?.view(i)??i).value);(M?.view(i)??i).selected!==a&&((M?.view(i)??i).selected=a),n&&((M?.view(i)??i).defaultSelected=a)}return}let i=null;for(let e=0;e<r.length;e++){let a=r[e];if((M?.view(a)??a).value===t){(M?.view(a)??a).selected=!0,n&&((M?.view(a)??a).defaultSelected=!0);return}i===null&&!(M?.view(a)??a).disabled&&(i=a)}i!==null&&((M?.view(i)??i).selected=!0)}function bg(e,t,n){let r=dg(e),i=I();if(e.localName===`select`){let n=r.dvv===Jh,a=(M?.view(e)??e).multiple,o=r.formMultiple!==a;if(n||o){if(E!==null&&(Do(r),Eo()),r.dvv=t,r.formMultiple=a,i!==null&&!i.isFresh(e))return;t==null?o&&yg(e,a?new Set:``,!1):rg(tg,{el:e,value:t})}return}let a=n??!r.sawV,o=r.dvv;E!==null&&Do(r),r.sawV=!0,r.dvv=t;let s=i!==null&&!i.isFresh(e);if(r.v!==Jh)return;let c=e;if(t==null){o!==Jh&&o!=null&&(E!==null&&Ao(c),e.localName===`input`?(M?.view(c)??c).removeAttribute(`value`):(M?.view(c)??c).defaultValue=``);return}let l=fg(t);a&&!s&&(M?.view(c)??c).value!==l&&(E!==null&&ko(e,`value`,`defaultValue`),(M?.view(c)??c).value=l),((M?.view(c)??c).defaultValue!==l||l===``&&e.localName===`input`&&!(M?.view(c)??c).hasAttribute(`value`))&&(E!==null&&Ao(c),(M?.view(c)??c).defaultValue=l)}var xg=Symbol(`octane.defaultValue`),Sg=Symbol(`octane.defaultCheckedInitialized`);function Cg(e,t){let n=dg(e),r=e,i=I(),a=i!==null&&!i.isFresh(e),o=!n.sawDC;if(o&&(E!==null&&(Do(n),Eo()),n.sawDC=!0),a){o&&((M?.view(r)??r).checked=(M?.view(r)??r).checked);return}if(n.c!==-1||(o&&!(Sg in r)&&(E!==null&&(E.push(Sa,r,`checked`,(M?.view(r)??r).checked),(M?.view(r)??r).type===`radio`&&(M?.view(r)??r).name!==``&&t&&Mo(r)),(M?.view(r)??r).checked=t==null?(M?.view(r)??r).checked:!!t),t==null))return;let s=!!t;(M?.view(r)??r).defaultChecked!==s&&(E!==null&&((M?.view(r)??r).type===`radio`&&(M?.view(r)??r).name!==``&&Mo(r),Go(r,`checked`)),(M?.view(r)??r).defaultChecked=s)}function wg(e,t,n,r,i,a,o){let s=dg(e),c=!s.formSeen,l=s.formMultiple;if(E!==null&&(Do(s),Eo()),s.formSeen=!0,t===`input`){let t=e,o=r==null?null:fg(r);mg(t,n),n??bg(t,o,c),_g(t,i),i==null&&(a!=null||c)&&Cg(t,a);return}if(t===`textarea`){let t=e;mg(t,n),n??(r==null?!c&&(M?.view(t)??t).defaultValue!==``&&((M?.view(t)??t).defaultValue=``):bg(t,r,c));return}let u=e,d=typeof o,f=!!o&&d!==`function`&&d!==`symbol`;if(s.formMultiple=f,(M?.view(u)??u).multiple!==f){if(E!==null){for(let e=0;e<(M?.view(u)??u).options.length;e++)No((M?.view(u)??u).options[e],!1);E.push(Sa,u,`multiple`,(M?.view(u)??u).multiple)}(M?.view(u)??u).multiple=f}!c&&l!==f&&n==null&&(r==null?yg(u,f?new Set:``,!1):s.dvv=Jh),vg(u,n),r==null?c&&(s.dvv=void 0):bg(u,r)}function Tg(){if(ng.length>0){let e=ng;ng=[];for(let t=0;t<e.length;t++)N(e[t]).isConnected&&N(e[t]).focus()}if(tg.length>0){let e=tg;tg=[];for(let t=0;t<e.length;t++){let n=e[t].el,r=n.$$ctrl;if(r!==void 0&&r.sv!==null)continue;let i=e[t].value,a=(M?.view(n)??n).multiple?Array.isArray(i)?new Set(i.map(fg)):null:fg(i);a!==null&&yg(n,a,!0)}}if(eg.length>0){let e=eg;eg=[];for(let t=0;t<e.length;t++){let n=e[t].$$ctrl;n!==void 0&&(n.queued=!1,n.sv!==null&&yg(e[t],n.sv,!1))}}}function Eg(e){let t=e.$$ctrl;if(t!==void 0&&!t.composing&&(M?.view(e)??e).isConnected){if(e.localName===`select`){t.sv!==null&&yg(e,t.sv,!1);return}$h?.(e,t),t.v!==Jh&&pg(e,t.v)&&((M?.view(e)??e).value=fg(t.v))}}function Dg(e,t){t.c!==-1&&((M?.view(e)??e).checked!==t.c&&((M?.view(e)??e).checked=t.c),(M?.view(e)??e).type===`radio`&&(M?.view(e)??e).name!==``&&Og(e))}function Og(e){let t=(M?.view(e)??e).name,n=jo(e);for(let r=0;r<n.length;r++){let i=n[r];if(i===e||i.localName!==`input`||(M?.view(i)??i).type!==`radio`||(M?.view(i)??i).name!==t||(M?.view(i)??i).form!==(M?.view(e)??e).form)continue;let a=i.$$ctrl;a!==void 0&&a.c!==-1&&(M?.view(i)??i).checked!==a.c&&((M?.view(i)??i).checked=a.c)}}function kg(){let e=Zh;Zh=[];for(let t=0;t<e.length;t++)Eg(e[t])}function Ag(e,t){switch(t.length){case 5:if(t!==`value`)return!1;break;case 7:if(t!==`checked`)return!1;break;default:return!1}let n=e.localName;return n===`input`||n===`textarea`||n===`select`}function jg(e,t){let n=e.target;if(n===null||n.$$ctrl===void 0||(t.flags&Om)===0)return;let r=n.$$ctrl;if(e.type===`input`&&r.compositionEndTask!==void 0){let t=e,i=t.inputType;t.isComposing===!0||i===`insertCompositionText`||i===`deleteCompositionText`?(r.compositionEndTask!==null&&(clearTimeout(r.compositionEndTask),r.compositionEndTask=null),r.composing||n.addEventListener(`blur`,cg),r.composing=!0):r.composing&&typeof t.isComposing==`boolean`&&(r.compositionEndTask!==null&&(clearTimeout(r.compositionEndTask),r.compositionEndTask=null),n.removeEventListener(`blur`,cg),r.composing=!1)}let i=n.localName===`input`&&(n.type===`checkbox`||n.type===`radio`);if(e.type===`click`){i&&(r.c!==-1&&(Qh=n),n.$$checkableActivation=!0,setTimeout(()=>{n.$$checkableActivation===!0&&(n.$$checkableActivation=!1,n===Qh&&(Qh=null),Eg(n))},0));return}if(n===Qh&&(Qh=null),e.type===`input`&&n.localName===`select`){n.$$selectPick=!0,setTimeout(()=>{n.$$selectPick===!0&&(n.$$selectPick=!1,Eg(n))},0);return}e.type===`input`&&i&&n.$$checkableActivation===!0||(e.type===`change`&&(i&&(n.$$checkableActivation=!1),n.localName===`select`&&(n.$$selectPick=!1)),Zh.indexOf(n)===-1&&Zh.push(n))}function Mg(e){let t=e.elements;for(let e=0;e<t.length;e++)t[e].$$ctrl!==void 0&&Eg(t[e])}function Ng(e,t){if(hc?.stageAction(()=>Ng(e,t))===!0)return;let n=Pm.get(e);n===void 0&&(n=new Set,Pm.set(e,n),Fm++,Rm++),n.add(t),t.start.$$portalEventRange=t,t.end.$$portalEventStart=t.start}function Pg(e,t){if(hc?.stageAction(()=>Pg(e,t),!0)===!0)return;let n=t.start,r=t.end;n?.$$portalEventRange===t&&delete n.$$portalEventRange,r?.$$portalEventStart===n&&delete r.$$portalEventStart;let i=Pm.get(e);i!==void 0&&(i.delete(t),i.size===0&&(Pm.delete(e),Fm--,Rm++))}function Fg(e,t,n){let r=e.fragmentOwners;if(r!==void 0){if(e.fragmentAnchor===n){if(!Array.isArray(r)&&!Array.isArray(t)&&r===t)return;if(Array.isArray(r)&&Array.isArray(t)&&r.length===t.length){let e=!0;for(let n=0;n<r.length;n++)if(r[n]!==t[n]){e=!1;break}if(e)return}}Ig(e)}if(e.fragmentOwners=t,e.fragmentAnchor=n,Array.isArray(t))for(let r of t)r._registerPortal(e,n);else t._registerPortal(e,n);r===void 0&&(e.block.cleanups??=[]).push(()=>Ig(e))}function Ig(e){let t=e.fragmentOwners,n=e.fragmentAnchor;if(t!==void 0&&n!==void 0){if(e.fragmentOwners=void 0,e.fragmentAnchor=void 0,Array.isArray(t))for(let r of t)r._unregisterPortal(e,n);else t._unregisterPortal(e,n)}}function Lg(e,t,n){let r=null,i=null;for(let e of ms){let a=e._ownerBlock;(a===t||Tc(a,t))&&N(e._startMarker).parentNode===(M?.view(n)??n).parentNode&&(N(e._startMarker).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0&&(N(e._endMarker).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)!==0&&(r===null?r=e:(i??=[r]).push(e))}r!==null&&Fg(e,i??r,n)}function Rg(e,t,n,r,i,a,o,s=null){let c=I();if(c!==null)return c.suspend(()=>Rg(e,t,n,r,i,a,o,s));let l=Bg(r,i),u=e;if(u===null||u.target!==n||u.key!==s){u!==null&&zg(u);let e=(M?.view(document)??document).createComment(`portal`),r=(M?.view(document)??document).createComment(`/portal`);e.$$portalEnd=r,(M?.view(n)??n).appendChild(e),(M?.view(n)??n).appendChild(r);let i=Qc(`portal`,t,n,e,r,l.body,l.props,o,dl);if(u={__kind:`portalSlotSlot`,block:i,target:n,key:s,host:a,start:e,end:r},Ng(n,u),qb?.(i),$m(n),D!==null){let e=u;Ua(()=>{Pg(n,e),eh(n)})}A(i)}else u.host!==a&&O(u,`host`,u.host),u.host=a,u.block.body!==l.body&&O(u.block,`body`,u.block.body),u.block.props!==l.props&&O(u.block,`props`,u.block.props),u.block.extra!==o&&O(u.block,`extra`,u.block.extra),u.block.body=l.body,u.block.props=l.props,u.block.extra=o,A(u.block);let d=F(u.start);if(u.interleavedFragment===void 0)for(;d!==null&&d!==u.end;)d.$$portalParent=a,d.$$portalContainer=n,d=F(d);else for(;d!==null&&d!==u.end;){let e=d.$$portalEnd;if(e!==void 0){d=hv(d,e);continue}d.$$portalParent=a,d.$$portalContainer=n,d=F(d)}return u}function zg(e){let t=D;if(t!==null&&!t.aborted&&!Ra&&e.block?.mounted&&!Qa(t,e.block)&&e.target!==null){Xa(e.target,e.start,e.end,()=>zg(e));return}e.block&&=(j(e.block,!0),null),e.target&&=(Pg(e.target,e),eh(e.target),null)}function Bg(e,t){return typeof e==`function`?{body:e,props:t}:e!=null&&e.$$kind===dn&&typeof e.type==`function`?{body:e.type,props:e.props}:{body:Vg,props:e}}function Vg(e,t){Iv(t,0,t.parentNode,e,t.endMarker)}function Hg(e){return typeof e==`string`||typeof e==`number`?String(e):null}function Ug(e,t,n=void 0){let r=Hg(n);return{$$kind:fn,body:e,target:t,key:r,props:r===null?n:void 0}}var Wg=new WeakSet;function Gg(e){return e.key!==null||Wg.has(e)}var Kg=new WeakSet,qg=new WeakSet,Jg=Symbol(`octane.scopedChildren`),Yg={configurable:!0,enumerable:!0,get:function(){return this[Jg]()}};function Xg(e){return e==null||typeof e!=`object`&&typeof e!=`function`?!1:e.key!==void 0}function Zg(e){let t={};if(e==null)return t;for(let n in e)n!==`key`&&Ot.call(e,n)&&(t[n]=e[n]);return t}function Qg(e,t,n){let r=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t);return r?.get===void 0&&r?.set===void 0?!1:(Object.defineProperty(e,\"children\",{configurable:!0,enumerable:!0,writable:!0,value:n}),!0)}function $g(e,t,n){if(t!=null&&Ot.call(t,`__proto__`)||Ot.call(Object.prototype,`children`)){let r=Zg(t);return kt(e,r),Object.defineProperty(r,Jg,{value:n}),Object.defineProperty(r,\"children\",Yg),qg.add(r),r}let r={};Object.defineProperty(r,Jg,{value:n});let i,a=!1,o=!1;if(t!=null){for(let e in t)if(e!==`key`&&Ot.call(t,e)){if(e===`children`)i=t[e],Object.defineProperty(r,\"children\",Yg),a=!0;else{let n=t[e];a&&!o&&!Ot.call(r,e)&&Qg(r,e,i)&&(o=!0),r[e]=n}}}let s=e?.defaultProps;if(s!=null)for(let e in s)e===`children`?(o?r.children:a?i:r.children)===void 0&&(i=s[e],o?r.children=i:a||(`children`in r?r.children=i:(Object.defineProperty(r,\"children\",Yg),a=!0))):(a&&!o&&!Ot.call(r,e)&&Qg(r,e,i)&&(o=!0),r[e]===void 0&&(r[e]=s[e]));return(o||!a)&&Object.defineProperty(r,\"children\",Yg),qg.add(r),r}function e_(e,t,n,r,i,a){let o={$$kind:dn,type:e,props:t,key:n,ref:r};return a!==void 0&&(o.__octaneInvocationSite=a),Object.defineProperty(o,Jg,{value:i}),Object.defineProperty(o,\"children\",Yg),o}function t_(e){return e}var n_=Symbol(`octane.scopedValue`);function r_(){return this[n_]().type}function i_(){return this[n_]().props}function a_(){let e=this[n_](),t=e.key;return t===null&&Wg.has(e)&&Wg.add(this),t}function o_(){return this[n_]().ref}function s_(){return this[n_]().children}function c_(){return this[n_]().__octaneInvocationSite}var l_={type:{configurable:!0,enumerable:!0,get:r_},props:{configurable:!0,enumerable:!0,get:i_},key:{configurable:!0,enumerable:!0,get:a_},ref:{configurable:!0,enumerable:!0,get:o_},children:{configurable:!0,enumerable:!0,get:s_},__octaneInvocationSite:{configurable:!0,enumerable:!0,get:c_}};function u_(e){return d_(ad(e))}function d_(e){let t={$$kind:dn};return Object.defineProperty(t,n_,{value:e}),Object.defineProperty(t,\"type\",l_.type),Object.defineProperty(t,\"props\",l_.props),Object.defineProperty(t,\"key\",l_.key),Object.defineProperty(t,\"ref\",l_.ref),Object.defineProperty(t,\"children\",l_.children),Object.defineProperty(t,\"__octaneInvocationSite\",l_.__octaneInvocationSite),t}function f_(e,t,n,r){return p_(e,t,ad(n),r)}function p_(e,t,n,r){let i=t??null,a=Xg(i)?``+i.key:null,o=$g(e,i,n),s=e_(e,o,a,o.ref===void 0?null:o.ref,n,r);return a===null&&i!=null&&(typeof i==`object`||typeof i==`function`)&&`key`in i&&Wg.add(s),t_(s)}function m_(e,t,...n){return h_(void 0,e,t,n)}function h_(e,t,n,r=bm){typeof t==`function`&&bn(t);let i=n??null,a=Xg(i)?``+i.key:null,o=r.length>0,s=o?r.length===1?r[0]:r:i?.children;r.length>1&&I_.add(r);let c=Zg(i);o&&(c.children=s),kt(t,c),s=c.children;let l={$$kind:dn,type:t,props:c,key:a,ref:c.ref===void 0?null:c.ref,children:s??null};return e!==void 0&&(l.__octaneInvocationSite=e),a===null&&i!=null&&(typeof i==`object`||typeof i==`function`)&&`key`in i&&Wg.add(l),t_(l)}function g_(e){return e!=null&&e.$$kind===dn}function __(e){return e!=null&&e.$$kind===dn&&typeof e.type==`string`}function v_(e){let t;try{t=String(e)}catch{return`object with keys {`+Object.keys(e).join(`, `)+`}`}return t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t}function y_(e){let t=v_(e);return Error(w(3,t))}function b_(e){let t=e===null?`null`:e===void 0?`undefined`:typeof e==`object`?v_(e):JSON.stringify(e);return Error(w(24,t))}var x_=Symbol(`NO_KEY`);function S_(e,t,n,r,i,a,o,s,c,l,u){let d=hp,f=d!==null&&r===d.type;if(!f&&typeof r!=`function`&&typeof r!=`string`)throw b_(r);let p=f?d.body:typeof r==`string`?xv:r;f&&(s=!1,c=!1,!l&&o===void 0&&Xg(i)&&(o=i.key,l=!0)),w_(dl,e,t,n,p,r,i,typeof r==`string`?{$$kind:dn,type:r,props:i,key:null,ref:i!=null&&i.ref!==void 0?i.ref:null,children:i==null?null:i.children}:i,a,o,s,c,l,u)}function C_(e,t,n,r,i,a,o,s,c,l,u){if(typeof r!=`function`)throw b_(r);w_(null,e,t,n,r,r,i,i,a,o,s,c,l,u)}function w_(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(T?.pending&&!T.crossRenderUpdate)return;if(n===0&&t!==cl){let e=t.slots[0];if(e?.returnedOutput===!0){if(e.__kind===`componentSlotSlot`)ll(e,!1);else{let e=t.block;if(e.outputHandler(e,null,!0),e.disposed)return}}}let m=t.block,h=I();if(h!==null&&(c!=null&&h.isFresh(c)||h.isFresh(r))){h.suspend(()=>w_(e,t,n,r,i,a,o,s,c,l,u,d,f,p));return}let g=t.slots[n],_=null;if(g===void 0){let e=null,i=null,o=!1,s=h===null?void 0:a[ht],p=h?.passthroughRanges===!0,v=p&&s!==`owner`;if(p&&s===`owner`&&(h.passthroughRanges=!1),!v&&d===!0&&un(a,1)&&(d=!1),v)o=!0;else if(d===!0&&m!==null){let t=m.startMarker,n=m.endMarker;t!=null&&n!=null&&t!==n&&t.nodeType===8&&n.nodeType===8?(e=t,i=n,o=!0):t===null&&n===null&&(o=!0)}let y=null;if(!o&&h!==null&&h.isOpen(c??null))y=c,_=y;else if(!o&&h!==null&&!h.isOpen(c??null)){let e=h.node;(e===null||(M?.view(e)??e).parentNode!==r)&&(e=P(r)),_=e,e!==null&&h.isOpen(e)&&(y=e)}if(!o){if(y!==null)e=y,i=h.close(y),m===h.rootBlock&&h.claimRootRemainder(F(i)),h.node=F(e);else if(u===!0||u===2&&a.$$singleRoot===!0)e=null,i=null;else{if(h!==null){let e=_;Ar(t,n),Rx(()=>Error(w(55)));let r=e;for(;r!==null&&r!==c&&!yf(r);){let e=F(r);(M?.view(r)??r).remove(),r=e}}e=(M?.view(document)??document).createComment(`comp`),i=(M?.view(document)??document).createComment(`/comp`),(M?.view(r)??r).insertBefore(e,c??null),(M?.view(r)??r).insertBefore(i,c??null),h!==null&&(h.markFresh(e),h.markFresh(i),h.node=i)}}g={__kind:`componentSlotSlot`,start:e,end:i,anchor:c??null,singleRoot:e===null&&!o,inherited:o,block:null,currentComp:null,prevKey:x_,keyed:f===!0||l!==void 0},t.slots[n]=g,xl(t,g)}let v=l===void 0?x_:``+l,y=l!==void 0&&g.prevKey!==x_&&v!==g.prevKey,b=a!==g.currentComp||y,x=D!==null&&g.block!==null&&b;if(x){if(g.inherited)Wa(g,r,g.start,g.end);else{let e=g.start??g.block.startMarker,t=g.end??g.block.endMarker;if(e!==null&&t!==null&&(M?.view(e)??e).parentNode===r&&(M?.view(t)??t).parentNode===r)Wa(g,r,(M?.view(e)??e).previousSibling,F(t));else{let e=g.anchor;Wa(g,r,e===null?(M?.view(r)??r).lastChild:(M?.view(e)??e).previousSibling,e)}}}if((f===!0||l!==void 0)&&!g.keyed&&(x||O(g,`keyed`,g.keyed),g.keyed=!0),y&&(g.currentComp=null),!x&&!Object.is(g.prevKey,v)&&O(g,`prevKey`,g.prevKey),g.prevKey=v,b){let o=Qn||Ln?{parentScope:t,invocationSite:p,key:l,hasKey:l!=null}:void 0,c=g.block===null||!g.block.mounted||m.idState.renderOwner?.signalOwner===void 0?void 0:{parent:t,slot:n,kind:g.__kind,branch:void 0,component:a,key:v},u=ci,d=m.currentRenderMode===`transition`,f=u!==null&&g.block!==null&&g.block.mounted&&h===null,y=f&&Bb(m),b=D===null||y?u:null,x=f&&!d&&y,S=x&&!d,C=D;if(C!==null&&!y&&h===null&&g.block!==null&&g.block.mounted&&!Qa(C,g.block)){let t=g.block,n=t.startMarker,l=t.endMarker,u=g.inherited,d=u?g.start===null?P(r):F(g.start):g.start??n;u&&d===g.end&&(d=null);let f=u?d===null?null:g.end===null?(M?.view(r)??r).lastChild:N(g.end).previousSibling:g.end??l,p=d===null?u?g.start:null:f;if(p!==null&&(M?.view(p)??p).parentNode===r){let h=E_(m,r,p,i,s,e,`dynamic`,void 0,!1,o,c);if(h.suspended||h.failed)throw M_(h.wip),h.suspended===null?h.error:new ld(h.suspended);N(h.wip.start).data=`comp`,N(h.wip.end).data=`/comp`,g.start=h.wip.start,g.end=h.wip.end,g.singleRoot=!1,g.inherited=!1,g.block=h.wip.block,g.currentComp=a,u||Ub(m,n,l,h.wip.start,h.wip.end),O_(h.wip),Ya(t,r,d,f);return}}if(b!==null&&f&&(d||x)){if(!S&&!g.singleRoot&&!g.inherited&&g.end!==null){let t=b.render(m,r,g.end,i,s,e,`dynamic`,void 0,!1,o,c);if(t.suspended||t.failed)throw b.dispose(t.wip),t.failed?t.error:new ld(t.suspended);N(t.wip.start).data=`comp`,N(t.wip.end).data=`/comp`;let n=g.block;g.start=t.wip.start,g.end=t.wip.end,g.block=t.wip.block,g.currentComp=a,b.splice(t.wip),j(n),m.disposed||g.block!==t.wip.block||t.wip.block.disposed;return}let t=g.end??g.anchor;if(t!==null){let n=b.render(m,r,t,i,s,e,`dynamic`,void 0,!1,o,c);if(b.dispose(n.wip),n.failed)throw n.error;if(n.suspended)throw new ld(n.suspended)}}if(g.block){if(g.inherited){if(j(g.block),m.disposed)return;if(g.start===null)for(;P(r);)(M?.view(r)??r).removeChild(P(r))}else if(g.singleRoot){if(j(g.block),m.disposed)return}else{let e=F(g.end);if(j(g.block),m.disposed)return;let t=(M?.view(document)??document).createComment(`comp`),n=(M?.view(document)??document).createComment(`/comp`);(M?.view(r)??r).insertBefore(t,e),(M?.view(r)??r).insertBefore(n,e),g.start=t,g.end=n}}if(g.currentComp=a,g.singleRoot){let t=g.anchor?N(g.anchor).previousSibling:(M?.view(r)??r).lastChild,n=Qc(`dynamic`,m,r,null,g.anchor,i,s,void 0,e);o!==void 0&&vr(n,o),g.block=n;try{A(n)}finally{if(h!==null&&_!==null&&(M?.view(_)??_).parentNode===r)n.startMarker=_,n.endMarker=_;else{let e=g.anchor?N(g.anchor).previousSibling:(M?.view(r)??r).lastChild;e!==null&&e!==t&&(n.startMarker=e,n.endMarker=e)}}}else{let t=Qc(`dynamic`,m,r,g.start,g.end,i,s,void 0,e);o!==void 0&&vr(t,o),g.inherited&&(t.exclusiveMarkers=!0),g.block=t,A(t)}}else if(g.block){if(Gv(g.block,a,o))return;g.block.props!==s&&O(g.block,`props`,g.block.props),g.block.props=s,A(g.block)}h!==null&&!g.inherited&&g.end!==null&&(h.node=F(g.end))}function T_(e){return e==null||e===!1||e===!0?``:String(e)}function E_(e,t,n,r,i,a,o=`dynamic`,s,c=!1,l,u){let d=(M?.view(document)??document).createComment(`wip`),f=(M?.view(document)??document).createComment(`/wip`),p=F(n);(M?.view(t)??t).insertBefore(d,p),(M?.view(t)??t).insertBefore(f,p);let m=ds(),h=ec.length,g=k;k=m;let _=Qc(o,e,t,d,f,r,i,s,a);l!==void 0&&vr(_,l),u!==void 0&&tr.set(_,u),c&&(_.$$implicitBail=!0,_.memoInChain=!0);let v=null,y=null,b=!1;try{A(_)}catch(e){ud(e)?v=e.thenable:(y=e,b=!0)}finally{k=g}let x={block:_,start:d,end:f,capture:m,domParent:t,refDetachCheckpoint:h};if(v!==null&&u!==void 0){let t=e.idState.renderOwner,n=nr(e),r=n?.tryBlock??t?.current,i=n??t;if(i!==void 0&&r!=null){sr(_,r,i,!0);for(let e of D?.created??[])!e.disposed&&Tc(_,e)&&sr(e,r,i);x.retrySignalOwners=i.retrySignalOwners}}return{wip:x,suspended:v,error:y,failed:b}}function D_(e,t=!1){e.presentations!==void 0&&k!==null&&(k.presentations??=[]).push(...e.presentations),(k!==null||!t)&&Yn?.spliceCapture(e,k);let n=e.renderedBlocks;if(e.renderedBlocks=null,e.renderRoot=null,n!==null&&k!==null)for(let e of n)il(k,e);for(let t=0;t<3;t++){let n=e.effects[t],r=k===null?ns[t]:k.effects[t];for(let e=0;e<n.length;e++)r.push(n[e])}let r=k===null?rs:k.events;for(let t=0;t<e.events.length;t++)r.push(e.events[t]);let i=k===null?is:k.eventActions;for(let t=0;t<e.eventActions.length;t++)i.push(e.eventActions[t]);let a=k===null?cs:k.refs;for(let t=0;t<e.refs.length;t++)a.push(e.refs[t]);if(e.detaches!==void 0){let t=k===null?ec:k.detaches??=[];for(let n of e.detaches)t.push(n)}let o=k===null?ss:k.stores;for(let t=0;t<e.stores.length;t++)o.push(e.stores[t]);if(e.suspenseCommits!==void 0)for(let t of e.suspenseCommits)us(t);let s=e.renderCleanups;if(s!==void 0){if(e.renderCleanups=void 0,k!==null){let e=k.renderCleanups??=[];for(let t of s)e.push(t)}else for(let e of s)hc?.stageAction(()=>e(!1))!==!0&&e(!1)}}function O_(e){D_(e.capture)}function k_(e){if(e===null)return;Yn?.discardCapture(e);let t=e.renderedBlocks,n=e.renderRoot;if(e.renderedBlocks=null,e.renderRoot=null,t!==null)for(let e of t)rl(e,n);for(let t=0;t<e.stores.length;t++)e.stores[t].queued=!1;let r=e.renderCleanups;if(r!==void 0){e.renderCleanups=void 0;for(let e of r)e(!0)}}function A_(e,t){let n=e.domParent,r=e.start;for(;r!==null;){let i=F(r);if((M?.view(n)??n).insertBefore(r,t),r===e.end)break;r=i}}function j_(e,t){A_(e,t),O_(e)}function M_(e){let t=k,n=er;e.retrySignalOwners!==void 0&&(er=e.retrySignalOwners),k=e.capture;try{j(e.block,!0)}finally{er=n,k=t,ec.splice(e.refDetachCheckpoint),k_(e.capture)}}function N_(e){let t=D;if(t!==null&&!t.aborted&&!Ra){if(e.block===null&&e.forSlot===null&&e.text===null&&e.hostNode===null)return;let t=e.ownerHost??N(e.start)?.parentNode??N(e.text)?.parentNode??N(e.hostNode)?.parentNode??e.block?.parentNode??null;if(t!==null){Ov(e,t);let n=e.ownerHost!==null||e.borrowed&&e.start===null?P(t):e.start===null?e.text??e.hostNode:F(e.start),r=e.ownerHost===null?e.start!==null||e.borrowed?e.end:(M?.view(n)??n)?.nextSibling??null:null;n===r&&(n=null);let i=n===null?null:r===null?(M?.view(t)??t).lastChild:(M?.view(r)??r).previousSibling,a=e.block,o=e.forSlot,s=e.hostNode;if(a!==null)Ya(a,t,n,i);else{if(o!==null){for(let e=o.head;e!==null;e=e.nextSibling)Ja(e);o.emptyBlock!==null&&Ja(o.emptyBlock)}Xa(t,n,i,()=>{if(o!==null){for(let e=o.head;e!==null;e=e.nextSibling)j(e,!1);o.emptyBlock!==null&&j(o.emptyBlock,!1)}else s!==null&&rx(s,null)})}e.block=null,e.forSlot=null,e.text=null,e.hostNode=null,e.currentComp=null,e.ownerHost!==null&&(e.start=null,e.end=null);return}}let n=e.block!==null;if(e.block!==null&&(j(e.block,!1),e.block=null),e.ownerHost!==null){let t=e.ownerHost,r=P(t);for(;r!==null;){let e=F(r);n||rx(r,null),(M?.view(t)??t).removeChild(r),r=e}e.start=null,e.end=null}else if(e.start!==null){let t=N(e.start).parentNode;if(t!==null){let r=F(e.start);for(;r!==null&&r!==e.end;){let e=F(r);n||rx(r,null),(M?.view(t)??t).removeChild(r),r=e}}}else e.text===null?e.hostNode!==null&&N(e.hostNode).parentNode!==null&&(rx(e.hostNode,null),N(N(e.hostNode).parentNode).removeChild(e.hostNode)):N(e.text).remove();e.text=null,e.currentComp=null,e.hostNode=null}function P_(e,t){if(D!==null&&!Ra){let n=e.ownerHost??N(e.start)?.parentNode??t.parentNode,r=e.ownerHost===null?N(e.start)?.nextSibling??null:P(n),i=e.ownerHost===null?e.end:null;r===i&&(r=null);let a=r===null?null:i===null?(M?.view(n)??n).lastChild:(M?.view(i)??i).previousSibling;Ya(t,n,r,a);return}if(j(t,!1),e.ownerHost!==null){let t=P(e.ownerHost);for(;t!==null;){let n=F(t);N(e.ownerHost).removeChild(t),t=n}}else if(e.start!==null){let t=N(e.start).parentNode;if(t!==null){let n=F(e.start);for(;n!==null&&n!==e.end;){let e=F(n);(M?.view(t)??t).removeChild(n),n=e}}}}function F_(e,t){let n=e!=null&&e.$$kind===dn;return e?.$$kind===fn&&e.key!=null||n&&e.key!=null&&!Kg.has(e)||n&&e.key!=null?e.key:t}var I_=new WeakSet;function L_(e,t){return e!=null&&(e.$$kind===dn||e.$$kind===fn)&&e.key!=null?e.key:t}function R_(e){return I_.add(e),e}var z_=!1;function B_(e){z_=!0;let t=e;for(;t!==null&&!t.deoptRefs;)t.deoptRefs=!0,t=t.parentBlock}function V_(e,t,n,r){let i=Zp(e,t);if(i!==null){Kh(e,i,n,void 0);return}if(t===`ref`)n!=null&&(B_(r),$s(r,n,e));else if(t===`className`||t===`class`)zp(e,n);else if(t===`style`)Vp(e,n,void 0);else{let r=Jp(t,e);r===null?Fp(e,t,n):(Sm(e,r.key,n),r.capture?Um.has(r.type)||Qm([r.type]):Mm.has(r.type)||Zm([r.type]))}}function H_(e){if(e==null||e.dangerouslySetInnerHTML==null)return!1;if(rp(e.dangerouslySetInnerHTML),e.children!=null)throw np();return!0}function U_(e){return H_(e.props)||e.type===`textarea`&&(e.props?.value!=null||e.props?.defaultValue!=null)}function W_(e){(M?.view(e)??e).checked=(M?.view(e)??e).checked,(M?.view(e)??e)[Sg]=!0}function G_(e,t,n){if(t==null){e.localName===`input`&&W_(e);return}let r=e.localName===`input`;for(let i in t){if(i===`key`||i===`children`)continue;if(i===`suppressHydrationWarning`){e.__oct_suppress=t[i]===!0;continue}let a=t[i];r&&(i===`defaultChecked`||i===`checked`&&a!=null)&&(r=!1),V_(e,i,a,n)}r&&W_(e)}function K_(e,t,n,r){let i=t?.ref,a=n?.ref;if(i!=null&&i!==a&&tc(i,e),t!=null)for(let r in t)r!==`key`&&r!==`children`&&r!==`ref`&&(n==null||!(r in n))&&Yp(e,r,t[r]);if(n!=null)for(let i in n){if(i===`key`||i===`children`)continue;if(i===`suppressHydrationWarning`){e.__oct_suppress=n[i]===!0;continue}let a=n[i];if(t==null||t[i]!==a||Ag(e,i)){if(i===`autoFocus`&&!jp(e))continue;i===`style`?Vp(e,a,t?.style):V_(e,i,a,r)}}}var q_=Symbol(`octane.deoptDesc`);function J_(e){let t=P(e);for(;t!==null;){let e=t.$$portalEnd;if(e!=null){t=hv(t,e);continue}if(t.$$deoptKey!==void 0||Y_(t)!==void 0)return!0;t=F(t)}return!1}function Y_(e){return(M?.view(e)??e)[q_]}function X_(e,t,n){return e!==void 0&&e.type===t.type&&e.props===t.props&&e.key===t.key&&e.ref===t.ref&&e.children===n}function Z_(e,t){let n=t[n_];if(n===void 0&&t[Jg]===void 0)return!0;let r=n===void 0?t:n(),i=e.deoptNode===null?void 0:Y_(e.deoptNode);return i===r||X_(i,r,r.children)}function Q_(e,t){let n=t[n_],r=n===void 0?t:n();if(r[Jg]!==void 0){let t=r.children,n=Y_(e);r=X_(n,r,t)?n:{$$kind:dn,type:r.type,props:r.props,key:r.key,ref:r.ref,children:t}}E!==null&&E.push(Sa,e,q_,Y_(e)),(M?.view(e)??e)[q_]=r}function $_(e){return g_(e)&&e.type===mp}function ev(e){let t=e.children;return t==null?[]:Array.isArray(t)?t:[t]}function tv(e){return{$$kind:dn,type:nv,props:e,key:e.key,ref:null,children:null}}function nv(e,t){let n=t.block,r=n.slots[1];if(r===void 0){let i=I(),a,o,s=i?.node;if(s?.nodeType===8&&(M?.view(s)??s).data===`frag`){a=s;let e=1,t=F(a);for(;t!==null;){if(t.nodeType===8){if((M?.view(t)??t).data===`frag`)e++;else if((M?.view(t)??t).data===`/frag`&&--e===0)break}t=F(t)}if(t===null)throw Error(w(50));o=t,i.node=F(a)}else a=(M?.view(document)??document).createComment(`frag`),o=(M?.view(document)??document).createComment(`/frag`),N(n.parentNode).insertBefore(a,n.endMarker),N(n.parentNode).insertBefore(o,n.endMarker);r=wp(t,a,o,e.ref),n.slots[0]={a:r},n.slots[1]=r,n.refFields=[`f`,`a`,``]}else r._currentRef!==e.ref&&(O(r,`_currentRef`,r._currentRef),r._currentRef!=null&&tc(r._currentRef,r),e.ref!=null&&$s(t,e.ref,r),r._currentRef=e.ref);Iv(t,2,n.parentNode,e.children,r._endMarker);let i=I();i!==null&&(i.node=F(r._endMarker))}function rv(e){return I_.has(e)?`fragment`:`array`}var iv=JSON.stringify,av=String;function ov(e){if(JSON.stringify!==iv||`toJSON`in e)return null;for(let t=0;t<e.length;t++){let n=typeof e[t];if(n!==`string`&&n!==`number`)return null}return`[`+JSON.stringify(e)+`,`}function sv(e,t,n,r,i,a){let o=(g_(n)||n?.$$kind===fn)&&n.key!=null;return t.length===0?(e.push(o?`k`+String(i):r),a):a!==null&&(!o||typeof i==`string`&&String===av)&&JSON.stringify===iv&&!(`toJSON`in t)&&(a===void 0&&(a=ov(t)),a!==null)?(e.push(o?a+`\"key\",`+JSON.stringify(String(i))+`]`:a+`\"index\",`+r+`]`),a):(e.push(JSON.stringify([t,o?`key`:`index`,o?String(i):r])),null)}function cv(e,t,n,r,i){let a=r===`fragment`?L_:F_,o=n.length,s=o>1?void 0:null;for(let c=0;c<o;c++){let l=n[c];if($_(l)){if(l.ref!=null||Ot.call(l.props,`ref`)){e.push(tv(l)),s=sv(t,i,l,c,a(l,c),s);continue}let n=ev(l);l.key==null?cv(e,t,n,`fragment`,r===`fragment`?[...i,`wrapper`,o===1?0:c]:o===1?i:[...i,`position`,c,`fragment`]):cv(e,t,n,`fragment`,[...i,`keyed-fragment`,l.key]);continue}if(Array.isArray(l)){let n=rv(l);cv(e,t,l,n,n===r?[...i,`wrapper`,o===1?0:c]:o===1?i:[...i,`position`,c,n]);continue}e.push(l),s=sv(t,i,l,c,a(l,c),s)}}function lv(e,t){return(g_(e)||e?.$$kind===fn)&&e.key!=null?`k`+String(t):0}function uv(e,t=!1,n=!0){if($_(e)){if(e.ref!=null||Ot.call(e.props,`ref`))return{items:[tv(e)],keys:[lv(e,e.key??0)]};let t=[],n=[],r=e.key==null?[]:[`keyed-fragment`,e.key];return cv(t,n,ev(e),`fragment`,r),{items:t,keys:n}}if(Array.isArray(e)){let t=[],n=[];return cv(t,n,e,rv(e),[]),{items:t,keys:n}}return n&&g_(e)&&e.key!=null?{items:[e],keys:[lv(e,e.key)]}:t?{items:[e],keys:[lv(e,L_(e,0))]}:null}function dv(e){if(e==null||typeof e==`string`||Array.isArray(e)||g_(e))return null;let t=At(e);if(t===null)return null;let n=[],r=t.call(e),i;for(;!(i=r.next()).done;)n.push(i.value);return n}function fv(e,t,n,r){if(n==null||n===!1||n===!0||n===``)return;if(Array.isArray(n)){let i=I_.has(n)?L_:F_;for(let a=0;a<n.length;a++){let o=n[a];if(Array.isArray(o))fv(e,t,o,r+`:`+a);else if(o!=null&&o!==!1&&o!==!0&&o!==``){e.push(o);let n=i(o,a);if(r===``)t.push(typeof n==`string`&&n[0]===`:`?`:`+n:n);else{let e=o?.$$kind===dn&&o.key!=null;t.push(r+`:`+(e?`k`:`i`)+String(n))}}}return}e.push(n);let i=n?.$$kind===dn&&n.key!=null?n.key:0;t.push(r===``?typeof i==`string`&&i[0]===`:`?`:`+i:i:r+`:i0`)}function pv(e,t,n,r){if(t==null||t===!1||t===!0||t===``)return null;let i=typeof t;if(i===`string`||i===`number`||i===`bigint`){let n=String(t);if(e!==null&&e.nodeType===3){let t=I();return t!==null&&!t.isFresh((M?.view(e)??e).parentNode)?t.htextSwap(e,n):(wf(e,n),e)}return(M?.view(document)??document).createTextNode(n)}if(__(t)){let i=Mp(t.type,r),a;return e!==null&&e.nodeType===1&&e.localName===t.type&&e.namespaceURI===(i??Ap)?(a=e,K_(a,Y_(a)?.props??null,t.props,n)):(a=i===void 0?(M?.view(document)??document).createElement(t.type):(M?.view(document)??document).createElementNS(i,t.type),I()?.markFresh(a),G_(a,t.props,n)),Q_(a,t),U_(t)||mv(a,t.children,n),a}if(g_(t))throw Error(w(25));if(i===`object`)throw y_(t);return null}function mv(e,t,n){let r=typeof t;if(r===`string`&&t!==``||r===`number`||r===`bigint`){let n=P(e);if(n!==null&&n.nodeType===3&&F(n)===null&&n.$$deoptKey===0&&n.$$portalEnd==null){let r=I();r!==null&&!r.isFresh(e)?r.htextSwap(n,String(t)):wf(n,String(t));return}}if((t==null||r===`boolean`||t===``)&&P(e)===null)return;let i=Np(e),a=[],o=[];fv(a,o,t,``);let s=P(e),c=D!==null&&(M?.view(e)??e).parentNode!==null&&(n.mounted||D.hydrating||D.retainedCreated?.has(n));if(s===null){for(let t=0;t<a.length;t++){let r=pv(null,a[t],n,i);r!==null&&(c&&Ka(e),r.$$deoptKey=o[t],(M?.view(e)??e).appendChild(r))}return}if(a.length===0&&I()===null&&!J_(e))return;let l=[],u=!1,d,f=null,p=[],m=s;for(;m!==null;){let e=m.$$portalEnd;if(e!=null){u=!0,m=hv(m,e);continue}let t=m.$$deoptKey,n=t===void 0?Y_(m):void 0;if(t===void 0&&n===void 0&&!(d??=I()!==null)){u=!0,m=F(m);continue}l.push(m);let r=t??n?.key;if(r!=null&&(f===null&&(f=new Map),!f.has(r))){f.set(r,m),m=F(m);continue}p.push(m),m=F(m)}let h=0,g=[];for(let e=0;e<a.length;e++){let t=a[e],r=o[e],s=null;f!==null&&(s=f.get(r)??null,s!==null&&f.delete(r)),s===null&&h<p.length&&(s=p[h++]);let c=pv(s,t,n,i);c!==null&&(c.$$deoptKey=r,g.push(c))}let _=g.length>0?new Set(g):null;for(let t=l.length-1;t>=0;t--){let r=l[t];if(_===null||!_.has(r)){let t=I();t!==null&&!t.isFresh(e)&&Rx(()=>Error(w(62)),n),c?(Ka(e),Xa(e,r,r,()=>rx(r,null))):(rx(r,null),(M?.view(e)??e).removeChild(r))}}let v=P(e);for(let t=0;t<g.length;t++){let n=g[t],r=u?gv(v,d===!0):v;r!==n&&(c&&Ka(e),Vs===null?(M?.view(e)??e).insertBefore(n,r):(qs(e,Vs),Ex(e,n,r,Vs))),v=F(n)}}function hv(e,t){let n=e;for(;n!==null&&n!==t;)n=F(n);return F(n??e)}function gv(e,t){for(;e!==null;){let n=e.$$portalEnd;if(n!=null){e=hv(e,n);continue}if(!t&&e.$$deoptKey===void 0&&Y_(e)===void 0){e=F(e);continue}return e}return null}function _v(e,t){let n=t.block,r=I(),i=t.slots[0],a=__(e)&&i?.__kind===`childSlot`&&i.currentComp===bv||yv(e),o=n.startMarker;if(o!==null&&o===n.endMarker&&o.nodeType!==8&&(M?.view(o)??o).parentNode!==null&&(a||!__(e))){let e=(M?.view(o)??o).parentNode;D!==null&&(Ga(e,(M?.view(o)??o).previousSibling,F(o)),O(n,`startMarker`,n.startMarker),O(n,`endMarker`,n.endMarker));let t=(M?.view(document)??document).createComment(`it`),r=(M?.view(document)??document).createComment(`/it`);(M?.view(e)??e).insertBefore(t,o),(M?.view(e)??e).insertBefore(r,F(o)),n.startMarker=t,n.endMarker=r}if(a){let i=n.deoptNode,a=null;if(i!=null){if(O(n,`deoptNode`,n.deoptNode),t.slots[0]===void 0&&i.nodeType===1&&__(e)&&i.localName===e.type&&(M?.view(i)??i).parentNode===n.parentNode)a=i;else if((M?.view(i)??i).parentNode===n.parentNode){if(D!==null)Ga(n.parentNode,(M?.view(i)??i).previousSibling,F(i)),Xa(n.parentNode,i,i,()=>rx(i,null));else{rx(i,null);let e=n.parentNode;(M?.view(e)??e).removeChild(i)}}n.deoptNode=null}if(r!==null&&t.slots[0]===void 0&&r.isOpen(n.startMarker)){let e={__kind:`childSlot`,start:n.startMarker,end:n.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null};t.slots[0]=e,xl(t,e)}if(r===null&&t.slots[0]===void 0&&n.startMarker!==null&&n.endMarker!==null&&n.startMarker!==n.endMarker&&n.startMarker.nodeType===8&&n.endMarker.nodeType===8){let e={__kind:`childSlot`,start:n.startMarker,end:n.endMarker,ownerHost:null,borrowed:!0,compactable:!1,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:a,portal:null};t.slots[0]=e,xl(t,e)}else if(a!==null&&(M?.view(a)??a).parentNode!==null){rx(a,null);let e=(M?.view(a)??a).parentNode;(M?.view(e)??e).removeChild(a)}Iv(t,0,n.parentNode,e,n.endMarker,void 0,void 0,void 0,!1);return}t.slots[0]!==void 0&&t.slots[0]!==null&&t.slots[0].__kind===`childSlot`&&Iv(t,0,n.parentNode,null,n.endMarker);let s=n.endMarker,c=n.deoptNode;if(c===null&&r!==null){let e=n.startMarker;c=e==null?null:F(e),c===s&&(c=null)}let l=pv(c,e,n,Np(n.parentNode));if(l!==c){if(O(n,`deoptNode`,n.deoptNode),c!=null&&c!==l&&(M?.view(c)??c).parentNode===n.parentNode){if(D!==null&&Ga(n.parentNode,(M?.view(c)??c).previousSibling,F(c)),l!==null){let e=n.parentNode;(M?.view(e)??e).insertBefore(l,c)}if(D!==null){let e=c;Xa(n.parentNode,e,e,()=>rx(e,null))}else{rx(c,null);let e=n.parentNode;(M?.view(e)??e).removeChild(c)}}else if(l!==null){D!==null&&n.mounted&&Ga(n.parentNode,(M?.view(s)??s)?.previousSibling??N(n.parentNode).lastChild,s);let e=n.parentNode;(M?.view(e)??e).insertBefore(l,s)}c!==null&&n.startMarker===c&&(O(n,`startMarker`,n.startMarker),O(n,`endMarker`,n.endMarker),n.startMarker=l,n.endMarker=l)}n.deoptNode=l}function vv(e,t){let n=t.slots[0],r=t.block;if(g_(e)&&typeof e.type==`function`){if(n===void 0||n.__kind===`componentSlotSlot`){let n=r.deoptNode;n!==null&&(rx(n,null),(M?.view(n)??n).parentNode===r.parentNode&&N(r.parentNode).removeChild(n),r.deoptNode=null),S_(t,0,r.parentNode,e.type,e.props,r.endMarker,void 0,!0,!0,void 0,e.__octaneInvocationSite);return}}else if(n?.__kind===`componentSlotSlot`){let e=r.startMarker;if(e!==null&&e===r.endMarker&&e.nodeType!==8&&(M?.view(e)??e).parentNode!==null){let t=(M?.view(document)??document).createComment(`it`),n=(M?.view(document)??document).createComment(`/it`);N((M?.view(e)??e).parentNode).insertBefore(t,e),N((M?.view(e)??e).parentNode).insertBefore(n,F(e)),r.startMarker=t,r.endMarker=n}fl(r,n),r.deoptNode=null}_v(e,t)}function yv(e){if(typeof e==`function`)return!0;if(typeof e!=`object`||!e)return!1;if(typeof e.then==`function`)return!0;if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(yv(e[t]))return!0;return!1}return!g_(e)&&At(e)!==null?!0:e.$$kind===dn?e.type===mp||hp!==null&&e.type===hp.type||typeof e.type==`function`||yv(e.children):e.$$kind===fn}function bv(e,t){let n=t.deoptNode,r=I(),i=Mp(e.type,Np(t.parentNode));if(n===null&&r!==null&&r.node!==null&&r.node.nodeType===1&&r.node.localName===e.type&&(i===void 0||r.node.namespaceURI===i)){n=r.node,t.deoptNode=n,G_(n,e.props,t),Q_(n,e);let i=F(r.node);U_(e)||(r.node=P(n),Iv(t,0,n,e.children,null,!1,n)),r.node=i;return}if(n===null&&r!==null&&r.node!==null){let a=r.node;if(r.isOpen(a)){let e=r.close(a);r.node=F(e),r.removeRange(a,e)}else r.node=F(a),(M?.view(a)??a).remove();n=i===void 0?(M?.view(document)??document).createElement(e.type):(M?.view(document)??document).createElementNS(i,e.type),r.markFresh(n),t.deoptNode=n;let o=t.parentNode;(M?.view(o)??o).insertBefore(n,t.endMarker),G_(n,e.props,t),Q_(n,e),U_(e)||r.suspend(()=>Iv(t,0,n,e.children,null,!1,n));return}if(n===null||n.localName!==e.type||i!==void 0&&n.namespaceURI!==i){if(n!==null){let e=n;D!==null&&(Ga(t.parentNode,(M?.view(e)??e).previousSibling,F(e)),O(t,`deoptNode`,t.deoptNode));let r=t.slots[0];r!==void 0&&fl(t,r);let i=()=>{let t=Y_(e)?.props?.ref;t!=null&&tc(t,e)};D===null?(i(),(M?.view(e)??e).remove()):Xa(t.parentNode,e,e,i)}n=i===void 0?(M?.view(document)??document).createElement(e.type):(M?.view(document)??document).createElementNS(i,e.type),r!==null&&r.markFresh(n),t.deoptNode=n;let a=t.parentNode;(M?.view(a)??a).insertBefore(n,t.endMarker),G_(n,e.props,t)}else K_(n,Y_(n)?.props??null,e.props,t);Q_(n,e),U_(e)||Iv(t,0,n,e.children,null,!1,n)}function xv(e,t){let n=e.type,r=t.deoptNode,i=I(),a=Mp(n,Np(t.parentNode));if(r===null){if(i!==null&&i.node!==null&&i.node.nodeType===1&&i.node.localName===n&&(a===void 0||i.node.namespaceURI===a)){r=i.node,t.deoptNode=r,G_(r,e.props,t),Q_(r,e);let n=F(i.node);U_(e)||(i.node=P(r),Sv(e,t,r)),i.node=n;return}if(i!==null&&i.node!==null){Rx(()=>Error(w(51)));let o=i.node;if(i.isOpen(o)){let e=i.close(o);i.node=F(e),i.removeRange(o,e)}else i.node=F(o),(M?.view(o)??o).remove();r=a===void 0?(M?.view(document)??document).createElement(n):(M?.view(document)??document).createElementNS(a,n),i.markFresh(r),t.deoptNode=r;let s=t.parentNode;(M?.view(s)??s).insertBefore(r,t.endMarker),G_(r,e.props,t),Q_(r,e),U_(e)||i.suspend(()=>Sv(e,t,r));return}r=a===void 0?(M?.view(document)??document).createElement(n):(M?.view(document)??document).createElementNS(a,n),i!==null&&i.markFresh(r),t.deoptNode=r;let o=t.parentNode;(M?.view(o)??o).insertBefore(r,t.endMarker),G_(r,e.props,t)}else K_(r,Y_(r)?.props??null,e.props,t);Q_(r,e),U_(e)||Sv(e,t,r)}function Sv(e,t,n){let r=e.children;if(r!=null){if(typeof r==`function`){let e=t.slots[0];e===void 0?(e={__kind:`hostTagChildrenSlot`,block:Qc(`dynamic`,t,n,null,null,r,{},void 0,dl)},t.slots[0]=e,xl(t,e)):e.block.body=r,A(e.block);return}Iv(t,1,n,r,null,!1,n)}}function Cv(e){let t=e.forSlot;Sx(t,t.items),t.head=null,t.tail=null,t.size=0,e.forSlot=null}var wv=null;function Tv(e,t){if(Array.isArray(e)){let n=[],r=e.length;for(let i=0;i<r;i++)n[i]=Tv(e[i],t);return I_.has(e)&&I_.add(n),n}if(e==null||e===!1||e===!0||e===``)return e;let n=typeof e,r=g_(e);if(!r&&n!==`string`&&n!==`number`&&n!==`bigint`)return e;let i=t.node;return i===null||i===t.end?e:(t.node=F(i),r?Y_(i)??e:e)}function Ev(e,t,n){let{items:r,keys:i}=uv(Tv(e,{node:F(t),end:n}),!0),a=[],o=F(t);for(let e=0;e<r.length;e++){let t=r[e];if(t==null||t===!1||t===!0||t===``)continue;if(o===null||o===n)break;let s=typeof t;if(!(s===`string`||s===`number`||s===`bigint`?o.nodeType===3:__(t)&&o.nodeType===1&&o.localName===t.type))break;a.push({key:i[e],node:o}),o=F(o)}return a}function Dv(e,t){for(let n=e;n!==null;n=n.parentBlock)if(n.kind===`portal`&&n.parentNode===t)return!0;return!1}Array.prototype.map,Object.getOwnPropertyDescriptor(Array,Symbol.species)?.get;function Ov(e,t){if(!(D===null||D.aborted||Ra)){if(Eo(),e.ownerHost!==null)Wa(e,e.ownerHost,null,null);else if(e.start!==null)Wa(e,t,e.borrowed?e.start:N(e.start).previousSibling,e.borrowed?e.end:N(e.end)?.nextSibling??null);else if(e.borrowed&&e.block!==null&&e.block.startMarker===null)Wa(e,t,null,e.end);else{let n=e.text??e.hostNode??e.block?.startMarker??e.end,r=e.end??e.block?.endMarker??n,i=(M?.view(r)??r)?.nextSibling??null;Wa(e,t,n===null?(M?.view(t)??t).lastChild:(M?.view(n)??n).previousSibling,i)}}}function kv(e,t,n,r,i,a,o,s,c,l,u,d){let f=i?.passthroughRanges===!0&&e.borrowed,p=null,m=null;if(r.items.length===0&&i===null&&e.ownerHost!==null){e.forSlot!==null&&D===null&&Cv(e),N_(e);return}if(e.forSlot===null){if(i===null&&!a&&N_(e),e.end!==null&&N(e.end).parentNode===null&&(e.end=null,e.start=null),e.end===null){e.end=(M?.view(document)??document).createComment(``);let r=null;if(f){for(let e=t;e!==null;e=e.parentBlock)if(e.forSlot!==null&&e.endMarker!==null&&N(e.endMarker).parentNode===n){r=e.endMarker;break}if(r===null){let e=(M?.view(n)??n).lastChild;for(;e!==null&&Xd(e);)r=e,e=(M?.view(e)??e).previousSibling}}if((M?.view(n)??n).insertBefore(e.end,r),f&&(i.markFresh(e.end),m=e.end,E!==null)){let t=e.end;Ua(()=>(M?.view(t)??t).remove())}}if(e.start===null){e.start=(M?.view(document)??document).createComment(``);let t=f?i.node:null;if((M?.view(n)??n).insertBefore(e.start,a?P(n):t!==null&&N(t).parentNode===n?t:e.end),f&&(i.markFresh(e.start),p=e.start,E!==null)){let t=e.start;Ua(()=>(M?.view(t)??t).remove())}}e.forSlot={__kind:`forBlockSlot`,start:e.start,end:e.end,items:new Map,head:null,tail:null,size:0,cachedDeps:null,emptyBlock:null,env:void 0,adopt:null,plainDeopt:!1,mappedNative:void 0,selectionItems:void 0,signalSite:void 0},a&&(e.forSlot.adopt=Ev(o,e.start,e.end))}let{items:h,keys:g}=r,_=d===!0&&i!==null&&!i.isOpen(i.node),v=c||g,y=!!c,b=e.forSlot.mappedNative===!0,x=s||(d===!0?vv:_v);if(s===void 0&&b&&e.forSlot.size>0)for(let t=0;t<h.length;t++){let n=h[t];if(!__(n))continue;let r=e.forSlot.items.get(mx(v,n,t,y));if(r!==void 0&&r.startMarker!==null&&r.startMarker===r.endMarker&&r.startMarker.nodeType===1&&r.startMarker.localName===n.type){let e=r.startMarker,t=P(e);if(t?.nodeType===3&&F(t)===null){let e=Object.getOwnPropertyDescriptor(n,`children`);if(e!==void 0&&`value`in e&&(typeof e.value==`string`||typeof e.value==`number`||typeof e.value==`bigint`))t.$$deoptKey=0;else if(e?.get!==void 0){let e=r.slots[0];if(e!=null){for(let n in e)if(e[n]===t){t.$$deoptKey=0;break}}}}r.deoptNode=r.startMarker}}if(s!==void 0&&(e.forSlot.mappedNative===!1&&(x=(e,t,n)=>{let r=t.slots[0]===void 0?t.block.deoptNode:null;if(r===null||r.nodeType!==1){s(e,t,n);return}let i=Zd,a={node:r};Zd=a;try{s(e,t,n),a.node===null&&(t.block.deoptNode=null)}finally{Zd=i}}),e.forSlot.mappedNative=!0),_){let e=x;x=(t,n)=>{let r=n.block.startMarker;r!==null&&r===n.block.endMarker&&r.nodeType===1&&n.block.deoptNode===null&&(n.block.deoptNode=r),e(t,n)}}let S=s===void 0&&d!==!0;e.forSlot.plainDeopt=S;let C=l||0,ee=s===void 0?_||S:!!(C&16),te=!!(C&1),ne=!1;if(s!==void 0&&(e.forSlot.env=u,C&4&&u!==void 0&&(e.forSlot.cachedDeps!==null&&ox(e.forSlot.cachedDeps,u)?te=!0:ne=!0,e.forSlot.cachedDeps=u)),e.forSlot.size===0)try{hx(t,e.forSlot,h,v,x,s===void 0?2:!!(C&2),ee,y,f)}catch(t){throw p!==null&&((M?.view(p)??p).remove(),e.start=null),m!==null&&((M?.view(m)??m).remove(),e.end=null),(p!==null||m!==null)&&(e.forSlot=null),t}else vx(t,e.forSlot,h,v,x,te,s===void 0?2:!!(C&2),ne,!!(C&8),ee,y);if(e.forSlot.adopt!==null){let t=e.forSlot.adopt;for(let e=0;e<t.length;e++){let n=t[e].node;(M?.view(n)??n).parentNode!==null&&(D===null?(rx(n,null),N((M?.view(n)??n).parentNode).removeChild(n)):Xa((M?.view(n)??n).parentNode,n,n,()=>rx(n,null)))}e.forSlot.adopt=null}f&&!i.passthroughRanges&&(i.node=F(e.forSlot.end))}var Av=Symbol(`octane.direct-signal-child`),jv=0;function Mv(e){e.disposed||(e.disposed=!0,e.unsubscribe?.(),mi(e.scope.block))}function Nv(e){if(!(e.disposed||e.scope.block.disposed))try{xr(e.scope,()=>{let t=Of(e.handle);if(Object.is(e.value,t))return;let n=e.scope.slots[e.slotKey],r=typeof t,i=t==null||r!==`object`&&r!==`function`?T_(t):null;if(n===void 0&&e.text!=null&&i!==null&&i!==``){Tf(e.text,i),e.value=t;return}if(n===e.state&&n?.block===null&&n.forSlot===null&&n.hostNode===null&&n.portal===null&&i!==null&&i!==``&&n.text!==null){Tf(n.text,i),e.value=t;return}Cs(e.scope.block)})}catch{Cs(e.scope.block)}}function Pv(e,t,n,r,i,a,o,s,c,l,u,d){let f=typeof t==`object`&&t&&t[Av]===!0?t:null,p=f?.text??(t instanceof Text?t:null);if(!Df(i)){let t=u?Bv(e,n,r,i,p):(d===void 0?Iv(e,n,r,i,o,s,c,l):Fv(e,n,r,i,d,o,s),null);if(f!==null){E!==null&&Eo();let e=e=>{e||Mv(f)};k===null?e(!1):(k.renderCleanups??=[]).push(e)}return t}if(f!==null&&!f.disposed&&f.handle===i){let t=Of(i);return E!==null&&Do(f),u?f.text=Bv(e,n,r,t,p):d===void 0?Iv(e,n,r,t,o,s,c,l):Fv(e,n,r,t,d,o,s),f.value=t,f.state=e.slots[n],f}let m=Of(i),h=u?Bv(e,n,r,m,p):(d===void 0?Iv(e,n,r,m,o,s,c,l):Fv(e,n,r,m,d,o,s),null);E!==null&&Eo();let g={[Av]:!0,scope:e,slotKey:n,handle:i,text:h,state:e.slots[n],value:m,disposed:!1};if(g.unsubscribe=i[Un](kf(g,()=>Nv(g))),Jn(e,()=>Mv(g)),f!==null){let e=e=>Mv(e?g:f);k===null?e(!1):(k.renderCleanups??=[]).push(e)}return g}function Fv(e,t,n,r,i,a,o){let s=lf;if(s?.revision!==void 0){let e=I()?.resolveOpen(a??null,n)??null,t=_f(s,e,i,`slot`);(r==null?t.slot!==void 0||F(e)!==t.end:t.slot===void 0||typeof r!=`function`||r[gf]!==t.slot)&&pf(!1)}Iv(e,t,n,r,a,o,void 0,!1,!0,void 0,void 0,void 0,void 0,void 0,i)}function Iv(e,t,n,r,i,a,o,s,c=!0,l,u,d,f,p,m){if(T?.pending&&!T.crossRenderUpdate)return;if(t===0&&e!==cl){let t=e.slots[0];if(t?.returnedOutput===!0){if(t.__kind===`childSlot`)ll(t,!1);else{let t=e.block;if(t.outputHandler(t,null,!0),t.disposed)return}}}if(jv===0){let c=e.slots[t]?.implicitSignal;if(Df(r)||c!==void 0){Df(r)&&pr(),jv++;let l;try{l=xr(e,()=>Pv(e,c,t,n,r,`runtime:${t}`,i,a,o,s,void 0,m))}finally{jv--}let u=e.slots[t];u!==void 0&&(u.implicitSignal=l);return}}if(r!=null&&c&&n.nodeType===1&&_t.has(n.localName)&&!Dv(e.block,n))throw Error(w(26,n.localName));if(op(n,r))return;let h=e.block,g=I();if(g!==null&&(i!=null&&g.isFresh(i)||g.isFresh(n))){g.suspend(()=>Iv(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m));return}for(;r!==null&&(typeof r==`object`||typeof r==`function`);){if(r.$$kind===mn){r=cd(r);continue}if(typeof r.then==`function`){r=fd(r);continue}break}let _=typeof r==`function`?r:g_(r)&&typeof r.type==`function`?r.type:null,v=g?.passthroughRanges===!0&&_?.[ht]!==`owner`;g?.passthroughRanges===!0&&!v&&(g.passthroughRanges=!1);let y=dv(r);y!==null&&(r=y);let b=l===void 0?uv(r,!1,c):{items:r,keys:null},x=e.slots[t],S=b===null&&__(r)&&x?.currentComp!==bv&&!yv(r),C=!1;if(x!==void 0&&D!==null){let e=S||b!==null?null:__(r)?bv:_,t=b!==null&&x.forSlot!==null,i=x.block!==null&&e!==null&&(e===x.currentComp||typeof r==`function`&&x.currentIsBodyFn),a=S&&x.hostNode!==null&&x.block===null&&x.hostNode.nodeType===1&&x.hostNode.localName===r.type,o=r==null||typeof r!=`object`&&typeof r!=`function`,s=o?T_(r):null,c=o&&x.block===null&&x.forSlot===null&&x.hostNode===null&&x.portal===null&&x.text===null==(s===``);!t&&!i&&!a&&!c&&(Ov(x,n),C=!0)}let ee=x===void 0&&g!==null&&h===g.rootBlock&&g.node!==null&&N(g.node).parentNode===n&&b===null&&g_(r)&&typeof r.type==`function`&&!g.isOpen(i??null)&&!g.isOpen(g.node);if(x===void 0&&g!==null&&!v&&h===g.rootBlock&&!g.isOpen(i??null)&&!g.isOpen(g.node)){let h=g.node;if(!(r===null||r===``?h===null:typeof r==`string`&&h?.nodeType===3||ee)){g.abandonRoot(void 0),Iv(e,t,n,r,(M?.view(i)??i)?.parentNode===n?i:null,a,o,s,c,l,u,d,f,p,m);return}}if(x===void 0){let r=D;if(r!==null&&!r.aborted&&!Ra&&e.mounted&&!Qa(r,h)){Eo();let e=o===void 0?i??null:null;Ga(n,o===void 0?e===null?(M?.view(n)??n).lastChild:(M?.view(e)??e).previousSibling:null,e)}let c,l;v?(c=null,l=null):ee?[c,l]=g.wrapUnframedRoot(g.node):g!==null&&g.isOpen(i??null)?(c=i,l=g.close(i),h===g.rootBlock&&g.claimRootRemainder(F(l)),g.node=F(c)):g!==null&&g.isOpen(g.node)?(c=g.node,l=g.close(g.node),h===g.rootBlock&&(g.protectRootAnchor(l),g.claimRootRemainder(F(l))),g.node=F(c)):m===void 0?a&&i!=null?(c=null,l=i):g===null&&o!==void 0||g===null&&S?(c=null,l=null):(c=null,l=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(l,i??null),g!==null&&h===g.rootBlock&&g.protectRootAnchor(l)):(c=(M?.view(document)??document).createComment(m),l=a&&i!=null?i:(M?.view(document)??document).createComment(`]`),(M?.view(l)??l).data=`]`,(M?.view(n)??n).insertBefore(c,i??null),l!==i&&(M?.view(n)??n).insertBefore(l,i??null)),x={__kind:`childSlot`,start:c,end:l,ownerHost:g===null?o??null:null,borrowed:v,compactable:s===!0,block:null,text:null,currentComp:null,currentIsBodyFn:!1,forSlot:null,hostNode:null,portal:null,implicitSignal:void 0},e.slots[t]=x,xl(e,x)}s===!0&&(x.compactable=!0);let te,ne=!1;if(wv!==null&&wv.block===e.block&&o!==void 0&&(D!==null&&Ka(n),te=wv.children,ne=!0,wv=null),x.end===null&&!S&&x.ownerHost===null&&!x.borrowed){let e=(M?.view(document)??document).createComment(``),t=(M?.view(document)??document).createComment(``),r=x.hostNode;if(r!==null&&(M?.view(r)??r).parentNode!==null){let n=(M?.view(r)??r).parentNode;(M?.view(n)??n).insertBefore(e,r),(M?.view(n)??n).insertBefore(t,F(r)),Ub(h,r,r,e,t)}else(M?.view(n)??n).insertBefore(e,i??null),(M?.view(n)??n).insertBefore(t,i??null);x.start=e,x.end=t}let re=r!=null&&r.$$kind===fn?r:null;if(re===null&&x.portal!=null&&(zg(x.portal),x.portal=null),re!==null){x.forSlot!==null&&(D!==null&&g===null?N_(x):Cv(x)),(x.block!==null||x.text!==null||x.hostNode!==null)&&N_(x),x.portal=Rg(x.portal,h,re.target,re.body,re.props,n,void 0,re.key),ms.size!==0&&x.end!==null&&Lg(x.portal,h,x.end);return}if(b!==null){kv(x,h,n,b,g,ne,te,l,u,d,f,p);return}if(x.forSlot!==null&&(D!==null&&g===null?N_(x):Cv(x)),ne&&x.hostNode===null&&x.block===null){let e=P(n);if(e!==null&&F(e)===null&&(e.nodeType===1||e.nodeType===3))x.hostNode=e;else{let e=P(n);for(;e!==null;){let t=F(e);if(D!==null){let t=e;Xa(n,t,t,()=>rx(t,null))}else rx(e,null),(M?.view(n)??n).removeChild(e);e=t}}}let ie=null,ae={},oe=!1,se,ce,le=!1;if(__(r)){if(S){if((x.block!==null||x.text!==null)&&N_(x),x.end===null){let e=x.hostNode,t=pv(e,r,h,Np(n));if(t!==e){if(e!==null&&(M?.view(e)??e).parentNode!==null){let n=(M?.view(e)??e).parentNode;D===null?(t!==null&&(M?.view(n)??n).insertBefore(t,e),rx(e,null),(M?.view(n)??n).removeChild(e)):(Ov(x,n),Xa(n,e,e,()=>rx(e,null)),t!==null&&(M?.view(n)??n).insertBefore(t,e))}else t!==null&&(M?.view(n)??n).insertBefore(t,i??null)}x.hostNode=t;return}x.start===null&&(x.start=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(x.start,x.end));let e=x.hostNode;e===null&&g!==null&&(e=F(x.start),e===x.end&&(e=null));let t=pv(e,r,h,Np(n));if(t!==e){if(e!=null&&e!==t&&(M?.view(e)??e).parentNode!==null){if(D!==null){Ov(x,n);let t=e;Xa((M?.view(e)??e).parentNode,e,e,()=>rx(t,null))}else rx(e,null),N((M?.view(e)??e).parentNode).removeChild(e)}t!==null&&N(N(x.start).parentNode).insertBefore(t,x.end)}x.hostNode=t;return}ie=bv,ae=r}else if(typeof r==`function`)ie=r,oe=!0;else if(g_(r)){let e=hp,t=e!==null&&r.type===e.type;if(!t&&typeof r.type!=`function`&&typeof r.type!=`string`)throw b_(r.type);ie=t?e.body:r.type,ae=r.props,se=r.__octaneInvocationSite,ce=r.key,le=r.key!=null}if(ie!==null){if(oe&&x.block!==null&&x.currentIsBodyFn){let e=Fu(ie),t=x.block.$$implicitBail;if(e&&!t&&(x.block.$$implicitBail=!0,x.block.memoInChain=!0),t&&e&&ie===x.currentComp&&Kv(x.block))return;x.block.body!==ie&&O(x.block,`body`,x.block.body),x.currentComp!==ie&&O(x,`currentComp`,x.currentComp),x.block.body=ie,A(x.block),x.currentComp=ie;return}if(x.block!==null&&ie===x.currentComp){if(Gv(x.block,ie,ae)||ae===x.block.props&&(ie!==bv||Z_(x.block,ae))&&Kv(x.block))return;x.block.props!==ae&&O(x.block,`props`,x.block.props),x.block.props=ae,A(x.block);return}let r=Qn||Ln?{parentScope:e,invocationSite:se,key:ce,hasKey:le}:void 0,i=x.block===null&&x.hostNode===null&&x.text===null||h.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:x.__kind,branch:void 0,component:oe?void 0:ie,key:void 0},a=ci,o=h.currentRenderMode===`transition`,s=a!==null&&x.block!==null&&x.block.mounted&&g===null&&Bb(h),c=D===null||s?a:null,l=c!==null&&x.block!==null&&x.block.mounted&&x.end!==null&&g===null,u=l&&!o&&s,d=u&&!o;if(l&&(o||u)){let e=c.render(h,n,x.end,ie,ae,dl,`dynamic`,void 0,!1,r,i);if(e.suspended||e.failed)throw c.dispose(e.wip),e.failed?e.error:new ld(e.suspended);if(x.borrowed||d)c.dispose(e.wip);else{let t=x.block;if(x.block=e.wip.block,x.currentComp=ie,x.currentIsBodyFn=oe,c.splice(e.wip),P_(x,t),h.disposed||x.block!==e.wip.block||e.wip.block.disposed)return;A_(e.wip,x.end);return}}if(g===null&&ie===bv&&x.block===null&&x.hostNode!==null&&x.hostNode.nodeType===1&&x.hostNode.localName===ae.type&&x.hostNode.namespaceURI===(Mp(ae.type,Np(n))??Ap)&&!H_(ae.props)&&!H_(Y_(x.hostNode)?.props??null)){let e=x.hostNode;x.hostNode=null,x.currentComp=ie,x.currentIsBodyFn=!1;let t=Qc(`dynamic`,h,n,x.start,x.end,ie,ae,void 0,dl);r!==void 0&&vr(t,r),to(t),x.borrowed&&(t.exclusiveMarkers=!0),t.$$implicitBail=!0,t.memoInChain=!0,t.deoptNode=e,x.block=t,wv={block:t,children:Y_(e)?.children};try{A(t)}finally{wv=null}return}if(D!==null&&C&&(e.mounted||D.retainedCreated?.has(h))&&!s&&g===null){let t=x.ownerHost!==null||x.borrowed&&x.start===null?(M?.view(n)??n).lastChild:x.end===null?x.block?.endMarker??x.text??x.hostNode:N(x.end).previousSibling;if(t!==null&&(M?.view(t)??t).parentNode===n){N_(x);let a=!oe||Fu(ie),o=E_(h,n,t,ie,ae,dl,`dynamic`,void 0,a,r,i);if(o.suspended||o.failed)throw M_(o.wip),o.suspended===null?o.error:new ld(o.suspended);if(e===h&&h.forSlot!==null&&!h.exclusiveMarkers&&x.borrowed&&Wb(h,x.start,x.end)){let e=x.start,t=x.end;x.start=o.wip.start,x.end=o.wip.end,O(o.wip.block,`exclusiveMarkers`,o.wip.block.exclusiveMarkers),o.wip.block.exclusiveMarkers=!0,Ub(h,e,t,x.start,x.end),Xa(n,e,e),Xa(n,t,t)}x.start===null&&x.ownerHost===null&&!x.borrowed&&(x.start=o.wip.start),x.block=o.wip.block,x.currentComp=ie,x.currentIsBodyFn=oe,O_(o.wip);return}}if(g===null&&(N_(x),h.disposed))return;x.currentComp=ie,x.currentIsBodyFn=oe,x.start===null&&x.ownerHost===null&&!x.borrowed&&(x.start=(M?.view(document)??document).createComment(``),(M?.view(n)??n).insertBefore(x.start,x.end));let f=Qc(`dynamic`,h,n,x.start,x.end,ie,ae,void 0,dl);r!==void 0&&vr(f,r),x.borrowed&&(f.exclusiveMarkers=!0),(!oe||Fu(ie))&&(f.$$implicitBail=!0,f.memoInChain=!0),x.block=f,A(f),g!==null&&!x.borrowed&&x.end!==null&&(g.node=F(x.end));return}if(typeof r==`object`&&r)throw y_(r);(x.block!==null||x.hostNode!==null)&&N_(x);let ue=T_(r);if(ue===``){x.text!==null&&(D===null?(N(x.text).remove(),x.text=null):N_(x));return}if(x.text!==null){wf(x.text,ue);return}if(g!==null){let e=g.node;if(e!==null&&e!==x.end&&e.nodeType===3){x.text=e,g.node=F(e),wf(e,ue);return}}let de=(M?.view(document)??document).createTextNode(ue);(M?.view(n)??n).insertBefore(de,x.end),x.text=de}function Lv(e,t,n,r,i,a,o){Iv(e,t,n,r,i,a,void 0,o);let s=e.slots[t];return s.block===null&&s.forSlot===null&&s.hostNode===null?s.text:null}function Rv(e,t,n,r,i,a,o,s,c){if(r===null||typeof r!=`object`&&typeof r!=`function`){if(a===r)return i;if(i!=null&&r!==null)return Tf(i,r===!0?``:r),i}return Lv(e,t,n,r,o,s,c)}function zv(e,t,n,r,i,a){if(r===null||typeof r!=`object`&&typeof r!=`function`){if(a===r)return i;if(i!=null&&r!==null)return Tf(i,r===!0?``:r),i}return Bv(e,t,n,r,i)}function Bv(e,t,n,r,i){if(n.nodeType===1&&_t.has(n.localName)&&!Dv(e.block,n)&&r!=null)throw Error(w(26,n.localName));if(op(n,r))return null;let a=typeof r,o=e.slots[t];if(D!==null&&o===void 0&&e.mounted&&(Eo(),Ga(n,null,null),O(e.slots,t,e.slots[t])),o===void 0&&a!==`object`&&a!==`function`){let o=r==null||r===!1||r===!0?``:a===`string`?r:String(r);if(o===``)return i!==null&&(M?.view(i)??i).remove(),null;if(i!==null)return wf(i,o),i;let s=I();if(s!==null)return s.htext(n,o,Ar(e,t));let c=(M?.view(document)??document).createTextNode(o);return(M?.view(n)??n).appendChild(c),c}o===void 0&&i!==null&&(M?.view(i)??i).remove();let s=I();s!==null&&o===void 0&&(s.node=P(n)),Iv(e,t,n,r,null,!1,n);let c=e.slots[t];return c.block===null&&c.forSlot===null&&c.hostNode===null?c.text:null}function Vv(e){let t=e.$$ctxReads;if(t===null)return!1;for(let[e,n]of t)if(e.$$version!==n)return!0;return!1}function Hv(e){let t=e.$$ctxDirect;if(t===null)return!1;for(let[e,n]of t)if(e.$$version!==n)return!0;return!1}function Uv(e){if(e.$$ctxDepsEpoch!==rt()){if(Hv(e))return!1;Vv(e)?Wv(e):e.$$ctxDepsEpoch=rt()}return!0}function Wv(e){let t=e._slots;if(t!==null)for(let e=0,n=t.length;e<n;e++){let n=t[e];if(n.__kind===`forBlockSlot`){let e=n.items;for(let t of e.values())Jv(t);n.emptyBlock&&Jv(n.emptyBlock)}else if(n.block)Jv(n.block);else if(n.__kind===`childSlot`&&n.forSlot){let e=n.forSlot.items;for(let t of e.values())Jv(t)}else n.__kind===`childSlot`&&n.portal!==null&&n.portal.block!==null&&Jv(n.portal.block)}}function Gv(e,t,n){if(t.__memo!==!0||!e.mounted||e.renderStatus!==Mr)return!1;let r=t.__compare;return!(r?t[Rd]===void 0?r(e.props,n):r(e.props,n,e):Xv(e.props,n))||!Uv(e)?!1:(qv(e),vb(e),!0)}function Kv(e){if(e.$$implicitBail!==!0||!e.mounted||e.renderStatus!==Mr)return!1;let t=e.body[Rd];return t!==void 0&&!t(e)||!Uv(e)?!1:(qv(e),vb(e),!0)}function qv(e){let t=e.$$ctxReads,n=e.$$ctxDirect,r=t!==null&&t.size>0,i=n!==null&&n.size>0;if(r||i)for(let a=e.parentBlock;a!==null;a=a.parentBlock){if(a.body?.__memo!==!0&&a.$$implicitBail!==!0)continue;let e=a.$$ctxReads??=new Map;if(r)for(let[n,r]of t){let t=e.get(n);if(t!==r){let i=n.$$version;(t===void 0||t===i)&&(e.set(n,r),r!==i&&(a.$$ctxDepsEpoch=-1))}}if(i)for(let[t,r]of n){let n=e.get(t);if(n!==r){let i=t.$$version;(n===void 0||n===i)&&(e.set(t,r),r!==i&&(a.$$ctxDepsEpoch=-1))}}}}function Jv(e){let t=e.$$ctxDepsEpoch===rt();!t&&Hv(e)?A(e):e.body?.__memo===!0||e.$$implicitBail===!0?t||(Vv(e)?Wv(e):e.$$ctxDepsEpoch=rt()):(t||(e.$$ctxDepsEpoch=rt()),Wv(e))}var Yv=Object.prototype;function Xv(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t);if(n!==Yv&&n!==null||r!==Yv&&r!==null)return Zv(e,t);let i=0;for(let n in e){let r=e[n];if(!Ot.call(t,n)||!Object.is(r,t[n]))return!1;i++}for(let e in t)i--;return i===0}function Zv(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!Ot.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}var Qv=1/0,$v=300,ey=-1/0,ty=new Map,ny=!1;function ry(e){for(;e.parentBlock!==null;)e=e.parentBlock;return e}function iy(e){let t=e.afterCommit;t!==void 0&&(e.afterCommit=void 0,queueMicrotask(()=>{for(let e of t)e()}))}function ay(e,t){t.states.size!==0||t.flushing||(t.timer!==null&&clearTimeout(t.timer),ty.delete(e),ty.size===0&&(As.find=lb))}function oy(e){if(ty.size===0)return;let t=ry(e.parentBlock),n=ty.get(t);n!==void 0&&n.states.delete(e)&&(ay(t,n),iy(n))}function sy(e,t){t.queued||t.flushing||(t.queued=!0,queueMicrotask(()=>{if(t.queued=!1,ty.get(e)!==t)return;t.timer!==null&&clearTimeout(t.timer),t.timer=null;let n=ey+$v-performance.now();gs!==0||n<=10?dy(e,t):t.timer=setTimeout(()=>dy(e,t),n)}))}function cy(e,t){let n=ry(e.parentBlock),r=ty.get(n);r===void 0&&(r={states:new Map,timer:null,queued:!1,flushing:!1},ty.set(n,r),As.find=ly),r.states.set(e,t??e.stagedCapture),sy(n,r)}function ly(e,t,n){if(e!==null){let t=ry(e),n=ty.get(t);n!==void 0&&sy(t,n)}return t?lb(e,!0,n):lb(e,!1)}function uy(e){if(!e.parentBlock.disposed){if(k!==null){us??=uy,(k.suspenseCommits??=new Set).add(e);return}ub(e.parentBlock)===null&&(ey=performance.now())}}function dy(e,t){if(ty.get(e)!==t)return;t.timer!==null&&clearTimeout(t.timer),t.timer=null;let n=()=>{if(ty.get(e)!==t)return;t.flushing=!0;let n=[...t.states].sort(([e],[t])=>Eb(e,t)),r=Hi,i=ny;Hi=!0,ny=!0;try{for(let[e,r]of n)t.states.has(e)&&t.states.get(e)===r&&(t.states.delete(e),!(e.parentBlock.disposed||e.branch!==2||e.pendingThenable!==null)&&(r!==null&&`error`in r?zb(e.tryBlock??e.parentBlock,r.error):(r!==null&&Db(r),sb(e))))}finally{Hi=r,ny=i,t.flushing=!1,ay(e,t),t.states.size!==0&&sy(e,t),r||yc(),iy(t)}};Zo?.wrapResume(n,()=>[...t.states.keys()].map(e=>e.parentBlock))!==!0&&n()}var fy=new WeakMap,py=new WeakMap,my=0,hy=0,gy=null,_y=0;function vy(e){let t=gy??=new WeakMap;t.set(e,(t.get(e)??0)+1),_y++}function yy(e){let t=gy,n=t?.get(e);n!==void 0&&(n===1?t.delete(e):t.set(e,n-1),_y--)}function by(e){if(_y===0)return!0;let t=gy;for(let n=e;n!==null;n=(M?.view(n)??n).parentNode)if(t.has(n))return!1;return!0}function xy(e){let t=fy.get(e),n=t!==void 0&&t.importantOwners>0?`important`:``,r=(M?.view(e)??e).style;(r.getPropertyValue(`display`)!==`none`||r.getPropertyPriority(`display`)!==n)&&r.setProperty(`display`,`none`,n)}function Sy(e,t){t.value===``?(M?.view(e)??e).style.removeProperty(`display`):(M?.view(e)??e).style.setProperty(`display`,t.value,t.priority),!t.hadStyle&&(M?.view(e)??e).getAttribute(`style`)===``&&(M?.view(e)??e).removeAttribute(`style`)}function Cy(e,t,n,r){let i=fy.get(e);if(i===void 0)return!1;E!==null&&E.push(Sa,i,`value`,i.value,Sa,i,`priority`,i.priority,Sa,i,`hadStyle`,i.hadStyle),Sy(e,i);try{r===void 0?Hp(e,(M?.view(e)??e).style,t,n):t==null||typeof t==`boolean`?(M?.view(e)??e).style.removeProperty(Kn(r)):Up(e,(M?.view(e)??e).style,r,t)}finally{i.value=(M?.view(e)??e).style.getPropertyValue(`display`),i.priority=(M?.view(e)??e).style.getPropertyPriority(`display`),i.hadStyle=(M?.view(e)??e).hasAttribute(`style`),xy(e)}return!0}function wy(e,t){let n=py.get(e);return n!==void 0&&(E!==null&&E.push(Sa,n,`data`,n.data),n.data=t,!0)}function Ty(e,t){let n=fy.get(e);n===void 0?(my++,Cf=Cy,fy.set(e,{owners:1,importantOwners:+!!t,value:(M?.view(e)??e).style.getPropertyValue(`display`),priority:(M?.view(e)??e).style.getPropertyPriority(`display`),hadStyle:(M?.view(e)??e).hasAttribute(`style`)})):(n.owners++,t&&n.importantOwners++),xy(e)}function Ey(e,t,n=!0){let r=fy.get(e);r!==void 0&&(t&&r.importantOwners--,--r.owners===0?(fy.delete(e),--my===0&&(Cf=null),n&&Sy(e,r)):xy(e))}function Dy(e){(M?.view(e)??e).data!==``&&((M?.view(e)??e).data=``)}function Oy(e){let t=py.get(e);t===void 0?(hy++,Sf=wy,py.set(e,{owners:1,data:(M?.view(e)??e).data})):t.owners++}function ky(e,t=!0){let n=py.get(e);n!==void 0&&(--n.owners===0?(py.delete(e),--hy===0&&(Sf=null),t&&((M?.view(e)??e).data=n.data)):Dy(e))}function Ay(e,t){e.retrySignalOwners!==void 0&&cr(e),Uy?.delete(e),oy(e),Kl?.delete(e),e.block!==null&&j(e.block,t),k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null;let n=e.detachedRefs!==null;if(e.detachedRefs=null,e.pendingThenable=null,e.tryBlock!==null&&e.tryBlock!==e.block){let t=e.tryBlock,r=null;n&&(r=[],nx(t,r)),Zy(e),ac(r,()=>{j(t,!0)}),e.tryBlock=null}Qy(e),Ny(e,-1),e.block=null}function jy(e){let t=k===null?Va(e.parentBlock.idState.renderOwner):null;return D!==null&&!Ra&&(N(e.start).parentNode===e.domParent&&N(e.end).parentNode===e.domParent?Wa(e,e.domParent,e.start,e.end):Do(e)),t}function My(e){e!==null&&(Ha(e),D===null&&io(),!ii&&!ri&&(ri=!0,queueMicrotask(Ps)))}function Ny(e,t){e.branch=t}function Py(e){let t=e.block,n=e.tryBlock;t!==null&&j(t),n!==null&&n!==t&&j(n),e.block=null,e.tryBlock=null}function Fy(e,t,n=!1,r=!1){if(ff(t)||(Py(e),e.pendingThenable=null,Ny(e,0),e.err=t,e.catchBody===null))throw t;let i=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.catchBody,{err:t,reset:e.reset},e.env);e.block=i;try{let t=I();if(r&&t!==null){let n=e.domParent,r=(M?.view(n)??n).lastChild;t.suspend(()=>A(i));let a=r===null?P(n):F(r);for(;a!==null;)t.markFresh(a),a=F(a)}else A(i)}finally{n&&Px(e)}}function Iy(e,t){if(Py(e),Ny(e,2),e.pendingThenable=t,e.pendingBody!==null){let t=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.pendingBody,void 0,e.env);e.block=t,A(t)}let n=()=>{e.pendingThenable!==t||e.parentBlock.disposed||(e.pendingThenable=null,Ny(e,-1),Cs(e.parentBlock))};t.then(n,n)}function Ly(e){if(e.branch===0&&e.block!==null){e.block.body=e.catchBody,e.block.props={err:e.err,reset:e.reset},e.block.extra=e.env,A(e.block);return}if(e.branch===2){e.block!==null&&e.pendingBody!==null&&(e.block.body=e.pendingBody,e.block.extra=e.env,A(e.block));return}let t=e.tryBlock;t===null||t.disposed?(e.block!==null&&j(e.block),t=Qc(`control-flow`,e.parentBlock,e.domParent,null,null,e.tryBody,void 0,e.env),e.tryBlock=t,e.block=t,Ny(e,1),t.$$tryHandler=t=>{try{Fy(e,t)}catch(t){let n=Lb(e.parentBlock);n===null?console.error(t):n(t)}},e.propagateSuspense||(t.__suspenseHandler=t=>{Iy(e,t)})):(t.body=e.tryBody,t.extra=e.env);let n=I(),r=n?.passthroughRanges===!0;try{A(t),e.hasResolved=!0}catch(t){if(ud(t)){if(e.propagateSuspense||r&&!n.passthroughRanges)throw t;Iy(e,t.thenable)}else Fy(e,t,!0,r&&!n.passthroughRanges)}}function Ry(e,t,n,r,i,a,o,s,c=!1){c||=a===null,a!==null&&(li(),js());let l=e.block,u=I(),d=e.slots[t],f=!1;if(d===void 0){let f,p,m=u?.passthroughRanges===!0,h=m?null:u?.resolveOpen(o??null,n)??null;m?(f=(M?.view(document)??document).createComment(`passthrough-try`),p=(M?.view(document)??document).createComment(`/passthrough-try`)):h===null?(f=(M?.view(document)??document).createComment(`try`),p=(M?.view(document)??document).createComment(`/try`),(M?.view(n)??n).insertBefore(f,o??null),(M?.view(n)??n).insertBefore(p,o??null)):(f=h,p=u.close(h));let g;g={__kind:`trySlotSlot`,__flags:Sl,__teardown:Ay,start:f,end:p,branch:-1,block:null,tryBlock:null,hiddenDom:null,tryBody:r,catchBody:i,pendingBody:a,propagateSuspense:c,env:s,hasResolved:!1,err:null,pendingThenable:null,stagedCapture:null,stagedEffectDeps:null,transitionHeld:!1,transitionTimeoutId:null,detachedRefs:null,domParent:n,parentBlock:l,idState:l.idState,passthrough:m,reset:()=>Nb(g)},e.slots[t]=g,xl(e,g),d=g}else f=(d.branch===2||d.retrySignalOwners!==void 0)&&(d.tryBody!==r||d.env!==s&&Zl(d.env,s)),d.retrySignalOwners!==void 0&&f&&cr(d),d.tryBody=r,d.catchBody=i,d.pendingBody=a,d.propagateSuspense=c,Ui!==null&&d.env!==s&&E.push(Sa,d,`env`,d.env),d.env=s;let p=d,m=Uy?.get(p);return m===void 0&&u!==null&&p.branch===-1&&!p.propagateSuspense&&(m=Ky(p,u)??void 0,m!==void 0&&(Uy??=new WeakMap).set(p,m)),m===void 0?p.passthrough?(Ly(p),p.reset):(p.branch===0?(p.block.body=p.catchBody,p.block.props={err:p.err,reset:p.reset},p.block.extra=p.env,A(p.block)):p.branch===2&&p.tryBlock&&!p.tryBlock.disposed&&p.hiddenDom?(xb(p,void 0,f?`parent`:`update`),p.branch===2&&ab(p)):p.branch===2?qy(p):p.branch===1&&p.tryBlock?zy(p):qy(p),p.reset):(Gy(p,m),p.reset)}function zy(e,t){let n=e.tryBlock;n.body=e.tryBody,n.extra=e.env,t!==void 0&&(n.pendingMode!==`urgent`&&(n.pendingMode=t.pendingMode??`urgent`),n.pendingDeferred=t.pendingDeferred,rl(t,n));let r=Ko(e),i=k,a=r<0?null:ds(),o=a!==null&&(D===null||e.propagateSuspense||(n.pendingMode??T?.currentRenderMode)!==`transition`||n.pending&&n.pendingMode===`transition`&&T!==null&&T.currentRenderMode===`urgent`&&Od(T,n)&&ci!==null)?fb(n):null,s=ec.length,c=!1,l;a!==null&&(k=a);try{A(n)}catch(e){c=!0,l=e}finally{k=i}try{if(c){if(a!==null&&(ec.splice(s),o!==null&&pb(n,o),k_(a)),$u(l)||ff(l))throw l;if(ud(l)){if(e.propagateSuspense)throw l;$y(e,l.thenable,n,r,t??n)}else Fb(e,l,!0)}else a!==null&&D_(a),la(e)||(Qy(e),e.pendingThenable=null)}finally{qo(r)}}function By(e,t,n){let r=Qc(`control-flow`,e.parentBlock,e.domParent,t,n,e.tryBody,void 0,e.env);return r.idState=e.idState,r.__trySlot=e,r.$$tryHandler=t=>(Fb(e,t),e.block),e.propagateSuspense||(r.__suspenseHandler=(t,n)=>{$y(e,t,n)}),e.tryBlock=r,r}function Vy(e){e.retrySignalOwners!==void 0&&cr(e),Kl?.delete(e);let t=e.tryBlock,n=[];return nx(t,n),Zy(e),e.tryBlock=null,ac(n,()=>j(t)),e.parentBlock.disposed||e.tryBlock!==null||e.branch!==2?null:Hy(e)}function Hy(e){let t=(M?.view(document)??document).createComment(`try-b`),n=(M?.view(document)??document).createComment(`/try-b`),r=e.block?.startMarker??e.end;N(e.domParent).insertBefore(t,r),N(e.domParent).insertBefore(n,r);let i=By(e,t,n);return e.detachedRefs=[],Xy(e),i}var Uy=null,Wy=null,Gy=null;function Ky(e,t){let n=F(e.start);if(n?.nodeType!==8)return null;let r=(M?.view(n)??n).data;if(r.startsWith(`oct-seed:`)){let i=r.slice(gt.length),a=F(n);if(!t.isOpen(a))return null;let o=t.close(a),s=typeof window<`u`?window.$OCTS:void 0,c=n,l=Wy?.get(c);return l===void 0&&(l={seedRaw:typeof s?.[i]==`string`?s[i]:null,nativeRaw:typeof s?.[i+`$signals`]==`string`?s[i+`$signals`]:null},(Wy??=new WeakMap).set(c,l),s!==void 0&&(delete s[i],delete s[i+`$signals`])),e.idState={prefix:e.parentBlock.idState.prefix+`b`+i+`-`,next:0,renderOwner:e.parentBlock.idState.renderOwner,signalState:e.parentBlock.idState.signalState},{metadata:[n],start:a,end:o,idStart:0,...l,consume:()=>{Wy?.delete(c)}}}if(!r.startsWith(`oct-suspense:`))return null;let i=r.slice(dt.length);if(!/^(?:0|[1-9]\\d*)$/.test(i))return null;let a=Number(i);if(!Number.isSafeInteger(a))return null;let o=F(n),s=null,c=null,l=[];for(let e of[ft,pt]){if(o?.nodeType!==1)continue;let t=o;t.localName===`script`&&(M?.view(t)??t).getAttribute(`type`)===`application/json`&&(M?.view(t)??t).hasAttribute(e)&&(e===`data-octane-suspense-seeds`?s=(M?.view(t)??t).textContent:c=(M?.view(t)??t).textContent,l.push(t),o=F(t))}if(!t.isOpen(o))return null;let u=t.close(o),d=e.idState,f=d.next;return Uu(d,a),e.idState={prefix:d.prefix,next:f,limit:f+a,overflow:d,renderOwner:d.renderOwner},{metadata:[n,...l],start:o,end:u,idStart:f,seedRaw:s,nativeRaw:c}}function qy(e){e.retrySignalOwners!==void 0&&cr(e),oy(e),Kl?.delete(e);let t=e.branch===2,n=I();k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null,e.detachedRefs=null;let r=e.tryBlock;r&&(Zy(e),j(r),e.tryBlock=null),e.block&&e.block!==r&&j(e.block),e.block=null,e.hiddenDom=null,e.hasResolved=!1,Ny(e,1);let i,a,o=null,s,c=!1,l=!1,u=F(e.start),d=null;if(n!==null&&u!==null&&u.nodeType===8&&(M?.view(u)??u).data.startsWith(`oct-seed:`)){c=!0,d=(M?.view(u)??u).data.slice(gt.length);let e=typeof window<`u`?window.$OCTS:void 0,t=e===void 0?void 0:e[d];typeof t==`string`&&(o=n.parseSeeds(t));let r=e?.[d+`$signals`];typeof r==`string`&&(s=r),u=F(u)}else if(n!==null&&u!==null&&u.nodeType===1&&me(u)){c=!0,l=!0,d=(M?.view(u)??u).getAttribute(ce);let t=u;for(;t!==null&&t!==e.end;){let e=F(t);(M?.view(t)??t).remove(),t=e}u=e.end,n.node=e.end}d!==null&&(e.idState={prefix:e.parentBlock.idState.prefix+`b`+d+`-`,next:0,renderOwner:e.parentBlock.idState.renderOwner,signalState:e.parentBlock.idState.signalState});let f=Dr(n,u,e.end,e.idState);f!==null&&(e.idState=f,l=!0,u=e.end,o=null,s=void 0),n!==null&&n.isOpen(u)?(i=u,a=n.close(i),n.node=F(i)):(o=null,i=(M?.view(document)??document).createComment(`try-b`),a=(M?.view(document)??document).createComment(`/try-b`),N(e.domParent).insertBefore(i,e.end),N(e.domParent).insertBefore(a,e.end),n!==null&&(n.markFresh(i),n.markFresh(a)));let p=By(e,i,a);e.block=p;let m;if(s!==void 0&&!l){let e=d;m=Tr(p,Oe(s),()=>{let t=typeof window<`u`?window.$OCTS:void 0;t!==void 0&&(delete t[e+`$signals`],delete t[e])})}let h=n?.seeds??null,g=n?.seedCursor??0;c&&(n.seeds=o,n.seedCursor=0);let _=c||l?qe(m?.resolve??null):void 0;l&&n.depth++;try{A(p),e.hasResolved=!0,t&&uy(e)}catch(t){if($u(t)||ff(t))throw t;if(ud(t)){if(e.propagateSuspense)throw t;$y(e,t.thenable,p)}else{let r=n?.isRejection(t)===!0;e.tryBlock&&(j(e.tryBlock,!r),e.tryBlock=null,e.block=null),Fb(e,t,!0,r?i:void 0,r?a:void 0)}}finally{l&&n.depth--,_!==void 0&&qe(_),c&&(n.seeds=h,n.seedCursor=g)}}function Jy(e,t){let n=F(e.startMarker);for(;n!==null&&n!==e.endMarker;){if(n.nodeType===1){let e=n;t.displays.has(e)?xy(e):(t.displays.add(e),Ty(e,!0))}else if(n.nodeType===3){let e=n;t.texts.has(e)||(t.texts.add(e),Oy(e)),Dy(e)}n=F(n)}}function Yy(e,t){ex(e,e=>{let n=e.block===e?e:null;n?.kind===`portal`&&Jy(n,t),Yy(e,t)})}function Xy(e){let t=e.tryBlock;if(t===null||e.hiddenDom!==null)return;let n={displays:new Set,texts:new Set,active:!0};e.hiddenDom=n,E!==null&&Ua(()=>{if(e.hiddenDom===n&&(e.hiddenDom=null),n.active){n.active=!1;for(let e of n.displays)Ey(e,!0);for(let e of n.texts)ky(e)}}),Jy(t,n),Yy(t,n)}function Zy(e){let t=e.hiddenDom;if(t!==null&&(e.hiddenDom=null,E!==null&&Ua(()=>{if(e.hiddenDom=t,!t.active){t.active=!0;for(let e of t.displays)Ty(e,!0);for(let e of t.texts)Oy(e),Dy(e)}}),t.active)){t.active=!1;for(let e of t.displays)Ey(e,!0);for(let e of t.texts)ky(e)}}function Qy(e){fa(e),e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),wb(e),e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null)}function $y(e,t,n,r=-1,i=n){if(di!==null)throw di.suspensions.set(e,t),new ld(t);js();let a=n.currentRenderMode===`transition`;if(a&&e.hasResolved&&e.branch===1&&e.hiddenDom===null){Xo(r,e.tryBlock??n),Ui!==null&&(Ui.heldSlots??=new Set).add(e),Li(e,i),e.transitionHeld||(e.transitionHeld=!0,Qo(1)),Cb(e),e.pendingBody!==null&&Qv!==1/0&&Qv>=0&&(e.transitionTimeoutId===null||e.pendingThenable!==t)&&(e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null),e.transitionTimeoutId=setTimeout(()=>{e.transitionTimeoutId=null,e.pendingThenable===t&&e.transitionHeld&&e.branch===1&&ob(e)},Qv)),kb(e,t);return}a||Qy(e),tb(e,t)}function eb(e){let t=k===null?ns:k.effects;for(let n=es;n<=ts;n++){let r=t[n];for(let t=0;t<r.length;t++){let n=r[t],i=n.scope.block;if(i.disposed||i!==e&&!Tc(e,i))continue;let a=n.scope.hooks?.get(n.slot);a!==void 0&&a.revision===n.revision&&(D!==null&&Do(a),a.revision++,a.active=a.connectedFn!==null,a.deps=a.connectedFn===null?void 0:a.connectedArgs,rl(i,e))}}}function tb(e,t){let n=jy(e);try{return nb(e,t)}catch(e){throw n!==null&&no(n.transaction),e}finally{My(n)}}function nb(e,t){let n=e.branch===2,r=I();if(r!==null&&!e.hasResolved&&e.tryBlock!==null){let t=e.tryBlock;j(t),e.tryBlock=null,e.block===t&&(e.block=null),r.node=e.end}else Xy(e);let i=e.block!==null&&e.block!==e.tryBlock?e.block:null;if(e.block=null,Ny(e,2),i!==null&&(j(i),e.parentBlock.disposed||e.block!==null||e.branch!==2))return!1;if(e.tryBlock){let t=e.tryBlock,n=mc(t);eb(t),O(t,`inactive`,t.inactive),t.inactive=!0;let r=()=>rb(e,t,n);hc?.recordStageEntry(r),k===null?is.push(r):(k.renderCleanups??=[]).push(e=>{e||is.push(r)})}return!ib(e)||e.parentBlock.disposed||e.branch!==2?!1:(n||uy(e),t!==void 0&&kb(e,t),!e.parentBlock.disposed&&e.branch===2)}function rb(e,t,n){if(dc(t)||e.tryBlock!==t||e.branch!==2)return;let r=e.parentBlock.idState.renderOwner,i=r?.generation;ix(t,!1),!(dc(t)||e.tryBlock!==t||e.branch!==2||r?.generation!==i)&&(e.detachedRefs===null&&(e.detachedRefs=[],tx(t,e.detachedRefs,!0,!1,n)),!(dc(t)||e.tryBlock!==t||r?.generation!==i)&&mc(t,n))}function ib(e){if(e.pendingBody){let t=(M?.view(document)??document).createComment(`pend-b`),n=(M?.view(document)??document).createComment(`/pend-b`);N(e.domParent).insertBefore(t,e.end),N(e.domParent).insertBefore(n,e.end);let r=Qc(`control-flow`,e.parentBlock,e.domParent,t,n,e.pendingBody,void 0,e.env);r.idState=e.idState,r.__trySlot=e,e.block=r;try{A(r)}catch(t){return!Pb(r,t)&&(e.block&&=(j(e.block),null),Fb(e,t),!1)}}return!0}function ab(e){if(e.branch!==2)return;let t=e.block===e.tryBlock?null:e.block;if(e.pendingBody===null){t&&j(t),e.block=null;return}if(t===null){ib(e);return}t.body=e.pendingBody,t.extra=e.env;try{A(t)}catch(n){if(Pb(t,n))return;j(t),e.block=null,Fb(e,n)}}function ob(e){e.pendingBody&&e.branch===1&&e.tryBlock&&(Gi!==null&&Gi.holders.has(e)&&da(),tb(e))}function sb(e){(Vi||ny||Zo?.wrapResume(()=>cb(e),()=>[e.parentBlock])!==!0)&&cb(e)}function cb(e){if(e.parentBlock.disposed)return;let t=!1;if(Yn!==null&&e.hiddenDom!==null){let n=e.stagedCapture;if(n===null||!Yn.validateCapture(n)){let t=md;md=!0,e.transitionHeld&&e.tryBlock!==null&&(e.tryBlock.pendingMode=`transition`);try{xb(e,`urgent`),Hi||yc()}finally{md=t}return}k===null&&(t=wr(n,e.parentBlock.idState.renderOwner))}let n=e.branch===2,r=db(e.parentBlock),i=e.transitionHeld,a=i;i&&(e.transitionHeld=!1),zi.delete(e),Bi.delete(e);try{let r=e.tryBlock;if(r&&!r.disposed){let o=e.hiddenDom!==null,s=e.stagedCapture;if(e.stagedCapture=null,e.stagedEffectDeps=null,e.hiddenDom){if(e.block&&e.block!==r){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||r.disposed||e.tryBlock!==r||e.block!==null){k_(s);return}}Zy(e)}if(e.block=r,Ny(e,1),r.body=e.tryBody,i&&(r.pendingMode=`transition`),r.inactive=!1,s!==null)r.pendingMode=null,r.pendingDeferred=!1,e.detachedRefs!==null&&(s.refs.length=0),D_(s,t),e.hasResolved=!0;else{let n=Ko(e),s=ds(),c=fb(r),l=k,u=ec.length,d=md;md=!0,k=s;let f=!1,p=null,m=!1;try{o?yb(r,s):A(r),Yn!==null&&(m=!Yn.validateCapture(s),!m&&l===null&&(t=wr(s,e.parentBlock.idState.renderOwner)))}catch(e){f=!0,p=e}finally{k=l,md=d,!f&&!m&&qo(n)}if(m){try{Xo(n,r),ec.splice(u),pb(r,c),k_(s),i&&(e.transitionHeld=!0,zi.add(e),a=!1),rl(r,r),Cs(r)}finally{qo(n)}return}if(!f)e.detachedRefs!==null&&(ec.splice(u),s.refs.length=0),D_(s,t),e.hasResolved=!0;else{try{ec.splice(u),pb(r,c),k_(s),ud(p)?$y(e,p.thenable,r,n):zb(r,p)}finally{qo(n)}if(e.parentBlock.disposed)return}}e.branch===1&&(n&&uy(e),Xl(e),bb(e))}else qy(e);Hi||yc()}finally{r!==null&&Xb(r),a&&(Qo(-1),Ii(e))}}function lb(e,t,n=null){let r=null,i=null;for(let a=e;a!==null;a=a.parentBlock){if(t&&r===null&&a.inactive){let e=a.__activitySlot;e!==void 0&&e.block===a&&e.hidden&&(r=e)}let e=a.__trySlot;if(e!==void 0&&e.tryBlock===a){if(e.hiddenDom!==null)return e;n!==null&&!e.propagateSuspense&&e.hasResolved&&e.branch===1&&(e.transitionHeld||n===`transition`)&&(i=e)}}return r??i}function ub(e){return lb(e,!1)}function db(e){for(let t=e;t!==null;t=t.parentBlock){if(!t.inactive)continue;let e=t.__activitySlot;if(e!==void 0&&e.block===t&&e.hidden)return e}return null}function fb(e,t){let n=new Map,r=e=>{let i=e.effectSlots;if(i!==null)for(let e=0;e<i.length;e++){let r=i[e];(t===void 0||r.phase===t)&&n.set(r,{deps:r.deps,revision:r.revision,active:r.active})}ex(e,r)};return r(e),n}function pb(e,t,n){let r=e=>{let i=e.effectSlots;if(i!==null)for(let e=0;e<i.length;e++){let r=i[e];if(n!==void 0&&r.phase!==n)continue;let a=t.get(r);a===void 0?(r.deps=void 0,r.revision=0,r.active=!1):(r.deps=a.deps,r.revision=a.revision,r.active=a.active)}ex(e,r)};r(e)}var mb=null;function hb(e){for(let t=mb;t!==null;t=t.parent)t.insertionReplays?.delete(e)}function gb(e,t,n){for(let r=mb;r!==null;r=r.parent)r.queues[t]===n&&r.queuedSlots.add(e)}function _b(e,t,n){for(let r=mb;r!==null;r=r.parent)if(r.queues[t]===n){for(let t of e)r.queuedSlots.delete(t);for(let t=0;t<n.length;t++){let i=n[t],a=i.scope.hooks?.get(i.slot);a!==void 0&&e.has(a)&&a.revision===i.revision&&r.queuedSlots.add(a)}}}function vb(e){let t=mb;if(t===null||e!==t.root&&!Tc(t.root,e))return;let n=[],r=e=>{let i=e.effectSlots;if(i!==null)for(let r=0;r<i.length;r++){let a=i[r];if(t.queuedSlots.has(a))continue;let o=t.insertionReplays?.get(a);if(o!==void 0){n.push({scope:e,effect:a,replay:o});continue}a.active&&a.disconnected&&a.connectedFn!==null&&n.push({scope:e,effect:a,replay:null})}ex(e,r)};r(e);for(let e=0;e<n.length;e++){let{scope:r,effect:i,replay:a}=n[e],o=t.queues[i.phase];if(a!==null){let e=a[a.length-1];D!==null&&Do(i),i.active=e.fn!==null,i.deps=e.fn===null?void 0:e.args;let t=++i.revision;for(let e=0;e<a.length;e++)o.push({...a[e],revision:t,seq:os++})}else o.push({scope:r,slot:i.slot,fn:i.connectedFn,order:i.order,revision:i.revision,args:i.connectedArgs,phase:i.phase,seq:os++});gb(i,i.phase,o)}}function yb(e,t,n=null){let r=t===null?ns:t.effects,i=new Set;for(let e=0;e<r.length;e++){let t=r[e];for(let e=0;e<t.length;e++){let n=t[e],r=n.scope.hooks?.get(n.slot);r?.effect===!0&&r.revision===n.revision&&i.add(r)}}let a=mb;mb={root:e,queues:r,queuedSlots:i,insertionReplays:n,parent:a};try{A(e)}finally{mb=a}}function bb(e){if(e.detachedRefs===null||e.tryBlock===null)return;e.detachedRefs=null;let t=[];nx(e.tryBlock,t);for(let e=0;e<t.length;e++){let n=t[e];$s(n.scope,n.ref,n.el)}}function xb(e,t,n=`update`){let r=db(e.tryBlock),i=md;n===`retry`&&(md=!0);try{Sb(e,t,n)}finally{md=i,r!==null&&Xb(r)}}function Sb(e,t,n=`update`){if(e.nativeTransition!==void 0&&di===null){fi(e.nativeTransition);return}let r=n===`retry`,i=e.tryBlock;if(i===null||i.disposed||e.hiddenDom===null)return;let a=ub(i.parentBlock);if(a!==null){Sb(a,t,n);return}if(oy(e),Bi.delete(e),e.stagedCapture!==null){let t=e.stagedCapture,n=e.stagedEffectDeps;e.stagedCapture=null,e.stagedEffectDeps=null,n!==null&&pb(i,n),k_(t),ix(i,!1)}let o=fb(i);if(n===`parent`&&!md&&!e.hasResolved){let t=!0;for(let e of o.keys())if(e.phase===$o&&e.connectedFn!==null){t=!1;break}if(t){if(i=Vy(e),i===null)return;o.clear()}}Zy(e),i.body=e.tryBody,i.extra=e.env,i.inactive=!1;let s=(t??i.pendingMode??T?.currentRenderMode??`urgent`)===`transition`&&zi.has(e),c=ds(),l=!1,u=k,d=ec.length;k=c;let f=!1,p=null;try{yb(i,c)}catch(e){f=!0,p=e}finally{k=u}if(ec.splice(d),c.refs.length=0,f){if(pb(i,o),k_(c),di!==null)throw p;ud(p)?(ix(i,!1),Xy(e),i.inactive=!0,kb(e,p.thenable)):r?(Xy(e),i.inactive=!0,e.pendingThenable=null,cy(e,{error:p})):(zb(i,p),!ai&&T===null&&yc());return}if(s||r){e.pendingThenable=null,e.stagedCapture=c,e.stagedEffectDeps=o,Xy(e),i.inactive=!0,s?(Bi.add(e),queueMicrotask(Tb)):cy(e);return}if(Yn!==null){if(!Yn.validateCapture(c)){pb(i,o),k_(c),Xy(e),i.inactive=!0,rl(i,i),Cs(i);return}k===null&&(l=wr(c,e.parentBlock.idState.renderOwner))}try{if(e.block!==null&&e.block!==i){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||i.disposed||e.tryBlock!==i||e.block!==null){k_(c);return}}e.block=i,Ny(e,1),e.hasResolved=!0,e.pendingThenable=null,D_(c,l),uy(e),Xl(e),bb(e),e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null),e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),zi.has(e)&&(zi.delete(e),Bi.delete(e),queueMicrotask(Tb))}catch(t){Fb(e,t)}}function Cb(e){zi.add(e),Bi.delete(e)}function wb(e){zi.has(e)&&(zi.delete(e),Bi.delete(e),Tb())}function Tb(){for(let e of Bi)zi.has(e)||Bi.delete(e);if(Bi.size!==0&&Bi.size===zi.size){for(let e of zi)if(!Bi.has(e))return;Ob()}}function Eb(e,t){if(e===t)return 0;let n=N(e.start).compareDocumentPosition(t.start);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}function Db(e){let t=e.effects[$o].concat(e.effects[es],e.effects[ts]).sort((e,t)=>e.seq-t.seq);for(let e=0;e<t.length;e++)t[e].seq=os++}function Ob(){if(!Vi){if(Gi!==null){let e=!0;for(let t of Gi.holders)if(t.hiddenDom!==null){e=!1;break}if(e&&ua(Gi.entries))return;if(e&&da()){Bi.clear(),Ps();return}}Vi=!0;try{let e=()=>{let e=[...Bi];Bi.clear();let t=e.every(e=>e.stagedCapture!==null);if(t){e.sort(Eb);for(let t of e)Db(t.stagedCapture)}let n=Hi;Hi=t;try{for(let t of e)t.tryBlock!==null&&t.tryBlock.disposed||sb(t)}finally{Hi=n,t&&yc()}};Zo?.wrapResume(e,()=>[...Bi].map(e=>e.parentBlock))!==!0&&e()}finally{Vi=!1}}}function kb(e,t){if(e.pendingThenable===t)return;e.pendingThenable=t;let n=()=>{if(e.pendingThenable!==t)return;e.pendingThenable=null,e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null);let n=e.tryBlock;if(n!==null&&!n.disposed){let e=ub(n.parentBlock);if(e!==null){xb(e,zi.has(e)?`transition`:`urgent`,zi.has(e)?`update`:`retry`);return}}if(zi.has(e)){if(e.hiddenDom!==null){xb(e,`transition`);return}if(Bi.add(e),Bi.size<zi.size)return;Ob();return}e.branch===2&&(e.tryBlock===null||e.tryBlock.disposed)&&Hy(e),e.hiddenDom===null?sb(e):xb(e,`urgent`,`retry`)};t.then(n,n)}function Ab(e){jb(e)}function jb(e,t){li(),bi(),oi++;let n=gi,r=_i,i=n??r??xi(),a=n===null&&r===null;gi=i,t!==void 0&&(Mi(i,t),Ni(i));let o=zh;o!==null&&o.transitions++;let s;try{Qo(1);try{let t=On,n=We(()=>{let e=yi(i);return kn(e),e});try{s=e()}finally{kn(t),We(n)}s!=null&&typeof s.then==`function`&&(i.pendingActions++,_i=i),a&&(i.closed=!0,Di(i))}catch(e){throw a&&(i.closed=!0,Di(i)),e}finally{gi=n,oi--}}catch(e){Qo(-1),o!==null&&Hh(o),Gh(),i.workComplete=!0,Pi(i),Mb(e,t);return}if(s!=null&&typeof s.then==`function`){si++;let e=!1,n=()=>{e||(e=!0,i.pendingActions--,Di(i),Qo(-1),si--,o!==null&&Hh(o),Gh(),queueMicrotask(()=>{i.workComplete=!0,Pi(i)}))};s.then(n,e=>{n(),Mb(e,t)})}else queueMicrotask(()=>{Qo(-1),o!==null&&Hh(o),Gh(),i.workComplete=!0,Pi(i)})}function Mb(e,t){t!==void 0&&!t.block.disposed?(t.error={value:e},Cs(t.block)):Eh(e)}function Nb(e){e.parentBlock.disposed||e.branch!==0||(Ny(e,-1),e.err=null,e.hasResolved=!1,e.detachedRefs=null,Cs(e.parentBlock))}function Pb(e,t){if(!ud(t))return!1;if(T!==null)throw t;return zb(e,t),!0}function Fb(e,t,n=!1,r,i){if(ff(t))throw t;let a=jy(e);try{Ib(e,t,n,r,i)}catch(e){throw a!==null&&no(a.transaction),e}finally{My(a)}}function Ib(e,t,n,r,i){e.retrySignalOwners!==void 0&&cr(e),oy(e),Kl?.delete(e);let a=I();k_(e.stagedCapture),e.stagedCapture=null,e.stagedEffectDeps=null;let o=e.detachedRefs!==null;e.detachedRefs=null,e.transitionTimeoutId!==null&&(clearTimeout(e.transitionTimeoutId),e.transitionTimeoutId=null);let s=e.tryBlock,c=e.block;if(s){let t=null;if(o&&(t=[],nx(s,t)),Zy(e),e.tryBlock=null,ac(t,()=>{j(s)}),e.parentBlock.disposed||e.tryBlock!==null||e.block!==c)return}if(e.hiddenDom=null,e.block&&e.block!==s){let t=e.block;if(e.block=null,j(t),e.parentBlock.disposed||e.block!==null)return}else e.block=null;if(e.hasResolved=!1,e.pendingThenable=null,e.transitionHeld&&(e.transitionHeld=!1,Qo(-1),Ii(e)),wb(e),e.catchBody===null){if(T!==null)throw t;let n=Lb(e.parentBlock);n?n(t):console.error(`tryBlock with no catch arm received error:`,t);return}let l=a?.isRejection(t)===!0,u=l?t.reason:t;Ny(e,0),e.err=u;let d=r!==void 0&&i!==void 0,f=r??(M?.view(document)??document).createComment(`catch-b`),p=i??(M?.view(document)??document).createComment(`/catch-b`);d?a!==null&&(a.node=F(f)):(a!==null&&(a.isClose(e.end)&&(ax(F(e.start),e.end),a.node=e.end),a.markFresh(f),a.markFresh(p)),N(e.domParent).insertBefore(f,e.end),N(e.domParent).insertBefore(p,e.end));let m=Qc(`control-flow`,e.parentBlock,e.domParent,f,p,e.catchBody,{err:u,reset:()=>Nb(e)},e.env);m.idState=e.idState,e.block=m,d&&a!==null&&a.rootBlock.disposed&&a.rootBlock.startMarker===f&&a.rootBlock.endMarker===p&&(a.rootBlock=m);try{!d&&a!==null?a.suspend(()=>A(m)):A(m)}catch(n){if(Pb(m,n))return;let r=l&&Object.is(n,u),i=d&&r;e.block&&=(j(e.block,!i),null);let a=r?t:n;if(T!==null&&(r||Lb(e.parentBlock)!==null))throw a;let o=Lb(e.parentBlock);o?o(a):console.error(`catch body threw, no outer tryBlock:`,n)}finally{n&&Px(e)}}function Lb(e){let t=e,n=e;for(;n;){let e=n.$$tryHandler;if(e&&n.__trySlot?.catchBody!==null)return e;n=n.parentBlock}return Xu(t)}function Rb(e,t,n=null){if(ff(t))throw t;if($u(t)){let n=Yu(e);if(n!==null&&n.routeSuspense(t.thenable))return;t=Error(w(27))}if(ud(t)){let r=e;for(;r;){let n=r.__suspenseHandler;if(n){n(t.thenable,e);return}r=r.parentBlock}let i=Zu(e);if(i!==null){i(t.thenable);return}if(ao(e,t.thenable,n))return;throw t}let r=Lb(e);if(r)Mx(e,t,r(t));else throw t}function zb(e,t){try{Rb(e,t)}catch(t){if(T!==null||ai)throw t;let n=ry(e);Ix(e,t)||console.error(t),n.kind===`root`&&!n.disposed&&j(n)}}function Bb(e){for(let t=e;t!==null;t=t.parentBlock){let e=t.__trySlot;if(e!==void 0&&e.tryBlock===t&&e.pendingBody!==null&&e.hasResolved&&e.branch===1&&e.hiddenDom===null)return!0}return!1}function Vb(e,t,n,r=null){let i=0,a=e._slots;if(a!==null)for(let e=0;e<a.length;e++){let o=a[e];o.anchor===n&&(o.__kind===`ifBlockSlot`||o.__kind===`switchBlockSlot`||o.__kind===`componentSlotSlot`&&o.block?.parentNode===t)&&(i++,r!==null&&(O(o,`anchor`,o.anchor),o.anchor=r))}let o=e.children;if(o!==null)for(let a=0;a<o.length;a++){let s=o[a].scope,c=s.block;c!==e.block&&c.parentNode===t&&c.endMarker===n&&(i+=Vb(s,t,n,r)||1,r!==null&&(O(c,`endMarker`,c.endMarker),c.endMarker=r))}return i}function Hb(e,t,n,r,i,a){if(e.markerlessBefore=void 0,e.borrowed&&e.start===null)return;let o=i?F(i):P(t),s=a?(M?.view(a)??a).previousSibling:(M?.view(t)??t).lastChild;if(s!==null&&o===s&&o.nodeType===1&&Vb(n,t,a)<=1)n.startMarker=o,n.endMarker=o,e.end=o;else{let i=(M?.view(document)??document).createComment(r),s=(M?.view(document)??document).createComment(`/`+r);(M?.view(t)??t).insertBefore(i,o??a),(M?.view(t)??t).insertBefore(s,a),n.startMarker=i,n.endMarker=s,n.exclusiveMarkers=!0,e.start=i,e.end=s,Vb(n,t,a,s)}}function Ub(e,t,n,r,i){if(t===null||n===null)return;let a=e;for(;a!==null&&a.startMarker===t&&a.endMarker===n;)O(a,`startMarker`,a.startMarker),O(a,`endMarker`,a.endMarker),a.startMarker=r,a.endMarker=i,a=a.parentBlock}function Wb(e,t,n){return e!==null&&t!==null&&n!==null&&e.startMarker===t&&e.endMarker===n}function Gb(e,t,n,r,i,a,o,s){if(T?.pending&&!T.crossRenderUpdate)return;let c=e.block,l=I();if(i!==n.branch){if(D!==null&&(n.branch!==-1||l!==null)){let e=n.block;if(n.markerlessBefore!==void 0&&e!==null)Wa(n,r,n.markerlessBefore,e.endMarker);else if(n.start!==null)Wa(n,r,n.borrowed?n.start:N(n.start).previousSibling,n.borrowed?n.end:N(n.end)?.nextSibling??null);else if(n.borrowed&&e?.startMarker==null)Wa(n,r,null,null);else{let t=e?.startMarker??null,i=e?.endMarker??null;if(t!==null&&i!==null&&(M?.view(t)??t).parentNode===r&&(M?.view(i)??i).parentNode===r)Wa(n,r,(M?.view(t)??t).previousSibling,F(i));else{let e=n.anchor;Wa(n,r,e===null?(M?.view(r)??r).lastChild:(M?.view(e)??e).previousSibling,e)}}}let u=ci,d=c.currentRenderMode===`transition`,f=u!==null&&n.block!==null&&n.block.mounted&&n.markerlessBefore===void 0&&a!==null&&l===null&&Bb(c),p=D===null||f?u:null,m=!d&&f,h=null,g=n.markerlessBefore;if(g!==void 0&&n.block!==null){let e=n.block;h=e.endMarker;let t=g?F(g):P(r);if(n.block=null,n.markerlessBefore=void 0,j(e,!1),c.disposed)return;for(;t!==null&&t!==h;){let e=F(t);(M?.view(t)??t).parentNode===r&&(M?.view(r)??r).removeChild(t),t=e}}let _=h===null&&n.start===null&&n.block!==null&&n.block.endMarker!==null?n.block.endMarker:n.end,v=D;if(v!==null&&!f&&l===null&&n.block!==null&&n.block.mounted&&!Qa(v,n.block)){let l=n.block,u=l.startMarker,d=l.endMarker,f=n.borrowed,p=f?n.start===null?P(r):F(n.start):n.start??u;f&&p===n.end&&(p=null);let m=f?p===null?null:n.end===null?(M?.view(r)??r).lastChild:N(n.end).previousSibling:_;if(a===null){if(n.start!==null)p=F(n.start),p===n.end&&(p=null),m=p===null?null:N(n.end).previousSibling;else{let e=m===null?n.anchor:F(m);if(Wb(c,u,d)){let t=(M?.view(document)??document).createComment(o),i=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(t,e),(M?.view(r)??r).insertBefore(i,e),n.start=t,n.end=i,n.borrowed=!1,Ub(c,u,d,t,i)}else n.anchor=e,n.end=null}n.block=null,n.branch=i,Ya(l,r,p,m);return}let h=p===null?f?n.start:null:m;if(h!==null&&(M?.view(h)??h).parentNode===r){let g=E_(c,r,h,a,void 0,null,`control-flow`,s,!1,void 0,c.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:n.__kind,branch:i,component:void 0,key:void 0});if(g.suspended||g.failed)throw M_(g.wip),g.suspended===null?g.error:new ld(g.suspended);N(g.wip.start).data=o,N(g.wip.end).data=`/`+o,n.start=g.wip.start,n.end=g.wip.end,n.borrowed=!1,n.block=g.wip.block,n.branch=i,f||Ub(c,u,d,g.wip.start,g.wip.end),O(g.wip.block,`exclusiveMarkers`,g.wip.block.exclusiveMarkers),g.wip.block.exclusiveMarkers=!0,O_(g.wip),Ya(l,r,p,m);return}}if(p!==null&&n.block!==null&&a!==null&&l===null&&(d||m)&&_!==null){let l=n.block,u=l.startMarker,d=l.endMarker,f=p.render(c,r,_,a,void 0,null,`control-flow`,s,!1,void 0,c.idState.renderOwner?.signalOwner===void 0?void 0:{parent:e,slot:t,kind:n.__kind,branch:i,component:void 0,key:void 0});if(f.suspended||f.failed)throw p.dispose(f.wip),f.failed?f.error:new ld(f.suspended);if(n.borrowed)p.dispose(f.wip);else{N(f.wip.start).data=o,N(f.wip.end).data=`/`+o;let e=n.start,t=n.end,r=n.block;n.start=f.wip.start,n.end=f.wip.end,n.block=f.wip.block,n.branch=i,Ub(c,u,d,f.wip.start,f.wip.end),f.wip.block.exclusiveMarkers=!0,p.splice(f.wip),j(r),e!==null&&((M?.view(e)??e).remove(),(M?.view(t)??t)?.remove()),c.disposed||n.block!==f.wip.block||f.wip.block.disposed;return}}let y=h??(_===null?n.anchor:F(_)),b=n.block,x=b?.startMarker??null,S=b?.endMarker??null,C=Wb(c,x,S);if(n.block){if(j(n.block),c.disposed)return;n.block=null}if(n.branch=i,n.start===null&&a!==null&&C){let e=(M?.view(document)??document).createComment(o),t=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(e,y),(M?.view(r)??r).insertBefore(t,y),n.start=e,n.end=t,Ub(c,x,S,e,t)}if(n.start!==null){if(a){let e,t,i=!1,o=!1,u=null,d=null;if(l!==null&&l.isOpen(F(n.start))&&(u=F(n.start),d=l.close(u),d!==n.end&&F(d)!==n.end)){if(lf?.revision!==void 0)throw Error(w(75));ax(F(n.start),n.end),u=null,o=!0}u===null?(e=n.start,t=n.end,i=!0,l!==null&&(l.node=F(n.start))):(e=u,t=d,l.node=F(u));let f=Qc(`control-flow`,c,r,e,t,a,void 0,s);i&&(f.exclusiveMarkers=!0),n.block=f,o?(l.suspend(()=>A(f)),l.node=F(n.end)):A(f)}else if(l!==null&&F(n.start)!==n.end){if(lf?.revision!==void 0)throw Error(w(75));ax(F(n.start),n.end)}}else if(a){let e=y?(M?.view(y)??y).previousSibling:(M?.view(r)??r).lastChild,t=Qc(`control-flow`,c,r,null,y,a,void 0,s);n.block=t,n.markerlessBefore=e,A(t),Hb(n,r,t,o,e,y),Ub(c,x,S,t.startMarker,t.endMarker)}else if(!C)n.anchor=y,n.end=null;else{let e=(M?.view(document)??document).createComment(o),t=(M?.view(document)??document).createComment(`/`+o);(M?.view(r)??r).insertBefore(e,y),(M?.view(r)??r).insertBefore(t,y),n.start=e,n.end=t,Ub(c,x,S,e,t)}}else if(n.block){n.block.body!==a&&O(n.block,`body`,n.block.body),n.block.extra!==s&&O(n.block,`extra`,n.block.extra),n.block.body=a,n.block.extra=s,A(n.block);let e=n.markerlessBefore;e!==void 0&&Hb(n,r,n.block,o,e,n.block.endMarker)}l!==null&&!n.borrowed&&n.end!==null&&(l.node=F(n.end))}function Kb(e,t,n,r,i,a,o,s){let c=e.slots[t];if(t===0&&e!==cl&&c?.returnedOutput===!0){if(T?.pending&&!T.crossRenderUpdate)return;if(c.__kind===`ifBlockSlot`)ll(c,!1);else{let t=e.block;if(t.outputHandler(t,null,!0),t.disposed)return;c=void 0}}if(c===void 0){let r=I(),i=null,a=null,s=r?.passthroughRanges===!0,l=s?null:r?.resolveOpen(o??null,n)??null;l!==null&&(i=l,a=r.close(l)),c={__kind:`ifBlockSlot`,anchor:o??null,start:i,end:a,borrowed:s,branch:-1,block:null,markerlessBefore:void 0},e.slots[t]=c,xl(e,c)}let l=+!!r;Gb(e,t,c,n,l,l?i:a,`if`,s)}var qb=null;function Jb(e,t){let n=F(e.startMarker);for(;n!==null&&n!==e.endMarker;){let e=n.$$portalEnd;if(e!==void 0){n=hv(n,e);continue}if(n.nodeType===1){let e=n;t.nextDisplays.has(e)||(t.nextDisplays.add(e),t.displays.has(e)?xy(e):(vy(e),Ty(e,!0)))}else if(n.nodeType===3){let e=n;t.nextTexts.has(e)||(t.nextTexts.add(e),t.texts.has(e)||(vy(e),Oy(e)),Dy(e))}n=F(n)}}function Yb(e){let t=e.block;if(!t)return;let n=e.hiddenDom??={displays:new Set,texts:new Set,nextDisplays:new Set,nextTexts:new Set};if(e.fragmentVisibilityCleanupRegistered||(e.fragmentVisibilityCleanupRegistered=!0,(t.cleanups??=[]).push(()=>Zb(e,!1))),Jb(t,n),e.portals!==null)for(let t of e.portals)t.disposed||Jb(t,n);for(let e of n.displays)n.nextDisplays.has(e)||(yy(e),Ey(e,!0));for(let e of n.texts)n.nextTexts.has(e)||(yy(e),ky(e));let r=n.displays,i=n.texts;n.displays=n.nextDisplays,n.texts=n.nextTexts,n.nextDisplays=r,n.nextTexts=i,r.clear(),i.clear()}function Xb(e){let t=e.block;t===null||!e.hidden||e.deactivationPending||dc(t)||Yb(e)}function Zb(e,t){t||Kl?.delete(e);let n=e.hiddenDom;if(n!==null){for(let e of n.displays)yy(e),Ey(e,!0,t);n.displays.clear();for(let e of n.texts)yy(e),ky(e,t);n.texts.clear()}}function Qb(e,t){if(e.pendingThenable===t)return;e.pendingThenable=t;let n=e.block,r=()=>{e.pendingThenable===t&&e.hidden&&!dc(n)&&Cs(n)};t.then(r,r)}function $b(e,t=!1,n=e.block){let r=md;t&&(md=!0);let i=(k===null?ns:k.effects)[$o],a=i.length,o=e.hasInsertionEffects?fb(n,$o):null;try{e.pendingInsertions===null?A(n):yb(n,k,e.pendingInsertions),e.pendingThenable=null,e.pendingInsertions=null}catch(t){if(!ud(t))throw t;for(let r=n;r!==null&&r!==e.block;r=r.parentBlock)if(r.__suspenseHandler)throw t;let r=null;if(i.length>a){let t=new Map;for(let e=a;e<i.length;e++){let n=i[e],a=n.scope.hooks?.get(n.slot);if(a?.effect!==!0||(mb!==null&&(r??=new Set).add(a),a.revision!==n.revision||dc(n.scope.block)))continue;let o=t.get(a);o===void 0?t.set(a,[n]):o.push(n)}i.length=a;for(let e of t.keys())hb(e);if(e.pendingInsertions===null)e.pendingInsertions=t.size===0?null:t;else for(let[n,r]of t)e.pendingInsertions.set(n,r)}(o!==null||e.pendingInsertions!==null)&&pb(n,o??new Map,$o),r!==null&&_b(r,$o,i),Qb(e,t.thenable)}finally{md=r}}function ex(e,t,n=!0){let r=e.children;if(r!==null)for(let e=0,n=r.length;e<n;e++)t(r[e].scope);let i=e._slots;if(i!==null)for(let e=0,r=i.length;e<r;e++){let r=i[e];if(r.__kind===`forBlockSlot`){for(let e=r.head;e!==null;e=e.nextSibling)t(e);r.emptyBlock&&t(r.emptyBlock)}else if(r.__kind===`childSlot`){if(r.block&&t(r.block),r.forSlot){for(let e=r.forSlot.head;e!==null;e=e.nextSibling)t(e);r.forSlot.emptyBlock&&t(r.forSlot.emptyBlock)}r.portal?.block&&t(r.portal.block)}else r.block&&(t(r.block),n&&r.__kind===`trySlotSlot`&&r.tryBlock&&r.tryBlock!==r.block&&t(r.tryBlock))}}function tx(e,t,n=!0,r=!0,i=null,a=null){let o=e.deoptNode;o!=null&&rx(o,t,n,e,i,a);let s=e.refFields;if(s!==null){let r=e.slots[0];if(r!=null)for(let o=0,c=s.length;o<c;o+=3){let c=s[o];if(c===`r`){let c=r[s[o+2]],l=r[s[o+1]]??a?.get(c)?.connected;if(l==null)continue;t.push({ref:l,el:c,scope:e}),n&&!fc(i,c,l)&&fp(l,null,c)}else if(c===`s`){let c=r[s[o+2]];if(c==null)continue;let l=r[s[o+1]],u=(l?.[nm]===!0?l.resolved:l)?.ref??a?.get(c)?.connected;if(u==null)continue;t.push({ref:u,el:c,scope:e}),n&&!fc(i,c,u)&&fp(u,null,c)}else{let c=r[s[o+1]];if(c==null)continue;let l=c._currentRef??a?.get(c)?.connected;if(l==null)continue;t.push({ref:l,el:c,scope:e}),n&&!fc(i,c,l)&&fp(l,null,c)}}}let c=e.slots;for(let r=0,o=c.length;r<o;r++){let o=c[r];if(typeof o==`object`&&o){if(o.anchor!==void 0&&o.el instanceof Element){let r=o.ref??a?.get(o.el)?.connected;r!=null&&(t.push({ref:r,el:o.el,scope:e}),n&&!fc(i,o.el,r)&&fp(r,null,o.el))}o.__kind===`childSlot`&&o.hostNode!=null&&rx(o.hostNode,t,n,e,i,a)}}ex(e,e=>tx(e,t,n,r,i,a),r)}function nx(e,t,n=null){tx(e,t,!1,!1,null,n)}function rx(e,t,n=!0,r,i=null,a=null){if(!z_)return;let o=Y_(e)?.props?.ref??a?.get(e)?.connected;o!=null&&(t===null?tc(o,e):(t.push({ref:o,el:e,scope:r}),n&&!fc(i,e,o)&&fp(o,null,e)));let s=P(e);for(;s!==null;){let e=s.$$portalEnd;if(e!=null){s=hv(s,e);continue}rx(s,t,n,r,i,a),s=F(s)}}function ix(e,t=!0){let n=e.effectSlots;if(n!==null)for(let r=0;r<n.length;r++){let i=n[r];if(i.phase===$o||!t&&i.phase===ts&&i.connectedFn!==null)continue;let a=gc!==null&&hc.stageDeactivation(i,e)===!0;if(typeof i.cleanup==`function`){let t=i.cleanup;i.cleanup=void 0;try{a||ei(t,i.phase,e)}catch(t){if(t instanceof xs)throw t;let n=Lb(e.block);n===null?console.error(t):n(t)}}i.deps=void 0,i.connectedFn!==null&&(i.disconnected=!0)}ex(e,e=>ix(e,t))}function ax(e,t){let n=e;for(;n!==null&&n!==t;){let e=F(n);(M?.view(n)??n).remove(),n=e}}function ox(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function sx(e,t,n){if(E===null&&Yn===null){t(e.props,e,n);return}let r=Ir;Ir=e;let i=Yn===null?-1:Sr(e);try{t(e.props,e,n)}finally{i>=0&&Yn.endScope(i),Ir=r}}var cx=4,lx=new Int32Array(cx),ux=16384,dx=null,fx=null;function px(e,t,n,r,i,a,o,s){let c=D!==null&&!Ra;c&&e.itemIndex!==n&&O(e,`itemIndex`,e.itemIndex),c&&e.body!==r&&O(e,`body`,e.body),i&&e.props===t&&(o||e.itemIndex===n)?(e.itemIndex=n,e.body=r):(c&&(e.props!==t||e.extra!==s)&&E.push(Da,e,e.props,e.extra),e.props=t,e.body=r,e.itemIndex=n,e.extra=s,a?sx(e,r,s):A(e))}function mx(e,t,n,r){return typeof e==`function`?r?`k`+String(e(t,n)):e(t,n):e[n]}function hx(e,t,n,r,i,a,o,s=!1,c=!1){let l=n.length,u=e.idState.renderOwner?.signalOwner===void 0?void 0:fr(e,t,l,r);if(l===0)return;E!==null&&zo(t);let d=t.items,f=N(t.end).parentNode,p=t.adopt,m=null,h=null;if(p!==null){m=new Map;for(let e=0;e<p.length;e++){let t=p[e];m.has(t.key)||m.set(t.key,t)}}let g=null;try{for(let p=0;p<l;p++){let l=n[p],_=mx(r,l,p,s);u!==void 0&&u(p,_);let v=null,y=t.end;if(m!==null){y=F(g===null?t.start:g.endMarker);let e=m.get(_);e!==void 0&&(v=e.node,m.delete(_),(h??=new Set).add(v),v!==y&&(Vs===null?(M?.view(f)??f).insertBefore(v,y):(qs(f,Vs),Ex(f,v,y,Vs))))}let b=c?gx(e,f,y,l,p,_,i,t):Cx(e,f,y,l,p,_,i,t,a,o,v);d.set(_,b),b.prevSibling=g,b.nextSibling=null,g?g.nextSibling=b:t.head=b,g=b}t.tail=g,t.size=l}catch(e){for(;g!==null;){let t=g;g=t.prevSibling,d.delete(t.key);let n=c?t.startMarker:null,r=c?t.endMarker:null,i=c&&!ud(e)&&!$u(e)&&!ff(e);i&&n!==null&&N(n).parentNode!==null&&Ka(N(n).parentNode),ud(e)&&Dd(t),t.idState.renderOwner?.signalOwner===void 0?j(t,!D?.retainedCreated?.has(t)):lr(t,e),n!==null&&r!==null&&_x(n,r,i)}throw t.head=null,t.tail=null,t.size=0,e}if(m!==null){let e=0;for(let t=0;t<p.length;t++){let n=p[t];h?.has(n.node)||(p[e++]=n)}p.length=e}}function gx(e,t,n,r,i,a,o,s){let c=I(),l=c.node,u=l!==null&&N(l).parentNode===t?l:n,d=(M?.view(document)??document).createComment(`it`),f=(M?.view(document)??document).createComment(`/it`);(M?.view(t)??t).insertBefore(d,u),(M?.view(t)??t).insertBefore(f,n),E!==null&&Ua(()=>{(M?.view(d)??d).remove(),(M?.view(f)??f).remove()});let p=Qc(`control-flow`,e,t,d,f,o,r,s.env);p.forSlot=s,p.key=a,p.itemIndex=i,to(p);let m=l===null||l===n||c.isFresh(l),h=c.passthroughRanges;c.passthroughRanges=!0;try{m?c.suspend(()=>A(p)):A(p)}catch(e){ud(e)&&Dd(p);let n=h&&!c.passthroughRanges&&!ud(e)&&!$u(e)&&!ff(e);throw n&&Ka(t),j(p,!1),_x(d,f,n),e}finally{c.passthroughRanges=h&&c.passthroughRanges}let g=c.node;if((M?.view(t)??t).insertBefore(f,g!==null&&N(g).parentNode===t?g:n),c.node=F(f),c.markFresh(d),c.markFresh(f),m)for(let e=F(d);e!==null&&e!==f;e=F(e))c.markFresh(e);return p}function _x(e,t,n){if(!n){(M?.view(e)??e).remove(),(M?.view(t)??t).remove();return}for(let n=e;n!==null;){let e=F(n);if(Xd(n)||(M?.view(n)??n).remove(),n===t)break;n=e}}function vx(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=!1){let d=t.items,f=t.size,p=n.length,m=N(t.end).parentNode,h=E!==null;if(f===0){hx(e,t,n,r,i,o,l,u);return}let g=e.idState.renderOwner?.signalOwner===void 0?void 0:fr(e,t,p,r);if(p===0){let e=h&&bx(t);e&&(ka.get(t)??-1)<Aa?Bo(t):h&&zo(t),Sx(t,e?t.items:d,e),t.head=null,t.tail=null,t.size=0;return}let _=t.head,v=0;for(;_!==null&&v<p;){let e=n[v],o=mx(r,e,v,u);if(_.key!==o)break;g!==void 0&&g(v,o);let l=_;(!a||l.props!==e||l.body!==i||l.itemIndex!==v)&&px(l,e,v,i,a,s,c,t.env),_=l.nextSibling,v++}if(v===p&&_===null)return;let y=t.tail,b=p-1,x=f-v;for(;y!==null&&x>0&&b>=v;){let e=n[b],o=mx(r,e,b,u);if(y.key!==o)break;g!==void 0&&g(b,o);let l=y;(!a||l.props!==e||l.body!==i||l.itemIndex!==b)&&px(l,e,b,i,a,s,c,t.env),y=l.prevSibling,b--,x--}let S,C;if(x===0?(C=_,S=C?C.prevSibling:t.tail):(S=_.prevSibling,C=y.nextSibling),x===0){h&&zo(t);let a=C?C.startMarker:t.end,s=S;for(let c=v;c<=b;c++){let f=n[c],p=mx(r,f,c,u);g!==void 0&&g(c,p);let h=Cx(e,m,a,f,c,p,i,t,o,l);d.set(p,h),h.prevSibling=s,h.nextSibling=C,s?s.nextSibling=h:t.head=h,s=h}C?C.prevSibling=s:t.tail=s,t.size+=b-v+1;return}if(v>b){h&&zo(t);let e=_,n=0;for(;e!==C;){let t=e.nextSibling;Lo()?Io(e):j(e),d.delete(e.key),e=t,n++}S?S.nextSibling=C:t.head=C,C?C.prevSibling=S:t.tail=S,t.size-=n;return}let ee=b-v+1,te=[],ne=new Map;for(let e=0;e<ee;e++){let t=mx(r,n[v+e],v+e,u);te[e]=t,ne.set(t,e),g!==void 0&&g(v+e,t)}if(S===null&&C===null&&!ne.has(_.key)){let r=!1,a=_.nextSibling;for(;a!==null;){if(ne.has(a.key)){r=!0;break}a=a.nextSibling}if(!r){h&&zo(t),Sx(t,d),t.head=null,t.tail=null,t.size=0;let r=null;for(let a=0;a<p;a++){let s=n[a],c=te[a],u=Cx(e,m,t.end,s,a,c,i,t,o,l);d.set(c,u),u.prevSibling=r,u.nextSibling=null,r?r.nextSibling=u:t.head=u,r=u}t.tail=r,t.size=p;return}}let re=dx,ie;re!==null&&re.length>=ee?(dx=null,ie=re):ie=new Int32Array(ee);try{for(let e=0;e<ee;e++)ie[e]=-1;let r=!1,u=0,f=0,p=_,g=0;for(;p!==C;){let e=p.nextSibling,o=ne.get(p.key);if(o===void 0)h&&=(zo(t),!1),Lo()?Io(p):j(p),d.delete(p.key),t.size--;else{ie[o]=g,o<u?r=!0:u=o,f++;let e=v+o,l=n[e];(!a||p.props!==l||p.body!==i||p.itemIndex!==e)&&px(p,l,e,i,a,s,c,t.env)}p=e,g++}if(!r&&f===ee){if(x!==f){let e=S;for(let n=0;n<ee;n++){let r=d.get(te[n]);r.prevSibling=e,e?e.nextSibling=r:t.head=r,e=r}e.nextSibling=C,C?C.prevSibling=e:t.tail=e}return}if(h&&zo(t),r&&f===ee){let e=0;for(let t=0;t<ee;t++)if(ie[t]!==t){if(e===cx){e=5;break}lx[e++]=t}if(e<=cx){let n=C?C.startMarker:t.end;for(let t=e-1;t>=0;t--){let e=lx[t];wx(d.get(te[e]),e+1<ee?d.get(te[e+1]).startMarker:n)}for(let n=0;n<e;n++){let e=lx[n],r=d.get(te[e]),i=e>0?d.get(te[e-1]):S,a=e+1<ee?d.get(te[e+1]):C;r.prevSibling=i,r.nextSibling=a,i?i.nextSibling=r:t.head=r,a?a.prevSibling=r:t.tail=r}let r=d.get(te[0]),i=d.get(te[ee-1]);r.prevSibling=S,i.nextSibling=C,S?S.nextSibling=r:t.head=r,C?C.prevSibling=i:t.tail=i;return}}let y=C?C.startMarker:t.end;if(f===ee){let e=Dx(ie,ee),n=e.length-1,r=C;for(let i=ee-1;i>=0;i--){let a=d.get(te[i]);n<0||i!==e[n]?wx(a,r?r.startMarker:y):n--,a.nextSibling=r,r?r.prevSibling=a:t.tail=a,r=a}r.prevSibling=S,S?S.nextSibling=r:t.head=r;return}if(r){let e=Dx(ie,ee),t=e.length-1,n=y;for(let r=ee-1;r>=0;r--){if(ie[r]===-1)continue;let i=d.get(te[r]);t<0||r!==e[t]?wx(i,n):t--,n=i.startMarker}}let b=S,re=0;for(let r=0;r<ee;r++){let a=te[r],s;if(ie[r]===-1){if(re<=r)for(re=r+1;re<ee&&ie[re]===-1;)re++;let c=re<ee?d.get(te[re]).startMarker:y,u=r+v;s=Cx(e,m,c,n[u],u,a,i,t,o,l),d.set(a,s),t.size++}else s=d.get(a);s.prevSibling=b,b?b.nextSibling=s:t.head=s,b=s}b.nextSibling=C,C?C.prevSibling=b:t.tail=b}finally{ie.length<=ux&&(dx===null||dx.length<ie.length)&&(dx=ie)}}var yx=512;function bx(e){let t=D,n=N(e.start).parentNode;if(t===null||t.aborted||Ra||t.hydrating===!0||e.adopt!==null||e.size<16||n===null||n.nodeType!==1&&n.nodeType!==11||N(e.end).parentNode!==n||N(e.start).previousSibling!==null||F(e.end)!==null)return!1;let r=e.head;for(let e=r;e!==null;e=e.nextSibling)if(!e.mounted||e.idState.renderOwner!==t.owner||e.startMarker===null||e.startMarker!==e.endMarker||e.hooks!==null||e.effectSlots!==null||e.cleanups!==null||e.children!==null||e._slots!==null||e.refFields!==null||e.deoptNode!==null||e.vt!==null)return!1;return!0}function xx(e,t=!1){if(!t&&!bx(e))return!1;let n=D,r=N(e.start).parentNode,i=e.head,a=n.retired??=new Set,o=[];for(let e=i;e!==null;e=e.nextSibling)a.has(e)||(a.add(e),o.push(e)),e.pending&&(O(e,`pending`,e.pending),e.pending=!1);let s=!1;Ua(()=>{s=!0;for(let e=0;e<o.length;e++)a.delete(o[e])});let c=e.start,l=e.end;return(n.commit??=[]).push(()=>{if(s)return;let t=e.size===0&&(M?.view(c)??c).parentNode===r&&(M?.view(l)??l).parentNode===r&&(M?.view(c)??c).previousSibling===null&&F(l)===null;if(t){let e=F(c);for(let n=i;n!==null;n=n.nextSibling){if(e!==n.startMarker){t=!1;break}e=F(e)}e!==l&&(t=!1)}for(let e=i;e!==null;e=e.nextSibling)e.disposed=!0;if(t)(M?.view(r)??r).textContent=``,(M?.view(r)??r).appendChild(c),(M?.view(r)??r).appendChild(l);else for(let e=i;e!==null;e=e.nextSibling){let t=e.startMarker;(M?.view(t)??t).parentNode!==null&&N((M?.view(t)??t).parentNode).removeChild(t)}}),!0}function Sx(e,t,n=!1){if(Ro(e)){if(xx(e,n)){t.clear();return}let r;for(let t=e.head;t!==null;t=r)r=t.nextSibling,Io(t);t.clear();return}let r=N(e.start).parentNode;if(N(e.start).previousSibling===null&&F(e.end)===null)(M?.view(r)??r).textContent=``,(M?.view(r)??r).appendChild(e.start),(M?.view(r)??r).appendChild(e.end);else if(t.size<yx)ax(F(e.start),e.end);else if(M!==null)M.clearBetween(e.start,e.end);else{let t=document.createRange();t.setStartAfter(e.start),t.setEndBefore(e.end),t.deleteContents()}for(let t=e.head;t!==null;t=t.nextSibling)t.cleanups!==null||t.children!==null||t._slots!==null?j(t,!1):(t.deoptNode!==null&&t.deoptRefs&&rx(t.deoptNode,null),t.disposed=!0);t.clear()}function Cx(e,t,n,r,i,a,o,s,c,l,u=null){let d=I();if(d!==null){if(l&&!d.isOpen(d.node)&&(c!==2||s.plainDeopt!==!0||__(r)&&!yv(r))){if(d.node!==null&&d.node!==s.end&&(c!==2||s.plainDeopt!==!0||d.node.nodeType===1&&N(d.node).parentNode===t)){let n=d.node,l=Qc(`control-flow`,e,t,n,n,o,r,s.env);return l.forSlot=s,l.key=a,l.itemIndex=i,c===2&&s.plainDeopt===!0&&(l.deoptNode=n),A(l),d.node=N(l.endMarker)?.nextSibling??F(n),l}return d.suspend(()=>Cx(e,t,n,r,i,a,o,s,c,l))}if(!d.isOpen(d.node))return d.suspend(()=>Cx(e,t,n,r,i,a,o,s,c,l));let u=d.node,f=d.close(u);d.node=F(u);let p=Qc(`control-flow`,e,t,u,f,o,r,s.env);return p.forSlot=s,p.key=a,p.itemIndex=i,A(p),d.node=F(f),p}if(c===!0||c===2&&__(r)&&!yv(r)){if(u!==null){let n=Qc(`control-flow`,e,t,u,u,o,r,s.env);return n.forSlot=s,n.key=a,n.itemIndex=i,n.deoptNode=u,to(n),A(n),n}let c=Qc(`control-flow`,e,t,null,n,o,r,s.env);c.forSlot=s,c.key=a,c.itemIndex=i,A(c);let l=(M?.view(n)??n).previousSibling;return c.startMarker=l,c.endMarker=l,c}let f=(M?.view(document)??document).createComment(`it`),p=(M?.view(document)??document).createComment(`/it`);u===null?((M?.view(t)??t).insertBefore(f,n),(M?.view(t)??t).insertBefore(p,n)):((M?.view(t)??t).insertBefore(f,u),(M?.view(t)??t).insertBefore(p,F(u)));let m=Qc(`control-flow`,e,t,f,p,o,r,s.env);m.forSlot=s,m.key=a,m.itemIndex=i,u!==null&&(m.deoptNode=u,to(m));try{A(m)}catch(e){throw ud(e)&&Dd(m),j(m,!D?.retainedCreated?.has(m)),e}return m}function wx(e,t){let n=N(e.startMarker).parentNode,r=e.endMarker,i=e.startMarker;if(Vs!==null){qs(n,Vs),Tx(n,i,r,t,Vs);return}for(;i;){let e=i===r,a=F(i);if((M?.view(n)??n).insertBefore(i,t),e)break;i=a}}function Tx(e,t,n,r,i){let a=t;for(;a!==null;){let t=a===n,o=F(a);if(Ex(e,a,r,i),t)break;a=o}}function Ex(e,t,n,r){let i=null;if(Array.isArray(r)){for(let e=0;e<r.length;e++)if(r[e].focused.ownerDocument===t.ownerDocument){i=r[e];break}}else r.focused.ownerDocument===t.ownerDocument&&(i=r);if(M===null){vn(e,t,n,i?.focused??null,i?.contentEditable??!1);return}let a=i?.focused??null,o=t===a;if(!o&&a!==null&&t.nodeType===1){let e=a;do{if(M.view(t).contains(e)){o=!0;break}e=M.view(e).getRootNode().host}while(e!==void 0)}if(!o){(M?.view(e)??e).insertBefore(t,n);return}let s=(M?.view(e)??e).moveBefore;if(!i.contentEditable&&typeof s==`function`){s.call(e,t,n);return}if(M.view(t).parentNode!==e||n!==null&&M.view(n).parentNode!==e){M.view(e).insertBefore(t,n);return}if(t!==n&&F(t)!==n){if(n===null||((M?.view(t)??t).compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0){let r=F(t);for(;r!==n;){let n=F(r);(M?.view(e)??e).insertBefore(r,t),r=n}}else{let r=F(t),i=n;for(;i!==t;){let t=F(i);(M?.view(e)??e).insertBefore(i,r),i=t}}}}function Dx(e,t){let n=fx;(n===null||n.length<t)&&(n=new Int32Array(t),t<=ux&&(fx=n));let r=[];for(let i=0;i<t;i++){let t=e[i];if(t===-1)continue;if(r.length===0||e[r[r.length-1]]<t){n[i]=r.length===0?-1:r[r.length-1],r.push(i);continue}let a=0,o=r.length-1;for(;a<o;){let n=a+o>>1;e[r[n]]<t?a=n+1:o=n}t<e[r[a]]&&(n[i]=a>0?r[a-1]:-1,r[a]=i)}let i=r.length,a=r[i-1];for(;i-->0;)r[i]=a,a=n[a];return r}var Ox=null;function kx(e,t){if(t===void 0)return;let{onCaughtError:n,onUncaughtError:r,onRecoverableError:i}=t;(n!==void 0||r!==void 0||i!==void 0)&&(Ox??=new WeakMap).set(e,{onCaughtError:n,onUncaughtError:r,onRecoverableError:i})}function Ax(e){if(Ox===null||e===null)return null;let t=e;for(;t.parentBlock!==null;)t=t.parentBlock;return Ox.get(t)??null}function jx(e,t){try{e(t)}catch(e){console.error(e)}}function Mx(e,t,n){let r=Ax(e)?.onCaughtError;if(!(r===void 0||n===null||n?.disposed)){if(n!==void 0){let e=ub(n);if(e!==null){let i=()=>{if(n.disposed)return;let e=ub(n);if(e!==null){ql(e,i);return}jx(r,t)};ql(e,i);return}}jx(r,t)}}function Nx(e){let t=lb(e,!0);if(t!==null)return t;for(let t=mb;t!==null;t=t.parent){let n=t.root;if(n!==e&&!Tc(n,e))continue;let r=n.__trySlot;if(r!==void 0&&r.tryBlock===n)return r;let i=n.__activitySlot;if(i!==void 0&&i.block===n)return i}if(!e.mounted)for(let t=e.parentBlock;t!==null;t=t.parentBlock){let e=t.__trySlot;if(e!==void 0&&e.tryBlock===t&&!e.propagateSuspense)return e}return null}function Px(e){if(Ox===null||e.branch!==0)return;let t=e.block;if(t===null)return;let n=Ax(t)?.onCaughtError;if(n===void 0)return;let r=e.err,i=null,a=!1,o=s=>{if(i=null,t.disposed||e.block!==t)return;let c=s??lb(t,!0);if(c!==null){a||(a=!0,(t.cleanups??=[]).push(()=>{let e=i;i=null,e!==null&&Yl(e.owner,e.entry)})),i={owner:c,entry:ql(c,o)};return}return{state:e,block:t,error:r,handler:n,resume:o}},s=Nx(t);s===null?nl(o):o(s)}function Fx(e){for(let t=0;t<e.length;t++){let n=e[t];if(!(n.block.disposed||n.state.block!==n.block)){if(lb(n.block,!0)!==null){n.resume();continue}jx(n.handler,n.error)}}}function Ix(e,t){let n=Ax(e)?.onUncaughtError;return n!==void 0&&(jx(n,t),!0)}var Lx=null;function Rx(e,t=null){if(Ox===null)return;let n=t??T,r=Ax(n)?.onRecoverableError;if(r===void 0)return;let i=n;for(;i.parentBlock!==null;)i=i.parentBlock;let a=Lx??=new WeakSet;a.has(i)||(a.add(i),queueMicrotask(()=>{a.delete(i),jx(r,e())}))}var zx=null,Bx=(e=>e===void 0?null:e);function Vx(e){if(typeof e!=`object`||!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(w(63))}function Hx(e){if(e.nodeType!==9){(M?.view(e)??e).textContent=``;return}for(let t=P(e);t!==null;){let n=F(t);t.nodeType!==10&&(M?.view(e)??e).removeChild(t),t=n}}function Ux(e){return null}function Wx(e,t){t!==null&&t===void 0&&zx.delete(e)}function Gx(e){if(!g_(e))return e}function Kx(e,t,n,r,i,a,o,s,c){let l,u=!1,d=-1,f=0,p=e=>{let n=!1;Gr.set(e,()=>{if(!(n||t!==e)){n=!0;try{l.unmount()}finally{n=!1}}})},m={current:t,signalOwner:s,retry:jh,request:null,generation:0,wakeable:null,retryKey:null,transaction:null,disposed:!1};i.renderOwner=m;let h=(o,s,d,f)=>{if(u)return;if(it(),t&&!t.disposed&&n===o&&Object.is(r,d)){let e=t;m.request=t=>{m.transaction.rootRequest=!0;let n=e.props;n!==s&&O(e,`props`,n),e.props=s,e.pendingMode=t,A(e)},Cs(t);return}if(f===void 0&&t!==null&&!t.disposed&&(oi>0||si>0)){m.request=e=>h(o,s,d,e),Cs(t);return}if(!ai&&T===null&&f===void 0&&oi===0&&si===0&&(Zo?.interrupt(),u))return;let g=Va(m);m.transaction.rootRequest=!0;let _=t,v=n,y=r,b=e.nodeType!==9&&_!==null&&_.mounted&&!_.disposed&&!Qa(m.transaction,_),x=b?P(e):null,S=b?(M?.view(e)??e).lastChild:null;Ua(()=>{t=_,n=v,r=y,m.current=_,_!==null&&p(_)});try{t&&(Gr.delete(t),b||j(t),t=null,n=null,r=null);let u=null,h=null;if(b?(u=(M?.view(document)??document).createComment(`root`),h=(M?.view(document)??document).createComment(`/root`),(M?.view(e)??e).append(u,h)):Hx(e),t=Qc(`root`,null,e,u,h,o,s,void 0,a),t.idState=i,m.current=t,eo(t),kx(t,c),p(t),n=o,r=d,f===void 0&&(oi>0||si>0)){t.pending=!0,t.pendingMode=`transition`,ti.push(t),!ii&&!ri&&(ri=!0,queueMicrotask(Ps));return}let g=t;g.pendingMode=f??null;try{A(g),ti.length>0&&Ds(g)}catch(e){try{Rb(g,e)}catch(e){let n=m.transaction;if(n!==null&&no(n),t!==null&&!t.disposed&&j(t),!Ix(g,e))throw e;return}m.wakeable===null&&l.unmount();return}b&&Ya(_,e,x,S),!ii&&!ri&&(ri=!0,queueMicrotask(Ps))}finally{Ha(g),!ai&&D===null&&io()}};return l={render(e,i){if(u)throw Error(w(29));if(!ai&&T===null&&!bs()&&oi===0&&si===0&&(Zo?.interrupt(),u))return;if(bs()||T!==null){if(d!==ys&&(d=ys,f=0),++f>vs){t!==null&&!t.disposed&&(t.nestedUpdateError=!0,Cs(t));return}}else ys++,d=ys,f=0;let a,o=null;g_(e)?(arguments.length,o=e.key??null,typeof e.type==`function`?(a=e.type,i=e.props):(a=Bx,i=e)):typeof e==`function`?a=e:(a=Bx,i=typeof e==`symbol`?null:e),m.transition!==void 0&&t!==null&&!t.disposed&&n===a&&Object.is(r,o)&&ci.keepsRoot(m,!0)||(m.transition!==void 0&&ci.discardRoot(m),m.generation++,m.wakeable=null),t!==null&&!t.disposed&&n===a&&Object.is(r,o)&&(ai?hc?.refreshPublishingOwner(m):Zo?.refreshPendingOwner(m)),m.nativeRetry?.clear(),m.retrySignalOwners!==void 0&&cr(m),m.retryKey=null,m.request=null,m.transaction?.aborted===!0&&(m.transaction=null),m.retry=()=>h(a,i,o),h(a,i,o)},unmount(){if(arguments.length,u)return;let a=null;if(m.bindingLeases!==void 0)for(let e of m.bindingLeases){let t=uf.get(e);t?.revision!==void 0&&nx(t.scope,a??=[])}if(a!==null&&m.generation++,!(!ai&&T===null&&!bs()&&Qr===0&&(Zo?.interrupt(),u))){if(!ai&&T===null&&!bs()&&Qr===0&&ys++,u=!0,m.disposed=!0,m.controlLeases!==void 0){for(let e of m.controlLeases.values())e!==void 0&&(e.owner=void 0);m.controlLeases.clear()}if(m.bindingLeases!==void 0){for(let e of m.bindingLeases){$e(e),uf.delete(e);try{m.preservePresentation||e.retire()}catch(e){Ix(t,e)||console.error(e)}}m.bindingLeases.clear()}m.nativeRetry?.clear(),m.retrySignalOwners!==void 0&&cr(m),m.retry=jh,m.transition!==void 0&&ci.discardRoot(m),m.generation++,m.wakeable=null,m.request=null,m.transaction!==null&&no(m.transaction);try{t&&(Gr.delete(t),ac(a,()=>j(t,!1)),oc(),m.preservePresentation||Hx(e),zc(),t=null,n=null,r=null)}finally{i.signalState?.opaqueKeys?.clear(),Yn?.clearDeferredRefs(m),m.current=null,m.retry=jh,m.adopt=void 0,m.initialDocumentSignals=void 0,m.retryKey=null,m.transaction=null,eh(e,!0),Wx(e,o)}}}},t!==null&&(p(t),m.adopt=e=>{t!==null&&Gr.delete(t),t=e,m.current=e,p(e)}),l}function qx(e,t,n){if(Vx(e),t?.bindingLeases!==void 0||t?.controlLeases!==void 0)throw Error(w(76));t=Gx(t);let r=Ux(e);$m(e,!0);let i=(t?.identifierPrefix??``)+`r`+(Fr++).toString(36)+`-`;return Kx(e,null,null,null,{prefix:i,next:0,signalState:{prefix:t?.signalInstancePrefix??i,next:0}},n,r,t?.signalOwner??(Ln?zn(e):void 0),t)}function Jx(e,t){return qx(e,t,dl)}function Yx(e={}){let t=new Map,n=e.slotlessPrefix===void 0?null:new Map,r=e.parentPrefix??``,i=e.tagPrefix??`:`,a=e.parentDescriptionFallback??``,o=e.includeParentDescription!==!1,s=e.global===!1?Symbol:Symbol.for,c=e.slotlessGlobal===!1||e.slotlessGlobal===void 0&&e.global===!1?Symbol:Symbol.for;return(l,u)=>{if(l===void 0){if(n===null)return;let t=n.get(u);return t===void 0&&(t=c(e.slotlessPrefix+u),n.set(u,t)),t}let d=t.get(l);d===void 0&&t.set(l,d=new Map);let f=d.get(u);if(f===void 0){let e=o?l.description??a:``;f=s(r+e+i+u),d.set(u,f)}return f}}var Xx=Yx(),Zx=Cu(null);function Qx(e,t){let n=null;e!=null&&(n=e[1]);function r(){return t??(n==null?null:n.getTheme())}return{getTheme:r}}function $x(){return Ml(eS,this,arguments)}function eS(){let e=qu(Zx);if(e==null)throw Error(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);return e}var tS=t({$addUpdateTag:()=>fM,$applyNodeReplacement:()=>SM,$assumeActiveEditor:()=>Pk,$caretFromPoint:()=>wA,$caretRangeFromSelection:()=>OA,$cloneWithProperties:()=>pN,$cloneWithPropertiesEphemeral:()=>mN,$comparePointCaretNext:()=>$P,$copyNode:()=>xM,$create:()=>XN,$createChildrenArray:()=>QN,$createLineBreakNode:()=>yA,$createNodeSelection:()=>$O,$createParagraphNode:()=>GA,$createPoint:()=>bO,$createRangeSelection:()=>QO,$createRangeSelectionFromDom:()=>ek,$createTabNode:()=>_O,$createTextNode:()=>pO,$exportNodeJSON:()=>rC,$extendCaretToRange:()=>YP,$findMatchingParent:()=>ZN,$flushSyncAfterUpdate:()=>Xk,$formatText:()=>MO,$fullReconcile:()=>Ik,$generateNodesFromRawText:()=>mk,$getAdjacentChildCaret:()=>WP,$getAdjacentNode:()=>oM,$getAdjacentSiblingOrParentSiblingCaret:()=>LA,$getCaretInDirection:()=>JP,$getCaretRange:()=>ZP,$getCaretRangeInDirection:()=>FA,$getCharacterOffsets:()=>PO,$getChildCaret:()=>HP,$getChildCaretAtIndex:()=>IA,$getChildCaretOrSelf:()=>UP,$getCollapsedCaretRange:()=>XP,$getCommonAncestor:()=>rF,$getCommonAncestorResultBranchOrder:()=>eF,$getDOMSlot:()=>aN,$getDOMTextNode:()=>lN,$getDocument:()=>PM,$getEditor:()=>rN,$getEditorDOMRenderConfig:()=>iN,$getNearestNodeFromDOMNode:()=>Nj,$getNearestRootOrShadowRoot:()=>vM,$getNodeByKey:()=>kj,$getNodeByKeyOrThrow:()=>wM,$getNodeFromDOMNode:()=>Aj,$getPreviousSelection:()=>rk,$getRoot:()=>Ij,$getSelection:()=>nk,$getSelectionSlotFrame:()=>sP,$getSiblingCaret:()=>RP,$getSlot:()=>uP,$getSlotFrame:()=>oP,$getSlotHost:()=>iP,$getSlotNameWithinHost:()=>aP,$getSlotNames:()=>lP,$getState:()=>cw,$getStateChange:()=>lw,$getTextContent:()=>hk,$getTextNodeOffset:()=>BP,$getTextPointCaret:()=>zP,$getTextPointCaretSlice:()=>VP,$getWritableNodeState:()=>mw,$hasAncestor:()=>mM,$hasUpdateTag:()=>dM,$insertNodeToNearestRootAtCaret:()=>VA,$insertNodes:()=>fk,$isBlockElementNode:()=>XO,$isBlockFullySelected:()=>HA,$isChildCaret:()=>PP,$isCompactExport:()=>nC,$isDecoratorNode:()=>cA,$isEditorState:()=>mA,$isElementDOMSlot:()=>cN,$isElementNode:()=>V,$isExtendableTextPointCaret:()=>PA,$isInlineElementOrDecoratorNode:()=>_M,$isInlineFormattable:()=>rO,$isLeafNode:()=>Sj,$isLexicalNode:()=>wD,$isLineBreakNode:()=>bA,$isNodeCaret:()=>MP,$isNodeSelection:()=>kO,$isParagraphNode:()=>KA,$isRangeSelection:()=>B,$isRootNode:()=>uA,$isRootOrShadowRoot:()=>bM,$isSelectionCapturedInDecoratorInput:()=>lj,$isShadowRootNode:()=>yM,$isSiblingCaret:()=>NP,$isSlotChild:()=>nP,$isSlotHost:()=>tP,$isTabNode:()=>vO,$isTextNode:()=>z,$isTextPointCaret:()=>jP,$isTextPointCaretSlice:()=>qP,$isTokenOrSegmented:()=>_j,$isTokenOrTab:()=>gj,$markSlotEditable:()=>bN,$needsBlockCursorBeside:()=>TM,$nodesOfType:()=>iM,$normalizeCaret:()=>NA,$normalizeSelection__EXPERIMENTAL:()=>ww,$onUpdate:()=>pM,$parseSerializedNode:()=>Hk,$removeFromParent:()=>wj,$removeSlot:()=>xP,$removeTextFromCaretRange:()=>MA,$rewindSiblingCaret:()=>kA,$selectAll:()=>eM,$setCompositionKey:()=>Dj,$setDirectionFromDOM:()=>gN,$setFormatFromDOM:()=>_N,$setPointFromCaret:()=>TA,$setSelection:()=>Rj,$setSelectionFromCaretRange:()=>EA,$setSlot:()=>bP,$setState:()=>uw,$setTextFormat:()=>jO,$splitAtPointCaretNext:()=>BA,$splitNode:()=>GM,$updateDOMSelection:()=>dk,$updateRangeSelectionFromCaretRange:()=>DA,$withCompactExport:()=>tC,ArtificialNode__DO_NOT_USE:()=>gA,BEFORE_INPUT_COMMAND:()=>kT,BLUR_COMMAND:()=>bE,CAN_REDO_COMMAND:()=>_E,CAN_UNDO_COMMAND:()=>vE,CAN_USE_BEFORE_INPUT:()=>fS,CAN_USE_DOM:()=>iS,CLEAR_EDITOR_COMMAND:()=>hE,CLEAR_HISTORY_COMMAND:()=>gE,CLICK_COMMAND:()=>OT,COLLABORATION_TAG:()=>kD,COMMAND_PRIORITY_BEFORE_CRITICAL:()=>-4,COMMAND_PRIORITY_BEFORE_EDITOR:()=>-8,COMMAND_PRIORITY_BEFORE_HIGH:()=>-5,COMMAND_PRIORITY_BEFORE_LOW:()=>-7,COMMAND_PRIORITY_BEFORE_NORMAL:()=>-6,COMMAND_PRIORITY_CRITICAL:()=>4,COMMAND_PRIORITY_EDITOR:()=>0,COMMAND_PRIORITY_HIGH:()=>3,COMMAND_PRIORITY_LOW:()=>1,COMMAND_PRIORITY_NORMAL:()=>2,COMPOSITION_END_COMMAND:()=>MT,COMPOSITION_END_TAG:()=>FD,COMPOSITION_START_COMMAND:()=>jT,COMPOSITION_START_TAG:()=>PD,CONTROLLED_TEXT_INSERTION_COMMAND:()=>IT,CONTROL_OR_ALT:()=>wE,CONTROL_OR_META:()=>CE,CONTROL_OR_OTHER_KEY:()=>LS,COPY_COMMAND:()=>fE,CUT_COMMAND:()=>pE,CUT_TAG:()=>`cut`,DEFAULT_EDITOR_DOM_CONFIG:()=>XA,DELETE_CHARACTER_COMMAND:()=>NT,DELETE_LINE_COMMAND:()=>BT,DELETE_WORD_COMMAND:()=>zT,DRAGEND_COMMAND:()=>dE,DRAGOVER_COMMAND:()=>uE,DRAGSTART_COMMAND:()=>lE,DROP_COMMAND:()=>sE,DecoratorNode:()=>sA,ElementNode:()=>aA,FOCUS_COMMAND:()=>yE,FORMAT_ELEMENT_COMMAND:()=>cE,FORMAT_TEXT_COMMAND:()=>VT,HISTORIC_TAG:()=>TD,HISTORY_MERGE_TAG:()=>DD,HISTORY_PUSH_TAG:()=>ED,INDENT_CONTENT_COMMAND:()=>aE,INPUT_COMMAND:()=>AT,INSERT_LINE_BREAK_COMMAND:()=>PT,INSERT_PARAGRAPH_COMMAND:()=>FT,INSERT_TAB_COMMAND:()=>iE,INTERNAL_$expandSelectionToWholeDocument:()=>IO,INTERNAL_$isBlock:()=>nN,IS_ALL_FORMATTING:()=>xS,IS_ANDROID:()=>hS,IS_ANDROID_CHROME:()=>vS,IS_APPLE:()=>lS,IS_APPLE_WEBKIT:()=>yS,IS_BOLD:()=>1,IS_CHROME:()=>_S,IS_CODE:()=>16,IS_FIREFOX:()=>uS,IS_HIGHLIGHT:()=>128,IS_IOS:()=>mS,IS_ITALIC:()=>2,IS_SAFARI:()=>gS,IS_STRIKETHROUGH:()=>4,IS_SUBSCRIPT:()=>32,IS_SUPERSCRIPT:()=>64,IS_UNDERLINE:()=>8,KEY_ARROW_DOWN_COMMAND:()=>ZT,KEY_ARROW_LEFT_COMMAND:()=>JT,KEY_ARROW_RIGHT_COMMAND:()=>KT,KEY_ARROW_UP_COMMAND:()=>XT,KEY_BACKSPACE_COMMAND:()=>eE,KEY_DELETE_COMMAND:()=>nE,KEY_DOWN_COMMAND:()=>GT,KEY_ENTER_COMMAND:()=>QT,KEY_ESCAPE_COMMAND:()=>tE,KEY_MODIFIER_COMMAND:()=>xE,KEY_SPACE_COMMAND:()=>$T,KEY_TAB_COMMAND:()=>rE,LineBreakNode:()=>_A,MOVE_TO_END:()=>qT,MOVE_TO_START:()=>YT,NODE_STATE_DIRECT:()=>iw,NODE_STATE_KEY:()=>`$`,NODE_STATE_LATEST:()=>aw,OUTDENT_CONTENT_COMMAND:()=>oE,PASTE_COMMAND:()=>LT,PASTE_TAG:()=>OD,ParagraphNode:()=>UA,REDO_COMMAND:()=>WT,REMOVE_TEXT_COMMAND:()=>RT,RootNode:()=>lA,SELECTION_CHANGE_COMMAND:()=>ET,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:()=>DT,SELECT_ALL_COMMAND:()=>mE,SET_TEXT_FORMAT_COMMAND:()=>HT,SKIP_COLLAB_TAG:()=>AD,SKIP_DOM_SELECTION_TAG:()=>MD,SKIP_SCROLL_INTO_VIEW_TAG:()=>jD,SKIP_SELECTION_FOCUS_TAG:()=>ND,TEXT_TYPE_TO_FORMAT:()=>AS,TabNode:()=>gO,TextNode:()=>iO,UNDO_COMMAND:()=>UT,addClassNamesToElement:()=>uF,aliasTableOf:()=>bC,aliasedValue:()=>XC,arrayValue:()=>$C,booleanValue:()=>UC,buildImportMap:()=>yD,compileKeyboardShortcuts:()=>OE,configExtension:()=>aF,createCommand:()=>R,createEditor:()=>ZA,createRefCountedRegistry:()=>kE,createSharedNodeState:()=>dw,createState:()=>sw,declarePeerDependency:()=>oF,declaredAccepts:()=>EC,defineExtension:()=>iF,enumValue:()=>WC,findAllLexicalElementsDeep:()=>MM,flipDirection:()=>DP,getActiveElement:()=>HM,getActiveElementDeep:()=>UM,getComposedEventTarget:()=>WM,getComposedSchemaFields:()=>PN,getComposedStaticRange:()=>FM,getDOMOwnerDocument:()=>uM,getDOMSelection:()=>DM,getDOMSelectionFromTarget:()=>OM,getDOMSelectionPoints:()=>LM,getDOMSelectionRange:()=>IM,getDOMSelectionRangeAndPoints:()=>RM,getDOMShadowRoots:()=>jM,getDOMTextNode:()=>bj,getDeclaredSlots:()=>gP,getEditorPropertyFromDOMNode:()=>mj,getNearestEditorFromDOMNode:()=>pj,getParentElement:()=>lM,getRegisteredNode:()=>sj,getRegisteredNodeOrThrow:()=>oj,getRegisteredSubtypeMap:()=>YN,getRootOwnerDocument:()=>NM,getStaticNodeConfig:()=>UN,getStyleObjectFromCSS:()=>KD,getTextDirection:()=>hj,getTransformSetFromKlass:()=>YA,getterTableOf:()=>vC,isBlockDomNode:()=>tN,isCurrentlyReadOnlyMode:()=>Ak,isDOMCapturingSelection:()=>xN,isDOMDocumentNode:()=>yj,isDOMNode:()=>XM,isDOMShadowRoot:()=>kM,isDOMTextNode:()=>vj,isDOMUnmanaged:()=>yN,isDocumentFragment:()=>ZM,isExactShortcutMatch:()=>Zj,isHTMLAnchorElement:()=>KM,isHTMLElement:()=>YM,isHTMLTableCellElement:()=>JM,isHTMLTableRowElement:()=>qM,isInlineDomNode:()=>$M,isLastChildInBlockNode:()=>SA,isLexicalEditor:()=>fj,isModifierMatch:()=>Xj,isOnlyChildInBlockNode:()=>xA,isSchemaField:()=>_C,isSelectionCapturedInDecoratorInput:()=>uj,isSelectionWithinEditor:()=>dj,iterStaticNodeConfigChain:()=>JN,keyboardEventMaskForPlatform:()=>Jj,makeStepwiseIterator:()=>QP,mergeRegister:()=>fF,mountSlotContainer:()=>oN,nodeSchema:()=>YC,normalizeClassNames:()=>lF,nullable:()=>GC,numberValue:()=>HC,objectValue:()=>ew,optional:()=>KC,rawValue:()=>QC,registerEventListener:()=>AE,registerEventListeners:()=>pF,removeClassNamesFromElement:()=>dF,removeFromParent:()=>Tj,resetRandomKey:()=>aj,safeCast:()=>sF,setDOMStyleFromCSS:()=>YD,setDOMStyleObject:()=>JD,setDOMUnmanaged:()=>vN,setNodeIndentFromDOM:()=>hN,setterDefaultOf:()=>xC,setterTableOf:()=>yC,shallowMergeConfig:()=>cF,stopLexicalPropagation:()=>mD,stringValue:()=>BC,toggleTextFormatType:()=>xj,tokenizeRawText:()=>pk,transformValue:()=>ZC,unionValue:()=>JC,unmountSlotContainer:()=>sN,withAccessors:()=>nw,withField:()=>tw});function L(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function nS(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function rS(){return typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0}var iS=rS();function aS(){return iS&&`documentMode`in document?document.documentMode:null}var oS=aS();function sS(e){return iS&&e.test(navigator.platform)}function cS(e){return iS&&e.test(navigator.userAgent)}var lS=sS(/Mac|iPod|iPhone|iPad/),uS=cS(/^(?!.*Seamonkey)(?=.*Firefox).*/i);function dS(){return!(!iS||!(`InputEvent`in window)||oS)&&`getTargetRanges`in new window.InputEvent(`input`)}var fS=dS();function pS(){return iS&&!window.MSStream&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints>1)}var mS=pS(),hS=cS(/Android/),gS=cS(/Version\\/[\\d.]+.*Safari/)&&!hS,_S=cS(/^(?=.*Chrome).*/i),vS=iS&&hS&&_S,yS=cS(/AppleWebKit\\/[\\d.]+/)&&lS&&!_S;function bS(){return 2047}var xS=bS(),SS=gS||mS||yS?`\\xA0`:``,CS=`\n\n`,wS=uS?`\\xA0`:SS,TS=`֑-߿יִ-﷽ﹰ-ﻼ`,ES=`A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--`;function DS(e,t){return RegExp(`^[^`+e+`]*[`+t+`]`)}var OS=DS(ES,TS),kS=DS(TS,ES),AS={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},jS={directionless:1,unmergeable:2},MS={center:2,end:6,justify:4,left:1,right:3,start:5};function NS(e){let t={};for(let n of Object.keys(e))t[e[n]]=n;return t}var PS=NS(MS),FS={normal:0,segmented:2,token:1},IS=NS(FS),LS=Symbol.for(`@lexical/ctrlOrOtherKey`),RS=`$config`;function zS(){return rN()._blockCursorElement}function BS(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var VS=yS||mS||gS;function HS(){let e=PM().createElement(`img`);e.setAttribute(`data-lexical-decorator-boundary`,`true`),e.alt=``;for(let[t,n]of[[`position`,`absolute`],[`width`,`0px`],[`height`,`0px`],[`border`,`0px`],[`margin`,`0px`],[`padding`,`0px`]])e.style.setProperty(t,n,`important`);return e}function US(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-decorator-boundary`)}var WS=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&L(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&L(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&L(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=GS(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=GS(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function GS(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var KS=class e extends WS{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()||this.getDecoratorBoundaryAnchor(`trailing`)}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;BS(t);)e=t,t=t.nextSibling;US(t)&&(e=t,t=t.nextSibling);let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===zS()?n:e}getDecoratorBoundaryAnchor(e){let t;if(e===`leading`){let e=super.getFirstChildAnchor();for(t=e?e.nextSibling:this.element.firstChild;BS(t);)t=t.nextSibling}else t=this.before?this.before.previousSibling:this.element.lastChild,t!==null&&t===zS()&&(t=t.previousSibling);return US(t)?t:null}setDecoratorBoundaryAnchor(e,t){let n=this.getDecoratorBoundaryAnchor(e);if(t!==(n!==null)){if(n!==null)this.element.removeChild(n);else if(e===`leading`){let e=this.getFirstChildAnchor();this.element.insertBefore(HS(),e?e.nextSibling:this.element.firstChild)}else this.element.insertBefore(HS(),this.before)}}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){let t=this.element,n=this.after===null?t.firstChild:this.after.nextSibling,r=e===`empty`&&BS(n)?null:e;if(t.__lexicalLastChildKind!==r){if(t.__lexicalLastChildKind=r,r===null)this.removeManagedLineBreak();else{let e=r===`decorator`&&VS;this.insertManagedLineBreak(e)}}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before||this.getDecoratorBoundaryAnchor(`trailing`),i=PM().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),n.insertBefore(i,r),e){let e=PM().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=zS(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=qS(t,n);i.push(r);let a=qS(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function qS(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&L(225),n.reverse()}function JS(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`\"<unknown>+source\"`}var YS=JS(),XS=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},ZS=null;function QS(e,t=1e3){return e instanceof $S?e.clone():e.size<t?new Map(e):new $S().init(new Map(e),void 0,e.size)}var $S=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===ZS?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===ZS?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==ZS&&n!==void 0||(this._size++,n===ZS&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,ZS),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(e){if(t)for(let n of t){let t=n[0],r=e.get(t);r!==ZS&&(r!==void 0&&(n[1]=r),yield n)}for(let n of e)n[1]===ZS||t&&t.has(n[0])||(yield n)}else t&&(yield*t)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}},eC=!1;function tC(e,t,...n){let r=eC,i;try{eC=e,i=t()}finally{eC=r}var a;return(a=i)===null||typeof a!=`object`&&typeof a!=`function`||typeof a.then!=`function`||L(421),i}function nC(){return eC}function rC(e){let t=e.exportJSON(eC),n=e.constructor;return t.type!==n.getType()&&L(130,n.name),V(e)&&!Array.isArray(t.children)&&L(59,n.name),t}function iC(e,t,n,r,i,a){if(V(e)){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&((V(o)||tP(o)&&o.__slots!==null)&&iC(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of tP(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&nP(e)&&e.__slotHost===t&&((V(e)||tP(e)&&e.__slots!==null)&&iC(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var aC=!1,oC=0;function sC(e){oC=e.timeStamp}function cC(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Mj(e,n)!==void 0}function lC(e,t,n){let r=DM(gM(n)),i=r&&LM(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&Kj(t,s,a,o,!1)}function uC(e,t,n){if(B(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return vj(t)&&n.isAttached()}function dC(e,t,n){for(let r=e;r&&!yN(r);r=lM(r)){let e=Mj(r,t);if(e!==void 0){let t=kj(e,n);if(t)return cA(t)||!YM(r)?void 0:[r,t]}}}function fC(e,t,n){aC=!0;let r=performance.now()-oC>100;try{Qk(e,()=>{let i=nk()||function(e){return e.read(`latest`,()=>{let e=nk();return e===null?null:e.clone()})}(e),a=new Map,o=e._editorState,s=e._blockCursorElement,c=!1,l=``;for(let n=0;n<t.length;n++){let u=t[n],d=u.type,f=u.target,p=dC(f,e,o);if(!p)continue;let[m,h]=p;if(d===`characterData`)r&&z(h)&&vj(f)&&uC(i,f,h)&&lC(f,h,e);else if(d===`childList`){c=!0;let t=u.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Aj(r),a=r.parentNode;if(!(a==null||r===s||i!==null||cC(r,a,e)||US(r)||e._slotsUsed&&YM(r)&&r.hasAttribute(`data-lexical-slot`)||yN(r))){if(uS){let e=(YM(r)?r.innerText:null)||r.nodeValue;e&&(l+=e)}a.removeChild(r)}}let n=u.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];cC(r,f,e)||s===r?(f.appendChild(r),t++):US(r)&&t++}r!==t&&a.set(m,h)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let u=n.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let n=u[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||cC(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(c&&Rj(i),uS&&sM(e)&&i.insertRawText(l))})}finally{aC=!1}}function pC(e){let t=e._observer;t!==null&&fC(e,t.takeRecords(),t)}function mC(e){(function(e){oC===0&&gM(e).addEventListener(`textInput`,sC,!0)})(e),e._observer=new MutationObserver((t,n)=>{fC(e,t,n)})}function hC(e,t,n){let{isEqual:r}=e;return t===n||r!==void 0&&r(t,n)}function gC(e,t){return hC(e,t,e.defaultValue)}function _C(e){return typeof e==`object`&&!!e}function vC(e,t){let n=CC(e,t).getter;return _C(n)&&n.getterTable!==void 0||L(405,t),SC(n.getterTable)}function yC(e,t){let n=CC(e,t).setter;return _C(n)&&n.setterTable!==void 0||L(406,t),SC(n.setterTable)}function bC(e,t,n){let{meta:r}=CC(e,t);for(let e=0;;)if(r.kind===`aliased`){if(e===n)return SC(r.aliases);e++,r=r.inner.meta}else r.kind===`nullable`||r.kind===`optional`?r=r.inner.meta:r.kind===`array`?r=r.item.meta:L(407,t,String(n))}function xC(e,t){let n=CC(e,t),{setter:r}=n;_C(r)&&r.setterTable!==void 0||L(408,t);let i=String(n.defaultValue);return LC(r.setterTable,i)||L(409,t,i),r.setterTable[i]}function SC(e){return Object.assign(Object.create(null),e)}function CC(e,t){let n=e.get(t);return n===void 0&&L(410,t),n}function wC(e,t,n,r,i){i!==void 0&&TC.add(i);let a=n===void 0,o=a?e(void 0):n;return a&&kC(o),Object.assign(e,{accepts:i,defaultValue:o,isEqual:r,meta:t})}var TC=new WeakSet;function EC(e){let{accepts:t}=e;return t===void 0||TC.has(t)?void 0:t}var DC=new WeakSet;function OC(e){return typeof e==`object`&&e&&DC.add(e),e}function kC(e){if(typeof e==`object`&&e&&!Object.isFrozen(e)&&!DC.has(e)){Object.freeze(e);for(let t of Object.values(e))kC(t)}}function AC(e){let{isEqual:t}=e;return t===void 0?void 0:(e,n)=>e==null||n==null?e===n:t(e,n)}function jC(e,t){return n=>t(n)||MC(e,n)}function MC(e,t){let{accepts:n}=e;return n===void 0?function(e,t){let{accepts:n}=e;if(n!==void 0)return MC(e,t)?{parsed:e(t)}:void 0;let r=e(t);return gC(e,r)&&t!==e.defaultValue?void 0:{parsed:r}}(e,t)!==void 0:n.call(e,t)}var NC=new WeakMap;function PC(e){let t=NC.get(e);if(t!==void 0)return t;let n=function(e){let t=e.meta;if(t==null||EC(e)!==void 0)return!1;switch(t.kind){case`raw`:return!0;case`union`:return t.members!=null&&t.members.length>0&&t.members.every(e=>PC(e));case`nullable`:case`optional`:case`transform`:case`aliased`:return t.inner!=null&&PC(t.inner);default:return!1}}(e);return NC.set(e,n),n}function FC(e,t){let n=e.meta;if(n==null)return MC(e,t)?1:4;let r=EC(e),i=r!==void 0;if(i&&!r.call(e,t))return 4;let a=function(e,t,n,r){switch(t.kind){case`raw`:return r?1:2;case`array`:{if(!Array.isArray(n))return 4;if(t.item==null)return 1;let e=1;for(let r=0;r<n.length;r++)if(n[r]!==void 0){let i=FC(t.item,n[r]);i>e&&(e=i)}return e>=3?3:e}case`object`:{let e=t.fields;if(!RC(n))return 4;if(e==null)return 1;if(!r&&zC(n,e))return 4;let i=1;for(let t of Object.keys(n))if(LC(e,t)){let r=FC(e[t],n[t]);r>i&&(i=r)}return i>=3?3:i}case`union`:return t.members==null?1:IC(t.members,n).fit;case`aliased`:case`nullable`:case`optional`:case`transform`:return(t.kind===`aliased`?typeof n==`string`&&t.aliases!=null&&LC(t.aliases,n):t.kind===`nullable`?n==null:t.kind===`optional`&&n===void 0)||t.inner==null?1:FC(t.inner,n);default:return r||MC(e,n)?1:4}}(e,n,t,i);return i&&a===4?3:a}function IC(e,t){let n,r=4,i=4;for(let a=0;a<e.length;a++){let o=e[a],s=FC(o,t),c=s<3&&PC(o)?3:s;if(c<r&&(n=o,r=c,i=s,c===1))break}return{fit:i,member:n}}function LC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function RC(e){if(!function(e){return function(e){return typeof e==`object`&&!!e}(e)&&!Array.isArray(e)}(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function zC(e,t){for(let n of Object.keys(e))if(!LC(t,n))return!0;return!1}function BC(e=``){return wC(t=>typeof t==`string`?t:e,{kind:`string`},void 0,void 0,e=>typeof e==`string`)}var VC=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function HC(e=0,t={}){let{integer:n,clamp:r}=t,i=n&&t.min!==void 0?Math.ceil(t.min):t.min,a=n&&t.max!==void 0?Math.floor(t.max):t.max,o=e=>typeof e==`string`&&VC.test(e)?Number(e):e,s=e=>typeof e==`number`&&Number.isFinite(e)&&(!n||Number.isInteger(e)),c=e=>s(e)&&(i===void 0||e>=i)&&(a===void 0||e<=a);return wC(t=>{let n=o(t);return r&&s(n)?i!==void 0&&n<i?i:a!==void 0&&n>a?a:n:c(n)?n:e},{clamp:r,integer:n,kind:`number`,max:a,min:i},void 0,void 0,e=>r?s(o(e)):c(o(e)))}function UC(e=!1){return wC(t=>typeof t==`boolean`?t:e,{kind:`boolean`},void 0,void 0,e=>typeof e==`boolean`)}function WC(e,...t){let n=OC(t.length===0?e[0]:t[0]),r=new Set(e);return wC(e=>e!==void 0&&r.has(e)?e:n,{kind:`enum`,values:e},n,void 0,e=>r.has(e)&&(e!==void 0||n===void 0))}function GC(e,t={}){let{defaultAsNull:n}=t;return wC(t=>{if(t==null)return null;let r=e(t);return n&&gC(e,r)?null:r},{defaultAsNull:n,inner:e,kind:`nullable`},void 0,AC(e),jC(e,e=>e==null))}function KC(e,t={}){let{omitDefault:n}=t;return wC(t=>{if(t===void 0)return;let r=e(t);return n&&gC(e,r)?void 0:r},{inner:e,kind:`optional`,omitDefault:n},void 0,AC(e),jC(e,e=>e===void 0))}function qC(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!qC(e[n],t[n]))return!1;return!0}if(!RC(e)||!RC(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>LC(t,n)&&qC(e[n],t[n]))}function JC(e,...t){let n=t.length===0?e[0].defaultValue:OC(t[0]),r=t=>{let n=function(e,t){return IC(e,t).member}(e,t);return n===void 0?void 0:{member:n,parsed:n(t)}};return wC(e=>{if(e===void 0)return n;let t=r(e);return t===void 0?n:t.parsed},{kind:`union`,members:e},n,qC,t=>(t!==void 0||n===void 0)&&e.some(e=>MC(e,t)))}function YC(){return e=>function(e){return{meta:{fields:e,kind:`node`}}}(e)}function XC(e,t){let n=e=>typeof e==`string`&&LC(t,e);return wC(r=>n(r)?t[r]:e(r),{aliases:t,inner:e,kind:`aliased`},e.defaultValue,e.isEqual,t=>n(t)||MC(e,t))}function ZC(e,t,n={}){return wC(n=>t(e(n)),{inner:e,kind:`transform`},OC(t(e.defaultValue)),n.isEqual,t=>MC(e,t))}function QC(){return wC(e=>e===void 0?void 0:e,{kind:`raw`},void 0,void 0,()=>!0)}function $C(e){return wC(t=>{if(!Array.isArray(t))return[];let n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e(t[r]);return n},{item:e,kind:`array`},void 0,(t,n)=>{if(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!hC(e,t[r],n[r]))return!1;return!0},e=>Array.isArray(e))}function ew(e){return function(e,t){let n=Object.entries(t);return wC(e=>{let t=typeof e==`object`&&e?e:{},r={};for(let e=0;e<n.length;e++){let[i,a]=n[e];r[i]=a(t[i])}return r},{fields:t,kind:`object`},void 0,(e,r)=>RC(e)&&RC(r)&&!zC(e,t)&&!zC(r,t)&&n.every(([t,n])=>hC(n,e[t],r[t])),e=>RC(e)&&!zC(e,t))}(0,e)}function tw(e,t){return rw(`withField`,e,{getter:{field:t.field,getterTable:t.getterTable,method:t.getter,when:t.when},setter:{field:t.field,method:t.setter,setterTable:t.setterTable}})}function nw(e,t){return rw(`withAccessors`,e,t)}function rw(e,t,n){return Object.assign(e=>t(e),{accepts:t.accepts,defaultValue:t.defaultValue,getter:n.getter,isEqual:t.isEqual,meta:t.meta,setter:n.setter})}var iw=`direct`,aw=`latest`,ow=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;schema;constructor(e,t){this.key=e;let n=`meta`in(r=t.parse)&&typeof r.meta==`object`&&r.meta!==null&&`kind`in r.meta&&typeof r.meta.kind==`string`&&`defaultValue`in r?t.parse:void 0;var r;this.schema=n,this.parse=t.parse.bind(t),this.unparse=(t.unparse||_w).bind(t),this.isEqual=t.isEqual?t.isEqual.bind(t):n!==void 0&&n.isEqual!==void 0?(e,t)=>hC(n,e,t):Object.is,this.defaultValue=n===void 0?this.parse(void 0):n.defaultValue,this.resetOnCopyNode=t.resetOnCopyNode||!1}};function sw(e,t){return new ow(e,t)}function cw(e,t,n=aw){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function lw(e,t,n){let r=cw(e,n,iw),i=cw(t,n,iw);return n.isEqual(r,i)?null:[r,i]}function uw(e,t,n){let r;if(jk(),typeof n==`function`){let i=e.getLatest(),a=cw(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return mw(i).updateFromKnown(t,r),i}function dw(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of JN(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var fw=new Set([`__proto__`,`constructor`,`prototype`]),pw=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return gw(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(fw.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=gw(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(fw.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function mw(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new pw(t,function(e){return e.__state?e.__state.sharedNodeState:oj(rN(),e.getType()).sharedNodeState}(t));return t.__state=n,n}function hw(e,t){let n=e.getWritable(),r=t.$;return(n.__state||r)&&mw(e).updateFromJSON(r),n}function gw(e){if(e)for(let t in e)return e}function _w(e){return e}function vw(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function yw(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function bw(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function xw(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&vw(n,e,t)||t&&vw(n,t,e)||e&&yw(n,e,t)||t&&yw(n,t,e))}(c,l))}function Sw(e,t){let n=e.mergeWithSibling(t),r=Fk()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Cw(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(xw(t,r)){r=Sw(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&z(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(xw(r,n)){r=Sw(r,n);break}break}n.remove()}}else r.remove()}function ww(e){return Tw(e.anchor),Tw(e.focus),e}function Tw(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),z(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!V(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Ew=Symbol.for(`@lexical/CachedTextSize`);function Dw(e,t){return Ww.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Uw.get(r);if(i===void 0&&L(345,r),V(i)){let a=Gw.get(r);if(a!==void 0&&V(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=Kw.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&L(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[Ew];e===void 0&&L(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:jw})}function Ow(e){V(e)||e[Ew]===void 0&&(e[Ew]=z(e)?e.__text.length:e.getTextContentSize())}var kw=4,Aw,jw,Mw,Nw=``,Pw=null,Fw=null,Iw=null;function Lw(){return{firstTextKey:Iw,format:Pw,style:Fw}}function Rw(e){e.firstTextKey!==null&&(Pw=e.format,Fw=e.style,Iw=e.firstTextKey)}function zw(e){if(Iw!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&L(348),t===null)return;let n=Gw.get(t);z(n)&&(Pw=n.getFormat(),Fw=n.getStyle(),Iw=t)}var Bw,Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw=!1,Zw=!1;function Qw(e,t){let n=Uw.get(e),r=Gw.has(e);if(t!==null){let n=wT(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(jw._keyToDOMMap.delete(e),V(n)){let e=QN(n,Uw);$w(e,0,e.length-1,null)}if(n!==void 0){for(let e of cT(n).values()){let t=uT(e);Qw(e,null),t!==null&&t.remove()}rM(Jw,Mw,Bw,n,`destroyed`)}}}function $w(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&Qw(t,r)}}function eT(e,t){e.setProperty(`text-align`,t)}var tT=`40px`;function nT(e,t){let n=Aw.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${tT}))`),tM(e,`class`),tM(e,`style`)}function rT(e,t){let n=e.style;t===0?eT(n,``):t===1?eT(n,`left`):t===2?eT(n,`center`):t===3?eT(n,`right`):t===4?eT(n,`justify`):t===5?eT(n,`start`):t===6&&eT(n,`end`),tM(e,`style`)}function iT(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(uA(e))return null;let n=e.getParent();return n===null||bM(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function aT(e){let t=PM().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function oT(e,t,n){t||e.contentEditable===`false`?bN(n,jw):n.removeAttribute(`contenteditable`)}function sT(e,t,n){let r=Nw,i=Lw();Nw=``;let a=``,o=cA(e);for(let[r,i]of n){let n=aT(r);oT(t,o,n),t.appendChild(n),Nw=``;let s=Lw();fT(i,aN(e,n,jw)),Rw(s),lT(e,r,t,n),a+=Nw}return Rw(i),Nw=r,a}function cT(e){return tP(e)&&e.__slots!==null?e.__slots:eP}function lT(e,t,n,r){let i=Yw.$getSlotTargetElement(e,t,n,jw);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function uT(e){let t=Kw.get(e);return t===void 0?null:t.parentElement}function dT(e,t,n){let r=cT(e),i=cT(t);for(let[e,t]of r)if(!i.has(e)){let e=uT(t);Qw(t,null),e!==null&&e.remove()}let a=Nw,o=Lw(),s=``,c=null,l=cA(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:uT(i);Nw=``;let u=Lw();if(o===null){o=aT(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),fT(a,aN(t,o,jw))}else i===a?yT(a,o):(i!==void 0&&Qw(i,o),fT(a,aN(t,o,jw)));if(Rw(u),oT(n,l,o),lT(t,e,n,o),s+=Nw,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Rw(o),Nw=a,s}function fT(e,t){let n=Gw.get(e);if(n===void 0&&L(60),t!==null){let r=Uw.get(e);if(r!==void 0){let i=Kw.get(e);if(i!==void 0){let a=nP(r)?r.__slotHost:null,o=nP(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),yT(e,t.element)}}}let r=Yw.$createDOM(n,jw);if(function(e,t,n){let r=n._keyToDOMMap;jj(t,n,e),r.set(e,t)}(e,r,jw),z(n)?r.setAttribute(`data-lexical-text`,`true`):cA(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),vN(r,{captureSelection:!0})),V(n)){let e=n.__indent,t=n.__size;iT(r,n),e!==0&&nT(r,e);let i=cT(n),a=i.size>0?sT(n,r,i):``;if(t===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Nw+=a,i.size>0&&(r.__lexicalSlotTextLength=a.length);else{let e=Nw,o=t-1;if(pT(QN(n,Gw),n,0,o,aN(n,r,jw)),a!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=a+t,Nw=e+a+t}i.size>0&&(r.__lexicalSlotTextLength=a.length)}let o=n.__format;o!==0&&rT(r,o),n.isInline()||(gT(null,n,r),hT(n,r))}else{let t=n.getTextContent();if(cA(n)){let t=n.decorate(jw,Aw);t!==null&&bT(e,t),r.contentEditable=`false`;let i=cT(n);i.size>0&&sT(n,r,i)}Nw+=t}return t!==null&&t.insertChild(r),Yw.$decorateDOM(n,null,r,jw),Ow(n),rM(Jw,Mw,Bw,n,`created`),r}function pT(e,t,n,r,i){let a=Nw,o=Lw();Nw=``,Pw=null,Fw=null,Iw=null;let s=n;for(;s<=r;++s){let t=Lw();fT(e[s],i);let n=Gw.get(e[s]);n!==null&&z(n)?Pw===null&&(Pw=n.getFormat(),Fw=n.getStyle(),Iw=n.__key):V(n)&&s<r&&!n.isInline()&&(Nw+=CS),Rw(t)}let c=jw._keyToDOMMap.get(t.__key);c===void 0&&L(349,t.__key),c.__lexicalTextContent=Nw,c.__lexicalFirstTextKey=Iw,Nw=a+Nw,Rw(o)}function mT(e,t){if(!e)return!1;let n=t.get(e);return cA(n)&&!n.isInline()}function hT(e,t){let n=aN(e,t,jw);n.setDecoratorBoundaryAnchor(`leading`,mT(e.__first,Gw)),n.setDecoratorBoundaryAnchor(`trailing`,mT(e.__last,Gw))}function gT(e,t,n){let r=aN(t,n,jw),i=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return bA(e)?`line-break`:cA(e)&&e.isInline()?`decorator`:null}return`empty`}return null}(t,Gw);r.setManagedLineBreak(i)}function _T(e,t,n){var r;Pw=null,Fw=null,Iw=null,function(e,t,n){let r=Nw,i=e.__size,a=t.__size;Nw=``;let o=n.element,s=jw._keyToDOMMap.get(t.__key);s===void 0&&L(351,t.__key);let c=a-i;if(!Xw&&Math.abs(c)<=1&&i>=kw&&e.__first===t.__first&&(c!==0||!jw._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=qw.get(e.__key);if(!Xw&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Gw.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Dw(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Gw.get(n);if(e===void 0)break;let t=Lw();yT(n,o),z(e)&&Pw===null&&(Pw=e.getFormat(),Fw=e.getStyle(),Iw=e.__key),Rw(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Gw.get(n);if(e===void 0)break;let t;if(V(e)){let r=jw._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&V(e)&&!e.isInline()&&(d+=CS),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,Nw=r+m,vT(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Uw.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Gw.get(a),d=Uw.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Gw.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Uw.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Dw(l,c);for(let e of _){let t=Lw();if(e.kind===`reconcile`)yT(e.key,n.element);else if(e.kind===`destroy`)Qw(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=jw._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}fT(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Gw.get(e.key);t&&z(t)&&Pw===null&&(Pw=t.getFormat(),Fw=t.getStyle(),Iw=t.__key)}Rw(t)}let x=``;for(let e=0;e<o;e++){let t=Gw.get(f[e]);if(t===void 0)return!1;let n;if(V(t)){let r=jw._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&V(t)&&!t.isInline()&&(x+=CS)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&L(353),Nw=r+e,vT(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Gw.get(t);if(e===void 0)break;let r=Xw||Hw.has(t)||Vw.has(t),i=Lw();if(r)yT(t,o);else{let n,r;if(V(e)){r=Kw.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&L(354,e.getType()),n=i}else n=e.getTextContent();Nw+=n,r!==void 0&&zw(r)}z(e)?Pw===null&&(Pw=e.getFormat(),Fw=e.getStyle(),Iw=e.__key):V(e)&&n<a-1&&!e.isInline()&&(Nw+=CS),Rw(i),t=e.__next,n++}s.__lexicalTextContent=Nw,s.__lexicalFirstTextKey=Iw,Nw=r+Nw;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)yT(r,o);else{let e=wT(r),t=fT(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}Qw(r,null)}let a=Gw.get(i);z(a)&&Pw===null&&(Pw=a.getFormat(),Fw=a.getStyle(),Iw=a.__key)}else{let r=QN(e,Uw),s=QN(t,Gw);if(r.length!==i&&L(227),s.length!==a&&L(228),i===0)a!==0&&pT(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&cT(t).size===0&&n.element.__lexicalLineBreak==null;$w(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Lw();if(e===r)u=xT(yT(r,a.element)),d++,f++;else{if(l===void 0&&(l=ST(n,f)),c===void 0)c=ST(t,d);else if(!c.has(e)){d++,Rw(i);continue}if(!l.has(e)){u=xT(wT(e)),Qw(e,a.element),d++,c.delete(e),Rw(i);continue}if(c.has(r)){let e=cM(jw,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=xT(yT(r,a.element)),d++,f++}else fT(r,a.withBefore(u??a.before)),f++}let o=Gw.get(r);o!==null&&z(o)?Pw===null&&(Pw=o.getFormat(),Fw=o.getStyle(),Iw=o.__key):V(o)&&f<=s&&!o.isInline()&&(Nw+=CS),Rw(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:jw.getElementByKey(t);pT(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&$w(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=Nw,s.__lexicalFirstTextKey=Iw,Nw=r+Nw}(e,t,aN(t,n,jw)),bM(t)||(r=t,Pw==null||Pw===r.__textFormat||Zw||r.setTextFormat(Pw),function(e){Fw==null||Fw===e.__textStyle||Zw||e.setTextStyle(Fw)}(t))}function vT(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Gw.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Gw.get(r);if(z(e))return Pw=e.getFormat(),void(Fw=e.getStyle())}}t.__lexicalFirstTextKey=Iw}function yT(e,t){let n=Uw.get(e),r=Gw.get(e);n!==void 0&&r!==void 0||L(61);let i=Xw||Hw.has(e)||Vw.has(e),a=cM(jw,e);if(n===r&&!i){let e;if(V(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&L(355,n.getType()),e=t,zw(a)}else e=n.getTextContent();return Nw+=e,a}if(n!==r&&i&&rM(Jw,Mw,Bw,r,`updated`),Yw.$updateDOM(r,n,a,jw)){let n=fT(e,null);return t===null&&L(62),t.replaceChild(n,a),Qw(e,null),n}if(V(n)){V(r)||L(334,e);let t=r.__indent;(Xw||t!==n.__indent)&&nT(a,t);let o=r.__format;(Xw||o!==n.__format)&&rT(a,o);let s=i&&(cT(r).size>0||cT(n).size>0)?dT(n,r,a):``;if(i){let e=Nw;if(_T(n,r,a),r.isInline()||(uA(r)||gT(0,r,a),hT(r,a)),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,Nw=e+s+t,a.__lexicalSlotTextLength=s.length}else(cT(r).size>0||cT(n).size>0)&&(a.__lexicalSlotTextLength=0)}else{let e=a.__lexicalTextContent;typeof e!=`string`&&L(356,n.getType()),Nw+=e,zw(a)}if((Xw||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(iT(a,r),uA(r)&&!Xw))for(let e of r.getChildren())V(e)&&iT(cM(jw,e.getKey()),e)}else{let t=r.getTextContent();if(cA(r)){let t=r.decorate(jw,Aw);t!==null&&bT(e,t),i&&(cT(r).size>0||cT(n).size>0)&&dT(n,r,a)}Nw+=t}if(!Zw&&uA(r)){let e=r.getLatest();if(e.__cachedText!==Nw){let t=e.getWritable();t.__cachedText=Nw,r=t}}return Yw.$decorateDOM(r,n,a,jw),Ow(r),a}function bT(e,t){let n=jw._pendingDecorators,r=jw._decorators;if(n===null){if(r[e]===t)return;n=Pj(jw)}n[e]=t}function xT(e){let t=e.nextSibling;return t!==null&&t===jw._blockCursorElement&&(t=t.nextSibling),t}function ST(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function CT(e,t,n,r,i,a){Nw=``,Pw=null,Fw=null,Iw=null,Xw=r===2,jw=n,Aw=n._config,Yw=n._config.dom||XA,Mw=n._nodes,Bw=jw._listeners.mutation,Vw=i,Hw=a,Uw=e._nodeMap,Ww=e,Gw=t._nodeMap,Zw=t._readOnly,Kw=QS(n._keyToDOMMap),qw=function(){let e=new Map,t=t=>{for(let n of t){let t=Gw.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Vw.keys()),t(Hw),e}();let o=new Map;return Jw=o,yT(`root`,null),jw=void 0,Mw=void 0,Vw=void 0,Hw=void 0,Uw=void 0,Ww=void 0,Gw=void 0,Aw=void 0,Kw=void 0,qw=void 0,Jw=void 0,Yw=XA,o}function wT(e){let t=Kw.get(e);return t===void 0&&L(75,e),t}function TT(e){return()=>{}}function R(e){return{type:e}}var ET=R(`SELECTION_CHANGE_COMMAND`),DT=R(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),OT=R(`CLICK_COMMAND`),kT=R(`BEFORE_INPUT_COMMAND`),AT=R(`INPUT_COMMAND`),jT=R(`COMPOSITION_START_COMMAND`),MT=R(`COMPOSITION_END_COMMAND`),NT=R(`DELETE_CHARACTER_COMMAND`),PT=R(`INSERT_LINE_BREAK_COMMAND`),FT=R(`INSERT_PARAGRAPH_COMMAND`),IT=R(`CONTROLLED_TEXT_INSERTION_COMMAND`),LT=R(`PASTE_COMMAND`),RT=R(`REMOVE_TEXT_COMMAND`),zT=R(`DELETE_WORD_COMMAND`),BT=R(`DELETE_LINE_COMMAND`),VT=R(`FORMAT_TEXT_COMMAND`),HT=R(`SET_TEXT_FORMAT_COMMAND`),UT=R(`UNDO_COMMAND`),WT=R(`REDO_COMMAND`),GT=R(`KEYDOWN_COMMAND`),KT=R(`KEY_ARROW_RIGHT_COMMAND`),qT=R(`MOVE_TO_END`),JT=R(`KEY_ARROW_LEFT_COMMAND`),YT=R(`MOVE_TO_START`),XT=R(`KEY_ARROW_UP_COMMAND`),ZT=R(`KEY_ARROW_DOWN_COMMAND`),QT=R(`KEY_ENTER_COMMAND`),$T=R(`KEY_SPACE_COMMAND`),eE=R(`KEY_BACKSPACE_COMMAND`),tE=R(`KEY_ESCAPE_COMMAND`),nE=R(`KEY_DELETE_COMMAND`),rE=R(`KEY_TAB_COMMAND`),iE=R(`INSERT_TAB_COMMAND`),aE=R(`INDENT_CONTENT_COMMAND`),oE=R(`OUTDENT_CONTENT_COMMAND`),sE=R(`DROP_COMMAND`),cE=R(`FORMAT_ELEMENT_COMMAND`),lE=R(`DRAGSTART_COMMAND`),uE=R(`DRAGOVER_COMMAND`),dE=R(`DRAGEND_COMMAND`),fE=R(`COPY_COMMAND`),pE=R(`CUT_COMMAND`),mE=R(`SELECT_ALL_COMMAND`),hE=R(`CLEAR_EDITOR_COMMAND`),gE=R(`CLEAR_HISTORY_COMMAND`),_E=R(`CAN_REDO_COMMAND`),vE=R(`CAN_UNDO_COMMAND`),yE=R(`FOCUS_COMMAND`),bE=R(`BLUR_COMMAND`),xE=R(`KEY_MODIFIER_COMMAND`);function SE(e,t){return{...t,[LS]:e}}var CE=SE(`metaKey`,{ctrlKey:!lS,metaKey:lS}),wE=SE(`altKey`,{altKey:lS,ctrlKey:!lS}),TE=[[`altKey`,1],[`ctrlKey`,2],[`metaKey`,4],[`shiftKey`,8]];function EE(e,t,n){let r=e.get(t);r?r.push(n):e.set(t,[n])}var DE=class{byKey=new Map;byCode=new Map;add(e){let{key:t,modifiers:n={}}=e;t.length>0||L(399);let r=t.toLowerCase();for(let i of function(e){let t=[0];for(let[n,r]of TE){let i=e[n]||!1;i===`any`?t=t.concat(t.map(e=>e|r)):i&&(t=t.map(e=>e|r))}return t}(n))EE(this.byKey,`${i}:${r}`,e),t.length===1&&(/[0-9]/.test(t)?EE(this.byCode,`${i}:Digit${t}`,e):/[a-z]/.test(r)&&EE(this.byCode,`${i}:Key${r.toUpperCase()}`,e));return this}matches(e){let t=e.key;if(!t)return[];let n=function(e){let t=0;for(let[n,r]of TE)e[n]&&(t|=r);return t}(e),r=this.byKey.get(`${n}:${t.toLowerCase()}`),i=r?r.slice():[];if(this.byCode.size>0&&!(t.length===1&&t.charCodeAt(0)<=127)){let t=this.byCode.get(`${n}:${e.code}`);t&&i.push(...t)}return i}match(e){return this.matches(e)[0]}};function OE(e){let t=new DE;for(let n of e)t.add(n);return t}function kE(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function AE(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}var jE=Object.freeze({}),ME;function NE(){if(ME!==void 0)return ME;let e=[[`keydown`,iD],[`pointerdown`,UE],[`compositionstart`,QE],[`compositionend`,rD],[`input`,XE],[`click`,HE],[`cut`,jE],[`copy`,jE],[`dragstart`,jE],[`dragover`,jE],[`dragend`,jE],[`paste`,jE],[`focus`,jE],[`blur`,jE],[`drop`,jE]];return fS&&e.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||uS&&sM(t)||n!==`insertCompositionText`&&Qk(t,()=>{JE(e,t)||H(t,kT,e)},{event:e})}(e,t)]),ME=e,e}var PE=new WeakMap,FE=new WeakMap,IE=kE(e=>(e.addEventListener(`selectionchange`,pD),()=>e.removeEventListener(`selectionchange`,pD)));function LE(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=Fk(),u;if(a!==void 0)u=a;else{let e=DM(gM(l));u=e===null?null:LM(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!z(c)||(!i&&(!fS||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||Vj(n))&&o.offset!==s.offset&&!c.isComposing()||_j(c)||c.isDirty()&&m>1||(i||!fS)&&p!==null&&!c.isComposing()&&d!==lN(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=gj(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(z(t)||V(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function RE(e,t){return vj(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function zE(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=LM(e,t._rootElement),s=t._inputState,c=s.isSelectionChangeFromDOMUpdate;if(c){s.isSelectionChangeFromDOMUpdate=!1;let e=s.selectionChangeFromDOMUpdatePoints;if(s.selectionChangeFromDOMUpdatePoints=null,RE(r,i)&&RE(a,o)&&!s.postDeleteSelectionToRestore&&(e===null||e.anchorNode===r&&e.anchorOffset===i&&e.focusNode===a&&e.focusOffset===o))return}Qk(t,()=>{if(!n)return void Rj(null);if(!dj(t,r,a))return;let l=nk();if(s.postDeleteSelectionToRestore&&B(l)&&l.isCollapsed()){let e=l.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),Rj(l))}if(s.postDeleteSelectionToRestore=null,B(l)){let n=l.anchor,c=n.getNode();if(l.isCollapsed()){e.type===`Range`&&r===a&&(l.dirty=!0);let i=gM(t).event,o=i?i.timeStamp:performance.now(),{format:u,style:d,offset:f,key:p,timeStamp:m}=s.collapsedSelectionFormat,h=Ij(),g=!1===t.isComposing()&&h.getTextContent()===``;if(o<m+200&&n.offset===f&&n.key===p)BE(l,u,d);else if(n.type===`text`)z(c)||L(141),VE(l,c);else if(n.type===`element`&&!g){V(c)||L(259);let e=n.getNode();e.isEmpty()?function(e,t){BE(e,t.getTextFormat(),t.getTextStyle())}(l,e):BE(l,l.format,``)}}else{let e=n.key,t=l.focus.key,r=l.getNodes(),a=r.length,s=l.isBackward(),c=s?o:i,u=s?i:o,d=s?t:e,f=s?e:t,p=xS,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(z(t)&&n!==0&&!(e===0&&t.__key===d&&c===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}l.format=m?p:0}}let u=rk();(c||(l===null?u!==null:l.dirty||!B(l)||!l.is(u)))&&H(t,ET)})}function BE(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function VE(e,t){BE(e,t.getFormat(),t.getStyle())}function HE(e,t){Qk(t,()=>{let n=nk(),r=DM(gM(t)),i=rk();if(r){if(B(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!uA(t)&&Ij().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=LM(r,t._rootElement).anchorNode;(YM(n)||vj(n))&&Rj(tk(i,r,t,e))}}if(uS&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(YM(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=tk(i,r,t,e);s===null?r.removeAllRanges():Rj(s)}}H(t,OT,e)})}function UE(e,t){let n=WM(e),r=e.pointerType;XM(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Qk(t,()=>{xN(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}function WE(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function GE(e){let{lastKeyCode:t}=Fk()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`\n`:t===`Tab`?`\t`:null;if(!n)return;let r=nk();if(!B(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!z(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`\n`){if(mS)return;if(bA(e))e.selectEnd();else if(!e){let e=ZN(i,XO),t=e&&e.getNextSibling();V(t)&&t.selectStart()}}else n===`\t`?vO(e)&&e.selectEnd():z(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else i.getTextContent()[a]===n&&i.select(a+1,a+1)}function KE(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function qE(e){KE(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>KE(e),0)}function JE(e,t){let n=WM(e);if(YM(n)&&xN(n,t))return!0;let r=t.getRootElement();if(r===null)return!1;let i=UM(r.ownerDocument);return i!==null&&r.contains(i)&&xN(i,t)}function YE(e){let t=e.inputType,n=WE(e),r=Fk(),i=r._inputState,a=nk();if(t===`insertText`&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(KE(i),e.preventDefault(),B(a)&&!a.isCollapsed()){let e=a.isBackward()?a.anchor:a.focus;a.anchor.set(e.key,e.offset,e.type),a.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(a===null){let e=rk();if(!B(e))return!0;Rj(e.clone())}if(B(a)){let t=a.anchor.key===a.focus.key;if(function(e,t){return e.lastKeyCode===`MediaLast`&&t<e.lastKeyDownTimeStamp+30}(i,e.timeStamp)&&r.isComposing()&&t){if(Dj(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Qk(r,()=>{Dj(null)})},30),B(a)){let e=a.anchor.getNode();e.markDirty(),z(e)||L(142),VE(a,e)}}else{if(Dj(null),mS&&n!==null&&!n.collapsed&&(a.applyDOMRange(n),!a.isCollapsed()))return e.preventDefault(),a.removeText(),!0;e.preventDefault();let o=a.anchor.getNode(),s=o.getTextContent(),c=o.canInsertTextAfter(),l=a.anchor.offset===0&&a.focus.offset===s.length,u=vS&&t&&!l&&c;if(u&&a.isCollapsed()&&(u=!cA(oM(a.anchor,!0))),!u){H(r,NT,!0);let e=nk();vS&&B(e)&&e.isCollapsed()&&(i.postDeleteSelectionToRestore=e,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!B(a))return t!==`historyUndo`&&t!==`historyRedo`||(e.preventDefault(),H(r,t===`historyUndo`?UT:WT)),!0;let o=e.data;i.unprocessedBeforeInputData!==null&&Gj(!1,r,i.unprocessedBeforeInputData),a.dirty&&i.unprocessedBeforeInputData===null||!a.isCollapsed()||uA(a.anchor.getNode())||n===null||a.applyDOMRange(n),i.unprocessedBeforeInputData=null;let s=a.anchor,c=a.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`\n`)e.preventDefault(),H(r,PT,!1);else if(o===CS)e.preventDefault(),H(r,FT);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else o!=null&&LE(a,n,o,e.timeStamp,!0)?(e.preventDefault(),H(r,IT,o),GE(o)):i.unprocessedBeforeInputData=o;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:H(r,IT,e),GE((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:{let t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;let n=r._compositionKey;Dj(null),t||H(r,IT,e),tD(n);break}case`insertLineBreak`:Dj(null),H(r,PT,!1);break;case`insertParagraph`:Dj(null),i.isInsertLineBreak&&!mS?(i.isInsertLineBreak=!1,H(r,PT,!1)):H(r,FT);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:H(r,LT,e);break;case`deleteByComposition`:(function(e,t){return e!==t||V(e)||V(t)||!gj(e)||!gj(t)})(l,u)&&H(r,RT,e);break;case`deleteByDrag`:fM(ND),H(r,RT,e);break;case`deleteByCut`:H(r,RT,e);break;case`deleteContent`:H(r,NT,!1);break;case`deleteWordBackward`:H(r,zT,!0);break;case`deleteWordForward`:H(r,zT,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:H(r,BT,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:H(r,BT,!1);break;case`formatStrikeThrough`:H(r,VT,`strikethrough`);break;case`formatBold`:H(r,VT,`bold`);break;case`formatItalic`:H(r,VT,`italic`);break;case`formatUnderline`:H(r,VT,`underline`);break;case`historyUndo`:H(r,UT);break;case`historyRedo`:H(r,WT)}return!0}function XE(e,t){e.stopPropagation();let n=t._inputState;KE(n),Qk(t,()=>{JE(e,t)||t.dispatchCommand(AT,e)},{event:e}),n.unprocessedBeforeInputData=null}function ZE(e){let t=Fk(),n=t._inputState,r=nk(),i=e.data,a=WE(e),o=!1;if(i!=null&&B(r)){let s=DM(gM(t)),c=s===null?null:LM(s,t._rootElement),l=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&!t.isComposing();l&&(n.hadOrphanedCompositionEvents=!0);let u=r.anchor.getNode(),d=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&t.isComposing()&&z(u)&&_j(u);if(!l&&!d&&LE(r,a,i,e.timeStamp,!1,c)){if(o=!0,n.compositionPhase===`ending-firefox`){let e=nD(t,i);if(n.compositionPhase=`idle`,e)return fM(FD),zj(),!0}let a=r.anchor.getNode();if(s===null||c===null)return!0;let l=r.isBackward(),u=l?r.anchor.offset:r.focus.offset,d=l?r.focus.offset:r.anchor.offset;fS&&!r.isCollapsed()&&z(a)&&c.anchorNode!==null&&a.getTextContent().slice(0,u)+i+a.getTextContent().slice(u+d)===Wj(c.anchorNode)||H(t,IT,i);let f=i.length;uS&&f>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(r.anchor.offset-=f,r._cachedNodes=null,r._cachedIsBackward=null),vS&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,Dj(null))}}return o||(Gj(!1,t,i===null?void 0:i),n.compositionPhase===`ending-firefox`&&(nD(t,i||void 0),fM(`composition-end`),n.compositionPhase=`idle`)),zj(),!0}function QE(e,t){H(t,jT,e)}function $E(e){let t=Fk(),n=t._inputState,r=nk();if(B(r)&&!t.isComposing()){n.compositionPhase=`composing`,n.hadOrphanedCompositionEvents=!1;let i=r.anchor,a=r.anchor.getNode();if(Dj(i.key),fM(`composition-start`),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type===`element`||!r.isCollapsed()||!vS&&(a.getFormat()!==r.format||z(a)&&a.getStyle()!==r.style)||z(a)&&(_j(a)||i.offset===0&&!a.canInsertTextBefore()||i.offset===a.getTextContentSize()&&!a.canInsertTextAfter())){H(t,IT,wS);let e=nk();B(e)&&Dj(e.anchor.key)}}return!0}function eD(e){let t=Fk();return t._inputState.compositionPhase=`idle`,nD(t,e.data),fM(FD),!0}function tD(e){if(e===null)return;let t=kj(e);if(!z(t)||t.getType()===`text`||_j(t)||!t.isAttached())return;let n=nk(),r=B(n)&&n.anchor.key===e?n.anchor.offset:null,i=pO(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){let e=Math.min(r,i.getTextContentSize());i.select(e,e)}}function nD(e,t){let n=e._compositionKey;if(Dj(null),n!==null&&t!=null){if(t===``){let t=kj(n),r=e.getElementByKey(n),i=r!==null&&z(t)?lN(t,r,e):null;if(i!==null&&i.nodeValue!==null&&z(t)){let n=DM(gM(e)),r=n&&LM(n,e._rootElement),a=null,o=null;r!==null&&r.anchorNode===i&&(a=r.anchorOffset,o=r.focusOffset),Kj(t,i.nodeValue,a,o,!0)}return tD(n),!1}if(t[t.length-1]===`\n`){let t=nk();if(B(t)||kO(t)){if(B(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return H(e,QT,null),tD(n),!1}}let r=kj(n);if(r!==null&&z(r)&&_j(r)){r.markDirty();let e=nk(),i=r.getTextContentSize(),a=B(e)&&e.anchor.key===n?e.anchor.offset:i;return r.select(a,a).insertText(t),!0}}return Gj(!0,e,t),tD(n),!1}function rD(e,t){let n=t._inputState;uS?n.compositionPhase=`ending-firefox`:mS||!gS&&!yS?H(t,MT,e):(n.compositionPhase=`ending-safari`,n.compositionEndData=e.data)}function iD(e,t){let n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!==`Backspace`&&KE(n),t.isComposing()||H(t,GT,e)}var aD={altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:`any`},oD={ctrlKey:!0},sD={metaKey:!0},cD={shiftKey:`any`},lD={altKey:`any`,shiftKey:`any`};function uD(e){let t=Fk(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase===`ending-safari`){let r=function(e){return e.key===`Backspace`}(e);if(r&&Qk(t,()=>{nD(t,n.compositionEndData)}),n.compositionPhase=`idle`,n.compositionEndData=``,r)return!0}let r=t._keyDownShortcuts;r===null&&(r=OE(function(){let e=(e,t,n)=>({key:e,modifiers:t,onMatch:(e,t)=>{H(t,n,e)}}),t=(e,t,n,r)=>({key:e,modifiers:t,onMatch:(e,t)=>{e.preventDefault(),H(t,n,r)}}),n=(e,t)=>({key:`Enter`,modifiers:e,onMatch:(e,n)=>{n._inputState.isInsertLineBreak=t,H(n,QT,e)}}),r=(e,t)=>({key:e,modifiers:CE,onMatch:(e,n)=>{let r=n._editorState._selection;r===null||B(r)||(e.preventDefault(),H(n,t,e))}});return[e(`ArrowRight`,cD,KT),e(`ArrowLeft`,cD,JT),e(`ArrowUp`,lD,XT),e(`ArrowDown`,lD,ZT),n({...aD,shiftKey:!0},!0),n({...aD,shiftKey:!1},!1),e(` `,aD,$T),{key:`Backspace`,modifiers:cD,onMatch:(e,t)=>{H(t,eE,e)&&qE(t._inputState)}},e(`Escape`,aD,tE),e(`Delete`,{},nE),t(`Backspace`,wE,zT,!0),t(`Delete`,wE,zT,!1),t(`b`,CE,VT,`bold`),t(`u`,CE,VT,`underline`),t(`i`,CE,VT,`italic`),e(`Tab`,cD,rE),t(`z`,CE,UT,void 0),t(`z`,{...CE,shiftKey:!0},WT,void 0),...lS?[{key:`o`,modifiers:oD,onMatch:(e,t)=>{e.preventDefault(),t._inputState.isInsertLineBreak=!0,H(t,PT,!0)}},e(`ArrowLeft`,{metaKey:!0,...cD},YT),e(`ArrowRight`,{metaKey:!0,...cD},qT),t(`h`,oD,NT,!0),t(`d`,oD,NT,!1),t(`Backspace`,sD,BT,!0),t(`Delete`,sD,BT,!1),t(`k`,oD,BT,!1)]:[e(`Home`,cD,YT),e(`End`,cD,qT),t(`y`,oD,WT,void 0)],{key:`a`,modifiers:CE,onMatch:(e,t)=>{e.preventDefault(),H(t,mE,e)&&qE(t._inputState)}},r(`c`,fE),r(`x`,pE)]}()),t._keyDownShortcuts=r);let i=r.match(e);return i&&i.onMatch(e,t),function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(xE,e),!0}function dD(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var fD=new Map;function pD(e){let t=OM(e.target);if(t===null)return;let n=uM(e.target),r=null,i=null,a=n===null?void 0:FE.get(n);if(n!==null){if(a!==void 0){let e=a.editors,n=a.hasShadowEditor;if(n===void 0){n=!1;for(let t of e)if(t._rootElement!==null&&kM(t._rootElement.getRootNode())){n=!0;break}a.hasShadowEditor=n}if(n){let n=null,a=null;for(let o of e){let e=o._rootElement;if(e===null)continue;let s=LM(t,e).anchorNode;if(s!==null&&pj(s)===o){if(kM(e.getRootNode())){r=o,i=s;break}n===null&&(n=o,a=s)}}r===null&&n!==null&&(r=n,i=a)}else{let e=t.anchorNode;e===null||YM(e)&&e.shadowRoot!==null||(r=pj(e),r!==null&&(i=e))}}if(r===null){let e=UM(n);r=e===null?null:pj(e)}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(a!==void 0)for(let e of a.editors)e._inputState.isSelectionChangeFromMouseDown=!1;Qk(r,()=>{let n=rk(),a=i??LM(t,r._rootElement).anchorNode;(YM(a)||vj(a))&&Rj(tk(n,t,r,e))})}let o=Hj(r),s=o[o.length-1],c=s._key,l=fD.get(c),u=l||s;u!==r&&zE(t,u,!1),zE(t,r,!0),r===s?l&&fD.delete(c):fD.set(c,r)}function mD(e){e._lexicalHandled=!0}function hD(e){return!0===e._lexicalHandled}var gD=TT();function _D(e){let t=PE.get(e);if(t===void 0)return void gD();let n=FE.get(t);if(n===void 0)return void gD();PE.delete(e);let r=mj(e);fj(r)?(function(e){if(e._parentEditor!==null){let t=Hj(e),n=t[t.length-1]._key;fD.get(n)===e&&fD.delete(n)}else fD.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&L(198);let i=dD(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function vD(e,t,n){jk();let r=e.__key,i=e.getParent();if(i===null)return void(rP(e)!==null&&L(367,r,String(rP(e))));let a=function(e){let t=nk();if(!B(t)||!V(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return mM(i,e)&&n.set(e.__key,0,`element`),mM(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(B(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(sk(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(sk(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else kO(a)&&t&&e.isSelected()&&e.selectPrevious();if(B(a)&&t&&!o&&ik(a,i)){let t=e.getIndexWithinParent();wj(e),ak(a,i,t,-1)}else wj(e);n||bM(i)||i.canBeEmpty()||!i.isEmpty()||vD(i,t),t&&a&&uA(i)&&i.isEmpty()&&i.selectEnd()}function yD(e){return e}var bD=Symbol.for(`ephemeral`);function xD(e){return e[bD]||!1}var SD={configurable:!0,enumerable:!1,value:void 0,writable:!0},CD=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=UN(this);return e===void 0&&L(64,this.name),e}static clone(e){L(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||$N(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,\"__state\",SD),Object.defineProperty(this,Ew,SD),Cj(this,e)}getType(){return this.__type}isInline(){L(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=kj(e);if(t===null)break;e=t.__parent===null?rP(t):t.__parent}return!1}isSelected(e){let t=e||nk();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(z(this))return n;if(B(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(cA(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:kj(e)}getParentOrThrow(){let e=this.getParent();return e===null&&L(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(bM(t)||rP(e)!==null)return V(e)||e===this&&cA(e)||L(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&L(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:kj(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:kj(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=V(this)?this:this.getParent(),n=V(e)?e:e.getParent(),r=t&&n?rF(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=rF(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?eF(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&L(279),!1)))}isParentOf(e){return mM(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=V(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&L(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=Fk()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(xD(this))return this;let e=kj(this.__key);return e===null&&L(113),e}getWritable(){if(xD(this))return this;jk();let e=Nk(),t=Fk(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=nk();if(o!==null&&o.setCachedNodes(null),a.has(r))return Ej(i),i;let s=pN(i);return a.add(r),Ej(s),n.set(r,s),s}getTextContent(){return _P(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){L(70)}updateDOM(e,t,n){L(71)}getDOMSlot(e){return new WS(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(e=!1){let t=function(e,t){let n=TN(wN(e.constructor)),{generated:r,isCompactDefault:i}=n,a=r===null?void 0:t?r.exportCompactJSON:r.exportJSON;return a===void 0?function(e,t,n){let r=n?{type:e.__type}:{};return V(e)&&(r.children=[]),(function(e,t,n,r){for(let i=0;i<t.length;i++){let a=t[i];if(r&&a.derived)continue;let o;if(a.kind===`ownField`){let t=RN(e)[a.field];o=a.getterTable===void 0?t:LC(a.getterTable,t)?a.getterTable[t]:void 0}else o=a.getter.call(e);a.kind===`ownField`&&a.when!==void 0&&(!zN(a,o)&&a.when.call(e)||(o=void 0)),r&&zN(a,o)||(n[a.key]=o)}})(e,t,r,n),n||(r.type=e.__type,r.version=1),r}(e,n.getters,t):t?a(e,i):a(e)}(this,e),n=this.__state?this.__state.toJSON():void 0;return n!==void 0&&Object.assign(t,n),t}static importJSON(e){L(18,this.name)}updateFromJSON(e){return HN(hw(this,e),e)}static transform(){return null}remove(e){vD(this,!0,e)}replace(e,t){jk();let n=nk();n!==null&&(n=n.clone()),CM(this,e);let r=this.getLatest(),i=this.__key,a=iP(r);a!==null&&L(400,i,r.getType(),a.getKey(),a.getType());let o=e.__key,s=e.getWritable(),c=this.getParentOrThrow().getWritable(),l=c.__size,u=s.getParent(),d=u!==null&&B(n)&&ik(n,u),f=d?s.getIndexWithinParent():-1;wj(s),d&&u!==null&&B(n)&&ak(n,u,f,-1);let p=r.getPreviousSibling(),m=r.getNextSibling(),h=r.__prev,g=r.__next,_=r.__parent;vD(r,!1,!0),p===null?c.__first=o:p.getWritable().__next=o,s.__prev=h,m===null?c.__last=o:m.getWritable().__prev=o,s.__next=g,s.__parent=_,c.__size=u!==null&&u.is(c)?l-1:l;let v=0;if(t&&(V(this)&&V(s)||L(139),v=s.getChildrenSize(),s.splice(v,0,this.getChildren())),B(n)){Rj(n);let e=n.anchor,r=n.focus;e.key===i&&(t&&e.type===`element`?e.set(s.__key,v+e.offset,`element`):SO(e,s)),r.key===i&&(t&&r.type===`element`?r.set(s.__key,v+r.offset,`element`):SO(r,s))}return Oj()===i&&Dj(o),s}insertAfter(e,t=!0){jk(),CM(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.getParent(),a=nk(),o=!1,s=!1,c=-1;if(i!==null&&t&&B(a)&&ik(a,i)){let t=i.__key,n=a.anchor,r=a.focus;c=e.getIndexWithinParent(),o=n.type===`element`&&n.key===t&&n.offset===c+1,s=r.type===`element`&&r.key===t&&r.offset===c+1}wj(r),c!==-1&&i!==null&&B(a)&&ak(a,i,c,-1);let l=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=r.__key,f=n.__next;if(l===null?u.__last=d:l.getWritable().__prev=d,u.__size++,n.__next=d,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&B(a)){let e=u.__key;if(o||s||ik(a,u)){let t=this.getIndexWithinParent();ak(a,u,t+1),o&&a.anchor.set(e,t+2,`element`),s&&a.focus.set(e,t+2,`element`)}}return e}insertBefore(e,t=!0){jk(),CM(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.__key,a=nk(),o=r.getParent(),s=o!==null&&t&&B(a)&&ik(a,o),c=s?r.getIndexWithinParent():-1;wj(r),s&&o!==null&&B(a)&&ak(a,o,c,-1);let l=this.getPreviousSibling(),u=this.getParentOrThrow().getWritable(),d=n.__prev,f=t&&B(a)&&ik(a,u),p=f?this.getIndexWithinParent():-1;return l===null?u.__first=i:l.getWritable().__next=i,u.__size++,n.__prev=i,r.__prev=d,r.__next=n.__key,r.__parent=n.__parent,f&&B(a)&&ak(a,u,p),e}isParentRequired(){return!1}createParentElementNode(){return GA()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){jk();let n=iP(this);if(n!==null)return n.selectPrevious(e,t);let r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(V(r))return r.select();if(!z(r)){let e=r.getIndexWithinParent()+1;return i.select(e,e)}return r.select(e,t)}selectNext(e,t){jk();let n=iP(this);if(n!==null)return n.selectNext(e,t);let r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(V(r))return r.select(0,0);if(!z(r)){let e=r.getIndexWithinParent();return i.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function wD(e){return e instanceof CD}var TD=`historic`,ED=`history-push`,DD=`history-merge`,OD=`paste`,kD=`collaboration`,AD=`skip-collab`,jD=`skip-scroll-into-view`,MD=`skip-dom-selection`,ND=`skip-selection-focus`,PD=`composition-start`,FD=`composition-end`,ID=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function LD(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!ID.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function RD(e,t,n,r,i){let a=LD(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}var zD=e=>{let t=vC(e,`format`),n=yC(e,`format`),r=xC(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=RD(t.indent,0,0,1/0),e.__textFormat=LD(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function BD(e,t){e.__detail=t.__detail,e.__format=t.__format,e.__mode=t.__mode,e.__style=t.__style,e.__text=t.__text}var VD=e=>{let t=vC(e,`mode`),n=bC(e,`detail`,0),r=bC(e,`format`,0),i=yC(e,`mode`),a=xC(e,`mode`);return{exportJSON:function(e){return{detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__detail;r!==void 0&&r!==0&&(n.detail=r);let i=e.__format;i!==void 0&&i!==0&&(n.format=i);let a=t[e.__mode];a!==void 0&&a!==`normal`&&(n.mode=a);let o=e.__style;o!==void 0&&o!==``&&(n.style=o);let s=e.__text;return s!==void 0&&s!==``&&(n.text=s),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:LD(o,0);let s=t.format;e.__format=typeof s==`string`&&s in r?r[s]:LD(s,0);let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;return e.__text=typeof u==`string`?u:``,e},afterCloneFrom:BD}},HD=e=>{let t=vC(e,`format`),n=yC(e,`format`),r=xC(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=RD(t.indent,0,0,1/0),e.__textFormat=LD(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}},UD=()=>({exportJSON:function(e){return{type:e.__type,version:1}},exportCompactJSON:function(e){return{type:e.__type}}}),WD=e=>{let t=vC(e,`mode`),n=bC(e,`format`,0);return{exportJSON:function(e){return{detail:e.__detail,mode:t[e.__mode],text:e.__text,format:e.__format,style:e.__style,type:e.__type,version:1}},exportCompactJSON:function(e){let t={type:e.__type},n=e.__format;n!==void 0&&n!==0&&(t.format=n);let r=e.__style;return r!==void 0&&r!==``&&(t.style=r),t},updateFromJSON:function(e,t){let r=t.format;e.__format=typeof r==`string`&&r in n?n[r]:LD(r,0);let i=t.style;return e.__style=typeof i==`string`?i:``,e}}},GD=`!important`;function KD(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`\"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function qD(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===GD?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function JD(e,t){for(let n in t){let r=t[n];r==null?e.removeProperty(n):qD(e,n,r)}}function YD(e,t,n=``){if(t===n)return;let r=KD(n),i=KD(t);for(let t in i)delete r[t],qD(e,t,i[t]);for(let t in r)e.removeProperty(t)}var XD=YC()({detail:tw(XC(HC(),jS),{field:`__detail`}),format:tw(XC(HC(),AS),{field:`__format`}),mode:tw(WC([`normal`,`token`,`segmented`]),{field:`__mode`,getterTable:IS,setterTable:FS}),style:tw(BC(),{field:`__style`}),text:tw(BC(),{field:`__text`,getter:`getTextContent`,setter:`setTextContent`})});function ZD(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function QD(e,t){return 1&t?`strong`:2&t?`em`:`span`}function $D(e,t,n,r,i){let a=r.classList,o=nM(i,`base`);o!==void 0&&a.add(...o),o=nM(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in AS){let r=AS[e];if(o=nM(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}tM(r,`class`)}function eO(e,t,n){let r=n.isComposing(),i=e+(r?SS:``),a=rN(),o=iN(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(PM().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||uS){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);t!==0&&c.deleteData(e,t),c.insertData(e,n)}else c.nodeValue=i}}function tO(e,t,n,r,i,a){eO(i,e,t);let o=a.theme.text;o!==void 0&&$D(0,0,r,e,o)}function nO(e,t){let n=PM().createElement(t);return n.appendChild(e),n}function rO(e){return e!=null&&!0===e.__isInlineFormattable}var iO=class extends CD{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{extends:CD,generated:VD,importDOM:{\"#text\":()=>({conversion:lO,priority:0}),b:()=>({conversion:oO,priority:0}),code:()=>({conversion:fO,priority:0}),em:()=>({conversion:fO,priority:0}),i:()=>({conversion:fO,priority:0}),mark:()=>({conversion:fO,priority:0}),s:()=>({conversion:fO,priority:0}),span:()=>({conversion:aO,priority:0}),strong:()=>({conversion:fO,priority:0}),sub:()=>({conversion:fO,priority:0}),sup:()=>({conversion:fO,priority:0}),u:()=>({conversion:fO,priority:0})},json:XD})}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return IS[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Oj()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=AS[e];return(this.getFormat()&t)!==0}isSimpleText(){let e=this.getLatest();return e.__type===`text`&&e.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return xj(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=ZD(0,n),i=QD(0,n),a=r===null?i:r,o=PM().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=PM().createElement(i),o.appendChild(s)),tO(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&YD(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=ZD(0,i),s=ZD(0,a),c=QD(0,i),l=QD(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??L(48);let i=PM().createElement(l);return tO(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??L(49)),eO(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&$D(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(YD(t.style,p,f),tM(t,`style`)),!1}exportDOM(e){let{element:t}=super.exportDOM(e);return YM(t)||L(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=nO(t,`b`)),this.hasFormat(`italic`)&&(t=nO(t,`i`)),this.hasFormat(`strikethrough`)&&(t=nO(t,`s`)),this.hasFormat(`underline`)&&(t=nO(t,`u`)),{element:t}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?AS[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?jS[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=xj(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=FS[e];if(this.getLatest().__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.getLatest().__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){jk();let n=e,r=t,i=nk(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!B(i))return ZO(o,n,o,r,`text`,`text`);{let e=Oj();e!==i.anchor.key&&e!==i.focus.key||Dj(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=nk();if(r&&B(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){jk();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Oj(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=nk();if(B(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=pO(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=bw(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=pO(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=bw(t,n);let a=n.__key;i===r&&Dj(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Ej(t),n!==null&&Ej(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),B(v)&&ak(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||L(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Oj()===r&&Dj(n);let o=nk();if(B(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&ck(i,t,n,e,a),s!==null&&s.key===r&&ck(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function aO(e){return{forChild:mO(e.style),node:null}}function oO(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:mO(t.style,n?void 0:`bold`),node:null}}var sO=new WeakMap;function cO(e){if(!YM(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function lO(e){let t=e;e.parentElement===null&&L(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=sO.get(n))===void 0&&!cO(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)sO.set(r[e],i);return i}(t)!==null)return{node:mk(n)};if(n=n.replace(/\\r/g,``).replace(/[ \\t\\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=uO(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \\t\\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=uO(e,!0))!==null;)if((e.textContent||``).replace(/^( |\\t|\\r?\\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:pO(n)}}function uO(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,YM(n)){let e=n.style.display;if(e===``&&!$M(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(vj(n))return n;if(n.nodeName===`BR`)return null}}var dO={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function fO(e){let t=dO[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:mO(e.style,t),node:null}}function pO(e=``){return SM(new iO(e))}function z(e){return e instanceof iO}function mO(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign,l=e.textTransform;return e=>z(e)||rO(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),l!==`lowercase`&&l!==`uppercase`&&l!==`capitalize`||e.hasFormat(l)||e.toggleFormat(l),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var hO=YC()({detail:nw(HC(2),{getter:{field:`__detail`},setter:null}),mode:nw(WC([`normal`]),{getter:{field:`__mode`,getterTable:{0:`normal`}},setter:null}),text:nw(BC(`\t`),{getter:{field:`__text`,method:`getTextContent`},setter:null})}),gO=class extends iO{$config(){return this.config(`tab`,{extends:iO,generated:WD,json:hO})}constructor(e=void 0){super(`\t`,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=nM(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(`\t`)}spliceText(e,t,n,r){return n===``&&t===0||n===`\t`&&t===1||L(286),this}setDetail(e){return e!==2&&L(127),this}setMode(e){return e!==`normal`&&L(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function _O(){return SM(new gO)}function vO(e){return e instanceof gO}var yO=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:$P(NA(wA(this,`next`)),NA(wA(e,`next`)))<0}getNode(){let e=kj(this.key);return e===null&&L(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,Ak()||(Oj()===a&&Dj(e),i!==null&&(i.setCachedNodes(null),B(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function bO(e,t,n){return new yO(e,t,n)}function xO(e,t){let n=t.__key,r=e.offset,i=`element`;if(z(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!V(t)){let e=t.getNextSibling();if(z(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function SO(e,t){if(V(t)){let n=t.getLastDescendant();V(n)||z(n)?xO(e,n):xO(e,t)}else xO(e,t)}function CO(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=pO();if(o.setFormat(n),o.setStyle(r),KA(a))a.splice(0,0,[o]);else if(a!==null){let e=bM(i)?GA().append(o):o;a.insertBefore(e)}else if(bM(i)){let e=i.getLastChild();V(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(GA().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}function wO(e,t,n,r){let i=e.anchor.getNode();z(i)||L(398);let a=e.anchor.offset,o=pO(t);o.setFormat(n),o.setStyle(r);let s=i.getParentOrThrow();if(a===0)s.isInline()&&!i.__prev?s.insertBefore(o):i.insertBefore(o,!1);else if(a===i.getTextContentSize())s.isInline()&&!i.__next?s.insertAfter(o):i.insertAfter(o,!1);else{let[e]=i.splitText(a);e.insertAfter(o,!1)}i.getTextContent()===``&&i.isAttached()&&i.remove(),o.selectEnd(),o.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}var TO=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!kO(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes().filter(e=>rP(e)===null),n=t.length;if(n===0)return;let r=t[n-1],i;if(z(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=kj(e);t!==null&&n.push(t)}return Ak()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>rP(e)===null);if((nk()||rk())===this&&e[0]){let t=RP(e[0],`next`);EA(ZP(t,t))}for(let t of e)t.remove();EO()}};function EO(){let e=Ij();if(e.isEmpty()){let t=GA();e.append(t),t.select()}}function DO(e){let t=function(e){let t=e.getNode();if(e.offset>0)return e.type===`element`&&V(t)?t.getChildAtIndex(e.offset-1):null;for(let e=t;e!==null&&!nN(e)&&!bM(e);e=e.getParent()){let t=e.getPreviousSibling();if(t!==null)return t}return null}(e);return bA(t)&&bA(t.getPreviousSibling())}function B(e){return e instanceof OO}var OO=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!B(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(PP(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;V(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),NP(e.focus)&&V(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=HP(e.focus.origin,`previous`);PP(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=WP(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!V(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=NA(e.anchor),r=NA(e.anchor.getFlipped()),i=e=>jP(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(FA(OA(this),`next`));return Ak()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=PO(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(V(d)&&!d.isInline()){l||(c+=`\n`);let e=``;for(let t of lP(d)){let n=uP(d,t);n!==null&&(e+=n.getTextContent())}e===``?l=!d.isEmpty():(c+=e,l=!1)}else if(l=!1,z(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!cA(d)&&!bA(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=Fk(),n=t.getEditorState()._selection,r=YO(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),ww(this)}clone(){let t=this.anchor,n=this.focus;return new e(bO(t.key,t.offset,t.type),bO(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=xj(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=AS[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(mk(e))}insertText(e){let t=this.format,n=this.style;if(!this.isCollapsed()){let r=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(z(r)&&(t=r.getFormat(),n=r.getStyle()),this.removeText(),this.format=t,this.style=n,e===``)return;if(Oj()===null)return this.anchor.type===`element`&&CO(this.anchor,this.focus,t,n),void wO(this,e,t,n)}this.anchor.type===`element`&&CO(this.anchor,this.focus,t,n);let r=this.anchor.getNode();z(r)||L(398);let i=this.anchor.offset,a=r.getParentOrThrow(),o=r.getTextContentSize();if(_j(r)||i===0&&(!r.canInsertTextBefore()||!a.canInsertTextBefore()&&!r.__prev)||i===o&&(!r.canInsertTextAfter()||!a.canInsertTextAfter()&&!r.__next)){if(r.isSegmented()&&i!==0&&i!==o){if(Oj()!==null)r.setMode(`normal`).setFormat(t).setStyle(n);else{let e=pO(r.getTextContent());e.setFormat(t),e.setStyle(n);let a=nk()===this;r.replace(e),this.setTextNodeRange(e,i,e,i),a&&nk()!==this&&Rj(this)}e!==``&&this.insertText(e);return}if(e===``)return;if(i===0){let i=r.getPreviousSibling();if(z(i)&&i.canInsertTextAfter()&&!_j(i))i.select();else{let e=pO();e.setFormat(t),e.setStyle(n),a.canInsertTextBefore()?r.insertBefore(e):a.insertBefore(e),e.select()}this.insertText(e);return}if(i===o){let i=r.getNextSibling();if(z(i)&&i.canInsertTextBefore()&&!_j(i))i.select(0,0);else{let e=pO();e.setFormat(t),e.setStyle(n),a.canInsertTextAfter()?r.insertAfter(e):a.insertAfter(e),e.select(0,0)}this.insertText(e);return}let s=pO(e);s.setFormat(t),s.setStyle(n),r.replace(s),s.select();return}if(e===``)return;let s=a.isInline()&&i===0&&!r.__prev,c=a.isInline()&&i===o&&!r.__next,l=r.getFormat()!==t||r.getStyle()!==n;if(s||c||l){if(r.getTextContent()!==``||s||c)return void wO(this,e,t,n);r.setFormat(t),r.setStyle(n)}r.spliceText(i,0,e,!0),r.isComposing()&&this.anchor.type===`text`&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){let e=nk()===this,t=this.anchor.key;DA(this,MA(OA(this))),this.isCollapsed()&&function(e,t){let n=e.anchor;if(n.key===t)return;let r=n.getNode(),i=0,a=``;z(r)?(i=r.getFormat(),a=r.getStyle()):V(r)&&(i=r.getTextFormat(),a=r.getTextStyle()),e.format===i&&e.style===a||(e.format=i,e.style=a,e.dirty=!0)}(this,t),e&&nk()!==this&&Rj(this)}formatText(e,t=null){MO(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();let t=this.anchor.getNode();if(this.anchor.type===`element`&&V(t)&&t.isShadowRoot()&&rP(t)!==null){let n=t.getFirstChild()??t.append(GA()).getFirstChild();if(n!==null&&!V(n)){let e=GA();n.insertBefore(e),n=e}if(n!==null){n.selectStart();let t=nk();return B(t)||L(369),t.insertNodes(e)}}if(this.anchor.type===`element`&&bM(t)){let n=bk(e),r=n.getLastDescendant();t.splice(this.anchor.offset,0,n.getChildren()),r!==null&&r.selectEnd();return}let n=this.isBackward()?this.focus:this.anchor,r=n.getNode(),i=ZN(r,nN),a=e[e.length-1];if(V(i)&&`__language`in i){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let[,t]=_k(this);i.splice(t,0,e),a.selectEnd()}return}if(!e.some(e=>(V(e)||cA(e))&&!e.isInline())){V(i)||L(211,r.constructor.name,r.getType());let[t,n]=_k(this,!0);(V(t)?t:i).splice(n,0,e),a.selectEnd();return}if(V(i)&&rP(i)!==null){let[,t]=_k(this),n=gk(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}if(i===null){let t=bk(e),n=t.getLastDescendant(),r=wA(this.anchor,`next`);for(let e of t.getChildren())r=VA(e,r);n!==null&&n.selectEnd();return}if(V(i)&&!i.isParentRequired()&&!bM(i.getParentOrThrow())){let[,t]=_k(this),n=gk(e);i.splice(t,0,n);let r=n[n.length-1];r===void 0?i.select(t,t):r.selectEnd();return}let o=bk(e),s=o.getLastDescendant(),c=o.getChildren(),l=DO(n),u=!V(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(r=this.anchor.getNode(),i=ZN(r,nN));let d=c[c.length-1],f=c[0];var p=f;l||!V(p)||!nN(p)||p.isEmpty()||!V(i)||i.isEmpty()&&!i.canMergeWhenEmpty()||(V(i)||L(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=c[1]),f&&(i===null&&L(212,r.constructor.name,r.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||L(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(i,f));let m=ZN(s,nN),h=s.selectEnd();u&&(V(m)&&(u.canMergeWhenEmpty()||nN(d))?(m.append(...u.getChildren()),u.remove()):u.isEmpty()&&u.remove()),V(i)&&i.isEmpty()&&i.remove();let g=V(i)?i.getLastChild():null;bA(g)&&m!==i&&g.remove();let _=NA(wA(h.anchor,`next`));TA(h.anchor,_),TA(h.focus,_)}insertParagraph(){this.isCollapsed()||this.removeText();let e=this.anchor.getNode();if(this.anchor.type===`element`&&bM(e)){let t=GA();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let[,t]=_k(this),n=ZN(this.anchor.getNode(),nN);if(n!==null&&rP(n)!==null)return null;V(n)||L(213);let r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=yA();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=PO(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(z(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(z(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),z(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(xk(this,e,t,n))return;let r=e===`move`,i=Fk(),a=DM(gM(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();s===null||o===null||!V(c)||c.isInline()||c.canBeEmpty()||EM(o,i,s);let l=cM(i,this.focus.key),u=l;if(this.focus.type===`text`&&(u=z(c)?lN(c,l,i):null),this.dirty){let e=cM(i,this.anchor.key),t=e;if(this.anchor.type===`text`){let n=this.anchor.getNode();t=z(n)?lN(n,e,i):null}t&&u&&lk(a,t,this.anchor.offset,u,this.focus.offset)}if(n===`character`&&z(c)&&c.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){let e=RP(c,t?`previous`:`next`).getNodeAtCaret();if(z(e)){if(!r){let n=e.getTextContentSize();t?this.focus.set(e.__key,n-1,`text`):this.focus.set(e.__key,1,`text`),this.dirty=!0;return}{let n=i.getElementByKey(e.getKey()),r=n?lN(e,n,i):null;if(r){let e=t?r.length:0;lk(a,r,e,r,e)}}}}if(RO(a,e,t?`backward`:`forward`,n,s),a.rangeCount>0){let e=FM(a,i._rootElement),n=e||a.getRangeAt(0),o=this.anchor.getNode(),s=uA(o)?o:vM(o);this.applyDOMRange(n),this.dirty=!0,!r&&(zO(this,t,s),(e?a.direction!==`backward`:a.anchorNode===n.startContainer&&a.anchorOffset===n.startOffset)||LO(this))}n===`lineboundary`&&xk(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&V(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(V(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e)){let e=V(n)?n.getNextSibling():null;if(!(V(n)&&n.isEmpty()&&V(e)&&e.isShadowRoot()))return}let r=wA(t,e?`previous`:`next`),i=YP(r);if(i.getTextSlices().every(e=>e===null||e.distance===0)){if(t.type===`element`){let e=r.getNodeAtCaret();if(V(e)&&TM(e)){let t=e.getParent();e.remove();let n=Lj(t,e);n!==null&&n.selectStart();return}}let e={type:`initial`};for(let t of i.iterNodeCarets(`shadowRoot`))if(PP(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(V(i.anchor.origin)&&i.anchor.origin.isEmpty()){let e=NA(t);DA(this,ZP(e,e)),i.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(NP(t)){if(V(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(i.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(cA(t.origin)){if(!t.origin.isIsolated()){if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&V(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();let e=$O();e.add(t.origin.getKey()),Rj(e)}else{let e=t.origin,n=e.getParent();e.remove();let r=Lj(n,e);r!==null&&r.selectStart()}}return}if(bA(t.origin))return void t.origin.remove();break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return lP(n).length>0?void 0:t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(DA(this,ZP(!t.origin.isEmpty()&&n.isEmpty()?kA(RP(n,t.direction)):i.anchor,t)),this.removeText())}for(let e=t.getNode();e!==null;){if(rP(e)!==null)return;if(V(e)&&e.isShadowRoot())break;e=e.getParent()}}let a=this.focus;if(BO(this,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&FO(this,t.getNode()))return}else{let r=a.type===`text`?a.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=a.offset,i=r.getTextContentSize();if(r.is(n)||e&&t!==i||!e&&t!==0)return void UO(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void UO(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(Vj(e)||HO(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(t||IO(this),this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&uA(e.getParent())&&e.getPreviousSibling()===null&&FO(this,e),EO()}}deleteLine(e){let t=this.isCollapsed(),n=KO(this.anchor);if(n!==null&&cA(iP(n)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&BO(this,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):ZN(this.anchor.getNode(),nN)===ZN(this.focus.getNode(),nN)?(t||IO(this),this.removeText()):(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e))}deleteWord(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;BO(this,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):(t||IO(this),this.removeText())}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return Ak()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function kO(e){return e instanceof TO}function AO(e,t){if(kO(e)){for(let n of e.getNodes())rO(n)&&n.setFormat(t(n.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Dj(null);let n=[];for(let r of e.getNodes())z(r)?n.push(r):V(r)?r.setTextFormat(t(r.getTextFormat())):rO(r)&&r.setFormat(t(r.getFormat()));let r=n.length;if(r===0)return e.setFormat(t(e.format)),void Dj(null);let i=e.anchor,a=e.focus,o=e.isBackward(),s=o?a:i,c=o?i:a,l=0,u=n[0],d=s.type===`element`?0:s.offset;if(s.type===`text`&&d===u.getTextContentSize()&&(l=1,u=n[1],d=0),u==null)return;let f=r-1,p=n[f],m=c.type===`text`?c.offset:p.getTextContentSize();if(u.is(p)){if(d===m)return;let n=t(u.getFormat());if(_j(u)||d===0&&m===u.getTextContentSize())u.setFormat(n);else{let e=u.splitText(d,m),t=d===0?e[0]:e[1];t.setFormat(n),s.type===`text`&&s.set(t.__key,0,`text`),c.type===`text`&&c.set(t.__key,m-d,`text`)}e.format=n;return}d===0||_j(u)||([,u]=u.splitText(d),d=0);let h=t(u.getFormat());u.setFormat(h);let g=t(p.getFormat());m>0&&(m===p.getTextContentSize()||_j(p)||([p]=p.splitText(m)),p.setFormat(g));for(let e=l+1;e<f;e++){let r=n[e];r.setFormat(t(r.getFormat()))}s.type===`text`&&s.set(u.__key,d,`text`),c.type===`text`&&c.set(p.__key,m,`text`),e.format=h|g}function jO(e,t){let n=[];for(let[e,r]of Object.entries(t))typeof r==`boolean`&&n.push([e,r]);n.length!==0&&AO(e,e=>{for(let[t,r]of n)e=xj(e,t,r?AS[t]:0);return e})}function MO(e,t,n=null){let r=n===null&&B(e)?xj(e.format,t,null):n;AO(e,e=>xj(e,t,r))}function NO(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function PO(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[NO(n),NO(r)]}function FO(e,t){for(let n=t;n;n=n.getParent()){if(V(n)){if(n.collapseAtStart(e))return!0;if(bM(n))break}if(n.getPreviousSibling())break}return!1}function IO(e){let t=Ij();!t.isEmpty()&&HA(t,e)&&(e.anchor.set(t.getKey(),0,`element`),e.focus.set(t.getKey(),t.getChildrenSize(),`element`))}function LO(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}function RO(e,t,n,r,i){let a=r===`character`?LM(e,i):null,o=a&&a.focusNode,s=a?a.focusOffset:0;if(e.modify(t,n,r),a===null||!function(e,t,n){return e!==null&&e.nodeType===3&&(n===`backward`?t>0:n===`forward`&&t<e.length)}(o,s,n))return;let c=LM(e,i);c.focusNode===o&&c.focusOffset===s&&e.modify(t,n,r)}function zO(e,t,n){let r=e.getNodes(),i=r.filter(e=>mM(e,n));if(i.length===0||i.length===r.length)return!1;let a=t?i[0]:i[i.length-1],o=V(a)?a:a.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function BO(e,t,n){if(xk(e,`extend`,t,n))return;let r=Fk(),i=DM(gM(r));if(!i||typeof i.modify!=`function`)return;let a=r._blockCursorElement,o=r._rootElement,s=e.anchor,c=e.focus.getNode();o===null||a===null||!V(c)||c.isInline()||c.canBeEmpty()||EM(a,r,o);let l=e=>{let t=e.getNode(),n=r.getElementByKey(e.key);return n!==null&&e.type===`text`&&z(t)?lN(t,n,r):n},u=s.getNode(),d=l(s);if(d===null)return;let f=s.offset,p=e.isCollapsed(),m=e.focus,h=p?d:l(m);if(h===null)return;let g=m.offset;if(lk(i,h,g,h,g),RO(i,`move`,t?`backward`:`forward`,n,o),i.rangeCount===0)return;let _=FM(i,o)||i.getRangeAt(0),v=_.startContainer,y=_.startOffset;if(p&&n===`character`&&s.type===`text`&&z(u)&&u.isUnmergeable()&&f===(t?0:u.getTextContentSize())){let n=RP(u,t?`previous`:`next`).getNodeAtCaret();if(z(n)){let r=t?n.getTextContentSize()-1:1;e.focus.set(n.__key,r,`text`),e.dirty=!0;return}}if(p&&n===`character`&&s.type===`text`){let n=t?0:u.getTextContentSize(),r=v===d?y:f===n?-1:n;if(r>=0)return void(r!==f&&(e.focus.set(s.key,r,`text`),e.dirty=!0))}let[b,x,S,C]=t?[v,y,d,f]:[d,f,v,y],ee=uA(u)?u:vM(u);e.applyDOMRange({collapsed:!1,endContainer:S,endOffset:C,startContainer:b,startOffset:x}),e.dirty=!0,!zO(e,t,ee)&&t&&LO(e),n===`lineboundary`&&xk(e,`extend`,t,n,`decorators`)}function VO(){try{let e=RegExp(`\\\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1}var HO=VO();function UO(e,t,n){let r=e,i=r.getTextContent().split(/(?=\\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function WO(e,t,n,r){let i,a=t,o=!1;if(YM(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),Mj(e,r)!==void 0||xN(e,r)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=Bj(d),z(i))a=BP(i,s?`next`:`previous`);else{let c=Bj(e);if(c===null)return null;if(V(c)){let o=r.getElementByKey(c.getKey());o===null&&L(214);let l=aN(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),V(c)||L(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if(V(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=V(u)?u:u.getParentOrThrow()),a=0}z(u)?(i=u,c=null,a=BP(u,s?`next`:`previous`)):u!==c&&s&&!f&&(V(c)||L(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=iP(c),i=n===null?c:n,o=i.getIndexWithinParent(),s=r.getElementByKey(c.getKey()),l=`after`;if(s!==null&&Bj(e)===c){let n=aN(c,s,r);n.element===s?t===0&&cA(c)&&(l=`before`):l=n.resolveLeafPosition(s,e,t)}a=l===`before`?o:o+1,c=i.getParentOrThrow()}if(V(c))return[bO(c.__key,a,`element`),o]}}else i=Bj(e);return z(i)?[bO(i.__key,BP(i,a,`clamp`),`text`),o]:null}function GO(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&V(a)&&a.isInline()){let t=a.getPreviousSibling();z(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else V(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):z(r)&&!i.isUnmergeable()&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&V(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&V(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){let t=a.getNextSibling();z(t)&&e.set(t.__key,0,`text`)}}}function KO(e){let t=kj(e.key);return t===null?null:oP(t)}function qO(e,t,n){let r=KO(e),i=KO(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;let a=n(r,i);if(r!==null)return V(r)?t.set(r.getKey(),a?r.getChildrenSize():0,`element`):t.set(r.getKey(),a?r.getTextContentSize():0,`text`),!0;let o=iP(i);if(o===null)return!1;let s=o.getParent();if(s===null)return!1;let c=o.getIndexWithinParent();return t.set(s.getKey(),a?c+1:c,`element`),!0}function JO(e){let t=qO(e.anchor,e.focus,(t,n)=>function(e,t,n,r){if(n!==null&&r!==null){let e=iP(n),t=iP(r);if(e!==null&&e.is(t)){for(let t of cP(e).values()){if(t===n.getKey())return!0;if(t===r.getKey())return!1}return!0}return e===null||t===null||e.isBefore(t)}if(n!==null){let e=iP(n),r=kj(t.key);return e===null||r===null||!(!e.is(r)&&!e.isParentOf(r))||e.isBefore(r)}let i=iP(r),a=kj(e.key);return i!==null&&a!==null&&!i.is(a)&&!i.isParentOf(a)&&a.isBefore(i)}(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function YO(e,t,n,r,i,a){if(e===null||n===null||!dj(i,e,n))return null;let o=WO(e,t,B(a)?a.anchor:null,i);if(o===null)return null;let s=WO(n,r,B(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=Bj(e),r=Bj(n);if(cA(t)&&cA(r))return null}let f=i._slotsUsed&&qO(c,u,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return function(e,t){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);GO(e,n,r),GO(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}(c,u),[c,u,l||d||f]}function XO(e){return V(e)&&!e.isInline()}function ZO(e,t,n,r,i,a){let o=Nk(),s=new OO(bO(e,t,i),bO(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function QO(){return new OO(bO(`root`,0,`element`),bO(`root`,0,`element`),0,``)}function $O(){return new TO(new Set)}function ek(e,t){return tk(null,e,t,null)}function tk(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!aC&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(B(e)&&!c)return e.clone();{if(t===null)return null;let r=LM(t,n._rootElement);if(l=r.anchorNode,u=r.focusNode,d=r.anchorOffset,f=r.focusOffset,(s||o===void 0)&&B(e)&&!dj(n,l,u))return e.clone()}let p=YO(l,d,u,f,n,e);if(p===null)return null;let[m,h,g]=p,_=0,v=``;if(B(e)){let t=e.anchor;if(m.key===t.key)_=e.format,v=e.style;else{let e=m.getNode();z(e)?(_=e.getFormat(),v=e.getStyle()):V(e)&&(_=e.getTextFormat(),v=e.getTextStyle())}}let y=new OO(m,h,_,v);return g&&(y.dirty=!0),y}function nk(){return Nk()._selection}function rk(){return Fk()._editorState._selection}function ik(e,t){let n=t.__key;return e.anchor.key===n||e.focus.key===n}function ak(e,t,n,r=1){if(!ik(e,t))return;let i=e.anchor,a=e.focus,o=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(o,n,`element`),a.set(o,n,`element`),ok(e)}}else{let s=e.isBackward(),c=s?a:i,l=c.getNode(),u=s?i:a,d=u.getNode();if(t.is(l)){let e=c.offset;(n<=e&&r>0||n<e&&r<0)&&c.set(o,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(o,Math.max(0,e+r),`element`)}}ok(e)}function ok(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!V(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(z(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(V(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(z(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(V(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(z(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function sk(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,z(i)?s=`text`:V(i)&&(s=`element`)):(a=r.__key,z(r)?(o=r.getTextContentSize(),s=`text`):V(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function ck(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function lk(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function uk(e,t,n){let r=cM(e,t.getKey());if(V(t)){let i=aN(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function dk(e,t,n,r,i,a){let o=a.getRootNode(),s=yj(o)||kM(o)?UM(o):null;if(i.has(`collaboration`)&&s!==a||s!==null&&lj(s,s))return;let c=LM(r,a),l;if(!B(t))return void(e!==null&&dj(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());let u=t.anchor,d=t.focus,f=u.getNode(),p=d.getNode(),[m,h]=uk(n,f,u.offset),[g,_]=uk(n,p,d.offset),v=t.format,y=t.style,b=t.isCollapsed(),x=m,S=g,C=!1;if(u.type===`text`?(x=z(f)?lN(f,m,n):null,C=f.getFormat()!==v||f.getStyle()!==y):B(e)&&e.anchor.type===`text`&&(C=!0),d.type===`text`&&(S=z(p)?lN(p,g,n):null),x!==null&&S!==null){if(b&&(e===null||C||B(e)&&(e.format!==v||e.style!==y))&&function(e,t,n,r,i,a){e._inputState.collapsedSelectionFormat={format:t,key:i,offset:r,style:n,timeStamp:a}}(n,v,y,h,u.key,performance.now()),(r.type!==`Range`||!b)&&c.anchorOffset===h&&c.focusOffset===_&&c.anchorNode===x&&c.focusNode===S){if(s===null||!a.contains(s)){let e=s===null?null:pj(s);e!==null&&e!==n||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0})}if(u.type!==`element`)return}if(lk(r,x,h,S,_),uS&&t.isCollapsed()&&a!==null&&!i.has(`skip-selection-focus`)){let e=HM(a);if(e===null||!a.contains(e)){let e=UM(a.ownerDocument),t=e===null?null:pj(e);t!==null&&t!==n||a.focus({preventScroll:!0})}}if(!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===HM(a)){let e=B(t)&&t.anchor.type===`element`?x.childNodes[h]||null:(l===void 0&&(l=IM(r,a)),l);if(e!==null){let t;if(vj(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=uM(n),i=hM(r);if(r===null||i===null)return;let a=n.getBoundingClientRect();if(t.bottom<a.top)return;let{top:o,bottom:s}=t,c=0,l=0,u=n;for(;u!==null;){let t=u===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;c=e,l=e+t.height}else c=0,l=gM(e).innerHeight;let n=i.getComputedStyle(r.documentElement),a=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(a)&&(c+=a),isFinite(o)&&(l-=o)}else{let e=u===n?a:u.getBoundingClientRect();c=e.top,l=e.bottom}let d=0;if(o<c?d=-(c-o):s>l&&(d=s-l),d!==0){if(t)i.scrollBy(0,d);else{let e=u.scrollTop;u.scrollTop+=d;let t=u.scrollTop-e;o-=t,s-=t}}if(t)break;u=lM(u)}})(n,t,a)}}(function(e,t,n,r,i){let a=e._inputState;a.isSelectionChangeFromDOMUpdate=!0,a.selectionChangeFromDOMUpdatePoints=t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0?{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:i}:null})(n,x,h,S,_)}}function fk(e){let t=nk()||rk();t===null&&(t=Ij().selectEnd()),t.insertNodes(e)}function pk(e,t){for(let n of e.split(/(\\r?\\n|\\t)/))n===`\n`||n===`\\r\n`?t.linebreak():n===`\t`?t.tab():n!==``&&t.text(n)}function mk(e){let t=[];return pk(e,{linebreak:()=>t.push(yA()),tab:()=>t.push(_O()),text:e=>t.push(pO(e))}),t}function hk(){let e=nk();return e===null?``:e.getTextContent()}function gk(e){let t=[];for(let n of e)bA(n)||(!V(n)&&!cA(n)||n.isInline()?t.push(n):V(n)&&t.push(...gk(n.getChildren())));return t}function _k(e,t=!1){let n=e;e.isCollapsed()||n.removeText();let r=nk();B(r)&&(n=r),B(n)||L(161);let i=n.anchor,a=i.getNode(),o=i.offset;for(;!nN(a)&&rP(a)===null;){let e=a;if([a,o]=vk(a,o,t),e.is(a))break}return[a,o]}function vk(e,t,n=!1){let r=e.getParent();if(!r){let e=GA();return Ij().append(e),e.select(),[Ij(),0]}if(z(e)){let n=e.splitText(t);if(n.length===0)return[r,e.getIndexWithinParent()];let i=t===0?0:1;return[r,n[0].getIndexWithinParent()+i]}if(!V(e)||t===0)return[r,e.getIndexWithinParent()];let i=e.getChildAtIndex(t);if(i){let r=new OO(bO(e.__key,t,`element`),bO(e.__key,t,`element`),0,``),a=e.insertNewAfter(r);if(a)a.append(i,...i.getNextSiblings());else if(n)return[e,t]}return[r,e.getIndexWithinParent()+1]}function yk(e){return bA(e)||_M(e)||z(e)||e.isParentRequired()}function bk(e){let t=GA(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(yk(i)){if(n===null){n=i.createParentElementNode(),t.append(n);let a=e[r+1];if(bA(i)&&(a===void 0||!yk(a)))continue}n.append(i)}else t.append(i),n=null}return t}function xk(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=wA(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`,u=!1;if(!PA(c)){for(let e of c){l=!1;let{origin:t}=e;if(cA(t)){if(t.isIsolated()){u=!0;break}if(c=e,o&&t.isInline())continue}break}if(u)return!0;if(l)for(let e of YP(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(PP(e))e.origin.isInline()||(c=e);else{if(V(e.origin))continue;cA(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&cA(c.origin)&&c.origin.isKeyboardSelectable()){let e=$O();return e.add(c.origin.getKey()),Rj(e),!0}return c=NA(c),s&&TA(e.anchor,c),TA(e.focus,c),l||!o}var Sk=null,Ck=null,wk=!1,Tk=!1,Ek=!1,Dk=new Set,Ok=0,kk={characterData:!0,childList:!0,subtree:!0};function Ak(){return wk||Sk!==null&&Sk._readOnly}function jk(){wk&&L(13)}function Mk(){Ok>99&&L(14)}function Nk(){return Sk===null&&L(195,Lk()),Sk}function Pk(e){Nk()!==null&&Ck===null&&(Ck=e),Ck!==e&&nS(378)}function Fk(){return Ck===null&&L(337,Lk()),Ck}function Ik(){Fk()._dirtyType=2}function Lk(){let e=0,t=new Set,n=ej.version;if(typeof window<`u`)for(let r of MM(document)){let i=mj(r);if(fj(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Rk(){return Ck}function zk(e,t,n){let r=t.__type,i=oj(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Bk(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Vk(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Hk(e){return Uk(e,Fk()._nodes)}function Uk(e,t){let n=e.type,r=t.get(n);r===void 0&&L(17,n);let i=r.klass;e.type!==i.getType()&&L(18,i.name);let a=i.importJSON(e),o=e.children;if(V(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Uk(o[e],t);a.append(n)}let s=e.$slots;if(s){tP(a)||L(379,i.name);for(let e in s)bP(a,e,Uk(s[e],t))}return a}function Wk(e,t,n){let r=Sk,i=wk,a=Ck;Sk=t,wk=!0,Ck=e;try{return n()}finally{Sk=r,wk=i,Ck=a}}function Gk(e,t){let n=Ek;Ek=!0;try{(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&Jk(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=Sk,u=wk,d=Ck,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){Ck=e,Sk=n,wk=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=CT(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),Tk)throw t;JA(e,null,r,n),mC(e),e._dirtyType=2,Tk=!0,Gk(e,a),Tk=!1;return}finally{p.observe(r,kk),e._updating=f,Sk=l,wk=u,Ck=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set,function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=Pj(e)),delete r[a])}(e,n);let y=i?null:DM(gM(e));if(e._editable&&y!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){Ck=e,Sk=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&EM(t,e,r),dk(o,s,e,y,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(B(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(HM(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())TM(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);t!==null&&TM(t)&&(s=!0,c=e.getElementByKey(t.__key))}if(s){let n=aN(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=PM().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=lF(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&EM(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,kk),Ck=d,Sk=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),B(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(ET);let b=e._pendingDecorators;b!==null&&(e._decorators=b,e._pendingDecorators=null,Kk(`decorator`,e,!0,b)),function(e,t,n){let r=Fj(t),i=Fj(n);r!==i&&Kk(`textcontent`,e,!0,i)}(e,t||a,n),Kk(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),!f&&Jk(e,e._deferred),(function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Dk.has(e)||(Dk.add(e),setTimeout(()=>{Dk.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,r]=n;Zk(e,t,r)}})(e)})(e,t)}finally{Ek=n}}function Kk(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r),a=typeof i==`function`?i:void 0;n.has(e)?n.set(e,a):a&&a()}}finally{t._updating=i}}function qk(e,t,n,r){let i=Hj(e),a;if(!Ek)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Qk(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{qk(a,t,n,r)}),!1}function Jk(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Yk(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&L(191),a._flushSync=!0),o&&e._deferred.push(o),Vk(e,i.tag)),a==null?Zk(e,n,i):n()}}return r}function Xk(){let e=Nk();jk(),e._flushSync=!0}function Zk(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,Vk(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=dA(c||s),l=!0),c._flushSync=o;let u=Sk,d=wk,f=Ck,p=e._updating;Sk=c,wk=!1,e._updating=!0,Ck=e;let m=e._headless||e.getRootElement()===null;nj(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=DM(gM(e));return B(n)||n==null?tk(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Yk(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(B(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Cw(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Oj(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);z(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Cw(r),r!==void 0&&Bk(r,a)&&zk(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){Ok++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Bk(c,a)&&zk(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,Ok++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Yk(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(V(t)&&iC(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(tP(t)&&t.__slots!==null&&iC(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}for(let e of o)a.delete(e);let s=Fk(),c=s._compositionKey;c===null||a.has(c)||(s._compositionKey=null)}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(B(i)){e._slotsUsed&&JO(i);let t=c._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||L(19)}else kO(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Gk(e);return}finally{Sk=u,wk=d,Ck=f,e._updating=p,Ok=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Gk(e)):l&&cj(()=>{Gk(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Qk(e,t,n){Ck===e&&n===void 0?Ak()?Zk(e,t,n):t():Zk(e,t,n)}function $k(){return{...PS,0:``}}function eA(){return{...MS,\"\":0}}var tA=$k(),nA=eA(),rA=YC()({direction:tw(WC([null,`ltr`,`rtl`]),{field:`__dir`}),format:tw(WC([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`,getter:`getFormatType`,getterTable:tA,setter:`setFormat`,setterTable:nA}),indent:tw(HC(0,{integer:!0,min:0}),{field:`__indent`}),textFormat:nw(HC(),{getter:{field:`__textFormat`,method:`getSerializedTextFormat`,when:`shouldSerializeTextStyles`},setter:{field:`__textFormat`}}),textStyle:nw(BC(),{getter:{field:`__textStyle`,method:`getSerializedTextStyle`,when:`shouldSerializeTextStyles`},setter:{field:`__textStyle`}})});function iA(e){if(bM(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var aA=class extends CD{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:iA,extends:CD,generated:zD,json:rA})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__style=e.__style,function(e,t){e.__dir=t.__dir,e.__format=t.__format,e.__indent=t.__indent,e.__textFormat=t.__textFormat,e.__textStyle=t.__textStyle}(this,e)}getFormat(){return this.getLatest().__format}getFormatType(){return PS[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&lP(this).length===0}isDirty(){let e=Fk()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of lP(this)){let n=uP(this,t);if(V(n))for(let t of n.getAllTextNodes())e.push(t)}let t=this.getFirstChild();for(;t!==null;){if(z(t)&&e.push(t),V(t))for(let n of t.getAllTextNodes())e.push(n);t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;V(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;V(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return V(e)&&e.getLastDescendant()||e||null}let r=t[e];return V(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:kj(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&L(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:kj(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&L(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=_P(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),V(i)&&r!==n-1&&!i.isInline()&&(e+=CS)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of lP(e)){let r=uP(e,n);r!==null&&(t+=r.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),V(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=MS[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=AS[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return xj(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){jk();let n=nk(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(z(e)||V(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(z(e)||V(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return B(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):ZO(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){let t=this.getWritable();return t.__format=e!==``&&MS[e]||0,t}setStyle(e){let t=this.getWritable();return t.__style=e||``,t}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){let t=this.getWritable();return t.__indent=e,t}splice(e,t,n){xD(this)&&L(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||L(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&L(100);let t=e.getNextSibling(),n=e.__key;wj(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling()),c!==null&&e.is(c)&&(c=c.getNextSibling());let t=e.getWritable();t.__parent===a&&u--,wj(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&L(76),t.__parent=a,o.push(n),d=e}if(c===null)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else{let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=nk();if(B(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;oA(r,t,n)&&sk(r,r.getNode(),this,l,c),oA(i,t,n)&&sk(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||bM(this)||this.remove()}}return i}getDOMSlot(e){return new KS(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(YM(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}shouldSerializeTextStyles(){if(bM(this))return!1;for(let e=this.getFirstChild();e!==null;e=e.getNextSibling())if(z(e))return!1;return!0}getSerializedTextFormat(){let e=this.getTextFormat();return e!==0&&this.shouldSerializeTextStyles()?e:void 0}getSerializedTextStyle(){let e=this.getTextStyle();return e!==``&&this.shouldSerializeTextStyles()?e:void 0}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=aN(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function V(e){return e instanceof aA}function oA(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var sA=class extends CD{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&L(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function cA(e){return e instanceof sA}var lA=class extends aA{__cachedText;$config(){return this.config(`root`,{extends:aA})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){L(51)}getTextContent(){let e=this.__cachedText;return e===null||!Ak()&&Fk()._dirtyType!==0?super.getTextContent():e}remove(){L(52)}replace(e){L(53)}insertBefore(e){L(54)}insertAfter(e){L(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)V(e)||cA(e)||L(282);return super.splice(e,t,n)}static importJSON(e){return Ij().updateFromJSON(e)}collapseAtStart(){return!0}};function uA(e){return e instanceof lA}function dA(e){return new hA(QS(e._nodeMap),null,e._slotsUsed)}function fA(){return new hA(new Map([[`root`,new lA]]),null,!1)}function pA(e){let t=e.constructor,n=rC(e);if(V(e)){let t=n.children,r=e.getChildren();for(let e=0;e<r.length;e++)t.push(pA(r[e]))}let r=lP(e);if(r.length>0){let i={};for(let n of r){let r=uP(e,n);r===null&&L(366,t.name,n),i[n]=pA(r)}n.$slots=i}return n}function mA(e){return e instanceof hA}var hA=class e{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size<=1&&this._selection===null}read(e,t){return Wk(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n._parsed=this._parsed,n}toJSON(e){return tC(typeof e==`boolean`&&e,()=>Wk(null,this,()=>({root:pA(Ij())})))}},gA=class extends aA{$config(){return this.config(`artificial`,{extends:aA})}createDOM(e){return PM().createElement(`div`)}},_A=class extends CD{$config(){return this.config(`linebreak`,{extends:CD,generated:UD,importDOM:{br:e=>xA(e)||SA(e)?null:{conversion:vA,priority:0}}})}getTextContent(){return`\n`}createDOM(){return PM().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function vA(e){return{node:yA()}}function yA(){return SM(new _A)}function bA(e){return e instanceof _A}function xA(e){let t=e.parentElement;if(t!==null&&tN(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&CA(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&CA(n))return!0}}return!1}function SA(e){let t=e.parentElement;if(t!==null&&tN(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&CA(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&CA(r))return!0}return!1}function CA(e){return vj(e)&&/^( |\\t|\\r?\\n)+$/.test(e.textContent||``)}function wA(e,t){let{type:n,key:r,offset:i}=e,a=wM(e.key);return n===`text`?(z(a)||L(266,a.getType(),r),zP(a,t,i)):(V(a)||L(267,a.getType(),r),IA(a,e.offset,t))}function TA(e,t){let{origin:n,direction:r}=t,i=r===`next`;jP(t)?e.set(n.getKey(),t.offset,`text`):NP(t)?z(n)?e.set(n.getKey(),BP(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(PP(t)&&V(n)||L(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function EA(e){let t=nk(),n=B(t)?t:QO();return DA(n,e),Rj(n),n}function DA(e,t){TA(e.anchor,t.anchor),TA(e.focus,t.focus)}function OA(e){let{anchor:t,focus:n}=e,r=wA(t,`next`),i=wA(n,`next`),a=$P(r,i)<=0?`next`:`previous`;return ZP(JP(r,a),JP(i,a))}function kA(e){let{direction:t,origin:n}=e,r=RP(n,DP(t)).getNodeAtCaret();return r?RP(r,t):HP(n.getParentOrThrow(),t)}function AA(e,t=`root`){let n=[e];for(let r=PP(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(kA(r));return n}function jA(e){return!!e&&e.origin.isAttached()}function MA(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=FA(e,r),o=a.anchor.origin;for(;o!==null&&!bM(o);)o=o.getParent();let s=V(o)?o.getFirstChild():null,c=AA(a.anchor,n),l=AA(a.focus.getFlipped(),n),u=new Set,d=[];for(let e of a.iterNodeCarets(n))if(PP(e))u.add(e.origin.getKey());else if(NP(e)){let{origin:t}=e;V(t)&&!u.has(t.getKey())||d.push(t)}let f=new Set;for(let e of d){let t=e.getParent();t===null||u.has(t.getKey())||f.add(t),wj(e)}for(let e of f)!e.canBeEmpty()&&!bM(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=kA(RP(t,r)),o=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||o===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(o===`segmented`){let e=t.origin,n=pO(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=zP(n,r,t.offset)}n.is(c[0].origin)&&(c[0]=t),n.is(l[0].origin)&&(l[0]=t.getFlipped())}}let p,m;for(let e of c)if(jA(e)){p=NA(e);break}for(let e of l)if(jA(e)){m=NA(e);break}let h=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c=0;for(;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(bM(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,nN),d=u&&l(o,e=>n.has(e.getKey())&&nN(e));return d&&lP(d).length>0?null:u&&d?[u,d]:null}(p,m,u);if(h){let[e,t]=h;HP(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(m){let e=function(e){if(PP(e)){let t=e.origin;if(nN(t))return t}else{let t=e.getParentAtCaret();if(t&&nN(t))return t}return null}(m),t=e&&e.getParent(),n=e&&e.getParents().findLast(yM);if(e&&t&&!uA(t)&&e.isEmpty()&&u.has(e.getKey())&&lP(e).length===0&&(!n||u.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!uA(n)&&n.isEmpty();){let e=n.getParent();if(e&&uA(e)&&e.getChildrenSize()<=1&&n.canBeEmpty())break;let t=n;n=e,t.remove(!0)}}}Lj(o,s)===null&&Lj(Ij(),null);let g=[p,m,...c,...l].find(jA);if(g)return XP(JP(NA(g),e.direction));L(269,JSON.stringify(c.map(e=>e.origin.__key)))}function NA(e){let t=function(e){let t=e;for(;PP(t);){let e=WP(t);if(!PP(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(z(t.origin))return jP(t)?t:zP(t.origin,n,n);let r=t.getAdjacentCaret();return NP(r)&&z(r.origin)?zP(r.origin,n,DP(n)):t}function PA(e){return jP(e)&&e.offset!==BP(e.origin,e.direction)}function FA(e,t){return e.direction===t?e:ZP(JP(e.focus,t),JP(e.anchor,t))}function IA(e,t,n){let r=HP(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return JP(r,n)}function LA(e,t=`root`){let n=0,r=e,i=WP(r);for(;i===null;){if(n--,i=r.getParentCaret(t),!i)return null;r=i,i=WP(r)}return i&&[i,n]}function RA(e){let{origin:t,offset:n,direction:r}=e;if(n===BP(t,r))return e.getSiblingCaret();if(n===BP(t,DP(r)))return kA(e.getSiblingCaret());let[i]=t.splitText(n);return z(i)||L(281),JP(RP(i,`next`),r)}function zA(e,t){return!0}function BA(e,{$copyElementNode:t=xM,$splitTextPointCaretNext:n=RA,rootMode:r=`shadowRoot`,$shouldSplit:i=zA,removeEmptyDestination:a=!1}={}){if(jP(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(PP(e)){let e=kA(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function VA(e,t,n){let r=JP(t,`next`);jP(r)&&(r.offset===0?r=RP(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=RP(r.origin,`next`))),r.origin.is(e)&&(NP(r)||L(342,e.getKey(),e.getType()),r=kA(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=BA(e,n))r=e;return jP(r)&&L(283),r.insert(e.isInline()?GA().append(e):e),JP(RP(e.getLatest(),`next`),t.direction)}function HA(e,t){let n=FA(B(t)?OA(t):t,`next`),r=oP(n.anchor.origin),i=oP(e.getLatest());if(r===null?i!==null:!r.is(i))return!1;let a=NA(HP(e,`next`)),o=JP(NA(HP(e,`previous`)),`next`);return $P(n.anchor,a)<=0&&$P(n.focus,o)>=0}var UA=class extends aA{$config(){return this.config(`paragraph`,{extends:aA,generated:HD,importDOM:{p:()=>({conversion:WA,priority:0})}})}createDOM(e){let t=PM().createElement(`p`),n=nM(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(YM(t)){this.isEmpty()&&t.append(PM().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(e=!1){let t=super.exportJSON(e);if(t.textFormat===void 0||t.textStyle===void 0){let n=this.getChildren().find(z),r=n?n.getFormat():this.getTextFormat(),i=n?n.getStyle():this.getTextStyle();e&&r===0||(t.textFormat=r),e&&i===``||(t.textStyle=i)}return t}extractWithChild(e,t,n){if(!B(t)||this.getFormatType()===``&&this.getIndent()===0&&this.getStyle()===``)return!1;if(HA(this,t)){let e=this.getTextContent();return e!==``&&t.getTextContent()===e}return!1}insertNewAfter(e,t){let n=GA();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.getChildren().every(e=>z(e)&&!/\\S/.test(e.getTextContent()))){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function WA(e){let t=GA();if(_N(t,e),hN(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in MS&&t.setFormat(n)}return gN(t,e),{node:t}}function GA(){return SM(new UA)}function KA(e){return e instanceof UA}function qA(e){console.warn(e)}function JA(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=fA(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){let n=`__lexicalKey_${t._key}`;delete e[n]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),jj(n,e,`root`))}function YA(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of JN(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var XA={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=sj(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>V(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>V(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function ZA(e){let t=e||{},n=Rk(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=fA(),s=t.namespace||(i===null?Uj():i._config.namespace),c=t.editorState,l=[lA,iO,_A,gO,UA,gA,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===CD||n.prototype instanceof CD)){let r=`<unknown>`;try{r=JSON.parse(YS)}catch{}L(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}UN(n);let a=n.getType(),o=YA(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:dw(l[e]),transforms:o})}}let h=new ej(o,i,m,{disableEvents:a,dom:{...XA,...e&&e.dom},namespace:s,theme:r},u||console.error,d||qA,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(kT,YE,0),e.registerCommand(AT,ZE,0),e.registerCommand(jT,$E,0),e.registerCommand(MT,eD,0),e.registerCommand(GT,uD,0)}(h),h}function QA(e,t){let n=e.get(t);e.delete(t),n&&n()}function $A(e,t,n){return e.set(t,n),QA.bind(null,e,t)}var ej=class{static version=YS;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_keyDownShortcuts;_inputState;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new $S,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Uj(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._keyDownShortcuts=null,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,selectionChangeFromDOMUpdatePoints:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return $A(this._listeners.update,e)}registerEditableListener(e){return $A(this._listeners.editable,e)}registerDecoratorListener(e){return $A(this._listeners.decorator,e)}registerTextContentListener(e){return $A(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return fF($A(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&L(35);let r=this._commands;r.has(e)||r.set(e,[new XS,new XS,new XS,new XS,new XS]);let i=r.get(e);i===void 0&&L(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&L(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=fN(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=fN(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=kj(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:DD}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return H(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=nM(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,JA(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||_D(t),n!=null&&t.classList.remove(...n)),e!==null){let t=hM(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,mC(this),this._updateTags.add(DD),Gk(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;PE.set(e,n);let r=FE.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},FE.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=dD(e);i.push(IE.register(n));let a=NE();for(let n=0;n<a.length;n++){let[r,o]=a[n],s=typeof o==`function`?e=>{hD(e)||(mD(e),(t.isEditable()||r===`click`)&&o(e,t))}:e=>{if(hD(e))return;mD(e);let n=t.isEditable();switch(r){case`cut`:return n&&H(t,pE,e);case`copy`:return H(t,fE,e);case`paste`:return n&&H(t,LT,e);case`dragstart`:return n&&H(t,lE,e);case`dragover`:return n&&H(t,uE,e);case`dragend`:return n&&H(t,dE,e);case`focus`:return n&&H(t,yE,e);case`blur`:return n&&H(t,bE,e);case`drop`:return n&&H(t,sE,e)}};i.push(AE(e,r,s))}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(DD),Gk(this);Kk(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&L(38);let n=e;n._readOnly&&(n=dA(e),n._selection=e._selection?e._selection.clone():null),pC(this);let r=this._pendingEditorState,i=t===void 0?null:t.tag;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),Gk(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Qk(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(let[e,t]of n._nodeMap.entries())V(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=fA(),i=Sk,a=wk,o=Ck,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,Sk=r,wk=!1,Ck=t,nj(null);try{let i=t._nodes;Uk(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,Sk=i,wk=a,Ck=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&Gk(this),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Zk(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Qk(this,()=>{let r=nk(),i=Ij();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Rj(r.clone()),fM(`focus`),pM(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=DM(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Kk(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Ik()))}toJSON(){return{editorState:this._editorState.toJSON(nC())}}},tj=null;function nj(e){tj=e}var rj=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),ij=1;function aj(){ij=1}function oj(e,t){let n=sj(e,t);return n===void 0&&L(30,t),n}function sj(e,t){return e._nodes.get(t)}var cj=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function lj(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return yj(t)||kM(t)?UM(t):null})():t;if(!YM(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=Nj(n),i=n.nodeName;return wD(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&mj(n)==null)}var uj=lj;function dj(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return pj(t)===e&&e.read(`latest`,()=>!lj(t))}function fj(e){return e instanceof ej}function pj(e){let t=e;for(;t!=null;){let e=mj(t);if(fj(e))return e;t=lM(t)}return null}function mj(e){return e?e.__lexicalEditor:null}function hj(e){return OS.test(e)?`rtl`:kS.test(e)?`ltr`:null}function gj(e){return vO(e)||e.isToken()}function _j(e){return gj(e)||e.isSegmented()}function vj(e){return XM(e)&&e.nodeType===3}function yj(e){return XM(e)&&e.nodeType===9}function bj(e){let t=e;for(;t!=null;){if(vj(t))return t;t=t.firstChild}return null}function xj(e,t,n){let r=AS[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~AS.superscript:t===`superscript`?i&=~AS.subscript:t===`lowercase`?(i&=~AS.uppercase,i&=~AS.capitalize):t===`uppercase`?(i&=~AS.lowercase,i&=~AS.capitalize):t===`capitalize`&&(i&=~AS.lowercase,i&=~AS.uppercase),i}function Sj(e){return z(e)||bA(e)||cA(e)}function Cj(e,t){let n=function(){let e=tj;return tj=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);jk(),Mk();let r=Fk(),i=Nk(),a=``+ij++;i._nodeMap.set(a,e),V(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function wj(e){rP(e)!==null&&L(380,e.__key,String(rP(e)));let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}var Tj=wj;function Ej(e){Mk(),xD(e)&&L(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent===null?nP(t)?t.__slotHost:null:t.__parent,r=Nk(),i=Fk(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?nP(e)?e.__slotHost:null:e.__parent}}(n,a,o);let s=t.__key;i._dirtyType===0&&(i._dirtyType=1),V(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function Dj(e){jk();let t=Fk(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=kj(n);e!==null&&e.getWritable()}if(e!==null){let t=kj(e);t!==null&&t.getWritable()}}}function Oj(){return Ak()?null:Fk()._compositionKey}function kj(e,t){let n=(t||Nk())._nodeMap.get(e);return n===void 0?null:n}function Aj(e,t){let n=Mj(e,Fk());return n===void 0?null:kj(n,t)}function jj(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Mj(e,t){return e[`__lexicalKey_${t._key}`]}function Nj(e,t){let n=e;for(;n!=null;){let e=Aj(n,t);if(e!==null)return e;n=lM(n)}return null}function Pj(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Fj(e){return e.read(()=>Ij().getTextContent())}function Ij(){return Nk()._nodeMap.get(`root`)}function Lj(e,t){if(!(bM(e)&&e.isAttached()&&e.isEmpty()&&(uA(e)||t!==null&&nN(t))))return null;let n=GA();return e.append(n),n}function Rj(e){jk();let t=Nk();e!==null&&(e.dirty=!0,e.setCachedNodes(null),B(e)&&Fk()._slotsUsed&&JO(e)),t._selection=e}function zj(){jk(),pC(Fk())}function Bj(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Mj(n,t);if(e!==void 0)return e;n=lM(n)}return null}(e,Fk());return t===null?null:kj(t)}function Vj(e){return/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g.test(e)}function Hj(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function Uj(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function Wj(e){return vj(e)?e.nodeValue:null}function Gj(e,t,n){let r=DM(gM(t));if(r===null)return;let i=LM(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=Wj(a),r=Nj(a);if(t!==null&&z(r)){if((t===SS||t===wS)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&Kj(r,t,o,s,e)}}}function Kj(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing();if(a.isToken()&&o)return;let s=t;if((o||i)&&(t.endsWith(SS)&&(s=t.slice(0,-SS.length)),i)){let e=wS,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){let t=nk();if(s===``){if(Dj(null),gS||mS||yS)a.remove();else{let e=Fk();qj(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let i=a.getParent(),c=rk(),l=a.getTextContentSize(),u=Oj(),d=a.getKey();if(a.isToken()&&!o||u!==null&&d===u&&!o||B(c)&&(i!==null&&!i.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!a.canInsertTextBefore()&&!o||c.focus.key===e.__key&&c.focus.offset===l&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!B(t)||n===null||r===null)return void qj(a,s,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=pO(a.getTextContent());a.replace(e),a=e}qj(a,s,t)}}}function qj(e,t,n){if(e.setTextContent(t),B(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=BP(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Jj(e,t){let n=e[LS];return n&&t!==lS?{...e,ctrlKey:e[n],[n]:e.ctrlKey}:e}function Yj(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function Xj(e,t){return Yj(e,t,`altKey`)&&Yj(e,t,`ctrlKey`)&&Yj(e,t,`shiftKey`)&&Yj(e,t,`metaKey`)}function Zj(e,t,n){if(!Xj(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith(`Digit`)&&/^\\d$/.test(t))return e.code===`Digit${t}`;let r=`Key`+t.toUpperCase();return e.code===r}function Qj(e){let t=e;for(;t!==null;){let e=t.getParent();if(e===null)return null;if(uA(e))return t;t=e}return null}function $j(e,t){let{anchor:n,focus:r}=e,i=n.key,a=n.offset,o=n.type,s=r.key,c=r.offset,l=r.type;if(ww(e),!uA(t))return e;let u=Qj(n.getNode());return V(u)&&u.isShadowRoot()&&u.is(Qj(r.getNode()))&&(n.set(i,a,o),r.set(s,c,l)),e}function eM(e){let t=Ij();if(B(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(uA(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),$j(e,r),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();return a===null?(V(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),$j(e,i)),e):(t.set(a.getKey(),0,`element`),n.set(a.getKey(),a.getChildrenSize(),`element`),$j(e,a),e)}{let e=t.select(0,t.getChildrenSize());return Rj($j(e,t)),e}}function tM(e,t){e.getAttribute(t)===``&&e.removeAttribute(t)}function nM(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=lF(i);return n[t]=e,e}return i}function rM(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&L(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function iM(e){let t=e.getType(),n=Nk();if(n._readOnly){let e=fN(n).get(t);return e?Array.from(e.values()):[]}let r=n._nodeMap,i=[];for(let[,n]of r)n instanceof e&&n.__type===t&&n.isAttached()&&i.push(n);return i}function aM(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function oM(e,t){let n=e.offset;if(e.type===`element`)return aM(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?aM(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function sM(e){let t=gM(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function H(e,t,...n){return qk(e,t,n[0],e)}function cM(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&L(75,t),n}function lM(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return kM(n)?n.host:null}function uM(e){return yj(e)?e:YM(e)?e.ownerDocument:null}function dM(e){return Fk()._updateTags.has(e)}function fM(e){jk(),Fk()._updateTags.add(e)}function pM(e){jk(),Fk()._deferred.push(e)}function mM(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function hM(e){let t=uM(e);return t?t.defaultView:null}function gM(e){let t=e._window;return t===null&&L(78),t}function _M(e){return V(e)&&e.isInline()||cA(e)&&e.isInline()}function vM(e){let t=e.getLatest();for(;t!==null;){if(rP(t)!==null&&V(t))return t;let e=t.getParentOrThrow();if(bM(e))return e;t=e}return t}function yM(e){return V(e)&&e.isShadowRoot()}function bM(e){return uA(e)||yM(e)}function xM(e,t=!1){let n=e.constructor.clone(e,rj);return Cj(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function SM(e){let t=Fk(),n=e.getType(),r=sj(t,n);r===void 0&&L(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||L(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||L(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&L(203,e.constructor.name,n,r.name,r.getType()),t}return e}function CM(e,t){!uA(e.getParent())||V(t)||cA(t)||L(99)}function wM(e){let t=kj(e);return t===null&&L(63,e),t}function TM(e){if(!e||e.isInline())return!1;if(cA(e))return!0;if(V(e)){if(e.isShadowRoot()){let t=e.getParent();return!(V(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function EM(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function DM(e){return iS?(e||window).getSelection():null}function OM(e){let t=hM(e);return t?t.getSelection():null}function kM(e){return ZM(e)&&`host`in e}var AM=[];function jM(e){let t=e.getRootNode();if(t===e||!kM(t))return AM;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!kM(e))break;n.push(e),r=e.host}return n}function*MM(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor=\"true\"]`);let e=(yj(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function NM(e){return e===null?document:e.ownerDocument}function PM(){let e=Rk();return NM(e===null?null:e._rootElement)}function FM(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=jM(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function IM(e,t){let n=FM(e,t);if(n!==null){let e=zM(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function LM(e,t){let n=FM(e,t);return n===null?e:BM(n,VM(e))}function RM(e,t){let n=FM(e,t);if(n===null)return{points:e,range:e.rangeCount>0?e.getRangeAt(0):null};let r=zM(n)??(e.rangeCount>0?e.getRangeAt(0):null);return{points:BM(n,VM(e)),range:r}}function zM(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function BM(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function VM(e){return e.direction}function HM(e){let t=e.getRootNode();return yj(t)||kM(t)?t.activeElement:null}function UM(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function WM(e){let t=e.target;if(t!==null&&YM(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function GM(e,t){let n=e.getChildAtIndex(t);n??=e,bM(e)&&L(102);let r=e=>{let t=e.getParentOrThrow(),i=bM(t),a=e!==n||i?xM(e):e;if(i)return V(e)&&V(a)||L(133),e.insertAfter(a),[e,a,a];{let[n,i,o]=r(t),s=e.getNextSiblings();return o.append(a,...s),[n,i,a]}},[i,a]=r(n);return[i,a]}function KM(e){return YM(e)&&e.tagName===`A`}function qM(e){return YM(e)&&e.tagName===`TR`}function JM(e){return YM(e)&&(e.tagName===`TD`||e.tagName===`TH`)}function YM(e){return XM(e)&&e.nodeType===1}function XM(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function ZM(e){return XM(e)&&e.nodeType===11}var QM=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function $M(e){return!(!YM(e)||!e.style.display.startsWith(`inline`))||QM.test(e.nodeName)}var eN=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function tN(e){return(!YM(e)||!e.style.display.startsWith(`inline`))&&eN.test(e.nodeName)}function nN(e){if(cA(e)&&!e.isInline())return!0;if(!V(e)||bM(e))return!1;let t=e.getFirstChild(),n=t===null||bA(t)||z(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function rN(){return Fk()}function iN(e=rN()){return e._config.dom||XA}function aN(e,t,n=rN()){let r=iN(n).$getDOMSlot(e,t,n);return V(e)&&(cN(r)||L(344,e.getKey(),e.getType())),r}function oN(e,t,n,r){let i=e.read(`latest`,()=>{let r=kj(t);return r===null?null:function(e,t,n=rN()){let r=uP(e,t);if(r===null)return null;let i=n.getElementByKey(r.getKey());return i===null?null:i.parentElement}(r,n,e)});return i!==null&&(i.parentElement!==r&&r.appendChild(i),i.style.display=``),i}function sN(e,t,n){n.style.display=`none`;let r=e.getElementByKey(t);r!==null&&n.parentElement!==r&&r.insertBefore(n,r.firstChild)}function cN(e){return e instanceof KS}function lN(e,t,n=rN()){return bj(aN(e,t,n).element)}var uN=new WeakMap,dN=new Map;function fN(e){if(!e._readOnly&&e.isEmpty())return dN;e._readOnly||L(192);let t=uN.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),uN.set(e,t)),t}function pN(e){let t=e.constructor.clone(e,rj);return t.afterCloneFrom(e),t}function mN(e){return(t=pN(e))[bD]=!0,t;var t}function hN(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function gN(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function _N(e,t){let n=t.style.textAlign;return n&&n in MS?e.setFormat(n):e}function vN(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function yN(e){return!0===e.__lexicalUnmanaged}function bN(e,t=rN()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function xN(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(YM(n)&&n.hasAttribute(`data-lexical-slot`)||Mj(n,t)!==void 0)return!1;n=lM(n)}return!1}function SN(e,t){return LC(e,t)&&e[t]!==CD[t]}var CN=new WeakMap;function wN(e){let t=CN.get(e);return t===void 0?function(e){let t=e.prototype!=null&&RS in e.prototype?e.prototype[RS]():void 0,n=function(e){if(!(e===CD||e.prototype instanceof CD)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{ej.version&&(n=JSON.parse(ej.version))}catch{}L(290,e.name,t,n)}return e===sA||e===aA||e===CD}(e),r=!n&&SN(e,`getType`)?e.getType:void 0,i=r&&!(EN in r)?r.call(e):void 0,a,o=i;if(t){if(i)a=t[i];else{for(let[e,n]of Object.entries(t))o=e,a=n;if(!a)for(let e of Object.getOwnPropertySymbols(t)){let n=t[e];if(n){a=n;break}}}}let s={compiled:void 0,composed:void 0,config:{declaresOwnConfig:LC(e.prototype,RS),klass:e,ownNodeConfig:a,ownNodeType:o},ownFieldsValidated:!1};CN.set(e,s);try{let t=function(e){let t=e.prototype,n=new Map,{fieldsBaseFirst:r}=NN(e);for(let[i,a]of r){let r=LN(e,i,a);if(r===null)continue;if(_C(r)){let t=r.field;if(t===`__proto__`&&L(430,e.name,i),r.setterTable!==void 0){let{setterTable:t}=r,{meta:n}=a;for(let r of n.kind===`enum`?n.values:[a.defaultValue])LC(t,String(r))||L(431,e.name,i,JSON.stringify(r))}n.set(i,{field:t,key:i,kind:`ownField`,schema:a,setterTable:r.setterTable});continue}let o=t[r];typeof o!=`function`&&L(432,e.name,i,r),n.set(i,{key:i,kind:`field`,schema:a,setter:o})}return n.size===0?DN:[...n.values()]}(e),r=function(e){let t=e.prototype,n=new Map;for(let[r,i]of NN(e).fieldsDerivedFirst){let a=IN(e,r,i);if(a===null)continue;if(_C(a)){let o=a.field;o===`__proto__`&&L(426,e.name,r);let s=a.when,c;if(s!==void 0){let n=t[s];typeof n!=`function`&&L(427,e.name,r,s),c=n}n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,field:o,getterTable:a.getterTable,isEqual:i.isEqual,key:r,kind:`ownField`,schema:i,when:c});continue}let o=t[a];typeof o!=`function`&&L(428,e.name,r,a),n.set(r,{defaultValue:i.defaultValue,derived:i.setter===null,getter:o,isEqual:i.isEqual,key:r,kind:`method`,schema:i})}return n.size===0?FN:[...n.values()]}(e),i=NN(e),c=function(e,t,n){let r,i=e;for(let{klass:t,ownNodeConfig:n}of JN(e))n&&n.generated!==void 0&&(r===void 0?(r=n.generated,i=t):n.generated===r&&(i=t));return r===void 0?null:i===e||function(e,t){if(e.getters.length!==t.getters.length||e.setters.length!==t.setters.length)return!1;for(let n=0;n<e.getters.length;n++){let r=e.getters[n],i=t.getters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.derived!==i.derived||r.isEqual!==i.isEqual||!Object.is(r.defaultValue,i.defaultValue)||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.getterTable===void 0!=(i.getterTable===void 0)))return!1}for(let n=0;n<e.setters.length;n++){let r=e.setters[n],i=t.setters[n];if(r.kind!==i.kind||r.key!==i.key||r.schema!==i.schema||r.kind===`ownField`&&i.kind===`ownField`&&(r.field!==i.field||r.setterTable===void 0!=(i.setterTable===void 0)))return!1}return!0}(n,TN(wN(i)))?r:null}(e,0,{getters:r,setters:t});s.compiled={flatStates:i.flatStates,generated:c===null?null:c(i.fields),getters:r,isCompactDefault:BN(r),setters:t},function(e,t,n,r){if(!t&&n){if(!SN(e,`getType`)){let t=e,r=function(){return this===t?n:CD.getType.call(this)};r[EN]=!0,e.getType=r}if(SN(e,`clone`)||(e.clone=(t,n)=>{nj(t);let r=new e;return n!==rj&&r.afterCloneFrom(t),r}),SN(e,`importJSON`)||(e.importJSON=r&&r.$importJSON||function(e){return t=>{let n=XN(e);return n.updateFromJSON===CD.prototype.updateFromJSON?function(e,t){return HN(e.__state||t.$!==void 0?hw(e,t):e,t)}(n,t):n.updateFromJSON(t)}}(e)),!SN(e,`importDOM`)&&r){let{importDOM:t}=r;t&&(e.importDOM=()=>t)}}}(e,n,o,a),function(e){for(let{klass:t,ownNodeConfig:n}of JN(e)){let e=t.prototype;if(LC(e,`afterCloneFrom`))continue;let r=qN(t);if(r.length===0)continue;let i=Object.getPrototypeOf(e),a=n&&n.generated!==void 0?TN(wN(t)).generated:null,o=a!==null&&a.afterCloneFrom||((e,t)=>{let n=e,i=t;for(let e=0;e<r.length;e++){let t=r[e];n[t]=i[t]}});e.afterCloneFrom=function(e){i.afterCloneFrom.call(this,e),o(this,e)},e.afterCloneFrom[GN]=!0}}(e)}catch(t){throw CN.delete(e),t}return s}(e):t}function TN(e){let{compiled:t}=e;return t===void 0&&L(422,e.config.klass.name),t}var EN=Symbol(`lexical.synthesizedGetType`),DN=[];function ON(e,t,n,r){let i=n.method===void 0?r:n.method,a=NN(e).declaredBy.get(t);if(a===void 0)return n;let o=e.prototype,s=a.prototype;return kN(o,s,i)&&kN(o,s,r)?n:i}function kN(e,t,n){return e[n]===t[n]}function AN(e){return`set${e.charAt(0).toUpperCase()}${e.slice(1)}`}function jN(e){return`get${e.charAt(0).toUpperCase()}${e.slice(1)}`}var MN={declaredBy:new Map,fields:new Map,fieldsBaseFirst:[],fieldsDerivedFirst:[],flatStates:[]};function NN(e){let t=wN(e);return t.composed===void 0&&(t.composed=function(e){let t=[],n=[],r=[];for(let{klass:i,ownNodeConfig:a}of JN(e)){let e=a&&a.json;n.push(i),t.push(e&&e.meta.kind===`node`?Object.entries(e.meta.fields):[]);let o=[];if(a&&a.stateConfigs)for(let e of a.stateConfigs)`stateConfig`in e&&e.flat&&o.push(e.stateConfig);r.push(o)}let i=new Map;for(let e=0;e<t.length;e++)for(let[n,r]of t[e])i.has(n)||i.set(n,r);let a=new Map,o=new Map,s=new Map;for(let e=t.length-1;e>=0;e--){for(let[r,s]of t[e]){let t=i.get(r);t===void 0||a.has(r)||a.set(r,t),t===void 0||s!==t||o.has(r)||o.set(r,n[e])}for(let t of r[e])s.has(t.key)||s.set(t.key,t)}return i.size===0&&s.size===0?MN:{declaredBy:o,fields:a,fieldsBaseFirst:[...a],fieldsDerivedFirst:[...i],flatStates:[...s.values()]}}(e)),t.composed}function PN(e){let{fieldsDerivedFirst:t,flatStates:n}=NN(e),r={};for(let e of n)e.schema&&(r[e.key]=e.schema);for(let[e,n]of t)r[e]=n;return r}var FN=[];function IN(e,t,n){let r=n.getter;if(r===null)return null;let i=r===void 0?jN(t):r;return _C(i)?ON(e,t,i,jN(t)):i}function LN(e,t,n){let r=n.setter;if(r===null)return null;let i=r===void 0?AN(t):r;return _C(i)?ON(e,t,i,AN(t)):i}function RN(e){return e}function zN(e,t){let{defaultValue:n,isEqual:r}=e;return t===void 0||t===n||r!==void 0&&r(t,n)}function BN(e){let t;return(n,r)=>{t===void 0&&(t=new Map(e.map(e=>[e.key,e])));let i=t.get(n);return i!==void 0&&zN(i,r)}}function VN(e){let{setterTable:t,schema:n}=e,{defaultValue:r}=n;return t===void 0?r:t[String(r)]}function HN(e,t){let{flatStates:n,generated:r,setters:i}=TN(wN(e.constructor)),a=function(e,t,n){let r=e;for(let e=0;e<n.length;e++){let i=n[e],a=t[i.key];if(a!==void 0){let e=i.parse(a);r=uw(r,i,()=>e)}}return r}(e,t,n);return r!==null&&r.updateFromJSON!==void 0?r.updateFromJSON(a,t):function(e,t,n){for(let r=0;r<n.length;r++){let i=n[r],a=i.schema(t[i.key]);i.kind===`ownField`?RN(e)[i.field]=i.setterTable===void 0?a:LC(i.setterTable,a)?i.setterTable[a]:VN(i):i.setter.call(e,a)}return e}(a,t,i)}function UN(e){return wN(e).config}function WN(e){let t=[];for(let n of[e.getter,e.setter])_C(n)&&n.field!==`__proto__`&&!t.includes(n.field)&&t.push(n.field);return t}var GN=`__lexicalSynthesizedAfterCloneFrom`;function KN(e){let{declaredBy:t,fieldsBaseFirst:n}=NN(e),r=[];for(let[i,a]of n)if(t.get(i)===e)for(let e of WN(a))r.includes(e)||r.push(e);return r}function qN(e){let t=KN(e);if(t.length===0)return t;let n=new Set;for(let{klass:t}of JN(e))if(t!==e)for(let e of KN(t))n.add(e);return n.size===0?t:t.filter(e=>!n.has(e))}function*JN(e){for(let t=e;t&&(t===CD||wD(t.prototype));){let e=UN(t),n=e.declaresOwnConfig;yield n?e:{...e,ownNodeConfig:void 0},t=n&&e.ownNodeConfig&&e.ownNodeConfig.extends||$N(t)}}function YN(e){let t=new Map,n=new Map;for(let r of e){let{ownNodeType:e}=UN(r);e&&(n.set(e,r),t.set(e,new Set))}for(let[e,r]of n)for(let{ownNodeType:n}of JN(r)){let r=n&&t.get(n);r&&r.add(e)}return t}function XN(e){let t=rN();jk();let n=t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e)),r=new n.klass;return n.replace===null?r:SM(r)}var ZN=(e,t)=>{let n=e;for(;n!=null&&!uA(n);){if(t(n))return n;n=n.getParent()}return null};function QN(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?kj(r):t.get(r);e??L(174),n.push(r),r=e.__next}return n}function $N(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}var eP=new Map;function tP(e){return V(e)||cA(e)}function nP(e){return V(e)||cA(e)}function rP(e){let t=e.getLatest();return nP(t)?t.__slotHost:null}function iP(e){let t=rP(e);if(t===null)return null;let n=kj(t);return V(n)||cA(n)||L(370),n}function aP(e){let t=iP(e);if(t===null)return null;let n=e.getLatest().__key;for(let[e,r]of cP(t))if(r===n)return e;return null}function oP(e){let t=e.getLatest();for(;t!==null;){if(rP(t)!==null)return t;t=t.getParent()}return null}function sP(e){if(e===null)return null;let t=B(e)?e.anchor.getNode():e.getNodes()[0]??null;return t===null?null:oP(t)}function cP(e){let t=e.getLatest();return tP(t)&&t.__slots!==null?t.__slots:eP}function lP(e){return Array.from(cP(e).keys())}function uP(e,t){let n=cP(e).get(t);return n===void 0?null:kj(n)}var dP=[`__proto__`,`constructor`,`prototype`],fP=Symbol(`slotMapOwner`);function pP(e){let t=e.__slots;return t!==null&&t[fP]===e||(t=new Map(t),t[fP]=e,e.__slots=t),t}var mP=new WeakMap,hP=[];function gP(e){for(let{ownNodeConfig:t}of JN(e)){let e=t&&t.slots;if(e)return e}return hP}function _P(e){let t=``;for(let n of lP(e)){let r=uP(e,n);r!==null&&(t+=r.getTextContent())}return t}function vP(e,t,n){let r=n.get(e),i=n.get(t);return r===void 0?i===void 0?e<t?-1:+(e>t):1:i===void 0?-1:r-i}function yP(e){let t=e.__slots;if(t===null||t.size<2)return;let n=function(e){let t=mP.get(e);if(t===void 0){let n=gP(e),r=new Map;for(let t of n)dP.includes(t)&&L(371,e.name,t),r.has(t)&&L(372,e.name,t),r.set(t,r.size);t=r,mP.set(e,t)}return t}(e.constructor),r=null,i=!0;for(let e of t.keys()){if(r!==null&&vP(r,e,n)>0){i=!1;break}r=e}if(i)return;let a=Array.from(t).sort(([e],[t])=>vP(e,t,n));t.clear();for(let[e,n]of a)t.set(e,n)}function bP(e,t,n){t!==`__proto__`&&t!==`constructor`&&t!==`prototype`||L(373,t);let r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!V(n)&&!cA(n)||n.isInline())&&L(374,n.__key);let i=e.getWritable(),a=pP(i),o=a.get(t);o!==void 0&&SP(o);let s=n.getWritable(),c=iP(s);if(c!==null){let e=aP(s);e!==null&&pP(c.getWritable()).delete(e),s.__slotHost=null}return wj(s),s.__slotHost=i.__key,a.set(t,s.__key),yP(i),Fk()._slotsUsed=!0,Nk()._slotsUsed=!0,i}function xP(e,t){let n=e.getWritable();if(n.__slots===null)return n;let r=n.__slots.get(t);return r!==void 0&&(SP(r),pP(n).delete(t)),n}function SP(e){let t=kj(e);if(t===null)return;let n=t.getWritable();nP(n)||L(377,e),n.__slotHost=null,n.remove()}var CP={next:`previous`,previous:`next`},wP=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return QP({hasNext:NP,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return RP(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return RP(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&L(263,Array.from(o).join(` `))}else i.insert(e);i=RP(e,this.direction)}for(let e of o.values())e.remove();return this}},TP=class e extends wP{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:HP(e,this.direction)}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=DP(this.direction);return RP(this.getNodeAtCaret(),e)||HP(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},EP={root:uA,shadowRoot:bM};function DP(e){return CP[e]}function OP(e,t=`root`){return e===null||EP[t](e)?null:rP(e)===null?e:null}var kP=class e extends wP{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:RP(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return V(this.origin)?HP(this.origin,this.direction):null}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=DP(this.direction);return RP(this.getNodeAtCaret(),e)||HP(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof AP)&&this.direction===t.direction&&this.origin.is(t.origin)}},AP=class e extends wP{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:zP(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return RP(OP(this.getParentAtCaret(),e),this.direction)}getFlipped(){return zP(this.origin,DP(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof kP||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return RP(this.origin,this.direction)}};function jP(e){return e instanceof AP}function MP(e){return e instanceof wP}function NP(e){return e instanceof kP}function PP(e){return e instanceof TP}var FP={next:class extends AP{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends AP{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},IP={next:class extends kP{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends kP{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},LP={next:class extends TP{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends TP{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function RP(e,t){return e?new IP[t](e):null}function zP(e,t,n){return e?new FP[t](e,BP(e,n)):null}function BP(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&nS(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function VP(e,t){return new KP(e,t)}function HP(e,t){return V(e)?new LP[t](e):null}function UP(e){return e&&e.getChildCaret()||e}function WP(e){return e&&UP(e.getAdjacentCaret())}var GP=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return jP(t)?function(e,t){let{direction:n,origin:r}=e;return VP(e,BP(r,t===`focus`?DP(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[VP(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=jP(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=jP(n),i=t=>t.isSameNodeCaret(n)?null:WP(t)||t.getParentCaret(e);return QP({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},KP=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return zP(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function qP(e){return e instanceof KP}function JP(e,t){return e.direction===t?e:e.getFlipped()}function YP(e){return ZP(e,JP(HP(Ij(),DP(e.direction)),e.direction))}function XP(e){return ZP(e,e)}function ZP(e,t){return e.direction!==t.direction&&L(265),new GP(e,t,e.direction)}function QP(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function $P(e,t){let n=rF(e.origin,t.origin);switch(n===null&&L(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return eF(n)}}function eF(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function tF(e,t){return t.is(e)}function nF(e){return V(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function rF(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=nF(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=nF(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(tF(e,r)||L(276),{commonAncestor:r,type:`ancestor`}):i===null?(tF(t,r)||L(277),{commonAncestor:r,type:`descendant`}):((V(a)||tF(e,a))&&(V(i)||tF(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||L(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function iF(e){return e}function aF(...e){return e}function oF(...e){return e}function sF(e){return e}function cF(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function lF(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\\S+/g))t.push(e);return t}function uF(e,...t){let n=lF(...t);n.length>0&&e.classList.add(...n)}function dF(e,...t){let n=lF(...t);n.length>0&&e.classList.remove(...n)}function fF(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function pF(e,t,n){return fF(...Object.entries(t).map(([t,r])=>AE(e,t,r,n)))}var U=tS,mF=U.$addUpdateTag,hF=U.$applyNodeReplacement,gF=U.$assumeActiveEditor,_F=U.$caretFromPoint,vF=U.$caretRangeFromSelection,yF=U.$cloneWithProperties,bF=U.$cloneWithPropertiesEphemeral,xF=U.$comparePointCaretNext,SF=U.$copyNode,CF=U.$create;U.$createChildrenArray;var wF=U.$createLineBreakNode,TF=U.$createNodeSelection,EF=U.$createParagraphNode,DF=U.$createPoint,OF=U.$createRangeSelection;U.$createRangeSelectionFromDom;var kF=U.$createTabNode,AF=U.$createTextNode,jF=U.$exportNodeJSON,MF=U.$extendCaretToRange,NF=U.$findMatchingParent,PF=U.$flushSyncAfterUpdate,FF=U.$formatText,IF=U.$fullReconcile,LF=U.$generateNodesFromRawText,RF=U.$getAdjacentChildCaret;U.$getAdjacentNode;var zF=U.$getAdjacentSiblingOrParentSiblingCaret;U.$getCaretInDirection;var BF=U.$getCaretRange,VF=U.$getCaretRangeInDirection,HF=U.$getCharacterOffsets,UF=U.$getChildCaret,WF=U.$getChildCaretAtIndex,GF=U.$getChildCaretOrSelf,KF=U.$getCollapsedCaretRange;U.$getCommonAncestor,U.$getCommonAncestorResultBranchOrder;var qF=U.$getDOMSlot,JF=U.$getDOMTextNode,YF=U.$getDocument,XF=U.$getEditor,ZF=U.$getEditorDOMRenderConfig,QF=U.$getNearestNodeFromDOMNode;U.$getNearestRootOrShadowRoot;var $F=U.$getNodeByKey;U.$getNodeByKeyOrThrow;var eI=U.$getNodeFromDOMNode,tI=U.$getPreviousSelection,nI=U.$getRoot,W=U.$getSelection,rI=U.$getSelectionSlotFrame,iI=U.$getSiblingCaret,aI=U.$getSlot,oI=U.$getSlotFrame,sI=U.$getSlotHost;U.$getSlotNameWithinHost;var cI=U.$getSlotNames,lI=U.$getState;U.$getStateChange,U.$getTextContent,U.$getTextNodeOffset;var uI=U.$getTextPointCaret;U.$getTextPointCaretSlice,U.$getWritableNodeState;var dI=U.$hasAncestor;U.$hasUpdateTag;var fI=U.$insertNodeToNearestRootAtCaret,pI=U.$insertNodes,mI=U.$isBlockElementNode,hI=U.$isBlockFullySelected,gI=U.$isChildCaret;U.$isCompactExport;var _I=U.$isDecoratorNode,vI=U.$isEditorState;U.$isElementDOMSlot;var G=U.$isElementNode,yI=U.$isExtendableTextPointCaret;U.$isInlineElementOrDecoratorNode,U.$isInlineFormattable;var bI=U.$isLeafNode,xI=U.$isLexicalNode,SI=U.$isLineBreakNode;U.$isNodeCaret;var CI=U.$isNodeSelection,wI=U.$isParagraphNode,K=U.$isRangeSelection,TI=U.$isRootNode,EI=U.$isRootOrShadowRoot,DI=U.$isSelectionCapturedInDecoratorInput,OI=U.$isShadowRootNode,kI=U.$isSiblingCaret;U.$isSlotChild;var AI=U.$isSlotHost,jI=U.$isTabNode,q=U.$isTextNode,MI=U.$isTextPointCaret;U.$isTextPointCaretSlice;var NI=U.$isTokenOrSegmented;U.$isTokenOrTab,U.$markSlotEditable;var PI=U.$needsBlockCursorBeside;U.$nodesOfType;var FI=U.$normalizeCaret,II=U.$normalizeSelection__EXPERIMENTAL;U.$onUpdate;var LI=U.$parseSerializedNode;U.$removeFromParent,U.$removeSlot;var RI=U.$removeTextFromCaretRange,zI=U.$rewindSiblingCaret,BI=U.$selectAll;U.$setCompositionKey;var VI=U.$setDirectionFromDOM,HI=U.$setFormatFromDOM,UI=U.$setPointFromCaret,WI=U.$setSelection,GI=U.$setSelectionFromCaretRange;U.$setSlot;var KI=U.$setState,qI=U.$setTextFormat,JI=U.$splitAtPointCaretNext,YI=U.$splitNode,XI=U.$updateDOMSelection;U.$updateRangeSelectionFromCaretRange,U.$withCompactExport;var ZI=U.ArtificialNode__DO_NOT_USE;U.BEFORE_INPUT_COMMAND,U.BLUR_COMMAND;var QI=U.CAN_REDO_COMMAND,$I=U.CAN_UNDO_COMMAND,eL=U.CAN_USE_BEFORE_INPUT,tL=U.CAN_USE_DOM,nL=U.CLEAR_EDITOR_COMMAND,rL=U.CLEAR_HISTORY_COMMAND,iL=U.CLICK_COMMAND,aL=U.COLLABORATION_TAG,oL=U.COMMAND_PRIORITY_BEFORE_CRITICAL,sL=U.COMMAND_PRIORITY_BEFORE_EDITOR;U.COMMAND_PRIORITY_BEFORE_HIGH,U.COMMAND_PRIORITY_BEFORE_LOW,U.COMMAND_PRIORITY_BEFORE_NORMAL;var cL=U.COMMAND_PRIORITY_CRITICAL,lL=U.COMMAND_PRIORITY_EDITOR;U.COMMAND_PRIORITY_HIGH;var uL=U.COMMAND_PRIORITY_LOW,dL=U.COMMAND_PRIORITY_NORMAL;U.COMPOSITION_END_COMMAND;var fL=U.COMPOSITION_END_TAG,pL=U.COMPOSITION_START_COMMAND,mL=U.COMPOSITION_START_TAG,hL=U.CONTROLLED_TEXT_INSERTION_COMMAND,gL=U.CONTROL_OR_ALT,_L=U.CONTROL_OR_META;U.CONTROL_OR_OTHER_KEY;var vL=U.COPY_COMMAND,yL=U.CUT_COMMAND,bL=U.CUT_TAG,xL=U.DEFAULT_EDITOR_DOM_CONFIG,SL=U.DELETE_CHARACTER_COMMAND,CL=U.DELETE_LINE_COMMAND,wL=U.DELETE_WORD_COMMAND;U.DRAGEND_COMMAND;var TL=U.DRAGOVER_COMMAND,EL=U.DRAGSTART_COMMAND,DL=U.DROP_COMMAND,OL=U.DecoratorNode,kL=U.ElementNode;U.FOCUS_COMMAND;var AL=U.FORMAT_ELEMENT_COMMAND,jL=U.FORMAT_TEXT_COMMAND,ML=U.HISTORIC_TAG,NL=U.HISTORY_MERGE_TAG,PL=U.HISTORY_PUSH_TAG,FL=U.INDENT_CONTENT_COMMAND;U.INPUT_COMMAND;var IL=U.INSERT_LINE_BREAK_COMMAND,LL=U.INSERT_PARAGRAPH_COMMAND,RL=U.INSERT_TAB_COMMAND,zL=U.INTERNAL_$expandSelectionToWholeDocument,BL=U.INTERNAL_$isBlock;U.IS_ALL_FORMATTING;var VL=U.IS_ANDROID,HL=U.IS_ANDROID_CHROME,UL=U.IS_APPLE,WL=U.IS_APPLE_WEBKIT,GL=U.IS_BOLD,KL=U.IS_CHROME,qL=U.IS_CODE,JL=U.IS_FIREFOX,YL=U.IS_HIGHLIGHT,XL=U.IS_IOS,ZL=U.IS_ITALIC,QL=U.IS_SAFARI,$L=U.IS_STRIKETHROUGH,eR=U.IS_SUBSCRIPT,tR=U.IS_SUPERSCRIPT,nR=U.IS_UNDERLINE,rR=U.KEY_ARROW_DOWN_COMMAND,iR=U.KEY_ARROW_LEFT_COMMAND,aR=U.KEY_ARROW_RIGHT_COMMAND,oR=U.KEY_ARROW_UP_COMMAND,sR=U.KEY_BACKSPACE_COMMAND,cR=U.KEY_DELETE_COMMAND,lR=U.KEY_DOWN_COMMAND,uR=U.KEY_ENTER_COMMAND,dR=U.KEY_ESCAPE_COMMAND;U.KEY_MODIFIER_COMMAND;var fR=U.KEY_SPACE_COMMAND,pR=U.KEY_TAB_COMMAND,mR=U.LineBreakNode,hR=U.MOVE_TO_END,gR=U.MOVE_TO_START;U.NODE_STATE_DIRECT,U.NODE_STATE_KEY,U.NODE_STATE_LATEST;var _R=U.OUTDENT_CONTENT_COMMAND,vR=U.PASTE_COMMAND,yR=U.PASTE_TAG,bR=U.ParagraphNode,xR=U.REDO_COMMAND,SR=U.REMOVE_TEXT_COMMAND,CR=U.RootNode,wR=U.SELECTION_CHANGE_COMMAND,TR=U.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,ER=U.SELECT_ALL_COMMAND,DR=U.SET_TEXT_FORMAT_COMMAND;U.SKIP_COLLAB_TAG;var OR=U.SKIP_DOM_SELECTION_TAG,kR=U.SKIP_SCROLL_INTO_VIEW_TAG,AR=U.SKIP_SELECTION_FOCUS_TAG,jR=U.TEXT_TYPE_TO_FORMAT,MR=U.TabNode,NR=U.TextNode,PR=U.UNDO_COMMAND,FR=U.addClassNamesToElement,IR=U.aliasTableOf,LR=U.aliasedValue;U.arrayValue;var RR=U.booleanValue,zR=U.buildImportMap,BR=U.compileKeyboardShortcuts,VR=U.configExtension,HR=U.createCommand,UR=U.createEditor,WR=U.createRefCountedRegistry;U.createSharedNodeState;var GR=U.createState,KR=U.declarePeerDependency;U.declaredAccepts;var qR=U.defineExtension,JR=U.enumValue,YR=U.findAllLexicalElementsDeep,XR=U.flipDirection,ZR=U.getActiveElement,QR=U.getActiveElementDeep,$R=U.getComposedEventTarget;U.getComposedSchemaFields,U.getComposedStaticRange,U.getDOMOwnerDocument;var ez=U.getDOMSelection;U.getDOMSelectionFromTarget;var tz=U.getDOMSelectionPoints;U.getDOMSelectionRange,U.getDOMSelectionRangeAndPoints;var nz=U.getDOMShadowRoots,rz=U.getDOMTextNode;U.getDeclaredSlots;var iz=U.getEditorPropertyFromDOMNode,az=U.getNearestEditorFromDOMNode,oz=U.getParentElement;U.getRegisteredNode,U.getRegisteredNodeOrThrow;var sz=U.getRegisteredSubtypeMap,cz=U.getRootOwnerDocument,lz=U.getStaticNodeConfig,uz=U.getStyleObjectFromCSS,dz=U.getTextDirection;U.getTransformSetFromKlass;var fz=U.getterTableOf,pz=U.isBlockDomNode;U.isCurrentlyReadOnlyMode,U.isDOMCapturingSelection;var mz=U.isDOMDocumentNode,hz=U.isDOMNode,gz=U.isDOMShadowRoot,_z=U.isDOMTextNode;U.isDOMUnmanaged;var vz=U.isDocumentFragment,yz=U.isExactShortcutMatch,bz=U.isHTMLAnchorElement,J=U.isHTMLElement;U.isHTMLTableCellElement,U.isHTMLTableRowElement;var xz=U.isInlineDomNode,Sz=U.isLastChildInBlockNode,Cz=U.isLexicalEditor;U.isModifierMatch;var wz=U.isOnlyChildInBlockNode;U.isSchemaField,U.isSelectionCapturedInDecoratorInput;var Tz=U.isSelectionWithinEditor,Ez=U.iterStaticNodeConfigChain,Dz=U.keyboardEventMaskForPlatform,Oz=U.makeStepwiseIterator,kz=U.mergeRegister;U.mountSlotContainer;var Az=U.nodeSchema,jz=U.normalizeClassNames,Mz=U.nullable,Nz=U.numberValue;U.objectValue;var Pz=U.optional;U.rawValue;var Fz=U.registerEventListener,Iz=U.registerEventListeners,Lz=U.removeClassNamesFromElement;U.removeFromParent,U.resetRandomKey;var Rz=U.safeCast,zz=U.setDOMStyleFromCSS;U.setDOMStyleObject,U.setDOMUnmanaged;var Bz=U.setNodeIndentFromDOM,Vz=U.setterDefaultOf,Hz=U.setterTableOf,Uz=U.shallowMergeConfig,Wz=U.stopLexicalPropagation,Gz=U.stringValue,Kz=U.toggleTextFormatType,qz=U.tokenizeRawText;U.transformValue,U.unionValue,U.unmountSlotContainer;var Jz=U.withAccessors,Yz=U.withField,Xz=qd(`<!>`,0,1),Zz=kr(2),Qz={},$z={tag:NL};function eB(e,t){if(t!==null){if(t===void 0)e.update(()=>{let t=nI();if(t.isEmpty()){let n=EF();t.append(n);let r=e.getRootElement(),i=tL&&r!==null?ZR(r):null;(W()!==null||i!==null&&i===r)&&n.select()}},$z);else if(t!==null)switch(typeof t){case`string`:{let n=e.parseEditorState(t);e.setEditorState(n,$z);break}case`object`:e.setEditorState(t,$z);break;case`function`:e.update(()=>{nI().isEmpty()&&t(e)},$z)}}}var tB=function(e,t,n){let r=t.block,i=lu(t,Zz+0),a=i.hooks;a===void 0&&(i.hooks=a=du(2));let o=e.initialConfig,s;if(a[0]!==!0){let e;__hkl:{let{theme:t,namespace:n,nodes:r,onError:i,onWarn:a,editorState:s,html:c}=o,l=Qx(null,t),u=UR({editable:o.editable,html:c,namespace:n,nodes:r,onError:e=>i(e,u),...a?{onWarn:e=>a(e,u)}:{},theme:t});eB(u,s),e=[u,l];break __hkl}s=e,fu(a,0,s)}s=a[1];let c=s;if(iu(()=>{let e=o.editable,[t]=c;t.setEditable(e===void 0||e)},[],Zz+0),t.block.pending&&!t.block.crossRenderUpdate)return;function l(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r=Qd(Xz);e=i.parentNode,t=bf(r),$d(r,i.parentNode,i.endMarker),a=nf(n,null,e,t,null,void 0)}{let t=e.children;a.c=Rv(n,1,a.a,t,a.c,a.d,a.b,!0,!0),a.d=t}}S_(t,0,r.parentNode,Zx,{value:c,children:Pu(l,Qz)},r.endMarker,void 0,void 0,!0,void 0,`c:a79f02fd`)},nB=t({$canShowPlaceholder:()=>oB,$canShowPlaceholderCurry:()=>sB,$findTextIntersectionFromCharacters:()=>cB,$isRootTextContentEmpty:()=>iB,$isRootTextContentEmptyCurry:()=>aB,$rootTextContent:()=>rB,registerLexicalTextEntity:()=>uB});function rB(){return nI().getTextContent()}function iB(e,t=!0){if(e)return!1;let n=rB();return t&&(n=n.trim()),n===``}function aB(e,t){return()=>iB(e,t)}function oB(e){if(!iB(e,!1))return!1;let t=nI().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){let n=t[e];if(_I(n))return!1;if(G(n)){if(!wI(n)||n.__indent!==0)return!1;let e=n.getChildren(),t=e.length;for(let n=0;n<t;n++){let t=e[n];if(!q(t))return!1}}}return!0}function sB(e){return()=>oB(e)}function cB(e,t){let n=e.getFirstChild(),r=0;t:for(;n!==null;){if(G(n)){let e=n.getFirstChild();if(e!==null){n=e;continue}}else if(q(n)){let e=n.getTextContentSize();if(r+e>t)return{node:n,offset:t-r};r+=e}let e=n.getNextSibling();if(e!==null){n=e;continue}let i=n.getParent();for(;i!==null;){let e=i.getNextSibling();if(e!==null){n=e;continue t}i=i.getParent()}break}return null}function lB(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function uB(e,t,n,r){let i=e=>e instanceof n,a=e=>{let t=AF(e.getTextContent()).setFormat(e.getFormat()).setStyle(e.getStyle()).setDetail(e.getDetail());e.replace(t)};return[e.registerNodeTransform(NR,e=>{if(!e.isSimpleText())return;let n,o=e.getPreviousSibling(),s=e.getTextContent(),c=e;if(q(o)){let n=o.getTextContent(),r=t(n+s);if(i(o)){if(r===null||(e=>e.getLatest().__mode)(o)!==0)return void a(o);{let t=r.end-n.length;if(t>0){let r=n+s.slice(0,t);if(o.select(),o.setTextContent(r),t===s.length)e.remove();else{let n=s.slice(t);e.setTextContent(n)}return}}}else if(r===null||r.start<n.length)return}let l=0;for(;;){let e=s;n=t(e);let u=n===null?``:e.slice(n.end);if(s=u,u===``){let r=c.getNextSibling();if(q(r)){let o=t(e+r.getTextContent());if(o===null)return void(i(r)?a(r):r.markDirty());if(n===null||o.start!==n.start)return}}if(n===null)return;if(n.start===0&&q(o)&&o.isTextEntity()){l+=n.end;continue}let d;n.start===0?[d,c]=c.splitText(n.end):[,d,c]=c.splitText(n.start+l,n.end+l),d===void 0&&lB(165,`nodeToReplace`);let f=r(d);if(f.setFormat(d.getFormat()).setStyle(d.getStyle()).setDetail(d.getDetail()),d.replace(f),c==null)return;l=0,o=f}}),e.registerNodeTransform(n,e=>{let n=e.getTextContent(),r=t(n);if(r===null||r.start!==0)return void a(e);if(n.length>r.end)return void e.splitText(r.end);let o=e.getPreviousSibling();q(o)&&o.isTextEntity()&&(a(o),a(e));let s=e.getNextSibling();q(s)&&s.isTextEntity()&&(a(s),i(e)&&a(e))})]}var dB=nB;dB.$canShowPlaceholder;var fB=dB.$canShowPlaceholderCurry;dB.$findTextIntersectionFromCharacters,dB.$isRootTextContentEmpty,dB.$isRootTextContentEmptyCurry,dB.$rootTextContent,dB.registerLexicalTextEntity;function pB(e){return e.read(`latest`,fB(e.isComposing()))}function mB(e,t){return Ml(hB,this,arguments)}function hB(e,t){let[n,r]=Ll(()=>pB(e),Xx(t,`ucsp:state`));return iu(()=>{function t(){r(pB(e))}return t(),kz(e.registerUpdateListener(()=>t()),e.registerEditableListener(()=>t()))},[e],Xx(t,`ucsp:le`)),n}pr(1,!0);var gB=qd(`<div></div>`),_B=kr(2),vB=[`s`,`y`,`x`],yB=new Set([`editor`,`ariaActiveDescendant`,`ariaAutoComplete`,`ariaControls`,`ariaDescribedBy`,`ariaErrorMessage`,`ariaExpanded`,`ariaInvalid`,`ariaLabel`,`ariaLabelledBy`,`ariaMultiline`,`ariaOwns`,`ariaRequired`,`autoCapitalize`,`className`,`contentEditable`,`id`,`role`,`spellCheck`,`style`,`tabIndex`,`ref`,`placeholder`,`data-testid`]),bB=Nu(function(e,t,n){let r=lu(t,_B+0),i=r.hooks;i===void 0&&(r.hooks=i=du(3));let a,o=e.editor,[s,c]=Ll(o.isEditable(),_B+0),l=(a=o,i[0]!==!0||!cu(i[1],a)?pu(i,0,e=>{e&&e.ownerDocument&&e.ownerDocument.defaultView?o.setRootElement(e):o.setRootElement(null)},a):i[2]);iu(()=>(c(o.isEditable()),o.registerEditableListener(e=>{c(e)})),[o],_B+1);let u=e.role==null?`textbox`:e.role,d={};for(let t in e)yB.has(t)||(d[t]=e[t]);if(e.className!=null&&(d.class=e.className),t.block.pending&&!t.block.crossRenderUpdate)return;let f=t.slots[0];if(f===void 0){let n,r,i,a,o,c,p,m,h,g,_,v,y,b,x,S,C,ee,te,ne,re,ie,ae,oe,se,ce=Qd(gB);n=e.ref==null?l:[e.ref,l],r=s?e.ariaActiveDescendant:void 0,i=s?e.ariaAutoComplete:`none`,a=s?e.ariaControls:void 0,o=e.ariaDescribedBy,c=e.ariaErrorMessage==null?void 0:e.ariaErrorMessage,p=s&&u===`combobox`?String(!!e.ariaExpanded):void 0,m=e.ariaInvalid==null?void 0:e.ariaInvalid,h=e.ariaLabel,g=e.ariaLabelledBy,_=e.ariaMultiline,v=s?e.ariaOwns:void 0,y=s?void 0:`true`,b=e.ariaRequired==null?void 0:String(e.ariaRequired),x=e.autoCapitalize,S=s?`true`:`false`,C=e[`data-testid`],ee=e.id,te=u,ne=e.spellCheck===!1?`false`:`true`,re=e.style,ie=e.tabIndex??(s?void 0:-1),ae=Xp(d),oe=ce,se=mm(t,void 0,ce,[[!1,`ref`,n],[!1,`aria-activedescendant`,r],[!1,`aria-autocomplete`,i],[!1,`aria-controls`,a],[!1,`aria-describedby`,o],[!1,`aria-errormessage`,c],[!1,`aria-expanded`,p],[!1,`aria-invalid`,m],[!1,`aria-label`,h],[!1,`aria-labelledby`,g],[!1,`aria-multiline`,_],[!1,`aria-owns`,v],[!1,`aria-readonly`,y],[!1,`aria-required`,b],[!1,`autoCapitalize`,x],[!1,`contentEditable`,S],[!1,`data-testid`,C],[!1,`id`,ee],[!1,`role`,te],[!1,`spellCheck`,ne],[!1,`style`,re],[!1,`tabIndex`,ie],[!0,ae]],`b:4240a10f`,!1),f=sf(t,ce,{a:n,b:r,c:i,d:a,e:o,f:c,g:p,h:m,i:h,j:g,k:_,l:v,m:y,n:b,o:x,p:S,q:C,r:ee,s:te,t:ne,u:re,v:ie,w:ae,x:oe,y:se,z:null,A:void 0}),t.refFields=vB}else{{let t=e.ref==null?l:[e.ref,l];f.a!==t&&(f.a=t)}{let t=s?e.ariaActiveDescendant:void 0;f.b!==t&&(f.b=t)}{let t=s?e.ariaAutoComplete:`none`;f.c!==t&&(f.c=t)}{let t=s?e.ariaControls:void 0;f.d!==t&&(f.d=t)}{let t=e.ariaDescribedBy;f.e!==t&&(f.e=t)}{let t=e.ariaErrorMessage==null?void 0:e.ariaErrorMessage;f.f!==t&&(f.f=t)}{let t=s&&u===`combobox`?String(!!e.ariaExpanded):void 0;f.g!==t&&(f.g=t)}{let t=e.ariaInvalid==null?void 0:e.ariaInvalid;f.h!==t&&(f.h=t)}{let t=e.ariaLabel;f.i!==t&&(f.i=t)}{let t=e.ariaLabelledBy;f.j!==t&&(f.j=t)}{let t=e.ariaMultiline;f.k!==t&&(f.k=t)}{let t=s?e.ariaOwns:void 0;f.l!==t&&(f.l=t)}{let e=s?void 0:`true`;f.m!==e&&(f.m=e)}{let t=e.ariaRequired==null?void 0:String(e.ariaRequired);f.n!==t&&(f.n=t)}{let t=e.autoCapitalize;f.o!==t&&(f.o=t)}{let e=s?`true`:`false`;f.p!==e&&(f.p=e)}{let t=e[`data-testid`];f.q!==t&&(f.q=t)}{let t=e.id;f.r!==t&&(f.r=t)}{let e=u;f.s!==e&&(f.s=e)}{let t=e.spellCheck===!1?`false`:`true`;f.t!==t&&(f.t=t)}{let t=e.style;f.u!==t&&(f.u=t)}{let t=e.tabIndex??(s?void 0:-1);f.v!==t&&(f.v=t)}f.w=Xp(d),f.y=mm(t,f.y,f.x,[[!1,`ref`,f.a],[!1,`aria-activedescendant`,f.b],[!1,`aria-autocomplete`,f.c],[!1,`aria-controls`,f.d],[!1,`aria-describedby`,f.e],[!1,`aria-errormessage`,f.f],[!1,`aria-expanded`,f.g],[!1,`aria-invalid`,f.h],[!1,`aria-label`,f.i],[!1,`aria-labelledby`,f.j],[!1,`aria-multiline`,f.k],[!1,`aria-owns`,f.l],[!1,`aria-readonly`,f.m],[!1,`aria-required`,f.n],[!1,`autoCapitalize`,f.o],[!1,`contentEditable`,f.p],[!1,`data-testid`,f.q],[!1,`id`,f.r],[!1,`role`,f.s],[!1,`spellCheck`,f.t],[!1,`style`,f.u],[!1,`tabIndex`,f.v],[!0,f.w]],`b:4240a10f`,!1)}f.B=Pv(t,f.B,1,f.x,Object.prototype.propertyIsEnumerable.call(f.y.resolved,`children`)?f.y.resolved.children:void 0,`b:4240a10f`,null,void 0,void 0,void 0,!0)}),xB=qd(`<div aria-hidden=\"true\"></div>`),SB=qd(`<!><!>`,3,1),CB=kr(6),wB=Symbol(CB);function TB(e,t,n){}function EB(e,t,n){}function DB(e,t,n){let r=n[0],i=t.slots[0];if(i===void 0){let e,n=Qd(xB);e=n,i=tf(t,n,e,null,void 0)}{let e=r;i.b=zv(t,1,i.a,e,i.b,i.c),i.c=e}}function OB(e,t,n){let r=t.block,i=n[0],a=n[1].content,o=null;typeof a==`function`?o=a(i):a!==null&&(o=a),(!t.block.pending||t.block.crossRenderUpdate)&&Kb(t,0,r.parentNode,o===null,EB,DB,r.endMarker,[o])}var kB=Symbol(CB+3),AB=function(e,t,n){let r=t.block,i=e.editor,a=Nl(wB,mB,i),[o,s]=Ll(i.isEditable(),CB+1);iu(()=>(s(i.isEditable()),i.registerEditableListener(e=>{s(e)})),[i],CB+2),(!t.block.pending||t.block.crossRenderUpdate)&&Kb(t,0,r.parentNode,!a,TB,OB,r.endMarker,[o,e])},jB=function(e,t,n){let r=t.block,[i]=Nl(kB,$x);if(t.block.pending&&!t.block.crossRenderUpdate)return;let a=t.slots[0];if(a===void 0){let e,n,i,o=Qd(SB);e=r.parentNode;let s=bf(o);n=s,i=xf(s,1),$d(o,r.parentNode,r.endMarker),a=rf(t,null,e,n,i,null,void 0)}C_(t,1,a.a,bB,{editor:i,...e},a.b,void 0,void 0,void 0,void 0,`c:2d560ff1`);{let n=e.placeholder==null?null:u_(()=>h_(`c:55f46946`,AB,{editor:i,content:e.placeholder}));a.d=Rv(t,2,a.a,n,a.d,a.e,a.c,!0),a.e=n}};function MB(e,t){return Ml(NB,this,arguments)}function NB(e,t){let n,r,i,a,[o]=$x(),s=(r=o,i=e,n=Nd(Xx(t,`uls:memo`),`useMemo`),a=Fd(n,r,i),a===null?Ld(n,e(o),r,i):a.value),[c,l]=Ll(()=>s.initialValueFn(),Xx(t,`uls:state`)),u=mu(c,Xx(t,`uls:ref`));return iu(()=>{let{initialValueFn:e,subscribe:t}=s,n=e();return u.current!==n&&(u.current=n,l(n)),t(e=>{u.current=e,l(e)})},[s,e],Xx(t,`uls:le`)),c}function PB(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function FB(e){return Ml(IB,this,arguments)}function IB(e){return MB(PB,e)}var LB=Symbol.for(`preact-signals`);function RB(){if(GB>1){GB--;return}let e,t=!1;for((function(){let e=WB;for(WB=void 0;e!==void 0;){let t=e.S;if(t.v===e.v)for(let n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();HB!==void 0;){let n=HB;for(HB=void 0,KB++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&$B(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(KB=0,GB--,t)throw e}function zB(e){if(GB>0)return e();JB=++qB,GB++;try{return e()}finally{RB()}}var BB,VB,HB;function UB(e){let t=BB,n=VB;BB=void 0,VB=void 0;try{return e()}finally{BB=t,VB=n}}var WB,GB=0,KB=0,qB=0,JB=0,YB=0;function XB(e){if(BB===void 0)return;let t=e.n;if(t===void 0||t.t!==BB)return t={i:0,S:e,p:BB.s,n:void 0,t:BB,e:void 0,x:void 0,r:t},BB.s!==void 0&&(BB.s.n=t),BB.s=t,e.n=t,32&BB.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=BB.s,t.n=void 0,BB.s.n=t,BB.s=t),t}function ZB(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ZB.prototype.brand=LB,ZB.prototype.h=function(){return!0},ZB.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?UB(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},ZB.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&UB(()=>{var e;(e=this.Z)==null||e.call(this)}))}},ZB.prototype.subscribe=function(e){return cV(()=>{let t=this.value;UB(()=>e(t))},{name:`sub`})},ZB.prototype.valueOf=function(){return this.value},ZB.prototype.toString=function(){return this.value+``},ZB.prototype.toJSON=function(){return this.value},ZB.prototype.peek=function(){return UB(()=>this.value)},Object.defineProperty(ZB.prototype,\"value\",{get(){let e=XB(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(KB>100)throw Error(`Cycle detected`);(function(e){GB!==0&&KB===0&&e.l!==JB&&(e.l=JB,WB={S:e,v:e.v,i:e.i,o:WB})})(this),this.v=e,this.i++,YB++,GB++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{RB()}}}});function QB(e,t){return new ZB(e,t)}function $B(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function eV(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function tV(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function nV(e,t){ZB.call(this,void 0,t),this.x=e,this.s=void 0,this.g=YB-1,this.f=4}nV.prototype=new ZB,nV.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===YB))return!0;if(this.g=YB,this.f|=1,this.i>0&&!$B(this))return this.f&=-2,!0;let e=BB;try{eV(this),BB=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return BB=e,tV(this),this.f&=-2,!0},nV.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}ZB.prototype.S.call(this,e)},nV.prototype.U=function(e){if(this.t!==void 0&&(ZB.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},nV.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(nV.prototype,\"value\",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=XB(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function rV(e,t){return new nV(e,t)}function iV(e){let t=e.m;if(e.m=void 0,typeof t==`function`){GB++;let n=BB;BB=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,aV(e),t}finally{BB=n,RB()}}}function aV(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,iV(e)}function oV(e){if(BB!==this)throw Error(`Out-of-order effect`);tV(this),BB=e,this.f&=-2,8&this.f&&aV(this),RB()}function sV(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,VB&&VB.push(this)}sV.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},sV.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,iV(this),eV(this),GB++;let e=BB;return BB=this,oV.bind(this,e)},sV.prototype.N=function(){2&this.f||(this.f|=2,this.u=HB,HB=this)},sV.prototype.d=function(){this.f|=8,1&this.f||aV(this)},sV.prototype.dispose=function(){this.d()};function cV(e,t){let n=new sV(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}var lV=t({batch:()=>zB,computed:()=>rV,effect:()=>cV,signal:()=>QB,untracked:()=>UB}),uV=lV.batch,dV=lV.computed,fV=lV.effect,pV=lV.signal,mV=lV.untracked,hV=t({namedSignals:()=>gV});function gV(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=pV(i===void 0?e[r]:i)}return n}var _V=hV.namedSignals,vV=t({watchedSignal:()=>yV});function yV(e,t){let n;return pV(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}var bV=vV.watchedSignal,xV=t({DragonExtension:()=>AV,installDragonSupport:()=>wV,registerDragonSupport:()=>OV}),SV={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},CV=Symbol.for(`@lexical/dragon/WindowState`);function wV(e=function(){return typeof window<`u`?window:void 0}()){return e?TV(e,Symbol(`@lexical/dragon/globalInstall`),void 0):()=>{}}function TV(e,t,n){let r=function(e){let t=e[CV];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[CV]=t),t}(e);if(r.installs.size===0){let t=kV.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return EV.bind(null,e,r,t,n)}function EV(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[CV])}function DV(e){return e&&e.ownerDocument.defaultView}function OV(e){let t=bV(()=>DV(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=DV(e)}));return fV(()=>{let n=t.value;if(n)return TV(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function kV(e){if(e.origin!==this.location.origin)return;let t=function(e){let t=e[CV];if(t===void 0)return null;let n=iz(QR(e.document));return Cz(n)&&t.editors.has(n)?n:null}(this);if(t===null)return;let n=e.data;if(typeof n==`string`){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol===`nuanria_messaging`&&r.type===`request`){let n=r.payload;if(n&&n.functionId===`makeChanges`){let r=n.args;if(Array.isArray(r)){let[n,i,a,o,s,c]=r;if(![n,i,o,s].every(Number.isFinite)||typeof a!=`string`&&a!==-1)return;t.update(()=>{let t=W();if(K(t)){let r=t.anchor,l=r.getNode(),u=0,d=0;if(q(l)&&n>=0&&i>=0&&(u=n,d=n+i,t.setTextNodeRange(l,u,l,d)),typeof a!=`string`||u===d&&a===``||(t.insertRawText(a),l=r.getNode()),q(l)){let e=l.getTextContentSize();u=Math.min(Math.max(o,0),e),d=o<0||s<0?u:Math.min(o+s,e),t.setTextNodeRange(l,u,l,d)}if(typeof c==`string`&&s>0&&!t.isCollapsed()){let e=SV[c];e!==void 0&&t.formatText(e)}e.stopImmediatePropagation()}})}}}}}var AV={build:(e,t,n)=>_V(t),config:{disabled:typeof window>`u`},name:`@lexical/dragon`,register:(e,t,n)=>fV(()=>n.getOutput().disabled.value?void 0:OV(e))},jV=xV,MV=jV.DragonExtension;jV.installDragonSupport;var NV=jV.registerDragonSupport,PV=t({getKnownTypesAndNodes:()=>FV,getNodeConfig:()=>IV});function FV(e){let t=new Set,n=new Set;for(let r of IV(e)){let e=typeof r==`function`?r:r.replace;lz(e),t.add(e.getType()),n.add(e)}return{nodes:n,types:t}}function IV(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}var LV=PV,RV=LV.getKnownTypesAndNodes,zV=LV.getNodeConfig,BV=t({InitialStateExtension:()=>UV}),VV={tag:NL};function HV(){let e=nI();e.isEmpty()&&e.append(EF())}var UV={config:{setOptions:VV,updateOptions:VV},init:({$initialEditorState:e=HV})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(vI(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[CR,NR,mR,MR,bR]},WV=BV.InitialStateExtension,GV=t({LexicalBuilder:()=>gH,buildEditorFromExtensions:()=>dH,builderSymbol:()=>uH});function KV(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function qV(){let e;try{e=`0.51.0+prod.esm`}catch{}return e??`\"<unknown>+source\"`}var JV=qV(),YV=new Set([`__proto__`,`constructor`,`prototype`]);function XV(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!YV.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=XV(n[e],r[e]));return e}return t}var ZV=0,QV=1,$V=2,eH=3,tH=4,nH=5,rH=6,iH=7;function aH(e){return e.id===ZV}function oH(e){return e.id===$V}function sH(e){return function(e){return e.id===QV}(e)||KV(305,String(e.id),String(QV)),Object.assign(e,{id:$V})}var cH=new Set,lH=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:ZV}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Uz;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;oH(t)||KV(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:eH,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:tH,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==tH&&KV(307,String(t.id),String(nH)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:nH,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==nH&&KV(308,String(n.id),String(nH));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:rH})}(n),()=>{let e=this.state;e.id!==iH&&KV(309,String(n.id),String(iH)),this.state=function(e){return Object.assign(e,{id:nH})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==rH&&KV(310,String(t.id),String(rH)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:iH})}(t),n}getSignal(){return this._signal===void 0&&KV(311),this._signal}getInitResult(){this.extension.init===void 0&&KV(312,this.extension.name);let e=this.state;return function(e){return e.id>=tH}(e)||KV(313,String(e.id),String(tH)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=eH}(e)||KV(314,String(e.id),String(eH)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&KV(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&KV(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=iH}(e)||KV(316,String(e.id),String(iH)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||cH}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=nH})(e)||KV(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},uH=Symbol.for(`@lexical/extension/LexicalBuilder`);function dH(...e){return gH.fromExtensions(e).buildEditor()}function fH(){}function pH(e){throw e}function mH(e){return Array.isArray(e)?e:[e]}var hH=JV,gH=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=hH,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[mH(WV)];for(let e of t)n.push(mH(e));return new e(n)}static maybeFromEditor(t){let n=t[uH];return n&&(n.PACKAGE_VERSION!==hH&&KV(292,n.PACKAGE_VERSION,hH),n instanceof e||KV(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&KV(294),n}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(UR({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[uH]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=fH;function t(){try{e()}finally{e=fH}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=kz(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&KV(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);if(r){let e=r.get(t);e?e.push(...n):r.set(t,n)}else this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&KV(296);let[t]=mH(e);typeof t.name!=`string`&&KV(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&KV(298,t.name),!n){n=new lH(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&KV(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&KV(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=mH(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(oH(i))return;let a=n.extension.name;var o;aH(i)||KV(300,a,r||`[unknown]`),aH(o=i)||KV(304,String(o.id),String(ZV)),i=Object.assign(o,{id:QV}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=sH(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())aH(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&KV(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return kz(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of zV(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&KV(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&XV(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=Array.from(t));let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=pH,e}},_H=GV,vH=_H.LexicalBuilder,yH=_H.buildEditorFromExtensions;_H.builderSymbol;var bH=t({getPeerDependencyFromEditor:()=>xH,getPeerDependencyFromEditorOrThrow:()=>SH});function xH(e,t){let n=vH.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function SH(e,t){let n=xH(e,t);return n===void 0&&function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(291,t),n}var CH=bH,wH=CH.getPeerDependencyFromEditor,TH=CH.getPeerDependencyFromEditorOrThrow,EH=t({$addNodeStyle:()=>BH,$cloneWithProperties:()=>yF,$copyBlockFormatIndent:()=>GH,$ensureForwardRangeSelection:()=>WH,$forEachSelectedTextNode:()=>UH,$getComputedStyleForElement:()=>PH,$getComputedStyleForParent:()=>FH,$getSelectionStyleValueForProperty:()=>aU,$isAtEdgeOfElement:()=>KH,$isAtNodeEnd:()=>RH,$isParentElementRTL:()=>nU,$isParentRTL:()=>IH,$moveCaretSelection:()=>tU,$moveCharacter:()=>rU,$patchStyleText:()=>HH,$selectAll:()=>BI,$setBlocksType:()=>qH,$shouldOverrideDefaultCharacterSelection:()=>eU,$sliceSelectedTextNodeContent:()=>LH,$trimTextContentFromAnchor:()=>zH,$wrapNodes:()=>XH,createDOMRange:()=>jH,createRectsFromDOMRange:()=>MH,getCSSFromStyleObject:()=>NH,getStyleObjectFromCSS:()=>oU,trimTextContentFromAnchor:()=>sU});function DH(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function OH(e){return()=>{}}function kH(e){let t=e;for(;t!=null;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function AH(e){let t=e.parentNode;if(t==null)throw Error(`Should never happen`);return[t,Array.from(t.childNodes).indexOf(e)]}function jH(e,t,n,r,i){let a=t.getKey(),o=r.getKey(),s=cz(e.getRootElement()).createRange(),c=e.getElementByKey(a),l=e.getElementByKey(o),u=n,d=i;if(q(t)&&(c=kH(c)),q(r)&&(l=kH(l)),t===void 0||r===void 0||c===null||l===null)return null;c.nodeName===`BR`&&([c,u]=AH(c)),l.nodeName===`BR`&&([l,d]=AH(l));let f=c.firstChild;c===l&&f!=null&&f.nodeName===`BR`&&u===0&&d===0&&(d=1);try{s.setStart(c,u),s.setEnd(l,d)}catch{return null}return!s.collapsed||u===d&&a===o||(s.setStart(l,d),s.setEnd(c,u)),s}function MH(e,t){let n=e.getRootElement();if(n===null)return[];let r=n.getBoundingClientRect(),i=getComputedStyle(n),a=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=Array.from(t.getClientRects()),s,c=o.length;o.sort((e,t)=>{let n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n});for(let e=0;e<c;e++){let t=o[e],n=s&&s.top<=t.top&&s.top+s.height>t.top&&s.left+s.width>t.left,i=t.width+a===r.width;n||i?(o.splice(e--,1),c--):s=t}return o}function NH(e){let t=``;for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function PH(e){let t=XF().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function FH(e){let t=TI(e)?e:e.getParent();return t&&PH(t)}function IH(e){let t=FH(e);return t!==null&&t.direction===`rtl`}function LH(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!NI(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=HF(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=bF(t)),t.__text=p)}}return t}function RH(e){if(e.type===`text`)return e.offset===e.getNode().getTextContentSize();let t=e.getNode();return G(t)||DH(177),e.offset===t.getChildrenSize()}function zH(e,t,n){let r=t.getNode(),i=n;if(G(r)){let e=r.getDescendantByIndex(t.offset);e!==null&&(r=e)}for(;i>0&&r!==null;){if(G(r)){let e=r.getLastDescendant();e!==null&&(r=e)}let n=r.getPreviousSibling(),a=0;if(n===null){let e=r.getParentOrThrow(),t=e.getPreviousSibling();for(;t===null;){if(e=e.getParent(),e===null){n=null;break}t=e.getPreviousSibling()}e!==null&&(a=e.isInline()?0:2,n=t)}let o=r.getTextContent();o===``&&G(r)&&!r.isInline()&&(o=`\n\n`);let s=o.length;if(!q(r)||i>=s){let e=r.getParent();r.remove(),e==null||e.getChildrenSize()!==0||TI(e)||e.remove(),i-=s+a,r=n}else{let n=r.getKey(),a=e.read(`latest`,()=>{let e=$F(n);return q(e)&&e.isSimpleText()?e.getTextContent():null}),c=s-i,l=o.slice(0,c);if(a!==null&&a!==o){let e=tI(),t=r;if(r.isSimpleText())r.setTextContent(a);else{let e=AF(a);r.replace(e),t=e}if(K(e)&&e.isCollapsed()){let n=e.anchor.offset;t.select(n,n)}}else if(r.isSimpleText()){let e=t.key===n,a=t.offset;a<i&&(a=s);let o=e?a-i:0,l=e?a:c;if(e&&o===0){let[e]=r.splitText(o,l);e.remove()}else{let[,e]=r.splitText(o,l);e.remove()}}else{let e=AF(l);r.replace(e)}i=0}}}var BH=OH();function VH(e,t){(K(e)?e.isCollapsed():q(e)||G(e))||DH(280);let n=uz(K(e)?e.style:q(e)?e.getStyle():e.getTextStyle()),r=NH(Object.entries(t).reduce((t,[r,i])=>(typeof i==`function`?t[r]=i(n[r],e):i===null?delete t[r]:t[r]=i,t),{...n}));K(e)||q(e)?e.setStyle(r):e.setTextStyle(r)}function HH(e,t){let n=new Set;if(K(e)&&e.isCollapsed()){VH(e,t);let r=e.anchor.getNode();G(r)&&r.isEmpty()&&(n.add(r.getKey()),VH(r,t))}UH(e=>{VH(e,t)});let r=e.getNodes();if(r.length>0)for(let e of r){if(!G(e)||!e.canBeEmpty()||e.getChildrenSize()!==0)continue;let r=e.getKey();n.has(r)||(n.add(r),VH(e,t))}}function UH(e){let t=W();if(!t)return;let n=new Map,r=e=>n.get(e.getKey())||[0,e.getTextContentSize()];if(K(t))for(let e of vF(t).getTextSlices())e&&n.set(e.caret.origin.getKey(),e.getSliceIndices());let i=t.getNodes();for(let t of i){if(!q(t)||!t.canHaveFormat())continue;let[n,i]=r(t);i!==n&&(NI(t)||n===0&&i===t.getTextContentSize()?e(t):e(t.splitText(n,i)[n===0?0:1]))}K(t)&&t.anchor.type===`text`&&t.focus.type===`text`&&t.anchor.key===t.focus.key&&WH(t)}function WH(e){if(e.isBackward()){let{anchor:t,focus:n}=e,{key:r,offset:i,type:a}=t;t.set(n.key,n.offset,n.type),n.set(r,i,a)}}function GH(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function KH(e,t,n){let r=_F(e,n);if(yI(r))return!1;for(;r;r=r.getParentCaret()){let e=r.getParentAtCaret();if(!e||r.getNodeAtCaret())return!1;if(t.is(e))return!0}return!1}function qH(e,t,n=GH){if(!e)return;let r=e.getStartEndPoints(),i=!1,a=null,o=new Map;if(r){let[t,n]=r,s=NF(t.getNode(),BL);a=NF(n.getNode(),BL);let c=e.isBackward()?`previous`:`next`;i=G(a)&&!a.is(s)&&function(e,t,n){let r=e.getNode();return(!G(r)||!r.isEmpty())&&KH(e,t,n)}(n,a,XR(c)),G(s)&&o.set(s.getKey(),s),G(a)&&!i&&o.set(a.getKey(),a)}for(let t of e.getNodes())if(G(t)&&BL(t)){if(i&&t.is(a))continue;o.set(t.getKey(),t)}else if(!r){let e=NF(t,BL);G(e)&&o.set(e.getKey(),e)}for(let e of o.values()){if(sI(e)!==null)continue;let r=t();n(e,r),e.replace(r,!0)}}function JH(e){return e.getNode().isAttached()}function YH(e){let t=e;for(;t!==null&&!EI(t);){let e=t.getLatest(),n=t.getParent();e.getChildrenSize()===0&&t.remove(!0),t=n}}function XH(e,t,n=null){let r=e.getStartEndPoints(),i=r?r[0]:null,a=e.getNodes(),o=a.length;if(i!==null){let e=oI(i.getNode());if(e!==null&&!EI(e))return}if(i!==null&&(o===0||o===1&&i.type===`element`&&i.getNode().getChildrenSize()===0)){let e=i.type===`text`?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren(),a=t();a.setFormat(e.getFormatType()),a.setIndent(e.getIndent()),r.forEach(e=>a.append(e)),n&&(a=n.append(a)),e.replace(a);return}let s=null,c=[];for(let r=0;r<o;r++){let i=a[r];EI(i)?(ZH(e,c,c.length,t,n),c=[],s=i):s===null||s!==null&&dI(i,s)?c.push(i):(ZH(e,c,c.length,t,n),c=[i])}ZH(e,c,c.length,t,n)}function ZH(e,t,n,r,i=null){if(t.length===0)return;let a=t[0],o=new Map,s=[],c=G(a)?a:a.getParentOrThrow(),l=c.isInline()?c.getParentOrThrow():c,u=!1;for(;l!==null;){let e=l.getPreviousSibling();if(e!==null){l=e,u=!0;break}if(l=l.getParentOrThrow(),EI(l))break}let d=new Set;for(let e=0;e<n;e++){let n=t[e];G(n)&&n.getChildrenSize()===0&&d.add(n.getKey())}let f=new Set;for(let e=0;e<n;e++){let n=t[e],i=n.getParent();if(i!==null&&i.isInline()&&(i=i.getParent()),i!==null&&bI(n)&&!f.has(n.getKey())){let e=i.getKey();if(o.get(e)===void 0){let t=r();t.setFormat(i.getFormatType()),t.setIndent(i.getIndent()),s.push(t),o.set(e,t);let n=i.getChildren();t.splice(t.getChildrenSize(),0,n);for(let e of n)if(f.add(e.getKey()),G(e))for(let t of e.getChildrenKeys())f.add(t);YH(i)}}else if(d.has(n.getKey())){G(n)||DH(179);let e=r();e.setFormat(n.getFormatType()),e.setIndent(n.getIndent()),s.push(e),n.remove(!0)}}if(i!==null)for(let e=0;e<s.length;e++){let t=s[e];i.append(t)}let p=null;if(EI(l)){if(u){if(i!==null)l.insertAfter(i);else for(let e=s.length-1;e>=0;e--){let t=s[e];l.insertAfter(t)}}else{let e=l,t=e.getFirstChild();if(G(t)&&(l=t),t===null){if(i)e.append(i);else for(let t=0;t<s.length;t++){let n=s[t];e.append(n),p=n}}else if(i!==null)t.insertBefore(i);else for(let e=0;e<s.length;e++){let n=s[e];t.insertBefore(n),p=n}}}else if(i)l.insertAfter(i);else for(let e=s.length-1;e>=0;e--){let t=s[e];l.insertAfter(t),p=t}let m=tI();K(m)&&JH(m.anchor)&&JH(m.focus)?WI(m.clone()):p===null?e.dirty=!0:p.selectEnd()}function QH(e){let t=$H(e);return t!==null&&t.writingMode===`vertical-rl`}function $H(e){let t=e.anchor.getNode();return G(t)?PH(t):FH(t)}function eU(e,t){let n=QH(e)?!t:t;nU(e)&&(n=!n);let r=_F(e.focus,n?`previous`:`next`);if(yI(r))return!1;if(MI(r)&&!jI(r.origin)&&r.origin.isUnmergeable()){let e=r.getNodeAtCaret();if(q(e)&&!jI(e))return!0}for(let e of MF(r)){if(gI(e))return!e.origin.isInline();if(!G(e.origin)){if(_I(e.origin))return!0;break}}return!1}function tU(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function nU(e){let t=$H(e);return t!==null&&t.direction===`rtl`}function rU(e,t,n){let r=nU(e),i;i=QH(e)||r?!n:n,tU(e,t,i,`character`)}function iU(e,t,n){let r=uz(e.getStyle());return r!==null&&r[t]||n}function aU(e,t,n=``){let r=null,i=e.getNodes(),a,o;if(K(e)){if(e.isCollapsed()&&e.style!==``){let n=uz(e.style);if(n!==null&&t in n)return n[t]}let{anchor:n,focus:r}=e,i=e.isBackward(),s=i?r.getNode():n.getNode(),c=i?n.getNode():r.getNode(),l=i?r.offset:n.offset,u=i?n.offset:r.offset;q(s)&&l===s.getTextContentSize()&&(a=s),u===0&&(o=c)}for(let e=0;e<i.length;e++){let s=i[e];if(q(s)&&!s.is(e===0?a:o)){let e=iU(s,t,n);if(r===null)r=e;else if(r!==e){r=``;break}}}return r===null?n:r}var oU=uz,sU=zH,cU=EH;cU.$addNodeStyle,cU.$cloneWithProperties,cU.$copyBlockFormatIndent,cU.$ensureForwardRangeSelection,cU.$forEachSelectedTextNode,cU.$getComputedStyleForElement,cU.$getComputedStyleForParent,cU.$getSelectionStyleValueForProperty;var lU=cU.$isAtEdgeOfElement;cU.$isAtNodeEnd,cU.$isParentElementRTL;var uU=cU.$isParentRTL;cU.$moveCaretSelection;var dU=cU.$moveCharacter;cU.$patchStyleText,cU.$selectAll;var fU=cU.$setBlocksType,pU=cU.$shouldOverrideDefaultCharacterSelection,mU=cU.$sliceSelectedTextNodeContent;cU.$trimTextContentFromAnchor,cU.$wrapNodes,cU.createDOMRange;var hU=cU.createRectsFromDOMRange;cU.getCSSFromStyleObject,cU.getStyleObjectFromCSS,cU.trimTextContentFromAnchor;var gU=t({$descendantsMatching:()=>lW,$dfs:()=>kU,$dfsIterator:()=>MU,$dfsWithSlots:()=>NU,$dfsWithSlotsIterator:()=>PU,$filter:()=>tW,$findMatchingParent:()=>NF,$firstToLastIterator:()=>uW,$getAdjacentCaret:()=>AU,$getAdjacentSiblingOrParentSiblingCaret:()=>zF,$getDepth:()=>zU,$getNearestBlockElementAncestorOrThrow:()=>qU,$getNearestNodeOfType:()=>KU,$getNextRightPreorderNode:()=>BU,$getNextSiblingOrParentSibling:()=>RU,$handleIndentAndOutdent:()=>nW,$insertFirst:()=>rW,$insertNodeIntoLeaf:()=>ZU,$insertNodeToNearestRoot:()=>XU,$insertNodeToNearestRootAtCaret:()=>fI,$isAtEndOfNode:()=>vW,$isAtStartOfNode:()=>_W,$isBlockFullySelected:()=>hI,$isEditorIsNestedEditor:()=>oW,$lastToFirstIterator:()=>dW,$onEscapeDown:()=>gW,$onEscapeUp:()=>hW,$restoreEditorState:()=>YU,$reverseDfs:()=>jU,$reverseDfsIterator:()=>VU,$reverseDfsWithSlots:()=>HU,$reverseDfsWithSlotsIterator:()=>UU,$splitNode:()=>YI,$unwrapAndFilterDescendants:()=>sW,$unwrapNode:()=>pW,$wrapNodeInElement:()=>QU,CAN_USE_BEFORE_INPUT:()=>eL,CAN_USE_DOM:()=>tL,IS_ANDROID:()=>VL,IS_ANDROID_CHROME:()=>HL,IS_APPLE:()=>UL,IS_APPLE_WEBKIT:()=>WL,IS_CHROME:()=>KL,IS_FIREFOX:()=>JL,IS_IOS:()=>XL,IS_SAFARI:()=>QL,addClassNamesToElement:()=>FR,calculateZoomLevel:()=>aW,dedupeSelectionRects:()=>vU,eventFiles:()=>eW,getScrollParent:()=>EU,isBlockDomNode:()=>pz,isHTMLAnchorElement:()=>bz,isHTMLElement:()=>J,isInlineDomNode:()=>xz,isMimeType:()=>DU,makeStateWrapper:()=>mW,markSelection:()=>wU,mediaFileReader:()=>OU,mergeRegister:()=>kz,objectKlassEquals:()=>$U,positionNodeOnRange:()=>xU,registerNestedElementResolver:()=>JU,removeClassNamesFromElement:()=>Lz,selectionAlwaysOnDisplay:()=>TU});function _U(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vU(e){let t=(e,t)=>t.left>=e.left-1&&t.top>=e.top-1&&t.right<=e.right+1&&t.bottom<=e.bottom+1,n=[];for(let r of Array.from(e))if(!(r.width<.5||r.height<.5||n.some(e=>t(r,e)))){for(let e=n.length-1;e>=0;e--)t(n[e],r)&&n.splice(e,1);n.push(r)}return n}function yU(e){return`${e}px`}var bU={attributes:!0,characterData:!0,childList:!0,subtree:!0};function xU(e,t,n){let r=null,i=null,a=null,o=[],s=cz(e.getRootElement()).createElement(`div`);function c(){r===null&&_U(182),i===null&&_U(183);let{left:a,top:c}=i.getBoundingClientRect(),l=vU(hU(e,t));var u,d;s.isConnected||(d=s,(u=i).insertBefore(d,u.firstChild));let f=!1;for(let e=0;e<l.length;e++){let t=l[e],n=o[e]||cz(r).createElement(`div`),i=n.style;i.position!==`absolute`&&(i.position=`absolute`,f=!0);let u=yU(t.left-a);i.left!==u&&(i.left=u,f=!0);let d=yU(t.top-c);i.top!==d&&(n.style.top=d,f=!0);let p=yU(t.width);i.width!==p&&(n.style.width=p,f=!0);let m=yU(t.height);i.height!==m&&(n.style.height=m,f=!0),n.parentNode!==s&&(s.append(n),f=!0),o[e]=n}for(;o.length>l.length;){let e=o.pop();e!=null&&(e.remove(),f=!0)}f&&n(o)}function l(){i=null,r=null,a!==null&&a.disconnect(),a=null,s.remove();for(let e of o)e.remove();o=[]}function u(){let t=e.getRootElement();if(t===null)return l();let n=t.parentElement;if(!J(n))return l();l(),r=t,i=n,a=new MutationObserver(t=>{let n=e.getRootElement(),a=n&&n.parentElement;if(n!==r||a!==i)return u();for(let e of t)if(!s.contains(e.target))return c()}),a.observe(n,bU),c()}s.style.position=`relative`;let d=e.registerRootListener(()=>(u(),l));return()=>{d(),l()}}function SU(e,t,n,r){if(t.type!==`text`&&G(n)){let i=qF(n,r,e);return[i.element,i.getFirstChildOffset()+t.offset]}return[(q(n)?JF(n,r,e):rz(r))||r,t.offset]}function CU(e){for(let t of e){let e=t.style;e.background!==`Highlight`&&(e.background=`Highlight`),e.color!==`HighlightText`&&(e.color=`HighlightText`),e.marginTop!==yU(-1.5)&&(e.marginTop=yU(-1.5)),e.paddingTop!==yU(4)&&(e.paddingTop=yU(4)),e.paddingBottom!==yU(0)&&(e.paddingBottom=yU(0))}}function wU(e,t=CU){let n=null,r=null,i=null,a=null,o=null,s=null,c=()=>{};function l(l){l.read(()=>{let l=W();if(!K(l))return n=null,i=null,a=null,s=null,c(),void(c=()=>{});let[u,d]=function(e){let t=e.getStartEndPoints();return e.isBackward()?[t[1],t[0]]:t}(l),f=u.getNode(),p=f.getKey(),m=u.offset,h=d.getNode(),g=h.getKey(),_=d.offset,v=e.getElementByKey(p),y=e.getElementByKey(g),b=n===null||v!==r||m!==i||p!==n.getKey(),x=a===null||y!==o||_!==s||g!==a.getKey();if((b||x)&&v!==null&&y!==null){let n=function(e,t,n,r,i,a,o){let s=(e._window?e._window.document:document).createRange();return s.setStart(...SU(e,t,n,r)),s.setEnd(...SU(e,i,a,o)),s}(e,u,f,v,d,h,y);c(),c=xU(e,n,t)}n=f,r=v,i=m,a=h,o=y,s=_},{editor:e})}return l(e.getEditorState()),kz(e.registerUpdateListener(({editorState:e})=>l(e)),()=>{c()})}function TU(e,t){let n=null,r=()=>{let r=e.getRootElement(),i=r===null?null:r.ownerDocument.defaultView,a=i===null?null:i.getSelection(),o=a===null?null:tz(a,r).anchorNode;o!==null&&r!==null&&r.contains(o)?n!==null&&(n(),n=null):n===null&&(n=wU(e,t))};return e.registerRootListener(e=>{if(e){let t=e.ownerDocument,i=kz(Fz(t,`selectionchange`,r),()=>{n!==null&&n()});return r(),i}})}function EU(e,t){let n=e.ownerDocument,r=n.defaultView||window,i=r.getComputedStyle(e),a=i.position===`absolute`,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(i.position===`fixed`)return n.body;for(let t=e;t=oz(t);)if(i=r.getComputedStyle(t),(!a||i.position!==`static`)&&o.test(i.overflow+i.overflowY+i.overflowX))return t;return n.body}function DU(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function OU(e,t){let n=e[Symbol.iterator]();return new Promise((e,r)=>{let i=[],a=()=>{let{done:o,value:s}=n.next();if(o)return e(i);let c=new FileReader;c.addEventListener(`error`,r),c.addEventListener(`load`,()=>{let e=c.result;typeof e==`string`&&i.push({file:s,result:e}),a()}),DU(s,t)?c.readAsDataURL(s):a()};a()})}function kU(e,t){return Array.from(MU(e,t))}function AU(e){return e?e.getAdjacentCaret():null}function jU(e,t){return Array.from(VU(e,t))}function MU(e,t){return LU(`next`,e,t)}function NU(e,t){return Array.from(PU(e,t))}function*PU(e,t){for(let n of LU(`next`,e,t)){yield n;let{node:e,depth:r}=n;if(AI(e)&&!e.is(t))for(let t of cI(e)){let n=aI(e,t);n!==null&&(yield*FU(n,r+1))}}}function*FU(e,t){yield{depth:t,node:e};let n=t+1;if(AI(e))for(let t of cI(e)){let r=aI(e,t);r!==null&&(yield*FU(r,n))}if(G(e))for(let t of e.getChildren())yield*FU(t,n)}function IU(e,t){let n=zF(iI(e,t));return n&&n[0]}function LU(e,t,n){let r=nI(),i=t||r,a=G(i)?UF(i,e):iI(i,e),o=zU(i),s=n?RF(GF(iI(n,e)))||IU(n,e):IU(i,e),c=o;return Oz({hasNext:e=>e!==null,initial:a,map:e=>({depth:c,node:e.origin}),step:e=>{if(e.isSameNodeCaret(s))return null;gI(e)&&c++;let t=zF(e);return!t||t[0].isSameNodeCaret(s)?null:(c+=t[1],t[0])}})}function RU(e){let t=zF(iI(e,`next`));return t&&[t[0].origin,t[1]]}function zU(e){let t=-1;for(let n=e;n!==null;n=n.getParent()??sI(n))t++;return t}function BU(e){let t=zF(GF(iI(e,`previous`)),`root`);return t&&t[0].origin}function VU(e,t){return LU(`previous`,e,t)}function HU(e,t){return Array.from(UU(e,t))}function*UU(e,t){let n=[];for(let r of LU(`previous`,e,t)){for(;n.length>0&&r.depth<=n[n.length-1].depth;){let e=n.pop();yield*WU(e.node,e.depth+1)}yield r;let{node:e,depth:i}=r;AI(e)&&cI(e).length>0&&!e.is(t)&&n.push({depth:i,node:e})}for(;n.length>0;){let e=n.pop();yield*WU(e.node,e.depth+1)}}function*WU(e,t){let n=cI(e);for(let r=n.length-1;r>=0;r--){let i=aI(e,n[r]);i!==null&&(yield*GU(i,t))}}function*GU(e,t){yield{depth:t,node:e};let n=t+1;if(G(e)){let t=e.getChildren();for(let e=t.length-1;e>=0;e--)yield*GU(t[e],n)}AI(e)&&(yield*WU(e,n))}function KU(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function qU(e){let t=NF(e,e=>G(e)&&!e.isInline());return G(t)||_U(4,e.__key),t}function JU(e,t,n,r){let i=e=>e instanceof t;return e.registerNodeTransform(t,e=>{let t=(e=>{let t=e.getChildren();for(let e=0;e<t.length;e++){let n=t[e];if(i(n))return null}let n=e,r=e;for(;n!==null;)if(r=n,n=n.getParent(),i(n))return{child:r,parent:n};return null})(e);if(t!==null){let{child:i,parent:a}=t;if(i.is(e)){r(a,e);let t=i.getNextSiblings(),o=t.length;if(a.insertAfter(i),o!==0){let e=n(a);i.insertAfter(e);for(let n=0;n<o;n++)e.append(t[n])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})}function YU(e,t){let n=new Map,r=e._pendingEditorState;for(let[e,r]of t._nodeMap)n.set(e,yF(r));r&&(r._nodeMap=n),IF();let i=t._selection;WI(i===null?null:i.clone())}function XU(e){let t=W()||tI(),n;if(K(t))n=_F(t.focus,`next`);else{if(t!=null){let e=t.getNodes(),r=e[e.length-1];r&&(n=iI(r,`next`))}n||=UF(nI(),`previous`).getFlipped().insert(EF())}let r=fI(e,n,yI(i=n)||zF(MI(i)?i.getSiblingCaret():i,`shadowRoot`)!==null?{$shouldSplit:(e,t)=>t!==`last`}:void 0);var i;let a=RF(r);return GI(KF(gI(a)?FI(a):r)),e.getLatest()}function ZU(e){let t=W();if(!K(t))return void(t&&t.insertNodes([e]));let n=VF(RI(vF(t)),`next`).anchor;if(MI(n)){let e=JI(n);if(!e)return;n=e}let r=n.getFlipped();r.insert(e),GI(BF(r,r))}function QU(e,t){let n=t();return e.replace(n),n.append(e),n}function $U(e,t){if(e==null)return!1;let n=Object.getPrototypeOf(e);return n!=null&&n.constructor!=null&&n.constructor.name===t.name}function eW(e){let t=null;if($U(e,DragEvent)?t=e.dataTransfer:$U(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function tW(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);i!==null&&n.push(i)}return n}function nW(e){let t=W();if(!K(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],a=i.getKey();if(n.has(a))continue;let o=NF(i,e=>G(e)&&!e.isInline());if(o===null)continue;let s=o.getKey();o.canIndent()&&!n.has(s)&&(n.add(s),e(o))}return n.size>0}function rW(e,t){UF(e,`next`).insert(t)}var iW=!(JL||!tL)&&void 0;function aW(e,t=!1){let n=1;if(function(){if(iW===void 0){let e=document.createElement(`div`);e.style.position=`absolute`,e.style.opacity=`0`,e.style.width=`100px`,e.style.left=`-1000px`,document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty(`zoom`,`2`),iW=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return iW}()||t){let t=e&&e.ownerDocument.defaultView||window;for(;e;)n*=Number(t.getComputedStyle(e).getPropertyValue(`zoom`)),e=oz(e)}return n}function oW(e){return e._parentEditor!==null}function sW(e,t){return cW(e,t,null)}function cW(e,t,n){let r=!1;for(let i of dW(e))t(i)?n!==null&&n(i):(r=!0,G(i)&&cW(i,t,n||(e=>i.insertAfter(e))),i.remove());return r}function lW(e,t){let n=[],r=Array.from(e).reverse();for(let e=r.pop();e!==void 0;e=r.pop())if(t(e))n.push(e);else if(G(e))for(let t of dW(e))r.push(t);return n}function uW(e){return fW(UF(e,`next`))}function dW(e){return fW(UF(e,`previous`))}function fW(e){return Oz({hasNext:kI,initial:e.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function pW(e){zI(iI(e,`next`)).splice(1,e.getChildren())}function mW(e){let t=t=>lI(t,e),n=(t,n)=>KI(t,e,n);return{$get:t,$set:n,accessors:[t,n],makeGetterMethod:()=>function(){return t(this)},makeSetterMethod:()=>function(e){return n(this,e)},stateConfig:e}}function hW(e,t){let n=W();if(K(n)&&n.isCollapsed()){let r=NF(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getFirstChild()===r&&_W(n.anchor,r))return r.insertBefore(EF()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function gW(e,t){let n=W();if(K(n)&&n.isCollapsed()){let r=NF(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getLastChild()===r&&vW(n.anchor,r))return r.insertAfter(EF()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function _W(e,t){return lU(e,t,`previous`)}function vW(e,t){return lU(e,t,`next`)}var Y=gU;Y.$descendantsMatching,Y.$dfs,Y.$dfsIterator,Y.$dfsWithSlots,Y.$dfsWithSlotsIterator,Y.$filter,Y.$findMatchingParent,Y.$firstToLastIterator,Y.$getAdjacentCaret,Y.$getAdjacentSiblingOrParentSiblingCaret,Y.$getDepth;var yW=Y.$getNearestBlockElementAncestorOrThrow,bW=Y.$getNearestNodeOfType;Y.$getNextRightPreorderNode,Y.$getNextSiblingOrParentSibling;var xW=Y.$handleIndentAndOutdent;Y.$insertFirst,Y.$insertNodeIntoLeaf;var SW=Y.$insertNodeToNearestRoot;Y.$insertNodeToNearestRootAtCaret,Y.$isAtEndOfNode,Y.$isAtStartOfNode,Y.$isBlockFullySelected,Y.$isEditorIsNestedEditor,Y.$lastToFirstIterator;var CW=Y.$onEscapeDown,wW=Y.$onEscapeUp;Y.$restoreEditorState,Y.$reverseDfs,Y.$reverseDfsIterator,Y.$reverseDfsWithSlots,Y.$reverseDfsWithSlotsIterator,Y.$splitNode,Y.$unwrapAndFilterDescendants,Y.$unwrapNode,Y.$wrapNodeInElement,Y.CAN_USE_BEFORE_INPUT,Y.CAN_USE_DOM,Y.IS_ANDROID,Y.IS_ANDROID_CHROME,Y.IS_APPLE,Y.IS_APPLE_WEBKIT,Y.IS_CHROME,Y.IS_FIREFOX,Y.IS_IOS,Y.IS_SAFARI,Y.addClassNamesToElement;var TW=Y.calculateZoomLevel;Y.dedupeSelectionRects;var EW=Y.eventFiles;Y.getScrollParent,Y.isBlockDomNode,Y.isHTMLAnchorElement,Y.isHTMLElement,Y.isInlineDomNode,Y.isMimeType,Y.makeStateWrapper,Y.markSelection,Y.mediaFileReader,Y.mergeRegister;var DW=Y.objectKlassEquals;Y.positionNodeOnRange,Y.registerNestedElementResolver,Y.removeClassNamesFromElement;var OW=Y.selectionAlwaysOnDisplay,kW=t({EditorStateExtension:()=>AW}),AW={build:e=>bV(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:`@lexical/extension/EditorState`},jW=kW.EditorStateExtension,MW=t({NodeSelectionExtension:()=>PW}),NW=new Set,PW={build(e,t,n){let r=n.getDependency(jW).output,i=pV({watchedNodeKeys:new Map}),a=bV(()=>{},()=>fV(()=>{let e=a.peek(),{watchedNodeKeys:t}=i.value,n,o=!1;r.value.read(()=>{if(W())for(let[r,i]of t.entries()){if(i.size===0){t.delete(r);continue}let a=$F(r),s=a&&a.isSelected()||!1;o||=s!==(!!e&&e.has(r)),s&&(n||=new Set,n.add(r))}}),!o&&n&&e&&n.size===e.size||(a.value=n)}));return{watchNodeKey:function(e){let t=dV(()=>(a.value||NW).has(e)),{watchedNodeKeys:n}=i.peek(),r=n.get(e),o=r!==void 0;return r||=new Set,r.add(t),o||(n.set(e,r),i.value={watchedNodeKeys:n}),t}}},dependencies:[jW],name:`@lexical/extension/NodeSelection`},FW=MW.NodeSelectionExtension,IW=t({$createHorizontalRuleNode:()=>BW,$isHorizontalRuleNode:()=>VW,HorizontalRuleExtension:()=>HW,HorizontalRuleNode:()=>RW,INSERT_HORIZONTAL_RULE_COMMAND:()=>LW}),LW=HR(`INSERT_HORIZONTAL_RULE_COMMAND`),RW=class extends OL{$config(){return this.config(`horizontalrule`,{extends:OL,importDOM:{hr:()=>({conversion:zW,priority:0})}})}exportDOM(){return{element:YF().createElement(`hr`)}}createDOM(e){let t=YF().createElement(`hr`);return FR(t,e.theme.hr),t}getTextContent(){return`\n`}isInline(){return!1}updateDOM(){return!1}};function zW(){return{node:BW()}}function BW(){return CF(RW)}function VW(e){return e instanceof RW}var HW={dependencies:[jW,FW],name:`@lexical/extension/HorizontalRule`,nodes:()=>[RW],register(e,t,n){let{watchNodeKey:r}=n.getDependency(FW).output,i=pV({nodeSelections:new Map}),a=e._config.theme.hrSelected??`selected`;return kz(e.registerCommand(LW,e=>{let t=W();return K(t)?(t.focus.getNode()!==null&&SW(BW()),!0):!1},lL),e.registerCommand(iL,e=>{if(hz(e.target)){let t=eI(e.target);if(VW(t))return function(e,t=!1){let n=W(),r=e.isSelected(),i=e.getKey(),a;t&&CI(n)?a=n:(a=TF(),WI(a)),r?a.delete(i):a.add(i)}(t,e.shiftKey),!0}return!1},uL),e.registerMutationListener(RW,(t,n)=>{uV(()=>{let n=!1,{nodeSelections:a}=i.peek();for(let[i,o]of t.entries())if(o===`destroyed`)a.delete(i),n=!0;else{let t=a.get(i),o=e.getElementByKey(i);t?t.domNode.value=o:(n=!0,a.set(i,{domNode:pV(o),selectedSignal:r(i)}))}n&&(i.value={nodeSelections:a})})}),fV(()=>{let e=[];for(let{domNode:t,selectedSignal:n}of i.value.nodeSelections.values())e.push(fV(()=>{let e=t.value;e&&(n.value?FR(e,a):Lz(e,a))}));return kz(...e)}))}},UW=IW,WW=UW.$createHorizontalRuleNode,GW=UW.$isHorizontalRuleNode,KW=UW.HorizontalRuleExtension,qW=UW.HorizontalRuleNode,JW=UW.INSERT_HORIZONTAL_RULE_COMMAND,YW=t({getExtensionDependencyFromEditor:()=>XW});function XW(e,t){let n=vH.fromEditor(e).getExtensionRep(t);return n===void 0&&function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(303,t.name),n.getExtensionDependency()}var ZW=YW.getExtensionDependencyFromEditor,QW=t({$getExtensionDependency:()=>$W,$getExtensionOutput:()=>eG,$getPeerDependency:()=>tG});function $W(e){return ZW(XF(),e)}function eG(e){return $W(e).output}function tG(e){return wH(XF(),e)}var nG=QW,rG=nG.$getExtensionDependency,iG=nG.$getExtensionOutput,aG=nG.$getPeerDependency,oG=t({$appendNodeToHTML:()=>Fq,$distributeInlineWrapper:()=>VK,$generateDOMFromNodes:()=>jq,$generateDOMFromRoot:()=>Mq,$generateHtmlFromNodes:()=>Nq,$generateNodesFromDOM:()=>Aq,$generateNodesFromDOMViaExtension:()=>Cq,$getImportContextValue:()=>RK,$getRenderContextValue:()=>jG,$getSessionDOMRenderConfig:()=>FG,$inlineStylesFromStyleSheets:()=>bG,$isBlockLevel:()=>BK,$propagateTextAlignToBlockChildren:()=>HK,$setRenderContextValue:()=>NG,$updateRenderContextValue:()=>PG,$withImportContext:()=>zK,$withRenderContext:()=>IG,BlockSchema:()=>WK,CoreImportExtension:()=>wq,CoreImportRules:()=>lq,DOMImportExtension:()=>Sq,DOMRenderExtension:()=>cK,HorizontalRuleImportExtension:()=>Dq,HorizontalRuleImportRules:()=>Eq,ImportOverlays:()=>FK,ImportSource:()=>OK,ImportSourceDataTransfer:()=>kK,ImportTextFormat:()=>AK,ImportTextStyle:()=>jK,ImportWhitespaceConfig:()=>PK,InlineSchema:()=>GK,NestedBlockSchema:()=>KK,RenderContextExport:()=>kG,RenderContextRoot:()=>OG,RootSchema:()=>qK,contextUpdater:()=>gG,contextValue:()=>hG,createImportState:()=>DK,createRenderState:()=>DG,defaultIsInline:()=>NK,defaultPreservesWhitespace:()=>MK,defineImportRule:()=>Tq,defineOverlayRules:()=>gq,domOverride:()=>LG,isElementOfTag:()=>SK,parseSelector:()=>EK,sel:()=>Oq});function sG(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var cG;function lG(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function uG(e){return cG&&cG.editor===e?cG:void 0}function dG(e,t){let n=uG(t);return n&&n[e]}function fG(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(lG(e,n))]}return t}function pG(e,t){let n=t;for(let r of e){let[e,i]=fG(n,r),a=e.key;if(n===t&&lG(n,e)===i)continue;let o=n===t||n===void 0?mG(t):n;o[a]=i,n=o}return n}function mG(e){return Object.create(e||null)}function hG(e,t){return[e,t]}function gG(e,t){return{cfg:e,updater:t}}function _G(e,t,n,r=XF()){let i=cG,a=uG(r);try{return cG={...a,editor:r,[e]:t},n()}finally{cG=i}}function vG(e,t=()=>{}){return(n,r=XF())=>i=>{let a=uG(r),o=a&&a[e],s=pG(n,o||t(r));return s&&s!==o?_G(e,s,i,r):i()}}function yG(e,t,n,r){return Object.assign(GR(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}var bG=(e,t,n)=>{xG(e),n()};function xG(e){if(!mz(e))return;let t=e;if(t.querySelector(`style`)===null)return;let n=new Map;function r(e){let t=n.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);n.set(e,t)}return t}try{for(let e of Array.from(t.styleSheets)){let n;try{n=e.cssRules}catch{continue}for(let e of Array.from(n)){if(!DW(e,CSSStyleRule))continue;let n;try{n=t.querySelectorAll(e.selectorText)}catch{continue}for(let t of Array.from(n)){if(!J(t))continue;let n=r(t);for(let r=0;r<e.style.length;r++){let i=e.style[r];n.has(i)||t.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var SG=`@lexical/html/DOM`,CG=Symbol.for(`@lexical/html/DOMExportContext`),wG=`@lexical/html/DOMImport`,TG=Symbol.for(`@lexical/html/DOMImportContext`),EG=()=>!0;function DG(e,t,n){return yG(CG,e,t,n)}var OG=DG(`root`,Boolean),kG=DG(`isExport`,Boolean);function AG(e){let t=wH(e,SG);return t?t.output.defaults:void 0}function jG(e,t=XF()){return lG(function(e){return dG(CG,e)||AG(e)}(t),e)}function MG(e){let t=wH(e,SG);return t?t.output.runtime:void 0}function NG(e,t,n=XF()){let r=MG(n);r&&r.setContextValue(e,t)}function PG(e,t,n=XF()){let r=MG(n);r&&r.setContextValue(e,t(lG(r.editorContext,e)))}function FG(e=XF()){let t=MG(e);return t?t.getSessionConfig():ZF(e)}var IG=vG(CG,AG);function LG(e,t,n){return{...t,...n,nodes:e}}function RG(e){return t=>t instanceof e}function zG(e,{nodes:t}){if(t===`*`)return EG;let n={},r=[];for(let i of t)if(`getType`in i){let t=i.getType();if(n){let r=e.get(t);r===void 0&&sG(339,i.name,t);for(let e of r)n[e]=!0}r.push(RG(i))}else n=void 0,r.push(i);return n||(r.length===1?r[0]:e=>{for(let t of r)if(t(e))return!0;return!1})}function BG(e){return(t,n,r)=>e(t,r)}function VG(e){return(t,n,r,i)=>e(t,n,i)}function HG(e){return(t,n,r,i,a)=>e(t,n,r,a)}function UG(e){return(t,n,r,i,a,o)=>e(t,n,r,i,o)}function WG(e,t){return(n,r)=>{let i=()=>e(n,r),a=t(n);return a?a(n,i,r):i()}}function GG(e,t){return(n,r,i)=>{let a=()=>e(n,r,i),o=t(n);return o?o(n,r,a,i):a()}}var KG=GG,qG=VG;function JG(e,t){return(n,r,i,a)=>{let o=()=>e(n,r,i,a),s=t(n);return s?s(n,r,i,o,a):o()}}function YG(e,t){return(n,r,i,a,o)=>{let s=()=>e(n,r,i,a,o),c=t(n);return c?c(n,r,i,a,s,o):s()}}function XG(e,t){return(n,r,i,a)=>{e(n,r,i,a);let o=t(n);o&&o(n,r,i,a)}}function ZG(e,t,n,r,i){let a=n[t];for(let n of e[t])if(typeof n[0]==`function`){let[e,t]=n;a=r(a,n=>e(n)&&t||void 0)}else{let e=n[1],t={};for(let n in e){let i=e[n];i&&(t[n]=i.reduce((e,t)=>r(e,()=>t),a))}a=r(a,e=>{let n=t[e.getType()];return n&&i(n)})}n[t]=a}function QG(e,t,n,r){if(!r)return;let i=e[t];if(typeof n==`function`)i.push([n,r]);else{let e=i[i.length-1],t;e&&e[0]===`types`?t=e[1]:(t={},i.push([`types`,t]));for(let e in n){let n=t[e]||[];t[e]=n,n.push(r)}}}function $G(e){return e.nodes===`*`}function eK(e,t){let n=sz(RV(e).nodes),r={$createDOM:[],$decorateDOM:[],$exportDOM:[],$extractWithChild:[],$getDOMSlot:[],$getSlotTargetElement:[],$shouldExclude:[],$shouldInclude:[],$updateDOM:[]};for(let e of function(e){let t=[],n=[],r=[];for(let i of e)if($G(i))t.push(i);else if(Array.isArray(i.nodes))for(let e of i.nodes)xI(e.prototype)?r.push(i.nodes.length===1?i:{...i,nodes:[e]}):n.push(i.nodes.length===1?i:{...i,nodes:[e]});let i=new Map,a=e=>{let t=i.get(e);if(t===void 0){t=-1;for(let n of Ez(e))t++;i.set(e,t)}return t};return r.sort((e,t)=>a(e.nodes[0])-a(t.nodes[0])),[...r,...n,...t]}(t)){let t=zG(n,e);for(let n in r)QG(r,n,t,e[n])}return r}function tK(e){return e}function nK(e,{overrides:t}){let n=eK(e,t),r={...xL,...e.dom};return ZG(n,`$createDOM`,r,WG,BG),ZG(n,`$exportDOM`,r,WG,BG),ZG(n,`$extractWithChild`,r,YG,UG),ZG(n,`$getDOMSlot`,r,KG,qG),ZG(n,`$shouldExclude`,r,GG,VG),ZG(n,`$shouldInclude`,r,GG,VG),ZG(n,`$getSlotTargetElement`,r,JG,HG),ZG(n,`$updateDOM`,r,JG,HG),ZG(n,`$decorateDOM`,r,XG,tK),r}function rK(e){return{get:t=>lG(e,t)}}function iK(e){let t=Object.create(null);return pG(e,t)||t}function aK(e,t){let n=rK(t);return e.filter(e=>!(e.disabledForEditor&&e.disabledForEditor(n)))}function oK(e){if(e.nodes===`*`)return()=>!0;let t=e.nodes.map(e=>{let t=e;return xI(t.prototype)?e=>e instanceof t:e});return e=>t.some(t=>t(e))}var sK=class{editor;initialEditorConfig;overrides;editorContext;hasSessionGates;installed;sessionCache=new Map;constructor(e,t,n,r){this.editor=e,this.initialEditorConfig=t,this.overrides=n,this.editorContext=r,this.installed=aK(n,r),this.hasSessionGates=n.some(e=>e.disabledForSession)}setContextValue(e,t){let n=this.installed;this.editorContext[e.key]=t;let r=aK(this.overrides,this.editorContext);if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,r))return;let i=function(e,t){let n=new Set(e),r=new Set(t),i=[];for(let t of e)r.has(t)||i.push(t);for(let e of t)n.has(e)||i.push(e);return i}(n,r);this.installed=r,this.sessionCache.clear();let a=nK(this.initialEditorConfig,{overrides:r});this.editor._config.dom=a;let o=function(e){let t=[];for(let n of e)(n.$createDOM||n.$getDOMSlot||n.$decorateDOM)&&t.push(oK(n));return t.length===0?null:e=>t.some(t=>t(e))}(i);if(!o)return;let s=a.$updateDOM;a.$updateDOM=(e,t,n,r)=>!!o(e)||s(e,t,n,r),this.editor.update(IF,{discrete:!0}),a.$updateDOM=s}getSessionConfig(){let e=this.editor._config.dom||xL;if(!this.hasSessionGates)return e;let t=rK(dG(CG,this.editor)||this.editorContext),n=[],r=[];if(this.installed.forEach((e,i)=>{e.disabledForSession&&e.disabledForSession(t)?n.push(String(i)):r.push(e)}),n.length===0)return e;let i=n.join(`,`),a=this.sessionCache.get(i);return a||(a=nK(this.initialEditorConfig,{overrides:r}),this.sessionCache.set(i,a)),a}},cK={build(e,t,n){let{initialEditorConfig:r}=n.getInitResult(),i=iK(t.contextDefaults);return{defaults:i,runtime:new sK(e,r,t.overrides,i)}},config:{contextDefaults:[],overrides:[]},html:{export:new Map([[CR,()=>{let e=YF().createElement(`div`);return e.role=`textbox`,{element:e}}]])},init(e,t){let n={dom:e.dom,nodes:e.nodes},r=iK(t.contextDefaults);return e.dom=nK(e,{overrides:aK(t.overrides,r)}),{initialEditorConfig:n}},mergeConfig(e,t){let n=Uz(e,t);for(let r of[`overrides`,`contextDefaults`])t[r]&&(n[r]=[...e[r],...t[r]]);return n},name:SG},lK=Symbol.for(`@lexical/html/SelectorImpl`);function uK(e,t){let n={kind:`element`,predicate:(r=t,r.length===0?J:r.length===1?r[0]:(e,t)=>{for(let n of r)if(!n(e,t))return!1;return!0}),tags:e};var r;let i=n=>uK(e,[...t,n]);return{[lK]:n,attr:(e,t,n)=>i(pK(e,t,n)),classAll:(...e)=>i(fK(e)),classAny:(...e)=>i(function(e){let t=dK(e);return t.length===0?()=>!1:e=>{if(!J(e))return!1;let n=e.classList;for(let e of t)if(n.contains(e))return!0;return!1}}(e)),styleAny:(e,t,n)=>i(function(e,t,n){if(typeof t==`string`)return n=>J(n)&&n.style.getPropertyValue(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!J(t))return!1;let a=t.style.getPropertyValue(e);if(!a)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}sG(362,JSON.stringify(e))}(e,t,n))}}function dK(e){let t=[];for(let n of e)n&&t.push(n);return t}function fK(e){let t=dK(e);return t.length===0?()=>!0:e=>{if(!J(e))return!1;let n=e.classList;for(let e of t)if(!n.contains(e))return!1;return!0}}function pK(e,t,n){if(!0===t)return t=>J(t)&&t.hasAttribute(e);if(typeof t==`string`)return n=>J(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!J(t))return!1;let a=t.getAttribute(e);if(a==null)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}sG(361,JSON.stringify(e))}function mK(e){return{[lK]:e}}var hK=mK({kind:`text`,predicate:_z,tags:new Set}),gK=mK({kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set});function _K(){return uK(new Set,[])}function vK(){return gK}function yK(...e){e.length>0||sG(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return uK(t,[])}function bK(){return hK}var xK={any:_K,comment:vK,tag:yK,text:bK};function SK(e,t){return J(e)&&e.nodeName===t.toUpperCase()}var CK=/[A-Za-z0-9_-]/,wK=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&CK.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`\"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\\\(.)/g,`$1`)}assert(e,t){e||sG(364,String(this.pos+1),t,this.source)}};function TK(e){let t=new Set,n=[],r=[],i=!1;if(e.skipWhitespace(),e.peek()===`*`)e.consume(),i=!0;else if(CK.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after \".\"`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after \"#\"`),n.push(pK(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after \"[\"`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`\"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected \"]\"`),e.consume(),n.push(pK(t,r))}}}return r.length>0&&n.push(fK(r)),e.assert(i||t.size>0||n.length>0,`expected a selector`),{predicates:n,tags:t}}function EK(e){let t=new wK(e,0),n=[];for(;n.push(TK(t)),t.skipWhitespace(),!t.eof();)t.assert(t.peek()===`,`,`expected \",\" (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace();if(n.length===1)return uK(n[0].tags,n[0].predicates);let r=new Set;if(n.every(e=>e.tags.size>0))for(let e of n)for(let t of e.tags)r.add(t);return uK(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}function DK(e,t,n){return yG(TG,e,t,n)}var OK=DK(`importSource`,()=>`unknown`),kK=DK(`importSourceDataTransfer`,()=>null),AK=DK(`textFormat`,()=>0),jK=DK(`textStyle`,()=>({}));function MK(e){if(!J(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function NK(e){if(_z(e))return!0;if(!J(e))return!1;let t=e.style.display;return t?t.startsWith(`inline`):!pz(e)&&xz(e)}var PK=DK(`whitespaceConfig`,()=>({isInline:NK,preservesWhitespace:MK})),FK=DK(`importOverlays`,()=>[]),IK=class{constructor(e){this.record=e}get(e){return lG(this.record,e)}set(e,t){this.record[e.key]=t}update(e,t){this.record[e.key]=t(lG(this.record,e))}has(e){return Object.prototype.hasOwnProperty.call(this.record,e.key)}};function LK(e){let t=wH(e,wG);return t?t.output.defaults:void 0}function RK(e,t=XF()){return lG(function(e){return dG(TG,e)||LK(e)}(t),e)}var zK=vG(TG,LK);function BK(e){return mI(e)||_I(e)&&!e.isInline()}function VK(e,t){let n=[],r=[],i=()=>{r.length!==0&&(n.push(t().splice(0,0,r)),r=[])};for(let a of e)if(BK(a)){if(i(),G(a)){let e=VK(a.getChildren(),t);a.splice(0,a.getChildrenSize(),e)}n.push(a)}else r.push(a);return i(),n}function HK(e,t){if(!J(t))return e;let n=t.style.textAlign;if(!XK(n))return e;for(let t of e)mI(t)&&t.getFormatType()===``&&t.setFormat(n);return e}function UK(e,t,n){e.length===1&&SI(e[0])&&(e=[]);let r=EF();if(J(n)){let e=n.style.textAlign;XK(e)&&r.setFormat(e)}return[r.splice(0,0,e)]}var WK={$accepts:BK,$packageRun:UK,name:`BlockSchema`},GK={$accepts:e=>!BK(e),name:`InlineSchema`},KK={$accepts:BK,$packageRun:e=>e,name:`NestedBlockSchema`},qK={$accepts:BK,$packageRun:UK,name:`RootSchema`},JK=xK,YK=new Set([`center`,`end`,`justify`,`left`,`right`,`start`]);function XK(e){return YK.has(e)}var ZK={B:{fontWeight:`bold`},EM:{fontStyle:`italic`},I:{fontStyle:`italic`},S:{textDecoration:`line-through`},STRONG:{fontWeight:`bold`},SUB:{verticalAlign:`sub`},SUP:{verticalAlign:`super`},U:{textDecoration:`underline`}},QK={CODE:qL,MARK:YL},$K=new Set([`font-weight`,`font-style`,`text-decoration`,`text-transform`,`vertical-align`]),eq={$import:(e,t)=>{let n=e.get(AK),r=ZK[t.nodeName],i=function(e){return{fontStyle:e.style.fontStyle,fontWeight:e.style.fontWeight,textDecoration:e.style.textDecoration,textTransform:e.style.textTransform,verticalAlign:e.style.verticalAlign}}(t),a=r?(o=r,{fontStyle:(s=i).fontStyle||o.fontStyle,fontWeight:s.fontWeight||o.fontWeight,textDecoration:s.textDecoration||o.textDecoration,textTransform:s.textTransform||o.textTransform,verticalAlign:s.verticalAlign||o.verticalAlign}):i;var o,s;let c=(l=n,u=function(e){let t=0,n=0,{fontWeight:r,fontStyle:i,textDecoration:a,textTransform:o,verticalAlign:s}=e;if(r===`700`||r===`bold`?t|=GL:r!==`normal`&&r!==`400`||(n|=GL),i===`italic`?t|=ZL:i===`normal`&&(n|=ZL),a){let e=a.split(` `);e.includes(`underline`)&&(t|=nR),e.includes(`line-through`)&&(t|=$L),e.includes(`none`)&&(n|=nR|$L)}return o===`lowercase`?(t|=jR.lowercase,n|=jR.uppercase|jR.capitalize):o===`uppercase`?(t|=jR.uppercase,n|=jR.lowercase|jR.capitalize):o===`capitalize`?(t|=jR.capitalize,n|=jR.lowercase|jR.uppercase):o===`none`&&(n|=jR.lowercase|jR.uppercase|jR.capitalize),s===`sub`?(t|=eR,n|=tR):s===`super`?(t|=tR,n|=eR):s===`baseline`&&(n|=eR|tR),{clear:n,set:t}}(a),l&~u.clear|u.set);var l,u;let d=QK[t.nodeName];return d&&(c|=d),c===n?e.$importChildren(t):e.$importChildren(t,{context:[hG(AK,c)]})},match:JK.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),name:`@lexical/html/inline-format`};function tq(e,t,n){let r=e;for(;;){let e=null;for(;(e=t?r.nextSibling:r.previousSibling)===null;){let e=r.parentNode;if(e===null)return null;r=e}if(r=e,!n.isInline(r))return null;let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(_z(r))return r;if(r.nodeName===`BR`)return null}}function nq(e,t){return t!==0&&q(e)?e.setFormat(t):e}function rq(e,t){if(q(e)){let n=function(e){let t=``;for(let n in e)$K.has(n)||(t+=`${n}: ${e[n]}; `);return t.trimEnd()}(t);n!==``&&e.setStyle(n)}return e}var iq={$import:(e,t)=>{let n=e.get(AK),r=e.get(jK),i=e.get(PK);if(function(e,t){let n=e.parentNode;for(;n!==null;){if(t.preservesWhitespace(n))return!0;n=n.parentNode}return!1}(t,i)){let e=LF(t.textContent||``);for(let t of e)nq(t,n),rq(t,r);return e}let a=function(e,t){let n=(e.textContent||``).replace(/\\r/g,``).replace(/[ \\t\\n]+/g,` `);if(n.length===0)return``;if(n[0]===` `){let r=e,i=!0;for(;r!==null&&(r=tq(r,!1,t))!==null;){let e=r.textContent||``;if(e.length>0){/[ \\t\\n]$/.test(e)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n.length>0&&n[n.length-1]===` `){let r=e,i=!0;for(;r!==null&&(r=tq(r,!0,t))!==null;)if((r.textContent||``).replace(/^( |\\t|\\r?\\n)+/,``).length>0){i=!1;break}i&&(n=n.slice(0,-1))}return n}(t,i);if(a===``)return[];let o=AF(a);return nq(o,n),rq(o,r),[o]},match:JK.text(),name:`@lexical/html/#text`},aq={$import:()=>[],match:JK.tag(`script`,`style`),name:`@lexical/html/script-style-ignore`},oq={$import:(e,t)=>wz(t)||Sz(t)?[]:[wF()],match:JK.tag(`br`),name:`@lexical/html/br`},sq={$import:(e,t)=>{let n=EF();if(HI(n,t),Bz(t,n),n.getFormatType()===``){let e=t.getAttribute(`align`);e&&XK(e)&&n.setFormat(e)}return VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:JK.tag(`p`),name:`@lexical/html/p`},cq={$import:(e,t,n)=>XF().hasNode(qW)?[WW()]:n(),match:JK.tag(`hr`),name:`@lexical/html/hr`},lq=[aq,sq,cq,{$import:(e,t,n)=>pz(t)?HK(e.$importChildren(t,{schema:WK}),t):n(),match:JK.any(),name:`@lexical/html/transparent-block`},iq,oq,eq];function uq(e,t){let n=[],r=0,i=0;for(;r<e.length&&i<t.length;)e[r]<=t[i]?n.push(e[r++]):n.push(t[i++]);for(;r<e.length;)n.push(e[r++]);for(;i<t.length;)n.push(t[i++]);return n}function dq(e){let t=[],n=new Map,r=[],i=[],a=[],o=new Set;e.forEach((e,s)=>{let c=function(e){let t=e[lK];return t===void 0&&sG(360),t}(e.match),l=e.name||function(e,t){return e.kind===`text`?`#text@${t}`:e.kind===`comment`?`#comment@${t}`:e.tags.size===0?`*@${t}`:`${Array.from(e.tags).join(`,`).toLowerCase()}@${t}`}(c,s);if(e.name&&o.add(e.name),t.push({$import:e.$import,name:l,predicate:c.predicate}),c.kind===`text`)i.push(s);else if(c.kind===`comment`)a.push(s);else if(c.tags.size===0)r.push(s);else for(let e of c.tags){let t=n.get(e);t||(t=[],n.set(e,t)),t.push(s)}});let s=new Map;if(r.length===0)for(let[e,t]of n)s.set(e,t);else for(let[e,t]of n)s.set(e,uq(t,r));return{byTag:s,commentIndices:a,rules:t,textIndices:i,wildcardIndices:r}}function fq(e,t){return _z(t)?e.textIndices:t.nodeType===8?e.commentIndices:J(t)?e.byTag.get(t.nodeName)||e.wildcardIndices:pq}var pq=Object.freeze([]);function mq(e){let t=[];for(let n of e)if(hq(n))for(let e of n.rules)t.push(e);else t.push(n);return t}function hq(e){return typeof e==`object`&&!!e&&`__type`in e&&e.__type===`CompiledOverlayRules`}function gq(e){let t=mq(e);return{__type:`CompiledOverlayRules`,dispatch:dq(t),rules:t}}var _q=Object.freeze({});function vq(e,t){return{$importChildren:(t,n)=>function(e,t,n){let r=n&&n.rules?n.rules.dispatch:void 0;r&&e.overlays.push(r);try{let r=()=>yq(e,t,n);return n&&n.context?zK(n.context,e.editor)(r):r()}finally{r&&e.overlays.pop()}}(e,t,n),$importOne:(t,n)=>bq(e,t,n),captures:t,get:t=>RK(t,e.editor),session:e.session}}function yq(e,t,n){let r=n&&n.$onChild,i=[];for(let n of Array.from(t.childNodes)){let t=bq(e,n,void 0);for(let e of t){let t=r?r(e):e;t!=null&&i.push(t)}}let a=n&&n.$after?n.$after(i):i,o=n&&n.schema;return o?function(e,t,n,r){let i=[],a=null,o=()=>{if(a===null)return;let t=a;if(a=null,e.$packageRun){let a=e.$packageRun(t,n,r);if(a.length>0){for(let e of a)i.push(e);return}}if(e.onReject===`hoist`)for(let e of t)i.push(e)};for(let r of t)e.$accepts(r,n)?(o(),i.push(r)):(a===null&&(a=[]),a.push(r));return o(),e.$finalize?e.$finalize(i,n):i}(o,a,null,t):a}function bq(e,t,n){let r=()=>function(e,t){let n=function(e,t){let n=[];for(let r=e.overlays.length-1;r>=0;r--){let i=e.overlays[r],a=fq(i,t);a.length>0&&n.push({dispatch:i,indices:a})}let r=fq(e.dispatch,t);return r.length>0&&n.push({dispatch:e.dispatch,indices:r}),n}(e,t);if(n.length===0)return xq(e,t);let r=0,i=0,a=()=>{for(;r<n.length;){let{dispatch:o,indices:s}=n[r];for(;i<s.length;){let n=s[i++],r=o.rules[n],c={};if(r.predicate(t,c)){let n=vq(e,Object.keys(c).length===0?_q:c);try{return r.$import(n,t,a)}catch(e){throw e}}}r++,i=0}return xq(e,t)};return a()}(e,t);return n&&n.context?zK(n.context,e.editor)(r):r()}function xq(e,t){if(t.childNodes.length===0)return[];let n=[];for(let r of Array.from(t.childNodes)){let t=bq(e,r,void 0);for(let e of t)n.push(e)}return n}var Sq={build(e,t){let n=dq(mq(t.rules)),r=pG(t.contextDefaults,void 0),i=t.preprocess;return{$generateNodesFromDOM:(t,a)=>{let o=dG(TG,e)||r,s=a&&a.context?pG(a.context,o):o,c=s!==void 0&&s!==o?s:Object.create(o||null),l=new IK(c),u={session:l};return function(e,t,n){let r=e.length-1,i=()=>{for(;r>=0;)return void(0,e[r--])(t,n,i)};i()}(a&&a.preprocess?[...i,...a.preprocess]:i,t,u),_G(TG,c,()=>function(e,t,n,r){return yq({dispatch:e,editor:t,overlays:r.get(FK).map(e=>e.dispatch),session:r},mz(n)?n.body:n,{schema:qK})}(n,e,t,l),e)},defaults:r}},config:{contextDefaults:[],preprocess:[bG],rules:[{$import:(e,t)=>e.$importChildren(t),match:xK.any(),name:`@lexical/html/default-hoist`}]},mergeConfig:(e,t)=>Uz(e,{...t,...t.contextDefaults&&{contextDefaults:[...e.contextDefaults,...t.contextDefaults]},...t.preprocess&&{preprocess:[...e.preprocess,...t.preprocess]},...t.rules&&{rules:[...t.rules,...e.rules]}}),name:wG};function Cq(e,t){return iG(Sq).$generateNodesFromDOM(e,t)}var wq={dependencies:[[Sq,{rules:lq}]],name:`@lexical/html/CoreImport`};function Tq(e){return e}var Eq=[cq],Dq={dependencies:[KW,wq],name:`@lexical/html/HorizontalRuleImport`},Oq={any:_K,comment:vK,css:EK,tag:yK,text:bK},kq=new Set([`STYLE`,`SCRIPT`]);function Aq(e,t){xG(t);let n=mz(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!kq.has(t.nodeName)){let n=Iq(t,e,i,!1);if(n!==null)for(let e of n)r.push(e)}return function(e){for(let t of e)t.getParent()&&t.getNextSibling()instanceof ZI&&t.insertAfter(wF());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(i),r}function jq(e,t=null,n=XF()){return IG([hG(kG,!0)],n)(()=>{let r=nI(),i=FG(n),a=rI(t),o=e.append.bind(e);for(let e of(G(a)?a:r).getChildren())Pq(n,e,o,t,i);return e})}function Mq(e,t=nI()){let n=XF();return IG([hG(kG,!0),hG(OG,!0)],n)(()=>{let r=FG(n),i=e.append.bind(e);return Pq(n,t,i,null,r),e})}function Nq(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&sG(338),gF(e),jq(YF().createElement(`div`),t,e).innerHTML}function Pq(e,t,n,r=null,i=ZF(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&q(t)&&(s=mU(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=YF().createDocumentFragment(),p=d?d():G(s)?s.getChildren():[],m=a&&CI(r)&&G(t)?null:r,h=f.append.bind(f),g=null;for(let n of p){let o=Pq(e,n,h,m,i);o&&(g=n),!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((J(c)||vz(c))&&(u?u(f):c.append(f),function(e,t){let n=e.lastChild;if(SI(t)&&J(e)&&pz(e)&&n!==null&&n.nodeName===`BR`){let t=YF().createElement(`br`);t.setAttribute(`data-lexical-managed-linebreak`,`true`),e.append(t)}}(c,g)),vz(c)){if(l){let e=l.call(s,c);e&&c.replaceChildren(e)}n(c)}else if(n(c),l){let e=l.call(s,c);e&&c.replaceWith(e)}}else n(f);return a}function Fq(e,t,n,r=null){return Pq(e,t,n.append.bind(n),r,FG(e))}function Iq(e,t,n,r,i=new Map,a){let o=[];if(kq.has(e.nodeName))return o;let s=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,t),l=c?c(e):null,u=null;if(l!==null){u=l.after;let t=l.node;if(s=Array.isArray(t)?t[t.length-1]:t,s!==null){for(let[,e]of i)if(s=e(s,a),!s)break;s&&o.push(...Array.isArray(t)?t:[s])}l.forChild!=null&&i.set(e.nodeName,l.forChild)}let d=e.childNodes,f=[],p=(s==null||!EI(s))&&(s!=null&&mI(s)||r);for(let e=0;e<d.length;e++)f.push(...Iq(d[e],t,n,p,new Map(i),s));if(u!=null&&(f=u(f)),pz(e)&&(f=Lq(e,f,p?()=>{let e=new ZI;return n.push(e),e}:EF)),s==null){if(f.length>0)for(let e of f)o.push(e);else pz(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:xz(e.nextSibling)&&xz(e.previousSibling)}(e)&&o.push(wF())}else G(s)&&s.append(...f);return o}function Lq(e,t,n){let r=e.style.textAlign,i=[],a=[];for(let e=0;e<t.length;e++){let o=t[e];if(mI(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),e===t.length-1||e<t.length-1&&mI(t[e+1])){let e=n();e.setFormat(r),e.append(...a),i.push(e),a=[]}}return i}var X=oG;X.$appendNodeToHTML;var Rq=X.$distributeInlineWrapper;X.$generateDOMFromNodes,X.$generateDOMFromRoot;var zq=X.$generateHtmlFromNodes,Bq=X.$generateNodesFromDOM,Vq=X.$generateNodesFromDOMViaExtension;X.$getImportContextValue,X.$getRenderContextValue,X.$getSessionDOMRenderConfig,X.$inlineStylesFromStyleSheets;var Hq=X.$isBlockLevel,Uq=X.$propagateTextAlignToBlockChildren;X.$setRenderContextValue,X.$updateRenderContextValue,X.$withImportContext,X.$withRenderContext;var Wq=X.BlockSchema,Gq=X.CoreImportExtension;X.CoreImportRules;var Kq=X.DOMImportExtension;X.DOMRenderExtension,X.HorizontalRuleImportExtension,X.HorizontalRuleImportRules;var qq=X.ImportOverlays,Jq=X.ImportSource,Yq=X.ImportSourceDataTransfer;X.ImportTextFormat,X.ImportTextStyle,X.ImportWhitespaceConfig;var Xq=X.InlineSchema;X.NestedBlockSchema,X.RenderContextExport,X.RenderContextRoot,X.RootSchema,X.contextUpdater;var Zq=X.contextValue,Qq=X.createImportState;X.createRenderState,X.defaultIsInline,X.defaultPreservesWhitespace,X.defineImportRule;var $q=X.defineOverlayRules;X.domOverride;var eJ=X.isElementOfTag;X.parseSelector;var tJ=X.sel,nJ=t({$exportMimeTypeFromSelection:()=>IJ,$generateJSONFromSelectedNodes:()=>TJ,$generateNodesFromSerializedNodes:()=>EJ,$getClipboardDataFromSelection:()=>jJ,$getHtmlContent:()=>mJ,$getLexicalContent:()=>hJ,$handlePlainTextDrop:()=>SJ,$handleRichTextDrop:()=>xJ,$insertDataTransferForPlainText:()=>gJ,$insertDataTransferForRichText:()=>_J,$insertGeneratedNodes:()=>CJ,$writeDragSourceToDataTransfer:()=>yJ,ClipboardDOMImportExtension:()=>pJ,ClipboardImportExtension:()=>fJ,DEFAULT_IMPORT_MIME_TYPE:()=>cJ,DEFAULT_IMPORT_MIME_TYPE_PRIORITY:()=>aJ,GetClipboardDataExtension:()=>LJ,caretFromPoint:()=>rJ,copyToClipboard:()=>OJ,setLexicalClipboardDataTransfer:()=>MJ});function rJ(e,t,n=null){let r=cz(n),i=n?nz(n):[],a=n!==null&&i.length>0;if(a&&typeof r.caretPositionFromPoint==`function`){let a=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&function(e,t){for(let n=e;n!==null;){if(n===t)return!0;n=oz(n)}return!1}(a.offsetNode,n))return{node:a.offsetNode,offset:a.offset}}if(a){let i=n.getRootNode();if(gz(i)){let a=i.elementFromPoint(e,t);if(a!==null&&n.contains(a)){let n=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,t,a,r);if(n!==null)return n}}}if(typeof r.caretRangeFromPoint==`function`){let n=r.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(typeof r.caretPositionFromPoint==`function`){let n=r.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function iJ(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var aJ={\"application/x-lexical-editor\":0,\"text/html\":10,\"text/plain\":20,\"text/uri-list\":30};function oJ(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var sJ=(e,t)=>{if(!K(t))return t.insertRawText(e),!0;t!==W()&&WI(t);let n=e=>{let t=W();K(t)&&e(t)};return qz(e,{linebreak:()=>n(e=>e.insertParagraph()),tab:()=>n(e=>e.insertNodes([kF()])),text:e=>n(t=>t.insertText(e))}),!0},cJ={\"application/x-lexical-editor\":[(e,t,n)=>{try{let n=XF(),r=JSON.parse(e);if(r&&r.namespace===n._config.namespace&&Array.isArray(r.nodes))return CJ(n,EJ(r.nodes),t),!0}catch(e){console.error(e)}return n()}],\"text/html\":[(e,t,n)=>{try{let n=XF();return CJ(n,Bq(n,new DOMParser().parseFromString(oJ(e),`text/html`)),t),!0}catch(e){return console.error(e),n()}}],\"text/plain\":[sJ],\"text/uri-list\":[sJ]};function lJ(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function uJ(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&lJ(e.$importMimeType[i],a,n,t))return!0}return!1}var dJ={$importMimeType:cJ,$insertDataTransfer:(e,t)=>uJ({$importMimeType:cJ,priority:aJ},e,t),priority:aJ},fJ={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>uJ(t,e,n),priority:t.priority}),config:{$importMimeType:cJ,priority:aJ},mergeConfig(e,t){let n=Uz(e,t);if(t.$importMimeType){let r={...e.$importMimeType};for(let[e,n]of Object.entries(t.$importMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:`@lexical/clipboard/Import`},pJ={dependencies:[Gq,[fJ,{$importMimeType:{\"text/html\":[(e,t,n,r)=>{let i=Vq(new DOMParser().parseFromString(oJ(e),`text/html`),{context:[Zq(Jq,`paste`),Zq(Yq,r)]});return CJ(XF(),i,t),!0}]}}]],name:`@lexical/clipboard/DOMImport`};function mJ(e,t=W()){return t??iJ(166),K(t)&&t.isCollapsed()||t.getNodes().length===0?``:zq(e,t)}function hJ(e,t=W()){return t??iJ(166),K(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(TJ(e,t))}function gJ(e,t){let n=e.getData(`text/plain`)||e.getData(`text/uri-list`);n!=null&&t.insertRawText(n)}function _J(e,t,n){(function(){let e=aG(fJ.name);return e?e.output:dJ})().$insertDataTransfer(e,t)}var vJ=`application/x-lexical-drag`;function yJ(e,t){let n={editorKey:t.getKey()};e.setData(vJ,JSON.stringify(n))}function bJ(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(vJ);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e,t){let n=rJ(e.clientX,e.clientY,t.getRootElement());if(n===null)return null;let r=QF(n.node);if(r===null)return null;if(q(r))return uI(r,`next`,n.offset);if(G(r))return WF(r,n.offset,`next`);let i=r.getParent();return i===null?null:WF(i,r.getIndexWithinParent()+1,`next`)}(e,t);if(a===null)return!1;let o=JI(a);if(o===null)return!1;let s=i.editorKey===t.getKey(),c=W();if(s){if(!K(c)||c.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=VF(vF(t),`next`);return xF(n,e)<0&&xF(e,r)<0}(a,c))return e.preventDefault(),!0;c.removeText()}if(!o.origin.isAttached())return e.preventDefault(),!0;if(n(r,GI(KF(o)),t),!s){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){for(let n of YR(t)){let t=iz(n);if(Cz(t)&&t.getKey()===e&&J(n))return n}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function xJ(e,t){return bJ(e,t,_J)}function SJ(e,t){return bJ(e,t,(e,t)=>gJ(e,t))}function CJ(e,t,n){e.dispatchCommand(TR,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(K(e)&&e.isCollapsed()){let t=e.anchor,n=null,r=_F(t,`previous`);if(r){if(MI(r))n=r.origin;else{let e=BF(r,UF(nI(),`next`).getFlipped());for(let t of e){if(q(t.origin)){n=t.origin;break}if(G(t.origin)&&!t.origin.isInline())break}}}if(n&&q(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}function wJ(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=G(n)&&n.excludeFromCopy(`clone`),o=n;t!==null&&q(o)&&(o=mU(t,o,`clone`));let s=jF(o),c=G(o)?o.getChildren():[],l=s.children||[];q(o)&&o.getTextContentSize()===0&&(i=!1);let u=i&&CI(t)&&G(n)?null:t;for(let r=0;r<c.length;r++){let a=c[r],o=wJ(e,u,a,l);!i&&G(n)&&o&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a){let t=cI(o);if(t.length>0){let n={};for(let r of t){let t=aI(o,r);t===null&&iJ(366,o.constructor.name,r);let i=[];wJ(e,null,t,i),(i.length!==1||G(t)&&t.excludeFromCopy(`clone`))&&iJ(435,r,o.constructor.name,String(i.length)),n[r]=i[0]}s.$slots=n}}if(i&&!a)r.push(s);else for(let e=0;e<l.length;e++)r.push(l[e]);return i}function TJ(e,t){let n=[],r=nI(),i=rI(t),a=(G(i)?i:r).getChildren();for(let r=0;r<a.length;r++)wJ(e,t,a[r],n);return{namespace:e._config.namespace,nodes:n}}function EJ(e){let t=[];for(let n of e)t.push(LI(n));return t}var DJ=null;async function OJ(e,t,n){if(DJ!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(kJ(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,o=ez(i);if(r===null||o===null)return!1;let s=a.createElement(`span`);s.style.position=`fixed`,s.style.top=`-1000px`,s.append(a.createTextNode(`#`)),r.append(s);let c=a.createRange();return c.setStart(s,0),c.setEnd(s,1),o.removeAllRanges(),o.addRange(c),new Promise((t,r)=>{let o=e.registerCommand(vL,r=>(DW(r,ClipboardEvent)&&(o(),DJ!==null&&(i.clearTimeout(DJ),DJ=null),t(kJ(e,r,n))),!0),cL);DJ=i.setTimeout(()=>{o(),DJ=null,t(!1)},50),a.execCommand(`copy`),s.remove()})}function kJ(e,t,n){if(n===void 0){let t=ez(e._window),r=W();if(!r||r.isCollapsed()||!t)return!1;let i=tz(t,e.getRootElement()),a=i.anchorNode,o=i.focusNode;if(a!==null&&o!==null&&!Tz(e,a,o))return!1;n=jJ(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(MJ(r,n),!0)}var AJ=[[`text/html`,mJ],[`application/x-lexical-editor`,hJ]];function jJ(e=W()){return function(e,t){let n={\"text/plain\":``};for(let[r,i]of Object.entries(e))if(i){let e=FJ(i,t);e!==null&&(n[r]=e)}return n}(NJ(),e)}function MJ(e,t){for(let[n]of AJ)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function NJ(e=XF()){let t=wH(e,LJ.name);return t?t.output:PJ}var PJ={\"application/x-lexical-editor\":[(e,t)=>e?hJ(XF(),e):t()],\"text/html\":[(e,t)=>e?mJ(XF(),e):t()],\"text/plain\":[(e,t)=>e?e.getTextContent():t()]};function FJ(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}function IJ(e,t=W()){return FJ(NJ()[e]||[],t)}var LJ={build:(e,t,n)=>t.$exportMimeType,config:{$exportMimeType:PJ},mergeConfig(e,t){let n=Uz(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$exportMimeType=r}return n},name:`@lexical/clipboard/GetClipboardData`},RJ=nJ;RJ.$exportMimeTypeFromSelection,RJ.$generateJSONFromSelectedNodes,RJ.$generateNodesFromSerializedNodes;var zJ=RJ.$getClipboardDataFromSelection;RJ.$getHtmlContent,RJ.$getLexicalContent,RJ.$handlePlainTextDrop;var BJ=RJ.$handleRichTextDrop;RJ.$insertDataTransferForPlainText;var VJ=RJ.$insertDataTransferForRichText;RJ.$insertGeneratedNodes;var HJ=RJ.$writeDragSourceToDataTransfer;RJ.ClipboardDOMImportExtension,RJ.ClipboardImportExtension,RJ.DEFAULT_IMPORT_MIME_TYPE,RJ.DEFAULT_IMPORT_MIME_TYPE_PRIORITY,RJ.GetClipboardDataExtension;var UJ=RJ.caretFromPoint,WJ=RJ.copyToClipboard,GJ=RJ.setLexicalClipboardDataTransfer,KJ=t({RootElementExtension:()=>qJ}),qJ={build:e=>bV(()=>e.getRootElement(),t=>e.registerRootListener(e=>{t.value=e})),name:`@lexical/extension/RootElement`},JJ=KJ.RootElementExtension,YJ=t({AriaLiveRegionExtension:()=>tY,EditorModeAnnounceExtension:()=>rY,FocusManagerExtension:()=>oY,FocusTrapExtension:()=>iY,HistoryAnnounceExtension:()=>nY,RovingTabIndexExtension:()=>aY}),XJ=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type=\"hidden\"])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex=\"-1\"])`,`[contenteditable=\"true\"]`].join(`,`);function ZJ(e){return Array.from(e.querySelectorAll(XJ))}function QJ(e,t){let n=t;for(;n!==null;){if(n===e)return!0;n=gz(n)?n.host:n.parentNode}return!1}function $J(e,t={}){let n=t.initialFocus??`firstFocusable`,r=e.ownerDocument,i=QR(r),a=J(i)?i:null,o=ZJ(e);return n===`container`&&e.hasAttribute(`tabindex`)?e.focus():o.length>0?o[0].focus():e.hasAttribute(`tabindex`)&&e.focus(),kz(()=>{a!==null&&typeof a.focus==`function`&&QJ(r,a)&&a.focus()},Fz(e,`keydown`,t=>{if(t.key!==`Tab`)return;let n=ZJ(e);if(n.length===0)return void t.preventDefault();t.preventDefault();let i=n[0],a=n[n.length-1],o=QR(r),s=J(o)&&QJ(e,o)?n.indexOf(o):-1;t.shiftKey?(s<=0?a:n[s-1]).focus():(s===-1||s===n.length-1?i:n[s+1]).focus()}),Fz(r,`focusin`,n=>{let r=$R(n);if(!J(r)||QJ(e,r)||t.allowOutside!=null&&t.allowOutside(r))return;let i=ZJ(e);i.length>0?i[0].focus():e.hasAttribute(`tabindex`)&&e.focus()}))}function eY(e,t={}){let n=t.orientation??`horizontal`,r=t.itemSelector??`:scope > button:not([disabled])`,i=()=>Array.from(e.querySelectorAll(r)),a=(e,t)=>{e.forEach((e,n)=>{e.tabIndex=n===t?0:-1})};return(()=>{let t=i();if(t.length===0)return;let n=QR(e.ownerDocument),r=t.findIndex(e=>e===n);a(t,r>=0?r:0)})(),kz(Fz(e,`keydown`,t=>{let r=i();if(r.length===0)return;let o=QR(e.ownerDocument),s=r.findIndex(e=>e===o);if(s<0)return void(t.key!==`ArrowRight`&&t.key!==`ArrowDown`&&t.key!==`ArrowLeft`&&t.key!==`ArrowUp`&&t.key!==`Home`&&t.key!==`End`||(t.preventDefault(),a(r,0),r[0].focus()));let c=n===`horizontal`||n===`both`,l=n===`vertical`||n===`both`,u=s;switch(t.key){case`ArrowRight`:if(!c)return;u=s+1;break;case`ArrowLeft`:if(!c)return;u=s-1;break;case`ArrowDown`:if(!l)return;u=s+1;break;case`ArrowUp`:if(!l)return;u=s-1;break;case`Home`:u=0;break;case`End`:u=r.length-1;break;default:return}t.preventDefault(),u=(u+r.length)%r.length,a(r,u),r[u].focus()}),()=>{i().forEach(e=>{e.tabIndex=0})})}var tY={build(e,t,n){let r=n.getInitResult();return{..._V(t),announce(e){r.value=e===r.peek()?e+``:e}}},config:{owner:null,politeness:`polite`},dependencies:[JJ],init:()=>pV(``),name:`@lexical/a11y/AriaLiveRegion`,register(e,t,n){let r=n.getInitResult(),{owner:i,politeness:a}=n.getOutput(),o=n.getDependency(JJ).output,s=pV(null);return kz(fV(()=>{let e=i.value,t=e?null:o.value,n=e??(t?t.ownerDocument.body:null);if(!n)return;let r=function(e){let t=e.ownerDocument.createElement(`div`);return t.setAttribute(`aria-atomic`,`true`),t.setAttribute(`role`,`status`),function(e){let t=e.style;t.border=`0`,t.clip=`rect(0 0 0 0)`,t.height=`1px`,t.margin=`-1px`,t.overflow=`hidden`,t.padding=`0`,t.position=`absolute`,t.whiteSpace=`nowrap`,t.width=`1px`}(t),e.appendChild(t),t}(n);return s.value=r,()=>{r.remove(),s.value=null}}),fV(()=>{let e=s.value;e&&e.setAttribute(`aria-live`,a.value)}),fV(()=>{let e=r.value,t=s.peek();t&&(t.textContent=e)}))}},nY={build:(e,t)=>_V(t),config:{disabled:!1,redone:`Redone`,undone:`Undone`},dependencies:[tY],name:`@lexical/a11y/HistoryAnnounce`,register(e,t,n){let{disabled:r,redone:i,undone:a}=n.getOutput(),{announce:o}=n.getDependency(tY).output;return fV(()=>r.value?void 0:kz(e.registerCommand(PR,()=>(o(a.peek()),!1),uL),e.registerCommand(xR,()=>(o(i.peek()),!1),uL)))}},rY={build:(e,t)=>_V(t),config:{disabled:!1,editable:`Editor is editable`,readOnly:`Editor is read-only`},dependencies:[tY],name:`@lexical/a11y/EditorModeAnnounce`,register(e,t,n){let{disabled:r,editable:i,readOnly:a}=n.getOutput(),{announce:o}=n.getDependency(tY).output;return fV(()=>r.value?void 0:e.registerEditableListener(e=>{o(e?i.peek():a.peek())}))}},iY={build:()=>WR($J),name:`@lexical/a11y/FocusTrap`,register:(e,t,n)=>()=>n.getOutput().dispose()},aY={build:()=>WR(eY),name:`@lexical/a11y/RovingTabIndex`,register:(e,t,n)=>()=>n.getOutput().dispose()},oY={build:e=>WR((t,n)=>function(e,t,n={}){let r=n.toolbarItemSelector??`:scope > button:not([disabled]), :scope > [tabindex=\"0\"]`;return kz(e.registerCommand(lR,e=>{if(!e.altKey||e.key!==`F10`)return!1;let n=t.querySelector(`[tabindex=\"0\"]`)??t.querySelector(r);return n!==null&&(e.preventDefault(),n.focus(),!0)},uL),Fz(t,`keydown`,n=>{if(n.key!==`Escape`)return;let i=$R(n);if(J(i)){let e=t.querySelectorAll(r),n=!1;for(let t of e)if(t===i||QJ(t,i)){n=!0;break}if(!n)return}let a=e.getRootElement();a!==null&&(n.preventDefault(),n.stopPropagation(),e.focus(),a.focus())}))}(e,t,n)),name:`@lexical/a11y/FocusManager`,register:(e,t,n)=>()=>n.getOutput().dispose()},sY=YJ,cY=sY.AriaLiveRegionExtension;sY.EditorModeAnnounceExtension,sY.FocusManagerExtension,sY.FocusTrapExtension,sY.HistoryAnnounceExtension,sY.RovingTabIndexExtension;var lY=t({NormalizeInlineElementsExtension:()=>dY});function uY(e){G(e)&&e.isInline()&&e.isEmpty()&&e.remove()}var dY={build:(e,t,n)=>_V(t),config:{disabled:!1},name:`@lexical/NormalizeInlineElements`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value){let t=[];for(let{klass:n,transforms:r}of e._nodes.values())n.prototype instanceof kL&&n.prototype.isInline!==kL.prototype.isInline&&(r.add(uY),t.push(()=>r.delete(uY)));return()=>t.forEach(e=>e())}})}},fY=lY.NormalizeInlineElementsExtension,pY=t({NormalizeTripleClickSelectionExtension:()=>hY}),mY=new Set([AR,kR]),hY={build:(e,t,n)=>_V(t),config:{$fixFocusOverselection:function(){let e=W();if(K(e)&&!e.isCollapsed()){let t=VF(vF(e),`next`),n=t.focus;for(MI(n)&&t.anchor.origin!==n.origin&&n.offset===0&&(n=zI(n.getSiblingCaret())),kI(n)&&t.anchor.origin!==n.origin&&SI(n.origin)&&(n=zI(n));gI(n)&&t.anchor.origin!==n.origin;)n=zI(iI(n.origin,`next`));if(kI(n)&&G(n.origin)&&(n=FI(UF(n.origin,`previous`)).getFlipped()),n=FI(n),!n.isSamePointCaret(t.focus)){let e=GI(BF(t.anchor,n)),r=XF().getRootElement(),i=r&&ez(r.ownerDocument.defaultView);i&&XI(tI(),e,XF(),i,mY,r)}}},dateNow:()=>Date.now(),disabled:!1,thresholdMsec:100},name:`@lexical/NormalizeTripleClickSelection`,register:(e,t,n)=>fV(()=>{let t=n.getOutput();if(!t.disabled.value)return e.registerRootListener(n=>{if(!n)return;let r=0,i=e=>{if(e?e.detail>2:r>0){let n=t.dateNow.peek()();r=e&&e.type===`mousedown`||n-r<=t.thresholdMsec.peek()?n:0}return r};return kz(e.registerCommand(wR,()=>(i(null)&&(r=0,t.$fixFocusOverselection.peek()()),!1),oL),Iz(n,{mousedown:i,mouseup:i},!0))})})},gY=pY.NormalizeTripleClickSelectionExtension,_Y=t({$createHeadingNode:()=>UY,$createQuoteNode:()=>IY,$isHeadingNode:()=>WY,$isQuoteNode:()=>LY,DRAG_DROP_PASTE:()=>NY,HeadingAnnounceExtension:()=>TY,HeadingNode:()=>zY,QuoteNode:()=>FY,RichTextExtension:()=>jY,RichTextImportExtension:()=>MY,RichTextImportRules:()=>kY,ShadowRootQuoteRule:()=>OY,defaultShouldHandlePasteAsFiles:()=>oX,eventFiles:()=>EW,quoteShadowRootState:()=>PY,registerRichText:()=>sX}),vY=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function yY(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!vY.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function bY(e,t,n,r,i){let a=yY(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}function xY(e,t){e.__tag=t.__tag}var SY=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],tag:e.__tag,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__tag;o!==void 0&&o!==`h1`&&(a.tag=o);let s=e.__dir;s!=null&&(a.direction=s);let c=t[e.__format];c!==void 0&&c!==``&&(a.format=c);let l=e.__indent;return l!==void 0&&l!==0&&(a.indent=l),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=bY(t.indent,0,0,1/0),e.__textFormat=yY(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.tag;return e.__tag=s===`h1`||s===`h2`||s===`h3`||s===`h4`||s===`h5`||s===`h6`?s:`h1`,e},afterCloneFrom:xY}},CY=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__dir;o!=null&&(a.direction=o);let s=t[e.__format];s!==void 0&&s!==``&&(a.format=s);let c=e.__indent;return c!==void 0&&c!==0&&(a.indent=c),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=bY(t.indent,0,0,1/0),e.__textFormat=yY(t.textFormat,0);let o=t.textStyle;return e.__textStyle=typeof o==`string`?o:``,e}}};function wY(e){let t=$F(e);return WY(t)?t.getTag():null}var TY={build:(e,t)=>_V(t),config:{created:`Heading level %s`,destroyed:`Heading level %s removed`,disabled:!1},dependencies:[cY],name:`@lexical/rich-text/HeadingAnnounce`,register(e,t,n){let{created:r,destroyed:i,disabled:a}=n.getOutput(),{announce:o}=n.getDependency(cY).output;return fV(()=>a.value?void 0:e.registerMutationListener(zY,(t,{prevEditorState:n})=>{let a=null,s=null;for(let[r,i]of t)i===`created`&&a===null?a=e.read(`latest`,()=>wY(r)):i===`destroyed`&&s===null&&(s=n.read(()=>wY(r)));a===null?s!==null&&o(i.peek().replace(`%s`,s.slice(1))):o(r.peek().replace(`%s`,a.slice(1)))},{skipInitialization:!0}))}},EY={$import:(e,t)=>{let n=UY(t.nodeName.toLowerCase());return Bz(t,n),HI(n,t),VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:tJ.tag(`h1`,`h2`,`h3`,`h4`,`h5`,`h6`),name:`@lexical/rich-text/heading`},DY={$import:(e,t)=>{let n=IY();return HI(n,t),Bz(t,n),VI(n,t),[n.splice(0,0,e.$importChildren(t))]},match:tJ.tag(`blockquote`),name:`@lexical/rich-text/blockquote`},OY={$import:(e,t)=>{let n=IY({shadowRoot:!0});return HI(n,t),Bz(t,n),VI(n,t),[n.splice(0,0,e.$importChildren(t,{schema:Wq}))]},match:tJ.tag(`blockquote`),name:`@lexical/rich-text/blockquote-shadow-root`},kY=[EY,DY,{$import:(e,t,n)=>{let r=t.firstChild;return r&&J(i=r)&&i.nodeName===`SPAN`&&i.style.fontSize===`26pt`?e.$importChildren(t):n();var i},match:tJ.tag(`p`),name:`@lexical/rich-text/google-docs-title-p`},{$import:(e,t,n)=>t.style.fontSize===`26pt`?[UY(`h1`).splice(0,0,e.$importChildren(t))]:n(),match:tJ.tag(`span`),name:`@lexical/rich-text/google-docs-title-span`}];function AY(e,t){return e&&t!==null?Uz(e,t):t}var jY={build:(e,t)=>_V(t),config:{escapeFormatTriggers:{capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}},shouldHandlePasteAsFiles:oX},conflictsWith:[`@lexical/plain-text`],dependencies:[TY,MV,fY,gY,Gq,[Kq,{rules:kY}]],mergeConfig:function(e,t){let n=Uz(e,t);return t.escapeFormatTriggers&&(n.escapeFormatTriggers=function(e,t){let n=Uz(e,t);for(let r of Object.keys(t))n[r]=AY(e[r],t[r]);return n}(e.escapeFormatTriggers,t.escapeFormatTriggers)),n},name:`@lexical/rich-text`,nodes:()=>[zY,FY],register:(e,t,n)=>fV(()=>{let{escapeFormatTriggers:t,shouldHandlePasteAsFiles:r}=n.getOutput();return sX(e,t,r)})},MY={dependencies:[jY],name:`@lexical/rich-text/Import`},NY=HR(`DRAG_DROP_PASTE_FILE`),PY=GR(`shadowRoot`,{parse:RR()}),FY=class extends kL{$config(){return this.config(`quote`,{extends:kL,generated:CY,importDOM:{blockquote:()=>({conversion:HY,priority:0})},stateConfigs:[{flat:!0,stateConfig:PY}]})}isShadowRoot(){return lI(this,PY)}setIsShadowRoot(e){return KI(this,PY,e)}createDOM(e){let t=YF().createElement(`blockquote`);return FR(t,e.theme.quote),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(YF().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return IY().updateFromJSON(e)}insertNewAfter(e,t){let n=EF();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){if(this.isShadowRoot()){for(let e of this.getChildren())this.insertBefore(e);return this.remove(),!0}let e=EF();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function IY(e){let t=hF(new FY);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function LY(e){return e instanceof FY}var RY=Az()({tag:Yz(JR([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]),{field:`__tag`})}),zY=class extends kL{__tag;$config(){return this.config(`heading`,{extends:kL,generated:SY,importDOM:{h1:()=>({conversion:VY,priority:0}),h2:()=>({conversion:VY,priority:0}),h3:()=>({conversion:VY,priority:0}),h4:()=>({conversion:VY,priority:0}),h5:()=>({conversion:VY,priority:0}),h6:()=>({conversion:VY,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&BY(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>BY(e)?{conversion:()=>({node:UY(`h1`)}),priority:3}:null},json:RY})}constructor(e=`h1`,t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){let t=this.getWritable();return t.__tag=e,t}createDOM(e){let t=this.__tag,n=YF().createElement(t),r=e.theme.heading;if(r!==void 0){let e=r[t];FR(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(YF().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?EF():UY(this.getTag()).setFormat(this.getFormatType()).setStyle(this.getStyle()),a=this.getDirection();if(i.setDirection(a),this.insertAfter(i,t),n===0&&!this.isEmpty()&&e){let e=EF();e.select(),this.replace(e,!0)}return i}collapseAtStart(){if(this.isEmpty()){let e=EF();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function BY(e){return e.nodeName.toLowerCase()===`span`&&e.style.fontSize===`26pt`}function VY(e){let t=e.nodeName.toLowerCase(),n=null;return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`||(n=UY(t),Bz(e,n),HI(n,e),VI(n,e)),{node:n}}function HY(e){let t=IY();return HI(t,e),Bz(e,t),VI(t,e),{node:t}}function UY(e=`h1`){return hF(new zY(e))}function WY(e){return e instanceof zY}function GY(e){return _I(QF(e))}function KY(e){let t=e.focus;return t.key===`root`&&t.offset===nI().getChildrenSize()}function qY(e){let t=e.focus;return t.key===`root`&&t.offset===0}function JY(e,t){if(!e.isCollapsed())return!1;let n=t===`next`;if(!(n?KY(e):qY(e)))return!1;let r=e.focus.offset;return PI(nI().getChildAtIndex(n?r-1:r))}function YY(e,t,n,r){let i=!1,a=null;if(e.isCollapsed()&&e.anchor.type===`text`){let t=e.anchor.getNode();if(q(t)){a=t;let r=e.anchor.offset,o=r===t.getTextContentSize()&&t.getNextSibling()===null,s=r===0&&t.getPreviousSibling()===null;i=n===`end`&&o||n===`start`&&s||n===`both`&&(o||s)}}let o=!1;for(let[n,s]of Object.entries(r)){if(s==null||!s[t])continue;let r=n;if(s.onlyAtBoundary){if(!(i&&a&&q(a)&&a.hasFormat(r)))continue;o=!0}e.hasFormat(r)&&e.toggleFormat(r)}o&&e.setStyle(``)}var XY={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function ZY(e,t){return function(e,t){if(!e.isCollapsed())return!1;let n=_F(e.focus,t),r=NF(n.origin,OI);if(!r)return!1;let i=e.focus.getNode();if(!r.is(i)&&!dI(i,r))return!1;let a=BF(n,iI(r,t));if(a.getTextSlices().some(e=>e&&e.getTextContentSize()>0))return!1;let o=BF(a.anchor.getSiblingCaret(),a.focus),s=o.anchor.origin;for(let e of o){if(!kI(e)||!e.origin.is(s.getParent()))return!1;s=e.origin}let c=r;for(let e of MF(iI(r,t))){if(!e.origin.is(c.getParent())){if(PI(e.origin)){let e=iI(c,t);return GI(BF(e,e)),!0}break}if(!OI(e.origin))break;c=e.origin}return!1}(e,t)||function(e,t){if(!e.isCollapsed()||e.anchor.type!==`element`)return!1;let n=_F(e.anchor,t).getNodeAtCaret();return!(!OI(n)||n.isInline()||(GI(KF(FI(UF(n,t)))),0))}(e,t)}function QY(e){return _I(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function $Y(e){let t=TF();t.add(e),WI(t)}function eX(e,t){if(!e.isCollapsed())return!1;let n=e.focus,r=n.getNode(),i=t?`previous`:`next`,a=_F(n,i);if(n.type===`element`&&G(r)&&EI(r)){let e=a.getNodeAtCaret();return!(e===null||!QY(e))&&($Y(e.__key),!0)}let o=NF(G(r)?r:r.getParentOrThrow(),e=>G(e)&&!e.isInline()&&EI(e.getParent()));if(o===null)return!1;let s=iI(o,i).getNodeAtCaret();if(s===null||!QY(s))return!1;if(o.getTextContentSize()===0)return $Y(s.__key),!0;let c=XF().getRootElement();if(c===null)return!1;let l=ez(c.ownerDocument.defaultView);if(l===null||l.rangeCount===0)return!1;let u=l.anchorNode,d=l.anchorOffset,f=l.focusNode,p=l.focusOffset;l.modify(`move`,t?`backward`:`forward`,`line`);let m=l.anchorNode,h=l.anchorOffset;if(m===null)return tX(l,u,d,f,p),!1;let g=QF(m);return tX(l,u,d,f,p),g!==null&&(m===u&&h===d||!g.is(o)&&!dI(g,o))&&($Y(s.__key),!0)}function tX(e,t,n,r,i){t!==null&&r!==null&&e.setBaseAndExtent(t,n,r,i)}function nX(e,t){if(!e.isCollapsed())return!1;let n=e.focus.getNode(),r=NF(G(n)?n:n.getParentOrThrow(),e=>G(e)&&!e.isInline());if(r===null)return!1;let i=XF(),a=i.getRootElement();if(a===null)return!1;let o=a.ownerDocument.defaultView;if(o===null)return!1;let s=!1;for(let e of r.getChildren())if(G(e)&&e.isInline()){let t=i.getElementByKey(e.getKey());if(t!==null){let e=o.getComputedStyle(t).display;if(e===`inline-grid`||e===`inline-flex`){s=!0;break}}}if(!s)return!1;let c=iI(r,t?`previous`:`next`).getNodeAtCaret();if(c===null||!G(c)){if(t){let e=r.getFirstDescendant();q(e)?e.select(0,0):r.select(0,0)}else{let e=r.getLastDescendant();if(q(e)){let t=e.getTextContentSize();e.select(t,t)}else{let e=r.getChildrenSize();r.select(e,e)}}return!0}let l=i.getElementByKey(c.getKey());if(l===null)return!1;let u=ez(o);if(u===null||u.rangeCount===0)return!1;let d=u.getRangeAt(0).cloneRange();d.collapse(!0);let f=d.getBoundingClientRect(),p=l.getBoundingClientRect(),m=p.top+p.height/2;if(f.height>0){let t=UJ(f.left,m,a);if(t!==null&&l.contains(t.node)){let n=a.ownerDocument.createRange();return n.setStart(t.node,t.offset),n.collapse(!0),e.applyDOMRange(n),e.dirty=!0,!0}}let h=t?c.getLastDescendant():c.getFirstDescendant();if(q(h)){let e=t?h.getTextContentSize():0;h.select(e,e)}else{let e=c.getChildrenSize();c.select(t?e:0,t?e:0)}return!0}function rX(e,t){let n=iI(e,t),r=n.getAdjacentCaret();r!==null&&G(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?GI(KF(n)):t===`next`?e.selectNext(0,0):e.selectPrevious()}function iX(e,t){let n=e.getNodes().map(e=>iI(e,`next`)).sort(xF),r=n[0],i=n[n.length-1];if(!r||!i)return!1;for(let e=0;e<n.length-1;e++)if(!n[e+1].origin.is(n[e].getNodeAtCaret()))return!1;return GI(VF(BF(zI(r),i),t)),PF(),!0}function aX(e,t,n){n.preventDefault(),n.stopPropagation();let r=e.getNodes();if(r.length===0)return!0;let i=r.map(e=>iI(e,`next`)).sort(xF),a=(t?i[0]:i[i.length-1]).origin,o=NF(a,e=>e!==a&&G(e)&&!e.isInline())??nI(),s=t?0:o.getChildrenSize();return o.select(s,s),!0}function oX(e,t){return e.length>0&&!t}function sX(e,t=pV(XY),n=pV(oX)){return kz(e.registerCommand(iL,n=>{let r=W();if(CI(r)){let t=n.target;if(J(t))for(let n of r.getNodes()){let r=e.getElementByKey(n.getKey());if(r!==null&&r.contains(t))return!1}return r.clear(),!0}return K(r)&&YY(r,`click`,`both`,t.peek()),!1},lL),e.registerCommand(SL,e=>{let t=W();return K(t)?(t.deleteCharacter(e),!0):!!CI(t)&&(t.deleteNodes(),!0)},lL),e.registerCommand(wL,e=>{let t=W();return!!K(t)&&(t.deleteWord(e),!0)},lL),e.registerCommand(CL,e=>{let t=W();return!!K(t)&&(t.deleteLine(e),!0)},lL),e.registerCommand(hL,t=>{let n=W();if(typeof t==`string`)n!==null&&n.insertText(t);else{if(n===null)return!1;let r=t.dataTransfer;if(r!=null)VJ(r,n,e);else if(K(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},lL),e.registerCommand(SR,()=>{let e=W();return!!K(e)&&(e.removeText(),!0)},lL),e.registerCommand(jL,e=>{let t=W();return!(!K(t)&&!CI(t))&&(FF(t,e),!0)},lL),e.registerCommand(DR,e=>{let t=W();return!(!K(t)&&!CI(t))&&(qI(t,e),!0)},lL),e.registerCommand(AL,e=>{let t=W();if(!K(t)&&!CI(t))return!1;let n=t.getNodes();for(let t of n){let n=NF(t,e=>G(e)&&!e.isInline());n!==null&&n.setFormat(e)}return!0},lL),e.registerCommand(IL,e=>{let t=W();return!!K(t)&&(t.insertLineBreak(e),!0)},lL),e.registerCommand(LL,()=>{let e=W();return!!K(e)&&(e.insertParagraph(),!0)},lL),e.registerCommand(RL,()=>{let e=kF(),t=W();return K(t)&&(e.setFormat(t.format),e.setStyle(t.style)),pI([e]),!0},lL),e.registerCommand(FL,()=>xW(e=>{let t=e.getIndent();e.setIndent(t+1)}),lL),e.registerCommand(_R,()=>xW(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),lL),e.registerCommand(oR,e=>{let t=W();if(CI(t)){let n=t.getNodes();if(n.length>0){if(!e.shiftKey||!iX(t,`previous`))return e.preventDefault(),rX(n[0],`previous`),!0;t=W()}}return K(t)&&(qY(t)||!e.shiftKey&&ZY(t,`previous`)||!e.shiftKey&&eX(t,!0)||!e.shiftKey&&nX(t,!0))?(e.preventDefault(),!0):!1},lL),e.registerCommand(rR,e=>{let t=W();if(CI(t)){let n=t.getNodes();if(n.length>0){if(!e.shiftKey||!iX(t,`next`))return e.preventDefault(),rX(n[0],`next`),!0;t=W()}}return K(t)&&(KY(t)||!e.shiftKey&&ZY(t,`next`)||!e.shiftKey&&eX(t,!1)||!e.shiftKey&&nX(t,!1))?(e.preventDefault(),!0):!1},lL),e.registerCommand(iR,e=>{let n=W();if(CI(n)){let t=n.getNodes();if(t.length>0){let r=uU(t[0])?`next`:`previous`;if(!e.shiftKey||!iX(n,r))return e.preventDefault(),rX(t[0],r),!0;n=W()}}if(!K(n))return!1;let r=uU(n.anchor.getNode())?`next`:`previous`;if(JY(n,r)||!e.shiftKey&&ZY(n,r))return e.preventDefault(),!0;if(e.shiftKey||YY(n,`arrow`,`start`,t.peek()),pU(n,!0)){let t=e.shiftKey;return e.preventDefault(),dU(n,t,!0),!0}return!1},lL),e.registerCommand(aR,e=>{let n=W();if(CI(n)){let t=n.getNodes();if(t.length>0){let r=uU(t[0])?`previous`:`next`;if(!e.shiftKey||!iX(n,r))return e.preventDefault(),rX(t[0],r),!0;n=W()}}if(!K(n))return!1;let r=uU(n.anchor.getNode())?`previous`:`next`;if(JY(n,r)||!e.shiftKey&&ZY(n,r))return e.preventDefault(),!0;if(e.shiftKey||YY(n,`arrow`,`end`,t.peek()),pU(n,!1)){let t=e.shiftKey;return e.preventDefault(),dU(n,t,!1),!0}return!1},lL),e.registerCommand(sR,t=>{let n=W();if(!CI(n)&&GY(t.target))return!1;if(K(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(t.offset!==0)return!1;let n=t.getNode();if(TI(n))return!1;let r=yW(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(_R);if(XL&&eL)return!1}else if(!CI(n))return!1;return t.preventDefault(),e.dispatchCommand(SL,!0)},lL),e.registerCommand(cR,t=>{let n=W();return!(!CI(n)&&GY(t.target))&&!(!K(n)&&!CI(n))&&(t.preventDefault(),e.dispatchCommand(SL,!1))},lL),e.registerCommand(uR,n=>{let r=W();if(CI(r)){let e=r.getNodes();e.length===1&&_I(e[0])&&!e[0].isInline()&&(r=e[0].selectNext())}if(!K(r))return!1;if(YY(r,`enter`,`both`,t.peek()),n!==null){if((XL||QL||WL)&&eL)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(IL,!1)}return e.dispatchCommand(LL)},lL),e.registerCommand(dR,()=>!!K(W())&&(e.blur(),!0),lL),e.registerCommand(DL,t=>{let[,n]=EW(t);if(n.length>0){let r=t.clientX,i=t.clientY,a=UJ(r,i,e.getRootElement());if(a!==null){let{offset:e,node:t}=a,n=QF(t);if(n!==null){let t=OF();if(q(n))t.anchor.set(n.getKey(),e,`text`),t.focus.set(n.getKey(),e,`text`);else{let e=n.getParentOrThrow().getKey(),r=n.getIndexWithinParent()+1;t.anchor.set(e,r,`element`),t.focus.set(e,r,`element`)}WI(II(t))}}return e.dispatchCommand(NY,n),t.preventDefault(),!0}return BJ(t,e)},lL),e.registerCommand(EL,t=>{let[n]=EW(t),r=W();return!(n&&!K(r))&&(K(r)&&!r.isCollapsed()&&t.dataTransfer!==null&&(GJ(t.dataTransfer,zJ(r)),HJ(t.dataTransfer,e)),!0)},lL),e.registerCommand(TL,t=>{let[n]=EW(t),r=W();if(n&&!K(r))return!1;let i=t.clientX,a=t.clientY,o=UJ(i,a,e.getRootElement());return o!==null&&_I(QF(o.node))&&t.preventDefault(),!0},lL),e.registerCommand(ER,()=>{let e=W();return BI(K(e)&&oI(e.anchor.getNode())!==null?e:null),!0},lL),e.registerCommand(vL,t=>(WJ(e,DW(t,ClipboardEvent)?t:null),!0),lL),e.registerCommand(yL,t=>(async function(e,t){t.update(()=>{let e=W();K(e)&&!e.isCollapsed()&&zL(e)},{discrete:!0,tag:bL}),await WJ(t,DW(e,ClipboardEvent)?e:null),t.update(()=>{let e=W();K(e)?e.removeText():CI(e)&&e.getNodes().forEach(e=>e.remove())},{tag:bL})}(t,e),!0),lL),e.registerCommand(vR,t=>{let[,r,i]=EW(t);return n.peek()(r,i)&&e.dispatchCommand(NY,r)?!0:hz(t.target)&&DI(t.target)?!1:W()!==null&&(function(e,t){e.preventDefault(),t.update(()=>{let n=W(),r=DW(e,InputEvent)||DW(e,KeyboardEvent)?null:e.clipboardData;r!=null&&n!==null&&VJ(r,n,t)},{tag:yR})}(t,e),!0)},lL),e.registerCommand(fR,()=>{let e=W();return K(e)&&YY(e,`space`,`both`,t.peek()),!1},lL),e.registerCommand(pR,()=>{let e=W();return K(e)&&YY(e,`tab`,`both`,t.peek()),!1},lL),e.registerCommand(hR,e=>{let t=W();if(CI(t))return aX(t,!1,e);if(!K(t))return!1;let{anchor:n}=t;if(n.type!==`element`||n.offset!==0)return!1;let r=n.getNode();if(!G(r))return!1;let i=r.getFirstChild();if(!_I(i)||!i.isInline())return!1;let a=r.getKey(),o=r.selectEnd();return e.shiftKey&&o.anchor.set(a,0,`element`),e.preventDefault(),e.stopPropagation(),!0},lL),e.registerCommand(gR,e=>{let t=W();if(CI(t))return aX(t,!0,e);if(!K(t))return!1;let{anchor:n,focus:r}=t,i=NF(r.getNode(),e=>G(e)&&!e.isInline());if(i===null)return!1;let a=i.getFirstChild();if(!_I(a)||!a.isInline()||NF(n.getNode(),e=>G(e)&&!e.isInline())!==i)return!1;let o=i.getKey();return(r.type!==`element`||r.key!==o||r.offset!==0)&&(t.focus.set(o,0,`element`),e.shiftKey||t.anchor.set(o,0,`element`),e.preventDefault(),e.stopPropagation(),!0)},lL))}var cX=_Y,lX=cX.$createHeadingNode,uX=cX.$createQuoteNode,dX=cX.$isHeadingNode,fX=cX.$isQuoteNode;cX.DRAG_DROP_PASTE,cX.HeadingAnnounceExtension;var pX=cX.HeadingNode,mX=cX.QuoteNode;cX.RichTextExtension,cX.RichTextImportExtension,cX.RichTextImportRules,cX.ShadowRootQuoteRule,cX.defaultShouldHandlePasteAsFiles,cX.eventFiles,cX.quoteShadowRootState;var hX=cX.registerRichText;function gX(e,t){return Ml(_X,this,arguments)}function _X(e,t){iu(()=>kz(hX(e),NV(e)),[e],t)}var vX=kr(5),yX=Symbol(vX),bX=Symbol(vX+1),xX=Symbol(vX+2),SX=Symbol(vX+3),CX=Symbol(vX+4);function wX(e){return m_(e.ErrorBoundary,{onError:e.onError,children:m_(Wu,{fallback:null,children:e.decorator})})}function TX(e){return Ug(wX,e.element,e.bodyProps)}function EX(e){let t,n,r,i,a,o,s,c,l,u,d,f,p,m=e.editor,h=e.ErrorBoundary,[g,_]=(n=m,t=Nd(yX,`useMemo`),r=Pd(t,n),r===null?Ld(t,[e=>m.registerDecoratorListener(e),()=>m.getDecorators()],n):r.value),v=Su(g,_,_,bX),[y,b]=(a=m,i=Nd(xX,`useMemo`),o=Pd(i,a),o===null?Ld(i,[m.registerRootListener.bind(m),m.getRootElement.bind(m)],a):o.value),x=Su(y,b,b,SX);if(l=v,u=m,d=x,c=Nd(CX,`useMemo`),p=Id(c,l,u,d),p===null){__hkl:{let e=[],t=Object.keys(v);for(let n=0;n<t.length;n++){let r=t[n],i=m.getElementByKey(r);i!==null&&e.push({nodeKey:r,element:i,decorator:v[r]})}f=e;break __hkl}s=Ld(c,f,l,u,d)}else s=p.value;let S=s;return S.length===0?null:f_(mp,{},()=>R_([S.map(e=>h_(`c:b96296df`,TX,{key:e.nodeKey,element:e.element,bodyProps:{ErrorBoundary:h,onError:e=>m._onError(e),decorator:e.decorator}}))]))}var DX=qd(`<!><!><!>`,3,1),OX=kr(5),kX=Symbol(OX),AX=Symbol(OX+1),jX=Symbol(OX+2),MX=Symbol(OX+3),NX=Symbol(OX+4);function PX(e){let[t]=Nl(kX,$x),n=Nl(AX,mB,t),r=Nl(jX,FB);if(!n)return null;let i=e.content;return typeof i==`function`?i(r):i??null}var FX=Ad(function e(t,n,r){let i=n.block,[a]=Nl(MX,$x);Nl(NX,gX,a);let o=e.__warm;if(typeof o==`function`?hd(o,t):hd(()=>{kd(PX,{content:t.placeholder})},void 0),n.block.pending&&!n.block.crossRenderUpdate)return;let s=n.slots[0];if(s===void 0){let e,t,r,a,o=Qd(DX);e=i.parentNode;let c=bf(o);t=c;let l=xf(c,1);r=l,a=xf(l,1),$d(o,i.parentNode,i.endMarker),s=af(n,null,e,t,null,void 0,r,a)}{let e=t.contentEditable;s.c=Rv(n,1,s.a,e,s.c,s.d,s.b,!0),s.d=e}S_(n,2,s.a,PX,{content:t.placeholder},s.e,void 0,void 0,void 0,void 0,`c:c4d00643`),S_(n,3,s.a,EX,{editor:a,ErrorBoundary:t.ErrorBoundary},s.f,void 0,2,void 0,void 0,`c:92b1a51d`)},e=>{kd(PX,{content:e.placeholder})}),IX=kr(5);IX+1,IX+2,IX+3,IX+4;var LX=qd(`<!>`,0,1),RX={},zX=function(e,t,n){let r=t.block;function i(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r=Qd(LX);e=i.parentNode,t=bf(r),$d(r,i.parentNode,i.endMarker),a=nf(n,null,e,t,null,void 0)}{let t=e.children;a.c=Rv(n,1,a.a,t,a.c,a.d,a.b,!0,!0),a.d=t}}S_(t,0,r.parentNode,Gu,{fallback:(t,n)=>(e.onError&&e.onError(t instanceof Error?t:Error(String(t),{cause:t}),{componentStack:``}),e.fallback===void 0?u_(()=>m_(`div`,{style:{border:`1px solid #f00`,color:`#f00`,padding:`8px`}},`An error was thrown.`)):e.fallback),children:Pu(i,RX)},r.endMarker,void 0,void 0,void 0,void 0,`c:e58a7932`)},BX=t({HistoryExtension:()=>qX,SharedHistoryExtension:()=>YX,createEmptyHistoryState:()=>KX,registerHistory:()=>GX});function VX(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(K(a)&&K(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||TI(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&q(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!q(l)||!q(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function HX(e,t,n){let r=n(),i=0,a=r,o=0,s=null;return(c,l,u,d,f,p)=>{let m=n();if(p.has(mL)&&(a=r,o=i,s=c),p.has(ML))return i=0,r=m,2;p.has(fL)&&s&&(r=a,i=o,c=s);let h=p.has(yR)||p.has(bL)?0:VX(c,l,d,f,e.isComposing()),g=(()=>{let n=u===null||u.editor===e,a=p.has(PL);if(!a&&n&&p.has(NL))return 0;if(h===1)return 2;if(c===null)return 1;let o=l._selection;if(!(d.size>0||f.size>0))return o===null?2:0;let s=typeof t==`number`?t:t.peek();return!1===a&&h!==0&&h===i&&m<r+s&&n||d.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(K(a)&&K(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!q(r)||!q(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(d)[0],c,l)?0:1})();return r=m,i=h,g}}function UX(e,t){if(t!==null&&t.editor===e.editor)return t;let{editor:n}=e,r=n.getEditorState();return r.isEmpty()?null:{editor:n,editorState:r}}function WX(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function GX(e,t,n,r=Date.now,i,a=null){let o=HX(e,n,r),s=()=>{i&&i(t)};return s(),kz(e.registerCommand(PR,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();if(o){let t=UX(o,a);t!==null&&(r.push(t),e.dispatchCommand(QI,!0))}i.length===0&&e.dispatchCommand($I,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:ML})}}(e,t,i),!0),lL),e.registerCommand(xR,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current,o=r.pop();if(o){let t=UX(o,a);t!==null&&(i.push(t),e.dispatchCommand($I,!0))}r.length===0&&e.dispatchCommand(QI,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:ML})}}(e,t,i),!0),lL),e.registerCommand(nL,()=>(WX(t,i),!1),lL),e.registerCommand(rL,()=>(WX(t,i),e.dispatchCommand(QI,!1),e.dispatchCommand($I,!1),!0),lL),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){d.length!==0&&(t.redoStack=[],e.dispatchCommand(QI,!1));let n=function(e,t,n){return n===null?null:n.editor===e?{...n}:t.isEmpty()?null:{editor:e,editorState:t}}(e,r,u);if(n!==null){f.push(n);let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand($I,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function KX(){return{current:null,redoStack:[],undoStack:[]}}var qX={build:(e,{delay:t,createInitialHistoryState:n,disabled:r,maxDepth:i,now:a},o)=>({..._V({delay:t,disabled:r,historyState:n(e),maxDepth:i,now:a}),...o.getInitResult()}),config:{createInitialHistoryState:KX,delay:300,disabled:typeof window>`u`,maxDepth:null,now:()=>Date.now()},init:()=>({canRedo:pV(!1),canUndo:pV(!1)}),name:`@lexical/history/History`,register:(e,t,n)=>{let{canUndo:r,canRedo:i}=n.getInitResult(),a=n.getOutput(),o=e=>uV(()=>{r.value=e!=null&&e.undoStack.length>0,i.value=e!=null&&e.redoStack.length>0});return fV(()=>{if(!a.disabled.value)return GX(e,a.historyState.value,a.delay,()=>a.now.peek()(),o,a.maxDepth);o(null)})}};function JX(e){let t=e?wH(e,`@lexical/extension/HMR`):void 0;return t?t.output.restoreCount.value:0}var YX={build:(e,{disabled:t,parentEditor:n})=>_V({disabled:t,parentEditor:n||e._parentEditor}),config:{disabled:!1,parentEditor:null},dependencies:[[qX,{disabled:!0}]],name:`@lexical/history/SharedHistory`,register:(e,t,n)=>fV(()=>{let{disabled:t,parentEditor:r}=n.getOutput();if(!t.value){let{output:t}=n.getDependency(qX);JX(e),JX(r.value);let i=function(e){return e?wH(e,qX.name):null}(r.value);if(!i)return;let a=i.output;uV(()=>{t.delay.value=a.delay.value,t.historyState.value=a.historyState.value,t.now.value=a.now.value,t.maxDepth.value=a.maxDepth.value,t.disabled.value=a.disabled.value})}})},XX=BX;XX.HistoryExtension,XX.SharedHistoryExtension;var ZX=XX.createEmptyHistoryState,QX=XX.registerHistory,$X=kr(3),eZ=Symbol($X),tZ=Symbol($X+1),nZ=Symbol($X+2);function rZ(e){let t,n,r,[i]=Nl(eZ,$x),a=e.externalHistoryState,o=e.delay===void 0?1e3:e.delay,s=(n=a,t=Nd(tZ,`useMemo`),r=Pd(t,n),r===null?Ld(t,a||ZX(),n):r.value);return ru(()=>QX(i,s,o),[o,i,s],nZ),null}var iZ=kr(2),aZ=Symbol(iZ),oZ=Symbol(iZ+1);function sZ(e){let[t]=Nl(aZ,$x),n=e.ignoreHistoryMergeTagChange===void 0||e.ignoreHistoryMergeTagChange,r=e.ignoreSelectionChange!==void 0&&e.ignoreSelectionChange,i=e.onChange;return iu(()=>{if(i)return t.registerUpdateListener(({editorState:e,dirtyElements:a,dirtyLeaves:o,prevEditorState:s,tags:c})=>{r&&a.size===0&&o.size===0||n&&c.has(NL)||s.isEmpty()||i(e,t,c)})},[t,n,r,i],oZ),null}var cZ=kr(2),lZ=Symbol(cZ),uZ=Symbol(cZ+1);function dZ(e){let[t]=Nl(lZ,$x),n=e.defaultSelection;return ru(()=>{t.focus(()=>{let e=t.getRootElement(),n=e===null?null:ZR(e);e!==null&&(n===null||!e.contains(n))&&e.focus({preventScroll:!0})},{defaultSelection:n})},[n,t],uZ),null}var fZ=t({AutoFocusExtension:()=>pZ}),pZ={build:(e,t,n)=>_V(t),config:{defaultSelection:`rootEnd`,disabled:!1},name:`@lexical/extension/AutoFocus`,register(e,t,n){let r=n.getOutput();return fV(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=t===null?null:ZR(t);t===null||e!==null&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}},mZ=fZ.AutoFocusExtension,hZ=t({ClearEditorExtension:()=>vZ,registerClearEditor:()=>_Z});function gZ(){let e=nI(),t=W(),n=EF();e.clear(),e.append(n),t!==null&&n.select(),K(t)&&(t.format=0)}function _Z(e,t=gZ){return e.registerCommand(nL,()=>(t(),!0),lL)}var vZ={build:(e,t,n)=>_V(t),config:{$onClear:gZ},name:`@lexical/extension/ClearEditor`,register(e,t,n){let{$onClear:r}=n.getOutput();return fV(()=>_Z(e,r.value))}},yZ=hZ,bZ=yZ.ClearEditorExtension,xZ=yZ.registerClearEditor,SZ=t({$defaultShouldInsertAfter:()=>CZ,ClickAfterLastBlockExtension:()=>TZ});function CZ(e){return!!_I(e)||!(!G(e)||!e.isShadowRoot())}function wZ(e,t,n,r){return!!e.isEditable()&&n.target===t&&e.read(`latest`,()=>{let t=nI().getLastChild();if(t===null)return!1;let i=e.getElementByKey(t.getKey());return i!==null&&!(n.clientY<=i.getBoundingClientRect().bottom)&&r(t)})}var TZ={build:(e,t)=>_V(t),config:{$shouldInsertAfter:CZ,disabled:!1},name:`@lexical/ClickAfterLastBlock`,register:(e,t,n)=>fV(()=>{let t=n.getOutput();if(!t.disabled.value)return e.registerRootListener(n=>{if(n!==null)return Iz(n,{click:r=>{wZ(e,n,r,t.$shouldInsertAfter.peek())&&(r.preventDefault(),Wz(r),e.update(()=>{let e=nI().getLastChild();if(e===null||!t.$shouldInsertAfter.peek()(e))return;let n=EF();e.insertAfter(n),n.select()}))},mousedown:r=>{wZ(e,n,r,t.$shouldInsertAfter.peek())&&r.preventDefault()}},!0)})})},EZ=SZ,DZ=EZ.$defaultShouldInsertAfter,OZ=EZ.ClickAfterLastBlockExtension,kZ=t({$applyFormatToDom:()=>FZ,$isDecoratorTextNode:()=>MZ,DecoratorTextExtension:()=>RZ,DecoratorTextNode:()=>jZ,applyFormatFromStyle:()=>NZ,applyFormatToDom:()=>PZ}),AZ=GR(`format`,{parse:Nz()}),jZ=class extends OL{get __isInlineFormattable(){return!0}$config(){return this.config(`decorator-text`,{extends:OL,stateConfigs:[{flat:!0,stateConfig:AZ}]})}getFormat(e){return lI(this,AZ,e)}getFormatFlags(e,t){return Kz(this.getFormat(),e,t)}hasFormat(e){let t=jR[e];return(this.getFormat()&t)!==0}setFormat(e){return KI(this,AZ,e)}toggleFormat(e){let t=Kz(this.getFormat(),e,null);return this.setFormat(t)}isInline(){return!0}createDOM(e,t){return YF().createElement(`span`)}};function MZ(e){return e instanceof jZ}function NZ(e,t,n){let r=t.fontWeight,i=t.textDecoration.split(` `),a=r===`700`||r===`bold`,o=i.includes(`line-through`),s=t.fontStyle===`italic`,c=i.includes(`underline`),l=t.verticalAlign;return a&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),o&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),s&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),c&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),l!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),l!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),n&&!e.hasFormat(n)&&e.toggleFormat(n),e}function PZ(e,t,n=LZ){let r=t;for(let[t,i]of Object.entries(n))e.hasFormat(i)&&(r=IZ(r,t));return r}var FZ=PZ;function IZ(e,t){let n=e.ownerDocument.createElement(t);return n.appendChild(e),n}var LZ={b:`bold`,code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`},RZ={name:`@lexical/extension/DecoratorText`,nodes:()=>[jZ]},zZ=kZ,BZ=zZ.$applyFormatToDom,VZ=zZ.$isDecoratorTextNode,HZ=zZ.DecoratorTextExtension,UZ=zZ.DecoratorTextNode,WZ=zZ.applyFormatFromStyle,GZ=zZ.applyFormatToDom,KZ=t({WatchEditableExtension:()=>qZ}),qZ={build:e=>bV(()=>e.isEditable(),t=>e.registerEditableListener(e=>{t.value=e})),name:`@lexical/extension/WatchEditable`},JZ=KZ.WatchEditableExtension,YZ=t({HMRExtension:()=>uQ}),XZ={root:{children:[],direction:null,format:``,indent:0,type:`root`,version:1}};function ZZ(e){let t=e.exportJSON();delete t.children,delete t.$slots;let n={json:t,key:e.__key,next:e.__next,parent:e.__parent,prev:e.__prev};G(e)&&(n.first=e.__first,n.last=e.__last,n.size=e.__size);let{__slotHost:r,__slots:i}=e;return i!=null&&(n.slots=Array.from(i)),r!=null&&(n.slotHost=r),n}function QZ(e){let t=new Map,n=[];return{nodes:n,states:e.map(e=>e.read(()=>{let r=[];for(let i of e._nodeMap.values()){let e=t.get(i);e===void 0&&(e=n.length,t.set(i,e),n.push(ZZ(i))),r.push(e)}return{nodes:r,selection:(i=e._selection,K(i)?{anchor:{key:i.anchor.key,offset:i.anchor.offset,type:i.anchor.type},focus:{key:i.focus.key,offset:i.focus.offset,type:i.focus.type},format:i.format,style:i.style,type:`range`}:CI(i)?{keys:Array.from(i._nodes),type:`node`}:null)};var i}))}}function $Z(e){return typeof e==`object`&&!!e}function eQ(e){return e==null||typeof e==`string`}function tQ(e){if(!$Z(e))return!1;let{first:t,json:n,key:r,last:i,next:a,parent:o,prev:s,size:c,slotHost:l,slots:u}=e;return $Z(n)&&typeof n.type==`string`&&typeof r==`string`&&eQ(o)&&eQ(s)&&eQ(a)&&eQ(t)&&eQ(i)&&(c===void 0||typeof c==`number`)&&eQ(l)&&(u===void 0||Array.isArray(u)&&u.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`&&typeof e[1]==`string`))}function nQ(e){return $Z(e)&&typeof e.key==`string`&&typeof e.offset==`number`&&(e.type===`text`||e.type===`element`)}function rQ(e){if(!$Z(e))return!1;let{nodes:t,states:n}=e;return Array.isArray(t)&&Array.isArray(n)&&t.every(tQ)&&n.every(e=>$Z(e)&&Array.isArray(e.nodes)&&e.nodes.every(e=>typeof e==`number`&&e>=0&&e<t.length)&&function(e){return e==null||!!$Z(e)&&(e.type===`node`?Array.isArray(e.keys)&&e.keys.every(e=>typeof e==`string`):e.type===`range`&&nQ(e.anchor)&&nQ(e.focus)&&typeof e.format==`number`&&typeof e.style==`string`)}(e.selection))}function iQ(e,t){if(e.type!==`root`)return LI(e);let n;if(t.parseEditorState({root:e},()=>{n=nI()}),n===void 0)throw Error(`editorStateFamily: the root version did not parse`);return n}function aQ(e,t){let n=[],r=new Map,i=!1,a=!1,o=t.parseEditorState(XZ,()=>{for(let i of e.nodes){let e=null;try{e=iQ(i.json,t)}catch{n.push(null);continue}let a=r.get(i.key);a===void 0?r.set(i.key,e.__key):e.__key=a,n.push(e)}let o=e=>e===null?null:r.get(e)??null;for(let[t,r]of e.nodes.entries()){let e=n[t];if(e===null)continue;e.__parent=o(r.parent),e.__prev=o(r.prev),e.__next=o(r.next),G(e)&&(e.__first=o(r.first??null),e.__last=o(r.last??null),e.__size=r.size??0);let a=e;r.slots!==void 0&&(i=!0,a.__slots=new Map(r.slots.flatMap(([e,t])=>{let n=o(t);return n===null?[]:[[e,n]]}))),r.slotHost!==void 0&&(a.__slotHost=o(r.slotHost))}a=!0});return a?e.states.map(e=>{let t=new Map;for(let r of e.nodes){let e=n[r];if(e==null)return null;t.set(e.__key,e)}if(!t.has(`root`))return null;let a=o.clone(function(e,t){if(e==null)return null;if(e.type===`node`){let n=TF();for(let r of e.keys){let e=t.get(r);if(e===void 0)return null;n._nodes.add(e)}return n}let n=t.get(e.anchor.key),r=t.get(e.focus.key);if(n===void 0||r===void 0)return null;let i=OF();return i.anchor.key=n,i.anchor.offset=e.anchor.offset,i.anchor.type=e.anchor.type,i.focus.key=r,i.focus.offset=e.focus.offset,i.focus.type=e.focus.type,i.format=e.format,i.style=e.style,i}(e.selection,r));return a._nodeMap=t,a._slotsUsed=i,a._parsed=!1,a}):e.states.map(()=>null)}function oQ(e,t){return function(e,t){let n=`lexicalHMR:${encodeURIComponent(t)}`;return e===void 0?n:`${n}:${encodeURIComponent(e)}`}(t===``?void 0:t,sQ(e)?e._config.namespace:``)}function sQ(e){let t=vH.maybeFromEditor(e);if(!t)return!1;for(let n of t.extensionNameMap.values()){let{namespace:t}=n.extension;if(t&&t===e._config.namespace)return!0}return e._parentEditor!==null&&sQ(e._parentEditor)}function cQ(e,t){return e.data[t]}function lQ(e){if(typeof e!=`object`||!e)return!1;let t=e,n=e=>Object.prototype.hasOwnProperty.call(t,e);return n(`editable`)&&n(`editorState`)&&typeof t.editable==`boolean`&&function(e){return typeof e==`object`&&!!e&&typeof e.toJSON==`function`&&typeof e.isEmpty==`function`}(t.editorState)}var uQ={afterRegistration(e,{hot:t,id:n},r){if(!t)return()=>{};let i=oQ(e,n),a=wH(e,`@lexical/history/History`),o=!1,s=cQ(t,i);if(lQ(s))try{e.setEditable(s.editable);let t=typeof s.serialize==`function`?s.serialize():null;if(function(e){if(typeof e!=`object`||!e)return!1;let{family:t,history:n}=e;if(!rQ(t))return!1;if(n==null)return!0;let r=e=>typeof e==`number`&&e>=0&&e<t.states.length,{current:i,redoStack:a,undoStack:o}=n;return(i===null||r(i))&&Array.isArray(a)&&a.every(r)&&Array.isArray(o)&&o.every(r)}(t)){let n=aQ(t.family,e),r=n[0];r==null||r.isEmpty()||(r._parsed=!0,e.setEditorState(r,{tag:NL}),t.history!=null&&a&&(a.output.historyState.value=function(e,t,n){let r=e=>{let r=t[e];return r==null||r.isEmpty()?null:{editor:n,editorState:r}},i=e=>e.map(r).filter(e=>e!==null),a=e.current===null?null:r(e.current),o=i(e.undoStack);return{current:a,redoStack:i(e.redoStack),undoStack:o}}(t.history,n,e)),o=!0)}}catch{}o&&r.getInitResult().restoreCount.value++;let c=r.getDependency(jW).output,l=r.getDependency(JZ).output,u=r.getDependency(JJ).output,d=null;return fV(()=>{let n=c.value,r=l.value,o=u.value!==null,s=cQ(t,i);if(d!==null&&d.editorState===n&&d.editable===r)return void(lQ(s)&&s.owner===e&&(s.mounted=o));d={editable:r,editorState:n};let f={...(n.isEmpty()&&lQ(s)?s:null)??{editorState:n,serialize:()=>function(e,t,n){let r=[t],i=t=>t.editor===e,a=e=>r.push(e.editorState)-1,o=e=>e.filter(i).map(a),s=n?{current:n.current&&i(n.current)?a(n.current):null,redoStack:o(n.redoStack),undoStack:o(n.undoStack)}:null;return{family:QZ(r),history:s}}(e,n,a?a.output.historyState.peek():null)},editable:r,mounted:o,owner:e};t.data[i]=f})},build:(e,t,n)=>n.getInitResult(),config:{hot:null},dependencies:[jW,JJ,JZ],init:()=>({restoreCount:pV(0)}),name:`@lexical/extension/HMR`},dQ=YZ.HMRExtension,fQ=t({IMEExtension:()=>pQ}),pQ={build:e=>({composingTextNode:pV(null),compositionKey:pV(null)}),name:`@lexical/extension/IME`,register(e,t,n){let{compositionKey:r,composingTextNode:i}=n.getOutput();return kz(e.registerCommand(pL,()=>{let e=W();return K(e)&&(r.value=e.anchor.key),!1},sL),fV(()=>{let t=r.value;i.value=t===null?null:e.read(`latest`,()=>{let e=$F(t);return q(e)?e:null})}),e.registerUpdateListener(({tags:e,editorState:t})=>{e.has(mL)&&t.read(()=>{let e=W();if(!K(e))return;let t=e.anchor.getNode();q(t)&&(i.value=t)})}),e.registerRootListener(e=>e===null?void(r.value=null):Fz(e,`compositionend`,()=>{r.value=null})))}},mQ=fQ.IMEExtension,hQ=t({KeyboardShortcutsExtension:()=>CQ,formatKeyboardShortcut:()=>xQ}),gQ=[[`ctrlKey`,`Ctrl`],[`altKey`,`Alt`],[`shiftKey`,`Shift`],[`metaKey`,`Meta`]],_Q={\" \":`Space`};function vQ(e,t){return{...e,...t}}var yQ=vQ(_Q,{Alt:`⌥`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,ArrowUp:`↑`,Backspace:`⌫`,CapsLock:`⇪`,Ctrl:`⌃`,Delete:`⌦`,End:`↘`,Enter:`↩`,Escape:`⎋`,Home:`↖`,Meta:`⌘`,PageDown:`⇟`,PageUp:`⇞`,Shift:`⇧`,Tab:`⇥`}),bQ=vQ(yQ,{Tab:`⇤`});function xQ(e,t={}){let{isApple:n=UL}=t,{unshiftedKey:r,key:i}=e,a=Dz(e.modifiers||{},n),o=[],s=n?!0===a.shiftKey?bQ:yQ:_Q;for(let[e,t]of gQ)if(!0===a[e]){if(n&&e===`shiftKey`&&r&&i.length===1)continue;o.push(s[t]||t)}return o.push(s[i]||!n&&!0===a.shiftKey&&r||i.length===1&&i.toUpperCase()||i),o}function SQ(e){return t=e,Array.isArray(t)?e:e?[e]:[];var t}var CQ={build:(e,t,n)=>_V(t),config:{disabled:!1,priority:dL,shortcuts:{}},mergeConfig(e,t){let n=Uz(e,t);return n.shortcuts=function(e,t){if(!t)return e;let n={...t};for(let[t,r]of Object.entries(e))n[t]===void 0&&(n[t]=r);return n}(e.shortcuts,t.shortcuts),n},name:`@lexical/extension/KeyboardShortcuts`,register(e,t,n){let{disabled:r,priority:i,shortcuts:a}=n.getOutput();return fV(()=>{if(!r.value){let t=[];for(let e of Object.values(a.value))for(let n of SQ(e))t.push(n);return function(e,t,n){let r=BR(t);return e.registerCommand(lR,(t,n)=>{let i;for(let a of r.matches(t)){if(e!==n&&!a.bubbleFromNestedEditors||a.$disabled&&(i===void 0&&(i=W()),a.$disabled(i,n)))continue;let r=n.dispatchCommand.bind(n,a.command,t);if(a.$dispatch?a.$dispatch(a.command,t,r,n):r())return!0}return!1},n)}(e,t,i.value)}})}},wQ=hQ,TQ=wQ.KeyboardShortcutsExtension,EQ=wQ.formatKeyboardShortcut,DQ=t({NestedEditorExtension:()=>OQ}),OQ={build:(e,t)=>_V({inheritEditableFromParent:t.inheritEditableFromParent}),config:{$getParentEditor:function(){let e=XF();return vH.fromEditor(e),e},inheritEditableFromParent:!1},init:(e,t,n)=>{let r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},name:`@lexical/extension/NestedEditor`,register:(e,t,n)=>fV(()=>{let t=e._parentEditor;if(t&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(t.isEditable()),t.registerEditableListener(e.setEditable.bind(e))})},kQ=DQ.NestedEditorExtension,AQ=t({NodeSelectionDataSelectedExtension:()=>MQ});function jQ(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var MQ={config:{attribute:`data-selected`,nodes:[]},init(e,t){let n=new Set,r=sz(RV(e).nodes);for(let e of t.nodes){let t=e.getType(),i=r.get(t);i===void 0&&jQ(339,e.name,t),n.add(t);for(let e of i)n.add(e)}return{matchTypes:n}},mergeConfig:(e,t)=>Uz(e,{...t,...t.nodes&&{nodes:[...e.nodes,...t.nodes]}}),name:`@lexical/extension/NodeSelectionDataSelected`,register(e,t,n){let{attribute:r}=t,{matchTypes:i}=n.getInitResult(),a=new Map,o=t=>{let n=new Set;t.read(()=>{let e=W();if(CI(e))for(let t of e.getNodes())i.has(t.getType())&&n.add(t.getKey())});for(let[e,t]of a)n.has(e)||(t.removeAttribute(r),a.delete(e));for(let t of n){let n=e.getElementByKey(t);n!==null&&(n.setAttribute(r,`true`),a.set(t,n))}};o(e.getEditorState());let s=e.registerUpdateListener(({editorState:e})=>o(e));return()=>{s();for(let e of a.values())e.removeAttribute(r);a.clear()}}},NQ=AQ.NodeSelectionDataSelectedExtension,PQ=t({PreventSelectAllExtension:()=>IQ});function FQ(e){let t=e.target;yz(e,`a`,_L)&&J(t)&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)&&t.addEventListener(`keydown`,Wz,{once:!0})}var IQ={build:(e,t,n)=>_V(t),config:{disabled:!1},name:`@lexical/extension/PreventSelectAll`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return e.registerRootListener(e=>{if(e)return Fz(e,`keydown`,FQ,!0)})})}},LQ=PQ.PreventSelectAllExtension,RQ=t({SelectBlockExtension:()=>zQ}),zQ={build:(e,t,n)=>_V(t),config:{cascadeSelection:!1,disabled:!1},dependencies:[LQ],name:`@lexical/extension/SelectBlock`,register:(e,t,n)=>{let r=n.getOutput(),i=n.getDependency(LQ).output;return kz(fV(()=>{i.disabled.value=r.disabled.value}),fV(()=>{if(!r.disabled.value)return e.registerCommand(ER,(t,n)=>{if(n!==e)return r.cascadeSelection.peek()?!!n.read(`pending`,()=>{let e=W();return K(e)&&hI(nI(),e)})&&(BI(),!0):!1;let i=W();if(CI(i)){let e=i.getNodes(),t=e[0];if(!t)return!1;let n=t.getTopLevelElement();return!n||TI(n)||n.is(t)||e.length>1&&(a=n,!e.every(e=>a.is(e.getTopLevelElement())))?BI():G(n)&&n.select(0,n.getChildrenSize()),!0}var a;if(!K(i))return!1;let o=i.anchor.getNode(),s=o.getTopLevelElement();if(s&&s.is(i.focus.getNode().getTopLevelElement())&&!hI(s,i))return s.select(0,s.getChildrenSize()),!0;let c=oI(o);for(;c!==null;){if(G(c)&&!hI(c,i))return c.select(0,c.getChildrenSize()),!0;let e=sI(c);c=e===null?null:oI(e)}return hI(nI(),i)||BI(),!0},uL)}))}},BQ=RQ.SelectBlockExtension,VQ=t({SelectionAlwaysOnDisplayExtension:()=>HQ}),HQ={build:(e,t,n)=>_V(t),config:{disabled:!1,onReposition:void 0},name:`@lexical/utils/SelectionAlwaysOnDisplay`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return OW(e,r.onReposition.value)})}},UQ=VQ.SelectionAlwaysOnDisplayExtension,WQ=t({TabIndentationExtension:()=>qQ,registerTabIndentation:()=>KQ});function GQ(e){return e.canIndent()}function KQ(e,t,n=GQ){return kz(e.registerCommand(pR,t=>{let n=W();if(!K(n))return!1;t.preventDefault();let r=function(e){if(e.getNodes().filter(e=>mI(e)&&e.canIndent()).length>0)return!0;let t=e.anchor,n=e.focus,r=n.isBefore(t)?n:t,i=yW(r.getNode());if(i.canIndent()){let e=i.getKey(),t=OF();if(t.anchor.set(e,0,`element`),t.focus.set(e,0,`element`),t=II(t),t.anchor.is(r))return!0}return!1}(n)?t.shiftKey?_R:FL:RL;return e.dispatchCommand(r)},lL),e.registerCommand(FL,()=>{let e=typeof t==`number`?t:t?t.peek():null;if(!K(W()))return!1;let r=typeof n==`function`?n:n.peek();return xW(t=>{if(r(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},cL))}var qQ={build:(e,t,n)=>_V(t),config:{$canIndent:GQ,disabled:!1,maxIndent:null},name:`@lexical/extension/TabIndentation`,register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:a}=n.getOutput();return fV(()=>{if(!r.value)return KQ(e,i,a)})}},JQ=WQ,YQ=JQ.TabIndentationExtension,XQ=JQ.registerTabIndentation,Z=t({$applyFormatToDom:()=>BZ,$createHorizontalRuleNode:()=>WW,$defaultShouldInsertAfter:()=>DZ,$getExtensionDependency:()=>rG,$getExtensionOutput:()=>iG,$getPeerDependency:()=>aG,$isDecoratorTextNode:()=>VZ,$isHorizontalRuleNode:()=>GW,AutoFocusExtension:()=>mZ,CONTROL_OR_ALT:()=>gL,CONTROL_OR_META:()=>_L,ClearEditorExtension:()=>bZ,ClickAfterLastBlockExtension:()=>OZ,DecoratorTextExtension:()=>HZ,DecoratorTextNode:()=>UZ,EditorStateExtension:()=>jW,HMRExtension:()=>dQ,HorizontalRuleExtension:()=>KW,HorizontalRuleNode:()=>qW,IMEExtension:()=>mQ,INSERT_HORIZONTAL_RULE_COMMAND:()=>JW,InitialStateExtension:()=>WV,KeyboardShortcutsExtension:()=>TQ,LexicalBuilder:()=>vH,NestedEditorExtension:()=>kQ,NodeSelectionDataSelectedExtension:()=>NQ,NodeSelectionExtension:()=>FW,NormalizeInlineElementsExtension:()=>fY,NormalizeTripleClickSelectionExtension:()=>gY,PreventSelectAllExtension:()=>LQ,RootElementExtension:()=>JJ,SelectBlockExtension:()=>BQ,SelectionAlwaysOnDisplayExtension:()=>UQ,TabIndentationExtension:()=>YQ,WatchEditableExtension:()=>JZ,applyFormatFromStyle:()=>WZ,applyFormatToDom:()=>GZ,batch:()=>uV,buildEditorFromExtensions:()=>yH,compileKeyboardShortcuts:()=>BR,computed:()=>dV,configExtension:()=>VR,declarePeerDependency:()=>KR,defineExtension:()=>qR,effect:()=>fV,formatKeyboardShortcut:()=>EQ,getExtensionDependencyFromEditor:()=>ZW,getKnownTypesAndNodes:()=>RV,getPeerDependencyFromEditor:()=>wH,getPeerDependencyFromEditorOrThrow:()=>TH,namedSignals:()=>_V,registerClearEditor:()=>xZ,registerTabIndentation:()=>XQ,safeCast:()=>Rz,shallowMergeConfig:()=>Uz,signal:()=>pV,untracked:()=>mV,watchedSignal:()=>bV});Z.$applyFormatToDom;var ZQ=Z.$createHorizontalRuleNode;Z.$defaultShouldInsertAfter,Z.$getExtensionDependency,Z.$getExtensionOutput,Z.$getPeerDependency,Z.$isDecoratorTextNode;var QQ=Z.$isHorizontalRuleNode;Z.AutoFocusExtension,Z.CONTROL_OR_ALT,Z.CONTROL_OR_META,Z.ClearEditorExtension,Z.ClickAfterLastBlockExtension,Z.DecoratorTextExtension,Z.DecoratorTextNode,Z.EditorStateExtension,Z.HMRExtension,Z.HorizontalRuleExtension;var $Q=Z.HorizontalRuleNode;Z.IMEExtension;var e$=Z.INSERT_HORIZONTAL_RULE_COMMAND;Z.InitialStateExtension,Z.KeyboardShortcutsExtension,Z.LexicalBuilder,Z.NestedEditorExtension,Z.NodeSelectionDataSelectedExtension,Z.NodeSelectionExtension,Z.NormalizeInlineElementsExtension,Z.NormalizeTripleClickSelectionExtension,Z.PreventSelectAllExtension,Z.RootElementExtension,Z.SelectBlockExtension,Z.SelectionAlwaysOnDisplayExtension,Z.TabIndentationExtension,Z.WatchEditableExtension,Z.applyFormatFromStyle,Z.applyFormatToDom,Z.batch,Z.buildEditorFromExtensions,Z.compileKeyboardShortcuts,Z.computed,Z.configExtension,Z.declarePeerDependency,Z.defineExtension,Z.effect,Z.formatKeyboardShortcut,Z.getExtensionDependencyFromEditor,Z.getKnownTypesAndNodes,Z.getPeerDependencyFromEditor,Z.getPeerDependencyFromEditorOrThrow;var t$=Z.namedSignals;Z.registerClearEditor,Z.registerTabIndentation,Z.safeCast,Z.shallowMergeConfig,Z.signal,Z.untracked,Z.watchedSignal,kr(2)+1;var n$=t({$createListItemNode:()=>j$,$createListNode:()=>L$,$getListDepth:()=>i$,$handleListInsertParagraph:()=>y$,$insertList:()=>d$,$isListItemNode:()=>Q,$isListNode:()=>$,$removeList:()=>h$,CheckListExtension:()=>c1,INSERT_CHECK_LIST_COMMAND:()=>z$,INSERT_ORDERED_LIST_COMMAND:()=>r1,INSERT_UNORDERED_LIST_COMMAND:()=>n1,ListExtension:()=>s1,ListImportExtension:()=>l1,ListImportRules:()=>e1,ListItemNode:()=>D$,ListNode:()=>P$,ListSchema:()=>$$,REMOVE_LIST_COMMAND:()=>i1,UPDATE_LIST_START_COMMAND:()=>t1,WordListImportExtension:()=>w1,registerCheckList:()=>B$,registerList:()=>a1,registerListStrictIndentTransform:()=>o1});function r$(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function i$(e){let t=1,n=e.getParent();for(;n!=null;){if(Q(n)){let e=n.getParent();if($(e)){t++,n=e.getParent();continue}r$(40)}return t}return t}function a$(e){let t=e.getParent();$(t)||r$(40);let n=t,r=t;for(;r!==null;)r=r.getParent(),$(r)&&(n=r);return n}function o$(e){let t=[],n=e.getChildren().filter(Q);for(let e=0;e<n.length;e++){let r=n[e],i=r.getFirstChild();$(i)?t=t.concat(o$(i)):t.push(r)}return t}function s$(e){return Q(e)&&$(e.getFirstChild())}function c$(e,t){return t.getValue()}function l$(e,t){return Q(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function u$(e,t){return $(e)?SF(e).setListType(t):L$(t)}function d$(e){let t=W();if(t!==null){let n=t.getNodes();if(K(t)){let[r]=t.getStartEndPoints(),i=r.getNode(),a=i.getParent();if(EI(i)){let e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=EF();i.append(e),n=e.select().getNodes()}}else if(l$(i,n)){if(EI(a)){let t=L$(e);i.replace(t);let n=j$();G(i)&&(n.setFormat(i.getFormatType()),n.setIndent(i.getIndent())),t.append(n)}else if(Q(i)){let t=i.getParentOrThrow();if(sI(t)===null){let n=u$(t,e);f$(n,t.getChildren()),t.replace(n)}}return}}let r=new Set;for(let t=0;t<n.length;t++){let i=n[t];if(G(i)&&i.isEmpty()&&!Q(i)&&sI(i)===null&&!r.has(i.getKey())){p$(i,e);continue}let a=bI(i)?i.getParent():Q(i)&&i.isEmpty()?i:null;for(;a!=null;){let t=a.getKey();if($(a)){if(!r.has(t)&&sI(a)===null){let n=u$(a,e);f$(n,a.getChildren()),a.replace(n),r.add(t)}break}{let n=a.getParent();if(EI(n)&&!r.has(t)){r.add(t),p$(a,e);break}a=n}}}}}function f$(e,t){e.splice(e.getChildrenSize(),0,t)}function p$(e,t){if($(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=j$(),a;if(f$(i,e.getChildren()),$(n)&&t===n.getListType())n.append(i),$(r)&&t===r.getListType()&&(f$(n,r.getChildren()),r.remove()),a=n;else if($(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{let n=L$(t);n.append(i),e.replace(n),a=n}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());let o=W();return K(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,`element`),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,`element`)),e.remove(),a}function m$(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&s$(n)&&s$(r)&&n.getFirstChild().getListType()===r.getFirstChild().getListType()&&(m$(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function h$(){let e=W();if(K(e)){let t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(l$(r,n))t.add(a$(r));else for(let e=0;e<n.length;e++){let r=n[e];if(bI(r)){let e=bW(r,D$);e!=null&&t.add(a$(e))}}for(let n of t){if(sI(n)!==null)continue;let t=n,r=o$(n);for(let n of r){let r=EF().setTextStyle(e.style).setTextFormat(e.format);r.setFormat(n.getFormatType()).setIndent(n.getIndent()).setDirection(n.getDirection()).setStyle(n.getStyle()),f$(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&UI(e.anchor,FI(UF(r,`next`))),n.__key===e.focus.key&&UI(e.focus,FI(UF(r,`next`))),n.remove()}n.remove()}}}function g$(e){let t=e.getListType()!==`check`,n=e.getStart();for(let r of e.getChildren())Q(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),$(r.getFirstChild())||n++)}function _$(e){let t=new Set;if(s$(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(s$(r)&&s$(i)){let n=i.getFirstChild();if($(n)){n.append(e);let i=r.getFirstChild();$(i)&&n.getListType()===i.getListType()&&(f$(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(s$(r)){let t=r.getFirstChild();if($(t)){let n=t.getFirstChild();n!==null&&n.insertBefore(e)}}else if(s$(i)){let t=i.getFirstChild();$(t)&&t.append(e)}else if($(n)){let t=SF(e),a=SF(n);t.append(a),a.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function v$(e){if(s$(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if($(n?n.getParent():void 0)&&Q(n)&&$(t)){let r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=SF(e),i=SF(t);r.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));let a=SF(e),o=SF(t);a.append(o),f$(o,e.getNextSiblings()),n.insertBefore(r),n.insertAfter(a),n.replace(e)}}}function y$(e=!1){let t=W();if(!K(t)||!t.isCollapsed())return!1;let n=t.anchor.getNode(),r=null;if(Q(n)&&n.getChildrenSize()===0)r=n;else if(q(n)){let e=n.getParent();Q(e)&&e.getChildren().every(e=>q(e)&&e.getTextContent().trim()===``)&&(r=e)}if(r===null)return!1;let i=a$(r),a=r.getParent();$(a)||r$(40);let o=a.getParent(),s;if(EI(o))s=EF(),i.insertAfter(s);else{if(!Q(o))return!1;s=SF(o),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=e?c$(0,r):1,n=SF(a).setStart(t);if(Q(s)){let e=SF(s);e.append(n),s.insertAfter(e)}else s.insertAfter(n);n.append(...c)}return function(e){let t=e;for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!Q(e)&&!$(e))break;t=e}t.remove()}(r),!0}var b$=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function x$(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!b$.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function S$(e,t){e.__listType=t.__listType,e.__start=t.__start,e.__tag=t.__tag}var C$=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`),i=IR(e,`listType`,0);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],listType:e.__listType,start:e.__start,tag:e.__tag,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__listType;o!==void 0&&o!==`number`&&(a.listType=o);let s=e.__start;s!==void 0&&s!==1&&(a.start=s);let c=e.__dir;c!=null&&(a.direction=c);let l=t[e.__format];l!==void 0&&l!==``&&(a.format=l);let u=e.__indent;return u!==void 0&&u!==0&&(a.indent=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let a=t.direction;e.__dir=a===null||a===`ltr`||a===`rtl`?a:null;let o=t.format;e.__format=typeof o==`string`&&o in n?n[o]:r,e.__indent=function(e,t,n,r){let i=x$(e,t);return i>=n&&i<=r&&Number.isInteger(i)?i:t}(t.indent,0,0,1/0),e.__textFormat=x$(t.textFormat,0);let s=t.textStyle;e.__textStyle=typeof s==`string`?s:``;let c=t.listType;return e.setListType(typeof c==`string`&&c in i?i[c]:c===`number`||c===`bullet`||c===`check`?c:`number`),e.__start=x$(t.start,1),e},afterCloneFrom:S$}};function w$(e,t){e.__checked=t.__checked,e.__value=t.__value}var T$=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],checked:e.getChecked(),indent:e.getIndent(),value:e.__value,direction:e.__dir,format:t[e.__format],textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.getChecked();o!==void 0&&(a.checked=o);let s=e.getIndent();s!==void 0&&s!==0&&(a.indent=s);let c=e.__value;c!==void 0&&c!==1&&(a.value=c);let l=e.__dir;l!=null&&(a.direction=l);let u=t[e.__format];return u!==void 0&&u!==``&&(a.format=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.setIndent(function(e,t,n,r){let i=x$(e,NaN);return Number.isFinite(i)&&Number.isInteger(i)?i<n?n:i>r?r:i:t}(t.indent,0,0,128)),e.__textFormat=x$(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.checked;return e.__checked=s===void 0?void 0:typeof s==`boolean`&&s,e.__value=x$(t.value,1),e},afterCloneFrom:w$}},E$=Az()({checked:Jz(Pz(RR()),{setter:{field:`__checked`}}),indent:Nz(0,{clamp:!0,integer:!0,max:128,min:0}),value:Yz(Nz(1),{field:`__value`})}),D$=class extends kL{__value;__checked;$config(){return this.config(`listitem`,{$transform:e=>{let t=e.getParent();if($(t))t.getListType()!==`check`&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){let n=e.createParentElementNode();$(n)||r$(340);let r=[e];for(let t of[`previous`,`next`]){r.reverse();for(let{origin:n}of iI(e,t)){if(!Q(n))break;r.push(n)}}e.insertBefore(n),n.splice(0,0,r),EI(t)||(fI(n,zI(iI(n,`next`)),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:kL,generated:T$,importDOM:zR({li:()=>({conversion:O$,priority:0})}),json:E$})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}createDOM(e){let t=YF().createElement(`li`);return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(e,t){let n=t.getParent();!$(n)||n.getListType()!==`check`||$(t.getFirstChild())?(e.removeAttribute(`role`),e.removeAttribute(`tabIndex`),e.removeAttribute(`aria-checked`)):(e.setAttribute(`role`,`checkbox`),e.setAttribute(`tabIndex`,`-1`),e.setAttribute(`aria-checked`,t.getChecked()?`true`:`false`))})(t,this),t.value=this.__value,function(e,t,n){let r=t.list;if(!r)return;let i=r.listitem,a=r.nested&&r.nested.listitem,o=n.getParent(),s=$(o)&&o.getListType()===`check`,c=n.getChecked(),l=n.getChildren().some(e=>$(e)),u=[];r.listitemChecked!==void 0&&u.push(r.listitemChecked),r.listitemUnchecked!==void 0&&u.push(r.listitemUnchecked),a!==void 0&&u.push(...jz(a)),u.length>0&&Lz(e,...u);let d=[];if(i!==void 0&&d.push(...jz(i)),s){let e=c?r.listitemChecked:r.listitemUnchecked;e!==void 0&&d.push(e)}a!==void 0&&l&&d.push(...jz(a)),d.length>0&&FR(e,...d)}(t,n.theme,this);let r=e?e.__style:``,i=this.__style;r!==i&&zz(t.style,i,r),function(e,t,n){let r=t.__textStyle,i=n?n.__textStyle:``;if(n!==null&&i===r)return;let a=uz(r);for(let t in a)e.style.setProperty(`--listitem-marker-${t}`,a[t]);if(i!==``)for(let t in uz(i))t in a||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){let r=t;return this.updateListItemDOM(e,r,n),!1}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),s$(this)?{after(e){if(J(e)){let t=e.previousElementSibling;if(J(t)&&t.nodeName===`LI`){for(;e.firstChild;)t.append(e.firstChild);e.remove()}}return e},element:t}:{element:t}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if(G(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(Q(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!$(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=SF(n),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}let r=this.__key,i=0;if(t&&(G(e)||r$(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&G(e)){let t=W();if(K(t))for(let n of t.getStartEndPoints())n.key===r&&n.type===`element`&&n.set(e.getKey(),i+n.offset,`element`)}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if($(n)||r$(39),Q(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){let i=SF(n),a=r[0];i.getListType()===`number`&&Q(a)&&i.setStart(c$(0,a)),r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&s$(t)&&s$(n)&&t.getFirstChild().getListType()===n.getFirstChild().getListType()&&(m$(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){let n=SF(this);return this.insertAfter(n,t),n}collapseAtStart(e){if(s$(this))return!1;let t=this.getParentOrThrow();if(Q(t.getParentOrThrow()))return v$(this),!0;let n=EF().append(...this.getChildren()),r=this.getNextSiblings();if(r.length>0){let e=SF(t);e.append(...r),t.insertAfter(e)}return t.insertAfter(n),this.remove(),t.getChildrenSize()===0&&t.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,n=this.getParent();return $(n)&&(t=n.getListType()),t===`check`?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;Q(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!=`number`&&r$(117),(e=Math.floor(e))>=0||r$(199);let t=e,n=this.getIndent();for(;n!==t;)n<t?(_$(this),n++):(v$(this),n--);return this}canInsertAfter(e){return Q(e)}canReplaceWith(e){return Q(e)}canMergeWith(e){return Q(e)||wI(e)}extractWithChild(e,t){if(!K(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return L$(`bullet`)}canMergeWhenEmpty(){return!0}};function O$(e){if(e.classList.contains(`task-list-item`)){for(let t of e.children)if(t.tagName===`INPUT`)return k$(t)}if(e.classList.contains(`joplin-checkbox`)){for(let t of e.children)if(t.classList.contains(`checkbox-wrapper`)&&t.children.length>0&&t.children[0].tagName===`INPUT`)return k$(t.children[0])}let t=e.getAttribute(`aria-checked`),n=j$(t===`true`||t!==`false`&&void 0);return HI(n,e),{after:A$.bind(null,n),node:VI(n,e)}}function k$(e){if(e.getAttribute(`type`)!==`checkbox`)return{node:null};let t=j$(e.hasAttribute(`checked`));return{after:A$.bind(null,t),node:t}}function A$(e,t){let n=t[0];return t.length===1&&wI(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function j$(e){return hF(new D$(void 0,e))}function Q(e){return e instanceof D$}var M$={ol:`number`,ul:`bullet`},N$=Az()({listType:Jz(LR(JR([`number`,`bullet`,`check`]),M$),{getter:{field:`__listType`}}),start:Yz(Nz(1),{field:`__start`}),tag:Jz(JR([`ul`,`ol`]),{getter:{field:`__tag`},setter:null})}),P$=class extends kL{__tag;__start;__listType;$config(){return this.config(`list`,{$transform:e=>{(function(e){let t=e.getNextSibling();$(t)&&e.getListType()===t.getListType()&&m$(e,t)})(e),g$(e)},extends:kL,generated:C$,importDOM:zR({ol:()=>({conversion:I$,priority:0}),ul:()=>({conversion:I$,priority:0})}),json:N$})}constructor(e=`number`,t=1,n){super(n);let r=M$[e]||e;this.__listType=r,this.__tag=r===`number`?`ol`:`ul`,this.__start=t}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e===`number`?`ol`:`ul`,t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=YF().createElement(n);return this.__start!==1&&r.setAttribute(`start`,String(this.__start)),r.__lexicalListType=this.__listType,F$(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(F$(t,n.theme,this),e.__start!==this.__start&&t.setAttribute(`start`,String(this.__start)),!1)}exportDOM(e){let t=this.createDOM(e._config,e);if(J(t)){this.__start!==1&&t.setAttribute(`start`,String(this.__start)),this.__listType===`check`&&t.setAttribute(`__lexicalListType`,`check`);let e=this.getDirection();e&&(t.dir=e)}return{element:t}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];if(!Q(t)){r===n&&(r=[...n]);let i=this.createListItemNode();!G(t)||$(t)||t.isInline()?i.append(t):i.append(...t.getChildren()),r[e]=i}}return super.splice(e,t,r)}extractWithChild(e){return Q(e)}createListItemNode(){return j$()}};function F$(e,t,n){let r=[],i=[],a=t.list;if(a!==void 0){let e=a[`${n.__tag}Depth`]||[],t=i$(n)-1,o=t%e.length,s=e[o],c=a[n.__tag],l,u=a.nested,d=a.checklist;if(u!==void 0&&u.list&&(l=u.list),c!==void 0&&r.push(c),d!==void 0&&n.__listType===`check`&&r.push(d),s!==void 0){r.push(...jz(s));for(let t=0;t<e.length;t++)t!==o&&i.push(...jz(e[t]))}if(l!==void 0){let e=jz(l);t>1?r.push(...e):i.push(...e)}}i.length>0&&Lz(e,...i),r.length>0&&FR(e,...r)}function I$(e){let t;if(function(e){return J(e)&&e.nodeName.toLowerCase()===`ol`}(e)){let n=e.start;t=L$(`number`,n)}else t=function(e){if(e.getAttribute(`__lexicallisttype`)===`check`||e.classList.contains(`contains-task-list`)||e.getAttribute(`data-is-checklist`)===`1`)return!0;for(let t of e.childNodes)if(J(t)&&t.hasAttribute(`aria-checked`))return!0;return!1}(e)?L$(`check`):L$(`bullet`);return VI(t,e),{after:e=>function(e,t){let n=t.createListItemNode.bind(t),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(Q(i)){r.push(i);let e=i.getChildren();e.length>1&&e.forEach(e=>{$(e)&&r.push(n().append(e))})}else r.push(n().append(i))}return r}(e,t),node:t}}function L$(e=`number`,t=1){return hF(new P$(e,t))}function $(e){return e instanceof P$}var R$=new Set([` `,`Alt`,`ArrowDown`,`ArrowLeft`,`ArrowUp`,`CapsLock`,`Control`,`Escape`,`Meta`,`Shift`]),z$=HR(`INSERT_CHECK_LIST_COMMAND`);function B$(e,t){let n=t&&t.disableTakeFocusOnClick||!1,r=typeof n==`boolean`?()=>n:n.peek.bind(n),i=e=>{let t=e.target;if(!J(t))return!1;let n=t.__lexicalCheckListLastHandled;return n!==void 0&&e.timeStamp-n<500},a=e=>{e.pointerType===`touch`&&(i(e)||((e=>{let t=e.target;J(t)&&(t.__lexicalCheckListLastHandled=e.timeStamp)})(e),H$(e,r())))},o=`none`,s=e=>{o=function(e,t){let n=!1;return V$(e,()=>{n=!0,e.preventDefault(),t&&e.stopPropagation()}),n}(e,r())?`checkMark`:`content`},c=()=>{o===`content`&&U$(e),o=`none`};return kz(e.registerCommand(z$,()=>(d$(`check`),!0),uL),e.registerCommand(rR,t=>K$(t,e,!1),uL),e.registerCommand(oR,t=>K$(t,e,!0),uL),e.registerCommand(dR,()=>G$(e)!=null&&(e.getRootElement()?.focus(),!0),uL),e.registerCommand(fR,t=>{let n=G$(e);return!(n==null||!e.isEditable())&&(e.update(()=>{let e=QF(n);Q(e)&&(t.preventDefault(),e.toggleChecked())}),!0)},uL),e.registerCommand(iR,t=>G$(e)===null?e.read(`latest`,()=>{let n=W();if(K(n)&&n.isCollapsed()){let{anchor:r}=n,i=r.type===`element`;if(i||r.offset===0){let n=r.getNode(),a=NF(n,e=>G(e)&&!e.isInline());if(Q(a)){let r=a.getParent();if($(r)&&r.getListType()===`check`&&(i||a.getFirstDescendant()===n)){let n=e.getElementByKey(a.__key);if(n!=null&&ZR(n)!==n)return n.focus(),t.preventDefault(),!0}}}}return!1}):(U$(e),!1),uL),e.registerRootListener(t=>{if(t!==null)return kz(Iz(t,{click:e=>{c(),(e=>{i(e)||H$(e,r())})(e)},pointerup:e=>{c(),a(e)}}),Iz(t,{beforeinput:()=>U$(e),focusin:()=>{JL&&o===`content`&&U$(e)},keydown:t=>{R$.has(t.key)||U$(e)},mousedown:s,pointerdown:s},{capture:!0}),Fz(t,`touchstart`,s,{capture:!0,passive:!1}))}))}function V$(e,t){let n=e.target;if(!J(n))return;let r=n.firstChild;if(J(r)&&(r.tagName===`UL`||r.tagName===`OL`))return;let i=n.parentNode;if(!i||i.__lexicalListType!==`check`)return;let a=null,o=null;if(`clientX`in e)a=e.clientX;else if(`touches`in e){let t=e.touches;t.length>0&&(a=t[0].clientX,o=`touch`)}if(a==null)return;let s=n.getBoundingClientRect(),c=a/TW(n),l=n.ownerDocument.defaultView,u=l?l.getComputedStyle(n,`::before`):{width:`0px`},d=parseFloat(u.width),f=o===`touch`||`pointerType`in e&&e.pointerType===`touch`?32:0;(n.dir===`rtl`?c<s.right+f&&c>s.right-d-f:c>s.left-f&&c<s.left+d+f)&&t()}function H$(e,t){V$(e,()=>{if(J(e.target)){let n=e.target,r=az(n);r!=null&&r.isEditable()&&r.update(()=>{let e=QF(n);Q(e)&&(t?(mF(AR),mF(OR)):n.focus(),e.toggleChecked())})}})}function U$(e){let t=e.getRootElement(),n=t?ZR(t):null;t!==null&&J(n)&&W$(n)&&t.focus({preventScroll:!0})}function W$(e){let t=e.parentNode;return e.tagName===`LI`&&t!=null&&t.__lexicalListType===`check`}function G$(e){let t=e.getRootElement(),n=t?ZR(t):null;return J(n)&&W$(n)?n:null}function K$(e,t,n){let r=G$(t);if(r!=null){let i=null;t.update(()=>{let a=QF(r);if(!Q(a))return;let o=function(e,t){let n=t?e.getPreviousSibling():e.getNextSibling(),r=e;for(;n==null&&Q(r);)r=r.getParentOrThrow().getParent(),r!=null&&(n=t?r.getPreviousSibling():r.getNextSibling());for(;Q(n);){let e=t?n.getLastChild():n.getFirstChild();if(!$(e))return n;n=t?e.getLastChild():e.getFirstChild()}return null}(a,n);o!=null&&(o.selectStart(),t.getElementByKey(o.__key)!=null&&(e.preventDefault(),i=o.__key))},{onUpdate:()=>{(i===null?null:t.getElementByKey(i))?.focus()}})}return!1}function q$(e,t){let n=[];for(let r of e)if(Q(r)){n.push(r);let e=r.getChildren();if(e.length>1)for(let r of e)$(r)&&n.push(t.createListItemNode().append(r))}else n.push(t.createListItemNode().append(r));return n}var J$={$import:(e,t)=>{let n;var r;return n=eJ(t,`ol`)?L$(`number`,t.start):(r=t).matches(`[__lexicallisttype=\"check\"], .contains-task-list, [data-is-checklist=\"1\"]`)||r.querySelector(`:scope > [aria-checked]`)!==null?L$(`check`):L$(`bullet`),VI(n,t),[n.splice(0,0,Uq(q$(e.$importChildren(t),n),t))]},match:tJ.tag(`ol`,`ul`),name:`@lexical/list/list`};function Y$(e,t){if(t.length!==1)return t;let n=t[0];return wI(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function X$(e){let t=e=>Hq(e)&&!$(e);if(!e.some(t))return e;let n=[],r=[],i=()=>{r.length>0&&(n.push(r),r=[])};for(let a of e)t(a)?(i(),n.push(G(a)?a.getChildren():[a])):r.push(a);i();let a=[];for(let e of n)a.length>0&&a.push(wF()),a.push(...e);return a}var Z$={$import:(e,t)=>{let n=t.getAttribute(`aria-checked`),r=j$(n===`true`||n!==`false`&&void 0);return HI(r,t),VI(r,t),[r.splice(0,0,X$(Y$(r,e.$importChildren(t))))]},match:tJ.tag(`li`),name:`@lexical/list/li`};function Q$(e,t,n){let r=eJ(n,`input`)?n:n.querySelector(`input[type=\"checkbox\"]`);if(!r||r.getAttribute(`type`)!==`checkbox`)return[];let i=j$(r.hasAttribute(`checked`));return HI(i,t),VI(i,t),[i.splice(0,0,X$(Y$(i,e.$importChildren(t))))]}var $$={$accepts:e=>Q(e)||$(e),$packageRun:e=>[j$().splice(0,0,e)],name:`ListSchema`},e1=[{$import:(e,t,n)=>{let r=t.querySelector(`:scope > input[type=\"checkbox\"]`);return r?Q$(e,t,r):n()},match:tJ.tag(`li`).classAll(`task-list-item`),name:`@lexical/list/li-task-list-item`},{$import:(e,t,n)=>{let r=t.querySelector(`:scope > .checkbox-wrapper`);if(!r)return n();let i=r.querySelector(`:scope > input[type=\"checkbox\"]`);return i?Q$(e,t,i):n()},match:tJ.tag(`li`).classAll(`joplin-checkbox`),name:`@lexical/list/li-joplin-checkbox`},J$,Z$],t1=HR(`UPDATE_LIST_START_COMMAND`),n1=HR(`INSERT_UNORDERED_LIST_COMMAND`),r1=HR(`INSERT_ORDERED_LIST_COMMAND`),i1=HR(`REMOVE_LIST_COMMAND`);function a1(e,t){return kz(e.registerCommand(r1,()=>(d$(`number`),!0),uL),e.registerCommand(t1,e=>{let{listNodeKey:t,newStart:n}=e,r=$F(t);return!!$(r)&&(r.getListType()===`number`&&(r.setStart(n),g$(r)),!0)},uL),e.registerCommand(n1,()=>(d$(`bullet`),!0),uL),e.registerCommand(i1,()=>(h$(),!0),uL),e.registerCommand(LL,()=>y$(!!(t&&t.restoreNumbering)),uL),e.registerCommand(sR,e=>{let t=W();if(!K(t)||!t.isCollapsed())return!1;let{anchor:n}=t;if(n.offset!==0)return!1;let r=n.getNode();for(;!Q(r);){if(r.getPreviousSibling()!==null)return!1;let e=r.getParent();if(e===null)return!1;r=e}return!(!Q(r)||!r.collapseAtStart(t))&&(e.preventDefault(),!0)},sL),e.registerNodeTransform(D$,e=>{let t=e.getFirstChild();if(t){if(q(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=W();K(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(NR,e=>{let t=e.getParent();if(Q(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}function o1(e){let t=e=>{let t=e.getParent();if($(e.getFirstChild())||!$(t))return;let n=NF(e,e=>Q(e)&&$(e.getParent())&&Q(e.getPreviousSibling()));if(n===null&&e.getIndent()>0)e.setIndent(0);else if(Q(n)){let r=n.getPreviousSibling();if(Q(r)){let n=function(e){let t=e,n=t.getFirstChild();for(;$(n);){let e=n.getLastChild();if(!Q(e))break;t=e,n=t.getFirstChild()}return t}(r).getParent();if($(n)){let r=i$(n);r+1<i$(t)&&e.setIndent(r)}}}};return e.registerNodeTransform(P$,e=>{let n=[e];for(;n.length>0;){let e=n.shift();if($(e)){for(let r of e.getChildren())if(Q(r)){t(r);let e=r.getFirstChild();$(e)&&n.push(e)}}}})}var s1={build:(e,t,n)=>_V(t),config:{hasStrictIndent:!1,shouldPreserveNumbering:!1},dependencies:[Gq,[Kq,{rules:e1}]],name:`@lexical/list/List`,nodes:()=>[P$,D$],register(e,t,n){let r=n.getOutput();return kz(fV(()=>a1(e,{restoreNumbering:r.shouldPreserveNumbering.value})),fV(()=>r.hasStrictIndent.value?o1(e):void 0))}},c1={build:(e,t)=>_V(t),config:{disableTakeFocusOnClick:!1},dependencies:[s1],name:`@lexical/list/CheckList`,register:(e,t,n)=>B$(e,n.getOutput())},l1={dependencies:[s1],name:`@lexical/list/Import`},u1=/^MsoListParagraph(CxSp(First|Middle|Last))?$/,d1=/^[A-Za-z0-9]+[.)]/,f1=/Microsoft Word/i,p1=`data-mso-list`;function m1(e){let t=(e.getAttribute(p1)||``).match(/level(\\d+)/);return t?parseInt(t[1],10):1}function h1(e){return e.querySelector(`span[${p1}=\"Ignore\"]`)}function g1(e){let t=h1(e);return t?(t.textContent||``).trim():``}function _1(e){return d1.test(e)?`number`:`bullet`}function v1(e){let t=h1(e);if(!t)return;let n=t;for(;n.parentElement&&n.parentElement!==e&&n.parentElement.nodeName===`SPAN`;)n=n.parentElement;n.remove()}function y1(e){return J(e)&&u1.test(e.className)}function b1(e,t){let n=L$(_1(t[0].marker)),r=[{level:t[0].level,list:n}];for(let n of t){for(;r.length>1&&r[r.length-1].level>n.level;)r.pop();if(n.level>r[r.length-1].level){let e=L$(_1(n.marker));r[r.length-1].list.append(j$().append(e)),r.push({level:n.level,list:e})}v1(n.el),r[r.length-1].list.append(j$().splice(0,0,e.$importChildren(n.el,{schema:Xq})))}return n}var x1=Qq(`@lexical/list/word-consumed-list-items`,()=>null),S1={$import:(e,t)=>{let n=e.session.get(x1);if(n===null&&(n=new WeakSet,e.session.set(x1,n)),n.has(t))return[];let r=[],i=t;for(;i&&y1(i)&&(n.add(i),r.push({el:i,level:m1(i),marker:g1(i)}),!i.classList.contains(`MsoListParagraphCxSpLast`)&&i.className!==`MsoListParagraph`);)i=i.nextElementSibling;return[b1(e,r)]},match:tJ.tag(`p`).classAny(`MsoListParagraph`,`MsoListParagraphCxSpFirst`,`MsoListParagraphCxSpMiddle`,`MsoListParagraphCxSpLast`),name:`@lexical/list/word-list-paragraph`},C1=$q([{$import:()=>[],match:tJ.tag(`o:p`),name:`@lexical/list/word-o-p`},S1]),w1={dependencies:[s1,[Kq,{preprocess:[(e,t,n)=>{let r=e.querySelector(`meta[name=\"Generator\"]`);if(r&&f1.test(r.getAttribute(`content`)||``)){for(let t of Array.from(e.querySelectorAll(`[style*=\"mso-list\"]`))){let e=uz(t.getAttribute(`style`)||``)[`mso-list`];e&&t.setAttribute(p1,e)}t.session.update(qq,e=>[...e,C1])}n()}]}]],name:`@lexical/list/WordListImport`},T1=n$,E1=T1.$createListItemNode,D1=T1.$createListNode;T1.$getListDepth,T1.$handleListInsertParagraph,T1.$insertList;var O1=T1.$isListItemNode,k1=T1.$isListNode;T1.$removeList,T1.CheckListExtension;var A1=T1.INSERT_CHECK_LIST_COMMAND,j1=T1.INSERT_ORDERED_LIST_COMMAND,M1=T1.INSERT_UNORDERED_LIST_COMMAND;T1.ListExtension,T1.ListImportExtension,T1.ListImportRules;var N1=T1.ListItemNode,P1=T1.ListNode;T1.ListSchema,T1.REMOVE_LIST_COMMAND,T1.UPDATE_LIST_START_COMMAND,T1.WordListImportExtension,T1.registerCheckList;var F1=T1.registerList,I1=T1.registerListStrictIndentTransform,L1=kr(4),R1=Symbol(L1),z1=Symbol(L1+1),B1=Symbol(L1+2),V1=Symbol(L1+3);function H1(e){let[t]=Nl(R1,$x),n=e.hasStrictIndent!==void 0&&e.hasStrictIndent,r=e.shouldPreserveNumbering!==void 0&&e.shouldPreserveNumbering;return ru(()=>{if(!t.hasNodes([P1,N1]))throw Error(`ListPlugin: ListNode and/or ListItemNode not registered on editor`)},[t],z1),ru(()=>kz(F1(t,{restoreNumbering:r}),n?I1(t):()=>{}),[t,n,r],B1),ru(()=>F1(t),[t],V1),null}kr(2)+1;var U1=t({$createAutoLinkNode:()=>c0,$createLinkNode:()=>i0,$isAutoLinkNode:()=>l0,$isLinkNode:()=>a0,$toggleLink:()=>f0,AutoLinkAnnounceExtension:()=>h0,AutoLinkExtension:()=>B0,AutoLinkNode:()=>s0,ClickableLinkExtension:()=>x0,LinkExtension:()=>v0,LinkImportExtension:()=>y0,LinkImportRules:()=>g0,LinkNode:()=>$1,TOGGLE_LINK_COMMAND:()=>u0,autoLinkEmailMatcher:()=>T0,autoLinkUrlMatcher:()=>w0,createLinkMatcherWithRegExp:()=>S0,formatUrl:()=>m0,registerAutoLink:()=>z0,registerClickableLink:()=>b0,registerLink:()=>_0}),W1=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function G1(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!W1.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}function K1(e,t,n,r,i){let a=G1(e,t);return a>=n&&a<=r&&Number.isInteger(a)?a:t}function q1(e,t){e.__rel=t.__rel,e.__target=t.__target,e.__title=t.__title,e.__url=t.__url}var J1=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],rel:e.__rel,target:e.__target,title:e.__title,url:e.__url,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__rel;o!=null&&(a.rel=o);let s=e.__target;s!=null&&(a.target=s);let c=e.__title;c!=null&&(a.title=c);let l=e.__url;l!==void 0&&l!==``&&(a.url=l);let u=e.__dir;u!=null&&(a.direction=u);let d=t[e.__format];d!==void 0&&d!==``&&(a.format=d);let f=e.__indent;return f!==void 0&&f!==0&&(a.indent=f),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=K1(t.indent,0,0,1/0),e.__textFormat=G1(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.rel;e.__rel=typeof s==`string`&&s!==``?s:null;let c=t.target;e.__target=typeof c==`string`&&c!==``?c:null;let l=t.title;e.__title=typeof l==`string`&&l!==``?l:null;let u=t.url;return e.__url=typeof u==`string`?u:``,e},afterCloneFrom:q1}};function Y1(e,t){e.__isUnlinked=t.__isUnlinked}var X1=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title,url:e.__url,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__isUnlinked;o!==void 0&&!1!==o&&(a.isUnlinked=o);let s=e.__rel;s!=null&&(a.rel=s);let c=e.__target;c!=null&&(a.target=c);let l=e.__title;l!=null&&(a.title=l);let u=e.__url;u!==void 0&&u!==``&&(a.url=u);let d=e.__dir;d!=null&&(a.direction=d);let f=t[e.__format];f!==void 0&&f!==``&&(a.format=f);let p=e.__indent;return p!==void 0&&p!==0&&(a.indent=p),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=K1(t.indent,0,0,1/0),e.__textFormat=G1(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.rel;e.__rel=typeof s==`string`&&s!==``?s:null;let c=t.target;e.__target=typeof c==`string`&&c!==``?c:null;let l=t.title;e.__title=typeof l==`string`&&l!==``?l:null;let u=t.url;e.__url=typeof u==`string`?u:``;let d=t.isUnlinked;return e.__isUnlinked=typeof d==`boolean`&&d,e},afterCloneFrom:Y1}},Z1=new Set([`http:`,`https:`,`mailto:`,`sms:`,`tel:`]),Q1=Az()({rel:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__rel`}),target:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__target`}),title:Yz(Mz(Gz(),{defaultAsNull:!0}),{field:`__title`}),url:Yz(Gz(),{field:`__url`,getter:`getURL`,setter:`setURL`})}),$1=class extends kL{__url;__target;__rel;__title;$config(){return this.config(`link`,{extends:kL,generated:J1,importDOM:{a:()=>({conversion:r0,priority:1})},json:Q1})}constructor(e=``,t={},n){super(n);let{target:r=null,rel:i=null,title:a=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=a}createDOM(e){let t=YF().createElement(`a`);return this.updateLinkDOM(null,t,e),FR(t,e.theme.link),t}updateLinkDOM(e,t,n){if(bz(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let n of[`target`,`rel`,`title`]){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}sanitizeUrl(e){let t=e;e=m0(e);try{let t=new URL(m0(e));if(!Z1.has(t.protocol))return`about:blank`}catch{let e=t.replace(/[\\u0000-\\u001F\\u007F\\s]/g,``).match(/^([a-z][a-z0-9+.-]*):/i);if(e!=null&&!Z1.has(`${e[1].toLowerCase()}:`))return`about:blank`}return e}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=SF(this);return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!K(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return(this.is(r)||this.isParentOf(r))&&(this.is(i)||this.isParentOf(i))&&t.getTextContent().length>0}isEmailURI(){return this.getURL().startsWith(`mailto:`)}isWebSiteURI(){let e=this.getURL();return e.startsWith(`https://`)||e.startsWith(`http://`)}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.getURL()===e.getURL()&&this.getTarget()===e.getTarget()&&this.getRel()===e.getRel()&&this.getTitle()===e.getTitle()}};function e0(e){let t=_F(e,`next`);return[t,t.getFlipped()]}function t0(e,t){for(let n of t)if(n.origin.isAttached()){UI(e,FI(n));return}}function n0(e){let t=W(),n=null,r=null;function i(){K(t)&&(t0(t.anchor,n),t0(t.focus,r),II(t))}K(t)&&(n=e0(t.anchor),r=e0(t.focus));let a=!1;for(let t of UF(e,`next`)){let n=t.origin;if(G(n)&&!n.isInline()){let r=n.getChildren();if(r.length>0){let t=SF(e);t.append(...r),n.append(t),a=!0}fI(n,zI(t),{$shouldSplit:()=>!1})}}function o(e,t,n){let[r,i]=e,a=e=>kI(e)&&e.origin.is(t);if(!a(r)&&!a(i))return e;let o=FI(UF(n,`next`));return[o,o.getFlipped()]}if(e.isAttached()){let t=e.getPreviousSibling();if(a0(t)&&t.shouldMergeAdjacentLink(e))return n&&=o(n,t,e),r&&=o(r,t,e),t.append(...e.getChildren()),e.remove(),void i();let s=e.getNextSibling();a0(s)&&e.shouldMergeAdjacentLink(s)&&(n&&=o(n,e,s),r&&=o(r,e,s),e.append(...s.getChildren()),s.remove(),a=!0)}if(a){if(!e.canBeEmpty()&&e.isEmpty()){let t=e.getParent();e.remove(),t&&t.isEmpty()&&t.remove()}i()}}function r0(e){let t=null;if(bz(e)){let n=e.textContent;(n!==null&&n!==``||e.children.length>0)&&(t=i0(e.getAttribute(`href`)||``,{rel:e.getAttribute(`rel`),target:e.getAttribute(`target`),title:e.getAttribute(`title`)}))}return{node:t}}function i0(e=``,t){return hF(new $1(e,t))}function a0(e){return e instanceof $1}var o0=Az()({isUnlinked:Yz(RR(),{field:`__isUnlinked`})}),s0=class extends $1{__isUnlinked;constructor(e=``,t={},n){super(e,t,n),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}$config(){return this.config(`autolink`,{extends:$1,generated:X1,json:o0})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.getLatest().__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?YF().createElement(`span`):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}};function c0(e=``,t){return hF(new s0(e,t))}function l0(e){return e instanceof s0}var u0=HR(`TOGGLE_LINK_COMMAND`);function d0(e,t){if(e.type===`element`){let n=e.getNode();return G(n)||function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function f0(e,t={}){let n;if(e&&typeof e==`object`){let{url:r,...i}=e;n=r,t={...i,...t}}else n=e;let{target:r,title:i}=t,a=t.rel===void 0?`noreferrer`:t.rel,o=W();if(o===null||!K(o)&&!CI(o))return;if(CI(o)){let e=o.getNodes();if(e.length===0)return;e.forEach(e=>{if(n===null){let t=NF(e,e=>!l0(e)&&a0(e));t&&(t.insertBefore(e),t.getChildren().length===0&&t.remove())}else{let t=NF(e,e=>!l0(e)&&a0(e));if(t)t.setURL(n),r!==void 0&&t.setTarget(r),a!==void 0&&t.setRel(a),i!==void 0&&t.setTitle(i);else{let t=i0(n,{rel:a,target:r,title:i});e.insertBefore(t),t.append(e)}}});return}if(o.isCollapsed()&&n===null)for(let e of o.getNodes()){let t=NF(e,e=>!l0(e)&&a0(e));t!==null&&(t.getParentOrThrow().splice(t.getIndexWithinParent(),0,t.getChildren()),t.remove());return}let s=o.extract();if(n===null){let e=new Set;s.forEach(t=>{let n=NF(t,e=>!l0(e)&&a0(e));if(n!==null){let t=n.getKey();if(e.has(t))return;(function(e,t){let n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),i=r=>n.has(r.getKey())||G(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),a=r.filter(i);if(a.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();let o=r.findIndex(i),s=r.findLastIndex(i),c=o===0,l=s===r.length-1;if(c)a.forEach(t=>e.insertBefore(t));else if(l)for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);else{for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);let t=r.slice(s+1);if(t.length>0){let n=SF(e);a[a.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}})(n,s),e.add(t)}});return}let c=new Set,l=e=>{c.has(e.getKey())||(c.add(e.getKey()),e.setURL(n),r!==void 0&&e.setTarget(r),a!==void 0&&e.setRel(a),i!==void 0&&e.setTitle(i))};if(s.length===1){let e=s[0],t=NF(e,a0);if(t!==null)return l(t)}(function(e){let t=W();if(!K(t))return e();let n=II(t),r=n.isBackward(),i=d0(n.anchor,r?-1:0),a=d0(n.focus,r?0:-1);if(e(),i||a){let e=W();if(K(e)){let t=e.clone();if(i){let e=i.getParent();e&&t.anchor.set(e.getKey(),i.getIndexWithinParent()+ +!!r,`element`)}if(a){let e=a.getParent();e&&t.focus.set(e.getKey(),a.getIndexWithinParent()+ +!r,`element`)}WI(II(t))}}})(()=>{let e=null;for(let t of s){if(!t.isAttached())continue;let o=NF(t,a0);if(o){l(o);continue}if(G(t)){if(!t.isInline())continue;if(a0(t)){if(!(l0(t)||e!==null&&e.getParentOrThrow().isParentOf(t))){l(t),e=t;continue}for(let e of t.getChildren())t.insertBefore(e);t.remove();continue}}let s=t.getPreviousSibling();a0(s)&&s.is(e)?s.append(t):(e=i0(n,{rel:a,target:r,title:i}),t.insertAfter(e),e.append(t))}})}var p0=/^\\+?[0-9\\s()-]{5,}$/;function m0(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes(`@`)?`mailto:${e}`:p0.test(e)?`tel:${e}`:`https://${e}`}var h0={build:(e,t)=>_V(t),config:{created:`Link`,createdMany:`%s links`,destroyed:`Link removed`,destroyedMany:`%s links removed`,disabled:!1},dependencies:[cY],name:`@lexical/link/AutoLinkAnnounce`,register(e,t,n){let{created:r,createdMany:i,destroyed:a,destroyedMany:o,disabled:s}=n.getOutput(),{announce:c}=n.getDependency(cY).output;return fV(()=>s.value?void 0:e.registerMutationListener(s0,e=>{let t=0,n=0;for(let[,r]of e)r===`created`?t++:r===`destroyed`&&n++;t>0&&n===0?c(t===1?r.peek():i.peek().replace(`%s`,String(t))):n>0&&t===0&&c(n===1?a.peek():o.peek().replace(`%s`,String(n)))},{skipInitialization:!0}))}},g0=[{$import:(e,t)=>{if(!t.textContent&&t.children.length===0)return[];let n=t.getAttribute(`href`)||``,r={rel:t.getAttribute(`rel`),target:t.getAttribute(`target`),title:t.getAttribute(`title`)};return Rq(e.$importChildren(t),()=>i0(n,r))},match:tJ.tag(`a`),name:`@lexical/link/a`}];function _0(e,t){return kz(e.registerNodeTransform($1,n0),e.registerCommand(u0,e=>{let n=t.validateUrl.peek(),r=t.attributes.peek();if(e===null)return f0(null),!0;if(typeof e==`string`)return!(n!==void 0&&!n(e))&&(f0(e,r),!0);{let{url:t,...i}=e;return!(n!==void 0&&!n(t))&&(f0(t,{...r,...i}),!0)}},lL),fV(()=>{let n=t.validateUrl.value;if(!n)return;let r=t.attributes.value;return e.registerCommand(vR,t=>{let i=W();if(!K(i)||i.isCollapsed()||!DW(t,ClipboardEvent)||t.clipboardData===null)return!1;let a=t.clipboardData.getData(`text`);return n(a)?!i.getNodes().some(e=>G(e)||q(e)&&!e.isSimpleText())&&(e.dispatchCommand(u0,{...r,url:a}),t.preventDefault(),!0):!1},uL)}))}var v0={build:(e,t,n)=>_V(t),config:{attributes:void 0,validateUrl:void 0},dependencies:[Gq,[Kq,{rules:g0}]],mergeConfig(e,t){let n=Uz(e,t);return e.attributes&&(n.attributes=Uz(e.attributes,n.attributes)),n},name:`@lexical/link/Link`,nodes:()=>[$1],register:(e,t,n)=>_0(e,n.getOutput())},y0={dependencies:[v0],name:`@lexical/link/Import`};function b0(e,t,n={}){let r=n=>{let r=n.button===1;if(n.type===`auxclick`&&!r)return;let i=n.target;if(!hz(i))return;let a=az(i);if(a===null)return;let o=null,s=null,c=!1;if(a.update(()=>{let e=QF(i);if(e!==null){let n=NF(e,G);if(!t.disabled.peek()){if(a0(n))c=l0(n)&&n.getIsUnlinked(),o=n.sanitizeUrl(n.getURL()),s=n.getTarget();else{let e=function(e,t){let n=e;for(;n!=null;){if(t(n))return n;n=n.parentNode}return null}(i,bz);e!==null&&(o=e.href,s=e.target)}}}}),o===null||o===``||c)return;let l=e.read(`latest`,W);(!K(l)||l.isCollapsed())&&window.open(o,t.newTab.peek()||r||n.metaKey||n.ctrlKey||s===`_blank`?`_blank`:`_self`),n.preventDefault()};return e.registerRootListener(e=>{if(e)return Iz(e,{auxclick:r,click:r},n)})}var x0={build:(e,t,n)=>_V(t),config:{disabled:!1,newTab:!1},dependencies:[v0],name:`@lexical/link/ClickableLink`,register:(e,t,n)=>b0(e,n.getOutput())};function S0(e,t=e=>e){return n=>{let r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}var C0=(()=>{try{return RegExp(`((https?:\\\\/\\\\/(www\\\\.)?)|(www\\\\.))[-\\\\p{L}\\\\p{N}@:%._+~#=]{1,256}\\\\.[\\\\p{L}\\\\p{N}]{1,6}(?:[-\\\\p{L}\\\\p{N}()@:%_+.~#?&//=]*[\\\\p{L}\\\\p{N}()@_~#?&//=])?`,`u`)}catch{return/((https?:\\/\\/(www\\.)?)|(www\\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9]{1,6}(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*[a-zA-Z0-9()@_~#?&//=])?/}})(),w0=e=>{let t=C0.exec(e);if(t===null)return null;let n=t[0],r=0;for(let e of n)e===`(`?r++:e===`)`&&r--;for(;r<0&&n.endsWith(`)`);)n=n.slice(0,-1),r++;return{index:t.index,length:n.length,text:n,url:n.startsWith(`http`)?n:`https://${n}`}},T0=S0(/(([^<>()[\\]\\\\.,;:\\s@\"]{1,64}(\\.[^<>()[\\]\\\\.,;:\\s@\"]{1,64}){0,63})|(\".{1,255}\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]{1,63}\\.){1,127}[a-zA-Z]{2,63}))/,e=>`mailto:${e}`);function E0(e,t){for(let n=0;n<t.length;n++){let r=t[n](e);if(r)return r}return null}var D0=/[.,;\\s]/;function O0(e,t){return t.test(e)}function k0(e,t){return O0(e[e.length-1],t)}function A0(e,t){return O0(e[0],t)}function j0(e,t){let n=e.getPreviousSibling();return G(n)&&(n=n.getLastDescendant()),n===null||SI(n)||q(n)&&k0(n.getTextContent(),t)}function M0(e,t){let n=e.getNextSibling();return G(n)&&(n=n.getFirstDescendant()),n===null||SI(n)||q(n)&&A0(n.getTextContent(),t)}function N0(e,t,n,r,i){return(e>0?O0(r[e-1],n):j0(i[0],n))?t<r.length?O0(r[t],n):M0(i[i.length-1],n):!1}function P0(e,t,n){let r=[],i=[],a=[],o=0,s=0,c=[...e];for(;c.length>0;){let e=c[0],l=e.getTextContent().length,u=s;s+l<=t?(r.push(e),o+=l):u>=n?a.push(e):i.push(e),s+=l,c.shift()}return[o,r,i,a]}function F0(e,t,n,r){let i=c0(r.url,r.attributes);if(e.length===1){let a,o=e[0];t===0?[a,o]=o.splitText(n):[,a,o]=o.splitText(t,n);let s=AF(r.text);return s.setFormat(a.getFormat()),s.setDetail(a.getDetail()),s.setStyle(a.getStyle()),i.append(s),a.replace(i),o}if(e.length>1){let r=e[0],a,o=r.getTextContent().length;t===0?a=r:[,a]=r.splitText(t);let s=[],c;for(let t=1;t<e.length;t++){let r=e[t],i=r.getTextContent().length,a=o;if(a<n){if(o+i<=n)s.push(r);else{let[e,t]=r.splitText(n-a);s.push(e),c=t}}o+=i}let l=W(),u=l?l.getNodes().find(q):void 0,d=AF(a.getTextContent());return d.setFormat(a.getFormat()),d.setDetail(a.getDetail()),d.setStyle(a.getStyle()),i.append(d,...s),u&&u===a&&(K(l)?d.select(l.anchor.offset,l.focus.offset):CI(l)&&d.select(0,d.getTextContent().length)),a.replace(i),c}}function I0(e,t,n,r){let i=e.getChildren(),a=i.length;for(let t=0;t<a;t++){let r=i[t];if(!q(r)||!r.isSimpleText())return L0(e),void n(null,e.getURL())}let o=e.getTextContent(),s=E0(o,t);if(s===null||s.text!==o||!j0(e,r)||!M0(e,r))return L0(e),void n(null,e.getURL());let c=e.getURL();c!==s.url&&(e.setURL(s.url),n(s.url,c)),s.attributes&&(e.getRel()!==s.attributes.rel&&e.setRel(s.attributes.rel||null),e.getTarget()!==s.attributes.target&&e.setTarget(s.attributes.target||null),e.getTitle()!==s.attributes.title&&e.setTitle(s.attributes.title||null))}function L0(e){let t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(e=>e.getLatest())}var R0={changeHandlers:[],excludeParents:[],matchers:[],separatorRegex:D0};function z0(e,t=R0){let{matchers:n,changeHandlers:r,excludeParents:i,separatorRegex:a=D0}=t,o=(e,t)=>{for(let n of r)n(e,t)};return kz(e.registerNodeTransform(NR,e=>{let t=e.getParentOrThrow(),r=e.getPreviousSibling();l0(t)?I0(t,n,o,a):!a0(t)&&!i.some(e=>e(t))&&(e.isSimpleText()&&(A0(e.getTextContent(),a)||!l0(r))&&(function(e,t,n,r){for(let t of e){let e=t.getParent();if(l0(e)&&!e.getIsUnlinked())return}let i=[...e],a=i.map(e=>e.getTextContent()).join(``),o,s=a,c=0;for(;(o=E0(s,t))&&o!==null;){let e=o.index,t=e+o.length;if(N0(c+e,c+t,r,a,i)){let[r,,a,l]=P0(i,c+e,c+t),u=!1;for(let e of a){let t=e.getParent();if(l0(t)&&!t.getIsUnlinked()){u=!0;break}}if(u){c+=t,s=s.substring(t);continue}let d=F0(a,c+e-r,c+t-r,o);i=d?[d,...l]:l,n(o.url,null),c=0}else c+=t;s=s.substring(t)}})(function(e){let t=[e],n=e.getNextSibling();for(;n!==null&&q(n)&&n.isSimpleText()&&(t.push(n),!/[\\s]/.test(n.getTextContent()));)n=n.getNextSibling();return t}(e),n,o,a),(function(e,t,n,r){let i=e.getParent(),a=e.getPreviousSibling(),o=e.getNextSibling(),s=e.getTextContent();if(!l0(i)||i.getIsUnlinked()){if(l0(a)&&!a.getIsUnlinked()&&a.is(e.getPreviousSibling())&&e.getParent()===a.getParent()){if(!A0(s,r))return L0(a),void n(null,a.getURL());if(c=s,a.isEmailURI()?/^\\.[a-zA-Z]{2,}/.test(c):/^\\.[a-zA-Z0-9]{1,}/.test(c)){let i=a.getTextContent()+s,o=E0(i,t);o!==null&&o.text===i&&(a.append(e),I0(a,t,n,r),n(null,a.getURL()))}}var c;!l0(o)||o.getIsUnlinked()||k0(s,r)||o.is(e.getNextSibling())&&e.getParent()===o.getParent()&&(L0(o),n(null,o.getURL()))}})(e,n,o,a))}),e.registerCommand(u0,e=>{let t=W();return e!==null||!K(t)||t.extract().forEach(e=>{let t=e.getParent();l0(t)&&(t.setIsUnlinked(!t.getIsUnlinked()),t.markDirty())}),!1},uL))}var B0={config:R0,dependencies:[h0,v0],mergeConfig(e,t){let n=Uz(e,t);for(let r of[`matchers`,`changeHandlers`,`excludeParents`]){let i=t[r];Array.isArray(i)&&(n[r]=[...e[r],...i])}return n},name:`@lexical/link/AutoLink`,nodes:[s0],register:z0},V0=U1;V0.$createAutoLinkNode;var H0=V0.$createLinkNode,U0=V0.$isAutoLinkNode,W0=V0.$isLinkNode;V0.$toggleLink,V0.AutoLinkAnnounceExtension,V0.AutoLinkExtension;var G0=V0.AutoLinkNode;V0.ClickableLinkExtension,V0.LinkExtension,V0.LinkImportExtension,V0.LinkImportRules;var K0=V0.LinkNode,q0=V0.TOGGLE_LINK_COMMAND;V0.autoLinkEmailMatcher,V0.autoLinkUrlMatcher,V0.createLinkMatcherWithRegExp,V0.formatUrl,V0.registerAutoLink,V0.registerClickableLink;var J0=V0.registerLink,Y0=kr(3),X0=Symbol(Y0),Z0=Symbol(Y0+1),Q0=Symbol(Y0+2);function $0(e){let[t]=Nl(X0,$x),n=e.validateUrl,r=e.attributes;return ru(()=>{if(!t.hasNodes([K0]))throw Error(`LinkPlugin: LinkNode not registered on editor`)},null,Z0),ru(()=>J0(t,t$({attributes:r,validateUrl:n})),[t,n,r],Q0),null}var e2=kr(3);e2+1,e2+2,kr(2)+1,kr(2)+1;var t2=t({$createCodeHighlightNode:()=>R2,$createCodeNode:()=>E2,$getCodeLineDirection:()=>s2,$getEndOfCodeInLine:()=>l2,$getFirstCodeNodeOfLine:()=>a2,$getLastCodeNodeOfLine:()=>o2,$getStartOfCodeInLine:()=>c2,$isCodeHighlightNode:()=>z2,$isCodeNode:()=>D2,$outdentLeadingSpaces:()=>d2,$plainifyCodeContent:()=>u2,CodeExtension:()=>$2,CodeHighlightNode:()=>I2,CodeImportExtension:()=>e4,CodeImportRules:()=>Q2,CodeIndentExtension:()=>s4,CodeNode:()=>T2,DEFAULT_CODE_LANGUAGE:()=>v2,getDefaultCodeLanguage:()=>y2,registerCodeIndentation:()=>o4});function n2(e){return()=>{}}function r2(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function i2(e,t){let n=e;for(let r=iI(e,t);r&&(z2(r.origin)||jI(r.origin));r=r.getAdjacentCaret())n=r.origin;return n}function a2(e){return i2(e,`previous`)}function o2(e){return i2(e,`next`)}function s2(e){let t=a2(e),n=o2(e),r=t;for(;r!==null;){if(z2(r)){let e=dz(r.getTextContent());if(e!==null)return e}if(r===n)break;r=r.getNextSibling()}let i=t.getParent();if(G(i)){let e=i.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function c2(e,t){let n=null,r=null,i=e,a=t,o=e.getTextContent();for(;;){if(a===0){let e=i.getPreviousSibling();if(e===null){i=null;break}if(z2(e)||jI(e)||SI(e)||r2(167),i=e,SI(i)){n={node:i,offset:1};break}a=Math.max(0,i.getTextContentSize()-1),o=i.getTextContent()}else a--;let e=o[a];z2(i)&&e!==` `&&(r={node:i,offset:a})}if(r!==null)return r;let s=null;if(t<e.getTextContentSize())z2(e)&&(s=e.getTextContent()[t]);else{let t=e.getNextSibling();z2(t)&&(s=t.getTextContent()[0])}if(s!==null&&s!==` `)return n;{let r=function(e,t){let n=e,r=t,i=e.getTextContent(),a=e.getTextContentSize();for(;;){if(!z2(n)||r===a){if(n=n.getNextSibling(),n===null||SI(n))return null;z2(n)&&(r=0,i=n.getTextContent(),a=n.getTextContentSize())}if(z2(n)){if(i[r]!==` `)return{node:n,offset:r};r++}}}(e,t);return r===null?n:r}}function l2(e){let t=o2(e);return SI(t)&&r2(168),t}function u2(e){let t=[];return qz(e,{linebreak:()=>t.push(wF()),tab:()=>t.push(kF()),text:e=>t.push(R2(e))}),t}function d2(e,t,n){if(!Number.isInteger(t)||t<=0)return!1;let r=e.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;let a=Math.min(t,i[0].length),o=e.getKey(),s=n.anchor.key===o&&n.anchor.type===`text`?n.anchor.offset:null,c=n.focus.key===o&&n.focus.type===`text`?n.focus.offset:null;return e.spliceText(0,a,``),s!==null&&n.anchor.set(o,Math.max(0,s-a),`text`),c!==null&&n.focus.set(o,Math.max(0,c-a),`text`),!0}var f2=/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;function p2(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`||!f2.test(e))return t;let n=Number(e);return Number.isFinite(n)?n:t}var m2=e=>{let t=fz(e,`format`),n=Hz(e,`format`),r=Vz(e,`format`);return{exportJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles();return{children:[],language:e.__language,theme:e.__theme,direction:e.__dir,format:t[e.__format],indent:e.__indent,textFormat:n!==0&&i?n:void 0,textStyle:r!==``&&i?r:void 0,type:e.__type,version:1}},exportCompactJSON:function(e){let n=e.__textFormat,r=e.__textStyle,i=(n!==0||r!==``)&&e.shouldSerializeTextStyles(),a={type:e.__type,children:[]},o=e.__language;o!==void 0&&(a.language=o);let s=e.__theme;s!==void 0&&(a.theme=s);let c=e.__dir;c!=null&&(a.direction=c);let l=t[e.__format];l!==void 0&&l!==``&&(a.format=l);let u=e.__indent;return u!==void 0&&u!==0&&(a.indent=u),n!==void 0&&n!==0&&i&&(a.textFormat=n),r!==void 0&&r!==``&&i&&(a.textStyle=r),a},updateFromJSON:function(e,t){let i=t.direction;e.__dir=i===null||i===`ltr`||i===`rtl`?i:null;let a=t.format;e.__format=typeof a==`string`&&a in n?n[a]:r,e.__indent=function(e,t,n,r){let i=p2(e,t);return i>=n&&i<=r&&Number.isInteger(i)?i:t}(t.indent,0,0,1/0),e.__textFormat=p2(t.textFormat,0);let o=t.textStyle;e.__textStyle=typeof o==`string`?o:``;let s=t.language;e.setLanguage(s==null||typeof s==`string`?s:``);let c=t.theme;return e.setTheme(c===void 0?void 0:typeof c==`string`?c:``),e}}};function h2(e,t){e.__highlightType=t.__highlightType}var g2=e=>{let t=fz(e,`mode`),n=IR(e,`detail`,0),r=IR(e,`format`,0),i=Hz(e,`mode`),a=Vz(e,`mode`);return{exportJSON:function(e){return{highlightType:e.__highlightType,detail:e.__detail,format:e.__format,mode:t[e.__mode],style:e.__style,text:e.__text,type:e.__type,version:1}},exportCompactJSON:function(e){let n={type:e.__type},r=e.__highlightType;r!==void 0&&(n.highlightType=r);let i=e.__detail;i!==void 0&&i!==0&&(n.detail=i);let a=e.__format;a!==void 0&&a!==0&&(n.format=a);let o=t[e.__mode];o!==void 0&&o!==`normal`&&(n.mode=o);let s=e.__style;s!==void 0&&s!==``&&(n.style=s);let c=e.__text;return c!==void 0&&c!==``&&(n.text=c),n},updateFromJSON:function(e,t){let o=t.detail;e.__detail=typeof o==`string`&&o in n?n[o]:p2(o,0);let s=t.format;e.setFormat(typeof s==`string`&&s in r?r[s]:p2(s,0));let c=t.mode;e.__mode=typeof c==`string`&&c in i?i[c]:a;let l=t.style;e.__style=typeof l==`string`?l:``;let u=t.text;e.__text=typeof u==`string`?u:``;let d=t.highlightType;return e.setHighlightType(d==null||typeof d==`string`?d:``),e},afterCloneFrom:h2}},_2=Az()({language:Jz(Pz(Mz(Gz())),{getter:{field:`__language`}}),theme:Jz(Pz(Gz()),{getter:{field:`__theme`}})}),v2=`javascript`,y2=()=>v2;function b2(e,t){for(let n of e.childNodes)if(J(n)&&n.tagName===t||b2(n,t))return!0;return!1}var x2=`data-language`,S2=`data-highlight-language`,C2=`data-theme`,w2=n2(),T2=class extends kL{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config(`code`,{extends:kL,generated:m2,importDOM:{code:e=>e.textContent!=null&&(/\\r?\\n/.test(e.textContent)||b2(e,`BR`))?{conversion:O2,priority:1}:null,div:()=>({conversion:k2,priority:1}),pre:()=>({conversion:O2,priority:0}),table:e=>N2(e)?{conversion:A2,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&N2(n)?{conversion:j2,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&N2(t)?{conversion:j2,priority:3}:null}},json:_2})}constructor(e=void 0,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),function(e,t){e.__language=t.__language,e.__theme=t.__theme}(this,e),this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=YF().createElement(`code`);FR(t,e.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(x2,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(S2,n));let r=this.getTheme();r&&t.setAttribute(C2,r);let i=this.getStyle();return i&&zz(t.style,i),t}updateDOM(e,t,n){let r=this.__language,i=e.__language;r?r!==i&&t.setAttribute(x2,r):i&&t.removeAttribute(x2);let a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?a&&r?r!==i&&t.setAttribute(S2,r):t.removeAttribute(S2):a&&r&&t.setAttribute(S2,r);let o=this.__theme,s=e.__theme;o?o!==s&&t.setAttribute(C2,o):s&&t.removeAttribute(C2);let c=this.__style,l=e.__style;return c!==l&&zz(t.style,c,l),!1}exportDOM(e){let t=YF().createElement(`pre`);FR(t,e._config.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(x2,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(S2,n));let r=this.getTheme();r&&t.setAttribute(C2,r);let i=this.getStyle();return i&&zz(t.style,i),{element:t}}insertNewAfter(e,t=!0){if(!wH(XF(),`@lexical/code`)){w2();let t=P2(e);if(t)return t}let{anchor:n,focus:r}=e,i=(n.isBefore(r)?n:r).getNode();if(q(i)){let e=a2(i),t=[];for(;;)if(jI(e))t.push(kF()),e=e.getNextSibling();else{if(!z2(e))break;{let n=0,r=e.getTextContent(),i=e.getTextContentSize();for(;n<i&&r[n]===` `;)n++;if(n!==0&&t.push(R2(` `.repeat(n))),n!==i)break;e=e.getNextSibling()}}let r=i.splitText(n.offset)[0],a=n.offset===0?0:1,o=r.getIndexWithinParent()+a,s=i.getParentOrThrow(),c=[wF(),...t];s.splice(o,0,c);let l=t[t.length-1];l?l.select():n.offset===0?r.selectPrevious():r.getNextSibling().selectNext(0,0)}if(D2(i)){let{offset:t}=e.anchor;i.splice(t,0,[wF()]),i.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){let e=EF();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function E2(e,t){return CF(T2).setLanguage(e).setTheme(t)}function D2(e){return e instanceof T2}function O2(e){return{node:E2(e.getAttribute(x2),e.getAttribute(C2))}}function k2(e){let t=e,n=M2(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(M2(t))return!0;t=t.parentElement}return!1}(t)?{node:n?E2():null}:{node:null}}function A2(){return{node:E2()}}function j2(){return{node:null}}function M2(e){return e.style.fontFamily.match(`monospace`)!==null}function N2(e){return e.classList.contains(`js-file-line-container`)}function P2(e){let{anchor:t}=e;if(e.isCollapsed()&&t.type===`element`){let e=t.getNode();if(D2(e)){let n=e.getChildrenSize();if(n>=2&&t.offset===n){let t=e.getLastChild();if(SI(t)&&SI(t.getPreviousSibling())){let t=EF();return e.splice(n-2,2,[]).insertAfter(t,!1),t.select(),t}}}}return null}var F2=Az()({highlightType:Jz(Pz(Mz(Gz())),{getter:{field:`__highlightType`}})}),I2=class extends NR{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}$config(){return this.config(`code-highlight`,{extends:NR,generated:g2,json:F2})}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e);return FR(t,L2(e.theme,this.__highlightType)),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n),i=L2(n.theme,e.__highlightType),a=L2(n.theme,this.__highlightType);return i!==a&&(i&&Lz(t,i),a&&FR(t,a)),r}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return E2()}};function L2(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function R2(e=``,t){return hF(new I2(e,t))}function z2(e){return e instanceof I2}var B2=`data-language`,V2=`data-theme`;function H2(e){return e.style.fontFamily.match(`monospace`)!==null}function U2(e){let t=e.parentElement;for(;t!==null;){if(H2(t))return!0;t=t.parentElement}return!1}var W2=$q([{$import:(e,t)=>e.$importChildren(t),match:tJ.tag(`tr`,`td`),name:`@lexical/code/github-code-table/unwrap`}]),G2={$import:(e,t)=>[E2(t.getAttribute(B2),t.getAttribute(V2)).splice(0,0,e.$importChildren(t))],match:tJ.tag(`pre`),name:`@lexical/code/pre`},K2={$import:(e,t,n)=>{let r=t.textContent||``;return/\\r?\\n/.test(r)||t.querySelector(`br`)!==null?[E2(t.getAttribute(B2),t.getAttribute(V2)).splice(0,0,e.$importChildren(t))]:n()},match:tJ.tag(`code`),name:`@lexical/code/code-multiline`};function q2(e){if(!J(e))return!1;let t=e.style.fontFamily,n=e.style.whiteSpace;return typeof t==`string`&&/monospace/i.test(t)&&typeof n==`string`&&n.startsWith(`pre`)}function J2(e){let t=!1,n=[],r=``,i=!1,a=()=>{i&&=(n.push(r),r=``,!1)};for(let o of Array.from(e.childNodes))if(J(o))o.tagName===`DIV`?(a(),n.push(o.textContent||``),t=!0):o.tagName===`BR`?(a(),n.push(``),t=!0):(r+=o.textContent||``,i=!0);else if(_z(o)){let e=o.textContent||``;e.length>0&&(r+=e,i=!0)}return a(),t?n:null}function Y2(e){for(let t of Array.from(e.children)){if(J(t)&&q2(t)){if(J2(t)!==null)return!0;let e=t.nextElementSibling;if(e&&q2(e))return!0;continue}if(Y2(t))return!0}return!1}var X2=$q([{$import:(e,t,n)=>{if(!q2(t)||U2(t))return n();let r=J2(t);return r===null||r.length===0?n():[E2().splice(0,0,LF(r.join(`\n`)))]},match:tJ.tag(`div`),name:`@lexical/code/vscode-wrapper`},{$import:(e,t,n)=>{if(!q2(t)||U2(t))return n();let r=t.previousElementSibling;if(r&&q2(r))return[];let i=[],a=t;for(;a&&q2(a);)i.push(a.tagName===`BR`?``:a.textContent||``),a=a.nextElementSibling;return i.length<2?n():[E2().splice(0,0,LF(i.join(`\n`)))]},match:tJ.tag(`div`,`br`),name:`@lexical/code/vscode-line-run`}]),Z2={$import:(e,t,n)=>H2(t)?[E2().splice(0,0,e.$importChildren(t))]:U2(t)?e.$importChildren(t):n(),match:tJ.tag(`div`),name:`@lexical/code/div`},Q2=[{$import:(e,t)=>[E2().splice(0,0,e.$importChildren(t,{rules:W2}))],match:tJ.tag(`table`).classAll(`js-file-line-container`),name:`@lexical/code/github-code-table`},{$import:(e,t)=>e.$importChildren(t),match:tJ.tag(`td`).classAll(`js-file-line`),name:`@lexical/code/github-code-cell-by-class`},K2,G2,Z2],$2={dependencies:[Gq,[Kq,{preprocess:[(e,t,n)=>{Y2(mz(e)?e.body:e)&&t.session.update(qq,e=>[...e,X2]),n()}],rules:Q2}]],name:`@lexical/code`,nodes:()=>[T2,I2],register:e=>kz(e.registerCommand(uR,e=>{let t=W();return!(!K(t)||!P2(t))&&(e!==null&&e.preventDefault(),!0)},uL),e.registerNodeTransform(MR,e=>{e.getFormat()!==0&&D2(e.getParent())&&e.setFormat(0)}))},e4={dependencies:[$2],name:`@lexical/code/Import`};function t4(e){if(!K(e))return!1;let t=e.anchor.getNode(),n=D2(t)?t:t.getParent(),r=e.focus.getNode(),i=D2(r)?r:r.getParent();return D2(n)&&n.is(i)}function n4(e){let t=e.getNodes(),n=[];if(t.length===1&&D2(t[0]))return n;let r=[];for(let e=0;e<t.length;e++){let i=t[e];z2(i)||jI(i)||SI(i)||r2(169),SI(i)?r.length>0&&(n.push(r),r=[]):r.push(i)}if(r.length>0){let t=e.isBackward()?e.anchor:e.focus,i=DF(r[0].getKey(),0,`text`);t.is(i)||n.push(r)}return n}function r4(e,t){let n=W();if(!K(n)||!t4(n))return!1;let r=n4(n),i=r.length;if(i===0&&n.isCollapsed())return e===FL?n.insertNodes([kF()]):function(e,t){let n=e.anchor.getNode();if(!z2(n)&&!jI(n))return;let r=a2(n);jI(r)?r.remove():t!==void 0&&z2(r)&&d2(r,t,e)}(n,t),!0;if(i===0&&e===FL&&n.getTextContent()===`\n`){let e=kF(),t=wF(),r=n.isBackward()?`previous`:`next`;return n.insertNodes([e,t]),GI(VF(BF(uI(e,`next`,0),FI(iI(t,`next`))),r)),!0}for(let a=0;a<i;a++){let i=r[a];if(i.length>0){let r=i[0];if(a===0&&(r=a2(r)),e===FL){let e=kF();if(r.insertBefore(e),a===0){let t=n.isBackward()?`focus`:`anchor`,i=DF(r.getKey(),0,`text`);n[t].is(i)&&n[t].set(e.getKey(),0,`text`)}}else jI(r)?r.remove():t!==void 0&&z2(r)&&d2(r,t,n)}}return!0}function i4(e,t){let n=W();if(!K(n))return!1;let{anchor:r,focus:i}=n,a=r.offset,o=i.offset,s=r.getNode(),c=i.getNode(),l=e===oR;if(!t4(n)||!z2(s)&&!jI(s)||!z2(c)&&!jI(c))return!1;if(!t.altKey){if(n.isCollapsed()){let e=s.getParentOrThrow();if(l&&a===0&&s.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),t.preventDefault(),!1}else if(!l&&a===s.getTextContentSize()&&s.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),t.preventDefault(),!1}return!1}let u,d;if(s.isBefore(c)?(u=a2(s),d=o2(c)):(u=a2(c),d=o2(s)),u==null||d==null)return!1;let f=u.getNodesBetween(d);for(let e=0;e<f.length;e++){let t=f[e];if(!z2(t)&&!jI(t)&&!SI(t))return!1}t.preventDefault(),t.stopPropagation();let p=l?u.getPreviousSibling():d.getNextSibling();if(!SI(p))return!0;let m=l?p.getPreviousSibling():p.getNextSibling();if(m==null)return!0;let h=SI(m),g=(h||!z2(m)&&!jI(m)?null:l?a2(m):o2(m))??m;return p.remove(),f.forEach(e=>e.remove()),h?(f.forEach(e=>{g.insertAfter(e),g=e}),g.insertAfter(p)):e===oR?(f.forEach(e=>g.insertBefore(e)),g.insertBefore(p)):(g.insertAfter(p),g=p,f.forEach(e=>{g.insertAfter(e),g=e})),n.setTextNodeRange(s,a,c,o),!0}function a4(e,t){let n=W();if(!K(n))return!1;let{anchor:r,focus:i}=n,a=r.getNode(),o=i.getNode(),s=e===gR;if(!t4(n)||!z2(a)&&!jI(a)||!z2(o)&&!jI(o))return!1;let c=o,l=s2(c)===`rtl`?!s:s,u=r.key,d=r.offset,f=r.type;if(l){let e=c2(c,i.offset);if(e!==null){let{node:t,offset:r}=e;SI(t)?t.selectNext(0,0):n.setTextNodeRange(t,r,t,r)}else c.getParentOrThrow().selectStart()}else l2(c).select();return t.shiftKey&&n.anchor.set(u,d,f),t.preventDefault(),t.stopPropagation(),!0}function o4(e,t,n){return kz(...n?[e.registerCommand(rR,e=>!e.altKey&&CW(D2,e),uL),e.registerCommand(aR,e=>CW(D2,e),uL),e.registerCommand(oR,e=>!e.altKey&&wW(D2,e),uL),e.registerCommand(iR,e=>wW(D2,e),uL)]:[],e.registerCommand(pR,t=>{let n=function(e){let t=W();if(!K(t)||!t4(t))return null;let n=e?_R:FL,r=e?_R:RL,i=t.anchor,a=t.focus;if(i.is(a))return r;let o=n4(t);if(o.length!==1)return n;let s=o[0],c,l;s.length===0&&r2(285),t.isBackward()?(c=a,l=i):(c=i,l=a);let u=a2(s[0]),d=o2(s[0]),f=DF(u.getKey(),0,`text`),p=DF(d.getKey(),d.getTextContentSize(),`text`);return c.isBefore(f)||p.isBefore(l)?n:f.isBefore(c)||l.isBefore(p)?r:n}(t.shiftKey);return n!==null&&(t.preventDefault(),e.dispatchCommand(n),!0)},uL),e.registerCommand(RL,()=>!!t4(W())&&(pI([kF()]),!0),uL),e.registerCommand(FL,()=>r4(FL),uL),e.registerCommand(_R,()=>r4(_R,t),uL),e.registerCommand(oR,e=>{let t=W();if(!K(t))return!1;let{anchor:n}=t,r=n.getNode();if(!t4(t))return!1;let i=r.getParent();return t.isCollapsed()&&n.offset===0&&r.getPreviousSibling()===null&&D2(i)&&i.getPreviousSibling()===null?(e.preventDefault(),!0):i4(oR,e)},uL),e.registerCommand(rR,e=>{let t=W();if(!K(t))return!1;let{anchor:n}=t,r=n.getNode();return!!t4(t)&&(t.isCollapsed()&&n.offset===r.getTextContentSize()&&r.getNextSibling()===null&&D2(r.getParentOrThrow())&&r.getParentOrThrow().getNextSibling()===null?(e.preventDefault(),!0):i4(rR,e))},uL),e.registerCommand(gR,e=>a4(gR,e),uL),e.registerCommand(hR,e=>a4(hR,e),uL))}var s4={build:(e,t)=>_V(t),config:{disabled:!1,escapeWithArrows:!1,tabSize:void 0},dependencies:[$2],name:`@lexical/code-indent`,register:(e,t,n)=>{let r=n.getOutput();return fV(()=>{if(!r.disabled.value)return o4(e,r.tabSize.value,r.escapeWithArrows.value)})}},c4=t2,l4=c4.$createCodeHighlightNode,u4=c4.$createCodeNode,d4=c4.$getCodeLineDirection,f4=c4.$getEndOfCodeInLine,p4=c4.$getFirstCodeNodeOfLine,m4=c4.$getLastCodeNodeOfLine,h4=c4.$getStartOfCodeInLine,g4=c4.$isCodeHighlightNode,_4=c4.$isCodeNode,v4=c4.$outdentLeadingSpaces;c4.$plainifyCodeContent;var y4=c4.CodeExtension,b4=c4.CodeHighlightNode;c4.CodeImportExtension,c4.CodeImportRules;var x4=c4.CodeIndentExtension,S4=c4.CodeNode,C4=c4.DEFAULT_CODE_LANGUAGE,w4=c4.getDefaultCodeLanguage;c4.registerCodeIndentation;var T4=t({$convertFromMarkdownString:()=>s6,$convertSelectionToMarkdownString:()=>u6,$convertToMarkdownString:()=>l6,$generateNodesFromMarkdownString:()=>c6,BOLD_ITALIC_STAR:()=>y3,BOLD_ITALIC_UNDERSCORE:()=>b3,BOLD_STAR:()=>x3,BOLD_UNDERSCORE:()=>S3,CHECK_LIST:()=>h3,CODE:()=>p3,ELEMENT_TRANSFORMERS:()=>O3,HEADING:()=>d3,HIGHLIGHT:()=>v3,INLINE_CODE:()=>_3,ITALIC_STAR:()=>w3,ITALIC_UNDERSCORE:()=>T3,LINK:()=>D3,MULTILINE_ELEMENT_TRANSFORMERS:()=>k3,ORDERED_LIST:()=>g3,QUOTE:()=>f3,STRIKETHROUGH:()=>C3,TEXT_FORMAT_TRANSFORMERS:()=>A3,TEXT_MATCH_TRANSFORMERS:()=>j3,TRANSFORMERS:()=>N3,UNORDERED_LIST:()=>m3,isTableRowDivider:()=>U4,registerMarkdownShortcuts:()=>o6});function E4(e,t){let n={};for(let r of e){let e=t(r);e&&(n[e]?n[e].push(r):n[e]=[r])}return n}function D4(e){let t=E4(e,e=>e.type);return{element:t.element||[],multilineElement:t[`multiline-element`]||[],textFormat:t[`text-format`]||[],textMatch:t[`text-match`]||[]}}var O4=/[!-/:-@[-`{-~\\s]/,k4=/\\s/,A4=/[!\"#$%&'()*+,\\-./:;<=>?@[\\]^_`{|}~]/,j4=/^\\s{0,3}$/;function M4(e){if(!wI(e))return!1;let t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&q(t)&&j4.test(t.getTextContent())}function N4(e){return e.replace(/\\\\([!-/:-@[-`{-~])/g,`$1`).replace(/&#(\\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}var P4=/^(\\s*)(\\d{1,})\\.\\s/,F4=/^(\\s*)[-*+]\\s/,I4=/^(\\s*)(?:[-*+]\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,L4=/^(#{1,6})\\s/,R4=/^>\\s/,z4=/^([ \\t]*`{3,})([\\w-]+)?[ \\t]?/,B4=/^[ \\t]*`{3,}$/,V4=/^[ \\t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,H4=/^(?:\\|)(.+)(?:\\|)\\s?$/;function U4(e){if(e[0]!==`|`)return!1;let{length:t}=e,n=1,r=0;for(;n<t;){let t=n;for(e[t]===` `&&t++,e[t]===`:`&&t++;e[t]===`-`;)t++;if(e[t]===`:`&&t++,e[t]===` `&&t++,e[t]!==`|`)break;r++,n=t+1}return r>0&&(n===t||n===t-1&&/\\s/.test(e[n]))}var W4=/^<[a-z_][\\w-]*(?:\\s[^<>]*)?\\/?>/i,G4=/^<\\/[a-z_][\\w-]*\\s*>/i,K4=e=>RegExp(`(?:${e.source})$`,e.flags),q4=GR(`mdListMarker`,{parse:e=>typeof e==`string`&&/^[-*+]$/.test(e)?e:`-`,resetOnCopyNode:!0}),J4=GR(`mdCodeFence`,{parse:e=>typeof e==`string`&&/^`{3,}$/.test(e)?e:\"```\",resetOnCopyNode:!0}),Y4=GR(`mdCodeMeta`,{parse:e=>typeof e==`string`?e:``,resetOnCopyNode:!0}),X4=GR(`mdHardLineBreak`,{parse:e=>typeof e==`string`&&/^(\\\\| {2,})$/.test(e)?e:``,resetOnCopyNode:!0});function Z4(e){if(e.endsWith(`\\\\`)){let t=0;for(let n=e.length-1;n>=0&&e[n]===`\\\\`;n--)t++;return t%2==1?[e.slice(0,-1),`\\\\`]:null}let t=e.match(/^(.*?\\S)( {2,})$/);return t?[t[1],t[2]]:null}function Q4(e){let t=e.getChildren(),n=t.length-1,r=t[n];if(!q(r))return null;let i=r.getTextContent(),a=Z4(i);if(a!==null){let[e,t]=a;return r.setTextContent(e),t}return/^ {2,}$/.test(i)&&function(e,t){for(let n=t-1;n>=0;n--){if(SI(e[n]))return!1;if(/\\S/.test(e[n].getTextContent()))return!0}return!1}(t,n)?(r.setTextContent(``),i):null}function $4(e){let t=wF(),n=Q4(e);return n!==null&&KI(t,X4,n),t}function e3(e){return fX(e)}function t3(e,t){let n=0;for(;n<t&&(e[n]===` `||e[n]===`\t`);)n++;return e.slice(n)}function n3(e,t){let n=e.getLastChild();t&&_4(n)&&KI(n,Y4,t)}var r3=e=>(t,n,r,i)=>{let a=e(r);a.append(...n),t.replace(a),i||a.select(0,0)};function i3(e){let t=0;for(let n of e)t+=n===`\t`?4-t%4:1;return t}var a3=null,o3=!1;function s3(e,t,n,r){for(let n=e.length;n<t;n++)e[n]=4*(n+1);e.length=t,e[t]=function(e,t){let n=e[0];if(t===`check`){let t=n.slice(e[1].length).match(/^[-*+]\\s/);t&&(n=e[1]+t[0])}return Math.min(i3(n),i3(e[1])+4)}(n,r)}var c3=e=>(t,n,r,i)=>{if(dX(t)||!i&&e3(t))return!1;let a=t.getPreviousSibling(),o=t.getNextSibling(),s=E1(e===`check`?/^x$/i.test(r[3]||``):void 0),c=r[0].trim()[0],l=e!==`bullet`&&e!==`check`||c!==q4.parse(c)?void 0:c,u=a3,d=a;if(u!==null){if(o3)for(;d!==null&&M4(d);)d=d.getPreviousSibling();k1(d)||(u.length=0)}let f=u===null||u.length===0?function(e){let t=e.match(/\\t/g),n=e.match(/ /g),r=0;return t&&(r+=t.length),n&&(r+=Math.floor(n.length/4)),r}(r[1]):function(e,t){let n=i3(t);for(let t=e.length-1;t>=0;t--)if(n>=e[t])return t+1;return 0}(u,r[1]);if(k1(o)&&o.getListType()===e){let n=o.getFirstChild();n===null?o.append(s):n.insertBefore(s),e===`number`&&f===0&&o.setStart(Number(r[2])),t.remove()}else if(k1(d)&&(d.getListType()===e||f>0))d.append(s),t.remove();else{let n=D1(e,e===`number`?Number(r[2]):void 0);n.append(s),t.replace(n)}s.append(...n),i||s.select(0,0),f&&(s.setIndent(f),function(e,t,n){let r=e.getParent();if(!k1(r)||r.getListType()===t)return;let i=r.getParent();if(!O1(i))return;let a=D1(t,t===`number`?Number(n[2]):void 0),o=e.getPreviousSibling()===null;a.append(e);let s=E1();s.append(a),o?i.insertBefore(s):i.insertAfter(s),r.getChildrenSize()===0&&i.remove()}(s,e,r));let p=s.getParent();l&&k1(p)&&KI(p,q4,l),u!==null&&s3(u,f,r,e)},l3=(e,t,n,r)=>{let i=[],a=e.getChildren(),o=0;for(let s of a)if(O1(s)){if(s.getChildrenSize()===1){let e=s.getFirstChild();if(k1(e)){let a=l3(e,t,n+1,r);a&&i.push(a);continue}}if(r&&!s.getChildren().some(e=>e.isSelected(r)))continue;let a=` `.repeat(4*n),c=e.getListType(),l=lI(e,q4),u=c===`number`?`${e.getStart()+o}. `:c===`check`?`${l} [${s.getChecked()?`x`:` `}] `:l+` `,d=t(s);c!==`number`&&(d=d.replace(/^(\\s{0,3}\\d+)(\\.\\s)/,`$1\\\\$2`)),i.push(a+u+d),o++}return i.join(`\n`)},u3=r3(e=>lX(`h`+e[1].length)),d3={dependencies:[pX],export:(e,t)=>{if(!dX(e))return null;let n=Number(e.getTag().slice(1));return`#`.repeat(n)+` `+t(e)},regExp:L4,replace:(e,t,n,r)=>!(!r&&e3(e))&&u3(e,t,n,r),triggerOnEnter:!0,type:`element`},f3={dependencies:[mX],export:(e,t)=>{if(!fX(e))return null;let n=t(e).split(`\n`),r=[];for(let e of n)r.push(`> `+e);return r.join(`\n`)},regExp:R4,replace:(e,t,n,r)=>{if(r){let n=e.getPreviousSibling();if(fX(n))return n.splice(n.getChildrenSize(),0,[$4(n),...t]),void e.remove()}let i=uX();i.append(...t),e.replace(i),r||i.select(0,0)},triggerOnEnter:!0,type:`element`},p3={dependencies:[S4],export:e=>{if(!_4(e))return null;let t=e.getTextContent(),n=lI(e,J4);if(t.indexOf(n)>-1){let e=t.match(/`{3,}/g);if(e){let t=Math.max(...e.map(e=>e.length));n=\"`\".repeat(t+1)}}let r=e.getLanguage()||``,i=r?lI(e,Y4):``;return n+r+(i?` `+i:``)+(t?`\n`+t:``)+`\n`+n},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{let i=r[1],a=i.trim().length,o=e[n],s=r.index+i.length,c=o.slice(s),l=RegExp(`\\`{${a},}$`);if(l.test(c)){let e=c.match(l),i=c.slice(0,c.lastIndexOf(e[0])),a=[...r];return a[2]=``,p3.replace(t,null,a,e,[i],!0),[!0,n]}let u=RegExp(`^[ \\\\t]*\\`{${a},}$`);for(let i=n+1;i<e.length;i++){let a=e[i];if(u.test(a)){let s=a.match(u),c=e.slice(n+1,i),l=r[2]?o.slice(r[0].length).trim():``;return c.unshift(l?``:o.slice(r[0].length)),p3.replace(t,null,r,s,c,!0),n3(t,l),[!0,i]}}let d=e.slice(n+1);return d.unshift(o.slice(r[0].length)),p3.replace(t,null,r,null,d,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:B4},regExpStart:z4,replace:(e,t,n,r,i,a)=>{let o,s,c=n[1]?n[1].trim():\"```\",l=n[2]||void 0,u=n[1]?n[1].length-n[1].trimStart().length:0;if(!t&&i){if(i.length===1)r?(o=u4(l),s=t3(i[0],u)):(o=u4(l),s=i[0].startsWith(` `)?i[0].slice(1):i[0]);else{for(o=u4(l),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(` `)&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.map(e=>t3(e,u)).join(`\n`)}KI(o,J4,c);let t=AF(s);o.append(t),e.append(o)}else if(t){if(!a&&e3(e))return!1;r3(e=>u4(e?e[2]:void 0))(e,t,n,a)}},type:`multiline-element`},m3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:F4,replace:c3(`bullet`),triggerOnEnter:!0,type:`element`},h3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:I4,replace:c3(`check`),triggerOnEnter:!0,type:`element`},g3={dependencies:[P1,N1],export:(e,t,n)=>k1(e)?l3(e,t,0,n):null,regExp:P4,replace:c3(`number`),triggerOnEnter:!0,type:`element`},_3={format:[`code`],tag:\"`\",type:`text-format`},v3={format:[`highlight`],tag:`==`,type:`text-format`},y3={format:[`bold`,`italic`],tag:`***`,type:`text-format`},b3={format:[`bold`,`italic`],intraword:!1,tag:`___`,type:`text-format`},x3={format:[`bold`],tag:`**`,type:`text-format`},S3={format:[`bold`],intraword:!1,tag:`__`,type:`text-format`},C3={format:[`strikethrough`],tag:`~~`,type:`text-format`},w3={format:[`italic`],tag:`*`,type:`text-format`},T3={format:[`italic`],intraword:!1,tag:`_`,type:`text-format`};function E3(e){return e.replace(/&(?=#\\d+;|#[Xx][\\dA-Fa-f]+;|[A-Za-z][\\dA-Za-z]*;)/g,`&`)}var D3={dependencies:[K0],export:(e,t,n)=>{if(!W0(e)||U0(e))return null;let r=t(e),i=e.getTitle();i!=null&&(i=E3(i).replace(/([\\\\\"])/g,`\\\\$1`));let a=e.getURL(),o=E3(a),s=a===``||/\\s/.test(a)?`<${o.replace(/([\\\\<>])/g,`\\\\$1`).replace(/\\r/g,` `).replace(/\\n/g,` `)}>`:o.replace(/([\\\\()])/g,`\\\\$1`).replace(/^</,`\\\\<`);return i?`[${r}](${s} \"${i}\")`:`[${r}](${s})`},importRegExp:/(?:\\[(.+?)\\])(?:\\(\\s*(?:(?:<((?:\\\\.|[^<>\\n\\\\])*)>|((?!<)(?:\\\\[^\\s]|\\\\(?=\\s)|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\])*\\))*\\))*\\)|[^\\s()\\\\])+))(?:\\s+(?:\"((?:[^\"]*\\\\\")*[^\"]*)\"|'((?:[^']*\\\\')*[^']*)'|\\(((?:\\\\.|[^()\\\\])*)\\)))?\\s*)?\\))/,regExp:/(?:\\[([^[\\]]*(?:\\[[^[\\]]*\\][^[\\]]*)*)\\])(?:\\(\\s*(?:(?:<((?:\\\\.|[^<>\\n\\\\])*)>|((?!<)(?:\\\\[^\\s]|\\\\(?=\\s)|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\]|\\((?:\\\\[^\\s]|[^\\s()\\\\])*\\))*\\))*\\)|[^\\s()\\\\])+))(?:\\s+(?:\"((?:[^\"]*\\\\\")*[^\"]*)\"|'((?:[^']*\\\\')*[^']*)'|\\(((?:\\\\.|[^()\\\\])*)\\)))?\\s*)?\\))$/,replace:(e,t)=>{if(NF(e,W0))return;let[,n,r,i,a,o,s]=t,c=N4(r??i??``),l=a??o??s,u=H0(c,{title:l==null?void 0:N4(l)}),d=n.split(`[`).length-1,f=n.split(`]`).length-1,p=n,m=``;if(d<f)return;if(d>f){let e=n.split(`[`);m=`[`+e[0],p=e.slice(1).join(`[`)}let h=e.getFormat(),g=AF(p);return g.setFormat(h),u.append(g),e.replace(u),m&&u.insertBefore(AF(m).setFormat(h)),g},trigger:`)`,type:`text-match`},O3=[d3,f3,m3,g3],k3=[p3],A3=[_3,y3,b3,x3,S3,v3,w3,T3,C3],j3=[D3];function M3(...e){return e.flat()}var N3=M3(O3,k3,A3,j3);function P3(e,t=!1){let n=e.split(`\n`),r=0,i=[];for(let e=0;e<n.length;e++){let a=n[e],o=a.trimEnd(),s=i[i.length-1],c=e<n.length-1?Z4(a):null,l=s!==void 0&&Z4(s)!==null;if(V4.test(o))i.push(o);else if(r===0){{let e=o.match(z4);if(e){r=e[1].trim().length,i.push(o);continue}}o===``||s===``||!s||L4.test(s)||L4.test(o)||R4.test(o)||P4.test(o)||F4.test(o)||I4.test(o)||H4.test(o)||U4(o)||l||!t||W4.test(o)||G4.test(o)||K4(G4).test(s)||K4(W4).test(s)||B4.test(s)?i.push(!t&&o!==``||c!==null?a:o):i[i.length-1]=s+` `+(c===null?o:a).trimStart()}else{if(B4.test(o)&&o.trim().length>=r){r=0,i.push(o);continue}i.push(a)}}return i.join(`\n`)}function F3(e,t,n,r,i,a){let o=e.isSelected(t);for(let s of n){if(!s.export)continue;let n=s.export(e,e=>I3(e,t,r,i,a).markdown,t);if(n!=null)return!o&&G(e)&&I3(e,t,r,i,a).shouldInclude&&(o=!0),{markdown:n,shouldInclude:o}}if(G(e)){let n=I3(e,t,r,i,a);return{markdown:n.markdown,shouldInclude:o||n.shouldInclude}}return _I(e)?{markdown:e.getTextContent(),shouldInclude:o}:{markdown:null,shouldInclude:o}}function I3(e,t,n,r,i,a,o){let s=[],c=e.getChildren(),l=!1;a||=[],o||=[];t:for(let e of c){let c=e.isSelected(t);for(let u of r){if(!u.export)continue;let d=u.export(e,e=>I3(e,t,n,r,i,a,[...o,...a]).markdown,(e,r)=>B3(e,mU(t,e,`clone`).getTextContent(),n,a,o,i));if(d!=null){!c&&G(e)&&e.getChildren().some(e=>e.isSelected(t))&&e.extractWithChild(e,t,`html`)&&(c=!0),c&&(s.push(d),l=!0);continue t}}if(SI(e))c&&(s.push(z3(e)),l=!0);else if(q(e)){if(c){let r=mU(t,e,`clone`);s.push(B3(e,r.getTextContent(),n,a,o,i)),l=!0}}else if(G(e)){let u=I3(e,t,n,r,i,a,o);!c&&u.shouldInclude&&e.extractWithChild(e,t,`html`)&&(c=!0),(c||u.shouldInclude)&&(s.push(u.markdown),l=!0)}else _I(e)&&c&&(s.push(e.getTextContent()),l=!0)}return{markdown:s.join(``),shouldInclude:l}}function L3(e,t,n,r,i){for(let a of t){if(!a.export)continue;let t=a.export(e,e=>R3(e,n,r,void 0,void 0,i));if(t!=null)return t}return G(e)?R3(e,n,r,void 0,void 0,i):_I(e)?e.getTextContent():null}function R3(e,t,n,r,i,a=!1){let o=[],s=e.getChildren();r||=[],i||=[];t:for(let e of s){for(let s of n){if(!s.export)continue;let c=s.export(e,e=>R3(e,t,n,r,[...i,...r],a),(e,n)=>B3(e,n,t,r,i,a));if(c!=null){o.push(c);continue t}}SI(e)?o.push(z3(e)):q(e)?o.push(B3(e,e.getTextContent(),t,r,i,a)):G(e)?o.push(R3(e,t,n,r,i,a)):_I(e)&&o.push(e.getTextContent())}return o.join(``)}function z3(e){return lI(e,X4)+`\n`}function B3(e,t,n,r,i,a=!1){let o=e.hasFormat(`code`),s,c,l,u,d=t;if(o||(d=a?d.replace(/([*_`~])/g,`\\\\$1`):d.replace(/([*_`~\\\\])/g,`\\\\$1`)),o){let{fence:e,padded:n}=function(e){let t=e.match(/`+/g),n=t?Math.max(...t.map(e=>e.length)):0;return{fence:\"`\".repeat(n+1),padded:e.length===0||e.includes(\"`\")||/^\\s/.test(e)&&/\\s$/.test(e)?` ${e} `:e}}(t);s=``,l=``,c=e+n+e,u=!1}else{let e=d.match(/^(\\s*)(.*?)(\\s*)$/s)||[``,``,d,``];s=e[1],c=e[2],l=e[3],u=c===``}let f=``,p=``,m=``,h=V3(e,!0),g=V3(e,!1),_=new Set;for(let t of n){let n=t.format[0],i=t.tag;n!==`code`&&(u||!U3(e,n)||_.has(n)||(_.add(n),U3(h,n)&&r.find(e=>e.tag===i)||(r.push({format:n,tag:i}),f+=i)))}for(let t=0;t<r.length;t++){let n=H3(e,r[t].format),a=H3(g,r[t].format);if(n&&a)continue;let o=[...r];for(;o.length>t;){let e=o.pop();i&&e&&i.find(t=>t.tag===e.tag)||(e&&typeof e.tag==`string`&&(n?a||(m+=e.tag):p+=e.tag),r.pop())}break}return u&&!e.hasFormat(`code`)?p+d:p+s+f+c+m+l}function V3(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();return q(n)?n:null}function H3(e,t){return q(e)&&e.hasFormat(t)}function U3(e,t){return!!H3(e,t)&&(t===`code`||!e||!/^\\s*$/.test(e.getTextContent()))}function W3(e,t){let n=e.getTextContent(),r=t.transformersByTag[\"`\"],i=[],a=null;if(r){let e=function(e){let t=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\\\`;r--)n++;return n%2==1},n=[],r=0;for(;r<e.length;)if(e[r]===\"`\"){let t=1;for(;r+t<e.length&&e[r+t]===\"`\";)t++;n.push({index:r,length:t}),r+=t}else r++;let i=[],a=0;for(;a<n.length;){let r=n[a];if(t(r.index)){a++;continue}let o=-1;for(let e=a+1;e<n.length;e++)if(n[e].length===r.length){o=e;break}if(o===-1){a++;continue}let s=n[o],c=e.slice(r.index+r.length,s.index);c.length>=2&&c.startsWith(` `)&&c.endsWith(` `)&&/[^ ]/.test(c)&&(c=c.slice(1,-1)),i.push({content:c,endIndex:s.index+s.length,startIndex:r.index}),a=o+1}return i}(n);for(let t of e)a||={content:t.content,endIndex:t.endIndex,startIndex:t.startIndex,tag:\"`\"},i.push({end:t.endIndex,start:t.startIndex})}let o=function(e,t,n=[]){let r=[],i=new Set(Object.keys(t.transformersByTag).filter(e=>e[0]!==\"`\").map(e=>e[0])),a=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\\\`;r--)n++;return n%2==1},o=e=>n.some(t=>e>=t.start&&e<t.end),s=0;for(;s<e.length;){let t=e[s];if(!i.has(t)||a(s)||o(s)){s++;continue}let n=1;for(;s+n<e.length&&e[s+n]===t;)n++;let c=G3(t,e,s,n,!0),l=G3(t,e,s,n,!1);(c||l)&&r.push({active:!0,canClose:l,canOpen:c,char:t,index:s,length:n}),s+=n}return r}(n,t,i),s=o.length>0?function(e,t,n){let r={},i=0,a=null;for(;i<t.length;){let o=t[i];if(!o.active||!o.canClose||o.length===0){i++;continue}let s=`${o.char}${o.canOpen}${o.length%3}`,c=r[s]??-1,l=!1;for(let r=i-1;r>c;r--){let s=t[r];if(!s.active||!s.canOpen||s.length===0||s.char!==o.char||(s.canClose||o.canOpen)&&(s.length+o.length)%3==0&&s.length%3!=0&&o.length%3!=0)continue;let c=Math.min(s.length,o.length),u=Object.keys(n.transformersByTag).filter(e=>e[0]===s.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!u)continue;l=!0;let d=u.length,f={content:e.slice(s.index+s.length,o.index),endIndex:o.index+d,startIndex:s.index+(s.length-d),tag:u};(!a||f.startIndex<a.startIndex||f.startIndex===a.startIndex&&f.endIndex>a.endIndex)&&(a=f);for(let e=r+1;e<i;e++)t[e].active=!1;s.length-=d,o.length-=d,s.active=s.length>0,o.length>0?o.index+=d:(o.active=!1,i++);break}l||(r[s]=i-1,o.canOpen||(o.active=!1),i++)}return a}(n,o,t):null,c=null,l=null;if(a&&s?s.startIndex<=a.startIndex&&s.endIndex>=a.endIndex?(c=s,l=t.transformersByTag[s.tag]):(c=a,l=r):a?(c=a,l=r):s&&(c=s,l=t.transformersByTag[s.tag]),!c||!l)return null;let u=[n.slice(c.startIndex,c.endIndex),c.tag,c.content];return u.index=c.startIndex,u.input=n,{endIndex:c.endIndex,isCodeSpan:l===r,match:u,startIndex:c.startIndex,transformer:l}}function G3(e,t,n,r,i){if(!K3(t,n,r,i))return!1;if(e===`*`)return!0;if(e===`_`){if(!K3(t,n,r,!i))return!0;let e=i?t[n-1]:t[n+r];return e!==void 0&&A4.test(e)}return!0}function K3(e,t,n,r){let i=e[t-1],a=e[t+n],[o,s]=r?[a,i]:[i,a];return o!==void 0&&!k4.test(o)&&(!A4.test(o)||s===void 0||k4.test(s)||A4.test(s))}function q3(e){return q(e)&&!e.hasFormat(`code`)}function J3(e,t,n){let r=W3(e,t),i=function(e,t){let n=e,r,i,a,o;for(let e of t){if(!e.replace||!e.importRegExp)continue;let t=n.getTextContent().match(e.importRegExp);if(!t)continue;let s=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):s+t[0].length;!1!==c&&(r===void 0||i===void 0||s<r&&(c>i||c<=r))&&(r=s,i=c,a=e,o=t)}return r===void 0||i===void 0||a===void 0||o===void 0?null:{endIndex:i,match:o,startIndex:r,transformer:a}}(e,n);if(r&&i&&(r.isCodeSpan?i.startIndex<=r.startIndex&&i.endIndex>=r.endIndex?r=null:i=null:r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){let i=function(e,t,n,r,i){let a=e.getTextContent(),o,s,c;if(i[0]===a?o=e:t===0?[o,s]=e.splitText(n):[c,o,s]=e.splitText(t,n),o.setTextContent(i[2]),r)for(let e of r.format)o.hasFormat(e)||o.toggleFormat(e);return{nodeAfter:s,nodeBefore:c,transformedNode:o}}(e,r.startIndex,r.endIndex,r.transformer,r.match);q3(i.nodeAfter)&&J3(i.nodeAfter,t,n),q3(i.nodeBefore)&&J3(i.nodeBefore,t,n),q3(i.transformedNode)&&J3(i.transformedNode,t,n)}else if(i){let r=function(e,t,n,r,i){let a,o,s;return t===0?[a,o]=e.splitText(n):[s,a,o]=e.splitText(t,n),r.replace?{nodeAfter:o,nodeBefore:s,transformedNode:r.replace(a,i)||void 0}:null}(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!r)return;q3(r.nodeAfter)&&J3(r.nodeAfter,t,n),q3(r.nodeBefore)&&J3(r.nodeBefore,t,n),q3(r.transformedNode)&&J3(r.transformedNode,t,n)}let a=N4(e.getTextContent());e.setTextContent(a)}function Y3(e,t,n,r=!1){let i=D4(n),a=function(e){let t={},n={},r=[];for(let i of e){let{tag:e}=i;t[e]=i;let a=e.replace(/(\\*|\\^|\\+)/g,`\\\\$1`);r.push(a),n[e]=e.length===1?RegExp(e===\"`\"?\"(^|[^\\\\\\\\`])(`)((?:\\\\\\\\`|[^`])+?)(`)(?!`)\":`(^|[^\\\\\\\\${a}])(${a})((\\\\\\\\${a})?.*?[^${a}\\\\s](\\\\\\\\${a})?)(${a})(?![\\\\\\\\${a}])`):RegExp(`(^|[^\\\\\\\\])(${a})((\\\\\\\\${a})?.*?[^\\\\s](\\\\\\\\${a})?)(${a})(?!\\\\\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:RegExp(`(${r.join(`|`)})`,`g`),transformersByTag:t}}(i.textFormat),o=e.split(`\n`),s=o.length;(function(e,t){let n=a3,r=o3;a3=[],o3=e;try{return t()}finally{a3=n,o3=r}})(!r,()=>{for(let e=0;e<s;e++){let n=o[e],[s,c]=X3(o,e,i.multilineElement,t);s?e=c:Z3(n,t,i.element,a,i.textMatch,r)}});let c=t.getChildren();for(let e of c)if(!r&&M4(e)&&t.getChildrenSize()>1)e.remove();else if(G(e))for(let t of e.getAllTextNodes())Q3(t)}function X3(e,t,n,r){for(let i of n){let{handleImportAfterStartMatch:n,regExpEnd:a,regExpStart:o,replace:s}=i,c=e[t].match(o);if(!c)continue;if(n){let a=n({lines:e,rootNode:r,startLineIndex:t,startMatch:c,transformer:i});if(a===null)continue;if(a)return a}let l=typeof a==`object`&&`regExp`in a?a.regExp:a,u=a&&typeof a==`object`&&`optional`in a?a.optional:!a,d=t,f=e.length;for(;d<f;){let n=l?e[d].match(l):null;if(!n&&(!u||u&&d<f-1)){d++;continue}if(n&&t===d&&n.index===c.index){d++;continue}let i=[];if(n&&t===d)i.push(e[t].slice(c[0].length,-n[0].length));else for(let r=t;r<=d;r++)if(r===t){let t=e[r].slice(c[0].length);i.push(t)}else if(r===d&&n){let t=e[r].slice(0,-n[0].length);i.push(t)}else i.push(e[r]);if(!1!==s(r,null,c,n,i,!0))return[!0,d];break}}return[!1,t]}function Z3(e,t,n,r,i,a){let o=AF(e),s=EF();s.append(o),t.append(s);for(let{regExp:t,replace:r}of n){let n=e.match(t);if(n&&(o.setTextContent(e.slice(n[0].length)),!1!==r(s,[o],n,!0)))break}if(J3(o,r,i),s.getParent()!==null&&e.length>0){let e=s.getPreviousSibling();if(!a&&(wI(e)||fX(e)||k1(e))){let t=e;if(k1(e)){let n=e.getLastDescendant();t=n==null?null:NF(n,O1)}t!=null&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[$4(t),...s.getChildren()]),s.remove())}}}function Q3(e){if(jI(e))return;let t=e.getTextContent();if(!t.includes(`\t`))return;let n=e.getFormat(),r=e.getStyle(),i=[],a=0;for(let e=t.indexOf(`\t`);e!==-1;e=t.indexOf(`\t`,e+1))e>a&&i.push(AF(t.slice(a,e)).setFormat(n).setStyle(r)),i.push(kF()),a=e+1;a<t.length&&i.push(AF(t.slice(a)).setFormat(n).setStyle(r)),e.getParentOrThrow().splice(e.getIndexWithinParent(),1,i)}function $3(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e6(e,t,n,r,i){if(!EI(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExp:o,replace:s}of r){let r=a.match(o),c=i||r&&r[0].endsWith(` `)?n:n-1;if(r&&r[0].length===c){let i=t.getNextSiblings(),[a,o]=t.splitText(n);if(!1!==s(e,o?[o,...i]:i,r,!1))return a.remove(),!0}}return!1}function t6(e,t,n,r,i){if(!EI(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExpStart:o,replace:s,regExpEnd:c}of r){if(c&&!(`optional`in c)||c&&`optional`in c&&!c.optional)continue;let r=a.match(o);if(r){let a=i||r[0].endsWith(` `)?n:n-1;if(r[0].length!==a)continue;let o=t.getNextSiblings(),[c,l]=t.splitText(n);if(!1!==s(e,l?[l,...o]:o,r,null,null,!1))return c.remove(),!0}}return!1}function n6(e,t){let n=0,r=e.getTextContent();for(let e=0;e<t;e++)r[e]===\"`\"&&n++;return n%2!=0}function r6(e,t,n){let r=n.length;for(let i=t;i>=r;i--){let t=i-r;if(a6(e,t,n,0,r)&&e[t+r]!==` `)return t}return-1}function i6(e){let t=e.getNode(),n=0;if(q(t))n=e.offset;else if(G(t))for(let r of t.getChildren().slice(0,e.offset))n+=r.getTextContentSize();for(let e=t.getPreviousSibling();e!==null;e=e.getPreviousSibling())n+=e.getTextContentSize();return n}function a6(e,t,n,r,i){for(let a=0;a<i;a++)if(e[t+a]!==n[r+a])return!1;return!0}function o6(e,t=N3){let n=D4(t),r=n.element.filter(e=>e.triggerOnEnter),i=E4(n.textFormat,({tag:e})=>e[e.length-1]),a=E4(n.textMatch,({trigger:e})=>e),o=new Set([` `]);for(let e of n.textFormat)o.add(e.tag.slice(-1));for(let e of n.textMatch)e.trigger!==void 0&&o.add(e.trigger);for(let n of t){let t=n.type;if(t===`element`||t===`text-match`||t===`multiline-element`){let t=n.dependencies;for(let n of t)e.hasNode(n)||$3(173,n.getType())}}let s=(e,t,r)=>!!e6(e,t,r,n.element)||!!t6(e,t,r,n.multilineElement)||!!function(e,t,n){let r=e.getTextContent(),i=n[r[t-1]];if(i==null)return!1;t<r.length&&(r=r.slice(0,t));for(let t of i){if(!t.replace||!t.regExp)continue;let n=r.match(t.regExp);if(n===null)continue;let i=n.index||0,a=i+n[0].length,o;return i===0?[o]=e.splitText(a):[,o]=e.splitText(i,a),o.selectNext(0,0),t.replace(o,n),!0}return!1}(t,r,a)||!!function(e,t,n){let r=e.getTextContent(),i=t-1,a=r[i],o=n[a];if(!o)return!1;for(let t of o){let{tag:n}=t,o=n.length,s=i-o+1;if(o>1&&!a6(r,s,n,0,o)||r[s-1]===` `)continue;let c=r[i+1];if(!1===t.intraword&&c&&!O4.test(c))continue;let l=e,u=l,d=r6(r,s,n),f=u;for(;d<0&&(f=f.getPreviousSibling())&&!SI(f);)if(q(f)){if(f.hasFormat(`code`))continue;let e=f.getTextContent();u=f,d=r6(e,e.length,n)}if(d<0||u===l&&d+o===s)continue;let p=u.getTextContent();if(d>0&&p[d-1]===a)continue;let m=p[d-1];if(!1===t.intraword&&m&&!O4.test(m)||!t.format.includes(`code`)&&n6(u,d))continue;let h=l.getTextContent(),g=h.slice(0,s)+h.slice(i+1);l.setTextContent(g);let _=u===l?g:p;u.setTextContent(_.slice(0,d)+_.slice(d+o));let v=W(),y=OF();WI(y);let b=i-o*(u===l?2:1)+1;y.anchor.set(u.__key,d,`text`),y.focus.set(l.__key,b,`text`);for(let e of t.format)y.formatText(e,jR[e]);y.anchor.set(y.focus.key,y.focus.offset,y.focus.type);for(let e of t.format)y.hasFormat(e)&&y.toggleFormat(e);return K(v)&&(y.format=v.format),!0}return!1}(t,r,i);return kz(e.registerUpdateListener(({tags:t,dirtyLeaves:n,editorState:r,prevEditorState:i})=>{if(t.has(aL)||t.has(ML)||e.isComposing())return;let a=t.has(fL),c=r.read(W),l=i.read(W);if(!K(l)||!K(c)||!c.isCollapsed()||c.is(l)&&!a)return;let u=c.anchor.key,d=c.anchor.offset,f=r._nodeMap.get(u);if(q(f)&&n.has(u)&&(a||d===1||!(r.read(()=>i6(c.anchor))>i.read(()=>i6(l.anchor))+1))){if(a){let e=r.read(()=>f.getTextContent())[d-1];if(!o.has(e))return}e.update(()=>{if(!q3(f))return;let e=f.getParent();e===null||_4(e)||s(e,f,c.anchor.offset)&&mF(PL)})}}),e.registerCommand(uR,e=>{if(e!==null&&e.shiftKey)return!1;let t=W();if(!K(t)||!t.isCollapsed())return!1;let i=t.anchor.offset,a=t.anchor.getNode();if(!q(a)||!q3(a))return!1;let o=a.getParent();return o===null||_4(o)?!1:i===a.getTextContent().length&&!(!t6(o,a,i,n.multilineElement,!0)&&!e6(o,a,i,r,!0))&&(e!==null&&e.preventDefault(),!0)},uL))}function s6(e,t=N3,n,r=!1,i=!1){let a=r?e:P3(e,i),o=n||nI();o.clear(),Y3(a,o,t,r),W()!==null&&o.selectStart()}function c6(e,t=N3,n=!1,r=!1){let i=n?e:P3(e,r),a=new ZI;return Y3(i,a,t,n),a.getChildren()}function l6(e=N3,t,n=!1){return function(e,t=!1){let n=D4(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let o=[],s=(e||nI()).getChildren();for(let e=0;e<s.length;e++){let c=s[e],l=L3(c,r,a,n.textMatch,t);l!=null&&o.push(i&&e>0&&!M4(c)&&!M4(s[e-1])?`\n${l}`:l)}return o.join(`\n`)}}(e,n)(t)}function u6(e=N3,t,n=!1){return!t||K(t)&&t.isCollapsed()?``:function(e,t=!1){let n=D4(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let o=[],s=null;for(let c of nI().getChildren()){let{shouldInclude:l,markdown:u}=F3(c,e,r,a,n.textMatch,t);l&&u!=null&&(o.push(!i||s===null||M4(c)||M4(s)?u:`\n${u}`),s=c)}return o.join(`\n`)}}(e,n)(t)}var d6=T4;d6.$convertFromMarkdownString,d6.$convertSelectionToMarkdownString,d6.$convertToMarkdownString,d6.$generateNodesFromMarkdownString,d6.BOLD_ITALIC_STAR,d6.BOLD_ITALIC_UNDERSCORE,d6.BOLD_STAR,d6.BOLD_UNDERSCORE,d6.CHECK_LIST,d6.CODE,d6.ELEMENT_TRANSFORMERS,d6.HEADING,d6.HIGHLIGHT,d6.INLINE_CODE,d6.ITALIC_STAR,d6.ITALIC_UNDERSCORE,d6.LINK,d6.MULTILINE_ELEMENT_TRANSFORMERS,d6.ORDERED_LIST,d6.QUOTE,d6.STRIKETHROUGH,d6.TEXT_FORMAT_TRANSFORMERS,d6.TEXT_MATCH_TRANSFORMERS;var f6=d6.TRANSFORMERS;d6.UNORDERED_LIST,d6.isTableRowDivider,d6.registerMarkdownShortcuts,kr(2)+1;var p6={dependencies:[$Q],export:e=>QQ(e)?`***`:null,regExp:/^(---|\\*\\*\\*|___)\\s?$/,replace:(e,t,n,r)=>{let i=ZQ();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},triggerOnEnter:!0,type:`element`};function m6(){return[p6,...f6]}m6();var h6=kr(7);h6+1,h6+2,h6+3,h6+4,h6+5,h6+6;var g6=kr(3);g6+1,g6+2;var _6=kr(2),v6=Symbol(_6),y6=Symbol(_6+1);function b6(e){let[t]=Nl(v6,$x),n=e.editorRef;return ru(()=>{typeof n==`function`?n(t):typeof n==`object`&&n&&(n.current=t)},[t],y6),null}var x6=kr(4);x6+1,x6+2,x6+3,kr(2)+1,HR(`SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND`),Zm([`click`,`mouseenter`]);var S6=kr(9);S6+1,S6+2,S6+3,S6+4,S6+5,S6+6,S6+7,S6+8;var C6=kr(7);C6+1,C6+2,C6+3,C6+4,C6+5,C6+6;var w6=kr(8);w6+1,w6+2,w6+3,w6+4,w6+5,w6+6,w6+7,kr(2)+1,kr(2)+1;var T6=[[`Cat`,`rgb(125, 50, 0)`],[`Dog`,`rgb(100, 0, 0)`],[`Rabbit`,`rgb(150, 0, 0)`],[`Frog`,`rgb(200, 0, 0)`],[`Fox`,`rgb(200, 75, 0)`],[`Hedgehog`,`rgb(0, 75, 0)`],[`Pigeon`,`rgb(0, 125, 0)`],[`Squirrel`,`rgb(75, 100, 0)`],[`Bear`,`rgb(125, 100, 0)`],[`Tiger`,`rgb(0, 0, 150)`],[`Leopard`,`rgb(0, 0, 200)`],[`Zebra`,`rgb(0, 0, 250)`],[`Wolf`,`rgb(0, 100, 150)`],[`Owl`,`rgb(0, 100, 100)`],[`Gull`,`rgb(100, 0, 100)`],[`Squid`,`rgb(150, 0, 150)`]],E6;function D6(){return E6===void 0&&(E6=T6[Math.floor(Math.random()*T6.length)]),E6}function O6(){let[e,t]=D6();return{color:t,isCollabActive:!1,name:e,yjsDocMap:new Map}}O6();var k6=t({default:()=>A6});function A6(e){return()=>{}}var j6=k6.default,M6=kr(4);M6+1,M6+2,M6+3,j6(`LexicalNestedComposer initialNodes is deprecated and will be removed in v0.32.0, it has never worked correctly.\nYou can configure your editor's nodes with createEditor({nodes: [], parentEditor: $getEditor()})`),j6(`LexicalNestedComposer initialEditor should explicitly initialize its namespace when the node configuration differs from the parentEditor. For backwards compatibility, the namespace will be initialized from parentEditor until v0.32.0, but this has always had incorrect copy/paste behavior when the configuration differed.\nYou can configure your editor's namespace with createEditor({namespace: 'nested-editor-namespace', nodes: [], parentEditor: $getEditor()}).`),Az()({format:Yz(JR([``,`left`,`start`,`center`,`right`,`end`,`justify`]),{field:`__format`})}),pr(1,!0);var N6=kr(4);N6+1,N6+2,N6+3,pr(1,!0);var P6=kr(4);P6+1,P6+2,P6+3;var F6=kr(3);F6+1,F6+2,HR(`INSERT_EMBED_COMMAND`);var I6=kr(10);I6+1,I6+2,I6+3,I6+4,I6+5,I6+6,I6+7,I6+8,I6+9,Zm([`dragend`,`dragstart`]);var L6=kr(10);L6+1,L6+2,L6+3,L6+4,L6+5,L6+6,L6+7,L6+8,L6+9,pr(1,!0);var R6=kr(13);R6+6,R6+7,R6+8,R6+9,R6+10,R6+11;var z6=t({$createCodeHighlightNode:()=>l4,$createCodeNode:()=>u4,$getCodeLineDirection:()=>d4,$getEndOfCodeInLine:()=>f4,$getFirstCodeNodeOfLine:()=>p4,$getLastCodeNodeOfLine:()=>m4,$getStartOfCodeInLine:()=>h4,$isCodeHighlightNode:()=>g4,$isCodeNode:()=>_4,$outdentLeadingSpaces:()=>v4,CodeExtension:()=>y4,CodeHighlightNode:()=>b4,CodeIndentExtension:()=>x4,CodeNode:()=>S4,DEFAULT_CODE_LANGUAGE:()=>C4,getDefaultCodeLanguage:()=>w4});z6.$createCodeHighlightNode;var B6=z6.$createCodeNode;z6.$getCodeLineDirection,z6.$getEndOfCodeInLine,z6.$getFirstCodeNodeOfLine,z6.$getLastCodeNodeOfLine,z6.$getStartOfCodeInLine,z6.$isCodeHighlightNode;var V6=z6.$isCodeNode;z6.$outdentLeadingSpaces,z6.CodeExtension,z6.CodeHighlightNode,z6.CodeIndentExtension;var H6=z6.CodeNode;z6.DEFAULT_CODE_LANGUAGE,z6.getDefaultCodeLanguage,pr(1,!0);var U6=qd(`<!><!><!><!><!>`,3,1),W6=qd(`<div></div>`),G6=kr(11),K6={},q6=[pX,mX,P1,N1,K0,G0,H6,$Q],J6={heading1:`h1`,heading2:`h2`,heading3:`h3`,heading4:`h4`,heading5:`h5`,heading6:`h6`},Y6={bold:`bold`,italic:`italic`,underline:`underline`,strikethrough:`strikethrough`,code:`code`,highlight:`highlight`,subscript:`subscript`,superscript:`superscript`},X6={alignLeft:`left`,alignCenter:`center`,alignRight:`right`};function Z6(e,t,n,r){e.update(()=>{let e=W();if(!K(e))return;let i=NF(e.anchor.getNode(),t),a=i!=null&&(!r||r(i));fU(e,()=>a?EF():n())})}function Q6(e,t){let n=Y6[t];if(n){e.dispatchCommand(jL,n);return}let r=X6[t];if(r){e.dispatchCommand(AL,r);return}let i=J6[t];if(i){Z6(e,dX,()=>lX(i),e=>e.getTag()===i);return}switch(t){case`paragraph`:Z6(e,()=>!0,()=>EF(),()=>!1);break;case`blockquote`:Z6(e,fX,()=>uX());break;case`codeBlock`:Z6(e,V6,()=>B6());break;case`bulletList`:e.dispatchCommand(M1,void 0);break;case`orderedList`:e.dispatchCommand(j1,void 0);break;case`taskList`:e.dispatchCommand(A1,void 0);break;case`horizontalRule`:e.dispatchCommand(e$,void 0)}}function $6(e,t){return e.read(()=>{let e=W();if(e==null)return!1;let n=Y6[t];if(n)return K(e)&&e.hasFormat(n);let r=X6[t];if(r)return e.getNodes().some(e=>{let t=NF(e,e=>e.getFormatType!=null);return t!=null&&t.getFormatType()===r});let i=J6[t];if(i)return e.getNodes().some(e=>NF(e,dX)?.getTag()===i);switch(t){case`blockquote`:return e.getNodes().some(e=>NF(e,fX)!=null);case`codeBlock`:return e.getNodes().some(e=>NF(e,V6)!=null);case`bulletList`:case`orderedList`:case`taskList`:{let n=t===`bulletList`?`bullet`:t===`orderedList`?`number`:`check`;return e.getNodes().some(e=>NF(e,k1)?.getListType()===n)}case`link`:return e.getNodes().some(e=>W0(e)||W0(NF(e,W0)));case`horizontalRule`:return CI(e)&&e.getNodes().some(QQ);case`paragraph`:return e.getNodes().some(e=>NF(e,e=>e.getType?.()===`paragraph`));default:return!1}})}function e8(e,t,n){let r=e=>e.getKey()===t||(e.getChildren?.()??[]).some(r),i=0,a=e=>{if(e.getKey()===t)return i+=n,!0;for(let t of e.getChildren?.()??[])if(r(t)){if(a(t))return!0}else i+=t.getTextContentSize?.()??0;return!1};return a(e),i}function t8(e){let t=[];for(let n of Object.keys(Y6))$6(e,n)&&t.push(n);for(let n of[`paragraph`,`heading1`,`heading2`,`heading3`,`heading4`,`heading5`,`heading6`,`blockquote`,`bulletList`,`orderedList`,`taskList`,`codeBlock`,`link`])$6(e,n)&&t.push(n);return t}var n8=Nu(function(e,t,n){t.block;let r=mu(null,G6+0),i=mu(void 0,G6+1),a=mu(void 0,G6+2),o=mu(JSON.stringify([e.json!==void 0,e.value]),G6+3),s=mu(JSON.stringify(e.json),G6+4),c=mu(void 0,G6+5),[l,u]=Ll(null,G6+6);gu(e.ref,()=>l,[l],G6+7);let d={namespace:`octane-xplat/lexical`,nodes:e.web?.replaceNodes?e.web.nodes??[]:[...new Set([...q6,...e.web?.nodes??[]])],editable:e.editable!==!1,editorState:e.json==null?e.value==null?void 0:t=>{let n=Bq(t,new DOMParser().parseFromString(e.value,`text/html`));nI().append(...n)}:JSON.stringify(e.json),onError:e=>{throw e}},f=t=>{t&&c.current?.native!==t&&(r.current=t,c.current={getHTML:()=>t.read(()=>zq(t)),setHTML:e=>t.update(()=>{let n=Bq(t,new DOMParser().parseFromString(e,`text/html`));nI().clear().append(...n)}),getJSON:()=>t.getEditorState().toJSON(),setJSON:e=>t.setEditorState(t.parseEditorState(JSON.stringify(e))),apply:e=>{t.focus(),Q6(t,e)},linkTo:(e,n)=>{n!=null&&n!==``?t.update(()=>{let t=H0(e);t.append(AF(n));let r=W();K(r)&&r.insertNodes([t])}):t.dispatchCommand(q0,e)},removeLink:()=>t.dispatchCommand(q0,null),isActive:e=>$6(t,e),undo:()=>t.dispatchCommand(PR,void 0),redo:()=>t.dispatchCommand(xR,void 0),focus:()=>t.focus(),blur:()=>t.blur(),isFocused:()=>{let e=t.getRootElement();return e!=null&&e===document.activeElement},native:t},u(c.current),e.onJSONReady?.(!0),e.onReady?.())};ru(()=>{if(!r.current)return;let t=JSON.stringify([e.json!==void 0,e.value]);t!==o.current&&(o.current=t,e.json===void 0&&e.value!==void 0&&e.value!==i.current&&c.current?.setHTML(e.value))},[l,e.value,e.json],G6+8),ru(()=>{if(!r.current)return;let t=JSON.stringify(e.json);t!==s.current&&(s.current=t,e.json!==void 0&&t!==a.current&&c.current?.setJSON(e.json))},[l,e.json],G6+9),ru(()=>{r.current?.setEditable(e.editable!==!1)},[l,e.editable],G6+10);let p=(t,n)=>{let r=t.read(()=>zq(n));i.current=r,e.onChange?.(r);let o=t.toJSON();a.current=JSON.stringify(o),e.onJSONChange?.(o),t.read(()=>{let t=W();if(K(t)&&e.onSelectionChange){let r=nI();e.onSelectionChange({start:e8(r,t.anchor.key,t.anchor.offset),end:e8(r,t.focus.key,t.focus.offset),active:t8(n)})}})};if(t.block.pending&&!t.block.crossRenderUpdate)return;function m(t,n,r){let i=n.block,a=n.slots[0];if(a===void 0){let e,t,r,o,s,c,l=Qd(U6);e=i.parentNode;let u=bf(l);t=u;let d=xf(u,1);r=d;let f=xf(d,1);o=f;let p=xf(f,1);s=p,c=xf(p,1),$d(l,i.parentNode,i.endMarker),a=of(n,null,e,t,r,null,void 0,o,s,c,null,void 0)}S_(n,1,a.a,FX,{contentEditable:u_(()=>h_(`c:8bd4dc5e`,jB,{id:e.id,\"aria-placeholder\":e.placeholder??``,placeholder:null,className:`vx-lexical-input`,style:{outline:`none`},onFocus:e.onFocus,onBlur:e.onBlur})),placeholder:e.placeholder?u_(()=>f_(`div`,{className:`vx-lexical-placeholder`,style:{position:`absolute`,inset:`8px auto auto 10px`,pointerEvents:`none`,opacity:.5}},()=>e.placeholder)):null,ErrorBoundary:zX},a.b,void 0,2,void 0,void 0,`c:1283dc87`),a.k=Pv(n,a.k,2,a.a,e.web?.replacePlugins?null:f_(mp,{},()=>R_([h_(`c:2ac25b31`,rZ,{}),h_(`c:8c987b0a`,H1,{}),h_(`c:c85acd4c`,$0,{}),e.autofocus?h_(`c:4e4f8e9d`,dZ,{}):null])),`b:d23e6e54`,a.c,!0,void 0,void 0,void 0),S_(n,3,a.a,sZ,{onChange:p},a.f,void 0,2,void 0,void 0,`c:fbe62b73`),S_(n,4,a.a,b6,{editorRef:f},a.g,void 0,2,void 0,void 0,`c:bcb623dd`),a.l=Pv(n,a.l,5,a.a,e.web?.plugins,`b:6078ff9a`,a.h,!0,void 0,void 0,void 0)}let h=t.slots[0];if(h===void 0){let e,n=Qd(W6);e=n,h=tf(t,n,void 0,e,void 0)}h.a=Vf(t,h.a,h.b,`class`,e.className,`b:748f4137`,`class`);{let t={position:`relative`,...e.style};h.c!==t&&(Vp(h.b,t,h.c),h.c=t)}S_(t,1,h.b,tB,{initialConfig:d,children:Pu(m,K6)},void 0,void 0,void 0,void 0,void 0,`c:9d1ef90e`)}),r8=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`blockquote`,`bulletList`,`orderedList`,`taskList`,`codeBlock`,`horizontalRule`,`highlight`,`subscript`,`superscript`,`paragraph`,`heading1`,`heading2`,`heading3`,`heading4`,`heading5`,`heading6`,`alignLeft`,`alignCenter`,`alignRight`,`link`];function i8(e){let t=null,n=[],r={start:0,end:0,active:[]},i=(e,n={})=>{let i={event:e,html:t?.getHTML()??``,json:t?.getJSON?.()??null,focused:t?.isFocused()??!1,selection:r,...n};window.webkit.messageHandlers.editor.postMessage(JSON.stringify(i))},a=e=>{setTimeout(()=>{t&&(r={...r,active:r8.filter(e=>t.isActive(e))},i(e))},0)},o=r=>{r.method===`props`?(e({...r.args[0],...s}),t&&a(`snapshot`)):t?[`setHTML`,`setJSON`,`apply`,`linkTo`,`removeLink`,`undo`,`redo`,`focus`,`blur`].includes(r.method)&&(t[r.method]?.(...r.args),a(`snapshot`)):n.push(r)},s={ref(e){if(e&&e!==t){t=e,a(`ready`);for(let e of n.splice(0))o(e)}},onChange:()=>a(`change`),onSelectionChange(e){r=e,a(`selection`)},onFocus:()=>a(`focus`),onBlur:()=>a(`blur`)};window.__xplatEditorReceive=e=>{try{o(JSON.parse(e))}catch(e){i(`error`,{message:String(e)})}},window.addEventListener(`error`,e=>i(`error`,{message:e.message})),window.addEventListener(`unhandledrejection`,e=>i(`error`,{message:String(e.reason)})),i(`boot`)}var a8=Jx(document.getElementById(`root`));i8(e=>a8.render(u_(()=>h_(`c:967f4e02`,n8,{...e}))))})();</script></body></html>"
|