@blocknote/core 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote.js +12508 -1276
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +50 -1
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +16 -5
- package/src/BlockNoteEditor.test.ts +12 -0
- package/src/BlockNoteEditor.ts +38 -15
- package/src/BlockNoteExtensions.ts +25 -21
- package/src/api/Editor.ts +142 -0
- package/src/api/blockManipulation/blockManipulation.ts +114 -0
- package/src/api/formatConversions/formatConversions.ts +86 -0
- package/src/api/formatConversions/removeUnderlinesRehypePlugin.ts +39 -0
- package/src/api/formatConversions/simplifyBlocksRehypePlugin.ts +125 -0
- package/src/api/nodeConversions/nodeConversions.ts +170 -0
- package/src/editor.module.css +7 -1
- package/src/extensions/Blocks/PreviousBlockTypePlugin.ts +7 -1
- package/src/extensions/Blocks/api/blockTypes.ts +85 -0
- package/src/extensions/Blocks/api/cursorPositionTypes.ts +5 -0
- package/src/extensions/Blocks/api/inlineContentTypes.ts +44 -0
- package/src/extensions/Blocks/helpers/getBlockInfoFromPos.ts +4 -4
- package/src/extensions/Blocks/nodes/BlockContainer.ts +75 -25
- package/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +23 -5
- package/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +28 -6
- package/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.ts +2 -2
- package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +3 -3
- package/src/extensions/SlashMenu/SlashMenuExtension.ts +7 -12
- package/src/extensions/SlashMenu/SlashMenuItem.ts +4 -1
- package/src/extensions/SlashMenu/{defaultCommands.tsx → defaultSlashCommands.tsx} +34 -17
- package/src/extensions/SlashMenu/index.ts +7 -4
- package/src/extensions/UniqueID/UniqueID.ts +1 -1
- package/src/index.ts +4 -2
- package/types/src/BlockNoteEditor.d.ts +13 -4
- package/types/src/BlockNoteEditor.test.d.ts +1 -0
- package/types/src/BlockNoteExtensions.d.ts +7 -3
- package/types/src/api/Editor.d.ts +73 -0
- package/types/src/api/blockManipulation/blockManipulation.d.ts +6 -0
- package/types/src/api/formatConversions/formatConversions.d.ts +6 -0
- package/types/src/api/formatConversions/removeUnderlinesRehypePlugin.d.ts +6 -0
- package/types/src/api/formatConversions/simplifyBlocksRehypePlugin.d.ts +16 -0
- package/types/src/api/nodeConversions/nodeConversions.d.ts +8 -0
- package/types/src/api/removeUnderlinesRehypePlugin.d.ts +6 -0
- package/types/src/api/simplifyBlocksRehypePlugin.d.ts +16 -0
- package/types/src/extensions/Blocks/api/apiTypes.d.ts +18 -0
- package/types/src/extensions/Blocks/api/blockTypes.d.ts +36 -0
- package/types/src/extensions/Blocks/api/cursorPositionTypes.d.ts +4 -0
- package/types/src/extensions/Blocks/api/inlineContentTypes.d.ts +23 -0
- package/types/src/extensions/Blocks/api/styleTypes.d.ts +22 -0
- package/types/src/extensions/Blocks/nodes/BlockContainer.d.ts +3 -3
- package/types/src/extensions/FormattingToolbar/FormattingToolbarFactoryTypes.d.ts +2 -2
- package/types/src/extensions/SlashMenu/SlashMenuExtension.d.ts +1 -3
- package/types/src/extensions/SlashMenu/SlashMenuItem.d.ts +4 -1
- package/types/src/extensions/SlashMenu/index.d.ts +3 -3
- package/types/src/index.d.ts +4 -2
- package/src/extensions/Blocks/apiTypes.ts +0 -48
package/dist/blocknote.umd.cjs
CHANGED
|
@@ -1,2 +1,51 @@
|
|
|
1
|
-
(function(k,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@tiptap/core"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-italic"),require("@tiptap/extension-strike"),require("@tiptap/extension-text"),require("@tiptap/extension-underline"),require("prosemirror-model"),require("prosemirror-state"),require("prosemirror-view"),require("@tiptap/extension-link"),require("uuid")):typeof define=="function"&&define.amd?define(["exports","@tiptap/core","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-italic","@tiptap/extension-strike","@tiptap/extension-text","@tiptap/extension-underline","prosemirror-model","prosemirror-state","prosemirror-view","@tiptap/extension-link","uuid"],c):(k=typeof globalThis<"u"?globalThis:k||self,c(k.blocknote={},k.core,k.Bold,k.Code,k.DropCursor,k.GapCursor,k.HardBreak,k.extensionHistory,k.Italic,k.Strike,k.Text,k.Underline,k.prosemirrorModel,k.prosemirrorState,k.pv,k.extensionLink,k.uuid))})(this,function(k,c,I,G,K,j,V,W,Y,J,Q,X,T,g,x,R,Z){"use strict";var nt=Object.defineProperty;var rt=(k,c,I)=>c in k?nt(k,c,{enumerable:!0,configurable:!0,writable:!0,value:I}):k[c]=I;var p=(k,c,I)=>(rt(k,typeof c!="symbol"?c+"":c,I),I);const M=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function ee(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const te=M(I),oe=M(G),ne=M(K),re=M(j),ie=M(V),se=M(Y),ae=M(J),de=M(Q),le=M(X),ce=ee(x);function b(t,e){if(e<=0||e>t.nodeSize)return;const o=t.resolve(e),n=o.depth;let r=o.node(n),a=n;for(;a>=0;){if(a===0)return;if(r.type.name==="blockContainer")break;a-=1,r=o.node(a)}const d=r.attrs.id,s=r.firstChild,i=s.type,l=r.childCount===2?r.lastChild.childCount:0,h=o.start(a),u=o.end(a);return{id:d,node:r,contentNode:s,contentType:i,numChildBlocks:l,startPos:h,endPos:u,depth:a}}const D=new g.PluginKey("previous-blocks"),ue={index:"index",level:"level",type:"type",depth:"depth","depth-change":"depth-change"},he=()=>new g.Plugin({key:D,view(t){return{update:async(e,o)=>{var n;((n=this.key)==null?void 0:n.getState(e.state).updatedBlocks.size)>0&&setTimeout(()=>{e.dispatch(e.state.tr.setMeta(D,{clearUpdate:!0}))},0)}}},state:{init(){return{prevTransactionOldBlockAttrs:{},currentTransactionOldBlockAttrs:{},updatedBlocks:new Set}},apply(t,e,o,n){if(e.currentTransactionOldBlockAttrs={},e.updatedBlocks.clear(),!t.docChanged||o.doc.eq(n.doc))return e;const r={},a=c.findChildren(o.doc,i=>i.attrs.id),d=new Map(a.map(i=>[i.node.attrs.id,i])),s=c.findChildren(n.doc,i=>i.attrs.id);for(let i of s){const l=d.get(i.node.attrs.id),h=l==null?void 0:l.node.firstChild,u=i.node.firstChild;if(l&&h&&u){const f={index:u.attrs.index,level:u.attrs.level,type:u.type.name,depth:n.doc.resolve(i.pos).depth};let m={index:h.attrs.index,level:h.attrs.level,type:h.type.name,depth:o.doc.resolve(l.pos).depth};r[i.node.attrs.id]=m,t.getMeta("numberedListIndexing")&&(i.node.attrs.id in e.prevTransactionOldBlockAttrs&&(m=e.prevTransactionOldBlockAttrs[i.node.attrs.id]),f.type==="numberedListItem"&&(m.index=f.index)),e.currentTransactionOldBlockAttrs[i.node.attrs.id]=m,JSON.stringify(m)!==JSON.stringify(f)&&(m["depth-change"]=m.depth-f.depth,e.updatedBlocks.add(i.node.attrs.id))}}return e.prevTransactionOldBlockAttrs=r,e}},props:{decorations(t){const e=this.getState(t);if(e.updatedBlocks.size===0)return;const o=[];return t.doc.descendants((n,r)=>{if(!n.attrs.id||!e.updatedBlocks.has(n.attrs.id))return;const a=e.currentTransactionOldBlockAttrs[n.attrs.id],d={};for(let[i,l]of Object.entries(a))d["data-prev-"+ue[i]]=l||"none";const s=x.Decoration.node(r,r+n.nodeSize,{...d});o.push(s)}),x.DecorationSet.create(t.doc,o)}}}),B={blockOuter:"_blockOuter_1ltqa_5",block:"_block_1ltqa_5",blockContent:"_blockContent_1ltqa_19",blockGroup:"_blockGroup_1ltqa_47",isEmpty:"_isEmpty_1ltqa_232",isFilter:"_isFilter_1ltqa_233",hasAnchor:"_hasAnchor_1ltqa_246"},pe={blockColor:"data-block-color",blockStyle:"data-block-style",id:"data-id",depth:"data-depth",depthChange:"data-depth-change"},fe=c.Node.create({name:"blockContainer",group:"blockContainer",content:"blockContent blockGroup?",priority:50,defining:!0,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"div",getAttrs:t=>{if(typeof t=="string")return!1;const e={};for(let[o,n]of Object.entries(pe))t.getAttribute(n)&&(e[o]=t.getAttribute(n));return t.getAttribute("data-node-type")==="blockContainer"?e:!1}}]},renderHTML({HTMLAttributes:t}){return["div",c.mergeAttributes(t,{class:B.blockOuter,"data-node-type":"block-outer"}),["div",c.mergeAttributes(t,{class:B.block,"data-node-type":this.name}),0]]},addCommands(){return{BNCreateBlock:t=>({state:e,dispatch:o})=>{const n=e.schema.nodes.blockContainer.createAndFill();return o&&e.tr.insert(t,n),!0},BNDeleteBlock:t=>({state:e,view:o,dispatch:n})=>{const r=b(e.doc,t);if(r===void 0)return!1;const{startPos:a,endPos:d}=r;return n&&(e.tr.deleteRange(a,d),e.tr.setSelection(new g.TextSelection(e.doc.resolve(a+1))),o.focus()),!0},BNMergeBlocks:t=>({state:e,dispatch:o})=>{const n=e.doc.resolve(t+1).node().type.name==="blockContainer",r=e.doc.resolve(t-1).node().type.name==="blockContainer";if(!n||!r)return!1;const a=b(e.doc,t+1),{node:d,contentNode:s,startPos:i,endPos:l,depth:h}=a;if(d.childCount===2){const m=e.doc.resolve(i+s.nodeSize+1),y=e.doc.resolve(l-1),C=m.blockRange(y);o&&e.tr.lift(C,h-1)}let u=t-1,f=b(e.doc,u);for(;f.numChildBlocks>0;)if(u--,f=b(e.doc,u),f===void 0)return!1;return o&&(e.tr.deleteRange(i,i+s.nodeSize),e.tr.insertText(s.textContent,u-1),e.tr.setSelection(new g.TextSelection(e.doc.resolve(u-1)))),!0},BNSplitBlock:(t,e)=>({state:o,dispatch:n})=>{const r=b(o.doc,t);if(r===void 0)return!1;const{contentNode:a,contentType:d,startPos:s,endPos:i,depth:l}=r,h=o.doc.cut(s+1,t),u=o.doc.cut(t,i-1),f=o.schema.nodes.blockContainer.createAndFill(),m=i+1,y=m+2;return n&&(o.tr.insert(m,f),o.tr.replace(y,y+1,u.content.size>0?new T.Slice(T.Fragment.from(u),l+2,l+2):void 0),e&&o.tr.setBlockType(y,y,o.schema.node(d).type,a.attrs),o.tr.setSelection(new g.TextSelection(o.doc.resolve(y))),o.tr.replace(s+1,i-1,h.content.size>0?new T.Slice(T.Fragment.from(h),l+2,l+2):void 0)),!0},BNUpdateBlock:(t,e)=>({state:o,dispatch:n})=>{const r=b(o.doc,t);if(r===void 0)return!1;const{node:a,startPos:d,contentNode:s}=r;return n&&o.tr.setBlockType(d+1,d+s.nodeSize+1,o.schema.node(e.type).type,{...a.attrs,...e.props}),!0},BNCreateOrUpdateBlock:(t,e)=>({state:o,chain:n})=>{const r=b(o.doc,t);if(r===void 0)return!1;const{node:a,startPos:d,endPos:s}=r;if(a.textContent.length===0){const i=d+1;return n().BNUpdateBlock(t,e).setTextSelection(i).run()}else{const i=s+1,l=i+1;return n().BNCreateBlock(i).BNUpdateBlock(l,e).setTextSelection(l).run()}}}},addProseMirrorPlugins(){return[he()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.undoInputRule(),()=>o.command(({state:n})=>{const{contentType:r}=b(n.doc,n.selection.from),a=n.selection.$anchor.parentOffset===0,d=r.name==="paragraph";return a&&!d?o.BNUpdateBlock(n.selection.from,{type:"paragraph",props:{}}):!1}),()=>o.command(({state:n})=>n.selection.$anchor.parentOffset===0?o.liftListItem("blockContainer"):!1),()=>o.command(({state:n})=>{const{depth:r,startPos:a}=b(n.doc,n.selection.from),d=n.selection.$anchor.parentOffset===0,s=n.selection.anchor===n.selection.head,i=a===2,l=a-1;return!i&&d&&s&&r===2?o.BNMergeBlocks(l):!1})]),Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.command(({state:n})=>{const{node:r,depth:a}=b(n.doc,n.selection.from),d=n.selection.$anchor.parentOffset===0,s=n.selection.anchor===n.selection.head,i=r.textContent.length===0,l=a>2;return d&&s&&i&&l?o.liftListItem("blockContainer"):!1}),()=>o.command(({state:n,chain:r})=>{const{node:a,endPos:d}=b(n.doc,n.selection.from),s=n.selection.$anchor.parentOffset===0,i=n.selection.anchor===n.selection.head,l=a.textContent.length===0;if(s&&i&&l){const h=d+1,u=h+2;return r().BNCreateBlock(h).setTextSelection(u).run(),!0}return!1}),()=>o.command(({state:n,chain:r})=>{const{node:a}=b(n.doc,n.selection.from);return a.textContent.length===0?!1:(r().deleteSelection().BNSplitBlock(n.selection.from,!1).run(),!0)})]),Tab:()=>(this.editor.commands.sinkListItem("blockContainer"),!0),"Shift-Tab":()=>(this.editor.commands.liftListItem("blockContainer"),!0),"Mod-Alt-0":()=>this.editor.commands.BNCreateBlock(this.editor.state.selection.anchor+2),"Mod-Alt-1":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"1"}}),"Mod-Alt-2":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"2"}}),"Mod-Alt-3":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"3"}}),"Mod-Shift-7":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"bulletListItem",props:{}}),"Mod-Shift-8":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"numberedListItem",props:{}})}}}),me=c.Node.create({name:"blockGroup",group:"blockGroup",content:"blockContainer+",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"div",getAttrs:t=>typeof t=="string"?!1:t.getAttribute("data-node-type")==="blockGroup"?null:!1}]},renderHTML({HTMLAttributes:t}){return["div",c.mergeAttributes(this.options.HTMLAttributes,t,{class:B.blockGroup,"data-node-type":"blockGroup"}),0]}}),ke=c.Node.create({name:"paragraph",group:"blockContent",content:"inline*",parseHTML(){return[{tag:"p",priority:200,node:"blockContainer"}]},renderHTML({HTMLAttributes:t}){return["div",c.mergeAttributes(t,{class:B.blockContent,"data-content-type":this.name}),["p",0]]}}),ge=c.Node.create({name:"heading",group:"blockContent",content:"inline*",addAttributes(){return{level:{default:"1",parseHTML:t=>t.getAttribute("data-level"),renderHTML:t=>({"data-level":t.level})}}},addInputRules(){return[...["1","2","3"].map(t=>new c.InputRule({find:new RegExp(`^(#{${parseInt(t)}})\\s$`),handler:({state:e,chain:o,range:n})=>{o().BNUpdateBlock(e.selection.from,{type:"heading",props:{level:t}}).deleteRange({from:n.from,to:n.to})}}))]},parseHTML(){return[{tag:"h1",attrs:{level:"1"},node:"blockContainer"},{tag:"h2",attrs:{level:"2"},node:"blockContainer"},{tag:"h3",attrs:{level:"3"},node:"blockContainer"}]},renderHTML({node:t,HTMLAttributes:e}){return["div",c.mergeAttributes(e,{class:B.blockContent,"data-content-type":this.name}),["h"+t.attrs.level,0]]}}),F=t=>{const{node:e,contentType:o}=b(t.state.doc,t.state.selection.from),n=t.state.selection.anchor===t.state.selection.head;return!o.name.endsWith("ListItem")||!n?!1:t.commands.first(({state:r,chain:a,commands:d})=>[()=>d.command(()=>e.textContent.length===0?d.BNUpdateBlock(r.selection.from,{type:"paragraph",props:{}}):!1),()=>d.command(()=>e.textContent.length>0?(a().deleteSelection().BNSplitBlock(r.selection.from,!0).run(),!0):!1)])},be=c.Node.create({name:"bulletListItem",group:"blockContent",content:"inline*",addInputRules(){return[new c.InputRule({find:new RegExp("^[-+*]\\s$"),handler:({state:t,chain:e,range:o})=>{e().BNUpdateBlock(t.selection.from,{type:"bulletListItem",props:{}}).deleteRange({from:o.from,to:o.to})}})]},addKeyboardShortcuts(){return{Enter:()=>F(this.editor)}},parseHTML(){return[{tag:"li",getAttrs:t=>{if(typeof t=="string")return!1;const e=t.parentElement;return e===null?!1:e.getAttribute("data-content-type")==="bulletListItem"?{}:e.tagName==="UL"?{}:!1},node:"blockContainer"}]},renderHTML({HTMLAttributes:t}){return["div",c.mergeAttributes(t,{class:B.blockContent,"data-content-type":this.name}),["li",0]]}}),ye=new g.PluginKey("numbered-list-indexing"),ve=()=>new g.Plugin({key:ye,appendTransaction:(t,e,o)=>{const n=o.tr;n.setMeta("numberedListIndexing",!0);let r=!1;return o.doc.descendants((a,d)=>{if(a.type.name==="blockContainer"&&a.firstChild.type.name==="numberedListItem"){let s="1";const i=d===1,l=b(n.doc,d+1);if(l===void 0)return;if(!i){const f=b(n.doc,d-2);if(f===void 0)return;if(!(l.depth!==f.depth)){const y=f.contentNode;if(f.contentType.name==="numberedListItem"){const O=y.attrs.index;s=(parseInt(O)+1).toString()}}}l.contentNode.attrs.index!==s&&(r=!0,n.setNodeMarkup(d+1,void 0,{index:s}))}}),r?n:null}}),Ce=c.Node.create({name:"numberedListItem",group:"blockContent",content:"inline*",addAttributes(){return{index:{default:null,parseHTML:t=>t.getAttribute("data-index"),renderHTML:t=>({"data-index":t.index})}}},addInputRules(){return[new c.InputRule({find:new RegExp("^1\\.\\s$"),handler:({state:t,chain:e,range:o})=>{e().BNUpdateBlock(t.selection.from,{type:"numberedListItem",props:{}}).deleteRange({from:o.from,to:o.to})}})]},addKeyboardShortcuts(){return{Enter:()=>F(this.editor)}},addProseMirrorPlugins(){return[ve()]},parseHTML(){return[{tag:"li",getAttrs:t=>{if(typeof t=="string")return!1;const e=t.parentElement;return e===null?!1:e.getAttribute("data-content-type")==="numberedListItem"?{}:e.tagName==="OL"?{}:!1},node:"blockContainer"}]},renderHTML({HTMLAttributes:t}){return["div",c.mergeAttributes(t,{class:B.blockContent,"data-content-type":this.name}),["li",0]]}}),Be=[ke,ge,be,Ce,fe,me,c.Node.create({name:"doc",topNode:!0,content:"blockGroup"})];class xe{constructor({editor:e,formattingToolbarFactory:o,view:n,shouldShow:r}){p(this,"editor");p(this,"view");p(this,"formattingToolbar");p(this,"preventHide",!1);p(this,"preventShow",!1);p(this,"toolbarIsOpen",!1);p(this,"shouldShow",({view:e,state:o,from:n,to:r})=>{const{doc:a,selection:d}=o,{empty:s}=d,i=!a.textBetween(n,r).length&&c.isTextSelection(o.selection);return!(!e.hasFocus()||s||i)});p(this,"viewMousedownHandler",()=>{this.preventShow=!0});p(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.editor.view))});p(this,"dragstartHandler",()=>{this.formattingToolbar.hide(),this.toolbarIsOpen=!1});p(this,"focusHandler",()=>{setTimeout(()=>this.update(this.editor.view))});p(this,"blurHandler",({event:e})=>{var o,n;if(this.preventHide){this.preventHide=!1;return}(e==null?void 0:e.relatedTarget)&&((n=(o=this.formattingToolbar.element)==null?void 0:o.parentNode)==null?void 0:n.contains(e.relatedTarget))||this.toolbarIsOpen&&(this.formattingToolbar.hide(),this.toolbarIsOpen=!1)});this.editor=e,this.view=n,this.formattingToolbar=o(this.getStaticParams()),r&&(this.shouldShow=r),this.view.dom.addEventListener("mousedown",this.viewMousedownHandler),this.view.dom.addEventListener("mouseup",this.viewMouseupHandler),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler)}update(e,o){var f;const{state:n,composing:r}=e,{doc:a,selection:d}=n,s=o&&o.doc.eq(a)&&o.selection.eq(d);if(r||s)return;const{ranges:i}=d,l=Math.min(...i.map(m=>m.$from.pos)),h=Math.max(...i.map(m=>m.$to.pos)),u=(f=this.shouldShow)==null?void 0:f.call(this,{editor:this.editor,view:e,state:n,oldState:o,from:l,to:h});if(!this.toolbarIsOpen&&!this.preventShow&&(u||this.preventHide)){this.formattingToolbar.render(this.getDynamicParams(),!0),this.toolbarIsOpen=!0,this.formattingToolbar.element.addEventListener("mousedown",m=>m.preventDefault());return}if(this.toolbarIsOpen&&!this.preventShow&&(u||this.preventHide)){this.formattingToolbar.render(this.getDynamicParams(),!1);return}if(this.toolbarIsOpen&&!this.preventHide&&(!u||this.preventShow)){this.formattingToolbar.hide(),this.toolbarIsOpen=!1,this.formattingToolbar.element.removeEventListener("mousedown",m=>m.preventDefault());return}}destroy(){this.view.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.view.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}getSelectionBoundingBox(){const{state:e}=this.editor.view,{selection:o}=e,{ranges:n}=o,r=Math.min(...n.map(d=>d.$from.pos)),a=Math.max(...n.map(d=>d.$to.pos));if(c.isNodeSelection(o)){const d=this.editor.view.nodeDOM(r);if(d)return d.getBoundingClientRect()}return c.posToDOMRect(this.editor.view,r,a)}getStaticParams(){return{toggleBold:()=>{this.editor.view.focus(),this.editor.commands.toggleBold()},toggleItalic:()=>{this.editor.view.focus(),this.editor.commands.toggleItalic()},toggleUnderline:()=>{this.editor.view.focus(),this.editor.commands.toggleUnderline()},toggleStrike:()=>{this.editor.view.focus(),this.editor.commands.toggleStrike()},setHyperlink:(e,o)=>{if(e==="")return;let{from:n,to:r}=this.editor.state.selection;o||(o=this.editor.state.doc.textBetween(n,r));const a=this.editor.schema.mark("link",{href:e});this.editor.view.dispatch(this.editor.view.state.tr.insertText(o,n,r).addMark(n,n+o.length,a)),this.editor.view.focus()},setTextColor:e=>{this.editor.view.focus(),this.editor.commands.setTextColor(e)},setBackgroundColor:e=>{this.editor.view.focus(),this.editor.commands.setBackgroundColor(e)},setTextAlignment:e=>{this.editor.view.focus(),this.editor.commands.setTextAlignment(e)},increaseBlockIndent:()=>{this.editor.view.focus(),this.editor.commands.sinkListItem("blockContainer")},decreaseBlockIndent:()=>{this.editor.view.focus(),this.editor.commands.liftListItem("blockContainer")},updateBlock:e=>{this.editor.view.focus(),this.editor.commands.BNUpdateBlock(this.editor.state.selection.from,e)}}}getDynamicParams(){const e=b(this.editor.state.doc,this.editor.state.selection.from);return{boldIsActive:this.editor.isActive("bold"),italicIsActive:this.editor.isActive("italic"),underlineIsActive:this.editor.isActive("underline"),strikeIsActive:this.editor.isActive("strike"),hyperlinkIsActive:this.editor.isActive("link"),activeHyperlinkUrl:this.editor.getAttributes("link").href||"",activeHyperlinkText:this.editor.state.doc.textBetween(this.editor.state.selection.from,this.editor.state.selection.to),textColor:this.editor.getAttributes("textColor").color||"default",backgroundColor:this.editor.getAttributes("backgroundColor").color||"default",textAlignment:this.editor.getAttributes(e.contentType).textAlignment||"left",canIncreaseBlockIndent:this.editor.state.doc.resolve(e.startPos).index(e.depth-1)>0,canDecreaseBlockIndent:e.depth>2,block:{type:e.contentType.name,props:e.contentNode.attrs},referenceRect:this.getSelectionBoundingBox()}}}const Me=t=>new g.Plugin({key:new g.PluginKey("FormattingToolbarPlugin"),view:e=>new xe({view:e,...t})}),Te=c.Extension.create({name:"FormattingToolbarExtension",addProseMirrorPlugins(){if(!this.options.formattingToolbarFactory)throw new Error("UI Element factory not defined for FormattingToolbarExtension");return[Me({editor:this.editor,formattingToolbarFactory:this.options.formattingToolbarFactory,pluginKey:new g.PluginKey("FormattingToolbarPlugin")})]}}),N={bnEditor:"_bnEditor_xixap_3",bnRoot:"_bnRoot_xixap_13",dragPreview:"_dragPreview_xixap_27"},we=c.findParentNode(t=>t.type.name==="blockContainer");function S(){return{active:!1,triggerCharacter:void 0,queryStartPos:void 0,items:[],keyboardHoveredItemIndex:void 0,notFoundCount:0,decorationId:void 0}}class Ie{constructor({editor:e,pluginKey:o,onSelectItem:n=()=>{},suggestionsMenuFactory:r}){p(this,"editor");p(this,"pluginKey");p(this,"suggestionsMenu");p(this,"pluginState");p(this,"itemCallback");this.editor=e,this.pluginKey=o,this.pluginState=S(),this.itemCallback=a=>n({item:a,editor:e,range:{from:this.pluginState.queryStartPos-this.pluginState.triggerCharacter.length,to:e.state.selection.from}}),this.suggestionsMenu=r(this.getStaticParams())}update(e,o){const n=this.pluginKey.getState(o),r=this.pluginKey.getState(e.state),a=!n.active&&r.active,d=n.active&&!r.active,s=n.active&&r.active;!a&&!s&&!d||(this.pluginState=d?n:r,d&&(this.suggestionsMenu.hide(),this.suggestionsMenu.element.removeEventListener("mousedown",i=>i.preventDefault())),s&&this.suggestionsMenu.render(this.getDynamicParams(),!1),a&&(this.suggestionsMenu.render(this.getDynamicParams(),!0),this.suggestionsMenu.element.addEventListener("mousedown",i=>i.preventDefault())))}getStaticParams(){return{itemCallback:e=>this.itemCallback(e)}}getDynamicParams(){const e=document.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);return{items:this.pluginState.items,keyboardHoveredItemIndex:this.pluginState.keyboardHoveredItemIndex,referenceRect:e.getBoundingClientRect()}}}function Pe({pluginKey:t,editor:e,defaultTriggerCharacter:o,suggestionsMenuFactory:n,onSelectItem:r=()=>{},items:a=()=>[]}){if(o.length!==1)throw new Error("'char' should be a single character");const d=s=>{s.dispatch(s.state.tr.setMeta(t,{deactivate:!0}))};return new g.Plugin({key:t,view:s=>new Ie({editor:e,pluginKey:t,onSelectItem:i=>{d(s),r(i)},suggestionsMenuFactory:n}),state:{init(){return S()},apply(s,i,l,h){var f,m,y,C;if(s.getMeta("orderedListIndexing")!==void 0)return i;if((f=s.getMeta(t))!=null&&f.activate)return{active:!0,triggerCharacter:((m=s.getMeta(t))==null?void 0:m.triggerCharacter)||"",queryStartPos:h.selection.from,items:a(""),keyboardHoveredItemIndex:0,notFoundCount:0,decorationId:`id_${Math.floor(Math.random()*4294967295)}`};if(!i.active)return i;const u={...i};if(u.items=a(h.doc.textBetween(i.queryStartPos,h.selection.from)),u.notFoundCount=0,u.items.length===0&&(u.notFoundCount=Math.max(0,i.notFoundCount+(h.selection.from-l.selection.from))),h.selection.from!==h.selection.to||((y=s.getMeta(t))==null?void 0:y.deactivate)||s.getMeta("focus")||s.getMeta("blur")||s.getMeta("pointer")||i.active&&h.selection.from<i.queryStartPos||u.notFoundCount>3)return S();if(((C=s.getMeta(t))==null?void 0:C.selectedItemIndexChanged)!==void 0){let v=s.getMeta(t).selectedItemIndexChanged;v<0?v=i.items.length-1:v>=i.items.length&&(v=0),u.keyboardHoveredItemIndex=v}return u}},props:{handleKeyDown(s,i){const l=this.getState(s.state).active;if(i.key===o&&!l)return s.dispatch(s.state.tr.insertText(o).scrollIntoView().setMeta(t,{activate:!0,triggerCharacter:o})),!0;if(!l)return!1;const{triggerCharacter:h,queryStartPos:u,items:f,keyboardHoveredItemIndex:m}=t.getState(s.state);return i.key==="ArrowUp"?(s.dispatch(s.state.tr.setMeta(t,{selectedItemIndexChanged:m-1})),!0):i.key==="ArrowDown"?(s.dispatch(s.state.tr.setMeta(t,{selectedItemIndexChanged:m+1})),!0):i.key==="Enter"?(d(s),r({item:f[m],editor:e,range:{from:u-h.length,to:s.state.selection.from}}),!0):i.key==="Escape"?(d(s),!0):!1},handleClick(s){d(s)},decorations(s){const{active:i,decorationId:l,queryStartPos:h,triggerCharacter:u}=this.getState(s);if(!i)return null;if(u===""){const f=we(s.selection);if(f)return x.DecorationSet.create(s.doc,[x.Decoration.node(f.pos,f.pos+f.node.nodeSize,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":l})])}return x.DecorationSet.create(s.doc,[x.Decoration.inline(h-u.length,h,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":l})])}}})}class P{constructor(e,o,n=[]){this.name=e,this.execute=o,this.aliases=n}match(e){return this.name.toLowerCase().startsWith(e.toLowerCase())||this.aliases.filter(o=>o.toLowerCase().startsWith(e.toLowerCase())).length!==0}}const Ae={heading:new P("Heading",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"heading",props:{level:"1"}}).run(),["h","heading1","h1"]),heading2:new P("Heading 2",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"heading",props:{level:"2"}}).run(),["h2","heading2","subheading"]),heading3:new P("Heading 3",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"heading",props:{level:"3"}}).run(),["h3","heading3","subheading"]),numberedList:new P("Numbered List",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"numberedListItem",props:{}}).run(),["li","list","numberedlist","numbered list"]),bulletList:new P("Bullet List",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"bulletListItem",props:{}}).run(),["ul","list","bulletlist","bullet list"]),paragraph:new P("Paragraph",(t,e)=>t.chain().focus().deleteRange(e).BNCreateOrUpdateBlock(e.from,{type:"paragraph",props:{}}).run(),["p"])},L=new g.PluginKey("suggestions-slash-commands"),Ee=c.Extension.create({name:"slash-command",addOptions(){return{commands:Ae,slashMenuFactory:void 0}},addProseMirrorPlugins(){if(!this.options.slashMenuFactory)throw new Error("UI Element factory not defined for SlashMenuExtension");return[Pe({pluginKey:L,editor:this.editor,defaultTriggerCharacter:"/",suggestionsMenuFactory:this.options.slashMenuFactory,items:t=>{const e=[];for(const o in this.options.commands)e.push(this.options.commands[o]);return e.filter(o=>o.match(t))},onSelectItem:({item:t,editor:e,range:o})=>{t.execute(e,o)}})]}});class E extends g.Selection{constructor(o,n){super(o,n);p(this,"nodes");const r=o.node();this.nodes=[],o.doc.nodesBetween(o.pos,n.pos,(a,d,s)=>{if(s!==null&&s.eq(r))return this.nodes.push(a),!1})}static create(o,n,r=n){return new E(o.resolve(n),o.resolve(r))}content(){return new T.Slice(T.Fragment.from(this.nodes),0,0)}eq(o){if(!(o instanceof E)||this.nodes.length!==o.nodes.length||this.from!==o.from||this.to!==o.to)return!1;for(let n=0;n<this.nodes.length;n++)if(!this.nodes[n].eq(o.nodes[n]))return!1;return!0}map(o,n){let r=n.mapResult(this.from),a=n.mapResult(this.to);return a.deleted?g.Selection.near(o.resolve(r.pos)):r.deleted?g.Selection.near(o.resolve(a.pos)):new E(o.resolve(r.pos),o.resolve(a.pos))}toJSON(){return{type:"node",anchor:this.anchor,head:this.head}}}const He=ce.__serializeForClipboard;let A;function U(t,e){var r;let o=e.posAtCoords(t);if(!o)return;let n=e.domAtPos(o.pos).node;if(n!==e.dom){for(;n&&n.parentNode&&n.parentNode!==e.dom&&!((r=n.hasAttribute)!=null&&r.call(n,"data-id"));)n=n.parentNode;if(!!n)return{node:n,id:n.getAttribute("data-id")}}}function Ne(t,e){let o=U(t,e);if(o&&o.node.nodeType===1){const n=e.docView;let r=n.nearestDesc(o.node,!0);return!r||r===n?null:r.posBefore}return null}function Se(t,e){let o,n;const r=e.resolve(t.from).node().type.spec.group==="blockContent",a=e.resolve(t.to).node().type.spec.group==="blockContent",d=Math.min(t.$anchor.depth,t.$head.depth);if(r&&a){const s=t.$from.start(d-1),i=t.$to.end(d-1);o=e.resolve(s-1).pos,n=e.resolve(i+1).pos}else o=t.from,n=t.to;return{from:o,to:n}}function q(t,e,o=e){e===o&&(o+=t.state.doc.resolve(e+1).node().nodeSize);const n=t.domAtPos(e).node.cloneNode(!0),r=t.domAtPos(e).node,a=(i,l)=>Array.prototype.indexOf.call(i.children,l),d=a(r,t.domAtPos(e+1).node.parentElement),s=a(r,t.domAtPos(o-1).node.parentElement);for(let i=r.childElementCount-1;i>=0;i--)(i>s||i<d)&&n.removeChild(n.children[i]);A=n,A.className=N.dragPreview,document.body.appendChild(A)}function Le(){A!==void 0&&(document.body.removeChild(A),A=void 0)}function Oe(t,e){if(!t.dataTransfer)return;const o=e.dom.getBoundingClientRect();let n={left:o.left+o.width/2,top:t.clientY},r=Ne(n,e);if(r!=null){const a=e.state.selection,d=e.state.doc,{from:s,to:i}=Se(a,d),l=s<=r&&r<i,h=!a.$anchor.node().eq(a.$head.node());l&&h?(e.dispatch(e.state.tr.setSelection(E.create(d,s,i))),q(e,s,i)):(e.dispatch(e.state.tr.setSelection(g.NodeSelection.create(e.state.doc,r))),q(e,r));let u=e.state.selection.content(),{dom:f,text:m}=He(e,u);t.dataTransfer.clearData(),t.dataTransfer.setData("text/html",f.innerHTML),t.dataTransfer.setData("text/plain",m),t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(A,0,0),e.dragging={slice:u,move:!0}}}class _e{constructor({editor:e,blockMenuFactory:o,horizontalPosAnchoredAtRoot:n}){p(this,"editor");p(this,"horizontalPosAnchoredAtRoot");p(this,"horizontalPosAnchor");p(this,"blockMenu");p(this,"hoveredBlockContent");p(this,"menuOpen",!1);p(this,"menuFrozen",!1);this.editor=e,this.horizontalPosAnchoredAtRoot=n,this.horizontalPosAnchor=e.view.dom.firstChild.getBoundingClientRect().x,this.blockMenu=o(this.getStaticParams()),document.body.addEventListener("mousemove",r=>{var l,h;if(this.menuFrozen)return;const a=this.editor.view.dom.firstChild.getBoundingClientRect();this.horizontalPosAnchor=a.x;const d={left:a.left+a.width/2,top:r.clientY},s=U(d,this.editor.view);if(!s){this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide());return}if(this.menuOpen&&((l=this.hoveredBlockContent)==null?void 0:l.hasAttribute("data-id"))&&((h=this.hoveredBlockContent)==null?void 0:h.getAttribute("data-id"))===s.id)return;const i=s.node.firstChild;this.hoveredBlockContent=i,i&&(this.menuOpen?this.blockMenu.render(this.getDynamicParams(),!1):(this.menuOpen=!0,this.blockMenu.render(this.getDynamicParams(),!0)))},!0),document.body.addEventListener("mousedown",r=>{var a;(a=this.blockMenu.element)!=null&&a.contains(r.target)||(this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide()),this.menuFrozen=!1)},!0),document.body.addEventListener("keydown",()=>{this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide()),this.menuFrozen=!1},!0)}destroy(){this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide())}addBlock(){this.menuOpen=!1,this.menuFrozen=!0,this.blockMenu.hide();const e=this.hoveredBlockContent.getBoundingClientRect(),o=this.editor.view.posAtCoords({left:e.left+e.width/2,top:e.top+e.height/2});if(!o)return;const n=b(this.editor.state.doc,o.pos);if(n===void 0)return;const{contentNode:r,endPos:a}=n;if(r.textContent.length!==0){const d=a+1,s=d+2;this.editor.chain().BNCreateBlock(d).BNUpdateBlock(s,{type:"paragraph",props:{}}).setTextSelection(s).run()}else this.editor.commands.setTextSelection(a);this.editor.view.focus(),this.editor.view.dispatch(this.editor.view.state.tr.scrollIntoView().setMeta(L,{activate:!0,type:"drag"}))}deleteBlock(){this.menuOpen=!1,this.blockMenu.hide();const e=this.hoveredBlockContent.getBoundingClientRect(),o=this.editor.view.posAtCoords({left:e.left+e.width/2,top:e.top+e.height/2});!o||this.editor.commands.BNDeleteBlock(o.pos)}setBlockBackgroundColor(e){this.menuOpen=!1,this.blockMenu.hide();const o=this.hoveredBlockContent.getBoundingClientRect(),n=this.editor.view.posAtCoords({left:o.left+o.width/2,top:o.top+o.height/2});!n||this.editor.commands.setBlockBackgroundColor(n.pos,e)}setBlockTextColor(e){this.menuOpen=!1,this.blockMenu.hide();const o=this.hoveredBlockContent.getBoundingClientRect(),n=this.editor.view.posAtCoords({left:o.left+o.width/2,top:o.top+o.height/2});!n||this.editor.commands.setBlockTextColor(n.pos,e)}getStaticParams(){return{addBlock:()=>this.addBlock(),deleteBlock:()=>this.deleteBlock(),blockDragStart:e=>Oe(e,this.editor.view),blockDragEnd:()=>Le(),freezeMenu:()=>{this.menuFrozen=!0},unfreezeMenu:()=>{this.menuFrozen=!1},setBlockBackgroundColor:e=>this.setBlockBackgroundColor(e),setBlockTextColor:e=>this.setBlockTextColor(e)}}getDynamicParams(){const e=this.hoveredBlockContent.getBoundingClientRect();return{blockBackgroundColor:this.editor.getAttributes("blockContainer").backgroundColor,blockTextColor:this.editor.getAttributes("blockContainer").textColor,referenceRect:new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:e.x,e.y,e.width,e.height)}}}const Re=t=>new g.Plugin({key:new g.PluginKey("DraggableBlocksPlugin"),view:()=>new _e({editor:t.editor,blockMenuFactory:t.blockSideMenuFactory,horizontalPosAnchoredAtRoot:!0})}),De=c.Extension.create({name:"DraggableBlocksExtension",priority:1e3,addProseMirrorPlugins(){if(!this.options.blockSideMenuFactory)throw new Error("UI Element factory not defined for DraggableBlocksExtension");return[Re({editor:this.editor,blockSideMenuFactory:this.options.blockSideMenuFactory})]}}),Fe=new g.PluginKey("HyperlinkToolbarPlugin");class Ue{constructor({editor:e,hyperlinkToolbarFactory:o}){p(this,"editor");p(this,"hyperlinkToolbar");p(this,"menuUpdateTimer");p(this,"startMenuUpdateTimer");p(this,"stopMenuUpdateTimer");p(this,"mouseHoveredHyperlinkMark");p(this,"mouseHoveredHyperlinkMarkRange");p(this,"keyboardHoveredHyperlinkMark");p(this,"keyboardHoveredHyperlinkMarkRange");p(this,"hyperlinkMark");p(this,"hyperlinkMarkRange");this.editor=e,this.hyperlinkToolbar=o(this.getStaticParams()),this.startMenuUpdateTimer=()=>{this.menuUpdateTimer=setTimeout(()=>{this.update()},250)},this.stopMenuUpdateTimer=()=>(this.menuUpdateTimer&&(clearTimeout(this.menuUpdateTimer),this.menuUpdateTimer=void 0),!1),e.view.dom.addEventListener("mouseover",n=>{if(this.mouseHoveredHyperlinkMark=void 0,this.mouseHoveredHyperlinkMarkRange=void 0,this.stopMenuUpdateTimer(),n.target instanceof HTMLAnchorElement&&n.target.nodeName==="A"){const r=n.target,a=e.view.posAtDOM(r,0)+1,d=e.state.doc.resolve(a),s=d.marks();for(const i of s)if(i.type.name===e.schema.mark("link").type.name){this.mouseHoveredHyperlinkMark=i,this.mouseHoveredHyperlinkMarkRange=c.getMarkRange(d,i.type,i.attrs)||void 0;break}}return this.startMenuUpdateTimer(),!1})}update(){var o,n,r,a;if(!this.editor.view.hasFocus())return;const e=this.hyperlinkMark;if(this.hyperlinkMark=void 0,this.hyperlinkMarkRange=void 0,this.keyboardHoveredHyperlinkMark=void 0,this.keyboardHoveredHyperlinkMarkRange=void 0,this.editor.state.selection.empty){const d=this.editor.state.selection.$from.marks();for(const s of d)if(s.type.name===this.editor.schema.mark("link").type.name){this.keyboardHoveredHyperlinkMark=s,this.keyboardHoveredHyperlinkMarkRange=c.getMarkRange(this.editor.state.selection.$from,s.type,s.attrs)||void 0;break}}if(this.mouseHoveredHyperlinkMark&&(this.hyperlinkMark=this.mouseHoveredHyperlinkMark,this.hyperlinkMarkRange=this.mouseHoveredHyperlinkMarkRange),this.keyboardHoveredHyperlinkMark&&(this.hyperlinkMark=this.keyboardHoveredHyperlinkMark,this.hyperlinkMarkRange=this.keyboardHoveredHyperlinkMarkRange),this.hyperlinkMark){if(this.getDynamicParams(),!e){this.hyperlinkToolbar.render(this.getDynamicParams(),!0),(o=this.hyperlinkToolbar.element)==null||o.addEventListener("mouseleave",this.startMenuUpdateTimer),(n=this.hyperlinkToolbar.element)==null||n.addEventListener("mouseenter",this.stopMenuUpdateTimer);return}this.hyperlinkToolbar.render(this.getDynamicParams(),!1);return}if(!this.hyperlinkMark&&e){(r=this.hyperlinkToolbar.element)==null||r.removeEventListener("mouseleave",this.startMenuUpdateTimer),(a=this.hyperlinkToolbar.element)==null||a.removeEventListener("mouseenter",this.stopMenuUpdateTimer),this.hyperlinkToolbar.hide();return}}getStaticParams(){return{editHyperlink:(e,o)=>{const n=this.editor.view.state.tr.insertText(o,this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to);n.addMark(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.from+o.length,this.editor.schema.mark("link",{href:e})),this.editor.view.dispatch(n),this.editor.view.focus(),this.hyperlinkToolbar.hide()},deleteHyperlink:()=>{this.editor.view.dispatch(this.editor.view.state.tr.removeMark(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to,this.hyperlinkMark.type).setMeta("preventAutolink",!0)),this.editor.view.focus(),this.hyperlinkToolbar.hide()}}}getDynamicParams(){return{url:this.hyperlinkMark.attrs.href,text:this.editor.view.state.doc.textBetween(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to),referenceRect:c.posToDOMRect(this.editor.view,this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to)}}}const qe=(t,e)=>new g.Plugin({key:Fe,view:()=>new Ue({editor:t,hyperlinkToolbarFactory:e.hyperlinkToolbarFactory})}),ze=R.Link.extend({priority:500,addProseMirrorPlugins(){var t;if(!this.options.hyperlinkToolbarFactory)throw new Error("UI Element factory not defined for HyperlinkMark");return[...((t=this.parent)==null?void 0:t.call(this))||[],qe(this.editor,{hyperlinkToolbarFactory:this.options.hyperlinkToolbarFactory})]}}),$e=new g.PluginKey("blocknote-placeholder"),Ge=c.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",isFilterClass:"is-filter",hasAnchorClass:"has-anchor",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new g.Plugin({key:$e,props:{decorations:t=>{const{doc:e,selection:o}=t,n=L.getState(t),r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:a}=o,d=[];if(!!r)return e.descendants((s,i)=>{const l=a>=i&&a<=i+s.nodeSize,h=!s.isLeaf&&!s.childCount;if((l||!this.options.showOnlyCurrent)&&h){const u=[this.options.emptyNodeClass];this.editor.isEmpty&&u.push(this.options.emptyEditorClass),l&&u.push(this.options.hasAnchorClass),(n==null?void 0:n.triggerCharacter)===""&&(n==null?void 0:n.active)&&u.push(this.options.isFilterClass);const f=x.Decoration.node(i,i+s.nodeSize,{class:u.join(" ")});d.push(f)}return this.options.includeChildren}),x.DecorationSet.create(e,d)}}})]}}),Ke=c.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const t=new g.PluginKey(this.name);return[new g.Plugin({key:t,appendTransaction:(e,o,n)=>{const{doc:r,tr:a,schema:d}=n,s=t.getState(n),i=r.content.size-2,l=d.nodes.blockContainer,h=d.nodes.paragraph;if(!!s)return a.insert(i,l.create(void 0,h.create()))},state:{init:(e,o)=>{},apply:(e,o)=>{if(!e.docChanged)return o;let n=e.doc.lastChild;if(!n||n.type.name!=="blockGroup")throw new Error("Expected blockGroup");if(n=n.lastChild,!n||n.type.name!=="blockContainer")throw new Error("Expected blockContainer");return n.nodeSize>4}}})]}});function je(t,e=JSON.stringify){const o={};return t.filter(n=>{const r=e(n);return Object.prototype.hasOwnProperty.call(o,r)?!1:o[r]=!0})}function Ve(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return je(e)}const We=c.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>window.__TEST_OPTIONS?(window.__TEST_OPTIONS.mockID===void 0?window.__TEST_OPTIONS.mockID=0:window.__TEST_OPTIONS.mockID++,parseInt(window.__TEST_OPTIONS.mockID)):Z.v4(),filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null,parseHTML:t=>t.getAttribute(`data-${this.options.attributeName}`),renderHTML:t=>({[`data-${this.options.attributeName}`]:t[this.options.attributeName]})}}}]},onCreate(){if(this.editor.extensionManager.extensions.find(i=>i.name==="collaboration"))return;const{view:t,state:e}=this.editor,{tr:o,doc:n}=e,{types:r,attributeName:a,generateID:d}=this.options;c.findChildren(n,i=>r.includes(i.type.name)&&i.attrs[a]===null).forEach(({node:i,pos:l})=>{o.setNodeMarkup(l,void 0,{...i.attrs,[a]:d()})}),o.setMeta("addToHistory",!1),t.dispatch(o)},addProseMirrorPlugins(){let t=null,e=!1;return[new g.Plugin({key:new g.PluginKey("uniqueID"),appendTransaction:(o,n,r)=>{console.log("appendTransaction");const a=o.some(y=>y.docChanged)&&!n.doc.eq(r.doc),d=this.options.filterTransaction&&o.some(y=>{var C,v;return!(!((v=(C=this.options).filterTransaction)===null||v===void 0)&&v.call(C,y))});if(!a||d)return;const{tr:s}=r,{types:i,attributeName:l,generateID:h}=this.options,u=c.combineTransactionSteps(n.doc,o),{mapping:f}=u;if(c.getChangedRanges(u).forEach(({newRange:y})=>{const C=c.findChildrenInRange(r.doc,y,w=>i.includes(w.type.name)),v=C.map(({node:w})=>w.attrs[l]).filter(w=>w!==null),O=Ve(v);C.forEach(({node:w,pos:H})=>{var _;const $=(_=s.doc.nodeAt(H))===null||_===void 0?void 0:_.attrs[l];if($===null){s.setNodeMarkup(H,void 0,{...w.attrs,[l]:h()});return}const{deleted:ot}=f.invert().mapResult(H);ot&&O.includes($)&&s.setNodeMarkup(H,void 0,{...w.attrs,[l]:h()})})}),!!s.steps.length)return s},view(o){const n=r=>{var a;t=!((a=o.dom.parentElement)===null||a===void 0)&&a.contains(r.target)?o.dom.parentElement:null};return window.addEventListener("dragstart",n),{destroy(){window.removeEventListener("dragstart",n)}}},props:{handleDOMEvents:{drop:(o,n)=>{var r;return(t!==o.dom.parentElement||((r=n.dataTransfer)===null||r===void 0?void 0:r.effectAllowed)==="copy")&&(t=null,e=!0),!1},paste:()=>(e=!0,!1)},transformPasted:o=>{if(!e)return o;const{types:n,attributeName:r}=this.options,a=d=>{const s=[];return d.forEach(i=>{if(i.isText){s.push(i);return}if(!n.includes(i.type.name)){s.push(i.copy(a(i.content)));return}const l=i.type.create({...i.attrs,[r]:null},a(i.content),i.marks);s.push(l)}),T.Fragment.from(s)};return e=!1,new T.Slice(a(o.content),o.openStart,o.openEnd)}}})]}}),Ye=c.Mark.create({name:"backgroundColor",addAttributes(){return{color:{default:void 0,parseHTML:t=>t.getAttribute("data-background-color"),renderHTML:t=>({"data-background-color":t.color})}}},parseHTML(){return[{tag:"span",getAttrs:t=>typeof t=="string"?!1:t.hasAttribute("data-background-color")?{color:t.getAttribute("data-background-color")}:!1}]},renderHTML({HTMLAttributes:t}){return["span",t,0]},addCommands(){return{setBackgroundColor:t=>({commands:e})=>t!=="default"?e.setMark(this.name,{color:t}):e.unsetMark(this.name)}}}),Je=c.Mark.create({name:"textColor",addAttributes(){return{color:{default:void 0,parseHTML:t=>t.getAttribute("data-text-color"),renderHTML:t=>({"data-text-color":t.color})}}},parseHTML(){return[{tag:"span",getAttrs:t=>typeof t=="string"?!1:t.hasAttribute("data-text-color")?{color:t.getAttribute("data-text-color")}:!1}]},renderHTML({HTMLAttributes:t}){return["span",t,0]},addCommands(){return{setTextColor:t=>({commands:e})=>t!=="default"?e.setMark(this.name,{color:t}):e.unsetMark(this.name)}}}),Qe=c.Extension.create({name:"blockBackgroundColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{backgroundColor:{default:"default",parseHTML:t=>t.hasAttribute("data-background-color")?t.getAttribute("data-background-color"):"default",renderHTML:t=>t.backgroundColor!=="default"&&{"data-background-color":t.backgroundColor}}}}]},addCommands(){return{setBlockBackgroundColor:(t,e)=>({state:o,view:n})=>{const r=b(o.doc,t);return r===void 0?!1:(o.tr.setNodeAttribute(r.startPos-1,"backgroundColor",e),n.focus(),!0)}}}}),Xe=c.Extension.create({name:"blockTextColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{textColor:{default:"default",parseHTML:t=>t.hasAttribute("data-text-color")?t.getAttribute("data-text-color"):"default",renderHTML:t=>t.textColor!=="default"&&{"data-text-color":t.textColor}}}}]},addCommands(){return{setBlockTextColor:(t,e)=>({state:o,view:n})=>{const r=b(o.doc,t);return r===void 0?!1:(o.tr.setNodeAttribute(r.startPos-1,"textColor",e),n.focus(),!0)}}}}),Ze=c.Extension.create({name:"textAlignment",addGlobalAttributes(){return[{types:["paragraph","heading","bulletListItem","numberedListItem"],attributes:{textAlignment:{default:"left",parseHTML:t=>t.getAttribute("data-text-alignment"),renderHTML:t=>t.textAlignment!=="left"&&{"data-text-alignment":t.textAlignment}}}}]},addCommands(){return{setTextAlignment:t=>({state:e})=>{const o=[],n=b(e.doc,e.selection.from);if(n===void 0)return!1;let r=n.startPos;for(;r<e.selection.to;)e.doc.resolve(r).node().type.spec.group==="blockContent"?(o.push(r-1),r+=e.doc.resolve(r).node().nodeSize-1):r+=1;for(const a of o)e.tr.setNodeAttribute(a,"textAlignment",t);return!0}}}}),z=t=>{const e=[c.extensions.ClipboardTextSerializer,c.extensions.Commands,c.extensions.Editable,c.extensions.FocusEvents,c.extensions.Tabindex,re.default,Ge.configure({emptyNodeClass:B.isEmpty,hasAnchorClass:B.hasAnchor,isFilterClass:B.isFilter,includeChildren:!0,showOnlyCurrent:!1}),We.configure({types:["blockContainer"]}),ie.default,de.default,te.default,oe.default,se.default,ae.default,le.default,Je,Xe,Ye,Qe,Ze,...Be,ne.default.configure({width:5,color:"#ddeeff"}),W.History,Ke];return t.blockSideMenuFactory&&e.push(De.configure({blockSideMenuFactory:t.blockSideMenuFactory})),t.formattingToolbarFactory&&e.push(Te.configure({formattingToolbarFactory:t.formattingToolbarFactory})),t.hyperlinkToolbarFactory?e.push(ze.configure({hyperlinkToolbarFactory:t.hyperlinkToolbarFactory})):e.push(R.Link),t.slashMenuFactory&&e.push(Ee.configure({slashMenuFactory:t.slashMenuFactory})),e},et={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1};class tt{constructor(e={}){p(this,"tiptapEditor");var a,d,s;const o=z(e.uiFactories||{});let n=e.disableHistoryExtension?o.filter(i=>i.name!=="history"):o;const r={...et,...e,extensions:e.enableBlockNoteExtensions===!1?e.extensions:[...e.extensions||[],...n],editorProps:{attributes:{...((a=e.editorProps)==null?void 0:a.attributes)||{},class:[N.bnEditor,N.bnRoot,((s=(d=e.editorProps)==null?void 0:d.attributes)==null?void 0:s.class)||""].join(" ")}}};this.tiptapEditor=new c.Editor(r)}}k.BlockNoteEditor=tt,k.SlashMenuItem=P,k.getBlockNoteExtensions=z,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(z,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("@tiptap/core"),require("prosemirror-model"),require("prosemirror-state"),require("uuid"),require("rehype-remark"),require("remark-gfm"),require("remark-rehype"),require("hast-util-from-dom"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-italic"),require("@tiptap/extension-link"),require("@tiptap/extension-strike"),require("@tiptap/extension-text"),require("@tiptap/extension-underline"),require("prosemirror-view")):typeof define=="function"&&define.amd?define(["exports","@tiptap/core","prosemirror-model","prosemirror-state","uuid","rehype-remark","remark-gfm","remark-rehype","hast-util-from-dom","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-italic","@tiptap/extension-link","@tiptap/extension-strike","@tiptap/extension-text","@tiptap/extension-underline","prosemirror-view"],P):(z=typeof globalThis<"u"?globalThis:z||self,P(z.blocknote={},z.core$2,z.prosemirrorModel,z.prosemirrorState,z.uuid,z.rehypeRemark,z.remarkGfm,z.remarkRehype,z.hastUtilFromDom,z.Bold,z.Code,z.DropCursor,z.GapCursor,z.HardBreak,z.extensionHistory,z.Italic,z.extensionLink,z.Strike,z.Text,z.Underline,z.pv))})(this,function(z,P,le,ne,ma,Ta,xr,pa,yr,Ea,ga,Aa,_a,Ca,Sa,Na,Rr,ka,Ia,Oa,et){"use strict";var Vd=Object.defineProperty;var $d=(z,P,le)=>P in z?Vd(z,P,{enumerable:!0,configurable:!0,writable:!0,value:le}):z[P]=le;var Y=(z,P,le)=>($d(z,typeof P!="symbol"?P+"":P,le),le);function xa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ya=xa(et);function oe(e,t){if(t<0||t>e.nodeSize)return;const n=e.resolve(t),r=n.depth;let i=n.node(r),o=r;for(;;){if(o<0)return;if(i.type.name==="blockContainer")break;o-=1,i=n.node(o)}const s=i.attrs.id,a=i.firstChild,c=a.type,u=i.childCount===2?i.lastChild.childCount:0,h=n.start(o),m=n.end(o);return{id:s,node:i,contentNode:a,contentType:c,numChildBlocks:u,startPos:h,endPos:m,depth:o}}const $t=["backgroundColor","textColor","textAlignment"],un={paragraph:new Set([...$t]),heading:new Set([...$t,"level"]),numberedListItem:new Set([...$t]),bulletListItem:new Set([...$t])};function Ra(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function ba(e){const t=e.filter((r,i)=>e.indexOf(r)!==i);return Ra(t)}const hn=P.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>window.__TEST_OPTIONS?(window.__TEST_OPTIONS.mockID===void 0?window.__TEST_OPTIONS.mockID=0:window.__TEST_OPTIONS.mockID++,parseInt(window.__TEST_OPTIONS.mockID)):ma.v4(),filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null,parseHTML:e=>e.getAttribute(`data-${this.options.attributeName}`),renderHTML:e=>({[`data-${this.options.attributeName}`]:e[this.options.attributeName]})}}}]},onCreate(){if(this.editor.extensionManager.extensions.find(c=>c.name==="collaboration"))return;const{view:e,state:t}=this.editor,{tr:n,doc:r}=t,{types:i,attributeName:o,generateID:s}=this.options;P.findChildren(r,c=>i.includes(c.type.name)&&c.attrs[o]===null).forEach(({node:c,pos:u})=>{n.setNodeMarkup(u,void 0,{...c.attrs,[o]:s()})}),n.setMeta("addToHistory",!1),e.dispatch(n)},addProseMirrorPlugins(){let e=null,t=!1;return[new ne.Plugin({key:new ne.PluginKey("uniqueID"),appendTransaction:(n,r,i)=>{const o=n.some(A=>A.docChanged)&&!r.doc.eq(i.doc),s=this.options.filterTransaction&&n.some(A=>{var I,M;return!(!((M=(I=this.options).filterTransaction)===null||M===void 0)&&M.call(I,A))});if(!o||s)return;const{tr:a}=i,{types:c,attributeName:u,generateID:h}=this.options,m=P.combineTransactionSteps(r.doc,n),{mapping:g}=m;if(P.getChangedRanges(m).forEach(({newRange:A})=>{const I=P.findChildrenInRange(i.doc,A,B=>c.includes(B.type.name)),M=I.map(({node:B})=>B.attrs[u]).filter(B=>B!==null),N=ba(M);I.forEach(({node:B,pos:R})=>{var v;const G=(v=a.doc.nodeAt(R))===null||v===void 0?void 0:v.attrs[u];if(G===null){a.setNodeMarkup(R,void 0,{...B.attrs,[u]:h()});return}const{deleted:C}=g.invert().mapResult(R);C&&N.includes(G)&&a.setNodeMarkup(R,void 0,{...B.attrs,[u]:h()})})}),!!a.steps.length)return a},view(n){const r=i=>{var o;e=!((o=n.dom.parentElement)===null||o===void 0)&&o.contains(i.target)?n.dom.parentElement:null};return window.addEventListener("dragstart",r),{destroy(){window.removeEventListener("dragstart",r)}}},props:{handleDOMEvents:{drop:(n,r)=>{var i;return(e!==n.dom.parentElement||((i=r.dataTransfer)===null||i===void 0?void 0:i.effectAllowed)==="copy")&&(e=null,t=!0),!1},paste:()=>(t=!0,!1)},transformPasted:n=>{if(!t)return n;const{types:r,attributeName:i}=this.options,o=s=>{const a=[];return s.forEach(c=>{if(c.isText){a.push(c);return}if(!r.includes(c.type.name)){a.push(c.copy(o(c.content)));return}const u=c.type.create({...c.attrs,[i]:null},o(c.content),c.marks);a.push(u)}),le.Fragment.from(a)};return t=!1,new le.Slice(o(n.content),n.openStart,n.openEnd)}}})]}});function N1(e,t){let n=e.id;n===void 0&&(n=hn.options.generateID());let r=[];if(typeof e.content=="string")r.push(t.text(e.content));else if(typeof e.content=="object")for(const a of e.content){const c=[];for(const u of a.styles)c.push(t.mark(u.type,u.props));r.push(t.text(a.text,c))}const i=t.nodes[e.type].create(e.props,r),o=[];if(e.children)for(const a of e.children)o.push(N1(a,t));const s=t.nodes.blockGroup.create({},o);return t.nodes.blockContainer.create({id:n,...e.props},o.length>0?[i,s]:i)}function br(e,t){let n,r;if(t.firstChild.descendants((i,o)=>n?!1:i.type.name!=="blockContainer"||i.attrs.id!==e?!0:(n=i,r=o+1,!1)),n===void 0||r===void 0)throw Error("Could not find block in the editor with matching ID.");return{node:n,posBeforeNode:r}}function k1(e,t){if(e.type.name!=="blockContainer")throw Error("Node must be of type blockContainer, but is of type"+e.type.name+".");const n=t==null?void 0:t.get(e);if(n)return n;const r=oe(e,0);let i=r.id;i===null&&(i=hn.options.generateID());const o={};for(const[u,h]of Object.entries({...r.node.attrs,...r.contentNode.attrs})){if(!(r.contentType.name in un))throw Error("Block is of an unrecognized type: "+r.contentType.name);un[r.contentType.name].has(u)&&(o[u]=h)}const s=[];r.contentNode.content.forEach(u=>{const h=[];for(const m of u.marks)h.push({type:m.type.name,props:m.attrs});s.push({text:u.textContent,styles:h})});const a=[];for(let u=0;u<r.numChildBlocks;u++)a.push(k1(r.node.lastChild.child(u)));const c={id:i,type:r.contentType.name,props:o,content:s,children:a};return t==null||t.set(e,c),c}function Mr(e,t,n="before",r){const i=[];for(const c of e)i.push(N1(c,r.schema));let o=-1;const{node:s,posBeforeNode:a}=br(t.id,r.state.doc);if(n==="before"&&(o=a),n==="after"&&(o=a+s.nodeSize),n==="nested"){if(s.childCount<2){o=a+s.firstChild.nodeSize+1;const c=r.state.schema.nodes.blockGroup.create({},i);r.view.dispatch(r.state.tr.insert(o,c));return}o=a+s.firstChild.nodeSize+2}r.view.dispatch(r.state.tr.insert(o,i))}function Ma(e,t,n){const{posBeforeNode:r}=br(e.id,n.state.doc);n.commands.BNUpdateBlock(r+1,t)}function Lr(e,t){const n=new Set(e.map(i=>i.id));let r=0;if(t.state.doc.descendants((i,o)=>{if(n.size===0)return!1;if(i.type.name!=="blockContainer"||!n.has(i.attrs.id))return!0;n.delete(i.attrs.id);const s=t.state.doc.nodeSize;t.commands.BNDeleteBlock(o-r+1);const a=t.state.doc.nodeSize;return r+=s-a,!1}),n.size>0){let i=[...n].join(`
|
|
2
|
+
`);throw Error("Blocks with the following IDs could not be found in the editor: "+i)}}function La(e,t,n){Mr(t,e[0],"before",n),Lr(e,n)}function Pr(e){if(e)throw e}/*!
|
|
3
|
+
* Determine if an object is a Buffer
|
|
4
|
+
*
|
|
5
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/var Dr=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},I1=Object.prototype.hasOwnProperty,Br=Object.prototype.toString,wr=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor,Fr=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Br.call(t)==="[object Array]"},vr=function(t){if(!t||Br.call(t)!=="[object Object]")return!1;var n=I1.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&I1.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||I1.call(t,i)},Ur=function(t,n){wr&&n.name==="__proto__"?wr(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Gr=function(t,n){if(n==="__proto__")if(I1.call(t,n)){if(Hr)return Hr(t,n).value}else return;return t[n]},Kr=function e(){var t,n,r,i,o,s,a=arguments[0],c=1,u=arguments.length,h=!1;for(typeof a=="boolean"&&(h=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=Gr(a,n),i=Gr(t,n),a!==i&&(h&&i&&(vr(i)||(o=Fr(i)))?(o?(o=!1,s=r&&Fr(r)?r:[]):s=r&&vr(r)?r:{},Ur(a,{name:n,newValue:e(h,s,i)})):typeof i<"u"&&Ur(a,{name:n,newValue:i}));return a};function dn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Pa(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...u){const h=e[++o];let m=-1;if(c){s(c);return}for(;++m<i.length;)(u[m]===null||u[m]===void 0)&&(u[m]=i[m]);i=u,h?Da(h,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Da(e,t){let n;return r;function r(...s){const a=e.length>s.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(u){const h=u;if(a&&n)throw h;return i(h)}a||(c instanceof Promise?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}function Xt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zr(e.position):"start"in e||"end"in e?zr(e):"line"in e||"column"in e?fn(e):""}function fn(e){return Yr(e&&e.line)+":"+Yr(e&&e.column)}function zr(e){return fn(e&&e.start)+"-"+fn(e&&e.end)}function Yr(e){return e&&typeof e=="number"?e:1}class ye extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=Xt(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}ye.prototype.file="",ye.prototype.name="",ye.prototype.reason="",ye.prototype.message="",ye.prototype.stack="",ye.prototype.fatal=null,ye.prototype.column=null,ye.prototype.line=null,ye.prototype.source=null,ye.prototype.ruleId=null,ye.prototype.position=null;const je={basename:Ba,dirname:wa,extname:Ha,join:Fa,sep:"/"};function Ba(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Jt(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function wa(e){if(Jt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function Ha(e){Jt(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Fa(...e){let t=-1,n;for(;++t<e.length;)Jt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":va(n)}function va(e){Jt(e);const t=e.charCodeAt(0)===47;let n=Ua(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ua(e,t){let n="",r=0,i=-1,o=0,s=-1,a,c;for(;++s<=e.length;){if(s<e.length)a=e.charCodeAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Jt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ga={cwd:Ka};function Ka(){return"/"}function mn(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function za(e){if(typeof e=="string")e=new URL(e);else if(!mn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ya(e)}function Ya(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.charCodeAt(n)===37&&t.charCodeAt(n+1)===50){const r=t.charCodeAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Tn=["history","path","basename","stem","extname","dirname"];class qa{constructor(t){let n;t?typeof t=="string"||ja(t)?n={value:t}:mn(t)?n={path:t}:n=t:n={},this.data={},this.messages=[],this.history=[],this.cwd=Ga.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Tn.length;){const o=Tn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Tn.includes(i)||(this[i]=n[i])}get path(){return this.history[this.history.length-1]}set path(t){mn(t)&&(t=za(t)),En(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?je.dirname(this.path):void 0}set dirname(t){qr(this.basename,"dirname"),this.path=je.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?je.basename(this.path):void 0}set basename(t){En(t,"basename"),pn(t,"basename"),this.path=je.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?je.extname(this.path):void 0}set extname(t){if(pn(t,"extname"),qr(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=je.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?je.basename(this.path,this.extname):void 0}set stem(t){En(t,"stem"),pn(t,"stem"),this.path=je.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,n,r){const i=new ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=null,i}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}}function pn(e,t){if(e&&e.includes(je.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+je.sep+"`")}function En(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ja(e){return Dr(e)}const gn=Wr().freeze(),jr={}.hasOwnProperty;function Wr(){const e=Pa(),t=[];let n={},r,i=-1;return o.data=s,o.Parser=void 0,o.Compiler=void 0,o.freeze=a,o.attachers=t,o.use=c,o.parse=u,o.stringify=h,o.run=m,o.runSync=g,o.process=E,o.processSync=A,o;function o(){const I=Wr();let M=-1;for(;++M<t.length;)I.use(...t[M]);return I.data(Kr(!0,{},n)),I}function s(I,M){return typeof I=="string"?arguments.length===2?(Cn("data",r),n[I]=M,o):jr.call(n,I)&&n[I]||null:I?(Cn("data",r),n=I,o):n}function a(){if(r)return o;for(;++i<t.length;){const[I,...M]=t[i];if(M[0]===!1)continue;M[0]===!0&&(M[0]=void 0);const N=I.call(o,...M);typeof N=="function"&&e.use(N)}return r=!0,i=Number.POSITIVE_INFINITY,o}function c(I,...M){let N;if(Cn("use",r),I!=null)if(typeof I=="function")G(I,...M);else if(typeof I=="object")Array.isArray(I)?v(I):R(I);else throw new TypeError("Expected usable value, not `"+I+"`");return N&&(n.settings=Object.assign(n.settings||{},N)),o;function B(C){if(typeof C=="function")G(C);else if(typeof C=="object")if(Array.isArray(C)){const[w,...W]=C;G(w,...W)}else R(C);else throw new TypeError("Expected usable value, not `"+C+"`")}function R(C){v(C.plugins),C.settings&&(N=Object.assign(N||{},C.settings))}function v(C){let w=-1;if(C!=null)if(Array.isArray(C))for(;++w<C.length;){const W=C[w];B(W)}else throw new TypeError("Expected a list of plugins, not `"+C+"`")}function G(C,w){let W=-1,V;for(;++W<t.length;)if(t[W][0]===C){V=t[W];break}V?(dn(V[1])&&dn(w)&&(w=Kr(!0,V[1],w)),V[1]=w):t.push([...arguments])}}function u(I){o.freeze();const M=Zt(I),N=o.Parser;return An("parse",N),Qr(N,"parse")?new N(String(M),M).parse():N(String(M),M)}function h(I,M){o.freeze();const N=Zt(M),B=o.Compiler;return _n("stringify",B),Vr(I),Qr(B,"compile")?new B(I,N).compile():B(I,N)}function m(I,M,N){if(Vr(I),o.freeze(),!N&&typeof M=="function"&&(N=M,M=void 0),!N)return new Promise(B);B(null,N);function B(R,v){e.run(I,Zt(M),G);function G(C,w,W){w=w||I,C?v(C):R?R(w):N(null,w,W)}}}function g(I,M){let N,B;return o.run(I,M,R),$r("runSync","run",B),N;function R(v,G){Pr(v),N=G,B=!0}}function E(I,M){if(o.freeze(),An("process",o.Parser),_n("process",o.Compiler),!M)return new Promise(N);N(null,M);function N(B,R){const v=Zt(I);o.run(o.parse(v),v,(C,w,W)=>{if(C||!w||!W)G(C);else{const V=o.stringify(w,W);V==null||(Va(V)?W.value=V:W.result=V),G(C,W)}});function G(C,w){C||!w?R(C):B?B(w):M(null,w)}}}function A(I){let M;o.freeze(),An("processSync",o.Parser),_n("processSync",o.Compiler);const N=Zt(I);return o.process(N,B),$r("processSync","process",M),N;function B(R){M=!0,Pr(R)}}}function Qr(e,t){return typeof e=="function"&&e.prototype&&(Wa(e.prototype)||t in e.prototype)}function Wa(e){let t;for(t in e)if(jr.call(e,t))return!0;return!1}function An(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function _n(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Cn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Vr(e){if(!dn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $r(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zt(e){return Qa(e)?e:new qa(e)}function Qa(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Va(e){return typeof e=="string"||Dr(e)}var we={};const $a=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];we.REPLACEMENT_CHARACTER="�",we.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},we.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},we.isSurrogate=function(e){return e>=55296&&e<=57343},we.isSurrogatePair=function(e){return e>=56320&&e<=57343},we.getSurrogatePairCodePoint=function(e,t){return(e-55296)*1024+9216+t},we.isControlCodePoint=function(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159},we.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||$a.indexOf(e)>-1};var Sn={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"};const Dt=we,Nn=Sn,Nt=Dt.CODE_POINTS,Xa=1<<16;var Ja=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Xa}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.lastCharPos){const n=this.html.charCodeAt(this.pos+1);if(Dt.isSurrogatePair(n))return this.pos++,this._addGap(),Dt.getSurrogatePairCodePoint(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Nt.EOF;return this._err(Nn.surrogateInInputStream),t}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(t,n){this.html?this.html+=t:this.html=t,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Nt.EOF;let t=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&t===Nt.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):t===Nt.CARRIAGE_RETURN?(this.skipNextNewLine=!0,Nt.LINE_FEED):(this.skipNextNewLine=!1,Dt.isSurrogate(t)&&(t=this._processSurrogate(t)),t>31&&t<127||t===Nt.LINE_FEED||t===Nt.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Dt.isControlCodePoint(t)?this._err(Nn.controlCharacterInInputStream):Dt.isUndefinedCodePoint(t)&&this._err(Nn.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}},Za=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);const el=Ja,X=we,kt=Za,S=Sn,d=X.CODE_POINTS,It=X.CODE_POINT_SEQUENCES,tl={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},Xr=1<<0,Jr=1<<1,Zr=1<<2,nl=Xr|Jr|Zr,q="DATA_STATE",Bt="RCDATA_STATE",e1="RAWTEXT_STATE",tt="SCRIPT_DATA_STATE",ei="PLAINTEXT_STATE",ti="TAG_OPEN_STATE",ni="END_TAG_OPEN_STATE",kn="TAG_NAME_STATE",ri="RCDATA_LESS_THAN_SIGN_STATE",ii="RCDATA_END_TAG_OPEN_STATE",oi="RCDATA_END_TAG_NAME_STATE",si="RAWTEXT_LESS_THAN_SIGN_STATE",ai="RAWTEXT_END_TAG_OPEN_STATE",li="RAWTEXT_END_TAG_NAME_STATE",ci="SCRIPT_DATA_LESS_THAN_SIGN_STATE",ui="SCRIPT_DATA_END_TAG_OPEN_STATE",hi="SCRIPT_DATA_END_TAG_NAME_STATE",di="SCRIPT_DATA_ESCAPE_START_STATE",fi="SCRIPT_DATA_ESCAPE_START_DASH_STATE",He="SCRIPT_DATA_ESCAPED_STATE",mi="SCRIPT_DATA_ESCAPED_DASH_STATE",In="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",O1="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",Ti="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",pi="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",Ei="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",nt="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",gi="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",Ai="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",x1="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",_i="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",We="BEFORE_ATTRIBUTE_NAME_STATE",y1="ATTRIBUTE_NAME_STATE",On="AFTER_ATTRIBUTE_NAME_STATE",xn="BEFORE_ATTRIBUTE_VALUE_STATE",R1="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",b1="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",M1="ATTRIBUTE_VALUE_UNQUOTED_STATE",yn="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",ht="SELF_CLOSING_START_TAG_STATE",t1="BOGUS_COMMENT_STATE",Ci="MARKUP_DECLARATION_OPEN_STATE",Si="COMMENT_START_STATE",Ni="COMMENT_START_DASH_STATE",dt="COMMENT_STATE",ki="COMMENT_LESS_THAN_SIGN_STATE",Ii="COMMENT_LESS_THAN_SIGN_BANG_STATE",Oi="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",xi="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",L1="COMMENT_END_DASH_STATE",P1="COMMENT_END_STATE",yi="COMMENT_END_BANG_STATE",Ri="DOCTYPE_STATE",D1="BEFORE_DOCTYPE_NAME_STATE",B1="DOCTYPE_NAME_STATE",bi="AFTER_DOCTYPE_NAME_STATE",Mi="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",Li="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Rn="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",bn="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",Mn="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Pi="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",Di="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",Bi="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",n1="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",r1="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Ln="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",rt="BOGUS_DOCTYPE_STATE",w1="CDATA_SECTION_STATE",wi="CDATA_SECTION_BRACKET_STATE",Hi="CDATA_SECTION_END_STATE",wt="CHARACTER_REFERENCE_STATE",Fi="NAMED_CHARACTER_REFERENCE_STATE",vi="AMBIGUOS_AMPERSAND_STATE",Ui="NUMERIC_CHARACTER_REFERENCE_STATE",Gi="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Ki="DECIMAL_CHARACTER_REFERENCE_START_STATE",zi="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Yi="DECIMAL_CHARACTER_REFERENCE_STATE",i1="NUMERIC_CHARACTER_REFERENCE_END_STATE";function re(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function o1(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function Fe(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function Ot(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function ft(e){return Ot(e)||Fe(e)}function Pn(e){return ft(e)||o1(e)}function qi(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_F}function ji(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_F}function rl(e){return o1(e)||qi(e)||ji(e)}function H1(e){return e+32}function se(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|e&1023))}function mt(e){return String.fromCharCode(H1(e))}function Wi(e,t){const n=kt[++e];let r=++e,i=r+n-1;for(;r<=i;){const o=r+i>>>1,s=kt[o];if(s<t)r=o+1;else if(s>t)i=o-1;else return kt[o+n]}return-1}let Re=class Oe{constructor(){this.preprocessor=new el,this.tokenQueue=[],this.allowCDATA=!1,this.state=q,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(t){this._consume(),this._err(t),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()}write(t,n){this.active=!0,this.preprocessor.write(t,n)}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Oe.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(t){this.state=t,this._unconsume()}_consumeSequenceIfMatch(t,n,r){let i=0,o=!0;const s=t.length;let a=0,c=n,u;for(;a<s;a++){if(a>0&&(c=this._consume(),i++),c===d.EOF){o=!1;break}if(u=t[a],c!==u&&(r||c!==H1(u))){o=!1;break}}if(!o)for(;i--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==It.SCRIPT_STRING.length)return!1;for(let t=0;t<this.tempBuff.length;t++)if(this.tempBuff[t]!==It.SCRIPT_STRING[t])return!1;return!0}_createStartTagToken(){this.currentToken={type:Oe.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Oe.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Oe.COMMENT_TOKEN,data:""}}_createDoctypeToken(t){this.currentToken={type:Oe.DOCTYPE_TOKEN,name:t,forceQuirks:!1,publicId:null,systemId:null}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n}}_createEOFToken(){this.currentToken={type:Oe.EOF_TOKEN}}_createAttr(t){this.currentAttr={name:t,value:""}}_leaveAttrName(t){Oe.getTokenAttr(this.currentToken,this.currentAttr.name)===null?this.currentToken.attrs.push(this.currentAttr):this._err(S.duplicateAttribute),this.state=t}_leaveAttrValue(t){this.state=t}_emitCurrentToken(){this._emitCurrentCharacterToken();const t=this.currentToken;this.currentToken=null,t.type===Oe.START_TAG_TOKEN?this.lastStartTagName=t.tagName:t.type===Oe.END_TAG_TOKEN&&(t.attrs.length>0&&this._err(S.endTagWithAttributes),t.selfClosing&&this._err(S.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(t,n){this.currentCharacterToken&&this.currentCharacterToken.type!==t&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=n:this._createCharacterToken(t,n)}_emitCodePoint(t){let n=Oe.CHARACTER_TOKEN;re(t)?n=Oe.WHITESPACE_CHARACTER_TOKEN:t===d.NULL&&(n=Oe.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,se(t))}_emitSeveralCodePoints(t){for(let n=0;n<t.length;n++)this._emitCodePoint(t[n])}_emitChars(t){this._appendCharToCurrentCharacterToken(Oe.CHARACTER_TOKEN,t)}_matchNamedCharacterReference(t){let n=null,r=1,i=Wi(0,t);for(this.tempBuff.push(t);i>-1;){const o=kt[i],s=o<nl;s&&o&Xr&&(n=o&Jr?[kt[++i],kt[++i]]:[kt[++i]],r=0);const c=this._consume();if(this.tempBuff.push(c),r++,c===d.EOF)break;s?i=o&Zr?Wi(i,c):-1:i=c===o?++i:-1}for(;r--;)this.tempBuff.pop(),this._unconsume();return n}_isCharacterReferenceInAttribute(){return this.returnState===R1||this.returnState===b1||this.returnState===M1}_isCharacterReferenceAttributeQuirk(t){if(!t&&this._isCharacterReferenceInAttribute()){const n=this._consume();return this._unconsume(),n===d.EQUALS_SIGN||Pn(n)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let t=0;t<this.tempBuff.length;t++)this.currentAttr.value+=se(this.tempBuff[t]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[q](t){this.preprocessor.dropParsedChunk(),t===d.LESS_THAN_SIGN?this.state=ti:t===d.AMPERSAND?(this.returnState=q,this.state=wt):t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitCodePoint(t)):t===d.EOF?this._emitEOFToken():this._emitCodePoint(t)}[Bt](t){this.preprocessor.dropParsedChunk(),t===d.AMPERSAND?(this.returnState=Bt,this.state=wt):t===d.LESS_THAN_SIGN?this.state=ri:t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?this._emitEOFToken():this._emitCodePoint(t)}[e1](t){this.preprocessor.dropParsedChunk(),t===d.LESS_THAN_SIGN?this.state=si:t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?this._emitEOFToken():this._emitCodePoint(t)}[tt](t){this.preprocessor.dropParsedChunk(),t===d.LESS_THAN_SIGN?this.state=ci:t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?this._emitEOFToken():this._emitCodePoint(t)}[ei](t){this.preprocessor.dropParsedChunk(),t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?this._emitEOFToken():this._emitCodePoint(t)}[ti](t){t===d.EXCLAMATION_MARK?this.state=Ci:t===d.SOLIDUS?this.state=ni:ft(t)?(this._createStartTagToken(),this._reconsumeInState(kn)):t===d.QUESTION_MARK?(this._err(S.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(t1)):t===d.EOF?(this._err(S.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(S.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(q))}[ni](t){ft(t)?(this._createEndTagToken(),this._reconsumeInState(kn)):t===d.GREATER_THAN_SIGN?(this._err(S.missingEndTagName),this.state=q):t===d.EOF?(this._err(S.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(S.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(t1))}[kn](t){re(t)?this.state=We:t===d.SOLIDUS?this.state=ht:t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):Fe(t)?this.currentToken.tagName+=mt(t):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.tagName+=X.REPLACEMENT_CHARACTER):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=se(t)}[ri](t){t===d.SOLIDUS?(this.tempBuff=[],this.state=ii):(this._emitChars("<"),this._reconsumeInState(Bt))}[ii](t){ft(t)?(this._createEndTagToken(),this._reconsumeInState(oi)):(this._emitChars("</"),this._reconsumeInState(Bt))}[oi](t){if(Fe(t))this.currentToken.tagName+=mt(t),this.tempBuff.push(t);else if(Ot(t))this.currentToken.tagName+=se(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(re(t)){this.state=We;return}if(t===d.SOLIDUS){this.state=ht;return}if(t===d.GREATER_THAN_SIGN){this.state=q,this._emitCurrentToken();return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Bt)}}[si](t){t===d.SOLIDUS?(this.tempBuff=[],this.state=ai):(this._emitChars("<"),this._reconsumeInState(e1))}[ai](t){ft(t)?(this._createEndTagToken(),this._reconsumeInState(li)):(this._emitChars("</"),this._reconsumeInState(e1))}[li](t){if(Fe(t))this.currentToken.tagName+=mt(t),this.tempBuff.push(t);else if(Ot(t))this.currentToken.tagName+=se(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(re(t)){this.state=We;return}if(t===d.SOLIDUS){this.state=ht;return}if(t===d.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=q;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(e1)}}[ci](t){t===d.SOLIDUS?(this.tempBuff=[],this.state=ui):t===d.EXCLAMATION_MARK?(this.state=di,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(tt))}[ui](t){ft(t)?(this._createEndTagToken(),this._reconsumeInState(hi)):(this._emitChars("</"),this._reconsumeInState(tt))}[hi](t){if(Fe(t))this.currentToken.tagName+=mt(t),this.tempBuff.push(t);else if(Ot(t))this.currentToken.tagName+=se(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(re(t)){this.state=We;return}else if(t===d.SOLIDUS){this.state=ht;return}else if(t===d.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=q;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(tt)}}[di](t){t===d.HYPHEN_MINUS?(this.state=fi,this._emitChars("-")):this._reconsumeInState(tt)}[fi](t){t===d.HYPHEN_MINUS?(this.state=In,this._emitChars("-")):this._reconsumeInState(tt)}[He](t){t===d.HYPHEN_MINUS?(this.state=mi,this._emitChars("-")):t===d.LESS_THAN_SIGN?this.state=O1:t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[mi](t){t===d.HYPHEN_MINUS?(this.state=In,this._emitChars("-")):t===d.LESS_THAN_SIGN?this.state=O1:t===d.NULL?(this._err(S.unexpectedNullCharacter),this.state=He,this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=He,this._emitCodePoint(t))}[In](t){t===d.HYPHEN_MINUS?this._emitChars("-"):t===d.LESS_THAN_SIGN?this.state=O1:t===d.GREATER_THAN_SIGN?(this.state=tt,this._emitChars(">")):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.state=He,this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=He,this._emitCodePoint(t))}[O1](t){t===d.SOLIDUS?(this.tempBuff=[],this.state=Ti):ft(t)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(Ei)):(this._emitChars("<"),this._reconsumeInState(He))}[Ti](t){ft(t)?(this._createEndTagToken(),this._reconsumeInState(pi)):(this._emitChars("</"),this._reconsumeInState(He))}[pi](t){if(Fe(t))this.currentToken.tagName+=mt(t),this.tempBuff.push(t);else if(Ot(t))this.currentToken.tagName+=se(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(re(t)){this.state=We;return}if(t===d.SOLIDUS){this.state=ht;return}if(t===d.GREATER_THAN_SIGN){this._emitCurrentToken(),this.state=q;return}}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(He)}}[Ei](t){re(t)||t===d.SOLIDUS||t===d.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?nt:He,this._emitCodePoint(t)):Fe(t)?(this.tempBuff.push(H1(t)),this._emitCodePoint(t)):Ot(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(He)}[nt](t){t===d.HYPHEN_MINUS?(this.state=gi,this._emitChars("-")):t===d.LESS_THAN_SIGN?(this.state=x1,this._emitChars("<")):t===d.NULL?(this._err(S.unexpectedNullCharacter),this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[gi](t){t===d.HYPHEN_MINUS?(this.state=Ai,this._emitChars("-")):t===d.LESS_THAN_SIGN?(this.state=x1,this._emitChars("<")):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.state=nt,this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=nt,this._emitCodePoint(t))}[Ai](t){t===d.HYPHEN_MINUS?this._emitChars("-"):t===d.LESS_THAN_SIGN?(this.state=x1,this._emitChars("<")):t===d.GREATER_THAN_SIGN?(this.state=tt,this._emitChars(">")):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.state=nt,this._emitChars(X.REPLACEMENT_CHARACTER)):t===d.EOF?(this._err(S.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=nt,this._emitCodePoint(t))}[x1](t){t===d.SOLIDUS?(this.tempBuff=[],this.state=_i,this._emitChars("/")):this._reconsumeInState(nt)}[_i](t){re(t)||t===d.SOLIDUS||t===d.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?He:nt,this._emitCodePoint(t)):Fe(t)?(this.tempBuff.push(H1(t)),this._emitCodePoint(t)):Ot(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(nt)}[We](t){re(t)||(t===d.SOLIDUS||t===d.GREATER_THAN_SIGN||t===d.EOF?this._reconsumeInState(On):t===d.EQUALS_SIGN?(this._err(S.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=y1):(this._createAttr(""),this._reconsumeInState(y1)))}[y1](t){re(t)||t===d.SOLIDUS||t===d.GREATER_THAN_SIGN||t===d.EOF?(this._leaveAttrName(On),this._unconsume()):t===d.EQUALS_SIGN?this._leaveAttrName(xn):Fe(t)?this.currentAttr.name+=mt(t):t===d.QUOTATION_MARK||t===d.APOSTROPHE||t===d.LESS_THAN_SIGN?(this._err(S.unexpectedCharacterInAttributeName),this.currentAttr.name+=se(t)):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentAttr.name+=X.REPLACEMENT_CHARACTER):this.currentAttr.name+=se(t)}[On](t){re(t)||(t===d.SOLIDUS?this.state=ht:t===d.EQUALS_SIGN?this.state=xn:t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(y1)))}[xn](t){re(t)||(t===d.QUOTATION_MARK?this.state=R1:t===d.APOSTROPHE?this.state=b1:t===d.GREATER_THAN_SIGN?(this._err(S.missingAttributeValue),this.state=q,this._emitCurrentToken()):this._reconsumeInState(M1))}[R1](t){t===d.QUOTATION_MARK?this.state=yn:t===d.AMPERSAND?(this.returnState=R1,this.state=wt):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentAttr.value+=X.REPLACEMENT_CHARACTER):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):this.currentAttr.value+=se(t)}[b1](t){t===d.APOSTROPHE?this.state=yn:t===d.AMPERSAND?(this.returnState=b1,this.state=wt):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentAttr.value+=X.REPLACEMENT_CHARACTER):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):this.currentAttr.value+=se(t)}[M1](t){re(t)?this._leaveAttrValue(We):t===d.AMPERSAND?(this.returnState=M1,this.state=wt):t===d.GREATER_THAN_SIGN?(this._leaveAttrValue(q),this._emitCurrentToken()):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentAttr.value+=X.REPLACEMENT_CHARACTER):t===d.QUOTATION_MARK||t===d.APOSTROPHE||t===d.LESS_THAN_SIGN||t===d.EQUALS_SIGN||t===d.GRAVE_ACCENT?(this._err(S.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=se(t)):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):this.currentAttr.value+=se(t)}[yn](t){re(t)?this._leaveAttrValue(We):t===d.SOLIDUS?this._leaveAttrValue(ht):t===d.GREATER_THAN_SIGN?(this._leaveAttrValue(q),this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):(this._err(S.missingWhitespaceBetweenAttributes),this._reconsumeInState(We))}[ht](t){t===d.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInTag),this._emitEOFToken()):(this._err(S.unexpectedSolidusInTag),this._reconsumeInState(We))}[t1](t){t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):t===d.EOF?(this._emitCurrentToken(),this._emitEOFToken()):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.data+=X.REPLACEMENT_CHARACTER):this.currentToken.data+=se(t)}[Ci](t){this._consumeSequenceIfMatch(It.DASH_DASH_STRING,t,!0)?(this._createCommentToken(),this.state=Si):this._consumeSequenceIfMatch(It.DOCTYPE_STRING,t,!1)?this.state=Ri:this._consumeSequenceIfMatch(It.CDATA_START_STRING,t,!0)?this.allowCDATA?this.state=w1:(this._err(S.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=t1):this._ensureHibernation()||(this._err(S.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(t1))}[Si](t){t===d.HYPHEN_MINUS?this.state=Ni:t===d.GREATER_THAN_SIGN?(this._err(S.abruptClosingOfEmptyComment),this.state=q,this._emitCurrentToken()):this._reconsumeInState(dt)}[Ni](t){t===d.HYPHEN_MINUS?this.state=P1:t===d.GREATER_THAN_SIGN?(this._err(S.abruptClosingOfEmptyComment),this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(dt))}[dt](t){t===d.HYPHEN_MINUS?this.state=L1:t===d.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=ki):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.data+=X.REPLACEMENT_CHARACTER):t===d.EOF?(this._err(S.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=se(t)}[ki](t){t===d.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Ii):t===d.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(dt)}[Ii](t){t===d.HYPHEN_MINUS?this.state=Oi:this._reconsumeInState(dt)}[Oi](t){t===d.HYPHEN_MINUS?this.state=xi:this._reconsumeInState(L1)}[xi](t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(S.nestedComment),this._reconsumeInState(P1)}[L1](t){t===d.HYPHEN_MINUS?this.state=P1:t===d.EOF?(this._err(S.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(dt))}[P1](t){t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):t===d.EXCLAMATION_MARK?this.state=yi:t===d.HYPHEN_MINUS?this.currentToken.data+="-":t===d.EOF?(this._err(S.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(dt))}[yi](t){t===d.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=L1):t===d.GREATER_THAN_SIGN?(this._err(S.incorrectlyClosedComment),this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(dt))}[Ri](t){re(t)?this.state=D1:t===d.GREATER_THAN_SIGN?this._reconsumeInState(D1):t===d.EOF?(this._err(S.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(D1))}[D1](t){re(t)||(Fe(t)?(this._createDoctypeToken(mt(t)),this.state=B1):t===d.NULL?(this._err(S.unexpectedNullCharacter),this._createDoctypeToken(X.REPLACEMENT_CHARACTER),this.state=B1):t===d.GREATER_THAN_SIGN?(this._err(S.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(se(t)),this.state=B1))}[B1](t){re(t)?this.state=bi:t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):Fe(t)?this.currentToken.name+=mt(t):t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.name+=X.REPLACEMENT_CHARACTER):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=se(t)}[bi](t){re(t)||(t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(It.PUBLIC_STRING,t,!1)?this.state=Mi:this._consumeSequenceIfMatch(It.SYSTEM_STRING,t,!1)?this.state=Di:this._ensureHibernation()||(this._err(S.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt)))}[Mi](t){re(t)?this.state=Li:t===d.QUOTATION_MARK?(this._err(S.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=Rn):t===d.APOSTROPHE?(this._err(S.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=bn):t===d.GREATER_THAN_SIGN?(this._err(S.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt))}[Li](t){re(t)||(t===d.QUOTATION_MARK?(this.currentToken.publicId="",this.state=Rn):t===d.APOSTROPHE?(this.currentToken.publicId="",this.state=bn):t===d.GREATER_THAN_SIGN?(this._err(S.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt)))}[Rn](t){t===d.QUOTATION_MARK?this.state=Mn:t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.publicId+=X.REPLACEMENT_CHARACTER):t===d.GREATER_THAN_SIGN?(this._err(S.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=se(t)}[bn](t){t===d.APOSTROPHE?this.state=Mn:t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.publicId+=X.REPLACEMENT_CHARACTER):t===d.GREATER_THAN_SIGN?(this._err(S.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=se(t)}[Mn](t){re(t)?this.state=Pi:t===d.GREATER_THAN_SIGN?(this.state=q,this._emitCurrentToken()):t===d.QUOTATION_MARK?(this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=n1):t===d.APOSTROPHE?(this._err(S.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=r1):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt))}[Pi](t){re(t)||(t===d.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=q):t===d.QUOTATION_MARK?(this.currentToken.systemId="",this.state=n1):t===d.APOSTROPHE?(this.currentToken.systemId="",this.state=r1):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt)))}[Di](t){re(t)?this.state=Bi:t===d.QUOTATION_MARK?(this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=n1):t===d.APOSTROPHE?(this._err(S.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=r1):t===d.GREATER_THAN_SIGN?(this._err(S.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt))}[Bi](t){re(t)||(t===d.QUOTATION_MARK?(this.currentToken.systemId="",this.state=n1):t===d.APOSTROPHE?(this.currentToken.systemId="",this.state=r1):t===d.GREATER_THAN_SIGN?(this._err(S.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=q,this._emitCurrentToken()):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(rt)))}[n1](t){t===d.QUOTATION_MARK?this.state=Ln:t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.systemId+=X.REPLACEMENT_CHARACTER):t===d.GREATER_THAN_SIGN?(this._err(S.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=se(t)}[r1](t){t===d.APOSTROPHE?this.state=Ln:t===d.NULL?(this._err(S.unexpectedNullCharacter),this.currentToken.systemId+=X.REPLACEMENT_CHARACTER):t===d.GREATER_THAN_SIGN?(this._err(S.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=se(t)}[Ln](t){re(t)||(t===d.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=q):t===d.EOF?(this._err(S.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(S.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(rt)))}[rt](t){t===d.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=q):t===d.NULL?this._err(S.unexpectedNullCharacter):t===d.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[w1](t){t===d.RIGHT_SQUARE_BRACKET?this.state=wi:t===d.EOF?(this._err(S.eofInCdata),this._emitEOFToken()):this._emitCodePoint(t)}[wi](t){t===d.RIGHT_SQUARE_BRACKET?this.state=Hi:(this._emitChars("]"),this._reconsumeInState(w1))}[Hi](t){t===d.GREATER_THAN_SIGN?this.state=q:t===d.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(w1))}[wt](t){this.tempBuff=[d.AMPERSAND],t===d.NUMBER_SIGN?(this.tempBuff.push(t),this.state=Ui):Pn(t)?this._reconsumeInState(Fi):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Fi](t){const n=this._matchNamedCharacterReference(t);if(this._ensureHibernation())this.tempBuff=[d.AMPERSAND];else if(n){const r=this.tempBuff[this.tempBuff.length-1]===d.SEMICOLON;this._isCharacterReferenceAttributeQuirk(r)||(r||this._errOnNextCodePoint(S.missingSemicolonAfterCharacterReference),this.tempBuff=n),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=vi}[vi](t){Pn(t)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=se(t):this._emitCodePoint(t):(t===d.SEMICOLON&&this._err(S.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Ui](t){this.charRefCode=0,t===d.LATIN_SMALL_X||t===d.LATIN_CAPITAL_X?(this.tempBuff.push(t),this.state=Gi):this._reconsumeInState(Ki)}[Gi](t){rl(t)?this._reconsumeInState(zi):(this._err(S.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ki](t){o1(t)?this._reconsumeInState(Yi):(this._err(S.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[zi](t){qi(t)?this.charRefCode=this.charRefCode*16+t-55:ji(t)?this.charRefCode=this.charRefCode*16+t-87:o1(t)?this.charRefCode=this.charRefCode*16+t-48:t===d.SEMICOLON?this.state=i1:(this._err(S.missingSemicolonAfterCharacterReference),this._reconsumeInState(i1))}[Yi](t){o1(t)?this.charRefCode=this.charRefCode*10+t-48:t===d.SEMICOLON?this.state=i1:(this._err(S.missingSemicolonAfterCharacterReference),this._reconsumeInState(i1))}[i1](){if(this.charRefCode===d.NULL)this._err(S.nullCharacterReference),this.charRefCode=d.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(S.characterReferenceOutsideUnicodeRange),this.charRefCode=d.REPLACEMENT_CHARACTER;else if(X.isSurrogate(this.charRefCode))this._err(S.surrogateCharacterReference),this.charRefCode=d.REPLACEMENT_CHARACTER;else if(X.isUndefinedCodePoint(this.charRefCode))this._err(S.noncharacterCharacterReference);else if(X.isControlCodePoint(this.charRefCode)||this.charRefCode===d.CARRIAGE_RETURN){this._err(S.controlCharacterReference);const t=tl[this.charRefCode];t&&(this.charRefCode=t)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}};Re.CHARACTER_TOKEN="CHARACTER_TOKEN",Re.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Re.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Re.START_TAG_TOKEN="START_TAG_TOKEN",Re.END_TAG_TOKEN="END_TAG_TOKEN",Re.COMMENT_TOKEN="COMMENT_TOKEN",Re.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Re.EOF_TOKEN="EOF_TOKEN",Re.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Re.MODE={DATA:q,RCDATA:Bt,RAWTEXT:e1,SCRIPT_DATA:tt,PLAINTEXT:ei},Re.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null};var F1=Re,ve={};const Dn=ve.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};ve.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},ve.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const O=ve.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};ve.SPECIAL_ELEMENTS={[Dn.HTML]:{[O.ADDRESS]:!0,[O.APPLET]:!0,[O.AREA]:!0,[O.ARTICLE]:!0,[O.ASIDE]:!0,[O.BASE]:!0,[O.BASEFONT]:!0,[O.BGSOUND]:!0,[O.BLOCKQUOTE]:!0,[O.BODY]:!0,[O.BR]:!0,[O.BUTTON]:!0,[O.CAPTION]:!0,[O.CENTER]:!0,[O.COL]:!0,[O.COLGROUP]:!0,[O.DD]:!0,[O.DETAILS]:!0,[O.DIR]:!0,[O.DIV]:!0,[O.DL]:!0,[O.DT]:!0,[O.EMBED]:!0,[O.FIELDSET]:!0,[O.FIGCAPTION]:!0,[O.FIGURE]:!0,[O.FOOTER]:!0,[O.FORM]:!0,[O.FRAME]:!0,[O.FRAMESET]:!0,[O.H1]:!0,[O.H2]:!0,[O.H3]:!0,[O.H4]:!0,[O.H5]:!0,[O.H6]:!0,[O.HEAD]:!0,[O.HEADER]:!0,[O.HGROUP]:!0,[O.HR]:!0,[O.HTML]:!0,[O.IFRAME]:!0,[O.IMG]:!0,[O.INPUT]:!0,[O.LI]:!0,[O.LINK]:!0,[O.LISTING]:!0,[O.MAIN]:!0,[O.MARQUEE]:!0,[O.MENU]:!0,[O.META]:!0,[O.NAV]:!0,[O.NOEMBED]:!0,[O.NOFRAMES]:!0,[O.NOSCRIPT]:!0,[O.OBJECT]:!0,[O.OL]:!0,[O.P]:!0,[O.PARAM]:!0,[O.PLAINTEXT]:!0,[O.PRE]:!0,[O.SCRIPT]:!0,[O.SECTION]:!0,[O.SELECT]:!0,[O.SOURCE]:!0,[O.STYLE]:!0,[O.SUMMARY]:!0,[O.TABLE]:!0,[O.TBODY]:!0,[O.TD]:!0,[O.TEMPLATE]:!0,[O.TEXTAREA]:!0,[O.TFOOT]:!0,[O.TH]:!0,[O.THEAD]:!0,[O.TITLE]:!0,[O.TR]:!0,[O.TRACK]:!0,[O.UL]:!0,[O.WBR]:!0,[O.XMP]:!0},[Dn.MATHML]:{[O.MI]:!0,[O.MO]:!0,[O.MN]:!0,[O.MS]:!0,[O.MTEXT]:!0,[O.ANNOTATION_XML]:!0},[Dn.SVG]:{[O.TITLE]:!0,[O.FOREIGN_OBJECT]:!0,[O.DESC]:!0}};const Qi=ve,x=Qi.TAG_NAMES,J=Qi.NAMESPACES;function Vi(e){switch(e.length){case 1:return e===x.P;case 2:return e===x.RB||e===x.RP||e===x.RT||e===x.DD||e===x.DT||e===x.LI;case 3:return e===x.RTC;case 6:return e===x.OPTION;case 8:return e===x.OPTGROUP}return!1}function il(e){switch(e.length){case 1:return e===x.P;case 2:return e===x.RB||e===x.RP||e===x.RT||e===x.DD||e===x.DT||e===x.LI||e===x.TD||e===x.TH||e===x.TR;case 3:return e===x.RTC;case 5:return e===x.TBODY||e===x.TFOOT||e===x.THEAD;case 6:return e===x.OPTION;case 7:return e===x.CAPTION;case 8:return e===x.OPTGROUP||e===x.COLGROUP}return!1}function v1(e,t){switch(e.length){case 2:if(e===x.TD||e===x.TH)return t===J.HTML;if(e===x.MI||e===x.MO||e===x.MN||e===x.MS)return t===J.MATHML;break;case 4:if(e===x.HTML)return t===J.HTML;if(e===x.DESC)return t===J.SVG;break;case 5:if(e===x.TABLE)return t===J.HTML;if(e===x.MTEXT)return t===J.MATHML;if(e===x.TITLE)return t===J.SVG;break;case 6:return(e===x.APPLET||e===x.OBJECT)&&t===J.HTML;case 7:return(e===x.CAPTION||e===x.MARQUEE)&&t===J.HTML;case 8:return e===x.TEMPLATE&&t===J.HTML;case 13:return e===x.FOREIGN_OBJECT&&t===J.SVG;case 14:return e===x.ANNOTATION_XML&&t===J.MATHML}return!1}var ol=class{constructor(t,n){this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=n}_indexOf(t){let n=-1;for(let r=this.stackTop;r>=0;r--)if(this.items[r]===t){n=r;break}return n}_isInTemplate(){return this.currentTagName===x.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(t){this.items[++this.stackTop]=t,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&this._updateCurrentElement()}insertAfter(t,n){const r=this._indexOf(t)+1;this.items.splice(r,0,n),r===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(t){for(;this.stackTop>-1;){const n=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),n===t&&r===J.HTML)break}}popUntilElementPopped(t){for(;this.stackTop>-1;){const n=this.current;if(this.pop(),n===t)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===x.H1||t===x.H2||t===x.H3||t===x.H4||t===x.H5||t===x.H6&&n===J.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===x.TD||t===x.TH&&n===J.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==x.TABLE&&this.currentTagName!==x.TEMPLATE&&this.currentTagName!==x.HTML||this.treeAdapter.getNamespaceURI(this.current)!==J.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==x.TBODY&&this.currentTagName!==x.TFOOT&&this.currentTagName!==x.THEAD&&this.currentTagName!==x.TEMPLATE&&this.currentTagName!==x.HTML||this.treeAdapter.getNamespaceURI(this.current)!==J.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==x.TR&&this.currentTagName!==x.TEMPLATE&&this.currentTagName!==x.HTML||this.treeAdapter.getNamespaceURI(this.current)!==J.HTML;)this.pop()}remove(t){for(let n=this.stackTop;n>=0;n--)if(this.items[n]===t){this.items.splice(n,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const t=this.items[1];return t&&this.treeAdapter.getTagName(t)===x.BODY?t:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let n=this._indexOf(t);return--n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===x.HTML}hasInScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===J.HTML)return!0;if(v1(r,i))return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if((n===x.H1||n===x.H2||n===x.H3||n===x.H4||n===x.H5||n===x.H6)&&r===J.HTML)return!0;if(v1(n,r))return!1}return!0}hasInListItemScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===J.HTML)return!0;if((r===x.UL||r===x.OL)&&i===J.HTML||v1(r,i))return!1}return!0}hasInButtonScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]),i=this.treeAdapter.getNamespaceURI(this.items[n]);if(r===t&&i===J.HTML)return!0;if(r===x.BUTTON&&i===J.HTML||v1(r,i))return!1}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML){if(r===t)return!0;if(r===x.TABLE||r===x.TEMPLATE||r===x.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML){if(n===x.TBODY||n===x.THEAD||n===x.TFOOT)return!0;if(n===x.TABLE||n===x.HTML)return!1}}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--){const r=this.treeAdapter.getTagName(this.items[n]);if(this.treeAdapter.getNamespaceURI(this.items[n])===J.HTML){if(r===t)return!0;if(r!==x.OPTION&&r!==x.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Vi(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;il(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;Vi(this.currentTagName)&&this.currentTagName!==t;)this.pop()}};const U1=3;let Bn=class St{constructor(t){this.length=0,this.entries=[],this.treeAdapter=t,this.bookmark=null}_getNoahArkConditionCandidates(t){const n=[];if(this.length>=U1){const r=this.treeAdapter.getAttrList(t).length,i=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=this.length-1;s>=0;s--){const a=this.entries[s];if(a.type===St.MARKER_ENTRY)break;const c=a.element,u=this.treeAdapter.getAttrList(c);this.treeAdapter.getTagName(c)===i&&this.treeAdapter.getNamespaceURI(c)===o&&u.length===r&&n.push({idx:s,attrs:u})}}return n.length<U1?[]:n}_ensureNoahArkCondition(t){const n=this._getNoahArkConditionCandidates(t);let r=n.length;if(r){const i=this.treeAdapter.getAttrList(t),o=i.length,s=Object.create(null);for(let a=0;a<o;a++){const c=i[a];s[c.name]=c.value}for(let a=0;a<o;a++)for(let c=0;c<r;c++){const u=n[c].attrs[a];if(s[u.name]!==u.value&&(n.splice(c,1),r--),n.length<U1)return}for(let a=r-1;a>=U1-1;a--)this.entries.splice(n[a].idx,1),this.length--}}insertMarker(){this.entries.push({type:St.MARKER_ENTRY}),this.length++}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.push({type:St.ELEMENT_ENTRY,element:t,token:n}),this.length++}insertElementAfterBookmark(t,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:St.ELEMENT_ENTRY,element:t,token:n}),this.length++}removeEntry(t){for(let n=this.length-1;n>=0;n--)if(this.entries[n]===t){this.entries.splice(n,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const t=this.entries.pop();if(this.length--,t.type===St.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===St.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===t)return r}return null}getElementEntry(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===St.ELEMENT_ENTRY&&r.element===t)return r}return null}};Bn.MARKER_ENTRY="MARKER_ENTRY",Bn.ELEMENT_ENTRY="ELEMENT_ENTRY";var sl=Bn;let $i=class{constructor(t){const n={},r=this._getOverriddenMethods(this,n);for(const i of Object.keys(r))typeof r[i]=="function"&&(n[i]=t[i],t[i]=r[i])}_getOverriddenMethods(){throw new Error("Not implemented")}};$i.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let i=0;i<e.__mixins.length;i++)if(e.__mixins[i].constructor===t)return e.__mixins[i];const r=new t(e,n);return e.__mixins.push(r),r};var it=$i;const al=it;var Xi=class extends al{constructor(t){super(t),this.preprocessor=t,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(t,n){return{advance(){const r=this.pos+1,i=this.html[r];return t.isEol&&(t.isEol=!1,t.line++,t.lineStartPos=r),(i===`
|
|
8
|
+
`||i==="\r"&&this.html[r+1]!==`
|
|
9
|
+
`)&&(t.isEol=!0),t.col=r-t.lineStartPos+1,t.offset=t.droppedBufferSize+r,n.advance.call(this)},retreat(){n.retreat.call(this),t.isEol=!1,t.col=this.pos-t.lineStartPos+1},dropParsedChunk(){const r=this.pos;n.dropParsedChunk.call(this);const i=r-this.pos;t.lineStartPos-=i,t.droppedBufferSize+=i,t.offset=t.droppedBufferSize+this.pos}}}};const Ji=it,wn=F1,ll=Xi;var Zi=class extends Ji{constructor(t){super(t),this.tokenizer=t,this.posTracker=Ji.install(t.preprocessor,ll),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const t=this.tokenizer.currentToken,n=this.tokenizer.currentAttr;t.location.attrs||(t.location.attrs=Object.create(null)),t.location.attrs[n.name]=this.currentAttrLocation}_getOverriddenMethods(t,n){const r={_createStartTagToken(){n._createStartTagToken.call(this),this.currentToken.location=t.ctLoc},_createEndTagToken(){n._createEndTagToken.call(this),this.currentToken.location=t.ctLoc},_createCommentToken(){n._createCommentToken.call(this),this.currentToken.location=t.ctLoc},_createDoctypeToken(i){n._createDoctypeToken.call(this,i),this.currentToken.location=t.ctLoc},_createCharacterToken(i,o){n._createCharacterToken.call(this,i,o),this.currentCharacterToken.location=t.ctLoc},_createEOFToken(){n._createEOFToken.call(this),this.currentToken.location=t._getCurrentLocation()},_createAttr(i){n._createAttr.call(this,i),t.currentAttrLocation=t._getCurrentLocation()},_leaveAttrName(i){n._leaveAttrName.call(this,i),t._attachCurrentAttrLocationInfo()},_leaveAttrValue(i){n._leaveAttrValue.call(this,i),t._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const i=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=i.startLine,this.currentCharacterToken.location.endCol=i.startCol,this.currentCharacterToken.location.endOffset=i.startOffset),this.currentToken.type===wn.EOF_TOKEN?(i.endLine=i.startLine,i.endCol=i.startCol,i.endOffset=i.startOffset):(i.endLine=t.posTracker.line,i.endCol=t.posTracker.col+1,i.endOffset=t.posTracker.offset+1),n._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const i=this.currentCharacterToken&&this.currentCharacterToken.location;i&&i.endOffset===-1&&(i.endLine=t.posTracker.line,i.endCol=t.posTracker.col,i.endOffset=t.posTracker.offset),n._emitCurrentCharacterToken.call(this)}};return Object.keys(wn.MODE).forEach(i=>{const o=wn.MODE[i];r[o]=function(s){t.ctLoc=t._getCurrentLocation(),n[o].call(this,s)}}),r}};const cl=it;var ul=class extends cl{constructor(t,n){super(t),this.onItemPop=n.onItemPop}_getOverriddenMethods(t,n){return{pop(){t.onItemPop(this.current),n.pop.call(this)},popAllUpToHtmlElement(){for(let r=this.stackTop;r>0;r--)t.onItemPop(this.items[r]);n.popAllUpToHtmlElement.call(this)},remove(r){t.onItemPop(this.current),n.remove.call(this,r)}}}};const Hn=it,eo=F1,hl=Zi,dl=ul,Fn=ve.TAG_NAMES;var fl=class extends Hn{constructor(t){super(t),this.parser=t,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(t){let n=null;this.lastStartTagToken&&(n=Object.assign({},this.lastStartTagToken.location),n.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(t,n)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,o=this.treeAdapter.getTagName(t),s=n.type===eo.END_TAG_TOKEN&&o===n.tagName,a={};s?(a.endTag=Object.assign({},i),a.endLine=i.endLine,a.endCol=i.endCol,a.endOffset=i.endOffset):(a.endLine=i.startLine,a.endCol=i.startCol,a.endOffset=i.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}_getOverriddenMethods(t,n){return{_bootstrap(r,i){n._bootstrap.call(this,r,i),t.lastStartTagToken=null,t.lastFosterParentingLocation=null,t.currentToken=null;const o=Hn.install(this.tokenizer,hl);t.posTracker=o.posTracker,Hn.install(this.openElements,dl,{onItemPop:function(s){t._setEndLocation(s,t.currentToken)}})},_runParsingLoop(r){n._runParsingLoop.call(this,r);for(let i=this.openElements.stackTop;i>=0;i--)t._setEndLocation(this.openElements.items[i],t.currentToken)},_processTokenInForeignContent(r){t.currentToken=r,n._processTokenInForeignContent.call(this,r)},_processToken(r){if(t.currentToken=r,n._processToken.call(this,r),r.type===eo.END_TAG_TOKEN&&(r.tagName===Fn.HTML||r.tagName===Fn.BODY&&this.openElements.hasInScope(Fn.BODY)))for(let o=this.openElements.stackTop;o>=0;o--){const s=this.openElements.items[o];if(this.treeAdapter.getTagName(s)===r.tagName){t._setEndLocation(s,r);break}}},_setDocumentType(r){n._setDocumentType.call(this,r);const i=this.treeAdapter.getChildNodes(this.document),o=i.length;for(let s=0;s<o;s++){const a=i[s];if(this.treeAdapter.isDocumentTypeNode(a)){this.treeAdapter.setNodeSourceCodeLocation(a,r.location);break}}},_attachElementToTree(r){t._setStartLocation(r),t.lastStartTagToken=null,n._attachElementToTree.call(this,r)},_appendElement(r,i){t.lastStartTagToken=r,n._appendElement.call(this,r,i)},_insertElement(r,i){t.lastStartTagToken=r,n._insertElement.call(this,r,i)},_insertTemplate(r){t.lastStartTagToken=r,n._insertTemplate.call(this,r);const i=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(i,null)},_insertFakeRootElement(){n._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(r,i){n._appendCommentNode.call(this,r,i);const o=this.treeAdapter.getChildNodes(i),s=o[o.length-1];this.treeAdapter.setNodeSourceCodeLocation(s,r.location)},_findFosterParentingLocation(){return t.lastFosterParentingLocation=n._findFosterParentingLocation.call(this),t.lastFosterParentingLocation},_insertCharacters(r){n._insertCharacters.call(this,r);const i=this._shouldFosterParentOnInsertion(),o=i&&t.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,s=this.treeAdapter.getChildNodes(o),a=i&&t.lastFosterParentingLocation.beforeElement?s.indexOf(t.lastFosterParentingLocation.beforeElement)-1:s.length-1,c=s[a];if(this.treeAdapter.getNodeSourceCodeLocation(c)){const{endLine:h,endCol:m,endOffset:g}=r.location;this.treeAdapter.updateNodeSourceCodeLocation(c,{endLine:h,endCol:m,endOffset:g})}else this.treeAdapter.setNodeSourceCodeLocation(c,r.location)}}}};const ml=it;var vn=class extends ml{constructor(t,n){super(t),this.posTracker=null,this.onParseError=n.onParseError}_setErrorLocation(t){t.startLine=t.endLine=this.posTracker.line,t.startCol=t.endCol=this.posTracker.col,t.startOffset=t.endOffset=this.posTracker.offset}_reportError(t){const n={code:t,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(n),this.onParseError(n)}_getOverriddenMethods(t){return{_err(n){t._reportError(n)}}}};const Tl=vn,pl=Xi,El=it;var gl=class extends Tl{constructor(t,n){super(t,n),this.posTracker=El.install(t,pl),this.lastErrOffset=-1}_reportError(t){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(t))}};const Al=vn,_l=gl,Cl=it;var Sl=class extends Al{constructor(t,n){super(t,n);const r=Cl.install(t.preprocessor,_l,n);this.posTracker=r.posTracker}};const Nl=vn,kl=Sl,Il=Zi,to=it;var Ol=class extends Nl{constructor(t,n){super(t,n),this.opts=n,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(t){this.ctLoc&&(t.startLine=this.ctLoc.startLine,t.startCol=this.ctLoc.startCol,t.startOffset=this.ctLoc.startOffset,t.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,t.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,t.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(t,n){return{_bootstrap(r,i){n._bootstrap.call(this,r,i),to.install(this.tokenizer,kl,t.opts),to.install(this.tokenizer,Il)},_processInputToken(r){t.ctLoc=r.location,n._processInputToken.call(this,r)},_err(r,i){t.locBeforeToken=i&&i.beforeToken,t._reportError(r)}}}},Q={};const{DOCUMENT_MODE:xl}=ve;Q.createDocument=function(){return{nodeName:"#document",mode:xl.NO_QUIRKS,childNodes:[]}},Q.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},Q.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},Q.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const no=function(e){return{nodeName:"#text",value:e,parentNode:null}},ro=Q.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},yl=Q.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};Q.setTemplateContent=function(e,t){e.content=t},Q.getTemplateContent=function(e){return e.content},Q.setDocumentType=function(e,t,n,r){let i=null;for(let o=0;o<e.childNodes.length;o++)if(e.childNodes[o].nodeName==="#documentType"){i=e.childNodes[o];break}i?(i.name=t,i.publicId=n,i.systemId=r):ro(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r})},Q.setDocumentMode=function(e,t){e.mode=t},Q.getDocumentMode=function(e){return e.mode},Q.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},Q.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if(n.nodeName==="#text"){n.value+=t;return}}ro(e,no(t))},Q.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&r.nodeName==="#text"?r.value+=t:yl(e,no(t),n)},Q.adoptAttributes=function(e,t){const n=[];for(let r=0;r<e.attrs.length;r++)n.push(e.attrs[r].name);for(let r=0;r<t.length;r++)n.indexOf(t[r].name)===-1&&e.attrs.push(t[r])},Q.getFirstChild=function(e){return e.childNodes[0]},Q.getChildNodes=function(e){return e.childNodes},Q.getParentNode=function(e){return e.parentNode},Q.getAttrList=function(e){return e.attrs},Q.getTagName=function(e){return e.tagName},Q.getNamespaceURI=function(e){return e.namespaceURI},Q.getTextNodeContent=function(e){return e.value},Q.getCommentNodeContent=function(e){return e.data},Q.getDocumentTypeNodeName=function(e){return e.name},Q.getDocumentTypeNodePublicId=function(e){return e.publicId},Q.getDocumentTypeNodeSystemId=function(e){return e.systemId},Q.isTextNode=function(e){return e.nodeName==="#text"},Q.isCommentNode=function(e){return e.nodeName==="#comment"},Q.isDocumentTypeNode=function(e){return e.nodeName==="#documentType"},Q.isElementNode=function(e){return!!e.tagName},Q.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t},Q.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation},Q.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t)};var Rl=function(t,n){return n=n||Object.create(null),[t,n].reduce((r,i)=>(Object.keys(i).forEach(o=>{r[o]=i[o]}),r),Object.create(null))},G1={};const{DOCUMENT_MODE:Ht}=ve,io="html",bl="about:legacy-compat",Ml="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",oo=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Ll=oo.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),Pl=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],so=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Dl=so.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function ao(e){const t=e.indexOf('"')!==-1?"'":'"';return t+e+t}function lo(e,t){for(let n=0;n<t.length;n++)if(e.indexOf(t[n])===0)return!0;return!1}G1.isConforming=function(e){return e.name===io&&e.publicId===null&&(e.systemId===null||e.systemId===bl)},G1.getDocumentMode=function(e){if(e.name!==io)return Ht.QUIRKS;const t=e.systemId;if(t&&t.toLowerCase()===Ml)return Ht.QUIRKS;let n=e.publicId;if(n!==null){if(n=n.toLowerCase(),Pl.indexOf(n)>-1)return Ht.QUIRKS;let r=t===null?Ll:oo;if(lo(n,r))return Ht.QUIRKS;if(r=t===null?so:Dl,lo(n,r))return Ht.LIMITED_QUIRKS}return Ht.NO_QUIRKS},G1.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+ao(t):n&&(r+=" SYSTEM"),n!==null&&(r+=" "+ao(n)),r};var Tt={};const Un=F1,Gn=ve,D=Gn.TAG_NAMES,ge=Gn.NAMESPACES,K1=Gn.ATTRS,co={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Bl="definitionurl",wl="definitionURL",Hl={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Fl={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:ge.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:ge.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:ge.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:ge.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:ge.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:ge.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:ge.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:ge.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:ge.XML},"xml:space":{prefix:"xml",name:"space",namespace:ge.XML},xmlns:{prefix:"",name:"xmlns",namespace:ge.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}},vl=Tt.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Ul={[D.B]:!0,[D.BIG]:!0,[D.BLOCKQUOTE]:!0,[D.BODY]:!0,[D.BR]:!0,[D.CENTER]:!0,[D.CODE]:!0,[D.DD]:!0,[D.DIV]:!0,[D.DL]:!0,[D.DT]:!0,[D.EM]:!0,[D.EMBED]:!0,[D.H1]:!0,[D.H2]:!0,[D.H3]:!0,[D.H4]:!0,[D.H5]:!0,[D.H6]:!0,[D.HEAD]:!0,[D.HR]:!0,[D.I]:!0,[D.IMG]:!0,[D.LI]:!0,[D.LISTING]:!0,[D.MENU]:!0,[D.META]:!0,[D.NOBR]:!0,[D.OL]:!0,[D.P]:!0,[D.PRE]:!0,[D.RUBY]:!0,[D.S]:!0,[D.SMALL]:!0,[D.SPAN]:!0,[D.STRONG]:!0,[D.STRIKE]:!0,[D.SUB]:!0,[D.SUP]:!0,[D.TABLE]:!0,[D.TT]:!0,[D.U]:!0,[D.UL]:!0,[D.VAR]:!0};Tt.causesExit=function(e){const t=e.tagName;return t===D.FONT&&(Un.getTokenAttr(e,K1.COLOR)!==null||Un.getTokenAttr(e,K1.SIZE)!==null||Un.getTokenAttr(e,K1.FACE)!==null)?!0:Ul[t]},Tt.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Bl){e.attrs[t].name=wl;break}},Tt.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=Hl[e.attrs[t].name];n&&(e.attrs[t].name=n)}},Tt.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=Fl[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}},Tt.adjustTokenSVGTagName=function(e){const t=vl[e.tagName];t&&(e.tagName=t)};function Gl(e,t){return t===ge.MATHML&&(e===D.MI||e===D.MO||e===D.MN||e===D.MS||e===D.MTEXT)}function Kl(e,t,n){if(t===ge.MATHML&&e===D.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===K1.ENCODING){const i=n[r].value.toLowerCase();return i===co.TEXT_HTML||i===co.APPLICATION_XML}}return t===ge.SVG&&(e===D.FOREIGN_OBJECT||e===D.DESC||e===D.TITLE)}Tt.isIntegrationPoint=function(e,t,n,r){return!!((!r||r===ge.HTML)&&Kl(e,t,n)||(!r||r===ge.MATHML)&&Gl(e,t))};const f=F1,zl=ol,uo=sl,Yl=fl,ql=Ol,ho=it,jl=Q,Wl=Rl,fo=G1,Qe=Tt,Ae=Sn,Ql=we,xt=ve,l=xt.TAG_NAMES,L=xt.NAMESPACES,mo=xt.ATTRS,Vl={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:jl},To="hidden",$l=8,Xl=3,po="INITIAL_MODE",Kn="BEFORE_HTML_MODE",z1="BEFORE_HEAD_MODE",Ft="IN_HEAD_MODE",Eo="IN_HEAD_NO_SCRIPT_MODE",Y1="AFTER_HEAD_MODE",Ve="IN_BODY_MODE",q1="TEXT_MODE",Ce="IN_TABLE_MODE",go="IN_TABLE_TEXT_MODE",j1="IN_CAPTION_MODE",s1="IN_COLUMN_GROUP_MODE",be="IN_TABLE_BODY_MODE",ot="IN_ROW_MODE",W1="IN_CELL_MODE",zn="IN_SELECT_MODE",Yn="IN_SELECT_IN_TABLE_MODE",Q1="IN_TEMPLATE_MODE",qn="AFTER_BODY_MODE",V1="IN_FRAMESET_MODE",Ao="AFTER_FRAMESET_MODE",_o="AFTER_AFTER_BODY_MODE",Co="AFTER_AFTER_FRAMESET_MODE",Jl={[l.TR]:ot,[l.TBODY]:be,[l.THEAD]:be,[l.TFOOT]:be,[l.CAPTION]:j1,[l.COLGROUP]:s1,[l.TABLE]:Ce,[l.BODY]:Ve,[l.FRAMESET]:V1},Zl={[l.CAPTION]:Ce,[l.COLGROUP]:Ce,[l.TBODY]:Ce,[l.TFOOT]:Ce,[l.THEAD]:Ce,[l.COL]:s1,[l.TR]:be,[l.TD]:ot,[l.TH]:ot},So={[po]:{[f.CHARACTER_TOKEN]:l1,[f.NULL_CHARACTER_TOKEN]:l1,[f.WHITESPACE_CHARACTER_TOKEN]:j,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:cc,[f.START_TAG_TOKEN]:l1,[f.END_TAG_TOKEN]:l1,[f.EOF_TOKEN]:l1},[Kn]:{[f.CHARACTER_TOKEN]:c1,[f.NULL_CHARACTER_TOKEN]:c1,[f.WHITESPACE_CHARACTER_TOKEN]:j,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:uc,[f.END_TAG_TOKEN]:hc,[f.EOF_TOKEN]:c1},[z1]:{[f.CHARACTER_TOKEN]:u1,[f.NULL_CHARACTER_TOKEN]:u1,[f.WHITESPACE_CHARACTER_TOKEN]:j,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:$1,[f.START_TAG_TOKEN]:dc,[f.END_TAG_TOKEN]:fc,[f.EOF_TOKEN]:u1},[Ft]:{[f.CHARACTER_TOKEN]:h1,[f.NULL_CHARACTER_TOKEN]:h1,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:$1,[f.START_TAG_TOKEN]:Te,[f.END_TAG_TOKEN]:yt,[f.EOF_TOKEN]:h1},[Eo]:{[f.CHARACTER_TOKEN]:d1,[f.NULL_CHARACTER_TOKEN]:d1,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:$1,[f.START_TAG_TOKEN]:mc,[f.END_TAG_TOKEN]:Tc,[f.EOF_TOKEN]:d1},[Y1]:{[f.CHARACTER_TOKEN]:f1,[f.NULL_CHARACTER_TOKEN]:f1,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:$1,[f.START_TAG_TOKEN]:pc,[f.END_TAG_TOKEN]:Ec,[f.EOF_TOKEN]:f1},[Ve]:{[f.CHARACTER_TOKEN]:X1,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:Ne,[f.END_TAG_TOKEN]:jn,[f.EOF_TOKEN]:at},[q1]:{[f.CHARACTER_TOKEN]:Se,[f.NULL_CHARACTER_TOKEN]:Se,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:j,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:j,[f.END_TAG_TOKEN]:Qc,[f.EOF_TOKEN]:Vc},[Ce]:{[f.CHARACTER_TOKEN]:lt,[f.NULL_CHARACTER_TOKEN]:lt,[f.WHITESPACE_CHARACTER_TOKEN]:lt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:Wn,[f.END_TAG_TOKEN]:Qn,[f.EOF_TOKEN]:at},[go]:{[f.CHARACTER_TOKEN]:ou,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:iu,[f.COMMENT_TOKEN]:m1,[f.DOCTYPE_TOKEN]:m1,[f.START_TAG_TOKEN]:m1,[f.END_TAG_TOKEN]:m1,[f.EOF_TOKEN]:m1},[j1]:{[f.CHARACTER_TOKEN]:X1,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:su,[f.END_TAG_TOKEN]:au,[f.EOF_TOKEN]:at},[s1]:{[f.CHARACTER_TOKEN]:J1,[f.NULL_CHARACTER_TOKEN]:J1,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:lu,[f.END_TAG_TOKEN]:cu,[f.EOF_TOKEN]:at},[be]:{[f.CHARACTER_TOKEN]:lt,[f.NULL_CHARACTER_TOKEN]:lt,[f.WHITESPACE_CHARACTER_TOKEN]:lt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:uu,[f.END_TAG_TOKEN]:hu,[f.EOF_TOKEN]:at},[ot]:{[f.CHARACTER_TOKEN]:lt,[f.NULL_CHARACTER_TOKEN]:lt,[f.WHITESPACE_CHARACTER_TOKEN]:lt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:du,[f.END_TAG_TOKEN]:fu,[f.EOF_TOKEN]:at},[W1]:{[f.CHARACTER_TOKEN]:X1,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:mu,[f.END_TAG_TOKEN]:Tu,[f.EOF_TOKEN]:at},[zn]:{[f.CHARACTER_TOKEN]:Se,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:Mo,[f.END_TAG_TOKEN]:Lo,[f.EOF_TOKEN]:at},[Yn]:{[f.CHARACTER_TOKEN]:Se,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:pu,[f.END_TAG_TOKEN]:Eu,[f.EOF_TOKEN]:at},[Q1]:{[f.CHARACTER_TOKEN]:X1,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:gu,[f.END_TAG_TOKEN]:Au,[f.EOF_TOKEN]:Po},[qn]:{[f.CHARACTER_TOKEN]:Z1,[f.NULL_CHARACTER_TOKEN]:Z1,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:lc,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:_u,[f.END_TAG_TOKEN]:Cu,[f.EOF_TOKEN]:a1},[V1]:{[f.CHARACTER_TOKEN]:j,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:Su,[f.END_TAG_TOKEN]:Nu,[f.EOF_TOKEN]:a1},[Ao]:{[f.CHARACTER_TOKEN]:j,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Se,[f.COMMENT_TOKEN]:de,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:ku,[f.END_TAG_TOKEN]:Iu,[f.EOF_TOKEN]:a1},[_o]:{[f.CHARACTER_TOKEN]:en,[f.NULL_CHARACTER_TOKEN]:en,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:No,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:Ou,[f.END_TAG_TOKEN]:en,[f.EOF_TOKEN]:a1},[Co]:{[f.CHARACTER_TOKEN]:j,[f.NULL_CHARACTER_TOKEN]:j,[f.WHITESPACE_CHARACTER_TOKEN]:Rt,[f.COMMENT_TOKEN]:No,[f.DOCTYPE_TOKEN]:j,[f.START_TAG_TOKEN]:xu,[f.END_TAG_TOKEN]:j,[f.EOF_TOKEN]:a1}};class ec{constructor(t){this.options=Wl(Vl,t),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&ho.install(this,Yl),this.options.onParseError&&ho.install(this,ql,{onParseError:this.options.onParseError})}parse(t){const n=this.treeAdapter.createDocument();return this._bootstrap(n,null),this.tokenizer.write(t,!0),this._runParsingLoop(null),n}parseFragment(t,n){n||(n=this.treeAdapter.createElement(l.TEMPLATE,L.HTML,[]));const r=this.treeAdapter.createElement("documentmock",L.HTML,[]);this._bootstrap(r,n),this.treeAdapter.getTagName(n)===l.TEMPLATE&&this._pushTmplInsertionMode(Q1),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(t,!0),this._runParsingLoop(null);const i=this.treeAdapter.getFirstChild(r),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(i,o),o}_bootstrap(t,n){this.tokenizer=new f(this.options),this.stopped=!1,this.insertionMode=po,this.originalInsertionMode="",this.document=t,this.fragmentContext=n,this.headElement=null,this.formElement=null,this.openElements=new zl(this.document,this.treeAdapter),this.activeFormattingElements=new uo(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(t){for(;!this.stopped;){this._setupTokenizerCDATAMode();const n=this.tokenizer.getNextToken();if(n.type===f.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,n.type===f.WHITESPACE_CHARACTER_TOKEN&&n.chars[0]===`
|
|
10
|
+
`)){if(n.chars.length===1)continue;n.chars=n.chars.substr(1)}if(this._processInputToken(n),t&&this.pendingScript)break}}runParsingLoopForCurrentChunk(t,n){if(this._runParsingLoop(n),n&&this.pendingScript){const r=this.pendingScript;this.pendingScript=null,n(r);return}t&&t()}_setupTokenizerCDATAMode(){const t=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=t&&t!==this.document&&this.treeAdapter.getNamespaceURI(t)!==L.HTML&&!this._isIntegrationPoint(t)}_switchToTextParsing(t,n){this._insertElement(t,L.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=q1}switchToPlaintextParsing(){this.insertionMode=q1,this.originalInsertionMode=Ve,this.tokenizer.state=f.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;do{if(this.treeAdapter.getTagName(t)===l.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}while(t)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===L.HTML){const t=this.treeAdapter.getTagName(this.fragmentContext);t===l.TITLE||t===l.TEXTAREA?this.tokenizer.state=f.MODE.RCDATA:t===l.STYLE||t===l.XMP||t===l.IFRAME||t===l.NOEMBED||t===l.NOFRAMES||t===l.NOSCRIPT?this.tokenizer.state=f.MODE.RAWTEXT:t===l.SCRIPT?this.tokenizer.state=f.MODE.SCRIPT_DATA:t===l.PLAINTEXT&&(this.tokenizer.state=f.MODE.PLAINTEXT)}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";this.treeAdapter.setDocumentType(this.document,n,r,i)}_attachElementToTree(t){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(n,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r),this.openElements.push(r)}_insertFakeElement(t){const n=this.treeAdapter.createElement(t,L.HTML,[]);this._attachElementToTree(n),this.openElements.push(n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,L.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n),this.openElements.push(n)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(l.HTML,L.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r)}_insertCharacters(t){if(this._shouldFosterParentOnInsertion())this._fosterParentText(t.chars);else{const n=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(n,t.chars)}}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_shouldProcessTokenInForeignContent(t){const n=this._getAdjustedCurrentElement();if(!n||n===this.document)return!1;const r=this.treeAdapter.getNamespaceURI(n);if(r===L.HTML||this.treeAdapter.getTagName(n)===l.ANNOTATION_XML&&r===L.MATHML&&t.type===f.START_TAG_TOKEN&&t.tagName===l.SVG)return!1;const i=t.type===f.CHARACTER_TOKEN||t.type===f.NULL_CHARACTER_TOKEN||t.type===f.WHITESPACE_CHARACTER_TOKEN;return(t.type===f.START_TAG_TOKEN&&t.tagName!==l.MGLYPH&&t.tagName!==l.MALIGNMARK||i)&&this._isIntegrationPoint(n,L.MATHML)||(t.type===f.START_TAG_TOKEN||i)&&this._isIntegrationPoint(n,L.HTML)?!1:t.type!==f.EOF_TOKEN}_processToken(t){So[this.insertionMode][t.type](this,t)}_processTokenInBodyMode(t){So[Ve][t.type](this,t)}_processTokenInForeignContent(t){t.type===f.CHARACTER_TOKEN?Ru(this,t):t.type===f.NULL_CHARACTER_TOKEN?yu(this,t):t.type===f.WHITESPACE_CHARACTER_TOKEN?Se(this,t):t.type===f.COMMENT_TOKEN?de(this,t):t.type===f.START_TAG_TOKEN?bu(this,t):t.type===f.END_TAG_TOKEN&&Mu(this,t)}_processInputToken(t){this._shouldProcessTokenInForeignContent(t)?this._processTokenInForeignContent(t):this._processToken(t),t.type===f.START_TAG_TOKEN&&t.selfClosing&&!t.ackSelfClosing&&this._err(Ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(t,n){const r=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return Qe.isIntegrationPoint(r,i,o,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.length;if(t){let n=t,r=null;do if(n--,r=this.activeFormattingElements.entries[n],r.type===uo.MARKER_ENTRY||this.openElements.contains(r.element)){n++;break}while(n>0);for(let i=n;i<t;i++)r=this.activeFormattingElements.entries[i],this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=ot}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop,n=!1;t>=0;t--){let r=this.openElements.items[t];t===0&&(n=!0,this.fragmentContext&&(r=this.fragmentContext));const i=this.treeAdapter.getTagName(r),o=Jl[i];if(o){this.insertionMode=o;break}else if(!n&&(i===l.TD||i===l.TH)){this.insertionMode=W1;break}else if(!n&&i===l.HEAD){this.insertionMode=Ft;break}else if(i===l.SELECT){this._resetInsertionModeForSelect(t);break}else if(i===l.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(i===l.HTML){this.insertionMode=this.headElement?Y1:z1;break}else if(n){this.insertionMode=Ve;break}}}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.items[n],i=this.treeAdapter.getTagName(r);if(i===l.TEMPLATE)break;if(i===l.TABLE){this.insertionMode=Yn;return}}this.insertionMode=zn}_pushTmplInsertionMode(t){this.tmplInsertionModeStack.push(t),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=t}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(t){const n=this.treeAdapter.getTagName(t);return n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const t={parent:null,beforeElement:null};for(let n=this.openElements.stackTop;n>=0;n--){const r=this.openElements.items[n],i=this.treeAdapter.getTagName(r),o=this.treeAdapter.getNamespaceURI(r);if(i===l.TEMPLATE&&o===L.HTML){t.parent=this.treeAdapter.getTemplateContent(r);break}else if(i===l.TABLE){t.parent=this.treeAdapter.getParentNode(r),t.parent?t.beforeElement=r:t.parent=this.openElements.items[n-1];break}}return t.parent||(t.parent=this.openElements.items[0]),t}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_fosterParentText(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertTextBefore(n.parent,t,n.beforeElement):this.treeAdapter.insertText(n.parent,t)}_isSpecialElement(t){const n=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t);return xt.SPECIAL_ELEMENTS[r][n]}}var tc=ec;function nc(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ue(e,t),n}function rc(e,t){let n=null;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function ic(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,s=i;s!==n;o++,s=i){i=e.openElements.getCommonAncestor(s);const a=e.activeFormattingElements.getElementEntry(s),c=a&&o>=Xl;!a||c?(c&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(s)):(s=oc(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function oc(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function sc(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===l.TEMPLATE&&i===L.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ac(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function pt(e,t){let n;for(let r=0;r<$l&&(n=nc(e,t),!!n);r++){const i=rc(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const o=ic(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(o),sc(e,s,o),ac(e,i,n)}}function j(){}function $1(e){e._err(Ae.misplacedDoctype)}function de(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function lc(e,t){e._appendCommentNode(t,e.openElements.items[0])}function No(e,t){e._appendCommentNode(t,e.document)}function Se(e,t){e._insertCharacters(t)}function a1(e){e.stopped=!0}function cc(e,t){e._setDocumentType(t);const n=t.forceQuirks?xt.DOCUMENT_MODE.QUIRKS:fo.getDocumentMode(t);fo.isConforming(t)||e._err(Ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Kn}function l1(e,t){e._err(Ae.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,xt.DOCUMENT_MODE.QUIRKS),e.insertionMode=Kn,e._processToken(t)}function uc(e,t){t.tagName===l.HTML?(e._insertElement(t,L.HTML),e.insertionMode=z1):c1(e,t)}function hc(e,t){const n=t.tagName;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&c1(e,t)}function c1(e,t){e._insertFakeRootElement(),e.insertionMode=z1,e._processToken(t)}function dc(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.HEAD?(e._insertElement(t,L.HTML),e.headElement=e.openElements.current,e.insertionMode=Ft):u1(e,t)}function fc(e,t){const n=t.tagName;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?u1(e,t):e._err(Ae.endTagWithoutMatchingOpenElement)}function u1(e,t){e._insertFakeElement(l.HEAD),e.headElement=e.openElements.current,e.insertionMode=Ft,e._processToken(t)}function Te(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.BASE||n===l.BASEFONT||n===l.BGSOUND||n===l.LINK||n===l.META?(e._appendElement(t,L.HTML),t.ackSelfClosing=!0):n===l.TITLE?e._switchToTextParsing(t,f.MODE.RCDATA):n===l.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,f.MODE.RAWTEXT):(e._insertElement(t,L.HTML),e.insertionMode=Eo):n===l.NOFRAMES||n===l.STYLE?e._switchToTextParsing(t,f.MODE.RAWTEXT):n===l.SCRIPT?e._switchToTextParsing(t,f.MODE.SCRIPT_DATA):n===l.TEMPLATE?(e._insertTemplate(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Q1,e._pushTmplInsertionMode(Q1)):n===l.HEAD?e._err(Ae.misplacedStartTagForHeadElement):h1(e,t)}function yt(e,t){const n=t.tagName;n===l.HEAD?(e.openElements.pop(),e.insertionMode=Y1):n===l.BODY||n===l.BR||n===l.HTML?h1(e,t):n===l.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==l.TEMPLATE&&e._err(Ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(Ae.endTagWithoutMatchingOpenElement)}function h1(e,t){e.openElements.pop(),e.insertionMode=Y1,e._processToken(t)}function mc(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.BASEFONT||n===l.BGSOUND||n===l.HEAD||n===l.LINK||n===l.META||n===l.NOFRAMES||n===l.STYLE?Te(e,t):n===l.NOSCRIPT?e._err(Ae.nestedNoscriptInHead):d1(e,t)}function Tc(e,t){const n=t.tagName;n===l.NOSCRIPT?(e.openElements.pop(),e.insertionMode=Ft):n===l.BR?d1(e,t):e._err(Ae.endTagWithoutMatchingOpenElement)}function d1(e,t){const n=t.type===f.EOF_TOKEN?Ae.openElementsLeftAfterEof:Ae.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode=Ft,e._processToken(t)}function pc(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.BODY?(e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=Ve):n===l.FRAMESET?(e._insertElement(t,L.HTML),e.insertionMode=V1):n===l.BASE||n===l.BASEFONT||n===l.BGSOUND||n===l.LINK||n===l.META||n===l.NOFRAMES||n===l.SCRIPT||n===l.STYLE||n===l.TEMPLATE||n===l.TITLE?(e._err(Ae.abandonedHeadElementChild),e.openElements.push(e.headElement),Te(e,t),e.openElements.remove(e.headElement)):n===l.HEAD?e._err(Ae.misplacedStartTagForHeadElement):f1(e,t)}function Ec(e,t){const n=t.tagName;n===l.BODY||n===l.HTML||n===l.BR?f1(e,t):n===l.TEMPLATE?yt(e,t):e._err(Ae.endTagWithoutMatchingOpenElement)}function f1(e,t){e._insertFakeElement(l.BODY),e.insertionMode=Ve,e._processToken(t)}function Rt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function X1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function gc(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Ac(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function _c(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,L.HTML),e.insertionMode=V1)}function st(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function Cc(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement();const n=e.openElements.currentTagName;(n===l.H1||n===l.H2||n===l.H3||n===l.H4||n===l.H5||n===l.H6)&&e.openElements.pop(),e._insertElement(t,L.HTML)}function ko(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Sc(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML),n||(e.formElement=e.openElements.current))}function Nc(e,t){e.framesetOk=!1;const n=t.tagName;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.items[r],o=e.treeAdapter.getTagName(i);let s=null;if(n===l.LI&&o===l.LI?s=l.LI:(n===l.DD||n===l.DT)&&(o===l.DD||o===l.DT)&&(s=o),s){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(o!==l.ADDRESS&&o!==l.DIV&&o!==l.P&&e._isSpecialElement(i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function kc(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.tokenizer.state=f.MODE.PLAINTEXT}function Ic(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1}function Oc(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(l.A);n&&(pt(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xc(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(pt(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Io(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function yc(e,t){e.treeAdapter.getDocumentMode(e.document)!==xt.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=Ce}function Ut(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Rc(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML);const n=f.getTokenAttr(t,mo.TYPE);(!n||n.toLowerCase()!==To)&&(e.framesetOk=!1),t.ackSelfClosing=!0}function Oo(e,t){e._appendElement(t,L.HTML),t.ackSelfClosing=!0}function bc(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mc(e,t){t.tagName=l.IMG,Ut(e,t)}function Lc(e,t){e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.tokenizer.state=f.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q1}function Pc(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,f.MODE.RAWTEXT)}function Dc(e,t){e.framesetOk=!1,e._switchToTextParsing(t,f.MODE.RAWTEXT)}function xo(e,t){e._switchToTextParsing(t,f.MODE.RAWTEXT)}function Bc(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode===Ce||e.insertionMode===j1||e.insertionMode===be||e.insertionMode===ot||e.insertionMode===W1?e.insertionMode=Yn:e.insertionMode=zn}function yo(e,t){e.openElements.currentTagName===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Ro(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,L.HTML)}function wc(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,L.HTML)}function Hc(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function Fc(e,t){e._reconstructActiveFormattingElements(),Qe.adjustTokenMathMLAttrs(t),Qe.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,L.MATHML):e._insertElement(t,L.MATHML),t.ackSelfClosing=!0}function vc(e,t){e._reconstructActiveFormattingElements(),Qe.adjustTokenSVGAttrs(t),Qe.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,L.SVG):e._insertElement(t,L.SVG),t.ackSelfClosing=!0}function Me(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Ne(e,t){const n=t.tagName;switch(n.length){case 1:n===l.I||n===l.S||n===l.B||n===l.U?vt(e,t):n===l.P?st(e,t):n===l.A?Oc(e,t):Me(e,t);break;case 2:n===l.DL||n===l.OL||n===l.UL?st(e,t):n===l.H1||n===l.H2||n===l.H3||n===l.H4||n===l.H5||n===l.H6?Cc(e,t):n===l.LI||n===l.DD||n===l.DT?Nc(e,t):n===l.EM||n===l.TT?vt(e,t):n===l.BR?Ut(e,t):n===l.HR?bc(e,t):n===l.RB?Ro(e,t):n===l.RT||n===l.RP?wc(e,t):n!==l.TH&&n!==l.TD&&n!==l.TR&&Me(e,t);break;case 3:n===l.DIV||n===l.DIR||n===l.NAV?st(e,t):n===l.PRE?ko(e,t):n===l.BIG?vt(e,t):n===l.IMG||n===l.WBR?Ut(e,t):n===l.XMP?Pc(e,t):n===l.SVG?vc(e,t):n===l.RTC?Ro(e,t):n!==l.COL&&Me(e,t);break;case 4:n===l.HTML?gc(e,t):n===l.BASE||n===l.LINK||n===l.META?Te(e,t):n===l.BODY?Ac(e,t):n===l.MAIN||n===l.MENU?st(e,t):n===l.FORM?Sc(e,t):n===l.CODE||n===l.FONT?vt(e,t):n===l.NOBR?xc(e,t):n===l.AREA?Ut(e,t):n===l.MATH?Fc(e,t):n===l.MENU?Hc(e,t):n!==l.HEAD&&Me(e,t);break;case 5:n===l.STYLE||n===l.TITLE?Te(e,t):n===l.ASIDE?st(e,t):n===l.SMALL?vt(e,t):n===l.TABLE?yc(e,t):n===l.EMBED?Ut(e,t):n===l.INPUT?Rc(e,t):n===l.PARAM||n===l.TRACK?Oo(e,t):n===l.IMAGE?Mc(e,t):n!==l.FRAME&&n!==l.TBODY&&n!==l.TFOOT&&n!==l.THEAD&&Me(e,t);break;case 6:n===l.SCRIPT?Te(e,t):n===l.CENTER||n===l.FIGURE||n===l.FOOTER||n===l.HEADER||n===l.HGROUP||n===l.DIALOG?st(e,t):n===l.BUTTON?Ic(e,t):n===l.STRIKE||n===l.STRONG?vt(e,t):n===l.APPLET||n===l.OBJECT?Io(e,t):n===l.KEYGEN?Ut(e,t):n===l.SOURCE?Oo(e,t):n===l.IFRAME?Dc(e,t):n===l.SELECT?Bc(e,t):n===l.OPTION?yo(e,t):Me(e,t);break;case 7:n===l.BGSOUND?Te(e,t):n===l.DETAILS||n===l.ADDRESS||n===l.ARTICLE||n===l.SECTION||n===l.SUMMARY?st(e,t):n===l.LISTING?ko(e,t):n===l.MARQUEE?Io(e,t):n===l.NOEMBED?xo(e,t):n!==l.CAPTION&&Me(e,t);break;case 8:n===l.BASEFONT?Te(e,t):n===l.FRAMESET?_c(e,t):n===l.FIELDSET?st(e,t):n===l.TEXTAREA?Lc(e,t):n===l.TEMPLATE?Te(e,t):n===l.NOSCRIPT?e.options.scriptingEnabled?xo(e,t):Me(e,t):n===l.OPTGROUP?yo(e,t):n!==l.COLGROUP&&Me(e,t);break;case 9:n===l.PLAINTEXT?kc(e,t):Me(e,t);break;case 10:n===l.BLOCKQUOTE||n===l.FIGCAPTION?st(e,t):Me(e,t);break;default:Me(e,t)}}function Uc(e){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=qn)}function Gc(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=qn,e._processToken(t))}function Et(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Kc(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):e.openElements.remove(n))}function zc(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(l.P),e._closePElement()}function Yc(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function qc(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jc(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function bo(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Wc(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(l.BR),e.openElements.pop(),e.framesetOk=!1}function Ue(e,t){const n=t.tagName;for(let r=e.openElements.stackTop;r>0;r--){const i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function jn(e,t){const n=t.tagName;switch(n.length){case 1:n===l.A||n===l.B||n===l.I||n===l.S||n===l.U?pt(e,t):n===l.P?zc(e):Ue(e,t);break;case 2:n===l.DL||n===l.UL||n===l.OL?Et(e,t):n===l.LI?Yc(e):n===l.DD||n===l.DT?qc(e,t):n===l.H1||n===l.H2||n===l.H3||n===l.H4||n===l.H5||n===l.H6?jc(e):n===l.BR?Wc(e):n===l.EM||n===l.TT?pt(e,t):Ue(e,t);break;case 3:n===l.BIG?pt(e,t):n===l.DIR||n===l.DIV||n===l.NAV||n===l.PRE?Et(e,t):Ue(e,t);break;case 4:n===l.BODY?Uc(e):n===l.HTML?Gc(e,t):n===l.FORM?Kc(e):n===l.CODE||n===l.FONT||n===l.NOBR?pt(e,t):n===l.MAIN||n===l.MENU?Et(e,t):Ue(e,t);break;case 5:n===l.ASIDE?Et(e,t):n===l.SMALL?pt(e,t):Ue(e,t);break;case 6:n===l.CENTER||n===l.FIGURE||n===l.FOOTER||n===l.HEADER||n===l.HGROUP||n===l.DIALOG?Et(e,t):n===l.APPLET||n===l.OBJECT?bo(e,t):n===l.STRIKE||n===l.STRONG?pt(e,t):Ue(e,t);break;case 7:n===l.ADDRESS||n===l.ARTICLE||n===l.DETAILS||n===l.SECTION||n===l.SUMMARY||n===l.LISTING?Et(e,t):n===l.MARQUEE?bo(e,t):Ue(e,t);break;case 8:n===l.FIELDSET?Et(e,t):n===l.TEMPLATE?yt(e,t):Ue(e,t);break;case 10:n===l.BLOCKQUOTE||n===l.FIGCAPTION?Et(e,t):Ue(e,t);break;default:Ue(e,t)}}function at(e,t){e.tmplInsertionModeStackTop>-1?Po(e,t):e.stopped=!0}function Qc(e,t){t.tagName===l.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Vc(e,t){e._err(Ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}function lt(e,t){const n=e.openElements.currentTagName;n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=go,e._processToken(t)):Le(e,t)}function $c(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,L.HTML),e.insertionMode=j1}function Xc(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=s1}function Jc(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l.COLGROUP),e.insertionMode=s1,e._processToken(t)}function Zc(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=be}function eu(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(l.TBODY),e.insertionMode=be,e._processToken(t)}function tu(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processToken(t))}function nu(e,t){const n=f.getTokenAttr(t,mo.TYPE);n&&n.toLowerCase()===To?e._appendElement(t,L.HTML):Le(e,t),t.ackSelfClosing=!0}function ru(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,L.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Wn(e,t){const n=t.tagName;switch(n.length){case 2:n===l.TD||n===l.TH||n===l.TR?eu(e,t):Le(e,t);break;case 3:n===l.COL?Jc(e,t):Le(e,t);break;case 4:n===l.FORM?ru(e,t):Le(e,t);break;case 5:n===l.TABLE?tu(e,t):n===l.STYLE?Te(e,t):n===l.TBODY||n===l.TFOOT||n===l.THEAD?Zc(e,t):n===l.INPUT?nu(e,t):Le(e,t);break;case 6:n===l.SCRIPT?Te(e,t):Le(e,t);break;case 7:n===l.CAPTION?$c(e,t):Le(e,t);break;case 8:n===l.COLGROUP?Xc(e,t):n===l.TEMPLATE?Te(e,t):Le(e,t);break;default:Le(e,t)}}function Qn(e,t){const n=t.tagName;n===l.TABLE?e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode()):n===l.TEMPLATE?yt(e,t):n!==l.BODY&&n!==l.CAPTION&&n!==l.COL&&n!==l.COLGROUP&&n!==l.HTML&&n!==l.TBODY&&n!==l.TD&&n!==l.TFOOT&&n!==l.TH&&n!==l.THEAD&&n!==l.TR&&Le(e,t)}function Le(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function iu(e,t){e.pendingCharacterTokens.push(t)}function ou(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function m1(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Le(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}function su(e,t){const n=t.tagName;n===l.CAPTION||n===l.COL||n===l.COLGROUP||n===l.TBODY||n===l.TD||n===l.TFOOT||n===l.TH||n===l.THEAD||n===l.TR?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ce,e._processToken(t)):Ne(e,t)}function au(e,t){const n=t.tagName;n===l.CAPTION||n===l.TABLE?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ce,n===l.TABLE&&e._processToken(t)):n!==l.BODY&&n!==l.COL&&n!==l.COLGROUP&&n!==l.HTML&&n!==l.TBODY&&n!==l.TD&&n!==l.TFOOT&&n!==l.TH&&n!==l.THEAD&&n!==l.TR&&jn(e,t)}function lu(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.COL?(e._appendElement(t,L.HTML),t.ackSelfClosing=!0):n===l.TEMPLATE?Te(e,t):J1(e,t)}function cu(e,t){const n=t.tagName;n===l.COLGROUP?e.openElements.currentTagName===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=Ce):n===l.TEMPLATE?yt(e,t):n!==l.COL&&J1(e,t)}function J1(e,t){e.openElements.currentTagName===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=Ce,e._processToken(t))}function uu(e,t){const n=t.tagName;n===l.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,L.HTML),e.insertionMode=ot):n===l.TH||n===l.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(l.TR),e.insertionMode=ot,e._processToken(t)):n===l.CAPTION||n===l.COL||n===l.COLGROUP||n===l.TBODY||n===l.TFOOT||n===l.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ce,e._processToken(t)):Wn(e,t)}function hu(e,t){const n=t.tagName;n===l.TBODY||n===l.TFOOT||n===l.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ce):n===l.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ce,e._processToken(t)):(n!==l.BODY&&n!==l.CAPTION&&n!==l.COL&&n!==l.COLGROUP||n!==l.HTML&&n!==l.TD&&n!==l.TH&&n!==l.TR)&&Qn(e,t)}function du(e,t){const n=t.tagName;n===l.TH||n===l.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,L.HTML),e.insertionMode=W1,e.activeFormattingElements.insertMarker()):n===l.CAPTION||n===l.COL||n===l.COLGROUP||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR?e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=be,e._processToken(t)):Wn(e,t)}function fu(e,t){const n=t.tagName;n===l.TR?e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=be):n===l.TABLE?e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=be,e._processToken(t)):n===l.TBODY||n===l.TFOOT||n===l.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=be,e._processToken(t)):(n!==l.BODY&&n!==l.CAPTION&&n!==l.COL&&n!==l.COLGROUP||n!==l.HTML&&n!==l.TD&&n!==l.TH)&&Qn(e,t)}function mu(e,t){const n=t.tagName;n===l.CAPTION||n===l.COL||n===l.COLGROUP||n===l.TBODY||n===l.TD||n===l.TFOOT||n===l.TH||n===l.THEAD||n===l.TR?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),e._processToken(t)):Ne(e,t)}function Tu(e,t){const n=t.tagName;n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ot):n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==l.BODY&&n!==l.CAPTION&&n!==l.COL&&n!==l.COLGROUP&&n!==l.HTML&&jn(e,t)}function Mo(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.OPTION?(e.openElements.currentTagName===l.OPTION&&e.openElements.pop(),e._insertElement(t,L.HTML)):n===l.OPTGROUP?(e.openElements.currentTagName===l.OPTION&&e.openElements.pop(),e.openElements.currentTagName===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,L.HTML)):n===l.INPUT||n===l.KEYGEN||n===l.TEXTAREA||n===l.SELECT?e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),n!==l.SELECT&&e._processToken(t)):(n===l.SCRIPT||n===l.TEMPLATE)&&Te(e,t)}function Lo(e,t){const n=t.tagName;if(n===l.OPTGROUP){const r=e.openElements.items[e.openElements.stackTop-1],i=r&&e.treeAdapter.getTagName(r);e.openElements.currentTagName===l.OPTION&&i===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===l.OPTGROUP&&e.openElements.pop()}else n===l.OPTION?e.openElements.currentTagName===l.OPTION&&e.openElements.pop():n===l.SELECT&&e.openElements.hasInSelectScope(l.SELECT)?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode()):n===l.TEMPLATE&&yt(e,t)}function pu(e,t){const n=t.tagName;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processToken(t)):Mo(e,t)}function Eu(e,t){const n=t.tagName;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processToken(t)):Lo(e,t)}function gu(e,t){const n=t.tagName;if(n===l.BASE||n===l.BASEFONT||n===l.BGSOUND||n===l.LINK||n===l.META||n===l.NOFRAMES||n===l.SCRIPT||n===l.STYLE||n===l.TEMPLATE||n===l.TITLE)Te(e,t);else{const r=Zl[n]||Ve;e._popTmplInsertionMode(),e._pushTmplInsertionMode(r),e.insertionMode=r,e._processToken(t)}}function Au(e,t){t.tagName===l.TEMPLATE&&yt(e,t)}function Po(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function _u(e,t){t.tagName===l.HTML?Ne(e,t):Z1(e,t)}function Cu(e,t){t.tagName===l.HTML?e.fragmentContext||(e.insertionMode=_o):Z1(e,t)}function Z1(e,t){e.insertionMode=Ve,e._processToken(t)}function Su(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.FRAMESET?e._insertElement(t,L.HTML):n===l.FRAME?(e._appendElement(t,L.HTML),t.ackSelfClosing=!0):n===l.NOFRAMES&&Te(e,t)}function Nu(e,t){t.tagName===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagName!==l.FRAMESET&&(e.insertionMode=Ao))}function ku(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.NOFRAMES&&Te(e,t)}function Iu(e,t){t.tagName===l.HTML&&(e.insertionMode=Co)}function Ou(e,t){t.tagName===l.HTML?Ne(e,t):en(e,t)}function en(e,t){e.insertionMode=Ve,e._processToken(t)}function xu(e,t){const n=t.tagName;n===l.HTML?Ne(e,t):n===l.NOFRAMES&&Te(e,t)}function yu(e,t){t.chars=Ql.REPLACEMENT_CHARACTER,e._insertCharacters(t)}function Ru(e,t){e._insertCharacters(t),e.framesetOk=!1}function bu(e,t){if(Qe.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==L.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===L.MATHML?Qe.adjustTokenMathMLAttrs(t):r===L.SVG&&(Qe.adjustTokenSVGTagName(t),Qe.adjustTokenSVGAttrs(t)),Qe.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Mu(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===L.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}const Lu=tc;class T1{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}T1.prototype.property={},T1.prototype.normal={},T1.prototype.space=null;function Do(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new T1(n,r,t)}function p1(e){return e.toLowerCase()}class Pe{constructor(t,n){this.property=t,this.attribute=n}}Pe.prototype.space=null,Pe.prototype.boolean=!1,Pe.prototype.booleanish=!1,Pe.prototype.overloadedBoolean=!1,Pe.prototype.number=!1,Pe.prototype.commaSeparated=!1,Pe.prototype.spaceSeparated=!1,Pe.prototype.commaOrSpaceSeparated=!1,Pe.prototype.mustUseProperty=!1,Pe.prototype.defined=!1;let Pu=0;const K=bt(),ce=bt(),Bo=bt(),k=bt(),ie=bt(),Gt=bt(),xe=bt();function bt(){return 2**++Pu}const Vn=Object.freeze(Object.defineProperty({__proto__:null,boolean:K,booleanish:ce,commaOrSpaceSeparated:xe,commaSeparated:Gt,number:k,overloadedBoolean:Bo,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),$n=Object.keys(Vn);class Xn extends Pe{constructor(t,n,r,i){let o=-1;if(super(t,n),wo(this,"space",i),typeof r=="number")for(;++o<$n.length;){const s=$n[o];wo(this,$n[o],(r&Vn[s])===Vn[s])}}}Xn.prototype.defined=!0;function wo(e,t,n){n&&(e[t]=n)}const Du={}.hasOwnProperty;function Kt(e){const t={},n={};let r;for(r in e.properties)if(Du.call(e.properties,r)){const i=e.properties[r],o=new Xn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[p1(r)]=r,n[p1(o.attribute)]=r}return new T1(t,n,e.space)}const Ho=Kt({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Fo=Kt({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function vo(e,t){return t in e?e[t]:t}function Uo(e,t){return vo(e,t.toLowerCase())}const Go=Kt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Uo,properties:{xmlns:null,xmlnsXLink:null}}),Ko=Kt({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:ie,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:k,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:ie,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:ce,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null}}),Bu=Kt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Uo,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gt,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:ie,autoFocus:K,autoPlay:K,capture:K,charSet:null,checked:K,cite:null,className:ie,cols:k,colSpan:null,content:null,contentEditable:ce,controls:K,controlsList:ie,coords:k|Gt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:Bo,draggable:ce,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:ie,height:k,hidden:K,high:k,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:ie,itemRef:ie,itemScope:K,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:K,optimum:k,pattern:null,ping:ie,placeholder:null,playsInline:K,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:ie,required:K,reversed:K,rows:k,rowSpan:k,sandbox:ie,scope:null,scoped:K,seamless:K,selected:K,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:ce,width:k,wrap:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:K,disableRemotePlayback:K,prefix:null,property:null,results:k,security:null,unselectable:null}}),wu=Kt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:vo,properties:{about:xe,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Gt,g2:Gt,glyphName:Gt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:xe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xe,rev:xe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xe,requiredFeatures:xe,requiredFonts:xe,requiredFormats:xe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:xe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xe,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xe,to:null,transform:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Hu=/^data[-\w.:]+$/i,zo=/-[a-z]/g,Fu=/[A-Z]/g;function Jn(e,t){const n=p1(t);let r=t,i=Pe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hu.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zo,Uu);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zo.test(o)){let s=o.replace(Fu,vu);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Xn}return new i(r,t)}function vu(e){return"-"+e.toLowerCase()}function Uu(e){return e.charAt(1).toUpperCase()}const tn=Do([Fo,Ho,Go,Ko,Bu],"html"),E1=Do([Fo,Ho,Go,Ko,wu],"svg"),Yo=/[#.]/g;function Gu(e,t){const n=e||"",r={};let i=0,o,s;for(;i<n.length;){Yo.lastIndex=i;const a=Yo.exec(n),c=n.slice(i,a?a.index:n.length);c&&(o?o==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:s=c,i+=c.length),a&&(o=a[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function qo(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ku(e){return e.join(" ").trim()}function jo(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const s=n.slice(i,r).trim();(s||!o)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function zu(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Yu=new Set(["menu","submit","reset","button"]),Zn={}.hasOwnProperty;function Wo(e,t,n){const r=n&&Qu(n);return function(o,s,...a){let c=-1,u;if(o==null)u={type:"root",children:[]},a.unshift(s);else if(u=Gu(o,t),u.tagName=u.tagName.toLowerCase(),r&&Zn.call(r,u.tagName)&&(u.tagName=r[u.tagName]),qu(s,u.tagName)){let h;for(h in s)Zn.call(s,h)&&ju(e,u.properties,h,s[h])}else a.unshift(s);for(;++c<a.length;)er(u.children,a[c]);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}}function qu(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?Yu.has(e.type.toLowerCase()):!("value"in e)}function ju(e,t,n,r){const i=Jn(e,n);let o=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=qo(r):i.commaSeparated?s=jo(r):i.commaOrSpaceSeparated?s=qo(jo(r).join(" ")):s=Qo(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Wu(r):String(r);if(Array.isArray(s)){const a=[];for(;++o<s.length;)a[o]=Qo(i,i.property,s[o]);s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function er(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)er(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?er(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Qo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||p1(n)===p1(t)))return!0}return n}function Wu(e){const t=[];let n;for(n in e)Zn.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function Qu(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Vu=Wo(tn,"div"),$u=Wo(E1,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function Xu(e){const t=String(e),n=[],r=/\r?\n|\r/g;for(;r.test(t);)n.push(r.lastIndex);return n.push(t.length+1),{toPoint:i,toOffset:o};function i(s){let a=-1;if(typeof s=="number"&&s>-1&&s<n[n.length-1]){for(;++a<n.length;)if(n[a]>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s}}return{line:void 0,column:void 0,offset:void 0}}function o(s){const a=s&&s.line,c=s&&s.column;if(typeof a=="number"&&typeof c=="number"&&!Number.isNaN(a)&&!Number.isNaN(c)&&a-1 in n){const u=(n[a-2]||0)+c-1||0;if(u>-1&&u<n[n.length-1])return u}return-1}}const Ju={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Vo={}.hasOwnProperty,Zu=Object.prototype;function e9(e,t){const n=t||{};let r,i;return r9(n)?(i=n,r={}):(i=n.file||void 0,r=n),tr({schema:r.space==="svg"?E1:tn,file:i,verbose:r.verbose,location:!1},e)}function tr(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},nn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:$o(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),s=Xu(o),a=s.toPoint(0),c=s.toPoint(o.length);n.position={start:a,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},nn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},nn(e,r,n),n}default:return n=t9(e,t),n}}function $o(e,t){let n=-1;const r=[];for(;++n<t.length;)r[n]=tr(e,t[n]);return r}function t9(e,t){const n=e.schema;e.schema=t.namespaceURI===Ju.svg?E1:tn;let r=-1;const i={};for(;++r<t.attrs.length;){const a=t.attrs[r],c=(a.prefix?a.prefix+":":"")+a.name;Vo.call(Zu,c)||(i[c]=a.value)}const s=(e.schema.space==="svg"?$u:Vu)(t.tagName,i,$o(e,t.childNodes));if(nn(e,t,s),s.tagName==="template"){const a=t,c=a.sourceCodeLocation,u=c&&c.startTag&&zt(c.startTag),h=c&&c.endTag&&zt(c.endTag),m=tr(e,a.content);u&&h&&e.file&&(m.position={start:u.end,end:h.start}),s.content=m}return e.schema=n,s}function nn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=n9(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function n9(e,t,n){const r=zt(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const o={};let s;if(n.attrs)for(s in n.attrs)Vo.call(n.attrs,s)&&(o[Jn(e.schema,s).property]=zt(n.attrs[s]));t.data={position:{opening:zt(n.startTag),closing:n.endTag?zt(n.endTag):null,properties:o}}}}return r}function zt(e){const t=Xo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Xo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Xo(e){return e.line&&e.column?e:void 0}function r9(e){return"messages"in e}const i9={abandonedHeadElementChild:{reason:"Unexpected metadata element after head",description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:"Unexpected too big numeric character reference",description:"Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)"},closingOfElementWithOpenChildElements:{reason:"Unexpected closing tag with open child elements",description:"Unexpectedly closing tag. Expected other tags to be closed first",url:!1},controlCharacterInInputStream:{reason:"Unexpected control character",description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:"Unexpected control character reference",description:"Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace"},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:"Unexpected duplicate attribute",description:"Unexpectedly double attribute. Expected attributes to occur only once"},endTagWithAttributes:{reason:"Unexpected attribute on closing tag",description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:"Unexpected slash at end of closing tag",description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:"Unexpected unopened end tag",description:"Unexpected end tag. Expected no end tag or another end tag",url:!1},eofBeforeTagName:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected tag name instead"},eofInCdata:{reason:"Unexpected end of file in CDATA",description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:"Unexpected end of file in comment",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:"Unexpected end of file in doctype",description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:"Unexpected end of file in element that can only contain text",description:"Unexpected end of file. Expected text or a closing tag",url:!1},eofInScriptHtmlCommentLikeText:{reason:"Unexpected end of file in comment inside script",description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:"Unexpected end of file in tag",description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:"Incorrectly closed comment",description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:"Incorrectly opened comment",description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:"Invalid sequence after doctype name",description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:"Invalid first character in tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:"Misplaced doctype",description:"Unexpected doctype. Expected doctype before head",url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:"Missing attribute value",description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:"Missing doctype before other content",description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:"Missing doctype name",description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:"Missing public identifier in doctype",description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:"Missing system identifier in doctype",description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:"Missing name in end tag",description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:"Missing quote before public identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:"Missing quote before system identifier in doctype",description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:"Missing semicolon after character reference",description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:"Missing whitespace after public identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:"Missing whitespace after system identifier in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:"Missing whitespace before doctype name",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:"Missing whitespace between attributes",description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:"Missing whitespace between public and system identifiers in doctype",description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:"Unexpected nested comment",description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:"Unexpected non-conforming doctype declaration",description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:"Unexpected trailing slash on start tag of non-void element",description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:"Unexpected noncharacter code point referenced by character reference",description:"Unexpected code point. Do not use noncharacters in HTML"},noncharacterInInputStream:{reason:"Unexpected noncharacter character",description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:"Unexpected NULL character referenced by character reference",description:"Unexpected code point. Do not use NULL characters in HTML"},openElementsLeftAfterEof:{reason:"Unexpected end of file",description:"Unexpected end of file. Expected closing tag instead",url:!1},surrogateCharacterReference:{reason:"Unexpected surrogate character referenced by character reference",description:"Unexpected code point. Do not use lone surrogate characters in HTML"},surrogateInInputStream:{reason:"Unexpected surrogate character",description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:"Invalid character after system identifier in doctype",description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:"Unexpected character in attribute name",description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:"Unexpected character in unquoted attribute value",description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:"Unexpected equals sign before attribute name",description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:"Unexpected NULL character",description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:"Unexpected question mark instead of tag name",description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:"Unexpected slash in tag",description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:"Unexpected unknown named character reference",description:"Unexpected character reference. Expected known named character references"}},o9="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",s9={2:!0,1:!1,0:null};function Jo(e){const t=this.data("settings"),n=Object.assign({},t,e);Object.assign(this,{Parser:r});function r(i,o){const s=n.fragment?"parseFragment":"parse",a=n.emitParseErrors?u:null,c=new Lu({sourceCodeLocationInfo:!0,onParseError:a,scriptingEnabled:!1});return e9(c[s](i),{space:n.space,file:o,verbose:n.verbose});function u(h){const m=h.code,g=a9(m),E=n[g],A=E??!0,I=typeof A=="number"?A:A?1:0,M={line:h.startLine,column:h.startCol,offset:h.startOffset},N={line:h.endLine,column:h.endCol,offset:h.endOffset};if(I){const R=i9[g]||{reason:"",description:"",url:""},v=o.message(B(R.reason),{start:M,end:N});v.source="parse-error",v.ruleId=m,v.fatal=s9[I],v.note=B(R.description),v.url="url"in R&&R.url===!1?null:o9+m}function B(R){return R.replace(/%c(?:-(\d+))?/g,(v,G)=>{const C=G?-Number.parseInt(G,10):0,w=i.charAt(h.startOffset+C);return w==="`"?"` ` `":w}).replace(/%x/g,()=>"0x"+i.charCodeAt(h.startOffset).toString(16).toUpperCase())}}}}function a9(e){return e.replace(/-[a-z]/g,t=>t.charAt(1).toUpperCase())}const l9=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"],Zo={}.hasOwnProperty;function es(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Zo.call(i,e)){const c=String(i[e]);s=Zo.call(a,c)?a[c]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function c9(e,t){if(e=e.replace(t.subset?u9(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly)return e;return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function u9(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function h9(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!/[\dA-Fa-f]/.test(String.fromCharCode(t))?r:r+";"}function d9(e,t,n){const r="&#"+String(e);return n&&t&&!/\d/.test(String.fromCharCode(t))?r:r+";"}const f9=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],nr={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},m9=["cent","copy","divide","gt","lt","not","para","times"],ts={}.hasOwnProperty,rr={};let rn;for(rn in nr)ts.call(nr,rn)&&(rr[nr[rn]]=rn);function T9(e,t,n,r){const i=String.fromCharCode(e);if(ts.call(rr,i)){const o=rr[i],s="&"+o;return n&&f9.includes(o)&&!m9.includes(o)&&(!r||t&&t!==61&&/[^\da-z]/i.test(String.fromCharCode(t)))?s:s+";"}return""}function p9(e,t,n){let r=h9(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=T9(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=d9(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Yt(e,t){return c9(e,Object.assign({format:p9},t))}function E9(e,t,n,r){return r.settings.bogusComments?"<?"+Yt(e.value,Object.assign({},r.settings.characterReferences,{subset:[">"]}))+">":"<!--"+e.value.replace(/^>|^->|<!--|-->|--!>|<!-$/g,i)+"-->";function i(o){return Yt(o,Object.assign({},r.settings.characterReferences,{subset:["<",">"]}))}}function g9(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function ns(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ir(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const ue=is(1),rs=is(-1);function is(e){return t;function t(n,r,i){const o=n?n.children:[];let s=(r||0)+e,a=o&&o[s];if(!i)for(;a&&ir(a);)s+=e,a=o[s];return a}}const A9={}.hasOwnProperty;function os(e){return t;function t(n,r,i){return A9.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const or=os({html:_9,head:sr,body:C9,p:S9,li:N9,dt:k9,dd:I9,rt:ss,rp:ss,optgroup:O9,option:x9,menuitem:y9,colgroup:sr,caption:sr,thead:R9,tbody:b9,tfoot:M9,tr:L9,td:as,th:as});function sr(e,t,n){const r=ue(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ir(r.value.charAt(0)))}function _9(e,t,n){const r=ue(n,t);return!r||r.type!=="comment"}function C9(e,t,n){const r=ue(n,t);return!r||r.type!=="comment"}function S9(e,t,n){const r=ue(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function N9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&r.tagName==="li"}function k9(e,t,n){const r=ue(n,t);return r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function I9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ss(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function O9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function x9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function y9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="menuitem"||r.tagName==="hr"||r.tagName==="menu")}function R9(e,t,n){const r=ue(n,t);return r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function b9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function M9(e,t,n){return!ue(n,t)}function L9(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function as(e,t,n){const r=ue(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const P9=os({html:D9,head:B9,body:w9,colgroup:H9,tbody:F9});function D9(e){const t=ue(e,-1);return!t||t.type!=="comment"}function B9(e){const t=e.children,n=[];let r=-1;for(;++r<t.length;){const i=t[r];if(i.type==="element"&&(i.tagName==="title"||i.tagName==="base")){if(n.includes(i.tagName))return!1;n.push(i.tagName)}}return t.length>0}function w9(e){const t=ue(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&ir(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function H9(e,t,n){const r=rs(n,t),i=ue(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&or(r,n.children.indexOf(r),n)?!1:i&&i.type==="element"&&i.tagName==="col"}function F9(e,t,n){const r=rs(n,t),i=ue(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&or(r,n.children.indexOf(r),n)?!1:i&&i.type==="element"&&i.tagName==="tr"}const on={name:[[`
|
|
11
|
+
\f\r &/=>`.split(""),`
|
|
12
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
13
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
14
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
15
|
+
\f\r &>`.split(""),`\0
|
|
16
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
17
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
18
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function v9(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=E1);const u=U9(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(s=!1),(u||!o||!P9(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),s&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(h),!s&&(!o||!or(e,t,n))&&a.push("</"+e.tagName+">"),a.join("")}function U9(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==void 0&&t[i]!==null){const o=G9(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):null;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function G9(e,t,n){const r=Jn(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let s=e.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean&&typeof n!="string")&&(n=Boolean(n)),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Yt(r.attribute,Object.assign({},e.settings.characterReferences,{subset:on.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?zu:Ku)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(a=Yt(n,Object.assign({},e.settings.characterReferences,{subset:on.unquoted[i][o],attribute:!0}))),a!==n&&(e.settings.quoteSmart&&ns(n,s)>ns(n,e.alternative)&&(s=e.alternative),a=s+Yt(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?on.single:on.double)[i][o],attribute:!0}))+s),c+(a&&"="+a))}function ls(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Yt(e.value,Object.assign({},r.settings.characterReferences,{subset:["<","&"]}))}function K9(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ls(e,t,n,r)}function z9(e,t,n,r){return r.all(e)}const Y9=es("type",{invalid:q9,unknown:j9,handlers:{comment:E9,doctype:g9,element:v9,raw:K9,root:z9,text:ls}});function q9(e){throw new Error("Expected node, not `"+e+"`")}function j9(e){throw new Error("Cannot compile unknown node `"+e.type+"`")}function W9(e,t){const n=t||{},r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Q9,all:V9,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||l9,characterReferences:n.characterReferences||n.entities||{},closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?E1:tn,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Q9(e,t,n){return Y9(e,t,n,this)}function V9(e){const t=[],n=e&&e.children||[];let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function cs(e){const t=this.data("settings"),n=Object.assign({},t,e);Object.assign(this,{Compiler:r});function r(i){return W9(i,n)}}function sn(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)sn(e,t.extensions[n]);for(r in t)r==="extensions"||(r==="unsafe"||r==="join"?e[r]=[...e[r]||[],...t[r]||[]]:r==="handlers"?e[r]=Object.assign(e[r],t[r]||{}):e.options[r]=t[r]);return e}function $9(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),X9);return i(),s}function X9(e,t,n){return">"+(n?"":" ")+e}function us(e,t){return hs(e,t.inConstruct,!0)&&!hs(e,t.notInConstruct,!1)}function hs(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ds(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
19
|
+
`&&us(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
20
|
+
`}function J9(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function ar(e,t){return Boolean(!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Z9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function e0(e,t,n,r){const i=Z9(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ar(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(o,t0);return m(),g}const a=n.createTracker(r),c=i.repeat(Math.max(J9(o,i)+1,3)),u=n.enter("codeFenced");let h=a.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);h+=a.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...a.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);h+=a.move(" "),h+=a.move(n.safe(e.meta,{before:h,after:`
|
|
21
|
+
`,encode:["`"],...a.current()})),m()}return h+=a.move(`
|
|
22
|
+
`),o&&(h+=a.move(o+`
|
|
23
|
+
`)),h+=a.move(c),u(),h}function t0(e,t,n){return(n?"":" ")+e}function lr(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function n0(e,t,n,r){const i=lr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
24
|
+
`,...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),s(),u}function r0(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}fs.peek=i0;function fs(e,t,n,r){const i=r0(n),o=n.enter("emphasis"),s=n.createTracker(r);let a=s.move(i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i),o(),a}function i0(e,t,n){return n.options.emphasis||"*"}const cr=function(e){if(e==null)return l0;if(typeof e=="string")return a0(e);if(typeof e=="object")return Array.isArray(e)?o0(e):s0(e);if(typeof e=="function")return an(e);throw new Error("Expected function, string, or object as test")};function o0(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=cr(e[n]);return an(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].call(this,...i))return!0;return!1}}function s0(e){return an(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function a0(e){return an(t);function t(n){return n&&n.type===e}}function an(e){return t;function t(n,...r){return Boolean(n&&typeof n=="object"&&"type"in n&&Boolean(e.call(this,n,...r)))}}function l0(){return!0}function uf(e){return e}const c0=!0,ur=!1,u0="skip",h0=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const i=cr(t),o=r?-1:1;s(e,void 0,[])();function s(a,c,u){const h=a&&typeof a=="object"?a:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(a.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=[],E,A,I;if((!t||i(a,c,u[u.length-1]||null))&&(g=d0(n(a,u)),g[0]===ur))return g;if(a.children&&g[0]!==u0)for(A=(r?a.children.length:-1)+o,I=u.concat(a);A>-1&&A<a.children.length;){if(E=s(a.children[A],A,I)(),E[0]===ur)return E;A=typeof E[1]=="number"?E[1]:A+o}return g}}};function d0(e){return Array.isArray(e)?e:typeof e=="number"?[c0,e]:[e]}const f0=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),h0(e,t,i,r);function i(o,s){const a=s[s.length-1];return n(o,a?a.children.indexOf(o):null,a)}};function hr(e,t){const n=(t||{}).includeImageAlt;return ms(e,typeof n=="boolean"?n:!0)}function ms(e,t){return m0(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&Ts(e.children,t))||Array.isArray(e)&&Ts(e,t)||""}function Ts(e,t){const n=[];let r=-1;for(;++r<e.length;)n[r]=ms(e[r],t);return n.join("")}function m0(e){return Boolean(e&&typeof e=="object")}function ps(e,t){let n=!1;return f0(e,r=>{if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ur}),Boolean((!e.depth||e.depth<3)&&hr(e)&&(t.options.setext||n))}function T0(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(ps(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
|
|
25
|
+
`,after:`
|
|
26
|
+
`});return m(),h(),g+`
|
|
27
|
+
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
|
|
28
|
+
`))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),c=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
29
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),c(),a(),u}Es.peek=p0;function Es(e){return e.value||""}function p0(){return"<"}gs.peek=E0;function gs(e,t,n,r){const i=lr(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),u+=c.move(")"),s(),u}function E0(){return"!"}As.peek=g0;function As(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("![");const u=n.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==m?c+=a.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function g0(){return"!"}function _s(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}Cs.peek=A0;function Cs(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=_s(s);let c;if(s.atBreak)for(;c=a.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function A0(){return"`"}function Ss(e,t){const n=hr(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ns.peek=_0;function Ns(e,t,n,r){const i=lr(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,c;if(Ss(e,n)){const h=n.stack;n.stack=[],a=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),a(),n.stack=h,m}a=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),c()),u+=s.move(")"),a(),u}function _0(e,t,n){return Ss(e,n)?"<":"["}ks.peek=C0;function ks(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==m?c+=a.move(m+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function C0(){return"["}function dr(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function S0(e){const t=dr(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Is(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function N0(e){const t=Is(e),n=e.options.bulletOrderedOther;if(!n)return t==="."?")":".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrderedOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bulletOrdered` (`"+t+"`) and `bulletOrderedOther` (`"+n+"`) to be different");return n}function Os(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function k0(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?Is(n):dr(n);const a=e.ordered?N0(n):S0(n),c=n.bulletLastUsed;let u=!1;if(t&&(e.ordered?n.options.bulletOrderedOther:n.options.bulletOther)&&c&&s===c&&(u=!0),!e.ordered){const m=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Os(n)===s&&m){let g=-1;for(;++g<e.children.length;){const E=e.children[g];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=a),n.bulletCurrent=s;const h=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),h}function I0(e){const t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function O0(e,t,n,r){const i=I0(n);let o=n.bulletCurrent||dr(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),h);return c(),u;function h(m,g,E){return g?(E?"":" ".repeat(s))+m:(E?o:o+" ".repeat(s-o.length))+m}}function x0(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const y0=cr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function R0(e,t,n,r){return(e.children.some(s=>y0(s))?n.containerPhrasing:n.containerFlow).call(n,e,r)}function b0(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xs.peek=M0;function xs(e,t,n,r){const i=b0(n),o=n.enter("strong"),s=n.createTracker(r);let a=s.move(i+i);return a+=s.move(n.containerPhrasing(e,{before:a,after:i,...s.current()})),a+=s.move(i+i),o(),a}function M0(e,t,n){return n.options.strong||"*"}function L0(e,t,n,r){return n.safe(e.value,r)}function P0(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function D0(e,t,n){const r=(Os(n)+(n.options.ruleSpaces?" ":"")).repeat(P0(n));return n.options.ruleSpaces?r.slice(0,-1):r}const B0={blockquote:$9,break:ds,code:e0,definition:n0,emphasis:fs,hardBreak:ds,heading:T0,html:Es,image:gs,imageReference:As,inlineCode:Cs,link:Ns,linkReference:ks,list:k0,listItem:O0,paragraph:x0,root:R0,strong:xs,text:L0,thematicBreak:D0},w0=[H0];function H0(e,t,n,r){if(t.type==="code"&&ar(t,r)&&(e.type==="list"||e.type===t.type&&ar(e,r))||e.type==="list"&&e.type===t.type&&Boolean(e.ordered)===Boolean(t.ordered)&&!(e.ordered?r.options.bulletOrderedOther:r.options.bulletOther))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&ps(t,r))?void 0:n.spread?1:0}const Mt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],F0=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
|
|
30
|
+
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Mt},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
|
|
31
|
+
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Mt},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
|
|
32
|
+
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Mt},{atBreak:!0,character:"+",after:`(?:[ \r
|
|
33
|
+
])`},{atBreak:!0,character:"-",after:`(?:[ \r
|
|
34
|
+
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
|
|
35
|
+
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Mt},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Mt},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Mt},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Mt},{atBreak:!0,character:"~"}],ys=document.createElement("i");function fr(e){const t="&"+e+";";ys.innerHTML=t;const n=ys.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rs(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const v0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bs(e){return e.replace(v0,U0)}function U0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Rs(n.slice(o?2:1),o?16:10)}return fr(n)||e}function G0(e){return e.label||!e.identifier?e.label||"":bs(e.identifier)}function K0(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,a=n.before;r.push(-1);let c=t.createTracker(n);for(;++s<i.length;){const u=i[s];let h;if(r[r.length-1]=s,s+1<i.length){let m=t.handle.handlers[i[s+1].type];m&&m.peek&&(m=m.peek),h=m?m(i[s+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else h=n.after;o.length>0&&(a==="\r"||a===`
|
|
36
|
+
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",c=t.createTracker(n),c.move(o.join(""))),o.push(c.move(t.handle(u,e,t,{...c.current(),before:a,after:h}))),a=o[o.length-1].slice(-1)}return r.pop(),o.join("")}function z0(e,t,n){const r=t.indexStack,i=e.children||[],o=t.createTracker(n),s=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a,s.push(o.move(t.handle(c,e,t,{before:`
|
|
37
|
+
`,after:`
|
|
38
|
+
`,...o.current()}))),c.type!=="list"&&(t.bulletLastUsed=void 0),a<i.length-1&&s.push(o.move(Y0(c,i[a+1],e,t)))}return r.pop(),s.join("")}function Y0(e,t,n,r){let i=r.join.length;for(;i--;){const o=r.join[i](e,t,n,r);if(o===!0||o===1)break;if(typeof o=="number")return`
|
|
39
|
+
`.repeat(1+o);if(o===!1)return`
|
|
40
|
+
|
|
41
|
+
<!---->
|
|
42
|
+
|
|
43
|
+
`}return`
|
|
44
|
+
|
|
45
|
+
`}const q0=/\r?\n|\r/g;function j0(e,t){const n=[];let r=0,i=0,o;for(;o=q0.exec(e);)s(e.slice(r,o.index)),n.push(o[0]),r=o.index+o[0].length,i++;return s(e.slice(r)),n.join("");function s(a){n.push(t(a,i,!a))}}function W0(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],o=[],s={};let a=-1;for(;++a<e.unsafe.length;){const h=e.unsafe[a];if(!us(e.stack,h))continue;const m=_s(h);let g;for(;g=m.exec(r);){const E="before"in h||Boolean(h.atBreak),A="after"in h,I=g.index+(E?g[1].length:0);i.includes(I)?(s[I].before&&!E&&(s[I].before=!1),s[I].after&&!A&&(s[I].after=!1)):(i.push(I),s[I]={before:E,after:A})}}i.sort(Q0);let c=n.before?n.before.length:0;const u=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const h=i[a];h<c||h>=u||h+1<u&&i[a+1]===h+1&&s[h].after&&!s[h+1].before&&!s[h+1].after||i[a-1]===h-1&&s[h].before&&!s[h-1].before&&!s[h-1].after||(c!==h&&o.push(Ms(r.slice(c,h),"\\")),c=h,/[!-/:-@[-`{-~]/.test(r.charAt(h))&&(!n.encode||!n.encode.includes(r.charAt(h)))?o.push("\\"):(o.push("&#x"+r.charCodeAt(h).toString(16).toUpperCase()+";"),c++))}return o.push(Ms(r.slice(c,u),n.after)),o.join("")}function Q0(e,t){return e-t}function Ms(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],o=e+t;let s=-1,a=0,c;for(;c=n.exec(o);)r.push(c.index);for(;++s<r.length;)a!==r[s]&&i.push(e.slice(a,r[s])),i.push("\\"),a=r[s];return i.push(e.slice(a)),i.join("")}function V0(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,o=n.column||1;return{move:c,current:s,shift:a};function s(){return{now:{line:i,column:o},lineShift:r}}function a(u){r+=u}function c(u){const h=u||"",m=h.split(/\r?\n|\r/g),g=m[m.length-1];return i+=m.length-1,o=m.length===1?o+g.length:1+g.length+r,h}}function $0(e,t={}){const n={enter:i,indentLines:j0,associationId:G0,containerPhrasing:e5,containerFlow:t5,createTracker:V0,safe:n5,stack:[],unsafe:[],join:[],handlers:{},options:{},indexStack:[],handle:void 0};sn(n,{unsafe:F0,join:w0,handlers:B0}),sn(n,t),n.options.tightDefinitions&&sn(n,{join:[Z0]}),n.handle=es("type",{invalid:X0,unknown:J0,handlers:n.handlers});let r=n.handle(e,void 0,n,{before:`
|
|
46
|
+
`,after:`
|
|
47
|
+
`,now:{line:1,column:1},lineShift:0});return r&&r.charCodeAt(r.length-1)!==10&&r.charCodeAt(r.length-1)!==13&&(r+=`
|
|
48
|
+
`),r;function i(o){return n.stack.push(o),s;function s(){n.stack.pop()}}}function X0(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function J0(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function Z0(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function e5(e,t){return K0(e,this,t)}function t5(e,t){return z0(e,this,t)}function n5(e,t){return W0(this,e,t)}function r5(e){Object.assign(this,{Compiler:n=>{const r=this.data("settings");return $0(n,Object.assign({},r,e,{extensions:this.data("toMarkdownExtensions")||[]}))}})}function $e(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),[].splice.apply(e,s);else for(n&&[].splice.apply(e,[t,n]);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),[].splice.apply(e,s),o+=1e4,t+=1e4}function De(e,t){return e.length>0?($e(e,e.length,0,t),e):t}const Ls={}.hasOwnProperty;function i5(e){const t={};let n=-1;for(;++n<e.length;)o5(t,e[n]);return t}function o5(e,t){let n;for(n in t){const i=(Ls.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;for(s in o){Ls.call(i,s)||(i[s]=[]);const a=o[s];s5(i[s],Array.isArray(a)?a:a?[a]:[])}}}function s5(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$e(e,0,0,r)}const a5=/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Xe=gt(/[A-Za-z]/),mr=gt(/\d/),l5=gt(/[\dA-Fa-f]/),Ge=gt(/[\dA-Za-z]/),c5=gt(/[!-/:-@[-`{-~]/),Ps=gt(/[#-'*+\--9=?A-Z^-~]/);function Tr(e){return e!==null&&(e<32||e===127)}function Be(e){return e!==null&&(e<0||e===32)}function U(e){return e!==null&&e<-2}function he(e){return e===-2||e===-1||e===32}const u5=gt(/\s/),h5=gt(a5);function gt(e){return t;function t(n){return n!==null&&e.test(String.fromCharCode(n))}}function ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return he(c)?(e.enter(n),a(c)):t(c)}function a(c){return he(c)&&o++<i?(e.consume(c),a):(e.exit(n),t(c))}}const d5={tokenize:f5};function f5(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ee(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return U(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const m5={tokenize:T5},Ds={tokenize:p5};function T5(e){const t=this,n=[];let r=0,i,o,s;return a;function a(R){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,c,u)(R)}return u(R)}function c(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&B();const v=t.events.length;let G=v,C;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){C=t.events[G][1].end;break}N(r);let w=v;for(;w<t.events.length;)t.events[w][1].end=Object.assign({},C),w++;return $e(t.events,G+1,0,t.events.slice(v)),t.events.length=w,u(R)}return a(R)}function u(R){if(r===n.length){if(!i)return g(R);if(i.currentConstruct&&i.currentConstruct.concrete)return A(R);t.interrupt=Boolean(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ds,h,m)(R)}function h(R){return i&&B(),N(r),g(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,A(R)}function g(R){return t.containerState={},e.attempt(Ds,E,A)(R)}function E(R){return r++,n.push([t.currentConstruct,t.containerState]),g(R)}function A(R){if(R===null){i&&B(),N(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),I(R)}function I(R){if(R===null){M(e.exit("chunkFlow"),!0),N(0),e.consume(R);return}return U(R)?(e.consume(R),M(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(R),I)}function M(R,v){const G=t.sliceStream(R);if(v&&G.push(null),R.previous=o,o&&(o.next=R),o=R,i.defineSkip(R.start),i.write(G),t.parser.lazy[R.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const w=t.events.length;let W=w,V,pe;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(V){pe=t.events[W][1].end;break}V=!0}for(N(r),C=w;C<t.events.length;)t.events[C][1].end=Object.assign({},pe),C++;$e(t.events,W+1,0,t.events.slice(w)),t.events.length=C}}function N(R){let v=n.length;for(;v-- >R;){const G=n[v];t.containerState=G[1],G[0].exit.call(t,e)}n.length=R}function B(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function p5(e,t,n){return ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bs(e){if(e===null||Be(e)||u5(e))return 1;if(h5(e))return 2}function pr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Er={name:"attention",tokenize:g5,resolveAll:E5};function E5(e,t){let n=-1,r,i,o,s,a,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=Object.assign({},e[r][1].end),g=Object.assign({},e[n][1].start);ws(m,-c),ws(g,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:Object.assign({},e[r][1].end)},a={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:g},o={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=De(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=De(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=De(u,pr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=De(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=De(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,$e(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function g5(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Bs(r);let o;return s;function s(c){return e.enter("attentionSequence"),o=c,a(c)}function a(c){if(c===o)return e.consume(c),a;const u=e.exit("attentionSequence"),h=Bs(c),m=!h||h===2&&i||n.includes(c),g=!i||i===2&&h||n.includes(r);return u._open=Boolean(o===42?m:m&&(i||!g)),u._close=Boolean(o===42?g:g&&(h||!m)),t(c)}}function ws(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const A5={name:"autolink",tokenize:_5};function _5(e,t,n){let r=1;return i;function i(A){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(A),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(A){return Xe(A)?(e.consume(A),s):Ps(A)?u(A):n(A)}function s(A){return A===43||A===45||A===46||Ge(A)?a(A):u(A)}function a(A){return A===58?(e.consume(A),c):(A===43||A===45||A===46||Ge(A))&&r++<32?(e.consume(A),a):u(A)}function c(A){return A===62?(e.exit("autolinkProtocol"),E(A)):A===null||A===32||A===60||Tr(A)?n(A):(e.consume(A),c)}function u(A){return A===64?(e.consume(A),r=0,h):Ps(A)?(e.consume(A),u):n(A)}function h(A){return Ge(A)?m(A):n(A)}function m(A){return A===46?(e.consume(A),r=0,h):A===62?(e.exit("autolinkProtocol").type="autolinkEmail",E(A)):g(A)}function g(A){return(A===45||Ge(A))&&r++<63?(e.consume(A),A===45?g:m):n(A)}function E(A){return e.enter("autolinkMarker"),e.consume(A),e.exit("autolinkMarker"),e.exit("autolink"),t}}const ln={tokenize:C5,partial:!0};function C5(e,t,n){return ee(e,r,"linePrefix");function r(i){return i===null||U(i)?t(i):n(i)}}const Hs={name:"blockQuote",tokenize:S5,continuation:{tokenize:N5},exit:k5};function S5(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function N5(e,t,n){return ee(e,e.attempt(Hs,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function k5(e){e.exit("blockQuote")}const Fs={name:"characterEscape",tokenize:I5};function I5(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return c5(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const vs={name:"characterReference",tokenize:O5};function O5(e,t,n){const r=this;let i=0,o,s;return a;function a(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Ge,h(m))}function u(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=l5,h):(e.enter("characterReferenceValue"),o=7,s=mr,h(m))}function h(m){let g;return m===59&&i?(g=e.exit("characterReferenceValue"),s===Ge&&!fr(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)):s(m)&&i++<o?(e.consume(m),h):n(m)}}const Us={name:"codeFenced",tokenize:x5,concrete:!0};function x5(e,t,n){const r=this,i={tokenize:G,partial:!0},o={tokenize:v,partial:!0},s=this.events[this.events.length-1],a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let c=0,u;return h;function h(C){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u=C,m(C)}function m(C){return C===u?(e.consume(C),c++,m):(e.exit("codeFencedFenceSequence"),c<3?n(C):ee(e,g,"whitespace")(C))}function g(C){return C===null||U(C)?M(C):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(C))}function E(C){return C===null||Be(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ee(e,A,"whitespace")(C)):C===96&&C===u?n(C):(e.consume(C),E)}function A(C){return C===null||U(C)?M(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(C))}function I(C){return C===null||U(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),M(C)):C===96&&C===u?n(C):(e.consume(C),I)}function M(C){return e.exit("codeFencedFence"),r.interrupt?t(C):N(C)}function N(C){return C===null?R(C):U(C)?e.attempt(o,e.attempt(i,R,a?ee(e,N,"linePrefix",a+1):N),R)(C):(e.enter("codeFlowValue"),B(C))}function B(C){return C===null||U(C)?(e.exit("codeFlowValue"),N(C)):(e.consume(C),B)}function R(C){return e.exit("codeFenced"),t(C)}function v(C,w,W){const V=this;return pe;function pe(H){return C.enter("lineEnding"),C.consume(H),C.exit("lineEnding"),b}function b(H){return V.parser.lazy[V.now().line]?W(H):w(H)}}function G(C,w,W){let V=0;return ee(C,pe,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function pe($){return C.enter("codeFencedFence"),C.enter("codeFencedFenceSequence"),b($)}function b($){return $===u?(C.consume($),V++,b):V<c?W($):(C.exit("codeFencedFenceSequence"),ee(C,H,"whitespace")($))}function H($){return $===null||U($)?(C.exit("codeFencedFence"),w($)):W($)}}}const gr={name:"codeIndented",tokenize:R5},y5={tokenize:b5,partial:!0};function R5(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ee(e,o,"linePrefix",4+1)(u)}function o(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):U(u)?e.attempt(y5,s,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||U(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function b5(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):U(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ee(e,o,"linePrefix",4+1)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):U(s)?i(s):n(s)}}const M5={name:"codeText",tokenize:D5,resolve:L5,previous:P5};function L5(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function P5(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function D5(e,t,n){let r=0,i,o;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),a(m)}function a(m){return m===96?(e.consume(m),r++,a):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===96?(o=e.enter("codeTextSequence"),i=0,h(m)):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):U(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(m))}function u(m){return m===null||m===32||m===96||U(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),u)}function h(m){return m===96?(e.consume(m),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",u(m))}}function Gs(e){const t={};let n=-1,r,i,o,s,a,c,u;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,B5(e,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(s=e[o],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},e[i][1].start),a=e.slice(i,n),a.unshift(r),$e(e,i,n-i+1,a))}}return!u}function B5(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],s=n._tokenizer||r.parser[n.contentType](n.start),a=s.events,c=[],u={};let h,m,g=-1,E=n,A=0,I=0;const M=[I];for(;E;){for(;e[++i][1]!==E;);o.push(i),E._tokenizer||(h=r.sliceStream(E),E.next||h.push(null),m&&s.defineSkip(E.start),E._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),E._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=E,E=E.next}for(E=n;++g<a.length;)a[g][0]==="exit"&&a[g-1][0]==="enter"&&a[g][1].type===a[g-1][1].type&&a[g][1].start.line!==a[g][1].end.line&&(I=g+1,M.push(I),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(s.events=[],E?(E._tokenizer=void 0,E.previous=void 0):M.pop(),g=M.length;g--;){const N=a.slice(M[g],M[g+1]),B=o.pop();c.unshift([B,B+N.length-1]),$e(e,B,2,N)}for(g=-1;++g<c.length;)u[A+c[g][0]]=A+c[g][1],A+=c[g][1]-c[g][0]-1;return u}const w5={tokenize:v5,resolve:F5},H5={tokenize:U5,partial:!0};function F5(e){return Gs(e),e}function v5(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):U(a)?e.check(H5,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function U5(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ee(e,o,"linePrefix")}function o(s){if(s===null||U(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ks(e,t,n,r,i,o,s,a,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return m;function m(N){return N===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(N),e.exit(o),g):N===null||N===41||Tr(N)?n(N):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),I(N))}function g(N){return N===62?(e.enter(o),e.consume(N),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),E(N))}function E(N){return N===62?(e.exit("chunkString"),e.exit(a),g(N)):N===null||N===60||U(N)?n(N):(e.consume(N),N===92?A:E)}function A(N){return N===60||N===62||N===92?(e.consume(N),E):E(N)}function I(N){return N===40?++h>u?n(N):(e.consume(N),I):N===41?h--?(e.consume(N),I):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(N)):N===null||Be(N)?h?n(N):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(N)):Tr(N)?n(N):(e.consume(N),N===92?M:I)}function M(N){return N===40||N===41||N===92?(e.consume(N),I):I(N)}}function zs(e,t,n,r,i,o){const s=this;let a=0,c;return u;function u(E){return e.enter(r),e.enter(i),e.consume(E),e.exit(i),e.enter(o),h}function h(E){return E===null||E===91||E===93&&!c||E===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs||a>999?n(E):E===93?(e.exit(o),e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):U(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||E===91||E===93||U(E)||a++>999?(e.exit("chunkString"),h(E)):(e.consume(E),c=c||!he(E),E===92?g:m)}function g(E){return E===91||E===92||E===93?(e.consume(E),a++,m):m(E)}}function Ys(e,t,n,r,i,o){let s;return a;function a(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),s=g===40?41:g,c}function c(g){return g===s?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),u(g))}function u(g){return g===s?(e.exit(o),c(s)):g===null?n(g):U(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ee(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===s||g===null||U(g)?(e.exit("chunkString"),u(g)):(e.consume(g),g===92?m:h)}function m(g){return g===s||g===92?(e.consume(g),h):h(g)}}function g1(e,t){let n;return r;function r(i){return U(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function qt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const G5={name:"definition",tokenize:z5},K5={tokenize:Y5,partial:!0};function z5(e,t,n){const r=this;let i;return o;function o(c){return e.enter("definition"),zs.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function s(c){return i=qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),c===58?(e.enter("definitionMarker"),e.consume(c),e.exit("definitionMarker"),g1(e,Ks(e,e.attempt(K5,ee(e,a,"whitespace"),ee(e,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(c)}function a(c){return c===null||U(c)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(c)):n(c)}}function Y5(e,t,n){return r;function r(s){return Be(s)?g1(e,i)(s):n(s)}function i(s){return s===34||s===39||s===40?Ys(e,ee(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s):n(s)}function o(s){return s===null||U(s)?t(s):n(s)}}const q5={name:"hardBreakEscape",tokenize:j5};function j5(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return U(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}const W5={name:"headingAtx",tokenize:V5,resolve:Q5};function Q5(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$e(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function V5(e,t,n){const r=this;let i=0;return o;function o(h){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&i++<6?(e.consume(h),s):h===null||Be(h)?(e.exit("atxHeadingSequence"),r.interrupt?t(h):a(h)):n(h)}function a(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||U(h)?(e.exit("atxHeading"),t(h)):he(h)?ee(e,a,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),a(h))}function u(h){return h===null||h===35||Be(h)?(e.exit("atxHeadingText"),a(h)):(e.consume(h),u)}}const $5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qs=["pre","script","style","textarea"],X5={name:"htmlFlow",tokenize:eh,resolveTo:Z5,concrete:!0},J5={tokenize:th,partial:!0};function Z5(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eh(e,t,n){const r=this;let i,o,s,a,c;return u;function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),h}function h(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),A):T===63?(e.consume(T),i=3,r.interrupt?t:Ie):Xe(T)?(e.consume(T),s=String.fromCharCode(T),o=!0,I):n(T)}function m(T){return T===45?(e.consume(T),i=2,g):T===91?(e.consume(T),i=5,s="CDATA[",a=0,E):Xe(T)?(e.consume(T),i=4,r.interrupt?t:Ie):n(T)}function g(T){return T===45?(e.consume(T),r.interrupt?t:Ie):n(T)}function E(T){return T===s.charCodeAt(a++)?(e.consume(T),a===s.length?r.interrupt?t:b:E):n(T)}function A(T){return Xe(T)?(e.consume(T),s=String.fromCharCode(T),I):n(T)}function I(T){return T===null||T===47||T===62||Be(T)?T!==47&&o&&qs.includes(s.toLowerCase())?(i=1,r.interrupt?t(T):b(T)):$5.includes(s.toLowerCase())?(i=6,T===47?(e.consume(T),M):r.interrupt?t(T):b(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):o?B(T):N(T)):T===45||Ge(T)?(e.consume(T),s+=String.fromCharCode(T),I):n(T)}function M(T){return T===62?(e.consume(T),r.interrupt?t:b):n(T)}function N(T){return he(T)?(e.consume(T),N):V(T)}function B(T){return T===47?(e.consume(T),V):T===58||T===95||Xe(T)?(e.consume(T),R):he(T)?(e.consume(T),B):V(T)}function R(T){return T===45||T===46||T===58||T===95||Ge(T)?(e.consume(T),R):v(T)}function v(T){return T===61?(e.consume(T),G):he(T)?(e.consume(T),v):B(T)}function G(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),c=T,C):he(T)?(e.consume(T),G):(c=null,w(T))}function C(T){return T===null||U(T)?n(T):T===c?(e.consume(T),W):(e.consume(T),C)}function w(T){return T===null||T===34||T===39||T===60||T===61||T===62||T===96||Be(T)?v(T):(e.consume(T),w)}function W(T){return T===47||T===62||he(T)?B(T):n(T)}function V(T){return T===62?(e.consume(T),pe):n(T)}function pe(T){return he(T)?(e.consume(T),pe):T===null||U(T)?b(T):n(T)}function b(T){return T===45&&i===2?(e.consume(T),Ke):T===60&&i===1?(e.consume(T),Ze):T===62&&i===4?(e.consume(T),fe):T===63&&i===3?(e.consume(T),Ie):T===93&&i===5?(e.consume(T),Ee):U(T)&&(i===6||i===7)?e.check(J5,fe,H)(T):T===null||U(T)?H(T):(e.consume(T),b)}function H(T){return e.exit("htmlFlowData"),$(T)}function $(T){return T===null?p(T):U(T)?e.attempt({tokenize:_e,partial:!0},$,p)(T):(e.enter("htmlFlowData"),b(T))}function _e(T,jt,_1){return Wt;function Wt(Ye){return T.enter("lineEnding"),T.consume(Ye),T.exit("lineEnding"),me}function me(Ye){return r.parser.lazy[r.now().line]?_1(Ye):jt(Ye)}}function Ke(T){return T===45?(e.consume(T),Ie):b(T)}function Ze(T){return T===47?(e.consume(T),s="",ze):b(T)}function ze(T){return T===62&&qs.includes(s.toLowerCase())?(e.consume(T),fe):Xe(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),ze):b(T)}function Ee(T){return T===93?(e.consume(T),Ie):b(T)}function Ie(T){return T===62?(e.consume(T),fe):T===45&&i===2?(e.consume(T),Ie):b(T)}function fe(T){return T===null||U(T)?(e.exit("htmlFlowData"),p(T)):(e.consume(T),fe)}function p(T){return e.exit("htmlFlow"),t(T)}}function th(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(ln,t,n)}}const nh={name:"htmlText",tokenize:rh};function rh(e,t,n){const r=this;let i,o,s,a;return c;function c(p){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(p),u}function u(p){return p===33?(e.consume(p),h):p===47?(e.consume(p),w):p===63?(e.consume(p),G):Xe(p)?(e.consume(p),pe):n(p)}function h(p){return p===45?(e.consume(p),m):p===91?(e.consume(p),o="CDATA[",s=0,M):Xe(p)?(e.consume(p),v):n(p)}function m(p){return p===45?(e.consume(p),g):n(p)}function g(p){return p===null||p===62?n(p):p===45?(e.consume(p),E):A(p)}function E(p){return p===null||p===62?n(p):A(p)}function A(p){return p===null?n(p):p===45?(e.consume(p),I):U(p)?(a=A,Ee(p)):(e.consume(p),A)}function I(p){return p===45?(e.consume(p),fe):A(p)}function M(p){return p===o.charCodeAt(s++)?(e.consume(p),s===o.length?N:M):n(p)}function N(p){return p===null?n(p):p===93?(e.consume(p),B):U(p)?(a=N,Ee(p)):(e.consume(p),N)}function B(p){return p===93?(e.consume(p),R):N(p)}function R(p){return p===62?fe(p):p===93?(e.consume(p),R):N(p)}function v(p){return p===null||p===62?fe(p):U(p)?(a=v,Ee(p)):(e.consume(p),v)}function G(p){return p===null?n(p):p===63?(e.consume(p),C):U(p)?(a=G,Ee(p)):(e.consume(p),G)}function C(p){return p===62?fe(p):G(p)}function w(p){return Xe(p)?(e.consume(p),W):n(p)}function W(p){return p===45||Ge(p)?(e.consume(p),W):V(p)}function V(p){return U(p)?(a=V,Ee(p)):he(p)?(e.consume(p),V):fe(p)}function pe(p){return p===45||Ge(p)?(e.consume(p),pe):p===47||p===62||Be(p)?b(p):n(p)}function b(p){return p===47?(e.consume(p),fe):p===58||p===95||Xe(p)?(e.consume(p),H):U(p)?(a=b,Ee(p)):he(p)?(e.consume(p),b):fe(p)}function H(p){return p===45||p===46||p===58||p===95||Ge(p)?(e.consume(p),H):$(p)}function $(p){return p===61?(e.consume(p),_e):U(p)?(a=$,Ee(p)):he(p)?(e.consume(p),$):b(p)}function _e(p){return p===null||p===60||p===61||p===62||p===96?n(p):p===34||p===39?(e.consume(p),i=p,Ke):U(p)?(a=_e,Ee(p)):he(p)?(e.consume(p),_e):(e.consume(p),i=void 0,ze)}function Ke(p){return p===i?(e.consume(p),Ze):p===null?n(p):U(p)?(a=Ke,Ee(p)):(e.consume(p),Ke)}function Ze(p){return p===62||p===47||Be(p)?b(p):n(p)}function ze(p){return p===null||p===34||p===39||p===60||p===61||p===96?n(p):p===62||Be(p)?b(p):(e.consume(p),ze)}function Ee(p){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ee(e,Ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ie(p){return e.enter("htmlTextData"),a(p)}function fe(p){return p===62?(e.consume(p),e.exit("htmlTextData"),e.exit("htmlText"),t):n(p)}}const Ar={name:"labelEnd",tokenize:ch,resolveTo:lh,resolveAll:ah},ih={tokenize:uh},oh={tokenize:hh},sh={tokenize:dh};function ah(e){let t=-1,n;for(;++t<e.length;)n=e[t][1],(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++);return e}function lh(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[s][1].end)},h={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return a=[["enter",c,t],["enter",u,t]],a=De(a,e.slice(o+1,o+r+3)),a=De(a,[["enter",h,t]]),a=De(a,pr(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=De(a,[["exit",h,t],e[s-2],e[s-1],["exit",u,t]]),a=De(a,e.slice(s+1)),a=De(a,[["exit",c,t]]),$e(e,o,e.length,a),e}function ch(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?u(h):(s=r.parser.defined.includes(qt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):n(h)}function c(h){return h===40?e.attempt(ih,t,s?t:u)(h):h===91?e.attempt(oh,t,s?e.attempt(sh,t,u):u)(h):s?t(h):u(h)}function u(h){return o._balanced=!0,n(h)}}function uh(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),g1(e,i)}function i(c){return c===41?a(c):Ks(e,o,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return Be(c)?g1(e,s)(c):a(c)}function s(c){return c===34||c===39||c===40?Ys(e,g1(e,a),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):a(c)}function a(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function hh(e,t,n){const r=this;return i;function i(s){return zs.call(r,e,o,n,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(qt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}}function dh(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const fh={name:"labelStartImage",tokenize:mh,resolveAll:Ar.resolveAll};function mh(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Th={name:"labelStartLink",tokenize:ph,resolveAll:Ar.resolveAll};function ph(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const _r={name:"lineEnding",tokenize:Eh};function Eh(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ee(e,t,"linePrefix")}}const cn={name:"thematicBreak",tokenize:gh};function gh(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),a(c)):he(c)?ee(e,s,"whitespace")(c):r<3||c!==null&&!U(c)?n(c):(e.exit("thematicBreak"),t(c))}function a(c){return c===i?(e.consume(c),r++,a):(e.exit("thematicBreakSequence"),s(c))}}const ke={name:"list",tokenize:Ch,continuation:{tokenize:Sh},exit:kh},Ah={tokenize:Ih,partial:!0},_h={tokenize:Nh,partial:!0};function Ch(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(E){const A=r.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!r.containerState.marker||E===r.containerState.marker:mr(E)){if(r.containerState.type||(r.containerState.type=A,e.enter(A,{_container:!0})),A==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(cn,n,u)(E):u(E);if(!r.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(E)}return n(E)}function c(E){return mr(E)&&++s<10?(e.consume(E),c):(!r.interrupt||s<2)&&(r.containerState.marker?E===r.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),u(E)):n(E)}function u(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||E,e.check(ln,r.interrupt?n:h,e.attempt(Ah,g,m))}function h(E){return r.containerState.initialBlankLine=!0,o++,g(E)}function m(E){return he(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),g):n(E)}function g(E){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function Sh(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ln,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ee(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!he(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_h,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ee(e,e.attempt(ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Nh(e,t,n){const r=this;return ee(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function kh(e){e.exit(this.containerState.type)}function Ih(e,t,n){const r=this;return ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const s=r.events[r.events.length-1];return!he(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const js={name:"setextUnderline",tokenize:xh,resolveTo:Oh};function Oh(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function xh(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if(r.events[i][1].type!=="lineEnding"&&r.events[i][1].type!=="linePrefix"&&r.events[i][1].type!=="content"){s=r.events[i][1].type==="paragraph";break}return a;function a(h){return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),o=h,c(h)):n(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),ee(e,u,"lineSuffix")(h))}function u(h){return h===null||U(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const yh={tokenize:Rh};function Rh(e){const t=this,n=e.attempt(ln,r,e.attempt(this.parser.constructs.flowInitial,i,ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(w5,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bh={resolveAll:Qs()},Mh=Ws("string"),Lh=Ws("text");function Ws(e){return{tokenize:t,resolveAll:Qs(e==="text"?Ph:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(h){return u(h)?o(h):a(h)}function a(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;const m=i[h];let g=-1;if(m)for(;++g<m.length;){const E=m[g];if(!E.previous||E.previous.call(r,r.previous))return!0}return!1}}}function Qs(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Ph(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)c=!0,a++;else if(u!==-1){o++;break}}if(a){const u={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+o,_bufferIndex:o?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function Dh(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],a=[];const c={consume:B,enter:R,exit:v,attempt:w(G),check:w(C),interrupt:w(C,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:E,sliceSerialize:g,now:A,defineSkip:I,write:m};let h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function m(b){return s=De(s,b),M(),s[s.length-1]!==null?[]:(W(t,0),u.events=pr(o,u.events,u),u.events)}function g(b,H){return wh(E(b),H)}function E(b){return Bh(s,b)}function A(){return Object.assign({},r)}function I(b){i[b.line]=b.column,pe()}function M(){let b;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(b=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===b&&r._bufferIndex<H.length;)N(H.charCodeAt(r._bufferIndex));else N(H)}}function N(b){h=h(b)}function B(b){U(b)?(r.line++,r.column=1,r.offset+=b===-3?2:1,pe()):b!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=b}function R(b,H){const $=H||{};return $.type=b,$.start=A(),u.events.push(["enter",$,u]),a.push($),$}function v(b){const H=a.pop();return H.end=A(),u.events.push(["exit",H,u]),H}function G(b,H){W(b,H.from)}function C(b,H){H.restore()}function w(b,H){return $;function $(_e,Ke,Ze){let ze,Ee,Ie,fe;return Array.isArray(_e)?T(_e):"tokenize"in _e?T([_e]):p(_e);function p(me){return Ye;function Ye(_t){const Qt=_t!==null&&me[_t],Vt=_t!==null&&me.null,Ir=[...Array.isArray(Qt)?Qt:Qt?[Qt]:[],...Array.isArray(Vt)?Vt:Vt?[Vt]:[]];return T(Ir)(_t)}}function T(me){return ze=me,Ee=0,me.length===0?Ze:jt(me[Ee])}function jt(me){return Ye;function Ye(_t){return fe=V(),Ie=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?Wt():me.tokenize.call(H?Object.assign(Object.create(u),H):u,c,_1,Wt)(_t)}}function _1(me){return b(Ie,fe),Ke}function Wt(me){return fe.restore(),++Ee<ze.length?jt(ze[Ee]):Ze}}}function W(b,H){b.resolveAll&&!o.includes(b)&&o.push(b),b.resolve&&$e(u.events,H,u.events.length-H,b.resolve(u.events.slice(H),u)),b.resolveTo&&(u.events=b.resolveTo(u.events,u))}function V(){const b=A(),H=u.previous,$=u.currentConstruct,_e=u.events.length,Ke=Array.from(a);return{restore:Ze,from:_e};function Ze(){r=b,u.previous=H,u.currentConstruct=$,u.events.length=_e,a=Ke,pe()}}function pe(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bh(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;return n===i?s=[e[n].slice(r,o)]:(s=e.slice(n,i),r>-1&&(s[0]=s[0].slice(r)),o>0&&s.push(e[i].slice(0,o))),s}function wh(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
49
|
+
`;break}case-3:{s=`\r
|
|
50
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}const Hh={[42]:ke,[43]:ke,[45]:ke,[48]:ke,[49]:ke,[50]:ke,[51]:ke,[52]:ke,[53]:ke,[54]:ke,[55]:ke,[56]:ke,[57]:ke,[62]:Hs},Fh={[91]:G5},vh={[-2]:gr,[-1]:gr,[32]:gr},Uh=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Fh,disable:{null:[]},document:Hh,flow:{[35]:W5,[42]:cn,[45]:[js,cn],[60]:X5,[61]:js,[95]:cn,[96]:Us,[126]:Us},flowInitial:vh,insideSpan:{null:[Er,bh]},string:{[38]:vs,[92]:Fs},text:{[-5]:_r,[-4]:_r,[-3]:_r,[33]:fh,[38]:vs,[42]:Er,[60]:[A5,nh],[91]:Th,[92]:[q5,Fs],[93]:Ar,[95]:Er,[96]:M5}},Symbol.toStringTag,{value:"Module"}));function Gh(e={}){const t=i5([Uh].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(d5),document:r(m5),flow:r(yh),string:r(Mh),text:r(Lh)};return n;function r(i){return o;function o(s){return Dh(n,i,s)}}}const Vs=/[\0\t\n\r]/g;function Kh(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const c=[];let u,h,m,g,E;for(o=t+o.toString(s),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(Vs.lastIndex=m,u=Vs.exec(o),g=u&&u.index!==void 0?u.index:o.length,E=o.charCodeAt(g),!u){t=o.slice(m);break}if(E===10&&m===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<g&&(c.push(o.slice(m,g)),e+=g-m),E){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}function zh(e){for(;!Gs(e););return e}const $s={}.hasOwnProperty,Yh=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),qh(n)(zh(Gh(n).document().write(Kh()(e,t,!0))))};function qh(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(da),autolinkProtocol:b,autolinkEmail:b,atxHeading:a(ca),blockQuote:a(Ir),characterEscape:b,characterReference:b,codeFenced:a(la),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(la,c),codeText:a(Ud,c),codeTextData:b,data:b,codeFlowValue:b,definition:a(Gd),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Kd),hardBreakEscape:a(ua),hardBreakTrailing:a(ua),htmlFlow:a(ha,c),htmlFlowData:b,htmlText:a(ha,c),htmlTextData:b,image:a(zd),label:c,link:a(da),listItem:a(Yd),listItemValue:A,listOrdered:a(fa,E),listUnordered:a(fa),paragraph:a(qd),reference:Wt,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(ca),strong:a(jd),thematicBreak:a(Qd)},exit:{atxHeading:h(),atxHeadingSequence:w,autolink:h(),autolinkEmail:Vt,autolinkProtocol:Qt,blockQuote:h(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:_t,codeFenced:h(B),codeFencedFence:N,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:H,codeIndented:h(R),codeText:h(ze),codeTextData:H,data:H,definition:h(),definitionDestinationString:C,definitionLabelString:v,definitionTitleString:G,emphasis:h(),hardBreakEscape:h(_e),hardBreakTrailing:h(_e),htmlFlow:h(Ke),htmlFlowData:H,htmlText:h(Ze),htmlTextData:H,image:h(Ie),label:p,labelText:fe,lineEnding:$,link:h(Ee),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:me,resourceDestinationString:T,resourceTitleString:jt,resource:_1,setextHeading:h(pe),setextHeadingLineSequence:V,setextHeadingText:W,strong:h(),thematicBreak:h()}};Xs(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let y={type:"root",children:[]};const F={stack:[y],tokenStack:[],config:t,enter:u,exit:m,buffer:c,resume:g,setData:o,getData:s},Z=[];let te=-1;for(;++te<_.length;)if(_[te][1].type==="listOrdered"||_[te][1].type==="listUnordered")if(_[te][0]==="enter")Z.push(te);else{const qe=Z.pop();te=i(_,qe,te)}for(te=-1;++te<_.length;){const qe=t[_[te][0]];$s.call(qe,_[te][1].type)&&qe[_[te][1].type].call(Object.assign({sliceSerialize:_[te][2].sliceSerialize},F),_[te][1])}if(F.tokenStack.length>0){const qe=F.tokenStack[F.tokenStack.length-1];(qe[1]||Js).call(F,void 0,qe[0])}for(y.position={start:At(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:At(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)y=t.transforms[te](y)||y;return y}function i(_,y,F){let Z=y-1,te=-1,qe=!1,Ct,ct,C1,S1;for(;++Z<=F;){const ae=_[Z];if(ae[1].type==="listUnordered"||ae[1].type==="listOrdered"||ae[1].type==="blockQuote"?(ae[0]==="enter"?te++:te--,S1=void 0):ae[1].type==="lineEndingBlank"?ae[0]==="enter"&&(Ct&&!S1&&!te&&!C1&&(C1=Z),S1=void 0):ae[1].type==="linePrefix"||ae[1].type==="listItemValue"||ae[1].type==="listItemMarker"||ae[1].type==="listItemPrefix"||ae[1].type==="listItemPrefixWhitespace"||(S1=void 0),!te&&ae[0]==="enter"&&ae[1].type==="listItemPrefix"||te===-1&&ae[0]==="exit"&&(ae[1].type==="listUnordered"||ae[1].type==="listOrdered")){if(Ct){let Or=Z;for(ct=void 0;Or--;){const ut=_[Or];if(ut[1].type==="lineEnding"||ut[1].type==="lineEndingBlank"){if(ut[0]==="exit")continue;ct&&(_[ct][1].type="lineEndingBlank",qe=!0),ut[1].type="lineEnding",ct=Or}else if(!(ut[1].type==="linePrefix"||ut[1].type==="blockQuotePrefix"||ut[1].type==="blockQuotePrefixWhitespace"||ut[1].type==="blockQuoteMarker"||ut[1].type==="listItemIndent"))break}C1&&(!ct||C1<ct)&&(Ct._spread=!0),Ct.end=Object.assign({},ct?_[ct][1].start:ae[1].end),_.splice(ct||Z,0,["exit",Ct,ae[2]]),Z++,F++}ae[1].type==="listItemPrefix"&&(Ct={type:"listItem",_spread:!1,start:Object.assign({},ae[1].start)},_.splice(Z,0,["enter",Ct,ae[2]]),Z++,F++,C1=void 0,S1=!0)}}return _[y][1]._spread=qe,F}function o(_,y){n[_]=y}function s(_){return n[_]}function a(_,y){return F;function F(Z){u.call(this,_(Z),Z),y&&y.call(this,Z)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(_,y,F){return this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([y,F]),_.position={start:At(y.start)},_}function h(_){return y;function y(F){_&&_.call(this,F),m.call(this,F)}}function m(_,y){const F=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==_.type&&(y?y.call(this,_,Z[0]):(Z[1]||Js).call(this,_,Z[0]));else throw new Error("Cannot close `"+_.type+"` ("+Xt({start:_.start,end:_.end})+"): it’s not open");return F.position.end=At(_.end),F}function g(){return hr(this.stack.pop())}function E(){o("expectingFirstListItemValue",!0)}function A(_){if(s("expectingFirstListItemValue")){const y=this.stack[this.stack.length-2];y.start=Number.parseInt(this.sliceSerialize(_),10),o("expectingFirstListItemValue")}}function I(){const _=this.resume(),y=this.stack[this.stack.length-1];y.lang=_}function M(){const _=this.resume(),y=this.stack[this.stack.length-1];y.meta=_}function N(){s("flowCodeInside")||(this.buffer(),o("flowCodeInside",!0))}function B(){const _=this.resume(),y=this.stack[this.stack.length-1];y.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),o("flowCodeInside")}function R(){const _=this.resume(),y=this.stack[this.stack.length-1];y.value=_.replace(/(\r?\n|\r)$/g,"")}function v(_){const y=this.resume(),F=this.stack[this.stack.length-1];F.label=y,F.identifier=qt(this.sliceSerialize(_)).toLowerCase()}function G(){const _=this.resume(),y=this.stack[this.stack.length-1];y.title=_}function C(){const _=this.resume(),y=this.stack[this.stack.length-1];y.url=_}function w(_){const y=this.stack[this.stack.length-1];if(!y.depth){const F=this.sliceSerialize(_).length;y.depth=F}}function W(){o("setextHeadingSlurpLineEnding",!0)}function V(_){const y=this.stack[this.stack.length-1];y.depth=this.sliceSerialize(_).charCodeAt(0)===61?1:2}function pe(){o("setextHeadingSlurpLineEnding")}function b(_){const y=this.stack[this.stack.length-1];let F=y.children[y.children.length-1];(!F||F.type!=="text")&&(F=Wd(),F.position={start:At(_.start)},y.children.push(F)),this.stack.push(F)}function H(_){const y=this.stack.pop();y.value+=this.sliceSerialize(_),y.position.end=At(_.end)}function $(_){const y=this.stack[this.stack.length-1];if(s("atHardBreak")){const F=y.children[y.children.length-1];F.position.end=At(_.end),o("atHardBreak");return}!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(y.type)&&(b.call(this,_),H.call(this,_))}function _e(){o("atHardBreak",!0)}function Ke(){const _=this.resume(),y=this.stack[this.stack.length-1];y.value=_}function Ze(){const _=this.resume(),y=this.stack[this.stack.length-1];y.value=_}function ze(){const _=this.resume(),y=this.stack[this.stack.length-1];y.value=_}function Ee(){const _=this.stack[this.stack.length-1];if(s("inReference")){const y=s("referenceType")||"shortcut";_.type+="Reference",_.referenceType=y,delete _.url,delete _.title}else delete _.identifier,delete _.label;o("referenceType")}function Ie(){const _=this.stack[this.stack.length-1];if(s("inReference")){const y=s("referenceType")||"shortcut";_.type+="Reference",_.referenceType=y,delete _.url,delete _.title}else delete _.identifier,delete _.label;o("referenceType")}function fe(_){const y=this.sliceSerialize(_),F=this.stack[this.stack.length-2];F.label=bs(y),F.identifier=qt(y).toLowerCase()}function p(){const _=this.stack[this.stack.length-1],y=this.resume(),F=this.stack[this.stack.length-1];if(o("inReference",!0),F.type==="link"){const Z=_.children;F.children=Z}else F.alt=y}function T(){const _=this.resume(),y=this.stack[this.stack.length-1];y.url=_}function jt(){const _=this.resume(),y=this.stack[this.stack.length-1];y.title=_}function _1(){o("inReference")}function Wt(){o("referenceType","collapsed")}function me(_){const y=this.resume(),F=this.stack[this.stack.length-1];F.label=y,F.identifier=qt(this.sliceSerialize(_)).toLowerCase(),o("referenceType","full")}function Ye(_){o("characterReferenceType",_.type)}function _t(_){const y=this.sliceSerialize(_),F=s("characterReferenceType");let Z;F?(Z=Rs(y,F==="characterReferenceMarkerNumeric"?10:16),o("characterReferenceType")):Z=fr(y);const te=this.stack.pop();te.value+=Z,te.position.end=At(_.end)}function Qt(_){H.call(this,_);const y=this.stack[this.stack.length-1];y.url=this.sliceSerialize(_)}function Vt(_){H.call(this,_);const y=this.stack[this.stack.length-1];y.url="mailto:"+this.sliceSerialize(_)}function Ir(){return{type:"blockquote",children:[]}}function la(){return{type:"code",lang:null,meta:null,value:""}}function Ud(){return{type:"inlineCode",value:""}}function Gd(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kd(){return{type:"emphasis",children:[]}}function ca(){return{type:"heading",depth:void 0,children:[]}}function ua(){return{type:"break"}}function ha(){return{type:"html",value:""}}function zd(){return{type:"image",title:null,url:"",alt:null}}function da(){return{type:"link",title:null,url:"",children:[]}}function fa(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function Yd(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function qd(){return{type:"paragraph",children:[]}}function jd(){return{type:"strong",children:[]}}function Wd(){return{type:"text",value:""}}function Qd(){return{type:"thematicBreak"}}}function At(e){return{line:e.line,column:e.column,offset:e.offset}}function Xs(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xs(e,r):jh(e,r)}}function jh(e,t){let n;for(n in t)if($s.call(t,n)){if(n==="canContainEols"){const r=t[n];r&&e[n].push(...r)}else if(n==="transforms"){const r=t[n];r&&e[n].push(...r)}else if(n==="enter"||n==="exit"){const r=t[n];r&&Object.assign(e[n],r)}}}function Js(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xt({start:t.start,end:t.end})+") is still open")}function Wh(e){Object.assign(this,{Parser:n=>{const r=this.data("settings");return Yh(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Qh(e){const t=new Set([...e.orderedListItemBlockTypes,...e.unorderedListItemBlockTypes]),n=r=>{let i=r.children.length,o;for(let s=0;s<i;s++){const c=r.children[s].children[0],u=c.children[0],h=c.children.length===2?c.children[1]:null,m=t.has(u.properties.dataContentType),g=m?e.orderedListItemBlockTypes.has(u.properties.dataContentType)?"ol":"ul":null;if(h!==null&&n(h),o&&o.tagName!==g){r.children.splice(s-o.children.length,o.children.length,o);const E=o.children.length-1;s-=E,i-=E,o=void 0}if(m){o||(o=yr.fromDom(document.createElement(g)));const E=yr.fromDom(document.createElement("li"));E.children.push(u.children[0]),h!==null&&E.children.push(...h.children),o.children.push(E)}else if(h!==null){r.children.splice(s+1,0,...h.children),r.children[s]=u.children[0];const E=h.children.length;s+=E,i+=E}else r.children[s]=u.children[0]}o&&r.children.splice(i-o.children.length,o.children.length,o)};return n}function Vh(){const e=t=>{let n=t.children.length;for(let r=0;r<n;r++){const i=t.children[r];if(i.type==="element"&&(e(i),i.tagName==="u"))if(i.children.length>0){t.children.splice(r,1,...i.children);const o=i.children.length-1;n+=o,r+=o}else t.children.splice(r,1),n--,r--}};return e}async function Zs(e,t){const n=document.createElement("div"),r=le.DOMSerializer.fromSchema(t);for(const o of e){const s=N1(o,t),a=r.serializeNode(s);n.appendChild(a)}return(await gn().use(Jo,{fragment:!0}).use(Qh,{orderedListItemBlockTypes:new Set(["numberedListItem"]),unorderedListItemBlockTypes:new Set(["bulletListItem"])}).use(cs).process(n.innerHTML)).value}async function ea(e,t){const n=document.createElement("div");n.innerHTML=e.trim();const i=le.DOMParser.fromSchema(t).parse(n),o=[];for(let s=0;s<i.firstChild.childCount;s++)o.push(k1(i.firstChild.child(s)));return o}async function $h(e,t){return(await gn().use(Jo,{fragment:!0}).use(Vh).use(Ta).use(xr).use(r5).process(await Zs(e,t))).value}async function Xh(e,t){const n=await gn().use(Wh).use(xr).use(pa).use(cs).process(e);return ea(n.value,t)}class ta{constructor(t,n=new WeakMap){this.tiptapEditor=t,this.blockCache=n}get allBlocks(){const t=[];return this.tiptapEditor.state.doc.firstChild.descendants(n=>(t.push(k1(n,this.blockCache)),!1)),t}get textCursorPosition(){const{node:t}=oe(this.tiptapEditor.state.doc,this.tiptapEditor.state.selection.from);return{block:k1(t,this.blockCache)}}insertBlocks(t,n,r="before"){Mr(t,n,r,this.tiptapEditor)}updateBlock(t,n){Ma(t,n,this.tiptapEditor)}removeBlocks(t){Lr(t,this.tiptapEditor)}replaceBlocks(t,n){La(t,n,this.tiptapEditor)}onContentChange(t){this.tiptapEditor.on("update",t)}async blocksToHTML(t){return Zs(t,this.tiptapEditor.schema)}async HTMLToBlocks(t){return ea(t,this.tiptapEditor.schema)}async blocksToMarkdown(t){return $h(t,this.tiptapEditor.schema)}async markdownToBlocks(t){return Xh(t,this.tiptapEditor.schema)}}const Jh=P.Extension.create({name:"blockBackgroundColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{backgroundColor:{default:"default",parseHTML:e=>e.hasAttribute("data-background-color")?e.getAttribute("data-background-color"):"default",renderHTML:e=>e.backgroundColor!=="default"&&{"data-background-color":e.backgroundColor}}}}]},addCommands(){return{setBlockBackgroundColor:(e,t)=>({state:n,view:r})=>{const i=oe(n.doc,e);return i===void 0?!1:(n.tr.setNodeAttribute(i.startPos-1,"backgroundColor",t),r.focus(),!0)}}}}),Zh=P.Mark.create({name:"backgroundColor",addAttributes(){return{color:{default:void 0,parseHTML:e=>e.getAttribute("data-background-color"),renderHTML:e=>({"data-background-color":e.color})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-background-color")?{color:e.getAttribute("data-background-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]},addCommands(){return{setBackgroundColor:e=>({commands:t})=>e!=="default"?t.setMark(this.name,{color:e}):t.unsetMark(this.name)}}}),na=new ne.PluginKey("previous-blocks"),ed={index:"index",level:"level",type:"type",depth:"depth","depth-change":"depth-change"},td=()=>{let e;return new ne.Plugin({key:na,view(t){return{update:async(n,r)=>{var i;((i=this.key)==null?void 0:i.getState(n.state).updatedBlocks.size)>0&&(e=setTimeout(()=>{n.dispatch(n.state.tr.setMeta(na,{clearUpdate:!0}))},0))},destroy:()=>{e&&clearTimeout(e)}}},state:{init(){return{prevTransactionOldBlockAttrs:{},currentTransactionOldBlockAttrs:{},updatedBlocks:new Set}},apply(t,n,r,i){if(n.currentTransactionOldBlockAttrs={},n.updatedBlocks.clear(),!t.docChanged||r.doc.eq(i.doc))return n;const o={},s=P.findChildren(r.doc,u=>u.attrs.id),a=new Map(s.map(u=>[u.node.attrs.id,u])),c=P.findChildren(i.doc,u=>u.attrs.id);for(let u of c){const h=a.get(u.node.attrs.id),m=h==null?void 0:h.node.firstChild,g=u.node.firstChild;if(h&&m&&g){const E={index:g.attrs.index,level:g.attrs.level,type:g.type.name,depth:i.doc.resolve(u.pos).depth};let A={index:m.attrs.index,level:m.attrs.level,type:m.type.name,depth:r.doc.resolve(h.pos).depth};o[u.node.attrs.id]=A,t.getMeta("numberedListIndexing")&&(u.node.attrs.id in n.prevTransactionOldBlockAttrs&&(A=n.prevTransactionOldBlockAttrs[u.node.attrs.id]),E.type==="numberedListItem"&&(A.index=E.index)),n.currentTransactionOldBlockAttrs[u.node.attrs.id]=A,JSON.stringify(A)!==JSON.stringify(E)&&(A["depth-change"]=A.depth-E.depth,n.updatedBlocks.add(u.node.attrs.id))}}return n.prevTransactionOldBlockAttrs=o,n}},props:{decorations(t){const n=this.getState(t);if(n.updatedBlocks.size===0)return;const r=[];return t.doc.descendants((i,o)=>{if(!i.attrs.id||!n.updatedBlocks.has(i.attrs.id))return;const s=n.currentTransactionOldBlockAttrs[i.attrs.id],a={};for(let[u,h]of Object.entries(s))a["data-prev-"+ed[u]]=h||"none";const c=et.Decoration.node(o,o+i.nodeSize,{...a});r.push(c)}),et.DecorationSet.create(t.doc,r)}}})},Je={blockOuter:"_blockOuter_1ltqa_5",block:"_block_1ltqa_5",blockContent:"_blockContent_1ltqa_19",blockGroup:"_blockGroup_1ltqa_47",isEmpty:"_isEmpty_1ltqa_232",isFilter:"_isFilter_1ltqa_233",hasAnchor:"_hasAnchor_1ltqa_246"},nd={blockColor:"data-block-color",blockStyle:"data-block-style",id:"data-id",depth:"data-depth",depthChange:"data-depth-change"},rd=P.Node.create({name:"blockContainer",group:"blockContainer",content:"blockContent blockGroup?",priority:50,defining:!0,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"div",getAttrs:e=>{if(typeof e=="string")return!1;const t={};for(let[n,r]of Object.entries(nd))e.getAttribute(r)&&(t[n]=e.getAttribute(r));return e.getAttribute("data-node-type")==="blockContainer"?t:!1}}]},renderHTML({HTMLAttributes:e}){return["div",P.mergeAttributes(e,{class:Je.blockOuter,"data-node-type":"block-outer"}),["div",P.mergeAttributes(e,{class:Je.block,"data-node-type":this.name}),0]]},addCommands(){return{BNCreateBlock:e=>({state:t,dispatch:n})=>{const r=t.schema.nodes.blockContainer.createAndFill();return n&&t.tr.insert(e,r),!0},BNDeleteBlock:e=>({state:t,view:n,dispatch:r})=>{const i=oe(t.doc,e);if(i===void 0)return!1;const{startPos:o,endPos:s}=i;return r&&(t.tr.deleteRange(o,s),t.tr.setSelection(new ne.TextSelection(t.doc.resolve(o+1))),n.focus()),!0},BNMergeBlocks:e=>({state:t,dispatch:n})=>{const r=t.doc.resolve(e+1).node().type.name==="blockContainer",i=t.doc.resolve(e-1).node().type.name==="blockContainer";if(!r||!i)return!1;const o=oe(t.doc,e+1),{node:s,contentNode:a,startPos:c,endPos:u,depth:h}=o;if(s.childCount===2){const E=t.doc.resolve(c+a.nodeSize+1),A=t.doc.resolve(u-1),I=E.blockRange(A);n&&t.tr.lift(I,h-1)}let m=e-1,g=oe(t.doc,m);for(;g.numChildBlocks>0;)if(m--,g=oe(t.doc,m),g===void 0)return!1;return n&&(t.tr.deleteRange(c,c+a.nodeSize),t.tr.insertText(a.textContent,m-1),t.tr.setSelection(new ne.TextSelection(t.doc.resolve(m-1)))),!0},BNSplitBlock:(e,t)=>({state:n,dispatch:r})=>{const i=oe(n.doc,e);if(i===void 0)return!1;const{contentNode:o,contentType:s,startPos:a,endPos:c,depth:u}=i,h=n.doc.cut(a+1,e),m=n.doc.cut(e,c-1),g=n.schema.nodes.blockContainer.createAndFill(),E=c+1,A=E+2;return r&&(n.tr.insert(E,g),n.tr.replace(A,A+1,m.content.size>0?new le.Slice(le.Fragment.from(m),u+2,u+2):void 0),t&&n.tr.setBlockType(A,A,n.schema.node(s).type,o.attrs),n.tr.setSelection(new ne.TextSelection(n.doc.resolve(A))),n.tr.replace(a+1,c-1,h.content.size>0?new le.Slice(le.Fragment.from(h),u+2,u+2):void 0)),!0},BNUpdateBlock:(e,t)=>({state:n,dispatch:r})=>{const i=oe(n.doc,e);if(i===void 0)return!1;const{startPos:o,endPos:s,node:a,contentNode:c}=i;if(r){if(t.children!==void 0){const u=[];for(const h of t.children)u.push(N1(h,n.schema));a.childCount===2?n.tr.replace(o+c.nodeSize+1,s-1,new le.Slice(le.Fragment.from(u),0,0)):n.tr.insert(o+c.nodeSize,n.schema.nodes.blockGroup.create({},u))}if(t.content!==void 0){let u=[];if(typeof t.content=="string")u.push(n.schema.text(t.content));else for(const h of t.content){const m=[];for(const g of h.styles)m.push(n.schema.mark(g.type,g.props));u.push(n.schema.text(h.text,m))}n.tr.replace(o+1,o+c.nodeSize-1,new le.Slice(le.Fragment.from(u),0,0))}n.tr.setNodeMarkup(o,n.schema.nodes[t.type],{...c.attrs,...t.props})}return!0},BNCreateOrUpdateBlock:(e,t)=>({state:n,chain:r})=>{const i=oe(n.doc,e);if(i===void 0)return!1;const{node:o,startPos:s,endPos:a}=i;if(o.textContent.length===0){const c=s+1;return r().BNUpdateBlock(e,t).setTextSelection(c).run()}else{const c=a+1,u=c+1;return r().BNCreateBlock(c).BNUpdateBlock(u,t).setTextSelection(u).run()}}}},addProseMirrorPlugins(){return[td()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:n})=>[()=>n.deleteSelection(),()=>n.undoInputRule(),()=>n.command(({state:r})=>{const{contentType:i}=oe(r.doc,r.selection.from),o=r.selection.$anchor.parentOffset===0,s=i.name==="paragraph";return o&&!s?n.BNUpdateBlock(r.selection.from,{type:"paragraph",props:{}}):!1}),()=>n.command(({state:r})=>r.selection.$anchor.parentOffset===0?n.liftListItem("blockContainer"):!1),()=>n.command(({state:r})=>{const{depth:i,startPos:o}=oe(r.doc,r.selection.from),s=r.selection.$anchor.parentOffset===0,a=r.selection.anchor===r.selection.head,c=o===2,u=o-1;return!c&&s&&a&&i===2?n.BNMergeBlocks(u):!1})]),Enter:()=>this.editor.commands.first(({commands:n})=>[()=>n.command(({state:r})=>{const{node:i,depth:o}=oe(r.doc,r.selection.from),s=r.selection.$anchor.parentOffset===0,a=r.selection.anchor===r.selection.head,c=i.textContent.length===0,u=o>2;return s&&a&&c&&u?n.liftListItem("blockContainer"):!1}),()=>n.command(({state:r,chain:i})=>{const{node:o,endPos:s}=oe(r.doc,r.selection.from),a=r.selection.$anchor.parentOffset===0,c=r.selection.anchor===r.selection.head,u=o.textContent.length===0;if(a&&c&&u){const h=s+1,m=h+2;return i().BNCreateBlock(h).setTextSelection(m).run(),!0}return!1}),()=>n.command(({state:r,chain:i})=>{const{node:o}=oe(r.doc,r.selection.from);return o.textContent.length===0?!1:(i().deleteSelection().BNSplitBlock(r.selection.from,!1).run(),!0)})]),Tab:()=>(this.editor.commands.sinkListItem("blockContainer"),!0),"Shift-Tab":()=>(this.editor.commands.liftListItem("blockContainer"),!0),"Mod-Alt-0":()=>this.editor.commands.BNCreateBlock(this.editor.state.selection.anchor+2),"Mod-Alt-1":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"1"}}),"Mod-Alt-2":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"2"}}),"Mod-Alt-3":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:"3"}}),"Mod-Shift-7":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"bulletListItem",props:{}}),"Mod-Shift-8":()=>this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"numberedListItem",props:{}})}}}),id=P.Node.create({name:"blockGroup",group:"blockGroup",content:"blockContainer+",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"div",getAttrs:e=>typeof e=="string"?!1:e.getAttribute("data-node-type")==="blockGroup"?null:!1}]},renderHTML({HTMLAttributes:e}){return["div",P.mergeAttributes(this.options.HTMLAttributes,e,{class:Je.blockGroup,"data-node-type":"blockGroup"}),0]}}),od=P.Node.create({name:"paragraph",group:"blockContent",content:"inline*",parseHTML(){return[{tag:"p",priority:200,node:"blockContainer"}]},renderHTML({HTMLAttributes:e}){return["div",P.mergeAttributes(e,{class:Je.blockContent,"data-content-type":this.name}),["p",0]]}}),sd=P.Node.create({name:"heading",group:"blockContent",content:"inline*",addAttributes(){return{level:{default:"1",parseHTML:e=>e.getAttribute("data-level"),renderHTML:e=>({"data-level":e.level})}}},addInputRules(){return[...["1","2","3"].map(e=>new P.InputRule({find:new RegExp(`^(#{${parseInt(e)}})\\s$`),handler:({state:t,chain:n,range:r})=>{n().BNUpdateBlock(t.selection.from,{type:"heading",props:{level:e}}).deleteRange({from:r.from,to:r.to})}}))]},parseHTML(){return[{tag:"h1",attrs:{level:"1"},node:"blockContainer"},{tag:"h2",attrs:{level:"2"},node:"blockContainer"},{tag:"h3",attrs:{level:"3"},node:"blockContainer"}]},renderHTML({node:e,HTMLAttributes:t}){return["div",P.mergeAttributes(t,{class:Je.blockContent,"data-content-type":this.name}),["h"+e.attrs.level,0]]}}),ra=e=>{const{node:t,contentType:n}=oe(e.state.doc,e.state.selection.from),r=e.state.selection.anchor===e.state.selection.head;return!n.name.endsWith("ListItem")||!r?!1:e.commands.first(({state:i,chain:o,commands:s})=>[()=>s.command(()=>t.textContent.length===0?s.BNUpdateBlock(i.selection.from,{type:"paragraph",props:{}}):!1),()=>s.command(()=>t.textContent.length>0?(o().deleteSelection().BNSplitBlock(i.selection.from,!0).run(),!0):!1)])},ad=P.Node.create({name:"bulletListItem",group:"blockContent",content:"inline*",addInputRules(){return[new P.InputRule({find:new RegExp("^[-+*]\\s$"),handler:({state:e,chain:t,range:n})=>{t().BNUpdateBlock(e.selection.from,{type:"bulletListItem",props:{}}).deleteRange({from:n.from,to:n.to})}})]},addKeyboardShortcuts(){return{Enter:()=>ra(this.editor)}},parseHTML(){return[{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="UL"?{}:!1},node:"blockContainer"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="bulletListItem"?{}:!1},priority:300,node:"blockContainer"}]},renderHTML({HTMLAttributes:e}){return["div",P.mergeAttributes(e,{class:Je.blockContent,"data-content-type":this.name}),["p",0]]}}),ld=new ne.PluginKey("numbered-list-indexing"),cd=()=>new ne.Plugin({key:ld,appendTransaction:(e,t,n)=>{const r=n.tr;r.setMeta("numberedListIndexing",!0);let i=!1;return n.doc.descendants((o,s)=>{if(o.type.name==="blockContainer"&&o.firstChild.type.name==="numberedListItem"){let a="1";const c=s===1,u=oe(r.doc,s+1);if(u===void 0)return;if(!c){const g=oe(r.doc,s-2);if(g===void 0)return;if(!(u.depth!==g.depth)){const A=g.contentNode;if(g.contentType.name==="numberedListItem"){const N=A.attrs.index;a=(parseInt(N)+1).toString()}}}u.contentNode.attrs.index!==a&&(i=!0,r.setNodeMarkup(s+1,void 0,{index:a}))}}),i?r:null}}),ud=P.Node.create({name:"numberedListItem",group:"blockContent",content:"inline*",addAttributes(){return{index:{default:null,parseHTML:e=>e.getAttribute("data-index"),renderHTML:e=>({"data-index":e.index})}}},addInputRules(){return[new P.InputRule({find:new RegExp("^1\\.\\s$"),handler:({state:e,chain:t,range:n})=>{t().BNUpdateBlock(e.selection.from,{type:"numberedListItem",props:{}}).deleteRange({from:n.from,to:n.to})}})]},addKeyboardShortcuts(){return{Enter:()=>ra(this.editor)}},addProseMirrorPlugins(){return[cd()]},parseHTML(){return[{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="OL"?{}:!1},node:"blockContainer"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="numberedListItem"?{}:!1},priority:300,node:"blockContainer"}]},renderHTML({HTMLAttributes:e}){return["div",P.mergeAttributes(e,{class:Je.blockContent,"data-content-type":this.name}),["p",0]]}}),hd=[od,sd,ad,ud,rd,id,P.Node.create({name:"doc",topNode:!0,content:"blockGroup"})],Cr={bnEditor:"_bnEditor_o0yre_3",bnRoot:"_bnRoot_o0yre_13",dragPreview:"_dragPreview_o0yre_28"},dd=P.findParentNode(e=>e.type.name==="blockContainer");function Sr(){return{active:!1,triggerCharacter:void 0,queryStartPos:void 0,items:[],keyboardHoveredItemIndex:void 0,notFoundCount:0,decorationId:void 0}}class fd{constructor({editor:t,pluginKey:n,onSelectItem:r=()=>{},suggestionsMenuFactory:i}){Y(this,"editor");Y(this,"pluginKey");Y(this,"suggestionsMenu");Y(this,"pluginState");Y(this,"itemCallback");this.editor=t,this.pluginKey=n,this.pluginState=Sr(),this.itemCallback=o=>r({item:o,editor:t,range:{from:this.pluginState.queryStartPos-this.pluginState.triggerCharacter.length,to:t.state.selection.from}}),this.suggestionsMenu=i(this.getStaticParams())}update(t,n){const r=this.pluginKey.getState(n),i=this.pluginKey.getState(t.state),o=!r.active&&i.active,s=r.active&&!i.active,a=r.active&&i.active;!o&&!a&&!s||(this.pluginState=s?r:i,s&&(this.suggestionsMenu.hide(),this.suggestionsMenu.element.removeEventListener("mousedown",c=>c.preventDefault())),a&&this.suggestionsMenu.render(this.getDynamicParams(),!1),o&&(this.suggestionsMenu.render(this.getDynamicParams(),!0),this.suggestionsMenu.element.addEventListener("mousedown",c=>c.preventDefault())))}getStaticParams(){return{itemCallback:t=>this.itemCallback(t)}}getDynamicParams(){const t=document.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);return{items:this.pluginState.items,keyboardHoveredItemIndex:this.pluginState.keyboardHoveredItemIndex,referenceRect:t.getBoundingClientRect()}}}function md({pluginKey:e,editor:t,defaultTriggerCharacter:n,suggestionsMenuFactory:r,onSelectItem:i=()=>{},items:o=()=>[]}){if(n.length!==1)throw new Error("'char' should be a single character");const s=a=>{a.dispatch(a.state.tr.setMeta(e,{deactivate:!0}))};return new ne.Plugin({key:e,view:a=>new fd({editor:t,pluginKey:e,onSelectItem:c=>{s(a),i(c)},suggestionsMenuFactory:r}),state:{init(){return Sr()},apply(a,c,u,h){var g,E,A,I;if(a.getMeta("orderedListIndexing")!==void 0)return c;if((g=a.getMeta(e))!=null&&g.activate)return{active:!0,triggerCharacter:((E=a.getMeta(e))==null?void 0:E.triggerCharacter)||"",queryStartPos:h.selection.from,items:o(""),keyboardHoveredItemIndex:0,notFoundCount:0,decorationId:`id_${Math.floor(Math.random()*4294967295)}`};if(!c.active)return c;const m={...c};if(m.items=o(h.doc.textBetween(c.queryStartPos,h.selection.from)),m.notFoundCount=0,m.items.length===0&&(m.notFoundCount=Math.max(0,c.notFoundCount+(h.selection.from-u.selection.from))),h.selection.from!==h.selection.to||(A=a.getMeta(e))!=null&&A.deactivate||a.getMeta("focus")||a.getMeta("blur")||a.getMeta("pointer")||c.active&&h.selection.from<c.queryStartPos||m.notFoundCount>3)return Sr();if(((I=a.getMeta(e))==null?void 0:I.selectedItemIndexChanged)!==void 0){let M=a.getMeta(e).selectedItemIndexChanged;M<0?M=c.items.length-1:M>=c.items.length&&(M=0),m.keyboardHoveredItemIndex=M}return m}},props:{handleKeyDown(a,c){const u=this.getState(a.state).active;if(c.key===n&&!u)return a.dispatch(a.state.tr.insertText(n).scrollIntoView().setMeta(e,{activate:!0,triggerCharacter:n})),!0;if(!u)return!1;const{triggerCharacter:h,queryStartPos:m,items:g,keyboardHoveredItemIndex:E}=e.getState(a.state);return c.key==="ArrowUp"?(a.dispatch(a.state.tr.setMeta(e,{selectedItemIndexChanged:E-1})),!0):c.key==="ArrowDown"?(a.dispatch(a.state.tr.setMeta(e,{selectedItemIndexChanged:E+1})),!0):c.key==="Enter"?(s(a),i({item:g[E],editor:t,range:{from:m-h.length,to:a.state.selection.from}}),!0):c.key==="Escape"?(s(a),!0):!1},handleClick(a){s(a)},decorations(a){const{active:c,decorationId:u,queryStartPos:h,triggerCharacter:m}=this.getState(a);if(!c)return null;if(m===""){const g=dd(a.selection);if(g)return et.DecorationSet.create(a.doc,[et.Decoration.node(g.pos,g.pos+g.node.nodeSize,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":u})])}return et.DecorationSet.create(a.doc,[et.Decoration.inline(h-m.length,h,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":u})])}}})}const Nr=new ne.PluginKey("suggestions-slash-commands"),Td=P.Extension.create({name:"slash-command",addOptions(){return{commands:void 0,slashMenuFactory:void 0}},addProseMirrorPlugins(){if(!this.options.slashMenuFactory||!this.options.commands)throw new Error("required args not defined for SlashMenuExtension");const e=this.options.commands;return[md({pluginKey:Nr,editor:this.editor,defaultTriggerCharacter:"/",suggestionsMenuFactory:this.options.slashMenuFactory,items:t=>e.filter(n=>n.match(t)),onSelectItem:({item:t,editor:n,range:r})=>{t.execute(n,r)}})]}});class A1 extends ne.Selection{constructor(n,r){super(n,r);Y(this,"nodes");const i=n.node();this.nodes=[],n.doc.nodesBetween(n.pos,r.pos,(o,s,a)=>{if(a!==null&&a.eq(i))return this.nodes.push(o),!1})}static create(n,r,i=r){return new A1(n.resolve(r),n.resolve(i))}content(){return new le.Slice(le.Fragment.from(this.nodes),0,0)}eq(n){if(!(n instanceof A1)||this.nodes.length!==n.nodes.length||this.from!==n.from||this.to!==n.to)return!1;for(let r=0;r<this.nodes.length;r++)if(!this.nodes[r].eq(n.nodes[r]))return!1;return!0}map(n,r){let i=r.mapResult(this.from),o=r.mapResult(this.to);return o.deleted?ne.Selection.near(n.resolve(i.pos)):i.deleted?ne.Selection.near(n.resolve(o.pos)):new A1(n.resolve(i.pos),n.resolve(o.pos))}toJSON(){return{type:"node",anchor:this.anchor,head:this.head}}}const pd=ya.__serializeForClipboard;let Lt;function ia(e,t){var i;let n=t.posAtCoords(e);if(!n)return;let r=t.domAtPos(n.pos).node;if(r!==t.dom){for(;r&&r.parentNode&&r.parentNode!==t.dom&&!((i=r.hasAttribute)!=null&&i.call(r,"data-id"));)r=r.parentNode;if(r)return{node:r,id:r.getAttribute("data-id")}}}function Ed(e,t){let n=ia(e,t);if(n&&n.node.nodeType===1){const r=t.docView;let i=r.nearestDesc(n.node,!0);return!i||i===r?null:i.posBefore}return null}function gd(e,t){let n,r;const i=t.resolve(e.from).node().type.spec.group==="blockContent",o=t.resolve(e.to).node().type.spec.group==="blockContent",s=Math.min(e.$anchor.depth,e.$head.depth);if(i&&o){const a=e.$from.start(s-1),c=e.$to.end(s-1);n=t.resolve(a-1).pos,r=t.resolve(c+1).pos}else n=e.from,r=e.to;return{from:n,to:r}}function oa(e,t,n=t){t===n&&(n+=e.state.doc.resolve(t+1).node().nodeSize);const r=e.domAtPos(t).node.cloneNode(!0),i=e.domAtPos(t).node,o=(c,u)=>Array.prototype.indexOf.call(c.children,u),s=o(i,e.domAtPos(t+1).node.parentElement),a=o(i,e.domAtPos(n-1).node.parentElement);for(let c=i.childElementCount-1;c>=0;c--)(c>a||c<s)&&r.removeChild(r.children[c]);Lt=r,Lt.className=Cr.dragPreview,document.body.appendChild(Lt)}function Ad(){Lt!==void 0&&(document.body.removeChild(Lt),Lt=void 0)}function _d(e,t){if(!e.dataTransfer)return;const n=t.dom.getBoundingClientRect();let r={left:n.left+n.width/2,top:e.clientY},i=Ed(r,t);if(i!=null){const o=t.state.selection,s=t.state.doc,{from:a,to:c}=gd(o,s),u=a<=i&&i<c,h=!o.$anchor.node().eq(o.$head.node());u&&h?(t.dispatch(t.state.tr.setSelection(A1.create(s,a,c))),oa(t,a,c)):(t.dispatch(t.state.tr.setSelection(ne.NodeSelection.create(t.state.doc,i))),oa(t,i));let m=t.state.selection.content(),{dom:g,text:E}=pd(t,m);e.dataTransfer.clearData(),e.dataTransfer.setData("text/html",g.innerHTML),e.dataTransfer.setData("text/plain",E),e.dataTransfer.effectAllowed="move",e.dataTransfer.setDragImage(Lt,0,0),t.dragging={slice:m,move:!0}}}class Cd{constructor({editor:t,blockMenuFactory:n,horizontalPosAnchoredAtRoot:r}){Y(this,"editor");Y(this,"horizontalPosAnchoredAtRoot");Y(this,"horizontalPosAnchor");Y(this,"blockMenu");Y(this,"hoveredBlockContent");Y(this,"menuOpen",!1);Y(this,"menuFrozen",!1);this.editor=t,this.horizontalPosAnchoredAtRoot=r,this.horizontalPosAnchor=t.view.dom.firstChild.getBoundingClientRect().x,this.blockMenu=n(this.getStaticParams()),document.body.addEventListener("mousemove",i=>{var u,h;if(this.menuFrozen)return;const o=this.editor.view.dom.firstChild.getBoundingClientRect();this.horizontalPosAnchor=o.x;const s={left:o.left+o.width/2,top:i.clientY},a=ia(s,this.editor.view);if(!a){this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide());return}if(this.menuOpen&&((u=this.hoveredBlockContent)!=null&&u.hasAttribute("data-id"))&&((h=this.hoveredBlockContent)==null?void 0:h.getAttribute("data-id"))===a.id)return;const c=a.node.firstChild;this.hoveredBlockContent=c,c&&(this.menuOpen?this.blockMenu.render(this.getDynamicParams(),!1):(this.menuOpen=!0,this.blockMenu.render(this.getDynamicParams(),!0)))},!0),document.body.addEventListener("mousedown",i=>{var o;(o=this.blockMenu.element)!=null&&o.contains(i.target)||(this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide()),this.menuFrozen=!1)},!0),document.body.addEventListener("keydown",()=>{this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide()),this.menuFrozen=!1},!0)}destroy(){this.menuOpen&&(this.menuOpen=!1,this.blockMenu.hide())}addBlock(){this.menuOpen=!1,this.menuFrozen=!0,this.blockMenu.hide();const t=this.hoveredBlockContent.getBoundingClientRect(),n=this.editor.view.posAtCoords({left:t.left+t.width/2,top:t.top+t.height/2});if(!n)return;const r=oe(this.editor.state.doc,n.pos);if(r===void 0)return;const{contentNode:i,endPos:o}=r;if(i.textContent.length!==0){const s=o+1,a=s+2;this.editor.chain().BNCreateBlock(s).BNUpdateBlock(a,{type:"paragraph",props:{}}).setTextSelection(a).run()}else this.editor.commands.setTextSelection(o);this.editor.view.focus(),this.editor.view.dispatch(this.editor.view.state.tr.scrollIntoView().setMeta(Nr,{activate:!0,type:"drag"}))}deleteBlock(){this.menuOpen=!1,this.blockMenu.hide();const t=this.hoveredBlockContent.getBoundingClientRect(),n=this.editor.view.posAtCoords({left:t.left+t.width/2,top:t.top+t.height/2});n&&this.editor.commands.BNDeleteBlock(n.pos)}setBlockBackgroundColor(t){this.menuOpen=!1,this.blockMenu.hide();const n=this.hoveredBlockContent.getBoundingClientRect(),r=this.editor.view.posAtCoords({left:n.left+n.width/2,top:n.top+n.height/2});r&&this.editor.commands.setBlockBackgroundColor(r.pos,t)}setBlockTextColor(t){this.menuOpen=!1,this.blockMenu.hide();const n=this.hoveredBlockContent.getBoundingClientRect(),r=this.editor.view.posAtCoords({left:n.left+n.width/2,top:n.top+n.height/2});r&&this.editor.commands.setBlockTextColor(r.pos,t)}getStaticParams(){return{addBlock:()=>this.addBlock(),deleteBlock:()=>this.deleteBlock(),blockDragStart:t=>_d(t,this.editor.view),blockDragEnd:()=>Ad(),freezeMenu:()=>{this.menuFrozen=!0},unfreezeMenu:()=>{this.menuFrozen=!1},setBlockBackgroundColor:t=>this.setBlockBackgroundColor(t),setBlockTextColor:t=>this.setBlockTextColor(t)}}getDynamicParams(){const t=this.hoveredBlockContent.getBoundingClientRect();return{blockBackgroundColor:this.editor.getAttributes("blockContainer").backgroundColor,blockTextColor:this.editor.getAttributes("blockContainer").textColor,referenceRect:new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:t.x,t.y,t.width,t.height)}}}const Sd=e=>new ne.Plugin({key:new ne.PluginKey("DraggableBlocksPlugin"),view:()=>new Cd({editor:e.editor,blockMenuFactory:e.blockSideMenuFactory,horizontalPosAnchoredAtRoot:!0})}),Nd=P.Extension.create({name:"DraggableBlocksExtension",priority:1e3,addProseMirrorPlugins(){if(!this.options.blockSideMenuFactory)throw new Error("UI Element factory not defined for DraggableBlocksExtension");return[Sd({editor:this.editor,blockSideMenuFactory:this.options.blockSideMenuFactory})]}});class kd{constructor({editor:t,formattingToolbarFactory:n,view:r,shouldShow:i}){Y(this,"editor");Y(this,"view");Y(this,"formattingToolbar");Y(this,"preventHide",!1);Y(this,"preventShow",!1);Y(this,"toolbarIsOpen",!1);Y(this,"shouldShow",({view:t,state:n,from:r,to:i})=>{const{doc:o,selection:s}=n,{empty:a}=s,c=!o.textBetween(r,i).length&&P.isTextSelection(n.selection);return!(!t.hasFocus()||a||c)});Y(this,"viewMousedownHandler",()=>{this.preventShow=!0});Y(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.editor.view))});Y(this,"dragstartHandler",()=>{this.formattingToolbar.hide(),this.toolbarIsOpen=!1});Y(this,"focusHandler",()=>{setTimeout(()=>this.update(this.editor.view))});Y(this,"blurHandler",({event:t})=>{var n,r;if(this.preventHide){this.preventHide=!1;return}t!=null&&t.relatedTarget&&((r=(n=this.formattingToolbar.element)==null?void 0:n.parentNode)!=null&&r.contains(t.relatedTarget))||this.toolbarIsOpen&&(this.formattingToolbar.hide(),this.toolbarIsOpen=!1)});this.editor=t,this.view=r,this.formattingToolbar=n(this.getStaticParams()),i&&(this.shouldShow=i),this.view.dom.addEventListener("mousedown",this.viewMousedownHandler),this.view.dom.addEventListener("mouseup",this.viewMouseupHandler),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler)}update(t,n){var g;const{state:r,composing:i}=t,{doc:o,selection:s}=r,a=n&&n.doc.eq(o)&&n.selection.eq(s);if(i||a)return;const{ranges:c}=s,u=Math.min(...c.map(E=>E.$from.pos)),h=Math.max(...c.map(E=>E.$to.pos)),m=(g=this.shouldShow)==null?void 0:g.call(this,{editor:this.editor,view:t,state:r,oldState:n,from:u,to:h});if(!this.toolbarIsOpen&&!this.preventShow&&(m||this.preventHide)){this.formattingToolbar.render(this.getDynamicParams(),!0),this.toolbarIsOpen=!0,this.formattingToolbar.element.addEventListener("mousedown",E=>E.preventDefault());return}if(this.toolbarIsOpen&&!this.preventShow&&(m||this.preventHide)){this.formattingToolbar.render(this.getDynamicParams(),!1);return}if(this.toolbarIsOpen&&!this.preventHide&&(!m||this.preventShow)){this.formattingToolbar.hide(),this.toolbarIsOpen=!1,this.formattingToolbar.element.removeEventListener("mousedown",E=>E.preventDefault());return}}destroy(){this.view.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.view.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}getSelectionBoundingBox(){const{state:t}=this.editor.view,{selection:n}=t,{ranges:r}=n,i=Math.min(...r.map(s=>s.$from.pos)),o=Math.max(...r.map(s=>s.$to.pos));if(P.isNodeSelection(n)){const s=this.editor.view.nodeDOM(i);if(s)return s.getBoundingClientRect()}return P.posToDOMRect(this.editor.view,i,o)}getStaticParams(){return{toggleBold:()=>{this.editor.view.focus(),this.editor.commands.toggleBold()},toggleItalic:()=>{this.editor.view.focus(),this.editor.commands.toggleItalic()},toggleUnderline:()=>{this.editor.view.focus(),this.editor.commands.toggleUnderline()},toggleStrike:()=>{this.editor.view.focus(),this.editor.commands.toggleStrike()},setHyperlink:(t,n)=>{if(t==="")return;let{from:r,to:i}=this.editor.state.selection;n||(n=this.editor.state.doc.textBetween(r,i));const o=this.editor.schema.mark("link",{href:t});this.editor.view.dispatch(this.editor.view.state.tr.insertText(n,r,i).addMark(r,r+n.length,o)),this.editor.view.focus()},setTextColor:t=>{this.editor.view.focus(),this.editor.commands.setTextColor(t)},setBackgroundColor:t=>{this.editor.view.focus(),this.editor.commands.setBackgroundColor(t)},setTextAlignment:t=>{this.editor.view.focus(),this.editor.commands.setTextAlignment(t)},increaseBlockIndent:()=>{this.editor.view.focus(),this.editor.commands.sinkListItem("blockContainer")},decreaseBlockIndent:()=>{this.editor.view.focus(),this.editor.commands.liftListItem("blockContainer")},updateBlock:t=>{this.editor.view.focus(),this.editor.commands.BNUpdateBlock(this.editor.state.selection.from,t)}}}getDynamicParams(){const t=oe(this.editor.state.doc,this.editor.state.selection.from);return{boldIsActive:this.editor.isActive("bold"),italicIsActive:this.editor.isActive("italic"),underlineIsActive:this.editor.isActive("underline"),strikeIsActive:this.editor.isActive("strike"),hyperlinkIsActive:this.editor.isActive("link"),activeHyperlinkUrl:this.editor.getAttributes("link").href||"",activeHyperlinkText:this.editor.state.doc.textBetween(this.editor.state.selection.from,this.editor.state.selection.to),textColor:this.editor.getAttributes("textColor").color||"default",backgroundColor:this.editor.getAttributes("backgroundColor").color||"default",textAlignment:this.editor.getAttributes(t.contentType).textAlignment||"left",canIncreaseBlockIndent:this.editor.state.doc.resolve(t.startPos).index(t.depth-1)>0,canDecreaseBlockIndent:t.depth>2,block:{type:t.contentType.name,props:t.contentNode.attrs},referenceRect:this.getSelectionBoundingBox()}}}const Id=e=>new ne.Plugin({key:new ne.PluginKey("FormattingToolbarPlugin"),view:t=>new kd({view:t,...e})}),Od=P.Extension.create({name:"FormattingToolbarExtension",addProseMirrorPlugins(){if(!this.options.formattingToolbarFactory)throw new Error("UI Element factory not defined for FormattingToolbarExtension");return[Id({editor:this.editor,formattingToolbarFactory:this.options.formattingToolbarFactory,pluginKey:new ne.PluginKey("FormattingToolbarPlugin")})]}}),xd=new ne.PluginKey("HyperlinkToolbarPlugin");class yd{constructor({editor:t,hyperlinkToolbarFactory:n}){Y(this,"editor");Y(this,"hyperlinkToolbar");Y(this,"menuUpdateTimer");Y(this,"startMenuUpdateTimer");Y(this,"stopMenuUpdateTimer");Y(this,"mouseHoveredHyperlinkMark");Y(this,"mouseHoveredHyperlinkMarkRange");Y(this,"keyboardHoveredHyperlinkMark");Y(this,"keyboardHoveredHyperlinkMarkRange");Y(this,"hyperlinkMark");Y(this,"hyperlinkMarkRange");this.editor=t,this.hyperlinkToolbar=n(this.getStaticParams()),this.startMenuUpdateTimer=()=>{this.menuUpdateTimer=setTimeout(()=>{this.update()},250)},this.stopMenuUpdateTimer=()=>(this.menuUpdateTimer&&(clearTimeout(this.menuUpdateTimer),this.menuUpdateTimer=void 0),!1),t.view.dom.addEventListener("mouseover",r=>{if(this.mouseHoveredHyperlinkMark=void 0,this.mouseHoveredHyperlinkMarkRange=void 0,this.stopMenuUpdateTimer(),r.target instanceof HTMLAnchorElement&&r.target.nodeName==="A"){const i=r.target,o=t.view.posAtDOM(i,0)+1,s=t.state.doc.resolve(o),a=s.marks();for(const c of a)if(c.type.name===t.schema.mark("link").type.name){this.mouseHoveredHyperlinkMark=c,this.mouseHoveredHyperlinkMarkRange=P.getMarkRange(s,c.type,c.attrs)||void 0;break}}return this.startMenuUpdateTimer(),!1})}update(){var n,r,i,o;if(!this.editor.view.hasFocus())return;const t=this.hyperlinkMark;if(this.hyperlinkMark=void 0,this.hyperlinkMarkRange=void 0,this.keyboardHoveredHyperlinkMark=void 0,this.keyboardHoveredHyperlinkMarkRange=void 0,this.editor.state.selection.empty){const s=this.editor.state.selection.$from.marks();for(const a of s)if(a.type.name===this.editor.schema.mark("link").type.name){this.keyboardHoveredHyperlinkMark=a,this.keyboardHoveredHyperlinkMarkRange=P.getMarkRange(this.editor.state.selection.$from,a.type,a.attrs)||void 0;break}}if(this.mouseHoveredHyperlinkMark&&(this.hyperlinkMark=this.mouseHoveredHyperlinkMark,this.hyperlinkMarkRange=this.mouseHoveredHyperlinkMarkRange),this.keyboardHoveredHyperlinkMark&&(this.hyperlinkMark=this.keyboardHoveredHyperlinkMark,this.hyperlinkMarkRange=this.keyboardHoveredHyperlinkMarkRange),this.hyperlinkMark){if(this.getDynamicParams(),!t){this.hyperlinkToolbar.render(this.getDynamicParams(),!0),(n=this.hyperlinkToolbar.element)==null||n.addEventListener("mouseleave",this.startMenuUpdateTimer),(r=this.hyperlinkToolbar.element)==null||r.addEventListener("mouseenter",this.stopMenuUpdateTimer);return}this.hyperlinkToolbar.render(this.getDynamicParams(),!1);return}if(!this.hyperlinkMark&&t){(i=this.hyperlinkToolbar.element)==null||i.removeEventListener("mouseleave",this.startMenuUpdateTimer),(o=this.hyperlinkToolbar.element)==null||o.removeEventListener("mouseenter",this.stopMenuUpdateTimer),this.hyperlinkToolbar.hide();return}}getStaticParams(){return{editHyperlink:(t,n)=>{const r=this.editor.view.state.tr.insertText(n,this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to);r.addMark(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.from+n.length,this.editor.schema.mark("link",{href:t})),this.editor.view.dispatch(r),this.editor.view.focus(),this.hyperlinkToolbar.hide()},deleteHyperlink:()=>{this.editor.view.dispatch(this.editor.view.state.tr.removeMark(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to,this.hyperlinkMark.type).setMeta("preventAutolink",!0)),this.editor.view.focus(),this.hyperlinkToolbar.hide()}}}getDynamicParams(){return{url:this.hyperlinkMark.attrs.href,text:this.editor.view.state.doc.textBetween(this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to),referenceRect:P.posToDOMRect(this.editor.view,this.hyperlinkMarkRange.from,this.hyperlinkMarkRange.to)}}}const Rd=(e,t)=>new ne.Plugin({key:xd,view:()=>new yd({editor:e,hyperlinkToolbarFactory:t.hyperlinkToolbarFactory})}),bd=Rr.Link.extend({priority:500,addProseMirrorPlugins(){var e;if(!this.options.hyperlinkToolbarFactory)throw new Error("UI Element factory not defined for HyperlinkMark");return[...((e=this.parent)==null?void 0:e.call(this))||[],Rd(this.editor,{hyperlinkToolbarFactory:this.options.hyperlinkToolbarFactory})]}}),Md=new ne.PluginKey("blocknote-placeholder"),Ld=P.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",isFilterClass:"is-filter",hasAnchorClass:"has-anchor",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ne.Plugin({key:Md,props:{decorations:e=>{const{doc:t,selection:n}=e,r=Nr.getState(e),i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,s=[];if(i)return t.descendants((a,c)=>{const u=o>=c&&o<=c+a.nodeSize,h=!a.isLeaf&&!a.childCount;if((u||!this.options.showOnlyCurrent)&&h){const m=[this.options.emptyNodeClass];this.editor.isEmpty&&m.push(this.options.emptyEditorClass),u&&m.push(this.options.hasAnchorClass),(r==null?void 0:r.triggerCharacter)===""&&(r!=null&&r.active)&&m.push(this.options.isFilterClass);const g=et.Decoration.node(c,c+a.nodeSize,{class:m.join(" ")});s.push(g)}return this.options.includeChildren}),et.DecorationSet.create(t,s)}}})]}}),Pd=()=>/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);function kr(e){return Pd()?e.replace("Mod","⌘"):e.replace("Mod","Ctrl")}class Pt{constructor(t,n,r=[],i,o,s){this.name=t,this.execute=n,this.aliases=r,this.group=i,this.hint=o,this.shortcut=s}match(t){return this.name.toLowerCase().startsWith(t.toLowerCase())||this.aliases.filter(n=>n.toLowerCase().startsWith(t.toLowerCase())).length!==0}}const sa=[new Pt("Heading",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"heading",props:{level:"1"}}).run(),["h","heading1","h1"],"Headings","Used for a top-level heading",kr("Mod-Alt-1")),new Pt("Heading 2",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"heading",props:{level:"2"}}).run(),["h2","heading2","subheading"],"Headings","Used for key sections",kr("Mod-Alt-2")),new Pt("Heading 3",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"heading",props:{level:"3"}}).run(),["h3","heading3","subheading"],"Headings","Used for subsections and group headings",kr("Mod-Alt-3")),new Pt("Numbered List",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"numberedListItem",props:{}}).run(),["li","list","numberedlist","numbered list"],"Basic blocks","Used to display a numbered list","Mod-Alt-7"),new Pt("Bullet List",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"bulletListItem",props:{}}).run(),["ul","list","bulletlist","bullet list"],"Basic blocks","Used to display an unordered list","Mod-Alt-9"),new Pt("Paragraph",(e,t)=>e.chain().focus().deleteRange(t).BNCreateOrUpdateBlock(t.from,{type:"paragraph",props:{}}).run(),["p"],"Basic blocks","Used for the body of your document","Mod-Alt-0")],Dd=P.Extension.create({name:"textAlignment",addGlobalAttributes(){return[{types:["paragraph","heading","bulletListItem","numberedListItem"],attributes:{textAlignment:{default:"left",parseHTML:e=>e.getAttribute("data-text-alignment"),renderHTML:e=>e.textAlignment!=="left"&&{"data-text-alignment":e.textAlignment}}}}]},addCommands(){return{setTextAlignment:e=>({state:t})=>{const n=[],r=oe(t.doc,t.selection.from);if(r===void 0)return!1;let i=r.startPos;for(;i<t.selection.to;)t.doc.resolve(i).node().type.spec.group==="blockContent"?(n.push(i-1),i+=t.doc.resolve(i).node().nodeSize-1):i+=1;for(const o of n)t.tr.setNodeAttribute(o,"textAlignment",e);return!0}}}}),Bd=P.Extension.create({name:"blockTextColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{textColor:{default:"default",parseHTML:e=>e.hasAttribute("data-text-color")?e.getAttribute("data-text-color"):"default",renderHTML:e=>e.textColor!=="default"&&{"data-text-color":e.textColor}}}}]},addCommands(){return{setBlockTextColor:(e,t)=>({state:n,view:r})=>{const i=oe(n.doc,e);return i===void 0?!1:(n.tr.setNodeAttribute(i.startPos-1,"textColor",t),r.focus(),!0)}}}}),wd=P.Mark.create({name:"textColor",addAttributes(){return{color:{default:void 0,parseHTML:e=>e.getAttribute("data-text-color"),renderHTML:e=>({"data-text-color":e.color})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-text-color")?{color:e.getAttribute("data-text-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]},addCommands(){return{setTextColor:e=>({commands:t})=>e!=="default"?t.setMark(this.name,{color:e}):t.unsetMark(this.name)}}}),Hd=P.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const e=new ne.PluginKey(this.name);return[new ne.Plugin({key:e,appendTransaction:(t,n,r)=>{const{doc:i,tr:o,schema:s}=r,a=e.getState(r),c=i.content.size-2,u=s.nodes.blockContainer,h=s.nodes.paragraph;if(a)return o.insert(c,u.create(void 0,h.create()))},state:{init:(t,n)=>{},apply:(t,n)=>{if(!t.docChanged)return n;let r=t.doc.lastChild;if(!r||r.type.name!=="blockGroup")throw new Error("Expected blockGroup");if(r=r.lastChild,!r||r.type.name!=="blockContainer")throw new Error("Expected blockContainer");return r.nodeSize>4}}})]}}),aa=e=>{const t=[P.extensions.ClipboardTextSerializer,P.extensions.Commands,P.extensions.Editable,P.extensions.FocusEvents,P.extensions.Tabindex,_a,Ld.configure({emptyNodeClass:Je.isEmpty,hasAnchorClass:Je.hasAnchor,isFilterClass:Je.isFilter,includeChildren:!0,showOnlyCurrent:!1}),hn.configure({types:["blockContainer"]}),Ca,Ia,Ea,ga,Na,ka,Oa,wd,Bd,Zh,Jh,Dd,...hd,Aa.configure({width:5,color:"#ddeeff"}),Sa.History,Hd];return e.uiFactories.blockSideMenuFactory&&t.push(Nd.configure({blockSideMenuFactory:e.uiFactories.blockSideMenuFactory})),e.uiFactories.formattingToolbarFactory&&t.push(Od.configure({formattingToolbarFactory:e.uiFactories.formattingToolbarFactory})),e.uiFactories.hyperlinkToolbarFactory?t.push(bd.configure({hyperlinkToolbarFactory:e.uiFactories.hyperlinkToolbarFactory})):t.push(Rr.Link),e.uiFactories.slashMenuFactory&&t.push(Td.configure({commands:e.slashCommands,slashMenuFactory:e.uiFactories.slashMenuFactory})),t},Fd={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1};class vd extends ta{constructor(n={}){var a,c,u;const r=aa({uiFactories:n.uiFactories||{},slashCommands:n.slashCommands||sa});let i=n.disableHistoryExtension?r.filter(h=>h.name!=="history"):r;const o={...Fd,...n._tiptapOptions,onUpdate:()=>{var h;(h=n.onUpdate)==null||h.call(n)},onCreate:()=>{var h;(h=n.onCreate)==null||h.call(n)},extensions:n.enableBlockNoteExtensions===!1?(a=n._tiptapOptions)==null?void 0:a.extensions:[...((c=n._tiptapOptions)==null?void 0:c.extensions)||[],...i],editorProps:{attributes:{...n.editorDOMAttributes||{},class:[Cr.bnEditor,Cr.bnRoot,((u=n.editorDOMAttributes)==null?void 0:u.class)||""].join(" ")}}},s=new P.Editor(o);super(s);Y(this,"_tiptapEditor");this._tiptapEditor=s}get domElement(){return this._tiptapEditor.view.dom}}z.BlockNoteEditor=vd,z.Editor=ta,z.SlashMenuItem=Pt,z.blockProps=un,z.defaultSlashCommands=sa,z.getBlockNoteExtensions=aa,z.globalProps=$t,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
2
51
|
//# sourceMappingURL=blocknote.umd.cjs.map
|