@isardsat/editorial-admin 6.0.3 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{authSlice-5XZo_yNS.js → authSlice-B3Tyl-Nw.js} +181 -181
- package/build/client/assets/button-Da66T3Bb.js +1 -0
- package/build/client/assets/{chevron-down-BMtosYlL.js → chevron-down-D_Gla76b.js} +1 -1
- package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
- package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
- package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
- package/build/client/assets/dashboard._collection-MtSHvYYW.js +16 -0
- package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
- package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
- package/build/client/assets/dashboard._layout-BjRnQPQr.js +66 -0
- package/build/client/assets/dashboard.files-DKh39mcB.js +36 -0
- package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
- package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
- package/build/client/assets/home-C2nWtN4c.js +11 -0
- package/build/client/assets/index-Bd1u2_LZ.js +45 -0
- package/build/client/assets/{index-D4Mj6Lef.js → index-BvKqmqc2.js} +1 -1
- package/build/client/assets/index-C-vcF2DZ.js +9 -0
- package/build/client/assets/{index-DZxX-xes.js → index-DeO5nu0f.js} +2 -2
- package/build/client/assets/{input-D-kT9R-x.js → input-BmmdOdbj.js} +2 -2
- package/build/client/assets/itemForm-CDbHkFXh.css +1 -0
- package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
- package/build/client/assets/manifest-2ff77582.js +1 -0
- package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
- package/build/client/assets/root-DS7N36v7.css +1 -0
- package/build/client/assets/root-wKvfXBjk.js +1 -0
- package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
- package/build/client/assets/{tslib.es6-De9GV7Vy.js → tslib.es6-CDuPK5Eb.js} +1 -1
- package/build/client/assets/utils-DslUJpbf.js +1 -0
- package/build/client/index.html +10 -18
- package/package.json +13 -11
- package/build/client/__spa-fallback.html +0 -13
- package/build/client/admin/index.html +0 -22
- package/build/client/assets/button-V-1j5t4f.js +0 -1
- package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
- package/build/client/assets/dashboard-Be6nTcTN.js +0 -1
- package/build/client/assets/dashboard._collection-DppEZSog.js +0 -16
- package/build/client/assets/dashboard._collection._document-DX_V-XK4.js +0 -1
- package/build/client/assets/dashboard._collection.new-CocdSIiG.js +0 -1
- package/build/client/assets/dashboard._layout-Df-C65Il.js +0 -65
- package/build/client/assets/dashboard.files-Doq5nv7_.js +0 -36
- package/build/client/assets/editorialApi-CykQGjTu.js +0 -1
- package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
- package/build/client/assets/home-ZtJfV8P0.js +0 -11
- package/build/client/assets/index-B7e3fQ32.js +0 -9
- package/build/client/assets/index-CMEgjExU.js +0 -46
- package/build/client/assets/itemForm-CcPfHU2b.css +0 -1
- package/build/client/assets/itemForm-ChV6tjGl.js +0 -99
- package/build/client/assets/manifest-a1ca6f8e.js +0 -1
- package/build/client/assets/react-redux-D9l7ZD4q.js +0 -9
- package/build/client/assets/root-BvXgIVX7.js +0 -1
- package/build/client/assets/root-DhulzpWQ.css +0 -1
- package/build/client/assets/utils-BJX_0rcU.js +0 -1
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
var $2=Object.defineProperty;var V2=(e,t,n)=>t in e?$2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Dt=(e,t,n)=>V2(e,typeof t!="symbol"?t+"":t,n);import{r as E,v as k,l as N,w as im,x as H2,y as th,q as B2}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{d as z2,u as $e,B as j2}from"./button-V-1j5t4f.js";import{h as U2,I as Iu,u as W2,F as J2,b as $a,c as Va,d as Ss,e as Ha,i as Ba,f as za,C as K2}from"./input-D-kT9R-x.js";import{m as Z2,n as G2}from"./editorialApi-CykQGjTu.js";import{c as q2}from"./utils-BJX_0rcU.js";import{r as ki,R as Y2}from"./index-B7e3fQ32.js";import{c as ve,u as jr,e as Xn,h as X2,a as Tt,g as Q2}from"./index-D4Mj6Lef.js";import{u as ev,a as Wn,h as qc,R as Yc,b as Xc,E as tv}from"./index-CMEgjExU.js";import{_ as nh}from"./tslib.es6-De9GV7Vy.js";import{c as nv}from"./createLucideIcon-TQsNVzYU.js";/**
|
|
2
|
-
* @license lucide-react v0.487.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const rv=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],iv=nv("save",rv);var ov=Object.defineProperty,sv=(e,t,n)=>t in e?ov(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,or=(e,t,n)=>sv(e,typeof t!="symbol"?t+"":t,n);let lv=class om{constructor(t=new Map){this.map=t}clone(){return new om(new Map(this.map))}increment(t){const n=this.map.get(t)??0;this.map.set(t,n+1)}decrement(t,n){let r=this.map.get(t);r!==void 0&&(r-=1,this.map.set(t,r),r===0&&n())}},ks=class{constructor(){or(this,"map",new Map)}getOrCreate(t){let n=this.map.get(t);return n===void 0&&(n=new Set,this.map.set(t,n)),n}get(t){return this.map.get(t)}use(t,n){const r=this.get(t);r!==void 0&&n(r)}delete(t){return this.map.delete(t)}};function Dr(e,t){return t(e),e}function Qc(){}const sm="cell";function rh(e,t){return e===t}const Bl=new Map;let av=class{constructor(t={}){or(this,"subscriptions",new ks),or(this,"singletonSubscriptions",new Map),or(this,"graph",new ks),or(this,"state",new Map),or(this,"distinctNodes",new Map),or(this,"executionMaps",new Map),or(this,"definitionRegistry",new Set);for(const n of Object.getOwnPropertySymbols(t))this.state.set(n,t[n])}cellInstance(t,n=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,t),n!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,n===!0?rh:n),r}signalInstance(t=!0,n=Symbol()){return t!==!1&&this.distinctNodes.set(n,t===!0?rh:t),n}sub(t,n){this.register(t);const r=this.subscriptions.getOrCreate(t);return r.add(n),()=>r.delete(n)}singletonSub(t,n){return this.register(t),n===void 0?this.singletonSubscriptions.delete(t):this.singletonSubscriptions.set(t,n),()=>this.singletonSubscriptions.delete(t)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(t,n){const r=this.signalInstance();return this.connect({map:i=>(...o)=>{i(o)},sink:r,sources:t}),this.sub(r,n)}pubIn(t){var n;const r=Reflect.ownKeys(t),i=this.getExecutionMap(r),o=i.refCount.clone(),s=i.participatingNodes.slice(),l=new Map(this.state),a=u=>{this.graph.use(u,c=>{for(const{sources:d,sink:f}of c)d.has(u)&&o.decrement(f,()=>{s.splice(s.indexOf(f),1),a(f)})})};for(;;){const u=s.shift();if(u===void 0)break;const c=u;let d=!1;const f=h=>{const g=this.distinctNodes.get(c);if(g!=null&&g(l.get(c),h)){d=!1;return}d=!0,l.set(c,h),this.state.has(c)&&this.state.set(c,h)};if(Object.prototype.hasOwnProperty.call(t,c)?f(t[c]):i.projections.use(c,h=>{for(const g of h){const m=[...Array.from(g.sources),...Array.from(g.pulls)].map(v=>l.get(v));g.map(f)(...m)}}),d){const h=l.get(c);this.inContext(()=>{this.subscriptions.use(c,g=>{for(const m of g)m(h)})}),(n=this.singletonSubscriptions.get(c))==null||n(h)}else a(c)}}connect({sources:t,pulls:n=[],map:r,sink:i}){const o={map:r,pulls:new Set(n),sink:this.register(i),sources:new Set(t)};for(const s of[...t,...n])this.register(s),this.graph.getOrCreate(s).add(o);this.executionMaps.clear()}pub(t,n){this.pubIn({[t]:n})}pipe(t,...n){return this.combineOperators(...n)(t)}transformer(...t){return n=>Dr(this.signalInstance(),r=>(this.link(this.pipe(r,...t),n),r))}link(t,n){this.connect({map:r=>i=>{r(i)},sink:n,sources:[t]})}combine(...t){return Dr(this.signalInstance(),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}combineCells(...t){return Dr(this.cellInstance(t.map(n=>this.getValue(n)),!0),n=>{this.connect({map:r=>(...i)=>{r(i)},sink:n,sources:t})})}getValue(t){return this.register(t),this.state.get(t)}getValues(t){return t.map(n=>this.getValue(n))}register(t){const n=Bl.get(t);return n===void 0||this.definitionRegistry.has(t)?t:(this.definitionRegistry.add(t),Dr(n.type===sm?this.cellInstance(n.initial,n.distinct,t):this.signalInstance(n.distinct,t),r=>{this.inContext(()=>{n.init(this,r)})}))}inContext(t){return t()}changeWith(t,n,r){this.connect({sources:[n],pulls:[t],sink:t,map:i=>(o,s)=>{i(r(s,o))}})}calculateExecutionMap(t){const n=[],r=new Set,i=new ks,o=new lv,s=new ks,l=(a,u=0)=>{o.increment(a),!r.has(a)&&(this.register(a),i.use(a,c=>{u=Math.max(...Array.from(c).map(d=>n.indexOf(d)))+1}),this.graph.use(a,c=>{for(const d of c)d.sources.has(a)?(s.getOrCreate(d.sink).add(d),l(d.sink,u)):i.getOrCreate(d.sink).add(a)}),r.add(a),n.splice(u,0,a))};return t.forEach(l),{participatingNodes:n,pendingPulls:i,projections:s,refCount:o}}getExecutionMap(t){let n=t;if(t.length===1){n=t[0];const i=this.executionMaps.get(n);if(i!==void 0)return i}else for(const[i,o]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===t.length&&i.every(s=>t.includes(s)))return o;const r=this.calculateExecutionMap(t);return this.executionMaps.set(n,r),r}combineOperators(...t){return n=>{for(const r of t)n=r(n,this);return n}}};function ue(e,t=Qc,n=!0){return Dr(Symbol(),r=>{Bl.set(r,{type:sm,distinct:n,initial:e,init:t})})}function lt(e=Qc,t=!1){return Dr(Symbol(),n=>{Bl.set(n,{type:"signal",distinct:t,init:e})})}function xr(e=Qc){return Dr(Symbol(),t=>{Bl.set(t,{type:"signal",distinct:!1,init:e})})}const lm=E.createContext(null);function zl(){const e=E.useContext(lm);if(e===null)throw new Error("useRealm must be used within a RealmContextProvider");return e}function Bt(e){const t=zl();t.register(e);const n=E.useCallback(r=>t.sub(e,r),[t,e]);return E.useSyncExternalStore(n,()=>t.getValue(e),()=>t.getValue(e))}function Ln(...e){const t=zl();return Bt(t.combineCells.apply(t,e))}function Pt(e){const t=zl();return t.register(e),E.useCallback(n=>{t.pub(e,n)},[t,e])}function yi(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{i(e(o))},sink:r,sources:[t]}),r}}function Ue(...e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>(...o)=>{i(o)},pulls:e,sink:r,sources:[t]}),r}}function am(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>()=>{i(e)},sink:r,sources:[t]}),r}}function Wo(e){return(t,n)=>{const r=n.signalInstance();return n.connect({map:i=>o=>{e(o)&&i(o)},sink:r,sources:[t]}),r}}function um(e,t){return(n,r)=>{const i=r.signalInstance();return r.connect({map:o=>s=>{o(t=e(t,s))},sink:i,sources:[n]}),i}}function uv(e,t){return t(e),e}function vi(){}function un(e){return function(t){return{init:n=>{var r;return(r=e.init)==null?void 0:r.call(e,n,t)},postInit:n=>{var r;return(r=e.postInit)==null?void 0:r.call(e,n,t)},update:n=>{var r;return(r=e.update)==null?void 0:r.call(e,n,t)}}}}function cv({children:e,plugins:t}){const n=k.useMemo(()=>uv(new av,r=>{var i,o;for(const s of t)(i=s.init)==null||i.call(s,r);for(const s of t)(o=s.postInit)==null||o.call(s,r)}),[]);return k.useEffect(()=>{var r;for(const i of t)(r=i.update)==null||r.call(i,n)}),k.createElement(lm.Provider,{value:n},e)}const cm=E.createContext(null);function dv(e,t){return{getTheme:function(){return t??null}}}function yt(){const e=E.useContext(cm);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const o of n)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}function q(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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.`)}const cn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fv=cn&&"documentMode"in document?document.documentMode:null,Kt=cn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),dr=cn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),tl=!(!cn||!("InputEvent"in window)||fv)&&"getTargetRanges"in new window.InputEvent("input"),Ao=cn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ti=cn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,hv=cn&&/Android/.test(navigator.userAgent),dm=cn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ih=cn&&hv&&dm,nl=cn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!dm;function rl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}const gv=1,pv=3,mv=9,xv=11,Ur=0,fm=1,Ii=2,yv=0,vv=1,bv=2,il=4,ol=8,ed=128,_v=1792|(112|(3|il|ol)|ed),td=1,nd=2,rd=3,id=4,od=5,sd=6,jl=Ao||Ti||nl?" ":"",Jn=`
|
|
7
|
-
|
|
8
|
-
`,Cv=dr?" ":jl,hm="֑-߿יִ-﷽ﹰ-ﻼ",gm="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",wv=new RegExp("^[^"+gm+"]*["+hm+"]"),Ev=new RegExp("^[^"+hm+"]*["+gm+"]"),Wr={bold:1,capitalize:1024,code:16,highlight:ed,italic:2,lowercase:256,strikethrough:il,subscript:32,superscript:64,underline:ol,uppercase:512},Sv={directionless:1,unmergeable:2},oh={center:nd,end:sd,justify:id,left:td,right:rd,start:od},kv={[nd]:"center",[sd]:"end",[id]:"justify",[td]:"left",[rd]:"right",[od]:"start"},Tv={normal:0,segmented:2,token:1},Iv={[yv]:"normal",[bv]:"segmented",[vv]:"token"},Av="$";function pm(e,t,n,r,i,o){let s=e.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===t&&(H(s)&&pm(s,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}const Nv=100;let Au=!1,ld=0;function Lv(e){ld=e.timeStamp}function ja(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&ia(e,n)!==void 0}function Fv(e,t,n){const r=rn(zt(n));let i=null,o=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,o=r.focusOffset);const s=e.nodeValue;s!==null&&Nd(t,s,i,o,!1)}function Pv(e,t,n){if(J(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return er(t)&&n.isAttached()}function Rv(e,t,n,r){for(let i=e;i&&!_b(i);i=ts(i)){const o=ia(i,t);if(o!==void 0){const s=je(o,n);if(s)return Ie(s)||!Ke(i)?void 0:[i,s]}else if(i===r)return[r,n1(n)]}}function mm(e,t,n){Au=!0;const r=performance.now()-ld>Nv;try{$t(e,()=>{const i=Q()||function(f){return f.getEditorState().read(()=>{const h=Q();return h!==null?h.clone():null})}(e),o=new Map,s=e.getRootElement(),l=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(let f=0;f<t.length;f++){const h=t[f],g=h.type,m=h.target,v=Rv(m,e,l,s);if(!v)continue;const[y,p]=v;if(g==="characterData")r&&ee(p)&&er(m)&&Pv(i,m,p)&&Fv(m,p,e);else if(g==="childList"){u=!0;const x=h.addedNodes;for(let _=0;_<x.length;_++){const C=x[_],S=e1(C),I=C.parentNode;if(I!=null&&C!==a&&S===null&&!ja(C,I,e)){if(dr){const P=(Ke(C)?C.innerText:null)||C.nodeValue;P&&(c+=P)}I.removeChild(C)}}const b=h.removedNodes,w=b.length;if(w>0){let _=0;for(let C=0;C<w;C++){const S=b[C];(ja(S,m,e)||a===S)&&(m.appendChild(S),_++)}w!==_&&o.set(y,p)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],g=h.addedNodes,m=h.target;for(let v=0;v<g.length;v++){const y=g[v],p=y.parentNode;p==null||y.nodeName!=="BR"||ja(y,m,e)||p.removeChild(y)}}n.takeRecords()}i!==null&&(u&&nt(i),dr&&s1(e)&&i.insertRawText(c))})}finally{Au=!1}}function xm(e){const t=e._observer;t!==null&&mm(e,t.takeRecords(),t)}function ym(e){(function(t){ld===0&&zt(t).addEventListener("textInput",Lv,!0)})(e),e._observer=new MutationObserver((t,n)=>{mm(e,t,n)})}let Ov=class vm{constructor(t,n=new Map,r=void 0,i=new Map,o=void 0){this.node=t,this.sharedConfigMap=n,this.unknownState=r,this.knownState=i;const s=o!==void 0?o:function(l,a,u){let c=u.size;if(a)for(const d in a){const f=l.get(d);f&&u.has(f)||c++}return c}(n,r,i);this.size=s}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState};for(const[n,r]of this.knownState)n.isEqual(r,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(r);return Ts(t)?{[Av]:t}:{}}getWritable(t){if(this.node===t)return this;const n=new Map(this.knownState),r=Ts(i=this.unknownState)&&{...i};var i;if(r)for(const o of n.keys())delete r[o.key];return new vm(t,this.sharedConfigMap,Ts(r),n,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedConfigMap.set(r,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&r in o||this.size++,i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState={},t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i);this.unknownState=Ts(this.unknownState)}};function Ts(e){if(e)for(const t in e)return e}function Mv(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Ov(t);return t.__state=n,n}function sh(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,s=t.__format,l=t.__style,a=e.__state,u=t.__state;return(n===null||n===o)&&(r===null||r===s)&&(i===null||i===l)&&(e.__state===null||a===u||function(c,d){if(c===d)return!0;if(c&&d&&c.size!==d.size)return!1;const f=new Set,h=(m,v)=>{for(const[y,p]of m.knownState){if(f.has(y.key))continue;f.add(y.key);const x=v?v.getValue(y):y.defaultValue;if(x!==p&&!y.isEqual(x,p))return!0}return!1},g=(m,v)=>{const{unknownState:y}=m,p=v?v.unknownState:void 0;if(y){for(const[x,b]of Object.entries(y))if(!f.has(x)&&(f.add(x),b!==(p?p[x]:void 0)))return!0}return!1};return!(c&&h(c,d)||d&&h(d,c)||c&&g(c,d)||d&&g(d,c))}(a,u))}function lh(e,t){const n=e.mergeWithSibling(t),r=Je()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function ah(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&ee(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(sh(t,r)){r=lh(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&ee(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(sh(r,n)){r=lh(r,n);break}break}n.remove()}}else r.remove()}function Jr(e){return uh(e.anchor),uh(e.focus),e}function uh(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),ee(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!H(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let fr,Ct,No,Ul,Nu,Lu,Kr,en,Fu,Lo,ot="",_t="",pn=null,mn="",Hn="",bm=!1,Fo=!1,js=null;function sl(e,t){const n=Kr.get(e);if(t!==null){const r=Ou(e);r.parentNode===t&&t.removeChild(r)}if(en.has(e)||Ct._keyToDOMMap.delete(e),H(n)){const r=al(n,Kr);Pu(r,0,r.length-1,null)}n!==void 0&&Ld(Lo,No,Ul,n,"destroyed")}function Pu(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&sl(o,r)}}function Fr(e,t){e.setProperty("text-align",t)}const Dv="40px";function _m(e,t){const n=fr.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Dv;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function Cm(e,t){const n=e.style;t===0?Fr(n,""):t===td?Fr(n,"left"):t===nd?Fr(n,"center"):t===rd?Fr(n,"right"):t===id?Fr(n,"justify"):t===od?Fr(n,"start"):t===sd&&Fr(n,"end")}function ll(e,t){const n=en.get(e);n===void 0&&q(60);const r=n.createDOM(fr,Ct);if(function(i,o,s){const l=s._keyToDOMMap;(function(a,u,c){const d=`__lexicalKey_${u._key}`;a[d]=c})(o,s,i),l.set(i,o)}(e,r,Ct),ee(n)?r.setAttribute("data-lexical-text","true"):Ie(n)&&r.setAttribute("data-lexical-decorator","true"),H(n)){const i=n.__indent,o=n.__size;if(i!==0&&_m(r,i),o!==0){const l=o-1;(function(a,u,c,d){const f=_t;_t="",Ru(a,c,0,u,c.getDOMSlot(d)),Em(c,d),_t=f})(al(n,en),l,n,r)}const s=n.__format;s!==0&&Cm(r,s),n.isInline()||wm(null,n,r),oa(n)&&(ot+=Jn,Hn+=Jn)}else{const i=n.getTextContent();if(Ie(n)){const o=n.decorate(Ct,fr);o!==null&&Sm(e,o),r.contentEditable="false"}else ee(n)&&(n.isDirectionless()||(_t+=i));ot+=i,Hn+=i}return t!==null&&t.insertChild(r),Ld(Lo,No,Ul,n,"created"),r}function Ru(e,t,n,r,i){const o=ot;ot="";let s=n;for(;s<=r;++s){ll(e[s],i);const l=en.get(e[s]);l!==null&&ee(l)&&(pn===null&&(pn=l.getFormat()),mn===""&&(mn=l.getStyle()))}oa(t)&&(ot+=Jn),i.element.__lexicalTextContent=ot,ot=o+ot}function ch(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return tn(r)?"line-break":Ie(r)&&r.isInline()?"decorator":null}return"empty"}return null}function wm(e,t,n){const r=ch(e,Kr),i=ch(t,en);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Em(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==_t||r!==js){const i=_t==="",o=i?js:function(s){return wv.test(s)?"rtl":Ev.test(s)?"ltr":null}(_t);if(o!==r){const s=t.classList,l=fr.theme;let a=r!==null?l[r]:void 0,u=o!==null?l[o]:void 0;if(a!==void 0){if(typeof a=="string"){const c=rl(a);a=l[r]=c}s.remove(...a)}if(o===null||i&&o==="ltr")t.removeAttribute("dir");else{if(u!==void 0){if(typeof u=="string"){const c=rl(u);u=l[o]=c}u!==void 0&&s.add(...u)}t.dir=o}Fo||(e.getWritable().__dir=o)}js=o,t.__lexicalDirTextContent=_t,t.__lexicalDir=o}}function $v(e,t,n){const r=_t;var i;_t="",pn=null,mn="",function(o,s,l){const a=ot,u=o.__size,c=s.__size;ot="";const d=l.element;if(u===1&&c===1){const f=o.__first,h=s.__first;if(f===h)uo(f,d);else{const m=Ou(f),v=ll(h,null);try{d.replaceChild(v,m)}catch(y){if(typeof y=="object"&&y!=null){const p=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${v.tagName} key: ${h}}, old child: {tag: ${m.tagName}, key: ${f}}.`;throw new Error(p)}throw y}sl(f,null)}const g=en.get(h);ee(g)&&(pn===null&&(pn=g.getFormat()),mn===""&&(mn=g.getStyle()))}else{const f=al(o,Kr),h=al(s,en);if(f.length!==u&&q(227),h.length!==c&&q(228),u===0)c!==0&&Ru(h,s,0,c-1,l);else if(c===0){if(u!==0){const g=l.after==null&&l.before==null&&l.element.__lexicalLineBreak==null;Pu(f,0,u-1,g?null:d),g&&(d.textContent="")}}else(function(g,m,v,y,p,x){const b=y-1,w=p-1;let _,C,S=x.getFirstChild(),I=0,P=0;for(;I<=b&&P<=w;){const M=m[I],V=v[P];if(M===V)S=Ua(uo(V,x.element)),I++,P++;else{_===void 0&&(_=new Set(m)),C===void 0&&(C=new Set(v));const W=C.has(M),U=_.has(V);if(W)if(U){const G=Ni(Ct,V);G===S?S=Ua(uo(V,x.element)):(x.withBefore(S).insertChild(G),uo(V,x.element)),I++,P++}else ll(V,x.withBefore(S)),P++;else S=Ua(Ou(M)),sl(M,x.element),I++}const z=en.get(V);z!==null&&ee(z)&&(pn===null&&(pn=z.getFormat()),mn===""&&(mn=z.getStyle()))}const R=I>b,O=P>w;if(R&&!O){const M=v[w+1],V=M===void 0?null:Ct.getElementByKey(M);Ru(v,g,P,w,x.withBefore(V))}else O&&!R&&Pu(m,I,b,x.element)})(s,f,h,u,c,l)}oa(s)&&(ot+=Jn),d.__lexicalTextContent=ot,ot=a+ot}(e,t,t.getDOMSlot(n)),Em(t,n),i=t,pn==null||pn===i.__textFormat||Fo||i.setTextFormat(pn),function(o){mn===""||mn===o.__textStyle||Fo||o.setTextStyle(mn)}(t),_t=r}function al(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&q(101),n.push(r),r=i.__next}return n}function uo(e,t){const n=Kr.get(e);let r=en.get(e);n!==void 0&&r!==void 0||q(61);const i=bm||Lu.has(e)||Nu.has(e),o=Ni(Ct,e);if(n===r&&!i){if(H(n)){const s=o.__lexicalTextContent;s!==void 0&&(ot+=s,Hn+=s);const l=o.__lexicalDirTextContent;l!==void 0&&(_t+=l)}else{const s=n.getTextContent();ee(n)&&!n.isDirectionless()&&(_t+=s),Hn+=s,ot+=s}return o}if(n!==r&&i&&Ld(Lo,No,Ul,r,"updated"),r.updateDOM(n,o,fr)){const s=ll(e,null);return t===null&&q(62),t.replaceChild(s,o),sl(e,null),s}if(H(n)&&H(r)){const s=r.__indent;s!==n.__indent&&_m(o,s);const l=r.__format;l!==n.__format&&Cm(o,l),i&&($v(n,r,o),ft(r)||r.isInline()||wm(n,r,o)),oa(r)&&(ot+=Jn,Hn+=Jn)}else{const s=r.getTextContent();if(Ie(r)){const l=r.decorate(Ct,fr);l!==null&&Sm(e,l)}else ee(r)&&!r.isDirectionless()&&(_t+=s);ot+=s,Hn+=s}if(!Fo&&ft(r)&&r.__cachedText!==Hn){const s=r.getWritable();s.__cachedText=Hn,r=s}return o}function Sm(e,t){let n=Ct._pendingDecorators;const r=Ct._decorators;if(n===null){if(r[e]===t)return;n=t1(Ct)}n[e]=t}function Ua(e){let t=e.nextSibling;return t!==null&&t===Ct._blockCursorElement&&(t=t.nextSibling),t}function Vv(e,t,n,r,i,o){ot="",Hn="",_t="",bm=r===Ii,js=null,Ct=n,fr=n._config,No=n._nodes,Ul=Ct._listeners.mutation,Nu=i,Lu=o,Kr=e._nodeMap,en=t._nodeMap,Fo=t._readOnly,Fu=new Map(n._keyToDOMMap);const s=new Map;return Lo=s,uo("root",null),Ct=void 0,No=void 0,Nu=void 0,Lu=void 0,Kr=void 0,en=void 0,fr=void 0,Fu=void 0,Lo=void 0,s}function Ou(e){const t=Fu.get(e);return t===void 0&&q(75,e),t}function Qn(e){return{}}const Wl={},Hv={},Jl={},Vr={},bi={},Po={},_i={},Jo={},Mu={},Ro={},Oo={},zn={},Kl={},Zl={},km={},Tm={},Bv={},ad={},zv={},ud={},cd={},Mo={},dd={},Gl={},Ko={},ql={},fd={},Im={},ul={},Du={},hd={},jv={},Yl={},gd={},Uv={},Xl={},pd={},$u={},Wv={},Jv={},co={},fo={},Am={},Nm={},Lm={},On=Object.freeze({}),Vu=30,Hu=[["keydown",function(e,t){if(xo=e.timeStamp,Bu=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:s}=e;if(!ae(t,km,e)&&n!=null){if(Wa&&ui(Bu))return $t(t,()=>{Is(t,Ja)}),Wa=!1,void(Ja="");if(function(l,a,u,c){return Dh(l)&&!a&&!c&&!u}(n,i,s,o))ae(t,Tm,e);else if(function(l,a,u,c,d){return Dh(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))ae(t,Bv,e);else if(function(l,a,u,c){return Mh(l)&&!a&&!c&&!u}(n,i,s,o))ae(t,ad,e);else if(function(l,a,u,c,d){return Mh(l)&&!c&&!u&&(a||d)}(n,i,r,s,o))ae(t,zv,e);else if(function(l,a,u){return function(c){return c==="ArrowUp"}(l)&&!a&&!u}(n,i,o))ae(t,ud,e);else if(function(l,a,u){return function(c){return c==="ArrowDown"}(l)&&!a&&!u}(n,i,o))ae(t,cd,e);else if(function(l,a){return $h(l)&&a}(n,r))yo=!0,ae(t,Mo,e);else if(function(l){return l===" "}(n))ae(t,dd,e);else if(function(l,a){return Kt&&a&&l.toLowerCase()==="o"}(n,i))e.preventDefault(),yo=!0,ae(t,bi,!0);else if(function(l,a){return $h(l)&&!a}(n,r))yo=!1,ae(t,Mo,e);else if(function(l,a,u,c){return Kt?!a&&!u&&(ui(l)||l.toLowerCase()==="h"&&c):c||a||u?!1:ui(l)}(n,s,o,i))ui(n)?ae(t,Gl,e):(e.preventDefault(),ae(t,Vr,!0));else if(function(l){return l==="Escape"}(n))ae(t,Ko,e);else if(function(l,a,u,c,d){return Kt?!(u||c||d)&&(no(l)||l.toLowerCase()==="d"&&a):a||c||d?!1:no(l)}(n,i,r,s,o))no(n)?ae(t,ql,e):(e.preventDefault(),ae(t,Vr,!1));else if(function(l,a,u){return ui(l)&&(Kt?a:u)}(n,s,i))e.preventDefault(),ae(t,Ro,!0);else if(function(l,a,u){return no(l)&&(Kt?a:u)}(n,s,i))e.preventDefault(),ae(t,Ro,!1);else if(function(l,a){return Kt&&a&&ui(l)}(n,o))e.preventDefault(),ae(t,Oo,!0);else if(function(l,a){return Kt&&a&&no(l)}(n,o))e.preventDefault(),ae(t,Oo,!1);else if(function(l,a,u,c){return l.toLowerCase()==="b"&&!a&&ho(u,c)}(n,s,o,i))e.preventDefault(),ae(t,zn,"bold");else if(function(l,a,u,c){return l.toLowerCase()==="u"&&!a&&ho(u,c)}(n,s,o,i))e.preventDefault(),ae(t,zn,"underline");else if(function(l,a,u,c){return l.toLowerCase()==="i"&&!a&&ho(u,c)}(n,s,o,i))e.preventDefault(),ae(t,zn,"italic");else if(function(l,a,u,c){return l==="Tab"&&!a&&!u&&!c}(n,s,i,o))ae(t,fd,e);else if(function(l,a,u,c){return l.toLowerCase()==="z"&&!a&&ho(u,c)}(n,r,o,i))e.preventDefault(),ae(t,Kl,void 0);else if(function(l,a,u,c){return Kt?l.toLowerCase()==="z"&&u&&a:l.toLowerCase()==="y"&&c||l.toLowerCase()==="z"&&c&&a}(n,r,o,i))e.preventDefault(),ae(t,Zl,void 0);else{const l=t._editorState._selection;l===null||J(l)?!dr&&Vh(n,o,i)&&(e.preventDefault(),ae(t,$u,e)):function(a,u,c,d){return u?!1:a.toLowerCase()==="c"?Kt?c:d:!1}(n,r,o,i)?(e.preventDefault(),ae(t,Xl,e)):function(a,u,c,d){return u?!1:a.toLowerCase()==="x"?Kt?c:d:!1}(n,r,o,i)?(e.preventDefault(),ae(t,pd,e)):Vh(n,o,i)&&(e.preventDefault(),ae(t,$u,e))}(function(l,a,u,c){return l||a||u||c})(i,r,s,o)&&ae(t,Lm,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;Wi(n)&&r!=="touch"&&e.button===0&&$t(t,()=>{Ie(In(n))||(ju=!0)})}],["compositionstart",function(e,t){$t(t,()=>{const n=Q();if(J(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();dt(r.key),(e.timeStamp<xo+Vu||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||ee(i)&&i.getStyle()!==n.style)&&ae(t,_i,Cv)}})}],["compositionend",function(e,t){dr?to=!0:Ti||!Ao&&!nl?$t(t,()=>{Is(t,e.data)}):(Wa=!0,Ja=e.data)}],["input",function(e,t){e.stopPropagation(),$t(t,()=>{const n=Q(),r=e.data,i=Mm(e);if(r!=null&&J(n)&&Rm(n,i,r,e.timeStamp,!1)){to&&(Is(t,r),to=!1);const o=n.anchor.getNode(),s=rn(zt(t));if(s===null)return;const l=n.isBackward(),a=l?n.anchor.offset:n.focus.offset,u=l?n.focus.offset:n.anchor.offset;tl&&!n.isCollapsed()&&ee(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+u)===o1(s.anchorNode)||ae(t,_i,r);const c=r.length;dr&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),Ao||Ti||nl||!t.isComposing()||(xo=0,dt(null))}else Ad(!1,t,r!==null?r:void 0),to&&(Is(t,r||void 0),to=!1);(function(){gt();const o=Je();xm(o)})()},{event:e}),gi=null}],["click",function(e,t){$t(t,()=>{const n=Q(),r=rn(zt(t)),i=zi();if(r){if(J(n)){const o=n.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&n.isCollapsed()&&!ft(s)&&Re().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const l=function(a,u){let c=a;for(;c!==Re()&&c!=null;){if(u(c))return c;c=c.getParent()}return null}(s,a=>H(a)&&!a.isInline());H(l)&&l.select(0)}}else if(e.pointerType==="touch"){const o=r.anchorNode;(Ke(o)||er(o))&&nt(vd(i,r,t,e))}}ae(t,Jl,e)})}],["cut",On],["copy",On],["dragstart",On],["dragover",On],["dragend",On],["paste",On],["focus",On],["blur",On],["drop",On]];tl&&Hu.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=Mm(n);i==="deleteCompositionText"||dr&&s1(r)||i!=="insertCompositionText"&&$t(r,()=>{const s=Q();if(i==="deleteContentBackward"){if(s===null){const h=zi();if(!J(h))return;nt(h.clone())}if(J(s)){const h=s.anchor.key===s.focus.key;if(l=n.timeStamp,Bu==="MediaLast"&&l<xo+Vu&&r.isComposing()&&h){if(dt(null),xo=0,setTimeout(()=>{$t(r,()=>{dt(null)})},Vu),J(s)){const g=s.anchor.getNode();g.markDirty(),ee(g)||q(142),Om(s,g)}}else{dt(null),n.preventDefault();const g=s.anchor.getNode(),m=g.getTextContent(),v=g.canInsertTextAfter(),y=s.anchor.offset===0&&s.focus.offset===m.length;let p=ih&&h&&!y&&v;if(p&&s.isCollapsed()&&(p=!Ie(Ku(s.anchor,!0))),!p){ae(r,Vr,!0);const x=Q();ih&&J(x)&&x.isCollapsed()&&(Or=x,setTimeout(()=>Or=null))}}return}}var l;if(!J(s))return;const a=n.data;gi!==null&&Ad(!1,r,gi),s.dirty&&gi===null||!s.isCollapsed()||ft(s.anchor.getNode())||o===null||s.applyDOMRange(o),gi=null;const u=s.anchor,c=s.focus,d=u.getNode(),f=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":ae(r,_i,n);break;case"insertFromComposition":dt(null),ae(r,_i,n);break;case"insertLineBreak":dt(null),ae(r,bi,!1);break;case"insertParagraph":dt(null),yo&&!Ti?(yo=!1,ae(r,bi,!1)):ae(r,Po,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":ae(r,Jo,n);break;case"deleteByComposition":(function(h,g){return h!==g||H(h)||H(g)||!h.isToken()||!g.isToken()})(d,f)&&ae(r,Mu,n);break;case"deleteByDrag":case"deleteByCut":ae(r,Mu,n);break;case"deleteContent":ae(r,Vr,!1);break;case"deleteWordBackward":ae(r,Ro,!0);break;case"deleteWordForward":ae(r,Ro,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":ae(r,Oo,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":ae(r,Oo,!1);break;case"formatStrikeThrough":ae(r,zn,"strikethrough");break;case"formatBold":ae(r,zn,"bold");break;case"formatItalic":ae(r,zn,"italic");break;case"formatUnderline":ae(r,zn,"underline");break;case"historyUndo":ae(r,Kl,void 0);break;case"historyRedo":ae(r,Zl,void 0)}else{if(a===`
|
|
9
|
-
`)n.preventDefault(),ae(r,bi,!1);else if(a===Jn)n.preventDefault(),ae(r,Po,void 0);else if(a==null&&n.dataTransfer){const h=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(h)}else a!=null&&Rm(s,o,a,n.timeStamp,!0)?(n.preventDefault(),ae(r,_i,a)):gi=a;Fm=n.timeStamp}})}(e,t)]);let xo=0,Bu=null,Fm=0,gi=null;const cl=new WeakMap;let zu=!1,ju=!1,yo=!1,to=!1,Wa=!1,Ja="",Or=null,Pm=[0,"",0,"root",0];function Rm(e,t,n,r,i){const o=e.anchor,s=e.focus,l=o.getNode(),a=Je(),u=rn(zt(a)),c=u!==null?u.anchorNode:null,d=o.key,f=a.getElementByKey(d),h=n.length;return d!==s.key||!ee(l)||(!i&&(!tl||Fm<r+50)||l.isDirty()&&h<2||r1(n))&&o.offset!==s.offset&&!l.isComposing()||pi(l)||l.isDirty()&&h>1||(i||!tl)&&f!==null&&!l.isComposing()&&c!==Ai(f)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||l.getFormat()!==e.format||l.getStyle()!==e.style||function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const v=g.anchor.offset,y=m.getParentOrThrow(),p=m.isToken();return v===0?!m.canInsertTextBefore()||!y.canInsertTextBefore()&&!m.isComposing()||p||function(x){const b=x.getPreviousSibling();return(ee(b)||H(b)&&b.isInline())&&!b.canInsertTextAfter()}(m):v===m.getTextContentSize()&&(!m.canInsertTextAfter()||!y.canInsertTextAfter()&&!m.isComposing()||p)}(e,l)}function dh(e,t){return er(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function fh(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=e;zu&&(zu=!1,dh(r,i)&&dh(o,s)&&!Or)||$t(t,()=>{if(!n)return void nt(null);if(!es(t,r,o))return;let l=Q();if(Or&&J(l)&&l.isCollapsed()){const a=l.anchor,u=Or.anchor;(a.key===u.key&&a.offset===u.offset+1||a.offset===1&&u.getNode().is(a.getNode().getPreviousSibling()))&&(l=Or.clone(),nt(l))}if(Or=null,J(l)){const a=l.anchor,u=a.getNode();if(l.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(l.dirty=!0);const c=zt(t).event,d=c?c.timeStamp:performance.now(),[f,h,g,m,v]=Pm,y=Re(),p=t.isComposing()===!1&&y.getTextContent()==="";if(d<v+200&&a.offset===g&&a.key===m)Us(l,f,h);else if(a.type==="text")ee(u)||q(141),Om(l,u);else if(a.type==="element"&&!p){H(u)||q(259);const x=a.getNode();x.isEmpty()?function(b,w){const _=w.getTextFormat(),C=w.getTextStyle();Us(b,_,C)}(l,x):Us(l,0,"")}}else{const c=a.key,d=l.focus.key,f=l.getNodes(),h=f.length,g=l.isBackward(),m=g?s:i,v=g?i:s,y=g?d:c,p=g?c:d;let x=_v,b=!1;for(let w=0;w<h;w++){const _=f[w],C=_.getTextContentSize();if(ee(_)&&C!==0&&!(w===0&&_.__key===y&&m===C||w===h-1&&_.__key===p&&v===0)&&(b=!0,x&=_.getFormat(),x===0))break}l.format=b?x:0}}ae(t,Wl,void 0)})}function Us(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Om(e,t){Us(e,t.getFormat(),t.getStyle())}function Mm(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function Is(e,t){const n=e._compositionKey;if(dt(null),n!==null&&t!=null){if(t===""){const r=je(n),i=Ai(e.getElementByKey(n));return void(i!==null&&i.nodeValue!==null&&ee(r)&&Nd(r,i.nodeValue,null,null,!0))}if(t[t.length-1]===`
|
|
10
|
-
`){const r=Q();if(J(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void ae(e,Mo,null)}}}Ad(!0,e,t)}function Dm(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Ci=new Map;function $m(e){const t=xb(e.target);if(t===null)return;const n=Td(t.anchorNode);if(n===null)return;ju&&(ju=!1,$t(n,()=>{const a=zi(),u=t.anchorNode;(Ke(u)||er(u))&&nt(vd(a,t,n,e))}));const r=Id(n),i=r[r.length-1],o=i._key,s=Ci.get(o),l=s||i;l!==n&&fh(t,l,!1),fh(t,n,!0),n!==i?Ci.set(o,n):s&&Ci.delete(o)}function hh(e){e._lexicalHandled=!0}function gh(e){return e._lexicalHandled===!0}function Kv(e){const t=e.ownerDocument,n=cl.get(t);n===void 0&&q(162);const r=n-1;r>=0||q(164),cl.set(t,r),r===0&&t.removeEventListener("selectionchange",$m);const i=ra(e);kd(i)?(function(s){if(s._parentEditor!==null){const l=Id(s),a=l[l.length-1]._key;Ci.get(a)===s&&Ci.delete(a)}else Ci.delete(s._key)}(i),e.__lexicalEditor=null):i&&q(198);const o=Dm(e);for(let s=0;s<o.length;s++)o[s]();e.__lexicalEventHandles=[]}function Uu(e,t,n){gt();const r=e.__key,i=e.getParent();if(i===null)return;const o=function(l){const a=Q();if(!J(a)||!H(l))return a;const{anchor:u,focus:c}=a,d=u.getNode(),f=c.getNode();return Zu(d,l)&&u.set(l.__key,0,"element"),Zu(f,l)&&c.set(l.__key,0,"element"),a}(e);let s=!1;if(J(o)&&t){const l=o.anchor,a=o.focus;l.key===r&&(hl(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),a.key===r&&(hl(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else it(o)&&t&&e.isSelected()&&e.selectPrevious();if(J(o)&&t&&!s){const l=e.getIndexWithinParent();Hr(e),fl(o,i,l,-1)}else Hr(e);n||We(i)||i.canBeEmpty()||!i.isEmpty()||Uu(i,t),t&&ft(i)&&i.isEmpty()&&i.selectEnd()}class Ql{static getType(){q(64,this.name)}static clone(t){q(65,this.name)}afterCloneFrom(t){this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state}constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Qm(this,t)}getType(){return this.__type}isInline(){q(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=je(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||Q();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(ee(this))return r;if(J(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Ie(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:je(t)}getParentOrThrow(){const t=this.getParent();return t===null&&q(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(We(n))return H(t)||t===this&&Ie(t)||q(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&q(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:je(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:je(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=H(this)?this:this.getParent(),r=H(t)?t:t.getParent(),i=n&&r?Js(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Js(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?d1(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&q(279),!1)))}isParentOf(t){const n=Js(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===t)break;const l=H(o)?n?o.getFirstChild():o.getLastChild():null;if(l!==null){o=l;continue}const a=n?o.getNextSibling():o.getPreviousSibling();if(a!==null){o=a;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let c=null,d=u;do{if(d===null&&q(68),c=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);o=c}return n||r.reverse(),r}isDirty(){const t=Je()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){const t=je(this.__key);return t===null&&q(113),t}getWritable(){gt();const t=yr(),n=Je(),r=t._nodeMap,i=this.__key,o=this.getLatest(),s=n._cloneNotNeeded,l=Q();if(l!==null&&l.setCachedNodes(null),s.has(i))return pl(o),o;const a=Pd(o);return s.add(i),pl(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){q(70)}updateDOM(t,n,r){q(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){q(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable();return(r||i.__state)&&Mv(n).updateFromJSON(r),i}(this,t.$)}static transform(){return null}remove(t){Uu(this,!0,t)}replace(t,n){gt();let r=Q();r!==null&&(r=r.clone()),Xa(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,l=t.getWritable(),a=this.getParentOrThrow().getWritable(),u=a.__size;Hr(l);const c=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,h=i.__next,g=i.__parent;if(Uu(i,!1,!0),c===null?a.__first=s:c.getWritable().__next=s,l.__prev=f,d===null?a.__last=s:d.getWritable().__prev=s,l.__next=h,l.__parent=g,a.__size=u,n&&(H(this)&&H(l)||q(139),this.getChildren().forEach(m=>{l.append(m)})),J(r)){nt(r);const m=r.anchor,v=r.focus;m.key===o&&yh(m,l),v.key===o&&yh(v,l)}return ar()===o&&dt(s),l}insertAfter(t,n=!0){gt(),Xa(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),s=Q();let l=!1,a=!1;if(o!==null){const h=t.getIndexWithinParent();if(Hr(i),J(s)){const g=o.__key,m=s.anchor,v=s.focus;l=m.type==="element"&&m.key===g&&m.offset===h+1,a=v.type==="element"&&v.key===g&&v.offset===h+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&J(s)){const h=this.getIndexWithinParent();fl(s,c,h+1);const g=c.__key;l&&s.anchor.set(g,h+2,"element"),a&&s.focus.set(g,h+2,"element")}return t}insertBefore(t,n=!0){gt(),Xa(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;Hr(i);const s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();s===null?l.__first=o:s.getWritable().__next=o,l.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const c=Q();return n&&J(c)&&fl(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return Ne()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){gt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(H(r))return r.select();if(!ee(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){gt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(H(r))return r.select(0,0);if(!ee(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}class Zo extends Ql{static getType(){return"linebreak"}static clone(t){return new Zo(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
11
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&ml(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&As(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&As(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&ml(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&As(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&As(o))return!0}return!1}(t)?null:{conversion:Zv,priority:0}}}static importJSON(t){return nn().updateFromJSON(t)}}function Zv(e){return{node:nn()}}function nn(){return It(new Zo)}function tn(e){return e instanceof Zo}function As(e){return er(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Ka(e,t){return 16&t?"code":t&ed?"mark":32&t?"sub":64&t?"sup":null}function Za(e,t){return 1&t?"strong":2&t?"em":"span"}function Vm(e,t,n,r,i){const o=r.classList;let s=wi(i,"base");s!==void 0&&o.add(...s),s=wi(i,"underlineStrikethrough");let l=!1;const a=t&ol&&t&il;s!==void 0&&(n&ol&&n&il?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const u in Wr){const c=Wr[u];if(s=wi(i,u),s!==void 0)if(n&c){if(l&&(u==="underline"||u==="strikethrough")){t&c&&o.remove(...s);continue}t&c&&(!a||u!=="underline")&&u!=="strikethrough"||o.add(...s)}else t&c&&o.remove(...s)}}function Hm(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?jl:"");if(r==null)t.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||dr){const[l,a,u]=function(c,d){const f=c.length,h=d.length;let g=0,m=0;for(;g<f&&g<h&&c[g]===d[g];)g++;for(;m+g<f&&m+g<h&&c[f-m-1]===d[h-m-1];)m++;return[g,f-g-m,d.slice(g,h-m)]}(s,o);a!==0&&r.deleteData(l,a),r.insertData(l,u)}else r.nodeValue=o}}function ph(e,t,n,r,i,o){Hm(i,e,t);const s=o.theme.text;s!==void 0&&Vm(0,0,r,e,s)}function Ns(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Fn extends Ql{static getType(){return"text"}static clone(t){return new Fn(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",n){super(n),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return Iv[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ar()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const n=Wr[t];return!!(this.getFormat()&n)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){return gl(this.getLatest().__format,t,n)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,n){const r=this.__format,i=Ka(0,r),o=Za(0,r),s=i===null?o:i,l=document.createElement(s);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(o),l.appendChild(a)),ph(a,this,0,r,this.__text,t);const u=this.__style;return u!==""&&(l.style.cssText=u),l}updateDOM(t,n,r){const i=this.__text,o=t.__format,s=this.__format,l=Ka(0,o),a=Ka(0,s),u=Za(0,o),c=Za(0,s);if((l===null?u:l)!==(a===null?c:a))return!0;if(l===a&&u!==c){const m=n.firstChild;m==null&&q(48);const v=document.createElement(c);return ph(v,this,0,s,i,r),n.replaceChild(v,m),!1}let d=n;a!==null&&l!==null&&(d=n.firstChild,d==null&&q(49)),Hm(i,d,this);const f=r.theme.text;f!==void 0&&o!==s&&Vm(0,o,s,d,f);const h=t.__style,g=this.__style;return h!==g&&(n.style.cssText=g),!1}static importDOM(){return{"#text":()=>({conversion:Xv,priority:0}),b:()=>({conversion:qv,priority:0}),code:()=>({conversion:Mn,priority:0}),em:()=>({conversion:Mn,priority:0}),i:()=>({conversion:Mn,priority:0}),mark:()=>({conversion:Mn,priority:0}),s:()=>({conversion:Mn,priority:0}),span:()=>({conversion:Gv,priority:0}),strong:()=>({conversion:Mn,priority:0}),sub:()=>({conversion:Mn,priority:0}),sup:()=>({conversion:Mn,priority:0}),u:()=>({conversion:Mn,priority:0})}}static importJSON(t){return He().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:n}=super.exportDOM(t);return Ke(n)||q(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=Ns(n,"b")),this.hasFormat("italic")&&(n=Ns(n,"i")),this.hasFormat("strikethrough")&&(n=Ns(n,"s")),this.hasFormat("underline")&&(n=Ns(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?Wr[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?Sv[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=gl(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=Tv[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){gt();let r=t,i=n;const o=Q(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const a=s.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!J(o))return jm(l,r,l,i,"text","text");{const a=ar();a!==o.anchor.key&&a!==o.focus.key||dt(l),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),s=o.__text,l=r.length;let a=t;a<0&&(a=l+a,a<0&&(a=0));const u=Q();if(i&&J(u)){const d=t+l;u.setTextNodeRange(o,d,o,d)}const c=s.slice(0,a)+r+s.slice(a+n);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){gt();const n=this.getLatest(),r=n.getTextContent();if(r==="")return[];const i=n.__key,o=ar(),s=r.length;t.sort((S,I)=>S-I),t.push(s);const l=[],a=t.length;for(let S=0,I=0;S<s&&I<=a;I++){const P=t[I];P>S&&(l.push(r.slice(S,P)),S=P)}const u=l.length;if(u===1)return[n];const c=l[0],d=n.getParent();let f;const h=n.getFormat(),g=n.getStyle(),m=n.__detail;let v=!1,y=null,p=null;const x=Q();if(J(x)){const[S,I]=x.isBackward()?[x.focus,x.anchor]:[x.anchor,x.focus];S.type==="text"&&S.key===i&&(y=S),I.type==="text"&&I.key===i&&(p=I)}n.isSegmented()?(f=He(c),f.__format=h,f.__style=g,f.__detail=m,v=!0):(f=n.getWritable(),f.__text=c);const b=[f];for(let S=1;S<u;S++){const I=He(l[S]);I.__format=h,I.__style=g,I.__detail=m;const P=I.__key;o===i&&dt(P),b.push(I)}const w=y?y.offset:null,_=p?p.offset:null;let C=0;for(const S of b){if(!y&&!p)break;const I=C+S.getTextContentSize();if(y!==null&&w!==null&&w<=I&&w>=C&&(y.set(S.getKey(),w-C,"text"),w<I&&(y=null)),p!==null&&_!==null&&_<=I&&_>=C){p.set(S.getKey(),_-C,"text");break}C=I}if(d!==null){(function(P){const R=P.getPreviousSibling(),O=P.getNextSibling();R!==null&&pl(R),O!==null&&pl(O)})(this);const S=d.getWritable(),I=this.getIndexWithinParent();v?(S.splice(I,0,b),this.remove()):S.splice(I,1,b),J(x)&&fl(x,d,I,u-1)}return b}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||q(50);const r=this.__key,i=t.__key,o=this.__text,s=o.length;ar()===i&&dt(r);const l=Q();if(J(l)){const d=l.anchor,f=l.focus;d!==null&&d.key===i&&Sh(d,n,r,t,s),f!==null&&f.key===i&&Sh(f,n,r,t,s)}const a=t.__text,u=n?a+o:o+a;this.setTextContent(u);const c=this.getWritable();return t.remove(),c}isTextEntity(){return!1}}function Gv(e){return{forChild:md(e.style),node:null}}function qv(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:md(t.style,n?void 0:"bold"),node:null}}const mh=new WeakMap;function Yv(e){if(!Ke(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function Xv(e){const t=e;e.parentElement===null&&q(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=mh.get(o))===void 0&&!Yv(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)mh.set(s[a],l);return l}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const l=r[s];l===`
|
|
12
|
-
`||l===`\r
|
|
13
|
-
`?i.push(nn()):l===" "?i.push(Bi()):l!==""&&i.push(He(l))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=xh(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=xh(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:He(n)}}function xh(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,Ke(n)){const o=n.style.display;if(o===""&&!Yu(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(er(n))return n;if(n.nodeName==="BR")return null}}const Qv={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Mn(e){const t=Qv[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:md(e.style,t),node:null}}function He(e=""){return It(new Fn(e))}function ee(e){return e instanceof Fn}function md(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),s=e.fontStyle==="italic",l=r.includes("underline"),a=e.verticalAlign;return u=>(ee(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),l&&!u.hasFormat("underline")&&u.toggleFormat("underline"),a!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),a!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Go extends Fn{static getType(){return"tab"}static clone(t){return new Go(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=wi(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Bi().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&q(126),super.setTextContent(t)}setDetail(t){return t!==2&&q(127),this}setMode(t){return t!=="normal"&&q(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Bi(){return It(new Go)}function xd(e){return e instanceof Go}class eb{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:c1(Ht(hr(this,"next")),Ht(hr(t,"next")))<0}getNode(){const t=je(this.key);return t===null&&q(20),t}set(t,n,r,i){const o=this._selection,s=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,Yo()||(ar()===s&&dt(t),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function Tn(e,t,n){return new eb(e,t,n)}function Ga(e,t){let n=t.__key,r=e.offset,i="element";if(ee(t)){i="text";const o=t.getTextContentSize();r>o&&(r=o)}else if(!H(t)){const o=t.getNextSibling();if(ee(o))n=o.__key,r=0,i="text";else{const s=t.getParent();s&&(n=s.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function yh(e,t){if(H(t)){const n=t.getLastDescendant();H(n)||ee(n)?Ga(e,n):Ga(e,t)}else Ga(e,t)}class ea{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!it(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new ea(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(ee(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const o=je(i);o!==null&&r.push(o)}return Yo()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function J(e){return e instanceof oi}class oi{constructor(t,n,r,i){this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!J(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const l=new Set,a=new Set;for(const u of r)if(Sn(u)){const{origin:c}=u;i.length===0?l.add(c):(a.add(c),i.push(c))}else{const{origin:c}=u;H(c)&&a.has(c)||i.push(c)}if(s&&i.push(s.caret.origin),Li(r.focus)&&H(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=An(r.focus.origin,"previous");Sn(u)&&l.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=Dd(u))l.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!H(u)||a.has(u)||u.isEmpty()||l.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Ht(r.anchor),c=Ht(r.anchor.getFlipped()),d=h=>Br(h)?h.origin:h.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(f)}return i}(h1(Wh(this),"next"));return Yo()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[l,a]=Wu(this);let u="",c=!0;for(let d=0;d<t.length;d++){const f=t[d];if(H(f)&&!f.isInline())c||(u+=`
|
|
14
|
-
`),c=!f.isEmpty();else if(c=!1,ee(f)){let h=f.getTextContent();f===n?f===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(h=l<a?h.slice(l,a):h.slice(a,l)):h=s?h.slice(l):h.slice(a):f===r&&(h=s?h.slice(0,a):h.slice(0,l)),u+=h}else!Ie(f)&&!tn(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){const n=Je(),r=n.getEditorState()._selection,i=zm(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[o,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),Jr(this)}clone(){const t=this.anchor,n=this.focus;return new oi(Tn(t.key,t.offset,t.type),Tn(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=gl(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Wr[t];return!!(this.format&n)}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let o=0;o<i;o++){const s=n[o];s===`
|
|
15
|
-
`||s===`\r
|
|
16
|
-
`?r.push(nn()):s===" "?r.push(Bi()):r.push(He(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,o=this.style;let s=n,l=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,l=n),s.type==="element"&&function(v,y,p,x){const b=v.getNode(),w=b.getChildAtIndex(v.offset),_=He(),C=ft(b)?Ne().append(_):_;_.setFormat(p),_.setStyle(x),w===null?b.append(C):w.insertBefore(C),v.is(y)&&y.set(_.__key,0,"text"),v.set(_.__key,0,"text")}(s,l,i,o),l.type==="element"&&Yr(l,Ht(hr(l,"next")));const a=s.offset;let u=l.offset;const c=this.getNodes(),d=c.length;let f=c[0];ee(f)||q(26);const h=f.getTextContent().length,g=f.getParentOrThrow();let m=c[d-1];if(d===1&&l.type==="element"&&(u=h,l.set(s.key,u,"text")),this.isCollapsed()&&a===h&&(f.isSegmented()||f.isToken()||!f.canInsertTextAfter()||!g.canInsertTextAfter()&&f.getNextSibling()===null)){let v=f.getNextSibling();if(ee(v)&&v.canInsertTextBefore()&&!pi(v)||(v=He(),v.setFormat(i),v.setStyle(o),g.canInsertTextAfter()?f.insertAfter(v):g.insertAfter(v)),v.select(0,0),f=v,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&a===0&&(f.isSegmented()||f.isToken()||!f.canInsertTextBefore()||!g.canInsertTextBefore()&&f.getPreviousSibling()===null)){let v=f.getPreviousSibling();if(ee(v)&&!pi(v)||(v=He(),v.setFormat(i),g.canInsertTextBefore()?f.insertBefore(v):g.insertBefore(v)),v.select(),f=v,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&a!==h){const v=He(f.getTextContent());v.setFormat(i),f.replace(v),f=v}else if(!this.isCollapsed()&&t!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||H(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),Bm(this.anchor,this.focus,null),void this.insertText(t)}if(d===1){if(f.isToken()){const x=He(t);return x.select(),void f.replace(x)}const v=f.getFormat(),y=f.getStyle();if(a!==u||v===i&&y===o){if(xd(f)){const x=He(t);return x.setFormat(i),x.setStyle(o),x.select(),void f.replace(x)}}else{if(f.getTextContent()!==""){const x=He(t);if(x.setFormat(i),x.setStyle(o),x.select(),a===0)f.insertBefore(x,!1);else{const[b]=f.splitText(a);b.insertAfter(x,!1)}return void(x.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(o)}const p=u-a;f=f.spliceText(a,p,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=t.length:(this.format=v,this.style=y))}else{const v=new Set([...f.getParentKeys(),...m.getParentKeys()]),y=H(f)?f:f.getParentOrThrow();let p=H(m)?m:m.getParentOrThrow(),x=m;if(!y.is(p)&&p.isInline())do x=p,p=p.getParentOrThrow();while(p.isInline());if(l.type==="text"&&(u!==0||m.getTextContent()==="")||l.type==="element"&&m.getIndexWithinParent()<u)if(ee(m)&&!m.isToken()&&u!==m.getTextContentSize()){if(m.isSegmented()){const S=He(m.getTextContent());m.replace(S),m=S}ft(l.getNode())||l.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const S=m.getParentOrThrow();S.canBeEmpty()||S.getChildrenSize()!==1?m.remove():S.remove()}else v.add(m.__key);const b=p.getChildren(),w=new Set(c),_=y.is(p),C=y.isInline()&&f.getNextSibling()===null?y:f;for(let S=b.length-1;S>=0;S--){const I=b[S];if(I.is(f)||H(I)&&I.isParentOf(f))break;I.isAttached()&&(!w.has(I)||I.is(x)?_||C.insertAfter(I,!1):I.remove())}if(!_){let S=p,I=null;for(;S!==null;){const P=S.getChildren(),R=P.length;(R===0||P[R-1].is(I))&&(v.delete(S.__key),I=S),S=S.getParent()}}if(f.isToken())if(a===h)f.select();else{const S=He(t);S.select(),f.replace(S)}else f=f.spliceText(a,h-a,t,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let S=1;S<d;S++){const I=c[S],P=I.__key;v.has(P)||I.remove()}}}removeText(){const t=Q()===this;tu(this,Ab(Wh(this))),t&&Q()!==this&&nt(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void dt(null);const r=this.getNodes(),i=[];for(const b of r)ee(b)&&i.push(b);const o=b=>{r.forEach(w=>{if(H(w)){const _=w.getFormatFlags(t,b);w.setTextFormat(_)}})},s=i.length;if(s===0)return this.toggleFormat(t),dt(null),void o(n);const l=this.anchor,a=this.focus,u=this.isBackward(),c=u?a:l,d=u?l:a;let f=0,h=i[0],g=c.type==="element"?0:c.offset;if(c.type==="text"&&g===h.getTextContentSize()&&(f=1,h=i[1],g=0),h==null)return;const m=h.getFormatFlags(t,n);o(m);const v=s-1;let y=i[v];const p=d.type==="text"?d.offset:y.getTextContentSize();if(h.is(y)){if(g===p)return;if(pi(h)||g===0&&p===h.getTextContentSize())h.setFormat(m);else{const b=h.splitText(g,p),w=g===0?b[0]:b[1];w.setFormat(m),c.type==="text"&&c.set(w.__key,0,"text"),d.type==="text"&&d.set(w.__key,p-g,"text")}return void(this.format=m)}g===0||pi(h)||([,h]=h.splitText(g),g=0),h.setFormat(m);const x=y.getFormatFlags(t,m);p>0&&(p===y.getTextContentSize()||pi(y)||([y]=y.splitText(p)),y.setFormat(x));for(let b=f+1;b<v;b++){const w=i[b],_=w.getFormatFlags(t,x);w.setFormat(_)}c.type==="text"&&c.set(h.__key,g,"text"),d.type==="text"&&d.set(y.__key,p,"text"),this.format=m|x}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const g=Q();return J(g)||q(134),g.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=eu(n,qt),i=t[t.length-1];if(H(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=qa(this);r.splice(g,0,t),i.selectEnd()}return}if(!t.some(g=>(H(g)||Ie(g))&&!g.isInline())){H(r)||q(211,n.constructor.name,n.getType());const g=qa(this);return r.splice(g,0,t),void i.selectEnd()}const o=function(g){const m=Ne();let v=null;for(let y=0;y<g.length;y++){const p=g[y],x=tn(p);if(x||Ie(p)&&p.isInline()||H(p)&&p.isInline()||ee(p)||p.isParentRequired()){if(v===null&&(v=p.createParentElementNode(),m.append(v),x))continue;v!==null&&v.append(p)}else m.append(p),v=null}return m}(t),s=o.getLastDescendant(),l=o.getChildren(),a=!H(r)||!r.isEmpty()?this.insertParagraph():null,u=l[l.length-1];let c=l[0];var d;H(d=c)&&qt(d)&&!d.isEmpty()&&H(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(H(r)||q(211,n.constructor.name,n.getType()),r.append(...c.getChildren()),c=l[1]),c&&(r===null&&q(212,n.constructor.name,n.getType()),function(g,m,v){const y=m.getParentOrThrow().getLastChild();let p=m;const x=[m];for(;p!==y;)p.getNextSibling()||q(140),p=p.getNextSibling(),x.push(p);let b=g;for(const w of x)b=b.insertAfter(w)}(r,c));const f=eu(s,qt);a&&H(f)&&(a.canMergeWhenEmpty()||qt(u))&&(f.append(...a.getChildren()),a.remove()),H(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const h=H(r)?r.getLastChild():null;tn(h)&&f!==r&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Ne();return Re().splice(this.anchor.offset,0,[s]),s.select(),s}const t=qa(this),n=eu(this.anchor.getNode(),qt);H(n)||q(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],o=n.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(t){const n=nn();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=this.getNodes(),n=t.length,r=n-1,i=this.anchor,o=this.focus;let s=t[0],l=t[r];const[a,u]=Wu(this);if(n===0)return[];if(n===1){if(ee(s)&&!this.isCollapsed()){const d=a>u?u:a,f=a>u?a:u,h=s.splitText(d,f),g=d===0?h[0]:h[1];return g!=null?[g]:[]}return[s]}const c=i.isBefore(o);if(ee(s)){const d=c?a:u;d===s.getTextContentSize()?t.shift():d!==0&&([,s]=s.splitText(d),t[0]=s)}if(ee(l)){const d=l.getTextContent().length,f=c?u:a;f===0?t.pop():f!==d&&([l]=l.splitText(f),t[r]=l)}return t}modify(t,n,r){if(kh(this,t,n,r))return;const i=t==="move",o=Je(),s=rn(zt(o));if(!s)return;const l=o._blockCursorElement,a=o._rootElement,u=this.focus.getNode();if(a===null||l===null||!H(u)||u.isInline()||u.canBeEmpty()||Gu(l,o,a),this.dirty){let c=Ni(o,this.anchor.key),d=Ni(o,this.focus.key);this.anchor.type==="text"&&(c=Ai(c)),this.focus.type==="text"&&(d=Ai(d)),c&&d&&Um(s,c,this.anchor.offset,d,this.focus.offset)}if(function(c,d,f,h){c.modify(d,f,h)}(s,t,n?"backward":"forward",r),s.rangeCount>0){const c=s.getRangeAt(0),d=this.anchor.getNode(),f=ft(d)?d:gb(d);if(this.applyDOMRange(c),this.dirty=!0,!i){const h=this.getNodes(),g=[];let m=!1;for(let v=0;v<h.length;v++){const y=h[v];Zu(y,f)?g.push(y):m=!0}if(m&&g.length>0)if(n){const v=g[0];H(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=g[g.length-1];H(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}s.anchorNode===c.startContainer&&s.anchorOffset===c.startOffset||function(v){const y=v.focus,p=v.anchor,x=p.key,b=p.offset,w=p.type;p.set(y.key,y.offset,y.type,!0),y.set(x,b,w,!0)}(this)}}r==="lineboundary"&&kh(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&H(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(H(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=Vd(hr(r,t?"previous":"next"));if(o.getTextSlices().every(l=>l===null||l.distance===0)){let l={type:"initial"};for(const a of o.iterNodeCarets("shadowRoot"))if(Sn(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(H(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Ht(a);tu(this,Fi(u,u)),o.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if(Li(a)){if(H(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(o.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(Ie(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&H(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=yd();u.add(a.origin.getKey()),nt(u)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:u}=l;return tu(this,Fi(!a.origin.isEmpty()&&u.isEmpty()?Hd(pt(u,a.direction)):o.anchor,a)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&bh(this,r.getNode()))return}else{const l=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=s.offset,u=l.getTextContentSize();if(l.is(i)||t&&a!==u||!t&&a!==0)return void _h(l,t,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,u=i.getTextContentSize();if(i.is(l)||t&&a!==0||!t&&a!==u)return void _h(i,t,a)}(function(a,u){const c=a.anchor,d=a.focus,f=c.getNode(),h=d.getNode();if(f===h&&c.type==="text"&&d.type==="text"){const g=c.offset,m=d.offset,v=g<m,y=v?g:m,p=v?m:g,x=p-1;y!==x&&function(b){return!(r1(b)||tb(b))}(f.getTextContent().slice(y,p))&&(u?d.set(d.key,x,d.type):c.set(c.key,x,c.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ft(r.getParent())&&r.getPreviousSibling()===null&&bh(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function it(e){return e instanceof ea}function vh(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Wu(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[vh(n),vh(r)]}function bh(e,t){for(let n=t;n;n=n.getParent()){if(H(n)){if(n.collapseAtStart(e))return!0;if(We(n))break}if(n.getPreviousSibling())break}return!1}const tb=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function _h(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,l=0;for(let u=0;u<o;u++){const c=u===o-1;if(l=s,s+=i[u].length,t&&s===n||s>n||c){i.splice(u,1),c&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function Ch(e,t,n,r){let i,o=t;if(Ke(e)){let s=!1;const l=e.childNodes,a=l.length,u=r._blockCursorElement;o===a&&(s=!0,o=a-1);let c=l[o],d=!1;if(c===u)c=l[o+1],d=!0;else if(u!==null){const f=u.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,u)&&o--}if(i=mi(c),ee(i))o=Oh(i,s);else{let f=mi(e);if(f===null)return null;if(H(f)){const h=r.getElementByKey(f.getKey());h===null&&q(214),[f,o]=f.getDOMSlot(h).resolveChildIndex(f,h,e,t),H(f)||q(215),s&&o>=f.getChildrenSize()&&(o=Math.max(0,f.getChildrenSize()-1));let m=f.getChildAtIndex(o);if(H(m)&&function(v,y,p){const x=v.getParent();return p===null||x===null||!x.canBeEmpty()||x!==p.getNode()}(m,0,n)){const v=s?m.getLastDescendant():m.getFirstDescendant();v===null?f=m:(m=v,f=H(m)?m:m.getParentOrThrow()),o=0}ee(m)?(i=m,f=null,o=Oh(m,s)):m!==f&&s&&!d&&(H(f)||q(216),o=Math.min(f.getChildrenSize(),o+1))}else{const h=f.getIndexWithinParent();o=t===0&&Ie(f)&&mi(e)===f?h:h+1,f=f.getParentOrThrow()}if(H(f))return Tn(f.__key,o,"element")}}else i=mi(e);return ee(i)?Tn(i.__key,o,"text"):null}function wh(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((n||!t)&&o===null&&H(s)&&s.isInline()){const l=s.getPreviousSibling();ee(l)&&e.set(l.__key,l.getTextContent().length,"text")}}else H(o)&&!n&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):ee(o)&&e.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&H(o)&&o.isInline())e.set(o.__key,0,"element");else if((n||t)&&o===null&&H(s)&&s.isInline()&&!s.canInsertTextAfter()){const l=s.getNextSibling();ee(l)&&e.set(l.__key,0,"text")}}}function Bm(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);wh(e,r,i),wh(t,!r,i),i&&t.set(e.key,e.offset,e.type);const o=Je();if(o.isComposing()&&o._compositionKey!==e.key&&J(n)){const s=n.anchor,l=n.focus;e.set(s.key,s.offset,s.type,!0),t.set(l.key,l.offset,l.type,!0)}}}function zm(e,t,n,r,i,o){if(e===null||n===null||!es(i,e,n))return null;const s=Ch(e,t,J(o)?o.anchor:null,i);if(s===null)return null;const l=Ch(n,r,J(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=mi(e),u=mi(n);if(Ie(a)&&Ie(u))return null}return Bm(s,l,o),[s,l]}function dl(e){return H(e)&&!e.isInline()}function jm(e,t,n,r,i,o){const s=yr(),l=new oi(Tn(e,t,i),Tn(n,r,o),0,"");return l.dirty=!0,s._selection=l,l}function qo(){const e=Tn("root",0,"element"),t=Tn("root",0,"element");return new oi(e,t,0,"")}function yd(){return new ea(new Set)}function vd(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,l=s==="selectionchange",a=!Au&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,c,d,f;if(J(e)&&!a)return e.clone();if(t===null)return null;if(u=t.anchorNode,c=t.focusNode,d=t.anchorOffset,f=t.focusOffset,l&&J(e)&&!es(n,u,c))return e.clone();const h=zm(u,d,c,f,n,e);if(h===null)return null;const[g,m]=h;return new oi(g,m,J(e)?e.format:0,J(e)?e.style:"")}function Q(){return yr()._selection}function zi(){return Je()._editorState._selection}function fl(e,t,n,r=1){const i=e.anchor,o=e.focus,s=i.getNode(),l=o.getNode();if(!t.is(s)&&!t.is(l))return;const a=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const c=Math.max(0,u+r);i.set(a,c,"element"),o.set(a,c,"element"),Eh(e)}}else{const u=e.isBackward(),c=u?o:i,d=c.getNode(),f=u?i:o,h=f.getNode();if(t.is(d)){const g=c.offset;(n<=g&&r>0||n<g&&r<0)&&c.set(a,Math.max(0,g+r),"element")}if(t.is(h)){const g=f.offset;(n<=g&&r>0||n<g&&r<0)&&f.set(a,Math.max(0,g+r),"element")}}Eh(e)}function Eh(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,o=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!H(o))return;const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(ee(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text"),r.set(u.__key,c,"text")}}else{if(H(o)){const l=o.getChildrenSize(),a=n>=l,u=a?o.getChildAtIndex(l-1):o.getChildAtIndex(n);if(ee(u)){let c=0;a&&(c=u.getTextContentSize()),t.set(u.__key,c,"text")}}if(H(s)){const l=s.getChildrenSize(),a=i>=l,u=a?s.getChildAtIndex(l-1):s.getChildAtIndex(i);if(ee(u)){let c=0;a&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}}function hl(e,t,n,r,i){let o=null,s=0,l=null;r!==null?(o=r.__key,ee(r)?(s=r.getTextContentSize(),l="text"):H(r)&&(s=r.getChildrenSize(),l="element")):i!==null&&(o=i.__key,ee(i)?l="text":H(i)&&(l="element")),o!==null&&l!==null?e.set(o,s,l):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function Sh(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 Um(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function nb(e,t,n,r,i,o,s){const l=r.anchorNode,a=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&Sd(d))return;if(!J(t))return void(e!==null&&es(n,l,a)&&r.removeAllRanges());const f=t.anchor,h=t.focus,g=f.key,m=h.key,v=Ni(n,g),y=Ni(n,m),p=f.offset,x=h.offset,b=t.format,w=t.style,_=t.isCollapsed();let C=v,S=y,I=!1;if(f.type==="text"){C=Ai(v);const z=f.getNode();I=z.getFormat()!==b||z.getStyle()!==w}else J(e)&&e.anchor.type==="text"&&(I=!0);var P,R,O,M,V;if(h.type==="text"&&(S=Ai(y)),C!==null&&S!==null&&(_&&(e===null||I||J(e)&&(e.format!==b||e.style!==w))&&(P=b,R=w,O=p,M=g,V=performance.now(),Pm=[P,R,O,M,V]),u!==p||c!==x||l!==C||a!==S||r.type==="Range"&&_||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),f.type==="element"))){if(Um(r,C,p,S,x),!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const z=J(t)&&t.anchor.type==="element"?C.childNodes[p]||null:r.rangeCount>0?r.getRangeAt(0):null;if(z!==null){let W;if(z instanceof Text){const U=document.createRange();U.selectNode(z),W=U.getBoundingClientRect()}else W=z.getBoundingClientRect();(function(U,G,te){const A=l1(te),fe=Fd(A);if(A===null||fe===null)return;let{top:me,bottom:L}=G,ye=0,_e=0,ge=te;for(;ge!==null;){const K=ge===A.body;if(K)ye=0,_e=zt(U).innerHeight;else{const ie=ge.getBoundingClientRect();ye=ie.top,_e=ie.bottom}let X=0;if(me<ye?X=-(ye-me):L>_e&&(X=L-_e),X!==0)if(K)fe.scrollBy(0,X);else{const ie=ge.scrollTop;ge.scrollTop+=X;const oe=ge.scrollTop-ie;me-=oe,L-=oe}if(K)break;ge=ts(ge)}})(n,W,o)}}zu=!0}}function ji(e){let t=Q()||zi();t===null&&(t=Re().selectEnd()),t.insertNodes(e)}function qa(e){let t=e;e.isCollapsed()||t.removeText();const n=Q();J(n)&&(t=n),J(t)||q(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!qt(i);){const s=i;if([i,o]=rb(i,o),s.is(i))break}return o}function rb(e,t){const n=e.getParent();if(!n){const i=Ne();return Re().append(i),i.select(),[Re(),0]}if(ee(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!H(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new oi(Tn(e.__key,t,"element"),Tn(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function kh(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[c,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(c.key,c.offset,c.type),!0}const o=hr(e.focus,n?"previous":"next"),s=r==="lineboundary",l=t==="move";let a=o,u=i==="decorators-and-blocks";if(!f1(a)){for(const c of a){u=!1;const{origin:d}=c;if(!Ie(d)||d.isIsolated()||(a=c,!s||!d.isInline()))break}if(u)for(const c of Vd(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Sn(c))c.origin.isInline()||(a=c);else{if(H(c.origin))continue;Ie(c.origin)&&!c.origin.isInline()&&(a=c)}break}}if(a===o)return!1;if(l&&!s&&Ie(a.origin)&&a.origin.isKeyboardSelectable()){const c=yd();return c.add(a.origin.getKey()),nt(c),!0}return a=Ht(a),l&&Yr(e.anchor,a),Yr(e.focus,a),u||!s}let at=null,st=null,kt=!1,Ya=!1,Ws=0;const Th={characterData:!0,childList:!0,subtree:!0};function Yo(){return kt||at!==null&&at._readOnly}function gt(){kt&&q(13)}function Wm(){Ws>99&&q(14)}function yr(){return at===null&&q(195,Jm()),at}function Je(){return st===null&&q(196,Jm()),st}function Jm(){let e=0;const t=new Set,n=na.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=ra(i);if(kd(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function ib(){return st}function Ih(e,t,n){const r=t.__type,i=function(l,a){const u=l._nodes.get(a);return u===void 0&&q(30,a),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const s=o.length;for(let l=0;l<s&&(o[l](t),t.isAttached());l++);}function Ah(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Km(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function ob(e){return bd(e,Je()._nodes)}function bd(e,t){const n=e.type,r=t.get(n);r===void 0&&q(17,n);const i=r.klass;e.type!==i.getType()&&q(18,i.name);const o=i.importJSON(e),s=e.children;if(H(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const a=bd(s[l],t);o.append(a)}return o}function Nh(e,t,n){const r=at,i=kt,o=st;at=t,kt=!0,st=e;try{return n()}finally{at=r,kt=i,st=o}}function Bn(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const o=e._editorState,s=o._selection,l=n._selection,a=e._dirtyType!==Ur,u=at,c=kt,d=st,f=e._updating,h=e._observer;let g=null;if(e._pendingEditorState=null,e._editorState=n,!i&&a&&h!==null){st=e,at=n,kt=!1,e._updating=!0;try{const _=e._dirtyType,C=e._dirtyElements,S=e._dirtyLeaves;h.disconnect(),g=Vv(o,n,e,_,C,S)}catch(_){if(_ instanceof Error&&e._onError(_),Ya)throw _;return Ym(e,null,r,n),ym(e),e._dirtyType=Ii,Ya=!0,Bn(e,o),void(Ya=!1)}finally{h.observe(r,Th),e._updating=f,at=u,kt=c,st=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,v=e._dirtyElements,y=e._normalizedNodes,p=e._updateTags,x=e._deferred;a&&(e._dirtyType=Ur,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(_,C){const S=_._decorators;let I=_._pendingDecorators||S;const P=C._nodeMap;let R;for(R in I)P.has(R)||(I===S&&(I=t1(_)),delete I[R])}(e,n);const b=i?null:rn(zt(e));if(e._editable&&b!==null&&(a||l===null||l.dirty)&&r!==null&&!p.has("skip-dom-selection")){st=e,at=n;try{if(h!==null&&h.disconnect(),a||l===null||l.dirty){const _=e._blockCursorElement;_!==null&&Gu(_,e,r),nb(s,l,e,b,p,r)}(function(_,C,S){let I=_._blockCursorElement;if(J(S)&&S.isCollapsed()&&S.anchor.type==="element"&&C.contains(document.activeElement)){const P=S.anchor,R=P.getNode(),O=P.offset;let M=!1,V=null;if(O===R.getChildrenSize())Qa(R.getChildAtIndex(O-1))&&(M=!0);else{const z=R.getChildAtIndex(O);if(z!==null&&Qa(z)){const W=z.getPreviousSibling();(W===null||Qa(W))&&(M=!0,V=_.getElementByKey(z.__key))}}if(M){const z=_.getElementByKey(R.__key);return I===null&&(_._blockCursorElement=I=function(W){const U=W.theme,G=document.createElement("div");G.contentEditable="false",G.setAttribute("data-lexical-cursor","true");let te=U.blockCursor;if(te!==void 0){if(typeof te=="string"){const A=rl(te);te=U.blockCursor=A}te!==void 0&&G.classList.add(...te)}return G}(_._config)),C.style.caretColor="transparent",void(V===null?z.appendChild(I):z.insertBefore(I,V))}}I!==null&&Gu(I,_,C)})(e,r,l)}finally{h!==null&&h.observe(r,Th),st=d,at=u}}g!==null&&function(_,C,S,I,P){const R=Array.from(_._listeners.mutation),O=R.length;for(let M=0;M<O;M++){const[V,z]=R[M],W=C.get(z);W!==void 0&&V(W,{dirtyLeaves:I,prevEditorState:P,updateTags:S})}}(e,g,p,m,o),J(l)||l===null||s!==null&&s.is(l)||e.dispatchCommand(Wl,void 0);const w=e._pendingDecorators;w!==null&&(e._decorators=w,e._pendingDecorators=null,vo("decorator",e,!0,w)),function(_,C,S){const I=Rh(C),P=Rh(S);I!==P&&vo("textcontent",_,!0,P)}(e,t||o,n),vo("update",e,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,normalizedNodes:y,prevEditorState:t||o,tags:p}),function(_,C){if(_._deferred=[],C.length!==0){const S=_._updating;_._updating=!0;try{for(let I=0;I<C.length;I++)C[I]()}finally{_._updating=S}}}(e,x),function(_){const C=_._updates;if(C.length!==0){const S=C.shift();if(S){const[I,P]=S;_d(_,I,P)}}}(e)}function vo(e,t,n,...r){const i=t._updating;t._updating=n;try{const o=Array.from(t._listeners[e]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{t._updating=i}}function Zm(e,t,n){if(e._updating===!1||st!==e){let i=!1;return e.update(()=>{i=Zm(e,t,n)}),i}const r=Id(e);for(let i=4;i>=0;i--)for(let o=0;o<r.length;o++){const s=r[o]._commands.get(t);if(s!==void 0){const l=s[i];if(l!==void 0){const a=Array.from(l),u=a.length;for(let c=0;c<u;c++)if(a[c](n,e)===!0)return!0}}}return!1}function Lh(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[o,s]=i;let l;if(s!==void 0){if(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete){const a=e._pendingEditorState;a===null&&q(191),a._flushSync=!0}l&&e._deferred.push(l),Km(e,s.tag)}o()}}return r}function _d(e,t,n){const r=e._updateTags;let i,o=!1,s=!1;n!==void 0&&(i=n.onUpdate,Km(e,n.tag),o=n.skipTransforms||!1,s=n.discrete||!1),i&&e._deferred.push(i);const l=e._editorState;let a=e._pendingEditorState,u=!1;(a===null||a._readOnly)&&(a=e._pendingEditorState=Gm(a||l),u=!0),a._flushSync=s;const c=at,d=kt,f=st,h=e._updating;at=a,kt=!1,e._updating=!0,st=e;const g=e._headless||e.getRootElement()===null;try{u&&(g?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=function(p,x){const b=p.getEditorState()._selection,w=rn(zt(p));return J(b)||b==null?vd(b,w,p,x):b.clone()}(e,n&&n.event||null));const v=e._compositionKey;t(),o=Lh(e,o),function(p,x){const b=x.getEditorState()._selection,w=p._selection;if(J(w)){const _=w.anchor,C=w.focus;let S;if(_.type==="text"&&(S=_.getNode(),S.selectionTransform(b,w)),C.type==="text"){const I=C.getNode();S!==I&&I.selectionTransform(b,w)}}}(a,e),e._dirtyType!==Ur&&(o?function(p,x){const b=x._dirtyLeaves,w=p._nodeMap;for(const _ of b){const C=w.get(_);ee(C)&&C.isAttached()&&C.isSimpleText()&&!C.isUnmergeable()&&ah(C)}}(a,e):function(p,x){const b=x._dirtyLeaves,w=x._dirtyElements,_=p._nodeMap,C=ar(),S=new Map;let I=b,P=I.size,R=w,O=R.size;for(;P>0||O>0;){if(P>0){x._dirtyLeaves=new Set;for(const M of I){const V=_.get(M);ee(V)&&V.isAttached()&&V.isSimpleText()&&!V.isUnmergeable()&&ah(V),V!==void 0&&Ah(V,C)&&Ih(x,V,S),b.add(M)}if(I=x._dirtyLeaves,P=I.size,P>0){Ws++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map;for(const M of R){const V=M[0],z=M[1];if(V!=="root"&&!z)continue;const W=_.get(V);W!==void 0&&Ah(W,C)&&Ih(x,W,S),w.set(V,z)}I=x._dirtyLeaves,P=I.size,R=x._dirtyElements,O=R.size,Ws++}x._dirtyLeaves=b,x._dirtyElements=w}(a,e),Lh(e),function(p,x,b,w){const _=p._nodeMap,C=x._nodeMap,S=[];for(const[I]of w){const P=C.get(I);P!==void 0&&(P.isAttached()||(H(P)&&pm(P,I,_,C,S,w),_.has(I)||w.delete(I),S.push(I)))}for(const I of S)C.delete(I);for(const I of b){const P=C.get(I);P===void 0||P.isAttached()||(_.has(I)||b.delete(I),C.delete(I))}}(l,a,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(a._flushSync=!0);const y=a._selection;if(J(y)){const p=a._nodeMap,x=y.anchor.key,b=y.focus.key;p.get(x)!==void 0&&p.get(b)!==void 0||q(19)}else it(y)&&y._nodes.size===0&&(a._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=l,e._dirtyType=Ii,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Bn(e)}finally{at=c,kt=d,st=f,e._updating=h,Ws=0}e._dirtyType!==Ur||e._deferred.length>0||function(v,y){const p=y.getEditorState()._selection,x=v._selection;if(x!==null){if(x.dirty||!x.is(p))return!0}else if(p!==null)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,Bn(e)):u&&ub(()=>{Bn(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function $t(e,t,n){e._updating?st===e?t():e._updates.push([t,n]):_d(e,t,n)}class bo{constructor(t,n,r){this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new bo(this.element,t,this.after)}withAfter(t){return new bo(this.element,this.before,t)}withElement(t){return new bo(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&q(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&q(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&q(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(Ti||Ao);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[t,Math.min(a+t.getChildrenSize(),Math.max(a,i))]}const o=Fh(n,r);o.push(i);const s=Fh(n,this.element);let l=t.getIndexWithinParent();for(let a=0;a<s.length;a++){const u=o[a],c=s[a];if(u===void 0||u<c)break;if(u>c){l+=1;break}}return[t.getParentOrThrow(),l]}}function Fh(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=t.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;n.push(i)}return r!==e&&q(225),n.reverse()}class dn extends Ql{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return kv[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=Je()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(ee(n)&&t.push(n),H(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;H(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;H(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return H(o)&&o.getLastDescendant()||o||null}const i=n[t];return H(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:je(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&q(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:je(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&q(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t<n/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=t;){if(i===t)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=n-1;r!==null&&i>=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContent(),H(o)&&i!==r-1&&!o.isInline()&&(t+=Jn)}return t}getTextContentSize(){let t=0;const n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){const o=n[i];t+=o.getTextContentSize(),H(o)&&i!==r-1&&!o.isInline()&&(t+=Jn.length)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const n=oh[t];return!!(this.getFormat()&n)}return!1}hasTextFormat(t){const n=Wr[t];return!!(this.getTextFormat()&n)}getFormatFlags(t,n){return gl(this.getLatest().__textFormat,t,n)}getTextStyle(){return this.getLatest().__textStyle}select(t,n){gt();const r=Q();let i=t,o=n;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){const a=this.getFirstChild();if(ee(a)||H(a))return a.select(0,0)}else if(!(t!==void 0&&t!==s||n!==void 0&&n!==s)){const a=this.getLastChild();if(ee(a)||H(a))return a.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const l=this.__key;return J(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):jm(l,i,l,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?oh[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),s=this.getWritable();t+n<=o||q(226,String(t),String(n),String(o));const l=s.__key,a=[],u=[],c=this.getChildAtIndex(t+n);let d=null,f=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const g=this.getChildAtIndex(t);g!==null&&(d=g.getPreviousSibling())}if(n>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<n;m++){g===null&&q(100);const v=g.getNextSibling(),y=g.__key;Hr(g.getWritable()),u.push(y),g=v}}let h=d;for(let g=0;g<i;g++){const m=r[g];h!==null&&m.is(h)&&(d=h=h.getPreviousSibling());const v=m.getWritable();v.__parent===l&&f--,Hr(v);const y=m.__key;if(h===null)s.__first=y,v.__prev=null;else{const p=h.getWritable();p.__next=y,v.__prev=p.__key}m.__key===l&&q(76),v.__parent=l,a.push(y),h=m}if(t+n===o)h!==null&&(h.getWritable().__next=null,s.__last=h.__key);else if(c!==null){const g=c.getWritable();if(h!==null){const m=h.getWritable();g.__prev=h.__key,m.__next=c.__key}else g.__prev=null}if(s.__size=f,u.length){const g=Q();if(J(g)){const m=new Set(u),v=new Set(a),{anchor:y,focus:p}=g;Ph(y,m,v)&&hl(y,y.getNode(),this,d,c),Ph(p,m,v)&&hl(p,p.getNode(),this,d,c),f!==0||this.canBeEmpty()||We(this)||this.remove()}}return s}getDOMSlot(t){return new bo(t)}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){const r=this.getIndent();r>0&&(n.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(n.dir=i)}return{element:n}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},n=this.getTextFormat(),r=this.getTextStyle();return n!==0&&(t.textFormat=n),r!==""&&(t.textStyle=r),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,n){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,n,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,n){const r=this.getDOMSlot(t);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=n.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function H(e){return e instanceof dn}function Ph(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Xo extends Ql{decorate(t,n){q(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ie(e){return e instanceof Xo}class Qo extends dn{static getType(){return"root"}static clone(){return new Qo}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){q(51)}getTextContent(){const t=this.__cachedText;return!Yo()&&Je()._dirtyType!==Ur||t===null?super.getTextContent():t}remove(){q(52)}replace(t){q(53)}insertBefore(t){q(54)}insertAfter(t){q(55)}updateDOM(t,n){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];H(r)||Ie(r)||q(56)}return super.append(...t)}static importJSON(t){return Re().updateFromJSON(t)}collapseAtStart(){return!0}}function ft(e){return e instanceof Qo}function Gm(e){return new ta(new Map(e._nodeMap))}function Cd(){return new ta(new Map([["root",new Qo]]))}function qm(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&q(130,n.name),H(e)){const r=t.children;Array.isArray(r)||q(59,n.name);const i=e.getChildren();for(let o=0;o<i.length;o++){const s=qm(i[o]);r.push(s)}}return t}class ta{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Nh(n&&n.editor||null,this,t)}clone(t){const n=new ta(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Nh(null,this,()=>({root:qm(Re())}))}}class wd extends dn{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Ui extends dn{static getType(){return"paragraph"}static clone(t){return new Ui(t.__key)}createDOM(t){const n=document.createElement("p"),r=wi(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:sb,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r}return{element:n}}static importJSON(t){return Ne().updateFromJSON(t)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(t,n){const r=Ne();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||ee(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function sb(e){const t=Ne();return e.style&&(t.setFormat(e.style.textAlign),Rd(e,t)),{node:t}}function Ne(){return It(new Ui)}function Ed(e){return e instanceof Ui}const we=0,De=1,Ju=3,Kn=4;function Ym(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Cd(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=Ur,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function lb(e){const t=e||{},n=ib(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,s=Cd(),l=t.namespace||(i!==null?i._config.namespace:i1()),a=t.editorState,u=[Qo,Fn,Zo,Go,Ui,wd,...t.nodes||[]],{onError:c,html:d}=t,f=t.editable===void 0||t.editable;let h;if(e===void 0&&n!==null)h=n._nodes;else{h=new Map;for(let m=0;m<u.length;m++){let v=u[m],y=null,p=null;if(typeof v!="function"){const _=v;v=_.replace,y=_.with,p=_.withKlass||null}const x=v.getType(),b=v.transform(),w=new Set;b!==null&&w.add(b),h.set(x,{exportDOM:d&&d.export?d.export.get(v):void 0,klass:v,replace:y,replaceWithKlass:p,transforms:w})}}const g=new na(s,i,h,{disableEvents:o,namespace:l,theme:r},c||console.error,function(m,v){const y=new Map,p=new Set,x=b=>{Object.keys(b).forEach(w=>{let _=y.get(w);_===void 0&&(_=[],y.set(w,_)),_.push(b[w])})};return m.forEach(b=>{const w=b.klass.importDOM;if(w==null||p.has(w))return;p.add(w);const _=w.call(b.klass);_!==null&&x(_)}),v&&x(v),y}(h,d?d.import:void 0),f);return a!==void 0&&(g._pendingEditorState=a,g._dirtyType=Ii),g}class na{constructor(t,n,r,i,o,s,l){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=Ur,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=i1(),this._onError=o,this._htmlConversions=s,this._editable=l,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&q(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&q(36,String(t));const s=o[r];return s.add(n),()=>{s.delete(n),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const s=r&&r.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&q(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=zh(r).get(n.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,n);i.push(s)}return function(s,l){const a=zh(s.getEditorState()),u=[];for(const c of l){const d=a.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=je(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:"history-merge"}:void 0)}(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return ae(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=wi(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Ym(this,n,t,i),n!==null&&(this._config.disableEvents||Kv(n),r!=null&&n.classList.remove(...r)),t!==null){const o=Fd(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=Ii,ym(this),this._updateTags.add("history-merge"),Bn(this),this._config.disableEvents||function(l,a){const u=l.ownerDocument,c=cl.get(u);(c===void 0||c<1)&&u.addEventListener("selectionchange",$m),cl.set(u,(c||0)+1),l.__lexicalEditor=a;const d=Dm(l);for(let f=0;f<Hu.length;f++){const[h,g]=Hu[f],m=typeof g=="function"?v=>{gh(v)||(hh(v),(a.isEditable()||h==="click")&&g(v,a))}:v=>{if(gh(v))return;hh(v);const y=a.isEditable();switch(h){case"cut":return y&&ae(a,pd,v);case"copy":return ae(a,Xl,v);case"paste":return y&&ae(a,Jo,v);case"dragstart":return y&&ae(a,Yl,v);case"dragover":return y&&ae(a,gd,v);case"dragend":return y&&ae(a,Uv,v);case"focus":return y&&ae(a,Am,v);case"blur":return y&&ae(a,Nm,v);case"drop":return y&&ae(a,hd,v)}};l.addEventListener(h,m),d.push(()=>{l.removeEventListener(h,m)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add("history-merge"),Bn(this);vo("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&q(38);let r=t;r._readOnly&&(r=Gm(t),r._selection=t._selection?t._selection.clone():null),xm(this);const i=this._pendingEditorState,o=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),Bn(this)),this._pendingEditorState=r,this._dirtyType=Ii,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||Bn(this)}parseEditorState(t,n){return function(r,i,o){const s=Cd(),l=at,a=kt,u=st,c=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,h=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,at=s,kt=!1,st=i;try{const g=i._nodes;bd(r.root,g),o&&o(),s._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=h,at=l,kt=a,st=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Bn(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,o){r._updating?r._updates.push([i,o]):_d(r,i,o)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),$t(this,()=>{const i=Q(),o=Re();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),fb("focus"),hb(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=rn(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,vo("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}na.version="0.27.2+prod.esm";let ab=1;const ub=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Sd(e){const t=document.activeElement;if(!Ke(t))return!1;const n=t.nodeName;return Ie(In(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&ra(t)==null)}function es(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Sd(t)&&Td(t)===e}catch{return!1}}function kd(e){return e instanceof na}function Td(e){let t=e;for(;t!=null;){const n=ra(t);if(kd(n))return n;t=ts(t)}return null}function ra(e){return e?e.__lexicalEditor:null}function pi(e){return e.isToken()||e.isSegmented()}function er(e){return Wi(e)&&e.nodeType===pv}function cb(e){return Wi(e)&&e.nodeType===mv}function Ai(e){let t=e;for(;t!=null;){if(er(t))return t;t=t.firstChild}return null}function gl(e,t,n){const r=Wr[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Xm(e){return ee(e)||tn(e)||Ie(e)}function Qm(e,t){if(t!=null)return void(e.__key=t);gt(),Wm();const n=Je(),r=yr(),i=""+ab++;r._nodeMap.set(i,e),H(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=fm,e.__key=i}function Hr(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const s=o.getWritable();r.__first=o.__key,s.__prev=null}else r.__first=null;else{const s=i.getWritable();if(o!==null){const l=o.getWritable();l.__prev=s.__key,s.__next=l.__key}else s.__next=null;n.__prev=null}if(o===null)if(i!==null){const s=i.getWritable();r.__last=i.__key,s.__next=null}else r.__last=null;else{const s=o.getWritable();if(i!==null){const l=i.getWritable();l.__next=s.__key,s.__prev=l.__key}else s.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function pl(e){Wm();const t=e.getLatest(),n=t.__parent,r=yr(),i=Je(),o=r._nodeMap,s=i._dirtyElements;n!==null&&function(a,u,c){let d=a;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent}}(n,o,s);const l=t.__key;i._dirtyType=fm,H(e)?s.set(l,!0):i._dirtyLeaves.add(l)}function dt(e){gt();const t=Je(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=je(n);r!==null&&r.getWritable()}if(e!==null){const r=je(e);r!==null&&r.getWritable()}}}function ar(){return Yo()?null:Je()._compositionKey}function je(e,t){const n=(t||yr())._nodeMap.get(e);return n===void 0?null:n}function e1(e,t){const n=ia(e,Je());return n!==void 0?je(n,t):null}function ia(e,t){return e[`__lexicalKey_${t._key}`]}function In(e,t){let n=e;for(;n!=null;){const r=e1(n,t);if(r!==null)return r;n=ts(n)}return null}function t1(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Rh(e){return e.read(()=>Re().getTextContent())}function Re(){return n1(yr())}function n1(e){return e._nodeMap.get("root")}function nt(e){gt();const t=yr();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function mi(e){const t=Je(),n=function(r,i){let o=r;for(;o!=null;){const s=ia(o,i);if(s!==void 0)return s;o=ts(o)}return null}(e,t);return n===null?e===t.getRootElement()?je("root"):null:je(n)}function Oh(e,t){return t?e.getTextContentSize():0}function r1(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Id(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function i1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function o1(e){return er(e)?e.nodeValue:null}function Ad(e,t,n){const r=rn(zt(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=o1(i);const a=In(i);if(l!==null&&ee(a)){if(l===jl&&n){const u=n.length;l=n,o=u,s=u}l!==null&&Nd(a,l,o,s,e)}}}function Nd(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let l=t;(s||i)&&t[t.length-1]===jl&&(l=t.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(dt(null),Ao||Ti||nl)o.remove();else{const m=Je();setTimeout(()=>{m.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),c=zi(),d=o.getTextContentSize(),f=ar(),h=o.getKey();if(o.isToken()||f!==null&&h===f&&!s||J(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!o.canInsertTextBefore()&&!s||c.focus.key===e.__key&&c.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const g=Q();if(!J(g)||n===null||r===null)return void o.setTextContent(l);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const m=He(o.getTextContent());o.replace(m),o=m}o.setTextContent(l)}}}function Mh(e){return e==="ArrowLeft"}function Dh(e){return e==="ArrowRight"}function ho(e,t){return Kt?e:t}function $h(e){return e==="Enter"}function ui(e){return e==="Backspace"}function no(e){return e==="Delete"}function Vh(e,t,n){return e.toLowerCase()==="a"&&ho(t,n)}function db(e){const t=Re();if(J(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Jr(e),e}{const n=t.select(0,t.getChildrenSize());return nt(Jr(n)),n}}function wi(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=rl(i);return n[t]=o,o}return i}function Ld(e,t,n,r,i){if(n.size===0)return;const o=r.__type,s=r.__key,l=t.get(o);l===void 0&&q(33,o);const a=l.klass;let u=e.get(a);u===void 0&&(u=new Map,e.set(a,u));const c=u.get(s),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(s,d?"updated":i)}function Hh(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function Ku(e,t){const n=e.offset;if(e.type==="element")return Hh(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?Hh(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function s1(e){const t=zt(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function ae(e,t,n){return Zm(e,t,n)}function oa(e){return!ft(e)&&!e.isLastChild()&&!e.isInline()}function Ni(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&q(75,t),n}function ts(e){const t=e.assignedSlot||e.parentElement;return qu(t)?t.host:t}function l1(e){return cb(e)?e:Ke(e)?e.ownerDocument:null}function fb(e){gt(),Je()._updateTags.add(e)}function hb(e){gt(),Je()._deferred.push(e)}function Zu(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Fd(e){const t=l1(e);return t?t.defaultView:null}function zt(e){const t=e._window;return t===null&&q(78),t}function gb(e){let t=e.getParentOrThrow();for(;t!==null;){if(We(t))return t;t=t.getParentOrThrow()}return t}function We(e){return ft(e)||H(e)&&e.isShadowRoot()}function pb(e){const t=e.constructor.clone(e);return Qm(t,null),t}function It(e){const t=Je(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&q(200,e.constructor.name,n);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(e),l=s.constructor;return o!==null?s instanceof o||q(201,o.name,o.getType(),l.name,l.getType(),e.constructor.name,n):s instanceof e.constructor&&l!==e.constructor||q(202,l.name,l.getType(),e.constructor.name,n),s.__key===e.__key&&q(203,e.constructor.name,n,l.name,l.getType()),s}return e}function Xa(e,t){!ft(e.getParent())||H(t)||Ie(t)||q(99)}function mb(e){const t=je(e);return t===null&&q(63,e),t}function Qa(e){return(Ie(e)||H(e)&&!e.canBeEmpty())&&!e.isInline()}function Gu(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function rn(e){return cn?(e||window).getSelection():null}function xb(e){const t=Fd(e);return t?t.getSelection():null}function yb(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),We(e)&&q(102);const r=s=>{const l=s.getParentOrThrow(),a=We(l),u=s!==n||a?pb(s):s;if(a)return H(s)&&H(u)||q(133),s.insertAfter(u),[s,u,u];{const[c,d,f]=r(l),h=s.getNextSiblings();return f.append(u,...h),[c,d,u]}},[i,o]=r(n);return[i,o]}function a1(e){return Ke(e)&&e.tagName==="A"}function Ke(e){return Wi(e)&&e.nodeType===gv}function Wi(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function qu(e){return Wi(e)&&e.nodeType===xv}function Yu(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function ml(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function qt(e){if(Ie(e)&&!e.isInline())return!0;if(!H(e)||We(e))return!1;const t=e.getFirstChild(),n=t===null||tn(t)||ee(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function eu(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function vb(){return Je()}const Bh=new WeakMap,bb=new Map;function zh(e){if(!e._readOnly&&e.isEmpty())return bb;e._readOnly||q(192);let t=Bh.get(e);return t||(t=function(n){const r=new Map;for(const[i,o]of n._nodeMap){const s=o.__type;let l=r.get(s);l||(l=new Map,r.set(s,l)),l.set(i,o)}return r}(e),Bh.set(e,t)),t}function Pd(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Rd(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function _b(e){return e.__lexicalUnmanaged===!0}const Cb={next:"previous",previous:"next"};class Od{constructor(t){this.origin=t}[Symbol.iterator](){return u1({hasNext:Li,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return pt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return pt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let o=this;const s=this.getParentAtCaret(),l=new Map;for(let a=o.getAdjacentCaret();a!==null&&l.size<t;a=a.getAdjacentCaret()){const u=a.origin.getWritable();l.set(u.getKey(),u)}for(const a of i){if(l.size>0){const u=o.getNodeAtCaret();if(u){if(l.delete(u.getKey()),l.delete(a.getKey()),!(u.is(a)||o.origin.is(a))){const c=a.getParent();c&&c.is(s)&&a.remove(),u.replace(a)}}else u===null&&q(263,Array.from(l).join(" "))}else o.insert(a);o=pt(a,this.direction)}for(const a of l.values())a.remove();return this}}class Do extends Od{constructor(){super(...arguments);Dt(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:An(n,this.direction)}getParentCaret(n="root"){return pt(Md(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Ji(this.direction);return pt(this.getNodeAtCaret(),n)||An(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof Do&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const wb={root:ft,shadowRoot:We};function Ji(e){return Cb[e]}function Md(e,t="root"){return wb[t](e)?null:e}class Zr extends Od{constructor(){super(...arguments);Dt(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:pt(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return H(this.origin)?An(this.origin,this.direction):null}getParentCaret(n="root"){return pt(Md(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=Ji(this.direction);return pt(this.getNodeAtCaret(),n)||An(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Zr&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Zr||n instanceof Gr)&&this.direction===n.direction&&this.origin.is(n.origin)}}class Gr extends Od{constructor(n,r){super(n);Dt(this,"type","text");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:qr(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return pt(Md(this.getParentAtCaret(),n),this.direction)}getFlipped(){return qr(this.origin,Ji(this.direction),this.offset)}isSamePointCaret(n){return n instanceof Gr&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Zr||n instanceof Gr)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return pt(this.origin,this.direction)}}function Br(e){return e instanceof Gr}function Li(e){return e instanceof Zr}function Sn(e){return e instanceof Do}const Eb={next:class extends Gr{constructor(){super(...arguments);Dt(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Gr{constructor(){super(...arguments);Dt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Sb={next:class extends Zr{constructor(){super(...arguments);Dt(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Zr{constructor(){super(...arguments);Dt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},kb={next:class extends Do{constructor(){super(...arguments);Dt(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends Do{constructor(){super(...arguments);Dt(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function pt(e,t){return e?new Sb[t](e):null}function qr(e,t,n){return e?new Eb[t](e,sa(e,n)):null}function sa(e,t){const n=e.getTextContentSize(),r=t==="next"?n:t==="previous"?0:t;return r>=0&&r<=n||q(274,String(t),String(n)),r}function jh(e,t){return new Ib(e,t)}function An(e,t){return H(e)?new kb[t](e):null}function Tb(e){return e&&e.getChildCaret()||e}function Dd(e){return e&&Tb(e.getAdjacentCaret())}class $d{constructor(t,n,r){Dt(this,"type","node-caret-range");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new $d(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return Br(o)?function(s,l){const{direction:a,origin:u}=s,c=sa(u,l==="focus"?Ji(a):a);return jh(s,c-s.offset)}(o,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:o}=r;if(i.isSameNodeCaret(o))return[jh(i,o.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=Br(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=Br(r),o=s=>s.isSameNodeCaret(r)?null:Dd(s)||s.getParentCaret(t);return u1({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:o(n),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Ib{constructor(t,n){Dt(this,"type","slice");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),o=t.getTextContent();return qr(t.setTextContent(o.slice(0,r)+o.slice(i)),n,r)}}function Vd(e){return Fi(e,pt(Re(),e.direction))}function Fi(e,t){return e.direction!==t.direction&&q(265),new $d(e,t,e.direction)}function u1(e){const{initial:t,hasNext:n,step:r,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!n(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function c1(e,t){const n=Js(e.origin,t.origin);switch(n===null&&q(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(o,s){return Math.sign(o-s)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?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 d1(n)}}function d1(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let o=t,s=n;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function Ls(e,t){return t.is(e)}function Uh(e){return H(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Js(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=Uh(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=Uh(t);r;i=r,r=r.getParent()){const o=n.get(r);if(o!==void 0)return o===null?(Ls(e,r)||q(276),{commonAncestor:r,type:"ancestor"}):i===null?(Ls(t,r)||q(277),{commonAncestor:r,type:"descendant"}):((H(o)||Ls(e,o))&&(H(i)||Ls(t,i))&&r.is(o.getParent())&&r.is(i.getParent())||q(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function hr(e,t){const{type:n,key:r,offset:i}=e,o=mb(e.key);return n==="text"?(ee(o)||q(266,o.getType(),r),qr(o,t,i)):(H(o)||q(267,o.getType(),r),g1(o,e.offset,t))}function Yr(e,t){const{origin:n,direction:r}=t,i=r==="next";Br(t)?e.set(n.getKey(),t.offset,"text"):Li(t)?ee(n)?e.set(n.getKey(),sa(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(Sn(t)&&H(n)||q(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function tu(e,t){Yr(e.anchor,t.anchor),Yr(e.focus,t.focus)}function Wh(e){const{anchor:t,focus:n}=e,r=hr(t,"next"),i=hr(n,"next"),o=c1(r,i)<=0?"next":"previous";return Fi(Pi(r,o),Pi(i,o))}function Hd(e){const{direction:t,origin:n}=e,r=pt(n,Ji(t)).getNodeAtCaret();return r?pt(r,t):An(n.getParentOrThrow(),t)}function Jh(e,t="root"){const n=[e];for(let r=Sn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Hd(r));return n}function nu(e){return!!e&&e.origin.isAttached()}function Ab(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const o=h1(e,r),s=Jh(o.anchor,n),l=Jh(o.focus.getFlipped(),n),a=new Set,u=[];for(const g of o.iterNodeCarets(n))if(Sn(g))a.add(g.origin.getKey());else if(Li(g)){const{origin:m}=g;H(m)&&!a.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),y=Hd(pt(m,r)),p=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||p==="token"&&g.distance!==0)y.remove();else if(g.distance!==0){i="removeEmptySlices";let x=g.removeTextSlice();const b=g.caret.origin;if(p==="segmented"){const w=x.origin,_=He(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());y.replaceOrInsert(_),x=qr(_,r,x.offset)}b.is(s[0].origin)&&(s[0]=x),b.is(l[0].origin)&&(l[0]=x.getFlipped())}}let c,d;for(const g of s)if(nu(g)){c=Ht(g);break}for(const g of l)if(nu(g)){d=Ht(g);break}const f=function(g,m,v){if(!g||!m)return null;const y=g.getParentAtCaret(),p=m.getParentAtCaret();if(!y||!p)return null;const x=y.getParents().reverse();x.push(y);const b=p.getParents().reverse();b.push(p);const w=Math.min(x.length,b.length);let _;for(_=0;_<w&&x[_]===b[_];_++);const C=(P,R)=>{let O;for(let M=_;M<P.length;M++){const V=P[M];if(We(V))return;!O&&R(V)&&(O=V)}return O},S=C(x,qt),I=S&&C(b,P=>v.has(P.getKey())&&qt(P));return S&&I?[S,I]:null}(c,d,a);if(f){const[g,m]=f;An(g,"previous").splice(0,m.getChildren()),m.remove()}const h=[c,d,...s,...l].find(nu);if(h){const g=Pi(Ht(h),e.direction);return Fi(g,g)}q(269,JSON.stringify(s.map(g=>g.origin.__key)))}function Ht(e){const t=function(i){let o=i;for(;Sn(o);){const s=Dd(o);if(!Sn(s))break;o=s}return o}(e.getLatest()),{direction:n}=t;if(ee(t.origin))return Br(t)?t:qr(t.origin,n,n);const r=t.getAdjacentCaret();return Li(r)&&ee(r.origin)?qr(r.origin,n,Ji(n)):t}function f1(e){return Br(e)&&e.offset!==sa(e.origin,e.direction)}function Pi(e,t){return e.direction===t?e:e.getFlipped()}function h1(e,t){return e.direction===t?e:Fi(Pi(e.focus,t),Pi(e.anchor,t))}function g1(e,t,n){let r=An(e,"next");for(let i=0;i<t;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return Pi(r,n)}function Nb(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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.`)}const Lb=new Map;function Fb(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(t[i.trim()]=o.trim())}return t}function p1(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&n!==null){const[r,i]=n,o=e.isBackward(),s=r.getNode(),l=i.getNode(),a=t.is(s),u=t.is(l);if(a||u){const[c,d]=Wu(e),f=s.is(l),h=t.is(o?l:s),g=t.is(o?s:l);let m,v=0;return f?(v=c>d?d:c,m=c>d?c:d):h?(v=o?d:c,m=void 0):g&&(v=0,m=o?c:d),t.__text=t.__text.slice(v,m),t}}return t}function Kh(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return H(t)||Nb(177),e.offset===t.getChildrenSize()}function Pb(e){const t=e.getStyle(),n=Fb(t);Lb.set(t,n)}function Rb(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function Ob(e,t,n=Rb){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,l]=r;o=qo(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(l.key,l.offset,l.type);const a=qh(s.getNode(),qt),u=qh(l.getNode(),qt);H(a)&&i.set(a.getKey(),a),H(u)&&i.set(u.getKey(),u)}for(const s of e.getNodes())H(s)&&qt(s)&&i.set(s.getKey(),s);for(const[s,l]of i){const a=t();n(l,a),l.replace(a,!0),o&&(s===o.anchor.key&&o.anchor.set(a.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(a.getKey(),o.focus.offset,o.focus.type))}o&&e.is(Q())&&nt(o)}function Zh(e,t){const n=hr(e.focus,t?"previous":"next");if(f1(n))return!1;for(const r of Vd(n)){if(Sn(r))return!r.origin.isInline();if(!H(r.origin)){if(Ie(r.origin))return!0;break}}return!1}function Mb(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Db(e){const t=e.anchor.getNode();return(ft(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function Gh(e,t,n){const r=Db(e);Mb(e,t,n?!r:r,"character")}function qh(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}function $b(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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.`)}const la=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Vb=la&&"documentMode"in document?document.documentMode:null,Hb=la&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!la||!("InputEvent"in window)||Vb)&&"getTargetRanges"in new window.InputEvent("input");function m1(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function At(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const Bb=la,zb=Hb;function on(e,...t){const n=m1(...t);n.length>0&&e.classList.add(...n)}function aa(e,...t){const n=m1(...t);n.length>0&&e.classList.remove(...n)}function jb(e){return e?e.getAdjacentCaret():null}function x1(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function Xu(e){const t=vr(e,n=>H(n)&&!n.isInline());return H(t)||$b(4,e.__key),t}const vr=(e,t)=>{let n=e;for(;n!==Re()&&n!=null;){if(t(n))return n;n=n.getParent()}return null};function y1(e){const t=Q()||zi();if(J(t)){const{focus:n}=t,r=n.getNode(),i=n.offset;if(We(r))g1(r,i,"next").insert(e),e.selectNext();else{let o,s;ee(r)?(o=r.getParentOrThrow(),s=r.getIndexWithinParent(),i>0&&(s+=1,r.splitText(i))):(o=r,s=i);const[,l]=yb(o,s);l.insertBefore(e),l.selectStart()}}else{if(t!=null){const r=t.getNodes();r[r.length-1].getTopLevelElementOrThrow().insertAfter(e)}else Re().append(e);const n=Ne();e.insertAfter(n),n.select()}return e.getLatest()}function Bd(e,t){const n=t();return e.replace(n),n.append(e),n}function ur(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Ub(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);i!==null&&n.push(i)}return n}let ru=!(zb||!Bb)&&void 0;function Wb(e){let t=1;if(function(){if(ru===void 0){const n=document.createElement("div");n.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(n);const r=n.getBoundingClientRect();n.style.setProperty("zoom","2"),ru=n.getBoundingClientRect().width===r.width,document.body.removeChild(n)}return ru}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}const Fs=0,Qu=1,ec=2,Gt=0,Jb=1,Yh=2,Kb=3,Zb=4;function Gb(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return Gt;const o=t._selection,s=e._selection;if(i)return Jb;if(!(J(o)&&J(s)&&s.isCollapsed()&&o.isCollapsed()))return Gt;const l=function(y,p,x){const b=y._nodeMap,w=[];for(const _ of p){const C=b.get(_);C!==void 0&&w.push(C)}for(const[_,C]of x){if(!C)continue;const S=b.get(_);S===void 0||ft(S)||w.push(S)}return w}(t,n,r);if(l.length===0)return Gt;if(l.length>1){const y=t._nodeMap,p=y.get(o.anchor.key),x=y.get(s.anchor.key);return p&&x&&!e._nodeMap.has(p.__key)&&ee(p)&&p.__text.length===1&&o.anchor.offset===1?Yh:Gt}const a=l[0],u=e._nodeMap.get(a.__key);if(!ee(u)||!ee(a)||u.__mode!==a.__mode)return Gt;const c=u.__text,d=a.__text;if(c===d)return Gt;const f=o.anchor,h=s.anchor;if(f.key!==h.key||f.type!=="text")return Gt;const g=f.offset,m=h.offset,v=d.length-c.length;return v===1&&m===g-1?Yh:v===-1&&m===g+1?Kb:v===-1&&m===g?Zb:Gt}function qb(e,t){let n=Date.now(),r=Gt;return(i,o,s,l,a,u)=>{const c=Date.now();if(u.has("historic"))return r=Gt,n=c,ec;const d=Gb(i,o,l,a,e.isComposing()),f=(()=>{const h=s===null||s.editor===e,g=u.has("history-push");if(!g&&h&&u.has("history-merge"))return Fs;if(i===null)return Qu;const m=o._selection;return l.size>0||a.size>0?g===!1&&d!==Gt&&d===r&&c<n+t&&h||l.size===1&&function(v,y,p){const x=y._nodeMap.get(v),b=p._nodeMap.get(v),w=y._selection,_=p._selection;return!(J(w)&&J(_)&&w.anchor.type==="element"&&w.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"||!ee(x)||!ee(b)||x.__parent!==b.__parent)&&JSON.stringify(y.read(()=>x.exportJSON()))===JSON.stringify(p.read(()=>b.exportJSON()))}(Array.from(l)[0],i,o)?Fs:Qu:m!==null?Fs:ec})();return n=c,r=d,f}}function Xh(e){e.undoStack=[],e.redoStack=[],e.current=null}function Yb(e,t,n){const r=qb(e,n);return At(e.registerCommand(Kl,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(a.length!==0){const u=s.current,c=a.pop();u!==null&&(l.push(u),o.dispatchCommand(co,!0)),a.length===0&&o.dispatchCommand(fo,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),we),e.registerCommand(Zl,()=>(function(o,s){const l=s.redoStack,a=s.undoStack;if(l.length!==0){const u=s.current;u!==null&&(a.push(u),o.dispatchCommand(fo,!0));const c=l.pop();l.length===0&&o.dispatchCommand(co,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:"historic"})}}(e,t),!0),we),e.registerCommand(Wv,()=>(Xh(t),!1),we),e.registerCommand(Jv,()=>(Xh(t),e.dispatchCommand(co,!1),e.dispatchCommand(fo,!1),!0),we),e.registerUpdateListener(({editorState:o,prevEditorState:s,dirtyLeaves:l,dirtyElements:a,tags:u})=>{const c=t.current,d=t.redoStack,f=t.undoStack,h=c===null?null:c.editorState;if(c!==null&&o===h)return;const g=r(s,o,c,l,a,u);if(g===Qu)d.length!==0&&(t.redoStack=[],e.dispatchCommand(co,!1)),c!==null&&(f.push({...c}),e.dispatchCommand(fo,!0));else if(g===ec)return;t.current={editor:e,editorState:o}}))}function v1(){return{current:null,redoStack:[],undoStack:[]}}function Xb({delay:e,externalHistoryState:t}){const[n]=yt();return function(r,i,o=1e3){const s=E.useMemo(()=>i||v1(),[i]);E.useEffect(()=>Yb(r,s,o),[o,r,s])}(n,t,e),null}function Qb(e,t){const n=t.body?t.body.childNodes:[];let r=[];const i=[];for(let o=0;o<n.length;o++){const s=n[o];if(!_1.has(s.nodeName)){const l=C1(s,e,i,!1);l!==null&&(r=r.concat(l))}}return function(o){for(const s of o)s.getNextSibling()instanceof wd&&s.insertAfter(nn());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}}(i),r}function e_(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Re().getChildren();for(let i=0;i<r.length;i++)b1(e,r[i],n,t);return n.innerHTML}function b1(e,t,n,r=null){let i=r===null||t.isSelected(r);const o=H(t)&&t.excludeFromCopy("html");let s=t;if(r!==null){let h=Pd(t);h=ee(h)&&r!==null?p1(r,h):h,s=h}const l=H(s)?s.getChildren():[],a=e._nodes.get(s.getType());let u;u=a&&a.exportDOM!==void 0?a.exportDOM(e,s):s.exportDOM(e);const{element:c,after:d}=u;if(!c)return!1;const f=document.createDocumentFragment();for(let h=0;h<l.length;h++){const g=l[h],m=b1(e,g,f,r);!i&&H(t)&&m&&t.extractWithChild(g,r,"html")&&(i=!0)}if(i&&!o){if((Ke(c)||qu(c))&&c.append(f),n.append(c),d){const h=d.call(s,c);h&&(qu(c)?c.replaceChildren(h):c.replaceWith(h))}}else n.append(f);return i}const _1=new Set(["STYLE","SCRIPT"]);function C1(e,t,n,r,i=new Map,o){let s=[];if(_1.has(e.nodeName))return s;let l=null;const a=function(g,m){const{nodeName:v}=g,y=m._htmlConversions.get(v.toLowerCase());let p=null;if(y!==void 0)for(const x of y){const b=x(g);b!==null&&(p===null||(p.priority||0)<=(b.priority||0))&&(p=b)}return p!==null?p.conversion:null}(e,t),u=a?a(e):null;let c=null;if(u!==null){c=u.after;const g=u.node;if(l=Array.isArray(g)?g[g.length-1]:g,l!==null){for(const[,m]of i)if(l=m(l,o),!l)break;l&&s.push(...Array.isArray(g)?g:[l])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const d=e.childNodes;let f=[];const h=(l==null||!We(l))&&(l!=null&&dl(l)||r);for(let g=0;g<d.length;g++)f.push(...C1(d[g],t,n,h,new Map(i),l));return c!=null&&(f=c(f)),ml(e)&&(f=t_(e,f,h?()=>{const g=new wd;return n.push(g),g}:Ne)),l==null?f.length>0?s=s.concat(f):ml(e)&&function(g){return g.nextSibling==null||g.previousSibling==null?!1:Yu(g.nextSibling)&&Yu(g.previousSibling)}(e)&&(s=s.concat(nn())):H(l)&&l.append(...f),s}function t_(e,t,n){const r=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const l=t[s];if(dl(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===t.length-1||s<t.length-1&&dl(t[s+1])){const a=n();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function xl(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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 n_(e,t=Q()){return t==null&&xl(166),J(t)&&t.isCollapsed()||t.getNodes().length===0?"":e_(e,t)}function r_(e,t=Q()){return t==null&&xl(166),J(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(i_(e,t))}function Qh(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes))return eg(n,o_(l.nodes),t)}catch{}const i=e.getData("text/html"),o=e.getData("text/plain");if(i&&o!==i)try{const l=new DOMParser().parseFromString(function(a){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(a):a}(i),"text/html");return eg(n,Qb(n,l),t)}catch{}const s=o||e.getData("text/uri-list");if(s!=null)if(J(t)){const l=s.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let a=0;a<l.length;a++){const u=Q();if(J(u)){const c=l[a];c===`
|
|
17
|
-
`||c===`\r
|
|
18
|
-
`?u.insertParagraph():c===" "?u.insertNodes([Bi()]):u.insertText(c)}}}else t.insertRawText(s)}function eg(e,t,n){e.dispatchCommand(Hv,{nodes:t,selection:n})||n.insertNodes(t)}function w1(e,t,n,r=[]){let i=t===null||n.isSelected(t);const o=H(n)&&n.excludeFromCopy("html");let s=n;if(t!==null){let u=Pd(n);u=ee(u)&&t!==null?p1(t,u):u,s=u}const l=H(s)?s.getChildren():[],a=function(u){const c=u.exportJSON(),d=u.constructor;if(c.type!==d.getType()&&xl(58,d.name),H(u)){const f=c.children;Array.isArray(f)||xl(59,d.name)}return c}(s);if(ee(s)){const u=s.__text;u.length>0?a.text=u:i=!1}for(let u=0;u<l.length;u++){const c=l[u],d=w1(e,t,c,a.children);!i&&H(n)&&d&&n.extractWithChild(c,t,"clone")&&(i=!0)}if(i&&!o)r.push(a);else if(Array.isArray(a.children))for(let u=0;u<a.children.length;u++){const c=a.children[u];r.push(c)}return i}function i_(e,t){const n=[],r=Re().getChildren();for(let i=0;i<r.length;i++)w1(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function o_(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=ob(r);ee(i)&&Pb(i),t.push(i)}return t}let ci=null;async function tg(e,t,n){if(ci!==null)return!1;if(t!==null)return new Promise((u,c)=>{e.update(()=>{u(ng(e,t,n))})});const r=e.getRootElement(),i=e._window||window,o=window.document,s=rn(i);if(r===null||s===null)return!1;const l=o.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(o.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),s.removeAllRanges(),s.addRange(a),new Promise((u,c)=>{const d=e.registerCommand(Xl,f=>(ur(f,ClipboardEvent)&&(d(),ci!==null&&(window.clearTimeout(ci),ci=null),u(ng(e,f,n))),!0),Kn);ci=window.setTimeout(()=>{d(),ci=null,u(!1)},50),o.execCommand("copy"),l.remove()})}function ng(e,t,n){if(n===void 0){const i=rn(e._window);if(!i)return!1;const o=i.anchorNode,s=i.focusNode;if(o!==null&&s!==null&&!es(e,o,s))return!1;const l=Q();if(l===null)return!1;n=l_(l)}t.preventDefault();const r=t.clipboardData;return r!==null&&(a_(r,n),!0)}const s_=[["text/html",n_],["application/x-lexical-editor",r_]];function l_(e=Q()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=vb();for(const[r,i]of s_){const o=i(n,e);o!==null&&(t[r]=o)}}return t}function a_(e,t){for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function rg(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Ki=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,u_=Ki&&"documentMode"in document?document.documentMode:null,c_=!(!Ki||!("InputEvent"in window)||u_)&&"getTargetRanges"in new window.InputEvent("input"),d_=Ki&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ig=Ki&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,f_=Ki&&/^(?=.*Chrome).*/i.test(navigator.userAgent),h_=Ki&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!f_,og=Qn();let ua=class E1 extends dn{static getType(){return"quote"}static clone(t){return new E1(t.__key)}createDOM(t){const n=document.createElement("blockquote");return on(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:g_,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return ns().updateFromJSON(t)}insertNewAfter(t,n){const r=Ne(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=Ne();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}};function ns(){return It(new ua)}function tc(e){return e instanceof ua}let rs=class S1 extends dn{static getType(){return"heading"}static clone(t){return new S1(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}setTag(t){const n=this.getWritable();return this.__tag=t,n}createDOM(t){const n=this.__tag,r=document.createElement(n),i=t.theme.heading;if(i!==void 0){const o=i[n];on(r,o)}return r}updateDOM(t,n,r){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:di,priority:0}),h2:t=>({conversion:di,priority:0}),h3:t=>({conversion:di,priority:0}),h4:t=>({conversion:di,priority:0}),h5:t=>({conversion:di,priority:0}),h6:t=>({conversion:di,priority:0}),p:t=>{const n=t.firstChild;return n!==null&&sg(n)?{conversion:()=>({node:null}),priority:3}:null},span:t=>sg(t)?{conversion:n=>({node:_n("h1")}),priority:3}:null}}exportDOM(t){const{element:n}=super.exportDOM(t);if(Ke(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return _n(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,n=!0){const r=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&r===i.getTextContentSize()||!t?Ne():_n(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,n),r===0&&!this.isEmpty()&&t){const l=Ne();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const t=this.isEmpty()?Ne():_n(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function sg(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function di(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=_n(t),e.style!==null&&(Rd(e,n),n.setFormat(e.style.textAlign))),{node:n}}function g_(e){const t=ns();return e.style!==null&&(t.setFormat(e.style.textAlign),Rd(e,t)),{node:t}}function _n(e="h1"){return It(new rs(e))}function ca(e){return e instanceof rs}function Ps(e){let t=null;if(ur(e,DragEvent)?t=e.dataTransfer:ur(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function lg(e){const t=Q();if(!J(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(n.has(s))continue;const l=vr(o,u=>H(u)&&!u.isInline());if(l===null)continue;const a=l.getKey();l.canIndent()&&!n.has(a)&&(n.add(a),e(l))}return n.size>0}function Rs(e){const t=In(e);return Ie(t)}function iu(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function p_(e){return At(e.registerCommand(Jl,t=>{const n=Q();return!!it(n)&&(n.clear(),!0)},0),e.registerCommand(Vr,t=>{const n=Q();return!!J(n)&&(n.deleteCharacter(t),!0)},we),e.registerCommand(Ro,t=>{const n=Q();return!!J(n)&&(n.deleteWord(t),!0)},we),e.registerCommand(Oo,t=>{const n=Q();return!!J(n)&&(n.deleteLine(t),!0)},we),e.registerCommand(_i,t=>{const n=Q();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)Qh(r,n,e);else if(J(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},we),e.registerCommand(Mu,()=>{const t=Q();return!!J(t)&&(t.removeText(),!0)},we),e.registerCommand(zn,t=>{const n=Q();return!!J(n)&&(n.formatText(t),!0)},we),e.registerCommand(jv,t=>{const n=Q();if(!J(n)&&!it(n))return!1;const r=n.getNodes();for(const i of r){const o=vr(i,s=>H(s)&&!s.isInline());o!==null&&o.setFormat(t)}return!0},we),e.registerCommand(bi,t=>{const n=Q();return!!J(n)&&(n.insertLineBreak(t),!0)},we),e.registerCommand(Po,()=>{const t=Q();return!!J(t)&&(t.insertParagraph(),!0)},we),e.registerCommand(Im,()=>(ji([Bi()]),!0),we),e.registerCommand(ul,()=>lg(t=>{const n=t.getIndent();t.setIndent(n+1)}),we),e.registerCommand(Du,()=>lg(t=>{const n=t.getIndent();n>0&&t.setIndent(n-1)}),we),e.registerCommand(ud,t=>{const n=Q();if(it(n)&&!Rs(t.target)){const r=n.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(J(n)){const r=Ku(n.focus,!0);if(!t.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},we),e.registerCommand(cd,t=>{const n=Q();if(it(n)){const r=n.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(J(n)){if(function(i){const o=i.focus;return o.key==="root"&&o.offset===Re().getChildrenSize()}(n))return t.preventDefault(),!0;const r=Ku(n.focus,!1);if(!t.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},we),e.registerCommand(ad,t=>{const n=Q();if(it(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}if(!J(n))return!1;if(Zh(n,!0)){const r=t.shiftKey;return t.preventDefault(),Gh(n,r,!0),!0}return!1},we),e.registerCommand(Tm,t=>{const n=Q();if(it(n)&&!Rs(t.target)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),i[0].selectNext(0,0),!0}if(!J(n))return!1;const r=t.shiftKey;return!!Zh(n,!1)&&(t.preventDefault(),Gh(n,r,!1),!0)},we),e.registerCommand(Gl,t=>{if(Rs(t.target))return!1;const n=Q();if(!J(n))return!1;const{anchor:r}=n,i=r.getNode();return n.isCollapsed()&&r.offset===0&&!ft(i)&&Xu(i).getIndent()>0?(t.preventDefault(),e.dispatchCommand(Du,void 0)):(!ig||navigator.language!=="ko-KR")&&(t.preventDefault(),e.dispatchCommand(Vr,!0))},we),e.registerCommand(ql,t=>{if(Rs(t.target))return!1;const n=Q();return!!J(n)&&(t.preventDefault(),e.dispatchCommand(Vr,!1))},we),e.registerCommand(Mo,t=>{const n=Q();if(!J(n))return!1;if(iu(n),t!==null){if((ig||d_||h_)&&c_)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(bi,!1)}return e.dispatchCommand(Po,void 0)},we),e.registerCommand(Ko,()=>{const t=Q();return!!J(t)&&(e.blur(),!0)},we),e.registerCommand(hd,t=>{const[,n]=Ps(t);if(n.length>0){const i=rg(t.clientX,t.clientY);if(i!==null){const{offset:o,node:s}=i,l=In(s);if(l!==null){const a=qo();if(ee(l))a.anchor.set(l.getKey(),o,"text"),a.focus.set(l.getKey(),o,"text");else{const c=l.getParentOrThrow().getKey(),d=l.getIndexWithinParent()+1;a.anchor.set(c,d,"element"),a.focus.set(c,d,"element")}const u=Jr(a);nt(u)}e.dispatchCommand(og,n)}return t.preventDefault(),!0}const r=Q();return!!J(r)},we),e.registerCommand(Yl,t=>{const[n]=Ps(t),r=Q();return!(n&&!J(r))},we),e.registerCommand(gd,t=>{const[n]=Ps(t),r=Q();if(n&&!J(r))return!1;const i=rg(t.clientX,t.clientY);if(i!==null){const o=In(i.node);Ie(o)&&t.preventDefault()}return!0},we),e.registerCommand($u,()=>(db(),!0),we),e.registerCommand(Xl,t=>(tg(e,ur(t,ClipboardEvent)?t:null),!0),we),e.registerCommand(pd,t=>(async function(n,r){await tg(r,ur(n,ClipboardEvent)?n:null),r.update(()=>{const i=Q();J(i)?i.removeText():it(i)&&i.getNodes().forEach(o=>o.remove())})}(t,e),!0),we),e.registerCommand(Jo,t=>{const[,n,r]=Ps(t);return n.length>0&&!r?(e.dispatchCommand(og,n),!0):Wi(t.target)&&Sd(t.target)?!1:Q()!==null&&(function(i,o){i.preventDefault(),o.update(()=>{const s=Q(),l=ur(i,InputEvent)||ur(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&Qh(l,s,o)},{tag:"paste"})}(t,e),!0)},we),e.registerCommand(dd,t=>{const n=Q();return J(n)&&iu(n),!1},we),e.registerCommand(fd,t=>{const n=Q();return J(n)&&iu(n),!1},we))}function Rt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Vt(e,t){return e.length>0?(Rt(e,e.length,0,t),e):t}const xn=br(/[A-Za-z]/),Qt=br(/[\dA-Za-z]/),m_=br(/[#-'*+\--9=?A-Z^-~]/);function nc(e){return e!==null&&(e<32||e===127)}const rc=br(/\d/),x_=br(/[\dA-Fa-f]/),y_=br(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Ee(e){return e===-2||e===-1||e===32}const v_=br(new RegExp("\\p{P}|\\p{S}","u")),Vn=br(/\s/);function br(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ri(e){if(e===null||Ge(e)||Vn(e))return 1;if(v_(e))return 2}function da(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function b_(e){let n={}.singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},f=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&Rt(f,f.length,0,da(h,s.slice(u+1,a),l)),Rt(f,f.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),Rt(s,u-1,a-u+3,f),a=u+f.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return f;function f(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const m=Ri(u);if(g===126)return d>1?a(g):(s.consume(g),d++,h);if(d<2&&!n)return a(g);const v=s.exit("strikethroughSequenceTemporary"),y=Ri(g);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,l(g)}}}const __=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];k1.peek=k_;function C_(){return{canContainEols:["delete"],enter:{strikethrough:E_},exit:{strikethrough:S_}}}function w_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:__}],handlers:{delete:k1}}}function E_(e){this.enter({type:"delete",children:[]},e)}function S_(e){this.exit(e)}function k1(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function k_(){return"~"}function ag(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const T_=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ug={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function T1(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function I_(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function A_(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function cg(e){return A_(e)||T1(e)}const dg=document.createElement("i");function $o(e){const t="&"+e+";";dg.innerHTML=t;const n=dg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const N_=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function L_(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let o=0,s=-1,l="",a,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,a=n.position.start):a=n.position);let c=(a?a.line:0)||1,d=(a?a.column:0)||1,f=g(),h;for(o--;++o<=e.length;)if(h===10&&(d=(u?u[s]:0)||1),h=e.charCodeAt(o),h===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){l+=String.fromCharCode(h),d++;continue}const p=o+1;let x=p,b=p,w;if(y===35){b=++x;const M=e.charCodeAt(b);M===88||M===120?(w="hexadecimal",b=++x):w="decimal"}else w="named";let _="",C="",S="";const I=w==="named"?cg:w==="decimal"?T1:I_;for(b--;++b<=e.length;){const M=e.charCodeAt(b);if(!I(M))break;S+=String.fromCharCode(M),w==="named"&&T_.includes(S)&&(_=S,C=$o(S))}let P=e.charCodeAt(b)===59;if(P){b++;const M=w==="named"?$o(S):!1;M&&(_=S,C=M)}let R=1+b-p,O="";if(!(!P&&n.nonTerminated===!1))if(!S)w!=="named"&&m(4,R);else if(w==="named"){if(P&&!C)m(5,1);else if(_!==S&&(b=x+_.length,R=1+b-x,P=!1),!P){const M=_?1:3;if(n.attribute){const V=e.charCodeAt(b);V===61?(m(M,R),C=""):cg(V)?C="":m(M,R)}else m(M,R)}O=C}else{P||m(2,R);let M=Number.parseInt(S,w==="hexadecimal"?16:10);if(F_(M))m(7,R),O="�";else if(M in ug)m(6,R),O=ug[M];else{let V="";P_(M)&&m(6,R),M>65535&&(M-=65536,V+=String.fromCharCode(M>>>10|55296),M=56320|M&1023),O=V+String.fromCharCode(M)}}if(O){v(),f=g(),o=b-1,d+=b-p+1,i.push(O);const M=g();M.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,O,{start:f,end:M},e.slice(p-1,b)),f=M}else S=e.slice(p-1,b),l+=S,d+=S.length,o=b-1}else h===10&&(c++,s++,d=0),Number.isNaN(h)?v():(l+=String.fromCharCode(h),d++);return i.join("");function g(){return{line:c,column:d,offset:o+((a?a.offset:0)||0)}}function m(y,p){let x;n.warning&&(x=g(),x.column+=p,x.offset+=p,n.warning.call(n.warningContext||void 0,N_[y],x,y))}function v(){l&&(i.push(l),n.text&&n.text.call(n.textContext||void 0,l,{start:f,end:g()}),l="")}}function F_(e){return e>=55296&&e<=57343||e>1114111}function P_(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const R_=/["&'<>`]/g,O_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M_=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,D_=/[|\\{}()[\]^$+*?.]/g,fg=new WeakMap;function $_(e,t){if(e=e.replace(t.subset?V_(t.subset):R_,r),t.subset||t.escapeOnly)return e;return e.replace(O_,n).replace(M_,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function V_(e){let t=fg.get(e);return t||(t=H_(e),fg.set(e,t)),t}function H_(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(D_,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function B_(e){return"&#x"+e.toString(16).toUpperCase()+";"}function z_(e,t){return $_(e,Object.assign({format:B_},t))}function jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hg(e.position):"start"in e||"end"in e?hg(e):"line"in e||"column"in e?ic(e):""}function ic(e){return gg(e&&e.line)+":"+gg(e&&e.column)}function hg(e){return ic(e&&e.start)+"-"+ic(e&&e.end)}function gg(e){return e&&typeof e=="number"?e:1}class Fe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=jn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Fe.prototype.file="";Fe.prototype.name="";Fe.prototype.reason="";Fe.prototype.message="";Fe.prototype.stack="";Fe.prototype.column=void 0;Fe.prototype.line=void 0;Fe.prototype.ancestors=void 0;Fe.prototype.cause=void 0;Fe.prototype.fatal=void 0;Fe.prototype.place=void 0;Fe.prototype.ruleId=void 0;Fe.prototype.source=void 0;const I1=" ";function j_(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:l,mdxJsxFlowTagNamePrimary:a,mdxJsxFlowTagNameMember:u,mdxJsxFlowTagNameLocal:c,mdxJsxFlowTagExpressionAttribute:h,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:g,mdxJsxFlowTagAttributeNameLocal:m,mdxJsxFlowTagAttributeValueLiteral:v,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:p,mdxJsxFlowTag:x,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:u,mdxJsxTextTagNameLocal:c,mdxJsxTextTagExpressionAttribute:h,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:g,mdxJsxTextTagAttributeNameLocal:m,mdxJsxTextTagAttributeValueLiteral:v,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:p,mdxJsxTextTag:x}};function e(){this.buffer()}function t(C){return{line:C.line,column:C.column,offset:C.offset}}function n(C){this.config.enter.data.call(this,C),this.config.exit.data.call(this,C)}function r(C){const S={name:void 0,attributes:[],close:!1,selfClosing:!1,start:C.start,end:C.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=S,this.buffer()}function i(C){if(this.data.mdxJsxTagStack.length===0)throw new Fe("Unexpected closing slash `/` in tag, expected an open tag first",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function o(C){if(this.data.mdxJsxTag.close)throw new Fe("Unexpected attribute in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(C){if(this.data.mdxJsxTag.close)throw new Fe("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:C.start,end:C.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function l(){const C=this.data.mdxJsxTag;C.close=!0}function a(C){const S=this.data.mdxJsxTag;S.name=this.sliceSerialize(C)}function u(C){const S=this.data.mdxJsxTag;S.name+="."+this.sliceSerialize(C)}function c(C){const S=this.data.mdxJsxTag;S.name+=":"+this.sliceSerialize(C)}function d(C){const S=this.data.mdxJsxTag;o.call(this,C),S.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(C.start),end:void 0}})}function f(C){const S=this.data.mdxJsxTag;o.call(this,C),S.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(C.start),end:void 0}}),this.buffer()}function h(C){const S=this.data.mdxJsxTag,I=S.attributes[S.attributes.length-1];I.type;const P=C.estree;I.value=this.resume(),I.position,I.position.end=t(C.end),P&&(I.data={estree:P})}function g(C){const S=this.data.mdxJsxTag,I=S.attributes[S.attributes.length-1];I.type,I.name=this.sliceSerialize(C),I.position,I.position.end=t(C.end)}function m(C){const S=this.data.mdxJsxTag,I=S.attributes[S.attributes.length-1];I.type,I.name+=":"+this.sliceSerialize(C),I.position,I.position.end=t(C.end)}function v(C){const S=this.data.mdxJsxTag,I=S.attributes[S.attributes.length-1];I.value=L_(this.resume(),{nonTerminated:!1}),I.position,I.position.end=t(C.end)}function y(C){const S=this.data.mdxJsxTag,I=S.attributes[S.attributes.length-1];I.type;const P={type:"mdxJsxAttributeValueExpression",value:this.resume()},R=C.estree;R&&(P.data={estree:R}),I.value=P,I.position,I.position.end=t(C.end)}function p(){const C=this.data.mdxJsxTag;C.selfClosing=!0}function x(C){const S=this.data.mdxJsxTag,I=this.data.mdxJsxTagStack,P=I[I.length-1];if(S.close&&P.name!==S.name)throw new Fe("Unexpected closing tag `"+_(S)+"`, expected corresponding closing tag for `"+_(P)+"` ("+jn(P)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),S.close?I.pop():this.enter({type:C.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:S.name||null,attributes:S.attributes,children:[]},C,b),S.selfClosing||S.close?this.exit(C,w):I.push(S)}function b(C,S){const I=this.data.mdxJsxTagStack,P=I[I.length-1],R=C?" before the end of `"+C.type+"`":"",O=C?{start:C.start,end:C.end}:void 0;throw new Fe("Expected a closing tag for `"+_(P)+"` ("+jn({start:S.start,end:S.end})+")"+R,O,"mdast-util-mdx-jsx:end-tag-mismatch")}function w(C,S){const I=this.data.mdxJsxTag;throw new Fe("Expected the closing tag `"+_(I)+"` either after the end of `"+S.type+"` ("+jn(S.end)+") or another opening tag after the start of `"+S.type+"` ("+jn(S.start)+")",{start:C.start,end:C.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function _(C){return"<"+(C.close?"/":"")+(C.name||"")+">"}}function U_(e){const t={},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,o=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return l.peek=J_,{handlers:{mdxJsxFlowElement:l,mdxJsxTextElement:l},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function l(a,u,c,d){const f=a.type==="mdxJsxFlowElement",h=a.name?!a.children||a.children.length===0:!1,g=A1(c),m=N1(g),v=c.createTracker(d),y=c.createTracker(d),p=[],x=(f?m:"")+"<"+(a.name||""),b=c.enter(a.type);if(v.move(x),y.move(x),a.attributes&&a.attributes.length>0){if(!a.name)throw new Error("Cannot serialize fragment w/ attributes");let I=-1;for(;++I<a.attributes.length;){const P=a.attributes[I];let R;if(P.type==="mdxJsxExpressionAttribute")R="{"+(P.value||"")+"}";else{if(!P.name)throw new Error("Cannot serialize attribute w/o name");const O=P.value,M=P.name;let V="";if(O!=null)if(typeof O=="object")V="{"+(O.value||"")+"}";else{const z=r&&ag(O,n)>ag(O,s)?s:n;V=z+z_(O,{subset:[z]})+z}R=M+(V?"=":"")+V}p.push(R)}}let w=!1;const _=p.join(" ");f&&(/\r?\n|\r/.test(_)||v.current().now.column+_.length+(h?i?2:3:1)>o)&&(w=!0);let C=v,S=x;if(w){C=y;let I=-1;for(;++I<p.length;)p[I]=m+I1+p[I];S+=C.move(`
|
|
19
|
-
`+p.join(`
|
|
20
|
-
`)+`
|
|
21
|
-
`+m)}else _&&(S+=C.move(" "+_));return h&&(S+=C.move((i||w?"":" ")+"/")),S+=C.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?S+=C.move(c.containerPhrasing(a,{...C.current(),before:">",after:"<"})):(C.shift(2),S+=C.move(`
|
|
22
|
-
`),S+=C.move(W_(a,c,C.current())),S+=C.move(`
|
|
23
|
-
`))),h||(S+=C.move((f?m:"")+"</"+(a.name||"")+">")),b(),S}}function W_(e,t,n){const r=t.indexStack,i=e.children,o=t.createTracker(n),s=N1(A1(t)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const u=i[a];r[r.length-1]=a;const c={before:`
|
|
24
|
-
`,after:`
|
|
25
|
-
`,...o.current()},d=t.handle(u,e,t,c),f=u.type==="mdxJsxFlowElement"?d:t.indentLines(d,function(h,g,m){return(m?"":s)+h});l.push(o.move(f)),u.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&l.push(o.move(`
|
|
26
|
-
|
|
27
|
-
`))}return r.pop(),l.join("")}function A1(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function N1(e){return I1.repeat(e)}function J_(){return"<"}const K_=/[$_\p{ID_Start}]/u,Z_=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,G_=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,q_={};function Wt(e){return e?K_.test(String.fromCodePoint(e)):!1}function ro(e,t){const r=(t||q_).jsx?G_:Z_;return e?r.test(String.fromCodePoint(e)):!1}function Ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return Ee(a)?(e.enter(n),l(a)):t(a)}function l(a){return Ee(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}const Y_={}.hasOwnProperty,X_=Symbol("continue"),ou=Symbol("exit"),Q_=Symbol("skip");function eC(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(o,s,l,a){return su(o)&&(u.displayName="node ("+o.type+")"),u;function u(){const c=n?pg(n(o,s,l,a)):[];if(c[0]===ou)return c;if(c[0]!==Q_){let d;for(d in o)if(Y_.call(o,d)&&o[d]&&typeof o[d]=="object"&&d!=="data"&&d!=="position"){const f=a.concat(o),h=o[d];if(Array.isArray(h)){const g=h;let m=0;for(;m>-1&&m<g.length;){const v=g[m];if(su(v)){const y=i(v,d,m,f)();if(y[0]===ou)return y;m=typeof y[1]=="number"?y[1]:m+1}else m++}}else if(su(h)){const g=i(h,d,void 0,f)();if(g[0]===ou)return g}}}return r?pg(r(o,s,l,a)):c}}}function pg(e){return Array.isArray(e)?e:typeof e=="number"?[X_,e]:[e]}function su(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function tC(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),o=[],s=[],l=i.onComment,a=i.onToken;let u=!1,c,d;const f=Object.assign({},i,{onComment:o,preserveParens:!0});a&&(f.onToken=s);const h=nC(e,t.tokenTypes),g=h.value,m=n+g+r,v=mg(g);if(v&&!t.allowEmpty)throw new Fe("Unexpected empty expression",{place:p(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{c=t.expression&&!v?t.acorn.parseExpressionAt(m,0,f):t.acorn.parse(m,f)}catch(x){const b=x,w=p(b.pos);b.message=String(b.message).replace(/ \(\d+:\d+\)$/,""),b.pos=w.offset,b.loc={line:w.line,column:w.column-1},d=b,u=b.raisedAt>=n.length+g.length||b.message==="Unterminated comment"}if(c&&t.expression&&!v)if(mg(m.slice(c.end,m.length-r.length)))c={type:"Program",start:0,end:n.length+g.length,body:[{type:"ExpressionStatement",expression:c,start:0,end:n.length+g.length}],sourceType:"module",comments:[]};else{const x=p(c.end),b=new Error("Unexpected content after expression");b.pos=x.offset,b.loc={line:x.line,column:x.column-1},d=b,c=void 0}if(c){if(c.comments=o,eC(c,function(x,b,w,_){let C=_[_.length-1],S=b;x.type==="ParenthesizedExpression"&&C&&S&&(typeof w=="number"&&(C=C[S],S=w),C[S]=x.expression),y(x)}),Array.isArray(l))l.push(...o);else if(typeof l=="function")for(const x of o)l(x.type==="Block",x.value,x.start,x.end,x.loc.start,x.loc.end);for(const x of s)x.end<=n.length||x.start-n.length>=g.length||(y(x),Array.isArray(a)?a.push(x):a(x))}return{estree:c,error:d,swallow:u};function y(x){const b=p(x.start),w=p(x.end);x.start=b.offset,x.end=w.offset,x.loc={start:{line:b.line,column:b.column-1,offset:b.offset},end:{line:w.line,column:w.column-1,offset:w.offset}},x.range=[x.start,x.end]}function p(x){let b=x-n.length;b<0?b=0:b>g.length&&(b=g.length);let w=rC(h.stops,b);return w||(w={line:t.start.line,column:t.start.column,offset:t.start.offset}),w}}function mg(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function nC(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const o=i[1].type;if(o==="lineEnding"||t.includes(o)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const l=iC(s);n.stops.push([n.value.length,i[1].start]),n.value+=l,n.stops.push([n.value.length,i[1].end])}}}return n}function rC(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],o=t-r;return{line:i.line,column:i.column+o,offset:i.offset+o}}function iC(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
28
|
-
`;break}case-3:{o=`\r
|
|
29
|
-
`;break}case-2:{o=" ";break}case-1:{if(r)continue;o=" ";break}default:o=String.fromCharCode(i)}r=i===-2,n.push(o)}return n.join("")}function lu(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=xg(n.start,r[0]||t.start),o=xg(n.end,r[1]||t.end);if(i&&o)return{start:i,end:o}}function xg(e,t){if(e&&typeof e=="object"){const n="line"in e?au(e.line):void 0,r="column"in e?au(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:au(t)}}}function au(e){return typeof e=="number"&&e>-1?e:void 0}const oC=2,xi="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",sC="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",lC="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",yg="#unexpected-type-in-code-expected-an-object-spread-spread",aC="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",uC="#could-not-parse-expression-with-acorn";function vg(e,t,n,r,i,o,s,l,a,u,c){const d=this,f=this.events.length+3;let h=0,g,m;return v;function v(b){return e.enter(n),e.enter(r),e.consume(b),e.exit(r),g=d.now(),y}function y(b){if(b===null){if(m)throw m;const w=new Fe("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw w.url=xi+sC,w}if(he(b))return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),x;if(b===125&&h===0){const w=o?cC.call(d,o,s,i,f,g,u||!1,a||!1):{type:"ok",estree:void 0};if(w.type==="ok"){e.enter(r),e.consume(b),e.exit(r);const _=e.exit(n);return l&&w.estree&&Object.assign(_,{estree:w.estree}),t}return m=w.message,e.enter(i),e.consume(b),p}return e.enter(i),p(b)}function p(b){return b===125&&h===0||b===null||he(b)?(e.exit(i),y(b)):(b===123&&!o?h+=1:b===125&&(h-=1),e.consume(b),p)}function x(b){const w=d.now();if(w.line!==g.line&&!c&&d.parser.lazy[w.line]){const _=new Fe("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw _.url=xi+lC,_}return Ee(b)?Ae(e,y,"linePrefix",oC+1)(b):y(b)}}function cC(e,t,n,r,i,o,s){const l=tC(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:o,prefix:s?"({":"",suffix:s?"})":""}),a=l.estree;if(s&&a){const u=a.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const c=lu(u),d=new Fe("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=xi+yg,d}if(u.expression.properties[1]){const c=lu(u.expression.properties[1]),d=new Fe("Unexpected extra content in spread: only a single spread is supported",{place:c.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw d.url=xi+aC,d}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const c=lu(u.expression.properties[0]),d=new Fe("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:c.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw d.url=xi+yg,d}}if(l.error){const u=new Fe("Could not parse expression with acorn",{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=xi+uC,{type:"nok",message:u}}return{type:"ok",estree:a}}const bg="https://github.com/micromark/micromark-extension-mdx-jsx";function L1(e,t,n,r,i,o,s,l,a,u,c,d,f,h,g,m,v,y,p,x,b,w,_,C,S,I,P,R,O,M,V,z){const W=this;let U,G;return te;function te(T){return e.enter(l),e.enter(a),e.consume(T),e.exit(a),A}function A(T){return Ge(T)?n(T):(U=fe,Z(T))}function fe(T){if(T===47)return e.enter(u),e.consume(T),e.exit(u),U=me,Z;if(T===62)return re(T);if(T!==null&&T>=0&&Wt(T))return e.enter(d),e.enter(f),e.consume(T),L;B(T,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(T===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function me(T){if(T===62)return re(T);if(T!==null&&T>=0&&Wt(T))return e.enter(d),e.enter(f),e.consume(T),L;B(T,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(T===42||T===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function L(T){if(T!==null&&T>=0&&ro(T,{jsx:!0}))return e.consume(T),L;if(T===46||T===47||T===58||T===62||T===123||Ge(T)||Vn(T))return e.exit(f),U=ye,Z(T);B(T,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(T===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function ye(T){if(T===46)return e.enter(h),e.consume(T),e.exit(h),U=_e,Z;if(T===58)return e.enter(m),e.consume(T),e.exit(m),U=X,Z;if(T===47||T===62||T===123||T!==null&&T>=0&&Wt(T))return e.exit(d),ce(T);B(T,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(T){if(T!==null&&T>=0&&Wt(T))return e.enter(g),e.consume(T),ge;B(T,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(T){if(T!==null&&T>=0&&ro(T,{jsx:!0}))return e.consume(T),ge;if(T===46||T===47||T===62||T===123||Ge(T)||Vn(T))return e.exit(g),U=K,Z(T);B(T,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(T===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function K(T){if(T===46)return e.enter(h),e.consume(T),e.exit(h),U=_e,Z;if(T===47||T===62||T===123||T!==null&&T>=0&&Wt(T))return e.exit(d),ce(T);B(T,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function X(T){if(T!==null&&T>=0&&Wt(T))return e.enter(v),e.consume(T),ie;B(T,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(T===43||T!==null&&T>46&&T<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function ie(T){if(T!==null&&T>=0&&ro(T,{jsx:!0}))return e.consume(T),ie;if(T===47||T===62||T===123||Ge(T)||Vn(T))return e.exit(v),U=oe,Z(T);B(T,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function oe(T){if(T===47||T===62||T===123||T!==null&&T>=0&&Wt(T))return e.exit(d),ce(T);B(T,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ce(T){if(T===47)return e.enter(c),e.consume(T),e.exit(c),U=j,Z;if(T===62)return re(T);if(T===123)return vg.call(W,e,pe,y,p,x,r,i,o,!0,!1,s)(T);if(T!==null&&T>=0&&Wt(T))return e.enter(b),e.enter(w),e.enter(_),e.consume(T),Te;B(T,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(T){return U=ce,Z(T)}function Te(T){if(T!==null&&T>=0&&ro(T,{jsx:!0}))return e.consume(T),Te;if(T===47||T===58||T===61||T===62||T===123||Ge(T)||Vn(T))return e.exit(_),U=Oe,Z(T);B(T,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Oe(T){if(T===58)return e.enter(C),e.consume(T),e.exit(C),U=ze,Z;if(T===61)return e.exit(w),e.enter(I),e.consume(T),e.exit(I),U=jt,Z;if(T===47||T===62||T===123||Ge(T)||Vn(T)||T!==null&&T>=0&&Wt(T))return e.exit(w),e.exit(b),U=ce,Z(T);B(T,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ze(T){if(T!==null&&T>=0&&Wt(T))return e.enter(S),e.consume(T),Ze;B(T,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ze(T){if(T!==null&&T>=0&&ro(T,{jsx:!0}))return e.consume(T),Ze;if(T===47||T===61||T===62||T===123||Ge(T)||Vn(T))return e.exit(S),e.exit(w),U=qe,Z(T);B(T,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function qe(T){if(T===61)return e.enter(I),e.consume(T),e.exit(I),U=jt,Z;if(T===47||T===62||T===123||T!==null&&T>=0&&Wt(T))return e.exit(b),ce(T);B(T,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function jt(T){if(T===34||T===39)return e.enter(P),e.enter(R),e.consume(T),e.exit(R),G=T,F;if(T===123)return vg.call(W,e,Ye,M,V,z,r,i,o,!1,!1,s)(T);B(T,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(T===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function Ye(T){return e.exit(b),U=ce,Z(T)}function F(T){return T===null&&B(T,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(G)+"`"),T===G?(e.enter(R),e.consume(T),e.exit(R),e.exit(P),e.exit(b),G=void 0,U=ce,Z):he(T)?(U=F,Z(T)):(e.enter(O),$(T))}function $(T){return T===null||T===G||he(T)?(e.exit(O),F(T)):(e.consume(T),$)}function j(T){if(T===62)return re(T);B(T,"after self-closing slash","`>` to end the tag"+(T===42||T===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function re(T){return e.enter(a),e.consume(T),e.exit(a),e.exit(l),t}function Z(T){return he(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),D):Ee(T)||Vn(T)?(e.enter("esWhitespace"),Y(T)):U(T)}function Y(T){return he(T)?(e.exit("esWhitespace"),Z(T)):Ee(T)||Vn(T)?(e.consume(T),Y):(e.exit("esWhitespace"),U(T))}function D(T){if(!s&&W.parser.lazy[W.now().line]){const de=new Fe("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",W.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw de.url=bg+"#unexpected-lazy-line-in-container-expected-line-to-be",de}return Z(T)}function B(T,de,be){const Se=new Fe("Unexpected "+(T===null?"end of file":"character `"+(T===96?"` ` `":String.fromCodePoint(T))+"` ("+dC(T)+")")+" "+de+", expected "+be,W.now(),"micromark-extension-mdx-jsx:unexpected-"+(T===null?"eof":"character"));throw Se.url=bg+(T===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),Se}}function dC(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function fC(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,o){return L1.call(this,r,i,o,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function hC(e,t){return{name:"mdxJsxFlowTag",tokenize:n,concrete:!0};function n(r,i,o){const s=this;return l;function l(d){return a(d)}function a(d){return L1.call(s,r,u,o,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(d)}function u(d){return Ee(d)?Ae(r,c,"whitespace")(d):c(d)}function c(d){const f=s.parser.constructs.flow[123],g=(Array.isArray(f)?f:f?[f]:[]).find(m=>m.name==="mdxFlowExpression");return d===60?l(d):d===123&&g?r.attempt(g,c,o)(d):d===null||he(d)?i(d):o(d)}}}function gC(e){const t={},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:hC(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:fC(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function pC(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const _g={}.hasOwnProperty;function mC(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&_g.call(i,e)){const a=String(i[e]);s=_g.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const xC={}.hasOwnProperty;function F1(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)F1(e,t.extensions[n]);for(r in t)if(xC.call(t,r))switch(r){case"extensions":break;case"unsafe":{Cg(e[r],t[r]);break}case"join":{Cg(e[r],t[r]);break}case"handlers":{yC(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Cg(e,t){t&&e.push(...t)}function yC(e,t){t&&Object.assign(e,t)}function vC(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),bC);return i(),s}function bC(e,t,n){return">"+(n?"":" ")+e}function P1(e,t){return wg(e,t.inConstruct,!0)&&!wg(e,t.notInConstruct,!1)}function wg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Eg(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
30
|
-
`&&P1(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
31
|
-
`}function _C(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function oc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function CC(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wC(e,t,n,r){const i=CC(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(oc(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(o,EC);return d(),f}const l=n.createTracker(r),a=i.repeat(Math.max(_C(o,i)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${s}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:`
|
|
32
|
-
`,encode:["`"],...l.current()})),d()}return c+=l.move(`
|
|
33
|
-
`),o&&(c+=l.move(o+`
|
|
34
|
-
`)),c+=l.move(a),u(),c}function EC(e,t,n){return(n?"":" ")+e}function zd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function SC(e,t,n,r){const i=zd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
35
|
-
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function kC(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function gr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yl(e,t,n){const r=Ri(e),i=Ri(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}R1.peek=TC;function R1(e,t,n,r){const i=kC(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=yl(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=gr(u)+a.slice(1));const d=a.charCodeAt(a.length-1),f=yl(r.after.charCodeAt(0),d,i);f.inside&&(a=a.slice(0,-1)+gr(d));const h=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},l+a+h}function TC(e,t,n){return n.options.emphasis||"*"}const jd=function(e){if(e==null)return LC;if(typeof e=="function")return fa(e);if(typeof e=="object")return Array.isArray(e)?IC(e):AC(e);if(typeof e=="string")return NC(e);throw new Error("Expected function, string, or object as test")};function IC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jd(e[n]);return fa(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function AC(e){const t=e;return fa(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function NC(e){return fa(t);function t(n){return n&&n.type===e}}function fa(e){return t;function t(n,r,i){return!!(FC(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function LC(){return!0}function FC(e){return e!==null&&typeof e=="object"&&"type"in e}const O1=[],PC=!0,sc=!1,RC="skip";function OC(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=jd(i),s=r?-1:1;l(e,void 0,[])();function l(a,u,c){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=O1,g,m,v;if((!t||o(a,u,c[c.length-1]||void 0))&&(h=MC(n(a,c)),h[0]===sc))return h;if("children"in a&&a.children){const y=a;if(y.children&&h[0]!==RC)for(m=(r?y.children.length:-1)+s,v=c.concat(y);m>-1&&m<y.children.length;){const p=y.children[m];if(g=l(p,m,v)(),g[0]===sc)return g;m=typeof g[1]=="number"?g[1]:m+s}}return h}}}function MC(e){return Array.isArray(e)?e:typeof e=="number"?[PC,e]:e==null?O1:[e]}function DC(e,t,n,r){let i,o,s;typeof t=="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),OC(e,o,l,i);function l(a,u){const c=u[u.length-1],d=c?c.children.indexOf(a):void 0;return s(a,d,c)}}const $C={};function Ud(e,t){const n=$C,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return M1(e,r,i)}function M1(e,t,n){if(VC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sg(e.children,t,n)}return Array.isArray(e)?Sg(e,t,n):""}function Sg(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=M1(e[i],t,n);return r.join("")}function VC(e){return!!(e&&typeof e=="object")}function D1(e,t){let n=!1;return DC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,sc}),!!((!e.depth||e.depth<3)&&Ud(e)&&(t.options.setext||n))}function HC(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(D1(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...o.current(),before:`
|
|
36
|
-
`,after:`
|
|
37
|
-
`});return d(),c(),f+`
|
|
38
|
-
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
39
|
-
`))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
40
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=gr(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}$1.peek=BC;function $1(e){return e.value||""}function BC(){return"<"}V1.peek=zC;function V1(e,t,n,r){const i=zd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function zC(){return"!"}H1.peek=jC;function H1(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function jC(){return"!"}B1.peek=UC;function B1(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let a;if(s.atBreak)for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function UC(){return"`"}function z1(e,t){const n=Ud(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}j1.peek=WC;function j1(e,t,n,r){const i=zd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,a;if(z1(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=c,d}l=n.enter("link"),a=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function WC(e,t,n){return z1(e,n)?"<":"["}U1.peek=JC;function U1(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function JC(){return"["}function Wd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function KC(e){const t=Wd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ZC(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function W1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function GC(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?ZC(n):Wd(n);const l=e.ordered?s==="."?")":".":KC(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),W1(n)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function qC(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function YC(e,t,n,r){const i=qC(n);let o=n.bulletCurrent||Wd(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,f,h){return f?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function XC(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const QC=jd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ew(e,t,n,r){return(e.children.some(function(s){return QC(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function tw(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}J1.peek=nw;function J1(e,t,n,r){const i=tw(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let a=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=a.charCodeAt(0),c=yl(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(a=gr(u)+a.slice(1));const d=a.charCodeAt(a.length-1),f=yl(r.after.charCodeAt(0),d,i);f.inside&&(a=a.slice(0,-1)+gr(d));const h=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},l+a+h}function nw(e,t,n){return n.options.strong||"*"}function rw(e,t,n,r){return n.safe(e.value,r)}function iw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ow(e,t,n){const r=(W1(n)+(n.options.ruleSpaces?" ":"")).repeat(iw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const K1={blockquote:vC,break:Eg,code:wC,definition:SC,emphasis:R1,hardBreak:Eg,heading:HC,html:$1,image:V1,imageReference:H1,inlineCode:B1,link:j1,linkReference:U1,list:GC,listItem:YC,paragraph:XC,root:ew,strong:J1,text:rw,thematicBreak:ow},sw=[lw];function lw(e,t,n,r){if(t.type==="code"&&oc(t,r)&&(e.type==="list"||e.type===t.type&&oc(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&D1(t,r))?void 0:n.spread?1:0}const Pr=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],aw=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
41
|
-
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Pr},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
42
|
-
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Pr},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
43
|
-
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Pr},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
44
|
-
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
45
|
-
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
46
|
-
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Pr},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Pr},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Pr},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Pr},{atBreak:!0,character:"~"}];function Z1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const uw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G1(e){return e.replace(uw,cw)}function cw(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Z1(n.slice(o?2:1),o?16:10)}return $o(n)||e}function dw(e){return e.label||!e.identifier?e.label||"":G1(e.identifier)}function fw(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function hw(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before,a;r.push(-1);let u=t.createTracker(n);for(;++s<i.length;){const c=i[s];let d;if(r[r.length-1]=s,s+1<i.length){let g=t.handle.handlers[i[s+1].type];g&&g.peek&&(g=g.peek),d=g?g(i[s+1],e,t,{before:"",after:"",...u.current()}).charAt(0):""}else d=n.after;o.length>0&&(l==="\r"||l===`
|
|
47
|
-
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",u=t.createTracker(n),u.move(o.join("")));let f=t.handle(c,e,t,{...u.current(),after:d,before:l});a&&a===f.slice(0,1)&&(f=gr(a.charCodeAt(0))+f.slice(1));const h=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,a=void 0,h&&(o.length>0&&h.before&&l===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+gr(l.charCodeAt(0))),h.after&&(a=d)),u.move(f),o.push(f),l=f.slice(-1)}return r.pop(),o.join("")}function gw(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,s.push(o.move(t.handle(a,e,t,{before:`
|
|
48
|
-
`,after:`
|
|
49
|
-
`,...o.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),l<i.length-1&&s.push(o.move(pw(a,i[l+1],e,t)))}return r.pop(),s.join("")}function pw(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
50
|
-
`.repeat(1+o);if(o===!1)return`
|
|
51
|
-
|
|
52
|
-
<!---->
|
|
53
|
-
|
|
54
|
-
`}return`
|
|
55
|
-
|
|
56
|
-
`}const mw=/\r?\n|\r/g;function xw(e,t){const n=[];let r=0,i=0,o;for(;o=mw.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(l){n.push(t(l,i,!l))}}function yw(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let l=-1;for(;++l<e.unsafe.length;){const c=e.unsafe[l];if(!P1(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(r);){const h="before"in c||!!c.atBreak,g="after"in c,m=f.index+(h?f[1].length:0);i.includes(m)?(s[m].before&&!h&&(s[m].before=!1),s[m].after&&!g&&(s[m].after=!1)):(i.push(m),s[m]={before:h,after:g})}}i.sort(vw);let a=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(l=-1;++l<i.length;){const c=i[l];c<a||c>=u||c+1<u&&i[l+1]===c+1&&s[c].after&&!s[c+1].before&&!s[c+1].after||i[l-1]===c-1&&s[c].before&&!s[c-1].before&&!s[c-1].after||(a!==c&&o.push(kg(r.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(r.charAt(c))&&(!n.encode||!n.encode.includes(r.charAt(c)))?o.push("\\"):(o.push(gr(r.charCodeAt(c))),a++))}return o.push(kg(r.slice(a,u),n.after)),o.join("")}function vw(e,t){return e-t}function kg(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,l=0,a;for(;a=n.exec(o);)r.push(a.index);for(;++s<r.length;)l!==r[s]&&i.push(e.slice(l,r[s])),i.push("\\"),l=r[s];return i.push(e.slice(l)),i.join("")}function bw(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:a,current:s,shift:l};function s(){return{now:{line:i,column:o},lineShift:r}}function l(u){r+=u}function a(u){const c=u||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return i+=d.length-1,o=d.length===1?o+f.length:1+f.length+r,c}}function q1(e,t){const n=t||{},r={associationId:dw,containerPhrasing:Ew,containerFlow:Sw,createTracker:bw,compilePattern:fw,enter:o,handlers:{...K1},handle:void 0,indentLines:xw,indexStack:[],join:[...sw],options:{},safe:kw,stack:[],unsafe:[...aw]};F1(r,n),r.options.tightDefinitions&&r.join.push(ww),r.handle=mC("type",{invalid:_w,unknown:Cw,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
57
|
-
`,after:`
|
|
58
|
-
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
59
|
-
`),i;function o(s){return r.stack.push(s),l;function l(){r.stack.pop()}}}function _w(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Cw(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function ww(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Ew(e,t){return hw(e,this,t)}function Sw(e,t){return gw(e,this,t)}function kw(e,t){return yw(this,e,t)}const Tw=["mdxJsxTextElement","mdxJsxFlowElement"];function Y1(e){return Tw.includes(e.type)&&Iw.includes(e.name.toLowerCase())}const Iw=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Aw(e,t){const n=Tg(e),r=Tg(t),i={...n,...r};return Nw(i)}function Tg(e){const t={};return e.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,o]=r.split(":").map(s=>s.trim());t[i]=o}),t}function Nw(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}function Lw(e){return e.children instanceof Array}function Fw({root:e,visitors:t,jsxComponentDescriptors:n,jsxIsAvailable:r,addImportStatements:i=!0}){let o=null;const s=new Set,l=new Map;t=t.sort((y,p)=>(p.priority??0)-(y.priority??0)),d(e,null);function a(y,p){s.add(y),p&&l.set(y,{...p})}function u(y,p){if(o===null)return o=p,o;if(!Lw(y))throw new Error("Attempting to append children to a non-parent");const x=y.children,b=x.at(-1);if(b){const w=t.find(_=>{var C;return(C=_.shouldJoin)==null?void 0:C.call(_,b,p)});if(w){const _=w.join(b,p);return x.splice(x.length-1,1,_),_}}return x.push(p),p}function c(y,p){y.getChildren().forEach(x=>{d(x,p)})}function d(y,p,x=null){var b;const w=t.find((_,C)=>{var S;return x!=null&&x.has(C)?!1:(S=_.testLexicalNode)==null?void 0:S.call(_,y)});if(!w)throw new Error(`no lexical visitor found for ${y.getType()}`,{cause:y});(b=w.visitLexicalNode)==null||b.call(w,{lexicalNode:y,mdastParent:p,actions:{addAndStepInto(_,C={},S=!0){const I={type:_,...C,...S?{children:[]}:{}};u(p,I),H(y)&&S&&c(y,I)},appendToParent:u,visitChildren:c,visit:d,registerReferredComponent:a,nextVisitor(){d(y,p,(x??new Set).add(t.indexOf(w)))}}})}if(o===null)throw new Error("traversal ended with no root element");const f=new Map,h=new Map;for(const y of s){const p=n.find(x=>x.name===y)??l.get(y)??n.find(x=>x.name==="*");if(!p)throw new Error(`Component ${y} is used but not imported`);if(p.source)if(p.defaultExport)h.set(y,p.source);else{const{source:x}=p,b=f.get(x);b?b.push(y):f.set(x,[y])}}if(!i){for(const[y,p]of f.entries()){const x=p.filter(b=>l.has(b));x.length>0?f.set(y,x):f.delete(y)}for(const y of h.keys())l.has(y)||h.delete(y)}const g=Array.from(f).map(([y,p])=>({type:"mdxjsEsm",value:`import { ${p.join(", ")} } from '${y}'`}));g.push(...Array.from(h).map(([y,p])=>({type:"mdxjsEsm",value:`import ${y} from '${p}'`})));const m=o,v=m.children.find(y=>y.type==="yaml");return v?m.children.splice(m.children.indexOf(v)+1,0,...g):m.children.unshift(...g),Ks(m,[]),X1(m),r||Q1(m),m}function X1(e){if("children"in e&&e.children.length>0){if(Y1(e)&&e.children.length===1){const t=e.children[0];t.type==="mdxJsxTextElement"&&t.name==="span"&&(t.attributes.forEach(n=>{if(n.type==="mdxJsxAttribute"){const r=e.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===n.name);if(r)if(n.name==="className"){const i=new Set([...r.value.split(" "),...n.value.split(" ")]);r.value=Array.from(i).join(" ")}else n.name==="style"&&(r.value=Aw(r.value,n.value));else e.attributes.push(n)}}),e.children=t.children)}e.children.forEach(t=>{X1(t)})}}function Q1(e){if(Object.hasOwn(e,"children")){const t=e,n=[];t.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?n.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(n.push(r),Q1(r))}),t.children=n}}const Ig=/\s+$/,Ag=/^\s+/;function Ks(e,t){if(e.type==="strong"||e.type==="emphasis"){const n=e.children.at(-1);if((n==null?void 0:n.type)==="text"){const i=n.value.match(Ig);if(i){n.value=n.value.replace(Ig,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e)+1,0,{type:"text",value:i[0]}),Ks(o,t.slice(0,-1)))}}const r=e.children.at(0);if((r==null?void 0:r.type)==="text"){const i=r.value.match(Ag);if(i){r.value=r.value.replace(Ag,"");const o=t.at(-1);o&&(o.children.splice(o.children.indexOf(e),0,{type:"text",value:i[0]}),Ks(o,t.slice(0,-1)))}}}if("children"in e&&e.children.length>0){const n=e;n.children.forEach(r=>{Ks(r,[...t,n])})}}function Pw({root:e,toMarkdownOptions:t,toMarkdownExtensions:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}){return q1(Fw({root:e,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:o}),{extensions:n,...t})+`
|
|
60
|
-
`}const Ng={}.hasOwnProperty;function Rw(e){const t={};let n=-1;for(;++n<e.length;)Ow(t,e[n]);return t}function Ow(e,t){let n;for(n in t){const i=(Ng.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Ng.call(i,s)||(i[s]=[]);const l=o[s];Mw(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Mw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rt(e,0,0,r)}function Ei(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dw={tokenize:$w};function $w(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return he(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const Vw={tokenize:Hw},Lg={tokenize:Bw};function Hw(e){const t=this,n=[];let r=0,i,o,s;return l;function l(x){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,a,u)(x)}return u(x)}function a(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&p();const b=t.events.length;let w=b,_;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){_=t.events[w][1].end;break}y(r);let C=b;for(;C<t.events.length;)t.events[C][1].end={..._},C++;return Rt(t.events,w+1,0,t.events.slice(b)),t.events.length=C,u(x)}return l(x)}function u(x){if(r===n.length){if(!i)return f(x);if(i.currentConstruct&&i.currentConstruct.concrete)return g(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lg,c,d)(x)}function c(x){return i&&p(),y(r),f(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(x)}function f(x){return t.containerState={},e.attempt(Lg,h,g)(x)}function h(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function g(x){if(x===null){i&&p(),y(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),m(x)}function m(x){if(x===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return he(x)?(e.consume(x),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(x),m)}function v(x,b){const w=t.sliceStream(x);if(b&&w.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(w),t.parser.lazy[x.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<s&&(!i.events[_][1].end||i.events[_][1].end.offset>s))return;const C=t.events.length;let S=C,I,P;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(I){P=t.events[S][1].end;break}I=!0}for(y(r),_=C;_<t.events.length;)t.events[_][1].end={...P},_++;Rt(t.events,S+1,0,t.events.slice(C)),t.events.length=_}}function y(x){let b=n.length;for(;b-- >x;){const w=n[b];t.containerState=w[1],w[0].exit.call(t,e)}n.length=x}function p(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Bw(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const lc={name:"attention",resolveAll:zw,tokenize:jw};function zw(e,t){let n=-1,r,i,o,s,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Fg(d,-a),Fg(f,a),s={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:a>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:a>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Vt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Vt(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Vt(u,da(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Vt(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Vt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Rt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jw(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ri(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=Ri(a),d=!c||c===2&&i||n.includes(a),f=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?d:d&&(i||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(a)}}function Fg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Uw={name:"autolink",tokenize:Ww};function Ww(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return xn(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||Qt(h)?(r=1,l(h)):u(h)}function l(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||Qt(h))&&r++<32?(e.consume(h),l):(r=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||nc(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):m_(h)?(e.consume(h),u):n(h)}function c(h){return Qt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Qt(h))&&r++<63){const g=h===45?f:d;return e.consume(h),g}return n(h)}}const ha={partial:!0,tokenize:Jw};function Jw(e,t,n){return r;function r(o){return Ee(o)?Ae(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||he(o)?t(o):n(o)}}const e0={continuation:{tokenize:Zw},exit:Gw,name:"blockQuote",tokenize:Kw};function Kw(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Zw(e,t,n){const r=this;return i;function i(s){return Ee(s)?Ae(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(e0,t,n)(s)}}function Gw(e){e.exit("blockQuote")}const t0={name:"characterEscape",tokenize:qw};function qw(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return y_(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const n0={name:"characterReference",tokenize:Yw};function Yw(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Qt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=x_,c):(e.enter("characterReferenceValue"),o=7,s=rc,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===Qt&&!$o(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const Pg={partial:!0,tokenize:Qw},Rg={concrete:!0,name:"codeFenced",tokenize:Xw};function Xw(e,t,n){const r=this,i={partial:!0,tokenize:w};let o=0,s=0,l;return a;function a(_){return u(_)}function u(_){const C=r.events[r.events.length-1];return o=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(_)}function c(_){return _===l?(s++,e.consume(_),c):s<3?n(_):(e.exit("codeFencedFenceSequence"),Ee(_)?Ae(e,d,"whitespace")(_):d(_))}function d(_){return _===null||he(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(Pg,m,b)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===null||he(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(_)):Ee(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,h,"whitespace")(_)):_===96&&_===l?n(_):(e.consume(_),f)}function h(_){return _===null||he(_)?d(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===null||he(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(_)):_===96&&_===l?n(_):(e.consume(_),g)}function m(_){return e.attempt(i,b,v)(_)}function v(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),y}function y(_){return o>0&&Ee(_)?Ae(e,p,"linePrefix",o+1)(_):p(_)}function p(_){return _===null||he(_)?e.check(Pg,m,b)(_):(e.enter("codeFlowValue"),x(_))}function x(_){return _===null||he(_)?(e.exit("codeFlowValue"),p(_)):(e.consume(_),x)}function b(_){return e.exit("codeFenced"),t(_)}function w(_,C,S){let I=0;return P;function P(z){return _.enter("lineEnding"),_.consume(z),_.exit("lineEnding"),R}function R(z){return _.enter("codeFencedFence"),Ee(z)?Ae(_,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):O(z)}function O(z){return z===l?(_.enter("codeFencedFenceSequence"),M(z)):S(z)}function M(z){return z===l?(I++,_.consume(z),M):I>=s?(_.exit("codeFencedFenceSequence"),Ee(z)?Ae(_,V,"whitespace")(z):V(z)):S(z)}function V(z){return z===null||he(z)?(_.exit("codeFencedFence"),C(z)):S(z)}}}function Qw(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const uu={name:"codeIndented",tokenize:t9},e9={partial:!0,tokenize:n9};function t9(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Ae(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?a(u):he(u)?e.attempt(e9,s,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||he(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function n9(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):he(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ae(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):he(s)?i(s):n(s)}}const r9={name:"codeText",previous:o9,resolve:i9,tokenize:s9};function i9(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function o9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function s9(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):he(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||he(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class l9{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&io(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),io(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),io(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);io(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);io(this.left,n.reverse())}}}function io(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function r0(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new l9(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,a9(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(s[1].type!=="linePrefix")break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return Rt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function a9(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),l=s.events,a=[],u={};let c,d,f=-1,h=n,g=0,m=0;const v=[m];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,v.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),f=v.length;f--;){const y=l.slice(v[f],v[f+1]),p=o.pop();a.push([p,p+y.length-1]),e.splice(p,2,y)}for(a.reverse(),f=-1;++f<a.length;)u[g+a[f][0]]=g+a[f][1],g+=a[f][1]-a[f][0]-1;return u}const u9={resolve:d9,tokenize:f9},c9={partial:!0,tokenize:h9};function d9(e){return r0(e),e}function f9(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):he(l)?e.check(c9,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function h9(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ae(e,o,"linePrefix")}function o(s){if(s===null||he(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function i0(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||nc(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(l),f(y)):y===null||y===60||he(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!c&&(y===null||y===41||Ge(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,m):y===41?(e.consume(y),c--,m):y===null||y===32||y===40||nc(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function o0(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):he(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||he(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!Ee(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function s0(e,t,n,r,i,o){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,a):n(f)}function a(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===s?(e.exit(o),a(s)):f===null?n(f):he(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ae(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||he(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function _o(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ee(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const g9={name:"definition",tokenize:m9},p9={partial:!0,tokenize:x9};function m9(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return o0.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return Ge(h)?_o(e,u)(h):u(h)}function u(h){return i0(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(p9,d,d)(h)}function d(h){return Ee(h)?Ae(e,f,"whitespace")(h):f(h)}function f(h){return h===null||he(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function x9(e,t,n){return r;function r(l){return Ge(l)?_o(e,i)(l):n(l)}function i(l){return s0(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Ee(l)?Ae(e,s,"whitespace")(l):s(l)}function s(l){return l===null||he(l)?t(l):n(l)}}const y9={name:"hardBreakEscape",tokenize:v9};function v9(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return he(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const b9={name:"headingAtx",resolve:_9,tokenize:C9};function _9(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Rt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function C9(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Ge(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||he(c)?(e.exit("atxHeading"),t(c)):Ee(c)?Ae(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Ge(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const w9=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Og=["pre","script","style","textarea"],E9={concrete:!0,name:"htmlFlow",resolveTo:T9,tokenize:I9},S9={partial:!0,tokenize:N9},k9={partial:!0,tokenize:A9};function T9(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function I9(e,t,n){const r=this;let i,o,s,l,a;return u;function u(L){return c(L)}function c(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),f):L===47?(e.consume(L),o=!0,m):L===63?(e.consume(L),i=3,r.interrupt?t:A):xn(L)?(e.consume(L),s=String.fromCharCode(L),v):n(L)}function f(L){return L===45?(e.consume(L),i=2,h):L===91?(e.consume(L),i=5,l=0,g):xn(L)?(e.consume(L),i=4,r.interrupt?t:A):n(L)}function h(L){return L===45?(e.consume(L),r.interrupt?t:A):n(L)}function g(L){const ye="CDATA[";return L===ye.charCodeAt(l++)?(e.consume(L),l===ye.length?r.interrupt?t:O:g):n(L)}function m(L){return xn(L)?(e.consume(L),s=String.fromCharCode(L),v):n(L)}function v(L){if(L===null||L===47||L===62||Ge(L)){const ye=L===47,_e=s.toLowerCase();return!ye&&!o&&Og.includes(_e)?(i=1,r.interrupt?t(L):O(L)):w9.includes(s.toLowerCase())?(i=6,ye?(e.consume(L),y):r.interrupt?t(L):O(L)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):o?p(L):x(L))}return L===45||Qt(L)?(e.consume(L),s+=String.fromCharCode(L),v):n(L)}function y(L){return L===62?(e.consume(L),r.interrupt?t:O):n(L)}function p(L){return Ee(L)?(e.consume(L),p):P(L)}function x(L){return L===47?(e.consume(L),P):L===58||L===95||xn(L)?(e.consume(L),b):Ee(L)?(e.consume(L),x):P(L)}function b(L){return L===45||L===46||L===58||L===95||Qt(L)?(e.consume(L),b):w(L)}function w(L){return L===61?(e.consume(L),_):Ee(L)?(e.consume(L),w):x(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),a=L,C):Ee(L)?(e.consume(L),_):S(L)}function C(L){return L===a?(e.consume(L),a=null,I):L===null||he(L)?n(L):(e.consume(L),C)}function S(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Ge(L)?w(L):(e.consume(L),S)}function I(L){return L===47||L===62||Ee(L)?x(L):n(L)}function P(L){return L===62?(e.consume(L),R):n(L)}function R(L){return L===null||he(L)?O(L):Ee(L)?(e.consume(L),R):n(L)}function O(L){return L===45&&i===2?(e.consume(L),W):L===60&&i===1?(e.consume(L),U):L===62&&i===4?(e.consume(L),fe):L===63&&i===3?(e.consume(L),A):L===93&&i===5?(e.consume(L),te):he(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(S9,me,M)(L)):L===null||he(L)?(e.exit("htmlFlowData"),M(L)):(e.consume(L),O)}function M(L){return e.check(k9,V,me)(L)}function V(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),z}function z(L){return L===null||he(L)?M(L):(e.enter("htmlFlowData"),O(L))}function W(L){return L===45?(e.consume(L),A):O(L)}function U(L){return L===47?(e.consume(L),s="",G):O(L)}function G(L){if(L===62){const ye=s.toLowerCase();return Og.includes(ye)?(e.consume(L),fe):O(L)}return xn(L)&&s.length<8?(e.consume(L),s+=String.fromCharCode(L),G):O(L)}function te(L){return L===93?(e.consume(L),A):O(L)}function A(L){return L===62?(e.consume(L),fe):L===45&&i===2?(e.consume(L),A):O(L)}function fe(L){return L===null||he(L)?(e.exit("htmlFlowData"),me(L)):(e.consume(L),fe)}function me(L){return e.exit("htmlFlow"),t(L)}}function A9(e,t,n){const r=this;return i;function i(s){return he(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function N9(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ha,t,n)}}const L9={name:"htmlText",tokenize:F9};function F9(e,t,n){const r=this;let i,o,s;return l;function l(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),a}function a(A){return A===33?(e.consume(A),u):A===47?(e.consume(A),w):A===63?(e.consume(A),x):xn(A)?(e.consume(A),S):n(A)}function u(A){return A===45?(e.consume(A),c):A===91?(e.consume(A),o=0,g):xn(A)?(e.consume(A),p):n(A)}function c(A){return A===45?(e.consume(A),h):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),f):he(A)?(s=d,U(A)):(e.consume(A),d)}function f(A){return A===45?(e.consume(A),h):d(A)}function h(A){return A===62?W(A):A===45?f(A):d(A)}function g(A){const fe="CDATA[";return A===fe.charCodeAt(o++)?(e.consume(A),o===fe.length?m:g):n(A)}function m(A){return A===null?n(A):A===93?(e.consume(A),v):he(A)?(s=m,U(A)):(e.consume(A),m)}function v(A){return A===93?(e.consume(A),y):m(A)}function y(A){return A===62?W(A):A===93?(e.consume(A),y):m(A)}function p(A){return A===null||A===62?W(A):he(A)?(s=p,U(A)):(e.consume(A),p)}function x(A){return A===null?n(A):A===63?(e.consume(A),b):he(A)?(s=x,U(A)):(e.consume(A),x)}function b(A){return A===62?W(A):x(A)}function w(A){return xn(A)?(e.consume(A),_):n(A)}function _(A){return A===45||Qt(A)?(e.consume(A),_):C(A)}function C(A){return he(A)?(s=C,U(A)):Ee(A)?(e.consume(A),C):W(A)}function S(A){return A===45||Qt(A)?(e.consume(A),S):A===47||A===62||Ge(A)?I(A):n(A)}function I(A){return A===47?(e.consume(A),W):A===58||A===95||xn(A)?(e.consume(A),P):he(A)?(s=I,U(A)):Ee(A)?(e.consume(A),I):W(A)}function P(A){return A===45||A===46||A===58||A===95||Qt(A)?(e.consume(A),P):R(A)}function R(A){return A===61?(e.consume(A),O):he(A)?(s=R,U(A)):Ee(A)?(e.consume(A),R):I(A)}function O(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,M):he(A)?(s=O,U(A)):Ee(A)?(e.consume(A),O):(e.consume(A),V)}function M(A){return A===i?(e.consume(A),i=void 0,z):A===null?n(A):he(A)?(s=M,U(A)):(e.consume(A),M)}function V(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Ge(A)?I(A):(e.consume(A),V)}function z(A){return A===47||A===62||Ge(A)?I(A):n(A)}function W(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function U(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),G}function G(A){return Ee(A)?Ae(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):te(A)}function te(A){return e.enter("htmlTextData"),s(A)}}const Jd={name:"labelEnd",resolveAll:M9,resolveTo:D9,tokenize:$9},P9={tokenize:V9},R9={tokenize:H9},O9={tokenize:B9};function M9(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Rt(e,0,e.length,n),e}function D9(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",a,t],["enter",u,t]],l=Vt(l,e.slice(o+1,o+r+3)),l=Vt(l,[["enter",c,t]]),l=Vt(l,da(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=Vt(l,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),l=Vt(l,e.slice(s+1)),l=Vt(l,[["exit",a,t]]),Rt(e,o,e.length,l),e}function $9(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(f){return o?o._inactive?d(f):(s=r.parser.defined.includes(Ei(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),a):n(f)}function a(f){return f===40?e.attempt(P9,c,s?c:d)(f):f===91?e.attempt(R9,c,s?u:d)(f):s?c(f):d(f)}function u(f){return e.attempt(O9,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function V9(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ge(d)?_o(e,o)(d):o(d)}function o(d){return d===41?c(d):i0(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ge(d)?_o(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?s0(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Ge(d)?_o(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function H9(e,t,n){const r=this;return i;function i(l){return o0.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function B9(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const z9={name:"labelStartImage",resolveAll:Jd.resolveAll,tokenize:j9};function j9(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const U9={name:"labelStartLink",resolveAll:Jd.resolveAll,tokenize:W9};function W9(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const cu={name:"lineEnding",tokenize:J9};function J9(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Zs={name:"thematicBreak",tokenize:K9};function K9(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||he(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),Ee(u)?Ae(e,l,"whitespace")(u):l(u))}}const Et={continuation:{tokenize:Y9},exit:Q9,name:"list",tokenize:q9},Z9={partial:!0,tokenize:e3},G9={partial:!0,tokenize:X9};function q9(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:rc(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Zs,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return rc(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ha,r.interrupt?n:c,e.attempt(Z9,f,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return Ee(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Y9(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ha,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Ee(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(G9,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(Et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function X9(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Q9(e){e.exit(this.containerState.type)}function e3(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Ee(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Mg={name:"setextUnderline",resolveTo:t3,tokenize:n3};function t3(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function n3(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Ee(u)?Ae(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||he(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const r3={tokenize:i3};function i3(e){const t=this,n=e.attempt(ha,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(u9,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const o3={resolveAll:a0()},s3=l0("string"),l3=l0("text");function l0(e){return{resolveAll:a0(e==="text"?a3:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function a0(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function a3(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,a;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const u3={42:Et,43:Et,45:Et,48:Et,49:Et,50:Et,51:Et,52:Et,53:Et,54:Et,55:Et,56:Et,57:Et,62:e0},c3={91:g9},d3={[-2]:uu,[-1]:uu,32:uu},f3={35:b9,42:Zs,45:[Mg,Zs],60:E9,61:Mg,95:Zs,96:Rg,126:Rg},h3={38:n0,92:t0},g3={[-5]:cu,[-4]:cu,[-3]:cu,33:z9,38:n0,42:lc,60:[Uw,L9],91:U9,92:[y9,t0],93:Jd,95:lc,96:r9},p3={null:[lc,o3]},m3={null:[42,95]},x3={null:[]},y3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:m3,contentInitial:c3,disable:x3,document:u3,flow:f3,flowInitial:d3,insideSpan:p3,string:h3,text:g3},Symbol.toStringTag,{value:"Module"}));function v3(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:C(w),check:C(_),consume:p,enter:x,exit:b,interrupt:C(_,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(R){return s=Vt(s,R),v(),s[s.length-1]!==null?[]:(S(t,0),u.events=da(o,u.events,u),u.events)}function f(R,O){return _3(h(R),O)}function h(R){return b3(s,R)}function g(){const{_bufferIndex:R,_index:O,line:M,column:V,offset:z}=r;return{_bufferIndex:R,_index:O,line:M,column:V,offset:z}}function m(R){i[R.line]=R.column,P()}function v(){let R;for(;r._index<s.length;){const O=s[r._index];if(typeof O=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(R){c=c(R)}function p(R){he(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,P()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function x(R,O){const M=O||{};return M.type=R,M.start=g(),u.events.push(["enter",M,u]),l.push(M),M}function b(R){const O=l.pop();return O.end=g(),u.events.push(["exit",O,u]),O}function w(R,O){S(R,O.from)}function _(R,O){O.restore()}function C(R,O){return M;function M(V,z,W){let U,G,te,A;return Array.isArray(V)?me(V):"tokenize"in V?me([V]):fe(V);function fe(ge){return K;function K(X){const ie=X!==null&&ge[X],oe=X!==null&&ge.null,ce=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return me(ce)(X)}}function me(ge){return U=ge,G=0,ge.length===0?W:L(ge[G])}function L(ge){return K;function K(X){return A=I(),te=ge,ge.partial||(u.currentConstruct=ge),ge.name&&u.parser.constructs.disable.null.includes(ge.name)?_e():ge.tokenize.call(O?Object.assign(Object.create(u),O):u,a,ye,_e)(X)}}function ye(ge){return R(te,A),z}function _e(ge){return A.restore(),++G<U.length?L(U[G]):W}}}function S(R,O){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Rt(u.events,O,u.events.length-O,R.resolve(u.events.slice(O),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function I(){const R=g(),O=u.previous,M=u.currentConstruct,V=u.events.length,z=Array.from(l);return{from:V,restore:W};function W(){r=R,u.previous=O,u.currentConstruct=M,u.events.length=V,l=z,P()}}function P(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function b3(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function _3(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
61
|
-
`;break}case-3:{s=`\r
|
|
62
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function C3(e){const r={constructs:Rw([y3,...(e||{}).extensions||[]]),content:i(Dw),defined:[],document:i(Vw),flow:i(r3),lazy:{},string:i(s3),text:i(l3)};return r;function i(o){return s;function s(l){return v3(r,o,l)}}}function w3(e){for(;!r0(e););return e}const Dg=/[\0\t\n\r]/g;function E3(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const a=[];let u,c,d,f,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Dg.lastIndex=d,u=Dg.exec(o),f=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(f),!u){t=o.slice(d);break}if(h===10&&d===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),d<f&&(a.push(o.slice(d,f)),e+=f-d),h){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const u0={}.hasOwnProperty;function S3(e,t,n){return typeof t!="string"&&(n=t,t=void 0),k3(n)(w3(C3(n).document().write(E3()(e,t,!0))))}function k3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ye),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(ze),blockQuote:o(oe),characterEscape:I,characterReference:I,codeFenced:o(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ce,s),codeText:o(pe,s),codeTextData:I,data:I,codeFlowValue:I,definition:o(Te),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Oe),hardBreakEscape:o(Ze),hardBreakTrailing:o(Ze),htmlFlow:o(qe,s),htmlFlowData:I,htmlText:o(qe,s),htmlTextData:I,image:o(jt),label:s,link:o(Ye),listItem:o($),listItemValue:f,listOrdered:o(F,d),listUnordered:o(F),paragraph:o(j),reference:L,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ze),strong:o(re),thematicBreak:o(Y)},exit:{atxHeading:a(),atxHeadingSequence:w,autolink:a(),autolinkEmail:ie,autolinkProtocol:X,blockQuote:a(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ge,characterReference:K,codeFenced:a(v),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:P,codeIndented:a(y),codeText:a(z),codeTextData:P,data:P,definition:a(),definitionDestinationString:b,definitionLabelString:p,definitionTitleString:x,emphasis:a(),hardBreakEscape:a(O),hardBreakTrailing:a(O),htmlFlow:a(M),htmlFlowData:P,htmlText:a(V),htmlTextData:P,image:a(U),label:te,labelText:G,lineEnding:R,link:a(W),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ye,resourceDestinationString:A,resourceTitleString:fe,resource:me,setextHeading:a(S),setextHeadingLineSequence:C,setextHeadingText:_,strong:a(),thematicBreak:a()}};c0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let B={type:"root",children:[]};const T={stack:[B],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:c,data:n},de=[];let be=-1;for(;++be<D.length;)if(D[be][1].type==="listOrdered"||D[be][1].type==="listUnordered")if(D[be][0]==="enter")de.push(be);else{const Se=de.pop();be=i(D,Se,be)}for(be=-1;++be<D.length;){const Se=t[D[be][0]];u0.call(Se,D[be][1].type)&&Se[D[be][1].type].call(Object.assign({sliceSerialize:D[be][2].sliceSerialize},T),D[be][1])}if(T.tokenStack.length>0){const Se=T.tokenStack[T.tokenStack.length-1];(Se[1]||$g).call(T,void 0,Se[0])}for(B.position={start:rr(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:rr(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)B=t.transforms[be](B)||B;return B}function i(D,B,T){let de=B-1,be=-1,Se=!1,Ut,Nt,Rn,Lr;for(;++de<=T;){const ht=D[de];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?be++:be--,Lr=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(Ut&&!Lr&&!be&&!Rn&&(Rn=de),Lr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lr=void 0}if(!be&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||be===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(Ut){let nr=de;for(Nt=void 0;nr--;){const Mt=D[nr];if(Mt[1].type==="lineEnding"||Mt[1].type==="lineEndingBlank"){if(Mt[0]==="exit")continue;Nt&&(D[Nt][1].type="lineEndingBlank",Se=!0),Mt[1].type="lineEnding",Nt=nr}else if(!(Mt[1].type==="linePrefix"||Mt[1].type==="blockQuotePrefix"||Mt[1].type==="blockQuotePrefixWhitespace"||Mt[1].type==="blockQuoteMarker"||Mt[1].type==="listItemIndent"))break}Rn&&(!Nt||Rn<Nt)&&(Ut._spread=!0),Ut.end=Object.assign({},Nt?D[Nt][1].start:ht[1].end),D.splice(Nt||de,0,["exit",Ut,ht[2]]),de++,T++}if(ht[1].type==="listItemPrefix"){const nr={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};Ut=nr,D.splice(de,0,["enter",nr,ht[2]]),de++,T++,Rn=void 0,Lr=!0}}}return D[B][1]._spread=Se,T}function o(D,B){return T;function T(de){l.call(this,D(de),de),B&&B.call(this,de)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,B,T){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([B,T||void 0]),D.position={start:rr(B.start),end:void 0}}function a(D){return B;function B(T){D&&D.call(this,T),u.call(this,T)}}function u(D,B){const T=this.stack.pop(),de=this.tokenStack.pop();if(de)de[0].type!==D.type&&(B?B.call(this,D,de[0]):(de[1]||$g).call(this,D,de[0]));else throw new Error("Cannot close `"+D.type+"` ("+jn({start:D.start,end:D.end})+"): it’s not open");T.position.end=rr(D.end)}function c(){return Ud(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function h(){const D=this.resume(),B=this.stack[this.stack.length-1];B.lang=D}function g(){const D=this.resume(),B=this.stack[this.stack.length-1];B.meta=D}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const D=this.resume(),B=this.stack[this.stack.length-1];B.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const D=this.resume(),B=this.stack[this.stack.length-1];B.value=D.replace(/(\r?\n|\r)$/g,"")}function p(D){const B=this.resume(),T=this.stack[this.stack.length-1];T.label=B,T.identifier=Ei(this.sliceSerialize(D)).toLowerCase()}function x(){const D=this.resume(),B=this.stack[this.stack.length-1];B.title=D}function b(){const D=this.resume(),B=this.stack[this.stack.length-1];B.url=D}function w(D){const B=this.stack[this.stack.length-1];if(!B.depth){const T=this.sliceSerialize(D).length;B.depth=T}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function C(D){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function I(D){const T=this.stack[this.stack.length-1].children;let de=T[T.length-1];(!de||de.type!=="text")&&(de=Z(),de.position={start:rr(D.start),end:void 0},T.push(de)),this.stack.push(de)}function P(D){const B=this.stack.pop();B.value+=this.sliceSerialize(D),B.position.end=rr(D.end)}function R(D){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const T=B.children[B.children.length-1];T.position.end=rr(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(I.call(this,D),P.call(this,D))}function O(){this.data.atHardBreak=!0}function M(){const D=this.resume(),B=this.stack[this.stack.length-1];B.value=D}function V(){const D=this.resume(),B=this.stack[this.stack.length-1];B.value=D}function z(){const D=this.resume(),B=this.stack[this.stack.length-1];B.value=D}function W(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=B,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function U(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=B,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function G(D){const B=this.sliceSerialize(D),T=this.stack[this.stack.length-2];T.label=G1(B),T.identifier=Ei(B).toLowerCase()}function te(){const D=this.stack[this.stack.length-1],B=this.resume(),T=this.stack[this.stack.length-1];if(this.data.inReference=!0,T.type==="link"){const de=D.children;T.children=de}else T.alt=B}function A(){const D=this.resume(),B=this.stack[this.stack.length-1];B.url=D}function fe(){const D=this.resume(),B=this.stack[this.stack.length-1];B.title=D}function me(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function ye(D){const B=this.resume(),T=this.stack[this.stack.length-1];T.label=B,T.identifier=Ei(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function _e(D){this.data.characterReferenceType=D.type}function ge(D){const B=this.sliceSerialize(D),T=this.data.characterReferenceType;let de;T?(de=Z1(B,T==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):de=$o(B);const be=this.stack[this.stack.length-1];be.value+=de}function K(D){const B=this.stack.pop();B.position.end=rr(D.end)}function X(D){P.call(this,D);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(D)}function ie(D){P.call(this,D);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(D)}function oe(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Oe(){return{type:"emphasis",children:[]}}function ze(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function qe(){return{type:"html",value:""}}function jt(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function F(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function $(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function j(){return{type:"paragraph",children:[]}}function re(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function Y(){return{type:"thematicBreak"}}}function rr(e){return{line:e.line,column:e.column,offset:e.offset}}function c0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?c0(e,r):T3(e,r)}}function T3(e,t){let n;for(n in t)if(u0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $g(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is still open")}function oo(e){return e.children instanceof Array}class ac extends Error{constructor(t,n){super(t),this.name="MarkdownParseError",this.cause=n}}class uc extends Error{constructor(t){super(t),this.name="UnrecognizedMarkdownConstructError"}}function I3(e){const t=new Map;return e.type!=="root"?{importDeclarations:{}}:(e.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,o;(((o=(i=r.data)==null?void 0:i.estree)==null?void 0:o.body)??[]).forEach(s=>{s.type==="ImportDeclaration"&&s.specifiers.forEach(l=>{t.set(l.local.name,{source:`${s.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(t.entries())})}function A3({root:e,markdown:t,visitors:n,syntaxExtensions:r,mdastExtensions:i,...o}){var s;let l;try{l=S3(t,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new ac(`Error parsing markdown: ${a.message}`,a):new ac(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((s=l.children.at(-1))==null?void 0:s.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),N3({root:e,mdastRoot:l,visitors:n,...o})}function N3({root:e,mdastRoot:t,visitors:n,...r}){const i=new WeakMap,o=new WeakMap,s=I3(t);n=n.sort((u,c)=>(c.priority??0)-(u.priority??0));function l(u,c){if(!oo(u))throw new Error("Attempting to visit children of a non-parent");u.children.forEach(d=>{a(d,c,u)})}function a(u,c,d,f=null){const h=n.find((g,m)=>f!=null&&f.has(m)?!1:typeof g.testNode=="string"?g.testNode===u.type:g.testNode(u,r));if(!h)try{throw new uc(`Unsupported markdown syntax: ${q1(u)}`)}catch{throw new uc(`Parsing of the following markdown structure failed: ${JSON.stringify({type:u.type,name:"name"in u?u.name:"N/A"})}`)}h.visitNode({mdastNode:u,lexicalParent:c,mdastParent:d,descriptors:r,metaData:s,actions:{visitChildren:l,nextVisitor(){a(u,c,d,(f??new Set).add(n.indexOf(h)))},addAndStepInto(g){c.append(g),oo(u)&&l(u,g)},addFormatting(g,m){m||oo(u)&&(m=u),m&&i.set(m,g|(i.get(d)??0))},removeFormatting(g,m){m||oo(u)&&(m=u),m&&i.set(m,g^(i.get(d)??0))},getParentFormatting(){return i.get(d)??0},addStyle(g,m){m||oo(u)&&(m=u),m&&o.set(m,g)},getParentStyle(){return o.get(d)??""}}})}a(t,e,null)}var L3=Object.defineProperty,F3=(e,t,n)=>t in e?L3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,du=(e,t,n)=>(F3(e,typeof t!="symbol"?t+"":t,n),n);const Vg="generic-html";class is extends dn{constructor(t,n,r,i){super(i),du(this,"__tag"),du(this,"__nodeType"),du(this,"__attributes"),this.__tag=t,this.__nodeType=n,this.__attributes=r}static getType(){return Vg}static clone(t){return new is(t.__tag,t.__nodeType,t.__attributes,t.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(t){const n=this.getWritable();n.__attributes=t}getStyle(){var t;return(t=this.__attributes.find(n=>n.name==="style"))==null?void 0:t.value}createDOM(){const t=this.__tag,n=document.createElement(t);return this.__attributes.forEach(r=>{n.setAttribute(r.name,r.value)}),n}updateDOM(){return!1}static importDOM(){return{}}exportDOM(t){const{element:n}=super.exportDOM(t);return{element:n}}static importJSON(t){const n=d0(t.tag,t.mdxType,t.attributes);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Vg,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function d0(e,t,n){return It(new is(e,t,n))}function P3(e){return e instanceof is}const R3={testLexicalNode:P3,visitLexicalNode({actions:e,lexicalNode:t}){e.addAndStepInto("mdxJsxTextElement",{name:t.getTag(),type:t.getNodeType(),attributes:t.getAttributes()})},priority:-100},O3={testLexicalNode:tn,visitLexicalNode:({mdastParent:e,actions:t})=>{t.appendToParent(e,{type:"text",value:`
|
|
63
|
-
`})}},M3={testLexicalNode:Ed,visitLexicalNode:({actions:e})=>{e.addAndStepInto("paragraph")}},D3={testLexicalNode:ft,visitLexicalNode:({actions:e})=>{e.addAndStepInto("root")}},Co=1,wo=2,Gs=4,Eo=8,Kd=16,qs=32,Ys=64;function Hg(e){return e.type==="text"}const $3=["u","span","sub","sup"],V3={shouldJoin:(e,t)=>{if(["text","emphasis","strong"].includes(e.type))return e.type===t.type;if(e.type==="mdxJsxTextElement"&&t.type==="mdxJsxTextElement"&&$3.includes(t.name)){const n=t;return e.name===n.name&&JSON.stringify(e.attributes)===JSON.stringify(n.attributes)}return!1},join(e,t){return Hg(e)&&Hg(t)?{type:"text",value:e.value+t.value}:{...e,children:[...e.children,...t.children]}},testLexicalNode:ee,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getPreviousSibling(),i=ee(r)?r.getFormat():0,o=e.getTextContent(),s=e.getFormat(),l=e.getStyle();let a=t;if(l&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&s&Eo&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&s&Ys&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&s&qs&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&s&wo&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),i&s&Co&&(a=n.appendToParent(a,{type:"strong",children:[]})),i&s&Gs&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&Eo&&!(i&Eo)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),s&Ys&&!(i&Ys)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),s&qs&&!(i&qs)&&(a=n.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),s&wo&&!(i&wo)&&(a=n.appendToParent(a,{type:"emphasis",children:[]})),s&Co&&!(i&Co)&&(a=n.appendToParent(a,{type:"strong",children:[]})),s&Gs&&!(i&Gs)&&(a=n.appendToParent(a,{type:"delete",children:[]})),s&Kd){n.appendToParent(a,{type:"inlineCode",value:o});return}n.appendToParent(a,{type:"text",value:o})}},H3={testNode:"break",visitNode:function({lexicalParent:e}){e.append(nn())}};function Os(e,t){return[{testNode:n=>n.type==="mdxJsxTextElement"&&n.name===e,visitNode({actions:n,mdastNode:r,lexicalParent:i}){n.addFormatting(t),n.visitChildren(r,i)}},{testNode:n=>n.type==="html"&&n.value===`<${e}>`,visitNode({actions:n,mdastParent:r}){n.addFormatting(t,r)}},{testNode:n=>n.type==="html"&&n.value===`</${e}>`,visitNode({actions:n,mdastParent:r}){n.removeFormatting(t,r)}}]}const B3={testNode:"delete",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Gs),t.visitChildren(e,n)}},z3={testNode:"inlineCode",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(He(e.value).setFormat(t.getParentFormatting()|Kd))}},j3={testNode:"emphasis",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(wo),t.visitChildren(e,n)}},U3={testNode:"strong",visitNode({mdastNode:e,actions:t,lexicalParent:n}){t.addFormatting(Co),t.visitChildren(e,n)}},W3=[j3,U3,...Os("u",Eo),...Os("code",Kd),z3,B3,...Os("sup",Ys),...Os("sub",qs)],J3={testNode:Y1,visitNode:function({mdastNode:e,actions:t,lexicalParent:n}){e.name==="span"&&e.attributes.length===1&&e.attributes[0].type==="mdxJsxAttribute"&&e.attributes[0].name==="style"?(t.addStyle(e.attributes[0].value,e),t.visitChildren(e,n)):t.addAndStepInto(d0(e.name,e.type,e.attributes))},priority:-100},K3=["listitem","quote","admonition"],Z3={testNode:"paragraph",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){K3.includes(t.getType())?n.visitChildren(e,t):n.addAndStepInto(Ne())}},G3={testNode:"root",visitNode({actions:e,mdastNode:t,lexicalParent:n}){e.visitChildren(t,n)}},q3={testNode:"text",visitNode({mdastNode:e,actions:t}){const n=He(e.value);n.setFormat(t.getParentFormatting());const r=t.getParentStyle();r!==""&&n.setStyle(r),t.addAndStepInto(n)}},Y3=()=>k.createElement(Xb,{externalHistoryState:Bt(EE)}),Jt={eof:null,exclamationMark:33,dash:45,greaterThan:62},Rr={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix"};function X3(e){return{canContainEols:["comment"],enter:{comment(t){this.buffer()}},exit:{comment(t){this.resume()}}}}const Bg=(e,t,n)=>{return r;function r(g){return e.enter("comment"),e.consume(g),i}function i(g){return g===Jt.exclamationMark?(e.consume(g),o):n(g)}function o(g){return g===Jt.dash?(e.consume(g),s):n(g)}function s(g){return g===Jt.dash?(e.consume(g),l):n(g)}function l(g){return g===Jt.greaterThan?n(g):he(g)?c(g):(e.enter(Rr.data),g===Jt.dash?(e.consume(g),a):u(g))}function a(g){return g===Jt.greaterThan?n(g):u(g)}function u(g){return g===Jt.eof?n(g):g===Jt.dash?(e.consume(g),f):he(g)?(e.exit(Rr.data),c(g)):(e.consume(g),u)}function c(g){return e.enter(Rr.lineEnding),e.consume(g),e.exit(Rr.lineEnding),Ae(e,d,Rr.linePrefix)}function d(g){return he(g)?c(g):(e.enter(Rr.data),u(g))}function f(g){return g===Jt.dash?(e.consume(g),h):u(g)}function h(g){return g===Jt.greaterThan?(e.exit(Rr.data),e.enter("commentEnd"),e.consume(g),e.exit("commentEnd"),e.exit("comment"),t(g)):g===Jt.dash?(e.consume(g),h):u(g)}},Q3={flow:{60:{tokenize:Bg,concrete:!0}},text:{60:{tokenize:Bg}}},eE="_bold_1tncs_10",tE="_italic_1tncs_14",nE="_underline_1tncs_18",rE="_strikethrough_1tncs_34",iE="_underlineStrikethrough_1tncs_38",oE="_subscript_1tncs_42",sE="_superscript_1tncs_47",lE="_code_1tncs_52",aE="_nestedListItem_1tncs_59",uE="_listitem_1tncs_69",cE="_listItemChecked_1tncs_73",dE="_listItemUnchecked_1tncs_74",fE="_admonitionDanger_1tncs_151",hE="_admonitionInfo_1tncs_152",gE="_admonitionNote_1tncs_153",pE="_admonitionTip_1tncs_154",mE="_admonitionCaution_1tncs_155",ut={bold:eE,italic:tE,underline:nE,strikethrough:rE,underlineStrikethrough:iE,subscript:oE,superscript:sE,code:lE,nestedListItem:aE,listitem:uE,listItemChecked:cE,listItemUnchecked:dE,admonitionDanger:fE,admonitionInfo:hE,admonitionNote:gE,admonitionTip:pE,admonitionCaution:mE},Zd={text:{bold:ut.bold,italic:ut.italic,underline:ut.underline,code:ut.code,strikethrough:ut.strikethrough,subscript:ut.subscript,superscript:ut.superscript,underlineStrikethrough:ut.underlineStrikethrough},list:{listitem:ut.listitem,listitemChecked:ut.listItemChecked,listitemUnchecked:ut.listItemUnchecked,nested:{listitem:ut.nestedListItem}},admonition:{danger:ut.admonitionDanger,info:ut.admonitionInfo,note:ut.admonitionNote,tip:ut.admonitionTip,caution:ut.admonitionCaution}},Gd=Qn(),_r=ue(null),Qe=ue(null),cc=ue(""),dc=ue(!0),sn=ue(!1,e=>{e.sub(e.pipe(sn,Ue(_r)),([t,n])=>{n==null||n.setEditable(!t)})}),fc=ue(""),zg=ue(!1),Vo=ue(!1),f0=ue(0),vl=ue(null),hc=lt(e=>{e.link(e.pipe(vl,Wo(t=>t!==null)),hc)}),h0=lt(e=>{e.sub(e.pipe(h0,Ue(Qe)),([t,n])=>{n==null||n.dispatchCommand(zn,t)})}),Oi=ue(null,e=>{e.sub(e.pipe(Oi,Ue(Qe)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:vr(r,l=>{const a=l.getParent();return a!==null&&We(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null){const l=ca(i)?i.getTag():i.getType();e.pub(R0,l)}})}),g0=ue(""),Xr=ue(""),bl=ue(!1),ga=lt(e=>{e.link(Xr,ga),e.sub(g0,t=>{e.pubIn({[bl]:!0,[Xr]:t})})}),gc=lt(e=>{e.link(e.pipe(ga,Ue(yc),Wo(([,t])=>!t),yi(([t])=>t)),gc)}),p0=ue([]),m0=ue([]),x0=ue([]),y0=ue([]),v0=ue([]),b0=ue([]),pc=ue({}),xE=ue(!1),_0=ue([]),yE=ue([]),pa=ue([]),os=ue(null),vE=ue(null),Cr=wt(m0),Zn=wt(p0),mc=wt(x0),xc=wt(y0),wr=wt(v0),C0=wt(b0),yc=ue(!1),qd=lt(e=>{e.sub(e.pipe(qd,Ue(Xr,_r,Vo),Wo(([t,n])=>t.trim()!==n.trim())),([t,,n,r])=>{e.pub(yc,!0),n==null||n.update(()=>{Re().clear(),Yd(e,Re(),t),r?n.focus():nt(null)},{onUpdate:()=>{e.pub(yc,!1)}})})}),w0=lt(e=>{e.sub(e.pipe(w0,Ue(Qe,Vo)),([t,n,r])=>{n==null||n.update(()=>{const i=Q();if(i!==null){const o={children:[],append(s){this.children.push(s)},getType(){return i.getNodes()[0].getType()}};Yd(e,o,t),ji(o.children)}r?n.focus():nt(null)})})});function E0(){return um((e,[t,n])=>(e.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),n?t.map(r=>r(n)):[]),[])}const S0=ue([],e=>{e.pipe(e.combine(S0,Qe),E0())}),k0=ue([],e=>{e.pipe(e.combine(k0,_r),E0())}),bE=ue(null),vc=lt(),Er=ue(e=>{throw new Error(`No icon component for ${e}`)});function wt(e,t){return lt((n,r)=>{n.changeWith(e,r,(i,o)=>{Array.isArray(o)||(o=[o]);let s=i;for(const l of o)i.includes(l)||(s=[...s,l]);return s}),t==null||t(n,r)})}function T0(e){const t=Q();J(t)&&e.pubIn({[Oi]:t,[f0]:t.format})}const I0=wt(k0,(e,t)=>{e.pub(t,[n=>n.registerCommand(Wl,(r,i)=>(e.pubIn({[Qe]:i,[Vo]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{e.pub(bE,{rootNode:Re(),editorType:"lexical"})}),T0(e),!1),Kn),n=>n.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:o})=>{if(e.getValue(vl)!==null||r.size===0&&i.size===0)return;let l;o.read(()=>{Re().getLastChild()instanceof Xo&&n.update(()=>{Re().append(Ne())},{discrete:!0}),l=Pw({root:Re(),visitors:e.getValue(v0),jsxComponentDescriptors:e.getValue(_0),toMarkdownExtensions:e.getValue(b0),toMarkdownOptions:e.getValue(pc),jsxIsAvailable:e.getValue(xE)})}),e.pub(Xr,l.trim()),e.pub(bl,!1)}),n=>n.registerCommand(Am,()=>(e.pub(Vo,!0),!1),Kn)])}),Ho=wt(S0,(e,t)=>{e.pub(t,[n=>n.registerUpdateListener(({editorState:r})=>{r.read(()=>{T0(e)})}),n=>n.registerCommand(Nm,r=>{var i;const o=e.getValue(_r);return o&&!((i=o.getRootElement())!=null&&i.contains(r.relatedTarget))&&e.pubIn({[Vo]:!1,[vc]:r}),!1},Kn)])});function Yd(e,t,n){try{A3({root:t,visitors:e.getValue(p0),mdastExtensions:e.getValue(y0),markdown:n,syntaxExtensions:e.getValue(x0),jsxComponentDescriptors:e.getValue(_0),directiveDescriptors:e.getValue(yE),codeBlockEditorDescriptors:e.getValue(pa)}),e.pub(vl,null)}catch(r){if(r instanceof ac||r instanceof uc)e.pubIn({[Xr]:n,[vl]:{error:r.message,source:n}});else throw r}}const A0=ue([]),si=wt(A0),N0=ue([]),_E=wt(N0),L0=ue([]),CE=wt(L0),F0=ue([]);wt(F0);const wE=ue([]),P0=wt(wE),EE=ue(v1()),R0=ue("");lt();const _l=lt(e=>{e.sub(e.pipe(_l,Ue(Qe)),([t,n])=>{n==null||n.update(()=>{const r=Q();J(r)&&(Ob(r,t),setTimeout(()=>{n.focus()}))})})}),O0=lt(e=>{e.sub(e.pipe(O0,Ue(Qe)),([t,n])=>{n==null||n.focus(()=>{n.getEditorState().read(()=>{const r=Q();J(r)&&(n.update(()=>{const i=t();i.isInline()?(ji([i]),We(i.getParentOrThrow())&&Bd(i,Ne).selectEnd()):y1(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{n.dispatchCommand(Gd,void 0)}))})},{defaultSelection:"rootEnd"})})}),Cl=ue("rich-text",e=>{function t(){return um((n,r)=>({current:n.next,next:r}),{current:"rich-text",next:"rich-text"})}e.sub(e.pipe(Cl,t(),Ue(wl)),([{current:n},r])=>{(n==="source"||n==="diff")&&e.pub(qd,r)}),e.sub(e.pipe(Cl,t(),Wo(n=>n.current==="rich-text"),Ue(Qe)),([,n])=>{n==null||n.dispatchCommand(Gd,void 0)})}),wl=ue("",e=>{e.link(Xr,wl),e.link(wl,ga)}),Xd=ue([]),Zi=wt(Xd),M0=ue(()=>{throw new Error("No translation function provided")}),jg=ue(Zd),SE=un({init(e,t){const n=(t==null?void 0:t.initialMarkdown)??"";e.register(I0),e.register(Ho),e.register(ga),e.pubIn({[g0]:t!=null&&t.trim?n.trim():n,[Er]:t==null?void 0:t.iconComponentFor,[Zn]:[G3,Z3,q3,H3,...W3],[Cr]:[Ui,Fn,is],[wr]:[D3,M3,V3,O3,R3],[si]:Y3,[cc]:t==null?void 0:t.contentEditableClassName,[dc]:t==null?void 0:t.spellCheck,[pc]:t==null?void 0:t.toMarkdownOptions,[zg]:t==null?void 0:t.autoFocus,[fc]:t==null?void 0:t.placeholder,[sn]:t==null?void 0:t.readOnly,[M0]:t==null?void 0:t.translation,[xc]:C_(),[mc]:b_(),[C0]:[U_(),w_()],[jg]:(t==null?void 0:t.lexicalTheme)??Zd}),e.singletonSub(hc,t==null?void 0:t.onError),e.singletonSub(gc,r=>{t==null||t.onChange(r,e.getValue(bl))}),e.singletonSub(vc,t==null?void 0:t.onBlur),t!=null&&t.suppressHtmlProcessing||e.pubIn({[xc]:[j_(),X3()],[mc]:[gC(),pC(),Q3],[Zn]:J3})},postInit(e,t){const n=lb({editable:(t==null?void 0:t.readOnly)!==!0,namespace:"MDXEditor",nodes:e.getValue(m0),onError:r=>{throw r},theme:e.getValue(jg)});n.update(()=>{const r=(t==null?void 0:t.initialMarkdown.trim())??"";Yd(e,Re(),r);const i=t==null?void 0:t.autoFocus;if(i){if(i===!0){setTimeout(()=>{n.focus(vi,{defaultSelection:"rootStart"})});return}setTimeout(()=>{n.focus(vi,{defaultSelection:i.defaultSelection??"rootStart"})})}}),e.pub(_r,n),e.pub(Qe,n)},update(e,t){e.pubIn({[cc]:t==null?void 0:t.contentEditableClassName,[dc]:t==null?void 0:t.spellCheck,[pc]:t==null?void 0:t.toMarkdownOptions,[zg]:t==null?void 0:t.autoFocus,[fc]:t==null?void 0:t.placeholder,[sn]:t==null?void 0:t.readOnly}),e.singletonSub(gc,n=>{t==null||t.onChange(n,e.getValue(bl))}),e.singletonSub(vc,t==null?void 0:t.onBlur),e.singletonSub(hc,t==null?void 0:t.onError)}});function tr(){return Bt(M0)}function kE(){return Re().getTextContent()}function TE(e,t=!0){if(e)return!1;let n=kE();return t&&(n=n.trim()),n===""}function IE(e){if(!TE(e,!1))return!1;const t=Re().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Ie(i))return!1;if(H(i)){if(!Ed(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let l=0;l<s;l++){const a=o[r];if(!ee(a))return!1}}}return!0}function D0(e){return()=>IE(e)}const $0=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?E.useLayoutEffect:E.useEffect;function AE({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:h,className:g,id:m,role:v="textbox",spellCheck:y=!0,style:p,tabIndex:x,"data-testid":b,...w},_){const[C,S]=E.useState(e.isEditable()),I=E.useCallback(R=>{R&&R.ownerDocument&&R.ownerDocument.defaultView?e.setRootElement(R):e.setRootElement(null)},[e]),P=E.useMemo(()=>function(...R){return O=>{R.forEach(M=>{typeof M=="function"?M(O):M!=null&&(M.current=O)})}}(_,I),[I,_]);return $0(()=>(S(e.isEditable()),e.registerEditableListener(R=>{S(R)})),[e]),N.jsx("div",{"aria-activedescendant":C?t:void 0,"aria-autocomplete":C?n:"none","aria-controls":C?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":C&&v==="combobox"?!!s:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":u,"aria-multiline":c,"aria-owns":C?d:void 0,"aria-readonly":!C||void 0,"aria-required":f,autoCapitalize:h,className:g,contentEditable:C,"data-testid":b,id:m,ref:P,role:C?v:void 0,spellCheck:y,style:p,tabIndex:x,...w})}const NE=E.forwardRef(AE);function Ug(e){return e.getEditorState().read(D0(e.isComposing()))}const LE=E.forwardRef(FE);function FE(e,t){const{placeholder:n,...r}=e,[i]=yt();return N.jsxs(N.Fragment,{children:[N.jsx(NE,{editor:i,...r,ref:t}),n!=null&&N.jsx(PE,{editor:i,content:n})]})}function PE({content:e,editor:t}){const n=function(s){const[l,a]=E.useState(()=>Ug(s));return $0(()=>{function u(){const c=Ug(s);a(c)}return u(),At(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),l}(t),[r,i]=E.useState(t.isEditable());if(E.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(s=>{i(s)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:N.jsx("div",{"aria-hidden":!0,children:o})}const RE=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?E.useLayoutEffect:E.useEffect;function OE(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function ME(){return function(e){const[t]=yt(),n=E.useMemo(()=>e(t),[t,e]),[r,i]=E.useState(()=>n.initialValueFn()),o=E.useRef(r);return RE(()=>{const{initialValueFn:s,subscribe:l}=n,a=s();return o.current!==a&&(o.current=a,i(a)),l(u=>{o.current=u,i(u)})},[n,e]),r}(OE)}function DE(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const l=s.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[u,c,d,f,h,g]=a;e.update(()=>{const m=Q();if(J(m)){const v=m.anchor;let y=v.getNode(),p=0,x=0;if(ee(y)&&u>=0&&c>=0&&(p=u,x=u+c,m.setTextNodeRange(y,p,y,x)),p===x&&d===""||(m.insertRawText(d),y=v.getNode()),ee(y)){p=f,x=f+h;const b=y.getTextContentSize();p=p>b?b:p,x=x>b?b:x,m.setTextNodeRange(y,p,y,x)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}const bc=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?E.useLayoutEffect:E.useEffect;function Wg(e){return e.getEditorState().read(D0(e.isComposing()))}function $E({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=yt(),i=function(o,s){const[l,a]=E.useState(()=>o.getDecorators());return bc(()=>o.registerDecoratorListener(u=>{ki.flushSync(()=>{a(u)})}),[o]),E.useEffect(()=>{a(o.getDecorators())},[o]),E.useMemo(()=>{const u=[],c=Object.keys(l);for(let d=0;d<c.length;d++){const f=c[d],h=N.jsx(s,{onError:m=>o._onError(m),children:N.jsx(E.Suspense,{fallback:null,children:l[f]})}),g=o.getElementByKey(f);g!==null&&u.push(ki.createPortal(h,g,f))}return u},[s,l,o])}(r,n);return function(o){bc(()=>At(p_(o),DE(o)),[o])}(r),N.jsxs(N.Fragment,{children:[e,N.jsx(VE,{content:t}),i]})}function VE({content:e}){const[t]=yt(),n=function(i){const[o,s]=E.useState(()=>Wg(i));return bc(()=>{function l(){const a=Wg(i);s(a)}return l(),At(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o}(t),r=ME();return n?typeof e=="function"?e(r):e:null}var V0={exports:{}};/*!
|
|
64
|
-
Copyright (c) 2018 Jed Watson.
|
|
65
|
-
Licensed under the MIT License (MIT), see
|
|
66
|
-
http://jedwatson.github.io/classnames
|
|
67
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(o=i(o,r(l)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var l in o)t.call(o,l)&&o[l]&&(s=i(s,l));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(V0);var HE=V0.exports;const Le=im(HE),BE="_editorRoot_sects_53",zE="_editorWrapper_sects_155",jE="_toolbarRoot_sects_162",UE="_readOnlyToolbarRoot_sects_189",WE="_toolbarToggleItem_sects_208",JE="_toolbarGroupOfGroups_sects_219",KE="_toolbarToggleSingleGroup_sects_224",ZE="_toolbarButton_sects_239",GE="_selectContainer_sects_288",qE="_selectItem_sects_301",YE="_selectTrigger_sects_308",XE="_selectDropdownArrow_sects_374",QE="_contentEditable_sects_380",e7="_iconButton_sects_457",t7="_primaryButton_sects_507",n7="_secondaryButton_sects_508",r7="_linkDialogEditForm_sects_541",i7="_linkDialogAnchor_sects_587",o7="_linkDialogPopoverContent_sects_601",s7="_dialogContent_sects_603",l7="_popoverArrow_sects_650",a7="_linkDialogPreviewAnchor_sects_654",u7="_tooltipTrigger_sects_677",c7="_tooltipContent_sects_681",d7="_actionButton_sects_695",f7="_dialogOverlay_sects_870",h7="_focusedImage_sects_916",g7="_imageWrapper_sects_920",p7="_editImageToolbar_sects_933",m7="_editImageButton_sects_937",x7="_imageControlWrapperResizing_sects_1032",y7="_imageResizer_sects_1036",v7="_imageResizerN_sects_1045",b7="_imageResizerNe_sects_1051",_7="_imageResizerE_sects_1057",C7="_imageResizerSe_sects_1063",w7="_imageResizerS_sects_1063",E7="_imageResizerSw_sects_1075",S7="_imageResizerW_sects_1081",k7="_imageResizerNw_sects_1087",T7="_imagePlaceholder_sects_1093",I7="_placeholder_sects_1101",A7="_rootContentEditableWrapper_sects_1114",N7="_downshiftInputWrapper_sects_1124",L7="_downshiftInput_sects_1124",F7="_downshiftAutocompleteContainer_sects_1155",P7="_textInput_sects_1201",R7="_multiFieldForm_sects_1209",O7="_formField_sects_1215",M7="_popupContainer_sects_1235",se={editorRoot:BE,editorWrapper:zE,toolbarRoot:jE,readOnlyToolbarRoot:UE,toolbarToggleItem:WE,toolbarGroupOfGroups:JE,toolbarToggleSingleGroup:KE,toolbarButton:ZE,selectContainer:GE,selectItem:qE,selectTrigger:YE,selectDropdownArrow:XE,contentEditable:QE,iconButton:e7,primaryButton:t7,secondaryButton:n7,linkDialogEditForm:r7,linkDialogAnchor:i7,linkDialogPopoverContent:o7,dialogContent:s7,popoverArrow:l7,linkDialogPreviewAnchor:a7,tooltipTrigger:u7,tooltipContent:c7,actionButton:d7,dialogOverlay:f7,focusedImage:h7,imageWrapper:g7,editImageToolbar:p7,editImageButton:m7,imageControlWrapperResizing:x7,imageResizer:y7,imageResizerN:v7,imageResizerNe:b7,imageResizerE:_7,imageResizerSe:C7,imageResizerS:w7,imageResizerSw:E7,imageResizerW:S7,imageResizerNw:k7,imagePlaceholder:T7,placeholder:I7,rootContentEditableWrapper:A7,downshiftInputWrapper:N7,downshiftInput:L7,downshiftAutocompleteContainer:F7,textInput:P7,multiFieldForm:R7,formField:O7,popupContainer:M7},D7={undo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),code:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),k.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),k.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),k.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),k.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),k.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),k.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),k.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),k.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),k.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),k.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),k.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),k.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),k.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),k.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:k.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))};function _c(e,t){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},_c(e,t)}var Jg={error:null},$7=function(e){var t,n;function r(){for(var o,s=arguments.length,l=new Array(s),a=0;a<s;a++)l[a]=arguments[a];return(o=e.call.apply(e,[this].concat(l))||this).state=Jg,o.resetErrorBoundary=function(){for(var u,c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];o.props.onReset==null||(u=o.props).onReset.apply(u,d),o.reset()},o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_c(t,n),r.getDerivedStateFromError=function(o){return{error:o}};var i=r.prototype;return i.reset=function(){this.setState(Jg)},i.componentDidCatch=function(o,s){var l,a;(l=(a=this.props).onError)==null||l.call(a,o,s)},i.componentDidUpdate=function(o,s){var l,a,u,c,d=this.state.error,f=this.props.resetKeys;d!==null&&s.error!==null&&((u=o.resetKeys)===void 0&&(u=[]),(c=f)===void 0&&(c=[]),u.length!==c.length||u.some(function(h,g){return!Object.is(h,c[g])}))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,o.resetKeys,f),this.reset())},i.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,a=s.FallbackComponent,u=s.fallback;if(o!==null){var c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(E.isValidElement(u))return u;if(typeof l=="function")return l(c);if(a)return E.createElement(a,c);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(E.Component);function V7({children:e,onError:t}){return N.jsx($7,{fallback:N.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const H7=({children:e})=>{const t=Bt(_r),n=k.useMemo(()=>[t,dv(null,Zd)],[t]);return k.createElement(cm.Provider,{value:n},e)},B7=()=>{const e=tr(),t=Pt(vE),n=c=>{t({current:c})},[r,i,o,s,l,a,u]=Ln(cc,dc,A0,N0,F0,fc,L0);return k.createElement(k.Fragment,null,s.map((c,d)=>k.createElement(c,{key:d})),k.createElement(H0,{wrappers:l},k.createElement("div",{className:Le(se.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},k.createElement($E,{contentEditable:k.createElement("div",{ref:n},k.createElement(LE,{className:Le(se.contentEditable,r),ariaLabel:e("contentArea.editableMarkdown","editable markdown"),spellCheck:i})),placeholder:k.createElement("div",{className:Le(se.contentEditable,se.placeholder,r)},k.createElement("p",null,a)),ErrorBoundary:V7}))),o.map((c,d)=>k.createElement(c,{key:d})),u.map((c,d)=>k.createElement(c,{key:d})))},z7={listItemIndent:"one"},j7=e=>D7[e];function U7(e,t,n={}){let r=t;for(const[i,o]of Object.entries(n))r=r.replaceAll(`{{${i}}}`,String(o));return r}const H0=({wrappers:e,children:t})=>{if(e.length===0)return k.createElement(k.Fragment,null,t);const n=e[0];return k.createElement(n,null,k.createElement(H0,{wrappers:e.slice(1)},t))},W7=({children:e,className:t,overlayContainer:n})=>{const r=k.useRef(null),i=Pt(os);return k.useEffect(()=>{const o=document.createElement("div");return o.classList.add("mdxeditor-popup-container",se.editorRoot,se.popupContainer,...(t??"").trim().split(" ").filter(Boolean)),(n??document.body).appendChild(o),r.current=o,i(r),()=>{o.remove()}},[t,r,n,i]),k.createElement("div",{className:Le("mdxeditor",se.editorRoot,se.editorWrapper,t)},e)},J7=({mdxRef:e})=>{const t=zl();return k.useImperativeHandle(e,()=>({getMarkdown:()=>{const n=t.getValue(Cl);return n==="source"||n==="diff"?t.getValue(wl):t.getValue(Xr)},setMarkdown:n=>{t.pub(qd,n)},insertMarkdown:n=>{t.pub(w0,n)},focus:(n,r)=>{var i;(i=t.getValue(_r))==null||i.focus(n,r)}}),[t]),null},K7=k.forwardRef((e,t)=>k.createElement(cv,{plugins:[SE({contentEditableClassName:e.contentEditableClassName??"",spellCheck:e.spellCheck??!0,initialMarkdown:e.markdown,onChange:e.onChange??vi,onBlur:e.onBlur??vi,toMarkdownOptions:e.toMarkdownOptions??z7,autoFocus:e.autoFocus??!1,placeholder:e.placeholder??"",readOnly:!!e.readOnly,iconComponentFor:e.iconComponentFor??j7,suppressHtmlProcessing:e.suppressHtmlProcessing??!1,onError:e.onError??vi,translation:e.translation??U7,trim:e.trim??!0,lexicalTheme:e.lexicalTheme}),...e.plugins??[]]},k.createElement(W7,{className:e.className,overlayContainer:e.overlayContainer},k.createElement(H7,null,k.createElement(B7,null))),k.createElement(J7,{mdxRef:t}))),B0=typeof window<"u"&&typeof window.document.createElement<"u",El=B0&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);function Z7(e,t){return El?e:t}const G7={testLexicalNode:ca,visitLexicalNode:({lexicalNode:e,actions:t})=>{const n=parseInt(e.getTag()[1],10);t.addAndStepInto("heading",{depth:n})}},q7={testNode:"heading",visitNode:function({mdastNode:e,actions:t}){t.addAndStepInto(_n(`h${e.depth}`))}},Y7=[48,49,50,51,52,53,54],z0=[1,2,3,4,5,6],X7={49:1,50:2,51:3,52:4,53:5,54:6},ma=ue(z0,e=>{e.pub(I0,t=>t.registerCommand(km,n=>{const{keyCode:r,ctrlKey:i,metaKey:o,altKey:s}=n;return Y7.includes(r)&&Z7(o,i)&&s?(n.preventDefault(),t.update(()=>{if(r===48)e.pub(_l,()=>Ne());else{const l=e.getValue(ma),a=X7[r];l.includes(a)||e.pub(_l,()=>_n(`h${a}`))}}),!0):!1},De))}),Q7=un({init(e){e.pubIn({[Zi]:"headings",[Zn]:q7,[Cr]:rs,[wr]:G7})},update(e,t){e.pub(ma,(t==null?void 0:t.allowedHeadingLevels)??z0)}});function Kg(e,t){return e.getEditorState().read(()=>{const n=je(t);return n!==null&&n.isSelected()})}function j0(e){const[t]=yt(),[n,r]=E.useState(()=>Kg(t,e));return E.useEffect(()=>{let i=!0;const o=t.registerUpdateListener(()=>{i&&r(Kg(t,e))});return()=>{i=!1,o()}},[t,e]),[n,E.useCallback(i=>{t.update(()=>{let o=Q();it(o)||(o=yd(),nt(o)),it(o)&&(i?o.add(e):o.delete(e))})},[t,e]),E.useCallback(()=>{t.update(()=>{const i=Q();it(i)&&i.clear()})},[t])]}const U0=Qn();function eS({nodeKey:e}){const[t]=yt(),[n,r,i]=j0(e),o=E.useCallback(s=>{const l=Q();return n&&it(l)&&(s.preventDefault(),l.getNodes().forEach(a=>{xa(a)&&a.remove()})),!1},[n]);return E.useEffect(()=>At(t.registerCommand(Jl,s=>{const l=t.getElementByKey(e);return s.target===l&&(s.shiftKey||i(),r(!n),!0)},De),t.registerCommand(ql,o,De),t.registerCommand(Gl,o,De)),[i,t,n,e,o,r]),E.useEffect(()=>{const s=t.getElementByKey(e),l=t._config.theme.hrSelected??"selected";s!==null&&(n?on(s,l):aa(s,l))},[t,n,e]),null}let ss=class W0 extends Xo{static getType(){return"horizontalrule"}static clone(t){return new W0(t.__key)}static importJSON(t){return Gi().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:tS,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(t){const n=document.createElement("hr");return on(n,t.theme.hr),n}getTextContent(){return`
|
|
68
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return N.jsx(eS,{nodeKey:this.__key})}};function tS(){return{node:Gi()}}function Gi(){return It(new ss)}function xa(e){return e instanceof ss}function nS(){const[e]=yt();return E.useEffect(()=>e.registerCommand(U0,t=>{const n=Q();if(!J(n))return!1;if(n.focus.getNode()!==null){const r=Gi();y1(r)}return!0},we),[e]),null}const rS={testLexicalNode:xa,visitLexicalNode({actions:e}){e.addAndStepInto("thematicBreak")}},iS={testNode:"thematicBreak",visitNode({actions:e}){e.addAndStepInto(Gi())}},oS=xr(e=>{e.sub(e.pipe(oS,Ue(Qe)),([,t])=>{t==null||t.dispatchCommand(U0,void 0)})}),sS=un({init(e){e.pubIn({[Zi]:"thematicBreak",[Zn]:iS,[Cr]:ss,[wr]:rS,[si]:nS})}});function yn(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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 Cc(e){let t=1,n=e.getParent();for(;n!=null;){if(ke(n)){const r=n.getParent();if(xe(r)){t++,n=r.getParent();continue}yn(40)}return t}return t}function wc(e){let t=e.getParent();xe(t)||yn(40);let n=t;for(;n!==null;)n=n.getParent(),xe(n)&&(t=n);return t}function J0(e){let t=[];const n=e.getChildren().filter(ke);for(let r=0;r<n.length;r++){const i=n[r],o=i.getFirstChild();xe(o)?t=t.concat(J0(o)):t.push(i)}return t}function vn(e){return ke(e)&&xe(e.getFirstChild())}function Zg(e){return xt().append(e)}function K0(e,t){return ke(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Ec(e){const t=Q();if(t!==null){let n=t.getNodes();if(J(t)){const i=t.getStartEndPoints();i===null&&yn(143);const[o]=i,s=o.getNode(),l=s.getParent();if(We(s)){const a=s.getFirstChild();if(a)n=a.selectStart().getNodes();else{const u=Ne();s.append(u),n=u.select().getNodes()}}else if(K0(s,n)){const a=mt(e);if(We(l)){s.replace(a);const u=xt();H(s)&&(u.setFormat(s.getFormatType()),u.setIndent(s.getIndent())),a.append(u)}else if(ke(s)){const u=s.getParentOrThrow();Qr(a,u.getChildren()),u.replace(a)}return}}const r=new Set;for(let i=0;i<n.length;i++){const o=n[i];if(!H(o)||!o.isEmpty()||ke(o)||r.has(o.getKey())){if(Xm(o)){let s=o.getParent();for(;s!=null;){const l=s.getKey();if(xe(s)){if(!r.has(l)){const a=mt(e);Qr(a,s.getChildren()),s.replace(a),r.add(l)}break}{const a=s.getParent();if(We(a)&&!r.has(l)){r.add(l),Gg(s,e);break}s=a}}}}else Gg(o,e)}}}function Qr(e,t){e.splice(e.getChildrenSize(),0,t)}function Gg(e,t){if(xe(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=xt();let o;if(Qr(i,e.getChildren()),xe(n)&&t===n.getListType())n.append(i),xe(r)&&t===r.getListType()&&(Qr(n,r.getChildren()),r.remove()),o=n;else if(xe(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),o=r;else{const s=mt(t);s.append(i),e.replace(s),o=s}return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),e.remove(),o}function Qd(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&vn(n)&&vn(r)&&(Qd(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function lS(){const e=Q();if(J(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(K0(r,n))t.add(wc(r));else for(let i=0;i<n.length;i++){const o=n[i];if(Xm(o)){const s=x1(o,fn);s!=null&&t.add(wc(s))}}for(const i of t){let o=i;const s=J0(i);for(const l of s){const a=Ne().setTextStyle(e.style).setTextFormat(e.format);Qr(a,l.getChildren()),o.insertAfter(a),o=a,l.__key===e.anchor.key&&Yr(e.anchor,Ht(An(a,"next"))),l.__key===e.focus.key&&Yr(e.focus,Ht(An(a,"next"))),l.remove()}i.remove()}}}function aS(e){const t=new Set;if(vn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(vn(r)&&vn(i)){const o=i.getFirstChild();if(xe(o)){o.append(e);const s=r.getFirstChild();xe(s)&&(Qr(o,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(vn(r)){const o=r.getFirstChild();if(xe(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(vn(i)){const o=i.getFirstChild();xe(o)&&o.append(e)}else if(xe(n)){const o=xt().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),s=mt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());o.append(s),s.append(e),i?i.insertAfter(o):r?r.insertBefore(o):n.append(o)}}function uS(e){if(vn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(xe(n?n.getParent():void 0)&&ke(n)&&xe(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const o=t.getListType(),s=xt(),l=mt(o);s.append(l),e.getPreviousSiblings().forEach(c=>l.append(c));const a=xt(),u=mt(o);a.append(u),Qr(u,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(a),n.replace(e)}}}function cS(){const e=Q();if(!J(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!ke(t)||t.getChildrenSize()!==0)return!1;const n=wc(t),r=t.getParent();xe(r)||yn(40);const i=r.getParent();let o;if(We(i))o=Ne(),n.insertAfter(o);else{if(!ke(i))return!1;o=xt(),i.insertAfter(o)}o.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const l=mt(r.getListType());if(ke(o)){const a=xt();a.append(l),o.insertAfter(a)}else o.insertAfter(l);l.append(...s)}return function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const u=a.getParent();if(u==null||!ke(u)&&!xe(u))break;a=u}a.remove()}(t),!0}function Sl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class fn extends dn{static getType(){return"listitem"}static clone(t){return new fn(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){const n=document.createElement("li"),r=this.getParent();xe(r)&&r.getListType()==="check"&&Yg(n,this,null),n.value=this.__value,qg(n,t.theme,this);const i=this.__style||this.__textStyle;return i&&(n.style.cssText=i),n}updateDOM(t,n,r){const i=this.getParent();xe(i)&&i.getListType()==="check"&&Yg(n,this,t),n.value=this.__value,qg(n,r.theme,this);const o=t.__style||t.__textStyle,s=this.__style||this.__textStyle;return o!==s&&(n.style.cssText=s,s===""&&n.removeAttribute("style")),!1}static transform(){return t=>{if(ke(t)||yn(144),t.__checked==null)return;const n=t.getParent();xe(n)&&n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:dS,priority:0})}}static importJSON(t){return xt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const n=this.createDOM(t._config);n.style.textAlign=this.getFormatType();const r=this.getDirection();return r&&(n.dir=r),{element:n}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(H(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(ke(t))return super.replace(t);this.setIndent(0);const r=this.getParentOrThrow();if(!xe(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{const i=mt(r.getListType());let o=this.getNextSibling();for(;o;){const s=o;o=o.getNextSibling(),i.append(s)}r.insertAfter(t),t.insertAfter(i)}return n&&(H(t)||yn(139),this.getChildren().forEach(i=>{t.append(i)})),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){const r=this.getParentOrThrow();if(xe(r)||yn(39),ke(t))return super.insertAfter(t,n);const i=this.getNextSiblings();if(r.insertAfter(t,n),i.length!==0){const o=mt(r.getListType());i.forEach(s=>o.append(s)),t.insertAfter(o,n)}return t}remove(t){const n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&vn(n)&&vn(r)&&(Qd(n.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(t,n=!0){const r=xt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,n),r}collapseAtStart(t){const n=Ne();this.getChildren().forEach(s=>n.append(s));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),o=ke(i);if(r.getChildrenSize()===1)if(o)r.remove(),i.select();else{r.insertBefore(n),r.remove();const s=t.anchor,l=t.focus,a=n.getKey();s.type==="element"&&s.getNode().is(this)&&s.set(a,s.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(n),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const n=this.getWritable();return n.__value=t,n}getChecked(){const t=this.getLatest();let n;const r=this.getParent();return xe(r)&&(n=r.getListType()),n==="check"?!!t.__checked:void 0}setChecked(t){const n=this.getWritable();return n.__checked=t,n}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let n=t.getParentOrThrow(),r=0;for(;ke(n);)n=n.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(t){typeof t!="number"&&yn(117),(t=Math.floor(t))>=0||yn(199);let n=this.getIndent();for(;n!==t;)n<t?(aS(this),n++):(uS(this),n--);return this}canInsertAfter(t){return ke(t)}canReplaceWith(t){return ke(t)}canMergeWith(t){return ke(t)||Ed(t)}extractWithChild(t,n){if(!J(n))return!1;const r=n.anchor.getNode(),i=n.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return mt("bullet")}canMergeWhenEmpty(){return!0}}function qg(e,t,n){const r=[],i=[],o=t.list,s=o?o.listitem:void 0;let l;if(o&&o.nested&&(l=o.nested.listitem),s!==void 0&&r.push(...Sl(s)),o){const a=n.getParent(),u=xe(a)&&a.getListType()==="check",c=n.getChecked();u&&!c||i.push(o.listitemUnchecked),u&&c||i.push(o.listitemChecked),u&&r.push(c?o.listitemChecked:o.listitemUnchecked)}if(l!==void 0){const a=Sl(l);n.getChildren().some(u=>xe(u))?r.push(...a):i.push(...a)}i.length>0&&aa(e,...i),r.length>0&&on(e,...r)}function Yg(e,t,n,r){xe(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function dS(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return fS(n)}const t=e.getAttribute("aria-checked");return{node:xt(t==="true"||t!=="false"&&void 0)}}function fS(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:xt(e.hasAttribute("checked"))}}function xt(e){return It(new fn(void 0,e))}function ke(e){return e instanceof fn}let Sr=class Z0 extends dn{static getType(){return"list"}static clone(t){const n=t.__listType||ep[t.__tag];return new Z0(n,t.__start,t.__key)}constructor(t="number",n=1,r){super(r);const i=ep[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){const n=this.getWritable();return n.__listType=t,n.__tag=t==="number"?"ol":"ul",n}getListType(){return this.__listType}getStart(){return this.__start}setStart(t){const n=this.getWritable();return n.__start=t,n}createDOM(t,n){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Xg(i,t.theme,this),i}updateDOM(t,n,r){return t.__tag!==this.__tag||(Xg(n,r.theme,this),!1)}static transform(){return t=>{xe(t)||yn(163),function(n){const r=n.getNextSibling();xe(r)&&n.getListType()===r.getListType()&&Qd(n,r)}(t),function(n){const r=n.getListType()!=="check";let i=n.getStart();for(const o of n.getChildren())ke(o)&&(o.getValue()!==i&&o.setValue(i),r&&o.getLatest().__checked!=null&&o.setChecked(void 0),xe(o.getFirstChild())||i++)}(t)}}static importDOM(){return{ol:()=>({conversion:Qg,priority:0}),ul:()=>({conversion:Qg,priority:0})}}static importJSON(t){return mt().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const n=this.createDOM(t._config,t);return Ke(n)&&(this.__start!==1&&n.setAttribute("start",String(this.__start)),this.__listType==="check"&&n.setAttribute("__lexicalListType","check")),{element:n}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let n=0;n<t.length;n++){const r=t[n];if(ke(r))super.append(r);else{const i=xt();if(xe(r))i.append(r);else if(H(r))if(r.isInline())i.append(r);else{const o=He(r.getTextContent());i.append(o)}else i.append(r);super.append(i)}}return this}extractWithChild(t){return ke(t)}};function Xg(e,t,n){const r=[],i=[],o=t.list;if(o!==void 0){const s=o[`${n.__tag}Depth`]||[],l=Cc(n)-1,a=l%s.length,u=s[a],c=o[n.__tag];let d;const f=o.nested,h=o.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),h!==void 0&&n.__listType==="check"&&r.push(h),u!==void 0){r.push(...Sl(u));for(let g=0;g<s.length;g++)g!==a&&i.push(n.__tag+g)}if(d!==void 0){const g=Sl(d);l>1?r.push(...g):i.push(...g)}}i.length>0&&aa(e,...i),r.length>0&&on(e,...r)}function hS(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(ke(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(o=>{xe(o)&&t.push(Zg(o))})}else t.push(Zg(r))}return t}function Qg(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=mt("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(Ke(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?mt("check"):mt("bullet")),{after:hS,node:n}}const ep={ol:"number",ul:"bullet"};function mt(e="number",t=1){return It(new Sr(e,t))}function xe(e){return e instanceof Sr}const G0=Qn(),q0=Qn(),Y0=Qn(),X0=Qn();function gS(e){return At(e.registerCommand(q0,()=>(Ec("number"),!0),De),e.registerCommand(G0,()=>(Ec("bullet"),!0),De),e.registerCommand(X0,()=>(lS(),!0),De),e.registerCommand(Po,()=>cS(),De),e.registerNodeTransform(fn,t=>{const n=t.getFirstChild();if(n){if(ee(n)){const r=n.getStyle(),i=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==i&&t.setTextFormat(i)}}else{const r=Q();J(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Fn,t=>{const n=t.getParent();if(ke(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),i=t.getFormat();r===n.getTextStyle()&&i===n.getTextFormat()||n.setTextStyle(r).setTextFormat(i)}}))}function pS(e,t){e.update(()=>Ec(t))}const mS={testNode:"list",visitNode:function({mdastNode:e,lexicalParent:t,actions:n}){const r=e.children.some(o=>typeof o.checked=="boolean")?"check":e.ordered?"number":"bullet",i=mt(r);if(ke(t)){const o=xt();o.append(i),t.insertAfter(o)}else t.append(i);n.visitChildren(e,i)}},xS={testNode:"listItem",visitNode({mdastNode:e,actions:t,lexicalParent:n}){const r=n.getListType()==="check"?e.checked??!1:void 0;t.addAndStepInto(xt(r))}},yS={testLexicalNode:xe,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("list",{ordered:e.getListType()==="number",spread:!1})}},vS={testLexicalNode:ke,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r=e.getChildren(),i=r[0];if(r.length===1&&xe(i)){const o=t.children.at(-1);o?n.visitChildren(e,o):n.visitChildren(i,t)}else{const o=e.getParent(),s=n.appendToParent(t,{type:"listItem",checked:o.getListType()==="check"?!!e.getChecked():void 0,spread:!1,children:[]});let l=null;for(const a of e.getChildren())ee(a)||tn(a)||a.isInline()&&(H(a)||Ie(a))?(l||(l=n.appendToParent(s,{type:"paragraph",children:[]})),n.visit(a,l)):(l=null,n.visit(a,s))}}};function bS(e,t){return At(e.registerCommand(fd,n=>{const r=Q();if(!J(r))return!1;n.preventDefault();const i=function(o){const s=o.getNodes();if(Ub(s,f=>dl(f)&&f.canIndent()?f:null).length>0)return!0;const l=o.anchor,a=o.focus,u=a.isBefore(l)?a:l,c=u.getNode(),d=Xu(c);if(d.canIndent()){const f=d.getKey();let h=qo();if(h.anchor.set(f,0,"element"),h.focus.set(f,0,"element"),h=Jr(h),h.anchor.is(u))return!0}return!1}(r)?n.shiftKey?Du:ul:Im;return e.dispatchCommand(i,void 0)},we),e.registerCommand(ul,()=>{if(t==null)return!1;const n=Q();if(!J(n))return!1;const r=n.getNodes().map(i=>Xu(i).getIndent());return Math.max(...r)+1>=t},Kn))}function tp({maxIndent:e}){const[t]=yt();return E.useEffect(()=>bS(t,e),[t,e]),null}function np(){const[e]=yt();return E.useEffect(()=>At(e.registerCommand(Y0,()=>(pS(e,"check"),!0),De),e.registerCommand(cd,t=>op(t,e,!1),De),e.registerCommand(ud,t=>op(t,e,!0),De),e.registerCommand(Ko,t=>{if(Sc()!=null){const n=e.getRootElement();return n!=null&&n.focus(),!0}return!1},De),e.registerCommand(dd,t=>{const n=Sc();return!(n==null||!e.isEditable())&&(e.update(()=>{const r=In(n);ke(r)&&(t.preventDefault(),r.toggleChecked())}),!0)},De),e.registerCommand(ad,t=>e.getEditorState().read(()=>{const n=Q();if(J(n)&&n.isCollapsed()){const{anchor:r}=n,i=r.type==="element";if(i||r.offset===0){const o=r.getNode(),s=vr(o,l=>H(l)&&!l.isInline());if(ke(s)){const l=s.getParent();if(xe(l)&&l.getListType()==="check"&&(i||s.getFirstDescendant()===o)){const a=e.getElementByKey(s.__key);if(a!=null&&document.activeElement!==a)return a.focus(),t.preventDefault(),!0}}}}return!1}),De),e.registerRootListener((t,n)=>{t!==null&&(t.addEventListener("click",rp),t.addEventListener("pointerdown",ip)),n!==null&&(n.removeEventListener("click",rp),n.removeEventListener("pointerdown",ip))}))),null}function Q0(e,t){const n=e.target;if(!Ke(n))return;const r=n.firstChild;if(Ke(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=n.parentNode;if(!i||i.__lexicalListType!=="check")return;const o=n.getBoundingClientRect(),s=e.pageX/Wb(n);(n.dir==="rtl"?s<o.right&&s>o.right-20:s>o.left&&s<o.left+20)&&t()}function rp(e){Q0(e,()=>{if(Ke(e.target)){const t=e.target,n=Td(t);n!=null&&n.isEditable()&&n.update(()=>{const r=In(t);ke(r)&&(t.focus(),r.toggleChecked())})}})}function ip(e){Q0(e,()=>{e.preventDefault()})}function Sc(){const e=document.activeElement;return Ke(e)&&e.tagName==="LI"&&e.parentNode!=null&&e.parentNode.__lexicalListType==="check"?e:null}function op(e,t,n){const r=Sc();return r!=null&&t.update(()=>{const i=In(r);if(!ke(i))return;const o=function(s,l){let a=l?s.getPreviousSibling():s.getNextSibling(),u=s;for(;a==null&&ke(u);)u=u.getParentOrThrow().getParent(),u!=null&&(a=l?u.getPreviousSibling():u.getNextSibling());for(;ke(a);){const c=l?a.getLastChild():a.getFirstChild();if(!xe(c))return a;a=l?c.getLastChild():c.getFirstChild()}return null}(i,n);if(o!=null){o.selectStart();const s=t.getElementByKey(o.__key);s!=null&&(e.preventDefault(),setTimeout(()=>{s.focus()},0))}}),!1}function sp(){const[e]=yt();return E.useEffect(()=>{if(!e.hasNodes([Sr,fn]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),function(t){E.useEffect(()=>gS(t),[t])}(e),null}const _S={name:"tasklistCheck",tokenize:wS};function CS(){return{text:{91:_S}}}function wS(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return Ge(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return he(a)?t(a):Ee(a)?e.check({tokenize:ES},t,n)(a):n(a)}}function ES(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function SS(){return{exit:{taskListCheckValueChecked:lp,taskListCheckValueUnchecked:lp,paragraph:TS}}}function kS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:IS}}}function lp(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TS(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function IS(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let a=K1.listItem(e,t,n,{...r,...l.current()});return o&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+s}}const AS=new Map([["number",q0],["bullet",G0],["check",Y0],["",X0]]),ap=ue("",e=>{e.sub(e.pipe(Oi,Ue(Qe)),([t,n])=>{if(!t||!n)return;const r=t.anchor.getNode();let i=r.getKey()==="root"?r:vr(r,l=>{const a=l.getParent();return a!==null&&We(a)});i===null&&(i=r.getTopLevelElementOrThrow());const o=i.getKey();if(n.getElementByKey(o)!==null)if(xe(i)){const l=x1(r,Sr),a=l?l.getListType():i.getListType();e.pub(ap,a)}else e.pub(ap,"")})}),NS=lt(e=>{e.sub(e.pipe(NS,Ue(Qe)),([t,n])=>{n==null||n.dispatchCommand(AS.get(t),void 0)})}),LS=un({init(e){var t;(t=e.getValue(_r))==null||t.registerCommand(ul,()=>!PS(7),Kn),e.pubIn({[Zi]:"lists",[xc]:SS(),[mc]:CS(),[Zn]:[mS,xS],[Cr]:[fn,Sr],[wr]:[yS,vS],[C0]:kS(),[si]:[tp,sp,np],[P0]:[tp,sp,np]})}});function FS(e){const t=e.getNodes();return t.length===0?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map(n=>H(n)?n:n.getParentOrThrow()))}function PS(e){const t=Q();if(!J(t))return!1;const n=FS(t);let r=0;for(const i of n)if(xe(i))r=Math.max(Cc(i)+1,r);else if(ke(i)){const o=i.getParent();if((o==null?void 0:o.getChildren().length)===1){const s=o.getParent();if(ke(s)&&s.getChildren().length===1)return!1}if(!xe(o))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(Cc(o)+1,r)}return r<=e}function Mi(e){const t=RS(e),n=E.forwardRef((r,i)=>{const{children:o,...s}=r,l=E.Children.toArray(o),a=l.find(MS);if(a){const u=a.props.children,c=l.map(d=>d===a?E.Children.count(u)>1?E.Children.only(null):E.isValidElement(u)?u.props.children:null:d);return N.jsx(t,{...s,ref:i,children:E.isValidElement(u)?E.cloneElement(u,void 0,c):null})}return N.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function RS(e){const t=E.forwardRef((n,r)=>{const{children:i,...o}=n;if(E.isValidElement(i)){const s=$S(i),l=DS(o,i.props);return i.type!==E.Fragment&&(l.ref=r?z2(r,s):s),E.cloneElement(i,l)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ex=Symbol("radix.slottable");function OS(e){const t=({children:n})=>N.jsx(N.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ex,t}function MS(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ex}function DS(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...l)=>{const a=o(...l);return i(...l),a}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function $S(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var VS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=VS.reduce((e,t)=>{const n=Mi(`Primitive.${t}`),r=E.forwardRef((i,o)=>{const{asChild:s,...l}=i,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),N.jsx(a,{...l,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function HS(e,t){e&&ki.flushSync(()=>e.dispatchEvent(t))}var BS="DismissableLayer",kc="dismissableLayer.update",zS="dismissableLayer.pointerDownOutside",jS="dismissableLayer.focusOutside",up,tx=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ls=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...a}=e,u=E.useContext(tx),[c,d]=E.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),g=$e(t,C=>d(C)),m=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),p=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=p>=y,w=JS(C=>{const S=C.target,I=[...u.branches].some(P=>P.contains(S));!b||I||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},f),_=KS(C=>{const S=C.target;[...u.branches].some(P=>P.contains(S))||(o==null||o(C),s==null||s(C),C.defaultPrevented||l==null||l())},f);return ev(C=>{p===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),E.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(up=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),cp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=up)}},[c,f,n,u]),E.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),cp())},[c,u]),E.useEffect(()=>{const C=()=>h({});return document.addEventListener(kc,C),()=>document.removeEventListener(kc,C)},[]),N.jsx(Ce.div,{...a,ref:g,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:ve(e.onFocusCapture,_.onFocusCapture),onBlurCapture:ve(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ve(e.onPointerDownCapture,w.onPointerDownCapture)})});ls.displayName=BS;var US="DismissableLayerBranch",WS=E.forwardRef((e,t)=>{const n=E.useContext(tx),r=E.useRef(null),i=$e(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),N.jsx(Ce.div,{...e,ref:i})});WS.displayName=US;function JS(e,t=globalThis==null?void 0:globalThis.document){const n=jr(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let a=function(){nx(zS,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=a,t.addEventListener("click",i.current,{once:!0})):a()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function KS(e,t=globalThis==null?void 0:globalThis.document){const n=jr(e),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&nx(jS,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function cp(){const e=new CustomEvent(kc);document.dispatchEvent(e)}function nx(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?HS(i,o):i.dispatchEvent(o)}var fu="focusScope.autoFocusOnMount",hu="focusScope.autoFocusOnUnmount",dp={bubbles:!1,cancelable:!0},ZS="FocusScope",ya=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[l,a]=E.useState(null),u=jr(i),c=jr(o),d=E.useRef(null),f=$e(t,m=>a(m)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(x){if(h.paused||!l)return;const b=x.target;l.contains(b)?d.current=b:sr(d.current,{select:!0})},v=function(x){if(h.paused||!l)return;const b=x.relatedTarget;b!==null&&(l.contains(b)||sr(d.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&sr(l)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const p=new MutationObserver(y);return l&&p.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),p.disconnect()}}},[r,l,h.paused]),E.useEffect(()=>{if(l){hp.add(h);const m=document.activeElement;if(!l.contains(m)){const y=new CustomEvent(fu,dp);l.addEventListener(fu,u),l.dispatchEvent(y),y.defaultPrevented||(GS(ek(rx(l)),{select:!0}),document.activeElement===m&&sr(l))}return()=>{l.removeEventListener(fu,u),setTimeout(()=>{const y=new CustomEvent(hu,dp);l.addEventListener(hu,c),l.dispatchEvent(y),y.defaultPrevented||sr(m??document.body,{select:!0}),l.removeEventListener(hu,c),hp.remove(h)},0)}}},[l,u,c,h]);const g=E.useCallback(m=>{if(!n&&!r||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const p=m.currentTarget,[x,b]=qS(p);x&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&sr(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&sr(b,{select:!0})):y===p&&m.preventDefault()}},[n,r,h.paused]);return N.jsx(Ce.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});ya.displayName=ZS;function GS(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(sr(r,{select:t}),document.activeElement!==n)return}function qS(e){const t=rx(e),n=fp(t,e),r=fp(t.reverse(),e);return[n,r]}function rx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function fp(e,t){for(const n of e)if(!YS(n,{upTo:t}))return n}function YS(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XS(e){return e instanceof HTMLInputElement&&"select"in e}function sr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XS(e)&&t&&e.select()}}var hp=QS();function QS(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=gp(e,t),e.unshift(t)},remove(t){var n;e=gp(e,t),(n=e[0])==null||n.resume()}}}function gp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ek(e){return e.filter(t=>t.tagName!=="A")}const tk=["top","right","bottom","left"],pr=Math.min,Ft=Math.max,kl=Math.round,Ms=Math.floor,kn=e=>({x:e,y:e}),nk={left:"right",right:"left",bottom:"top",top:"bottom"},rk={start:"end",end:"start"};function Tc(e,t,n){return Ft(e,pr(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function qi(e){return e.split("-")[1]}function ef(e){return e==="x"?"y":"x"}function tf(e){return e==="y"?"height":"width"}const ik=new Set(["top","bottom"]);function Cn(e){return ik.has(qn(e))?"y":"x"}function nf(e){return ef(Cn(e))}function ok(e,t,n){n===void 0&&(n=!1);const r=qi(e),i=nf(e),o=tf(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Tl(s)),[s,Tl(s)]}function sk(e){const t=Tl(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>rk[t])}const pp=["left","right"],mp=["right","left"],lk=["top","bottom"],ak=["bottom","top"];function uk(e,t,n){switch(e){case"top":case"bottom":return n?t?mp:pp:t?pp:mp;case"left":case"right":return t?lk:ak;default:return[]}}function ck(e,t,n,r){const i=qi(e);let o=uk(qn(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Ic)))),o}function Tl(e){return e.replace(/left|right|bottom|top/g,t=>nk[t])}function dk(e){return{top:0,right:0,bottom:0,left:0,...e}}function ix(e){return typeof e!="number"?dk(e):{top:e,right:e,bottom:e,left:e}}function Il(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function xp(e,t,n){let{reference:r,floating:i}=e;const o=Cn(t),s=nf(t),l=tf(s),a=qn(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let h;switch(a){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(qi(t)){case"start":h[s]-=f*(n&&u?-1:1);break;case"end":h[s]+=f*(n&&u?-1:1);break}return h}const fk=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=xp(u,r,a),f=r,h={},g=0;for(let m=0;m<l.length;m++){const{name:v,fn:y}=l[m],{x:p,y:x,data:b,reset:w}=await y({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=p??c,d=x??d,h={...h,[v]:{...h[v],...b}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:c,y:d}=xp(u,f,a)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Bo(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Gn(t,e),g=ix(h),v=l[f?d==="floating"?"reference":"floating":d],y=Il(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:a})),p=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),b=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},w=Il(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:p,offsetParent:x,strategy:a}):p);return{top:(y.top-w.top+g.top)/b.y,bottom:(w.bottom-y.bottom+g.bottom)/b.y,left:(y.left-w.left+g.left)/b.x,right:(w.right-y.right+g.right)/b.x}}const hk=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:c=0}=Gn(e,t)||{};if(u==null)return{};const d=ix(c),f={x:n,y:r},h=nf(i),g=tf(h),m=await s.getDimensions(u),v=h==="y",y=v?"top":"left",p=v?"bottom":"right",x=v?"clientHeight":"clientWidth",b=o.reference[g]+o.reference[h]-f[h]-o.floating[g],w=f[h]-o.reference[h],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let C=_?_[x]:0;(!C||!await(s.isElement==null?void 0:s.isElement(_)))&&(C=l.floating[x]||o.floating[g]);const S=b/2-w/2,I=C/2-m[g]/2-1,P=pr(d[y],I),R=pr(d[p],I),O=P,M=C-m[g]-R,V=C/2-m[g]/2+S,z=Tc(O,V,M),W=!a.arrow&&qi(i)!=null&&V!==z&&o.reference[g]/2-(V<O?P:R)-m[g]/2<0,U=W?V<O?V-O:V-M:0;return{[h]:f[h]+U,data:{[h]:z,centerOffset:V-z-U,...W&&{alignmentOffset:U}},reset:W}}}),gk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Gn(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=qn(i),p=Cn(l),x=qn(l)===l,b=await(a.isRTL==null?void 0:a.isRTL(u.floating)),w=f||(x||!m?[Tl(l)]:sk(l)),_=g!=="none";!f&&_&&w.push(...ck(l,m,g,b));const C=[l,...w],S=await Bo(t,v),I=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&I.push(S[y]),d){const V=ok(i,s,b);I.push(S[V[0]],S[V[1]])}if(P=[...P,{placement:i,overflows:I}],!I.every(V=>V<=0)){var R,O;const V=(((R=o.flip)==null?void 0:R.index)||0)+1,z=C[V];if(z&&(!(d==="alignment"?p!==Cn(z):!1)||P.every(G=>G.overflows[0]>0&&Cn(G.placement)===p)))return{data:{index:V,overflows:P},reset:{placement:z}};let W=(O=P.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:O.placement;if(!W)switch(h){case"bestFit":{var M;const U=(M=P.filter(G=>{if(_){const te=Cn(G.placement);return te===p||te==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(te=>te>0).reduce((te,A)=>te+A,0)]).sort((G,te)=>G[1]-te[1])[0])==null?void 0:M[0];U&&(W=U);break}case"initialPlacement":W=l;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vp(e){return tk.some(t=>e[t]>=0)}const pk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Gn(e,t);switch(r){case"referenceHidden":{const o=await Bo(t,{...i,elementContext:"reference"}),s=yp(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:vp(s)}}}case"escaped":{const o=await Bo(t,{...i,altBoundary:!0}),s=yp(o,n.floating);return{data:{escapedOffsets:s,escaped:vp(s)}}}default:return{}}}}},ox=new Set(["left","top"]);async function mk(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=qn(n),l=qi(n),a=Cn(n)==="y",u=ox.has(s)?-1:1,c=o&&a?-1:1,d=Gn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),a?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const xk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:l}=t,a=await mk(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}},yk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:y,y:p}=v;return{x:y,y:p}}},...a}=Gn(e,t),u={x:n,y:r},c=await Bo(t,a),d=Cn(qn(i)),f=ef(d);let h=u[f],g=u[d];if(o){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",p=h+c[v],x=h-c[y];h=Tc(p,h,x)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",p=g+c[v],x=g-c[y];g=Tc(p,g,x)}const m=l.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:o,[d]:s}}}}}},vk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:u=!0}=Gn(e,t),c={x:n,y:r},d=Cn(i),f=ef(d);let h=c[f],g=c[d];const m=Gn(l,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const x=f==="y"?"height":"width",b=o.reference[f]-o.floating[x]+v.mainAxis,w=o.reference[f]+o.reference[x]-v.mainAxis;h<b?h=b:h>w&&(h=w)}if(u){var y,p;const x=f==="y"?"width":"height",b=ox.has(qn(i)),w=o.reference[d]-o.floating[x]+(b&&((y=s.offset)==null?void 0:y[d])||0)+(b?0:v.crossAxis),_=o.reference[d]+o.reference[x]+(b?0:((p=s.offset)==null?void 0:p[d])||0)-(b?v.crossAxis:0);g<w?g=w:g>_&&(g=_)}return{[f]:h,[d]:g}}}},bk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:l}=t,{apply:a=()=>{},...u}=Gn(e,t),c=await Bo(t,u),d=qn(i),f=qi(i),h=Cn(i)==="y",{width:g,height:m}=o.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,v=f==="end"?"top":"bottom");const p=m-c.top-c.bottom,x=g-c.left-c.right,b=pr(m-c[v],p),w=pr(g-c[y],x),_=!t.middlewareData.shift;let C=b,S=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=p),_&&!f){const P=Ft(c.left,0),R=Ft(c.right,0),O=Ft(c.top,0),M=Ft(c.bottom,0);h?S=g-2*(P!==0||R!==0?P+R:Ft(c.left,c.right)):C=m-2*(O!==0||M!==0?O+M:Ft(c.top,c.bottom))}await a({...t,availableWidth:S,availableHeight:C});const I=await s.getDimensions(l.floating);return g!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function va(){return typeof window<"u"}function Yi(e){return sx(e)?(e.nodeName||"").toLowerCase():"#document"}function Ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(sx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sx(e){return va()?e instanceof Node||e instanceof Ot(e).Node:!1}function ln(e){return va()?e instanceof Element||e instanceof Ot(e).Element:!1}function Nn(e){return va()?e instanceof HTMLElement||e instanceof Ot(e).HTMLElement:!1}function bp(e){return!va()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ot(e).ShadowRoot}const _k=new Set(["inline","contents"]);function as(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=an(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_k.has(i)}const Ck=new Set(["table","td","th"]);function wk(e){return Ck.has(Yi(e))}const Ek=[":popover-open",":modal"];function ba(e){return Ek.some(t=>{try{return e.matches(t)}catch{return!1}})}const Sk=["transform","translate","scale","rotate","perspective"],kk=["transform","translate","scale","rotate","perspective","filter"],Tk=["paint","layout","strict","content"];function rf(e){const t=of(),n=ln(e)?an(e):e;return Sk.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kk.some(r=>(n.willChange||"").includes(r))||Tk.some(r=>(n.contain||"").includes(r))}function Ik(e){let t=mr(e);for(;Nn(t)&&!Di(t);){if(rf(t))return t;if(ba(t))return null;t=mr(t)}return null}function of(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ak=new Set(["html","body","#document"]);function Di(e){return Ak.has(Yi(e))}function an(e){return Ot(e).getComputedStyle(e)}function _a(e){return ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mr(e){if(Yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bp(e)&&e.host||Pn(e);return bp(t)?t.host:t}function lx(e){const t=mr(e);return Di(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nn(t)&&as(t)?t:lx(t)}function zo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lx(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Ot(i);if(o){const l=Ac(s);return t.concat(s,s.visualViewport||[],as(i)?i:[],l&&n?zo(l):[])}return t.concat(i,zo(i,[],n))}function Ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ax(e){const t=an(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Nn(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,l=kl(n)!==o||kl(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function sf(e){return ln(e)?e:e.contextElement}function Si(e){const t=sf(e);if(!Nn(t))return kn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ax(t);let s=(o?kl(n.width):n.width)/r,l=(o?kl(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Nk=kn(0);function ux(e){const t=Ot(e);return!of()||!t.visualViewport?Nk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ot(e)?!1:t}function ei(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=sf(e);let s=kn(1);t&&(r?ln(r)&&(s=Si(r)):s=Si(e));const l=Lk(o,n,r)?ux(o):kn(0);let a=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const f=Ot(o),h=r&&ln(r)?Ot(r):r;let g=f,m=Ac(g);for(;m&&r&&h!==g;){const v=Si(m),y=m.getBoundingClientRect(),p=an(m),x=y.left+(m.clientLeft+parseFloat(p.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(p.paddingTop))*v.y;a*=v.x,u*=v.y,c*=v.x,d*=v.y,a+=x,u+=b,g=Ot(m),m=Ac(g)}}return Il({width:c,height:d,x:a,y:u})}function lf(e,t){const n=_a(e).scrollLeft;return t?t.left+n:ei(Pn(e)).left+n}function cx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:lf(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function Fk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Pn(r),l=t?ba(t.floating):!1;if(r===s||l&&o)return n;let a={scrollLeft:0,scrollTop:0},u=kn(1);const c=kn(0),d=Nn(r);if((d||!d&&!o)&&((Yi(r)!=="body"||as(s))&&(a=_a(r)),Nn(r))){const h=ei(r);u=Si(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=s&&!d&&!o?cx(s,a,!0):kn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}}function Pk(e){return Array.from(e.getClientRects())}function Rk(e){const t=Pn(e),n=_a(e),r=e.ownerDocument.body,i=Ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+lf(e);const l=-n.scrollTop;return an(r).direction==="rtl"&&(s+=Ft(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function Ok(e,t){const n=Ot(e),r=Pn(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;const u=of();(!u||u&&t==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}const Mk=new Set(["absolute","fixed"]);function Dk(e,t){const n=ei(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Nn(e)?Si(e):kn(1),s=e.clientWidth*o.x,l=e.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:s,height:l,x:a,y:u}}function _p(e,t,n){let r;if(t==="viewport")r=Ok(e,n);else if(t==="document")r=Rk(Pn(e));else if(ln(t))r=Dk(t,n);else{const i=ux(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Il(r)}function dx(e,t){const n=mr(e);return n===t||!ln(n)||Di(n)?!1:an(n).position==="fixed"||dx(n,t)}function $k(e,t){const n=t.get(e);if(n)return n;let r=zo(e,[],!1).filter(l=>ln(l)&&Yi(l)!=="body"),i=null;const o=an(e).position==="fixed";let s=o?mr(e):e;for(;ln(s)&&!Di(s);){const l=an(s),a=rf(s);!a&&l.position==="fixed"&&(i=null),(o?!a&&!i:!a&&l.position==="static"&&!!i&&Mk.has(i.position)||as(s)&&!a&&dx(e,s))?r=r.filter(c=>c!==s):i=l,s=mr(s)}return t.set(e,r),r}function Vk(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?ba(t)?[]:$k(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,c)=>{const d=_p(t,c,i);return u.top=Ft(d.top,u.top),u.right=pr(d.right,u.right),u.bottom=pr(d.bottom,u.bottom),u.left=Ft(d.left,u.left),u},_p(t,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Hk(e){const{width:t,height:n}=ax(e);return{width:t,height:n}}function Bk(e,t,n){const r=Nn(t),i=Pn(t),o=n==="fixed",s=ei(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const a=kn(0);function u(){a.x=lf(i)}if(r||!r&&!o)if((Yi(t)!=="body"||as(i))&&(l=_a(t)),r){const h=ei(t,!0,o,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=i&&!r&&!o?cx(i,l):kn(0),d=s.left+l.scrollLeft-a.x-c.x,f=s.top+l.scrollTop-a.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function gu(e){return an(e).position==="static"}function Cp(e,t){if(!Nn(e)||an(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pn(e)===n&&(n=n.ownerDocument.body),n}function fx(e,t){const n=Ot(e);if(ba(e))return n;if(!Nn(e)){let i=mr(e);for(;i&&!Di(i);){if(ln(i)&&!gu(i))return i;i=mr(i)}return n}let r=Cp(e,t);for(;r&&wk(r)&&gu(r);)r=Cp(r,t);return r&&Di(r)&&gu(r)&&!rf(r)?n:r||Ik(e)||n}const zk=async function(e){const t=this.getOffsetParent||fx,n=this.getDimensions,r=await n(e.floating);return{reference:Bk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jk(e){return an(e).direction==="rtl"}const Uk={convertOffsetParentRelativeRectToViewportRelativeRect:Fk,getDocumentElement:Pn,getClippingRect:Vk,getOffsetParent:fx,getElementRects:zk,getClientRects:Pk,getDimensions:Hk,getScale:Si,isElement:ln,isRTL:jk};function hx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wk(e,t){let n=null,r;const i=Pn(e);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(l||t(),!f||!h)return;const g=Ms(d),m=Ms(i.clientWidth-(c+f)),v=Ms(i.clientHeight-(d+h)),y=Ms(c),x={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ft(0,pr(1,a))||1};let b=!0;function w(_){const C=_[0].intersectionRatio;if(C!==a){if(!b)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!hx(u,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(w,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return s(!0),o}function Jk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=sf(e),c=i||o?[...u?zo(u):[],...zo(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=u&&l?Wk(u,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(y=>{let[p]=y;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!a&&h.observe(u),h.observe(t));let g,m=a?ei(e):null;a&&v();function v(){const y=ei(e);m&&!hx(m,y)&&n(),m=y,g=requestAnimationFrame(v)}return n(),()=>{var y;c.forEach(p=>{i&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,a&&cancelAnimationFrame(g)}}const Kk=xk,Zk=yk,Gk=gk,qk=bk,Yk=pk,wp=hk,Xk=vk,Qk=(e,t,n)=>{const r=new Map,i={platform:Uk,...n},o={...i.platform,_c:r};return fk(e,t,{...i,platform:o})};var e6=typeof document<"u",t6=function(){},Xs=e6?E.useLayoutEffect:t6;function Al(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Al(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Al(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function gx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ep(e,t){const n=gx(e);return Math.round(t*n)/n}function pu(e){const t=E.useRef(e);return Xs(()=>{t.current=e}),t}function n6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[c,d]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=E.useState(r);Al(f,r)||h(r);const[g,m]=E.useState(null),[v,y]=E.useState(null),p=E.useCallback(G=>{G!==_.current&&(_.current=G,m(G))},[]),x=E.useCallback(G=>{G!==C.current&&(C.current=G,y(G))},[]),b=o||g,w=s||v,_=E.useRef(null),C=E.useRef(null),S=E.useRef(c),I=a!=null,P=pu(a),R=pu(i),O=pu(u),M=E.useCallback(()=>{if(!_.current||!C.current)return;const G={placement:t,strategy:n,middleware:f};R.current&&(G.platform=R.current),Qk(_.current,C.current,G).then(te=>{const A={...te,isPositioned:O.current!==!1};V.current&&!Al(S.current,A)&&(S.current=A,ki.flushSync(()=>{d(A)}))})},[f,t,n,R,O]);Xs(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(G=>({...G,isPositioned:!1})))},[u]);const V=E.useRef(!1);Xs(()=>(V.current=!0,()=>{V.current=!1}),[]),Xs(()=>{if(b&&(_.current=b),w&&(C.current=w),b&&w){if(P.current)return P.current(b,w,M);M()}},[b,w,M,P,I]);const z=E.useMemo(()=>({reference:_,floating:C,setReference:p,setFloating:x}),[p,x]),W=E.useMemo(()=>({reference:b,floating:w}),[b,w]),U=E.useMemo(()=>{const G={position:n,left:0,top:0};if(!W.floating)return G;const te=Ep(W.floating,c.x),A=Ep(W.floating,c.y);return l?{...G,transform:"translate("+te+"px, "+A+"px)",...gx(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:A}},[n,l,W.floating,c.x,c.y]);return E.useMemo(()=>({...c,update:M,refs:z,elements:W,floatingStyles:U}),[c,M,z,W,U])}const r6=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?wp({element:r.current,padding:i}).fn(n):{}:r?wp({element:r,padding:i}).fn(n):{}}}},i6=(e,t)=>({...Kk(e),options:[e,t]}),o6=(e,t)=>({...Zk(e),options:[e,t]}),s6=(e,t)=>({...Xk(e),options:[e,t]}),l6=(e,t)=>({...Gk(e),options:[e,t]}),a6=(e,t)=>({...qk(e),options:[e,t]}),u6=(e,t)=>({...Yk(e),options:[e,t]}),c6=(e,t)=>({...r6(e),options:[e,t]});var d6="Arrow",px=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return N.jsx(Ce.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:N.jsx("polygon",{points:"0,0 30,0 15,10"})})});px.displayName=d6;var f6=px,af="Popper",[mx,Xi]=Xn(af),[h6,xx]=mx(af),yx=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return N.jsx(h6,{scope:t,anchor:r,onAnchorChange:i,children:n})};yx.displayName=af;var vx="PopperAnchor",bx=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=xx(vx,n),s=E.useRef(null),l=$e(t,s);return E.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:N.jsx(Ce.div,{...i,ref:l})});bx.displayName=vx;var uf="PopperContent",[g6,p6]=mx(uf),_x=E.forwardRef((e,t)=>{var K,X,ie,oe,ce,pe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,v=xx(uf,n),[y,p]=E.useState(null),x=$e(t,Te=>p(Te)),[b,w]=E.useState(null),_=X2(b),C=(_==null?void 0:_.width)??0,S=(_==null?void 0:_.height)??0,I=r+(o!=="center"?"-"+o:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},R=Array.isArray(u)?u:[u],O=R.length>0,M={padding:P,boundary:R.filter(x6),altBoundary:O},{refs:V,floatingStyles:z,placement:W,isPositioned:U,middlewareData:G}=n6({strategy:"fixed",placement:I,whileElementsMounted:(...Te)=>Jk(...Te,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[i6({mainAxis:i+S,alignmentAxis:s}),a&&o6({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?s6():void 0,...M}),a&&l6({...M}),a6({...M,apply:({elements:Te,rects:Oe,availableWidth:ze,availableHeight:Ze})=>{const{width:qe,height:jt}=Oe.reference,Ye=Te.floating.style;Ye.setProperty("--radix-popper-available-width",`${ze}px`),Ye.setProperty("--radix-popper-available-height",`${Ze}px`),Ye.setProperty("--radix-popper-anchor-width",`${qe}px`),Ye.setProperty("--radix-popper-anchor-height",`${jt}px`)}}),b&&c6({element:b,padding:l}),y6({arrowWidth:C,arrowHeight:S}),f&&u6({strategy:"referenceHidden",...M})]}),[te,A]=Ex(W),fe=jr(g);Tt(()=>{U&&(fe==null||fe())},[U,fe]);const me=(K=G.arrow)==null?void 0:K.x,L=(X=G.arrow)==null?void 0:X.y,ye=((ie=G.arrow)==null?void 0:ie.centerOffset)!==0,[_e,ge]=E.useState();return Tt(()=>{y&&ge(window.getComputedStyle(y).zIndex)},[y]),N.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:U?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(oe=G.transformOrigin)==null?void 0:oe.x,(ce=G.transformOrigin)==null?void 0:ce.y].join(" "),...((pe=G.hide)==null?void 0:pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:N.jsx(g6,{scope:n,placedSide:te,onArrowChange:w,arrowX:me,arrowY:L,shouldHideArrow:ye,children:N.jsx(Ce.div,{"data-side":te,"data-align":A,...m,ref:x,style:{...m.style,animation:U?void 0:"none"}})})})});_x.displayName=uf;var Cx="PopperArrow",m6={top:"bottom",right:"left",bottom:"top",left:"right"},wx=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=p6(Cx,r),s=m6[o.placedSide];return N.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:N.jsx(f6,{...i,ref:n,style:{...i.style,display:"block"}})})});wx.displayName=Cx;function x6(e){return e!==null}var y6=e=>({name:"transformOrigin",options:e,fn(t){var v,y,p;const{placement:n,rects:r,middlewareData:i}=t,s=((v=i.arrow)==null?void 0:v.centerOffset)!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[u,c]=Ex(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,h=(((p=i.arrow)==null?void 0:p.y)??0)+a/2;let g="",m="";return u==="bottom"?(g=s?d:`${f}px`,m=`${-a}px`):u==="top"?(g=s?d:`${f}px`,m=`${r.floating.height+a}px`):u==="right"?(g=`${-a}px`,m=s?d:`${h}px`):u==="left"&&(g=`${r.floating.width+a}px`,m=s?d:`${h}px`),{data:{x:g,y:m}}}});function Ex(e){const[t,n="center"]=e.split("-");return[t,n]}var cf=yx,Ca=bx,df=_x,ff=wx,v6="Portal",us=E.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,o]=E.useState(!1);Tt(()=>o(!0),[]);const s=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Y2.createPortal(N.jsx(Ce.div,{...r,ref:t}),s):null});us.displayName=v6;function b6(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var kr=e=>{const{present:t,children:n}=e,r=_6(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=$e(r.ref,C6(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};kr.displayName="Presence";function _6(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),o=E.useRef("none"),s=e?"mounted":"unmounted",[l,a]=b6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=Ds(r.current);o.current=l==="mounted"?u:"none"},[l]),Tt(()=>{const u=r.current,c=i.current;if(c!==e){const f=o.current,h=Ds(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,a]),Tt(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const m=Ds(r.current).includes(h.animationName);if(h.target===t&&m&&(a("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=h=>{h.target===t&&(o.current=Ds(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:E.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ds(e){return(e==null?void 0:e.animationName)||"none"}function C6(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var w6=H2[" useInsertionEffect ".trim().toString()]||Tt;function Yn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=E6({defaultProp:t,onChange:n}),l=e!==void 0,a=l?e:i;{const c=E.useRef(e!==void 0);E.useEffect(()=>{const d=c.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=l},[l,r])}const u=E.useCallback(c=>{var d;if(l){const f=S6(c)?c(e):c;f!==e&&((d=s.current)==null||d.call(s,f))}else o(c)},[l,e,o,s]);return[a,u]}function E6({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),o=E.useRef(t);return w6(()=>{o.current=t},[t]),E.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function S6(e){return typeof e=="function"}var wa="Popover",[Sx,cN]=Xn(wa,[Xi]),cs=Xi(),[k6,Tr]=Sx(wa),kx=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,l=cs(t),a=E.useRef(null),[u,c]=E.useState(!1),[d,f]=Yn({prop:r,defaultProp:i??!1,onChange:o,caller:wa});return N.jsx(cf,{...l,children:N.jsx(k6,{scope:t,contentId:Wn(),triggerRef:a,open:d,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:u,onCustomAnchorAdd:E.useCallback(()=>c(!0),[]),onCustomAnchorRemove:E.useCallback(()=>c(!1),[]),modal:s,children:n})})};kx.displayName=wa;var Tx="PopoverAnchor",Ix=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Tr(Tx,n),o=cs(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return E.useEffect(()=>(s(),()=>l()),[s,l]),N.jsx(Ca,{...o,...r,ref:t})});Ix.displayName=Tx;var Ax="PopoverTrigger",T6=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Tr(Ax,n),o=cs(n),s=$e(t,i.triggerRef),l=N.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ox(i.open),...r,ref:s,onClick:ve(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:N.jsx(Ca,{asChild:!0,...o,children:l})});T6.displayName=Ax;var hf="PopoverPortal",[I6,A6]=Sx(hf,{forceMount:void 0}),Nx=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Tr(hf,t);return N.jsx(I6,{scope:t,forceMount:n,children:N.jsx(kr,{present:n||o.open,children:N.jsx(us,{asChild:!0,container:i,children:r})})})};Nx.displayName=hf;var $i="PopoverContent",Lx=E.forwardRef((e,t)=>{const n=A6($i,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Tr($i,e.__scopePopover);return N.jsx(kr,{present:r||o.open,children:o.modal?N.jsx(L6,{...i,ref:t}):N.jsx(F6,{...i,ref:t})})});Lx.displayName=$i;var N6=Mi("PopoverContent.RemoveScroll"),L6=E.forwardRef((e,t)=>{const n=Tr($i,e.__scopePopover),r=E.useRef(null),i=$e(t,r),o=E.useRef(!1);return E.useEffect(()=>{const s=r.current;if(s)return qc(s)},[]),N.jsx(Yc,{as:N6,allowPinchZoom:!0,children:N.jsx(Fx,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),o.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ve(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,u=l.button===2||a;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:ve(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),F6=E.forwardRef((e,t)=>{const n=Tr($i,e.__scopePopover),r=E.useRef(!1),i=E.useRef(!1);return N.jsx(Fx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Fx=E.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Tr($i,n),h=cs(n);return Xc(),N.jsx(ya,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:N.jsx(ls,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:N.jsx(df,{"data-state":Ox(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Px="PopoverClose",P6=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Tr(Px,n);return N.jsx(Ce.button,{type:"button",...r,ref:t,onClick:ve(e.onClick,()=>i.onOpenChange(!1))})});P6.displayName=Px;var R6="PopoverArrow",Rx=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=cs(n);return N.jsx(ff,{...i,...r,ref:t})});Rx.displayName=R6;function Ox(e){return e?"open":"closed"}var O6=kx,M6=Ix,D6=Nx,$6=Lx,V6=Rx;function Mx(e){const t=e+"CollectionProvider",[n,r]=Xn(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,p=k.useRef(null),x=k.useRef(new Map).current;return N.jsx(i,{scope:v,itemMap:x,collectionRef:p,children:y})};s.displayName=t;const l=e+"CollectionSlot",a=Mi(l),u=k.forwardRef((m,v)=>{const{scope:y,children:p}=m,x=o(l,y),b=$e(v,x.collectionRef);return N.jsx(a,{ref:b,children:p})});u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Mi(c),h=k.forwardRef((m,v)=>{const{scope:y,children:p,...x}=m,b=k.useRef(null),w=$e(v,b),_=o(c,y);return k.useEffect(()=>(_.itemMap.set(b,{ref:b,...x}),()=>void _.itemMap.delete(b))),N.jsx(f,{[d]:"",ref:w,children:p})});h.displayName=c;function g(m){const v=o(e+"CollectionConsumer",m);return k.useCallback(()=>{const p=v.collectionRef.current;if(!p)return[];const x=Array.from(p.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((_,C)=>x.indexOf(_.ref.current)-x.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,r]}var H6=E.createContext(void 0);function Ea(e){const t=E.useContext(H6);return e||t||"ltr"}var mu="rovingFocusGroup.onEntryFocus",B6={bubbles:!1,cancelable:!0},ds="RovingFocusGroup",[Nc,Dx,z6]=Mx(ds),[j6,Sa]=Xn(ds,[z6]),[U6,W6]=j6(ds),$x=E.forwardRef((e,t)=>N.jsx(Nc.Provider,{scope:e.__scopeRovingFocusGroup,children:N.jsx(Nc.Slot,{scope:e.__scopeRovingFocusGroup,children:N.jsx(J6,{...e,ref:t})})}));$x.displayName=ds;var J6=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=E.useRef(null),h=$e(t,f),g=Ea(o),[m,v]=Yn({prop:s,defaultProp:l??null,onChange:a,caller:ds}),[y,p]=E.useState(!1),x=jr(u),b=Dx(n),w=E.useRef(!1),[_,C]=E.useState(0);return E.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(mu,x),()=>S.removeEventListener(mu,x)},[x]),N.jsx(U6,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:m,onItemFocus:E.useCallback(S=>v(S),[v]),onItemShiftTab:E.useCallback(()=>p(!0),[]),onFocusableItemAdd:E.useCallback(()=>C(S=>S+1),[]),onFocusableItemRemove:E.useCallback(()=>C(S=>S-1),[]),children:N.jsx(Ce.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:ve(e.onMouseDown,()=>{w.current=!0}),onFocus:ve(e.onFocus,S=>{const I=!w.current;if(S.target===S.currentTarget&&I&&!y){const P=new CustomEvent(mu,B6);if(S.currentTarget.dispatchEvent(P),!P.defaultPrevented){const R=b().filter(W=>W.focusable),O=R.find(W=>W.active),M=R.find(W=>W.id===m),z=[O,M,...R].filter(Boolean).map(W=>W.ref.current);Bx(z,c)}}w.current=!1}),onBlur:ve(e.onBlur,()=>p(!1))})})}),Vx="RovingFocusGroupItem",Hx=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...l}=e,a=Wn(),u=o||a,c=W6(Vx,n),d=c.currentTabStopId===u,f=Dx(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:m}=c;return E.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),N.jsx(Nc.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:N.jsx(Ce.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...l,ref:t,onMouseDown:ve(e.onMouseDown,v=>{r?c.onItemFocus(u):v.preventDefault()}),onFocus:ve(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:ve(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=G6(v,c.orientation,c.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=f().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const b=x.indexOf(v.currentTarget);x=c.loop?q6(x,b+1):x.slice(b+1)}setTimeout(()=>Bx(x))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});Hx.displayName=Vx;var K6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function G6(e,t,n){const r=Z6(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return K6[r]}function Bx(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function q6(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zx=$x,gf=Hx,Y6="Separator",Sp="horizontal",X6=["horizontal","vertical"],jx=E.forwardRef((e,t)=>{const{decorative:n,orientation:r=Sp,...i}=e,o=Q6(r)?r:Sp,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return N.jsx(Ce.div,{"data-orientation":o,...l,...i,ref:t})});jx.displayName=Y6;function Q6(e){return X6.includes(e)}var e8=jx,Ux="Toggle",Wx=E.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...o}=e,[s,l]=Yn({prop:n,onChange:i,defaultProp:r??!1,caller:Ux});return N.jsx(Ce.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:ve(e.onClick,()=>{e.disabled||l(!s)})})});Wx.displayName=Ux;var Ir="ToggleGroup",[Jx,Kx]=Xn(Ir,[Sa]),Zx=Sa(),pf=k.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return N.jsx(t8,{...i,ref:t})}if(n==="multiple"){const i=r;return N.jsx(n8,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Ir}\``)});pf.displayName=Ir;var[Gx,qx]=Jx(Ir),t8=k.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=Yn({prop:n,defaultProp:r??"",onChange:i,caller:Ir});return N.jsx(Gx,{scope:e.__scopeToggleGroup,type:"single",value:k.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:k.useCallback(()=>l(""),[l]),children:N.jsx(Yx,{...o,ref:t})})}),n8=k.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,l]=Yn({prop:n,defaultProp:r??[],onChange:i,caller:Ir}),a=k.useCallback(c=>l((d=[])=>[...d,c]),[l]),u=k.useCallback(c=>l((d=[])=>d.filter(f=>f!==c)),[l]);return N.jsx(Gx,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:a,onItemDeactivate:u,children:N.jsx(Yx,{...o,ref:t})})});pf.displayName=Ir;var[r8,i8]=Jx(Ir),Yx=k.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:l=!0,...a}=e,u=Zx(n),c=Ea(s),d={role:"group",dir:c,...a};return N.jsx(r8,{scope:n,rovingFocus:i,disabled:r,children:i?N.jsx(zx,{asChild:!0,...u,orientation:o,dir:c,loop:l,children:N.jsx(Ce.div,{...d,ref:t})}):N.jsx(Ce.div,{...d,ref:t})})}),Nl="ToggleGroupItem",Xx=k.forwardRef((e,t)=>{const n=qx(Nl,e.__scopeToggleGroup),r=i8(Nl,e.__scopeToggleGroup),i=Zx(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,l={...e,pressed:o,disabled:s},a=k.useRef(null);return r.rovingFocus?N.jsx(gf,{asChild:!0,...i,focusable:!s,active:o,ref:a,children:N.jsx(kp,{...l,ref:t})}):N.jsx(kp,{...l,ref:t})});Xx.displayName=Nl;var kp=k.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=qx(Nl,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?s:void 0;return N.jsx(Wx,{...l,...i,ref:t,onPressedChange:a=>{a?o.onItemActivate(r):o.onItemDeactivate(r)}})}),o8=pf,s8=Xx,mf="Toolbar",[l8,dN]=Xn(mf,[Sa,Kx]),xf=Sa(),Qx=Kx(),[a8,ey]=l8(mf),ty=E.forwardRef((e,t)=>{const{__scopeToolbar:n,orientation:r="horizontal",dir:i,loop:o=!0,...s}=e,l=xf(n),a=Ea(i);return N.jsx(a8,{scope:n,orientation:r,dir:a,children:N.jsx(zx,{asChild:!0,...l,orientation:r,dir:a,loop:o,children:N.jsx(Ce.div,{role:"toolbar","aria-orientation":r,dir:a,...s,ref:t})})})});ty.displayName=mf;var ny="ToolbarSeparator",ry=E.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=ey(ny,n);return N.jsx(e8,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:t})});ry.displayName=ny;var u8="ToolbarButton",yf=E.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=xf(n);return N.jsx(gf,{asChild:!0,...i,focusable:!e.disabled,children:N.jsx(Ce.button,{type:"button",...r,ref:t})})});yf.displayName=u8;var c8="ToolbarLink",d8=E.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=xf(n);return N.jsx(gf,{asChild:!0,...i,focusable:!0,children:N.jsx(Ce.a,{...r,ref:t,onKeyDown:ve(e.onKeyDown,o=>{o.key===" "&&o.currentTarget.click()})})})});d8.displayName=c8;var iy="ToolbarToggleGroup",oy=E.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=ey(iy,n),o=Qx(n);return N.jsx(o8,{"data-orientation":i.orientation,dir:i.dir,...o,...r,ref:t,rovingFocus:!1})});oy.displayName=iy;var f8="ToolbarToggleItem",sy=E.forwardRef((e,t)=>{const{__scopeToolbar:n,...r}=e,i=Qx(n),o={__scopeToolbar:e.__scopeToolbar};return N.jsx(yf,{asChild:!0,...o,children:N.jsx(s8,{...i,...r,ref:t})})});sy.displayName=f8;var h8=ty,g8=ry,ly=yf,ay=oy,p8=sy;const m8=new Set(["http:","https:","mailto:","sms:","tel:"]);let li=class uy extends dn{static getType(){return"link"}static clone(t){return new uy(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",n={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=n;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}createDOM(t){const n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),on(n,t.theme.link),n}updateDOM(t,n,r){if(a1(n)){const i=this.__url,o=this.__target,s=this.__rel,l=this.__title;i!==t.__url&&(n.href=i),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),s!==t.__rel&&(s?n.rel=s:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title"))}return!1}static importDOM(){return{a:t=>({conversion:x8,priority:1})}}static importJSON(t){return ti().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){try{const n=new URL(t);if(!m8.has(n.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const n=this.getWritable();return n.__url=t,n}getTarget(){return this.getLatest().__target}setTarget(t){const n=this.getWritable();return n.__target=t,n}getRel(){return this.getLatest().__rel}setRel(t){const n=this.getWritable();return n.__rel=t,n}getTitle(){return this.getLatest().__title}setTitle(t){const n=this.getWritable();return n.__title=t,n}insertNewAfter(t,n=!0){const r=ti(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,n),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n,r){if(!J(n))return!1;const i=n.anchor.getNode(),o=n.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&n.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function x8(e){let t=null;if(a1(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=ti(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function ti(e="",t){return It(new li(e,t))}function bn(e){return e instanceof li}let ka=class cy extends li{constructor(t="",n={},r){super(t,n,r),this.__isUnlinked=n.isUnlinked!==void 0&&n.isUnlinked!==null&&n.isUnlinked}static getType(){return"autolink"}static clone(t){return new cy(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const n=this.getWritable();return n.__isUnlinked=t,n}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,n,r){return super.updateDOM(t,n,r)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return Lc().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,n=!0){const r=this.getParentOrThrow().insertNewAfter(t,n);if(H(r)){const i=Lc(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function Lc(e="",t){return It(new ka(e,t))}function Mr(e){return e instanceof ka}const Vi=Qn();function Tp(e,t){if(e.type==="element"){const n=e.getNode();return H(n)||function(r,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const l of i)s.append("v",l);throw o.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${o.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 xu(e,t={}){const{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel,o=Q();if(!J(o))return;const s=o.extract();if(e===null)return void s.forEach(u=>{const c=vr(u,d=>!Mr(d)&&bn(d));if(c){const d=c.getChildren();for(let f=0;f<d.length;f++)c.insertBefore(d[f]);c.remove()}});const l=new Set,a=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(e),n!==void 0&&u.setTarget(n),i!==void 0&&u.setRel(i),r!==void 0&&u.setTitle(r))};if(s.length===1){const u=Ip(s[0],bn);if(u!==null)return a(u)}(function(u){const c=Q();if(!J(c))return u();const d=Jr(c),f=d.isBackward(),h=Tp(d.anchor,f?-1:0),g=Tp(d.focus,f?0:-1);if(u(),h||g){const m=Q();if(J(m)){const v=m.clone();if(h){const y=h.getParent();y&&v.anchor.set(y.getKey(),h.getIndexWithinParent()+(f?1:0),"element")}if(g){const y=g.getParent();y&&v.focus.set(y.getKey(),g.getIndexWithinParent()+(f?0:1),"element")}nt(Jr(v))}}})(()=>{let u=null;for(const c of s){if(!c.isAttached())continue;const d=Ip(c,bn);if(d){a(d);continue}if(H(c)){if(!c.isInline())continue;if(bn(c)){if(!(Mr(c)||u!==null&&u.getParentOrThrow().isParentOf(c))){a(c),u=c;continue}for(const h of c.getChildren())c.insertBefore(h);c.remove();continue}}const f=c.getPreviousSibling();bn(f)&&f.is(u)?f.append(c):(u=ti(e,{rel:i,target:n,title:r}),c.insertAfter(u),u.append(c))}})}function Ip(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const y8={testNode:"link",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ti(e.url,{title:e.title}))}},v8={testLexicalNode:bn,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("link",{url:e.getURL(),title:e.getTitle()})}};function b8({validateUrl:e,attributes:t}){const[n]=yt();return E.useEffect(()=>{if(!n.hasNodes([li]))throw new Error("LinkPlugin: LinkNode not registered on editor");return At(n.registerCommand(Vi,r=>{if(r===null)return xu(r),!0;if(typeof r=="string")return!(e!==void 0&&!e(r))&&(xu(r,t),!0);{const{url:i,target:o,rel:s,title:l}=r;return xu(i,{...t,rel:s,target:o,title:l}),!0}},De),e!==void 0?n.registerCommand(Jo,r=>{const i=Q();if(!J(i)||i.isCollapsed()||!ur(r,ClipboardEvent))return!1;const o=r;if(o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!e(s)&&!i.getNodes().some(l=>H(l))&&(n.dispatchCommand(Vi,{...t,url:s}),r.preventDefault(),!0)},De):()=>{})},[n,e,t]),null}function Ap(e,t=n=>n){return n=>{const r=e.exec(n);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:t(r[0])}}}function dy(e,t){for(let n=0;n<t.length;n++){const r=t[n](e);if(r)return r}return null}const _8=/[.,;\s]/;function Ll(e){return _8.test(e)}function fy(e){return Ll(e[e.length-1])}function Fc(e){return Ll(e[0])}function hy(e){let t=e.getPreviousSibling();return H(t)&&(t=t.getLastDescendant()),t===null||tn(t)||ee(t)&&fy(t.getTextContent())}function gy(e){let t=e.getNextSibling();return H(t)&&(t=t.getFirstDescendant()),t===null||tn(t)||ee(t)&&Fc(t.getTextContent())}function C8(e,t,n,r){return(e>0?Ll(n[e-1]):hy(r[0]))?t<n.length?Ll(n[t]):gy(r[r.length-1]):!1}function w8(e,t,n){const r=[],i=[],o=[];let s=0,l=0;const a=[...e];for(;a.length>0;){const u=a[0],c=u.getTextContent().length,d=l;l+c<=t?(r.push(u),s+=c):d>=n?o.push(u):i.push(u),l+=c,a.shift()}return[s,r,i,o]}function E8(e,t,n,r){const i=Lc(r.url,r.attributes);if(e.length===1){let o,s=e[0];t===0?[o,s]=s.splitText(n):[,o,s]=s.splitText(t,n);const l=He(r.text);return l.setFormat(o.getFormat()),l.setDetail(o.getDetail()),l.setStyle(o.getStyle()),i.append(l),o.replace(i),s}if(e.length>1){const o=e[0];let s,l=o.getTextContent().length;t===0?s=o:[,s]=o.splitText(t);const a=[];let u;for(let h=1;h<e.length;h++){const g=e[h],m=g.getTextContent().length,v=l;if(v<n)if(l+m<=n)a.push(g);else{const[y,p]=g.splitText(n-v);a.push(y),u=p}l+=m}const c=Q(),d=c?c.getNodes().find(ee):void 0,f=He(s.getTextContent());return f.setFormat(s.getFormat()),f.setDetail(s.getDetail()),f.setStyle(s.getStyle()),i.append(f,...a),d&&d===s&&(J(c)?f.select(c.anchor.offset,c.focus.offset):it(c)&&f.select(0,f.getTextContent().length)),s.replace(i),u}}function yu(e,t,n){const r=e.getChildren(),i=r.length;for(let a=0;a<i;a++){const u=r[a];if(!ee(u)||!u.isSimpleText())return Qs(e),void n(null,e.getURL())}const o=e.getTextContent(),s=dy(o,t);if(s===null||s.text!==o||!hy(e)||!gy(e))return Qs(e),void n(null,e.getURL());const l=e.getURL();if(l!==s.url&&(e.setURL(s.url),n(s.url,l)),s.attributes){const a=e.getRel();a!==s.attributes.rel&&(e.setRel(s.attributes.rel||null),n(s.attributes.rel||null,a));const u=e.getTarget();u!==s.attributes.target&&(e.setTarget(s.attributes.target||null),n(s.attributes.target||null,u))}}function Qs(e){const t=e.getChildren();for(let n=t.length-1;n>=0;n--)e.insertAfter(t[n]);return e.remove(),t.map(n=>n.getLatest())}function S8(e,t,n){E.useEffect(()=>{e.hasNodes([ka])||function(i,...o){const s=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",i);for(const a of o)l.append("v",a);throw s.search=l.toString(),Error(`Minified Lexical error #${i}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const r=(i,o)=>{n&&n(i,o)};return At(e.registerNodeTransform(Fn,i=>{const o=i.getParentOrThrow(),s=i.getPreviousSibling();if(Mr(o)&&!o.getIsUnlinked())yu(o,t,r);else if(!bn(o)){if(i.isSimpleText()&&(Fc(i.getTextContent())||!Mr(s))){const l=function(a){const u=[a];let c=a.getNextSibling();for(;c!==null&&ee(c)&&c.isSimpleText()&&(u.push(c),!/[\s]/.test(c.getTextContent()));)c=c.getNextSibling();return u}(i);(function(a,u,c){let d=[...a];const f=d.map(v=>v.getTextContent()).join("");let h,g=f,m=0;for(;(h=dy(g,u))&&h!==null;){const v=h.index,y=v+h.length;if(C8(m+v,m+y,f,d)){const[p,,x,b]=w8(d,m+v,m+y),w=E8(x,m+v-p,m+y-p,h);d=w?[w,...b]:b,c(h.url,null),m=0}else m+=y;g=g.substring(y)}})(l,t,r)}(function(l,a,u){const c=l.getPreviousSibling(),d=l.getNextSibling(),f=l.getTextContent();var h;!Mr(c)||c.getIsUnlinked()||Fc(f)&&(h=f,!(c.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(h):/^\.[a-zA-Z0-9]{1,}/.test(h)))||(c.append(l),yu(c,a,u),u(null,c.getURL())),!Mr(d)||d.getIsUnlinked()||fy(f)||(Qs(d),yu(d,a,u),u(null,d.getURL()))})(i,t,r)}}),e.registerCommand(Vi,i=>{const o=Q();return i!==null||!J(o)||o.extract().forEach(s=>{const l=s.getParent();if(Mr(l))return l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty(),!0}),!1},De))},[e,t,n])}function k8({matchers:e,onChange:t}){const[n]=yt();return S8(n,e,t),null}const T8=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,I8=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,A8=[Ap(T8,e=>e.startsWith("http")?e:`https://${e}`),Ap(I8,e=>`mailto:${e}`)],N8=()=>k.createElement(k8,{matchers:A8}),L8=ue(!1),F8=un({init(e,t){const n=!!(t!=null&&t.disableAutoLink),r=t!=null&&t.validateUrl?{validateUrl:t.validateUrl}:{};e.pubIn({[Zi]:"link",[Zn]:y8,[Cr]:[li,ka],[wr]:v8,[L8]:n,[si]:()=>k.createElement(k.Fragment,null,k.createElement(b8,{...r}),n?null:k.createElement(N8,null))})}});function P8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var R8=["color"],O8=E.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=P8(e,R8);return E.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),E.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});const Np=()=>k.createElement("div",{className:se.imagePlaceholder},k.createElement(O8,null));function Pc({nodeKey:e,imageSource:t,initialImagePath:n,title:r,alt:i}){const[o,s,l]=Ln(x5,Er,sn),[a]=yt(),u=Pt(p5),c=tr();return k.createElement("div",{className:se.editImageToolbar},k.createElement("button",{className:se.iconButton,type:"button",title:c("imageEditor.deleteImage","Delete image"),disabled:l,onClick:d=>{d.preventDefault(),a.update(()=>{var f;(f=je(e))==null||f.remove()})}},s("delete_small")),!o&&k.createElement("button",{type:"button",className:Le(se.iconButton,se.editImageButton),title:c("imageEditor.editImage","Edit image"),disabled:l,onClick:()=>{u({nodeKey:e,initialValues:{src:n||t,title:r,altText:i}})}},s("settings")))}var Ta="Dialog",[py,fN]=Xn(Ta),[M8,hn]=py(Ta),my=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,l=E.useRef(null),a=E.useRef(null),[u,c]=Yn({prop:r,defaultProp:i??!1,onChange:o,caller:Ta});return N.jsx(M8,{scope:t,triggerRef:l,contentRef:a,contentId:Wn(),titleId:Wn(),descriptionId:Wn(),open:u,onOpenChange:c,onOpenToggle:E.useCallback(()=>c(d=>!d),[c]),modal:s,children:n})};my.displayName=Ta;var xy="DialogTrigger",D8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hn(xy,n),o=$e(t,i.triggerRef);return N.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_f(i.open),...r,ref:o,onClick:ve(e.onClick,i.onOpenToggle)})});D8.displayName=xy;var vf="DialogPortal",[$8,yy]=py(vf,{forceMount:void 0}),vy=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=hn(vf,t);return N.jsx($8,{scope:t,forceMount:n,children:E.Children.map(r,s=>N.jsx(kr,{present:n||o.open,children:N.jsx(us,{asChild:!0,container:i,children:s})}))})};vy.displayName=vf;var Fl="DialogOverlay",by=E.forwardRef((e,t)=>{const n=yy(Fl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=hn(Fl,e.__scopeDialog);return o.modal?N.jsx(kr,{present:r||o.open,children:N.jsx(H8,{...i,ref:t})}):null});by.displayName=Fl;var V8=Mi("DialogOverlay.RemoveScroll"),H8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hn(Fl,n);return N.jsx(Yc,{as:V8,allowPinchZoom:!0,shards:[i.contentRef],children:N.jsx(Ce.div,{"data-state":_f(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ni="DialogContent",_y=E.forwardRef((e,t)=>{const n=yy(ni,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=hn(ni,e.__scopeDialog);return N.jsx(kr,{present:r||o.open,children:o.modal?N.jsx(B8,{...i,ref:t}):N.jsx(z8,{...i,ref:t})})});_y.displayName=ni;var B8=E.forwardRef((e,t)=>{const n=hn(ni,e.__scopeDialog),r=E.useRef(null),i=$e(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return qc(o)},[]),N.jsx(Cy,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ve(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&o.preventDefault()}),onFocusOutside:ve(e.onFocusOutside,o=>o.preventDefault())})}),z8=E.forwardRef((e,t)=>{const n=hn(ni,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return N.jsx(Cy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Cy=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,l=hn(ni,n),a=E.useRef(null),u=$e(t,a);return Xc(),N.jsxs(N.Fragment,{children:[N.jsx(ya,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:N.jsx(ls,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":_f(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),N.jsxs(N.Fragment,{children:[N.jsx(U8,{titleId:l.titleId}),N.jsx(J8,{contentRef:a,descriptionId:l.descriptionId})]})]})}),bf="DialogTitle",wy=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hn(bf,n);return N.jsx(Ce.h2,{id:i.titleId,...r,ref:t})});wy.displayName=bf;var Ey="DialogDescription",j8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hn(Ey,n);return N.jsx(Ce.p,{id:i.descriptionId,...r,ref:t})});j8.displayName=Ey;var Sy="DialogClose",ky=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=hn(Sy,n);return N.jsx(Ce.button,{type:"button",...r,ref:t,onClick:ve(e.onClick,()=>i.onOpenChange(!1))})});ky.displayName=Sy;function _f(e){return e?"open":"closed"}var Ty="DialogTitleWarning",[hN,Iy]=Q2(Ty,{contentName:ni,titleName:bf,docsSlug:"dialog"}),U8=({titleId:e})=>{const t=Iy(Ty),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
69
|
-
|
|
70
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
71
|
-
|
|
72
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},W8="DialogDescriptionWarning",J8=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Iy(W8).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},K8=my,Z8=vy,G8=by,q8=_y,Y8=wy,X8=ky,fs=e=>e.type==="checkbox",$r=e=>e instanceof Date,bt=e=>e==null;const Ay=e=>typeof e=="object";var et=e=>!bt(e)&&!Array.isArray(e)&&Ay(e)&&!$r(e),Ny=e=>et(e)&&e.target?fs(e.target)?e.target.checked:e.target.value:e,Q8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ly=(e,t)=>e.has(Q8(t)),e4=e=>{const t=e.constructor&&e.constructor.prototype;return et(t)&&t.hasOwnProperty("isPrototypeOf")},Cf=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function rt(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Cf&&(e instanceof Blob||r))&&(n||et(e)))if(t=n?[]:{},!n&&!e4(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=rt(e[i]));else return e;return t}var Ia=e=>/^\w*$/.test(e),Xe=e=>e===void 0,wf=e=>Array.isArray(e)?e.filter(Boolean):[],Ef=e=>wf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),le=(e,t,n)=>{if(!t||!et(e))return n;const r=(Ia(t)?[t]:Ef(t)).reduce((i,o)=>bt(i)?i:i[o],e);return Xe(r)||r===e?Xe(e[t])?n:e[t]:r},Lt=e=>typeof e=="boolean",Me=(e,t,n)=>{let r=-1;const i=Ia(t)?[t]:Ef(t),o=i.length,s=o-1;for(;++r<o;){const l=i[r];let a=n;if(r!==s){const u=e[l];a=et(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=a,e=e[l]}};const Pl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Yt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Dn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Fy=k.createContext(null);Fy.displayName="HookFormContext";const Sf=()=>k.useContext(Fy);var Py=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Yt.all&&(t._proxyFormState[s]=!r||Yt.all),n&&(n[s]=!0),e[s]}});return i};const kf=typeof window<"u"?E.useLayoutEffect:E.useEffect;function t4(e){const t=Sf(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,l]=k.useState(n._formState),a=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return kf(()=>n._subscribe({name:i,formState:a.current,exact:o,callback:u=>{!r&&l({...n._formState,...u})}}),[i,r,o]),k.useEffect(()=>{a.current.isValid&&n._setValid(!0)},[n]),k.useMemo(()=>Py(s,n,a.current,!1),[s,n])}var wn=e=>typeof e=="string",Ry=(e,t,n,r,i)=>wn(e)?(r&&t.watch.add(e),le(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),le(n,o))):(r&&(t.watchAll=!0),n);function n4(e){const t=Sf(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},l=k.useRef(i),[a,u]=k.useState(n._getWatch(r,l.current));return kf(()=>n._subscribe({name:r,formState:{values:!0},exact:s,callback:c=>!o&&u(Ry(r,n._names,c.values||n._formValues,!1,l.current))}),[r,n,o,s]),k.useEffect(()=>n._removeUnmounted()),a}function r4(e){const t=Sf(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,s=Ly(i._names.array,n),l=n4({control:i,name:n,defaultValue:le(i._formValues,n,le(i._defaultValues,n,e.defaultValue)),exact:!0}),a=t4({control:i,name:n,exact:!0}),u=k.useRef(e),c=k.useRef(i.register(n,{...e.rules,value:l,...Lt(e.disabled)?{disabled:e.disabled}:{}})),d=k.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(a.errors,n)},isDirty:{enumerable:!0,get:()=>!!le(a.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!le(a.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!le(a.validatingFields,n)},error:{enumerable:!0,get:()=>le(a.errors,n)}}),[a,n]),f=k.useCallback(v=>c.current.onChange({target:{value:Ny(v),name:n},type:Pl.CHANGE}),[n]),h=k.useCallback(()=>c.current.onBlur({target:{value:le(i._formValues,n),name:n},type:Pl.BLUR}),[n,i._formValues]),g=k.useCallback(v=>{const y=le(i._fields,n);y&&v&&(y._f.ref={focus:()=>v.focus&&v.focus(),select:()=>v.select&&v.select(),setCustomValidity:p=>v.setCustomValidity(p),reportValidity:()=>v.reportValidity()})},[i._fields,n]),m=k.useMemo(()=>({name:n,value:l,...Lt(r)||a.disabled?{disabled:a.disabled||r}:{},onChange:f,onBlur:h,ref:g}),[n,r,a.disabled,f,h,g,l]);return k.useEffect(()=>{const v=i._options.shouldUnregister||o;i.register(n,{...u.current.rules,...Lt(u.current.disabled)?{disabled:u.current.disabled}:{}});const y=(p,x)=>{const b=le(i._fields,p);b&&b._f&&(b._f.mount=x)};if(y(n,!0),v){const p=rt(le(i._options.defaultValues,n));Me(i._defaultValues,n,p),Xe(le(i._formValues,n))&&Me(i._formValues,n,p)}return!s&&i.register(n),()=>{(s?v&&!i._state.action:v)?i.unregister(n):y(n,!1)}},[n,i,s,o]),k.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),k.useMemo(()=>({field:m,formState:a,fieldState:d}),[m,a,d])}const i4=e=>e.render(r4(e));var o4=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},So=e=>Array.isArray(e)?e:[e],Lp=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},Rc=e=>bt(e)||!Ay(e);function lr(e,t,n=new WeakSet){if(Rc(e)||Rc(t))return e===t;if($r(e)&&$r(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const s=e[o];if(!i.includes(o))return!1;if(o!=="ref"){const l=t[o];if($r(s)&&$r(l)||et(s)&&et(l)||Array.isArray(s)&&Array.isArray(l)?!lr(s,l,n):s!==l)return!1}}return!0}var St=e=>et(e)&&!Object.keys(e).length,Tf=e=>e.type==="file",Xt=e=>typeof e=="function",Rl=e=>{if(!Cf)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Oy=e=>e.type==="select-multiple",If=e=>e.type==="radio",s4=e=>If(e)||fs(e),vu=e=>Rl(e)&&e.isConnected;function l4(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Xe(e)?r++:e[t[r++]];return e}function a4(e){for(const t in e)if(e.hasOwnProperty(t)&&!Xe(e[t]))return!1;return!0}function tt(e,t){const n=Array.isArray(t)?t:Ia(t)?[t]:Ef(t),r=n.length===1?e:l4(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(et(r)&&St(r)||Array.isArray(r)&&a4(r))&&tt(e,n.slice(0,-1)),e}var My=e=>{for(const t in e)if(Xt(e[t]))return!0;return!1};function Ol(e,t={}){const n=Array.isArray(e);if(et(e)||n)for(const r in e)Array.isArray(e[r])||et(e[r])&&!My(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Ol(e[r],t[r])):bt(e[r])||(t[r]=!0);return t}function Dy(e,t,n){const r=Array.isArray(e);if(et(e)||r)for(const i in e)Array.isArray(e[i])||et(e[i])&&!My(e[i])?Xe(t)||Rc(n[i])?n[i]=Array.isArray(e[i])?Ol(e[i],[]):{...Ol(e[i])}:Dy(e[i],bt(t)?{}:t[i],n[i]):n[i]=!lr(e[i],t[i]);return n}var so=(e,t)=>Dy(e,t,Ol(t));const Fp={value:!1,isValid:!1},Pp={value:!0,isValid:!0};var $y=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Xe(e[0].attributes.value)?Xe(e[0].value)||e[0].value===""?Pp:{value:e[0].value,isValid:!0}:Pp:Fp}return Fp},Vy=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Xe(e)?e:t?e===""?NaN:e&&+e:n&&wn(e)?new Date(e):r?r(e):e;const Rp={isValid:!1,value:null};var Hy=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Rp):Rp;function Op(e){const t=e.ref;return Tf(t)?t.files:If(t)?Hy(e.refs).value:Oy(t)?[...t.selectedOptions].map(({value:n})=>n):fs(t)?$y(e.refs).value:Vy(Xe(t.value)?e.ref.value:t.value,e)}var u4=(e,t,n,r)=>{const i={};for(const o of e){const s=le(t,o);s&&Me(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Ml=e=>e instanceof RegExp,lo=e=>Xe(e)?e:Ml(e)?e.source:et(e)?Ml(e.value)?e.value.source:e.value:e,Mp=e=>({isOnSubmit:!e||e===Yt.onSubmit,isOnBlur:e===Yt.onBlur,isOnChange:e===Yt.onChange,isOnAll:e===Yt.all,isOnTouch:e===Yt.onTouched});const Dp="AsyncFunction";var c4=e=>!!e&&!!e.validate&&!!(Xt(e.validate)&&e.validate.constructor.name===Dp||et(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Dp)),d4=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),$p=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ko=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=le(e,i);if(o){const{_f:s,...l}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(ko(l,t))break}else if(et(l)&&ko(l,t))break}}};function Vp(e,t,n){const r=le(e,n);if(r||Ia(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=le(t,o),l=le(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(l&&l.type)return{name:o,error:l};if(l&&l.root&&l.root.type)return{name:`${o}.root`,error:l.root};i.pop()}return{name:n}}var f4=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return St(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Yt.all))},h4=(e,t,n)=>!e||!t||e===t||So(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),g4=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,p4=(e,t)=>!wf(le(e,t)).length&&tt(e,t),m4=(e,t,n)=>{const r=So(le(e,n));return Me(r,"root",t[n]),Me(e,n,r),e},el=e=>wn(e);function Hp(e,t,n="validate"){if(el(e)||Array.isArray(e)&&e.every(el)||Lt(e)&&!e)return{type:n,message:el(e)?e:"",ref:t}}var fi=e=>et(e)&&!Ml(e)?e:{value:e,message:""},Bp=async(e,t,n,r,i,o)=>{const{ref:s,refs:l,required:a,maxLength:u,minLength:c,min:d,max:f,pattern:h,validate:g,name:m,valueAsNumber:v,mount:y}=e._f,p=le(n,m);if(!y||t.has(m))return{};const x=l?l[0]:s,b=O=>{i&&x.reportValidity&&(x.setCustomValidity(Lt(O)?"":O||""),x.reportValidity())},w={},_=If(s),C=fs(s),S=_||C,I=(v||Tf(s))&&Xe(s.value)&&Xe(p)||Rl(s)&&s.value===""||p===""||Array.isArray(p)&&!p.length,P=o4.bind(null,m,r,w),R=(O,M,V,z=Dn.maxLength,W=Dn.minLength)=>{const U=O?M:V;w[m]={type:O?z:W,message:U,ref:s,...P(O?z:W,U)}};if(o?!Array.isArray(p)||!p.length:a&&(!S&&(I||bt(p))||Lt(p)&&!p||C&&!$y(l).isValid||_&&!Hy(l).isValid)){const{value:O,message:M}=el(a)?{value:!!a,message:a}:fi(a);if(O&&(w[m]={type:Dn.required,message:M,ref:x,...P(Dn.required,M)},!r))return b(M),w}if(!I&&(!bt(d)||!bt(f))){let O,M;const V=fi(f),z=fi(d);if(!bt(p)&&!isNaN(p)){const W=s.valueAsNumber||p&&+p;bt(V.value)||(O=W>V.value),bt(z.value)||(M=W<z.value)}else{const W=s.valueAsDate||new Date(p),U=A=>new Date(new Date().toDateString()+" "+A),G=s.type=="time",te=s.type=="week";wn(V.value)&&p&&(O=G?U(p)>U(V.value):te?p>V.value:W>new Date(V.value)),wn(z.value)&&p&&(M=G?U(p)<U(z.value):te?p<z.value:W<new Date(z.value))}if((O||M)&&(R(!!O,V.message,z.message,Dn.max,Dn.min),!r))return b(w[m].message),w}if((u||c)&&!I&&(wn(p)||o&&Array.isArray(p))){const O=fi(u),M=fi(c),V=!bt(O.value)&&p.length>+O.value,z=!bt(M.value)&&p.length<+M.value;if((V||z)&&(R(V,O.message,M.message),!r))return b(w[m].message),w}if(h&&!I&&wn(p)){const{value:O,message:M}=fi(h);if(Ml(O)&&!p.match(O)&&(w[m]={type:Dn.pattern,message:M,ref:s,...P(Dn.pattern,M)},!r))return b(M),w}if(g){if(Xt(g)){const O=await g(p,n),M=Hp(O,x);if(M&&(w[m]={...M,...P(Dn.validate,M.message)},!r))return b(M.message),w}else if(et(g)){let O={};for(const M in g){if(!St(O)&&!r)break;const V=Hp(await g[M](p,n),x,M);V&&(O={...V,...P(M,V.message)},b(V.message),r&&(w[m]=O))}if(!St(O)&&(w[m]={ref:x,...O},!r))return w}}return b(!0),w};const x4={mode:Yt.onSubmit,reValidateMode:Yt.onChange,shouldFocusError:!0};function y4(e={}){let t={...x4,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Xt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=et(t.defaultValues)||et(t.values)?rt(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:rt(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},a,u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...c};const f={array:Lp(),state:Lp()},h=t.criteriaMode===Yt.all,g=F=>$=>{clearTimeout(u),u=setTimeout(F,$)},m=async F=>{if(!t.disabled&&(c.isValid||d.isValid||F)){const $=t.resolver?St((await C()).errors):await I(r,!0);$!==n.isValid&&f.state.next({isValid:$})}},v=(F,$)=>{!t.disabled&&(c.isValidating||c.validatingFields||d.isValidating||d.validatingFields)&&((F||Array.from(l.mount)).forEach(j=>{j&&($?Me(n.validatingFields,j,$):tt(n.validatingFields,j))}),f.state.next({validatingFields:n.validatingFields,isValidating:!St(n.validatingFields)}))},y=(F,$=[],j,re,Z=!0,Y=!0)=>{if(re&&j&&!t.disabled){if(s.action=!0,Y&&Array.isArray(le(r,F))){const D=j(le(r,F),re.argA,re.argB);Z&&Me(r,F,D)}if(Y&&Array.isArray(le(n.errors,F))){const D=j(le(n.errors,F),re.argA,re.argB);Z&&Me(n.errors,F,D),p4(n.errors,F)}if((c.touchedFields||d.touchedFields)&&Y&&Array.isArray(le(n.touchedFields,F))){const D=j(le(n.touchedFields,F),re.argA,re.argB);Z&&Me(n.touchedFields,F,D)}(c.dirtyFields||d.dirtyFields)&&(n.dirtyFields=so(i,o)),f.state.next({name:F,isDirty:R(F,$),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Me(o,F,$)},p=(F,$)=>{Me(n.errors,F,$),f.state.next({errors:n.errors})},x=F=>{n.errors=F,f.state.next({errors:n.errors,isValid:!1})},b=(F,$,j,re)=>{const Z=le(r,F);if(Z){const Y=le(o,F,Xe(j)?le(i,F):j);Xe(Y)||re&&re.defaultChecked||$?Me(o,F,$?Y:Op(Z._f)):V(F,Y),s.mount&&m()}},w=(F,$,j,re,Z)=>{let Y=!1,D=!1;const B={name:F};if(!t.disabled){if(!j||re){(c.isDirty||d.isDirty)&&(D=n.isDirty,n.isDirty=B.isDirty=R(),Y=D!==B.isDirty);const T=lr(le(i,F),$);D=!!le(n.dirtyFields,F),T?tt(n.dirtyFields,F):Me(n.dirtyFields,F,!0),B.dirtyFields=n.dirtyFields,Y=Y||(c.dirtyFields||d.dirtyFields)&&D!==!T}if(j){const T=le(n.touchedFields,F);T||(Me(n.touchedFields,F,j),B.touchedFields=n.touchedFields,Y=Y||(c.touchedFields||d.touchedFields)&&T!==j)}Y&&Z&&f.state.next(B)}return Y?B:{}},_=(F,$,j,re)=>{const Z=le(n.errors,F),Y=(c.isValid||d.isValid)&&Lt($)&&n.isValid!==$;if(t.delayError&&j?(a=g(()=>p(F,j)),a(t.delayError)):(clearTimeout(u),a=null,j?Me(n.errors,F,j):tt(n.errors,F)),(j?!lr(Z,j):Z)||!St(re)||Y){const D={...re,...Y&&Lt($)?{isValid:$}:{},errors:n.errors,name:F};n={...n,...D},f.state.next(D)}},C=async F=>{v(F,!0);const $=await t.resolver(o,t.context,u4(F||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(F),$},S=async F=>{const{errors:$}=await C(F);if(F)for(const j of F){const re=le($,j);re?Me(n.errors,j,re):tt(n.errors,j)}else n.errors=$;return $},I=async(F,$,j={valid:!0})=>{for(const re in F){const Z=F[re];if(Z){const{_f:Y,...D}=Z;if(Y){const B=l.array.has(Y.name),T=Z._f&&c4(Z._f);T&&c.validatingFields&&v([re],!0);const de=await Bp(Z,l.disabled,o,h,t.shouldUseNativeValidation&&!$,B);if(T&&c.validatingFields&&v([re]),de[Y.name]&&(j.valid=!1,$))break;!$&&(le(de,Y.name)?B?m4(n.errors,de,Y.name):Me(n.errors,Y.name,de[Y.name]):tt(n.errors,Y.name))}!St(D)&&await I(D,$,j)}}return j.valid},P=()=>{for(const F of l.unMount){const $=le(r,F);$&&($._f.refs?$._f.refs.every(j=>!vu(j)):!vu($._f.ref))&&K(F)}l.unMount=new Set},R=(F,$)=>!t.disabled&&(F&&$&&Me(o,F,$),!lr(A(),i)),O=(F,$,j)=>Ry(F,l,{...s.mount?o:Xe($)?i:wn(F)?{[F]:$}:$},j,$),M=F=>wf(le(s.mount?o:i,F,t.shouldUnregister?le(i,F,[]):[])),V=(F,$,j={})=>{const re=le(r,F);let Z=$;if(re){const Y=re._f;Y&&(!Y.disabled&&Me(o,F,Vy($,Y)),Z=Rl(Y.ref)&&bt($)?"":$,Oy(Y.ref)?[...Y.ref.options].forEach(D=>D.selected=Z.includes(D.value)):Y.refs?fs(Y.ref)?Y.refs.forEach(D=>{(!D.defaultChecked||!D.disabled)&&(Array.isArray(Z)?D.checked=!!Z.find(B=>B===D.value):D.checked=Z===D.value||!!Z)}):Y.refs.forEach(D=>D.checked=D.value===Z):Tf(Y.ref)?Y.ref.value="":(Y.ref.value=Z,Y.ref.type||f.state.next({name:F,values:rt(o)})))}(j.shouldDirty||j.shouldTouch)&&w(F,Z,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&te(F)},z=(F,$,j)=>{for(const re in $){if(!$.hasOwnProperty(re))return;const Z=$[re],Y=F+"."+re,D=le(r,Y);(l.array.has(F)||et(Z)||D&&!D._f)&&!$r(Z)?z(Y,Z,j):V(Y,Z,j)}},W=(F,$,j={})=>{const re=le(r,F),Z=l.array.has(F),Y=rt($);Me(o,F,Y),Z?(f.array.next({name:F,values:rt(o)}),(c.isDirty||c.dirtyFields||d.isDirty||d.dirtyFields)&&j.shouldDirty&&f.state.next({name:F,dirtyFields:so(i,o),isDirty:R(F,Y)})):re&&!re._f&&!bt(Y)?z(F,Y,j):V(F,Y,j),$p(F,l)&&f.state.next({...n}),f.state.next({name:s.mount?F:void 0,values:rt(o)})},U=async F=>{s.mount=!0;const $=F.target;let j=$.name,re=!0;const Z=le(r,j),Y=T=>{re=Number.isNaN(T)||$r(T)&&isNaN(T.getTime())||lr(T,le(o,j,T))},D=Mp(t.mode),B=Mp(t.reValidateMode);if(Z){let T,de;const be=$.type?Op(Z._f):Ny(F),Se=F.type===Pl.BLUR||F.type===Pl.FOCUS_OUT,Ut=!d4(Z._f)&&!t.resolver&&!le(n.errors,j)&&!Z._f.deps||g4(Se,le(n.touchedFields,j),n.isSubmitted,B,D),Nt=$p(j,l,Se);Me(o,j,be),Se?(Z._f.onBlur&&Z._f.onBlur(F),a&&a(0)):Z._f.onChange&&Z._f.onChange(F);const Rn=w(j,be,Se),Lr=!St(Rn)||Nt;if(!Se&&f.state.next({name:j,type:F.type,values:rt(o)}),Ut)return(c.isValid||d.isValid)&&(t.mode==="onBlur"?Se&&m():Se||m()),Lr&&f.state.next({name:j,...Nt?{}:Rn});if(!Se&&Nt&&f.state.next({...n}),t.resolver){const{errors:ht}=await C([j]);if(Y(be),re){const nr=Vp(n.errors,r,j),Mt=Vp(ht,r,nr.name||j);T=Mt.error,j=Mt.name,de=St(ht)}}else v([j],!0),T=(await Bp(Z,l.disabled,o,h,t.shouldUseNativeValidation))[j],v([j]),Y(be),re&&(T?de=!1:(c.isValid||d.isValid)&&(de=await I(r,!0)));re&&(Z._f.deps&&te(Z._f.deps),_(j,de,T,Rn))}},G=(F,$)=>{if(le(n.errors,$)&&F.focus)return F.focus(),1},te=async(F,$={})=>{let j,re;const Z=So(F);if(t.resolver){const Y=await S(Xe(F)?F:Z);j=St(Y),re=F?!Z.some(D=>le(Y,D)):j}else F?(re=(await Promise.all(Z.map(async Y=>{const D=le(r,Y);return await I(D&&D._f?{[Y]:D}:D)}))).every(Boolean),!(!re&&!n.isValid)&&m()):re=j=await I(r);return f.state.next({...!wn(F)||(c.isValid||d.isValid)&&j!==n.isValid?{}:{name:F},...t.resolver||!F?{isValid:j}:{},errors:n.errors}),$.shouldFocus&&!re&&ko(r,G,F?Z:l.mount),re},A=F=>{const $={...s.mount?o:i};return Xe(F)?$:wn(F)?le($,F):F.map(j=>le($,j))},fe=(F,$)=>({invalid:!!le(($||n).errors,F),isDirty:!!le(($||n).dirtyFields,F),error:le(($||n).errors,F),isValidating:!!le(n.validatingFields,F),isTouched:!!le(($||n).touchedFields,F)}),me=F=>{F&&So(F).forEach($=>tt(n.errors,$)),f.state.next({errors:F?n.errors:{}})},L=(F,$,j)=>{const re=(le(r,F,{_f:{}})._f||{}).ref,Z=le(n.errors,F)||{},{ref:Y,message:D,type:B,...T}=Z;Me(n.errors,F,{...T,...$,ref:re}),f.state.next({name:F,errors:n.errors,isValid:!1}),j&&j.shouldFocus&&re&&re.focus&&re.focus()},ye=(F,$)=>Xt(F)?f.state.subscribe({next:j=>F(O(void 0,$),j)}):O(F,$,!0),_e=F=>f.state.subscribe({next:$=>{h4(F.name,$.name,F.exact)&&f4($,F.formState||c,qe,F.reRenderRoot)&&F.callback({values:{...o},...n,...$})}}).unsubscribe,ge=F=>(s.mount=!0,d={...d,...F.formState},_e({...F,formState:d})),K=(F,$={})=>{for(const j of F?So(F):l.mount)l.mount.delete(j),l.array.delete(j),$.keepValue||(tt(r,j),tt(o,j)),!$.keepError&&tt(n.errors,j),!$.keepDirty&&tt(n.dirtyFields,j),!$.keepTouched&&tt(n.touchedFields,j),!$.keepIsValidating&&tt(n.validatingFields,j),!t.shouldUnregister&&!$.keepDefaultValue&&tt(i,j);f.state.next({values:rt(o)}),f.state.next({...n,...$.keepDirty?{isDirty:R()}:{}}),!$.keepIsValid&&m()},X=({disabled:F,name:$})=>{(Lt(F)&&s.mount||F||l.disabled.has($))&&(F?l.disabled.add($):l.disabled.delete($))},ie=(F,$={})=>{let j=le(r,F);const re=Lt($.disabled)||Lt(t.disabled);return Me(r,F,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:F}},name:F,mount:!0,...$}}),l.mount.add(F),j?X({disabled:Lt($.disabled)?$.disabled:t.disabled,name:F}):b(F,!0,$.value),{...re?{disabled:$.disabled||t.disabled}:{},...t.progressive?{required:!!$.required,min:lo($.min),max:lo($.max),minLength:lo($.minLength),maxLength:lo($.maxLength),pattern:lo($.pattern)}:{},name:F,onChange:U,onBlur:U,ref:Z=>{if(Z){ie(F,$),j=le(r,F);const Y=Xe(Z.value)&&Z.querySelectorAll&&Z.querySelectorAll("input,select,textarea")[0]||Z,D=s4(Y),B=j._f.refs||[];if(D?B.find(T=>T===Y):Y===j._f.ref)return;Me(r,F,{_f:{...j._f,...D?{refs:[...B.filter(vu),Y,...Array.isArray(le(i,F))?[{}]:[]],ref:{type:Y.type,name:F}}:{ref:Y}}}),b(F,!1,void 0,Y)}else j=le(r,F,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||$.shouldUnregister)&&!(Ly(l.array,F)&&s.action)&&l.unMount.add(F)}}},oe=()=>t.shouldFocusError&&ko(r,G,l.mount),ce=F=>{Lt(F)&&(f.state.next({disabled:F}),ko(r,($,j)=>{const re=le(r,j);re&&($.disabled=re._f.disabled||F,Array.isArray(re._f.refs)&&re._f.refs.forEach(Z=>{Z.disabled=re._f.disabled||F}))},0,!1))},pe=(F,$)=>async j=>{let re;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let Z=rt(o);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:D}=await C();n.errors=Y,Z=rt(D)}else await I(r);if(l.disabled.size)for(const Y of l.disabled)tt(Z,Y);if(tt(n.errors,"root"),St(n.errors)){f.state.next({errors:{}});try{await F(Z,j)}catch(Y){re=Y}}else $&&await $({...n.errors},j),oe(),setTimeout(oe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:St(n.errors)&&!re,submitCount:n.submitCount+1,errors:n.errors}),re)throw re},Te=(F,$={})=>{le(r,F)&&(Xe($.defaultValue)?W(F,rt(le(i,F))):(W(F,$.defaultValue),Me(i,F,rt($.defaultValue))),$.keepTouched||tt(n.touchedFields,F),$.keepDirty||(tt(n.dirtyFields,F),n.isDirty=$.defaultValue?R(F,rt(le(i,F))):R()),$.keepError||(tt(n.errors,F),c.isValid&&m()),f.state.next({...n}))},Oe=(F,$={})=>{const j=F?rt(F):i,re=rt(j),Z=St(F),Y=Z?i:re;if($.keepDefaultValues||(i=j),!$.keepValues){if($.keepDirtyValues){const D=new Set([...l.mount,...Object.keys(so(i,o))]);for(const B of Array.from(D))le(n.dirtyFields,B)?Me(Y,B,le(o,B)):W(B,le(Y,B))}else{if(Cf&&Xe(F))for(const D of l.mount){const B=le(r,D);if(B&&B._f){const T=Array.isArray(B._f.refs)?B._f.refs[0]:B._f.ref;if(Rl(T)){const de=T.closest("form");if(de){de.reset();break}}}}if($.keepFieldsRef)for(const D of l.mount)W(D,le(Y,D));else r={}}o=t.shouldUnregister?$.keepDefaultValues?rt(i):{}:rt(Y),f.array.next({values:{...Y}}),f.state.next({values:{...Y}})}l={mount:$.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!$.keepIsValid||!!$.keepDirtyValues,s.watch=!!t.shouldUnregister,f.state.next({submitCount:$.keepSubmitCount?n.submitCount:0,isDirty:Z?!1:$.keepDirty?n.isDirty:!!($.keepDefaultValues&&!lr(F,i)),isSubmitted:$.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Z?{}:$.keepDirtyValues?$.keepDefaultValues&&o?so(i,o):n.dirtyFields:$.keepDefaultValues&&F?so(i,F):$.keepDirty?n.dirtyFields:{},touchedFields:$.keepTouched?n.touchedFields:{},errors:$.keepErrors?n.errors:{},isSubmitSuccessful:$.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(F,$)=>Oe(Xt(F)?F(o):F,$),Ze=(F,$={})=>{const j=le(r,F),re=j&&j._f;if(re){const Z=re.refs?re.refs[0]:re.ref;Z.focus&&(Z.focus(),$.shouldSelect&&Xt(Z.select)&&Z.select())}},qe=F=>{n={...n,...F}},Ye={control:{register:ie,unregister:K,getFieldState:fe,handleSubmit:pe,setError:L,_subscribe:_e,_runSchema:C,_focusError:oe,_getWatch:O,_getDirty:R,_setValid:m,_setFieldArray:y,_setDisabledField:X,_setErrors:x,_getFieldArray:M,_reset:Oe,_resetDefaultValues:()=>Xt(t.defaultValues)&&t.defaultValues().then(F=>{ze(F,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:ce,_subjects:f,_proxyFormState:c,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(F){s=F},get _defaultValues(){return i},get _names(){return l},set _names(F){l=F},get _formState(){return n},get _options(){return t},set _options(F){t={...t,...F}}},subscribe:ge,trigger:te,register:ie,handleSubmit:pe,watch:ye,setValue:W,getValues:A,reset:ze,resetField:Te,clearErrors:me,unregister:K,setError:L,setFocus:Ze,getFieldState:fe};return{...Ye,formControl:Ye}}function By(e={}){const t=k.useRef(void 0),n=k.useRef(void 0),[r,i]=k.useState({isDirty:!1,isValidating:!1,isLoading:Xt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Xt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Xt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...l}=y4(e);t.current={...l,formState:r}}const o=t.current.control;return o._options=e,kf(()=>{const s=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),o._formState.isReady=!0,s},[o]),k.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),k.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),k.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),k.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),k.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),k.useEffect(()=>{e.values&&!lr(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[o,e.values]),k.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Py(r,o),t.current}function go(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(null,arguments)}var zy={exports:{}},v4="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",b4=v4,_4=b4;function jy(){}function Uy(){}Uy.resetWarningCache=jy;var C4=function(){function e(r,i,o,s,l,a){if(a!==_4){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Uy,resetWarningCache:jy};return n.PropTypes=n,n};zy.exports=C4();var w4=zy.exports;const ne=im(w4);var Ve={};/** @license React v17.0.2
|
|
73
|
-
* react-is.production.min.js
|
|
74
|
-
*
|
|
75
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the MIT license found in the
|
|
78
|
-
* LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/var Aa=60103,Na=60106,hs=60107,gs=60108,ps=60114,ms=60109,xs=60110,ys=60112,vs=60113,Af=60120,bs=60115,_s=60116,Wy=60121,Jy=60122,Ky=60117,Zy=60129,Gy=60131;if(typeof Symbol=="function"&&Symbol.for){var ct=Symbol.for;Aa=ct("react.element"),Na=ct("react.portal"),hs=ct("react.fragment"),gs=ct("react.strict_mode"),ps=ct("react.profiler"),ms=ct("react.provider"),xs=ct("react.context"),ys=ct("react.forward_ref"),vs=ct("react.suspense"),Af=ct("react.suspense_list"),bs=ct("react.memo"),_s=ct("react.lazy"),Wy=ct("react.block"),Jy=ct("react.server.block"),Ky=ct("react.fundamental"),Zy=ct("react.debug_trace_mode"),Gy=ct("react.legacy_hidden")}function gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Aa:switch(e=e.type,e){case hs:case ps:case gs:case vs:case Af:return e;default:switch(e=e&&e.$$typeof,e){case xs:case ys:case _s:case bs:case ms:return e;default:return t}}case Na:return t}}}var E4=ms,S4=Aa,k4=ys,T4=hs,I4=_s,A4=bs,N4=Na,L4=ps,F4=gs,P4=vs;Ve.ContextConsumer=xs;Ve.ContextProvider=E4;Ve.Element=S4;Ve.ForwardRef=k4;Ve.Fragment=T4;Ve.Lazy=I4;Ve.Memo=A4;Ve.Portal=N4;Ve.Profiler=L4;Ve.StrictMode=F4;Ve.Suspense=P4;Ve.isAsyncMode=function(){return!1};Ve.isConcurrentMode=function(){return!1};Ve.isContextConsumer=function(e){return gn(e)===xs};Ve.isContextProvider=function(e){return gn(e)===ms};Ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Aa};Ve.isForwardRef=function(e){return gn(e)===ys};Ve.isFragment=function(e){return gn(e)===hs};Ve.isLazy=function(e){return gn(e)===_s};Ve.isMemo=function(e){return gn(e)===bs};Ve.isPortal=function(e){return gn(e)===Na};Ve.isProfiler=function(e){return gn(e)===ps};Ve.isStrictMode=function(e){return gn(e)===gs};Ve.isSuspense=function(e){return gn(e)===vs};Ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===hs||e===ps||e===Zy||e===gs||e===vs||e===Af||e===Gy||typeof e=="object"&&e!==null&&(e.$$typeof===_s||e.$$typeof===bs||e.$$typeof===ms||e.$$typeof===xs||e.$$typeof===ys||e.$$typeof===Ky||e.$$typeof===Wy||e[0]===Jy)};Ve.typeOf=gn;let zp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,jp=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",bu=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return jp(n.overflowY,t)||jp(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},$s=(e,t,n,r,i,o,s,l)=>o<e&&s>t||o>e&&s<t?0:o<=e&&l<=n||s>=t&&l>=n?o-e-r:s>t&&l<n||o<e&&l>n?s-t+i:0,R4=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var O4=(e,t)=>{var n,r,i,o,s,l;if(typeof document>"u")return[];let{inline:a,boundary:u,skipOverflowHiddenElements:c}=t,d=typeof u=="function"?u:O=>O!==u;if(!zp(e))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,h=[],g=e;for(;zp(g)&&d(g);){if(g=R4(g),g===f){h.push(g);break}g!=null&&g===document.body&&bu(g)&&!bu(document.documentElement)||g!=null&&bu(g,c)&&h.push(g)}let m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,y=(s=window.scrollX)!=null?s:pageXOffset,p=(l=window.scrollY)!=null?l:pageYOffset,{height:x,width:b,top:w,right:_,bottom:C,left:S}=e.getBoundingClientRect(),I=w,P=a==="center"?S+b/2:a==="end"?_:S,R=[];for(let O=0;O<h.length;O++){let M=h[O],{height:V,width:z,top:W,right:U,bottom:G,left:te}=M.getBoundingClientRect();if(w>=0&&S>=0&&C<=v&&_<=m&&w>=W&&C<=G&&S>=te&&_<=U)return R;let A=getComputedStyle(M),fe=parseInt(A.borderLeftWidth,10),me=parseInt(A.borderTopWidth,10),L=parseInt(A.borderRightWidth,10),ye=parseInt(A.borderBottomWidth,10),_e=0,ge=0,K="offsetWidth"in M?M.offsetWidth-M.clientWidth-fe-L:0,X="offsetHeight"in M?M.offsetHeight-M.clientHeight-me-ye:0,ie="offsetWidth"in M?M.offsetWidth===0?0:z/M.offsetWidth:0,oe="offsetHeight"in M?M.offsetHeight===0?0:V/M.offsetHeight:0;if(f===M)_e=$s(p,p+v,v,me,ye,p+I,p+I+x,x),ge=a==="start"?P:a==="center"?P-m/2:a==="end"?P-m:$s(y,y+m,m,fe,L,y+P,y+P+b,b),_e=Math.max(0,_e+p),ge=Math.max(0,ge+y);else{_e=$s(W,G,V,me,ye+X,I,I+x,x),ge=a==="start"?P-te-fe:a==="center"?P-(te+z/2)+K/2:a==="end"?P-U+L+K:$s(te,U,z,fe,L+K,P,P+b,b);let{scrollLeft:ce,scrollTop:pe}=M;_e=Math.max(0,Math.min(pe+_e/oe,M.scrollHeight-V/oe+X)),ge=Math.max(0,Math.min(ce+ge/ie,M.scrollWidth-z/ie+K)),I+=pe-_e,P+=ce-ge}R.push({el:M,top:_e,left:ge})}return R},M4=0;function qy(){}function D4(e,t){if(e){var n=O4(e,{boundary:t});n.forEach(function(r){var i=r.el,o=r.top,s=r.left;i.scrollTop=o,i.scrollLeft=s})}}function Up(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function Yy(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];r(),n=setTimeout(function(){n=null,e.apply(void 0,s)},t)}return i.cancel=r,i}function $n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return t.some(function(l){return l&&l.apply(void 0,[r].concat(o)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Vs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function $4(){return String(M4++)}function V4(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Oc(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Xy(t,r)?t[r]:e[r],n},{})}function Xy(e,t){return e[t]!==void 0}function H4(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Hs(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;var o=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:o+1);var s=t+e;s<0?s=i?o:0:s>o&&(s=i?0:o);var l=jo(e,s,n,r,i);return l===-1?t>=n?-1:t:l}function jo(e,t,n,r,i){var o=r(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(var s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(var l=t-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return i?e>0?jo(1,0,n,r,!1):jo(-1,n-1,n,r,!1):-1}function Wp(e,t,n,r){return r===void 0&&(r=!0),t.some(function(i){return i&&(Up(i,e,n)||r&&Up(i,n.document.activeElement,n))})}var B4=Yy(function(e){Qy(e).textContent=""},500);function z4(e,t){var n=Qy(t);e&&(n.textContent=e,B4(t))}function Qy(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var j4=["isInitialMount","highlightedIndex","items","environment"],e5={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function U4(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(s){W4(s,e,t,n),n[s]!==t[s]&&(o[s]=n[s])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Be({type:i},o))}function W4(e,t,n,r){var i=t.props,o=t.type,s="on"+Nf(e)+"Change";i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s](Be({type:o},r))}function J4(e,t){return t.changes}function K4(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var Z4=Yy(function(e,t){z4(e(),t)},200),G4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.useLayoutEffect:E.useEffect;function q4(e){var t=e.id,n=t===void 0?"downshift-"+$4():t,r=e.labelId,i=e.menuId,o=e.getItemId,s=e.toggleButtonId,l=e.inputId,a=E.useRef({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(u){return n+"-item-"+u},toggleButtonId:s||n+"-toggle-button",inputId:l||n+"-input"});return a.current}function Y4(e,t,n,r){var i,o;if(e===void 0){if(t===void 0)throw new Error(r);i=n[t],o=t}else o=t===void 0?n.indexOf(e):t,i=e;return[i,o]}function X4(e){return e?String(e):""}function Nf(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function t5(e){var t=E.useRef(e);return t.current=e,t}function Q4(e,t,n){var r=E.useRef(),i=E.useRef(),o=E.useCallback(function(f,h){i.current=h,f=Oc(f,h.props);var g=e(f,h),m=h.props.stateReducer(f,Be({},h,{changes:g}));return m},[e]),s=E.useReducer(o,t),l=s[0],a=s[1],u=t5(n),c=E.useCallback(function(f){return a(Be({props:u.current},f))},[u]),d=i.current;return E.useEffect(function(){d&&r.current&&r.current!==l&&U4(d,Oc(r.current,d.props),l),r.current=l},[l,n,d]),[l,c]}var To={itemToString:X4,stateReducer:J4,getA11ySelectionMessage:K4,scrollIntoView:D4,environment:typeof window>"u"?{}:window};function En(e,t,n){n===void 0&&(n=e5);var r=e["default"+Nf(t)];return r!==void 0?r:n[t]}function Bs(e,t,n){n===void 0&&(n=e5);var r=e[t];if(r!==void 0)return r;var i=e["initial"+Nf(t)];return i!==void 0?i:En(e,t,n)}function eT(e){var t=Bs(e,"selectedItem"),n=Bs(e,"isOpen"),r=Bs(e,"highlightedIndex"),i=Bs(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function Io(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,s=t.selectedItem,l=t.highlightedIndex;return r.length===0?-1:i!==void 0&&l===i?i:o!==void 0?o:s?r.indexOf(s):n===0?-1:n<0?r.length-1:0}function tT(e,t,n,r){var i=E.useRef({isMouseDown:!1,isTouchMove:!1});return E.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var o=function(){i.current.isMouseDown=!0},s=function(d){i.current.isMouseDown=!1,e&&!Wp(d.target,t.map(function(f){return f.current}),n)&&r()},l=function(){i.current.isTouchMove=!1},a=function(){i.current.isTouchMove=!0},u=function(d){e&&!i.current.isTouchMove&&!Wp(d.target,t.map(function(f){return f.current}),n,!1)&&r()};return n.addEventListener("mousedown",o),n.addEventListener("mouseup",s),n.addEventListener("touchstart",l),n.addEventListener("touchmove",a),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",l),n.removeEventListener("touchmove",a),n.removeEventListener("touchend",u)}}},[e,n]),i}var nT=function(){return qy};function Jp(e,t,n){var r=n.isInitialMount,i=n.highlightedIndex,o=n.items,s=n.environment,l=go(n,j4);E.useEffect(function(){r||Z4(function(){return e(Be({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length},l))},s.document)},t)}function rT(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,s=e.scrollIntoView,l=E.useRef(!0);return G4(function(){t<0||!n||!Object.keys(r.current).length||(l.current===!1?l.current=!0:s(i(t),o))},[t]),l}var iT=qy;function Kp(e,t,n){var r;n===void 0&&(n=!0);var i=((r=e.items)==null?void 0:r.length)&&t>=0;return Be({isOpen:!1,highlightedIndex:-1},i&&Be({selectedItem:e.items[t],isOpen:En(e,"isOpen"),highlightedIndex:En(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function oT(e,t,n){var r=t.type,i=t.props,o;switch(r){case n.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:o={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Io(i,e,0)};break;case n.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:Io(i,e,0)};break;case n.FunctionCloseMenu:o={isOpen:!1};break;case n.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:o={inputValue:t.inputValue};break;case n.FunctionReset:o={highlightedIndex:En(i,"highlightedIndex"),isOpen:En(i,"isOpen"),selectedItem:En(i,"selectedItem"),inputValue:En(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Be({},e,o)}ne.array.isRequired,ne.func,ne.func,ne.func,ne.number,ne.number,ne.number,ne.bool,ne.bool,ne.bool,ne.any,ne.any,ne.any,ne.string,ne.string,ne.string,ne.func,ne.string,ne.func,ne.func,ne.func,ne.func,ne.func,ne.shape({addEventListener:ne.func,removeEventListener:ne.func,document:ne.shape({getElementById:ne.func,activeElement:ne.any,body:ne.any})});function sT(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}nh(nh({},To),{getA11yStatusMessage:sT});var Lf=0,Ff=1,Pf=2,Rf=3,Of=4,Mf=5,Df=6,$f=7,Vf=8,Dl=9,Hf=10,n5=11,r5=12,Bf=13,i5=14,o5=15,s5=16,l5=17,a5=18,zf=19,u5=20,c5=21,jf=22,d5=Object.freeze({__proto__:null,InputKeyDownArrowDown:Lf,InputKeyDownArrowUp:Ff,InputKeyDownEscape:Pf,InputKeyDownHome:Rf,InputKeyDownEnd:Of,InputKeyDownPageUp:Mf,InputKeyDownPageDown:Df,InputKeyDownEnter:$f,InputChange:Vf,InputBlur:Dl,InputFocus:Hf,MenuMouseLeave:n5,ItemMouseMove:r5,ItemClick:Bf,ToggleButtonClick:i5,FunctionToggleMenu:o5,FunctionOpenMenu:s5,FunctionCloseMenu:l5,FunctionSetHighlightedIndex:a5,FunctionSelectItem:zf,FunctionSetInputValue:u5,FunctionReset:c5,ControlledPropUpdatedSelectedItem:jf});function lT(e){var t=eT(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),Be({},t,{inputValue:r})}ne.array.isRequired,ne.func,ne.func,ne.func,ne.func,ne.number,ne.number,ne.number,ne.bool,ne.bool,ne.bool,ne.any,ne.any,ne.any,ne.string,ne.string,ne.string,ne.string,ne.string,ne.string,ne.func,ne.string,ne.string,ne.func,ne.func,ne.func,ne.func,ne.func,ne.func,ne.shape({addEventListener:ne.func,removeEventListener:ne.func,document:ne.shape({getElementById:ne.func,activeElement:ne.any,body:ne.any})});function aT(e,t,n){var r=E.useRef(),i=Q4(e,t,n),o=i[0],s=i[1];return E.useEffect(function(){Xy(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&s({type:jf,inputValue:n.itemToString(n.selectedItem)}),r.current=o.selectedItem===r.current?n.selectedItem:o.selectedItem)},[o.selectedItem,n.selectedItem]),[Oc(o,n),s]}var uT=Be({},To,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:V4});function cT(e,t){var n,r=t.type,i=t.props,o=t.altKey,s;switch(r){case Bf:s={isOpen:En(i,"isOpen"),highlightedIndex:En(i,"highlightedIndex"),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case Lf:e.isOpen?s={highlightedIndex:Hs(1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:o&&e.selectedItem==null?-1:Io(i,e,1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Ff:e.isOpen?o?s=Kp(i,e.highlightedIndex):s={highlightedIndex:Hs(-1,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!0)}:s={highlightedIndex:Io(i,e,-1,t.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case $f:s=Kp(i,e.highlightedIndex);break;case Pf:s=Be({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Mf:s={highlightedIndex:Hs(-10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Df:s={highlightedIndex:Hs(10,e.highlightedIndex,i.items.length,t.getItemNodeFromIndex,!1)};break;case Rf:s={highlightedIndex:jo(1,0,i.items.length,t.getItemNodeFromIndex,!1)};break;case Of:s={highlightedIndex:jo(-1,i.items.length-1,i.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:s=Be({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=i.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case Vf:s={isOpen:!0,highlightedIndex:En(i,"highlightedIndex"),inputValue:t.inputValue};break;case Hf:s={isOpen:!0,highlightedIndex:Io(i,e,0)};break;case zf:s={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case jf:s={inputValue:t.inputValue};break;default:return oT(e,t,d5)}return Be({},e,s)}var dT=["onMouseLeave","refKey","ref"],fT=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],hT=["onClick","onPress","refKey","ref"],gT=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];f5.stateChangeTypes=d5;function f5(e){e===void 0&&(e={});var t=Be({},uT,e),n=t.initialIsOpen,r=t.defaultIsOpen,i=t.items,o=t.scrollIntoView,s=t.environment,l=t.getA11yStatusMessage,a=t.getA11ySelectionMessage,u=t.itemToString,c=lT(t),d=aT(cT,c,t),f=d[0],h=d[1],g=f.isOpen,m=f.highlightedIndex,v=f.selectedItem,y=f.inputValue,p=E.useRef(null),x=E.useRef({}),b=E.useRef(null),w=E.useRef(null),_=E.useRef(!0),C=q4(t),S=E.useRef(),I=t5({state:f,props:t}),P=E.useCallback(function(K){return x.current[C.getItemId(K)]},[C]);Jp(l,[g,m,y,i],Be({isInitialMount:_.current,previousResultCount:S.current,items:i,environment:s,itemToString:u},f)),Jp(a,[v],Be({isInitialMount:_.current,previousResultCount:S.current,items:i,environment:s,itemToString:u},f));var R=rT({menuElement:p.current,highlightedIndex:m,isOpen:g,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:P});iT({isInitialMount:_.current}),E.useEffect(function(){var K=n||r||g;K&&b.current&&b.current.focus()},[]),E.useEffect(function(){_.current||(S.current=i.length)});var O=tT(g,[b,p,w],s,function(){h({type:Dl,selectItem:!1})}),M=nT();E.useEffect(function(){return _.current=!1,function(){_.current=!0}},[]),E.useEffect(function(){var K;if(!g)x.current={};else if(((K=s.document)==null?void 0:K.activeElement)!==b.current){var X;b==null||(X=b.current)==null||X.focus()}},[g,s]);var V=E.useMemo(function(){return{ArrowDown:function(X){X.preventDefault(),h({type:Lf,altKey:X.altKey,getItemNodeFromIndex:P})},ArrowUp:function(X){X.preventDefault(),h({type:Ff,altKey:X.altKey,getItemNodeFromIndex:P})},Home:function(X){I.current.state.isOpen&&(X.preventDefault(),h({type:Rf,getItemNodeFromIndex:P}))},End:function(X){I.current.state.isOpen&&(X.preventDefault(),h({type:Of,getItemNodeFromIndex:P}))},Escape:function(X){var ie=I.current.state;(ie.isOpen||ie.inputValue||ie.selectedItem||ie.highlightedIndex>-1)&&(X.preventDefault(),h({type:Pf}))},Enter:function(X){var ie=I.current.state;!ie.isOpen||X.which===229||(X.preventDefault(),h({type:$f,getItemNodeFromIndex:P}))},PageUp:function(X){I.current.state.isOpen&&(X.preventDefault(),h({type:Mf,getItemNodeFromIndex:P}))},PageDown:function(X){I.current.state.isOpen&&(X.preventDefault(),h({type:Df,getItemNodeFromIndex:P}))}}},[h,I,P]),z=E.useCallback(function(K){return Be({id:C.labelId,htmlFor:C.inputId},K)},[C]),W=E.useCallback(function(K,X){var ie,oe=K===void 0?{}:K,ce=oe.onMouseLeave,pe=oe.refKey,Te=pe===void 0?"ref":pe,Oe=oe.ref,ze=go(oe,dT),Ze=X===void 0?{}:X;return Ze.suppressRefError,Be((ie={},ie[Te]=Vs(Oe,function(qe){p.current=qe}),ie.id=C.menuId,ie.role="listbox",ie["aria-labelledby"]=ze&&ze["aria-label"]?void 0:""+C.labelId,ie.onMouseLeave=$n(ce,function(){h({type:n5})}),ie),ze)},[h,M,C]),U=E.useCallback(function(K){var X,ie,oe=K===void 0?{}:K,ce=oe.item,pe=oe.index,Te=oe.refKey,Oe=Te===void 0?"ref":Te,ze=oe.ref,Ze=oe.onMouseMove,qe=oe.onMouseDown,jt=oe.onClick;oe.onPress;var Ye=oe.disabled,F=go(oe,fT),$=I.current,j=$.props,re=$.state,Z=Y4(ce,pe,j.items,"Pass either item or index to getItemProps!"),Y=Z[1],D="onClick",B=jt,T=function(){Y!==re.highlightedIndex&&(R.current=!1,h({type:r5,index:Y,disabled:Ye}))},de=function(){h({type:Bf,index:Y})},be=function(Ut){return Ut.preventDefault()};return Be((X={},X[Oe]=Vs(ze,function(Se){Se&&(x.current[C.getItemId(Y)]=Se)}),X.disabled=Ye,X.role="option",X["aria-selected"]=""+(Y===re.highlightedIndex),X.id=C.getItemId(Y),X),!Ye&&(ie={},ie[D]=$n(B,de),ie),{onMouseMove:$n(Ze,T),onMouseDown:$n(qe,be)},F)},[h,I,R,C]),G=E.useCallback(function(K){var X,ie=K===void 0?{}:K,oe=ie.onClick;ie.onPress;var ce=ie.refKey,pe=ce===void 0?"ref":ce,Te=ie.ref,Oe=go(ie,hT),ze=I.current.state,Ze=function(){h({type:i5})};return Be((X={},X[pe]=Vs(Te,function(qe){w.current=qe}),X["aria-controls"]=C.menuId,X["aria-expanded"]=ze.isOpen,X.id=C.toggleButtonId,X.tabIndex=-1,X),!Oe.disabled&&Be({},{onClick:$n(oe,Ze)}),Oe)},[h,I,C]),te=E.useCallback(function(K,X){var ie,oe=K===void 0?{}:K,ce=oe.onKeyDown,pe=oe.onChange,Te=oe.onInput,Oe=oe.onFocus,ze=oe.onBlur;oe.onChangeText;var Ze=oe.refKey,qe=Ze===void 0?"ref":Ze,jt=oe.ref,Ye=go(oe,gT),F=X===void 0?{}:X;F.suppressRefError;var $=I.current.state,j=function(be){var Se=H4(be);Se&&V[Se]&&V[Se](be)},re=function(be){h({type:Vf,inputValue:be.target.value})},Z=function(be){if($.isOpen&&!O.current.isMouseDown){var Se=be.relatedTarget===null&&s.document.activeElement!==s.document.body;h({type:Dl,selectItem:!Se})}},Y=function(){$.isOpen||h({type:Hf})},D="onChange",B={};if(!Ye.disabled){var T;B=(T={},T[D]=$n(pe,Te,re),T.onKeyDown=$n(ce,j),T.onBlur=$n(ze,Z),T.onFocus=$n(Oe,Y),T)}return Be((ie={},ie[qe]=Vs(jt,function(de){b.current=de}),ie["aria-activedescendant"]=$.isOpen&&$.highlightedIndex>-1?C.getItemId($.highlightedIndex):"",ie["aria-autocomplete"]="list",ie["aria-controls"]=C.menuId,ie["aria-expanded"]=$.isOpen,ie["aria-labelledby"]=Ye&&Ye["aria-label"]?void 0:""+C.labelId,ie.autoComplete="off",ie.id=C.inputId,ie.role="combobox",ie.value=$.inputValue,ie),B,Ye)},[M,I,C,V,h,O,s]),A=E.useCallback(function(){h({type:o5})},[h]),fe=E.useCallback(function(){h({type:l5})},[h]),me=E.useCallback(function(){h({type:s5})},[h]),L=E.useCallback(function(K){h({type:a5,highlightedIndex:K})},[h]),ye=E.useCallback(function(K){h({type:zf,selectedItem:K})},[h]),_e=E.useCallback(function(K){h({type:u5,inputValue:K})},[h]),ge=E.useCallback(function(){h({type:c5})},[h]);return{getItemProps:U,getLabelProps:z,getMenuProps:W,getInputProps:te,getToggleButtonProps:G,toggleMenu:A,openMenu:me,closeMenu:fe,setHighlightedIndex:L,setInputValue:_e,selectItem:ye,reset:ge,highlightedIndex:m,isOpen:g,selectedItem:v,inputValue:y}}ne.array,ne.array,ne.array,ne.func,ne.func,ne.func,ne.number,ne.number,ne.number,ne.func,ne.func,ne.string,ne.string,ne.shape({addEventListener:ne.func,removeEventListener:ne.func,document:ne.shape({getElementById:ne.func,activeElement:ne.any,body:ne.any})});To.itemToString,To.stateReducer,To.environment;const Zp=20,h5=e=>e.suggestions.length>0?k.createElement(pT,{...e}):k.createElement("input",{className:se.textInput,size:40,autoFocus:!0,...e.register(e.inputName)}),pT=({autofocus:e,suggestions:t,control:n,inputName:r,placeholder:i,initialInputValue:o,setValue:s})=>{const[l,a]=k.useState(t.slice(0,Zp)),u=Bt(Er),c=t.length>0,{isOpen:d,getToggleButtonProps:f,getMenuProps:h,getInputProps:g,highlightedIndex:m,getItemProps:v,selectedItem:y}=f5({initialInputValue:o,onInputValueChange({inputValue:x=""}){s(r,x),x=x.toLowerCase()||"";const b=[];for(const w of t)if(w.toLowerCase().includes(x)&&(b.push(w),b.length>=Zp))break;a(b)},items:l,itemToString(x){return x??""}}),p=d&&l.length>0;return k.createElement("div",{className:se.downshiftAutocompleteContainer},k.createElement("div",{"data-visible-dropdown":p,className:se.downshiftInputWrapper},k.createElement(i4,{name:r,control:n,render:({field:x})=>{const b=g();return k.createElement("input",{...b,name:x.name,placeholder:i,className:se.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:e})}}),c&&k.createElement("button",{"aria-label":"toggle menu",type:"button",...f()},u("arrow_drop_down"))),k.createElement("div",{className:se.downshiftAutocompleteContainer},k.createElement("ul",{...h(),"data-visible":p},l.map((x,b)=>k.createElement("li",{"data-selected":y===x,"data-highlighted":m===b,key:`${x}${b}`,...v({item:x,index:b})},x)))))},mT=()=>{const[e,t,n,r]=Ln(Mc,zr,os,cr),i=Pt(y5),o=Pt(m5),s=tr(),{register:l,handleSubmit:a,control:u,setValue:c,reset:d}=By({values:t.type==="editing"?t.initialValues:{}});return t.type==="inactive"?null:k.createElement(K8,{open:!0,onOpenChange:f=>{f||(o(),d({src:"",title:"",altText:""}))}},k.createElement(Z8,{container:n==null?void 0:n.current},k.createElement(G8,{className:se.dialogOverlay}),k.createElement(q8,{className:se.dialogContent,onOpenAutoFocus:f=>{f.preventDefault()}},k.createElement(Y8,null,s("uploadImage.dialogTitle","Upload an image")),k.createElement("form",{onSubmit:async f=>{f.preventDefault(),f.stopPropagation(),await a(i)(f),d({src:"",title:"",altText:""})},className:se.multiFieldForm},r===null?k.createElement("input",{type:"hidden",accept:"image/*",...l("file")}):k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"file"},s("uploadImage.uploadInstructions","Upload an image from your device:")),k.createElement("input",{type:"file",accept:"image/*",...l("file")})),k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"src"},r!==null?s("uploadImage.addViaUrlInstructions","Or add an image from an URL:"):s("uploadImage.addViaUrlInstructionsNoUpload","Add an image from an URL:")),k.createElement(h5,{register:l,initialInputValue:t.type==="editing"?t.initialValues.src??"":"",inputName:"src",suggestions:e,setValue:c,control:u,placeholder:s("uploadImage.autoCompletePlaceholder","Select or paste an image src")})),k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"alt"},s("uploadImage.alt","Alt:")),k.createElement("input",{type:"text",...l("altText"),className:se.textInput})),k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"title"},s("uploadImage.title","Title:")),k.createElement("input",{type:"text",...l("title"),className:se.textInput})),k.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},k.createElement("button",{type:"submit",title:s("dialogControls.save","Save"),"aria-label":s("dialogControls.save","Save"),className:Le(se.primaryButton)},s("dialogControls.save","Save")),k.createElement(X8,{asChild:!0},k.createElement("button",{type:"reset",title:s("dialogControls.cancel","Cancel"),"aria-label":s("dialogControls.cancel","Cancel"),className:Le(se.secondaryButton)},s("dialogControls.cancel","Cancel"))))))))};function _u(e,t,n){return Math.min(Math.max(e,t),n)}const Pe={east:1,north:8,south:2,west:4};function xT({onResizeStart:e,onResizeEnd:t,imageRef:n,maxWidth:r,editor:i}){const o=E.useRef(null),s=E.useRef({priority:"",value:"default"}),l=E.useRef({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),a=i.getRootElement(),u=r||(a!==null?a.getBoundingClientRect().width-20:100),c=a!==null?a.getBoundingClientRect().height-20:100,d=100,f=100,h=p=>{const x=p===Pe.east||p===Pe.west,b=p===Pe.north||p===Pe.south,w=p&Pe.north&&p&Pe.west||p&Pe.south&&p&Pe.east,_=x?"ew":b?"ns":w?"nwse":"nesw";a!==null&&a.style.setProperty("cursor",`${_}-resize`,"important"),document.body!==null&&(document.body.style.setProperty("cursor",`${_}-resize`,"important"),s.current.value=document.body.style.getPropertyValue("-webkit-user-select"),s.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},g=()=>{a!==null&&a.style.setProperty("cursor","text"),document.body!==null&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",s.current.value,s.current.priority))},m=(p,x)=>{if(!i.isEditable())return;const b=n.current,w=o.current;if(b!==null&&w!==null){p.preventDefault();const{width:_,height:C}=b.getBoundingClientRect(),S=l.current;S.startWidth=_,S.startHeight=C,S.ratio=_/C,S.currentWidth=_,S.currentHeight=C,S.startX=p.clientX,S.startY=p.clientY,S.isResizing=!0,S.direction=x,h(x),e(),w.classList.add(se.imageControlWrapperResizing),b.style.height=`${C}px`,b.style.width=`${_}px`,document.addEventListener("pointermove",v),document.addEventListener("pointerup",y)}},v=p=>{const x=n.current,b=l.current,w=b.direction&(Pe.east|Pe.west),_=b.direction&(Pe.south|Pe.north);if(x!==null&&b.isResizing)if(w&&_){let C=Math.floor(b.startX-p.clientX);C=b.direction&Pe.east?-C:C;const S=_u(b.startWidth+C,d,u),I=S/b.ratio;x.style.width=`${S}px`,x.style.height=`${I}px`,b.currentHeight=I,b.currentWidth=S}else if(_){let C=Math.floor(b.startY-p.clientY);C=b.direction&Pe.south?-C:C;const S=_u(b.startHeight+C,f,c);x.style.height=`${S}px`,b.currentHeight=S}else{let C=Math.floor(b.startX-p.clientX);C=b.direction&Pe.east?-C:C;const S=_u(b.startWidth+C,d,u);x.style.width=`${S}px`,b.currentWidth=S}},y=()=>{const p=n.current,x=l.current,b=o.current;if(p!==null&&b!==null&&x.isResizing){const w=x.currentWidth,_=x.currentHeight;x.startWidth=0,x.startHeight=0,x.ratio=0,x.startX=0,x.startY=0,x.currentWidth=0,x.currentHeight=0,x.isResizing=!1,b.classList.remove(se.imageControlWrapperResizing),g(),t(w,_),document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",y)}};return E.createElement("div",{ref:o},E.createElement("div",{className:Le(se.imageResizer,se.imageResizerN),onPointerDown:p=>{m(p,Pe.north)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerNe),onPointerDown:p=>{m(p,Pe.north|Pe.east)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerE),onPointerDown:p=>{m(p,Pe.east)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerSe),onPointerDown:p=>{m(p,Pe.south|Pe.east)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerS),onPointerDown:p=>{m(p,Pe.south)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerSw),onPointerDown:p=>{m(p,Pe.south|Pe.west)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerW),onPointerDown:p=>{m(p,Pe.west)}}),E.createElement("div",{className:Le(se.imageResizer,se.imageResizerNw),onPointerDown:p=>{m(p,Pe.north|Pe.west)}}))}const yT="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(`
|
|
80
|
-
<svg id="imgLoadError" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
|
|
81
|
-
<rect x="0" y="0" width="100" height="100" fill="none" stroke="red" stroke-width="4" stroke-dasharray="4" />
|
|
82
|
-
<text x="50" y="55" text-anchor="middle" font-size="20" fill="red">⚠️</text>
|
|
83
|
-
</svg>
|
|
84
|
-
`),vT={__cache:{},read(e){if(this.__cache[e]||(this.__cache[e]=new Promise(t=>{const n=new Image;n.onerror=()=>{this.__cache[e]=yT,t()},n.onload=()=>{this.__cache[e]=e,t()},n.src=e})),this.__cache[e]instanceof Promise)throw this.__cache[e];return this.__cache[e]}};function bT({title:e,alt:t,className:n,imageRef:r,src:i,width:o,height:s}){return k.createElement("img",{className:n??void 0,alt:t,src:vT.read(i),title:e,ref:r,draggable:"false",width:o,height:s})}function _T({src:e,title:t,alt:n,nodeKey:r,width:i,height:o,rest:s}){const[l,a,u,c,d]=Ln(Vc,Dc,$c,sn,Hc),f=k.useRef(null),h=k.useRef(null),[g,m,v]=j0(r),[y]=yt(),[p,x]=k.useState(null),b=k.useRef(null),[w,_]=k.useState(!1),[C,S]=k.useState(null),[I,P]=k.useState(null),R=k.useCallback(te=>{if(g&&it(Q())){te.preventDefault();const fe=je(r);$l(fe)&&fe.remove()}return!1},[g,r]),O=k.useCallback(te=>{const A=Q(),fe=h.current;return g&&it(A)&&A.getNodes().length===1&&fe!==null&&fe!==document.activeElement?(te.preventDefault(),fe.focus(),!0):!1},[g]),M=k.useCallback(te=>h.current===te.target?(nt(null),y.update(()=>{m(!0);const A=y.getRootElement();A!==null&&A.focus()}),!0):!1,[y,m]);k.useEffect(()=>{u?(async()=>{I||P(e);const A=await u(e);S(A)})().catch(A=>{console.error(A)}):S(e)},[e,u,I]),k.useEffect(()=>{let te=!0;const A=At(y.registerUpdateListener(({editorState:fe})=>{te&&x(fe.read(()=>Q()))}),y.registerCommand(Wl,(fe,me)=>(b.current=me,!1),De),y.registerCommand(Jl,fe=>{const me=fe;return w?!0:me.target===f.current?(me.shiftKey?m(!g):(v(),m(!0)),!0):!1},De),y.registerCommand(Yl,fe=>fe.target===f.current?(fe.preventDefault(),!0):!1,De),y.registerCommand(ql,R,De),y.registerCommand(Gl,R,De),y.registerCommand(Mo,O,De),y.registerCommand(Ko,M,De));return()=>{te=!1,A()}},[v,y,w,g,r,R,O,M,m]);const V=(te,A)=>{setTimeout(()=>{_(!1)},200),y.update(()=>{const fe=je(r);$l(fe)&&fe.setWidthAndHeight(te,A)})},z=()=>{_(!0)},W=it(p),U=g,G=k.useMemo(()=>{if(s.length===0)return null;const te=s.find(A=>A.type==="mdxJsxAttribute"&&(A.name==="class"||A.name==="className"));return te?te.value:null},[s]);return C!==null?k.createElement(k.Suspense,{fallback:l?k.createElement(l,null):null},k.createElement("div",{className:se.imageWrapper,"data-editor-block-type":"image"},k.createElement("div",{draggable:W},k.createElement(bT,{width:i,height:o,className:Le({[se.focusedImage]:U},G),src:C,title:t??"",alt:n??"",imageRef:f})),W&&U&&!a&&k.createElement(xT,{editor:y,imageRef:f,onResizeStart:z,onResizeEnd:V}),c||k.createElement(d,{nodeKey:r,imageSource:C,initialImagePath:I,title:t??"",alt:n??""}))):null}var CT=Object.defineProperty,wT=(e,t,n)=>t in e?CT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hi=(e,t,n)=>(wT(e,typeof t!="symbol"?t+"":t,n),n);function ET(e){if(e instanceof HTMLImageElement){const{alt:t,src:n,title:r,width:i,height:o}=e;return{node:ai({altText:t,src:n,title:r,width:i,height:o})}}return null}class Cs extends Xo{constructor(t,n,r,i,o,s,l){super(l),hi(this,"__src"),hi(this,"__altText"),hi(this,"__title"),hi(this,"__width"),hi(this,"__height"),hi(this,"__rest"),this.__src=t,this.__title=r,this.__altText=n,this.__width=i||"inherit",this.__height=o||"inherit",this.__rest=s??[]}static getType(){return"image"}static clone(t){return new Cs(t.__src,t.__altText,t.__title,t.__width,t.__height,t.__rest,t.__key)}static importJSON(t){const{altText:n,title:r,src:i,width:o,rest:s,height:l}=t;return ai({altText:n,title:r,src:i,height:l,width:o,rest:s})}exportDOM(){const t=document.createElement("img");return t.setAttribute("src",this.__src),t.setAttribute("alt",this.__altText),this.__title&&t.setAttribute("title",this.__title),this.__width&&t.setAttribute("width",this.__width.toString()),this.__height&&t.setAttribute("height",this.__height.toString()),{element:t}}static importDOM(){return{img:()=>({conversion:ET,priority:0})}}exportJSON(){return{altText:this.getAltText(),title:this.getTitle(),height:this.__height==="inherit"?0:this.__height,width:this.__width==="inherit"?0:this.__width,src:this.getSrc(),rest:this.__rest,type:"image",version:1}}setWidthAndHeight(t,n){const r=this.getWritable();r.__width=t,r.__height=n}createDOM(t){const n=document.createElement("span"),i=t.theme.image;return i!==void 0&&(n.className=i),n}updateDOM(){return!1}getSrc(){return this.__src}getAltText(){return this.__altText}getTitle(){return this.__title}getHeight(){return this.__height}getWidth(){return this.__width}getRest(){return this.__rest}setTitle(t){this.getWritable().__title=t}setSrc(t){this.getWritable().__src=t}setAltText(t){this.getWritable().__altText=t??""}shouldBeSerializedAsElement(){return this.__width!=="inherit"||this.__height!=="inherit"||this.__rest.length>0}decorate(t){return k.createElement(_T,{src:this.getSrc(),title:this.getTitle(),nodeKey:this.getKey(),width:this.__width,height:this.__height,alt:this.__altText,rest:this.__rest})}}function ai(e){const{altText:t,title:n,src:r,key:i,width:o,height:s,rest:l}=e;return new Cs(r,t,n,o,s,l,i)}function $l(e){return e instanceof Cs}const ST={testLexicalNode:$l,visitLexicalNode({mdastParent:e,lexicalNode:t,actions:n}){if(t.shouldBeSerializedAsElement()){const r=new Image;t.getHeight()!=="inherit"&&(r.height=t.getHeight()),t.getWidth()!=="inherit"&&(r.width=t.getWidth()),t.getAltText()&&(r.alt=t.getAltText()),t.getTitle()&&(r.title=t.getTitle());for(const i of t.getRest())i.type==="mdxJsxAttribute"&&typeof i.value=="string"&&r.setAttribute(i.name,i.value);n.appendToParent(e,{type:"html",value:r.outerHTML.replace(/>$/,` src="${t.getSrc()}" />`)})}else n.appendToParent(e,{type:"image",url:t.getSrc(),alt:t.getAltText(),title:t.getTitle()})}},kT={testNode:"image",visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ai({src:e.url,altText:e.alt??"",title:e.title??""}))}},TT={testNode:e=>e.type==="html"&&e.value.trim().startsWith("<img"),visitNode({mdastNode:e,lexicalParent:t}){const n=document.createElement("div");n.innerHTML=e.value;const r=n.querySelector("img");if(!r)throw new Error("Invalid HTML image");const i=r.src,o=r.alt,s=r.title,l=r.width,a=r.height,u=ai({src:i||"",altText:o,title:s,width:l,height:a});if(t.getType()==="root"){const c=Ne();c.append(u),t.append(c)}else t.append(u)}};function ao(e,t){const n=e.attributes.find(r=>r.type==="mdxJsxAttribute"&&r.name===t);if(n)return n.value}const IT={testNode:e=>(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement")&&e.name==="img",visitNode({mdastNode:e,lexicalParent:t}){const n=ao(e,"src");if(!n)return;const r=ao(e,"alt")??"",i=ao(e,"title"),o=ao(e,"height"),s=ao(e,"width"),l=e.attributes.filter(u=>u.type==="mdxJsxAttribute"&&!["src","alt","title","height","width"].includes(u.name)),a=ai({src:n,altText:r,title:i,width:s?parseInt(s,10):void 0,height:o?parseInt(o,10):void 0,rest:l});if(t.getType()==="root"){const u=Ne();u.append(a),t.append(u)}else t.append(a)}},Uf=lt(e=>{e.sub(e.pipe(Uf,Ue(Qe)),([t,n])=>{n==null||n.update(()=>{const r=ai({altText:t.altText??"",src:t.src,title:t.title??""});ji([r]),We(r.getParentOrThrow())&&Bd(r,Ne).selectEnd()})})}),AT=lt(e=>{e.sub(e.pipe(AT,Ue(cr)),([t,n])=>{const r=i=>{e.pub(Uf,{...t,src:i})};"file"in t?n==null||n(t.file).then(r).catch(i=>{throw i}):r(t.src)})}),Mc=ue([]),Dc=ue(!1),cr=ue(null),$c=ue(null),Vc=ue(null),zr=ue({type:"inactive"},e=>{e.sub(e.pipe(y5,Ue(Qe,cr,zr)),([t,n,r,i])=>{const o=i.type==="editing"?s=>{n==null||n.update(()=>{const{nodeKey:l}=i,a=je(l);a.setTitle(t.title),a.setAltText(t.altText),a.setSrc(s)}),e.pub(zr,{type:"inactive"})}:s=>{e.pub(Uf,{...t,src:s}),e.pub(zr,{type:"inactive"})};t.file&&t.file.length>0?r==null||r(t.file.item(0)).then(o).catch(s=>{throw s}):t.src&&o(t.src)}),e.pub(Ho,t=>{const n=e.getValue(cr);return At(t.registerCommand(Vl,r=>{const i=ai(r);return ji([i]),We(i.getParentOrThrow())&&Bd(i,Ne).selectEnd(),!0},we),t.registerCommand(Yl,r=>PT(r),Ju),t.registerCommand(gd,r=>RT(r,!!n),De),t.registerCommand(hd,r=>OT(r,t,e.getValue(cr)),Ju),t.registerCommand(Jo,r=>{var i,o;if(!n){let u=Array.from(((i=r.clipboardData)==null?void 0:i.items)??[]);return u=u.filter(c=>c.type.includes("text")),!u.length||u.length===0}const s=Array.from(((o=r.clipboardData)==null?void 0:o.items)??[]);if(s.some(u=>!u.type.includes("image"))||!s.length||s.length===0)return!1;const a=e.getValue(cr);return Promise.all(s.map(u=>a(u.getAsFile()))).then(u=>{u.forEach(c=>{t.dispatchCommand(Vl,{src:c,altText:""})})}).catch(u=>{throw u}),!0},Kn))})}),g5=xr(e=>{e.link(e.pipe(g5,am({type:"new"})),zr)}),p5=lt(e=>{e.link(e.pipe(p5,yi(t=>({type:"editing",...t}))),zr)}),m5=xr(e=>{e.link(e.pipe(m5,am({type:"inactive"})),zr)}),x5=ue(!1),y5=lt(),Hc=ue(Pc),NT=un({init(e,t){e.pubIn({[Zn]:[kT,TT,IT],[Cr]:Cs,[wr]:ST,[si]:(t==null?void 0:t.ImageDialog)??mT,[cr]:(t==null?void 0:t.imageUploadHandler)??null,[Mc]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Dc]:!!(t!=null&&t.disableImageResize),[x5]:!!(t!=null&&t.disableImageSettingsButton),[$c]:(t==null?void 0:t.imagePreviewHandler)??null,[Hc]:(t==null?void 0:t.EditImageToolbar)??Pc,[Vc]:(t==null?void 0:t.imagePlaceholder)??Np})},update(e,t){e.pubIn({[cr]:(t==null?void 0:t.imageUploadHandler)??null,[Mc]:(t==null?void 0:t.imageAutocompleteSuggestions)??[],[Dc]:!!(t!=null&&t.disableImageResize),[$c]:(t==null?void 0:t.imagePreviewHandler)??null,[Hc]:(t==null?void 0:t.EditImageToolbar)??Pc,[Vc]:(t==null?void 0:t.imagePlaceholder)??Np})}}),LT=e=>B0?(e??window).getSelection():null,Vl=Qn(),FT="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function PT(e){const t=Wf();if(!t)return!1;const n=e.dataTransfer;if(!n)return!1;n.setData("text/plain","_");const r=document.createElement("img");return r.src=FT,n.setDragImage(r,0,0),n.setData("application/x-lexical-drag",JSON.stringify({data:{altText:t.__altText,title:t.__title,key:t.getKey(),src:t.__src},type:"image"})),!0}function RT(e,t){var n;if(t){let i=Array.from(((n=e.dataTransfer)==null?void 0:n.items)??[]);if(i=i.filter(o=>o.type.includes("image")),i.length>0)return e.preventDefault(),!0}return Wf()?(v5(e)||e.preventDefault(),!0):!1}function OT(e,t,n){var r;let i=Array.from(((r=e.dataTransfer)==null?void 0:r.items)??[]);if(i=i.filter(l=>l.type.includes("image")),i.length>0&&n!==null)return e.preventDefault(),Promise.all(i.map(l=>l.kind==="string"?new Promise(a=>{l.getAsString(a)}):n(l.getAsFile()))).then(l=>{l.forEach(a=>{t.dispatchCommand(Vl,{src:a,altText:""})})}).catch(l=>{throw l}),!0;const o=Wf();if(!o)return!1;const s=MT(e);if(!s)return!1;if(e.preventDefault(),v5(e)){const l=DT(e);o.remove();const a=qo();l!=null&&a.applyDOMRange(l),nt(a),t.dispatchCommand(Vl,s)}return!0}function Wf(){const e=Q();if(!it(e))return null;const n=e.getNodes()[0];return $l(n)?n:null}function MT(e){var t;const n=(t=e.dataTransfer)==null?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return r!=="image"?null:i}function v5(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&t.parentElement)}function DT(e){let t;const n=e.target,r=n==null?null:n.nodeType===9?n.defaultView:n.ownerDocument.defaultView,i=LT(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else if(e.rangeParent&&i!==null)i.collapse(e.rangeParent,e.rangeOffset??0),t=i.getRangeAt(0);else throw Error("Cannot get the selection when dragging");return t}const $T={testNode:"blockquote",visitNode({actions:e}){e.addAndStepInto(ns())}},VT={testLexicalNode:tc,visitLexicalNode:({lexicalNode:e,mdastParent:t,actions:n})=>{const r={type:"paragraph",children:[]};n.appendToParent(t,{type:"blockquote",children:[r]}),n.visitChildren(e,r)}},HT=un({init(e){e.pubIn({[Zi]:"quote",[Zn]:$T,[Cr]:ua,[wr]:VT})}});function BT(){let e=vi;return{publish:()=>{e()},subscribe:t=>{e=t}}}var zT=Object.defineProperty,jT=(e,t,n)=>t in e?zT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ir=(e,t,n)=>(jT(e,typeof t!="symbol"?t+"":t,n),n);class Qi extends Xo{constructor(t,n,r,i){super(i),ir(this,"__code"),ir(this,"__meta"),ir(this,"__language"),ir(this,"__focusEmitter",BT()),ir(this,"setCode",o=>{o!==this.__code&&(this.getWritable().__code=o)}),ir(this,"setMeta",o=>{o!==this.__meta&&(this.getWritable().__meta=o)}),ir(this,"setLanguage",o=>{o!==this.__language&&(this.getWritable().__language=o)}),ir(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=t,this.__meta=r,this.__language=n}static getType(){return"codeblock"}static clone(t){return new Qi(t.__code,t.__language,t.__meta,t.__key)}static importJSON(t){const{code:n,meta:r,language:i}=t;return ws({code:n,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:ZT,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(t){return k.createElement(JT,{parentEditor:t,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const b5=k.createContext(null),UT=({parentEditor:e,lexicalNode:t,children:n})=>{const r=k.useMemo(()=>({lexicalNode:t,parentEditor:e,setCode:i=>{e.update(()=>{t.setCode(i),setTimeout(()=>{e.dispatchCommand(Gd,void 0)},0)})},setLanguage:i=>{e.update(()=>{t.setLanguage(i)})},setMeta:i=>{e.update(()=>{t.setMeta(i)})}}),[t,e]);return k.createElement(b5.Provider,{value:r},n)};function WT(){const e=k.useContext(b5);if(!e)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return e}const JT=e=>{const t=Bt(pa),n=Bt(Jf);let r=t.sort((a,u)=>u.priority-a.priority).find(a=>a.match(e.language||"",e.meta||""));if(r||(r=t.find(a=>a.match(n||"",e.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${e.language} meta=${e.meta}`);const i=r.Editor,{codeBlockNode:o,parentEditor:s,...l}=e;return k.createElement(UT,{parentEditor:e.parentEditor,lexicalNode:e.codeBlockNode},k.createElement(i,{...l}))};function ws(e){const{code:t="",language:n="",meta:r=""}=e;return new Qi(t,n,r)}function KT(e){return e instanceof Qi}function ZT(e){const t=e,n=t.textContent??"",r=e.getAttribute("class")??"",i=e.getAttribute("data-language")??"",o=r.match(/language-(\w+)/),s=o?o[1]:i,l=t.getAttribute("data-meta")??"";return{node:ws({code:n,language:s,meta:l})}}const GT={testLexicalNode:KT,visitLexicalNode:({lexicalNode:e,actions:t})=>{t.addAndStepInto("code",{value:e.getCode(),lang:e.getLanguage(),meta:e.getMeta()})}},qT={testNode:(e,{codeBlockEditorDescriptors:t})=>e.type==="code"?t.find(r=>r.match(e.lang,e.meta))!==void 0:!1,visitNode({mdastNode:e,actions:t}){t.addAndStepInto(ws({code:e.value,language:e.lang,meta:e.meta}))}},Jf=ue(""),YT=lt(e=>{e.link(e.pipe(YT,Ue(Jf),yi(([t,n])=>()=>ws({language:n,...t}))),O0)});wt(pa);const XT=un({update(e,t){e.pub(Jf,(t==null?void 0:t.defaultCodeBlockLanguage)??"")},init(e,t){e.pubIn({[Zi]:"codeblock",[pa]:(t==null?void 0:t.codeBlockEditorDescriptors)??[],[Zn]:qT,[Cr]:Qi,[wr]:GT})}});function Gp(e,[t,n]){return Math.min(n,Math.max(t,e))}var _5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QT="VisuallyHidden",C5=E.forwardRef((e,t)=>N.jsx(Ce.span,{...e,ref:t,style:{..._5,...e.style}}));C5.displayName=QT;var eI=C5,tI=[" ","Enter","ArrowUp","ArrowDown"],nI=[" ","Enter"],ri="Select",[La,Fa,rI]=Mx(ri),[eo,gN]=Xn(ri,[rI,Xi]),Pa=Xi(),[iI,Ar]=eo(ri),[oI,sI]=eo(ri),w5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:l,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:g}=e,m=Pa(t),[v,y]=E.useState(null),[p,x]=E.useState(null),[b,w]=E.useState(!1),_=Ea(u),[C,S]=Yn({prop:r,defaultProp:i??!1,onChange:o,caller:ri}),[I,P]=Yn({prop:s,defaultProp:l,onChange:a,caller:ri}),R=E.useRef(null),O=v?g||!!v.closest("form"):!0,[M,V]=E.useState(new Set),z=Array.from(M).map(W=>W.props.value).join(";");return N.jsx(cf,{...m,children:N.jsxs(iI,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:p,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:Wn(),value:I,onValueChange:P,open:C,onOpenChange:S,dir:_,triggerPointerDownPosRef:R,disabled:f,children:[N.jsx(La.Provider,{scope:t,children:N.jsx(oI,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(W=>{V(U=>new Set(U).add(W))},[]),onNativeOptionRemove:E.useCallback(W=>{V(U=>{const G=new Set(U);return G.delete(W),G})},[]),children:n})}),O?N.jsxs(j5,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:I,onChange:W=>P(W.target.value),disabled:f,form:g,children:[I===void 0?N.jsx("option",{value:""}):null,Array.from(M)]},z):null]})})};w5.displayName=ri;var E5="SelectTrigger",S5=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Pa(n),s=Ar(E5,n),l=s.disabled||r,a=$e(t,s.onTriggerChange),u=Fa(n),c=E.useRef("touch"),[d,f,h]=W5(m=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),p=J5(v,m,y);p!==void 0&&s.onValueChange(p.value)}),g=m=>{l||(s.onOpenChange(!0),h()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return N.jsx(Ca,{asChild:!0,...o,children:N.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":U5(s.value)?"":void 0,...i,ref:a,onClick:ve(i.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:ve(i.onPointerDown,m=>{c.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ve(i.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(v&&m.key===" ")&&tI.includes(m.key)&&(g(),m.preventDefault())})})})});S5.displayName=E5;var k5="SelectValue",T5=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...l}=e,a=Ar(k5,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=$e(t,a.onValueNodeChange);return Tt(()=>{u(c)},[u,c]),N.jsx(Ce.span,{...l,ref:d,style:{pointerEvents:"none"},children:U5(a.value)?N.jsx(N.Fragment,{children:s}):o})});T5.displayName=k5;var lI="SelectIcon",I5=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return N.jsx(Ce.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});I5.displayName=lI;var aI="SelectPortal",A5=e=>N.jsx(us,{asChild:!0,...e});A5.displayName=aI;var ii="SelectContent",N5=E.forwardRef((e,t)=>{const n=Ar(ii,e.__scopeSelect),[r,i]=E.useState();if(Tt(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?ki.createPortal(N.jsx(L5,{scope:e.__scopeSelect,children:N.jsx(La.Slot,{scope:e.__scopeSelect,children:N.jsx("div",{children:e.children})})}),o):null}return N.jsx(F5,{...e,ref:t})});N5.displayName=ii;var Zt=10,[L5,Nr]=eo(ii),uI="SelectContentImpl",cI=Mi("SelectContent.RemoveScroll"),F5=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:v,...y}=e,p=Ar(ii,n),[x,b]=E.useState(null),[w,_]=E.useState(null),C=$e(t,K=>b(K)),[S,I]=E.useState(null),[P,R]=E.useState(null),O=Fa(n),[M,V]=E.useState(!1),z=E.useRef(!1);E.useEffect(()=>{if(x)return qc(x)},[x]),Xc();const W=E.useCallback(K=>{const[X,...ie]=O().map(pe=>pe.ref.current),[oe]=ie.slice(-1),ce=document.activeElement;for(const pe of K)if(pe===ce||(pe==null||pe.scrollIntoView({block:"nearest"}),pe===X&&w&&(w.scrollTop=0),pe===oe&&w&&(w.scrollTop=w.scrollHeight),pe==null||pe.focus(),document.activeElement!==ce))return},[O,w]),U=E.useCallback(()=>W([S,x]),[W,S,x]);E.useEffect(()=>{M&&U()},[M,U]);const{onOpenChange:G,triggerPointerDownPosRef:te}=p;E.useEffect(()=>{if(x){let K={x:0,y:0};const X=oe=>{var ce,pe;K={x:Math.abs(Math.round(oe.pageX)-(((ce=te.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((pe=te.current)==null?void 0:pe.y)??0))}},ie=oe=>{K.x<=10&&K.y<=10?oe.preventDefault():x.contains(oe.target)||G(!1),document.removeEventListener("pointermove",X),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",ie,{capture:!0})}}},[x,G,te]),E.useEffect(()=>{const K=()=>G(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[G]);const[A,fe]=W5(K=>{const X=O().filter(ce=>!ce.disabled),ie=X.find(ce=>ce.ref.current===document.activeElement),oe=J5(X,K,ie);oe&&setTimeout(()=>oe.ref.current.focus())}),me=E.useCallback((K,X,ie)=>{const oe=!z.current&&!ie;(p.value!==void 0&&p.value===X||oe)&&(I(K),oe&&(z.current=!0))},[p.value]),L=E.useCallback(()=>x==null?void 0:x.focus(),[x]),ye=E.useCallback((K,X,ie)=>{const oe=!z.current&&!ie;(p.value!==void 0&&p.value===X||oe)&&R(K)},[p.value]),_e=r==="popper"?Bc:P5,ge=_e===Bc?{side:l,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return N.jsx(L5,{scope:n,content:x,viewport:w,onViewportChange:_,itemRefCallback:me,selectedItem:S,onItemLeave:L,itemTextRefCallback:ye,focusSelectedItem:U,selectedItemText:P,position:r,isPositioned:M,searchRef:A,children:N.jsx(Yc,{as:cI,allowPinchZoom:!0,children:N.jsx(ya,{asChild:!0,trapped:p.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:ve(i,K=>{var X;(X=p.trigger)==null||X.focus({preventScroll:!0}),K.preventDefault()}),children:N.jsx(ls,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:N.jsx(_e,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:K=>K.preventDefault(),...y,...ge,onPlaced:()=>V(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ve(y.onKeyDown,K=>{const X=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!X&&K.key.length===1&&fe(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let oe=O().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(K.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const ce=K.target,pe=oe.indexOf(ce);oe=oe.slice(pe+1)}setTimeout(()=>W(oe)),K.preventDefault()}})})})})})})});F5.displayName=uI;var dI="SelectItemAlignedPosition",P5=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Ar(ii,n),s=Nr(ii,n),[l,a]=E.useState(null),[u,c]=E.useState(null),d=$e(t,C=>c(C)),f=Fa(n),h=E.useRef(!1),g=E.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:p}=s,x=E.useCallback(()=>{if(o.trigger&&o.valueNode&&l&&u&&m&&v&&y){const C=o.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),P=y.getBoundingClientRect();if(o.dir!=="rtl"){const ce=P.left-S.left,pe=I.left-ce,Te=C.left-pe,Oe=C.width+Te,ze=Math.max(Oe,S.width),Ze=window.innerWidth-Zt,qe=Gp(pe,[Zt,Math.max(Zt,Ze-ze)]);l.style.minWidth=Oe+"px",l.style.left=qe+"px"}else{const ce=S.right-P.right,pe=window.innerWidth-I.right-ce,Te=window.innerWidth-C.right-pe,Oe=C.width+Te,ze=Math.max(Oe,S.width),Ze=window.innerWidth-Zt,qe=Gp(pe,[Zt,Math.max(Zt,Ze-ze)]);l.style.minWidth=Oe+"px",l.style.right=qe+"px"}const R=f(),O=window.innerHeight-Zt*2,M=m.scrollHeight,V=window.getComputedStyle(u),z=parseInt(V.borderTopWidth,10),W=parseInt(V.paddingTop,10),U=parseInt(V.borderBottomWidth,10),G=parseInt(V.paddingBottom,10),te=z+W+M+G+U,A=Math.min(v.offsetHeight*5,te),fe=window.getComputedStyle(m),me=parseInt(fe.paddingTop,10),L=parseInt(fe.paddingBottom,10),ye=C.top+C.height/2-Zt,_e=O-ye,ge=v.offsetHeight/2,K=v.offsetTop+ge,X=z+W+K,ie=te-X;if(X<=ye){const ce=R.length>0&&v===R[R.length-1].ref.current;l.style.bottom="0px";const pe=u.clientHeight-m.offsetTop-m.offsetHeight,Te=Math.max(_e,ge+(ce?L:0)+pe+U),Oe=X+Te;l.style.height=Oe+"px"}else{const ce=R.length>0&&v===R[0].ref.current;l.style.top="0px";const Te=Math.max(ye,z+m.offsetTop+(ce?me:0)+ge)+ie;l.style.height=Te+"px",m.scrollTop=X-ye+m.offsetTop}l.style.margin=`${Zt}px 0`,l.style.minHeight=A+"px",l.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,l,u,m,v,y,o.dir,r]);Tt(()=>x(),[x]);const[b,w]=E.useState();Tt(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]);const _=E.useCallback(C=>{C&&g.current===!0&&(x(),p==null||p(),g.current=!1)},[x,p]);return N.jsx(hI,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:_,children:N.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:N.jsx(Ce.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});P5.displayName=dI;var fI="SelectPopperPosition",Bc=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Zt,...o}=e,s=Pa(n);return N.jsx(df,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bc.displayName=fI;var[hI,Kf]=eo(ii,{}),zc="SelectViewport",R5=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Nr(zc,n),s=Kf(zc,n),l=$e(t,o.onViewportChange),a=E.useRef(0);return N.jsxs(N.Fragment,{children:[N.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),N.jsx(La.Slot,{scope:n,children:N.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ve(i.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const h=Math.abs(a.current-c.scrollTop);if(h>0){const g=window.innerHeight-Zt*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(m,v);if(y<g){const p=y+h,x=Math.min(g,p),b=p-x;d.style.height=x+"px",d.style.bottom==="0px"&&(c.scrollTop=b>0?b:0,d.style.justifyContent="flex-end")}}}a.current=c.scrollTop})})})]})});R5.displayName=zc;var O5="SelectGroup",[gI,pI]=eo(O5),mI=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Wn();return N.jsx(gI,{scope:n,id:i,children:N.jsx(Ce.div,{role:"group","aria-labelledby":i,...r,ref:t})})});mI.displayName=O5;var M5="SelectLabel",xI=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=pI(M5,n);return N.jsx(Ce.div,{id:i.id,...r,ref:t})});xI.displayName=M5;var Hl="SelectItem",[yI,D5]=eo(Hl),$5=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,l=Ar(Hl,n),a=Nr(Hl,n),u=l.value===r,[c,d]=E.useState(o??""),[f,h]=E.useState(!1),g=$e(t,p=>{var x;return(x=a.itemRefCallback)==null?void 0:x.call(a,p,r,i)}),m=Wn(),v=E.useRef("touch"),y=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return N.jsx(yI,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:E.useCallback(p=>{d(x=>x||((p==null?void 0:p.textContent)??"").trim())},[]),children:N.jsx(La.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:N.jsx(Ce.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:ve(s.onFocus,()=>h(!0)),onBlur:ve(s.onBlur,()=>h(!1)),onClick:ve(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:ve(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:ve(s.onPointerDown,p=>{v.current=p.pointerType}),onPointerMove:ve(s.onPointerMove,p=>{var x;v.current=p.pointerType,i?(x=a.onItemLeave)==null||x.call(a):v.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ve(s.onPointerLeave,p=>{var x;p.currentTarget===document.activeElement&&((x=a.onItemLeave)==null||x.call(a))}),onKeyDown:ve(s.onKeyDown,p=>{var b;((b=a.searchRef)==null?void 0:b.current)!==""&&p.key===" "||(nI.includes(p.key)&&y(),p.key===" "&&p.preventDefault())})})})})});$5.displayName=Hl;var po="SelectItemText",V5=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=Ar(po,n),l=Nr(po,n),a=D5(po,n),u=sI(po,n),[c,d]=E.useState(null),f=$e(t,y=>d(y),a.onItemTextChange,y=>{var p;return(p=l.itemTextRefCallback)==null?void 0:p.call(l,y,a.value,a.disabled)}),h=c==null?void 0:c.textContent,g=E.useMemo(()=>N.jsx("option",{value:a.value,disabled:a.disabled,children:h},a.value),[a.disabled,a.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=u;return Tt(()=>(m(g),()=>v(g)),[m,v,g]),N.jsxs(N.Fragment,{children:[N.jsx(Ce.span,{id:a.textId,...o,ref:f}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?ki.createPortal(o.children,s.valueNode):null]})});V5.displayName=po;var H5="SelectItemIndicator",vI=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return D5(H5,n).isSelected?N.jsx(Ce.span,{"aria-hidden":!0,...r,ref:t}):null});vI.displayName=H5;var jc="SelectScrollUpButton",bI=E.forwardRef((e,t)=>{const n=Nr(jc,e.__scopeSelect),r=Kf(jc,e.__scopeSelect),[i,o]=E.useState(!1),s=$e(t,r.onScrollButtonChange);return Tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollTop>0;o(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?N.jsx(B5,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});bI.displayName=jc;var Uc="SelectScrollDownButton",_I=E.forwardRef((e,t)=>{const n=Nr(Uc,e.__scopeSelect),r=Kf(Uc,e.__scopeSelect),[i,o]=E.useState(!1),s=$e(t,r.onScrollButtonChange);return Tt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,c=Math.ceil(a.scrollTop)<u;o(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?N.jsx(B5,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=n;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});_I.displayName=Uc;var B5=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Nr("SelectScrollButton",n),s=E.useRef(null),l=Fa(n),a=E.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return E.useEffect(()=>()=>a(),[a]),Tt(()=>{var c;const u=l().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[l]),N.jsx(Ce.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ve(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:ve(i.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ve(i.onPointerLeave,()=>{a()})})}),CI="SelectSeparator",z5=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return N.jsx(Ce.div,{"aria-hidden":!0,...r,ref:t})});z5.displayName=CI;var Wc="SelectArrow",wI=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Pa(n),o=Ar(Wc,n),s=Nr(Wc,n);return o.open&&s.position==="popper"?N.jsx(ff,{...i,...r,ref:t}):null});wI.displayName=Wc;var EI="SelectBubbleInput",j5=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=E.useRef(null),o=$e(r,i),s=U2(t);return E.useEffect(()=>{const l=i.current;if(!l)return;const a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==t&&c){const d=new Event("change",{bubbles:!0});c.call(l,t),l.dispatchEvent(d)}},[s,t]),N.jsx(Ce.select,{...n,style:{..._5,...n.style},ref:o,defaultValue:t})});j5.displayName=EI;function U5(e){return e===""||e===void 0}function W5(e){const t=jr(e),n=E.useRef(""),r=E.useRef(0),i=E.useCallback(s=>{const l=n.current+s;t(l),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(l)},[t]),o=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function J5(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=SI(e,Math.max(o,0));i.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function SI(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kI=w5,TI=S5,II=T5,AI=I5,NI=A5,LI=N5,FI=R5,PI=$5,RI=V5,OI=z5,[Ra,pN]=Xn("Tooltip",[Xi]),Oa=Xi(),K5="TooltipProvider",MI=700,Jc="tooltip.open",[DI,Zf]=Ra(K5),Z5=e=>{const{__scopeTooltip:t,delayDuration:n=MI,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,s=E.useRef(!0),l=E.useRef(!1),a=E.useRef(0);return E.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),N.jsx(DI,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(u=>{l.current=u},[]),disableHoverableContent:i,children:o})};Z5.displayName=K5;var Uo="Tooltip",[$I,Es]=Ra(Uo),G5=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:s,delayDuration:l}=e,a=Zf(Uo,e.__scopeTooltip),u=Oa(t),[c,d]=E.useState(null),f=Wn(),h=E.useRef(0),g=s??a.disableHoverableContent,m=l??a.delayDuration,v=E.useRef(!1),[y,p]=Yn({prop:r,defaultProp:i??!1,onChange:C=>{C?(a.onOpen(),document.dispatchEvent(new CustomEvent(Jc))):a.onClose(),o==null||o(C)},caller:Uo}),x=E.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,p(!0)},[p]),w=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,p(!1)},[p]),_=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,p(!0),h.current=0},m)},[m,p]);return E.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),N.jsx(cf,{...u,children:N.jsx($I,{scope:t,contentId:f,open:y,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:E.useCallback(()=>{a.isOpenDelayedRef.current?_():b()},[a.isOpenDelayedRef,_,b]),onTriggerLeave:E.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:b,onClose:w,disableHoverableContent:g,children:n})})};G5.displayName=Uo;var Kc="TooltipTrigger",q5=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Es(Kc,n),o=Zf(Kc,n),s=Oa(n),l=E.useRef(null),a=$e(t,l,i.onTriggerChange),u=E.useRef(!1),c=E.useRef(!1),d=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),N.jsx(Ca,{asChild:!0,...s,children:N.jsx(Ce.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:a,onPointerMove:ve(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:ve(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:ve(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ve(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ve(e.onBlur,i.onClose),onClick:ve(e.onClick,i.onClose)})})});q5.displayName=Kc;var Gf="TooltipPortal",[VI,HI]=Ra(Gf,{forceMount:void 0}),Y5=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Es(Gf,t);return N.jsx(VI,{scope:t,forceMount:n,children:N.jsx(kr,{present:n||o.open,children:N.jsx(us,{asChild:!0,container:i,children:r})})})};Y5.displayName=Gf;var Hi="TooltipContent",X5=E.forwardRef((e,t)=>{const n=HI(Hi,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Es(Hi,e.__scopeTooltip);return N.jsx(kr,{present:r||s.open,children:s.disableHoverableContent?N.jsx(Q5,{side:i,...o,ref:t}):N.jsx(BI,{side:i,...o,ref:t})})}),BI=E.forwardRef((e,t)=>{const n=Es(Hi,e.__scopeTooltip),r=Zf(Hi,e.__scopeTooltip),i=E.useRef(null),o=$e(t,i),[s,l]=E.useState(null),{trigger:a,onClose:u}=n,c=i.current,{onPointerInTransitChange:d}=r,f=E.useCallback(()=>{l(null),d(!1)},[d]),h=E.useCallback((g,m)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},p=WI(y,v.getBoundingClientRect()),x=JI(y,p),b=KI(m.getBoundingClientRect()),w=GI([...x,...b]);l(w),d(!0)},[d]);return E.useEffect(()=>()=>f(),[f]),E.useEffect(()=>{if(a&&c){const g=v=>h(v,c),m=v=>h(v,a);return a.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{a.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[a,c,h,f]),E.useEffect(()=>{if(s){const g=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},p=(a==null?void 0:a.contains(v))||(c==null?void 0:c.contains(v)),x=!ZI(y,s);p?f():x&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[a,c,s,u,f]),N.jsx(Q5,{...e,ref:o})}),[zI,jI]=Ra(Uo,{isInside:!1}),UI=OS("TooltipContent"),Q5=E.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...l}=e,a=Es(Hi,n),u=Oa(n),{onClose:c}=a;return E.useEffect(()=>(document.addEventListener(Jc,c),()=>document.removeEventListener(Jc,c)),[c]),E.useEffect(()=>{if(a.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(a.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[a.trigger,c]),N.jsx(ls,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:N.jsxs(df,{"data-state":a.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[N.jsx(UI,{children:r}),N.jsx(zI,{scope:n,isInside:!0,children:N.jsx(eI,{id:a.contentId,role:"tooltip",children:i||r})})]})})});X5.displayName=Hi;var e2="TooltipArrow",t2=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Oa(n);return jI(e2,n).isInside?null:N.jsx(ff,{...i,...r,ref:t})});t2.displayName=e2;function WI(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function JI(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function KI(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ZI(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const l=t[o],a=t[s],u=l.x,c=l.y,d=a.x,f=a.y;c>r!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function GI(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qI(t)}function qI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var n2=Z5,r2=G5,i2=q5,o2=Y5,s2=X5,YI=t2;const qf=k.forwardRef(({title:e,children:t},n)=>{const r=Bt(os);return k.createElement(n2,{delayDuration:100},k.createElement(r2,null,k.createElement(i2,{ref:n,asChild:!0},k.createElement("span",{className:se.tooltipTrigger},t)),k.createElement(o2,{container:r==null?void 0:r.current},k.createElement(s2,{className:Le(se.tooltipContent),sideOffset:10},e))))}),XI=k.forwardRef(({children:e,className:t,...n},r)=>k.createElement(PI,{...n,ref:r,className:Le(t,se.selectItem)},k.createElement(RI,null,e))),QI=({title:e,placeholder:t,className:n})=>{const[r,i]=Ln(sn,Er);return k.createElement(qf,{title:e},k.createElement(TI,{"aria-label":t,className:Le(se.selectTrigger,n),"data-toolbar-item":!0,disabled:r},k.createElement(II,{placeholder:t}),k.createElement(AI,{className:se.selectDropdownArrow},i("arrow_drop_down"))))},eA=({children:e,className:t=se.selectContainer})=>{const n=Bt(os);return k.createElement(NI,{container:n==null?void 0:n.current},k.createElement(LI,{className:Le(t,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},k.createElement(FI,{"data-editor-dropdown":!0},e)))},tA=e=>k.createElement(kI,{value:e.value||"",onValueChange:e.onChange,disabled:e.disabled},k.createElement(QI,{title:e.triggerTitle,placeholder:e.placeholder}),k.createElement(eA,null,e.items.map((t,n)=>t==="separator"?k.createElement(OI,{key:n}):k.createElement(XI,{key:n,value:t.value},t.label))));function nA(e){try{const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?Kh(n)?r:i:Kh(t)?r:i}catch{return null}}function l2(e){const t=Q(),n=window.getSelection(),r=document.activeElement,i=e.getRootElement();if(t!==null&&n!==null&&i!==null&&i.contains(n.anchorNode)&&e.isEditable()){const o=n.getRangeAt(0);let s;if(n.isCollapsed){let l=n.anchorNode;(l==null?void 0:l.nodeType)==3&&(l=l.parentNode),s=l.getBoundingClientRect(),s.width=0}else if(n.anchorNode===i){let l=i;for(;l.firstElementChild!=null;)l=l.firstElementChild;s=l.getBoundingClientRect()}else s=o.getBoundingClientRect();return{top:Math.round(s.top),left:Math.round(s.left),width:Math.round(s.width),height:Math.round(s.height)}}else if(!r||r.className!=="link-input")return null;return null}function rA({url:e,title:t,onSubmit:n,onCancel:r,linkAutocompleteSuggestions:i}){const{register:o,handleSubmit:s,control:l,setValue:a,reset:u}=By({values:{url:e,title:t}}),c=tr();return k.createElement("form",{onSubmit:d=>{s(n)(d),d.stopPropagation(),d.preventDefault()},onReset:d=>{d.stopPropagation(),r()},className:Le(se.multiFieldForm,se.linkDialogEditForm)},k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"link-url"},c("createLink.url","URL")),k.createElement(h5,{register:o,initialInputValue:e,inputName:"url",suggestions:i,setValue:a,control:l,placeholder:c("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),k.createElement("div",{className:se.formField},k.createElement("label",{htmlFor:"link-title"},c("createLink.title","Title")),k.createElement("input",{id:"link-title",className:se.textInput,size:40,...o("title")})),k.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},k.createElement("button",{type:"submit",title:c("createLink.saveTooltip","Set URL"),"aria-label":c("createLink.saveTooltip","Set URL"),className:Le(se.primaryButton)},c("dialogControls.save","Save")),k.createElement("button",{type:"reset",title:c("createLink.cancelTooltip","Cancel change"),"aria-label":c("createLink.cancelTooltip","Cancel change"),className:Le(se.secondaryButton)},c("dialogControls.cancel","Cancel"))))}const iA=()=>{const[e,t,n,r,i,o]=Ln(os,Qe,Er,vt,g2,p2),s=Pt(a2),l=Pt(u2),a=Pt(c2),u=Pt(d2),c=Pt(f2);k.useEffect(()=>{const v=()=>{t==null||t.getEditorState().read(()=>{s(!0)})};return window.addEventListener("resize",v),window.addEventListener("scroll",v),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v)}},[t,s]);const[d,f]=k.useState(!1),h=tr();if(r.type==="inactive")return null;const g=r.rectangle,m=r.type==="preview"&&r.url.startsWith("http");return k.createElement(O6,{open:!0},k.createElement(M6,{"data-visible":r.type==="edit",className:se.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),k.createElement(D6,{container:e==null?void 0:e.current},k.createElement($6,{className:Le(se.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:v=>{v.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&k.createElement(rA,{url:r.url,title:r.title,onSubmit:l,onCancel:a.bind(null),linkAutocompleteSuggestions:i}),r.type==="preview"&&k.createElement(k.Fragment,null,k.createElement("a",{className:se.linkDialogPreviewAnchor,href:r.url,...m?{target:"_blank",rel:"noreferrer"}:{},onClick:v=>{o!==null&&(v.preventDefault(),o(r.url))},title:m?h("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},k.createElement("span",null,r.url),m&&n("open_in_new")),k.createElement(Cu,{onClick:()=>{u()},title:h("linkPreview.edit","Edit link URL"),"aria-label":h("linkPreview.edit","Edit link URL")},n("edit")),k.createElement(n2,null,k.createElement(r2,{open:d},k.createElement(i2,{asChild:!0},k.createElement(Cu,{title:h("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":h("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{f(!0),setTimeout(()=>{f(!1)},1e3)})}},n(d?"check":"content_copy"))),k.createElement(o2,{container:e==null?void 0:e.current},k.createElement(s2,{className:Le(se.tooltipContent),sideOffset:5},h("linkPreview.copied","Copied!"),k.createElement(YI,null))))),k.createElement(Cu,{title:h("linkPreview.remove","Remove link"),"aria-label":h("linkPreview.remove","Remove link"),onClick:()=>{c()}},n("link_off"))),k.createElement(V6,{className:se.popoverArrow}))))},Cu=k.forwardRef(({className:e,...t},n)=>k.createElement("button",{className:Le(se.actionButton,e),ref:n,...t}));function Zc(e){if(!e)return null;const t=nA(e);if(t===null)return null;const n=t.getParent();return bn(n)?n:bn(t)?t:null}const a2=lt(),vt=ue({type:"inactive"},e=>{e.pub(Ho,t=>t.registerCommand(Ko,()=>e.getValue(vt).type==="preview"?(e.pub(vt,{type:"inactive"}),!0):!1,De)),e.sub(e.pipe(Cl),t=>{t!=="rich-text"&&e.pub(vt,{type:"inactive"})}),e.pub(Ho,t=>t.registerCommand(Lm,n=>{if(n.key==="k"&&(El?n.metaKey:n.ctrlKey)&&!e.getValue(sn)){const r=Q();return J(r)?(e.pub(h2),n.stopPropagation(),n.preventDefault(),!0):!1}return!1},Ju)),e.link(e.pipe(d2,Ue(vt),yi(([,t])=>{if(t.type==="preview")return{type:"edit",initialUrl:t.url,url:t.url,title:t.title,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot switch to edit mode when not in preview mode")})),vt),e.sub(e.pipe(u2,Ue(Qe,vt,Oi)),([t,n,r,i])=>{var o,s;const l=((o=t.url)==null?void 0:o.trim())??"",a=((s=t.title)==null?void 0:s.trim())??"";if(l!==""){if(i!=null&&i.isCollapsed()){const u=a||l;n==null||n.update(()=>{const c=Zc(i);if(c)c.setURL(l),c.setTitle(a);else{const d=ti(l,{title:a});d.append(He(u)),ji([d]),d.select()}},{discrete:!0})}else n==null||n.dispatchCommand(Vi,{url:l,title:a});e.pub(vt,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:a,url:l})}else r.type==="edit"&&r.initialUrl!==""&&(n==null||n.dispatchCommand(Vi,null)),e.pub(vt,{type:"inactive"})}),e.link(e.pipe(c2,Ue(vt,Qe),yi(([,t,n])=>{if(t.type==="edit")return n==null||n.focus(),t.initialUrl===""?{type:"inactive"}:{type:"preview",url:t.initialUrl,linkNodeKey:t.linkNodeKey,rectangle:t.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),vt),e.link(e.pipe(e.combine(Oi,a2),Ue(Qe,vt,sn),yi(([[t],n,r,i])=>{if(J(t)&&n&&!i){const o=Zc(t);if(o){const s=l2(n);return s?{type:"preview",url:o.getURL(),linkNodeKey:o.getKey(),title:o.getTitle(),rectangle:s}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),vt)}),u2=lt(),c2=xr();xr();const d2=xr(),f2=xr(e=>{e.sub(e.pipe(f2,Ue(Qe)),([,t])=>{t==null||t.dispatchCommand(Vi,null)})}),h2=xr(e=>{e.sub(e.pipe(h2,Ue(Oi,Qe),Wo(([,t])=>J(t))),([,t,n])=>{n==null||n.focus(()=>{setTimeout(()=>{n.getEditorState().read(()=>{const r=Zc(t),i=l2(n);r?e.pub(vt,{type:"edit",initialUrl:r.getURL(),initialTitle:r.getTitle()??"",url:r.getURL(),title:r.getTitle()??"",linkNodeKey:r.getKey(),rectangle:i}):e.pub(vt,{type:"edit",initialUrl:"",initialTitle:"",title:"",url:"",linkNodeKey:"",rectangle:i})})})})})}),g2=ue([]),p2=ue(null),m2=ue(null,e=>{e.pub(Ho,t=>{function n(r){const[i,o]=e.getValues([sn,m2]);!i||o===null||t.update(()=>{const s=In(r.target);if(s!==null){const l=vr(s,a=>a instanceof li);l!==null&&o(r,l,l.getURL())}})}return t.registerRootListener((r,i)=>{r&&r.addEventListener("click",n),i&&i.removeEventListener("click",n)})})}),oA=un({init(e,t){e.pub(si,(t==null?void 0:t.LinkDialog)??iA),e.pub(p2,(t==null?void 0:t.onClickLinkCallback)??null),e.pub(m2,(t==null?void 0:t.onReadOnlyClickLinkCallback)??null)},update(e,t={}){e.pub(g2,t.linkAutocompleteSuggestions??[])}});function Yf(e,t){return k.forwardRef((n,r)=>{const i=Le(t.className,n.className);return k.createElement(e,{...t,...n,className:i,ref:r})})}const sA=({readOnly:e,children:t,className:n})=>k.createElement(h8,{className:Le("mdxeditor-toolbar",se.toolbarRoot,{[se.readOnlyToolbarRoot]:e},n),...e?{tabIndex:-1}:{}},t);Yf(ly,{className:se.toolbarButton,"data-toolbar-item":!0});const lA=Yf(p8,{className:se.toolbarToggleItem,"data-toolbar-item":!0});Yf(ay,{type:"single",className:se.toolbarToggleSingleGroup});const x2=k.forwardRef(({on:e,title:t,children:n,disabled:r,...i},o)=>k.createElement(ay,{type:"single",className:se.toolbarToggleSingleGroup,...i,value:e?"on":"off",ref:o},k.createElement(lA,{"aria-label":t,value:"on",disabled:r},k.createElement(qf,{title:t},n)))),aA=({items:e})=>k.createElement("div",{className:se.toolbarGroupOfGroups},e.map((t,n)=>k.createElement(x2,{key:n,title:t.title,on:t.active,onValueChange:r=>{t.onChange(r==="on")},disabled:t.disabled},t.contents))),uA=g8,wu=ue(()=>null),Eu=ue(""),qp=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",cA=un({init(e,t){const n=(t==null?void 0:t.toolbarPosition)==="bottom"?CE:_E;e.pubIn({[wu]:(t==null?void 0:t.toolbarContents)??qp,[Eu]:(t==null?void 0:t.toolbarClassName)??"",[n]:()=>{const[r,i,o]=Ln(wu,sn,Eu);return k.createElement(sA,{className:o,readOnly:i},r())}})},update(e,t){e.pub(wu,(t==null?void 0:t.toolbarContents)??qp),e.pub(Eu,(t==null?void 0:t.toolbarClassName)??"")}});var dA={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
85
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
86
|
-
*
|
|
87
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
88
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
89
|
-
* @namespace
|
|
90
|
-
* @public
|
|
91
|
-
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function p(x){return x instanceof a?new a(x.type,p(x.content),x.alias):Array.isArray(x)?x.map(p):x.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(p){return Object.prototype.toString.call(p).slice(8,-1)},objId:function(p){return p.__id||Object.defineProperty(p,"__id",{value:++o}),p.__id},clone:function p(x,b){b=b||{};var w,_;switch(l.util.type(x)){case"Object":if(_=l.util.objId(x),b[_])return b[_];w={},b[_]=w;for(var C in x)x.hasOwnProperty(C)&&(w[C]=p(x[C],b));return w;case"Array":return _=l.util.objId(x),b[_]?b[_]:(w=[],b[_]=w,x.forEach(function(S,I){w[I]=p(S,b)}),w);default:return x}},getLanguage:function(p){for(;p;){var x=i.exec(p.className);if(x)return x[1].toLowerCase();p=p.parentElement}return"none"},setLanguage:function(p,x){p.className=p.className.replace(RegExp(i,"gi"),""),p.classList.add("language-"+x)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var p=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(p){var x=document.getElementsByTagName("script");for(var b in x)if(x[b].src==p)return x[b]}return null}},isActive:function(p,x,b){for(var w="no-"+x;p;){var _=p.classList;if(_.contains(x))return!0;if(_.contains(w))return!1;p=p.parentElement}return!!b}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(p,x){var b=l.util.clone(l.languages[p]);for(var w in x)b[w]=x[w];return b},insertBefore:function(p,x,b,w){w=w||l.languages;var _=w[p],C={};for(var S in _)if(_.hasOwnProperty(S)){if(S==x)for(var I in b)b.hasOwnProperty(I)&&(C[I]=b[I]);b.hasOwnProperty(S)||(C[S]=_[S])}var P=w[p];return w[p]=C,l.languages.DFS(l.languages,function(R,O){O===P&&R!=p&&(this[R]=C)}),C},DFS:function p(x,b,w,_){_=_||{};var C=l.util.objId;for(var S in x)if(x.hasOwnProperty(S)){b.call(x,S,x[S],w||S);var I=x[S],P=l.util.type(I);P==="Object"&&!_[C(I)]?(_[C(I)]=!0,p(I,b,null,_)):P==="Array"&&!_[C(I)]&&(_[C(I)]=!0,p(I,b,S,_))}}},plugins:{},highlightAll:function(p,x){l.highlightAllUnder(document,p,x)},highlightAllUnder:function(p,x,b){var w={callback:b,container:p,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),l.hooks.run("before-all-elements-highlight",w);for(var _=0,C;C=w.elements[_++];)l.highlightElement(C,x===!0,w.callback)},highlightElement:function(p,x,b){var w=l.util.getLanguage(p),_=l.languages[w];l.util.setLanguage(p,w);var C=p.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(C,w);var S=p.textContent,I={element:p,language:w,grammar:_,code:S};function P(O){I.highlightedCode=O,l.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,l.hooks.run("after-highlight",I),l.hooks.run("complete",I),b&&b.call(I.element)}if(l.hooks.run("before-sanity-check",I),C=I.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!I.code){l.hooks.run("complete",I),b&&b.call(I.element);return}if(l.hooks.run("before-highlight",I),!I.grammar){P(l.util.encode(I.code));return}if(x&&r.Worker){var R=new Worker(l.filename);R.onmessage=function(O){P(O.data)},R.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else P(l.highlight(I.code,I.grammar,I.language))},highlight:function(p,x,b){var w={code:p,grammar:x,language:b};if(l.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=l.tokenize(w.code,w.grammar),l.hooks.run("after-tokenize",w),a.stringify(l.util.encode(w.tokens),w.language)},tokenize:function(p,x){var b=x.rest;if(b){for(var w in b)x[w]=b[w];delete x.rest}var _=new d;return f(_,_.head,p),c(p,_,x,_.head,0),g(_)},hooks:{all:{},add:function(p,x){var b=l.hooks.all;b[p]=b[p]||[],b[p].push(x)},run:function(p,x){var b=l.hooks.all[p];if(!(!b||!b.length))for(var w=0,_;_=b[w++];)_(x)}},Token:a};r.Prism=l;function a(p,x,b,w){this.type=p,this.content=x,this.alias=b,this.length=(w||"").length|0}a.stringify=function p(x,b){if(typeof x=="string")return x;if(Array.isArray(x)){var w="";return x.forEach(function(P){w+=p(P,b)}),w}var _={type:x.type,content:p(x.content,b),tag:"span",classes:["token",x.type],attributes:{},language:b},C=x.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(_.classes,C):_.classes.push(C)),l.hooks.run("wrap",_);var S="";for(var I in _.attributes)S+=" "+I+'="'+(_.attributes[I]||"").replace(/"/g,""")+'"';return"<"+_.tag+' class="'+_.classes.join(" ")+'"'+S+">"+_.content+"</"+_.tag+">"};function u(p,x,b,w){p.lastIndex=x;var _=p.exec(b);if(_&&w&&_[1]){var C=_[1].length;_.index+=C,_[0]=_[0].slice(C)}return _}function c(p,x,b,w,_,C){for(var S in b)if(!(!b.hasOwnProperty(S)||!b[S])){var I=b[S];I=Array.isArray(I)?I:[I];for(var P=0;P<I.length;++P){if(C&&C.cause==S+","+P)return;var R=I[P],O=R.inside,M=!!R.lookbehind,V=!!R.greedy,z=R.alias;if(V&&!R.pattern.global){var W=R.pattern.toString().match(/[imsuy]*$/)[0];R.pattern=RegExp(R.pattern.source,W+"g")}for(var U=R.pattern||R,G=w.next,te=_;G!==x.tail&&!(C&&te>=C.reach);te+=G.value.length,G=G.next){var A=G.value;if(x.length>p.length)return;if(!(A instanceof a)){var fe=1,me;if(V){if(me=u(U,te,p,M),!me||me.index>=p.length)break;var ge=me.index,L=me.index+me[0].length,ye=te;for(ye+=G.value.length;ge>=ye;)G=G.next,ye+=G.value.length;if(ye-=G.value.length,te=ye,G.value instanceof a)continue;for(var _e=G;_e!==x.tail&&(ye<L||typeof _e.value=="string");_e=_e.next)fe++,ye+=_e.value.length;fe--,A=p.slice(te,ye),me.index-=te}else if(me=u(U,0,A,M),!me)continue;var ge=me.index,K=me[0],X=A.slice(0,ge),ie=A.slice(ge+K.length),oe=te+A.length;C&&oe>C.reach&&(C.reach=oe);var ce=G.prev;X&&(ce=f(x,ce,X),te+=X.length),h(x,ce,fe);var pe=new a(S,O?l.tokenize(K,O):K,z,K);if(G=f(x,ce,pe),ie&&f(x,G,ie),fe>1){var Te={cause:S+","+P,reach:oe};c(p,x,b,G.prev,te,Te),C&&Te.reach>C.reach&&(C.reach=Te.reach)}}}}}}function d(){var p={value:null,prev:null,next:null},x={value:null,prev:p,next:null};p.next=x,this.head=p,this.tail=x,this.length=0}function f(p,x,b){var w=x.next,_={value:b,prev:x,next:w};return x.next=_,w.prev=_,p.length++,_}function h(p,x,b){for(var w=x.next,_=0;_<b&&w!==p.tail;_++)w=w.next;x.next=w,w.prev=x,p.length-=_}function g(p){for(var x=[],b=p.head.next;b!==p.tail;)x.push(b.value),b=b.next;return x}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(p){var x=JSON.parse(p.data),b=x.language,w=x.code,_=x.immediateClose;r.postMessage(l.highlight(w,l.languages[b],b)),_&&r.close()},!1)),l;var m=l.util.currentScript();m&&(l.filename=m.src,m.hasAttribute("data-manual")&&(l.manual=!0));function v(){l.manual||l.highlightAll()}if(!l.manual){var y=document.readyState;y==="loading"||y==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return l}(t);e.exports&&(e.exports=n),typeof th<"u"&&(th.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function f(m,v,y){var p=new XMLHttpRequest;p.open("GET",m,!0),p.onreadystatechange=function(){p.readyState==4&&(p.status<400&&p.responseText?v(p.responseText):p.status>=400?y(i(p.status,p.statusText)):y(o))},p.send(null)}function h(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var y=Number(v[1]),p=v[2],x=v[3];return p?x?[y,Number(x)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+d}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(d)){m.code="",v.setAttribute(l,a);var y=v.appendChild(document.createElement("CODE"));y.textContent=r;var p=v.getAttribute("data-src"),x=m.language;if(x==="none"){var b=(/\.(\w+)$/.exec(p)||[,"none"])[1];x=s[b]||b}n.util.setLanguage(y,x),n.util.setLanguage(v,x);var w=n.plugins.autoloader;w&&w.loadLanguages(x),f(p,function(_){v.setAttribute(l,u);var C=h(v.getAttribute("data-range"));if(C){var S=_.split(/\r\n?|\n/g),I=C[0],P=C[1]==null?S.length:C[1];I<0&&(I+=S.length),I=Math.max(0,Math.min(I-1,S.length)),P<0&&(P+=S.length),P=Math.max(0,Math.min(P,S.length)),_=S.slice(I,P).join(`
|
|
92
|
-
`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(I+1))}y.textContent=_,n.highlightElement(y)},function(_){v.setAttribute(l,c),y.textContent=_})}}),n.plugins.fileHighlight={highlight:function(v){for(var y=(v||document).querySelectorAll(d),p=0,x;x=y[p++];)n.highlightElement(x)}};var g=!1;n.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(dA);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var h=0,g=f.length;h<g;h++){var m=f[h];if(m.type!=="code"){d(m.content);continue}var v=m.content[1],y=m.content[3];if(v&&y&&v.type==="code-language"&&y.type==="code-block"&&typeof v.content=="string"){var p=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");p=(/[a-z][\w-]*/i.exec(p)||[""])[0].toLowerCase();var x="language-"+p;y.alias?typeof y.alias=="string"?y.alias=[y.alias,x]:y.alias.push(x):y.alias=[x]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",f=0,h=c.classes.length;f<h;f++){var g=c.classes[f],m=/language-(.+)/.exec(g);if(m){d=m[1];break}}var v=e.languages[d];if(v)c.content=e.highlight(u(c.content),v,d);else if(d&&d!=="none"&&e.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=y,e.plugins.autoloader.loadLanguages(d,function(){var p=document.getElementById(y);p&&(p.innerHTML=e.highlight(p.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,h){if(h=h.toLowerCase(),h[0]==="#"){var g;return h[1]==="x"?g=parseInt(h.slice(2),16):g=Number(h.slice(1)),a(g)}else{var m=l[h];return m||f}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);const fA=globalThis.Prism||window.Prism,Yp=e=>{try{return!!e&&fA.languages.hasOwnProperty(e)}catch{return!1}};function y2(e,t){for(const n of e.childNodes){if(Ke(n)&&n.tagName===t)return!0;y2(n,t)}return!1}const mo="data-language",zs="data-highlight-language";let Xf=class v2 extends dn{static getType(){return"code"}static clone(t){return new v2(t.__language,t.__key)}constructor(t,n){super(n),this.__language=t||void 0,this.__isSyntaxHighlightSupported=Yp(t)}createDOM(t){const n=document.createElement("code");on(n,t.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(mo,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(zs,r)),n}updateDOM(t,n,r){const i=this.__language,o=t.__language;return i?i!==o&&(n.setAttribute(mo,i),this.__isSyntaxHighlightSupported&&n.setAttribute(zs,i)):o&&(n.removeAttribute(mo),t.__isSyntaxHighlightSupported&&n.removeAttribute(zs)),!1}exportDOM(t){const n=document.createElement("pre");on(n,t._config.theme.code),n.setAttribute("spellcheck","false");const r=this.getLanguage();return r&&(n.setAttribute(mo,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(zs,r)),{element:n}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||y2(t,"BR"))?{conversion:Xp,priority:1}:null,div:()=>({conversion:hA,priority:1}),pre:()=>({conversion:Xp,priority:0}),table:t=>Su(t)?{conversion:gA,priority:3}:null,td:t=>{const n=t,r=n.closest("table");return n.classList.contains("js-file-line")||r&&Su(r)?{conversion:Qp,priority:3}:null},tr:t=>{const n=t.closest("table");return n&&Su(n)?{conversion:Qp,priority:3}:null}}}static importJSON(t){return Un().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage()}}insertNewAfter(t,n=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
|
|
93
|
-
`&&r[i-2].getTextContent()===`
|
|
94
|
-
`&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const a=Ne();return this.insertAfter(a,n),a}const{anchor:o,focus:s}=t,l=(o.isBefore(s)?o:s).getNode();if(ee(l)){let a=mA(l);const u=[];for(;;)if(xd(a))u.push(Bi()),a=a.getNextSibling();else{if(!_2(a))break;{let v=0;const y=a.getTextContent(),p=a.getTextContentSize();for(;v<p&&y[v]===" ";)v++;if(v!==0&&u.push(b2(" ".repeat(v))),v!==p)break;a=a.getNextSibling()}}const c=l.splitText(o.offset)[0],d=o.offset===0?0:1,f=c.getIndexWithinParent()+d,h=l.getParentOrThrow(),g=[nn(),...u];h.splice(f,0,g);const m=u[u.length-1];m?m.select():o.offset===0?c.selectPrevious():c.getNextSibling().selectNext(0,0)}if(Qf(l)){const{offset:a}=t.anchor;l.splice(a,0,[nn()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Ne();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}setLanguage(t){const n=this.getWritable();return n.__language=t||void 0,n.__isSyntaxHighlightSupported=Yp(t),n}getLanguage(){return this.getLatest().__language}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}};function Un(e){return It(new Xf(e))}function Qf(e){return e instanceof Xf}function Xp(e){return{node:Un(e.getAttribute(mo))}}function hA(e){const t=e,n=em(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(em(i))return!0;i=i.parentElement}return!1}(t)?{node:n?Un():null}:{node:null}}function gA(){return{node:Un()}}function Qp(){return{node:null}}function em(e){return e.style.fontFamily.match("monospace")!==null}function Su(e){return e.classList.contains("js-file-line-container")}class Ma extends Fn{constructor(t="",n,r){super(t,r),this.__highlightType=n}static getType(){return"code-highlight"}static clone(t){return new Ma(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const n=this.getWritable();return n.__highlightType=t||void 0,n}canHaveFormat(){return!1}createDOM(t){const n=super.createDOM(t),r=ku(t.theme,this.__highlightType);return on(n,r),n}updateDOM(t,n,r){const i=super.updateDOM(t,n,r),o=ku(r.theme,t.__highlightType),s=ku(r.theme,this.__highlightType);return o!==s&&(o&&aa(n,o),s&&on(n,s)),i}static importJSON(t){return b2().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return Un()}}function ku(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function b2(e="",t){return It(new Ma(e,t))}function _2(e){return e instanceof Ma}function pA(e,t){let n=e;for(let r=pt(e,t);r&&(_2(r.origin)||xd(r.origin));r=jb(r))n=r.origin;return n}function mA(e){return pA(e,"previous")}function Gc(e,t){const n={};for(const r of e){const i=t(r);i&&(n[i]?n[i].push(r):n[i]=[r])}return n}function xA(e){const t=Gc(e,n=>n.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const tm=/[!-/:-@[-`{-~\s]/,C2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,yA=C2&&"documentMode"in document?document.documentMode:null;C2&&"InputEvent"in window&&!yA&&new window.InputEvent("input");function vA(e){return ee(e)&&!e.hasFormat("code")}function bA(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);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 nm(e,t,n){const r=n.length;for(let i=t;i>=r;i--){const o=i-r;if(w2(e,o,n,0,r)&&e[o+r]!==" ")return o}return-1}function w2(e,t,n,r,i){for(let o=0;o<i;o++)if(e[t+o]!==n[r+o])return!1;return!0}function _A(e,t=D2){const n=xA(t),r=Gc(n.textFormat,({tag:s})=>s[s.length-1]),i=Gc(n.textMatch,({trigger:s})=>s);for(const s of t){const l=s.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=s.dependencies;for(const u of a)e.hasNode(u)||bA(173,u.getType())}}const o=(s,l,a)=>{(function(u,c,d,f){const h=u.getParent();if(!We(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExp:m,replace:v}of f){const y=g.match(m);if(y&&y[0].length===(y[0].endsWith(" ")?d:d-1)){const p=c.getNextSiblings(),[x,b]=c.splitText(d);if(x.remove(),v(u,b?[b,...p]:p,y,!1)!==!1)return!0}}return!1})(s,l,a,n.element)||function(u,c,d,f){const h=u.getParent();if(!We(h)||u.getFirstChild()!==c)return!1;const g=c.getTextContent();if(g[d-1]!==" ")return!1;for(const{regExpStart:m,replace:v,regExpEnd:y}of f){if(y&&!("optional"in y)||y&&"optional"in y&&!y.optional)continue;const p=g.match(m);if(p&&p[0].length===(p[0].endsWith(" ")?d:d-1)){const x=c.getNextSiblings(),[b,w]=c.splitText(d);if(b.remove(),v(u,w?[w,...x]:x,p,null,null,!1)!==!1)return!0}}return!1}(s,l,a,n.multilineElement)||function(u,c,d){let f=u.getTextContent();const h=d[f[c-1]];if(h==null)return!1;c<f.length&&(f=f.slice(0,c));for(const g of h){if(!g.replace||!g.regExp)continue;const m=f.match(g.regExp);if(m===null)continue;const v=m.index||0,y=v+m[0].length;let p;return v===0?[p]=u.splitText(y):[,p]=u.splitText(v,y),p.selectNext(0,0),g.replace(p,m),!0}return!1}(l,a,i)||function(u,c,d){const f=u.getTextContent(),h=c-1,g=f[h],m=d[g];if(!m)return!1;for(const v of m){const{tag:y}=v,p=y.length,x=h-p+1;if(p>1&&!w2(f,x,y,0,p)||f[x-1]===" ")continue;const b=f[h+1];if(v.intraword===!1&&b&&!tm.test(b))continue;const w=u;let _=w,C=nm(f,x,y),S=_;for(;C<0&&(S=S.getPreviousSibling())&&!tn(S);)if(ee(S)){const U=S.getTextContent();_=S,C=nm(U,U.length,y)}if(C<0||_===w&&C+p===x)continue;const I=_.getTextContent();if(C>0&&I[C-1]===g)continue;const P=I[C-1];if(v.intraword===!1&&P&&!tm.test(P))continue;const R=w.getTextContent(),O=R.slice(0,x)+R.slice(h+1);w.setTextContent(O);const M=_===w?O:I;_.setTextContent(M.slice(0,C)+M.slice(C+p));const V=Q(),z=qo();nt(z);const W=h-p*(_===w?2:1)+1;z.anchor.set(_.__key,C,"text"),z.focus.set(w.__key,W,"text");for(const U of v.format)z.hasFormat(U)||z.formatText(U);z.anchor.set(z.focus.key,z.focus.offset,z.focus.type);for(const U of v.format)z.hasFormat(U)&&z.toggleFormat(U);return J(V)&&(z.format=V.format),!0}}(l,a,r)};return e.registerUpdateListener(({tags:s,dirtyLeaves:l,editorState:a,prevEditorState:u})=>{if(s.has("collaboration")||s.has("historic")||e.isComposing())return;const c=a.read(Q),d=u.read(Q);if(!J(d)||!J(c)||!c.isCollapsed()||c.is(d))return;const f=c.anchor.key,h=c.anchor.offset,g=a._nodeMap.get(f);!ee(g)||!l.has(f)||h!==1&&h>d.anchor.offset+1||e.update(()=>{if(!vA(g))return;const m=g.getParent();m===null||Qf(m)||o(m,g,c.anchor.offset)})})}const CA=/^(\s*)(\d{1,})\.\s/,wA=/^(\s*)[-*+]\s/,EA=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,SA=/^(#{1,6})\s/,kA=/^>\s/,TA=/^[ \t]*```(\w+)?/,IA=/[ \t]*```$/,E2=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},eh=e=>(t,n,r)=>{const i=t.getPreviousSibling(),o=t.getNextSibling(),s=xt(e==="check"?r[3]==="x":void 0);if(xe(o)&&o.getListType()===e){const a=o.getFirstChild();a!==null?a.insertBefore(s):o.append(s),t.remove()}else if(xe(i)&&i.getListType()===e)i.append(s),t.remove();else{const a=mt(e,e==="number"?Number(r[2]):void 0);a.append(s),t.replace(a)}s.append(...n),s.select(0,0);const l=function(a){const u=a.match(/\t/g),c=a.match(/ /g);let d=0;return u&&(d+=u.length),c&&(d+=Math.floor(c.length/4)),d}(r[1]);l&&s.setIndent(l)},Da=(e,t,n)=>{const r=[],i=e.getChildren();let o=0;for(const s of i)if(ke(s)){if(s.getChildrenSize()===1){const c=s.getFirstChild();if(xe(c)){r.push(Da(c,t,n+1));continue}}const l=" ".repeat(4*n),a=e.getListType(),u=a==="number"?`${e.getStart()+o}. `:a==="check"?`- [${s.getChecked()?"x":" "}] `:"- ";r.push(l+u+t(s)),o++}return r.join(`
|
|
95
|
-
`)},AA={dependencies:[rs],export:(e,t)=>{if(!ca(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:SA,replace:E2(e=>{const t="h"+e[1].length;return _n(t)}),type:"element"},S2={dependencies:[ua],export:(e,t)=>{if(!tc(e))return null;const n=t(e).split(`
|
|
96
|
-
`),r=[];for(const i of n)r.push("> "+i);return r.join(`
|
|
97
|
-
`)},regExp:kA,replace:(e,t,n,r)=>{if(r){const o=e.getPreviousSibling();if(tc(o))return o.splice(o.getChildrenSize(),0,[nn(),...t]),o.select(0,0),void e.remove()}const i=ns();i.append(...t),e.replace(i),i.select(0,0)},type:"element"},k2={dependencies:[Xf],export:e=>{if(!Qf(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?`
|
|
98
|
-
`+t:"")+"\n```"},regExpEnd:{optional:!0,regExp:IA},regExpStart:TA,replace:(e,t,n,r,i,o)=>{let s,l;if(!t&&i){if(i.length===1)r?(s=Un(),l=n[1]+i[0]):(s=Un(n[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(s=Un(n[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
|
|
99
|
-
`)}const a=He(l);s.append(a),e.append(s)}else t&&E2(a=>Un(a?a[1]:void 0))(e,t,n,o)},type:"multiline-element"},T2={dependencies:[Sr,fn],export:(e,t)=>xe(e)?Da(e,t,0):null,regExp:wA,replace:eh("bullet"),type:"element"},NA={dependencies:[Sr,fn],export:(e,t)=>xe(e)?Da(e,t,0):null,regExp:EA,replace:eh("check"),type:"element"},I2={dependencies:[Sr,fn],export:(e,t)=>xe(e)?Da(e,t,0):null,regExp:CA,replace:eh("number"),type:"element"},A2={format:["code"],tag:"`",type:"text-format"},LA={format:["highlight"],tag:"==",type:"text-format"},N2={format:["bold","italic"],tag:"***",type:"text-format"},L2={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},F2={format:["bold"],tag:"**",type:"text-format"},P2={format:["bold"],intraword:!1,tag:"__",type:"text-format"},FA={format:["strikethrough"],tag:"~~",type:"text-format"},R2={format:["italic"],tag:"*",type:"text-format"},O2={format:["italic"],intraword:!1,tag:"_",type:"text-format"},M2={dependencies:[li],export:(e,t,n)=>{if(!bn(e))return null;const r=e.getTitle(),i=t(e);return r?`[${i}](${e.getURL()} "${r}")`:`[${i}](${e.getURL()})`},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,r,i]=t,o=ti(r,{title:i}),s=He(n);return s.setFormat(e.getFormat()),o.append(s),e.replace(o),s},trigger:")",type:"text-match"},PA=[AA,S2,T2,I2],RA=[k2],OA=[A2,N2,L2,F2,P2,LA,R2,O2,FA],MA=[M2],D2=[...PA,...RA,...OA,...MA],DA=[{dependencies:[ss],export:e=>xa(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Gi();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"},...D2];function rm({transformers:e=DA}){const[t]=yt();return E.useEffect(()=>_A(t,e),[t,e]),null}const $A=un({init(e){const t=e.getValue(Xd),n=t.includes("headings")?e.getValue(ma):[],r=BA(t,n);e.pubIn({[si]:()=>k.createElement(rm,{transformers:r}),[P0]:()=>k.createElement(rm,{transformers:r})})}}),VA=e=>(t,n,r)=>{const i=e(r);i.append(...n),t.replace(i),i.select(0,0)},HA={dependencies:[ss],export:e=>xa(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{const i=Gi();r||e.getNextSibling()!=null?e.replace(i):e.insertBefore(i),i.selectNext()},type:"element"};function BA(e,t){const n=[N2,L2,F2,P2,A2,R2,O2];if(e.includes("headings")){const r=Math.min(...t),i=Math.max(...t),o=new RegExp(`^(#{${r},${i}})\\s`),s={dependencies:[rs],export:(l,a)=>{if(!ca(l))return null;const u=Number(l.getTag().slice(1));return"#".repeat(u)+" "+a(l)},regExp:o,replace:VA(l=>{const a=`h${l[1].length}`;return _n(a)}),type:"element"};n.push(s)}if(e.includes("thematicBreak")&&n.push(HA),e.includes("quote")&&n.push(S2),e.includes("link")&&n.push(M2),e.includes("lists")&&n.push(I2,T2,NA),e.includes("codeblock")){const r={...k2,dependencies:[Qi],replace:(i,o,s)=>{const l=ws({code:"",language:s[1]??"",meta:""});i.replace(l),setTimeout(()=>{l.select()},80)}};n.push(r)}return n}const zA=()=>{const e=Pt(_l),t=Bt(R0),n=Bt(Xd),r=n.includes("quote"),i=n.includes("headings"),o=tr();if(!r&&!i)return null;const s=[{label:o("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&s.push({label:o("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const l=Bt(ma);s.push(...l.map(a=>({label:o("toolbar.blockTypes.heading","Heading {{level}}",{level:a}),value:`h${a}`})))}return k.createElement(tA,{value:t,onChange:l=>{switch(l){case"quote":e(()=>ns());break;case"paragraph":e(()=>Ne());break;case"":break;default:if(l.startsWith("h"))e(()=>_n(l));else throw new Error(`Unknown block type: ${l}`)}},triggerTitle:o("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:o("toolbar.blockTypeSelect.placeholder","Block type"),items:s})},Tu=({format:e,addTitle:t,removeTitle:n,icon:r,formatName:i})=>{const[o,s]=Ln(f0,Er),l=Pt(h0),a=(o&e)!==0;return k.createElement(x2,{title:a?n:t,on:a,onValueChange:()=>{l(i)}},s(r))},jA=({options:e})=>{const t=tr(),n=typeof e>"u";return k.createElement("div",{className:se.toolbarGroupOfGroups},n||e.includes("Bold")?k.createElement(Tu,{format:Co,addTitle:t("toolbar.bold","Bold"),removeTitle:t("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,n||e.includes("Italic")?k.createElement(Tu,{format:wo,addTitle:t("toolbar.italic","Italic"),removeTitle:t("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,n||e.includes("Underline")?k.createElement(Tu,{format:Eo,addTitle:t("toolbar.underline","Underline"),removeTitle:t("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},UA=k.forwardRef((e,t)=>{const n=Pt(g5),[r,i]=Ln(sn,Er),o=tr();return k.createElement(ly,{className:se.toolbarButton,ref:t,disabled:r,onClick:()=>{n()}},k.createElement(qf,{title:o("toolbar.image","Insert image")},i("add_photo")))}),WA=()=>{const[e,t]=Ln(Er,Qe),[n,r]=k.useState(!1),[i,o]=k.useState(!1),s=tr();return k.useEffect(()=>{if(t)return At(t.registerCommand(fo,l=>(r(l),!1),Kn),t.registerCommand(co,l=>(o(l),!1),Kn))},[t]),k.createElement(aA,{items:[{title:s("toolbar.undo","Undo {{shortcut}}",{shortcut:El?"⌘Z":"Ctrl+Z"}),disabled:!n,contents:e("undo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Kl,void 0)},{title:s("toolbar.redo","Redo {{shortcut}}",{shortcut:El?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:e("redo"),active:!1,onChange:()=>t==null?void 0:t.dispatchCommand(Zl,void 0)}]})},JA="_mdxeditor_1fl3k_2",KA={mdxeditor:JA},ZA={match:(e,t)=>!0,priority:0,Editor:e=>{const t=WT();return N.jsxs("div",{className:"flex flex-col bg-gray-100 my-4",onKeyDown:n=>n.nativeEvent.stopImmediatePropagation(),children:[N.jsx("input",{defaultValue:e.language}),N.jsx("textarea",{className:"flex-1",defaultValue:e.code,onChange:n=>t.setCode(n.target.value)})]})}};function GA({className:e,markdown:t,onChange:n}){return N.jsx(K7,{className:q2("flex flex-col w-full rounded-md border border-input bg-transparent text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",KA.mdxeditor,e),suppressHtmlProcessing:!0,markdown:t,onChange:n,plugins:[Q7(),LS(),F8(),oA(),HT(),NT({disableImageResize:!0,disableImageSettingsButton:!0}),sS(),$A(),XT({codeBlockEditorDescriptors:[ZA]}),cA({toolbarClassName:"flex flex-row overflow-hidden shrink-0 h-10 border-b bg-white rounded-none",toolbarContents:()=>N.jsx(N.Fragment,{children:N.jsxs("div",{className:"flex items-center flex-1 gap-1",children:[N.jsx(zA,{}),N.jsx(jA,{}),N.jsx(uA,{}),N.jsx(UA,{}),N.jsx("div",{className:"ml-auto",children:N.jsx(WA,{})})]})})})]})}function qA({...e}){return N.jsxs("div",{className:"relative flex justify-center items-center",children:[N.jsx(Iu,{...e}),e.value&&N.jsx(B2,{to:e.value,className:"flex items-center absolute right-0 mr-3",children:N.jsx(tv,{className:"h-4"})})]})}function mN({itemType:e,fields:t,data:n,isNew:r}){const[i]=Z2(),[o]=G2(),s=E.useCallback(c=>({id:(n==null?void 0:n.id)??"",...Object.fromEntries(Object.keys(c).map(d=>[d,(n==null?void 0:n[d])??(c[d].type==="boolean"?!1:"")]))}),[n,t]),l=W2({defaultValues:s(t)});async function a(c){r?i({...c,type:e}):o({...c,type:e})}const u=E.useMemo(()=>Object.entries(t).filter(([,c])=>c.type==="boolean"),[t]);return N.jsx(J2,{...l,children:N.jsxs("form",{onSubmit:l.handleSubmit(a),className:"space-y-4 max-w-[800px] w-[800px]",children:[N.jsx($a,{name:"id",control:l.control,disabled:(n==null?void 0:n.id)==="default",rules:{required:!0},render:({field:c})=>N.jsxs(Va,{children:[N.jsx(Ss,{className:"flex gap-1 items-baseline",children:"ID"}),N.jsx(Ha,{children:N.jsx(Iu,{placeholder:"url-slug",...c})}),(n==null?void 0:n.id)!=="default"&&N.jsx(Ba,{children:"Choose a descriptive ID, since it will be part of the URL"}),N.jsx(za,{})]})}),u.length>0&&N.jsxs("div",{className:"flex flex-col gap-3",children:[N.jsx(Ss,{children:"Flags"}),N.jsx("div",{className:"flex flex-row flex-wrap gap-4",children:u.map(([c,d])=>N.jsx($a,{name:c,control:l.control,render:({field:f})=>N.jsxs(Va,{className:"flex flex-col items-start",children:[N.jsxs("div",{className:"flex flex-row space-x-2",children:[N.jsx(Ha,{children:N.jsx(K2,{checked:f.value==="true",onCheckedChange:h=>{f.onChange(h===!0?"true":"false")}})}),N.jsx(Ss,{className:"flex gap-1 items-baseline",children:d.displayName})]}),d.displayExtra&&N.jsx(Ba,{children:d.displayExtra}),N.jsx(za,{})]})},c))})]}),Object.entries(t).filter(([,c])=>c.type!=="boolean").map(([c,d])=>N.jsx($a,{name:c,control:l.control,rules:{required:d.isRequired},render:({field:f})=>N.jsxs(Va,{children:[N.jsxs(Ss,{className:"flex gap-1 items-baseline",children:[d.displayName,!d.isRequired&&N.jsx("span",{className:"text-gray-400",children:"(optional)"})]}),N.jsx(Ha,{children:d.type==="markdown"?N.jsx(GA,{className:"h-52",markdown:f.value,onChange:f.onChange,placeholder:d.placeholder}):d.type==="url"?N.jsx(qA,{placeholder:d.placeholder??"https://",...f}):N.jsx(Iu,{placeholder:d.placeholder,...f})}),d.displayExtra&&N.jsx(Ba,{children:d.displayExtra}),N.jsx(za,{})]})},c)),N.jsxs(j2,{disabled:!l.formState.isDirty&&!r,type:"submit",children:[N.jsx(iv,{})," Save"]})]})})}export{mN as I};
|