archsight 0.2.4 → 0.2.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.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/lib/archsight/cli.rb +67 -0
  3. data/lib/archsight/graph.rb +10 -0
  4. data/lib/archsight/import/executor.rb +11 -3
  5. data/lib/archsight/import/handlers/cpp_grapher.rb +193 -0
  6. data/lib/archsight/import/handlers/crystal_grapher.rb +186 -0
  7. data/lib/archsight/import/handlers/elixir_grapher.rb +202 -0
  8. data/lib/archsight/import/handlers/go_grapher.rb +127 -0
  9. data/lib/archsight/import/handlers/grapher.rb +552 -0
  10. data/lib/archsight/import/handlers/java_grapher.rb +286 -0
  11. data/lib/archsight/import/handlers/javascript_grapher.rb +340 -0
  12. data/lib/archsight/import/handlers/python_grapher.rb +270 -0
  13. data/lib/archsight/import/handlers/repository.rb +41 -17
  14. data/lib/archsight/import/handlers/ruby_grapher.rb +203 -0
  15. data/lib/archsight/import/handlers/rust_grapher.rb +227 -0
  16. data/lib/archsight/import/registry.rb +23 -0
  17. data/lib/archsight/resources/import.rb +1 -0
  18. data/lib/archsight/resources/technology_artifact.rb +17 -0
  19. data/lib/archsight/version.rb +1 -1
  20. data/lib/archsight/web/api/json_helpers.rb +1 -1
  21. data/lib/archsight/web/public/vue/ApiDocsPage-C0y953v0.css +1 -0
  22. data/lib/archsight/web/public/vue/ApiDocsPage-DHSCaHEn.js +1 -0
  23. data/lib/archsight/web/public/vue/DocPage-DszOPlFy.js +1 -0
  24. data/lib/archsight/web/public/vue/EditorPage-CPZ0Ei4l.css +1 -0
  25. data/lib/archsight/web/public/vue/EditorPage-DsiuZ7fg.js +35 -0
  26. data/lib/archsight/web/public/vue/ErrorPage-C4JutrYc.js +2 -0
  27. data/lib/archsight/web/public/vue/ErrorPage-uMDnfY5_.css +1 -0
  28. data/lib/archsight/web/public/vue/GraphView-Bqlbt6dK.js +1 -0
  29. data/lib/archsight/web/public/vue/GraphView-Cj2V2stN.css +1 -0
  30. data/lib/archsight/web/public/vue/InstanceRouter-D8SEY2eu.js +2 -0
  31. data/lib/archsight/web/public/vue/InstanceRouter-D9hclKFt.css +1 -0
  32. data/lib/archsight/web/public/vue/KindList-CPDaNron.js +1 -0
  33. data/lib/archsight/web/public/vue/ResourceList-B5w9yiyS.js +1 -0
  34. data/lib/archsight/web/public/vue/ResourceList-DxZfNbOg.css +1 -0
  35. data/lib/archsight/web/public/vue/SearchResults-DSHpVO-c.css +1 -0
  36. data/lib/archsight/web/public/vue/SearchResults-FpkhdBFu.js +1 -0
  37. data/lib/archsight/web/public/vue/architecture-7EHR7CIX-DpNNjAIc.js +1 -0
  38. data/lib/archsight/web/public/vue/eventmodeling-FCH6USID-CiThxoWl.js +1 -0
  39. data/lib/archsight/web/public/vue/gitGraph-WXDBUCRP-BODMGpAm.js +1 -0
  40. data/lib/archsight/web/public/vue/graphviz-09t3o0af.js +13 -0
  41. data/lib/archsight/web/public/vue/index-BW0IzY6X.css +1 -0
  42. data/lib/archsight/web/public/vue/index-T1YqCmM1.js +2 -0
  43. data/lib/archsight/web/public/vue/info-J43DQDTF-fLq04sri.js +1 -0
  44. data/lib/archsight/web/public/vue/katex-5qHlIbPR.js +261 -0
  45. data/lib/archsight/web/public/vue/mermaid-DYyHQk7x.js +3093 -0
  46. data/lib/archsight/web/public/vue/packet-YPE3B663-DoY1fbqu.js +1 -0
  47. data/lib/archsight/web/public/vue/pie-LRSECV5Y-C7ZQVwRe.js +1 -0
  48. data/lib/archsight/web/public/vue/radar-GUYGQ44K-CRtY5oqf.js +1 -0
  49. data/lib/archsight/web/public/vue/rolldown-runtime-QTnfLwEv.js +1 -0
  50. data/lib/archsight/web/public/vue/treeView-BLDUP644-Csx2WLLh.js +1 -0
  51. data/lib/archsight/web/public/vue/treemap-LRROVOQU-CfEnRbTx.js +1 -0
  52. data/lib/archsight/web/public/vue/{useGraphviz-C5lv_BWF.js → useGraphviz-EKSrE4q_.js} +5 -4
  53. data/lib/archsight/web/public/vue/useHighlight-BcVbGyrK.js +10 -0
  54. data/lib/archsight/web/public/vue/useMermaid-CIZxhy_r.js +2 -0
  55. data/lib/archsight/web/public/vue/usePanZoom-C2slpyY9.js +11 -0
  56. data/lib/archsight/web/public/vue/wardley-L42UT6IY-97oUvxhz.js +1 -0
  57. data/lib/archsight/web/public/vue.html +4 -3
  58. metadata +51 -72
  59. data/lib/archsight/web/public/vue/ApiDocsPage-DHOFUCYc.js +0 -1
  60. data/lib/archsight/web/public/vue/ApiDocsPage-DhNTOH4o.css +0 -1
  61. data/lib/archsight/web/public/vue/DocPage-CV66qgTr.js +0 -1
  62. data/lib/archsight/web/public/vue/EditorPage-Dq0MuTnp.css +0 -1
  63. data/lib/archsight/web/public/vue/EditorPage-KqBivY-B.js +0 -34
  64. data/lib/archsight/web/public/vue/ErrorPage-CwPT3JUr.css +0 -1
  65. data/lib/archsight/web/public/vue/ErrorPage-DcbC8Kf1.js +0 -2
  66. data/lib/archsight/web/public/vue/GraphView-Bg_l-F-Q.js +0 -1
  67. data/lib/archsight/web/public/vue/GraphView-DRcIqAiR.css +0 -1
  68. data/lib/archsight/web/public/vue/InstanceRouter-4VEtZM7n.css +0 -1
  69. data/lib/archsight/web/public/vue/InstanceRouter-D-twdyZY.js +0 -2
  70. data/lib/archsight/web/public/vue/KindList-CPImTKNb.js +0 -1
  71. data/lib/archsight/web/public/vue/ResourceList-DMxm0cGh.js +0 -1
  72. data/lib/archsight/web/public/vue/ResourceList-DP-z-j71.css +0 -1
  73. data/lib/archsight/web/public/vue/SearchResults-BGHbg48-.css +0 -1
  74. data/lib/archsight/web/public/vue/SearchResults-BqUHEWHE.js +0 -1
  75. data/lib/archsight/web/public/vue/_baseUniq-BjkdEi26.js +0 -1
  76. data/lib/archsight/web/public/vue/architectureDiagram-VXUJARFQ-JN7CxdtP.js +0 -36
  77. data/lib/archsight/web/public/vue/blockDiagram-VD42YOAC-teziPFHX.js +0 -122
  78. data/lib/archsight/web/public/vue/c4Diagram-YG6GDRKO-CVNrzCCc.js +0 -10
  79. data/lib/archsight/web/public/vue/chunk-4BX2VUAB-BQUARyyA.js +0 -1
  80. data/lib/archsight/web/public/vue/chunk-55IACEB6-BgJn0Waa.js +0 -1
  81. data/lib/archsight/web/public/vue/chunk-B4BG7PRW-0ghAfB1t.js +0 -165
  82. data/lib/archsight/web/public/vue/chunk-DI55MBZ5-HJo1DW2B.js +0 -220
  83. data/lib/archsight/web/public/vue/chunk-FMBD7UC4-C1GwGKgX.js +0 -15
  84. data/lib/archsight/web/public/vue/chunk-QN33PNHL-BOoA1KfJ.js +0 -1
  85. data/lib/archsight/web/public/vue/chunk-QZHKN3VN-BcTNH3IX.js +0 -1
  86. data/lib/archsight/web/public/vue/chunk-TZMSLE5B-58bQF3J5.js +0 -1
  87. data/lib/archsight/web/public/vue/classDiagram-2ON5EDUG-DAA8tpbN.js +0 -1
  88. data/lib/archsight/web/public/vue/classDiagram-v2-WZHVMYZB-DAA8tpbN.js +0 -1
  89. data/lib/archsight/web/public/vue/clone-BPcOyh7U.js +0 -1
  90. data/lib/archsight/web/public/vue/cose-bilkent-S5V4N54A-Bv8iR4rF.js +0 -1
  91. data/lib/archsight/web/public/vue/cytoscape.esm-5J0xJHOV.js +0 -321
  92. data/lib/archsight/web/public/vue/dagre-6UL2VRFP-B8ZPRhgU.js +0 -4
  93. data/lib/archsight/web/public/vue/diagram-PSM6KHXK-Dp1bZnNq.js +0 -24
  94. data/lib/archsight/web/public/vue/diagram-QEK2KX5R-DZBsDWP6.js +0 -43
  95. data/lib/archsight/web/public/vue/diagram-S2PKOQOG-BKOnLWNk.js +0 -24
  96. data/lib/archsight/web/public/vue/erDiagram-Q2GNP2WA-V6FqHPc9.js +0 -60
  97. data/lib/archsight/web/public/vue/flowDiagram-NV44I4VS-BipXjPVT.js +0 -162
  98. data/lib/archsight/web/public/vue/ganttDiagram-JELNMOA3-DUdVPVK1.js +0 -267
  99. data/lib/archsight/web/public/vue/gitGraphDiagram-V2S2FVAM-Bcf_apTG.js +0 -65
  100. data/lib/archsight/web/public/vue/graph-C4e9XILZ.js +0 -1
  101. data/lib/archsight/web/public/vue/graphviz-CJms5bxZ.js +0 -13
  102. data/lib/archsight/web/public/vue/index-BUI400cn.js +0 -2
  103. data/lib/archsight/web/public/vue/index-Tiu4C-Sb.css +0 -1
  104. data/lib/archsight/web/public/vue/infoDiagram-HS3SLOUP-DBwnExXO.js +0 -2
  105. data/lib/archsight/web/public/vue/journeyDiagram-XKPGCS4Q-D4b8PEzB.js +0 -139
  106. data/lib/archsight/web/public/vue/kanban-definition-3W4ZIXB7-R6r4NPxJ.js +0 -89
  107. data/lib/archsight/web/public/vue/katex-C-M49wc6.js +0 -261
  108. data/lib/archsight/web/public/vue/layout-CXL8NrCi.js +0 -1
  109. data/lib/archsight/web/public/vue/mermaid-MmHzOPPB.js +0 -250
  110. data/lib/archsight/web/public/vue/min-B4MPxNTL.js +0 -1
  111. data/lib/archsight/web/public/vue/mindmap-definition-VGOIOE7T-BypPT67y.js +0 -68
  112. data/lib/archsight/web/public/vue/pieDiagram-ADFJNKIX-BJ4nb15u.js +0 -30
  113. data/lib/archsight/web/public/vue/quadrantDiagram-AYHSOK5B-D4Ee5XRs.js +0 -7
  114. data/lib/archsight/web/public/vue/requirementDiagram-UZGBJVZJ-DuxpUmt2.js +0 -64
  115. data/lib/archsight/web/public/vue/sankeyDiagram-TZEHDZUN-CgWlWmza.js +0 -10
  116. data/lib/archsight/web/public/vue/sequenceDiagram-WL72ISMW-v2l2CbI0.js +0 -145
  117. data/lib/archsight/web/public/vue/stateDiagram-FKZM4ZOC-B5ROi2_1.js +0 -1
  118. data/lib/archsight/web/public/vue/stateDiagram-v2-4FDKWEC3-CQhha5H7.js +0 -1
  119. data/lib/archsight/web/public/vue/timeline-definition-IT6M3QCI-Bnx2HvxP.js +0 -61
  120. data/lib/archsight/web/public/vue/treemap-GDKQZRPO-BVho_qBy.js +0 -162
  121. data/lib/archsight/web/public/vue/useHighlight-yg_u-WUA.js +0 -10
  122. data/lib/archsight/web/public/vue/useMermaid-BPBwn39g.js +0 -1
  123. data/lib/archsight/web/public/vue/usePanZoom-CgSmFLId.js +0 -11
  124. data/lib/archsight/web/public/vue/xychartDiagram-PRI3JC2R-CDkeZXF1.js +0 -7
