@collaflow/app 0.1.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.
Files changed (102) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +29 -0
  3. package/.next/app-path-routes-manifest.json +4 -0
  4. package/.next/build-manifest.json +33 -0
  5. package/.next/cache/.previewinfo +1 -0
  6. package/.next/cache/.rscinfo +1 -0
  7. package/.next/cache/.tsbuildinfo +1 -0
  8. package/.next/cache/config.json +7 -0
  9. package/.next/cache/webpack/client-production/0.pack +0 -0
  10. package/.next/cache/webpack/client-production/1.pack +0 -0
  11. package/.next/cache/webpack/client-production/2.pack +0 -0
  12. package/.next/cache/webpack/client-production/index.pack +0 -0
  13. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  14. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  15. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  16. package/.next/cache/webpack/server-production/0.pack +0 -0
  17. package/.next/cache/webpack/server-production/index.pack +0 -0
  18. package/.next/diagnostics/build-diagnostics.json +6 -0
  19. package/.next/diagnostics/framework.json +1 -0
  20. package/.next/export-marker.json +6 -0
  21. package/.next/images-manifest.json +58 -0
  22. package/.next/next-minimal-server.js.nft.json +1 -0
  23. package/.next/next-server.js.nft.json +1 -0
  24. package/.next/package.json +1 -0
  25. package/.next/prerender-manifest.json +61 -0
  26. package/.next/react-loadable-manifest.json +6 -0
  27. package/.next/required-server-files.json +321 -0
  28. package/.next/routes-manifest.json +53 -0
  29. package/.next/server/app/_not-found/page.js +2 -0
  30. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  31. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  32. package/.next/server/app/_not-found.html +1 -0
  33. package/.next/server/app/_not-found.meta +8 -0
  34. package/.next/server/app/_not-found.rsc +15 -0
  35. package/.next/server/app/index.html +1 -0
  36. package/.next/server/app/index.meta +7 -0
  37. package/.next/server/app/index.rsc +19 -0
  38. package/.next/server/app/page.js +86 -0
  39. package/.next/server/app/page.js.nft.json +1 -0
  40. package/.next/server/app/page_client-reference-manifest.js +1 -0
  41. package/.next/server/app-paths-manifest.json +4 -0
  42. package/.next/server/chunks/15.js +6 -0
  43. package/.next/server/chunks/575.js +32 -0
  44. package/.next/server/functions-config-manifest.json +4 -0
  45. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  46. package/.next/server/middleware-build-manifest.js +1 -0
  47. package/.next/server/middleware-manifest.json +6 -0
  48. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  49. package/.next/server/next-font-manifest.js +1 -0
  50. package/.next/server/next-font-manifest.json +1 -0
  51. package/.next/server/pages/404.html +1 -0
  52. package/.next/server/pages/500.html +1 -0
  53. package/.next/server/pages/_app.js +1 -0
  54. package/.next/server/pages/_app.js.nft.json +1 -0
  55. package/.next/server/pages/_document.js +1 -0
  56. package/.next/server/pages/_document.js.nft.json +1 -0
  57. package/.next/server/pages/_error.js +19 -0
  58. package/.next/server/pages/_error.js.nft.json +1 -0
  59. package/.next/server/pages-manifest.json +6 -0
  60. package/.next/server/server-reference-manifest.js +1 -0
  61. package/.next/server/server-reference-manifest.json +1 -0
  62. package/.next/server/webpack-runtime.js +1 -0
  63. package/.next/static/cawI4PxFre1uXaV3w_OOh/_buildManifest.js +1 -0
  64. package/.next/static/cawI4PxFre1uXaV3w_OOh/_ssgManifest.js +1 -0
  65. package/.next/static/chunks/5f994265-851b4fe5bb9f6bdf.js +1 -0
  66. package/.next/static/chunks/730-47357526b52cb7a3.js +1 -0
  67. package/.next/static/chunks/761-d78a04fe4a7f0c61.js +2 -0
  68. package/.next/static/chunks/7fa71398-d732f2f130f8dbf8.js +1 -0
  69. package/.next/static/chunks/9f40746c-e311a6f65dce894f.js +1 -0
  70. package/.next/static/chunks/app/_not-found/page-d0d3baa38855a614.js +1 -0
  71. package/.next/static/chunks/app/layout-6114418103b4dbcc.js +1 -0
  72. package/.next/static/chunks/app/page-a5e0c15f5813dcaf.js +1 -0
  73. package/.next/static/chunks/framework-b71824acec8cd700.js +1 -0
  74. package/.next/static/chunks/main-5d112cac3f90f4f6.js +1 -0
  75. package/.next/static/chunks/main-app-3133c331999859a2.js +1 -0
  76. package/.next/static/chunks/pages/_app-c068c4a8491e6db8.js +1 -0
  77. package/.next/static/chunks/pages/_error-464ab45f79bb2315.js +1 -0
  78. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  79. package/.next/static/chunks/webpack-e72e354969197063.js +1 -0
  80. package/.next/static/css/043b8a737f2ce68d.css +5 -0
  81. package/.next/trace +2 -0
  82. package/.next/types/app/layout.ts +84 -0
  83. package/.next/types/app/page.ts +84 -0
  84. package/.next/types/cache-life.d.ts +141 -0
  85. package/.next/types/package.json +1 -0
  86. package/.next/types/routes.d.ts +57 -0
  87. package/.next/types/validator.ts +61 -0
  88. package/LICENSE +201 -0
  89. package/components.json +20 -0
  90. package/next-env.d.ts +6 -0
  91. package/next.config.mjs +19 -0
  92. package/package.json +46 -0
  93. package/postcss.config.mjs +9 -0
  94. package/src/app/globals.css +16 -0
  95. package/src/app/layout.tsx +19 -0
  96. package/src/app/page.test.tsx +11 -0
  97. package/src/app/page.tsx +86 -0
  98. package/src/components/MarkdownEditor.tsx +432 -0
  99. package/src/lib/utils.ts +6 -0
  100. package/tailwind.config.ts +59 -0
  101. package/tsconfig.json +27 -0
  102. package/vitest.config.ts +8 -0
