import{m as n,f as t}from"./micromark-util-character-DUwsRT9L.js";function e(e,r,i,u,o,c){const s=this;let m,f=0;return function(n){return e.enter(u),e.enter(o),e.consume(n),e.exit(o),e.enter(c),l};function l(t){return f>999||null===t||91===t||93===t&&!m||94===t&&!f&&"_hiddenFootnoteSupport"in s.parser.constructs?i(t):93===t?(e.exit(c),e.enter(o),e.consume(t),e.exit(o),e.exit(u),r):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),a(t))}function a(r){return null===r||91===r||93===r||n(r)||f++>999?(e.exit("chunkString"),l(r)):(e.consume(r),m||(m=!t(r)),92===r?x:a)}function x(n){return 91===n||92===n||93===n?(e.consume(n),f++,a):a(n)}}export{e as f};