@@ -0,0 +1,35 @@
1
+ import{t as e}from"./rolldown-runtime-QTnfLwEv.js";import{B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,S as p,T as m,U as h,V as g,_,b as v,g as y,i as ee,j as te,k as b,o as x,p as S,r as ne,s as re,t as ie,v as ae,w as C,x as w,y as oe,z as T}from"./index-T1YqCmM1.js";import{t as se}from"./useHighlight-BcVbGyrK.js";var ce={class:`label-row`},le=[`for`,`title`],ue={key:0,class:`required`},de=[`id`,`aria-invalid`],fe=[`value`],pe={key:1,class:`markdown-field`},me=[`id`,`aria-invalid`,`placeholder`],he={key:0,class:`future-hint`},ge={key:2,class:`code-field`},_e=[`id`,`aria-invalid`,`placeholder`],ve={class:`future-hint`},ye=[`id`,`step`,`aria-invalid`],be=[`id`,`aria-invalid`],xe=[`id`,`aria-invalid`],Se=[`id`,`aria-invalid`],Ce={key:7,class:`field-description`},we={key:8,class:`field-error`},Te=ie({__name:`EditorField`,props:{field:Object,modelValue:[String,Number,null],error:[Array,null]},emits:[`update:modelValue`,`openMarkdown`],setup(e,{emit:t}){let n=e,r=t,a=w({get:()=>n.modelValue??``,set:e=>r(`update:modelValue`,e)}),o=w(()=>[`textarea`,`markdown`,`code`].includes(n.field.input_type)),s=w(()=>n.error&&n.error.length>0);return(t,n)=>(l(),m(`div`,{class:g([`field-group`,{"field-full-width":o.value}])},[p(`div`,ce,[p(`label`,{for:e.field.key,title:e.field.description},[i(h(e.field.title)+` `,1),e.field.required?(l(),m(`span`,ue,`*`)):C(``,!0)],8,le),e.field.input_type===`markdown`?(l(),m(`button`,{key:0,type:`button`,class:`btn-edit-markdown`,title:`Open rich text editor`,onClick:n[0]||=n=>t.$emit(`openMarkdown`,e.field.key)},[...n[8]||=[p(`i`,{class:`iconoir-edit-pencil`},null,-1),i(` Edit `,-1)]])):C(``,!0)]),e.field.input_type===`select`?f((l(),m(`select`,{key:0,id:e.field.key,"onUpdate:modelValue":n[1]||=e=>a.value=e,"aria-invalid":s.value?`true`:void 0},[n[9]||=p(`option`,{value:``},`Select...`,-1),(l(!0),m(v,null,d(e.field.options,e=>(l(),m(`option`,{key:e,value:e},h(e),9,fe))),128))],8,de)),[[_,a.value]]):e.field.input_type===`textarea`||e.field.input_type===`markdown`?(l(),m(`div`,pe,[f(p(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[2]||=e=>a.value=e,"aria-invalid":s.value?`true`:void 0,placeholder:e.field.input_type===`markdown`?`Enter markdown content...`:`One entry per line...`},null,8,me),[[ae,a.value]]),e.field.input_type===`markdown`?(l(),m(`small`,he,[...n[10]||=[p(`i`,{class:`iconoir-info-circle`},null,-1),i(` Supports Markdown formatting `,-1)]])):C(``,!0)])):e.field.input_type===`code`?(l(),m(`div`,ge,[f(p(`textarea`,{id:e.field.key,"onUpdate:modelValue":n[3]||=e=>a.value=e,"aria-invalid":s.value?`true`:void 0,placeholder:`Enter ${e.field.code_language||``} code...`,spellcheck:`false`},null,8,_e),[[ae,a.value]]),p(`small`,ve,[n[11]||=p(`i`,{class:`iconoir-code`},null,-1),i(` `+h((e.field.code_language||``).charAt(0).toUpperCase()+(e.field.code_language||``).slice(1))+` code `,1)])])):e.field.input_type===`number`?f((l(),m(`input`,{key:3,id:e.field.key,type:`number`,"onUpdate:modelValue":n[4]||=e=>a.value=e,step:e.field.step,"aria-invalid":s.value?`true`:void 0},null,8,ye)),[[ae,a.value]]):e.field.input_type===`url`?f((l(),m(`input`,{key:4,id:e.field.key,type:`url`,"onUpdate:modelValue":n[5]||=e=>a.value=e,placeholder:`https://...`,"aria-invalid":s.value?`true`:void 0},null,8,be)),[[ae,a.value]]):e.field.input_type===`list`?f((l(),m(`input`,{key:5,id:e.field.key,type:`text`,"onUpdate:modelValue":n[6]||=e=>a.value=e,placeholder:`Comma-separated values`,"aria-invalid":s.value?`true`:void 0},null,8,xe)),[[ae,a.value]]):f((l(),m(`input`,{key:6,id:e.field.key,type:`text`,"onUpdate:modelValue":n[7]||=e=>a.value=e,"aria-invalid":s.value?`true`:void 0},null,8,Se)),[[ae,a.value]]),e.field.description&&![`textarea`,`markdown`,`code`].includes(e.field.input_type)?(l(),m(`small`,Ce,h(e.field.description),1)):C(``,!0),s.value?(l(),m(`div`,we,h(e.error.join(`, `)),1)):C(``,!0)],2))}},[[`__scopeId`,`data-v-6dfd17ff`]]),Ee={class:`relations-editor`},De={key:0,class:`no-relations`},Oe={id:`relations-list`},ke={class:`relation-text`},Ae=[`onClick`],je={class:`add-relation-row`},Me=[`value`],Ne=[`value`],Pe=ie({__name:`EditorRelations`,props:{relations:Array,relationOptions:Array,instancesByKind:Object},emits:[`update:relations`],setup(e,{emit:t}){let n=e,r=t,a=T(``),s=T(``),c=w(()=>[...n.relations].sort((e,t)=>(e.verb+e.kind+e.name).localeCompare(t.verb+t.kind+t.name))),u=w(()=>a.value?n.relationOptions.find(e=>e.combo===a.value)?.target_kind:null),g=w(()=>u.value&&n.instancesByKind[u.value]||[]);o(a,()=>{s.value=``});function y(){if(!a.value||!s.value)return;let e=n.relationOptions.find(e=>e.combo===a.value);e&&(n.relations.some(t=>t.verb===e.verb&&t.kind===e.target_kind&&t.name===s.value)||(r(`update:relations`,[...n.relations,{verb:e.verb,kind:e.target_kind,name:s.value}]),a.value=``,s.value=``))}function ee(e){r(`update:relations`,n.relations.filter((t,n)=>n!==e))}return(t,n)=>(l(),m(`div`,Ee,[!e.relationOptions||e.relationOptions.length===0?(l(),m(`p`,De,` This resource type has no defined relations. `)):(l(),m(v,{key:1},[p(`div`,Oe,[(l(!0),m(v,null,d(c.value,(e,t)=>(l(),m(`div`,{key:`${e.verb}:${e.kind}:${e.name}`,class:`relation-item`},[p(`span`,ke,[p(`strong`,null,h(e.verb),1),i(` → `+h(e.kind)+`: `,1),p(`em`,null,h(e.name),1)]),p(`button`,{class:`btn-remove`,type:`button`,title:`Remove`,onClick:e=>ee(t)},[...n[2]||=[p(`i`,{class:`iconoir-xmark`},null,-1)]],8,Ae)]))),128))]),p(`div`,je,[f(p(`select`,{"onUpdate:modelValue":n[0]||=e=>a.value=e},[n[3]||=p(`option`,{value:``},`Select relation...`,-1),(l(!0),m(v,null,d(e.relationOptions,e=>(l(),m(`option`,{key:e.combo,value:e.combo},h(e.verb)+` → `+h(e.target_kind),9,Me))),128))],512),[[_,a.value]]),f(p(`select`,{"onUpdate:modelValue":n[1]||=e=>s.value=e},[n[4]||=p(`option`,{value:``},`Select instance...`,-1),(l(!0),m(v,null,d(g.value,e=>(l(),m(`option`,{key:e,value:e},h(e),9,Ne))),128))],512),[[_,s.value]]),p(`button`,{class:`secondary btn-add`,type:`button`,onClick:y},[...n[5]||=[p(`i`,{class:`iconoir-plus`},null,-1),i(` Add `,-1)]])])],64))]))}},[[`__scopeId`,`data-v-e27dc1c0`]]),Fe={class:`yaml-output-container`},Ie={key:0,class:`conflict-error`},Le={id:`yaml-content`},Re={class:`language-yaml`},ze={key:0,class:`yaml-file-info`},Be={key:1,class:`yaml-instructions`},Ve={class:`yaml-actions`},He=[`disabled`],Ue=ie({__name:`EditorYamlOutput`,props:{yaml:String,kind:String,name:String,contentHash:String,pathRef:String,inlineEditEnabled:Boolean},emits:[`editAgain`],setup(e,{emit:t}){let n=e,r=T(null),a=T(`idle`),s=T(`idle`),c=T(null);te(()=>{r.value&&se(r.value)}),o(()=>n.yaml,async()=>{await b(),r.value&&se(r.value)});async function u(){try{await navigator.clipboard.writeText(n.yaml),a.value=`copied`,setTimeout(()=>{a.value=`idle`},2e3)}catch{let e=document.createElement(`textarea`);e.value=n.yaml,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),a.value=`copied`,setTimeout(()=>{a.value=`idle`},2e3)}}async function d(){s.value=`saving`,c.value=null;try{let e=await S(n.kind,n.name,n.yaml,n.contentHash);e.success?(s.value=`saved`,setTimeout(()=>{s.value=`idle`},2e3)):e.conflict?(c.value=e.error,s.value=`idle`):(alert(`Save failed: `+e.error),s.value=`idle`)}catch(e){alert(`Save failed: `+e.message),s.value=`idle`}}return(t,n)=>(l(),m(`div`,Fe,[c.value?(l(),m(`div`,Ie,[n[1]||=p(`i`,{class:`iconoir-warning-triangle`},null,-1),p(`span`,null,h(c.value),1)])):C(``,!0),n[5]||=p(`p`,{class:`yaml-success`},[p(`i`,{class:`iconoir-check-circle`}),i(` Generated YAML `)],-1),p(`div`,{ref_key:`codeEl`,ref:r},[p(`pre`,Le,[p(`code`,Re,h(e.yaml),1)])],512),p(`footer`,null,[e.pathRef?(l(),m(`p`,ze,[n[2]||=p(`i`,{class:`iconoir-folder`},null,-1),p(`span`,null,`Source: `+h(e.pathRef),1)])):(l(),m(`p`,Be,[...n[3]||=[p(`i`,{class:`iconoir-info-circle`},null,-1),p(`span`,null,[i(` Copy this YAML and save it to a `),p(`code`,null,`.yaml`),i(` file in your resources directory, `),p(`br`),i(`then reload the application. `)],-1)]])),p(`div`,Ve,[e.pathRef&&e.inlineEditEnabled?(l(),m(`button`,{key:0,type:`button`,onClick:d,disabled:s.value===`saving`,class:g({saved:s.value===`saved`})},[p(`i`,{class:g(s.value===`saving`?`iconoir-refresh`:s.value===`saved`?`iconoir-check`:`iconoir-check-circle`)},null,2),i(` `+h(s.value===`saving`?`Saving...`:s.value===`saved`?`Saved!`:`Save to File`),1)],10,He)):C(``,!0),p(`button`,{type:`button`,onClick:u,class:g({copied:a.value===`copied`})},[p(`i`,{class:g(a.value===`copied`?`iconoir-check`:`iconoir-copy`)},null,2),i(` `+h(a.value===`copied`?`Copied!`:`Copy to Clipboard`),1)],2),p(`button`,{class:`secondary`,type:`button`,onClick:n[0]||=e=>t.$emit(`editAgain`)},[...n[4]||=[p(`i`,{class:`iconoir-edit-pencil`},null,-1),i(` Edit Again `,-1)]])])])]))}},[[`__scopeId`,`data-v-f7e6a550`]]);function E(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function We(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Ge=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ke=Ge&&`documentMode`in document?document.documentMode:null,qe=Ge&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Je=Ge&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ye=!(!Ge||!(`InputEvent`in window)||Ke)&&`getTargetRanges`in new window.InputEvent(`input`),Xe=Ge&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Ze=Ge&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Qe=Ge&&/Android/.test(navigator.userAgent),$e=Ge&&/^(?=.*Chrome).*/i.test(navigator.userAgent),et=Ge&&Qe&&$e,tt=Ge&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&qe&&!$e,nt=0,rt=1,it=2,at=1,ot=2,st=3,ct=4,lt=5,ut=6,dt=Xe||Ze||tt?`\xA0`:`​`,ft=`
2
+
3
+ `,pt=Je?`\xA0`:dt,mt=RegExp(`^[^A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿]*[֑-߿יִ-﷽ﹰ-ﻼ]`),ht=RegExp(`^[^֑-߿יִ-﷽ﹰ-ﻼ]*[A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿]`),gt={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},_t={directionless:1,unmergeable:2},vt={center:2,end:6,justify:4,left:1,right:3,start:5},yt={[ot]:`center`,[ut]:`end`,[ct]:`justify`,[at]:`left`,[st]:`right`,[lt]:`start`},bt={normal:0,segmented:2,token:1},xt={[nt]:`normal`,[it]:`segmented`,[rt]:`token`},St=`$config`;function Ct(e,t,n,r,i,a){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(z(o)&&Ct(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}var wt=!1,Tt=0;function Et(e){Tt=e.timeStamp}function Dt(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Do(e,n)!==void 0}function Ot(e,t,n){let r=ms(os(n)),i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);let o=e.nodeValue;o!==null&&zo(t,o,i,a,!1)}function kt(e,t,n){if(N(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return _o(t)&&n.isAttached()}function At(e,t,n,r){for(let i=e;i&&!ks(i);i=es(i)){let e=Do(i,t);if(e!==void 0){let t=W(e,n);if(t)return B(t)||!J(i)?void 0:[i,t]}else if(i===r)return[r,jo(n)]}}function jt(e,t,n){wt=!0;let r=performance.now()-Tt>100;try{Ia(e,()=>{let i=P()||function(e){return e.getEditorState().read(()=>{let e=P();return e===null?null:e.clone()})}(e),a=new Map,o=e.getRootElement(),s=e._editorState,c=e._blockCursorElement,l=!1,u=``;for(let n=0;n<t.length;n++){let d=t[n],f=d.type,p=d.target,m=At(p,e,s,o);if(!m)continue;let[h,g]=m;if(f===`characterData`)r&&M(g)&&_o(p)&&kt(i,p,g)&&Ot(p,g,e);else if(f===`childList`){l=!0;let t=d.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Eo(r),a=r.parentNode;if(a!=null&&r!==c&&i===null&&!Dt(r,a,e)){if(Je){let e=(J(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}a.removeChild(r)}}let n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(Dt(r,p,e)||c===r)&&(p.appendChild(r),t++)}r!==t&&a.set(h,g)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){let n=d[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||Dt(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(l&&Mo(i),Je&&Qo(e)&&i.insertRawText(u))})}finally{wt=!1}}function Mt(e){let t=e._observer;t!==null&&jt(e,t.takeRecords(),t)}function Nt(e){(function(e){Tt===0&&os(e).addEventListener(`textInput`,Et,!0)})(e),e._observer=new MutationObserver((t,n)=>{jt(e,t,n)})}var Pt=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Ut).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function Ft(e,t){return new Pt(e,t)}function It(e,t,n=`latest`){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function Lt(e,t,n){let r;if(L(),typeof n==`function`){let i=e.getLatest(),a=It(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return Bt(i).updateFromKnown(t,r),i}function Rt(e){let t=new Map,n=new Set;for(let r=typeof e==`function`?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=js(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;`stateConfig`in r?(e=r.stateConfig,r.flat&&n.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:n,sharedConfigMap:t}}var zt=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Ht(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=Ht(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function Bt(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new zt(t,Vt(t));return t.__state=n,n}function Vt(e){return e.__state?e.__state.sharedNodeState:io(Ss(),e.getType()).sharedNodeState}function Ht(e){if(e)for(let t in e)return e}function Ut(e){return e}function Wt(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function Gt(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Kt(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function qt(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let n=new Set;return!(e&&Wt(n,e,t)||t&&Wt(n,t,e)||e&&Gt(n,e,t)||t&&Gt(n,t,e))}(c,l))}function Jt(e,t){let n=e.mergeWithSibling(t),r=R()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Yt(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&M(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(qt(t,r)){r=Jt(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&M(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(qt(r,n)){r=Jt(r,n);break}break}n.remove()}}else r.remove()}function Xt(e){return Zt(e.anchor),Zt(e.focus),e}function Zt(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),M(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!z(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Qt,D,$t,en,tn,nn,rn,an,on,sn,O=``,cn=null,ln=null,un=!1,dn=!1;function fn(e,t){let n=rn.get(e);if(t!==null){let n=An(e);n.parentNode===t&&t.removeChild(n)}if(an.has(e)||D._keyToDOMMap.delete(e),z(n)){let e=wn(n,rn);pn(e,0,e.length-1,null)}n!==void 0&&Yo(sn,$t,en,n,`destroyed`)}function pn(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&fn(t,r)}}function mn(e,t){e.setProperty(`text-align`,t)}var hn=`40px`;function gn(e,t){let n=Qt.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}if(t===0)return void e.style.setProperty(`padding-inline-start`,``);let r=getComputedStyle(D._rootElement||e).getPropertyValue(`--lexical-indent-base-value`)||hn;e.style.setProperty(`padding-inline-start`,`calc(${t} * ${r})`)}function _n(e,t){let n=e.style;t===0?mn(n,``):t===1?mn(n,`left`):t===2?mn(n,`center`):t===3?mn(n,`right`):t===4?mn(n,`justify`):t===5?mn(n,`start`):t===6&&mn(n,`end`)}function vn(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(V(e))return null;let n=e.getParentOrThrow();return V(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function yn(e,t){let n=an.get(e);n===void 0&&E(60);let r=n.createDOM(Qt,D);if(function(e,t,n){let r=n._keyToDOMMap;(function(e,t,n){let r=`__lexicalKey_${t._key}`;e[r]=n})(t,n,e),r.set(e,t)}(e,r,D),M(n)?r.setAttribute(`data-lexical-text`,`true`):B(n)&&r.setAttribute(`data-lexical-decorator`,`true`),z(n)){let e=n.__indent,t=n.__size;if(vn(r,n),e!==0&&gn(r,e),t!==0){let e=t-1;bn(wn(n,an),n,0,e,n.getDOMSlot(r))}let i=n.__format;i!==0&&_n(r,i),n.isInline()||Sn(null,n,r)}else{let t=n.getTextContent();if(B(n)){let t=n.decorate(D,Qt);t!==null&&En(e,t),r.contentEditable=`false`}O+=t}return t!==null&&t.insertChild(r),Yo(sn,$t,en,n,`created`),r}function bn(e,t,n,r,i){let a=O;O=``;let o=n;for(;o<=r;++o){yn(e[o],i);let t=an.get(e[o]);t!==null&&M(t)?cn===null&&(cn=t.getFormat(),ln=t.getStyle()):z(t)&&o<r&&!t.isInline()&&(O+=ft)}i.element.__lexicalTextContent=O,O=a+O}function xn(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return A(e)?`line-break`:B(e)&&e.isInline()?`decorator`:null}return`empty`}return null}function Sn(e,t,n){let r=xn(e,rn),i=xn(t,an);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Cn(e,t,n){var r;cn=null,ln=null,function(e,t,n){let r=O,i=e.__size,a=t.__size;O=``;let o=n.element;if(i===1&&a===1){let n=e.__first,r=t.__first;if(n===r)Tn(n,o);else{let e=An(n),t=yn(r,null);try{o.replaceChild(t,e)}catch(i){if(typeof i==`object`&&i){let a=`${i.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw Error(a)}throw i}fn(n,null)}let i=an.get(r);M(i)&&cn===null&&(cn=i.getFormat(),ln=i.getStyle())}else{let r=wn(e,rn),s=wn(t,an);if(r.length!==i&&E(227),s.length!==a&&E(228),i===0)a!==0&&bn(s,0,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&n.element.__lexicalLineBreak==null;pn(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f];if(e===r)u=Dn(Tn(r,a.element)),d++,f++;else{if(l===void 0&&(l=On(n,f)),c===void 0)c=On(t,d);else if(!c.has(e)){d++;continue}if(!l.has(e)){u=Dn(An(e)),fn(e,a.element),d++,c.delete(e);continue}if(c.has(r)){let e=$o(D,r);e!==u&&a.withBefore(u).insertChild(e),u=Dn(Tn(r,a.element)),d++,f++}else yn(r,a.withBefore(u)),f++}let i=an.get(r);i!==null&&M(i)?cn===null&&(cn=i.getFormat(),ln=i.getStyle()):z(i)&&f<=s&&!i.isInline()&&(O+=ft)}let p=d>o,m=f>s;if(p&&!m){let e=n[s+1],t=e===void 0?null:D.getElementByKey(e);bn(n,0,f,s,a.withBefore(t))}else m&&!p&&pn(t,d,o,a.element)})(0,r,s,i,a,n)}o.__lexicalTextContent=O,O=r+O}(e,t,t.getDOMSlot(n)),r=t,cn==null||cn===r.__textFormat||dn||r.setTextFormat(cn),function(e){ln==null||ln===e.__textStyle||dn||e.setTextStyle(ln)}(t)}function wn(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t.get(r);e===void 0&&E(101),n.push(r),r=e.__next}return n}function Tn(e,t){let n=rn.get(e),r=an.get(e);n!==void 0&&r!==void 0||E(61);let i=un||nn.has(e)||tn.has(e),a=$o(D,e);if(n===r&&!i){let e;if(z(n)){let t=a.__lexicalTextContent;typeof t==`string`?e=t:(e=n.getTextContent(),a.__lexicalTextContent=e)}else e=n.getTextContent();return O+=e,a}if(n!==r&&i&&Yo(sn,$t,en,r,`updated`),r.updateDOM(n,a,Qt)){let n=yn(e,null);return t===null&&E(62),t.replaceChild(n,a),fn(e,null),n}if(z(n)){z(r)||E(334,e);let t=r.__indent;(un||t!==n.__indent)&&gn(a,t);let o=r.__format;if((un||o!==n.__format)&&_n(a,o),i)Cn(n,r,a),V(r)||r.isInline()||Sn(n,r,a);else{let e=a.__lexicalTextContent,t;typeof e==`string`?t=e:(t=n.getTextContent(),a.__lexicalTextContent=t),O+=t}if((un||r.__dir!==n.__dir)&&(vn(a,r),V(r)&&!un))for(let e of r.getChildren())z(e)&&vn($o(D,e.getKey()),e)}else{let t=r.getTextContent();if(B(r)){let t=r.decorate(D,Qt);t!==null&&En(e,t)}O+=t}if(!dn&&V(r)&&r.__cachedText!==O){let e=r.getWritable();e.__cachedText=O,r=e}return a}function En(e,t){let n=D._pendingDecorators,r=D._decorators;if(n===null){if(r[e]===t)return;n=ko(D)}n[e]=t}function Dn(e){let t=e.nextSibling;return t!==null&&t===D._blockCursorElement&&(t=t.nextSibling),t}function On(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function kn(e,t,n,r,i,a){O=``,un=r===2,D=n,Qt=n._config,$t=n._nodes,en=D._listeners.mutation,tn=i,nn=a,rn=e._nodeMap,an=t._nodeMap,dn=t._readOnly,on=new Map(n._keyToDOMMap);let o=new Map;return sn=o,Tn(`root`,null),D=void 0,$t=void 0,tn=void 0,nn=void 0,rn=void 0,an=void 0,Qt=void 0,on=void 0,sn=void 0,o}function An(e){let t=on.get(e);return t===void 0&&E(75,e),t}function k(e){return{type:e}}var jn=k(`SELECTION_CHANGE_COMMAND`),Mn=k(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),Nn=k(`CLICK_COMMAND`),Pn=k(`BEFORE_INPUT_COMMAND`),Fn=k(`INPUT_COMMAND`),In=k(`COMPOSITION_START_COMMAND`),Ln=k(`COMPOSITION_END_COMMAND`),Rn=k(`DELETE_CHARACTER_COMMAND`),zn=k(`INSERT_LINE_BREAK_COMMAND`),Bn=k(`INSERT_PARAGRAPH_COMMAND`),Vn=k(`CONTROLLED_TEXT_INSERTION_COMMAND`),Hn=k(`PASTE_COMMAND`),Un=k(`REMOVE_TEXT_COMMAND`),Wn=k(`DELETE_WORD_COMMAND`),Gn=k(`DELETE_LINE_COMMAND`),Kn=k(`FORMAT_TEXT_COMMAND`),qn=k(`UNDO_COMMAND`),Jn=k(`REDO_COMMAND`),Yn=k(`KEYDOWN_COMMAND`),Xn=k(`KEY_ARROW_RIGHT_COMMAND`),Zn=k(`MOVE_TO_END`),Qn=k(`KEY_ARROW_LEFT_COMMAND`),$n=k(`MOVE_TO_START`),er=k(`KEY_ARROW_UP_COMMAND`),tr=k(`KEY_ARROW_DOWN_COMMAND`),nr=k(`KEY_ENTER_COMMAND`),rr=k(`KEY_SPACE_COMMAND`),ir=k(`KEY_BACKSPACE_COMMAND`),ar=k(`KEY_ESCAPE_COMMAND`),or=k(`KEY_DELETE_COMMAND`),sr=k(`KEY_TAB_COMMAND`),cr=k(`INSERT_TAB_COMMAND`),lr=k(`INDENT_CONTENT_COMMAND`),ur=k(`OUTDENT_CONTENT_COMMAND`),dr=k(`DROP_COMMAND`),fr=k(`FORMAT_ELEMENT_COMMAND`),pr=k(`DRAGSTART_COMMAND`),mr=k(`DRAGOVER_COMMAND`),hr=k(`DRAGEND_COMMAND`),gr=k(`COPY_COMMAND`),_r=k(`CUT_COMMAND`),vr=k(`SELECT_ALL_COMMAND`),yr=k(`CLEAR_EDITOR_COMMAND`),br=k(`CLEAR_HISTORY_COMMAND`),xr=k(`CAN_REDO_COMMAND`),Sr=k(`CAN_UNDO_COMMAND`),Cr=k(`FOCUS_COMMAND`),wr=k(`BLUR_COMMAND`),Tr=k(`KEY_MODIFIER_COMMAND`),Er=Object.freeze({}),Dr=[[`keydown`,function(e,t){Or=e.timeStamp,kr=e.key,!t.isComposing()&&q(t,Yn,e)}],[`pointerdown`,function(e,t){let n=e.target,r=e.pointerType;_s(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Ia(t,()=>{so(n)||(Fr=!0)})}],[`compositionstart`,function(e,t){q(t,In,e)}],[`compositionend`,function(e,t){Je?Lr=!0:Ze||!Xe&&!tt?q(t,Ln,e):(Rr=!0,zr=e.data)}],[`input`,function(e,t){e.stopPropagation(),Ia(t,()=>{t.dispatchCommand(Fn,e)},{event:e}),jr=null}],[`click`,function(e,t){Ia(t,()=>{let n=P(),r=ms(os(t)),i=aa();if(r){if(N(n)){let t=n.anchor,a=t.getNode();if(t.type===`element`&&t.offset===0&&n.isCollapsed()&&!V(a)&&G().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()){let e=Ns(a,e=>z(e)&&!e.isInline());z(e)&&e.select(0)}}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=r.anchorNode;(J(n)||_o(n))&&Mo(ia(i,r,t,e))}}q(t,Nn,e)})}],[`cut`,Er],[`copy`,Er],[`dragstart`,Er],[`dragover`,Er],[`dragend`,Er],[`paste`,Er],[`focus`,Er],[`blur`,Er],[`drop`,Er]];Ye&&Dr.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||Je&&Qo(t)||n!==`insertCompositionText`&&q(t,Pn,e)}(e,t)]);var Or=0,kr=null,Ar=0,jr=null,Mr=new WeakMap,Nr=new WeakMap,Pr=!1,Fr=!1,Ir=!1,Lr=!1,Rr=!1,zr=``,Br=null,Vr=[0,``,0,`root`,0];function Hr(e,t,n,r,i){let a=e.anchor,o=e.focus,s=a.getNode(),c=R(),l=ms(os(c)),u=l===null?null:l.anchorNode,d=a.key,f=c.getElementByKey(d),p=n.length;return d!==o.key||!M(s)||(!i&&(!Ye||Ar<r+50)||s.isDirty()&&p<2||Po(n))&&a.offset!==o.offset&&!s.isComposing()||go(s)||s.isDirty()&&p>1||(i||!Ye)&&f!==null&&!s.isComposing()&&u!==yo(f)||l!==null&&t!==null&&(!t.collapsed||t.startContainer!==l.anchorNode||t.startOffset!==l.anchorOffset)||!s.isComposing()&&(s.getFormat()!==e.format||s.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=ho(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(M(t)||z(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,s)}function Ur(e,t){return _o(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Wr(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=e;Pr&&(Pr=!1,Ur(r,i)&&Ur(a,o)&&!Br)||Ia(t,()=>{if(!n)return void Mo(null);if(!lo(t,r,a))return;let s=P();if(Br&&N(s)&&s.isCollapsed()){let e=s.anchor,t=Br.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(s=Br.clone(),Mo(s))}if(Br=null,N(s)){let n=s.anchor,r=n.getNode();if(s.isCollapsed()){e.type===`Range`&&e.anchorNode===e.focusNode&&(s.dirty=!0);let i=os(t).event,a=i?i.timeStamp:performance.now(),[o,c,l,u,d]=Vr,f=G(),p=!1===t.isComposing()&&f.getTextContent()===``;if(a<d+200&&n.offset===l&&n.key===u)Gr(s,o,c);else if(n.type===`text`)M(r)||E(141),Kr(s,r);else if(n.type===`element`&&!p){z(r)||E(259);let e=n.getNode();e.isEmpty()?function(e,t){Gr(e,t.getTextFormat(),t.getTextStyle())}(s,e):Gr(s,0,``)}}else{let e=n.key,t=s.focus.key,r=s.getNodes(),a=r.length,c=s.isBackward(),l=c?o:i,u=c?i:o,d=c?t:e,f=c?e:t,p=2047,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(M(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}s.format=m?p:0}}q(t,jn,void 0)})}function Gr(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Kr(e,t){Gr(e,t.getFormat(),t.getStyle())}function qr(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Jr(e){let t=e.inputType,n=qr(e),r=R(),i=P();if(t===`deleteContentBackward`){if(i===null){let e=aa();if(!N(e))return!0;Mo(e.clone())}if(N(i)){let t=i.anchor.key===i.focus.key;if(a=e.timeStamp,kr===`MediaLast`&&a<Or+30&&r.isComposing()&&t){if(U(null),Or=0,setTimeout(()=>{Ia(r,()=>{U(null)})},30),N(i)){let e=i.anchor.getNode();e.markDirty(),M(e)||E(142),Kr(i,e)}}else{U(null),e.preventDefault();let n=i.anchor.getNode(),a=n.getTextContent(),o=n.canInsertTextAfter(),s=i.anchor.offset===0&&i.focus.offset===a.length,c=et&&t&&!s&&o;if(c&&i.isCollapsed()&&(c=!B(Zo(i.anchor,!0))),!c){q(r,Rn,!0);let e=P();et&&N(e)&&e.isCollapsed()&&(Br=e,setTimeout(()=>Br=null))}}return!0}}var a;if(!N(i))return!0;let o=e.data;jr!==null&&Ro(!1,r,jr),i.dirty&&jr===null||!i.isCollapsed()||V(i.anchor.getNode())||n===null||i.applyDOMRange(n),jr=null;let s=i.anchor,c=i.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
4
+ `)e.preventDefault(),q(r,zn,!1);else if(o===ft)e.preventDefault(),q(r,Bn,void 0);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),i.insertRawText(t)}else o!=null&&Hr(i,n,o,e.timeStamp,!0)?(e.preventDefault(),q(r,Vn,o)):jr=o;return Ar=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:q(r,Vn,e);break;case`insertFromComposition`:U(null),q(r,Vn,e);break;case`insertLineBreak`:U(null),q(r,zn,!1);break;case`insertParagraph`:U(null),Ir&&!Ze?(Ir=!1,q(r,zn,!1)):q(r,Bn,void 0);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:q(r,Hn,e);break;case`deleteByComposition`:(function(e,t){return e!==t||z(e)||z(t)||!ho(e)||!ho(t)})(l,u)&&q(r,Un,e);break;case`deleteByDrag`:case`deleteByCut`:q(r,Un,e);break;case`deleteContent`:q(r,Rn,!1);break;case`deleteWordBackward`:q(r,Wn,!0);break;case`deleteWordForward`:q(r,Wn,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:q(r,Gn,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:q(r,Gn,!1);break;case`formatStrikeThrough`:q(r,Kn,`strikethrough`);break;case`formatBold`:q(r,Kn,`bold`);break;case`formatItalic`:q(r,Kn,`italic`);break;case`formatUnderline`:q(r,Kn,`underline`);break;case`historyUndo`:q(r,qn,void 0);break;case`historyRedo`:q(r,Jn,void 0)}return!0}function Yr(e){if(J(e.target)&&so(e.target))return!0;let t=R(),n=P(),r=e.data,i=qr(e);if(r!=null&&N(n)&&Hr(n,i,r,e.timeStamp,!1)){Lr&&=(Qr(t,r),!1);let i=n.anchor.getNode(),a=ms(os(t));if(a===null)return!0;let o=n.isBackward(),s=o?n.anchor.offset:n.focus.offset,c=o?n.focus.offset:n.anchor.offset;Ye&&!n.isCollapsed()&&M(i)&&a.anchorNode!==null&&i.getTextContent().slice(0,s)+r+i.getTextContent().slice(s+c)===Lo(a.anchorNode)||q(t,Vn,r);let l=r.length;Je&&l>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(n.anchor.offset-=l),et&&t.isComposing()&&(Or=0,U(null))}else Ro(!1,t,r===null?void 0:r),Lr&&=(Qr(t,r||void 0),!1);return function(){L(),Mt(R())}(),!0}function Xr(e){let t=R(),n=P();if(N(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();U(r.key),ns(pi),(e.timeStamp<Or+30||r.type===`element`||!n.isCollapsed()||i.getFormat()!==n.format||M(i)&&i.getStyle()!==n.style)&&q(t,Vn,pt)}return!0}function Zr(e){return Qr(R(),e.data),ns(mi),!0}function Qr(e,t){let n=e._compositionKey;if(U(null),n!==null&&t!=null){if(t===``){let t=W(n),r=yo(e.getElementByKey(n));if(r!==null&&r.nodeValue!==null&&M(t)){let n=ms(os(e)),i=null,a=null;n!==null&&n.anchorNode===r&&(i=n.anchorOffset,a=n.focusOffset),zo(t,r.nodeValue,i,a,!0)}return}if(t[t.length-1]===`
5
+ `){let t=P();if(N(t)||Wi(t)){if(N(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}q(e,nr,null);return}}}Ro(!0,e,t)}function $r(e){let t=R();if(e.key==null)return!0;if(Rr){if(Go(e))return Ia(t,()=>{Qr(t,zr)}),Rr=!1,zr=``,!0;Rr=!1,zr=``}if(function(e){return K(e,`ArrowRight`,{shiftKey:`any`})}(e))q(t,Xn,e);else if(function(e){return K(e,`ArrowRight`,Uo)}(e))q(t,Zn,e);else if(function(e){return K(e,`ArrowLeft`,{shiftKey:`any`})}(e))q(t,Qn,e);else if(function(e){return K(e,`ArrowLeft`,Uo)}(e))q(t,$n,e);else if(function(e){return K(e,`ArrowUp`,{altKey:`any`,shiftKey:`any`})}(e))q(t,er,e);else if(function(e){return K(e,`ArrowDown`,{altKey:`any`,shiftKey:`any`})}(e))q(t,tr,e);else if(function(e){return K(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:!0})}(e))Ir=!0,q(t,nr,e);else if(function(e){return e.key===` `}(e))q(t,rr,e);else if(function(e){return qe&&K(e,`o`,{ctrlKey:!0})}(e))e.preventDefault(),Ir=!0,q(t,zn,!0);else if(function(e){return K(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`})}(e))Ir=!1,q(t,nr,e);else if(function(e){return K(e,`Backspace`,{shiftKey:`any`})||qe&&K(e,`h`,{ctrlKey:!0})}(e))Go(e)?q(t,ir,e):(e.preventDefault(),q(t,Rn,!0));else if(function(e){return e.key===`Escape`}(e))q(t,ar,e);else if(function(e){return K(e,`Delete`,{})||qe&&K(e,`d`,{ctrlKey:!0})}(e))(function(e){return e.key===`Delete`})(e)?q(t,or,e):(e.preventDefault(),q(t,Rn,!1));else if(function(e){return K(e,`Backspace`,Wo)}(e))e.preventDefault(),q(t,Wn,!0);else if(function(e){return K(e,`Delete`,Wo)}(e))e.preventDefault(),q(t,Wn,!1);else if(function(e){return qe&&K(e,`Backspace`,{metaKey:!0})}(e))e.preventDefault(),q(t,Gn,!0);else if(function(e){return qe&&(K(e,`Delete`,{metaKey:!0})||K(e,`k`,{ctrlKey:!0}))}(e))e.preventDefault(),q(t,Gn,!1);else if(function(e){return K(e,`b`,Uo)}(e))e.preventDefault(),q(t,Kn,`bold`);else if(function(e){return K(e,`u`,Uo)}(e))e.preventDefault(),q(t,Kn,`underline`);else if(function(e){return K(e,`i`,Uo)}(e))e.preventDefault(),q(t,Kn,`italic`);else if(function(e){return K(e,`Tab`,{shiftKey:`any`})}(e))q(t,sr,e);else if(function(e){return K(e,`z`,Uo)}(e))e.preventDefault(),q(t,qn,void 0);else if(function(e){return qe?K(e,`z`,{metaKey:!0,shiftKey:!0}):K(e,`y`,{ctrlKey:!0})||K(e,`z`,{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),q(t,Jn,void 0);else{let n=t._editorState._selection;n===null||N(n)?Ko(e)&&(e.preventDefault(),q(t,vr,e)):function(e){return K(e,`c`,Uo)}(e)?(e.preventDefault(),q(t,gr,e)):function(e){return K(e,`x`,Uo)}(e)?(e.preventDefault(),q(t,_r,e)):Ko(e)&&(e.preventDefault(),q(t,vr,e))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(Tr,e),!0}function ei(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var ti=new Map;function ni(e){let t=hs(e.target);if(t===null)return;let n=fo(t.anchorNode);if(n===null)return;Fr&&(Fr=!1,Ia(n,()=>{let r=aa(),i=t.anchorNode;(J(i)||_o(i))&&Mo(ia(r,t,n,e))}));let r=Fo(n),i=r[r.length-1],a=i._key,o=ti.get(a),s=o||i;s!==n&&Wr(t,s,!1),Wr(t,n,!0),n===i?o&&ti.delete(a):ti.set(a,n)}function ri(e){e._lexicalHandled=!0}function ii(e){return!0===e._lexicalHandled}function ai(e){let t=Mr.get(e);if(t===void 0)return;let n=Nr.get(t);if(n===void 0)return;let r=n-1;r>=0||E(164),Mr.delete(e),Nr.set(t,r),r===0&&t.removeEventListener(`selectionchange`,ni);let i=po(e);uo(i)?(function(e){if(e._parentEditor!==null){let t=Fo(e),n=t[t.length-1]._key;ti.get(n)===e&&ti.delete(n)}else ti.delete(e._key)}(i),e.__lexicalEditor=null):i&&E(198);let a=ei(e);for(let e=0;e<a.length;e++)a[e]();e.__lexicalEventHandles=[]}function oi(e,t,n){L();let r=e.__key,i=e.getParent();if(i===null)return;let a=function(e){let t=P();if(!N(t)||!z(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return is(i,e)&&n.set(e.__key,0,`element`),is(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(N(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(ca(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(ca(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Wi(a)&&t&&e.isSelected()&&e.selectPrevious();if(N(a)&&t&&!o){let t=e.getIndexWithinParent();Co(e),oa(a,i,t,-1)}else Co(e);n||cs(i)||i.canBeEmpty()||!i.isEmpty()||oi(i,t),t&&a&&V(i)&&i.isEmpty()&&i.selectEnd()}function si(e){return e}var ci=Symbol.for(`ephemeral`);function li(e){return e[ci]||!1}var ui=class{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=js(this);return e===void 0&&E(64,this.name),e}static clone(e){E(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:n,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),So(this,e)}getType(){return this.__type}isInline(){E(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=W(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){let t=e||P();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(M(this))return n;if(N(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(B(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:W(e)}getParentOrThrow(){let e=this.getParent();return e===null&&E(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(cs(t))return z(e)||e===this&&B(e)||E(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&E(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:W(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:W(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=z(this)?this:this.getParent(),n=z(e)?e:e.getParent(),r=t&&n?uc(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=uc(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?sc(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&E(279),!1)))}isParentOf(e){let t=uc(this,e);return t!==null&&t.type===`ancestor`}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=z(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&E(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=R()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(li(this))return this;let e=W(this.__key);return e===null&&E(113),e}getWritable(){if(li(this))return this;L();let e=Ca(),t=R(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=P();if(o!==null&&o.setCachedNodes(null),a.has(r))return wo(i),i;let s=Es(i);return a.add(r),wo(s),n.set(r,s),s}getTextContent(){return``}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){E(70)}updateDOM(e,t,n){E(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){E(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of Vt(n).flatKeys)e in t&&(i!==void 0&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&Bt(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){oi(this,!0,e)}replace(e,t){L();let n=P();n!==null&&(n=n.clone()),us(this,e);let r=this.getLatest(),i=this.__key,a=e.__key,o=e.getWritable(),s=this.getParentOrThrow().getWritable(),c=s.__size;Co(o);let l=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,p=r.__parent;if(oi(r,!1,!0),l===null?s.__first=a:l.getWritable().__next=a,o.__prev=d,u===null?s.__last=a:u.getWritable().__prev=a,o.__next=f,o.__parent=p,s.__size=c,t&&(z(this)&&z(o)||E(139),this.getChildren().forEach(e=>{o.append(e)})),N(n)){Mo(n);let e=n.anchor,t=n.focus;e.key===i&&Vi(e,o),t.key===i&&Vi(t,o)}return To()===i&&U(a),o}insertAfter(e,t=!0){L(),us(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.getParent(),a=P(),o=!1,s=!1;if(i!==null){let t=e.getIndexWithinParent();if(Co(r),N(a)){let e=i.__key,n=a.anchor,r=a.focus;o=n.type===`element`&&n.key===e&&n.offset===t+1,s=r.type===`element`&&r.key===e&&r.offset===t+1}}let c=this.getNextSibling(),l=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(c===null?l.__last=u:c.getWritable().__prev=u,l.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&N(a)){let e=this.getIndexWithinParent();oa(a,l,e+1);let t=l.__key;o&&a.anchor.set(t,e+2,`element`),s&&a.focus.set(t,e+2,`element`)}return e}insertBefore(e,t=!0){L(),us(this,e);let n=this.getWritable(),r=e.getWritable(),i=r.__key;Co(r);let a=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),s=n.__prev,c=this.getIndexWithinParent();a===null?o.__first=i:a.getWritable().__next=i,o.__size++,n.__prev=i,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;let l=P();return t&&N(l)&&oa(l,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return H()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){L();let n=this.getPreviousSibling(),r=this.getParentOrThrow();if(n===null)return r.select(0,0);if(z(n))return n.select();if(!M(n)){let e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){L();let n=this.getNextSibling(),r=this.getParentOrThrow();if(n===null)return r.select();if(z(n))return n.select(0,0);if(!M(n)){let e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}},di=`history-push`,fi=`history-merge`,pi=`composition-start`,mi=`composition-end`,hi=class e extends ui{static getType(){return`linebreak`}static clone(t){return new e(t.__key)}constructor(e){super(e)}getTextContent(){return`
6
+ `}createDOM(){return document.createElement(`br`)}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(e){let t=e.parentElement;if(t!==null&&bs(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&vi(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&vi(n))return!0}}return!1}(e)||function(e){let t=e.parentElement;if(t!==null&&bs(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&vi(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&vi(r))return!0}return!1}(e)?null:{conversion:gi,priority:0}}}static importJSON(e){return _i().updateFromJSON(e)}};function gi(e){return{node:_i()}}function _i(){return ls(new hi)}function A(e){return e instanceof hi}function vi(e){return _o(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}function yi(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function bi(e,t){return 1&t?`strong`:2&t?`em`:`span`}function xi(e,t,n,r,i){let a=r.classList,o=Jo(i,`base`);o!==void 0&&a.add(...o),o=Jo(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in gt){let r=gt[e];if(o=Jo(i,e),o!==void 0)if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}function Si(e,t,n){let r=t.firstChild,i=n.isComposing(),a=e+(i?dt:``);if(r==null)t.textContent=a;else{let e=r.nodeValue;if(e!==a)if(i||Je){let[t,n,i]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(e,a);n!==0&&r.deleteData(t,n),r.insertData(t,i)}else r.nodeValue=a}}function Ci(e,t,n,r,i,a){Si(i,e,t);let o=a.theme.text;o!==void 0&&xi(0,0,r,e,o)}function wi(e,t){let n=document.createElement(t);return n.appendChild(e),n}var Ti=class e extends ui{__text;__format;__style;__mode;__detail;static getType(){return`text`}static clone(t){return new e(t.__text,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return xt[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===To()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=gt[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type===`text`&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return bo(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=yi(0,n),i=bi(0,n),a=r===null?i:r,o=document.createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=document.createElement(i),o.appendChild(s)),Ci(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&(o.style.cssText=c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=yi(0,i),s=yi(0,a),c=bi(0,i),l=bi(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??E(48);let i=document.createElement(l);return Ci(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??E(49)),Si(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&xi(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Ai,priority:0}),b:()=>({conversion:Di,priority:0}),code:()=>({conversion:Ni,priority:0}),em:()=>({conversion:Ni,priority:0}),i:()=>({conversion:Ni,priority:0}),mark:()=>({conversion:Ni,priority:0}),s:()=>({conversion:Ni,priority:0}),span:()=>({conversion:Ei,priority:0}),strong:()=>({conversion:Ni,priority:0}),sub:()=>({conversion:Ni,priority:0}),sup:()=>({conversion:Ni,priority:0}),u:()=>({conversion:Ni,priority:0})}}static importJSON(e){return j().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return J(t)||E(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=wi(t,`b`)),this.hasFormat(`italic`)&&(t=wi(t,`i`)),this.hasFormat(`strikethrough`)&&(t=wi(t,`s`)),this.hasFormat(`underline`)&&(t=wi(t,`u`)),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?gt[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?_t[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=bo(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=bt[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){L();let n=e,r=t,i=P(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!N(i))return ta(o,n,o,r,`text`,`text`);{let e=To();e!==i.anchor.key&&e!==i.focus.key||U(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=P();if(r&&N(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){L();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=To(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=P();if(N(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=j(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Kt(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=j(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Kt(t,n);let a=n.__key;i===r&&U(a),y.push(n)}let ee=g?g.offset:null,te=_?_.offset:null,b=0;for(let e of y){if(!g&&!_)break;let t=b+e.getTextContentSize();if(g!==null&&ee!==null&&ee<=t&&ee>=b&&(g.set(e.getKey(),ee-b,`text`),ee<t&&(g=null)),_!==null&&te!==null&&te<=t&&te>=b){_.set(e.getKey(),te-b,`text`);break}b=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&wo(t),n!==null&&wo(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),N(v)&&oa(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||E(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;To()===r&&U(n);let o=P();if(N(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&la(i,t,n,e,a),s!==null&&s.key===r&&la(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function Ei(e){return{forChild:Pi(e.style),node:null}}function Di(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:Pi(t.style,n?void 0:`bold`),node:null}}var Oi=new WeakMap;function ki(e){if(!J(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function Ai(e){let t=e;e.parentElement===null&&E(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=Oi.get(n))===void 0&&!ki(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)Oi.set(r[e],i);return i}(t)!==null){let e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){let r=e[n];r===`
7
+ `||r===`\r
8
+ `?t.push(_i()):r===` `?t.push(Ii()):r!==``&&t.push(j(r))}return{node:t}}if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=ji(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=ji(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:j(n)}}function ji(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,J(n)){let e=n.style.display;if(e===``&&!ys(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(_o(n))return n;if(n.nodeName===`BR`)return null}}var Mi={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function Ni(e){let t=Mi[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Pi(e.style,t),node:null}}function j(e=``){return ls(new Ti(e))}function M(e){return e instanceof Ti}function Pi(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign;return e=>M(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var Fi=class e extends Ti{static getType(){return`tab`}static clone(t){return new e(t.__key)}constructor(e){super(` `,e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),n=Jo(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}static importJSON(e){return Ii().updateFromJSON(e)}setTextContent(e){return e!==` `&&e!==``&&We(126),super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||E(286),this}setDetail(e){return e!==2&&E(127),this}setMode(e){return e!==`normal`&&E(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function Ii(){return ls(new Fi)}function Li(e){return e instanceof Fi}var Ri=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:oc(bc(dc(this,`next`)),bc(dc(e,`next`)))<0}getNode(){let e=W(this.key);return e===null&&E(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,xa()||(To()===a&&U(e),i!==null&&(i.setCachedNodes(null),i.dirty=!0)))}};function zi(e,t,n){return new Ri(e,t,n)}function Bi(e,t){let n=t.__key,r=e.offset,i=`element`;if(M(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!z(t)){let e=t.getNextSibling();if(M(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function Vi(e,t){if(z(t)){let n=t.getLastDescendant();z(n)||M(n)?Bi(e,n):Bi(e,t)}else Bi(e,t)}var Hi=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Wi(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes(),n=t.length,r=t[n-1],i;if(M(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=W(e);t!==null&&n.push(t)}return xa()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((P()||aa())===this&&e[0]){let t=Y(e[0],`next`);pc(ic(t,t))}for(let t of e)t.remove()}};function N(e){return e instanceof Ui}var Ui=class e{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!N(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(Ws(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;z(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),Us(e.focus)&&z(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=Zs(e.focus.origin,`previous`);Ws(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=$s(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!z(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=bc(e.anchor),r=bc(e.anchor.getFlipped()),i=e=>Hs(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(Cc(hc(this),`next`));return xa()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`)}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=Ki(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if(z(d)&&!d.isInline())l||(c+=`
9
+ `),l=!d.isEmpty();else if(l=!1,M(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!B(d)&&!A(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=R(),n=t.getEditorState()._selection,r=$i(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),Xt(this)}clone(){let t=this.anchor,n=this.focus;return new e(zi(t.key,t.offset,t.type),zi(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=bo(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=gt[e];return(this.format&t)!==0}insertRawText(e){let t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){let r=t[e];r===`
10
+ `||r===`\r
11
+ `?n.push(_i()):r===` `?n.push(Ii()):n.push(j(r))}this.insertNodes(n)}insertText(e){let t=this.anchor,n=this.focus,r=this.format,i=this.style,a=t,o=n;!this.isCollapsed()&&n.isBefore(t)&&(a=n,o=t),a.type===`element`&&function(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=j();if(o.setFormat(n),o.setStyle(r),Xa(a))a.splice(0,0,[o]);else{let e=V(i)?H().append(o):o;a===null?i.append(e):a.insertBefore(e)}e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}(a,o,r,i),o.type===`element`&&fc(o,bc(dc(o,`next`)));let s=a.offset,c=o.offset,l=this.getNodes(),u=l.length,d=l[0];M(d)||E(26);let f=d.getTextContent().length,p=d.getParentOrThrow(),m=l[u-1];if(u===1&&o.type===`element`&&(c=f,o.set(a.key,c,`text`)),this.isCollapsed()&&s===f&&(go(d)||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&d.getNextSibling()===null)){let t=d.getNextSibling();if(M(t)&&t.canInsertTextBefore()&&!go(t)||(t=j(),t.setFormat(r),t.setStyle(i),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,e!==``)return void this.insertText(e)}else if(this.isCollapsed()&&s===0&&(go(d)||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&d.getPreviousSibling()===null)){let t=d.getPreviousSibling();if(M(t)&&!go(t)||(t=j(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,e!==``)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){let e=j(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&e!==``){let t=m.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||z(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(``),Qi(this.anchor,this.focus),void this.insertText(e)}if(u===1){if(ho(d)){let t=j(e);t.select(),d.replace(t);return}let t=d.getFormat(),n=d.getStyle();if(s!==c||t===r&&n===i){if(Li(d)){let t=j(e);t.setFormat(r),t.setStyle(i),t.select(),d.replace(t);return}}else{if(d.getTextContent()!==``){let t=j(e);if(t.setFormat(r),t.setStyle(i),t.select(),s===0)d.insertBefore(t,!1);else{let[e]=d.splitText(s);e.insertAfter(t,!1)}t.isComposing()&&this.anchor.type===`text`&&(this.anchor.offset-=e.length);return}d.setFormat(r),d.setStyle(i)}let a=c-s;d=d.spliceText(s,a,e,!0),d.getTextContent()===``?d.remove():this.anchor.type===`text`&&(this.format=t,this.style=n,d.isComposing()&&(this.anchor.offset-=e.length))}else{let t=new Set([...d.getParentKeys(),...m.getParentKeys()]),n=z(d)?d:d.getParentOrThrow(),r=z(m)?m:m.getParentOrThrow(),i=m;if(!n.is(r)&&r.isInline())do i=r,r=r.getParentOrThrow();while(r.isInline());if(o.type===`text`&&(c!==0||m.getTextContent()===``)||o.type===`element`&&m.getIndexWithinParent()<c)if(M(m)&&!ho(m)&&c!==m.getTextContentSize()){if(m.isSegmented()){let e=j(m.getTextContent());m.replace(e),m=e}V(o.getNode())||o.type!==`text`||(m=m.spliceText(0,c,``)),t.add(m.__key)}else{let e=m.getParentOrThrow();e.canBeEmpty()||e.getChildrenSize()!==1?m.remove():e.remove()}else t.add(m.__key);let a=r.getChildren(),p=new Set(l),h=n.is(r),g=n.isInline()&&d.getNextSibling()===null?n:d;for(let e=a.length-1;e>=0;e--){let t=a[e];if(t.is(d)||z(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(i)?h||g.insertAfter(t,!1):t.remove())}if(!h){let e=r,n=null;for(;e!==null;){let r=e.getChildren(),i=r.length;(i===0||r[i-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(ho(d))if(s===f)d.select();else{let t=j(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),d.getTextContent()===``?d.remove():this.anchor.type===`text`&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length));for(let e=1;e<u;e++){let n=l[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){let e=P()===this;mc(this,yc(hc(this))),e&&P()!==this&&Mo(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void U(null);let n=this.getNodes(),r=[];for(let e of n)M(e)&&r.push(e);let i=t=>{n.forEach(n=>{if(z(n)){let r=n.getFormatFlags(e,t);n.setTextFormat(r)}})},a=r.length;if(a===0)return this.toggleFormat(e),U(null),void i(t);let o=this.anchor,s=this.focus,c=this.isBackward(),l=c?s:o,u=c?o:s,d=0,f=r[0],p=l.type===`element`?0:l.offset;if(l.type===`text`&&p===f.getTextContentSize()&&(d=1,f=r[1],p=0),f==null)return;let m=f.getFormatFlags(e,t);i(m);let h=a-1,g=r[h],_=u.type===`text`?u.offset:g.getTextContentSize();if(f.is(g)){if(p===_)return;if(go(f)||p===0&&_===f.getTextContentSize())f.setFormat(m);else{let e=f.splitText(p,_),t=p===0?e[0]:e[1];t.setFormat(m),l.type===`text`&&l.set(t.__key,0,`text`),u.type===`text`&&u.set(t.__key,_-p,`text`)}this.format=m;return}p===0||go(f)||([,f]=f.splitText(p),p=0),f.setFormat(m);let v=g.getFormatFlags(e,m);_>0&&(_===g.getTextContentSize()||go(g)||([g]=g.splitText(_)),g.setFormat(v));for(let t=d+1;t<h;t++){let n=r[t],i=n.getFormatFlags(e,v);n.setFormat(i)}l.type===`text`&&l.set(f.__key,p,`text`),u.type===`text`&&u.set(g.__key,_,`text`),this.format=m|v}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key===`root`){this.insertParagraph();let t=P();return N(t)||E(134),t.insertNodes(e)}let t=(this.isBackward()?this.focus:this.anchor).getNode(),n=Ns(t,xs),r=e[e.length-1];if(z(n)&&`__language`in n){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let t=ma(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some(e=>(z(e)||B(e))&&!e.isInline())){z(n)||E(211,t.constructor.name,t.getType());let i=ma(this);n.splice(i,0,e),r.selectEnd();return}let i=function(e){let t=H(),n=null;for(let r=0;r<e.length;r++){let i=e[r],a=A(i);if(a||B(i)&&i.isInline()||z(i)&&i.isInline()||M(i)||i.isParentRequired()){if(n===null&&(n=i.createParentElementNode(),t.append(n),a))continue;n!==null&&n.append(i)}else t.append(i),n=null}return t}(e),a=i.getLastDescendant(),o=i.getChildren(),s=!z(n)||!n.isEmpty()?this.insertParagraph():null,c=o[o.length-1],l=o[0];var u;z(u=l)&&xs(u)&&!u.isEmpty()&&z(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(z(n)||E(211,t.constructor.name,t.getType()),n.append(...l.getChildren()),l=o[1]),l&&(n===null&&E(212,t.constructor.name,t.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||E(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(n,l));let d=Ns(a,xs);s&&z(d)&&(s.canMergeWhenEmpty()||xs(c))&&(d.append(...s.getChildren()),s.remove()),z(n)&&n.isEmpty()&&n.remove(),a.selectEnd();let f=z(n)?n.getLastChild():null;A(f)&&d!==n&&f.remove()}insertParagraph(){if(this.anchor.key===`root`){let e=H();return G().splice(this.anchor.offset,0,[e]),e.select(),e}let e=ma(this),t=Ns(this.anchor.getNode(),xs);z(t)||E(213);let n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],i=t.insertNewAfter(this,!1);return i?(i.append(...r),i.selectStart(),i):null}insertLineBreak(e){let t=_i();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=Ki(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(M(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(M(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),M(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(ga(this,e,t,n))return;let r=e===`move`,i=R(),a=ms(os(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();if(s===null||o===null||!z(c)||c.isInline()||c.canBeEmpty()||ps(o,i,s),this.dirty){let e=$o(i,this.anchor.key),t=$o(i,this.focus.key);this.anchor.type===`text`&&(e=yo(e)),this.focus.type===`text`&&(t=yo(t)),e&&t&&ua(a,e,this.anchor.offset,t,this.focus.offset)}if(function(e,t,n,r){e.modify(t,n,r)}(a,e,t?`backward`:`forward`,n),a.rangeCount>0){let e=a.getRangeAt(0),n=this.anchor.getNode(),i=V(n)?n:ss(n);if(this.applyDOMRange(e),this.dirty=!0,!r){let n=this.getNodes(),r=[],o=!1;for(let e=0;e<n.length;e++){let t=n[e];is(t,i)?r.push(t):o=!0}if(o&&r.length>0)if(t){let e=r[0];z(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=r[r.length-1];z(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}a.anchorNode===e.startContainer&&a.anchorOffset===e.startOffset||function(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}(this)}}n===`lineboundary`&&ga(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&z(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if(z(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=nc(dc(t,e?`previous`:`next`));if(r.getTextSlices().every(e=>e===null||e.distance===0)){let e={type:`initial`};for(let t of r.iterNodeCarets(`shadowRoot`))if(Ws(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if(z(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=bc(t);mc(this,ic(e,e)),r.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(Us(t)){if(z(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(B(t.origin)){if(!t.origin.isIsolated())if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&z(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=ra();e.add(t.origin.getKey()),Mo(e)}else t.origin.remove();return}break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return mc(this,ic(!t.origin.isEmpty()&&n.isEmpty()?gc(Y(n,t.direction)):r.anchor,t)),this.removeText()}}let i=this.focus;if(this.modify(`extend`,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&qi(this,t.getNode()))return}else{let r=i.type===`text`?i.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=i.offset,a=r.getTextContentSize();if(r.is(n)||e&&t!==a||!e&&t!==0)return void Yi(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void Yi(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(Po(e)||Ji(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&V(e.getParent())&&e.getPreviousSibling()===null&&qi(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify(`extend`,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify(`extend`,e,`word`)}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}};function Wi(e){return e instanceof Hi}function Gi(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Ki(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[Gi(n),Gi(r)]}function qi(e,t){for(let n=t;n;n=n.getParent()){if(z(n)){if(n.collapseAtStart(e))return!0;if(cs(n))break}if(n.getPreviousSibling())break}return!1}var Ji=(()=>{try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1})();function Yi(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function Xi(e,t,n,r){let i,a=t;if(J(e)){let o=!1,s=e.childNodes,c=s.length,l=r._blockCursorElement;a===c&&(o=!0,a=c-1);let u=s[a],d=!1;if(u===l)u=s[a+1],d=!0;else if(l!==null){let n=l.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,l)&&a--}if(i=No(u),M(i))a=Ys(i,o?`next`:`previous`);else{let s=No(e);if(s===null)return null;if(z(s)){let c=r.getElementByKey(s.getKey());c===null&&E(214);let l=s.getDOMSlot(c);[s,a]=l.resolveChildIndex(s,c,e,t),z(s)||E(215),o&&a>=s.getChildrenSize()&&(a=Math.max(0,s.getChildrenSize()-1));let u=s.getChildAtIndex(a);if(z(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=o?u.getLastDescendant():u.getFirstDescendant();e===null?s=u:(u=e,s=z(u)?u:u.getParentOrThrow()),a=0}M(u)?(i=u,s=null,a=Ys(u,o?`next`:`previous`)):u!==s&&o&&!d&&(z(s)||E(216),a=Math.min(s.getChildrenSize(),a+1))}else{let n=s.getIndexWithinParent();a=t===0&&B(s)&&No(e)===s?n:n+1,s=s.getParentOrThrow()}if(z(s))return zi(s.__key,a,`element`)}}else i=No(e);return M(i)?zi(i.__key,Ys(i,a,`clamp`),`text`):null}function Zi(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&z(a)&&a.isInline()){let t=a.getPreviousSibling();M(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else z(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):M(r)&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&z(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&z(a)&&a.isInline()&&!a.canInsertTextAfter()){let t=a.getNextSibling();M(t)&&e.set(t.__key,0,`text`)}}}function Qi(e,t,n){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Zi(e,n,r),Zi(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}function $i(e,t,n,r,i,a){if(e===null||n===null||!lo(i,e,n))return null;let o=Xi(e,t,N(a)?a.anchor:null,i);if(o===null)return null;let s=Xi(n,r,N(a)?a.focus:null,i);if(s===null)return null;if(o.type===`element`&&s.type===`element`){let t=No(e),r=No(n);if(B(t)&&B(r))return null}return Qi(o,s),[o,s]}function ea(e){return z(e)&&!e.isInline()}function ta(e,t,n,r,i,a){let o=Ca(),s=new Ui(zi(e,t,i),zi(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function na(){return new Ui(zi(`root`,0,`element`),zi(`root`,0,`element`),0,``)}function ra(){return new Hi(new Set)}function ia(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!wt&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(N(e)&&!c)return e.clone();if(t===null)return null;if(l=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(s||o===void 0)&&N(e)&&!lo(n,l,u))return e.clone();let p=$i(l,d,u,f,n,e);if(p===null)return null;let[m,h]=p,g=0,_=``;if(N(e)){let t=e.anchor;if(m.key===t.key)g=e.format,_=e.style;else{let e=m.getNode();M(e)?(g=e.getFormat(),_=e.getStyle()):z(e)&&(g=e.getTextFormat(),_=e.getTextStyle())}}return new Ui(m,h,g,_)}function P(){return Ca()._selection}function aa(){return R()._editorState._selection}function oa(e,t,n,r=1){let i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;let c=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(c,n,`element`),a.set(c,n,`element`),sa(e)}}else{let o=e.isBackward(),s=o?a:i,l=s.getNode(),u=o?i:a,d=u.getNode();if(t.is(l)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(c,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(c,Math.max(0,e+r),`element`)}}sa(e)}function sa(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!z(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(M(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if(z(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(M(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if(z(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(M(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function ca(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,M(i)?s=`text`:z(i)&&(s=`element`)):(a=r.__key,M(r)?(o=r.getTextContentSize(),s=`text`):z(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function la(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 ua(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function da(e,t,n){let r=$o(e,t.getKey());if(z(t)){let e=t.getDOMSlot(r);return[e.element,n+e.getFirstChildOffset()]}return[r,n]}function fa(e,t,n,r,i,a,o){let s=r.anchorNode,c=r.focusNode,l=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(`collaboration`)&&d!==a||d!==null&&co(d))return;if(!N(t))return void(e!==null&&lo(n,s,c)&&r.removeAllRanges());let f=t.anchor,p=t.focus,m=f.getNode(),h=p.getNode(),[g,_]=da(n,m,f.offset),[v,y]=da(n,h,p.offset),ee=t.format,te=t.style,b=t.isCollapsed(),x=g,S=v,ne=!1;var re,ie,ae,C,w;if((f.type===`text`?(x=yo(g),ne=m.getFormat()!==ee||m.getStyle()!==te):N(e)&&e.anchor.type===`text`&&(ne=!0),p.type===`text`&&(S=yo(v)),x!==null&&S!==null)&&(b&&(e===null||ne||N(e)&&(e.format!==ee||e.style!==te))&&(re=ee,ie=te,ae=_,C=f.key,w=performance.now(),Vr=[re,ie,ae,C,w]),l!==_||u!==y||s!==x||c!==S||r.type===`Range`&&b||(d!==null&&a.contains(d)||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0}),f.type===`element`))){if(ua(r,x,_,S,y),!Je||!t.isCollapsed()||a===null||i.has(`skip-selection-focus`)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===document.activeElement){let e=N(t)&&t.anchor.type===`element`?x.childNodes[_]||null:r.rangeCount>0?r.getRangeAt(0):null;if(e!==null){let t;if(e instanceof Text){let n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=ts(n),i=as(r);if(r===null||i===null)return;let{top:a,bottom:o}=t,s=0,c=0,l=n;for(;l!==null;){let t=l===r.body;if(t)s=0,c=os(e).innerHeight;else{let e=l.getBoundingClientRect();s=e.top,c=e.bottom}let n=0;if(a<s?n=-(s-a):o>c&&(n=o-c),n!==0)if(t)i.scrollBy(0,n);else{let e=l.scrollTop;l.scrollTop+=n;let t=l.scrollTop-e;a-=t,o-=t}if(t)break;l=es(l)}})(n,t,a)}}Pr=!0}}function pa(e){let t=P()||aa();t===null&&(t=G().selectEnd()),t.insertNodes(e)}function ma(e){let t=e;e.isCollapsed()||t.removeText();let n=P();N(n)&&(t=n),N(t)||E(161);let r=t.anchor,i=r.getNode(),a=r.offset;for(;!xs(i);){let e=i;if([i,a]=ha(i,a),e.is(i))break}return a}function ha(e,t){let n=e.getParent();if(!n){let e=H();return G().append(e),e.select(),[G(),0]}if(M(e)){let r=e.splitText(t);if(r.length===0)return[n,e.getIndexWithinParent()];let i=t===0?0:1;return[n,r[0].getIndexWithinParent()+i]}if(!z(e)||t===0)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new Ui(zi(e.__key,t,`element`),zi(e.__key,t,`element`),0,``),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function ga(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=dc(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`;if(!xc(c)){for(let e of c){l=!1;let{origin:t}=e;if(!B(t)||t.isIsolated()||(c=e,!o||!t.isInline()))break}if(l)for(let e of nc(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(Ws(e))e.origin.isInline()||(c=e);else{if(z(e.origin))continue;B(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&B(c.origin)&&c.origin.isKeyboardSelectable()){let e=ra();return e.add(c.origin.getKey()),Mo(e),!0}return c=bc(c),s&&fc(e.anchor,c),fc(e.focus,c),l||!o}var F=null,I=null,_a=!1,va=!1,ya=0,ba={characterData:!0,childList:!0,subtree:!0};function xa(){return _a||F!==null&&F._readOnly}function L(){_a&&E(13)}function Sa(){ya>99&&E(14)}function Ca(){return F===null&&E(195,wa()),F}function R(){return I===null&&E(196,wa()),I}function wa(){let e=0,t=new Set,n=eo.version;if(typeof window<`u`)for(let r of document.querySelectorAll(`[contenteditable]`)){let i=po(r);if(uo(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Ta(){return I}function Ea(e,t,n){let r=t.__type,i=io(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Da(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Oa(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function ka(e){return Aa(e,R()._nodes)}function Aa(e,t){let n=e.type,r=t.get(n);r===void 0&&E(17,n);let i=r.klass;e.type!==i.getType()&&E(18,i.name);let a=i.importJSON(e),o=e.children;if(z(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Aa(o[e],t);a.append(n)}return a}function ja(e,t,n){let r=F,i=_a,a=I;F=t,_a=!0,I=e;try{return n()}finally{F=r,_a=i,I=a}}function Ma(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=F,u=_a,d=I,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){I=e,F=n,_a=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=kn(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),va)throw t;Za(e,null,r,n),Nt(e),e._dirtyType=2,va=!0,Ma(e,a),va=!1;return}finally{p.observe(r,ba),e._updating=f,F=l,_a=u,I=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags,y=e._deferred;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=ko(e)),delete r[a])}(e,n);let ee=i?null:ms(os(e));if(e._editable&&ee!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){I=e,F=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&ps(t,e,r),fa(o,s,e,ee,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(N(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(document.activeElement)){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())fs(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);if(t!==null&&fs(t)){let n=t.getPreviousSibling();(n===null||fs(n))&&(s=!0,c=e.getElementByKey(t.__key))}}if(s){let n=e.getElementByKey(a.__key);r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=document.createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=Tc(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&ps(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,ba),I=d,F=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),N(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(jn,void 0);let te=e._pendingDecorators;te!==null&&(e._decorators=te,e._pendingDecorators=null,Na(`decorator`,e,!0,te)),function(e,t,n){let r=Ao(t),i=Ao(n);r!==i&&Na(`textcontent`,e,!0,i)}(e,t||a,n),Na(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),function(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,y),function(e){let t=e._updates;if(t.length!==0){let n=t.shift();if(n){let[t,r]=n;Fa(e,t,r)}}}(e)}function Na(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=i}}function Pa(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&E(191),a._flushSync=!0),o&&e._deferred.push(o),Oa(e,i.tag)),a==null?Fa(e,n,i):n()}}return r}function Fa(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,Oa(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=Ua(c||s),l=!0),c._flushSync=o;let u=F,d=_a,f=I,p=e._updating;F=c,_a=!1,e._updating=!0,I=e;let m=e._headless||e.getRootElement()===null;no(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=ms(os(e));return N(n)||n==null?ia(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Pa(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(N(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);M(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Yt(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=To(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);M(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Yt(r),r!==void 0&&Da(r,a)&&Ea(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){ya++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Da(c,a)&&Ea(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,ya++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Pa(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||(z(t)&&Ct(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of o)a.delete(e);for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(i.has(e)||n.delete(e),a.delete(e))}}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(N(i)){let e=c._nodeMap,t=i.anchor.key,n=i.focus.key;e.get(t)!==void 0&&e.get(n)!==void 0||E(19)}else Wi(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Ma(e);return}finally{F=u,_a=d,I=f,e._updating=p,ya=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Ma(e)):l&&oo(()=>{Ma(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ia(e,t,n){I===e&&n===void 0?t():Fa(e,t,n)}var La=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&E(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&E(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&E(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{let t=e===`decorator`&&(tt||Ze||Xe);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=document.createElement(`br`);if(n.insertBefore(i,r),e){let e=document.createElement(`img`);e.setAttribute(`data-lexical-linebreak`,`true`),e.style.cssText=`display: inline !important; border: 0px !important; margin: 0px !important;`,e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}let i=Ra(t,n);i.push(r);let a=Ra(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function Ra(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&E(225),n.reverse()}var za=class extends ui{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return yt[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=R()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;t!==null;){if(M(t)&&e.push(t),z(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;z(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;z(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return z(e)&&e.getLastDescendant()||e||null}let r=t[e];return z(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:W(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&E(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:W(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&E(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=``,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),z(i)&&r!==n-1&&!i.isInline()&&(e+=ft)}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),z(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=vt[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=gt[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return bo(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){L();let n=P(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(M(e)||z(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(M(e)||z(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return N(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):ta(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e===``?0:vt[e],this}setStyle(e){return this.getWritable().__style=e||``,this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){li(this)&&E(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||E(226,String(e),String(t),String(r));let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0)if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&E(100);let t=e.getNextSibling(),n=e.__key;Co(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling());let t=e.getWritable();t.__parent===a&&u--,Co(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&E(76),t.__parent=a,o.push(n),d=e}if(e+t===r)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else if(c!==null){let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=P();if(N(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;Ba(r,t,n)&&ca(r,r.getNode(),this,l,c),Ba(i,t,n)&&ca(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||cs(this)||this.remove()}}return i}getDOMSlot(e){return new La(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===``||cs(this)||this.getChildren().some(M)||(t!==0&&(e.textFormat=t),n!==``&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||``)}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=this.getDOMSlot(e),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function z(e){return e instanceof za}function Ba(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var Va=class extends ui{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function B(e){return e instanceof Va}var Ha=class e extends za{__cachedText;static getType(){return`root`}static clone(){return new e}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){E(51)}getTextContent(){let e=this.__cachedText;return!xa()&&R()._dirtyType!==0||e===null?super.getTextContent():e}remove(){E(52)}replace(e){E(53)}insertBefore(e){E(54)}insertAfter(e){E(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)z(e)||B(e)||E(282);return super.splice(e,t,n)}static importJSON(e){return G().updateFromJSON(e)}collapseAtStart(){return!0}};function V(e){return e instanceof Ha}function Ua(e){return new Ka(new Map(e._nodeMap))}function Wa(){return new Ka(new Map([[`root`,new Ha]]))}function Ga(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&E(130,n.name),z(e)){let r=t.children;Array.isArray(r)||E(59,n.name);let i=e.getChildren();for(let e=0;e<i.length;e++){let t=Ga(i[e]);r.push(t)}}return t}var Ka=class e{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return ja(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return ja(null,this,()=>({root:Ga(G())}))}},qa=class extends za{static getType(){return`artificial`}createDOM(e){return document.createElement(`div`)}},Ja=class e extends za{static getType(){return`paragraph`}static clone(t){return new e(t.__key)}createDOM(e){let t=document.createElement(`p`),n=Jo(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Ya,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return H().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){let t=this.getChildren().find(M);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=H();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(e.length===0||M(e[0])&&e[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 Ya(e){let t=H();if(e.style&&(t.setFormat(e.style.textAlign),Os(e,t)),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in vt&&t.setFormat(n)}return{node:t}}function H(){return ls(new Ja)}function Xa(e){return e instanceof Ja}function Za(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=Wa(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent=``),n!==null&&(n.textContent=``,i.set(`root`,n))}function Qa(e){let t=new Set,n=new Set,r=e;for(;r;){let{ownNodeConfig:e}=js(r),i=r.transform;if(!n.has(i)){n.add(i);let e=r.transform();e&&t.add(e)}if(e){let n=e.$transform;n&&t.add(n),r=e.extends}else{let e=Object.getPrototypeOf(r);r=e.prototype instanceof ui&&e!==ui?e:void 0}}return t}function $a(e){let t=e||{},n=Ta(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=Wa(),s=t.namespace||(i===null?Io():i._config.namespace),c=t.editorState,l=[Ha,Ti,hi,Fi,Ja,qa,...t.nodes||[]],{onError:u,html:d}=t,f=t.editable===void 0||t.editable,p;if(e===void 0&&n!==null)p=n._nodes;else{p=new Map;for(let e=0;e<l.length;e++){let t=l[e],n=null,r=null;if(typeof t!=`function`){let e=t;t=e.replace,n=e.with,r=e.withKlass||null}js(t);let i=t.getType(),a=Qa(t);p.set(i,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,sharedNodeState:Rt(l[e]),transforms:a})}}let m=new eo(o,i,p,{disableEvents:a,namespace:s,theme:r},u||console.error,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(p,d?d.import:void 0),f,e);return c!==void 0&&(m._pendingEditorState=c,m._dirtyType=2),function(e){e.registerCommand(Pn,Jr,0),e.registerCommand(Fn,Yr,0),e.registerCommand(In,Xr,0),e.registerCommand(Ln,Zr,0),e.registerCommand(Yn,$r,0)}(m),m}var eo=class{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,n,r,i,a,o,s){this._createEditorArgs=s,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Io(),this._onError=i,this._htmlConversions=a,this._editable=o,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){n===void 0&&E(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(e);i===void 0&&E(36,String(e));let a=i[n];return a.add(t),()=>{a.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&E(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=Ts(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=Ts(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=W(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:fi}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return q(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=Jo(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Za(this,t,e,r),t!==null&&(this._config.disableEvents||ai(t),n!=null&&t.classList.remove(...n)),e!==null){let t=as(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,Nt(this),this._updateTags.add(fi),Ma(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;Mr.set(e,n);let r=Nr.get(n)??0;r<1&&n.addEventListener(`selectionchange`,ni),Nr.set(n,r+1),e.__lexicalEditor=t;let i=ei(e);for(let n=0;n<Dr.length;n++){let[r,a]=Dr[n],o=typeof a==`function`?e=>{ii(e)||(ri(e),(t.isEditable()||r===`click`)&&a(e,t))}:e=>{if(ii(e))return;ri(e);let n=t.isEditable();switch(r){case`cut`:return n&&q(t,_r,e);case`copy`:return q(t,gr,e);case`paste`:return n&&q(t,Hn,e);case`dragstart`:return n&&q(t,pr,e);case`dragover`:return n&&q(t,mr,e);case`dragend`:return n&&q(t,hr,e);case`focus`:return n&&q(t,Cr,e);case`blur`:return n&&q(t,wr,e);case`drop`:return n&&q(t,dr,e)}};e.addEventListener(r,o),i.push(()=>{e.removeEventListener(r,o)})}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(fi),Ma(this);Na(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&E(38);let n=e;n._readOnly&&(n=Ua(e),n._selection=e._selection?e._selection.clone():null),Mt(this);let r=this._pendingEditorState,i=this._updateTags,a=t===void 0?null:t.tag;r===null||r.isEmpty()||(a!=null&&i.add(a),Ma(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,a!=null&&i.add(a),this._updating||Ma(this)}parseEditorState(e,t){return function(e,t,n){let r=Wa(),i=F,a=_a,o=I,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,F=r,_a=!1,I=t,no(null);try{let i=t._nodes;Aa(e.root,i),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,F=i,_a=a,I=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(e){return Ma(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Fa(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Ia(this,()=>{let r=P(),i=G();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||Mo(r.clone()),ns(`focus`),rs(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=ms(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Na(`editable`,this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}};eo.version=`0.41.0+prod.esm`;var to=null;function no(e){to=e}var ro=1;function io(e,t){let n=ao(e,t);return n===void 0&&E(30,t),n}function ao(e,t){return e._nodes.get(t)}var oo=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function so(e){return B(Oo(e))}function co(e){let t=document.activeElement;if(!J(t))return!1;let n=t.nodeName;return B(Oo(e))&&(n===`INPUT`||n===`TEXTAREA`||t.contentEditable===`true`&&po(t)==null)}function lo(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!co(t)&&fo(t)===e}catch{return!1}}function uo(e){return e instanceof eo}function fo(e){let t=e;for(;t!=null;){let e=po(t);if(uo(e))return e;t=es(t)}return null}function po(e){return e?e.__lexicalEditor:null}function mo(e){return mt.test(e)?`rtl`:ht.test(e)?`ltr`:null}function ho(e){return Li(e)||e.isToken()}function go(e){return ho(e)||e.isSegmented()}function _o(e){return _s(e)&&e.nodeType===3}function vo(e){return _s(e)&&e.nodeType===9}function yo(e){let t=e;for(;t!=null;){if(_o(t))return t;t=t.firstChild}return null}function bo(e,t,n){let r=gt[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~gt.superscript:t===`superscript`?i&=~gt.subscript:t===`lowercase`?(i&=~gt.uppercase,i&=~gt.capitalize):t===`uppercase`?(i&=~gt.lowercase,i&=~gt.capitalize):t===`capitalize`&&(i&=~gt.lowercase,i&=~gt.uppercase),i}function xo(e){return M(e)||A(e)||B(e)}function So(e,t){let n=function(){let e=to;return to=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);L(),Sa();let r=R(),i=Ca(),a=``+ro++;i._nodeMap.set(a,e),z(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType=1,e.__key=a}function Co(e){let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function wo(e){Sa(),li(e)&&E(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent,r=Ca(),i=R(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent}}(n,a,o);let s=t.__key;i._dirtyType=1,z(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function U(e){L();let t=R(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=W(n);e!==null&&e.getWritable()}if(e!==null){let t=W(e);t!==null&&t.getWritable()}}}function To(){return xa()?null:R()._compositionKey}function W(e,t){let n=(t||Ca())._nodeMap.get(e);return n===void 0?null:n}function Eo(e,t){let n=Do(e,R());return n===void 0?null:W(n,t)}function Do(e,t){return e[`__lexicalKey_${t._key}`]}function Oo(e,t){let n=e;for(;n!=null;){let e=Eo(n,t);if(e!==null)return e;n=es(n)}return null}function ko(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Ao(e){return e.read(()=>G().getTextContent())}function G(){return jo(Ca())}function jo(e){return e._nodeMap.get(`root`)}function Mo(e){L();let t=Ca();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function No(e){let t=R(),n=function(e,t){let n=e;for(;n!=null;){let e=Do(n,t);if(e!==void 0)return e;n=es(n)}return null}(e,t);return n===null?e===t.getRootElement()?W(`root`):null:W(n)}function Po(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Fo(e){let t=[],n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function Io(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function Lo(e){return _o(e)?e.nodeValue:null}function Ro(e,t,n){let r=ms(os(t));if(r===null)return;let i=r.anchorNode,{anchorOffset:a,focusOffset:o}=r;if(i!==null){let t=Lo(i),r=Oo(i);if(t!==null&&M(r)){if((t===dt||t===pt)&&n){let e=n.length;t=n,a=e,o=e}t!==null&&zo(r,t,a,o,e)}}}function zo(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing(),s=t;if((o||i)&&(t.endsWith(dt)&&(s=t.slice(0,-dt.length)),i)){let e=pt,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){if(s===``){if(U(null),Xe||Ze||tt)a.remove();else{let e=R();setTimeout(()=>{e.update(()=>{a.isAttached()&&a.remove()})},20)}return}let t=a.getParent(),i=aa(),c=a.getTextContentSize(),l=To(),u=a.getKey();if(a.isToken()||l!==null&&u===l&&!o||N(i)&&(t!==null&&!t.canInsertTextBefore()&&i.anchor.offset===0||i.anchor.key===e.__key&&i.anchor.offset===0&&!a.canInsertTextBefore()&&!o||i.focus.key===e.__key&&i.focus.offset===c&&!a.canInsertTextAfter()&&!o))return void a.markDirty();let d=P();if(!N(d)||n===null||r===null)return void Bo(a,s,d);if(d.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=j(a.getTextContent());a.replace(e),a=e}Bo(a,s,d)}}}function Bo(e,t,n){if(e.setTextContent(t),N(n)){let t=e.getKey();for(let r of[`anchor`,`focus`]){let i=n[r];i.type===`text`&&i.key===t&&(i.offset=Ys(e,i.offset,`clamp`))}}}function Vo(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function Ho(e,t){return Vo(e,t,`altKey`)&&Vo(e,t,`ctrlKey`)&&Vo(e,t,`shiftKey`)&&Vo(e,t,`metaKey`)}function K(e,t,n){if(!Ho(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;let r=`Key`+t.toUpperCase();return e.code===r}var Uo={ctrlKey:!qe,metaKey:qe},Wo={altKey:qe,ctrlKey:!qe};function Go(e){return e.key===`Backspace`}function Ko(e){return K(e,`a`,Uo)}function qo(e){let t=G();if(N(e)){let t=e.anchor,n=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Xt(e),e}{let e=t.select(0,t.getChildrenSize());return Mo(Xt(e)),e}}function Jo(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=Tc(i);return n[t]=e,e}return i}function Yo(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&E(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function Xo(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function Zo(e,t){let n=e.offset;if(e.type===`element`)return Xo(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?Xo(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function Qo(e){let t=os(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function q(e,t,n){return function(e,t,n){let r=Fo(e);for(let i=4;i>=0;i--)for(let a=0;a<r.length;a++){let o=r[a],s=o._commands.get(t);if(s!==void 0){let t=s[i];if(t!==void 0){let r=Array.from(t),i=r.length,a=!1;if(Ia(o,()=>{for(let t=0;t<i;t++)if(r[t](n,e))return void(a=!0)}),a)return a}}}return!1}(e,t,n)}function $o(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&E(75,t),n}function es(e){let t=e.assignedSlot||e.parentElement;return vs(t)?t.host:t}function ts(e){return vo(e)?e:J(e)?e.ownerDocument:null}function ns(e){L(),R()._updateTags.add(e)}function rs(e){L(),R()._deferred.push(e)}function is(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function as(e){let t=ts(e);return t?t.defaultView:null}function os(e){let t=e._window;return t===null&&E(78),t}function ss(e){let t=e.getParentOrThrow();for(;t!==null;){if(cs(t))return t;t=t.getParentOrThrow()}return t}function cs(e){return V(e)||z(e)&&e.isShadowRoot()}function ls(e){let t=R(),n=e.getType(),r=ao(t,n);r===void 0&&E(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||E(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||E(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&E(203,e.constructor.name,n,r.name,r.getType()),t}return e}function us(e,t){!V(e.getParent())||z(t)||B(t)||E(99)}function ds(e){let t=W(e);return t===null&&E(63,e),t}function fs(e){return(B(e)||z(e)&&!e.canBeEmpty())&&!e.isInline()}function ps(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function ms(e){return Ge?(e||window).getSelection():null}function hs(e){let t=as(e);return t?t.getSelection():null}function gs(e){return J(e)&&e.tagName===`A`}function J(e){return _s(e)&&e.nodeType===1}function _s(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function vs(e){return _s(e)&&e.nodeType===11}function ys(e){let 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 bs(e){let 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 xs(e){if(B(e)&&!e.isInline())return!0;if(!z(e)||cs(e))return!1;let t=e.getFirstChild(),n=t===null||A(t)||M(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Ss(){return R()}var Cs=new WeakMap,ws=new Map;function Ts(e){if(!e._readOnly&&e.isEmpty())return ws;e._readOnly||E(192);let t=Cs.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),Cs.set(e,t)),t}function Es(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Ds(e){return(t=Es(e))[ci]=!0,t;var t}function Os(e,t){let n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function ks(e){return!0===e.__lexicalUnmanaged}function As(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&e[t]!==ui[t]}function js(e){let t=St in e.prototype?e.prototype[St]():void 0,n=function(e){if(!(e===ui||e.prototype instanceof ui)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{eo.version&&(n=JSON.parse(eo.version))}catch{}E(290,e.name,t,n)}return e===Va||e===za||e===ui}(e),r=!n&&As(e,`getType`)?e.getType():void 0,i,a=r;if(t)if(r)i=t[r];else for(let[e,n]of Object.entries(t))a=e,i=n;if(!n&&a&&(As(e,`getType`)||(e.getType=()=>a),As(e,`clone`)||(e.clone=t=>(no(t),new e)),As(e,`importJSON`)||(e.importJSON=i&&i.$importJSON||(t=>new e().updateFromJSON(t))),!As(e,`importDOM`)&&i)){let{importDOM:t}=i;t&&(e.importDOM=()=>t)}return{ownNodeConfig:i,ownNodeType:a}}function Ms(e){let t=Ss();return L(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}var Ns=(e,t)=>{let n=e;for(;n!=null&&!V(n);){if(t(n))return n;n=n.getParent()}return null},Ps={next:`previous`,previous:`next`},Fs=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return ac({hasNext:Us,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Y(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Y(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&E(263,Array.from(o).join(` `))}else i.insert(e);i=Y(e,this.direction)}for(let e of o.values())e.remove();return this}},Is=class e extends Fs{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:Zs(e,this.direction)}getParentCaret(e=`root`){return Y(zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Rs(this.direction);return Y(this.getNodeAtCaret(),e)||Zs(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},Ls={root:V,shadowRoot:cs};function Rs(e){return Ps[e]}function zs(e,t=`root`){return Ls[t](e)?null:e}var Bs=class e extends Fs{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:Y(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return z(this.origin)?Zs(this.origin,this.direction):null}getParentCaret(e=`root`){return Y(zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=Rs(this.direction);return Y(this.getNodeAtCaret(),e)||Zs(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof Vs)&&this.direction===t.direction&&this.origin.is(t.origin)}},Vs=class e extends Fs{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:Js(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return Y(zs(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Js(this.origin,Rs(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Bs||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Y(this.origin,this.direction)}};function Hs(e){return e instanceof Vs}function Us(e){return e instanceof Bs}function Ws(e){return e instanceof Is}var Gs={next:class extends Vs{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Vs{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},Ks={next:class extends Bs{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Bs{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},qs={next:class extends Is{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Is{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Y(e,t){return e?new Ks[t](e):null}function Js(e,t,n){return e?new Gs[t](e,Ys(e,n)):null}function Ys(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&We(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function Xs(e,t){return new tc(e,t)}function Zs(e,t){return z(e)?new qs[t](e):null}function Qs(e){return e&&e.getChildCaret()||e}function $s(e){return e&&Qs(e.getAdjacentCaret())}var ec=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return Hs(t)?function(e,t){let{direction:n,origin:r}=e;return Xs(e,Ys(r,t===`focus`?Rs(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[Xs(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=Hs(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=Hs(n),i=t=>t.isSameNodeCaret(n)?null:$s(t)||t.getParentCaret(e);return ac({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},tc=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return Js(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function nc(e){return ic(e,Y(G(),e.direction))}function rc(e){return ic(e,e)}function ic(e,t){return e.direction!==t.direction&&E(265),new ec(e,t,e.direction)}function ac(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function oc(e,t){let n=uc(e.origin,t.origin);switch(n===null&&E(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return sc(n)}}function sc(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function cc(e,t){return t.is(e)}function lc(e){return z(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function uc(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=lc(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=lc(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(cc(e,r)||E(276),{commonAncestor:r,type:`ancestor`}):i===null?(cc(t,r)||E(277),{commonAncestor:r,type:`descendant`}):((z(a)||cc(e,a))&&(z(i)||cc(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||E(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function dc(e,t){let{type:n,key:r,offset:i}=e,a=ds(e.key);return n===`text`?(M(a)||E(266,a.getType(),r),Js(a,t,i)):(z(a)||E(267,a.getType(),r),wc(a,e.offset,t))}function fc(e,t){let{origin:n,direction:r}=t,i=r===`next`;Hs(t)?e.set(n.getKey(),t.offset,`text`):Us(t)?M(n)?e.set(n.getKey(),Ys(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(Ws(t)&&z(n)||E(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function pc(e){let t=P(),n=N(t)?t:na();return mc(n,e),Mo(n),n}function mc(e,t){fc(e.anchor,t.anchor),fc(e.focus,t.focus)}function hc(e){let{anchor:t,focus:n}=e,r=dc(t,`next`),i=dc(n,`next`),a=oc(r,i)<=0?`next`:`previous`;return ic(Sc(r,a),Sc(i,a))}function gc(e){let{direction:t,origin:n}=e,r=Y(n,Rs(t)).getNodeAtCaret();return r?Y(r,t):Zs(n.getParentOrThrow(),t)}function _c(e,t=`root`){let n=[e];for(let r=Ws(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(gc(r));return n}function vc(e){return!!e&&e.origin.isAttached()}function yc(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=Cc(e,r),o=_c(a.anchor,n),s=_c(a.focus.getFlipped(),n),c=new Set,l=[];for(let e of a.iterNodeCarets(n))if(Ws(e))c.add(e.origin.getKey());else if(Us(e)){let{origin:t}=e;z(t)&&!c.has(t.getKey())||l.push(t)}for(let e of l)e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=gc(Y(t,r)),c=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||c===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(c===`segmented`){let e=t.origin,n=j(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=Js(n,r,t.offset)}n.is(o[0].origin)&&(o[0]=t),n.is(s[0].origin)&&(s[0]=t.getFlipped())}}let u,d;for(let e of o)if(vc(e)){u=bc(e);break}for(let e of s)if(vc(e)){d=bc(e);break}let f=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c;for(c=0;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(cs(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,xs),d=u&&l(o,e=>n.has(e.getKey())&&xs(e));return u&&d?[u,d]:null}(u,d,c);if(f){let[e,t]=f;Zs(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}let p=[u,d,...o,...s].find(vc);if(p)return rc(Sc(bc(p),e.direction));E(269,JSON.stringify(o.map(e=>e.origin.__key)))}function bc(e){let t=function(e){let t=e;for(;Ws(t);){let e=$s(t);if(!Ws(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(M(t.origin))return Hs(t)?t:Js(t.origin,n,n);let r=t.getAdjacentCaret();return Us(r)&&M(r.origin)?Js(r.origin,n,Rs(n)):t}function xc(e){return Hs(e)&&e.offset!==Ys(e.origin,e.direction)}function Sc(e,t){return e.direction===t?e:e.getFlipped()}function Cc(e,t){return e.direction===t?e:ic(Sc(e.focus,t),Sc(e.anchor,t))}function wc(e,t,n){let r=Zs(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return Sc(r,n)}function Tc(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function Ec(e,...t){let n=Tc(...t);n.length>0&&e.classList.add(...n)}function Dc(e,...t){let n=Tc(...t);n.length>0&&e.classList.remove(...n)}function Oc(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}var kc=new Map;function Ac(e){let t={};if(!e)return t;let n=e.split(`;`);for(let e of n)if(e!==``){let[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function jc(e){let t=kc.get(e);return t===void 0&&(t=Ac(e),kc.set(e,t)),t}function Mc(e){let t=Ss().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function Nc(e){return Mc(V(e)?e:e.getParentOrThrow())}function Pc(e){let t=Nc(e);return t!==null&&t.direction===`rtl`}function Fc(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!go(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=Ki(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=Ds(t)),t.__text=p)}}return t}function Ic(e){let t=e.getStyle(),n=Ac(t);kc.set(t,n)}function Lc(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function Rc(e,t,n=Lc){if(e===null)return;let r=e.getStartEndPoints(),i=new Map,a=null;if(r){let[e,t]=r;a=na(),a.anchor.set(e.key,e.offset,e.type),a.focus.set(t.key,t.offset,t.type);let n=Ns(e.getNode(),xs),o=Ns(t.getNode(),xs);z(n)&&i.set(n.getKey(),n),z(o)&&i.set(o.getKey(),o)}for(let t of e.getNodes())if(z(t)&&xs(t))i.set(t.getKey(),t);else if(r===null){let e=Ns(t,xs);z(e)&&i.set(e.getKey(),e)}for(let[e,r]of i){let i=t();n(r,i),r.replace(i,!0),a&&(e===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,a.anchor.type),e===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,a.focus.type))}a&&e.is(P())&&Mo(a)}function zc(e){let t=Bc(e);return t!==null&&t.writingMode===`vertical-rl`}function Bc(e){let t=e.anchor.getNode();return z(t)?Mc(t):Nc(t)}function Vc(e,t){let n=zc(e)?!t:t;Uc(e)&&(n=!n);let r=dc(e.focus,n?`previous`:`next`);if(xc(r))return!1;for(let e of nc(r)){if(Ws(e))return!e.origin.isInline();if(!z(e.origin)){if(B(e.origin))return!0;break}}return!1}function Hc(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function Uc(e){let t=Bc(e);return t!==null&&t.direction===`rtl`}function Wc(e,t,n){let r=Uc(e),i;i=zc(e)||r?!n:n,Hc(e,t,i,`character`)}function Gc(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Kc=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,qc=Kc&&`documentMode`in document?document.documentMode:null;Kc&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Kc&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),!(!Kc||!(`InputEvent`in window)||qc)&&`getTargetRanges`in new window.InputEvent(`input`),Kc&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Kc&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,Kc&&/Android/.test(navigator.userAgent),Kc&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Kc&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function Jc(e){return e?e.getAdjacentCaret():null}function Yc(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function Xc(e){let t=Ns(e,e=>z(e)&&!e.isInline());return z(t)||Gc(4,e.__key),t}function Zc(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Qc(e){let t=P();if(!N(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],a=i.getKey();if(n.has(a))continue;let o=Ns(i,e=>z(e)&&!e.isInline());if(o===null)continue;let s=o.getKey();o.canIndent()&&!n.has(s)&&(n.add(s),e(o))}return n.size>0}function $c(e,t){let n=vo(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!nl.has(t.nodeName)){let n=rl(t,e,i,!1);n!==null&&(r=r.concat(n))}return function(e){for(let t of e)t.getNextSibling()instanceof qa&&t.insertAfter(_i());for(let t of e){let e=t.getChildren();for(let n of e)t.insertBefore(n);t.remove()}}(i),r}function el(e,t){if(typeof document>`u`||typeof window>`u`&&global.window===void 0)throw Error(`To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.`);let n=document.createElement(`div`),r=G().getChildren();for(let i=0;i<r.length;i++)tl(e,r[i],n,t);return n.innerHTML}function tl(e,t,n,r=null){let i=r===null||t.isSelected(r),a=z(t)&&t.excludeFromCopy(`html`),o=t;r!==null&&M(t)&&(o=Fc(r,t,`clone`));let s=z(o)?o.getChildren():[],c=ao(e,o.getType()),l;l=c&&c.exportDOM!==void 0?c.exportDOM(e,o):o.exportDOM(e);let{element:u,after:d}=l;if(!u)return!1;let f=document.createDocumentFragment();for(let n=0;n<s.length;n++){let a=s[n],o=tl(e,a,f,r);!i&&z(t)&&o&&t.extractWithChild(a,r,`html`)&&(i=!0)}if(i&&!a){if((J(u)||vs(u))&&u.append(f),n.append(u),d){let e=d.call(o,u);e&&(vs(u)?u.replaceChildren(e):u.replaceWith(e))}}else n.append(f);return i}var nl=new Set([`STYLE`,`SCRIPT`]);function rl(e,t,n,r,i=new Map,a){let o=[];if(nl.has(e.nodeName))return o;let s=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,t),l=c?c(e):null,u=null;if(l!==null){u=l.after;let t=l.node;if(s=Array.isArray(t)?t[t.length-1]:t,s!==null){for(let[,e]of i)if(s=e(s,a),!s)break;s&&o.push(...Array.isArray(t)?t:[s])}l.forChild!=null&&i.set(e.nodeName,l.forChild)}let d=e.childNodes,f=[],p=(s==null||!cs(s))&&(s!=null&&ea(s)||r);for(let e=0;e<d.length;e++)f.push(...rl(d[e],t,n,p,new Map(i),s));return u!=null&&(f=u(f)),bs(e)&&(f=il(e,f,p?()=>{let e=new qa;return n.push(e),e}:H)),s==null?f.length>0?o=o.concat(f):bs(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:ys(e.nextSibling)&&ys(e.previousSibling)}(e)&&(o=o.concat(_i())):z(s)&&s.append(...f),o}function il(e,t,n){let r=e.style.textAlign,i=[],a=[];for(let e=0;e<t.length;e++){let o=t[e];if(ea(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),e===t.length-1||e<t.length-1&&ea(t[e+1])){let e=n();e.setFormat(r),e.append(...a),i.push(e),a=[]}}return i}function al(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ol(e,t=P()){return t??al(166),N(t)&&t.isCollapsed()||t.getNodes().length===0?``:el(e,t)}function sl(e,t=P()){return t??al(166),N(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(dl(e,t))}function cl(e,t,n){let r=e.getData(`application/x-lexical-editor`);if(r)try{let e=JSON.parse(r);if(e.namespace===n._config.namespace&&Array.isArray(e.nodes))return ll(n,fl(e.nodes),t)}catch(e){console.error(e)}let i=e.getData(`text/html`),a=e.getData(`text/plain`);if(i&&a!==i)try{return ll(n,$c(n,new DOMParser().parseFromString(function(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}(i),`text/html`)),t)}catch(e){console.error(e)}let o=a||e.getData(`text/uri-list`);if(o!=null)if(N(t)){let e=o.split(/(\r?\n|\t)/);e[e.length-1]===``&&e.pop();for(let t=0;t<e.length;t++){let n=P();if(N(n)){let r=e[t];r===`
12
+ `||r===`\r
13
+ `?n.insertParagraph():r===` `?n.insertNodes([Ii()]):n.insertText(r)}}}else t.insertRawText(o)}function ll(e,t,n){e.dispatchCommand(Mn,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(N(e)&&e.isCollapsed()){let t=e.anchor,n=null,r=dc(t,`previous`);if(r)if(Hs(r))n=r.origin;else{let e=ic(r,Zs(G(),`next`).getFlipped());for(let t of e){if(M(t.origin)){n=t.origin;break}if(z(t.origin)&&!t.origin.isInline())break}}if(n&&M(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}function ul(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=z(n)&&n.excludeFromCopy(`html`),o=n;t!==null&&M(o)&&(o=Fc(t,o,`clone`));let s=z(o)?o.getChildren():[],c=function(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&al(58,n.name),z(e)){let e=t.children;Array.isArray(e)||al(59,n.name)}return t}(o);M(o)&&o.getTextContentSize()===0&&(i=!1);for(let r=0;r<s.length;r++){let a=s[r],o=ul(e,t,a,c.children);!i&&z(n)&&o&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a)r.push(c);else if(Array.isArray(c.children))for(let e=0;e<c.children.length;e++){let t=c.children[e];r.push(t)}return i}function dl(e,t){let n=[],r=G().getChildren();for(let i=0;i<r.length;i++)ul(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function fl(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=ka(r);M(i)&&Ic(i),t.push(i)}return t}var pl=null;async function ml(e,t,n){if(pl!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(hl(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,o=ms(i);if(r===null||o===null)return!1;let s=a.createElement(`span`);s.style.cssText=`position: fixed; top: -1000px;`,s.append(a.createTextNode(`#`)),r.append(s);let c=new Range;return c.setStart(s,0),c.setEnd(s,1),o.removeAllRanges(),o.addRange(c),new Promise((t,r)=>{let o=e.registerCommand(gr,r=>(Zc(r,ClipboardEvent)&&(o(),pl!==null&&(i.clearTimeout(pl),pl=null),t(hl(e,r,n))),!0),4);pl=i.setTimeout(()=>{o(),pl=null,t(!1)},50),a.execCommand(`copy`),s.remove()})}function hl(e,t,n){if(n===void 0){let t=ms(e._window),r=P();if(!r||r.isCollapsed()||!t)return!1;let i=t.anchorNode,a=t.focusNode;if(i!==null&&a!==null&&!lo(e,i,a))return!1;n=_l(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(vl(r,n),!0)}var gl=[[`text/html`,ol],[`application/x-lexical-editor`,sl]];function _l(e=P()){let t={"text/plain":e?e.getTextContent():``};if(e){let n=Ss();for(let[r,i]of gl){let a=i(n,e);a!==null&&(t[r]=a)}}return t}function vl(e,t){for(let[n]of gl)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}var yl=Symbol.for(`preact-signals`);function bl(){if(Cl>1)return void Cl--;let e,t=!1;for(;xl!==void 0;){let n=xl;for(xl=void 0,wl++;n!==void 0;){let r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Ol(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(wl=0,Cl--,t)throw e}var X,xl;function Sl(e){let t=X;X=void 0;try{return e()}finally{X=t}}var Cl=0,wl=0,Tl=0;function El(e){if(X===void 0)return;let t=e.n;return t===void 0||t.t!==X?(t={i:0,S:e,p:X.s,n:void 0,t:X,e:void 0,x:void 0,r:t},X.s!==void 0&&(X.s.n=t),X.s=t,e.n=t,32&X.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=X.s,t.n=void 0,X.s.n=t,X.s=t),t):void 0}function Dl(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Ol(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function kl(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Al(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function jl(e,t){Dl.call(this,void 0),this.x=e,this.s=void 0,this.g=Tl-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Ml(e){let t=e.u;if(e.u=void 0,typeof t==`function`){Cl++;let n=X;X=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Nl(e),t}finally{X=n,bl()}}}function Nl(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ml(e)}function Pl(e){if(X!==this)throw Error(`Out-of-order effect`);Al(this),X=e,this.f&=-2,8&this.f&&Nl(this),bl()}function Fl(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t?.name}function Il(e,t){let n=new Fl(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}Dl.prototype.brand=yl,Dl.prototype.h=function(){return!0},Dl.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?Sl(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},Dl.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&Sl(()=>{var e;(e=this.Z)==null||e.call(this)}))}},Dl.prototype.subscribe=function(e){return Il(()=>{let t=this.value,n=X;X=void 0;try{e(t)}finally{X=n}},{name:`sub`})},Dl.prototype.valueOf=function(){return this.value},Dl.prototype.toString=function(){return this.value+``},Dl.prototype.toJSON=function(){return this.value},Dl.prototype.peek=function(){let e=X;X=void 0;try{return this.value}finally{X=e}},Object.defineProperty(Dl.prototype,"value",{get(){let e=El(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(wl>100)throw Error(`Cycle detected`);this.v=e,this.i++,Tl++,Cl++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{bl()}}}}),jl.prototype=new Dl,jl.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Tl))return!0;if(this.g=Tl,this.f|=1,this.i>0&&!Ol(this))return this.f&=-2,!0;let e=X;try{kl(this),X=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return X=e,Al(this),this.f&=-2,!0},jl.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Dl.prototype.S.call(this,e)},jl.prototype.U=function(e){if(this.t!==void 0&&(Dl.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},jl.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(jl.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=El(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Fl.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.u=e)}finally{e()}},Fl.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Ml(this),kl(this),Cl++;let e=X;return X=this,Pl.bind(this,e)},Fl.prototype.N=function(){2&this.f||(this.f|=2,this.o=xl,xl=this)},Fl.prototype.d=function(){this.f|=8,1&this.f||Nl(this)},Fl.prototype.dispose=function(){this.d()},Ft(`format`,{parse:e=>typeof e==`number`?e:0});function Ll(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)n[e]=Ll(n[e],r[e]);return e}return t}var Rl=class e extends Va{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return Bl().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:zl,priority:0})}}exportDOM(){return{element:document.createElement(`hr`)}}createDOM(e){let t=document.createElement(`hr`);return Ec(t,e.theme.hr),t}getTextContent(){return`
14
+ `}isInline(){return!1}updateDOM(){return!1}};function zl(){return{node:Bl()}}function Bl(){return Ms(Rl)}function Vl(e,t){if(document.caretRangeFromPoint!==void 0){let n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!==`undefined`){let n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}var Hl=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ul=Hl&&`documentMode`in document?document.documentMode:null,Wl=Hl&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Gl=!(!Hl||!(`InputEvent`in window)||Ul)&&`getTargetRanges`in new window.InputEvent(`input`),Kl=Hl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ql=Hl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Jl=Hl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Yl=Hl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Wl&&!Jl,Xl=k(`DRAG_DROP_PASTE_FILE`),Zl=class e extends za{static getType(){return`quote`}static clone(t){return new e(t.__key)}createDOM(e){let t=document.createElement(`blockquote`);return Ec(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:ru,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return Ql().updateFromJSON(e)}insertNewAfter(e,t){let n=H(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){let e=H();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function Ql(){return ls(new Zl)}function $l(e){return e instanceof Zl}var eu=class e extends za{__tag;static getType(){return`heading`}static clone(t){return new e(t.__tag,t.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,n=document.createElement(t),r=e.theme.heading;if(r!==void 0){let e=r[t];Ec(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:nu,priority:0}),h2:e=>({conversion:nu,priority:0}),h3:e=>({conversion:nu,priority:0}),h4:e=>({conversion:nu,priority:0}),h5:e=>({conversion:nu,priority:0}),h6:e=>({conversion:nu,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&tu(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>tu(e)?{conversion:e=>({node:iu(`h1`)}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(J(t)){this.isEmpty()&&t.append(document.createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return iu(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?H():iu(this.getTag()),a=this.getDirection();if(i.setDirection(a),this.insertAfter(i,t),n===0&&!this.isEmpty()&&e){let e=H();e.select(),this.replace(e,!0)}return i}collapseAtStart(){let e=this.isEmpty()?H():iu(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}};function tu(e){return e.nodeName.toLowerCase()===`span`&&e.style.fontSize===`26pt`}function nu(e){let t=e.nodeName.toLowerCase(),n=null;return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`||(n=iu(t),e.style!==null&&(Os(e,n),n.setFormat(e.style.textAlign))),{node:n}}function ru(e){let t=Ql();return e.style!==null&&(t.setFormat(e.style.textAlign),Os(e,t)),{node:t}}function iu(e=`h1`){return ls(new eu(e))}function au(e){return e instanceof eu}function ou(e){let t=null;if(Zc(e,DragEvent)?t=e.dataTransfer:Zc(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function su(e){return B(Oo(e))}function cu(e){for(let t of[`lowercase`,`uppercase`,`capitalize`])e.hasFormat(t)&&e.toggleFormat(t)}function lu(e){return Oc(e.registerCommand(Nn,e=>{let t=P();return!!Wi(t)&&(t.clear(),!0)},0),e.registerCommand(Rn,e=>{let t=P();return N(t)?(t.deleteCharacter(e),!0):!!Wi(t)&&(t.deleteNodes(),!0)},0),e.registerCommand(Wn,e=>{let t=P();return!!N(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(Gn,e=>{let t=P();return!!N(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(Vn,t=>{let n=P();if(typeof t==`string`)n!==null&&n.insertText(t);else{if(n===null)return!1;let r=t.dataTransfer;if(r!=null)cl(r,n,e);else if(N(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},0),e.registerCommand(Un,()=>{let e=P();return!!N(e)&&(e.removeText(),!0)},0),e.registerCommand(Kn,e=>{let t=P();return!!N(t)&&(t.formatText(e),!0)},0),e.registerCommand(fr,e=>{let t=P();if(!N(t)&&!Wi(t))return!1;let n=t.getNodes();for(let t of n){let n=Ns(t,e=>z(e)&&!e.isInline());n!==null&&n.setFormat(e)}return!0},0),e.registerCommand(zn,e=>{let t=P();return!!N(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(Bn,()=>{let e=P();return!!N(e)&&(e.insertParagraph(),!0)},0),e.registerCommand(cr,()=>{let e=Ii(),t=P();return N(t)&&(e.setFormat(t.format),e.setStyle(t.style)),pa([e]),!0},0),e.registerCommand(lr,()=>Qc(e=>{let t=e.getIndent();e.setIndent(t+1)}),0),e.registerCommand(ur,()=>Qc(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),0),e.registerCommand(er,e=>{let t=P();if(Wi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectPrevious(),!0}else if(N(t)){let n=Zo(t.focus,!0);if(!e.shiftKey&&B(n)&&!n.isIsolated()&&!n.isInline())return n.selectPrevious(),e.preventDefault(),!0}return!1},0),e.registerCommand(tr,e=>{let t=P();if(Wi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),n[0].selectNext(0,0),!0}else if(N(t)){if(function(e){let t=e.focus;return t.key===`root`&&t.offset===G().getChildrenSize()}(t))return e.preventDefault(),!0;let n=Zo(t.focus,!1);if(!e.shiftKey&&B(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},0),e.registerCommand(Qn,e=>{let t=P();if(Wi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),Pc(n[0])?n[0].selectNext(0,0):n[0].selectPrevious(),!0}if(!N(t))return!1;if(Vc(t,!0)){let n=e.shiftKey;return e.preventDefault(),Wc(t,n,!0),!0}return!1},0),e.registerCommand(Xn,e=>{let t=P();if(Wi(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),Pc(n[0])?n[0].selectPrevious():n[0].selectNext(0,0),!0}if(!N(t))return!1;let n=e.shiftKey;return!!Vc(t,!1)&&(e.preventDefault(),Wc(t,n,!1),!0)},0),e.registerCommand(ir,t=>{if(su(t.target))return!1;let n=P();if(N(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(t.offset!==0)return!1;let n=t.getNode();if(V(n))return!1;let r=Xc(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(ur,void 0);if(ql&&navigator.language===`ko-KR`)return!1}else if(!Wi(n))return!1;return t.preventDefault(),e.dispatchCommand(Rn,!0)},0),e.registerCommand(or,t=>{if(su(t.target))return!1;let n=P();return!(!N(n)&&!Wi(n))&&(t.preventDefault(),e.dispatchCommand(Rn,!1))},0),e.registerCommand(nr,t=>{let n=P();if(!N(n))return!1;if(cu(n),t!==null){if((ql||Kl||Yl)&&Gl)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(zn,!1)}return e.dispatchCommand(Bn,void 0)},0),e.registerCommand(ar,()=>!!N(P())&&(e.blur(),!0),0),e.registerCommand(dr,t=>{let[,n]=ou(t);if(n.length>0){let r=Vl(t.clientX,t.clientY);if(r!==null){let{offset:t,node:i}=r,a=Oo(i);if(a!==null){let e=na();if(M(a))e.anchor.set(a.getKey(),t,`text`),e.focus.set(a.getKey(),t,`text`);else{let t=a.getParentOrThrow().getKey(),n=a.getIndexWithinParent()+1;e.anchor.set(t,n,`element`),e.focus.set(t,n,`element`)}Mo(Xt(e))}e.dispatchCommand(Xl,n)}return t.preventDefault(),!0}return!!N(P())},0),e.registerCommand(pr,e=>{let[t]=ou(e),n=P();return!(t&&!N(n))},0),e.registerCommand(mr,e=>{let[t]=ou(e),n=P();if(t&&!N(n))return!1;let r=Vl(e.clientX,e.clientY);return r!==null&&B(Oo(r.node))&&e.preventDefault(),!0},0),e.registerCommand(vr,()=>(qo(),!0),0),e.registerCommand(gr,t=>(ml(e,Zc(t,ClipboardEvent)?t:null),!0),0),e.registerCommand(_r,t=>(async function(e,t){await ml(t,Zc(e,ClipboardEvent)?e:null),t.update(()=>{let e=P();N(e)?e.removeText():Wi(e)&&e.getNodes().forEach(e=>e.remove())})}(t,e),!0),0),e.registerCommand(Hn,t=>{let[,n,r]=ou(t);return n.length>0&&!r?(e.dispatchCommand(Xl,n),!0):_s(t.target)&&co(t.target)?!1:P()!==null&&(function(e,t){e.preventDefault(),t.update(()=>{let n=P(),r=Zc(e,InputEvent)||Zc(e,KeyboardEvent)?null:e.clipboardData;r!=null&&n!==null&&cl(r,n,t)},{tag:`paste`})}(t,e),!0)},0),e.registerCommand(rr,e=>{let t=P();return N(t)&&cu(t),!1},0),e.registerCommand(sr,e=>{let t=P();return N(t)&&cu(t),!1},0))}function uu(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(N(a)&&N(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||V(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&M(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!M(l)||!M(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function du(e,t){let n=Date.now(),r=0,i=Date.now(),a=0,o=null;return(s,c,l,u,d,f)=>{let p=Date.now();if(f.has(`composition-start`)&&(i=n,a=r,o=s),f.has(`historic`))return r=0,n=p,2;f.has(`composition-end`)&&o&&(n=i,r=a,s=o);let m=uu(s,c,u,d,e.isComposing()),h=(()=>{let i=l===null||l.editor===e,a=f.has(di);if(!a&&i&&f.has(`history-merge`))return 0;if(m===1)return 2;if(s===null)return 1;let o=c._selection;if(!(u.size>0||d.size>0))return o===null?2:0;let h=typeof t==`number`?t:t.peek();return!1===a&&m!==0&&m===r&&p<n+h&&i||u.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(N(a)&&N(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!M(r)||!M(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(u)[0],s,c)?0:1})();return n=p,r=m,h}}function fu(e){e.undoStack=[],e.redoStack=[],e.current=null}function pu(e,t,n){let r=du(e,n);return Oc(e.registerCommand(qn,()=>(function(e,t){let n=t.redoStack,r=t.undoStack;if(r.length!==0){let i=t.current,a=r.pop();i!==null&&(n.push(i),e.dispatchCommand(xr,!0)),r.length===0&&e.dispatchCommand(Sr,!1),t.current=a||null,a&&a.editor.setEditorState(a.editorState,{tag:`historic`})}}(e,t),!0),0),e.registerCommand(Jn,()=>(function(e,t){let n=t.redoStack,r=t.undoStack;if(n.length!==0){let i=t.current;i!==null&&(r.push(i),e.dispatchCommand(Sr,!0));let a=n.pop();n.length===0&&e.dispatchCommand(xr,!1),t.current=a||null,a&&a.editor.setEditorState(a.editorState,{tag:`historic`})}}(e,t),!0),0),e.registerCommand(yr,()=>(fu(t),!1),0),e.registerCommand(br,()=>(fu(t),e.dispatchCommand(xr,!1),e.dispatchCommand(Sr,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:i,dirtyLeaves:a,dirtyElements:o,tags:s})=>{let c=t.current,l=t.redoStack,u=t.undoStack,d=c===null?null:c.editorState;if(c!==null&&n===d)return;let f=r(i,n,c,a,o,s);if(f===1)l.length!==0&&(t.redoStack=[],e.dispatchCommand(xr,!1)),c!==null&&(u.push({...c}),e.dispatchCommand(Sr,!0));else if(f===2)return;t.current={editor:e,editorState:n}}))}function mu(){return{current:null,redoStack:[],undoStack:[]}}function hu(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function gu(e){let t=1,n=e.getParent();for(;n!=null;){if(Z(n)){let e=n.getParent();if(Q(e)){t++,n=e.getParent();continue}hu(40)}return t}return t}function _u(e){let t=e.getParent();Q(t)||hu(40);let n=t;for(;n!==null;)n=n.getParent(),Q(n)&&(t=n);return t}function vu(e){let t=[],n=e.getChildren().filter(Z);for(let e=0;e<n.length;e++){let r=n[e],i=r.getFirstChild();Q(i)?t=t.concat(vu(i)):t.push(r)}return t}function yu(e){return Z(e)&&Q(e.getFirstChild())}function bu(e){return Pu().append(e)}function xu(e,t){return Z(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Su(e){let t=P();if(t!==null){let n=t.getNodes();if(N(t)){let r=t.getStartEndPoints();r===null&&hu(143);let[i]=r,a=i.getNode(),o=a.getParent();if(cs(a)){let e=a.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=H();a.append(e),n=e.select().getNodes()}}else if(xu(a,n)){let t=Bu(e);if(cs(o)){a.replace(t);let e=Pu();z(a)&&(e.setFormat(a.getFormatType()),e.setIndent(a.getIndent())),t.append(e)}else if(Z(a)){let e=a.getParentOrThrow();Cu(t,e.getChildren()),e.replace(t)}return}}let r=new Set;for(let t=0;t<n.length;t++){let i=n[t];if(z(i)&&i.isEmpty()&&!Z(i)&&!r.has(i.getKey())){wu(i,e);continue}let a=xo(i)?i.getParent():Z(i)&&i.isEmpty()?i:null;for(;a!=null;){let t=a.getKey();if(Q(a)){if(!r.has(t)){let n=Bu(e);Cu(n,a.getChildren()),a.replace(n),r.add(t)}break}{let n=a.getParent();if(cs(n)&&!r.has(t)){r.add(t),wu(a,e);break}a=n}}}}}function Cu(e,t){e.splice(e.getChildrenSize(),0,t)}function wu(e,t){if(Q(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=Pu(),a;if(Cu(i,e.getChildren()),Q(n)&&t===n.getListType())n.append(i),Q(r)&&t===r.getListType()&&(Cu(n,r.getChildren()),r.remove()),a=n;else if(Q(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{let n=Bu(t);n.append(i),e.replace(n),a=n}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());let o=P();return N(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,`element`),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,`element`)),e.remove(),a}function Tu(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&yu(n)&&yu(r)&&(Tu(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Eu(){let e=P();if(N(e)){let t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(xu(r,n))t.add(_u(r));else for(let e=0;e<n.length;e++){let r=n[e];if(xo(r)){let e=Yc(r,ju);e!=null&&t.add(_u(e))}}for(let n of t){let t=n,r=vu(n);for(let n of r){let r=H().setTextStyle(e.style).setTextFormat(e.format);Cu(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&fc(e.anchor,bc(Zs(r,`next`))),n.__key===e.focus.key&&fc(e.focus,bc(Zs(r,`next`))),n.remove()}n.remove()}}}function Du(e){let t=e.getListType()!==`check`,n=e.getStart();for(let r of e.getChildren())Z(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),Q(r.getFirstChild())||n++)}function Ou(e){let t=new Set;if(yu(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(yu(r)&&yu(i)){let n=i.getFirstChild();if(Q(n)){n.append(e);let i=r.getFirstChild();Q(i)&&(Cu(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(yu(r)){let t=r.getFirstChild();if(Q(t)){let n=t.getFirstChild();n!==null&&n.insertBefore(e)}}else if(yu(i)){let t=i.getFirstChild();Q(t)&&t.append(e)}else if(Q(n)){let t=Pu().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),a=Bu(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());t.append(a),a.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function ku(e){if(yu(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if(Q(n?n.getParent():void 0)&&Z(n)&&Q(t)){let r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=t.getListType(),i=Pu(),a=Bu(r);i.append(a),e.getPreviousSiblings().forEach(e=>a.append(e));let o=Pu(),s=Bu(r);o.append(s),Cu(s,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}}}function Au(e=!1){let t=P();if(!N(t)||!t.isCollapsed())return!1;let n=t.anchor.getNode(),r=null;if(Z(n)&&n.getChildrenSize()===0)r=n;else if(M(n)){let e=n.getParent();Z(e)&&e.getChildren().every(e=>M(e)&&e.getTextContent().trim()===``)&&(r=e)}if(r===null)return!1;let i=_u(r),a=r.getParent();Q(a)||hu(40);let o=a.getParent(),s;if(cs(o))s=H(),i.insertAfter(s);else{if(!Z(o))return!1;s=Pu(),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=e?function(e,t){return e.getStart()+t.getIndexWithinParent()}(a,r):1,n=Bu(a.getListType(),t);if(Z(s)){let e=Pu();e.append(n),s.insertAfter(e)}else s.insertAfter(n);n.append(...c)}return function(e){let t=e;for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!Z(e)&&!Q(e))break;t=e}t.remove()}(r),!0}var ju=class extends za{__value;__checked;$config(){return this.config(`listitem`,{$transform:e=>{if(e.__checked==null)return;let t=e.getParent();Q(t)&&t.getListType()!==`check`&&e.getChecked()!=null&&e.setChecked(void 0)},extends:za,importDOM:si({li:()=>({conversion:Mu,priority:0})})})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement(`li`);return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(e,t,n){let r=t.getParent();!Q(r)||r.getListType()!==`check`||Q(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`))})(t,this,e),t.value=this.__value,function(e,t,n){let r=[],i=[],a=t.list,o=a?a.listitem:void 0,s;if(a&&a.nested&&(s=a.nested.listitem),o!==void 0&&r.push(...Tc(o)),a){let e=n.getParent(),t=Q(e)&&e.getListType()===`check`,o=n.getChecked();t&&!o||i.push(a.listitemUnchecked),t&&o||i.push(a.listitemChecked),t&&r.push(o?a.listitemChecked:a.listitemUnchecked)}if(s!==void 0){let e=Tc(s);n.getChildren().some(e=>Q(e))?r.push(...e):i.push(...e)}i.length>0&&Dc(e,...i),r.length>0&&Ec(e,...r)}(t,n.theme,this);let r=e?e.__style:``,i=this.__style;r!==i&&(i===``?t.removeAttribute(`style`):t.style.cssText=i),function(e,t,n){let r=jc(t.__textStyle);for(let t in r)e.style.setProperty(`--listitem-marker-${t}`,r[t]);if(n)for(let t in jc(n.__textStyle))t in r||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){let r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if(z(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(Z(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!Q(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=Bu(n.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(z(e)||hu(139),this.getChildren().forEach(t=>{e.append(t)})),this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if(Q(n)||hu(39),Z(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){let i=Bu(n.getListType());r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&yu(t)&&yu(n)&&(Tu(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){let n=Pu().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){let t=H();this.getChildren().forEach(e=>t.append(e));let n=this.getParentOrThrow(),r=n.getParentOrThrow(),i=Z(r);if(n.getChildrenSize()===1)if(i)n.remove(),r.select();else{n.insertBefore(t),n.remove();let r=e.anchor,i=e.focus,a=t.getKey();r.type===`element`&&r.getNode().is(this)&&r.set(a,r.offset,`element`),i.type===`element`&&i.getNode().is(this)&&i.set(a,i.offset,`element`)}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,n=this.getParent();return Q(n)&&(t=n.getListType()),t===`check`?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;Z(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!=`number`&&hu(117),(e=Math.floor(e))>=0||hu(199);let t=this.getIndent();for(;t!==e;)t<e?(Ou(this),t++):(ku(this),t--);return this}canInsertAfter(e){return Z(e)}canReplaceWith(e){return Z(e)}canMergeWith(e){return Z(e)||Xa(e)}extractWithChild(e,t){if(!N(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Bu(`bullet`)}canMergeWhenEmpty(){return!0}};function Mu(e){if(e.classList.contains(`task-list-item`)){for(let t of e.children)if(t.tagName===`INPUT`)return Nu(t)}if(e.classList.contains(`joplin-checkbox`)){for(let t of e.children)if(t.classList.contains(`checkbox-wrapper`)&&t.children.length>0&&t.children[0].tagName===`INPUT`)return Nu(t.children[0])}let t=e.getAttribute(`aria-checked`);return{node:Pu(t===`true`||t!==`false`&&void 0)}}function Nu(e){return e.getAttribute(`type`)===`checkbox`?{node:Pu(e.hasAttribute(`checked`))}:{node:null}}function Pu(e){return ls(new ju(void 0,e))}function Z(e){return e instanceof ju}var Fu=class extends za{__tag;__start;__listType;$config(){return this.config(`list`,{$transform:e=>{(function(e){let t=e.getNextSibling();Q(t)&&e.getListType()===t.getListType()&&Tu(e,t)})(e),Du(e)},extends:za,importDOM:si({ol:()=>({conversion:Ru,priority:0}),ul:()=>({conversion:Ru,priority:0})})})}constructor(e=`number`,t=1,n){super(n);let r=zu[e]||e;this.__listType=r,this.__tag=r===`number`?`ol`:`ul`,this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e===`number`?`ol`:`ul`,t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=document.createElement(n);return this.__start!==1&&r.setAttribute(`start`,String(this.__start)),r.__lexicalListType=this.__listType,Iu(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(Iu(t,n.theme,this),e.__start!==this.__start&&t.setAttribute(`start`,String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return J(t)&&(this.__start!==1&&t.setAttribute(`start`,String(this.__start)),this.__listType===`check`&&t.setAttribute(`__lexicalListType`,`check`)),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];Z(t)||(r===n&&(r=[...n]),r[e]=Pu().append(!z(t)||Q(t)||t.isInline()?t:j(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return Z(e)}};function Iu(e,t,n){let r=[],i=[],a=t.list;if(a!==void 0){let e=a[`${n.__tag}Depth`]||[],t=gu(n)-1,o=t%e.length,s=e[o],c=a[n.__tag],l,u=a.nested,d=a.checklist;if(u!==void 0&&u.list&&(l=u.list),c!==void 0&&r.push(c),d!==void 0&&n.__listType===`check`&&r.push(d),s!==void 0){r.push(...Tc(s));for(let t=0;t<e.length;t++)t!==o&&i.push(n.__tag+t)}if(l!==void 0){let e=Tc(l);t>1?r.push(...e):i.push(...e)}}i.length>0&&Dc(e,...i),r.length>0&&Ec(e,...r)}function Lu(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(Z(r)){t.push(r);let e=r.getChildren();e.length>1&&e.forEach(e=>{Q(e)&&t.push(bu(e))})}else t.push(bu(r))}return t}function Ru(e){let t=e.nodeName.toLowerCase(),n=null;return t===`ol`?n=Bu(`number`,e.start):t===`ul`&&(n=function(e){if(e.getAttribute(`__lexicallisttype`)===`check`||e.classList.contains(`contains-task-list`)||e.getAttribute(`data-is-checklist`)===`1`)return!0;for(let t of e.childNodes)if(J(t)&&t.hasAttribute(`aria-checked`))return!0;return!1}(e)?Bu(`check`):Bu(`bullet`)),{after:Lu,node:n}}var zu={ol:`number`,ul:`bullet`};function Bu(e=`number`,t=1){return ls(new Fu(e,t))}function Q(e){return e instanceof Fu}var Vu=k(`UPDATE_LIST_START_COMMAND`),Hu=k(`INSERT_UNORDERED_LIST_COMMAND`),Uu=k(`INSERT_ORDERED_LIST_COMMAND`),Wu=k(`REMOVE_LIST_COMMAND`);function Gu(e,t){return Oc(e.registerCommand(Uu,()=>(Su(`number`),!0),1),e.registerCommand(Vu,e=>{let{listNodeKey:t,newStart:n}=e,r=W(t);return!!Q(r)&&(r.getListType()===`number`&&(r.setStart(n),Du(r)),!0)},1),e.registerCommand(Hu,()=>(Su(`bullet`),!0),1),e.registerCommand(Wu,()=>(Eu(),!0),1),e.registerCommand(Bn,()=>Au(!!(t&&t.restoreNumbering)),1),e.registerNodeTransform(ju,e=>{let t=e.getFirstChild();if(t){if(M(t)){let n=t.getStyle(),r=t.getFormat();e.getTextStyle()!==n&&e.setTextStyle(n),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=P();N(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(Ti,e=>{let t=e.getParent();if(Z(t)&&e.is(t.getFirstChild())){let n=e.getStyle(),r=e.getFormat();n===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(n).setTextFormat(r)}}))}e(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var ee=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,ee+`g`)}for(var te=h.pattern||h,b=r.next,x=c;b!==t.tail&&!(d&&x>=d.reach);x+=b.value.length,b=b.next){var S=b.value;if(t.length>e.length)return;if(!(S instanceof a)){var ne=1,re;if(v){if(re=o(te,x,e,_),!re||re.index>=e.length)break;var ie=re.index,ae=re.index+re[0].length,C=x;for(C+=b.value.length;ie>=C;)b=b.next,C+=b.value.length;if(C-=b.value.length,x=C,b.value instanceof a)continue;for(var w=b;w!==t.tail&&(C<ae||typeof w.value==`string`);w=w.next)ne++,C+=w.value.length;ne--,S=e.slice(x,C),re.index-=x}else if(re=o(te,0,S,_),!re)continue;var ie=re.index,oe=re[0],T=S.slice(0,ie),se=S.slice(ie+oe.length),ce=x+S.length;d&&ce>d.reach&&(d.reach=ce);var le=b.prev;T&&(le=l(t,le,T),x+=T.length),u(t,le,ne);var ue=new a(f,g?i.tokenize(oe,g):oe,y,oe);if(b=l(t,le,ue),se&&l(t,b,se),ne>1){var de={cause:f+`,`+m,reach:ce};s(e,t,n,b.prev,x,de),d&&de.reach>d.reach&&(d.reach=de.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.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(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`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:n.languages[t]},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(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)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),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])*)\\)`,`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`))})(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$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),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*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),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)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
15
+ `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))(),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$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),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*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),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)`,`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(/&amp;/,`&`))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r[`language-`+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore(`markup`,`cdata`,i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`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){function t(e){return e=e.replace(/<inner>/g,function(){return`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var n="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",r=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return n}),i=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`;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(`^`+r+i+`(?:`+r+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+r+i+`)(?:`+r+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(n),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+r+`)`+i+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+r+`$`),inside:{"table-header":{pattern:RegExp(n),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:t(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(`(~~?)(?:(?!~)<inner>)+\\2`),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:t(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),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(t){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add(`after-tokenize`,function(e){if(e.language!==`markdown`&&e.language!==`md`)return;function t(e){if(!(!e||typeof e==`string`))for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i.type!==`code`){t(i.content);continue}var a=i.content[1],o=i.content[3];if(a&&o&&a.type===`code-language`&&o.type===`code-block`&&typeof a.content==`string`){var s=a.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`);s=(/[a-z][\w-]*/i.exec(s)||[``])[0].toLowerCase();var c=`language-`+s;o.alias?typeof o.alias==`string`?o.alias=[o.alias,c]:o.alias.push(c):o.alias=[c]}}}t(e.tokens)}),e.hooks.add(`wrap`,function(t){if(t.type===`code-block`){for(var n=``,r=0,i=t.classes.length;r<i;r++){var a=t.classes[r],o=/language-(.+)/.exec(a);if(o){n=o[1];break}}var s=e.languages[n];if(s)t.content=e.highlight(c(t.content),s,n);else if(n&&n!==`none`&&e.plugins.autoloader){var l=`md-`+new Date().valueOf()+`-`+Math.floor(Math.random()*0x2386f26fc10000);t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,`gi`),o={amp:`&`,lt:`<`,gt:`>`,quot:`"`},s=String.fromCodePoint||String.fromCharCode;function c(e){var t=e.replace(a,``);return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){return t=t.toLowerCase(),t[0]===`#`?s(t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1))):o[t]||e}),t}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)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),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])*)\\)`,`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:/![sra](?=[:}]$)/,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>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),e.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+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(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),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*)*`,r={pattern:RegExp(`(^|[^\\w.])`+n+`[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b`),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.])`+n+`[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)`),lookbehind:!0,inside:r.inside},{pattern:RegExp(`(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)`+n+`[A-Z]\\w*\\b`),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+)`+n+`(?:[A-Z]\\w*|\\*)(?=\\s*;)`),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(`(\\bimport\\s+static\\s+)`+n+`(?:\\w+|\\*)(?=\\s*;)`),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*)*\\.?`.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`.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+`.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+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.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);function Ku(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var qu=`javascript`;function Ju(e,t){for(let n of e.childNodes){if(J(n)&&n.tagName===t)return!0;Ju(n,t)}return!1}var Yu=`data-language`,Xu=`data-highlight-language`,Zu=`data-theme`,Qu=class e extends za{__language;__theme;__isSyntaxHighlightSupported;static getType(){return`code`}static clone(t){return new e(t.__language,t.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=document.createElement(`code`);Ec(t,e.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(Yu,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Xu,n));let r=this.getTheme();r&&t.setAttribute(Zu,r);let i=this.getStyle();return i&&t.setAttribute(`style`,i),t}updateDOM(e,t,n){let r=this.__language,i=e.__language;r?r!==i&&t.setAttribute(Yu,r):i&&t.removeAttribute(Yu);let a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?a&&r?r!==i&&t.setAttribute(Xu,r):t.removeAttribute(Xu):a&&r&&t.setAttribute(Xu,r);let o=this.__theme,s=e.__theme;o?o!==s&&t.setAttribute(Zu,o):s&&t.removeAttribute(Zu);let c=this.__style,l=e.__style;return c?c!==l&&t.setAttribute(`style`,c):l&&t.removeAttribute(`style`),!1}exportDOM(e){let t=document.createElement(`pre`);Ec(t,e._config.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(Yu,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Xu,n));let r=this.getTheme();r&&t.setAttribute(Zu,r);let i=this.getStyle();return i&&t.setAttribute(`style`,i),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||Ju(e,`BR`))?{conversion:td,priority:1}:null,div:()=>({conversion:nd,priority:1}),pre:()=>({conversion:td,priority:0}),table:e=>od(e)?{conversion:rd,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&od(n)?{conversion:id,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&od(t)?{conversion:id,priority:3}:null}}}static importJSON(e){return $u().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){let n=this.getChildren(),r=n.length;if(r>=2&&n[r-1].getTextContent()===`
16
+ `&&n[r-2].getTextContent()===`
17
+ `&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r){n[r-1].remove(),n[r-2].remove();let e=H();return this.insertAfter(e,t),e}let{anchor:i,focus:a}=e,o=(i.isBefore(a)?i:a).getNode();if(M(o)){let e=dd(o),t=[];for(;;)if(Li(e))t.push(Ii()),e=e.getNextSibling();else{if(!$(e))break;{let n=0,r=e.getTextContent(),i=e.getTextContentSize();for(;n<i&&r[n]===` `;)n++;if(n!==0&&t.push(ld(` `.repeat(n))),n!==i)break;e=e.getNextSibling()}}let n=o.splitText(i.offset)[0],r=i.offset===0?0:1,a=n.getIndexWithinParent()+r,s=o.getParentOrThrow(),c=[_i(),...t];s.splice(a,0,c);let l=t[t.length-1];l?l.select():i.offset===0?n.selectPrevious():n.getNextSibling().selectNext(0,0)}if(ed(o)){let{offset:t}=e.anchor;o.splice(t,0,[_i()]),o.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){let e=H();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function $u(e,t){return Ms(Qu).setLanguage(e).setTheme(t)}function ed(e){return e instanceof Qu}function td(e){return{node:$u(e.getAttribute(Yu))}}function nd(e){let t=e,n=ad(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(ad(t))return!0;t=t.parentElement}return!1}(t)?{node:n?$u():null}:{node:null}}function rd(){return{node:$u()}}function id(){return{node:null}}function ad(e){return e.style.fontFamily.match(`monospace`)!==null}function od(e){return e.classList.contains(`js-file-line-container`)}var sd=class e extends Ti{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}static getType(){return`code-highlight`}static clone(t){return new e(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e);return Ec(t,cd(e.theme,this.__highlightType)),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n),i=cd(n.theme,e.__highlightType),a=cd(n.theme,this.__highlightType);return i!==a&&(i&&Dc(t,i),a&&Ec(t,a)),r}static importJSON(e){return ld().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return $u()}};function cd(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function ld(e=``,t){return ls(new sd(e,t))}function $(e){return e instanceof sd}function ud(e,t){let n=e;for(let r=Y(e,t);r&&($(r.origin)||Li(r.origin));r=Jc(r))n=r.origin;return n}function dd(e){return ud(e,`previous`)}function fd(e){return ud(e,`next`)}function pd(e){let t=dd(e),n=fd(e),r=t;for(;r!==null;){if($(r)){let e=mo(r.getTextContent());if(e!==null)return e}if(r===n)break;r=r.getNextSibling()}let i=t.getParent();if(z(i)){let e=i.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function md(e,t){let n=null,r=null,i=e,a=t,o=e.getTextContent();for(;;){if(a===0){if(i=i.getPreviousSibling(),i===null)break;if($(i)||Li(i)||A(i)||Ku(167),A(i)){n={node:i,offset:1};break}a=Math.max(0,i.getTextContentSize()-1),o=i.getTextContent()}else a--;let e=o[a];$(i)&&e!==` `&&(r={node:i,offset:a})}if(r!==null)return r;let s=null;if(t<e.getTextContentSize())$(e)&&(s=e.getTextContent()[t]);else{let t=e.getNextSibling();$(t)&&(s=t.getTextContent()[0])}if(s!==null&&s!==` `)return n;{let r=function(e,t){let n=e,r=t,i=e.getTextContent(),a=e.getTextContentSize();for(;;){if(!$(n)||r===a){if(n=n.getNextSibling(),n===null||A(n))return null;$(n)&&(r=0,i=n.getTextContent(),a=n.getTextContentSize())}if($(n)){if(i[r]!==` `)return{node:n,offset:r};r++}}}(e,t);return r===null?n:r}}function hd(e){let t=fd(e);return A(t)&&Ku(168),t}(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":`-`,"deleted-arrow":`<`,"inserted-sign":`+`,"inserted-arrow":`>`,unchanged:` `,diff:`!`};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n===`diff`&&i.push(`bold`),e.languages.diff[n]={pattern:RegExp(`^(?:[`+r+`].*(?:\r
18
+ ?|
19
+ |(?![\\s\\S])))+`,`m`),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})})(Prism);var gd=globalThis.Prism||window.Prism;function _d(e){return typeof e==`string`?e:Array.isArray(e)?e.map(_d).join(``):_d(e.content)}function vd(e,t){let n=/^diff-([\w-]+)/i.exec(t),r=e.getTextContent(),i=gd.tokenize(r,gd.languages[n?`diff`:t]);return n&&(i=function(e,t){let n=t,r=gd.languages[n],i={tokens:e},a=gd.languages.diff.PREFIXES;for(let e of i.tokens){if(typeof e==`string`||!(e.type in a)||!Array.isArray(e.content))continue;let t=e.type,n=0,i=()=>(n++,new gd.Token(`prefix`,a[t],t.replace(/^(\w+).*/,`$1`))),o=e.content.filter(e=>typeof e==`string`||e.type!==`prefix`),s=e.content.length-o.length,c=gd.tokenize(_d(o),r);c.unshift(i());let l=/\r\n|\n/g,u=e=>{let t=[];l.lastIndex=0;let r,a=0;for(;n<s&&(r=l.exec(e));){let n=r.index+r[0].length;t.push(e.slice(a,n)),a=n,t.push(i())}if(t.length!==0)return a<e.length&&t.push(e.slice(a)),t},d=e=>{for(let t=0;t<e.length&&n<s;t++){let n=e[t];if(typeof n==`string`){let r=u(n);r&&(e.splice(t,1,...r),t+=r.length-1)}else if(typeof n.content==`string`){let e=u(n.content);e&&(n.content=e)}else Array.isArray(n.content)?d(n.content):d([n.content])}};d(c),n<s&&c.push(i()),e.content=c}return i.tokens}(i,n[1])),yd(i)}function yd(e,t){let n=[];for(let r of e)if(typeof r==`string`){let e=r.split(/(\n|\t)/),i=e.length;for(let r=0;r<i;r++){let i=e[r];i===`
20
+ `||i===`\r
21
+ `?n.push(_i()):i===` `?n.push(Ii()):i.length>0&&n.push(ld(i,t))}}else{let{content:e,alias:t}=r;typeof e==`string`?n.push(...yd([e],r.type===`prefix`&&typeof t==`string`?t:r.type)):Array.isArray(e)&&n.push(...yd(e,r.type===`unchanged`?void 0:r.type))}return n}var bd={$tokenize(e,t){return vd(e,t||this.defaultLanguage)},defaultLanguage:qu,tokenize(e,t){return gd.tokenize(e,gd.languages[t||``]||gd.languages[this.defaultLanguage])}};function xd(e,t,n){let r=e.getParent();ed(r)?wd(r,t,n):$(e)&&e.replace(j(e.__text))}function Sd(e,t){let n=t.getElementByKey(e.getKey());if(n===null)return;let r=e.getChildren(),i=r.length;if(i===n.__cachedChildrenLength)return;n.__cachedChildrenLength=i;let a=`1`,o=1;for(let e=0;e<i;e++)A(r[e])&&(a+=`
22
+ `+ ++o);n.setAttribute(`data-gutter`,a)}var Cd=new Set;function wd(e,t,n){let r=e.getKey(),i=t.getKey()+`/`+r;if(e.getLanguage()===void 0&&e.setLanguage(n.defaultLanguage),!function(e){let t=function(e){let t=/^diff-([\w-]+)/i.exec(e);return t?t[1]:null}(e)||e;try{return!!t&&gd.languages.hasOwnProperty(t)}catch{return!1}}(e.getLanguage()||n.defaultLanguage))return e.getIsSyntaxHighlightSupported()&&e.setIsSyntaxHighlightSupported(!1),void async function(){}();e.getIsSyntaxHighlightSupported()||e.setIsSyntaxHighlightSupported(!0),Cd.has(i)||(Cd.add(i),t.update(()=>{(function(e,t){let n=W(e);if(!ed(n)||!n.isAttached())return;let r=P();if(!N(r))return void t();let i=r.anchor,a=i.offset,o=i.type===`element`&&A(n.getChildAtIndex(i.offset-1)),s=0;if(o||(s=a+i.getNode().getPreviousSiblings().reduce((e,t)=>e+t.getTextContentSize(),0)),t()){if(o)return void i.getNode().select(a,a);n.getChildren().some(e=>{let t=M(e);if(t||A(e)){let n=e.getTextContentSize();if(t&&n>=s)return e.select(s,s),!0;s-=n}return!1})}})(r,()=>{let t=W(r);if(!ed(t)||!t.isAttached())return!1;let i=t.getLanguage()||n.defaultLanguage,a=n.$tokenize(t,i),{from:o,to:s,nodesForReplacement:c}=function(e,t){let n=0;for(;n<e.length&&Td(e[n],t[n]);)n++;let r=e.length,i=t.length,a=Math.min(r,i)-n,o=0;for(;o<a;)if(o++,!Td(e[r-o],t[i-o])){o--;break}let s=n,c=r-o;return{from:s,nodesForReplacement:t.slice(n,i-o),to:c}}(t.getChildren(),a);return!(o===s&&!c.length)&&(e.splice(o,s-o,c),!0)})},{onUpdate:()=>{Cd.delete(i)},skipTransforms:!0}))}function Td(e,t){return $(e)&&$(t)&&e.__text===t.__text&&e.__highlightType===t.__highlightType||Li(e)&&Li(t)||A(e)&&A(t)}function Ed(e){if(!N(e))return!1;let t=e.anchor.getNode(),n=ed(t)?t:t.getParent(),r=e.focus.getNode(),i=ed(r)?r:r.getParent();return ed(n)&&n.is(i)}function Dd(e){let t=e.getNodes(),n=[];if(t.length===1&&ed(t[0]))return n;let r=[];for(let e=0;e<t.length;e++){let i=t[e];$(i)||Li(i)||A(i)||Ku(169),A(i)?r.length>0&&(n.push(r),r=[]):r.push(i)}if(r.length>0){let t=e.isBackward()?e.anchor:e.focus,i=zi(r[0].getKey(),0,`text`);t.is(i)||n.push(r)}return n}function Od(e){let t=P();if(!N(t)||!Ed(t))return!1;let n=Dd(t),r=n.length;if(r===0&&t.isCollapsed())return e===lr&&t.insertNodes([Ii()]),!0;if(r===0&&e===lr&&t.getTextContent()===`
23
+ `){let e=Ii(),n=_i(),r=t.isBackward()?`previous`:`next`;return t.insertNodes([e,n]),pc(Cc(ic(Js(e,`next`,0),bc(Y(n,`next`))),r)),!0}for(let i=0;i<r;i++){let r=n[i];if(r.length>0){let n=r[0];if(i===0&&(n=dd(n)),e===lr){let e=Ii();if(n.insertBefore(e),i===0){let r=t.isBackward()?`focus`:`anchor`,i=zi(n.getKey(),0,`text`);t[r].is(i)&&t[r].set(e.getKey(),0,`text`)}}else Li(n)&&n.remove()}}return!0}function kd(e,t){let n=P();if(!N(n))return!1;let{anchor:r,focus:i}=n,a=r.offset,o=i.offset,s=r.getNode(),c=i.getNode(),l=e===er;if(!Ed(n)||!$(s)&&!Li(s)||!$(c)&&!Li(c))return!1;if(!t.altKey){if(n.isCollapsed()){let e=s.getParentOrThrow();if(l&&a===0&&s.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),t.preventDefault(),!0}else if(!l&&a===s.getTextContentSize()&&s.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),t.preventDefault(),!0}return!1}let u,d;if(s.isBefore(c)?(u=dd(s),d=fd(c)):(u=dd(c),d=fd(s)),u==null||d==null)return!1;let f=u.getNodesBetween(d);for(let e=0;e<f.length;e++){let t=f[e];if(!$(t)&&!Li(t)&&!A(t))return!1}t.preventDefault(),t.stopPropagation();let p=l?u.getPreviousSibling():d.getNextSibling();if(!A(p))return!0;let m=l?p.getPreviousSibling():p.getNextSibling();if(m==null)return!0;let h=($(m)||Li(m)||A(m)?l?dd(m):fd(m):null)??m;return p.remove(),f.forEach(e=>e.remove()),e===er?(f.forEach(e=>h.insertBefore(e)),h.insertBefore(p)):(h.insertAfter(p),h=p,f.forEach(e=>{h.insertAfter(e),h=e})),n.setTextNodeRange(s,a,c,o),!0}function Ad(e,t){let n=P();if(!N(n))return!1;let{anchor:r,focus:i}=n,a=r.getNode(),o=i.getNode(),s=e===$n;if(!Ed(n)||!$(a)&&!Li(a)||!$(o)&&!Li(o))return!1;let c=o;if(pd(c)===`rtl`?!s:s){let e=md(c,i.offset);if(e!==null){let{node:t,offset:r}=e;A(t)?t.selectNext(0,0):n.setTextNodeRange(t,r,t,r)}else c.getParentOrThrow().selectStart()}else hd(c).select();return t.preventDefault(),t.stopPropagation(),!0}function jd(e,t){if(!e.hasNodes([Qu,sd]))throw Error(`CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor`);t??=bd;let n=[];return!0!==e._headless&&n.push(e.registerMutationListener(Qu,t=>{e.getEditorState().read(()=>{for(let[n,r]of t)if(r!==`destroyed`){let t=W(n);t!==null&&Sd(t,e)}})},{skipInitialization:!1})),n.push(e.registerNodeTransform(Qu,n=>wd(n,e,t)),e.registerNodeTransform(Ti,n=>xd(n,e,t)),e.registerNodeTransform(sd,n=>xd(n,e,t)),e.registerCommand(sr,t=>{let n=function(e){let t=P();if(!N(t)||!Ed(t))return null;let n=e?ur:lr,r=e?ur:cr,i=t.anchor,a=t.focus;if(i.is(a))return r;let o=Dd(t);if(o.length!==1)return n;let s=o[0],c,l;s.length===0&&Ku(285),t.isBackward()?(c=a,l=i):(c=i,l=a);let u=dd(s[0]),d=fd(s[0]),f=zi(u.getKey(),0,`text`),p=zi(d.getKey(),d.getTextContentSize(),`text`);return c.isBefore(f)||p.isBefore(l)?n:f.isBefore(c)||l.isBefore(p)?r:n}(t.shiftKey);return n!==null&&(t.preventDefault(),e.dispatchCommand(n,void 0),!0)},1),e.registerCommand(cr,()=>!!Ed(P())&&(pa([Ii()]),!0),1),e.registerCommand(lr,e=>Od(lr),1),e.registerCommand(ur,e=>Od(ur),1),e.registerCommand(er,e=>{let t=P();if(!N(t)||!Ed(t))return!1;let n=G().getFirstDescendant(),{anchor:r}=t,i=r.getNode();return(!n||!i||n.getKey()!==i.getKey())&&kd(er,e)},1),e.registerCommand(tr,e=>{let t=P();if(!N(t)||!Ed(t))return!1;let n=G().getLastDescendant(),{anchor:r}=t,i=r.getNode();return(!n||!i||n.getKey()!==i.getKey())&&kd(tr,e)},1),e.registerCommand($n,e=>Ad($n,e),1),e.registerCommand(Zn,e=>Ad(Zn,e),1)),Oc(...n)}var Md=new Set([`http:`,`https:`,`mailto:`,`sms:`,`tel:`]),Nd=class e extends za{__url;__target;__rel;__title;static getType(){return`link`}static clone(t){return new e(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(e=``,t={},n){super(n);let{target:r=null,rel:i=null,title:a=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=a}createDOM(e){let t=document.createElement(`a`);return this.updateLinkDOM(null,t,e),Ec(t,e.theme.link),t}updateLinkDOM(e,t,n){if(gs(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let n of[`target`,`rel`,`title`]){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}static importDOM(){return{a:e=>({conversion:Pd,priority:1})}}static importJSON(e){return Fd().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Vd(e);try{let t=new URL(Vd(e));if(!Md.has(t.protocol))return`about:blank`}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=Fd(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!N(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith(`mailto:`)}isWebSiteURI(){return this.__url.startsWith(`https://`)||this.__url.startsWith(`http://`)}};function Pd(e){let t=null;if(gs(e)){let n=e.textContent;(n!==null&&n!==``||e.children.length>0)&&(t=Fd(e.getAttribute(`href`)||``,{rel:e.getAttribute(`rel`),target:e.getAttribute(`target`),title:e.getAttribute(`title`)}))}return{node:t}}function Fd(e=``,t){return ls(new Nd(e,t))}function Id(e){return e instanceof Nd}var Ld=class e extends Nd{__isUnlinked;constructor(e=``,t={},n){super(e,t,n),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return`autolink`}static clone(t){return new e(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement(`span`):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Rd().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let n=Rd(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}};function Rd(e=``,t){return ls(new Ld(e,t))}function zd(e){return e instanceof Ld}var Bd=/^\+?[0-9\s()-]{5,}$/;function Vd(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes(`@`)?`mailto:${e}`:Bd.test(e)?`tel:${e}`:`https://${e}`}function Hd(e,t){let n={};for(let r of e){let e=t(r);e&&(n[e]?n[e].push(r):n[e]=[r])}return n}function Ud(e){let t=Hd(e,e=>e.type);return{element:t.element||[],multilineElement:t[`multiline-element`]||[],textFormat:t[`text-format`]||[],textMatch:t[`text-match`]||[]}}var Wd=/[ \t\n\r\f]/,Gd=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Kd=/^\s{0,3}$/;function qd(e){if(!Xa(e))return!1;let t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&M(t)&&Kd.test(t.getTextContent())}function Jd(e,t,n,r){for(let i of t){if(!i.export)continue;let t=i.export(e,e=>Yd(e,n,r));if(t!=null)return t}return z(e)?Yd(e,n,r):B(e)?e.getTextContent():null}function Yd(e,t,n,r,i){let a=[],o=e.getChildren();r||=[],i||=[];t:for(let e of o){for(let o of n){if(!o.export)continue;let s=o.export(e,e=>Yd(e,t,n,r,[...i,...r]),(e,n)=>Xd(e,n,t,r,i));if(s!=null){a.push(s);continue t}}A(e)?a.push(`
24
+ `):M(e)?a.push(Xd(e,e.getTextContent(),t,r,i)):z(e)?a.push(Yd(e,t,n,r,i)):B(e)&&a.push(e.getTextContent())}return a.join(``)}function Xd(e,t,n,r,i){let a=e.getFormat()===0?t:function(e){return e.replace(/^\s+|\s+$/g,e=>[...e].map(e=>`&#`+e.codePointAt(0)+`;`).join(``))}(t);e.hasFormat(`code`)||(a=a.replace(/([*_`~\\])/g,`\\$1`));let o=``,s=``,c=``,l=Zd(e,!0),u=Zd(e,!1),d=new Set;for(let t of n){let n=t.format[0],i=t.tag;Qd(e,n)&&!d.has(n)&&(d.add(n),Qd(l,n)&&r.find(e=>e.tag===i)||(r.push({format:n,tag:i}),o+=i))}for(let t=0;t<r.length;t++){let n=Qd(e,r[t].format),a=Qd(u,r[t].format);if(n&&a)continue;let o=[...r];for(;o.length>t;){let e=o.pop();i&&e&&i.find(t=>t.tag===e.tag)||(e&&typeof e.tag==`string`&&(n?a||(c+=e.tag):s+=e.tag),r.pop())}break}return a=o+a+c,s+a}function Zd(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();return M(n)?n:null}function Qd(e,t){return M(e)&&e.hasFormat(t)}function $d(e,t){let n=e.getTextContent(),r=t.fullMatchRegExpByTag["`"],i=t.transformersByTag["`"],a=[],o=null;if(r&&i){let e=new RegExp(r.source,`g`),t=Array.from(n.matchAll(e));for(let e of t){let t=e.index,n=t+e[0].length;o||={content:e[2],endIndex:n,startIndex:t,tag:"`"},a.push({end:n,start:t})}}let s=function(e,t,n=[]){let r=[],i=new Set(Object.keys(t.transformersByTag).filter(e=>e[0]!=="`").map(e=>e[0])),a=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1},o=e=>n.some(t=>e>=t.start&&e<t.end),s=0;for(;s<e.length;){let t=e[s];if(!i.has(t)||a(s)||o(s)){s++;continue}let n=1;for(;s+n<e.length&&e[s+n]===t;)n++;let c=ef(t,e,s,n,!0),l=ef(t,e,s,n,!1);(c||l)&&r.push({active:!0,canClose:l,canOpen:c,char:t,index:s,length:n,originalLength:n}),s+=n}return r}(n,t,a),c=s.length>0?function(e,t,n){let r={},i=0,a=null;for(;i<t.length;){let o=t[i];if(!o.active||!o.canClose||o.length===0){i++;continue}let s=`${o.char}${o.canOpen}`,c=r[s]??-1,l=!1;for(let r=i-1;r>c;r--){let s=t[r];if(!s.active||!s.canOpen||s.length===0||s.char!==o.char||(s.canClose||o.canOpen)&&(s.originalLength+o.originalLength)%3==0&&s.originalLength%3!=0&&o.originalLength%3!=0)continue;let c=Math.min(s.length,o.length),u=Object.keys(n.transformersByTag).filter(e=>e[0]===s.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!u)continue;l=!0;let d=u.length,f={content:e.slice(s.index+s.length,o.index),endIndex:o.index+d,startIndex:s.index+(s.length-d),tag:u};(!a||f.startIndex<a.startIndex||f.startIndex===a.startIndex&&f.endIndex>a.endIndex)&&(a=f);for(let e=r+1;e<i;e++)t[e].active=!1;s.length-=d,o.length-=d,s.active=s.length>0,o.length>0?o.index+=d:(o.active=!1,i++);break}l||(r[s]=i-1,o.canOpen||(o.active=!1),i++)}return a}(n,s,t):null,l=null,u=null;if(o&&c?c.startIndex<=o.startIndex&&c.endIndex>=o.endIndex?(l=c,u=t.transformersByTag[c.tag]):(l=o,u=i):o?(l=o,u=i):c&&(l=c,u=t.transformersByTag[c.tag]),!l||!u)return null;let d=[n.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=n,{endIndex:l.endIndex,match:d,startIndex:l.startIndex,transformer:u}}function ef(e,t,n,r,i){if(!tf(t,n,r,i))return!1;if(e===`*`)return!0;if(e===`_`){if(!tf(t,n,r,!i))return!0;let e=i?t[n-1]:t[n+r];return e!==void 0&&Gd.test(e)}return!0}function tf(e,t,n,r){let i=e[t-1],a=e[t+n],[o,s]=r?[a,i]:[i,a];return o!==void 0&&!Wd.test(o)&&(!Gd.test(o)||s===void 0||Wd.test(s)||Gd.test(s))}function nf(e){return M(e)&&!e.hasFormat(`code`)}function rf(e,t,n){let r=$d(e,t),i=function(e,t){let n=e,r,i,a,o;for(let e of t){if(!e.replace||!e.importRegExp)continue;let t=n.getTextContent().match(e.importRegExp);if(!t)continue;let s=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):s+t[0].length;!1!==c&&(r===void 0||i===void 0||s<r&&(c>i||c<=r))&&(r=s,i=c,a=e,o=t)}return r===void 0||i===void 0||a===void 0||o===void 0?null:{endIndex:i,match:o,startIndex:r,transformer:a}}(e,n);if(r&&i&&(r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){let i=function(e,t,n,r,i){let a=e.getTextContent(),o,s,c;if(i[0]===a?o=e:t===0?[o,s]=e.splitText(n):[c,o,s]=e.splitText(t,n),o.setTextContent(i[2]),r)for(let e of r.format)o.hasFormat(e)||o.toggleFormat(e);return{nodeAfter:s,nodeBefore:c,transformedNode:o}}(e,r.startIndex,r.endIndex,r.transformer,r.match);nf(i.nodeAfter)&&rf(i.nodeAfter,t,n),nf(i.nodeBefore)&&rf(i.nodeBefore,t,n),nf(i.transformedNode)&&rf(i.transformedNode,t,n)}else if(i){let r=function(e,t,n,r,i){let a,o,s;return t===0?[a,o]=e.splitText(n):[s,a,o]=e.splitText(t,n),r.replace?{nodeAfter:o,nodeBefore:s,transformedNode:r.replace(a,i)||void 0}:null}(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!r)return;nf(r.nodeAfter)&&rf(r.nodeAfter,t,n),nf(r.nodeBefore)&&rf(r.nodeBefore,t,n),nf(r.transformedNode)&&rf(r.transformedNode,t,n)}let a=e.getTextContent().replace(/\\([*_`~\\])/g,`$1`).replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(t));e.setTextContent(a)}function af(e,t=!1){let n=Ud(e),r=function(e){let t={},n={},r=[];for(let i of e){let{tag:e}=i;t[e]=i;let a=e.replace(/(\*|\^|\+)/g,`\\$1`);r.push(a),e.length===1?n[e]=RegExp(e==="`"?"(?<![\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)":`(?<![\\\\${a}])(${a})((\\\\${a})?.*?[^${a}\\s](\\\\${a})?)((?<!\\\\)|(?<=\\\\\\\\))(${a})(?![\\\\${a}])`):n[e]=RegExp(`(?<!\\\\)(${a})((\\\\${a})?.*?[^\\s](\\\\${a})?)((?<!\\\\)|(?<=\\\\\\\\))(${a})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:RegExp(`(?<![\\\\])(${r.join(`|`)})`,`g`),transformersByTag:t}}(n.textFormat);return(e,i)=>{let a=e.split(`
25
+ `),o=a.length,s=i||G();s.clear();for(let e=0;e<o;e++){let i=a[e],[o,c]=of(a,e,n.multilineElement,s);o?e=c:sf(i,s,n.element,r,n.textMatch,t)}let c=s.getChildren();for(let e of c)!t&&qd(e)&&s.getChildrenSize()>1&&e.remove();P()!==null&&s.selectStart()}}function of(e,t,n,r){for(let i of n){let{handleImportAfterStartMatch:n,regExpEnd:a,regExpStart:o,replace:s}=i,c=e[t].match(o);if(!c)continue;if(n){let a=n({lines:e,rootNode:r,startLineIndex:t,startMatch:c,transformer:i});if(a===null)continue;if(a)return a}let l=typeof a==`object`&&`regExp`in a?a.regExp:a,u=a&&typeof a==`object`&&`optional`in a?a.optional:!a,d=t,f=e.length;for(;d<f;){let n=l?e[d].match(l):null;if(!n&&(!u||u&&d<f-1)){d++;continue}if(n&&t===d&&n.index===c.index){d++;continue}let i=[];if(n&&t===d)i.push(e[t].slice(c[0].length,-n[0].length));else for(let r=t;r<=d;r++)if(r===t){let t=e[r].slice(c[0].length);i.push(t)}else if(r===d&&n){let t=e[r].slice(0,-n[0].length);i.push(t)}else i.push(e[r]);if(!1!==s(r,null,c,n,i,!0))return[!0,d];break}}return[!1,t]}function sf(e,t,n,r,i,a){let o=j(e),s=H();s.append(o),t.append(s);for(let{regExp:t,replace:r}of n){let n=e.match(t);if(n&&(o.setTextContent(e.slice(n[0].length)),!1!==r(s,[o],n,!0)))break}if(rf(o,r,i),s.isAttached()&&e.length>0){let e=s.getPreviousSibling();if(!a&&(Xa(e)||$l(e)||Q(e))){let t=e;if(Q(e)){let n=e.getLastDescendant();t=n==null?null:Ns(n,Z)}t!=null&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[_i(),...s.getChildren()]),s.remove())}}}var cf=/^(\s*)(\d{1,})\.\s/,lf=/^(\s*)[-*+]\s/,uf=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,df=/^(#{1,6})\s/,ff=/^>\s/,pf=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,mf=/^[ \t]*`{3,}$/,hf=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,gf=/^(?:\|)(.+)(?:\|)\s?$/,_f=/^(\| ?:?-*:? ?)+\|\s?$/,vf=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,yf=/^<\/[a-z_][\w-]*\s*>/i,bf=e=>RegExp(`(?:${e.source})$`,e.flags),xf=Ft(`mdListMarker`,{parse:e=>typeof e==`string`&&/^[-*+]$/.test(e)?e:`-`}),Sf=Ft(`mdCodeFence`,{parse:e=>typeof e==`string`&&/^`{3,}$/.test(e)?e:"```"}),Cf=e=>(t,n,r,i)=>{let a=e(r);a.append(...n),t.replace(a),i||a.select(0,0)},wf=e=>(t,n,r,i)=>{let a=t.getPreviousSibling(),o=t.getNextSibling(),s=Pu(e===`check`?r[3]===`x`:void 0),c=r[0].trim()[0],l=e!==`bullet`&&e!==`check`||c!==xf.parse(c)?void 0:c;if(Q(o)&&o.getListType()===e){l&&Lt(o,xf,l);let e=o.getFirstChild();e===null?o.append(s):e.insertBefore(s),t.remove()}else if(Q(a)&&a.getListType()===e)l&&Lt(a,xf,l),a.append(s),t.remove();else{let n=Bu(e,e===`number`?Number(r[2]):void 0);l&&Lt(n,xf,l),n.append(s),t.replace(n)}s.append(...n),i||s.select(0,0);let u=function(e){let t=e.match(/\t/g),n=e.match(/ /g),r=0;return t&&(r+=t.length),n&&(r+=Math.floor(n.length/4)),r}(r[1]);u&&s.setIndent(u)},Tf=(e,t,n)=>{let r=[],i=e.getChildren(),a=0;for(let o of i)if(Z(o)){if(o.getChildrenSize()===1){let e=o.getFirstChild();if(Q(e)){r.push(Tf(e,t,n+1));continue}}let i=` `.repeat(4*n),s=e.getListType(),c=It(e,xf),l=s===`number`?`${e.getStart()+a}. `:s===`check`?`${c} [${o.getChecked()?`x`:` `}] `:c+` `;r.push(i+l+t(o)),a++}return r.join(`
26
+ `)},Ef={dependencies:[eu],export:(e,t)=>{if(!au(e))return null;let n=Number(e.getTag().slice(1));return`#`.repeat(n)+` `+t(e)},regExp:df,replace:Cf(e=>iu(`h`+e[1].length)),type:`element`},Df={dependencies:[Zl],export:(e,t)=>{if(!$l(e))return null;let n=t(e).split(`
27
+ `),r=[];for(let e of n)r.push(`> `+e);return r.join(`
28
+ `)},regExp:ff,replace:(e,t,n,r)=>{if(r){let n=e.getPreviousSibling();if($l(n))return n.splice(n.getChildrenSize(),0,[_i(),...t]),void e.remove()}let i=Ql();i.append(...t),e.replace(i),r||i.select(0,0)},type:`element`},Of={dependencies:[Qu],export:e=>{if(!ed(e))return null;let t=e.getTextContent(),n=It(e,Sf);if(t.indexOf(n)>-1){let e=t.match(/`{3,}/g);if(e){let t=Math.max(...e.map(e=>e.length));n="`".repeat(t+1)}}return n+(e.getLanguage()||``)+(t?`
29
+ `+t:``)+`
30
+ `+n},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{let i=r[1],a=i.trim().length,o=e[n],s=r.index+i.length,c=o.slice(s),l=RegExp(`\`{${a},}$`);if(l.test(c)){let e=c.match(l),i=c.slice(0,c.lastIndexOf(e[0])),a=[...r];return a[2]=``,Of.replace(t,null,a,e,[i],!0),[!0,n]}let u=RegExp(`^[ \\t]*\`{${a},}$`);for(let i=n+1;i<e.length;i++){let a=e[i];if(u.test(a)){let s=a.match(u),c=e.slice(n+1,i),l=o.slice(r[0].length);return l.length>0&&c.unshift(l),Of.replace(t,null,r,s,c,!0),[!0,i]}}let d=e.slice(n+1),f=o.slice(r[0].length);return f.length>0&&d.unshift(f),Of.replace(t,null,r,null,d,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:mf},regExpStart:pf,replace:(e,t,n,r,i,a)=>{let o,s,c=n[1]?n[1].trim():"```",l=n[2]||void 0;if(!t&&i){if(i.length===1)r?(o=$u(l),s=i[0]):(o=$u(l),s=i[0].startsWith(` `)?i[0].slice(1):i[0]);else{for(o=$u(l),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(` `)&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
31
+ `)}Lt(o,Sf,c);let t=j(s);o.append(t),e.append(o)}else t&&Cf(e=>$u(e?e[2]:void 0))(e,t,n,a)},type:`multiline-element`},kf={dependencies:[Fu,ju],export:(e,t)=>Q(e)?Tf(e,t,0):null,regExp:lf,replace:wf(`bullet`),type:`element`},Af={dependencies:[Fu,ju],export:(e,t)=>Q(e)?Tf(e,t,0):null,regExp:cf,replace:wf(`number`),type:`element`},jf={format:[`code`],tag:"`",type:`text-format`},Mf={format:[`highlight`],tag:`==`,type:`text-format`},Nf={format:[`bold`,`italic`],tag:`***`,type:`text-format`},Pf={format:[`bold`,`italic`],intraword:!1,tag:`___`,type:`text-format`},Ff={format:[`bold`],tag:`**`,type:`text-format`},If={format:[`bold`],intraword:!1,tag:`__`,type:`text-format`},Lf={format:[`strikethrough`],tag:`~~`,type:`text-format`},Rf={format:[`italic`],tag:`*`,type:`text-format`},zf={format:[`italic`],intraword:!1,tag:`_`,type:`text-format`},Bf={dependencies:[Nd],export:(e,t,n)=>{if(!Id(e)||zd(e))return null;let 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)=>{if(Ns(e,Id))return;let[,n,r,i]=t,a=Fd(r,{title:i}),o=n.split(`[`).length-1,s=n.split(`]`).length-1,c=n,l=``;if(o<s)return;if(o>s){let e=n.split(`[`);l=`[`+e[0],c=e.slice(1).join(`[`)}let u=j(c);return u.setFormat(e.getFormat()),a.append(u),e.replace(a),l&&a.insertBefore(j(l)),u},trigger:`)`,type:`text-match`},Vf=[Ef,Df,kf,Af],Hf=[Of],Uf=[jf,Nf,Pf,Ff,If,Mf,Rf,zf,Lf],Wf=[Bf],Gf=[...Vf,...Hf,...Uf,...Wf];function Kf(e,t=Gf,n,r=!1,i=!1){let a=r?e:function(e,t=!1){let n=e.split(`
32
+ `),r=!1,i=[];for(let e=0;e<n.length;e++){let a=n[e].trimEnd(),o=i[i.length-1];hf.test(a)?i.push(a):pf.test(a)||mf.test(a)?(r=!r,i.push(a)):r||a===``||o===``||!o||df.test(o)||df.test(a)||ff.test(a)||cf.test(a)||lf.test(a)||uf.test(a)||gf.test(a)||_f.test(a)||!t||vf.test(a)||yf.test(a)||bf(yf).test(o)||bf(vf).test(o)||mf.test(o)?i.push(a):i[i.length-1]=o+` `+a.trimStart()}return i.join(`
33
+ `)}(e,i);return af(t,r)(a,n)}function qf(e=Gf,t,n=!1){return function(e,t=!1){let n=Ud(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let t=[],o=(e||G()).getChildren();for(let e=0;e<o.length;e++){let s=o[e],c=Jd(s,r,a,n.textMatch);c!=null&&t.push(i&&e>0&&!qd(s)&&!qd(o[e-1])?`
34
+ ${c}`:c)}return t.join(`
35
+ `)}}(e,n)(t)}var Jf={class:`markdown-editor-panel`},Yf={class:`lexical-toolbar`},Xf=[`value`],Zf=[`value`],Qf={class:`lexical-editor-container`},$f=ie({__name:`MarkdownEditor`,props:{modelValue:String,visible:Boolean},emits:[`update:modelValue`,`close`],setup(e,{emit:t}){let n=e,r=t,i=T(null),a=null,s=T(null),u=[`javascript`,`typescript`,`ruby`,`python`,`html`,`css`,`json`,`yaml`,`bash`,`sql`,`go`,`rust`,`java`,`mermaid`,`markdown`,`text`];function f(){a||!i.value||(a=$a({namespace:`ArchsightMarkdownEditor`,nodes:[eu,Zl,Fu,ju,Qu,sd,Nd],onError:e=>console.error(`Lexical Error:`,e),theme:{paragraph:`lexical-paragraph`,heading:{h1:`lexical-h1`,h2:`lexical-h2`,h3:`lexical-h3`},list:{ul:`lexical-ul`,ol:`lexical-ol`,listitem:`lexical-li`},quote:`lexical-quote`,code:`lexical-code`,codeHighlight:{atrule:`tokenAttr`,attr:`tokenAttr`,boolean:`tokenProperty`,builtin:`tokenSelector`,cdata:`tokenComment`,char:`tokenSelector`,class:`tokenFunction`,"class-name":`tokenFunction`,comment:`tokenComment`,constant:`tokenProperty`,deleted:`tokenProperty`,doctype:`tokenComment`,entity:`tokenOperator`,function:`tokenFunction`,important:`tokenVariable`,inserted:`tokenSelector`,keyword:`tokenAttr`,namespace:`tokenVariable`,number:`tokenProperty`,operator:`tokenOperator`,prolog:`tokenComment`,property:`tokenProperty`,punctuation:`tokenPunctuation`,regex:`tokenVariable`,selector:`tokenSelector`,string:`tokenSelector`,symbol:`tokenProperty`,tag:`tokenProperty`,url:`tokenOperator`,variable:`tokenVariable`},link:`lexical-link`,text:{bold:`lexical-bold`,italic:`lexical-italic`,underline:`lexical-underline`,strikethrough:`lexical-strikethrough`,code:`lexical-text-code`}}}),a.setRootElement(i.value),lu(a),Gu(a),jd(a),pu(a,mu(),300),a.registerUpdateListener(()=>{a.getEditorState().read(()=>{let e=P();if(N(e)){let t=e.getNodes();for(let e of t){let t=e.getParent();if(ed(t)){s.value=t.getLanguage()||``;return}if(ed(e)){s.value=e.getLanguage()||``;return}}}s.value=null})}))}o(()=>n.visible,e=>{e&&setTimeout(()=>{a&&=(a.setRootElement(null),null),f(),a&&a.update(()=>{G().clear(),Kf(n.modelValue||``,Gf)})},0)});function g(){a&&a.update(()=>{r(`update:modelValue`,qf(Gf)),r(`close`)})}function _(e){a&&a.dispatchCommand(Kn,e)}function y(e){if(a){if(e===`bullet`){a.dispatchCommand(Hu,void 0);return}if(e===`number`){a.dispatchCommand(Uu,void 0);return}a.update(()=>{let t=P();N(t)&&([`h1`,`h2`,`h3`].includes(e)?Rc(t,()=>iu(e)):e===`quote`?Rc(t,()=>Ql()):e===`paragraph`&&Rc(t,()=>H()))})}}function ee(){a&&a.update(()=>{let e=P();if(N(e)){let t=$u(``);e.insertNodes([t]),t.select()}})}function te(e){a&&a.update(()=>{let t=P();if(N(t))for(let n of t.getNodes()){let t=n.getParent();if(ed(t)){t.setLanguage(e);return}if(ed(n)){n.setLanguage(e);return}}})}function b(){let e=prompt(`Enter URL:`,`https://`);e!==null&&a&&a.update(()=>{let t=P();if(N(t))if(e===``)t.getNodes().forEach(e=>{let t=e.getParent();Id(t)&&(t.getChildren().forEach(e=>t.insertBefore(e)),t.remove())});else{let n=t.getTextContent()||e,r=Fd(e);r.append(j(n)),t.insertNodes([r])}})}function x(e){e.key===`Escape`&&r(`close`)}return c(()=>{a&&=(a.setRootElement(null),null)}),(t,n)=>e.visible?(l(),m(`div`,{key:0,id:`markdown-editor-overlay`,onKeydown:x},[p(`div`,{class:`markdown-editor-backdrop`,onClick:n[0]||=e=>t.$emit(`close`)}),p(`div`,Jf,[p(`div`,Yf,[p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[1]||=e=>_(`bold`),title:`Bold (Ctrl+B)`},[...n[15]||=[p(`i`,{class:`iconoir-bold`},null,-1)]]),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[2]||=e=>_(`italic`),title:`Italic (Ctrl+I)`},[...n[16]||=[p(`i`,{class:`iconoir-italic`},null,-1)]]),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[3]||=e=>_(`strikethrough`),title:`Strikethrough`},[...n[17]||=[p(`i`,{class:`iconoir-strikethrough`},null,-1)]]),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[4]||=e=>_(`code`),title:`Inline Code`},[...n[18]||=[p(`i`,{class:`iconoir-code`},null,-1)]]),n[25]||=p(`div`,{class:`toolbar-divider`},null,-1),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[5]||=e=>y(`h1`),title:`Heading 1`},`H1`),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[6]||=e=>y(`h2`),title:`Heading 2`},`H2`),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[7]||=e=>y(`h3`),title:`Heading 3`},`H3`),n[26]||=p(`div`,{class:`toolbar-divider`},null,-1),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[8]||=e=>y(`bullet`),title:`Bullet List`},[...n[19]||=[p(`i`,{class:`iconoir-list`},null,-1)]]),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[9]||=e=>y(`number`),title:`Numbered List`},[...n[20]||=[p(`i`,{class:`iconoir-numbered-list-left`},null,-1)]]),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[10]||=e=>y(`quote`),title:`Quote`},[...n[21]||=[p(`i`,{class:`iconoir-quote`},null,-1)]]),n[27]||=p(`div`,{class:`toolbar-divider`},null,-1),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[11]||=e=>b(),title:`Insert Link`},[...n[22]||=[p(`i`,{class:`iconoir-link`},null,-1)]]),n[28]||=p(`div`,{class:`toolbar-divider`},null,-1),p(`button`,{class:`toolbar-btn`,type:`button`,onClick:n[12]||=e=>ee(),title:`Code Block`},[...n[23]||=[p(`i`,{class:`iconoir-code-brackets`},null,-1)]]),s.value===null?C(``,!0):(l(),m(`select`,{key:0,class:`toolbar-select`,value:s.value,onChange:n[13]||=e=>te(e.target.value),title:`Code Language`},[n[24]||=p(`option`,{value:``},`Language...`,-1),(l(),m(v,null,d(u,e=>p(`option`,{key:e,value:e},h(e.charAt(0).toUpperCase()+e.slice(1)),9,Zf)),64))],40,Xf)),n[29]||=p(`div`,{class:`toolbar-spacer`},null,-1),p(`button`,{class:`secondary toolbar-action`,type:`button`,onClick:n[14]||=e=>t.$emit(`close`)},`Cancel`),p(`button`,{class:`toolbar-action`,type:`button`,onClick:g},`Save`)]),p(`div`,Qf,[p(`div`,{ref_key:`editorRoot`,ref:i,id:`lexical-editor-root`,contenteditable:`true`},null,512)])])],32)):C(``,!0)}},[[`__scopeId`,`data-v-9ca3d00d`]]),ep={key:0},tp={key:1},np={key:2,class:`yaml-output`},rp={key:0,class:`field-group`},ip=[`value`],ap={key:1,class:`field-group`},op=[`aria-invalid`],sp={key:0,class:`field-error`},cp={class:`annotations-grid`},lp={class:`form-actions`},up=ie({__name:`EditorPage`,props:{kind:String,instance:String},setup(e){let o=e,c=y(),_=u(`kinds`),b=T(!0),S=T(null),ie=T(null),se=T(``),ce=T({}),le=T([]),ue=T({}),de=T(null),fe=T(null),pe=T(null),me=T(null),he=T(!1),ge=w(()=>!!o.instance),_e=w(()=>ge.value?`Edit ${o.kind}`:`New ${o.kind}`),ve=w(()=>ge.value?`/kinds/${o.kind}/instances/${o.instance}`:`/kinds/${o.kind}`),ye=w(()=>!_.value||!S.value?null:{icon:S.value.icon,layer:S.value.layer});te(async()=>{try{let e=ge.value?await x(o.kind,o.instance):await re(o.kind);S.value=e,ge.value&&(se.value=e.name||``,ce.value=e.annotations||{},le.value=e.relations||[],pe.value=e.content_hash,fe.value=e.path_ref)}catch(e){ie.value=e.message}finally{b.value=!1}});async function be(){ue.value={};let e={name:se.value,annotations:ce.value,relations:le.value.map(e=>({verb:e.verb,kind:e.kind,names:[e.name]})),content_hash:pe.value},t=ge.value?await ne(o.kind,o.instance,e):await ee(o.kind,e);t.errors?ue.value=t.errors:(de.value=t.yaml,t.path_ref&&(fe.value=t.path_ref),t.content_hash&&(pe.value=t.content_hash))}function xe(){de.value=null}function Se(e){me.value=e,he.value=!0}function Ce(e){me.value&&(ce.value[me.value]=e)}function we(){he.value=!1,me.value=null}return(o,u)=>{let _=a(`router-link`);return b.value?(l(),m(`article`,ep,[...u[3]||=[p(`p`,null,`Loading...`,-1)]])):ie.value?(l(),m(`article`,tp,[u[4]||=p(`header`,null,[p(`h2`,null,`Error`)],-1),p(`p`,null,h(ie.value),1)])):de.value?(l(),m(`article`,np,[p(`header`,null,[p(`h3`,null,[ye.value?(l(),m(`i`,{key:0,class:g(`iconoir-${ye.value.icon} icon-${ye.value.layer}`)},null,2)):C(``,!0),i(` `+h(_e.value),1)]),r(_,{class:`btn-back`,to:ve.value},{default:s(()=>[...u[5]||=[p(`i`,{class:`iconoir-arrow-left`},null,-1),i(` Back `,-1)]]),_:1},8,[`to`])]),r(Ue,{yaml:de.value,kind:e.kind,name:se.value,"content-hash":pe.value,"path-ref":fe.value,"inline-edit-enabled":S.value.inline_edit_enabled,onEditAgain:xe},null,8,[`yaml`,`kind`,`name`,`content-hash`,`path-ref`,`inline-edit-enabled`])])):S.value?(l(),m(v,{key:3},[p(`form`,{class:`editor-form`,onSubmit:oe(be,[`prevent`])},[p(`article`,null,[p(`header`,null,[p(`h3`,null,[ye.value?(l(),m(`i`,{key:0,class:g(`iconoir-${ye.value.icon} icon-${ye.value.layer}`)},null,2)):C(``,!0),i(` `+h(_e.value),1)]),r(_,{class:`btn-back`,to:ve.value},{default:s(()=>[...u[6]||=[p(`i`,{class:`iconoir-arrow-left`},null,-1),i(` Back `,-1)]]),_:1},8,[`to`])]),ge.value?(l(),m(`div`,rp,[p(`input`,{id:`name`,type:`text`,value:se.value,disabled:``},null,8,ip)])):(l(),m(`div`,ap,[u[7]||=p(`label`,{for:`name`},[i(` Name `),p(`span`,{class:`required`},`*`)],-1),f(p(`input`,{id:`name`,type:`text`,"onUpdate:modelValue":u[0]||=e=>se.value=e,required:``,placeholder:`Enter resource name (no spaces)`,pattern:`\\S+`,"aria-invalid":ue.value.name?`true`:void 0},null,8,op),[[ae,se.value]]),ue.value.name?(l(),m(`div`,sp,h(ue.value.name.join(`, `)),1)):C(``,!0)]))]),p(`article`,null,[u[8]||=p(`header`,null,[p(`h3`,null,`Annotations`)],-1),p(`div`,cp,[(l(!0),m(v,null,d(S.value.fields,e=>(l(),n(Te,{key:e.key,field:e,"model-value":ce.value[e.key],error:ue.value[e.key],"onUpdate:modelValue":t=>ce.value[e.key]=t,onOpenMarkdown:Se},null,8,[`field`,`model-value`,`error`,`onUpdate:modelValue`]))),128))])]),p(`article`,null,[u[9]||=p(`header`,null,[p(`h3`,null,`Relations`)],-1),r(Pe,{relations:le.value,"relation-options":S.value.relation_options,"instances-by-kind":S.value.instances_by_kind,"onUpdate:relations":u[1]||=e=>le.value=e},null,8,[`relations`,`relation-options`,`instances-by-kind`])]),p(`div`,lp,[u[10]||=p(`button`,{type:`submit`},[p(`i`,{class:`iconoir-code`}),i(` Generate YAML `)],-1),p(`button`,{type:`button`,class:`secondary`,onClick:u[2]||=e=>t(c).push(ve.value)},` Cancel `)])],32),r($f,{visible:he.value,"model-value":me.value&&ce.value[me.value]||``,"onUpdate:modelValue":Ce,onClose:we},null,8,[`visible`,`model-value`])],64)):C(``,!0)}}},[[`__scopeId`,`data-v-998cb080`]]);export{up as default};