@@ -0,0 +1,2 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[761],{14:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});let r=document.createElement("i");function i(e){let t="&"+e+";";r.innerHTML=t;let n=r.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}},84:(e,t,n)=>{"use strict";n.d(t,{CW:()=>f,D1:()=>s,D7:()=>l,Dk:()=>r,KD:()=>i,KJ:()=>a,P1:()=>h,WD:()=>d,WY:()=>u,vZ:()=>p,wn:()=>o,wt:()=>c});let r=1,i=2,s=4,o=8,a=32,l=64,c=128,u=31,h=63,d=127,p=0x7fffffff,f=0xffffffff},141:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},289:(e,t,n)=>{"use strict";n.d(t,{A2:()=>nR,KE:()=>rn,CU:()=>n4,ge:()=>nk,lq:()=>n_,x8:()=>nv,g3:()=>nH,MD:()=>nN,qf:()=>nI,CI:()=>nV,Fq:()=>nu,Sr:()=>nJ,kY:()=>na,f4:()=>nh,nu:()=>nD,u7:()=>nE,P_:()=>nx,bQ:()=>nU,TP:()=>nd,eM:()=>np,P5:()=>ny,k:()=>n8,Sy:()=>n9,pZ:()=>nS,M:()=>nK});var r={};n.r(r),n.d(r,{attentionMarkers:()=>eN,contentInitial:()=>ex,disable:()=>eO,document:()=>eS,flow:()=>eA,flowInitial:()=>eE,insideSpan:()=>eI,string:()=>eC,text:()=>eT});var i=n(436);let s={};function o(e,t){let n=t||s;return a(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function a(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return l(e.children,t,n)}return Array.isArray(e)?l(e,t,n):""}function l(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=a(e[i],t,n);return r.join("")}function c(e,t,n,r){let i,s=e.length,o=0;if(t=t<0?-t>s?0:s+t:t>s?s:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function u(e,t){return e.length>0?(c(e,e.length,0,t),e):t}class h{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&d(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),d(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),d(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);d(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);d(this.left,t.reverse())}}}function d(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function p(e){let t,n,r,i,s,o,a,l={},u=-1,d=new h(e);for(;++u<d.length;){for(;u in l;)u=l[u];if(t=d.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===d.get(u-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let n,r,i=e.get(t)[1],s=e.get(t)[2],o=t-1,a=[],l=i._tokenizer;!l&&(l=s.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,u=[],h={},d=-1,p=i,f=0,g=0,m=[0];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),!p._tokenizer&&(n=s.sliceStream(p),p.next||n.push(null),r&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++d<c.length;)"exit"===c[d][0]&&"enter"===c[d-1][0]&&c[d][1].type===c[d-1][1].type&&c[d][1].start.line!==c[d][1].end.line&&(g=d+1,m.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):m.pop(),d=m.length;d--;){let t=c.slice(m[d],m[d+1]),n=a.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),d=-1;++d<u.length;)h[f+u[d][0]]=f+u[d][1],f+=u[d][1]-u[d][0]-1;return h}(d,u)),u=l[u],a=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=d.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(d.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...d.get(n)[1].start},(s=d.slice(n,u)).unshift(t),d.splice(n,u-n+1,s))}}return c(e,0,1/0,d.slice(0)),!a}let f={}.hasOwnProperty,g=T(/[A-Za-z]/),m=T(/[\dA-Za-z]/),y=T(/[#-'*+\--9=?A-Z^-~]/);function b(e){return null!==e&&(e<32||127===e)}let k=T(/\d/),v=T(/[\dA-Fa-f]/),w=T(/[!-/:-@[-`{-~]/);function S(e){return null!==e&&e<-2}function x(e){return null!==e&&(e<0||32===e)}function E(e){return -2===e||-1===e||32===e}let A=T(/\p{P}|\p{S}/u),C=T(/\s/);function T(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function I(e,t,n,r){let i=r?r-1:1/0,s=0;return function(r){return E(r)?(e.enter(n),function r(o){return E(o)&&s++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let N={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return S(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},O={tokenize:function(e){let t,n,r,i=this,s=[],o=0;return a;function a(t){if(o<s.length){let n=s[o];return i.containerState=n[1],e.attempt(n[0].continuation,l,u)(t)}return u(t)}function l(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&b();let r=i.events.length,s=r;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){n=i.events[s][1].end;break}y(o);let a=r;for(;a<i.events.length;)i.events[a][1].end={...n},a++;return c(i.events,s+1,0,i.events.slice(r)),i.events.length=a,u(e)}return a(e)}function u(n){if(o===s.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return g(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(R,h,d)(n)}function h(e){return t&&b(),y(o),p(e)}function d(e){return i.parser.lazy[i.now().line]=o!==s.length,r=i.now().offset,g(e)}function p(t){return i.containerState={},e.attempt(R,f,g)(t)}function f(e){return o++,s.push([i.currentConstruct,i.containerState]),p(e)}function g(r){if(null===r){t&&b(),y(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),y(0),e.consume(n);return}return S(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,i.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,s){let a=i.sliceStream(e);if(s&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),i.parser.lazy[e.start.line]){let e,n,s=t.events.length;for(;s--;)if(t.events[s][1].start.offset<r&&(!t.events[s][1].end||t.events[s][1].end.offset>r))return;let a=i.events.length,l=a;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){if(e){n=i.events[l][1].end;break}e=!0}for(y(o),s=a;s<i.events.length;)i.events[s][1].end={...n},s++;c(i.events,l+1,0,i.events.slice(a)),i.events.length=s}}function y(t){let n=s.length;for(;n-- >t;){let t=s[n];i.containerState=t[1],t[0].exit.call(i,e)}s.length=t}function b(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},R={tokenize:function(e,t,n){return I(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},M={partial:!0,tokenize:function(e,t,n){return function(t){return E(t)?I(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||S(e)?t(e):n(e)}}},L={resolve:function(e){return p(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):S(t)?e.check(D,s,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function s(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},D={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I(e,i,"linePrefix")};function i(i){if(null===i||S(i))return n(i);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},P={tokenize:function(e){let t=this,n=e.attempt(M,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,I(e,e.attempt(this.parser.constructs.flow,r,e.attempt(L,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},_={resolveAll:U()},F=z("string"),B=z("text");function z(e){return{resolveAll:U("text"===e?$:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,s,o);return s;function s(e){return l(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function U(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function $(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],s=t.sliceStream(i),o=s.length,a=-1,l=0;for(;o--;){let e=s[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let s={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:i.start._bufferIndex+a,_index:i.start._index+o,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...s.start},i.start.offset===i.end.offset?Object.assign(i,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}let j={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(s){var o;return e.enter("thematicBreak"),r=o=s,function s(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),E(n)?I(e,s,"whitespace")(n):s(n))}(o)):i>=3&&(null===o||S(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},H={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(M,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,I(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!E(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(q,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,I(e,e.attempt(H,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],s=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:k(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(j,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return k(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(M,r.interrupt?n:l,e.attempt(W,u,c))}function l(e){return r.containerState.initialBlankLine=!0,s++,u(e)}function c(t){return E(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},W={partial:!0,tokenize:function(e,t,n){let r=this;return I(e,function(e){let i=r.events[r.events.length-1];return!E(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},q={partial:!0,tokenize:function(e,t,n){let r=this;return I(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},K={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return E(t)?I(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(K,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return E(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function G(e,t,n,r,i,s,o,a,l){let c=l||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(s),e.consume(t),e.exit(s),h):null===t||32===t||41===t||b(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function h(n){return 62===n?(e.enter(s),e.consume(n),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),h(t)):null===t||60===t||S(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function f(i){return!u&&(null===i||41===i||x(i))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(i)):u<c&&40===i?(e.consume(i),u++,f):41===i?(e.consume(i),u--,f):null===i||32===i||40===i||b(i)?n(i):(e.consume(i),92===i?g:f)}function g(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function V(e,t,n,r,i,s){let o,a=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(s),c};function c(h){return l>999||null===h||91===h||93===h&&!o||94===h&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):93===h?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):S(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||S(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!E(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function J(e,t,n,r,i,s){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(s),l(n))}function l(t){return t===o?(e.exit(s),a(o)):null===t?n(t):S(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||S(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function Y(e,t){let n;return function r(i){return S(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):E(i)?I(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Z(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let X={partial:!0,tokenize:function(e,t,n){return function(t){return x(t)?Y(e,r)(t):n(t)};function r(t){return J(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return E(t)?I(e,s,"whitespace")(t):s(t)}function s(e){return null===e||S(e)?t(e):n(e)}}},Q={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),I(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?s(n):S(n)?e.attempt(ee,t,s)(n):(e.enter("codeFlowValue"),function n(r){return null===r||S(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function s(n){return e.exit("codeIndented"),t(n)}}},ee={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):S(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):I(e,s,"linePrefix",5)(t)}function s(e){let s=r.events[r.events.length-1];return s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(e):S(e)?i(e):n(e)}}},et={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(r=s)}else"content"===e[s][1].type&&e.splice(s,1),i||"definition"!==e[s][1].type||(i=s);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let a,l=i.events.length;for(;l--;)if("lineEnding"!==i.events[l][1].type&&"linePrefix"!==i.events[l][1].type&&"content"!==i.events[l][1].type){a="paragraph"===i.events[l][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),E(n)?I(e,s,"lineSuffix")(n):s(n))}(o)):n(t)};function s(r){return null===r||S(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},en=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],er=["pre","script","style","textarea"],ei={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(M,t,n)}}},es={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return S(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},eo={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},ea={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,s={partial:!0,tokenize:function(e,t,n){let s=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),E(t)?I(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(s++,e.consume(i),t):s>=a?(e.exit("codeFencedFenceSequence"),E(i)?I(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||S(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var s=t;let c=i.events[i.events.length-1];return o=c&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=s,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),E(i)?I(e,l,"whitespace")(i):l(i))}(s)};function l(s){return null===s||S(s)?(e.exit("codeFencedFence"),i.interrupt?t(s):e.check(eo,u,f)(s)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||S(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):E(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),I(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(s))}function c(t){return null===t||S(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||S(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function u(t){return e.attempt(s,f,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d}function d(t){return o>0&&E(t)?I(e,p,"linePrefix",o+1)(t):p(t)}function p(t){return null===t||S(t)?e.check(eo,u,f)(t):(e.enter("codeFlowValue"),function t(n){return null===n||S(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function f(n){return e.exit("codeFenced"),t(n)}}};var el=n(14);let ec={name:"characterReference",tokenize:function(e,t,n){let r,i,s=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=m,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=v,c):(e.enter("characterReferenceValue"),r=7,i=k,c(t))}function c(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return i!==m||(0,el.s)(s.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&o++<r?(e.consume(a),c):n(a)}}},eu={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return w(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},eh={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),I(e,t,"linePrefix")}}};function ed(e,t,n){let r=[],i=-1;for(;++i<e.length;){let s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}let ep={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&c(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,s,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(i=o);let l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[i-2][1].start}};return s=u(s=[["enter",l,t],["enter",h,t]],e.slice(r+1,r+a+3)),s=u(s,[["enter",d,t]]),s=u(s,ed(t.parser.constructs.insideSpan.null,e.slice(r+a+4,i-3),t)),s=u(s,[["exit",d,t],e[i-2],e[i-1],["exit",h,t]]),s=u(s,e.slice(i+1)),s=u(s,[["exit",l,t]]),c(e,r,e.length,s),e},tokenize:function(e,t,n){let r,i,s=this,o=s.events.length;for(;o--;)if(("labelImage"===s.events[o][1].type||"labelLink"===s.events[o][1].type)&&!s.events[o][1]._balanced){r=s.events[o][1];break}return function(t){return r?r._inactive?u(t):(i=s.parser.defined.includes(Z(s.sliceSerialize({start:r.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(ef,c,i?c:u)(t):91===t?e.attempt(eg,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(em,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},ef={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return x(t)?Y(e,i)(t):i(t)}function i(t){return 41===t?c(t):G(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function s(t){return x(t)?Y(e,a)(t):c(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?J(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return x(t)?Y(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},eg={tokenize:function(e,t,n){let r=this;return function(t){return V.call(r,e,i,s,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(Z(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function s(e){return n(e)}}},em={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},ey={name:"labelStartImage",resolveAll:ep.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),s):n(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};function eb(e){return null===e||x(e)||C(e)?1:A(e)?2:void 0}let ek={name:"attention",resolveAll:function(e,t){let n,r,i,s,o,a,l,h,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close){for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;let p={...e[n][1].end},f={...e[d][1].start};ev(p,-a),ev(f,a),s={type:a>1?"strongSequence":"emphasisSequence",start:p,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:f},i={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[d][1].start}},r={type:a>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[n][1].end={...s.start},e[d][1].start={...o.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=u(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=u(l,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=u(l,ed(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),l=u(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(h=2,l=u(l,[["enter",e[d][1],t],["exit",e[d][1],t]])):h=0,c(e,n-1,d-n+3,l),d=n+l.length-h-2;break}}for(d=-1;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,s=eb(i);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let l=e.exit("attentionSequence"),c=eb(a),u=!c||2===c&&s||r.includes(a),h=!s||2===s&&c||r.includes(i);return l._open=!!(42===n?u:u&&(s||!h)),l._close=!!(42===n?h:h&&(c||!u)),t(a)}(o)}}};function ev(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let ew={name:"labelStartLink",resolveAll:ep.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},eS={42:H,43:H,45:H,48:H,49:H,50:H,51:H,52:H,53:H,54:H,55:H,56:H,57:H,62:K},ex={91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,V.call(i,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function s(t){return(r=Z(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return x(t)?Y(e,a)(t):a(t)}function a(t){return G(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(X,c,c)(t)}function c(t){return E(t)?I(e,u,"whitespace")(t):u(t)}function u(s){return null===s||S(s)?(e.exit("definition"),i.parser.defined.push(r),t(s)):n(s)}}}},eE={[-2]:Q,[-1]:Q,32:Q},eA={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,s=3;return"whitespace"===e[3][1].type&&(s+=2),i-2>s&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(s===i-1||i-4>s&&"whitespace"===e[i-2][1].type)&&(i-=s+1===i?2:4),i>s&&(n={type:"atxHeadingText",start:e[s][1].start,end:e[i][1].end},r={type:"chunkText",start:e[s][1].start,end:e[i][1].end,contentType:"text"},c(e,s,i-s+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var s;return e.enter("atxHeading"),s=i,e.enter("atxHeadingSequence"),function i(s){return 35===s&&r++<6?(e.consume(s),i):null===s||x(s)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||S(r)?(e.exit("atxHeading"),t(r)):E(r)?I(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||x(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(s)):n(s)}(s)}}},42:j,45:[et,j],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,s,o,a,l=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),i=!0,p):63===o?(e.consume(o),r=3,l.interrupt?t:F):g(o)?(e.consume(o),s=String.fromCharCode(o),f):n(o)}function u(i){return 45===i?(e.consume(i),r=2,h):91===i?(e.consume(i),r=5,o=0,d):g(i)?(e.consume(i),r=4,l.interrupt?t:F):n(i)}function h(r){return 45===r?(e.consume(r),l.interrupt?t:F):n(r)}function d(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?l.interrupt?t:N:d:n(r)}function p(t){return g(t)?(e.consume(t),s=String.fromCharCode(t),f):n(t)}function f(o){if(null===o||47===o||62===o||x(o)){let a=47===o,c=s.toLowerCase();return!a&&!i&&er.includes(c)?(r=1,l.interrupt?t(o):N(o)):en.includes(s.toLowerCase())?(r=6,a)?(e.consume(o),y):l.interrupt?t(o):N(o):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(o):i?function t(n){return E(n)?(e.consume(n),t):T(n)}(o):b(o))}return 45===o||m(o)?(e.consume(o),s+=String.fromCharCode(o),f):n(o)}function y(r){return 62===r?(e.consume(r),l.interrupt?t:N):n(r)}function b(t){return 47===t?(e.consume(t),T):58===t||95===t||g(t)?(e.consume(t),k):E(t)?(e.consume(t),b):T(t)}function k(t){return 45===t||46===t||58===t||95===t||m(t)?(e.consume(t),k):v(t)}function v(t){return 61===t?(e.consume(t),w):E(t)?(e.consume(t),v):b(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):E(t)?(e.consume(t),w):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||x(n)?v(n):(e.consume(n),t)}(t)}function A(t){return t===a?(e.consume(t),a=null,C):null===t||S(t)?n(t):(e.consume(t),A)}function C(e){return 47===e||62===e||E(e)?b(e):n(e)}function T(t){return 62===t?(e.consume(t),I):n(t)}function I(t){return null===t||S(t)?N(t):E(t)?(e.consume(t),I):n(t)}function N(t){return 45===t&&2===r?(e.consume(t),L):60===t&&1===r?(e.consume(t),D):62===t&&4===r?(e.consume(t),B):63===t&&3===r?(e.consume(t),F):93===t&&5===r?(e.consume(t),_):S(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(ei,z,O)(t)):null===t||S(t)?(e.exit("htmlFlowData"),O(t)):(e.consume(t),N)}function O(t){return e.check(es,R,z)(t)}function R(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return null===t||S(t)?O(t):(e.enter("htmlFlowData"),N(t))}function L(t){return 45===t?(e.consume(t),F):N(t)}function D(t){return 47===t?(e.consume(t),s="",P):N(t)}function P(t){if(62===t){let n=s.toLowerCase();return er.includes(n)?(e.consume(t),B):N(t)}return g(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),P):N(t)}function _(t){return 93===t?(e.consume(t),F):N(t)}function F(t){return 62===t?(e.consume(t),B):45===t&&2===r?(e.consume(t),F):N(t)}function B(t){return null===t||S(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),B)}function z(n){return e.exit("htmlFlow"),t(n)}}},61:et,95:j,96:ea,126:ea},eC={38:ec,92:eu},eT={[-5]:eh,[-4]:eh,[-3]:eh,33:ey,38:ec,42:ek,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return g(t)?(e.consume(t),s):64===t?n(t):a(t)}function s(t){return 43===t||45===t||46===t||m(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||m(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||b(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),l):y(t)?(e.consume(t),a):n(t)}function l(i){return m(i)?function i(s){return 46===s?(e.consume(s),r=0,l):62===s?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(s),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(s){if((45===s||m(s))&&r++<63){let n=45===s?t:i;return e.consume(s),n}return n(s)}(s)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,s,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),A):63===t?(e.consume(t),v):g(t)?(e.consume(t),T):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):g(t)?(e.consume(t),k):n(t)}function c(t){return 45===t?(e.consume(t),d):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),h):S(t)?(s=u,_(t)):(e.consume(t),u)}function h(t){return 45===t?(e.consume(t),d):u(t)}function d(e){return 62===e?P(e):45===e?h(e):u(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),y):S(t)?(s=f,_(t)):(e.consume(t),f)}function y(t){return 93===t?(e.consume(t),b):f(t)}function b(t){return 62===t?P(t):93===t?(e.consume(t),b):f(t)}function k(t){return null===t||62===t?P(t):S(t)?(s=k,_(t)):(e.consume(t),k)}function v(t){return null===t?n(t):63===t?(e.consume(t),w):S(t)?(s=v,_(t)):(e.consume(t),v)}function w(e){return 62===e?P(e):v(e)}function A(t){return g(t)?(e.consume(t),C):n(t)}function C(t){return 45===t||m(t)?(e.consume(t),C):function t(n){return S(n)?(s=t,_(n)):E(n)?(e.consume(n),t):P(n)}(t)}function T(t){return 45===t||m(t)?(e.consume(t),T):47===t||62===t||x(t)?N(t):n(t)}function N(t){return 47===t?(e.consume(t),P):58===t||95===t||g(t)?(e.consume(t),O):S(t)?(s=N,_(t)):E(t)?(e.consume(t),N):P(t)}function O(t){return 45===t||46===t||58===t||95===t||m(t)?(e.consume(t),O):function t(n){return 61===n?(e.consume(n),R):S(n)?(s=t,_(n)):E(n)?(e.consume(n),t):N(n)}(t)}function R(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,M):S(t)?(s=R,_(t)):E(t)?(e.consume(t),R):(e.consume(t),L)}function M(t){return t===r?(e.consume(t),r=void 0,D):null===t?n(t):S(t)?(s=M,_(t)):(e.consume(t),M)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||x(t)?N(t):(e.consume(t),L)}function D(e){return 47===e||62===e||x(e)?N(e):n(e)}function P(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),F}function F(t){return E(t)?I(e,B,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):B(t)}function B(t){return e.enter("htmlTextData"),s(t)}}}],91:ew,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return S(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},eu],93:ep,95:ek,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,s=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),s++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),o):96===l?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",a(o))}(l)):S(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(l))}function a(t){return null===t||32===t||96===t||S(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}},eI={null:[ek,_]},eN={null:[42,95]},eO={null:[]},eR=/[\0\t\n\r]/g;function eM(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let eL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function eD(e){return e.replace(eL,eP)}function eP(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return eM(n.slice(t?2:1),t?16:10)}return(0,el.s)(n)||e}function e_(e){return e&&"object"==typeof e?"position"in e||"type"in e?eB(e.position):"start"in e||"end"in e?eB(e):"line"in e||"column"in e?eF(e):"":""}function eF(e){return ez(e&&e.line)+":"+ez(e&&e.column)}function eB(e){return eF(e&&e.start)+"-"+eF(e&&e.end)}function ez(e){return e&&"number"==typeof e?e:1}let eU={}.hasOwnProperty;function e$(e){return{line:e.line,column:e.column,offset:e.offset}}function ej(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+e_({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+e_({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+e_({start:t.start,end:t.end})+") is still open")}function eH(e){let t=this;t.parser=function(n){var i,s;let a,l,h,d;return"object"==typeof(i={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(s=i,i=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(b),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(g),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(f),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(f,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(y,i),htmlFlowData:u,htmlText:r(y,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(b),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(k,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(k),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(g),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:a(),autolinkEmail:function(e){h.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){h.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:h,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=eM(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=(0,el.s)(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=e$(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:h,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:h,data:h,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Z(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(d),hardBreakTrailing:a(d),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:h,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:h,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=eD(t),n.identifier=Z(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=e$(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(u.call(this,e),h.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Z(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(eU.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:i,resume:c,data:n},a=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?a.push(u):u=function(e,t,n){let r,i,s,o,a=t-1,l=-1,c=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||s||(s=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}s&&(!i||s<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,s=void 0,o=!0}}}return e[t][1]._spread=c,n}(e,a.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];eU.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||ej).call(o,void 0,e[0])}for(r.position={start:e$(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:e$(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:e$(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ej).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+e_({start:e.start,end:e.end})+"): it’s not open");n.position.end=e$(e.end)}function c(){return o(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:e$(e.start),end:void 0},t.push(n)),this.stack.push(n)}function h(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=e$(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function g(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function y(){return{type:"html",value:""}}function b(){return{type:"link",title:null,url:"",children:[]}}function k(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(s)(function(e){for(;!p(e););return e}((function(e){let t={constructs:function(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(f.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];if(s)for(r in s){f.call(i,r)||(i[r]=[]);let e=s[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);c(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}([r,...(e||{}).extensions||[]]),content:n(N),defined:[],document:n(O),flow:n(P),lazy:{},string:n(F),text:n(B)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},s=[],o=[],a=[],l={attempt:m(function(e,t){y(e,t.from)}),check:m(g),consume:function(e){S(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),h.events.push(["enter",n,h]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=f(),h.events.push(["exit",t,h]),t},interrupt:m(g,{interrupt:!0})},h={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let s,o=e[r];if("string"==typeof o)s=o;else switch(o){case -5:s="\r";break;case -4:s="\n";break;case -3:s="\r\n";break;case -2:s=t?" ":" ";break;case -1:if(!t&&n)continue;s=" ";break;default:s=String.fromCharCode(o)}n=-2===o,i.push(s)}return i.join("")}(p(e),t)},sliceStream:p,write:function(e){return(o=u(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),d=d(t)}else d=d(n)}}(),null!==o[o.length-1])?[]:(y(t,0),h.events=ed(s,h.events,h),h.events)}},d=t.tokenize.call(h,l);return t.resolveAll&&s.push(t),h;function p(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;if(r===s)n=[e[r].slice(i,o)];else{if(n=e.slice(r,s),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[s].slice(0,o))}return n}(o,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:s}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:s}}function g(e,t){t.restore()}function m(e,t){return function(n,i,s){var o;let c,u,d,p;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return g([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function g(e){return(c=e,u=0,0===e.length)?s:m(e[u])}function m(e){return function(n){return(p=function(){let e=f(),t=h.previous,n=h.currentConstruct,i=h.events.length,s=Array.from(a);return{from:i,restore:function(){r=e,h.previous=t,h.currentConstruct=n,h.events.length=i,a=s,b()}}}(),d=e,e.partial||(h.currentConstruct=e),e.name&&h.parser.constructs.disable.null.includes(e.name))?k(n):e.tokenize.call(t?Object.assign(Object.create(h),t):h,l,y,k)(n)}}function y(t){return e(d,p),i}function k(e){return(p.restore(),++u<c.length)?m(c[u]):s}}}function y(e,t){e.resolveAll&&!s.includes(e)&&s.push(e),e.resolve&&c(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(s).document().write((l=1,h="",d=!0,function(e,t,n){let r,i,s,o,c,u=[];for(e=h+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),s=0,h="",d&&(65279===e.charCodeAt(0)&&s++,d=void 0);s<e.length;){if(eR.lastIndex=s,o=(r=eR.exec(e))&&void 0!==r.index?r.index:e.length,c=e.charCodeAt(o),!r){h=e.slice(s);break}if(10===c&&s===o&&a)u.push(-3),a=void 0;else switch(a&&(u.push(-5),a=void 0),s<o&&(u.push(e.slice(s,o)),l+=o-s),c){case 0:u.push(65533),l++;break;case 9:for(i=4*Math.ceil(l/4),u.push(-2);l++<i;)u.push(-1);break;case 10:u.push(-4),l=1;break;default:a=!0,l=1}s=o+1}return n&&(a&&u.push(-5),h&&u.push(h),u.push(null)),u})(n,i,!0))))}}let eW={}.hasOwnProperty,eq={}.hasOwnProperty;function eK(e,t,n){return">"+(n?"":" ")+e}function eG(e,t){return eV(e,t.inConstruct,!0)&&!eV(e,t.notInConstruct,!1)}function eV(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function eJ(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&eG(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function eY(e,t){return!!(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function eZ(e,t,n){return(n?"":" ")+e}function eX(e){let t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function eQ(e){return"&#x"+e.toString(16).toUpperCase()+";"}function e0(e,t,n){let r=eb(e),i=eb(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function e1(e,t,n,r){let i=function(e){let t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i),l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()})),c=l.charCodeAt(0),u=e0(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=eQ(c)+l.slice(1));let h=l.charCodeAt(l.length-1),d=e0(r.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+eQ(h));let p=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+p}e1.peek=function(e,t,n){return n.options.emphasis||"*"};var e2=n(4930),e3=n(6716);function e4(e,t){let n=!1;return(0,e2.YR)(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,e3.dc}),!!((!e.depth||e.depth<3)&&o(e)&&(t.options.setext||n))}function e6(e){return e.value||""}function e5(e,t,n,r){let i=eX(n),s='"'===i?"Quote":"Apostrophe",o=n.enter("image"),a=n.enter("label"),l=n.createTracker(r),c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function e8(e,t,n,r){let i=e.referenceType,s=n.enter("imageReference"),o=n.enter("label"),a=n.createTracker(r),l=a.move("!["),c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();let u=n.stack;n.stack=[],o=n.enter("reference");let h=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(h+"]"),l}function e9(e,t,n){let r=e.value||"",i="`",s=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){let e,t=n.unsafe[s],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}function e7(e,t){let n=o(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function te(e,t,n,r){let i,s,o=eX(n),a='"'===o?"Quote":"Apostrophe",l=n.createTracker(r);if(e7(e,n)){let t=n.stack;n.stack=[],i=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),i(),n.stack=t,r}i=n.enter("link"),s=n.enter("label");let c=l.move("[");return c+=l.move(n.containerPhrasing(e,{before:c,after:"](",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),i(),c}function tt(e,t,n,r){let i=e.referenceType,s=n.enter("linkReference"),o=n.enter("label"),a=n.createTracker(r),l=a.move("["),c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();let u=n.stack;n.stack=[],o=n.enter("reference");let h=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=a.move("]"):l+=a.move(h+"]"),l}function tn(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function tr(e){let t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}e6.peek=function(){return"<"},e5.peek=function(){return"!"},e8.peek=function(){return"!"},e9.peek=function(){return"`"},te.peek=function(e,t,n){return e7(e,n)?"<":"["},tt.peek=function(){return"["};let ti=(0,n(4543).C)(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ts(e,t,n,r){let i=function(e){let t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i),l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()})),c=l.charCodeAt(0),u=e0(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=eQ(c)+l.slice(1));let h=l.charCodeAt(l.length-1),d=e0(r.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+eQ(h));let p=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+p}ts.peek=function(e,t,n){return n.options.strong||"*"};let to={blockquote:function(e,t,n,r){let i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);let o=n.indentLines(n.containerFlow(e,s.current()),eK);return i(),o},break:eJ,code:function(e,t,n,r){let i=function(e){let t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),s=e.value||"",o="`"===i?"GraveAccent":"Tilde";if(eY(e,n)){let e=n.enter("codeIndented"),t=n.indentLines(s,eZ);return e(),t}let a=n.createTracker(r),l=i.repeat(Math.max(function(e,t){let n=String(e),r=n.indexOf(t),i=r,s=0,o=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}(s,i)+1,3)),c=n.enter("codeFenced"),u=a.move(l);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),s&&(u+=a.move(s+"\n")),u+=a.move(l),c(),u},definition:function(e,t,n,r){let i=eX(n),s='"'===i?"Quote":"Apostrophe",o=n.enter("definition"),a=n.enter("label"),l=n.createTracker(r),c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c},emphasis:e1,hardBreak:eJ,heading:function(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(e4(e,n)){let t=n.enter("headingSetext"),r=n.enter("phrasing"),o=n.containerPhrasing(e,{...s.current(),before:"\n",after:"\n"});return r(),t(),o+"\n"+(1===i?"=":"-").repeat(o.length-(Math.max(o.lastIndexOf("\r"),o.lastIndexOf("\n"))+1))}let o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...s.current()});return/^[\t ]/.test(c)&&(c=eQ(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c},html:e6,image:e5,imageReference:e8,inlineCode:e9,link:te,linkReference:tt,list:function(e,t,n,r){let i=n.enter("list"),s=n.bulletCurrent,o=e.ordered?function(e){let t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):tn(n),a=e.ordered?"."===o?")":".":function(e){let t=tn(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n),l=!!t&&!!n.bulletLastUsed&&o===n.bulletLastUsed;if(!e.ordered){let t=e.children?e.children[0]:void 0;if("*"!==o&&"-"!==o||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),tr(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;let c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c},listItem:function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),s=n.bulletCurrent||tn(n);t&&"list"===t.type&&t.ordered&&(s=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+s);let o=s.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);let l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?s:s+" ".repeat(o-s.length))+e});return l(),c},paragraph:function(e,t,n,r){let i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o},root:function(e,t,n,r){return(e.children.some(function(e){return ti(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:ts,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){let r=(tr(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}},ta=[function(e,t,n,r){if("code"===t.type&&eY(t,r)&&("list"===e.type||e.type===t.type&&eY(e,r)))return!1;if("spread"in n&&"boolean"==typeof n.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&e4(t,r)))return;return+!!n.spread}}],tl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],tc=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:tl},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:tl},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:tl},{atBreak:!0,character:"+",after:"(?:[ \r\n])"},{atBreak:!0,character:"-",after:"(?:[ \r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:tl},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:tl},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:tl},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:tl},{atBreak:!0,character:"~"}];function tu(e){return e.label||!e.identifier?e.label||"":eD(e.identifier)}function th(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}let td=/\r?\n|\r/g;function tp(e,t){let n,r=[],i=0,s=0;for(;n=td.exec(e);)o(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,s++;return o(e.slice(i)),r.join("");function o(e){r.push(t(e,s,!e))}}function tf(e,t){return e-t}function tg(e,t){let n,r=/\\(?=[!-/:-@[-`{-~])/g,i=[],s=[],o=e+t,a=-1,l=0;for(;n=r.exec(o);)i.push(n.index);for(;++a<i.length;)l!==i[a]&&s.push(e.slice(l,i[a])),s.push("\\"),l=i[a];return s.push(e.slice(l)),s.join("")}function tm(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,s=n.column||1;return{move:function(e){let t=e||"",n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,s=1===n.length?s+o.length:1+o.length+r,t},current:function(){return{now:{line:i,column:s},lineShift:r}},shift:function(e){r+=e}}}function ty(e){throw Error("Cannot handle value `"+e+"`, expected node")}function tb(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function tk(e,t){if("definition"===e.type&&e.type===t.type)return 0}function tv(e,t){return function(e,t,n){let r,i=t.indexStack,s=e.children||[],o=[],a=-1,l=n.before;i.push(-1);let c=t.createTracker(n);for(;++a<s.length;){let u,h=s[a];if(i[i.length-1]=a,a+1<s.length){let n=t.handle.handlers[s[a+1].type];n&&n.peek&&(n=n.peek),u=n?n(s[a+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else u=n.after;o.length>0&&("\r"===l||"\n"===l)&&"html"===h.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",(c=t.createTracker(n)).move(o.join("")));let d=t.handle(h,e,t,{...c.current(),after:u,before:l});r&&r===d.slice(0,1)&&(d=eQ(r.charCodeAt(0))+d.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,r=void 0,p&&(o.length>0&&p.before&&l===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+eQ(l.charCodeAt(0))),p.after&&(r=u)),c.move(d),o.push(d),l=d.slice(-1)}return i.pop(),o.join("")}(e,this,t)}function tw(e,t){return function(e,t,n){let r=t.indexStack,i=e.children||[],s=t.createTracker(n),o=[],a=-1;for(r.push(-1);++a<i.length;){let n=i[a];r[r.length-1]=a,o.push(s.move(t.handle(n,e,t,{before:"\n",after:"\n",...s.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),a<i.length-1&&o.push(s.move(function(e,t,n,r){let i=r.join.length;for(;i--;){let s=r.join[i](e,t,n,r);if(!0===s||1===s)break;if("number"==typeof s)return"\n".repeat(1+s);if(!1===s)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}(n,i[a+1],e,t)))}return r.pop(),o.join("")}(e,this,t)}function tS(e,t){return function(e,t,n){let r=(n.before||"")+(t||"")+(n.after||""),i=[],s=[],o={},a=-1;for(;++a<e.unsafe.length;){let t,n=e.unsafe[a];if(!eG(e.stack,n))continue;let s=e.compilePattern(n);for(;t=s.exec(r);){let e="before"in n||!!n.atBreak,r="after"in n,s=t.index+(e?t[1].length:0);i.includes(s)?(o[s].before&&!e&&(o[s].before=!1),o[s].after&&!r&&(o[s].after=!1)):(i.push(s),o[s]={before:e,after:r})}}i.sort(tf);let l=n.before?n.before.length:0,c=r.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){let e=i[a];!(e<l)&&!(e>=c)&&(!(e+1<c)||i[a+1]!==e+1||!o[e].after||o[e+1].before||o[e+1].after)&&(i[a-1]!==e-1||!o[e].before||o[e-1].before||o[e-1].after)&&(l!==e&&s.push(tg(r.slice(l,e),"\\")),l=e,!/[!-/:-@[-`{-~]/.test(r.charAt(e))||n.encode&&n.encode.includes(r.charAt(e))?(s.push(eQ(r.charCodeAt(e))),l++):s.push("\\"))}return s.push(tg(r.slice(l,c),n.after)),s.join("")}(this,e,t)}function tx(e){let t=this;t.compiler=function(n){var r={...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]};let i={associationId:tu,containerPhrasing:tv,containerFlow:tw,createTracker:tm,compilePattern:th,enter:function(e){return i.stack.push(e),function(){i.stack.pop()}},handlers:{...to},handle:void 0,indentLines:tp,indexStack:[],join:[...ta],options:{},safe:tS,stack:[],unsafe:[...tc]};!function e(t,n){var r,i,s,o;let a,l=-1;if(n.extensions)for(;++l<n.extensions.length;)e(t,n.extensions[l]);for(a in n)if(eq.call(n,a))switch(a){case"extensions":break;case"unsafe":case"join":r=t[a],(i=n[a])&&r.push(...i);break;case"handlers":s=t[a],(o=n[a])&&Object.assign(s,o);break;default:t.options[a]=n[a]}return t}(i,r||{}),i.options.tightDefinitions&&i.join.push(tk),i.handle=function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,s=r.handlers;if(t&&eW.call(t,e)){let n=String(t[e]);i=eW.call(s,n)?s[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:ty,unknown:tb,handlers:i.handlers});let s=i.handle(n,void 0,i,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return s&&10!==s.charCodeAt(s.length-1)&&13!==s.charCodeAt(s.length-1)&&(s+="\n"),s}}function tE(e){if(e)throw e}var tA=n(4539);function tC(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}class tT extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},s=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(s=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=e_(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tT.prototype.file="",tT.prototype.name="",tT.prototype.reason="",tT.prototype.message="",tT.prototype.stack="",tT.prototype.column=void 0,tT.prototype.line=void 0,tT.prototype.ancestors=void 0,tT.prototype.cause=void 0,tT.prototype.fatal=void 0,tT.prototype.place=void 0,tT.prototype.ruleId=void 0,tT.prototype.source=void 0;let tI={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');tN(e);let r=0,i=-1,s=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;s--;)if(47===e.codePointAt(s)){if(n){r=s+1;break}}else i<0&&(n=!0,i=s+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,a=t.length-1;for(;s--;)if(47===e.codePointAt(s)){if(n){r=s+1;break}}else o<0&&(n=!0,o=s+1),a>-1&&(e.codePointAt(s)===t.codePointAt(a--)?a<0&&(i=s):(a=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},dirname:function(e){let t;if(tN(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){let t;tN(e);let n=e.length,r=-1,i=0,s=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?s<0?s=n:1!==o&&(o=1):s>-1&&(o=-1)}return s<0||r<0||0===o||1===o&&s===r-1&&s===i+1?"":e.slice(s,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)tN(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){tN(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,i="",s=0,o=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(o===l-1||1===a);else if(o!==l-1&&2===a){if(i.length<2||2!==s||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",s=0):s=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=l,a=0;continue}}else if(i.length>0){i="",s=0,o=l,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",s=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),s=l-o-1;o=l,a=0}else 46===n&&a>-1?a++:a=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function tN(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let tO={cwd:function(){return"/"}};function tR(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let tM=["history","path","basename","stem","extname","dirname"];class tL{constructor(e){let t,n;t=e?tR(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":tO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tM.length;){let e=tM[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)tM.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?tI.basename(this.path):void 0}set basename(e){tP(e,"basename"),tD(e,"basename"),this.path=tI.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?tI.dirname(this.path):void 0}set dirname(e){t_(this.basename,"dirname"),this.path=tI.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?tI.extname(this.path):void 0}set extname(e){if(tD(e,"extname"),t_(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=tI.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){tR(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!tR(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),tP(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?tI.basename(this.path,this.extname):void 0}set stem(e){tP(e,"stem"),tD(e,"stem"),this.path=tI.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new tT(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function tD(e,t){if(e&&e.includes(tI.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+tI.sep+"`")}function tP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function t_(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let tF=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},tB={}.hasOwnProperty;class tz extends tF{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(s,...o){let a=e[++n],l=-1;if(s)return void r(s);for(;++l<t.length;)(null===o[l]||void 0===o[l])&&(o[l]=t[l]);t=o,a?(function(e,t){let n;return function(...t){let s,o=e.length>t.length;o&&t.push(r);try{s=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new tz,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(tA(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(tH("data",this.frozen),this.namespace[e]=t,this):tB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(tH("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tK(e),n=this.parser||this.Parser;return t$("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),t$("process",this.parser||this.Parser),tj("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let s=tK(e),o=n.parse(s);function a(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,s,function(e,t,r){var i,s;if(e||!t||!r)return a(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(s=i)&&"object"==typeof s&&"byteLength"in s&&"byteOffset"in s?r.value=o:r.result=o,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),t$("processSync",this.parser||this.Parser),tj("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tE(e),t=r}),tq("processSync","process",n),t}run(e,t,n){tW(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,s){let o=tK(t);r.run(e,o,function(t,r,o){let a=r||e;t?s(t):i?i(a):n(void 0,a,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tE(e),n=t,r=!0}),tq("runSync","run",r),n}stringify(e,t){this.freeze();let n=tK(t),r=this.compiler||this.Compiler;return tj("stringify",r),tW(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(tH("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?s(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(e.plugins),e.settings&&(r.settings=tA(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;){var n=e[t];if("function"==typeof n)o(n,[]);else if("object"==typeof n)if(Array.isArray(n)){let[e,...t]=n;o(e,t)}else i(n);else throw TypeError("Expected usable value, not `"+n+"`")}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...s]=t,o=n[i][1];tC(o)&&tC(r)&&(r=tA(!0,o,r)),n[i]=[e,r,...s]}}}}let tU=new tz().freeze();function t$(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function tj(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function tH(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tW(e){if(!tC(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function tq(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tK(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new tL(e)}for(var tG=n(8704),tV=n(1365),tJ=n(3813),tY=n(7036),tZ={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},tX={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tQ="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),t0="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),t1=0;t1<10;t1++)tZ[48+t1]=tZ[96+t1]=String(t1);for(var t1=1;t1<=24;t1++)tZ[t1+111]="F"+t1;for(var t1=65;t1<=90;t1++)tZ[t1]=String.fromCharCode(t1+32),tX[t1]=String.fromCharCode(t1);for(var t2 in tZ)tX.hasOwnProperty(t2)||(tX[t2]=tZ[t2]);var t3=n(9418);let t4="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),t6="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function t5(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}var t8=n(3792),t9=class{},t7=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{this.top()?.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{let e=this.elements.pop();if(!e)throw(0,tG.TR)();return e}}},ne=class e extends t9{constructor(e,t,n){super(),this.type=e,this.content=t,this.attrs=n}push(e,...t){this.content.push(e,...t)}pop(){return this.content.pop()}static create(t,n,r){return new e(t,n,r)}},nt=class extends t7{#e;static{this.create=(e,t)=>{let n=new this(e);return e=>(n.run(t,e),n.toDoc())}}constructor(e){super(),this.#e=tJ.CU.none,this.#t=e=>e.isText,this.#n=(e,t)=>{if(this.#t(e)&&this.#t(t)&&tJ.CU.sameSet(e.marks,t.marks))return this.schema.text(e.text+t.text,e.marks)},this.#r=e=>{let t=Object.values({...this.schema.nodes,...this.schema.marks}).find(t=>t.spec.parseMarkdown.match(e));if(!t)throw(0,tG.Xm)(e);return t},this.#i=e=>{let t=this.#r(e);t.spec.parseMarkdown.runner(this,e,t)},this.injectRoot=(e,t,n)=>(this.openNode(t,n),this.next(e.children),this),this.openNode=(e,t)=>(this.open(ne.create(e,[],t)),this),this.#s=()=>{this.#e=tJ.CU.none;let e=this.close();return this.#o(e.type,e.attrs,e.content)},this.closeNode=()=>{try{this.#s()}catch(e){console.error(e)}return this},this.#o=(e,t,n)=>{let r=e.createAndFill(t,n,this.#e);if(!r)throw(0,tG.$D)(e,t,n);return this.push(r),r},this.addNode=(e,t,n)=>{try{this.#o(e,t,n)}catch(e){console.error(e)}return this},this.openMark=(e,t)=>{let n=e.create(t);return this.#e=n.addToSet(this.#e),this},this.closeMark=e=>(this.#e=e.removeFromSet(this.#e),this),this.addText=e=>{try{let t=this.top();if(!t)throw(0,tG.TR)();let n=t.pop(),r=this.schema.text(e,this.#e);if(!n)return t.push(r),this;let i=this.#n(n,r);if(i)return t.push(i),this;return t.push(n,r),this}catch(e){return console.error(e),this}},this.build=()=>{let e;do e=this.#s();while(this.size());return e},this.next=(e=[])=>([e].flat().forEach(e=>this.#i(e)),this),this.toDoc=()=>this.build(),this.run=(e,t)=>{let n=e.runSync(e.parse(t),t);return this.next(n),this},this.schema=e}#t;#n;#r;#i;#s;#o},nn=class e extends t9{constructor(e,t,n,r={}){super(),this.type=e,this.children=t,this.value=n,this.props=r,this.push=(e,...t)=>{this.children||(this.children=[]),this.children.push(e,...t)},this.pop=()=>this.children?.pop()}static{this.create=(t,n,r,i={})=>new e(t,n,r,i)}},nr=class extends t7{#a;static{this.create=(e,t)=>{let n=new this(e);return e=>(n.run(e),n.toString(t))}}constructor(e){super(),this.#a=[],this.#r=e=>{let t=Object.values({...this.schema.nodes,...this.schema.marks}).find(t=>t.spec.toMarkdown.match(e));if(!t)throw(0,tG._K)(e.type);return t},this.#l=e=>this.#r(e).spec.toMarkdown.runner(this,e),this.#c=(e,t)=>this.#r(e).spec.toMarkdown.runner(this,e,t),this.#u=e=>{let t=e=>e.type.spec.priority??50,n=[...e].sort((e,n)=>t(e)-t(n)),r=[];return this.#a.forEach(({mark:e})=>{let t=n.findIndex(t=>t.eq(e));t>=0&&r.push(...n.splice(t,1))}),r.concat(n)},this.#h=e=>{let t=e?.marks,n=0;for(;n<this.#a.length;){let{mark:e,spanning:r}=this.#a[n];if(r&&t?.some(t=>t.eq(e)))n++;else break}for(let e=this.#a.length-1;e>=n;e--)this.#d(this.#a[e].mark)},this.#i=(e,t)=>{this.#u(e.marks).every(t=>!this.#c(t,e))&&this.#l(e),this.#h(t)},this.#p=e=>{let{children:t}=e;return t&&(e.children=t.reduce((e,t,n)=>{if(0===n)return[t];let r=e.at(-1);if(r&&r.isMark&&t.isMark){let{children:n,...i}=t,{children:s,...o}=r;if(t.type===r.type&&n&&s&&JSON.stringify(i)===JSON.stringify(o)){let t={...o,children:[...s,...n]};return e.slice(0,-1).concat(this.#p(t))}}return e.concat(t)},[])),e},this.#f=e=>{let t={...e.props,type:e.type};return e.children&&(t.children=e.children),e.value&&(t.value=e.value),t},this.openNode=(e,t,n)=>(this.open(nn.create(e,void 0,t,n)),this),this.#g=(e,t)=>{let n="",r="",i=e.children;if(i){let e=i[0],t=i.at(-1);if(t&&"text"===t.type&&t.value.endsWith(" ")){let e=t.value,n=e.trimEnd();r=e.slice(n.length),t.value=n}if(e&&"text"===e.type&&e.value.startsWith(" ")){let t=e.value,r=t.trimStart();n=t.slice(0,t.length-r.length),e.value=r}}n.length&&this.#o("text",void 0,n);let s=t();return r.length&&this.#o("text",void 0,r),s},this.#s=(e=!1)=>{let t=this.close(),n=()=>this.#o(t.type,t.children,t.value,t.props);return e?this.#g(t,n):n()},this.closeNode=()=>(this.#s(),this),this.#o=(e,t,n,r)=>{let i=nn.create(e,t,n,r),s=this.#p(this.#f(i));return this.push(s),s},this.addNode=(e,t,n,r)=>(this.#o(e,t,n,r),this),this.#m=(e,t,n,r)=>this.#a.some(t=>t.mark.eq(e))?this:(this.#a.push({mark:e,spanning:null==n}),this.openNode(t,n,{...r,isMark:!0})),this.#d=e=>{let t=-1;for(let n=this.#a.length-1;n>=0;n--)if(this.#a[n].mark.eq(e)){t=n;break}t<0||(this.#a.splice(t,1),this.#s(!0))},this.withMark=(e,t,n,r)=>(this.#m(e,t,n,r),this),this.closeMark=e=>(this.#d(e),this),this.build=()=>{let e=null;do e=this.#s();while(this.size());return e},this.next=e=>(Object.prototype.hasOwnProperty.call(e,"size")?e.forEach((t,n,r)=>{this.#i(t,e.maybeChild(r+1)??void 0)}):this.#i(e),this),this.toString=e=>e.stringify(this.build()),this.run=e=>(this.#a=[],this.next(e),this),this.schema=e}#r;#l;#c;#u;#h;#i;#p;#f;#g;#s;#o;#m;#d},ni=n(1209);function ns(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}var no={text:(e,t,n,r)=>{let i=e.value;return/^[^*_\\]*\s+$/.test(i)?i:n.safe(i,{...r,encode:[]})},strong:(e,t,n,r)=>{let i=e.marker||n.options.strong||"*",s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);return a+=o.move(n.containerPhrasing(e,{before:a,after:i,...o.current()})),a+=o.move(i+i),s(),a},emphasis:(e,t,n,r)=>{let i=e.marker||n.options.emphasis||"*",s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);return a+=o.move(n.containerPhrasing(e,{before:a,after:i,...o.current()})),a+=o.move(i),s(),a}},na=(0,i.Z0)({},"editorView"),nl=(0,i.Z0)({},"editorState"),nc=(0,i.Z0)([],"initTimer"),nu=(0,i.Z0)({},"editor"),nh=(0,i.Z0)([],"inputRules"),nd=(0,i.Z0)([],"prosePlugins"),np=(0,i.Z0)([],"remarkPlugins"),nf=(0,i.Z0)([],"nodeView"),ng=(0,i.Z0)([],"markView"),nm=(0,i.Z0)(tU().use(eH).use(tx),"remark"),ny=(0,i.Z0)({handlers:no,encode:[]},"remarkStringifyOptions"),nb=(0,i.CR)("ConfigReady"),nk=(0,i.CR)("InitReady"),nv=(0,i.CR)("SchemaReady"),nw=(0,i.Z0)([],"schemaTimer"),nS=(0,i.Z0)({},"schema"),nx=(0,i.Z0)([],"nodes"),nE=(0,i.Z0)([],"marks");function nA(e){return{...e,parseDOM:e.parseDOM?.map(t=>({priority:e.priority,...t}))}}var nC=e=>(e.inject(nS,{}).inject(nx,[]).inject(nE,[]).inject(nw,[nk]).record(nv),async()=>{await e.waitTimers(nw);let t=e.get(nm),n=e.get(np).reduce((e,t)=>e.use(t.plugin,t.options),t);e.set(nm,n);let r=Object.fromEntries(e.get(nx).map(([e,t])=>[e,nA(t)])),i=Object.fromEntries(e.get(nE).map(([e,t])=>[e,nA(t)])),s=new tJ.Sj({nodes:r,marks:i});return e.set(nS,s),e.done(nv),()=>{e.remove(nS).remove(nx).remove(nE).remove(nw).clearTimer(nv)}});ns(nC,{displayName:"Schema"});var nT=class{constructor(){this.#y=new i.mc,this.#b=null,this.setCtx=e=>{this.#b=e},this.chain=()=>{if(null==this.#b)throw(0,tG.zD)();let e=this.#b,t=[],n=this.get.bind(this),r={run:()=>{let n=(0,tV.st)(...t),r=e.get(na);return n(r.state,r.dispatch,r)},inline:e=>(t.push(e),r),pipe:(function(e,i){let s=n(e);return t.push(s(i)),r}).bind(this)};return r}}#y;#b;get ctx(){return this.#b}create(e,t){let n=e.create(this.#y.sliceMap);return n.set(t),n}get(e){return this.#y.get(e).get()}remove(e){return this.#y.remove(e)}call(e,t){if(null==this.#b)throw(0,tG.zD)();let n=this.get(e)(t),r=this.#b.get(na);return n(r.state,r.dispatch,r)}inline(e){if(null==this.#b)throw(0,tG.zD)();let t=this.#b.get(na);return e(t.state,t.dispatch,t)}};function nI(e="cmdKey"){return(0,i.Z0)(()=>()=>!1,e)}var nN=(0,i.Z0)(new nT,"commands"),nO=(0,i.Z0)([nv],"commandsTimer"),nR=(0,i.CR)("CommandsReady"),nM=e=>{let t=new nT;return t.setCtx(e),e.inject(nN,t).inject(nO,[nv]).record(nR),async()=>(await e.waitTimers(nO),e.done(nR),()=>{e.remove(nN).remove(nO).clearTimer(nR)})};ns(nM,{displayName:"Commands"});var nL=class{constructor(){this.#b=null,this.#k=[],this.setCtx=e=>{this.#b=e},this.add=e=>(this.#k.push(e),()=>{this.#k=this.#k.filter(t=>t!==e)}),this.addObjectKeymap=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{if("function"==typeof n){let r={key:e,onRun:()=>n};this.#k.push(r),t.push(()=>{this.#k=this.#k.filter(e=>e!==r)})}else this.#k.push(n),t.push(()=>{this.#k=this.#k.filter(e=>e!==n)})}),()=>{t.forEach(e=>e())}},this.addBaseKeymap=()=>{let e=function(e){return e.Backspace=(0,tV.st)(t8.dv,tV.ic,tV.eB,tV._e),e}(tV.RV);return this.addObjectKeymap(e)},this.build=()=>{let e={};return this.#k.forEach(t=>{e[t.key]=[...e[t.key]||[],t]}),Object.fromEntries(Object.entries(e).map(([e,t])=>{let n=t.sort((e,t)=>(t.priority??50)-(e.priority??50));return[e,(e,t,r)=>{let i=this.#b;if(null==i)throw(0,tG.dI)();let s=n.map(e=>e.onRun(i));return(0,tV.st)(...s)(e,t,r)}]}))}}#b;#k;get ctx(){return this.#b}},nD=(0,i.Z0)(new nL,"keymap"),nP=(0,i.Z0)([nv],"keymapTimer"),n_=(0,i.CR)("KeymapReady"),nF=e=>{let t=new nL;return t.setCtx(e),e.inject(nD,t).inject(nP,[nv]).record(n_),async()=>(await e.waitTimers(nP),e.done(n_),()=>{e.remove(nD).remove(nP).clearTimer(n_)})},nB=(0,i.CR)("ParserReady"),nz=()=>{throw(0,tG.dI)()},nU=(0,i.Z0)(nz,"parser"),n$=(0,i.Z0)([],"parserTimer"),nj=e=>(e.inject(nU,nz).inject(n$,[nv]).record(nB),async()=>{await e.waitTimers(n$);let t=e.get(nm),n=e.get(nS);return e.set(nU,nt.create(n,t)),e.done(nB),()=>{e.remove(nU).remove(n$).clearTimer(nB)}});ns(nj,{displayName:"Parser"});var nH=(0,i.CR)("SerializerReady"),nW=(0,i.Z0)([],"serializerTimer"),nq=()=>{throw(0,tG.dI)()},nK=(0,i.Z0)(nq,"serializer"),nG=e=>(e.inject(nK,nq).inject(nW,[nv]).record(nH),async()=>{await e.waitTimers(nW);let t=e.get(nm),n=e.get(nS);return e.set(nK,nr.create(n,t)),e.done(nH),()=>{e.remove(nK).remove(nW).clearTimer(nH)}});ns(nG,{displayName:"Serializer"});var nV=(0,i.Z0)("","defaultValue"),nJ=(0,i.Z0)(e=>e,"stateOptions"),nY=(0,i.Z0)([],"editorStateTimer"),nZ=(0,i.CR)("EditorStateReady"),nX=new t3.hs("MILKDOWN_STATE_TRACKER"),nQ=e=>(e.inject(nV,"").inject(nl,{}).inject(nJ,e=>e).inject(nY,[nB,nH,nR,n_]).record(nZ),async()=>{var t;await e.waitTimers(nY);let n=e.get(nS),r=e.get(nU),i=e.get(nh),s=e.get(nJ),o=e.get(nd),a=function(e,t,n){if("string"==typeof e)return t(e);if("html"===e.type)return tJ.S4.fromSchema(n).parse(e.dom);if("json"===e.type)return tJ.bP.fromJSON(n,e.value);throw(0,tG.j7)(e)}(e.get(nV),r,n),l=e.get(nD),c=l.addBaseKeymap(),u=[...o,new t3.k_({key:nX,state:{init:()=>{},apply:(t,n,r,i)=>{e.set(nl,i)}}}),(0,tY.Z6)({rules:i}),(t=l.build(),new t3.k_({props:{handleKeyDown:function(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))t4?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=e[n];return t}(e);return function(e,n){var r;let i=("Esc"==(r=!(tQ&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||t0&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?tX:tZ)[n.keyCode]||n.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),s,o=t[t5(i,n)];if(o&&o(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){let r=t[t5(i,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(t6&&n.ctrlKey&&n.altKey)&&(s=tZ[n.keyCode])&&s!=i){let r=t[t5(s,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}(t)}}))];e.set(nd,u);let h=s({schema:n,doc:a,plugins:u}),d=t3.$t.create(h);return e.set(nl,d),e.done(nZ),()=>{c(),e.remove(nV).remove(nl).remove(nJ).remove(nY).clearTimer(nZ)}});ns(nQ,{displayName:"EditorState"});var n0=(0,i.Z0)([],"pasteRule"),n1=(0,i.Z0)([nv],"pasteRuleTimer"),n2=(0,i.CR)("PasteRuleReady"),n3=e=>(e.inject(n0,[]).inject(n1,[nv]).record(n2),async()=>(await e.waitTimers(n1),e.done(n2),()=>{e.remove(n0).remove(n1).clearTimer(n2)}));ns(n3,{displayName:"PasteRule"});var n4=(0,i.CR)("EditorViewReady"),n6=(0,i.Z0)([],"editorViewTimer"),n5=(0,i.Z0)({},"editorViewOptions"),n8=(0,i.Z0)(null,"root"),n9=(0,i.Z0)(null,"rootDOM"),n7=(0,i.Z0)({},"rootAttrs"),re=new t3.hs("MILKDOWN_VIEW_CLEAR"),rt=e=>(e.inject(n8,document.body).inject(na,{}).inject(n5,{}).inject(n9,null).inject(n7,{}).inject(n6,[nZ,n2]).record(n4),async()=>{await e.wait(nk);let t=e.get(n8)||document.body,n="string"==typeof t?document.querySelector(t):t;e.update(nd,t=>[new t3.k_({key:re,view:t=>{let r=n?function(e,t){let n=document.createElement("div");return n.className="milkdown",e.appendChild(n),t.set(n9,n),Object.entries(t.get(n7)).forEach(([e,t])=>n.setAttribute(e,t)),n}(n,e):void 0;return(()=>{if(r&&n){let e=t.dom;n.replaceChild(r,e),r.appendChild(e)}})(),{destroy:()=>{r?.parentNode&&r?.parentNode.replaceChild(t.dom,r),r?.remove()}}}}),...t]),await e.waitTimers(n6);let r=e.get(nl),i=e.get(n5),s=Object.fromEntries(e.get(nf)),o=Object.fromEntries(e.get(ng)),a=new ni.Lz(n,{state:r,nodeViews:s,markViews:o,transformPasted:(t,n,r)=>(e.get(n0).sort((e,t)=>(t.priority??50)-(e.priority??50)).map(e=>e.run).forEach(e=>{t=e(t,n,r)}),t),...i});return!function(e){e.classList.add("editor"),e.setAttribute("role","textbox")}(a.dom),e.set(na,a),e.done(n4),()=>{a?.destroy(),e.remove(n8).remove(na).remove(n5).remove(n9).remove(n7).remove(n6).clearTimer(n4)}});ns(rt,{displayName:"EditorView"});var rn=class e{constructor(){this.#v=!1,this.#w="Idle",this.#S=[],this.#x=()=>void 0,this.#y=new i.mc,this.#E=new i.zD,this.#A=new Map,this.#C=new Map,this.#b=new i.Kj(this.#y,this.#E),this.#T=()=>{let e=function(e){let t=t=>(t.record(nb),async()=>(await e(t),t.done(nb),()=>{t.clearTimer(nb)}));return ns(t,{displayName:"Config"}),t}(async e=>{await Promise.all(this.#S.map(t=>Promise.resolve(t(e))))}),t=[nC,nj,nG,nM,nF,n3,nQ,rt,function(e){let t=t=>(t.inject(nu,e).inject(nd,[]).inject(np,[]).inject(nh,[]).inject(nf,[]).inject(ng,[]).inject(ny,{handlers:no,encode:[]}).inject(nm,tU().use(eH).use(tx)).inject(nc,[nb]).record(nk),async()=>{await t.waitTimers(nc);let e=t.get(ny);return t.set(nm,tU().use(eH).use(tx,e)),t.done(nk),()=>{t.remove(nu).remove(nd).remove(np).remove(nh).remove(nf).remove(ng).remove(ny).remove(nm).remove(nc).clearTimer(nk)}});return ns(t,{displayName:"Init"}),t}(this),e];this.#I(t,this.#C)},this.#I=(e,t)=>{e.forEach(e=>{let n=this.#b.produce(this.#v?e.meta:void 0),r=e(n);t.set(e,{ctx:n,handler:r,cleanup:void 0})})},this.#N=(e,t=!1)=>Promise.all([e].flat().map(async e=>{let n=this.#A.get(e)?.cleanup;return(t?this.#A.delete(e):this.#A.set(e,{ctx:void 0,handler:void 0,cleanup:void 0}),"function"==typeof n)?n():n})),this.#O=async()=>{await Promise.all([...this.#C.entries()].map(async([e,{cleanup:t}])=>"function"==typeof t?t():t)),this.#C.clear()},this.#R=e=>{this.#w=e,this.#x(e)},this.#M=e=>[...e.entries()].map(async([t,n])=>{let{ctx:r,handler:i}=n;if(!i)return;let s=await i();e.set(t,{ctx:r,handler:i,cleanup:s})}),this.enableInspector=(e=!0)=>(this.#v=e,this),this.onStatusChange=e=>(this.#x=e,this),this.config=e=>(this.#S.push(e),this),this.removeConfig=e=>(this.#S=this.#S.filter(t=>t!==e),this),this.use=e=>{let t=[e].flat();return t.flat().forEach(e=>{this.#A.set(e,{ctx:void 0,handler:void 0,cleanup:void 0})}),"Created"===this.#w&&this.#I(t,this.#A),this},this.remove=async e=>"OnCreate"===this.#w?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(t=>{setTimeout(()=>{t(this.remove(e))},50)})):(await this.#N([e].flat(),!0),this),this.create=async()=>("OnCreate"===this.#w||("Created"===this.#w&&await this.destroy(),this.#R("OnCreate"),this.#T(),this.#I([...this.#A.keys()],this.#A),await Promise.all([this.#M(this.#C),this.#M(this.#A)].flat()),this.#R("Created")),this),this.destroy=async(e=!1)=>"Destroyed"===this.#w||"OnDestroy"===this.#w?this:"OnCreate"===this.#w?new Promise(t=>{setTimeout(()=>{t(this.destroy(e))},50)}):(e&&(this.#S=[]),this.#R("OnDestroy"),await this.#N([...this.#A.keys()],e),await this.#O(),this.#R("Destroyed"),this),this.action=e=>e(this.#b),this.inspect=()=>this.#v?[...this.#C.values(),...this.#A.values()].map(({ctx:e})=>e?.inspector?.read()).filter(e=>!!e):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new e}#v;#w;#S;#x;#y;#E;#A;#C;#b;#T;#I;#N;#O;#R;#M;get ctx(){return this.#b}get status(){return this.#w}}},436:(e,t,n)=>{"use strict";n.d(t,{CR:()=>p,Kj:()=>c,Z0:()=>a,mc:()=>i,zD:()=>u});var r=n(8704),i=class{constructor(){this.sliceMap=new Map,this.get=e=>{let t="string"==typeof e?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);if(!t){let t="string"==typeof e?e:e.name;throw(0,r.XM)(t)}return t},this.remove=e=>{let t="string"==typeof e?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>"string"==typeof e?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},s=class{#L;#D;#P;constructor(e,t,n){this.#L=[],this.#P=()=>{this.#L.forEach(e=>e(this.#D))},this.set=e=>{this.#D=e,this.#P()},this.get=()=>this.#D,this.update=e=>{this.#D=e(this.#D),this.#P()},this.type=n,this.#D=t,e.set(n.id,this)}on(e){return this.#L.push(e),()=>{this.#L=this.#L.filter(t=>t!==e)}}once(e){let t=this.on(n=>{e(n),t()});return t}off(e){this.#L=this.#L.filter(t=>t!==e)}offAll(){this.#L=[]}},o=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw(0,r.dI)()}}create(e,t=this._defaultValue){return new s(e,t,this)}},a=(e,t)=>new o(e,t),l=class{#_;#y;#E;#F;#B;#z;#U;constructor(e,t,n){this.#F=new Set,this.#B=new Set,this.#z=new Map,this.#U=new Map,this.read=()=>({metadata:this.#_,injectedSlices:[...this.#F].map(e=>({name:"string"==typeof e?e:e.name,value:this.#$(e)})),consumedSlices:[...this.#B].map(e=>({name:"string"==typeof e?e:e.name,value:this.#$(e)})),recordedTimers:[...this.#z].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#j(e)})),waitTimers:[...this.#U].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#j(e)}))}),this.onRecord=e=>{this.#z.set(e,{start:Date.now(),duration:0})},this.onClear=e=>{this.#z.delete(e)},this.onDone=e=>{let t=this.#z.get(e);t&&(t.duration=Date.now()-t.start)},this.onWait=(e,t)=>{let n=Date.now();t.finally(()=>{this.#U.set(e,{duration:Date.now()-n})}).catch(console.error)},this.onInject=e=>{this.#F.add(e)},this.onRemove=e=>{this.#F.delete(e)},this.onUse=e=>{this.#B.add(e)},this.#$=e=>this.#y.get(e).get(),this.#j=e=>this.#E.get(e).status,this.#y=e,this.#E=t,this.#_=n}#$;#j},c=class e{#y;#E;#_;#H;constructor(t,n,r){this.produce=t=>t&&Object.keys(t).length?new e(this.#y,this.#E,{...t}):this,this.inject=(e,t)=>{let n=e.create(this.#y.sliceMap);return null!=t&&n.set(t),this.#H?.onInject(e),this},this.remove=e=>(this.#y.remove(e),this.#H?.onRemove(e),this),this.record=e=>(e.create(this.#E.store),this.#H?.onRecord(e),this),this.clearTimer=e=>(this.#E.remove(e),this.#H?.onClear(e),this),this.isInjected=e=>this.#y.has(e),this.isRecorded=e=>this.#E.has(e),this.use=e=>(this.#H?.onUse(e),this.#y.get(e)),this.get=e=>this.use(e).get(),this.set=(e,t)=>this.use(e).set(t),this.update=(e,t)=>this.use(e).update(t),this.timer=e=>this.#E.get(e),this.done=e=>{this.timer(e).done(),this.#H?.onDone(e)},this.wait=e=>{let t=this.timer(e).start();return this.#H?.onWait(e,t),t},this.waitTimers=async e=>{await Promise.all(this.get(e).map(e=>this.wait(e)))},this.#y=t,this.#E=n,this.#_=r,r&&(this.#H=new l(t,n,r))}get meta(){return this.#_}get inspector(){return this.#H}},u=class{constructor(){this.store=new Map,this.get=e=>{let t=this.store.get(e.id);if(!t)throw(0,r.nr)(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},h=class{#W;#q;#K;#w;constructor(e,t){this.#W=null,this.#q=null,this.#w="pending",this.start=()=>(this.#W??=new Promise((e,t)=>{this.#q=t=>{t instanceof CustomEvent&&t.detail.id===this.#K&&(this.#w="resolved",this.#G(),t.stopImmediatePropagation(),e())},this.#V(()=>{"pending"===this.#w&&(this.#w="rejected"),this.#G(),t(Error(`Timing ${this.type.name} timeout.`))}),this.#w="pending",addEventListener(this.type.name,this.#q)}),this.#W),this.done=()=>{dispatchEvent(new CustomEvent(this.type.name,{detail:{id:this.#K}}))},this.#G=()=>{this.#q&&removeEventListener(this.type.name,this.#q)},this.#V=e=>{setTimeout(()=>{e()},this.type.timeout)},this.#K=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#w}#G;#V},d=class{constructor(e,t=3e3){this.create=e=>new h(e,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},p=(e,t=3e3)=>new d(e,t)},449:(e,t,n)=>{"use strict";var r=n(1835),i=n(7838),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e){var r=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var s=0|f(r,i),l=o(s),c=l.write(r,i);return c!==s&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e)){var u=e;if(N(u,Uint8Array)){var g=new Uint8Array(u);return d(g.buffer,g.byteOffset,g.byteLength)}return h(u)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var m=e.valueOf&&e.valueOf();if(null!=m&&m!==e)return a.from(m,t,n);var y=function(e){if(a.isBuffer(e)){var t=0|p(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(y)return y;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|p(e))}function h(e){for(var t=e.length<0?0:0|p(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),a.prototype),r}function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return C(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return T(e).length;default:if(i)return r?-1:C(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var i,s,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s<n;++s)i+=O[e[s]];return i}(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":return i=this,s=t,o=n,0===s&&o===i.length?r.fromByteArray(i):r.fromByteArray(i.slice(s,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var r=e.slice(t,n),i="",s=0;s<r.length-1;s+=2)i+=String.fromCharCode(r[s]+256*r[s+1]);return i}(this,t,n);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){var s;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>0x7fffffff?n=0x7fffffff:n<-0x80000000&&(n=-0x80000000),(s=n*=1)!=s&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length)if(i)return -1;else n=e.length-1;else if(n<0)if(!i)return -1;else n=0;if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,n);else return Uint8Array.prototype.lastIndexOf.call(e,t,n);return b(e,[t],n,r,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(s=n;s<a;s++)if(c(e,s)===c(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*o}else -1!==u&&(s-=s-u),u=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;d<l;d++)if(c(e,s+d)!==c(t,d)){h=!1;break}if(h)return s}return -1}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var s,o,a,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}var d=r,p=d.length;if(p<=4096)return String.fromCharCode.apply(String,d);for(var f="",g=0;g<p;)f+=String.fromCharCode.apply(String,d.slice(g,g+=4096));return f}function v(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function w(e,t,n,r,i,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function S(e,t,n,r,i,s){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function x(e,t,n,r,s){return t*=1,n>>>=0,s||S(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function E(e,t,n,r,s){return t*=1,n>>>=0,s||S(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}t.hp=a,t.IS=50,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return(c(e),e<=0)?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(N(s,Uint8Array))i+s.length>r.length?a.from(s).copy(r,i):Uint8Array.prototype.set.call(r,s,i);else if(a.isBuffer(s))s.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=s.length}return r},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?k(this,0,e):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var s=i-r,o=n-t,l=Math.min(s,o),c=this.slice(r,i),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){s=c[h],o=u[h];break}return s<o?-1:+(o<s)},a.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,o,a,l,c,u,h,d=this.length-t;if((void 0===n||n>d)&&(n=d),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var p=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a,l=parseInt(t.substr(2*o,2),16);if((a=l)!=a)break;e[n+o]=l}return o}(this,e,t,n);case"utf8":case"utf-8":return i=t,s=n,I(C(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return o=t,a=n,I(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(e),this,o,a);case"base64":return l=t,c=n,I(T(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,h=n,I(function(e,t){for(var n,r,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i.push(n%256),i.push(r);return i}(e,this.length-u),this,u,h);default:if(p)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=this[e],i=1,s=0;++s<t&&(i*=256);)r+=this[e+s]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||v(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?0xffff0000|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?0xffff0000|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;w(this,e,t,n,i,0)}var s=1,o=0;for(this[t]=255&e;++o<n&&(s*=256);)this[t+o]=e/s&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;w(this,e,t,n,i,0)}var s=n-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);w(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<n&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e*=1,t>>>=0,!r){var i=Math.pow(2,8*n-1);w(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e*=1,t>>>=0,n||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return E(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return E(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=a.isBuffer(e)?e:a.from(e,r),l=o.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%l]}return this};var A=/[^+/0-9A-Za-z-_]/g;function C(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return s}function T(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var O=function(){for(var e="0123456789abcdef",t=Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},519:(e,t,n)=>{"use strict";n.d(t,{om:()=>b});var r=n(7036),i=n(8078),s=n(9418),o=n(289),a=n(6857),l=n(141);let c=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return(0,l.A)(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),(0,a.A)(e,t,{leading:r,maxWait:t,trailing:i})};function u(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-block",...t}}),e}var h=(0,i.Qx)({filterNodes:e=>!(0,r.gi)(e=>"table"===e.type.name)(e)},"blockConfig");u(h,{displayName:"Ctx<blockConfig>"});var d=r.T.ie&&r.T.ie_version<15||r.T.ios&&r.T.webkit_version<604,p=class{constructor(){this.#J=()=>{if(!this.#Y)return null;let e=this.#Y,t=this.#Z;if(this.#X=null,t&&s.nh.isSelectable(e.node)){let n=s.nh.create(t.state.doc,e.$pos.pos);return t.dispatch(t.state.tr.setSelection(n)),t.focus(),this.#X=n,n}return null},this.#X=null,this.#Y=null,this.#Q=void 0,this.#ee=!1,this.#et=()=>{this.#en?.({type:"hide"}),this.#Y=null},this.#er=e=>{this.#Y=e,this.#en?.({type:"show",active:e})},this.bind=(e,t)=>{this.#b=e,this.#en=t},this.addEvent=e=>{e.addEventListener("mousedown",this.#ei),e.addEventListener("mouseup",this.#es),e.addEventListener("dragstart",this.#eo),e.addEventListener("dragend",this.#ea)},this.removeEvent=e=>{e.removeEventListener("mousedown",this.#ei),e.removeEventListener("mouseup",this.#es),e.removeEventListener("dragstart",this.#eo),e.removeEventListener("dragend",this.#ea)},this.unBind=()=>{this.#en=void 0},this.#ei=()=>{this.#Q=this.#Y?.el.getBoundingClientRect(),this.#J()},this.#es=()=>{if(!this.#ee)return void requestAnimationFrame(()=>{this.#Q&&this.#Z?.focus()});this.#ee=!1,this.#X=null},this.#eo=e=>{this.#ee=!0;let t=this.#Z;if(!t)return;t.dom.dataset.dragging="true";let n=this.#X;if(e.dataTransfer&&n){let r=n.content();e.dataTransfer.effectAllowed="copyMove";let{dom:i,text:s}=t.serializeForClipboard(r);e.dataTransfer.clearData(),e.dataTransfer.setData(d?"Text":"text/html",i.innerHTML),d||e.dataTransfer.setData("text/plain",s);let o=this.#Y?.el;o&&e.dataTransfer.setDragImage(o,0,0),t.dragging={slice:r,move:!0,node:n}}},this.#ea=()=>{let e=this.#Z;if(!e)return;this.#el(e);let t=e.dragging;window.setTimeout(()=>{e.dragging===t&&(e.dragging=null)},50)},this.keydownCallback=e=>(this.#et(),this.#ee=!1,e.dom.dataset.dragging="false",!1),this.#ec=c((e,t)=>{if(!e.editable)return;let n=e.dom.getBoundingClientRect(),r=n.left+n.width/2;if(!(e.root.elementFromPoint(r,t.clientY)instanceof Element))return void this.#et();let i=this.#eu;if(!i)return;let s=function(e,t,n){if(!e.dom.parentElement)return null;try{let r=e.posAtCoords({left:t.x,top:t.y})?.inside;if(null==r||r<0)return null;let i=e.state.doc.resolve(r),s=e.state.doc.nodeAt(r),o=e.nodeDOM(r),a=t=>{let r=i.depth>=1&&0===i.index(i.depth);if(!(t||r))return;let l=i.before(i.depth);s=e.state.doc.nodeAt(l),o=e.nodeDOM(l),i=e.state.doc.resolve(l),n(i,s)||a(!0)};if(a(!n(i,s)),!o||!s)return null;return{node:s,$pos:i,el:o}}catch{return null}}(e,{x:r,y:t.clientY},i);if(!s)return void this.#et();this.#er(s)},200),this.mousemoveCallback=(e,t)=>!e.composing&&!!e.editable&&(this.#ec(e,t),!1),this.dragoverCallback=(e,t)=>{if(this.#ee){let n=this.#Z?.dom.parentElement;if(!n)return!1;let r=n.scrollHeight>n.clientHeight,i=n.getBoundingClientRect();if(r){if(n.scrollTop>0&&20>Math.abs(t.y-i.y))return n.scrollTop=n.scrollTop>10?n.scrollTop-10:0,!1;let r=Math.round(e.dom.getBoundingClientRect().height);Math.round(n.scrollTop+i.height)<r&&20>Math.abs(t.y-(i.height+i.y))&&(n.scrollTop=n.scrollTop+10)}}return!1},this.dragenterCallback=e=>{e.dragging&&(this.#ee=!0,e.dom.dataset.dragging="true")},this.dragleaveCallback=(e,t)=>{let n=t.clientX,r=t.clientY;(n<0||r<0||n>window.innerWidth||r>window.innerHeight)&&(this.#Y=null,this.#el(e))},this.dropCallback=e=>(this.#el(e),!1),this.dragendCallback=e=>{this.#el(e)},this.#el=e=>{this.#ee=!1,e.dom.dataset.dragging="false"}}#b;#J;#X;#Y;#Q;#ee;get #eu(){try{return this.#b?.get(h.key).filterNodes}catch{return}}get #Z(){return this.#b?.get(o.kY)}#en;#et;#er;#ei;#es;#eo;#ea;#ec;#el},f=(0,i.Qx)(()=>new p,"blockService"),g=(0,i.Qx)({},"blockServiceInstance");u(f,{displayName:"Ctx<blockService>"}),u(g,{displayName:"Ctx<blockServiceInstance>"});var m=(0,i.Qx)({},"blockSpec");u(m,{displayName:"Ctx<blockSpec>"});var y=(0,i.Gf)(e=>{let t=new s.hs("MILKDOWN_BLOCK"),n=e.get(f.key)();e.set(g.key,n);let r=e.get(m.key);return new s.k_({key:t,...r,props:{...r.props,handleDOMEvents:{drop:e=>n.dropCallback(e),pointermove:(e,t)=>n.mousemoveCallback(e,t),keydown:e=>n.keydownCallback(e),dragover:(e,t)=>n.dragoverCallback(e,t),dragleave:(e,t)=>n.dragleaveCallback(e,t),dragenter:e=>n.dragenterCallback(e),dragend:e=>n.dragendCallback(e)}}})});u(y,{displayName:"Prose<block>"});var b=[m,h,f,g,y];b.key=m.key,b.pluginKey=y.key},780:(e,t,n)=>{"use strict";n.d(t,{Af:()=>c,QV:()=>i,db:()=>l,jN:()=>a,tv:()=>u,ux:()=>h});var r=n(1170);let i=String.fromCharCode;String.fromCodePoint,i(65535);let s=/^\s*/g,o=/([A-Z])/g,a=(e,t)=>e.replace(o,e=>`${t}${e.toLowerCase()}`).replace(s,""),l="undefined"!=typeof TextEncoder?new TextEncoder:null,c=l?e=>l.encode(e):e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},u="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});u&&1===u.decode(new Uint8Array).length&&(u=null);let h=(e,t)=>r.t8(t,()=>e).join("")},1069:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(5599),i=n(8353);function s(e){var t,n;e.register(r.A),e.register(i.A),t=e.util.clone(e.languages.typescript),e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],(n=e.languages.tsx.tag).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}s.displayName="tsx",s.aliases=[]},1160:(e,t,n)=>{"use strict";n.d(t,{_g:()=>r});let r=Date.now},1170:(e,t,n)=>{"use strict";n.d(t,{HT:()=>s,HV:()=>r,S2:()=>i,Si:()=>o,cy:()=>c,t8:()=>l,zN:()=>a});let r=e=>e[e.length-1],i=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},s=Array.from,o=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},a=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1},l=(e,t)=>{let n=Array(e);for(let r=0;r<e;r++)n[r]=t(r,n);return n},c=Array.isArray},1352:(e,t,n)=>{"use strict";function r(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=r.variable[1].inside,o=0;o<i.length;o++)s[i[o]]=e.languages.bash[i[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(e)}n.d(t,{A:()=>r}),r.displayName="bash",r.aliases=["sh","shell"]},1365:(e,t,n)=>{"use strict";n.d(t,{Im:()=>k,Qv:()=>l,RV:()=>T,_e:()=>h,eB:()=>c,ic:()=>o,st:()=>S,wh:()=>w,y_:()=>v});var r=n(5926),i=n(3813),s=n(9418);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let l=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=d(o);if(!l){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let c=l.nodeBefore;if(g(e,l,t,-1))return!0;if(0==o.parent.content.size&&(u(c,"end")||s.nh.isSelectable(c)))for(let n=o.depth;;n--){let a=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let n=e.tr.step(a);n.setSelection(u(c,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-c.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!c.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos-c.nodeSize,l.pos).scrollIntoView()),!0)},c=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=d(o);return!!l&&function(e,t,n){let o=t.nodeBefore,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=t.nodeAfter,c=t.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let u=(0,r.$L)(e.doc,a,c,i.Ji.empty);if(!u||u.from!=a||u instanceof r.Ln&&u.slice.size>=c-a)return!1;if(n){let t=e.tr.step(u);t.setSelection(s.U3.create(t.doc,a)),n(t.scrollIntoView())}return!0}(e,l,t)};function u(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let h=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=d(r)}let a=o&&o.nodeBefore;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function d(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function p(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function f(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function g(e,t,n,o){let a,l,c,h=t.nodeBefore,d=t.nodeAfter,p,f,g=h.type.spec.isolating||d.type.spec.isolating;if(!g&&(a=t.nodeBefore,l=t.nodeAfter,c=t.index(),a&&l&&a.type.compatibleContent(l.type)&&(!a.content.size&&t.parent.canReplace(c-1,c)?(n&&n(e.tr.delete(t.pos-a.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(c,c+1)&&!!(l.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let m=!g&&t.parent.canReplace(t.index(),t.index()+1);if(m&&(p=(f=h.contentMatchAt(h.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(n){let s=t.pos+d.nodeSize,o=i.FK.empty;for(let e=p.length-1;e>=0;e--)o=i.FK.from(p[e].create(null,o));o=i.FK.from(h.copy(o));let a=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),p.length,!0)),l=a.doc.resolve(s+2*p.length);l.nodeAfter&&l.nodeAfter.type==h.type&&(0,r.n9)(a.doc,l.pos)&&a.join(l.pos),n(a.scrollIntoView())}return!0}let y=d.type.spec.isolating||o>0&&g?null:s.LN.findFrom(t,1),b=y&&y.$from.blockRange(y.$to),k=b&&(0,r.jP)(b);if(null!=k&&k>=t.depth)return n&&n(e.tr.lift(b,k).scrollIntoView()),!0;if(m&&u(d,"start",!0)&&u(h,"end")){let s=h,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let a=d,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(s.canReplace(s.childCount,s.childCount,a.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+d.nodeSize,t.pos+l,t.pos+d.nodeSize-l,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function m(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let y=m(-1),b=m(1);function k(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,a=s.blockRange(o),l=a&&(0,r.oM)(a,e,t);return!!l&&(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0)}}function v(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function w(e,t=null,n){let r=!1!==(n&&n.removeWhenPresent),i=!1!==(n&&n.enterInlineAtoms),o=!(n&&n.includeWhitespace);return function(n,a){let{empty:l,$cursor:c,ranges:u}=n.selection;if(l&&!c||!function(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:s,$to:o}=t[i],a=0==s.depth&&e.inlineContent&&e.type.allowsMarkType(n);if(e.nodesBetween(s.pos,o.pos,(e,t)=>{if(a||!r&&e.isAtom&&e.isInline&&t>=s.pos&&t+e.nodeSize<=o.pos)return!1;a=e.inlineContent&&e.type.allowsMarkType(n)}),a)return!0}return!1}(n.doc,u,e,i))return!1;if(a)if(c)a(e.isInSet(n.storedMarks||c.marks())?n.tr.removeStoredMark(e):n.tr.addStoredMark(e.create(t)));else{let l,c=n.tr;i||(u=function(e){let t=[];for(let n=0;n<e.length;n++){let{$from:r,$to:i}=e[n];r.doc.nodesBetween(r.pos,i.pos,(e,n)=>{if(e.isAtom&&e.content.size&&e.isInline&&n>=r.pos&&n+e.nodeSize<=i.pos)return n+1>r.pos&&t.push(new s.yn(r,r.doc.resolve(n+1))),r=r.doc.resolve(n+1+e.content.size),!1}),r.pos<i.pos&&t.push(new s.yn(r,i))}return t}(u)),l=r?!u.some(t=>n.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!u.every(t=>{let n=!1;return c.doc.nodesBetween(t.$from.pos,t.$to.pos,(r,i,s)=>{if(n)return!1;n=!e.isInSet(r.marks)&&!!s&&s.type.allowsMarkType(e)&&!(r.isText&&/^\s*$/.test(r.textBetween(Math.max(0,t.$from.pos-i),Math.min(r.nodeSize,t.$to.pos-i))))}),!n});for(let n=0;n<u.length;n++){let{$from:r,$to:i}=u[n];if(l){let n=r.pos,s=i.pos,a=r.nodeAfter,l=i.nodeBefore,u=o&&a&&a.isText?/^\s*/.exec(a.text)[0].length:0,h=o&&l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+u<s&&(n+=u,s-=h),c.addMark(n,s,e.create(t))}else c.removeMark(r.pos,i.pos,e)}a(c.scrollIntoView())}return!0}}function S(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let x=S(o,l,h),E=S(o,(e,t,n)=>{let o=function(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}(e,n);if(!o)return!1;let a=p(o);if(!a)return!1;let l=a.nodeAfter;if(g(e,a,t,1))return!0;if(0==o.parent.content.size&&(u(l,"start")||s.nh.isSelectable(l))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(u(l,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):s.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=p(r)}let a=o&&o.nodeAfter;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)}),A={Enter:S((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=f(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(n,o.createAndFill());a.setSelection(s.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},(e,t)=>{if(e.selection instanceof s.nh&&e.selection.node.isBlock){let{$from:n}=e.selection;return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0)}if(!e.selection.$from.depth)return!1;let n=e.tr;!e.selection.empty&&(e.selection instanceof s.U3||e.selection instanceof s.i5)&&n.deleteSelection();let{$from:i}=n.selection,o=n.steps.length,a=[],l,c,u=!1,h=!1;for(let e=i.depth;;e--){if(i.node(e).isBlock){let t;u=i.end(e)==i.pos+(i.depth-e),h=i.start(e)==i.pos-(i.depth-e),c=f(i.node(e-1).contentMatchAt(i.indexAfter(e-1)));a.unshift(t||(u&&c?{type:c}:null)),l=e;break}if(1==e)return!1;a.unshift(null)}let d=i.pos,p=(0,r.zy)(n.doc,d,a.length,a);if(p||(a[0]=c?{type:c}:null,p=(0,r.zy)(n.doc,d,a.length,a)),!p)return!1;if(n.split(d,a.length,a),!u&&h&&i.node(l).type!=c){let e=n.mapping.slice(o),t=e.map(i.before(l)),r=n.doc.resolve(t);c&&i.node(l-1).canReplaceWith(r.index(),r.index()+1,c)&&n.setNodeMarkup(e.map(i.before(l)),c)}return t&&t(n.scrollIntoView()),!0}),"Mod-Enter":(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=f(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,a.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},Backspace:x,"Mod-Backspace":x,"Shift-Backspace":x,Delete:E,"Mod-Delete":E,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0)},C={"Ctrl-h":A.Backspace,"Alt-Backspace":A["Mod-Backspace"],"Ctrl-d":A.Delete,"Ctrl-Alt-Backspace":A["Mod-Delete"],"Alt-Delete":A["Mod-Delete"],"Alt-d":A["Mod-Delete"],"Ctrl-a":y,"Ctrl-e":b};for(let e in A)C[e]=A[e];let T=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&!!os.platform&&"darwin"==os.platform())?C:A},1373:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>s,bD:()=>i,vt:()=>r});let r=e=>Error(e),i=()=>{throw r("Method unimplemented")},s=()=>{throw r("Unexpected case")}},1835:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,s=l(e),o=s[0],a=s[1],c=new i((o+a)*3/4-a),u=0,h=a>0?o-4:o;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=0,a=r-i;o<a;o+=16383)s.push(function(e,t,r){for(var i,s=[],o=t;o<r;o+=3)i=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[i>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}(e,o,o+16383>a?a:o+16383));return 1===i?s.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&s.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r[45]=62,r[95]=63},2082:(e,t,n)=>{"use strict";n.d(t,{vt:()=>r});let r=e=>new Promise(e);Promise.all.bind(Promise)},2347:(e,t,n)=>{"use strict";n.d(t,{ww:()=>a});var r=n(1160),i=n(4299),s=n(8764),o=n(9021);class a extends s.c{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let e=r._g();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&3e4<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&l(this,t,"timeout")},i.RI(3e3)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let t=this.clientID,n=this.meta.get(t),i=void 0===n?0:n.clock+1,s=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:i,lastUpdated:r._g()});let a=[],l=[],c=[],u=[];null===e?u.push(t):null==s?null!=e&&a.push(t):(l.push(t),o.vo(s,e)||c.push(t)),(a.length>0||c.length>0||u.length>0)&&this.emit("change",[{added:a,updated:c,removed:u},"local"]),this.emit("update",[{added:a,updated:l,removed:u},"local"])}setLocalStateField(e,t){let n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}let l=(e,t,n)=>{let i=[];for(let n=0;n<t.length;n++){let s=t[n];if(e.states.has(s)){if(e.states.delete(s),s===e.clientID){let t=e.meta.get(s);e.meta.set(s,{clock:t.clock+1,lastUpdated:r._g()})}i.push(s)}}i.length>0&&(e.emit("change",[{added:[],updated:[],removed:i},n]),e.emit("update",[{added:[],updated:[],removed:i},n]))}},3220:(e,t,n)=>{"use strict";function r(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}n.d(t,{A:()=>r}),r.displayName="json",r.aliases=["webmanifest"]},3446:(e,t,n)=>{"use strict";n.d(t,{ft:()=>a,Y:()=>s,AV:()=>c,Qu:()=>l,hN:()=>d,hr:()=>h,UH:()=>u,Ny:()=>o,Tx:()=>p,ET:()=>f});let r=Symbol;var i=n(1160);let s=r(),o=r(),a=r(),l=r(),c=r(),u=r(),h=r(),d=r(),p=r(),f=e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=0;for(;r<e.length;r++){let n=e[r];if(void 0===n)break;if(n.constructor===String||n.constructor===Number)t.push(n);else if(n.constructor===Object)break}for(r>0&&n.push(t.join(""));r<e.length;r++){let t=e[r];t instanceof Symbol||n.push(t)}return n};i._g()},3509:(e,t,n)=>{"use strict";function r(e){var t,n;t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,(n=e.languages.markup)&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}n.d(t,{A:()=>r}),r.displayName="css",r.aliases=[]},3598:(e,t,n)=>{"use strict";n.d(t,{L:()=>eB});var r={};n.r(r),n.d(r,{boolean:()=>q,booleanish:()=>K,commaOrSpaceSeparated:()=>Z,commaSeparated:()=>Y,number:()=>V,overloadedBoolean:()=>G,spaceSeparated:()=>J});var i=n(6463);function s(e){e.register(i.A),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}function o(e){var t,n;e.register(s),t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source}),e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}function a(e){e.register(o),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}s.displayName="c",s.aliases=[],o.displayName="cpp",o.aliases=[],a.displayName="arduino",a.aliases=["ino"];var l=n(1352);function c(e){e.register(i.A),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",s="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(s),u=RegExp(l(i+" "+s+" "+o+" "+a)),h=l(s+" "+o+" "+a),d=l(i+" "+s+" "+a),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),f=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,m=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[h,m]),b=/\[\s*(?:,\s*)*\]/.source,k=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,b]),v=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,f,b]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),S=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,y,b]),x={keyword:u,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,C=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[C]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,S]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,m]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[k]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[S,d,g]),inside:x}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[f]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[S,y]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[S]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,m,g,S,u.source,f,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[m,f]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(S),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var T=A+"|"+E,I=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[T]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[I]),2),O=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,R=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[O,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[O]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var M=/:[^}\r\n]+/.source,L=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[I]),2),D=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,M]),P=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[T]),2),_=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,M]);function F(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,M]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[D]),lookbehind:!0,greedy:!0,inside:F(D,L)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[_]),lookbehind:!0,greedy:!0,inside:F(_,P)}],char:{pattern:RegExp(E),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(e)}c.displayName="csharp",c.aliases=["cs","dotnet"];var u=n(9482),h=n(3509);function d(e){var t;e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]},Object.keys(t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"}).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}function p(e){e.register(i.A),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}function f(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}function g(e){var t,n,r;e.register(i.A),t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}},e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}function m(e){var t,n,r,i,s;t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},i=RegExp((r="(?:[^\\\\-]|"+(n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")")+"-"+r),s={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":s}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":s}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}d.displayName="diff",d.aliases=[],p.displayName="go",p.aliases=[],f.displayName="ini",f.aliases=[],g.displayName="java",g.aliases=[],m.displayName="regex",m.aliases=[];var y=n(6665),b=n(3220);function k(e){var t;e.register(i.A),e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}},e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}function v(e){e.register(h.A),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}function w(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}function S(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}function x(e){!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),s=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){return t=(t||"").replace(/m/g,"")+"m",RegExp(/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e}),t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+s+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(s),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(e)}k.displayName="kotlin",k.aliases=["kt","kts"],v.displayName="less",v.aliases=[],w.displayName="lua",w.aliases=[],S.displayName="makefile",S.aliases=[],x.displayName="yaml",x.aliases=["yml"];var E=n(7451);function A(e){e.register(s),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}function C(e){var t;t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source,e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}function T(e){e.register(u.A);function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,s){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(i,function(e){if("function"==typeof s&&!s(e))return e;for(var i,a=o.length;-1!==n.code.indexOf(i=t(r,a));)++a;return o[a]=e,i}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,s=Object.keys(n.tokenStack);!function o(a){for(var l=0;l<a.length&&!(i>=s.length);l++){var c=a[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=s[i],h=n.tokenStack[u],d="string"==typeof c?c:c.content,p=t(r,u),f=d.indexOf(p);if(f>-1){++i;var g=d.substring(0,f),m=new e.Token(r,e.tokenize(h,n.grammar),"language-"+r,h),y=d.substring(f+p.length),b=[];g&&b.push.apply(b,o([g])),b.push(m),y&&b.push.apply(b,o([y])),"string"==typeof c?a.splice.apply(a,[l,1].concat(b)):c.content=b}}else c.content&&o(c.content)}return a}(n.tokens)}}}})}function I(e){var t,n,r,i,s,o,a;e.register(T),t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/,e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:s},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php}}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}],e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}A.displayName="objectivec",A.aliases=["objc"],C.displayName="perl",C.aliases=[],T.displayName="markup-templating",T.aliases=[],I.displayName="php",I.aliases=[];var N=n(6204);function O(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}function R(e){var t,n,r;e.register(i.A),e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}},delete e.languages.ruby.function,n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source,e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}function M(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}function L(e){var t,n;e.register(h.A),e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule,t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}function D(e){e.register(h.A),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}function P(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}function _(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*")+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}O.displayName="r",O.aliases=[],R.displayName="ruby",R.aliases=["rb"],M.displayName="rust",M.aliases=[],L.displayName="sass",L.aliases=[],D.displayName="scss",D.aliases=[],P.displayName="sql",P.aliases=[],_.displayName="swift",_.aliases=[];var F=n(8353);function B(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}function z(e){e.register(B),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}B.displayName="basic",B.aliases=[],z.displayName="vbnet",z.aliases=[];class U{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function $(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new U(n,r,t)}function j(e){return e.toLowerCase()}U.prototype.normal={},U.prototype.property={},U.prototype.space=void 0;class H{constructor(e,t){this.attribute=t,this.property=e}}H.prototype.attribute="",H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property="",H.prototype.spaceSeparated=!1,H.prototype.space=void 0;let W=0,q=X(),K=X(),G=X(),V=X(),J=X(),Y=X(),Z=X();function X(){return 2**++W}let Q=Object.keys(r);class ee extends H{constructor(e,t,n,i){let s=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",i),"number"==typeof n)for(;++s<Q.length;){let e=Q[s];!function(e,t,n){n&&(e[t]=n)}(this,Q[s],(n&r[e])===r[e])}}}function et(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let s=new ee(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[j(r)]=r,n[j(s.attribute)]=r}return new U(t,n,e.space)}ee.prototype.defined=!0;let en=et({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:K,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:J,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:V,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:J,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:K,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function er(e,t){return t in e?e[t]:t}function ei(e,t){return er(e,t.toLowerCase())}let es=et({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Y,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alpha:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:J,autoFocus:q,autoPlay:q,blocking:J,capture:null,charSet:null,checked:q,cite:null,className:J,closedBy:null,colorSpace:null,cols:V,colSpan:V,command:null,commandFor:null,content:null,contentEditable:K,controls:q,controlsList:J,coords:V|Y,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:G,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:J,height:V,hidden:G,high:V,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:J,itemRef:J,itemScope:q,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:V,pattern:null,ping:J,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:J,required:q,reversed:q,rows:V,rowSpan:V,sandbox:J,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootCustomElementRegistry:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shadowRootSerializable:q,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:K,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:q,disablePictureInPicture:q,disableRemotePlayback:q,exportParts:Y,part:J,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:ei}),eo=et({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",maskType:"mask-type",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",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Z,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:J,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:Y,g2:Y,glyphName:Y,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Z,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Z,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Z,rev:Z,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Z,requiredFeatures:Z,requiredFonts:Z,requiredFormats:Z,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Z,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Z,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Z,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:er}),ea=et({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),el=et({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ei}),ec=et({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),eu=$([en,es,ea,el,ec],"html"),eh=$([en,eo,ea,el,ec],"svg");function ed(e){let t=[],n=String(e||""),r=n.indexOf(","),i=0,s=!1;for(;!s;){-1===r&&(r=n.length,s=!0);let e=n.slice(i,r).trim();(e||!s)&&t.push(e),i=r+1,r=n.indexOf(",",i)}return t}let ep=/[#.]/g,ef=/[A-Z]/g,eg=/-[a-z]/g,em=/^data[-\w.:]+$/i;function ey(e){return"-"+e.toLowerCase()}function eb(e){return e.charAt(1).toUpperCase()}function ek(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ev(e,t,n){let r=n?function(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...s){let o;if(null==n)o={type:"root",children:[]},s.unshift(i);else{let a=(o=function(e,t){let n,r,i=e||"",s={},o=0;for(;o<i.length;){ep.lastIndex=o;let e=ep.exec(i),t=i.slice(o,e?e.index:i.length);t&&(n?"#"===n?s.id=t:Array.isArray(s.className)?s.className.push(t):s.className=[t]:r=t,o+=t.length),e&&(n=e[0],o++)}return{type:"element",tagName:r||t||"div",properties:s,children:[]}}(n,t)).tagName.toLowerCase(),l=r?r.get(a):void 0;if(o.tagName=l||a,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;for(let t of Object.keys(e)){let n=e[t];if(n&&"object"==typeof n){if(!Array.isArray(n))return!0;for(let e of n)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!!("children"in e&&Array.isArray(e.children))}(i))s.unshift(i);else for(let[t,n]of Object.entries(i))!function(e,t,n,r){let i,s=function(e,t){let n=j(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&em.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(eg,eb);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!eg.test(e)){let n=e.replace(ef,ey);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=ee}return new i(r,t)}(e,n);if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?s.spaceSeparated?ek(r):s.commaSeparated?ed(r):s.commaOrSpaceSeparated?ek(ed(r).join(" ")):ew(s,s.property,r):Array.isArray(r)?[...r]:"style"===s.property?function(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(i)){let e=[];for(let t of i)e.push(ew(s,s.property,t));i=e}"className"===s.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[s.property]=i}}(e,o.properties,t,n)}for(let e of s)!function e(t,n){if(null==n);else if("number"==typeof n||"string"==typeof n)t.push({type:"text",value:String(n)});else if(Array.isArray(n))for(let r of n)e(t,r);else if("object"==typeof n&&"type"in n)"root"===n.type?e(t,n.children):t.push(n);else throw Error("Expected node, nodes, or string, got `"+n+"`")}(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function ew(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||j(n)===j(t)))return!0}return n}let eS=ev(eu,"div");ev(eh,"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"]);let ex=["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"],eE={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function eA(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function eC(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function eT(e){return function(e){let t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||eA(e)}var eI=n(14);let eN=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];var eO=0,eR={},eM={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++eO}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},eM.util.type(t)){case"Object":if(n[i=eM.util.objId(t)])return n[i];for(var s in r={},n[i]=r,t)t.hasOwnProperty(s)&&(r[s]=e(t[s],n));return r;case"Array":if(n[i=eM.util.objId(t)])return n[i];return r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r;default:return t}}},languages:{plain:eR,plaintext:eR,text:eR,txt:eR,extend:function(e,t){var n=eM.util.clone(eM.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||eM.languages)[e],s={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var a in n)n.hasOwnProperty(a)&&(s[a]=n[a]);n.hasOwnProperty(o)||(s[o]=i[o])}var l=r[e];return r[e]=s,eM.languages.DFS(eM.languages,function(t,n){n===l&&t!=e&&(this[t]=s)}),s},DFS:function e(t,n,r,i){i=i||{};var s=eM.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var a=t[o],l=eM.util.type(a);"Object"!==l||i[s(a)]?"Array"!==l||i[s(a)]||(i[s(a)]=!0,e(a,n,o,i)):(i[s(a)]=!0,e(a,n,null,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(eM.hooks.run("before-tokenize",r),!r.grammar)throw Error('The language "'+r.language+'" has no grammar.');return r.tokens=eM.tokenize(r.code,r.grammar),eM.hooks.run("after-tokenize",r),eL.stringify(eM.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new eP;return e_(i,i.head,e),function e(t,n,r,i,s,o){for(var a in r)if(r.hasOwnProperty(a)&&r[a]){var l=r[a];l=Array.isArray(l)?l:[l];for(var c=0;c<l.length;++c){if(o&&o.cause==a+","+c)return;var u=l[c],h=u.inside,d=!!u.lookbehind,p=!!u.greedy,f=u.alias;if(p&&!u.pattern.global){var g=u.pattern.toString().match(/[imsuy]*$/)[0];u.pattern=RegExp(u.pattern.source,g+"g")}for(var m=u.pattern||u,y=i.next,b=s;y!==n.tail&&(!o||!(b>=o.reach));b+=y.value.length,y=y.next){var k,v=y.value;if(n.length>t.length)return;if(!(v instanceof eL)){var w=1;if(p){if(!(k=eD(m,b,t,d))||k.index>=t.length)break;var S=k.index,x=k.index+k[0].length,E=b;for(E+=y.value.length;S>=E;)E+=(y=y.next).value.length;if(E-=y.value.length,b=E,y.value instanceof eL)continue;for(var A=y;A!==n.tail&&(E<x||"string"==typeof A.value);A=A.next)w++,E+=A.value.length;w--,v=t.slice(b,E),k.index-=b}else if(!(k=eD(m,0,v,d)))continue;var S=k.index,C=k[0],T=v.slice(0,S),I=v.slice(S+C.length),N=b+v.length;o&&N>o.reach&&(o.reach=N);var O=y.prev;if(T&&(O=e_(n,O,T),b+=T.length),function(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}(n,O,w),y=e_(n,O,new eL(a,h?eM.tokenize(C,h):C,f,C)),I&&e_(n,y,I),w>1){var R={cause:a+","+c,reach:N};e(t,n,r,y.prev,b,R),o&&R.reach>o.reach&&(o.reach=R.reach)}}}}}}(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=eM.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=eM.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:eL};function eL(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function eD(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var s=i[1].length;i.index+=s,i[0]=i[0].slice(s)}return i}function eP(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function e_(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function eF(){}eF.prototype=eM;let eB=new eF;eB.highlight=function(e,t){let n,r;if("string"!=typeof e)throw TypeError("Expected `string` for `value`, got `"+e+"`");if(t&&"object"==typeof t)n=t;else{if("string"!=typeof(r=t))throw TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(eB.languages,r))n=eB.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:"root",children:eM.highlight.call(eB,e,n,r)}},eB.register=function(e){if("function"!=typeof e||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(eB.languages,e.displayName)||e(eB)},eB.alias=function(e,t){let n,r=eB.languages,i={};for(n in"string"==typeof e?t&&(i[e]=t):i=e,i)if(Object.hasOwn(i,n)){let e=i[n],t="string"==typeof e?[e]:e,s=-1;for(;++s<t.length;)r[t[s]]=r[n]}},eB.registered=function(e){if("string"!=typeof e)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(eB.languages,e)},eB.listLanguages=function(){let e,t=eB.languages,n=[];for(e in t)Object.hasOwn(t,e)&&"object"==typeof t[e]&&n.push(e);return n},eB.util.encode=function(e){return e},eB.Token.stringify=function e(t,n){if("string"==typeof t)return{type:"text",value:t};if(Array.isArray(t)){let r=[],i=-1;for(;++i<t.length;)null!==t[i]&&void 0!==t[i]&&""!==t[i]&&r.push(e(t[i],n));return r}let r={attributes:{},classes:["token",t.type],content:e(t.content,n),language:n,tag:"span",type:t.type};return t.alias&&r.classes.push(..."string"==typeof t.alias?[t.alias]:t.alias),eB.hooks.run("wrap",r),eS(r.tag+"."+r.classes.join("."),function(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=function(e,t){let n,r,i,s={},o="string"==typeof s.additional?s.additional.charCodeAt(0):s.additional,a=[],l=0,c=-1,u="";s.position&&("start"in s.position||"indent"in s.position?(r=s.position.indent,n=s.position.start):n=s.position);let h=(n?n.line:0)||1,d=(n?n.column:0)||1,p=m();for(l--;++l<=e.length;)if(10===i&&(d=(r?r[c]:0)||1),38===(i=e.charCodeAt(l))){let t,n=e.charCodeAt(l+1);if(9===n||10===n||12===n||32===n||38===n||60===n||Number.isNaN(n)||o&&n===o){u+=String.fromCharCode(i),d++;continue}let r=l+1,c=r,h=r;if(35===n){h=++c;let n=e.charCodeAt(h);88===n||120===n?(t="hexadecimal",h=++c):t="decimal"}else t="named";let k="",v="",w="",S="named"===t?eT:"decimal"===t?eA:eC;for(h--;++h<=e.length;){let n=e.charCodeAt(h);if(!S(n))break;w+=String.fromCharCode(n),"named"===t&&ex.includes(w)&&(k=w,v=(0,eI.s)(w))}let x=59===e.charCodeAt(h);if(x){h++;let e="named"===t&&(0,eI.s)(w);e&&(k=w,v=e)}let E=1+h-r,A="";if(x||!1!==s.nonTerminated)if(w)if("named"===t){if(x&&!v)y(5,1);else if(k!==w&&(E=1+(h=c+k.length)-c,x=!1),!x){let t=k?1:3;if(s.attribute){let n=e.charCodeAt(h);61===n?(y(t,E),v=""):eT(n)?v="":y(t,E)}else y(t,E)}A=v}else{var f,g;x||y(2,E);let e=Number.parseInt(w,"hexadecimal"===t?16:10);if((f=e)>=55296&&f<=57343||f>1114111)y(7,E),A=String.fromCharCode(65533);else if(e in eE)y(6,E),A=eE[e];else{let t="";((g=e)>=1&&g<=8||11===g||g>=13&&g<=31||g>=127&&g<=159||g>=64976&&g<=65007||(65535&g)==65535||(65535&g)==65534)&&y(6,E),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|1023&e),A=t+String.fromCharCode(e)}}else"named"!==t&&y(4,E);if(A){b(),p=m(),l=h-1,d+=h-r+1,a.push(A);let t=m();t.offset++,s.reference&&s.reference.call(s.referenceContext||void 0,A,{start:p,end:t},e.slice(r-1,h)),p=t}else w=e.slice(r-1,h),u+=w,d+=w.length,l=h-1}else 10===i&&(h++,c++,d=0),Number.isNaN(i)?b():(u+=String.fromCharCode(i),d++);return a.join("");function m(){return{line:h,column:d,offset:l+((n?n.offset:0)||0)}}function y(e,t){let n;s.warning&&(n=m(),n.column+=t,n.offset+=t,s.warning.call(s.warningContext||void 0,eN[e],n,e))}function b(){u&&(a.push(u),s.text&&s.text.call(s.textContext||void 0,u,{start:p,end:m()}),u="")}}(e[t]));return e}(r.attributes),r.content)},eB.register(i.A),eB.register(s),eB.register(o),eB.register(a),eB.register(l.A),eB.register(c),eB.register(u.A),eB.register(h.A),eB.register(d),eB.register(p),eB.register(f),eB.register(g),eB.register(m),eB.register(y.A),eB.register(b.A),eB.register(k),eB.register(v),eB.register(w),eB.register(S),eB.register(x),eB.register(E.A),eB.register(A),eB.register(C),eB.register(T),eB.register(I),eB.register(N.A),eB.register(O),eB.register(R),eB.register(M),eB.register(L),eB.register(D),eB.register(P),eB.register(_),eB.register(F.A),eB.register(B),eB.register(z)},3720:(e,t,n)=>{"use strict";n.d(t,{Fq:()=>a,Is:()=>s,YH:()=>o});var r=n(4299),i=n(84);let s=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER;i.vZ,i.CW;let a=Number.isInteger||(e=>"number"==typeof e&&isFinite(e)&&r.RI(e)===e);Number.parseInt},3792:(e,t,n)=>{"use strict";n.d(t,{JJ:()=>a,dv:()=>s,fV:()=>i,tG:()=>o});var r=n(5926);class i{constructor(e,t,n={}){var r;this.match=e,this.match=e,this.handler="string"==typeof t?(r=t,function(e,t,n,i){let s=r;if(t[1]){let e=t[0].lastIndexOf(t[1]);s+=t[0].slice(e+t[1].length);let r=(n+=e)-i;r>0&&(s=t[0].slice(e-r,e)+s,n=i)}return e.tr.insertText(s,n,i)}):t,this.undoable=!1!==n.undoable,this.inCode=n.inCode||!1,this.inCodeMark=!1!==n.inCodeMark}}let s=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],s;if(i.spec.isInputRules&&(s=i.getState(e))){if(t){let n=e.tr,r=s.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(s.text){let t=n.doc.resolve(s.from).marks();n.replaceWith(s.from,s.to,e.schema.text(s.text,t))}else n.delete(s.from,s.to);t(n)}return!0}}return!1};function o(e,t,n=null,s){return new i(e,(e,i,o,a)=>{let l=n instanceof Function?n(i):n,c=e.tr.delete(o,a),u=c.doc.resolve(o).blockRange(),h=u&&(0,r.oM)(u,t,l);if(!h)return null;c.wrap(u,h);let d=c.doc.resolve(o-1).nodeBefore;return d&&d.type==t&&(0,r.n9)(c.doc,o-1)&&(!s||s(i,d))&&c.join(o-1),c})}function a(e,t,n=null){return new i(e,(e,r,i,s)=>{let o=e.doc.resolve(i),a=n instanceof Function?n(r):n;return o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t)?e.tr.delete(i,s).setBlockType(i,i,t,a):null})}new i(/--$/,"—",{inCodeMark:!1}),new i(/\.\.\.$/,"…",{inCodeMark:!1}),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),new i(/"$/,"”",{inCodeMark:!1}),new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),new i(/'$/,"’",{inCodeMark:!1})},3813:(e,t,n)=>{"use strict";function r(e){this.content=e}function i(e){return e>=56320&&e<57344}function s(e){return e>=55296&&e<56320}n.d(t,{S4:()=>j,ZF:()=>Z,FK:()=>o,CU:()=>u,sX:()=>z,bP:()=>A,u$:()=>x,vI:()=>h,Sj:()=>U,Ji:()=>d}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return -1==s?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new r(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(-1==o?s.length:o,0,t,n),new r(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class o{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;if(l>e&&!1!==n(a,r+o,i||null,s)&&a.content.size){let i=o+1;a.nodesBetween(Math.max(0,e-i),Math.min(a.content.size,t-i),n,r+i)}o=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",s=!0;return this.nodesBetween(e,t,(o,a)=>{let l=o.isText?o.text.slice(Math.max(e,a)-a,t-a):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&l||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=l},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new o(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,s=0;s<t;i++){let o=this.content[i],a=s+o.nodeSize;a>e&&((s<e||a>t)&&(o=o.isText?o.cut(Math.max(0,e-s),Math.min(o.text.length,t-s)):o.cut(Math.max(0,e-s-1),Math.min(o.content.size,t-s-1))),n.push(o),r+=o.nodeSize),s=a}return new o(n,r)}cutByIndex(e,t){return e==t?o.empty:0==e&&t==this.content.length?this:new o(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new o(r,i)}addToStart(e){return new o([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new o(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;let a=t.child(o),l=n.child(o);if(a==l){r+=a.nodeSize;continue}if(!a.sameMarkup(l))return r;if(a.isText&&a.text!=l.text){let e=a.text,t=l.text,n=0;for(;e[n]==t[n];n++)r++;return n&&n<e.length&&n<t.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&r--,r}if(a.content.size||l.content.size){let t=e(a.content,l.content,r+1);if(null!=t)return t}r+=a.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,o){for(let a=t.childCount,l=n.childCount;;){if(0==a||0==l)return a==l?null:{a:r,b:o};let c=t.child(--a),u=n.child(--l),h=c.nodeSize;if(c==u){r-=h,o-=h;continue}if(!c.sameMarkup(u))return{a:r,b:o};if(c.isText&&c.text!=u.text){let e=c.text,t=u.text,n=e.length,a=t.length;for(;n>0&&a>0&&e[n-1]==t[a-1];)n--,a--,r--,o--;return n&&a&&n<e.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&(r++,o++),{a:r,b:o}}if(c.content.size||u.content.size){let t=e(c.content,u.content,r-1,o-1);if(t)return t}r-=h,o-=h}}(this,e,t,n)}findIndex(e){if(0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return l(t+1,r);return l(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return o.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return o.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return o.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new o(t||e,n)}static from(e){if(!e)return o.empty;if(e instanceof o)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new o([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let a={index:0,offset:0};function l(e,t){return a.index=e,a.offset=t,a}function c(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!c(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class u{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&c(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return u.none;if(e instanceof u)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}u.none=[];class h extends Error{}class d{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i,s,o){let{index:a,offset:l}=t.findIndex(n),c=t.maybeChild(a);if(l==n||c.isText)return o&&i<=0&&s<=0&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));let u=e(c.content,n-l-1,r,0==a?i-1:0,a==t.childCount-1?s-1:0,c);return u&&t.replaceChild(a,c.copy(u))}(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(function e(t,n,r){let{index:i,offset:s}=t.findIndex(n),o=t.maybeChild(i),{index:a,offset:l}=t.findIndex(r);if(s==n||o.isText){if(l!=r&&!t.child(a).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=a)throw RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(e(o.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return d.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new d(o.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new d(e,n,r)}}function p(e,t){if(!t.type.compatibleContent(e.type))throw new h("Cannot join "+t.type.name+" onto "+e.type.name)}function f(e,t,n){let r=e.node(n);return p(r,t.node(n)),r}function g(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function m(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(g(e.nodeAfter,r),s++));for(let e=s;e<o;e++)g(i.child(e),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function y(e,t){if(!e.type.validContent(t))throw new h("Invalid content for node "+e.type.name);return e.copy(t)}function b(e,t,n){let r=[];return m(null,e,n,r),e.depth>n&&g(y(f(e,t,n+1),b(e,t,n+1)),r),m(t,null,n,r),new o(r)}d.empty=new d(o.empty,0,0);class k{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new x(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(i),o=i-s;if(n.push(t,e,r+s),!o||(t=t.child(e)).isText)break;i=o-1,r+=s+1}return new k(t,n,i)}static resolveCached(e,t){let n=S.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else S.set(e,n=new v);let r=n.elts[n.i]=k.resolve(e,t);return n.i=(n.i+1)%w,r}}class v{constructor(){this.elts=[],this.i=0}}let w=12,S=new WeakMap;class x{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let E=Object.create(null);class A{constructor(e,t,n,r=u.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||o.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&c(this.attrs,t||e.defaultAttrs||E)&&u.sameSet(this.marks,n||u.none)}copy(e=null){return e==this.content?this:new A(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new A(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return d.empty;let r=this.resolve(e),i=this.resolve(t),s=n?0:r.sharedDepth(t),o=r.start(s);return new d(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(e,t,n){var r=this.resolve(e),i=this.resolve(t);if(n.openStart>r.depth)throw new h("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new h("Inconsistent open depths");return function e(t,n,r,i){let s=t.index(i),a=t.node(i);if(s==n.index(i)&&i<t.depth-r.openStart){let o=e(t,n,r,i+1);return a.copy(a.content.replaceChild(s,o))}if(!r.content.size)return y(a,b(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(o.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return y(a,function e(t,n,r,i,s){let a=t.depth>s&&f(t,n,s+1),l=i.depth>s&&f(r,i,s+1),c=[];return m(null,t,s,c),a&&l&&n.index(s)==r.index(s)?(p(a,l),g(y(a,e(t,n,r,i,s+1)),c)):(a&&g(y(a,b(t,n,s+1)),c),m(n,r,s,c),l&&g(y(l,b(r,i,s+1)),c)),m(i,null,s,c),new o(c)}(t,e,s,n,i))}{let e=t.parent,i=e.content;return y(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return k.resolveCached(this,e)}resolveNoCache(e){return k.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),T(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=o.empty,r=0,i=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,i),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=u.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!u.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=o.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}A.prototype.text=void 0;class C extends A{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new C(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new C(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function T(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class I{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new N(e,t);if(null==i.next)return I.empty;let s=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=O(e),r=n;return e.eat(",")&&(r="}"!=e.next?O(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let o=(n=function(e){let t=[[]];return i(function e(t,s){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,s)),[]);if("seq"==t.type)for(let r=0;;r++){let o=e(t.exprs[r],s);if(r==t.exprs.length-1)return o;i(o,s=n())}else if("star"==t.type){let o=n();return r(s,o),i(e(t.expr,o),o),[r(o)]}else if("plus"==t.type){let o=n();return i(e(t.expr,s),o),i(e(t.expr,o),o),[r(o)]}else if("opt"==t.type)return[r(s)].concat(e(t.expr,s));else if("range"==t.type){let o=s;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,o),r),o=r}if(-1==t.max)i(e(t.expr,o),o);else for(let s=t.min;s<t.max;s++){let s=n();r(o,s),i(e(t.expr,o),s),o=s}return[r(o)]}else if("name"==t.type)return[r(s,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(s),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);M(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let s=r[t.join(",")]=new I(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(R);s.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return s}(M(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(s,a){let l=s.matchFragment(e,n);if(l&&(!t||l.validEnd))return o.from(a.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,a.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:s,next:o}=i.next[e];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}I.empty=new I(!0);class N{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function O(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function R(e,t){return t-e}function M(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:s}=i[e];r||-1!=n.indexOf(s)||t(s)}}(t),n.sort(R)}function L(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function D(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function P(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}function _(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new B(e,r,t[r]);return n}class F{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=_(e,n.attrs),this.defaultAttrs=L(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==I.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:D(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new A(this,this.computeAttrs(e),o.from(t),u.setFrom(n))}createChecked(e=null,t,n){return t=o.from(t),this.checkContent(t),new A(this,this.computeAttrs(e),t,u.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=o.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(o.empty,!0);return i?new A(this,e,t.append(i),u.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){P(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new F(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class B{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class z{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=_(e,r.attrs),this.excluded=null;let i=L(this.attrs);this.instance=i?new u(this,i):null}create(e=null){return!e&&this.instance?this.instance:new u(this,D(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new z(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){P(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class U{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=F.compile(this.spec.nodes,this),this.marks=z.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=I.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?$(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:$(this,n.split(" "))}this.nodeFromJSON=e=>A.fromJSON(this,e),this.markFromJSON=e=>u.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof F){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new C(n,n.defaultAttrs,e,u.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function $(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class j{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new V(this,t,!1);return n.addAll(e,u.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new V(this,t,!0);return n.addAll(e,u.none,t.from,t.to),d.maxOpen(n.finish())}matchTag(e,t,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){var r,i;let n=this.tags[s];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=J(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=J(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new j(e,j.schemaRules(e)))}}let H={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},W={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},q={ol:!0,ul:!0};function K(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class G{constructor(e,t,n,r,i,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=u.none,this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(o.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=o.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(o.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!H.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class V{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,s=K(null,t.preserveWhitespace,0)|4*!!n;i=r?new G(r.type,r.attrs,u.none,!0,t.topMatch||r.type.contentMatch,s):n?new G(null,null,u.none,!0,null,s):new G(e.schema.topNodeType,null,u.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(s.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;q.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&q.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));e:if(a?a.ignore:W.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let n,r=this.needsBlock;if(H.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let o=a&&a.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,s;if(t.node)if((s=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=null==r?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,s=0;t>=0;t--){let o=this.nodes[t],a=o.findWrapping(e);if(a&&(!r||r.length>a.length+s)&&(r=a,i=o,!a.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=u.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):Y(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=K(e,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let a=u.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!Y(t.type,e))||(a=t.addToSet(a),!1)),this.nodes.push(new G(e,t,a,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,s=(e,o)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;o>=i;o--)if(s(e-1,o))return!0;return!1}{let e=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=a&&!e.isInGroup(a))return!1;o--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function J(e){let t={};for(let n in e)t[n]=e[n];return t}function Y(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class Z{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Q(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,s=0;for(;n<i.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Q(t).createTextNode(e.text);let{dom:n,contentDOM:r}=et(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&et(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return"string"==typeof t?{dom:e.createTextNode(t)}:et(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Z(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=X(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return X(e.marks)}}function X(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let ee=new WeakMap;function et(e,t,n,r){let i,s,o;if(1==t.nodeType)return{dom:t};if(t.dom&&1==t.dom.nodeType)return t;let a=t[0],l;if("string"!=typeof a)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(s=ee.get(r))&&ee.set(r,(o=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])o||(o=[]),o.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),s=o)),l=s)&&l.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=a.indexOf(" ");c>0&&(n=a.slice(0,c),a=a.slice(c+1));let u=n?e.createElementNS(n,a):e.createElement(a),h=t[1],d=1;if(h&&"object"==typeof h&&null==h.nodeType&&!Array.isArray(h)){for(let e in d=2,h)if(null!=h[e]){let t=e.indexOf(" ");t>0?u.setAttributeNS(e.slice(0,t),e.slice(t+1),h[e]):"style"==e&&u.style?u.style.cssText=h[e]:u.setAttribute(e,h[e])}}for(let s=d;s<t.length;s++){let o=t[s];if(0===o){if(s<t.length-1||s>d)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}if("string"==typeof o)u.appendChild(e.createTextNode(o));else{let{dom:t,contentDOM:s}=et(e,o,n,r);if(u.appendChild(t),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:u,contentDOM:i}}},4189:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Tj:()=>o,_4:()=>s,bz:()=>a,vt:()=>r});let r=()=>new Map,i=e=>{let t=r();return e.forEach((e,n)=>{t.set(n,e)}),t},s=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},o=(e,t)=>{let n=[];for(let[r,i]of e)n.push(t(i,r));return n},a=(e,t)=>{for(let[n,r]of e)if(t(r,n))return!0;return!1}},4294:(e,t,n)=>{"use strict";n.d(t,{PD:()=>e5});var r=n(289),i=n(7036),s=n(1365),o=n(8078),a=n(3813),l=n(8704),c=n(9418),u=n(3792),h=n(6716),d=n(5926),p=n(4930);function f(e){return String(e||"").toUpperCase()}function g(){return function(e){let t=function(e){let t=new Map;if(!e||!e.type)throw Error("mdast-util-definitions expected node");return(0,p.YR)(e,"definition",function(e){let n=f(e.identifier);n&&!t.get(n)&&t.set(n,e)}),function(e){let n=f(e);return t.get(n)}}(e);(0,p.YR)(e,function(e,n,r){if("definition"===e.type&&void 0!==r&&"number"==typeof n)return r.children.splice(n,1),[h._Z,n];if("imageReference"===e.type||"linkReference"===e.type){let i=t(e.identifier);if(i&&r&&"number"==typeof n)return r.children[n]="imageReference"===e.type?{type:"image",url:i.url,title:i.title,alt:e.alt}:{type:"link",url:i.url,title:i.title,children:e.children},[h._Z,n]}})}}var m=n(1209);function y(e,t){if(!(t.childCount>=1&&t.lastChild?.type.name==="hardbreak"))return void e.next(t.content);let n=[];t.content.forEach((e,r,i)=>{i!==t.childCount-1&&n.push(e)}),e.next(a.FK.fromArray(n))}function b(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}var k=(0,o.JY)("emphasis");b(k,{displayName:"Attr<emphasis>",group:"Emphasis"});var v=(0,o.hk)("emphasis",e=>({attrs:{marker:{default:e.get(r.P5).emphasis||"*",validate:"string"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>"italic"===e}],toDOM:t=>["em",e.get(k.key)(t)],parseMarkdown:{match:e=>"emphasis"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"emphasis"===e.type.name,runner:(e,t)=>{e.withMark(t,"emphasis",void 0,{marker:t.attrs.marker})}}}));b(v.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"}),b(v.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});var w=(0,o.yu)("ToggleEmphasis",e=>()=>(0,s.wh)(v.type(e)));b(w,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});var S=(0,o.b_)(e=>(0,i.uX)(/(?:^|[^*])\*([^*]+)\*$/,v.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}));b(S,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});var x=(0,o.b_)(e=>(0,i.uX)(/\b_(?![_\s])(.*?[^_\s])_$/,v.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}}));b(x,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});var E=(0,o.pq)("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{let t=e.get(r.MD);return()=>t.call(w.key)}}});b(E.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"}),b(E.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});var A=(0,o.JY)("strong");b(A,{displayName:"Attr<strong>",group:"Strong"});var C=(0,o.hk)("strong",e=>({attrs:{marker:{default:e.get(r.P5).strong||"*",validate:"string"}},parseDOM:[{tag:"b",getAttrs:e=>"normal"!=e.style.fontWeight&&null},{tag:"strong"},{style:"font-style",getAttrs:e=>"bold"===e},{style:"font-weight=400",clearMark:e=>"strong"==e.type.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:t=>["strong",e.get(A.key)(t)],parseMarkdown:{match:e=>"strong"===e.type,runner:(e,t,n)=>{e.openMark(n,{marker:t.marker}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"strong"===e.type.name,runner:(e,t)=>{e.withMark(t,"strong",void 0,{marker:t.attrs.marker})}}}));b(C.mark,{displayName:"MarkSchema<strong>",group:"Strong"}),b(C.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});var T=(0,o.yu)("ToggleStrong",e=>()=>(0,s.wh)(C.type(e)));b(T,{displayName:"Command<toggleStrongCommand>",group:"Strong"});var I=(0,o.b_)(e=>(0,i.uX)(/(?<![\w:/])(?:\*\*|__)([^*_]+?)(?:\*\*|__)(?![\w/])$/,C.type(e),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));b(I,{displayName:"InputRule<strong>",group:"Strong"});var N=(0,o.pq)("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{let t=e.get(r.MD);return()=>t.call(T.key)}}});b(N.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"}),b(N.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});var O=(0,o.JY)("inlineCode");b(O,{displayName:"Attr<inlineCode>",group:"InlineCode"});var R=(0,o.hk)("inlineCode",e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(O.key)(t)],parseMarkdown:{match:e=>"inlineCode"===e.type,runner:(e,t,n)=>{e.openMark(n),e.addText(t.value),e.closeMark(n)}},toMarkdown:{match:e=>"inlineCode"===e.type.name,runner:(e,t,n)=>(e.withMark(t,"inlineCode",n.text||""),!0)}}));b(R.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"}),b(R.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});var M=(0,o.yu)("ToggleInlineCode",e=>()=>(t,n)=>{let{selection:r,tr:i}=t;if(r.empty)return!1;let{from:s,to:o}=r;return t.doc.rangeHasMark(s,o,R.type(e))?n?.(i.removeMark(s,o,R.type(e))):(Object.keys(t.schema.marks).filter(e=>e!==R.type.name).map(e=>t.schema.marks[e]).forEach(e=>{i.removeMark(s,o,e)}),n?.(i.addMark(s,o,R.type(e).create()))),!0});b(M,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});var L=(0,o.b_)(e=>(0,i.uX)(/(?:`)([^`]+)(?:`)$/,R.type(e)));b(L,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});var D=(0,o.pq)("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{let t=e.get(r.MD);return()=>t.call(M.key)}}});b(D.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"}),b(D.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});var P=new Set(["http:","https:","mailto:","tel:","ftp:"]),_=(0,o.JY)("link");b(_,{displayName:"Attr<link>",group:"Link"});var F=(0,o.hk)("link",e=>({attrs:{href:{validate:"string"},title:{default:null,validate:"string|null"}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(_.key)(t),...t.attrs,href:function(e){if("string"!=typeof e)return"";let t=e.trim();if(!t)return"";let n=function(e){let t="";for(let r of e){var n;(n=r.codePointAt(0)??0)<=32||n>=127&&n<=160||n>=8203&&n<=8205||8232===n||8233===n||65279===n||(t+=r)}return t}(t),r=/^([a-z][a-z0-9+.-]*):/i.exec(n)?.[1];return!r||P.has(`${r.toLowerCase()}:`)?t:""}(t.attrs.href)}],parseMarkdown:{match:e=>"link"===e.type,runner:(e,t,n)=>{let r=t.url,i=t.title;e.openMark(n,{href:r,title:i}),e.next(t.children),e.closeMark(n)}},toMarkdown:{match:e=>"link"===e.type.name,runner:(e,t)=>{e.withMark(t,"link",void 0,{title:t.attrs.title,url:t.attrs.href})}}}));b(F.mark,{displayName:"MarkSchema<link>",group:"Link"});var B=(0,o.yu)("ToggleLink",e=>(t={})=>(0,s.wh)(F.type(e),t));b(B,{displayName:"Command<toggleLinkCommand>",group:"Link"});var z=(0,o.yu)("UpdateLink",e=>(t={})=>(n,r)=>{let i;if(!r)return!1;let s=-1,{selection:o}=n,{from:a,to:l}=o;if(n.doc.nodesBetween(a,a===l?l+1:l,(t,n)=>{if(F.type(e).isInSet(t.marks))return i=t,s=n,!1}),!i)return!1;let u=i.marks.find(({type:t})=>t===F.type(e));if(!u)return!1;let h=s,d=s+i.nodeSize,{tr:p}=n,f=F.type(e).create({...u.attrs,...t});return!!f&&(r(p.removeMark(h,d,u).addMark(h,d,f).setSelection(new c.U3(p.selection.$anchor)).scrollIntoView()),!0)});b(z,{displayName:"Command<updateLinkCommand>",group:"Link"});var U=(0,o.dz)("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>"root"===e,runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>"doc"===e.type.name,runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));function $(e){return(0,h.VG)(e,e=>"html"===e.type&&["<br />","<br>","<br >","<br/>"].includes(e.value?.trim()),(e,t)=>{if(!t.length)return;let n=t[t.length-1];if(!n)return;let r=n.children.indexOf(e);-1!==r&&n.children.splice(r,1)},!0)}b(U,{displayName:"NodeSchema<doc>",group:"Doc"});var j=(0,o.lz)("remark-preserve-empty-line",()=>()=>$);b(j.plugin,{displayName:"Remark<remarkPreserveEmptyLine>",group:"Remark"}),b(j.options,{displayName:"RemarkConfig<remarkPreserveEmptyLine>",group:"Remark"});var H=(0,o.YR)("paragraph");b(H,{displayName:"Attr<paragraph>",group:"Paragraph"});var W=(0,o.Yh)("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(H.key)(t),0],parseMarkdown:{match:e=>"paragraph"===e.type,runner:(e,t,n)=>{e.openNode(n),t.children?e.next(t.children):e.addText(t.value||""),e.closeNode()}},toMarkdown:{match:e=>"paragraph"===e.type.name,runner:(t,n)=>{let i=e.get(r.kY).state?.doc.lastChild;t.openNode("paragraph"),(!n.content||0===n.content.size)&&n!==i&&function(e){let t=!1;try{e.get(j.id),t=!0}catch{t=!1}return t}(e)?t.addNode("html",void 0,"<br />"):y(t,n),t.closeNode()}}}));b(W.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"}),b(W.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});var q=(0,o.yu)("TurnIntoText",e=>()=>(0,s.y_)(W.type(e)));b(q,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});var K=(0,o.pq)("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{let t=e.get(r.MD);return()=>t.call(q.key)}}});b(K.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"}),b(K.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});var G=Array(6).fill(0).map((e,t)=>t+1),V=(0,o.Qx)(function(e){return e.textContent.toLowerCase().trim().replace(/\s+/g,"-")},"headingIdGenerator");b(V,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});var J=(0,o.YR)("heading");b(J,{displayName:"Attr<heading>",group:"Heading"});var Y=(0,o.Yh)("heading",e=>{let t=e.get(V.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:"",validate:"string"},level:{default:1,validate:"number"}},parseDOM:G.map(e=>({tag:`h${e}`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw(0,l.Ik)(t);return{level:e,id:t.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(J.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:e})=>"heading"===e,runner:(e,t,n)=>{let r=t.depth;e.openNode(n,{level:r}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"heading"===e.type.name,runner:(e,t)=>{e.openNode("heading",void 0,{depth:t.attrs.level}),y(e,t),e.closeNode()}}}});b(Y.node,{displayName:"NodeSchema<heading>",group:"Heading"}),b(Y.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});var Z=(0,o.b_)(e=>(0,u.JJ)(/^(?<hashes>#+)\s$/,Y.type(e),t=>{let n=t.groups?.hashes?.length||0,{$from:i}=e.get(r.kY).state.selection,s=i.node();if("heading"===s.type.name){let e=Number(s.attrs.level)+Number(n);return e>6&&(e=6),{level:e}}return{level:n}}));b(Z,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});var X=(0,o.yu)("WrapInHeading",e=>t=>(t??=1)<1?(0,s.y_)(W.type(e)):(0,s.y_)(Y.type(e),{level:t}));b(X,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});var Q=(0,o.yu)("DowngradeHeading",e=>()=>(t,n,r)=>{let{$from:i}=t.selection,o=i.node();if(o.type!==Y.type(e)||!t.selection.empty||0!==i.parentOffset)return!1;let a=o.attrs.level-1;return a?(n?.(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...o.attrs,level:a})),!0):(0,s.y_)(W.type(e))(t,n,r)});b(Q,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});var ee=(0,o.pq)("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{let t=e.get(r.MD);return()=>t.call(X.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{let t=e.get(r.MD);return()=>t.call(Q.key)}}});b(ee.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"}),b(ee.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});var et=(0,o.YR)("blockquote");b(et,{displayName:"Attr<blockquote>",group:"Blockquote"});var en=(0,o.Yh)("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(et.key)(t),0],parseMarkdown:{match:({type:e})=>"blockquote"===e,runner:(e,t,n)=>{e.openNode(n).next(t.children).closeNode()}},toMarkdown:{match:e=>"blockquote"===e.type.name,runner:(e,t)=>{e.openNode("blockquote").next(t.content).closeNode()}}}));b(en.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"}),b(en.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});var er=(0,o.b_)(e=>(0,u.tG)(/^\s*>\s$/,en.type(e)));b(er,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});var ei=(0,o.yu)("WrapInBlockquote",e=>()=>(0,s.Im)(en.type(e)));b(ei,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});var es=(0,o.pq)("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{let t=e.get(r.MD);return()=>t.call(ei.key)}}});b(es.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"}),b(es.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});var eo=(0,o.YR)("codeBlock",()=>({pre:{},code:{}}));b(eo,{displayName:"Attr<codeBlock>",group:"CodeBlock"});var ea=(0,o.Yh)("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:"",validate:"string"}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{language:e.dataset.language}}}],toDOM:t=>{let n=e.get(eo.key)(t),r=t.attrs.language,i=r&&r.length>0?{"data-language":r}:void 0;return["pre",{...n.pre,...i},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>"code"===e,runner:(e,t,n)=>{let r=t.lang??"",i=t.value;e.openNode(n,{language:r}),i&&e.addText(i),e.closeNode()}},toMarkdown:{match:e=>"code_block"===e.type.name,runner:(e,t)=>{e.addNode("code",void 0,t.content.firstChild?.text||"",{lang:t.attrs.language})}}}));b(ea.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"}),b(ea.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});var el=(0,o.b_)(e=>(0,u.JJ)(/^```(?<language>[a-z]*)?[\s\n]$/,ea.type(e),e=>({language:e.groups?.language??""})));b(el,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});var ec=(0,o.yu)("CreateCodeBlock",e=>(t="")=>(0,s.y_)(ea.type(e),{language:t}));b(ec,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"}),b((0,o.yu)("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,r)=>e>=0&&(r?.(n.tr.setNodeAttribute(e,"language",t)),!0)),{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});var eu=(0,o.pq)("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{let t=e.get(r.MD);return()=>t.call(ec.key)}}});b(eu.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"}),b(eu.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});var eh=(0,o.YR)("image");b(eh,{displayName:"Attr<image>",group:"Image"});var ed=(0,o.Yh)("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:"",validate:"string"},alt:{default:"",validate:"string"},title:{default:"",validate:"string"}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(eh.key)(t),...t.attrs}],parseMarkdown:{match:({type:e})=>"image"===e,runner:(e,t,n)=>{let r=t.url,i=t.alt,s=t.title;e.addNode(n,{src:r,alt:i,title:s})}},toMarkdown:{match:e=>"image"===e.type.name,runner:(e,t)=>{e.addNode("image",void 0,void 0,{title:t.attrs.title,url:t.attrs.src,alt:t.attrs.alt})}}}));b(ed.node,{displayName:"NodeSchema<image>",group:"Image"}),b(ed.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});var ep=(0,o.yu)("InsertImage",e=>(t={})=>(n,r)=>{if(!r)return!0;let{src:i="",alt:s="",title:o=""}=t,a=ed.type(e).create({src:i,alt:s,title:o});return!a||(r(n.tr.replaceSelectionWith(a).scrollIntoView()),!0)});b(ep,{displayName:"Command<insertImageCommand>",group:"Image"});var ef=(0,o.yu)("UpdateImage",e=>(t={})=>(n,r)=>{let s=(0,i.UM)(n.selection,ed.type(e));if(!s)return!1;let{node:o,pos:a}=s,l={...o.attrs},{src:c,alt:u,title:h}=t;return void 0!==c&&(l.src=c),void 0!==u&&(l.alt=u),void 0!==h&&(l.title=h),r?.(n.tr.setNodeMarkup(a,void 0,l).scrollIntoView()),!0});b(ef,{displayName:"Command<updateImageCommand>",group:"Image"}),b((0,o.b_)(e=>new u.fV(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,r,i)=>{let[s,o,a="",l]=n;return s?t.tr.replaceWith(r,i,ed.type(e).create({src:a,alt:o,title:l})):null})),{displayName:"InputRule<insertImageInputRule>",group:"Image"});var eg=(0,o.YR)("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));b(eg,{displayName:"Attr<hardbreak>",group:"Hardbreak"});var em=(0,o.Yh)("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1,validate:"boolean"}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(eg.key)(t)," "]:["br",e.get(eg.key)(t)],parseMarkdown:{match:({type:e})=>"break"===e,runner:(e,t,n)=>{e.addNode(n,{isInline:!!t.data?.isInline})}},leafText:()=>"\n",toMarkdown:{match:e=>"hardbreak"===e.type.name,runner:(e,t)=>{t.attrs.isInline?e.addNode("text",void 0,"\n"):e.addNode("break")}}}));b(em.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"}),b(em.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});var ey=(0,o.yu)("InsertHardbreak",e=>()=>(t,n)=>{let{selection:r,tr:i}=t;if(!(r instanceof c.U3))return!1;if(r.empty){let e=r.$from.node();if(e.childCount>0&&e.lastChild?.type.name==="hardbreak")return n?.(i.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(c.LN.near(i.doc.resolve(r.to))).scrollIntoView()),!0}return n?.(i.setMeta("hardbreak",!0).replaceSelectionWith(em.type(e).create()).scrollIntoView()),!0});b(ey,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});var eb=(0,o.pq)("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{let t=e.get(r.MD);return()=>t.call(ey.key)}}});b(eb.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"}),b(eb.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});var ek=(0,o.YR)("hr");b(ek,{displayName:"Attr<hr>",group:"Hr"});var ev=(0,o.Yh)("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(ek.key)(t)],parseMarkdown:{match:({type:e})=>"thematicBreak"===e,runner:(e,t,n)=>{e.addNode(n)}},toMarkdown:{match:e=>"hr"===e.type.name,runner:e=>{e.addNode("thematicBreak")}}}));b(ev.node,{displayName:"NodeSchema<hr>",group:"Hr"}),b(ev.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});var ew=(0,o.b_)(e=>new u.fV(/^(?:---|___\s|\*\*\*\s)$/,(t,n,r,i)=>{let{tr:s}=t;return n[0]&&s.replaceWith(r-1,i,ev.type(e).create()),s}));b(ew,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});var eS=(0,o.yu)("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;let r=W.node.type(e).create(),{tr:i,selection:s}=t,{from:o}=s,a=ev.type(e).create();if(!a)return!0;let l=i.replaceSelectionWith(a).insert(o,r),u=c.LN.findFrom(l.doc.resolve(o),1,!0);return!u||(n(l.setSelection(u).scrollIntoView()),!0)});b(eS,{displayName:"Command<insertHrCommand>",group:"Hr"});var ex=(0,o.YR)("bulletList");b(ex,{displayName:"Attr<bulletList>",group:"BulletList"});var eE=(0,o.Yh)("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{spread:"true"===e.dataset.spread}}}],toDOM:t=>["ul",{...e.get(ex.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!t,runner:(e,t,n)=>{let r=t.spread??!1;e.openNode(n,{spread:r}).next(t.children).closeNode()}},toMarkdown:{match:e=>"bullet_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!1,spread:t.attrs.spread}).next(t.content).closeNode()}}}));b(eE.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"}),b(eE.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});var eA=(0,o.b_)(e=>(0,u.tG)(/^\s*([-+*])\s$/,eE.type(e)));b(eA,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});var eC=(0,o.yu)("WrapInBulletList",e=>()=>(0,s.Im)(eE.type(e)));b(eC,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});var eT=(0,o.pq)("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{let t=e.get(r.MD);return()=>t.call(eC.key)}}});b(eT.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"}),b(eT.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});var eI=(0,o.YR)("orderedList");b(eI,{displayName:"Attr<orderedList>",group:"OrderedList"});var eN=(0,o.Yh)("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1,validate:"number"},spread:{default:!1,validate:"boolean"}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{spread:"true"===e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(eI.key)(t),...1===t.attrs.order?{}:{start:t.attrs.order},"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:t})=>"list"===e&&!!t,runner:(e,t,n)=>{let r=t.spread??!0;e.openNode(n,{spread:r,order:t.start??1}).next(t.children).closeNode()}},toMarkdown:{match:e=>"ordered_list"===e.type.name,runner:(e,t)=>{e.openNode("list",void 0,{ordered:!0,start:t.attrs.order??1,spread:t.attrs.spread}),e.next(t.content),e.closeNode()}}}));b(eN.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"}),b(eN.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});var eO=(0,o.b_)(e=>(0,u.tG)(/^\s*(\d+)\.\s$/,eN.type(e),e=>({order:Number(e[1])}),(e,t)=>t.childCount+t.attrs.order===Number(e[1])));b(eO,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});var eR=(0,o.yu)("WrapInOrderedList",e=>()=>(0,s.Im)(eN.type(e)));b(eR,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});var eM=(0,o.pq)("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{let t=e.get(r.MD);return()=>t.call(eR.key)}}});b(eM.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"}),b(eM.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});var eL=(0,o.YR)("listItem");b(eL,{displayName:"Attr<listItem>",group:"ListItem"});var eD=(0,o.Yh)("list_item",e=>({group:"listItem",content:"paragraph block*",attrs:{label:{default:"•",validate:"string"},listType:{default:"bullet",validate:"string"},spread:{default:!0,validate:"boolean"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw(0,l.Ik)(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:"true"===e.dataset.spread}}}],toDOM:t=>["li",{...e.get(eL.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:e})=>"listItem"===e,runner:(e,t,n)=>{let r=null!=t.label?`${t.label}.`:"•",i=null!=t.label?"ordered":"bullet",s=t.spread??!0;e.openNode(n,{label:r,listType:i,spread:s}),e.next(t.children),e.closeNode()}},toMarkdown:{match:e=>"list_item"===e.type.name,runner:(e,t)=>{e.openNode("listItem",void 0,{spread:t.attrs.spread}),e.next(t.content),e.closeNode()}}}));b(eD.node,{displayName:"NodeSchema<listItem>",group:"ListItem"}),b(eD.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});var eP=(0,o.yu)("SinkListItem",e=>()=>(function(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(0==o)return!1;let l=s.parent,c=l.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==l.type,i=a.FK.from(r?e.create():null),o=new a.Ji(a.FK.from(e.create(null,a.FK.from(l.type.create(null,i)))),r?3:1,0),u=s.start,h=s.end;n(t.tr.step(new d.Wg(u-(r?3:1),h,u,h,o,1,!0)).scrollIntoView())}return!0}})(eD.type(e)));b(eP,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});var e_=(0,o.yu)("LiftListItem",e=>()=>(function(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return!!s&&(!n||(r.node(s.depth-1).type==e?function(e,t,n,r){let i=e.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new d.Wg(s-1,o,s,o,new a.Ji(a.FK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new a.u$(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let l=(0,d.jP)(r);if(null==l)return!1;i.lift(r,l);let c=i.doc.resolve(i.mapping.map(s,-1)-1);return(0,d.n9)(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}(t,n,e,s):function(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,s=n.startIndex;t>s;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,c=n.endIndex==i.childCount,u=s.node(-1),h=s.index(-1);if(!u.canReplace(h+ +!l,h+1,o.content.append(c?a.FK.empty:a.FK.from(i))))return!1;let p=s.pos,f=p+o.nodeSize;return r.step(new d.Wg(p-!!l,f+ +!!c,p+1,f-1,new a.Ji((l?a.FK.empty:a.FK.from(i.copy(a.FK.empty))).append(c?a.FK.empty:a.FK.from(i.copy(a.FK.empty))),+!l,+!c),+!l)),t(r.scrollIntoView()),!0}(t,n,s)))}})(eD.type(e)));b(e_,{displayName:"Command<liftListItemCommand>",group:"ListItem"});var eF=(0,o.yu)("SplitListItem",e=>()=>(function(e,t){return function(t,n){let{$from:r,$to:i,node:s}=t.selection;if(s&&s.isBlock||r.depth<2||!r.sameParent(i))return!1;let o=r.node(-1);if(o.type!=e)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=e||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let i=a.FK.empty,s=r.index(-1)?1:r.index(-2)?2:3;for(let e=r.depth-s;e>=r.depth-3;e--)i=a.FK.from(r.node(e).copy(i));let o=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;i=i.append(a.FK.from(e.createAndFill()));let l=r.before(r.depth-(s-1)),u=t.tr.replace(l,r.after(-o),new a.Ji(i,4-s,0)),h=-1;u.doc.nodesBetween(l,u.doc.content.size,(e,t)=>{if(h>-1)return!1;e.isTextblock&&0==e.content.size&&(h=t+1)}),h>-1&&u.setSelection(c.LN.near(u.doc.resolve(h))),n(u.scrollIntoView())}return!0}let l=i.pos==r.end()?o.contentMatchAt(0).defaultType:null,u=t.tr.delete(r.pos,i.pos),h=l?[null,{type:l}]:void 0;return!!(0,d.zy)(u.doc,r.pos,2,h)&&(n&&n(u.split(r.pos,2,h).scrollIntoView()),!0)}})(eD.type(e)));b(eF,{displayName:"Command<splitListItemCommand>",group:"ListItem"});var eB=(0,o.yu)("LiftFirstListItem",e=>()=>(t,n,r)=>{let{selection:i}=t;if(!(i instanceof c.U3))return!1;let{empty:o,$from:a}=i;return!!o&&0===a.parentOffset&&a.node(-1).type===eD.type(e)&&(0,s.Qv)(t,n,r)});b(eB,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});var ez=(0,o.pq)("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{let t=e.get(r.MD);return()=>t.call(eF.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{let t=e.get(r.MD);return()=>t.call(eP.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{let t=e.get(r.MD);return()=>t.call(e_.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{let t=e.get(r.MD);return()=>t.call(eB.key)}}});b(ez.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"}),b(ez.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});var eU=(0,o.dz)("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>"text"===e,runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>"text"===e.type.name,runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));b(eU,{displayName:"NodeSchema<text>",group:"Text"});var e$=(0,o.YR)("html");b(e$,{displayName:"Attr<html>",group:"Html"});var ej=(0,o.Yh)("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:"",validate:"string"}},toDOM:t=>{let n=document.createElement("span"),r={...e.get(e$.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",r,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>"html"===e,runner:(e,t,n)=>{e.addNode(n,{value:t.value})}},toMarkdown:{match:e=>"html"===e.type.name,runner:(e,t)=>{e.addNode("html",void 0,t.attrs.value)}}}));b(ej.node,{displayName:"NodeSchema<html>",group:"Html"}),b(ej.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});var eH=[U,H,W,V,J,Y,eg,em,et,en,eo,ea,ek,ev,eh,ed,ex,eE,eI,eN,eL,eD,k,v,A,C,O,R,_,F,e$,ej,eU].flat(),eW=[er,eA,eO,el,ew,Z].flat(),eq=[S,x,L,I],eK=[q,ei,X,Q,ec,ey,eS,ep,ef,eR,eC,eP,eF,e_,eB,w,M,T,B,z,(0,o.yu)("IsMarkSelected",()=>e=>t=>{if(!e)return!1;let{doc:n,selection:r}=t;return n.rangeHasMark(r.from,r.to,e)}),(0,o.yu)("IsNoteSelected",()=>e=>t=>!!e&&(0,i.RK)(t,e).hasNode),(0,o.yu)("ClearTextInCurrentBlock",()=>()=>(e,t)=>{let n=e.tr,{$from:r,$to:i}=n.selection,{pos:s}=r,{pos:o}=i,a=s-r.node().content.size;return!(a<0)&&(n=n.deleteRange(a,o),t?.(n),!0)}),(0,o.yu)("SetBlockType",()=>e=>(t,n)=>{let{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let s=t.tr,{from:o,to:a}=s.selection;try{s.setBlockType(o,a,r,i)}catch{return!1}return n?.(s),!0}),(0,o.yu)("WrapInBlockType",()=>e=>(t,n)=>{let{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let s=t.tr;try{let{$from:e,$to:t}=s.selection,n=e.blockRange(t),o=n&&(0,d.oM)(n,r,i);if(!o)return!1;s=s.wrap(n,o)}catch{return!1}return n?.(s),!0}),(0,o.yu)("AddBlockType",()=>e=>(t,n)=>{let{nodeType:r,attrs:i=null}=e??{};if(!r)return!1;let s=t.tr;try{let e=r instanceof a.bP?r:r.createAndFill(i);if(!e)return!1;s.replaceSelectionWith(e)}catch{return!1}return n?.(s),!0}),(0,o.yu)("SelectTextNearPos",()=>e=>(t,n)=>{let{pos:r}=e??{};if(null==r)return!1;let i=t.tr;try{let e,n=t.doc.resolve((e=t.doc.content.size,Math.min(Math.max(r,0),e)));i.setSelection(c.U3.near(n))}catch{return!1}return n?.(i.scrollIntoView()),!0})],eG=[es,eu,eb,ee,ez,eM,eT,K,E,D,N].flat(),eV=(0,o.lz)("remarkAddOrderInList",()=>()=>e=>{(0,p.YR)(e,"list",e=>{if(e.ordered){let t=e.start??1;e.children.forEach((e,n)=>{e.label=n+t})}})});b(eV.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"}),b(eV.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});var eJ=(0,o.lz)("remarkLineBreak",()=>()=>e=>{let t=/[\t ]*(?:\r?\n|\r)/g;(0,p.YR)(e,"text",(e,n,r)=>{if(!e.value||"string"!=typeof e.value)return;let i=[],s=0;t.lastIndex=0;let o=t.exec(e.value);for(;o;){let n=o.index;s!==n&&i.push({type:"text",value:e.value.slice(s,n)}),i.push({type:"break",data:{isInline:!0}}),s=n+o[0].length,o=t.exec(e.value)}if(i.length>0&&r&&"number"==typeof n)return s<e.value.length&&i.push({type:"text",value:e.value.slice(s)}),r.children.splice(n,1,...i),n+i.length})});b(eJ.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"}),b(eJ.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});var eY=(0,o.lz)("remarkInlineLink",()=>g);b(eY.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"}),b(eY.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});var eZ=["root","blockquote","listItem"],eX=(0,o.lz)("remarkHTMLTransformer",()=>()=>e=>{(function e(t,n,r){if(t.children){let n=[];for(let r=0,i=t.children.length;r<i;r++){let i=t.children[r];if(i){let s=e(i,r,t);if(s)for(let e=0,t=s.length;e<t;e++){let t=s[e];t&&n.push(t)}}}t.children=n}return((e,t,n)=>("html"!==e.type||n&&eZ.includes(n.type)&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]))(t,n,r)})(e,0,null)[0]});b(eX.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"}),b(eX.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});var eQ=(0,o.lz)("remarkMarker",()=>()=>(e,t)=>{(0,p.YR)(e,e=>["strong","emphasis"].includes(e.type),e=>{e.marker=t.value.charAt(e.position.start.offset)})});b(eQ.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"}),b(eQ.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});var e0=(0,o.Gf)(()=>{let e=!1,t=new c.hs("MILKDOWN_INLINE_NODES_CURSOR"),n=new c.k_({key:t,state:{init:()=>!1,apply(e){if(!e.selection.empty)return!1;let t=e.selection.$from,n=t.nodeBefore,r=t.nodeAfter;return!!n&&!!r&&!!n.isInline&&!n.isText&&!!r.isInline&&!r.isText}},props:{handleDOMEvents:{compositionend:(t,r)=>!!e&&(e=!1,requestAnimationFrame(()=>{if(n.getState(t.state)){let e=t.state.selection.from;r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e))}}),!0),compositionstart:t=>(n.getState(t.state)&&(e=!0),!1),beforeinput:(t,r)=>{if(n.getState(t.state)&&r instanceof InputEvent&&r.data&&!e){let e=t.state.selection.from;return r.preventDefault(),t.dispatch(t.state.tr.insertText(r.data||"",e)),!0}return!1}},decorations(e){if(n.getState(e)){let t=e.selection.$from.pos,n=document.createElement("span"),r=m.NZ.widget(t,n,{side:-1}),i=document.createElement("span"),s=m.NZ.widget(t,i);return setTimeout(()=>{n.contentEditable="true",i.contentEditable="true"}),m.zF.create(e.doc,[r,s])}return m.zF.empty}}});return n});b(e0,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});var e1=(0,o.Gf)(e=>new c.k_({key:new c.hs("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;let[i]=t;if(!i)return;let[s]=i.steps;if(i.getMeta("hardbreak")){if(!(s instanceof d.Ln))return;let{from:t}=s;return r.tr.setNodeMarkup(t,em.type(e),void 0,[])}if(s instanceof d.XE){let t=r.tr,{from:n,to:i}=s;return r.doc.nodesBetween(n,i,(n,r)=>{n.type===em.type(e)&&(t=t.setNodeMarkup(r,em.type(e),void 0,[]))}),t}}}));b(e1,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});var e2=(0,o.Qx)(["table","code_block"],"hardbreakFilterNodes");b(e2,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});var e3=(0,o.Gf)(e=>{let t=e.get(e2.key);return new c.k_({key:new c.hs("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(e,n)=>{let r=e.getMeta("hardbreak"),[i]=e.steps;if(r&&i){let{from:e}=i,r=n.doc.resolve(e),s=r.depth,o=!0;for(;s>0;)t.includes(r.node(s).type.name)&&(o=!1),s--;return o}return!0}})});b(e3,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});var e4=(0,o.Gf)(e=>{let t=new c.hs("MILKDOWN_HEADING_ID"),n=n=>{if(n.composing)return;let r=e.get(V.key),i=n.state.tr.setMeta("addToHistory",!1),s=!1,o={};n.state.doc.descendants((n,a)=>{if(n.type===Y.type(e)){if(0===n.textContent.trim().length)return;let e=n.attrs,l=r(n);o[l]?(o[l]+=1,l+=`-#${o[l]}`):o[l]=1,e.id!==l&&(s=!0,i.setMeta(t,!0).setNodeMarkup(a,void 0,{...e,id:l}))}}),s&&n.dispatch(i)};return new c.k_({key:t,view:e=>(n(e),{update:(e,t)=>{e.state.doc.eq(t.doc)||n(e)}})})});b(e4,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});var e6=(0,o.Gf)(e=>new c.k_({key:new c.hs("MILKDOWN_KEEP_LIST_ORDER"),appendTransaction:(t,n,r)=>{if(!r.selection||t.some(e=>!1===e.getMeta("addToHistory")||!e.isGeneric))return null;let i=eN.type(e),s=eE.type(e),o=eD.type(e),a=(e,t,n=1)=>{let r=!1,i=`${t+n}.`;return e.label!==i&&(e.label=i,r=!0),r},l=r.tr,c=!1;return r.doc.descendants((e,t,n,r)=>{if(e.type===s){let n=e.maybeChild(0);n?.type===o&&"ordered"===n.attrs.listType&&(c=!0,l.setNodeMarkup(t,i,{spread:!0}),e.descendants((e,t,n,r)=>{if(e.type===o){let n={...e.attrs};a(n,r)&&(l=l.setNodeMarkup(t,void 0,n))}return!1}))}else if(e.type===o&&n?.type===i){let i={...e.attrs},s=!1;"ordered"!==i.listType&&(i.listType="ordered",s=!0),n?.maybeChild(0)&&(s=a(i,r,n?.attrs.order??1)),s&&(l=l.setNodeMarkup(t,void 0,i),c=!0)}}),c?l.setMeta("addToHistory",!1):null}}));b(e6,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});var e5=[eH,eW,eq,eK,eG,[e1,e2,e3,e0,eV,eY,eJ,eX,eQ,j,e4,e6].flat()].flat()},4299:(e,t,n)=>{"use strict";n.d(t,{RI:()=>r,T9:()=>o,jk:()=>s,sj:()=>a,tn:()=>i});let r=Math.floor,i=Math.abs,s=(e,t)=>e<t?e:t,o=(e,t)=>e>t?e:t,a=e=>0!==e?e<0:1/e<0},4362:(e,t,n)=>{"use strict";n.d(t,{Wj:()=>d,mS:()=>u});var r=n(7036),i=n(9418),s=n(8078),o=n(3598),a=n(1209);function l(e,t,n,r=n.listLanguages()){let{highlight:i}=n,{language:s}=e.attrs;if(!s||!r.includes(s))return console.warn("Unsupported language detected, this language has not been supported by current prism config: ",s),[];let o=[],c=t+1;return(function e(t,n=[]){return t.flatMap(t=>"element"===t.type?e(t.children,[...n,...t.properties?.className||[]]):[{text:t.value,className:n}])})(i(e.textContent,s).children).forEach(e=>{let t=c+e.text.length;e.className.length&&o.push(a.NZ.inline(c,t,{class:e.className.join(" ")})),c=t}),o}function c(e,t,n){let i=n.listLanguages(),s=(0,r.xe)(e=>e.type.name===t)(e).flatMap(e=>l(e.node,e.pos,n,i));return a.zF.create(e,s)}var u=(0,s.Qx)({configureRefractor:()=>{}},"prismConfig");u.meta={package:"@milkdown/plugin-prism",displayName:"Ctx<prism>"};var h=(0,s.Gf)(e=>{let{configureRefractor:t}=e.get(u.key),n="code_block",s=t(o.L)??o.L;return new i.k_({key:new i.hs("MILKDOWN_PRISM"),state:{init:(e,{doc:t})=>c(t,n,s),apply:(e,t,i,o)=>{if(!e.docChanged)return t;let a=function(e,t){let n=e.content.findDiffStart(t.content);if(null==n)return null;let r=e.content.findDiffEnd(t.content);if(!r)return null;let i=Math.max(r.b,n),s=t.resolve(n),o=t.resolve(i);return s.sameParent(o)&&s.parent.isTextblock?{node:s.parent,pos:s.before(s.depth)}:null}(i.doc,o.doc);if(a){let r=t.map(e.mapping,e.doc);if(a.node.type.name!==n)return r;let i=a.pos,o=i+a.node.nodeSize;return r.remove(r.find(i+1,o-1)).add(e.doc,l(a.node,i,s))}let u=o.selection.$head.parent.type.name===n,h=i.selection.$head.parent.type.name===n;return u||h||(()=>{let t=(0,r.xe)(e=>e.type.name===n)(i.doc),s=(0,r.xe)(e=>e.type.name===n)(o.doc);return t.length!==s.length||t.some((e,t)=>e.node.attrs.language!==s[t]?.node.attrs.language)||e.steps.some(e=>void 0!==e.from&&void 0!==e.to&&t.some(t=>t.pos>=e.from&&t.pos+t.node.nodeSize<=e.to))})()?c(e.doc,n,s):t.map(e.mapping,e.doc)}},props:{decorations(e){return this.getState(e)}}})});h.meta={package:"@milkdown/plugin-prism",displayName:"Prose<prism>"};var d=[h,u]},4539:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!s)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;else if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,h=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<p;++d)if(t=arguments[d],null!=t)for(n in t)r=l(h,n),h!==(i=l(t,n))&&(f&&i&&(o(i)||(c=s(i)))?(c?(c=!1,u=r&&s(r)?r:[]):u=r&&o(r)?r:{},a(h,{name:n,newValue:e(f,u,i)})):void 0!==i&&a(h,{name:n,newValue:i}));return h}},4543:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});let r=function(e){var t,n;if(null==e)return s;if("function"==typeof e)return i(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=r(e[n]);return i(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,i(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,i(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function i(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function s(){return!0}},4793:(e,t,n)=>{"use strict";let r;n.d(t,{m:()=>e0});let i=Math.floor,s=Number.MAX_SAFE_INTEGER,o="undefined"!=typeof TextEncoder?new TextEncoder:null,a=o?e=>o.encode(e):e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},l="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});l&&1===l.decode(new Uint8Array).length&&(l=null);let c=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},u=(e,t)=>{for(;t>127;)c(e,128|127&t),t=i(t/128);c(e,127&t)},h=new Uint8Array(3e4),d=h.length/3,p=o&&o.encodeInto?(e,t)=>{if(t.length<d){let n=o.encodeInto(t,h).written||0;u(e,n);for(let t=0;t<n;t++)c(e,h[t])}else f(e,a(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;u(e,r);for(let t=0;t<r;t++)c(e,n.codePointAt(t))},f=(e,t)=>{u(e,t.byteLength),((e,t)=>{let n=e.cbuf.length,r=e.cpos,i=((e,t)=>e<t?e:t)(n-r,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(((e,t)=>e>t?e:t)(2*n,s)),e.cbuf.set(t.subarray(i)),e.cpos=s)})(e,t)},g=e=>Error(e),m=g("Unexpected end of array"),y=g("Integer out of Range"),b=e=>e.arr[e.pos++],k=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(127&r)*n,n*=128,r<128)return t;if(t>s)throw y}throw m},v=l?e=>l.decode((e=>((e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n})(e,k(e)))(e)):e=>{let t=k(e);if(0===t)return"";{let n=String.fromCodePoint(b(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(b(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}};!function(e){e[e.Token=0]="Token",e[e.PermissionDenied=1]="PermissionDenied",e[e.Authenticated=2]="Authenticated"}(A||(A={}));let w={code:1009},S={code:4401,reason:"Unauthorized"},x={code:4403},E=e=>Array.from(e.entries()).map(([e,t])=>({clientId:e,...t}));!function(e){e[e.Connecting=0]="Connecting",e[e.Open=1]="Open",e[e.Closing=2]="Closing",e[e.Closed=3]="Closed"}(C||(C={}));var A,C,T,I,N=n(2767);async function O(e){return new Promise(t=>setTimeout(t,e))}function R(e,t){let n=t.delay;if(0===n)return 0;if(t.factor&&(n*=Math.pow(t.factor,e.attemptNum-1),0!==t.maxDelay&&(n=Math.min(n,t.maxDelay))),t.jitter){let e=Math.ceil(t.minDelay);n=Math.floor(Math.random()*(Math.floor(n)-e+1))+e}return Math.round(n)}async function M(e,t){var n;let r=((n=t)||(n={}),{delay:void 0===n.delay?200:n.delay,initialDelay:void 0===n.initialDelay?0:n.initialDelay,minDelay:void 0===n.minDelay?0:n.minDelay,maxDelay:void 0===n.maxDelay?0:n.maxDelay,factor:void 0===n.factor?0:n.factor,maxAttempts:void 0===n.maxAttempts?3:n.maxAttempts,timeout:void 0===n.timeout?0:n.timeout,jitter:!0===n.jitter,initialJitter:!0===n.initialJitter,handleError:void 0===n.handleError?null:n.handleError,handleTimeout:void 0===n.handleTimeout?null:n.handleTimeout,beforeAttempt:void 0===n.beforeAttempt?null:n.beforeAttempt,calculateDelay:void 0===n.calculateDelay?null:n.calculateDelay});for(let e of["delay","initialDelay","minDelay","maxDelay","maxAttempts","timeout"]){let t=r[e];if(!Number.isInteger(t)||t<0)throw Error(`Value for ${e} must be an integer greater than or equal to 0`)}if(r.factor.constructor!==Number||r.factor<0)throw Error("Value for factor must be a number greater than or equal to 0");if(r.delay<r.minDelay)throw Error(`delay cannot be less than minDelay (delay: ${r.delay}, minDelay: ${r.minDelay}`);let i={attemptNum:0,attemptsRemaining:r.maxAttempts?r.maxAttempts:-1,aborted:!1,abort(){i.aborted=!0}},s=r.calculateDelay||R;async function o(){if(r.beforeAttempt&&r.beforeAttempt(i,r),i.aborted){let e=Error("Attempt aborted");throw e.code="ATTEMPT_ABORTED",e}let t=async e=>{if(r.handleError&&await r.handleError(e,i,r),i.aborted||0===i.attemptsRemaining)throw e;i.attemptNum++;let t=s(i,r);return t&&await O(t),o()};return(i.attemptsRemaining>0&&i.attemptsRemaining--,r.timeout)?new Promise((n,s)=>{let o=setTimeout(()=>{if(r.handleTimeout)try{n(r.handleTimeout(i,r))}catch(e){s(e)}else{let e=Error(`Retry timeout (attemptNum: ${i.attemptNum}, timeout: ${r.timeout})`);e.code="ATTEMPT_TIMEOUT",s(e)}},r.timeout);e(i,r).then(e=>{clearTimeout(o),n(e)}).catch(e=>{clearTimeout(o),t(e).then(n).catch(s)})}):e(i,r).catch(t)}let a=r.calculateDelay?r.calculateDelay(i,r):r.initialDelay;if(a&&await O(a),i.attemptNum<1&&r.initialJitter){let e=s(i,r);e&&await O(e)}return o()}var L=n(3971),D=n(449).hp;let P=()=>new Map,_=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},F=()=>new Set,B=Array.from,z=String.fromCharCode,U=/^\s*/g,$=/([A-Z])/g,j=(e,t)=>e.replace($,e=>`${t}${e.toLowerCase()}`).replace(U,""),H="undefined"!=typeof TextEncoder?new TextEncoder:null,W=H?e=>H.encode(e):e=>{let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.codePointAt(e);return r},q="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});q&&1===q.decode(new Uint8Array).length&&(q=null);let K=e=>void 0===e?null:e;class G{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let V=new G,J=!0;try{"undefined"!=typeof localStorage&&localStorage&&(V=localStorage,J=!1)}catch(e){}let Y=V,Z=Object.keys,X=e=>Z(e).length,Q=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ee=(e,t)=>{if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!ee(e.get(n),t.get(n)))return!1;break;case Object:if(X(e)!==X(t))return!1;for(let n in e)if(!Q(e,n)||!ee(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!ee(e[n],t[n]))return!1;break;default:return!1}return!0},et=void 0!==L&&L.release&&/node|io\.js/.test(L.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==L?L:0),en="undefined"!=typeof window&&"undefined"!=typeof document&&!et;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);let er=e=>(()=>{if(void 0===r)if(et){r=P();let e=L.argv,t=null;for(let n=0;n<e.length;n++){let i=e[n];"-"===i[0]?(null!==t&&r.set(t,""),t=i):null!==t&&(r.set(t,i),t=null)}null!==t&&r.set(t,"")}else"object"==typeof location?(r=P(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){let[t,n]=e.split("=");r.set(`--${j(t,"-")}`,n),r.set(`-${j(t,"-")}`,n)}})):r=P();return r})().has(e),ei=e=>et?K(L.env[e.toUpperCase()]):K(Y.getItem(e));(e=>er("--"+e)||ei(e))("production");let es=et&&["true","1","2"].includes(L.env.FORCE_COLOR);!er("no-colors")&&(!et||L.stdout.isTTY||es)&&(!et||er("color")||es||null!==ei("COLORTERM")||(ei("TERM")||"").includes("color"));let eo=Math.floor,ea=Number.MAX_SAFE_INTEGER;class el{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}let ec=()=>new el,eu=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},eh=e=>{let t=new Uint8Array(eu(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},ed=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},ep=(e,t)=>{for(;t>127;)ed(e,128|127&t),t=eo(t/128);ed(e,127&t)},ef=new Uint8Array(3e4),eg=ef.length/3,em=H&&H.encodeInto?(e,t)=>{if(t.length<eg){let n=H.encodeInto(t,ef).written||0;ep(e,n);for(let t=0;t<n;t++)ed(e,ef[t])}else ey(e,W(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;ep(e,r);for(let t=0;t<r;t++)ed(e,n.codePointAt(t))},ey=(e,t)=>{ep(e,t.byteLength),((e,t)=>{let n=e.cbuf.length,r=e.cpos,i=((e,t)=>e<t?e:t)(n-r,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(((e,t)=>e>t?e:t)(2*n,s)),e.cbuf.set(t.subarray(i)),e.cpos=s)})(e,t)},eb=e=>Error(e),ek=eb("Unexpected end of array"),ev=eb("Integer out of Range");class ew{constructor(e){this.arr=e,this.pos=0}}let eS=e=>new ew(e),ex=e=>((e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n})(e,eA(e)),eE=e=>e.arr[e.pos++],eA=e=>{let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let r=e.arr[e.pos++];if(t+=(127&r)*n,n*=128,r<128)return t;if(t>ea)throw ev}throw ek},eC=q?e=>q.decode(ex(e)):e=>{let t=eA(e);if(0===t)return"";{let n=String.fromCodePoint(eE(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(eE(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},eT=en?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=z(e[n]);return btoa(t)}:e=>D.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),eI=en?e=>{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}:e=>{let t,n=D.from(e,"base64");return t=n.buffer,new Uint8Array(t,n.byteOffset,n.byteLength)},eN=new Map;class eO{constructor(e){let t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:eI(t.newValue||"")}),t=this._onChange,J||addEventListener("storage",t)}postMessage(e){Y.setItem(this.room,eT(new Uint8Array(e)))}close(){let e;e=this._onChange,J||removeEventListener("storage",e)}}let eR="undefined"==typeof BroadcastChannel?eO:BroadcastChannel,eM=e=>_(eN,e,()=>{let t=F(),n=new eR(e);return n.onmessage=e=>t.forEach(t=>t(e.data,"broadcastchannel")),{bc:n,subs:t}}),eL=Date.now;class eD{constructor(){this._observers=P()}on(e,t){_(this._observers,e,F).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return B((this._observers.get(e)||P()).values()).forEach(e=>e(...t))}destroy(){this._observers=P()}}class eP extends eD{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{let e=eL();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());let t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&3e4<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&e_(this,t,"timeout")},eo(3e3)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){let t=this.clientID,n=this.meta.get(t),r=void 0===n?0:n.clock+1,i=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:eL()});let s=[],o=[],a=[],l=[];null===e?l.push(t):null==i?null!=e&&s.push(t):(o.push(t),ee(i,e)||a.push(t)),(s.length>0||a.length>0||l.length>0)&&this.emit("change",[{added:s,updated:a,removed:l},"local"]),this.emit("update",[{added:s,updated:o,removed:l},"local"])}setLocalStateField(e,t){let n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}let e_=(e,t,n)=>{let r=[];for(let n=0;n<t.length;n++){let i=t[n];if(e.states.has(i)){if(e.states.delete(i),i===e.clientID){let t=e.meta.get(i);e.meta.set(i,{clock:t.clock+1,lastUpdated:eL()})}r.push(i)}}r.length>0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},eF=(e,t,n=e.states)=>{let r=t.length,i=ec();ep(i,r);for(let s=0;s<r;s++){let r=t[s],o=n.get(r)||null,a=e.meta.get(r).clock;ep(i,r),ep(i,a),em(i,JSON.stringify(o))}return eh(i)};class eB{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}!function(e){e[e.Sync=0]="Sync",e[e.Awareness=1]="Awareness",e[e.Auth=2]="Auth",e[e.QueryAwareness=3]="QueryAwareness",e[e.Stateless=5]="Stateless",e[e.CLOSE=7]="CLOSE",e[e.SyncStatus=8]="SyncStatus"}(T||(T={})),function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(I||(I={}));class ez{constructor(e){this.data=e,this.encoder=ec(),this.decoder=eS(new Uint8Array(this.data))}peekVarString(){var e=this.decoder;let t=e.pos,n=eC(e);return e.pos=t,n}readVarUint(){return eA(this.decoder)}readVarString(){return eC(this.decoder)}readVarUint8Array(){return ex(this.decoder)}writeVarUint(e){return ep(this.encoder,e)}writeVarString(e){return em(this.encoder,e)}writeVarUint8Array(e){return ey(this.encoder,e)}length(){return eu(this.encoder)}}class eU extends eB{constructor(e){if(super(),this.messageQueue=[],this.configuration={url:"",document:void 0,WebSocketPolyfill:void 0,parameters:{},connect:!0,broadcast:!0,forceSyncInterval:!1,messageReconnectTimeout:3e4,delay:1e3,initialDelay:0,factor:2,maxAttempts:0,minDelay:1e3,maxDelay:3e4,jitter:!0,timeout:0,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onStatus:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,quiet:!1,providerMap:new Map},this.webSocket=null,this.webSocketHandlers={},this.shouldConnect=!0,this.status=I.Disconnected,this.lastMessageReceived=0,this.identifier=0,this.intervals={forceSync:null,connectionChecker:null},this.connectionAttempt=null,this.receivedOnOpenPayload=void 0,this.receivedOnStatusPayload=void 0,this.closeTries=0,this.setConfiguration(e),this.configuration.WebSocketPolyfill=e.WebSocketPolyfill?e.WebSocketPolyfill:WebSocket,this.on("open",this.configuration.onOpen),this.on("open",this.onOpen.bind(this)),this.on("connect",this.configuration.onConnect),this.on("message",this.configuration.onMessage),this.on("outgoingMessage",this.configuration.onOutgoingMessage),this.on("status",this.configuration.onStatus),this.on("status",this.onStatus.bind(this)),this.on("disconnect",this.configuration.onDisconnect),this.on("close",this.configuration.onClose),this.on("destroy",this.configuration.onDestroy),this.on("awarenessUpdate",this.configuration.onAwarenessUpdate),this.on("awarenessChange",this.configuration.onAwarenessChange),this.on("close",this.onClose.bind(this)),this.on("message",this.onMessage.bind(this)),this.intervals.connectionChecker=setInterval(this.checkConnection.bind(this),this.configuration.messageReconnectTimeout/10),void 0!==e.connect&&(this.shouldConnect=e.connect),!this.shouldConnect)return;this.connect()}async onOpen(e){this.receivedOnOpenPayload=e}async onStatus(e){this.receivedOnStatusPayload=e}attach(e){let t;return this.configuration.providerMap.set(e.configuration.name,e),this.status===I.Disconnected&&this.shouldConnect&&(t=this.connect()),this.receivedOnOpenPayload&&e.onOpen(this.receivedOnOpenPayload),this.receivedOnStatusPayload&&e.onStatus(this.receivedOnStatusPayload),t}detach(e){this.configuration.providerMap.delete(e.configuration.name)}setConfiguration(e={}){this.configuration={...this.configuration,...e}}async connect(){let e;if(this.status===I.Connected)return;this.cancelWebsocketRetry&&(this.cancelWebsocketRetry(),this.cancelWebsocketRetry=void 0),this.receivedOnOpenPayload=void 0,this.receivedOnStatusPayload=void 0,this.shouldConnect=!0;let{retryPromise:t,cancelFunc:n}=(e=!1,{retryPromise:M(this.createWebSocketConnection.bind(this),{delay:this.configuration.delay,initialDelay:this.configuration.initialDelay,factor:this.configuration.factor,maxAttempts:this.configuration.maxAttempts,minDelay:this.configuration.minDelay,maxDelay:this.configuration.maxDelay,jitter:this.configuration.jitter,timeout:this.configuration.timeout,beforeAttempt:t=>{(!this.shouldConnect||e)&&t.abort()}}).catch(e=>{if(e&&"ATTEMPT_ABORTED"!==e.code)throw e}),cancelFunc:()=>{e=!0}});return this.cancelWebsocketRetry=n,t}attachWebSocketListeners(e,t){let{identifier:n}=e,r=e=>this.emit("message",e),i=e=>this.emit("close",{event:e}),s=e=>this.emit("open",e);this.webSocketHandlers[n]={message:r,close:i,open:s,error:e=>{t(e)}};let o=this.webSocketHandlers[e.identifier];Object.keys(o).forEach(t=>{e.addEventListener(t,o[t])})}cleanupWebSocket(){if(!this.webSocket)return;let{identifier:e}=this.webSocket,t=this.webSocketHandlers[e];Object.keys(t).forEach(n=>{var r;null==(r=this.webSocket)||r.removeEventListener(n,t[n]),delete this.webSocketHandlers[e]}),this.webSocket.close(),this.webSocket=null}createWebSocketConnection(){return new Promise((e,t)=>{this.webSocket&&(this.messageQueue=[],this.cleanupWebSocket()),this.lastMessageReceived=0,this.identifier+=1;let n=new this.configuration.WebSocketPolyfill(this.url);n.binaryType="arraybuffer",n.identifier=this.identifier,this.attachWebSocketListeners(n,t),this.webSocket=n,this.status=I.Connecting,this.emit("status",{status:I.Connecting}),this.connectionAttempt={resolve:e,reject:t}})}onMessage(e){var t;this.resolveConnectionAttempt(),this.lastMessageReceived=eL();let n=new ez(e.data).peekVarString();null==(t=this.configuration.providerMap.get(n))||t.onMessage(e)}resolveConnectionAttempt(){this.connectionAttempt&&(this.connectionAttempt.resolve(),this.connectionAttempt=null,this.status=I.Connected,this.emit("status",{status:I.Connected}),this.emit("connect"),this.messageQueue.forEach(e=>this.send(e)),this.messageQueue=[])}stopConnectionAttempt(){this.connectionAttempt=null}rejectConnectionAttempt(){var e;null==(e=this.connectionAttempt)||e.reject(),this.connectionAttempt=null}checkConnection(){var e;this.status===I.Connected&&this.lastMessageReceived&&(this.configuration.messageReconnectTimeout>=eL()-this.lastMessageReceived||(this.closeTries+=1,this.closeTries>2?(this.onClose({event:{code:4408,reason:"forced"}}),this.closeTries=0):(null==(e=this.webSocket)||e.close(),this.messageQueue=[])))}get serverUrl(){for(;"/"===this.configuration.url[this.configuration.url.length-1];)return this.configuration.url.slice(0,this.configuration.url.length-1);return this.configuration.url}get url(){let e=((e,t)=>{let n=[];for(let r in e)n.push(t(e[r],r));return n})(this.configuration.parameters,(e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&");return`${this.serverUrl}${0===e.length?"":`?${e}`}`}disconnect(){if(this.shouldConnect=!1,null!==this.webSocket)try{this.webSocket.close(),this.messageQueue=[]}catch{}}send(e){var t;(null==(t=this.webSocket)?void 0:t.readyState)===C.Open?this.webSocket.send(e):this.messageQueue.push(e)}onClose({event:e}){if(this.closeTries=0,this.cleanupWebSocket(),this.status===I.Connected&&(this.status=I.Disconnected,this.emit("status",{status:I.Disconnected}),this.emit("disconnect",{event:e})),e.code===S.code&&(e.reason===S.reason?console.warn("[HocuspocusProvider] An authentication token is required, but you didn’t send one. Try adding a `token` to your HocuspocusProvider configuration. Won’t try again."):console.warn(`[HocuspocusProvider] Connection closed with status Unauthorized: ${e.reason}`),this.shouldConnect=!1),e.code===x.code&&!this.configuration.quiet)return void console.warn("[HocuspocusProvider] The provided authentication token isn’t allowed to connect to this server. Will try again.");e.code===w.code&&(console.warn(`[HocuspocusProvider] Connection closed with status MessageTooBig: ${e.reason}`),this.shouldConnect=!1),this.connectionAttempt?this.rejectConnectionAttempt():this.shouldConnect&&this.connect(),this.shouldConnect||this.status!==I.Disconnected&&(this.status=I.Disconnected,this.emit("status",{status:I.Disconnected}),this.emit("disconnect",{event:e}))}destroy(){this.emit("destroy"),this.intervals.forceSync&&clearInterval(this.intervals.forceSync),clearInterval(this.intervals.connectionChecker),this.stopConnectionAttempt(),this.disconnect(),this.removeAllListeners(),this.cleanupWebSocket()}}let e$=(e,t,n)=>{ep(e,1),ey(e,N.PR(t,n))};class ej{constructor(){this.encoder=ec()}get(e){return e.encoder}toUint8Array(){return eh(this.encoder)}}class eH{constructor(e){this.broadcasted=!1,this.message=e}setBroadcasted(e){return this.broadcasted=e,this}apply(e,t){let{message:n}=this,r=n.readVarUint(),i=n.length();switch(r){case T.Sync:this.applySyncMessage(e,t);break;case T.Awareness:this.applyAwarenessMessage(e);break;case T.Auth:this.applyAuthMessage(e);break;case T.QueryAwareness:this.applyQueryAwarenessMessage(e);break;case T.Stateless:e.receiveStateless(eC(n.decoder));break;case T.SyncStatus:this.applySyncStatusMessage(e,1===(e=>{let t=e.arr[e.pos++],n=63&t,r=64,i=(64&t)>0?-1:1;if((128&t)==0)return i*n;let s=e.arr.length;for(;e.pos<s;){if(n+=(127&(t=e.arr[e.pos++]))*r,r*=128,t<128)return i*n;if(n>ea)throw ev}throw ek})(n.decoder));break;default:throw Error(`Can’t apply message of unknown type: ${r}`)}n.length()>i+1&&(this.broadcasted?e.broadcast(ej,{encoder:n.encoder}):e.send(ej,{encoder:n.encoder}))}applySyncMessage(e,t){let{message:n}=this;n.writeVarUint(T.Sync);let r=((e,t,n,r)=>{let i=eA(e);switch(i){case 0:e$(t,n,ex(e));break;case 1:case 2:var s=e,o=n,a=r;try{N.QE(o,ex(s),a)}catch(e){console.error("Caught error while handling a Yjs update",e)}break;default:throw Error("Unknown message type")}return i})(n.decoder,n.encoder,e.document,e);t&&1===r&&(e.synced=!0)}applySyncStatusMessage(e,t){t&&e.decrementUnsyncedChanges()}applyAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;((e,t,n)=>{let r=eS(t),i=eL(),s=[],o=[],a=[],l=[],c=eA(r);for(let t=0;t<c;t++){let t=eA(r),n=eA(r),c=JSON.parse(eC(r)),u=e.meta.get(t),h=e.states.get(t),d=void 0===u?0:u.clock;(d<n||d===n&&null===c&&e.states.has(t))&&(null===c?t===e.clientID&&null!=e.getLocalState()?n++:e.states.delete(t):e.states.set(t,c),e.meta.set(t,{clock:n,lastUpdated:i}),void 0===u&&null!==c?s.push(t):void 0!==u&&null===c?l.push(t):null!==c&&(ee(c,h)||a.push(t),o.push(t)))}(s.length>0||a.length>0||l.length>0)&&e.emit("change",[{added:s,updated:a,removed:l},n]),(s.length>0||o.length>0||l.length>0)&&e.emit("update",[{added:s,updated:o,removed:l},n])})(e.awareness,t.readVarUint8Array(),e)}applyAuthMessage(e){let{message:t}=this;((e,t,n)=>{switch(k(e)){case A.PermissionDenied:t(v(e));break;case A.Authenticated:n(v(e))}})(t.decoder,e.permissionDeniedHandler.bind(e),e.authenticatedHandler.bind(e))}applyQueryAwarenessMessage(e){if(!e.awareness)return;let{message:t}=this;t.writeVarUint(T.Awareness),t.writeVarUint8Array(eF(e.awareness,Array.from(e.awareness.getStates().keys())))}}class eW{constructor(e,t={}){this.message=new e,this.encoder=this.message.get(t)}create(){return eh(this.encoder)}send(e){null==e||e.send(this.create())}broadcast(e){((e,t,n=null)=>{let r=eM(e);r.bc.postMessage(t),r.subs.forEach(e=>e(t,n))})(e,this.create())}}class eq extends ej{constructor(){super(...arguments),this.type=T.Auth,this.description="Authentication"}get(e){var t,n;if(void 0===e.token)throw Error("The authentication message requires `token` as an argument.");return em(this.encoder,e.documentName),ep(this.encoder,this.type),t=this.encoder,n=e.token,u(t,A.Token),p(t,n),this.encoder}}class eK extends ej{constructor(){super(...arguments),this.type=T.Awareness,this.description="Awareness states update"}get(e){let t;if(void 0===e.awareness)throw Error("The awareness message requires awareness as an argument");if(void 0===e.clients)throw Error("The awareness message requires clients as an argument");return em(this.encoder,e.documentName),ep(this.encoder,this.type),t=void 0===e.states?eF(e.awareness,e.clients):eF(e.awareness,e.clients,e.states),ey(this.encoder,t),this.encoder}}class eG extends ej{constructor(){super(...arguments),this.type=T.CLOSE,this.description="Ask the server to close the connection"}get(e){return em(this.encoder,e.documentName),ep(this.encoder,this.type),this.encoder}}class eV extends ej{constructor(){super(...arguments),this.type=T.QueryAwareness,this.description="Queries awareness states"}get(e){return em(this.encoder,e.documentName),ep(this.encoder,this.type),this.encoder}}class eJ extends ej{constructor(){super(...arguments),this.type=T.Stateless,this.description="A stateless message"}get(e){var t;return em(this.encoder,e.documentName),ep(this.encoder,this.type),em(this.encoder,null!=(t=e.payload)?t:""),this.encoder}}class eY extends ej{constructor(){super(...arguments),this.type=T.Sync,this.description="First sync step"}get(e){var t,n;if(void 0===e.document)throw Error("The sync step one message requires document as an argument");return em(this.encoder,e.documentName),ep(this.encoder,this.type),t=this.encoder,n=e.document,ep(t,0),ey(t,N.FX(n)),this.encoder}}class eZ extends ej{constructor(){super(...arguments),this.type=T.Sync,this.description="Second sync step"}get(e){if(void 0===e.document)throw Error("The sync step two message requires document as an argument");return em(this.encoder,e.documentName),ep(this.encoder,this.type),e$(this.encoder,e.document),this.encoder}}class eX extends ej{constructor(){super(...arguments),this.type=T.Sync,this.description="A document update"}get(e){var t,n;return em(this.encoder,e.documentName),ep(this.encoder,this.type),t=this.encoder,n=e.update,ep(t,2),ey(t,n),this.encoder}}class eQ extends Error{constructor(){super(...arguments),this.code=1001}}class e0 extends eB{constructor(e){var t,n,r;super(),this.configuration={name:"",document:void 0,awareness:void 0,token:null,parameters:{},broadcast:!0,forceSyncInterval:!1,onAuthenticated:()=>null,onAuthenticationFailed:()=>null,onOpen:()=>null,onConnect:()=>null,onMessage:()=>null,onOutgoingMessage:()=>null,onStatus:()=>null,onSynced:()=>null,onDisconnect:()=>null,onClose:()=>null,onDestroy:()=>null,onAwarenessUpdate:()=>null,onAwarenessChange:()=>null,onStateless:()=>null,quiet:!1,connect:!0,preserveConnection:!0},this.subscribedToBroadcastChannel=!1,this.isSynced=!1,this.unsyncedChanges=0,this.status=I.Disconnected,this.isAuthenticated=!1,this.authorizedScope=void 0,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this.intervals={forceSync:null},this.isConnected=!0,this.boundDocumentUpdateHandler=this.documentUpdateHandler.bind(this),this.boundAwarenessUpdateHandler=this.awarenessUpdateHandler.bind(this),this.boundBroadcastChannelSubscriber=this.broadcastChannelSubscriber.bind(this),this.boundPageHide=this.pageHide.bind(this),this.boundOnOpen=this.onOpen.bind(this),this.boundOnClose=this.onClose.bind(this),this.boundOnStatus=this.onStatus.bind(this),this.forwardConnect=e=>this.emit("connect",e),this.forwardOpen=e=>this.emit("open",e),this.forwardClose=e=>this.emit("close",e),this.forwardDisconnect=e=>this.emit("disconnect",e),this.forwardDestroy=e=>this.emit("destroy",e),this.setConfiguration(e),this.configuration.document=e.document?e.document:new N.JA,this.configuration.awareness=void 0!==e.awareness?e.awareness:new eP(this.document),this.on("open",this.configuration.onOpen),this.on("message",this.configuration.onMessage),this.on("outgoingMessage",this.configuration.onOutgoingMessage),this.on("synced",this.configuration.onSynced),this.on("destroy",this.configuration.onDestroy),this.on("awarenessUpdate",this.configuration.onAwarenessUpdate),this.on("awarenessChange",this.configuration.onAwarenessChange),this.on("stateless",this.configuration.onStateless),this.on("authenticated",this.configuration.onAuthenticated),this.on("authenticationFailed",this.configuration.onAuthenticationFailed),this.configuration.websocketProvider.on("connect",this.configuration.onConnect),this.configuration.websocketProvider.on("connect",this.forwardConnect),this.configuration.websocketProvider.on("open",this.boundOnOpen),this.configuration.websocketProvider.on("open",this.forwardOpen),this.configuration.websocketProvider.on("close",this.boundOnClose),this.configuration.websocketProvider.on("close",this.configuration.onClose),this.configuration.websocketProvider.on("close",this.forwardClose),this.configuration.websocketProvider.on("status",this.boundOnStatus),this.configuration.websocketProvider.on("disconnect",this.configuration.onDisconnect),this.configuration.websocketProvider.on("disconnect",this.forwardDisconnect),this.configuration.websocketProvider.on("destroy",this.configuration.onDestroy),this.configuration.websocketProvider.on("destroy",this.forwardDestroy),null==(t=this.awareness)||t.on("update",()=>{this.emit("awarenessUpdate",{states:E(this.awareness.getStates())})}),null==(n=this.awareness)||n.on("change",()=>{this.emit("awarenessChange",{states:E(this.awareness.getStates())})}),this.document.on("update",this.boundDocumentUpdateHandler),null==(r=this.awareness)||r.on("update",this.boundAwarenessUpdateHandler),this.registerEventListeners(),this.configuration.forceSyncInterval&&"number"==typeof this.configuration.forceSyncInterval&&(this.intervals.forceSync=setInterval(this.forceSync.bind(this),this.configuration.forceSyncInterval)),this.configuration.websocketProvider.attach(this)}onStatus({status:e}){this.status=e,this.configuration.onStatus({status:e}),this.emit("status",{status:e})}setConfiguration(e={}){!e.websocketProvider&&e.url&&(this.configuration.websocketProvider=new eU({url:e.url,connect:e.connect,parameters:e.parameters})),this.configuration={...this.configuration,...e}}get document(){return this.configuration.document}get awareness(){return this.configuration.awareness}get hasUnsyncedChanges(){return this.unsyncedChanges>0}resetUnsyncedChanges(){this.unsyncedChanges=1,this.emit("unsyncedChanges",this.unsyncedChanges)}incrementUnsyncedChanges(){this.unsyncedChanges+=1,this.emit("unsyncedChanges",this.unsyncedChanges)}decrementUnsyncedChanges(){this.unsyncedChanges-=1,0===this.unsyncedChanges&&(this.synced=!0),this.emit("unsyncedChanges",this.unsyncedChanges)}forceSync(){this.resetUnsyncedChanges(),this.send(eY,{document:this.document,documentName:this.configuration.name})}pageHide(){this.awareness&&e_(this.awareness,[this.document.clientID],"page hide")}registerEventListeners(){"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener("pagehide",this.boundPageHide)}sendStateless(e){this.send(eJ,{documentName:this.configuration.name,payload:e})}documentUpdateHandler(e,t){t!==this&&(this.incrementUnsyncedChanges(),this.send(eX,{update:e,documentName:this.configuration.name},!0))}awarenessUpdateHandler({added:e,updated:t,removed:n},r){let i=e.concat(t).concat(n);this.send(eK,{awareness:this.awareness,clients:i,documentName:this.configuration.name},!0)}get synced(){return this.isSynced}set synced(e){this.isSynced!==e&&(this.isSynced=e,this.emit("synced",{state:e}),this.emit("sync",{state:e}))}receiveStateless(e){this.emit("stateless",{payload:e})}get isAuthenticationRequired(){return!!this.configuration.token&&!this.isAuthenticated}async connect(){return this.configuration.broadcast&&this.subscribeToBroadcastChannel(),this.configuration.websocketProvider.shouldConnect=!0,this.configuration.websocketProvider.attach(this)}disconnect(){this.disconnectBroadcastChannel(),this.configuration.websocketProvider.detach(this),this.isConnected=!1,this.configuration.preserveConnection||this.configuration.websocketProvider.disconnect()}async onOpen(e){let t;this.isAuthenticated=!1,this.isConnected=!0,this.emit("open",{event:e});try{t=await this.getToken()}catch(e){this.permissionDeniedHandler(`Failed to get token: ${e}`);return}this.isAuthenticationRequired&&this.send(eq,{token:t,documentName:this.configuration.name}),this.startSync()}async getToken(){return"function"==typeof this.configuration.token?await this.configuration.token():this.configuration.token}startSync(){this.resetUnsyncedChanges(),this.send(eY,{document:this.document,documentName:this.configuration.name}),this.awareness&&null!==this.awareness.getLocalState()&&this.send(eK,{awareness:this.awareness,clients:[this.document.clientID],documentName:this.configuration.name})}send(e,t,n=!1){if(!this.isConnected)return;n&&this.mux(()=>{this.broadcast(e,t)});let r=new eW(e,t);this.emit("outgoingMessage",{message:r.message}),r.send(this.configuration.websocketProvider)}onMessage(e){let t=new ez(e.data),n=t.readVarString();t.writeVarString(n),this.emit("message",{event:e,message:new ez(e.data)}),new eH(t).apply(this,!0)}onClose(e){this.isAuthenticated=!1,this.synced=!1,this.awareness&&e_(this.awareness,Array.from(this.awareness.getStates().keys()).filter(e=>e!==this.document.clientID),this)}destroy(){this.emit("destroy"),this.intervals.forceSync&&clearInterval(this.intervals.forceSync),this.awareness&&(e_(this.awareness,[this.document.clientID],"provider destroy"),this.awareness.off("update",this.boundAwarenessUpdateHandler),this.awareness.destroy()),this.document.off("update",this.boundDocumentUpdateHandler),this.removeAllListeners(),this.configuration.websocketProvider.off("connect",this.configuration.onConnect),this.configuration.websocketProvider.off("connect",this.forwardConnect),this.configuration.websocketProvider.off("open",this.boundOnOpen),this.configuration.websocketProvider.off("open",this.forwardOpen),this.configuration.websocketProvider.off("close",this.boundOnClose),this.configuration.websocketProvider.off("close",this.configuration.onClose),this.configuration.websocketProvider.off("close",this.forwardClose),this.configuration.websocketProvider.off("status",this.boundOnStatus),this.configuration.websocketProvider.off("disconnect",this.configuration.onDisconnect),this.configuration.websocketProvider.off("disconnect",this.forwardDisconnect),this.configuration.websocketProvider.off("destroy",this.configuration.onDestroy),this.configuration.websocketProvider.off("destroy",this.forwardDestroy),this.send(eG,{documentName:this.configuration.name}),this.disconnect(),"undefined"!=typeof window&&"removeEventListener"in window&&window.removeEventListener("pagehide",this.boundPageHide)}permissionDeniedHandler(e){this.emit("authenticationFailed",{reason:e}),this.isAuthenticated=!1,this.disconnect(),this.status=I.Disconnected}authenticatedHandler(e){this.isAuthenticated=!0,this.authorizedScope=e,this.emit("authenticated")}get broadcastChannel(){return`${this.configuration.name}`}broadcastChannelSubscriber(e){this.mux(()=>{let t=new ez(e),n=t.readVarString();t.writeVarString(n),new eH(t).setBroadcasted(!0).apply(this,!1)})}subscribeToBroadcastChannel(){if(!this.subscribedToBroadcastChannel){var e,t;e=this.broadcastChannel,t=this.boundBroadcastChannelSubscriber,eM(e).subs.add(t),this.subscribedToBroadcastChannel=!0}this.mux(()=>{this.broadcast(eY,{document:this.document,documentName:this.configuration.name}),this.broadcast(eZ,{document:this.document,documentName:this.configuration.name}),this.broadcast(eV,{document:this.document,documentName:this.configuration.name}),this.awareness&&this.broadcast(eK,{awareness:this.awareness,clients:[this.document.clientID],document:this.document,documentName:this.configuration.name})})}disconnectBroadcastChannel(){this.awareness&&this.send(eK,{awareness:this.awareness,clients:[this.document.clientID],states:new Map,documentName:this.configuration.name},!0),this.subscribedToBroadcastChannel&&(((e,t)=>{let n=eM(e);return n.subs.delete(t)&&0===n.subs.size&&(n.bc.close(),eN.delete(e))})(this.broadcastChannel,this.boundBroadcastChannelSubscriber),this.subscribedToBroadcastChannel=!1)}broadcast(e,t){this.configuration.broadcast&&this.subscribedToBroadcastChannel&&new eW(e,t).broadcast(this.broadcastChannel)}setAwarenessField(e,t){if(!this.awareness)throw new eQ(`Cannot set awareness field "${e}" to ${JSON.stringify(t)}. You have disabled Awareness for this provider by explicitly passing awareness: null in the provider configuration.`);this.awareness.setLocalStateField(e,t)}}crypto.getRandomValues.bind(crypto)},4866:(e,t,n)=>{"use strict";n.d(t,{Ej:()=>l,Gv:()=>i,Im:()=>c,SQ:()=>d,Si:()=>u,i5:()=>h,jJ:()=>a,kp:()=>s,ol:()=>f});var r=n(6596);let i=e=>"object"==typeof e,s=Object.assign,o=Object.keys;Object.values;let a=(e,t)=>{for(let n in e)t(e[n],n)},l=e=>o(e).length,c=e=>{for(let t in e)return!1;return!0},u=(e,t)=>{for(let n in e)if(!t(e[n],n))return!1;return!0},h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d=(e,t)=>e===t||l(e)===l(t)&&u(e,(e,n)=>(void 0!==e||h(t,n))&&r.a(t[n],e)),p=Object.freeze,f=e=>{for(let t in e){let n=e[t];("object"==typeof n||"function"==typeof n)&&f(e[t])}return p(e)}},4930:(e,t,n)=>{"use strict";n.d(t,{YR:()=>i});var r=n(6716);function i(e,t,n,i){let s,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,s=n):(o=t,a=n,s=i),(0,r.VG)(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},s)}},5214:(e,t,n)=>{"use strict";let r;n.d(t,{dn:()=>m,Bd:()=>p,IA:()=>b,WI:()=>k});var i=n(4189),s=n(780);let o=e=>void 0===e?null:e;class a{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let l=new a;try{"undefined"!=typeof localStorage&&localStorage&&(l=localStorage)}catch(e){}let c=l;var u=n(9021),h=n(3971);let d=void 0!==h&&h.release&&/node|io\.js/.test(h.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==h?h:0),p="undefined"!=typeof window&&"undefined"!=typeof document&&!d;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);let f=[],g=e=>(()=>{if(void 0===r)if(d){r=i.vt();let e=h.argv,t=null;for(let n=0;n<e.length;n++){let i=e[n];"-"===i[0]?(null!==t&&r.set(t,""),t=i):null!==t?(r.set(t,i),t=null):f.push(i)}null!==t&&r.set(t,"")}else"object"==typeof location?(r=i.vt(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){let[t,n]=e.split("=");r.set(`--${s.jN(t,"-")}`,n),r.set(`-${s.jN(t,"-")}`,n)}})):r=i.vt();return r})().has(e),m=e=>d?o(h.env[e.toUpperCase().replaceAll("-","_")]):o(c.getItem(e)),y=e=>g("--"+e)||null!==m(e),b=y("production"),k=d&&u.EK(h.env.FORCE_COLOR,["true","1","2"])||!g("--no-colors")&&!y("no-color")&&(!d||h.stdout.isTTY)&&(!d||g("--color")||null!==m("COLORTERM")||(m("TERM")||"").includes("color"))},5599:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6665),i=n(9482);function s(e){e.register(r.A),e.register(i.A),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function s(e,t){return RegExp(e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),t)}i=s(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=s(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:s(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:s(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var o=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(o).join(""):""},a=function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],s=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:s=!0),(s||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=o(i);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=o(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=o(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&a(i.content)}};e.hooks.add("after-tokenize",function(e){("jsx"===e.language||"tsx"===e.language)&&a(e.tokens)})}(e)}s.displayName="jsx",s.aliases=[]},5727:(e,t,n)=>{"use strict";n.d(t,{yy:()=>e_,R8:()=>eF});var r=n(5214),i=n(6343);class s{constructor(e,t){this.left=e,this.right=t}}let o=(e,t)=>new s(e,t);var a=n(4189),l=n(4866),c=n(1170),u=n(1373),h=n(6596),d=n(9021),p=n(780),f=n(4299);let g=e=>e.next()>=.5,m=(e,t,n)=>f.RI(e.next()*(n+1-t)+t),y=(e,t,n)=>f.RI(e.next()*(n+1-t)+t),b=(e,t,n)=>y(e,t,n),k=e=>(0,p.QV)(b(e,97,122)),v=(e,t)=>t[b(e,0,t.length-1)];var w=n(3720);let S=Symbol("0schema");class x{constructor(){this._rerrs=[]}extend(e,t,n,r=null){this._rerrs.push({path:e,expected:t,has:n,message:r})}toString(){let e=[];for(let t=this._rerrs.length-1;t>0;t--){let n=this._rerrs[t];e.push(p.ux(" ",(this._rerrs.length-t)*2)+`${null!=n.path?`[${n.path}] `:""}${n.has} doesn't match ${n.expected}. ${n.message}`)}return e.join("\n")}}let E=(e,t)=>e===t||null!=e&&null!=t&&e.constructor===t.constructor&&(e[h.B]?h.a(e,t):c.cy(e)?c.Si(e,e=>c.zN(t,t=>E(e,t))):!!l.Gv(e)&&l.Si(e,(e,n)=>E(e,t[n])));class A{static _dilutes=!1;extends(e){let[t,n]=[this.shape,e.shape];return this.constructor._dilutes&&([n,t]=[t,n]),E(t,n)}equals(e){return this.constructor===e.constructor&&d.vo(this.shape,e.shape)}[S](){return!0}[h.B](e){return this.equals(e)}validate(e){return this.check(e)}check(e,t){u.bD()}get nullable(){return ei(this,ek)}get optional(){return new F(this)}cast(e){return ex(e,this),e}expect(e){return ex(e,this),e}}class C extends A{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e?.constructor===this.shape&&(null==this._c||this._c(e));return n||t?.extend(null,this.shape.name,e?.constructor.name,e?.constructor!==this.shape?"Constructor match failed":"Check failed"),n}}let T=(e,t=null)=>new C(e,t);T(C);class I extends A{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape(e);return n||t?.extend(null,"custom prop",e?.constructor.name,"failed to check custom prop"),n}}let N=e=>new I(e);T(I);class O extends A{constructor(e){super(),this.shape=e}check(e,t){let n=this.shape.some(t=>t===e);return n||t?.extend(null,this.shape.join(" | "),e.toString()),n}}let R=(...e)=>new O(e),M=T(O),L=RegExp.escape||(e=>e.replace(/[().|&,$^[\]]/g,e=>"\\"+e)),D=e=>ef.check(e)?[L(e)]:M.check(e)?e.shape.map(e=>e+""):ep.check(e)?["[+-]?\\d+.?\\d*"]:eg.check(e)?[".*"]:es.check(e)?e.shape.map(D).flat(1):void u.Mq();class P extends A{constructor(e){super(),this.shape=e,this._r=RegExp("^"+e.map(D).map(e=>`(${e.join("|")})`).join("")+"$")}check(e,t){let n=null!=this._r.exec(e);return n||t?.extend(null,this._r.toString(),e.toString(),"String doesn't match string template."),n}}T(P);let _=Symbol("optional");class F extends A{constructor(e){super(),this.shape=e}check(e,t){let n=void 0===e||this.shape.check(e);return n||t?.extend(null,"undefined (optional)","()"),n}get[_](){return!0}}let B=T(F);class z extends A{check(e,t){return t?.extend(null,"never",typeof e),!1}}new z,T(z);class U extends A{constructor(e,t=!1){super(),this.shape=e,this._isPartial=t}static _dilutes=!0;get partial(){return new U(this.shape,!0)}check(e,t){return null==e?(t?.extend(null,"object","null"),!1):l.Si(this.shape,(n,r)=>{let i=this._isPartial&&!l.i5(e,r)||n.check(e[r],t);return i||t?.extend(r.toString(),n.toString(),typeof e[r],"Object property does not match"),i})}}let $=T(U),j=N(e=>null!=e&&(e.constructor===Object||null==e.constructor));class H extends A{constructor(e,t){super(),this.shape={keys:e,values:t}}check(e,t){return null!=e&&l.Si(e,(n,r)=>{let i=this.shape.keys.check(r,t);return i||t?.extend(r+"","Record",typeof e,i?"Key doesn't match schema":"Value doesn't match value"),i&&this.shape.values.check(n,t)})}}let W=(e,t)=>new H(e,t),q=T(H);class K extends A{constructor(e){super(),this.shape=e}check(e,t){return null!=e&&l.Si(this.shape,(n,r)=>{let i=n.check(e[r],t);return i||t?.extend(r.toString(),"Tuple",typeof n),i})}}T(K);class G extends A{constructor(e){super(),this.shape=1===e.length?e[0]:new er(e)}check(e,t){let n=c.cy(e)&&c.Si(e,e=>this.shape.check(e));return n||t?.extend(null,"Array",""),n}}let V=(...e)=>new G(e),J=T(G),Y=N(e=>c.cy(e));class Z extends A{constructor(e,t){super(),this.shape=e,this._c=t}check(e,t){let n=e instanceof this.shape&&(null==this._c||this._c(e));return n||t?.extend(null,this.shape.name,e?.constructor.name),n}}T(Z);let X=((e,t=null)=>new Z(e,t))(A);class Q extends A{constructor(e){super(),this.len=e.length-1,this.args=((...e)=>new K(e))(...e.slice(-1)),this.res=e[this.len]}check(e,t){let n=e.constructor===Function&&e.length<=this.len;return n||t?.extend(null,"function",typeof e),n}}let ee=T(Q),et=N(e=>"function"==typeof e);class en extends A{constructor(e){super(),this.shape=e}check(e,t){let n=c.Si(this.shape,n=>n.check(e,t));return n||t?.extend(null,"Intersectinon",typeof e),n}}T(en,e=>e.shape.length>0);class er extends A{static _dilutes=!0;constructor(e){super(),this.shape=e}check(e,t){let n=c.zN(this.shape,n=>n.check(e,t));return t?.extend(null,"Union",typeof e),n}}let ei=(...e)=>e.findIndex(e=>es.check(e))>=0?ei(...e.map(e=>eS(e)).map(e=>es.check(e)?e.shape:[e]).flat(1)):1===e.length?e[0]:new er(e),es=T(er),eo=()=>!0,ea=N(eo),el=T(I,e=>e.shape===eo),ec=N(e=>"bigint"==typeof e),eu=N(e=>e===ec),eh=N(e=>"symbol"==typeof e);N(e=>e===eh);let ed=N(e=>"number"==typeof e),ep=N(e=>e===ed),ef=N(e=>"string"==typeof e),eg=N(e=>e===ef),em=N(e=>"boolean"==typeof e),ey=N(e=>e===em),eb=R(void 0);T(O,e=>1===e.shape.length&&void 0===e.shape[0]),R(void 0);let ek=R(null),ev=T(O,e=>1===e.shape.length&&null===e.shape[0]);T(Uint8Array),T(C,e=>e.shape===Uint8Array);let ew=ei(ed,ef,ek,eb,ec,em,eh);(()=>{let e=V(ea),t=W(ef,ea),n=ei(ed,ef,ek,em,e,t);e.shape=n,t.shape.values=n})();let eS=e=>{if(X.check(e))return e;if(j.check(e)){let t={};for(let n in e)t[n]=eS(e[n]);return new U(t)}if(Y.check(e))return ei(...e.map(eS));if(ew.check(e))return R(e);if(et.check(e))return T(e);u.Mq()},ex=r.IA?()=>{}:(e,t)=>{let n=new x;if(!t.check(e,n))throw u.vt(`Expected value to be of type ${t.constructor.name}.
2
+ ${n.toString()}`)};class eE{constructor(e){this.patterns=[],this.$state=e}if(e,t){return this.patterns.push({if:eS(e),h:t}),this}else(e){return this.if(ea,e)}done(){return(e,t)=>{for(let n=0;n<this.patterns.length;n++){let r=this.patterns[n];if(r.if.check(e))return r.h(e,t)}throw u.vt("Unhandled pattern")}}}let eA=new eE(ea).if(ep,(e,t)=>m(t,w.YH,w.Is)).if(eg,(e,t)=>((e,t=0,n=20)=>{let r=b(e,t,n),i="";for(let t=0;t<r;t++)i+=k(e);return i})(t)).if(ey,(e,t)=>g(t)).if(eu,(e,t)=>BigInt(m(t,w.YH,w.Is))).if(es,(e,t)=>eC(t,v(t,e.shape))).if($,(e,t)=>{let n={};for(let r in e.shape){let i=e.shape[r];if(B.check(i)){if(g(t))continue;i=i.shape}n[r]=eA(i,t)}return n}).if(J,(e,t)=>{let n=[],r=y(t,0,42);for(let i=0;i<r;i++)n.push(eC(t,e.shape));return n}).if(M,(e,t)=>v(t,e.shape)).if(ev,(e,t)=>null).if(ee,(e,t)=>{let n=eC(t,e.res);return()=>n}).if(el,(e,t)=>eC(t,v(t,[ed,ef,ek,eb,ec,em,V(ed),W(ei("a","b","c"),ed)]))).if(q,(e,t)=>{let n={},r=m(t,0,3);for(let i=0;i<r;i++){let r=eC(t,e.shape.keys),i=eC(t,e.shape.values);n[r]=i}return n}).done(),eC=(e,t)=>eA(eS(t),e),eT="undefined"!=typeof document?document:{};N(e=>e.nodeType===eM),"undefined"!=typeof DOMParser&&new DOMParser,N(e=>e.nodeType===eN),N(e=>e.nodeType===eO);let eI=e=>a.Tj(e,(e,t)=>`${t}:${e};`).join(""),eN=eT.ELEMENT_NODE,eO=eT.TEXT_NODE;eT.CDATA_SECTION_NODE,eT.COMMENT_NODE;let eR=eT.DOCUMENT_NODE;eT.DOCUMENT_TYPE_NODE;let eM=eT.DOCUMENT_FRAGMENT_NODE;N(e=>e.nodeType===eR);var eL=n(3446);let eD={[eL.Y]:o("font-weight","bold"),[eL.Ny]:o("font-weight","normal"),[eL.ft]:o("color","blue"),[eL.AV]:o("color","green"),[eL.Qu]:o("color","grey"),[eL.UH]:o("color","red"),[eL.hr]:o("color","purple"),[eL.hN]:o("color","orange"),[eL.Tx]:o("color","black")},eP=r.WI?e=>{1===e.length&&e[0]?.constructor===Function&&(e=e[0]());let t=[],n=[],r=a.vt(),i=[],s=0;for(;s<e.length;s++){let i=e[s],o=eD[i];if(void 0!==o)r.set(o.left,o.right);else{if(void 0===i)break;if(i.constructor===String||i.constructor===Number){let e=eI(r);s>0||e.length>0?(t.push("%c"+i),n.push(e)):t.push(i)}else break}}for(s>0&&(i=n).unshift(t.join(""));s<e.length;s++){let t=e[s];t instanceof Symbol||i.push(t)}return i}:eL.ET,e_=(...e)=>{console.log(...eP(e)),eB.forEach(t=>t.print(e))},eF=(...e)=>{console.warn(...eP(e)),e.unshift(eL.hN),eB.forEach(t=>t.print(e))},eB=i.vt()},5926:(e,t,n)=>{"use strict";n.d(t,{$L:()=>T,Ln:()=>g,Um:()=>C,Wg:()=>m,XE:()=>h,dL:()=>z,jP:()=>k,n9:()=>A,oM:()=>v,zy:()=>E});var r=n(3813);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class s{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&s.empty)return s.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+o],h=l+c;if(e<=h){let s=c?e==l?-1:e==h?1:t:t,o=l+r+(s<0?0:u);if(n)return o;let d=e==(t<0?l:h)?null:a/3+(e-l)*65536,p=e==l?2:e==h?1:4;return(t<0?e!=l:e!=h)&&(p|=8),new i(o,p,d)}r+=u-c}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let a=this.ranges[t+i];if(e<=o+a&&t==3*r)return!0;n+=this.ranges[t+s]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),a=s+(this.inverted?0:i),l=this.ranges[r+t],c=this.ranges[r+n];e(o,o+l,a,a+c),i+=c-l}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])}}s.empty=new s([]);class o{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new o(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new o;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let a=Object.create(null);class l{getMap(){return s.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=a[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in a)throw RangeError("Duplicate use of step JSON ID "+e);return a[e]=t,t.prototype.jsonID=e,t}}class c{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new c(e,null)}static fail(e){return new c(null,e)}static fromReplace(e,t,n,i){try{return c.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return c.fail(e.message);throw e}}}function u(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(u(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class h extends l{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(u(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,s)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new h(t.pos,n.pos,this.mark)}merge(e){return e instanceof h&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new h(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new h(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("addMark",h);class d extends l{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(u(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,n)}invert(){return new h(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}l.jsonID("removeMark",d);class p extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(t.pos,e.markFromJSON(t.mark))}}l.jsonID("addNodeMark",p);class f extends l{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}l.jsonID("removeNodeMark",f);class g extends l{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new s([this.from,this.to-this.from,this.slice.size])}invert(e){return new g(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&g.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new g(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof g)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new g(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new g(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new g(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}g.MAP_BIAS=1,l.jsonID("replace",g);class m extends l{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return c.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?c.fromReplace(e,this.from,this.to,n):c.fail("Content does not fit in gap")}getMap(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new m(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new m(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new m(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function b(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),a=[],l=t+1;for(let t=0;t<o.childCount;t++){let c=o.child(t),u=l+c.nodeSize,h=i.matchType(c.type);if(h){i=h;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new d(l,u,c.marks[t]));if(s&&c.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(c.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new g(l+e.index,l+e.index+e[0].length,i))}}else a.push(new g(l,u,r.Ji.empty));l=u}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(l,l,new r.Ji(t,0,0))}for(let t=a.length-1;t>=0;t--)e.step(a[t])}function k(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,a,t))return n;if(0==n||s.type.spec.isolating||!((0==o||s.canReplace(o,s.childCount))&&(a==s.childCount||s.canReplace(0,a))))break;o&&(r=1),a<s.childCount&&(i=1)}return null}function v(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}(e,t),s=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;a&&e<i;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?o:null}(r,t);return s?i.map(w).concat({type:t,attrs:n}).concat(s.map(w)):null}function w(e){return{type:e,attrs:null}}function S(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function x(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function E(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),a=r&&r[t+1];a&&(o=o.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!l.type.validContent(o))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function A(e,t){var n,r;let i=e.resolve(t),s=i.index();return n=i.nodeBefore,r=i.nodeAfter,!!(n&&r&&!n.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}(n,r))&&i.parent.canReplace(s,s+1)}function C(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),a=!1;if(1==e)a=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);a=e&&o.canReplaceWith(s,s,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function T(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return I(s,o,i)?new g(t,n,i):new N(s,o,i).fit()}function I(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}l.jsonID("replaceAround",m);class N{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&1==s.childCount;)s=s.firstChild.content,o--,a--;let l=new r.Ji(s,o,a);return e>-1?new m(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new g(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=M(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:a}=this.frontier[s],l,c=null;if(1==t&&(i?a.matchType(i.type)||(c=a.fillBefore(r.FK.from(i),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:s,parent:e,inject:c};if(2==t&&i&&(l=a.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:e,wrap:l};if(e&&a.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return!(D(e,-1)<=t)&&(this.unplaced.size>1&&D(e,1)>n&&n++,this.unplaced=new r.Ji(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=M(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(O(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(O(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,c=0,u=[],{match:h,type:d}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));h=h.matchFragment(i)}let p=a.size+e-(o.content.size-o.openEnd);for(;c<a.childCount;){let e=a.child(c),t=h.matchType(e.type);if(!t)break;(++c>1||0==l||e.content.size)&&(h=t,u.push(function e(t,n,i){if(n<=0)return t;let s=t.content;return n>1&&(s=s.replaceChild(0,e(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=t.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(r.FK.empty,!0)))),t.copy(s)}(e.mark(d.allowedMarks(e.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=R(this.placed,t,r.FK.from(u)),this.frontier[t].match=h,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=a;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(O(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new r.Ji(O(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!L(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){t:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=L(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=L(e,n,r,t,!0);if(!i||i.childCount)continue t}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=R(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=R(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=R(this.placed,this.frontier.length,e))}}function O(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(O(e.firstChild.content,t-1,n)))}function R(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(R(e.lastChild.content,t-1,n)))}function M(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function L(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,s.content,o)?a:null}function D(e,t){for(let n=0;;n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function P(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class _ extends l{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return s.empty}invert(e){return new _(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new _(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new _(t.pos,t.attr,t.value)}}l.jsonID("attr",_);class F extends l{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return c.ok(n)}getMap(){return s.empty}invert(e){return new F(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new F(t.attr,t.value)}}l.jsonID("docAttr",F);let B=class extends Error{};(B=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),B.prototype.constructor=B,B.prototype.name="TransformError";class z{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new B(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=T(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(I(s,o,i))return e.step(new g(t,n,i));let a=P(s,o);0==a[a.length-1]&&a.pop();let l=-(s.depth+1);a.unshift(l);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(e)>-1?l=e:s.before(e)==t&&a.splice(1,0,-e)}let c=a.indexOf(l),u=[],h=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==i.openStart)break;e=n.content}for(let e=h-1;e>=0;e--){var d;let t=u[e],n=(d=t.type).spec.defining||d.spec.definingForContent;if(n&&!t.sameMarkup(s.node(Math.abs(l)-1)))h=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let l=(t+h+1)%(i.openStart+1),d=u[l];if(d)for(let t=0;t<a.length;t++){let u=a[(t+c)%a.length],h=!0;u<0&&(h=!1,u=-u);let p=s.node(u-1),f=s.index(u-1);if(p.canReplaceWith(f,f,d.type,d.marks))return e.replace(s.before(u),h?o.after(u):n,new r.Ji(function e(t,n,i,s,o){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,s,r)))}if(n>s){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}(i.content,0,i.openStart,l),l,i.openEnd))}}let p=e.steps.length;for(let r=a.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=a[r];e<0||(t=s.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var i=e,s=t;if(!n.isInline&&i==s&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,n.type);null!=e&&(i=s=e)}return this.replaceRange(i,s,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let e=r.depth;e>s;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>s;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let s=P(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:s,depth:o}=t,a=i.before(o+1),l=s.after(o+1),c=a,u=l,h=r.FK.empty,d=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,h=r.FK.from(i.node(e).copy(h)),d++):c--;let p=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,p=r.FK.from(s.node(e).copy(p)),f++):u++;e.step(new m(c,u,a,l,new r.Ji(h.append(p),d,f),h.size-d,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),a=o.node().type;if(s&&a.inlineContent){let e="pre"==a.whitespace,t=!!a.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let l=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);x(e,r.node(),r.before(),l)}a.inlineContent&&b(e,t+n-1,a,o.node().contentMatchAt(o.index()),null==i);let c=e.mapping.slice(l),u=c.map(t-n);if(e.step(new g(u,c.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(u);S(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new m(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){var s=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=s.steps.length;return s.doc.nodesBetween(e,t,(e,t)=>{var a,l,c;let u,h,d="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(n,d)&&(a=s.doc,l=s.mapping.slice(o).map(t),c=n,h=(u=a.resolve(l)).index(),u.parent.canReplaceWith(h,h+1,c))){let i=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&x(s,e,t,o),b(s,s.mapping.slice(o).map(t,1),n,void 0,null===i);let a=s.mapping.slice(o),l=a.map(t,1),c=a.map(t+e.nodeSize,1);return s.step(new m(l,c,l+1,c-1,new r.Ji(r.FK.from(n.create(d,null,e.marks)),0,0),1,!0)),!0===i&&S(s,e,t,o),!1}}),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let a=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new m(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(a),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new _(e,t,n)),this}setDocAttribute(e,t){return this.step(new F(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new f(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,a=r.FK.empty;for(let e=s.depth,t=s.depth-n,l=n-1;e>t;e--,l--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[l];a=r.FK.from(t?t.type.create(t.attrs,a):s.node(e).copy(a))}e.step(new g(t,t,new r.Ji(o.append(a),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,s,o,a;return r=this,o=[],a=[],r.doc.nodesBetween(e,t,(r,l,c)=>{if(!r.isInline)return;let u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){let c=Math.max(l,e),p=Math.min(l+r.nodeSize,t),f=n.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(i&&i.to==c&&i.mark.eq(u[e])?i.to=p:o.push(i=new d(c,p,u[e])));s&&s.to==c?s.to=p:a.push(s=new h(c,p,n))}}),o.forEach(e=>r.step(e)),a.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(e,t,(i,a)=>{if(!i.isInline)return;o++;let l=null;if(n instanceof r.sX){let e=i.marks,t;for(;t=n.isInSet(e);)(l||(l=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(l=[n]):l=i.marks;if(l&&l.length){let n=Math.min(a+i.nodeSize,t);for(let t=0;t<l.length;t++){let r=l[t],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&r.eq(s[e].style)&&(i=t)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(a,e),to:n,step:o})}}}),s.forEach(e=>i.step(new d(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return b(this,e,t,n),this}}},6204:(e,t,n)=>{"use strict";function r(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}n.d(t,{A:()=>r}),r.displayName="python",r.aliases=["py"]},6343:(e,t,n)=>{"use strict";n.d(t,{vt:()=>r});let r=()=>new Set},6463:(e,t,n)=>{"use strict";function r(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}n.d(t,{A:()=>r}),r.displayName="clike",r.aliases=[]},6596:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,a:()=>i});let r=Symbol("Equality"),i=(e,t)=>e===t||!!e?.[r]?.(t)},6665:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6463);function i(e){e.register(r.A),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source)+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}i.displayName="javascript",i.aliases=["js"]},6716:(e,t,n)=>{"use strict";n.d(t,{dc:()=>s,_Z:()=>o,VG:()=>a});var r=n(4543);let i=[],s=!1,o="skip";function a(e,t,n,a){let l;"function"==typeof t&&"function"!=typeof n?(a=n,n=t):l=t;let c=(0,r.C)(l),u=a?-1:1;(function e(r,l,h){let d=r&&"object"==typeof r?r:{};if("string"==typeof d.type){let e="string"==typeof d.tagName?d.tagName:"string"==typeof d.name?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return p;function p(){var d;let p,f,g,m=i;if((!t||c(r,l,h[h.length-1]||void 0))&&(m=Array.isArray(d=n(r,h))?d:"number"==typeof d?[!0,d]:null==d?i:[d])[0]===s)return m;if("children"in r&&r.children&&r.children&&m[0]!==o)for(f=(a?r.children.length:-1)+u,g=h.concat(r);f>-1&&f<r.children.length;){if((p=e(r.children[f],f,g)())[0]===s)return p;f="number"==typeof p[1]?p[1]:f+u}return m}})(e,void 0,[])()}},6857:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var r=n(141),i="object"==typeof global&&global&&global.Object===Object&&global,s="object"==typeof self&&self&&self.Object===Object&&self,o=i||s||Function("return this")();let a=function(){return o.Date.now()};var l=/\s/;let c=function(e){for(var t=e.length;t--&&l.test(e.charAt(t)););return t};var u=/^\s+/,h=o.Symbol,d=Object.prototype,p=d.hasOwnProperty,f=d.toString,g=h?h.toStringTag:void 0;let m=function(e){var t=p.call(e,g),n=e[g];try{e[g]=void 0;var r=!0}catch(e){}var i=f.call(e);return r&&(t?e[g]=n:delete e[g]),i};var y=Object.prototype.toString,b=h?h.toStringTag:void 0;let k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?m(e):y.call(e)},v=function(e){return"symbol"==typeof e||null!=e&&"object"==typeof e&&"[object Symbol]"==k(e)};var w=0/0,S=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,E=/^0o[0-7]+$/i,A=parseInt;let C=function(e){if("number"==typeof e)return e;if(v(e))return w;if((0,r.A)(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=(0,r.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,c(t)+1).replace(u,""):t;var i=x.test(e);return i||E.test(e)?A(e.slice(2),i?2:8):S.test(e)?w:+e};var T=Math.max,I=Math.min;let N=function(e,t,n){var i,s,o,l,c,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function g(t){var n=i,r=s;return i=s=void 0,h=t,l=e.apply(r,n)}function m(e){var n=e-u,r=e-h;return void 0===u||n>=t||n<0||p&&r>=o}function y(){var e,n,r,i=a();if(m(i))return b(i);c=setTimeout(y,(e=i-u,n=i-h,r=t-e,p?I(r,o-n):r))}function b(e){return(c=void 0,f&&i)?g(e):(i=s=void 0,l)}function k(){var e,n=a(),r=m(n);if(i=arguments,s=this,u=n,r){if(void 0===c)return h=e=u,c=setTimeout(y,t),d?g(e):l;if(p)return clearTimeout(c),c=setTimeout(y,t),g(u)}return void 0===c&&(c=setTimeout(y,t)),l}return t=C(t)||0,(0,r.A)(n)&&(d=!!n.leading,o=(p="maxWait"in n)?T(C(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),k.cancel=function(){void 0!==c&&clearTimeout(c),h=0,i=u=s=c=void 0},k.flush=function(){return void 0===c?l:b(a())},k}},6887:(e,t,n)=>{"use strict";n.d(t,{S8:()=>i,gZ:()=>s}),crypto.subtle;let r=crypto.getRandomValues.bind(crypto),i=()=>r(new Uint32Array(1))[0],s=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^i()&15>>e/4).toString(16))},7036:(e,t,n)=>{"use strict";n.d(t,{RK:()=>D,T:()=>E,UM:()=>L,Z6:()=>T,gi:()=>M,uX:()=>O,xe:()=>R});var r=n(9418),i=n(3792);let s="undefined"!=typeof navigator?navigator:null,o="undefined"!=typeof document?document:null,a=s&&s.userAgent||"",l=/Edge\/(\d+)/.exec(a),c=/MSIE \d/.exec(a),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(a),h=!!(c||u||l),d=c?document.documentMode:u?+u[1]:l?+l[1]:0,p=!h&&/gecko\/(\d+)/i.test(a),f=p&&+(/Firefox\/(\d+)/.exec(a)||[0,0])[1],g=!h&&/Chrome\/(\d+)/.exec(a),m=!!g,y=g?+g[1]:0,b=!h&&!!s&&/Apple Computer/.test(s.vendor),k=b&&(/Mobile\/\w+/.test(a)||!!s&&s.maxTouchPoints>2),v=k||!!s&&/Mac/.test(s.platform),w=/Android \d/.test(a),S=!!o&&"webkitFontSmoothing"in o.documentElement.style,x=S?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var E=Object.freeze({__proto__:null,android:w,chrome:m,chrome_version:y,gecko:p,gecko_version:f,ie:h,ie_version:d,ios:k,mac:v,safari:b,webkit:S,webkit_version:x});function A(e,t,n,r,i,s){if(e.composing)return!1;let o=e.state,a=o.doc.resolve(t);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+r;for(let a of i){let i=a.match.exec(l),c=i&&i[0]&&a.handler(o,i,t-(i[0].length-r.length),n);if(c)return!1!==a.undoable&&c.setMeta(s,{transform:c,from:t,to:n,text:r}),e.dispatch(c),!0}return!1}let C=new r.hs("MILKDOWN_CUSTOM_INPUTRULES");function T({rules:e}){let t=new r.k_({key:C,isInputRules:!0,state:{init:()=>null,apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(n,r,i,s)=>A(n,r,i,s,e,t),handleDOMEvents:{compositionend:n=>(setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&A(n,r.pos,r.pos,"",e,t)}),!1),keydown:(e,t)=>!!(w&&m&&"Enter"===t.key)&&!e.composing&&!!e.someProp("handleKeyDown",n=>n(e,t))&&(t.preventDefault(),!0)},handleKeyDown(n,r){if("Enter"!==r.key)return!1;let{$cursor:i}=n.state.selection;return!!i&&A(n,i.pos,i.pos,"\n",e,t)}}});return t}function I(e){return e.some(e=>e.type.spec.code)}function N(e,t,n){if(t>=n)return!1;let r=!1;return e.doc.nodesBetween(t,n,e=>(e.isInline&&I(e.marks)&&(r=!0),!r)),r}function O(e,t,n={}){return new i.fV(e,(e,r,i,s)=>{var o,a,l,c,u,h;let d,{tr:p}=e,f=r.length,g=r[f-1],m=r[0],y=[],b={group:g,fullMatch:m,start:i,end:s},k=null==(o=n.updateCaptured)?void 0:o.call(n,b);if(Object.assign(b,k),{group:g,fullMatch:m,start:i,end:s}=b,null===m||(null==g?void 0:g.trim())==="")return null;if(g){let o=m.search(/\S/),f=i+m.indexOf(g),b=f+g.length,k=N(e,i+o,f),v=b<s&&N(e,b,s);if(k||v||(u=s,I(null!=(h=e.storedMarks)?h:e.doc.resolve(u).marks())))return null;y=null!=(a=p.storedMarks)?a:[],b<s&&p.delete(b,s),f>i&&p.delete(i+o,f),d=i+o+g.length;let w=null==(l=n.getAttr)?void 0:l.call(n,r);p.addMark(i,d,t.create(w)),p.setStoredMarks(y),null==(c=n.beforeDispatch)||c.call(n,{match:r,start:i,end:s,tr:p})}return p})}function R(e){return(t,n)=>(function(e,t=!0){let n=[];return e.descendants((e,r)=>{if(n.push({node:e,pos:r}),!t)return!1}),n})(t,n).filter(t=>e(t.node))}function M(e){return t=>{for(let n=t.depth;n>0;n-=1){let r=t.node(n);if(e(r))return{from:t.before(n),to:t.after(n),node:r}}}}function L(e,t){if(!(e instanceof r.nh))return;let{node:n,$from:i}=e;if(Array.isArray(t)&&t.includes(n.type)||n.type===t)return{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}}Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;let D=(e,t)=>{let{selection:n,doc:i}=e;if(n instanceof r.nh)return{hasNode:n.node.type===t,pos:n.from,target:n.node};let{from:s,to:o}=n,a=!1,l=-1,c=null;return i.nodesBetween(s,o,(e,n)=>!c&&(e.type!==t||(a=!0,l=n,c=e,!1))),{hasNode:a,pos:l,target:c}}},7451:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9482);function i(e){e.register(r.A),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){("markdown"===e.language||"md"===e.language)&&function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var i=t[n];if("code"!==i.type){e(i.content);continue}var s=i.content[1],o=i.content[3];if(s&&o&&"code-language"===s.type&&"code-block"===o.type&&"string"==typeof s.content){var a=s.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase());o.alias?"string"==typeof o.alias?o.alias=[o.alias,l]:o.alias.push(l):o.alias=[l]}}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,i=t.classes.length;r<i;r++){var s=t.classes[r],o=/language-(.+)/.exec(s);if(o){n=o[1];break}}var a=e.languages[n];if(a)t.content=e.highlight(t.content.value,a,n);else if(n&&"none"!==n&&e.plugins.autoloader){var l="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}}),RegExp(e.languages.markup.tag.pattern.source,"gi"),e.languages.md=e.languages.markdown}(e)}i.displayName="markdown",i.aliases=["md"]},7816:(e,t,n)=>{"use strict";n.d(t,{D$:()=>A,FA:()=>T,Fo:()=>u,Gu:()=>k,IO:()=>S,LH:()=>b,QJ:()=>d,Qj:()=>y,Sj:()=>f,Sw:()=>I,cq:()=>x,xv:()=>c,zd:()=>p});var r=n(4299),i=n(3720),s=n(84),o=n(780),a=n(1170);class l{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}let c=()=>new l,u=e=>{let t=new Uint8Array((e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t})(e)),n=0;for(let r=0;r<e.bufs.length;r++){let i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},h=(e,t)=>{let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},d=h,p=(e,t)=>{for(;t>s.WD;)h(e,s.wt|s.WD&t),t=r.RI(t/128);h(e,s.WD&t)},f=(e,t)=>{let n=r.sj(t);for(n&&(t=-t),h(e,(t>s.P1?s.wt:0)|(n?s.D7:0)|s.P1&t),t=r.RI(t/64);t>0;)h(e,(t>s.WD?s.wt:0)|s.WD&t),t=r.RI(t/128)},g=new Uint8Array(3e4),m=g.length/3,y=o.db&&o.db.encodeInto?(e,t)=>{if(t.length<m){let n=o.db.encodeInto(t,g).written||0;p(e,n);for(let t=0;t<n;t++)h(e,g[t])}else k(e,o.Af(t))}:(e,t)=>{let n=unescape(encodeURIComponent(t)),r=n.length;p(e,r);for(let t=0;t<r;t++)h(e,n.codePointAt(t))},b=(e,t)=>{let n=e.cbuf.length,i=e.cpos,s=r.jk(n-i,t.length),o=t.length-s;e.cbuf.set(t.subarray(0,s),i),e.cpos+=s,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(r.T9(2*n,o)),e.cbuf.set(t.subarray(s)),e.cpos=o)},k=(e,t)=>{p(e,t.byteLength),b(e,t)},v=(e,t)=>{((e,t)=>{let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*r.T9(n,t)),e.cpos=0)})(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},w=new DataView(new ArrayBuffer(4)),S=(e,t)=>{switch(typeof t){case"string":h(e,119),y(e,t);break;case"number":if(i.Fq(t)&&r.tn(t)<=s.vZ)h(e,125),f(e,t);else if((e=>(w.setFloat32(0,e),w.getFloat32(0)===e))(t))h(e,124),v(e,4).setFloat32(0,t,!1);else h(e,123),v(e,8).setFloat64(0,t,!1);break;case"bigint":h(e,122),v(e,8).setBigInt64(0,t,!1);break;case"object":if(null===t)h(e,126);else if(a.cy(t)){h(e,117),p(e,t.length);for(let n=0;n<t.length;n++)S(e,t[n])}else if(t instanceof Uint8Array)h(e,116),k(e,t);else{h(e,118);let n=Object.keys(t);p(e,n.length);for(let r=0;r<n.length;r++){let i=n[r];y(e,i),S(e,t[i])}}break;case"boolean":h(e,t?120:121);break;default:h(e,127)}};class x extends l{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&p(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}let E=e=>{e.count>0&&(f(e.encoder,1===e.count?e.s:-e.s),e.count>1&&p(e.encoder,e.count-2))};class A{constructor(){this.encoder=new l,this.s=0,this.count=0}write(e){this.s===e?this.count++:(E(this),this.count=1,this.s=e)}toUint8Array(){return E(this),u(this.encoder)}}let C=e=>{if(e.count>0){let t=2*e.diff+ +(1!==e.count);f(e.encoder,t),e.count>1&&p(e.encoder,e.count-2)}};class T{constructor(){this.encoder=new l,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(C(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return C(this),u(this.encoder)}}class I{constructor(){this.sarr=[],this.s="",this.lensE=new A}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){let e=new l;return this.sarr.push(this.s),this.s="",y(e,this.sarr.join("")),b(e,this.lensE.toUint8Array()),u(e)}}},7838:(e,t)=>{t.read=function(e,t,n,r,i){var s,o,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+e[t+h],h+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),s-=c}return(p?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var o,a,l,c=8*s-i-1,u=(1<<c)-1,h=u>>1,d=5960464477539062e-23*(23===i),p=r?0:s-1,f=r?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(a=0,o=u):o+h>=1?(a=(t*l-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[n+p]=255&o,p+=f,o/=256,c-=8);e[n+p-f]|=128*g}},8078:(e,t,n)=>{"use strict";n.d(t,{yu:()=>u,Qx:()=>f,b_:()=>h,JY:()=>y,hk:()=>function e(t,n){let i=f(n,t),s=function(e,t){let n=i=>async()=>{let s=t(i);return i.update(r.u7,t=>c(t,e,[e,s])),n.id=e,n.schema=s,()=>{i.update(r.u7,t=>t.filter(([t])=>t!==e))}};return n.type=t=>{let n=t.get(r.pZ).marks[e];if(!n)throw(0,o.sm)(e);return n},n}(t,e=>e.get(i.key)(e)),a=[i,s];return a.id=s.id,a.mark=s,a.type=e=>s.type(e),a.ctx=i,a.key=i.key,a.extendSchema=r=>e(t,r(n)),a},dz:()=>d,YR:()=>m,Yh:()=>function e(t,n){let r=f(n,t),i=d(t,e=>e.get(r.key)(e)),s=[r,i];return s.id=i.id,s.node=i,s.type=e=>i.type(e),s.ctx=r,s.key=r.key,s.extendSchema=r=>e(t,r(n)),s},Gf:()=>p,lz:()=>b,pq:()=>g,up:()=>k,yh:()=>v});var r=n(289),i=n(436);let s=e=>crypto.getRandomValues(new Uint8Array(e));var o=n(8704),a=n(3813),l=n(9418);function c(e,t,n){let r=e.findIndex(([e])=>e===t);if(-1===r)return[...e,n];let i=e.slice();return i[r]=n,i}function u(e,t){let n=(0,r.qf)(e),i=s=>async()=>{i.key=n,await s.wait(r.A2);let o=t(s);return s.get(r.MD).create(n,o),i.run=t=>s.get(r.MD).call(e,t),()=>{s.get(r.MD).remove(n)}};return i}function h(e){let t=n=>async()=>{await n.wait(r.x8);let i=e(n);return n.update(r.f4,e=>[...e,i]),t.inputRule=i,()=>{n.update(r.f4,e=>e.filter(e=>e!==i))}};return t}function d(e,t){let n=i=>async()=>{let s=t(i);return i.update(r.P_,t=>c(t,e,[e,s])),n.id=e,n.schema=s,()=>{i.update(r.P_,t=>t.filter(([t])=>t!==e))}};return n.type=t=>{let n=t.get(r.pZ).nodes[e];if(!n)throw(0,o.pj)(e);return n},n}function p(e){let t,n=n=>async()=>(await n.wait(r.x8),t=e(n),n.update(r.TP,e=>[...e,t]),()=>{n.update(r.TP,e=>e.filter(e=>e!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function f(e,t){let n=(0,i.Z0)(e,t),r=e=>(e.inject(n),()=>()=>{e.remove(n)});return r.key=n,r}function g(e,t){let n=f(Object.fromEntries(Object.entries(t).map(([e,{shortcuts:t,priority:n}])=>[e,{shortcuts:t,priority:n}])),`${e}Keymap`),i=function(e){let t=n=>async()=>{await n.wait(r.lq);let i=n.get(r.nu),s=e(n),o=i.addObjectKeymap(s);return t.keymap=s,()=>{o()}};return t}(e=>{let r=e.get(n.key);return Object.fromEntries(Object.entries(t).flatMap(([e,{command:t}])=>{let n=r[e],i=[n.shortcuts].flat(),s=n.priority;return i.map(e=>[e,{key:e,onRun:t,priority:s}])}))}),s=[n,i];return s.ctx=n,s.shortcuts=i,s.key=n.key,s.keymap=i.keymap,s}((e,t=21)=>((e,t,n)=>{let r=256-256%e.length;if(256===r){let r=e.length-1;return (i=t)=>{if(!i)return"";let s="";for(;;){let t=n(i),o=i;for(;o--;)if((s+=e[t[o]&r]).length>=i)return s}}}let i=Math.ceil(409.6*t/r);return (s=t)=>{if(!s)return"";let o="";for(;;){let t=n(i),a=i;for(;a--;)if(t[a]<r&&(o+=e[t[a]%e.length]).length>=s)return o}}})(e,0|t,s))("abcedfghicklmn",10);var m=(e,t=()=>({}))=>f(t,`${e}Attr`),y=(e,t=()=>({}))=>f(t,`${e}Attr`);function b(e,t,n){let i=f(n??{},e),s=e=>async()=>{await e.wait(r.ge);let n={plugin:t(e),options:e.get(i.key)};return e.update(r.eM,e=>[...e,n]),()=>{e.update(r.eM,e=>e.filter(e=>e!==n))}},o=[i,s];return o.id=e,o.plugin=s,o.options=i,o}function k(e){return t=>{let n=t.get(r.kY),i=t.get(r.pZ),s=t.get(r.M);if(!e)return s(n.state.doc);let o=n.state.doc.slice(e.from,e.to,!0),a=i.topNodeType.createAndFill(null,o.content);return a?s(a):(console.error("No document found"),"")}}function v(e,t=!1){return n=>{let i=n.get(r.kY),s=n.get(r.bQ)(e);if(!s)return;if(!t){let{state:e}=i;return i.dispatch(e.tr.replace(0,e.doc.content.size,new a.Ji(s.content,0,0)))}let o=n.get(r.pZ),c=n.get(r.Sr)({schema:o,doc:s,plugins:n.get(r.TP)}),u=l.$t.create(c);i.updateState(u)}}},8119:(e,t,n)=>{"use strict";n.d(t,{HR:()=>i}),n(780);var r=n(5214);n(449).hp;r.Bd,r.Bd;let i=e=>{let t=new Uint8Array(e.byteLength);return t.set(e),t}},8136:(e,t,n)=>{"use strict";n.d(t,{F_:()=>u,Ob:()=>l});var r=n(289),i=n(436),s=n(9418),o=n(6857),a=class{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.selectionUpdatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=e=>(this.beforeMountedListeners.push(e),this),this.mounted=e=>(this.mountedListeners.push(e),this),this.updated=e=>(this.updatedListeners.push(e),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners,selectionUpdated:this.selectionUpdatedListeners}}markdownUpdated(e){return this.markdownUpdatedListeners.push(e),this}blur(e){return this.blurListeners.push(e),this}focus(e){return this.focusListeners.push(e),this}destroy(e){return this.destroyListeners.push(e),this}selectionUpdated(e){return this.selectionUpdatedListeners.push(e),this}},l=(0,i.Z0)(new a,"listener"),c=new s.hs("MILKDOWN_LISTENER"),u=e=>(e.inject(l,new a),async()=>{await e.wait(r.ge);let{listeners:t}=e.get(l);t.beforeMount.forEach(t=>t(e)),await e.wait(r.g3);let n=e.get(r.M),i=null,a=null,u=null,h=null,d=(0,o.A)(()=>{if(!h)return;let{doc:r}=h;if(t.updated.length>0&&i&&!i.eq(r)&&t.updated.forEach(t=>{t(e,r,i)}),t.markdownUpdated.length>0&&i&&!i.eq(r)){let i=n(r);t.markdownUpdated.forEach(t=>{t(e,i,a)}),a=i}i=r,h=null},200),p=new s.k_({key:c,view:()=>({destroy:()=>{d.cancel(),t.destroy.forEach(t=>t(e))}}),props:{handleDOMEvents:{focus:()=>(t.focus.forEach(t=>t(e)),!1),blur:()=>(t.blur.forEach(t=>t(e)),!1)}},state:{init:(e,t)=>{i=t.doc,a=n(t.doc)},apply:n=>{let r=n.selection;(!u&&r||u&&!r.eq(u))&&(t.selectionUpdated.forEach(t=>{t(e,r,u)}),u=r),(n.docChanged||n.storedMarksSet)&&!1!==n.getMeta("addToHistory")&&(h=n,d())}}});e.update(r.TP,e=>e.concat(p)),await e.wait(r.CU),t.mounted.forEach(t=>t(e))});u.meta={package:"@milkdown/plugin-listener",displayName:"Listener"}},8353:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6665);function i(e){var t;e.register(r.A),e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"],t=e.languages.extend("typescript",{}),delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}i.displayName="typescript",i.aliases=["ts"]},8704:(e,t,n)=>{"use strict";n.d(t,{$D:()=>h,Ik:()=>g,TR:()=>d,XM:()=>l,Xm:()=>p,_K:()=>f,dI:()=>u,j7:()=>a,nr:()=>c,pj:()=>y,sm:()=>b,zD:()=>m});var r=function(e){return e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e.aiProviderError="aiProviderError",e.aiBuildContextError="aiBuildContextError",e}({}),i=class extends Error{constructor(e,t,n){super(t,n),this.name="MilkdownError",this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},s=(e,t)=>"function"==typeof t?"[Function]":t,o=e=>JSON.stringify(e,s);function a(e){return new i(r.docTypeError,`Doc type error, unsupported type: ${o(e)}`)}function l(e){return new i(r.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function c(e){return new i(r.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function u(){return new i(r.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function h(e,t,n){let s=`Cannot create node for ${"name"in e?e.name:e}`,o=e=>{if(null==e)return"null";if(Array.isArray(e))return`[${e.map(o).join(", ")}]`;if("object"==typeof e)return"toJSON"in e&&"function"==typeof e.toJSON?JSON.stringify(e.toJSON()):"spec"in e?JSON.stringify(e.spec):JSON.stringify(e);if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("function"==typeof e)return`[Function: ${e.name||"anonymous"}]`;try{return String(e)}catch{return"[Unserializable]"}},a=[["[Description]",s],["[Attributes]",t],["[Content]",(n??[]).map(e=>e?"object"==typeof e&&"type"in e?`${e}`:o(e):"null")]].reduce((e,[t,n])=>{let r=`${t}: ${o(n)}.`;return e.concat(r)},[]);return new i(r.createNodeInParserFail,a.join("\n"))}function d(){return new i(r.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function p(e){return new i(r.parserMatchError,`Cannot match target parser for node: ${o(e)}.`)}function f(e){return new i(r.serializerMatchError,`Cannot match target serializer for node: ${o(e)}.`)}function g(e){return new i(r.expectDomTypeError,`Expect to be a dom, but get: ${o(e)}.`)}function m(){return new i(r.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function y(e){return new i(r.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function b(e){return new i(r.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}},8764:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,c:()=>a});var r=n(4189),i=n(6343),s=n(1170);class o{constructor(){this._observers=r.vt()}on(e,t){return r._4(this._observers,e,i.vt).add(t),t}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return s.HT((this._observers.get(e)||r.vt()).values()).forEach(e=>e(...t))}destroy(){this._observers=r.vt()}}class a{constructor(){this._observers=r.vt()}on(e,t){r._4(this._observers,e,i.vt).add(t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){let n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return s.HT((this._observers.get(e)||r.vt()).values()).forEach(e=>e(...t))}destroy(){this._observers=r.vt()}}},8903:(e,t,n)=>{"use strict";n.d(t,{$5:()=>i,n:()=>s});let r=e=>({[Symbol.iterator](){return this},next:e}),i=(e,t)=>r(()=>{let n;do n=e.next();while(!n.done&&!t(n.value));return n}),s=(e,t)=>r(()=>{let{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}})},9021:(e,t,n)=>{"use strict";n.d(t,{EK:()=>c,OK:()=>o,id:()=>a,vo:()=>l});var r=n(1170),i=n(4866),s=n(6596);let o=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&o(e,t,n+1)}},a=e=>e,l=(e,t)=>{if(e===t)return!0;if(null==e||null==t||e.constructor!==t.constructor&&(e.constructor||Object)!==(t.constructor||Object))return!1;if(null!=e[s.B])return e[s.B](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(let n of e.keys())if(!t.has(n)||!l(e.get(n),t.get(n)))return!1;break;case void 0:case Object:if(i.Ej(e)!==i.Ej(t))return!1;for(let n in e)if(!i.i5(e,n)||!l(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1;break;default:return!1}return!0},c=(e,t)=>t.includes(e);r.cy},9212:(e,t,n)=>{"use strict";n.d(t,{$C:()=>h,Ib:()=>E,Jg:()=>v,VQ:()=>S,bo:()=>p,cQ:()=>w,cw:()=>g,ov:()=>d,pT:()=>m,t3:()=>y,xK:()=>x,xh:()=>f});var r=n(84),i=n(4299),s=n(3720),o=n(780),a=n(1373);let l=a.vt("Unexpected end of array"),c=a.vt("Integer out of Range");class u{constructor(e){this.arr=e,this.pos=0}}let h=e=>new u(e),d=e=>e.pos!==e.arr.length,p=e=>((e,t)=>{let n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n})(e,g(e)),f=e=>e.arr[e.pos++],g=e=>{let t=0,n=1,i=e.arr.length;for(;e.pos<i;){let i=e.arr[e.pos++];if(t+=(i&r.WD)*n,n*=128,i<r.wt)return t;if(t>s.Is)throw c}throw l},m=e=>{let t=e.arr[e.pos++],n=t&r.P1,i=64,o=(t&r.D7)>0?-1:1;if((t&r.wt)==0)return o*n;let a=e.arr.length;for(;e.pos<a;){if(n+=((t=e.arr[e.pos++])&r.WD)*i,i*=128,t<r.wt)return o*n;if(n>s.Is)throw c}throw l},y=o.tv?e=>o.tv.decode(p(e)):e=>{let t=g(e);if(0===t)return"";{let n=String.fromCodePoint(f(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(f(e));else for(;t>0;){let r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},b=(e,t)=>{let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},k=[e=>void 0,e=>null,m,e=>b(e,4).getFloat32(0,!1),e=>b(e,8).getFloat64(0,!1),e=>b(e,8).getBigInt64(0,!1),e=>!1,e=>!0,y,e=>{let t=g(e),n={};for(let r=0;r<t;r++)n[y(e)]=v(e);return n},e=>{let t=g(e),n=[];for(let r=0;r<t;r++)n.push(v(e));return n},p],v=e=>k[127-f(e)](e);class w extends u{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),d(this)?this.count=g(this)+1:this.count=-1),this.count--,this.s}}class S extends u{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=m(this);let e=i.sj(this.s);this.count=1,e&&(this.s=-this.s,this.count=g(this)+2)}return this.count--,this.s}}class x extends u{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){let e=m(this);this.diff=i.RI(e/2),this.count=1,1&e&&(this.count=g(this)+2)}return this.s+=this.diff,this.count--,this.s}}class E{constructor(e){this.decoder=new S(e),this.str=y(this.decoder),this.spos=0}read(){let e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}},9418:(e,t,n)=>{"use strict";n.d(t,{$t:()=>x,LN:()=>o,U3:()=>u,hs:()=>T,i5:()=>f,k_:()=>E,nh:()=>d,yn:()=>a});var r=n(3813),i=n(5926);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:c}=o[a],u=e.mapping.slice(s);e.replaceRange(u.map(l.pos),u.map(c.pos),a?r.Ji.empty:t),0==a&&y(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=e.mapping.slice(n),l=a.map(s.pos),c=a.map(o.pos);i?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new u(e):m(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?m(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):m(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return m(e,e,0,0,1)||new f(e)}static atEnd(e){return m(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends o{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new u(e,t)}}o.jsonID("text",u);class h{constructor(e,t){this.anchor=e,this.head=t}map(e){return new h(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class d extends o{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new d(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,o.jsonID("node",d);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new h(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return g}}o.jsonID("all",f);let g={map(){return this},resolve:e=>new f(e)};function m(e,t,n,r,i,s=!1){if(t.inlineContent)return u.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=m(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let a=e.steps[s];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}class b extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function k(e,t){return t&&e?e.bind(t):e}class v{constructor(e,t,n){this.name=e,this.init=k(t.init,n),this.apply=k(t.apply,n)}}let w=[new v("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new v("selection",{init:(e,t)=>e.selection||o.atStart(t.doc),apply:e=>e.selection}),new v("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new v("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class S{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=w.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new v(e.key,e.spec.state,e))})}}class x{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let a=r?r[s].n:0,l=r?r[s].state:this,c=a<t.length&&o.spec.appendTransaction.call(o,a?t.slice(a):t,l,n);if(c&&n.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new x(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new b(this)}static create(e){let t=new S(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new x(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new S(this.schema,e.plugins),n=t.fields,r=new x(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new S(e.schema,e.plugins),s=new x(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],a=o.spec.state;if(o.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=a.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}class E{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=e(s,n,{})),r[i]=s}return r}(e.props,this,this.props),this.key=e.key?e.key.key:C("plugin")}getState(e){return e[this.key]}}let A=Object.create(null);function C(e){return e in A?e+"$"+ ++A[e]:(A[e]=0,e+"$")}class T{constructor(e="key"){this.key=C(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},9482:(e,t,n)=>{"use strict";function r(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.value.replace(/&amp;/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:e.languages[n]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",s)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}n.d(t,{A:()=>r}),r.displayName="markup",r.aliases=["atom","html","mathml","rss","ssml","svg","xml"]}}]);