(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,409901,e=>{"use strict";function t(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let r=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),n=String.raw;function a(e,t){if(null==e)throw Error(t??"Value expected");return e}let i=n`\[\^?`,o=`c.? | C(?:-.?)?|${n`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${n`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${n`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${n`o\{[^\}]*\}?`}|${n`\d{1,3}`}`,s=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,l=RegExp(n`
  \\ (?:
    ${o}
    | [gk]<[^>]*>?
    | [gk]'[^']*'?
    | .
  )
  | \( (?:
    \? (?:
      [:=!>({]
      | <[=!]
      | <[^>]*>
      | '[^']*'
      | ~\|?
      | #(?:[^)\\]|\\.?)*
      | [^:)]*[:)]
    )?
    | \*[^\)]*\)?
  )?
  | (?:${s.source})+
  | ${i}
  | .
`.replace(/\s+/g,""),"gsu"),u=RegExp(n`
  \\ (?:
    ${o}
    | .
  )
  | \[:(?:\^?\p{Alpha}+|\^):\]
  | ${i}
  | &&
  | .
`.replace(/\s+/g,""),"gsu");function p(e,{inCharClass:r}){let a=e[1];if("c"===a||"C"===a){var i,o=e;let r="c"===o[1]?o[2]:o[3];if(!r||!/[A-Za-z]/.test(r))throw Error(`Unsupported control character "${o}"`);return f(t(r.toUpperCase())-64,o)}if("dDhHsSwW".includes(a)){let t;return h({d:"digit",h:"hex",s:"space",w:"word"}[t=(i=e)[1].toLowerCase()],i,{negate:i[1]!==t})}if(e.startsWith(n`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return h("property",e,{value:n,negate:"P"===t&&!r||"p"===t&&!!r})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let r=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),a=new TextEncoder;return[...n].map(e=>{let r=[...a.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return f(t(e),r)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===a||"x"===a)return f(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(C.has(a))return f(C.get(a),e);if(/\d/.test(a))return{type:"EscapedNumber",inCharClass:r,raw:e};if("\\"===e)throw Error(n`Incomplete escape "\"`);if("M"===a)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return f(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function c(e,t){return{type:"Assertion",kind:e,raw:t}}function d(e){return{type:"Backreference",raw:e}}function f(e,t){return{type:"Character",value:e,raw:t}}function g(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function h(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function y(e,t,r={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:a(r.flags),raw:t}}function m(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}let b=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),C=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function w(e){let t=null,r,n;if("{"===e[0]){let{minStr:a,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+a>1e5||i&&+i>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((r=+a)>(n=void 0===i?+a:""===i?1/0:+i)&&(t="possessive",[r,n]=[n,r]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=+("+"===e[0]),n="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:r,max:n,raw:e}}function x(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function k(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let r=e.body[0];return!t||Object.keys(t).every(e=>t[e]===r[e])}let E=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function $(e,i={}){var o;let C={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...i,rules:{captureGroup:!1,singleline:!1,...i.rules}},k=function(e,a={}){let i={flags:"",...a,rules:{captureGroup:!1,singleline:!1,...a.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let o=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){let n=e[r];if(!"imxDPSWy".includes(n))throw Error(`Invalid flag "${n}"`);if("y"===n){if(!/^y{[gw]}/.test(e.slice(r)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[r+2]?"grapheme":"word",r+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[n]]=!0}return t}(i.flags),C=[o.extended],k={captureGroup:i.rules.captureGroup,getCurrentModX:()=>C.at(-1),numOpenGroups:0,popModX(){C.pop()},pushModX(e){C.push(e)},replaceCurrentModX(e){C[C.length-1]=e},singleline:i.rules.singleline},E=[],$;for(l.lastIndex=0;$=l.exec(e);){let a=function(e,a,i,o){let[l,C]=i;if("["===i||"[^"===i){let e=function(e,n,a){let i=[g("^"===n[1],n)],o=1,s;for(u.lastIndex=a;s=u.exec(e);){let e=s[0];if("["===e[0]&&":"!==e[1])o++,i.push(g("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===i.at(-1).type)i.push(f(93,e));else if(o--,i.push({type:"CharacterClassClose",raw:e}),!o)break}else{let n=function(e){if("\\"===e[0])return p(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!r.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return h("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:f(t(e),e)}(e);Array.isArray(n)?i.push(...n):i.push(n)}}return{tokens:i,lastIndex:u.lastIndex||e.length}}(a,i,o);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===l){if("AbBGyYzZ".includes(C))return{token:c(i,i)};if(/^\\g[<']/.test(i)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(i))throw Error(`Invalid group name "${i}"`);return{token:{type:"Subroutine",raw:i}}}if(/^\\k[<']/.test(i)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(i))throw Error(`Invalid group name "${i}"`);return{token:d(i)}}if("K"===C)return{token:y("keep",i)};if("N"===C||"R"===C)return{token:h("newline",i,{negate:"N"===C})};if("O"===C)return{token:h("any",i)};if("X"===C)return{token:h("text_segment",i)};let e=p(i,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===l){if("*"===C)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:r,tag:n,args:a}=t.groups;if(!r)throw Error(`Invalid named callout "${e}"`);if(""===n)throw Error(`Named callout tag with empty value not allowed "${e}"`);let i=a?a.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,l]=i,u=b.has(r)?r.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(i.length>0)throw Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw Error(`Named callout allows only one argument "${i}"`);if("string"==typeof o)throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!i.length||i.length>2)throw Error(`Named callout must have one or two arguments "${i}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(2===i.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(i.length>1)throw Error(`Named callout allows only one argument "${i}"`);if(1===i.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(3!==i.length)throw Error(`Named callout must have three arguments "${i}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${r}"`);default:throw Error(`Unexpected named callout kind "${u}"`)}return{type:"NamedCallout",kind:u,tag:n??null,arguments:a?.split(",")??null,raw:e}}(i)};if("(?{"===i)throw Error(`Unsupported callout "${i}"`);if(i.startsWith("(?#")){if(")"!==a[o])throw Error('Unclosed comment group "(?#"');return{lastIndex:o+1}}if(/^\(\?[-imx]+[:)]$/.test(i))return{token:function(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";let a=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),i=x(r),o=x(n),s={};if(i&&(s.enable=i),o&&(s.disable=o),e.endsWith(")"))return t.replaceCurrentModX(a),y("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,m("group",e,{...(i||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(i,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===i&&!e.captureGroup||"(?:"===i)return{token:m("group",i)};if("(?>"===i)return{token:m("atomic",i)};if("(?="===i||"(?!"===i||"(?<="===i||"(?<!"===i)return{token:m("<"===i[2]?"lookbehind":"lookahead",i,{negate:i.endsWith("!")})};if("("===i&&e.captureGroup||i.startsWith("(?<")&&i.endsWith(">")||i.startsWith("(?'")&&i.endsWith("'"))return{token:m("capturing",i,{..."("!==i&&{name:i.slice(3,-1)}})};if(i.startsWith("(?~")){if("(?~|"===i)throw Error(`Unsupported absence function kind "${i}"`);return{token:m("absence_repeater",i)}}throw"(?("===i?Error(`Unsupported conditional "${i}"`):Error(`Invalid or unsupported group option "${i}"`)}if(")"===i){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:i}}}if(e.getCurrentModX()){if("#"===i){let e=a.indexOf(`
`,o);return{lastIndex:-1===e?a.length:e}}if(/^\s$/.test(i)){let e=/\s+/y;return e.lastIndex=o,{lastIndex:e.exec(a)?e.lastIndex:o}}}return"."===i?{token:h("dot",i)}:"^"===i||"$"===i?{token:c(e.singleline?({"^":n`\A`,$:n`\Z`})[i]:i,i)}:"|"===i?{token:{type:"Alternator",raw:i}}:s.test(i)?{tokens:function(e){let t,r=[],n=RegExp(s,"gy");for(;t=n.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:a,max:i}=t.groups;if(+a>+i&&e.endsWith("?")){n.lastIndex--,r.push(w(e.slice(0,-1)));continue}}}r.push(w(e))}return r}(i)}:{token:f(t(i),i)}}(k,e,$[0],l.lastIndex);a.tokens?E.push(...a.tokens):a.token&&E.push(a.token),void 0!==a.lastIndex&&(l.lastIndex=a.lastIndex)}let v=[],A=0;E.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++A:"("===e.raw&&v.push(e)}),A||v.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let S=A||v.length;return{tokens:E.map(e=>"EscapedNumber"===e.type?function(e,r){let{raw:a,inCharClass:i}=e,o=a.slice(1);if(!i&&("0"!==o&&1===o.length||"0"!==o[0]&&+o<=r))return[d(a)];let s=[],l=o.match(/^[0-7]+|\d/g);for(let e=0;e<l.length;e++){let r,i=l[e];if(0===e&&"8"!==i&&"9"!==i){if((r=parseInt(i,8))>127)throw Error(n`Octal encoded byte above 177 unsupported "${a}"`)}else r=t(i);s.push(f(r,(0===e?"\\":"")+i))}return s}(e,S):e).flat(),flags:o}}(e,{flags:C.flags,rules:{captureGroup:C.rules.captureGroup,singleline:C.rules.singleline}}),D=(e,i)=>{let o=k.tokens[j.nextIndex];switch(j.parent=e,j.nextIndex++,o.type){case"Alternator":return v();case"Assertion":return function({kind:e}){return A(a({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===n`\B`||e===n`\Y`})}(o);case"Backreference":return function({raw:e},t){let r=/^\\k[<']/.test(e),n=r?e.slice(3,-1):e.slice(1),a=(r,n=!1)=>{let a=t.capturingGroups.length,i=!1;if(r>a)if(t.skipBackrefValidation)i=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,S(n?a+1-r:r,{orphan:i})};if(r){let r=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(r)return a(+r.groups.num,!!r.groups.sign);if(/[-+]/.test(n))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(n))throw Error(`Group name not defined to the left "${e}"`);return S(n)}return a(+n)}(o,j);case"Character":return _(o.value,{useLastValid:!!i.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,r,n){let{tokens:a,walk:i}=r,o=r.parent,s=o.body.at(-1),l=a[r.nextIndex];if(!n.isCheckingRangeEnd&&s&&"CharacterClass"!==s.type&&"CharacterClassRange"!==s.type&&l&&"CharacterClassOpen"!==l.type&&"CharacterClassClose"!==l.type&&"CharacterClassIntersector"!==l.type){let e=i(o,{...n,isCheckingRangeEnd:!0});if("Character"===s.type&&"Character"===e.type)return o.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(s,e);throw Error("Invalid character class range")}return _(t("-"))}(0,j,i);case"CharacterClassOpen":return function({negate:e},t,r){let{tokens:n,walk:a}=t,i=n[t.nextIndex],o=[M()],s=W(i);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)o.push(M()),t.nextIndex++;else{let e=o.at(-1);e.body.push(a(e,r))}s=W(n[t.nextIndex],i)}let l=M({negate:e});return 1===o.length?l.body=o[0].body:(l.kind="intersection",l.body=o.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(o,j,i);case"CharacterSet":return function({kind:e,negate:t,value:n},a){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s}=a;if("property"===e){let a=T(n);if(!r.has(a)||s?.has(a))return R(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:s});e="posix",n=a}return"posix"===e?function(e,t){let n=!!t?.negate;if(!r.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):N(e,{negate:t})}(o,j);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:a(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(o.kind,{flags:o.flags});case"GroupOpen":return function(e,t,r){var n,a;let{tokens:i,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:u}=t,p=function({flags:e,kind:t,name:r,negate:n,number:a}){switch(t){case"absence_repeater":var i="repeater";!1;return{type:"AbsenceFunction",kind:i,body:O(void 0)};case"atomic":return L({atomic:!0});case"capturing":return I(a,{name:r});case"group":return L({flags:e});case"lookahead":case"lookbehind":return F({behind:"lookbehind"===t,negate:n});default:throw Error(`Unexpected group kind "${t}"`)}}(e),c="AbsenceFunction"===p.type,d=B(p),f=d&&p.negate;if("CapturingGroup"===p.type&&(o.push(p),p.name&&(n=p.name,a=[],s.has(n)||s.set(n,a),s.get(n)).push(p)),c&&r.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let g=z(i[t.nextIndex]);for(;"GroupClose"!==g.type;){if("Alternator"===g.type)p.body.push(v()),t.nextIndex++;else{let e=p.body.at(-1),t=u(e,{...r,isInAbsenceFunction:r.isInAbsenceFunction||c,isInLookbehind:r.isInLookbehind||d,isInNegLookbehind:r.isInNegLookbehind||f});if(e.body.push(t),(d||r.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(f||r.isInNegLookbehind){if(G(t)||"CapturingGroup"===t.type)throw Error(e)}else if(G(t)||B(t)&&t.negate)throw Error(e)}}g=z(i[t.nextIndex])}return t.nextIndex++,p}(o,j,i);case"NamedCallout":var s,l;return s=o.kind,l=o.tag,{type:"NamedCallout",kind:s,tag:l,arguments:o.arguments};case"Quantifier":return function({kind:e,min:t,max:r},n){let a=n.parent,i=a.body.at(-1);if(!i||!E.has(i.type))throw Error("Quantifier requires a repeatable token");let o=P(e,t,r,i);return a.body.pop(),o}(o,j);case"Subroutine":return function({raw:e},t){let{capturingGroups:r,subroutines:n}=t,a=e.slice(3,-1),i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(i){let e=+i.groups.num,n=r.length;if(t.hasNumberedRef=!0,(a=({"":e,"+":n+e,"-":n+1-e})[i.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===a&&(a=0);let o=U(a);return n.push(o),o}(o,j);default:throw Error(`Unexpected token type "${o.type}"`)}},j={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:C.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:C.skipBackrefValidation,skipLookbehindValidation:C.skipLookbehindValidation,skipPropertyNameValidation:C.skipPropertyNameValidation,subroutines:[],tokens:k.tokens,unicodePropertyMap:C.unicodePropertyMap,walk:D},V=(o={type:"Flags",...k.flags},{type:"Regex",body:O(void 0),flags:o}),H=V.body[0];for(;j.nextIndex<k.tokens.length;){let e=D(H,{});"Alternative"===e.type?(V.body.push(e),H=e):H.body.push(e)}let{capturingGroups:X,hasNumberedRef:Z,namedGroupsByName:q,subroutines:Q}=j;if(Z&&q.size&&!C.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of Q)if("number"==typeof e){if(e>X.length)throw Error("Subroutine uses a group number that's not defined");e&&(X[e-1].isSubroutined=!0)}else if(q.has(e)){if(q.get(e).length>1)throw Error(n`Subroutine uses a duplicate group name "\g<${e}>"`);q.get(e)[0].isSubroutined=!0}else throw Error(n`Subroutine uses a group name that's not defined "\g<${e}>"`);return V}function v(e){return{type:"Alternative",body:D(e?.body)}}function A(e,t){let r={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(r.negate=!!t?.negate),r}function S(e,t){let r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function I(e,t){var r;let n={name:void 0,isSubroutined:!1,...t};if(void 0!==n.name&&(r=n.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(r)))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:O(t?.body)}}function _(e,t){let r={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function M(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:D(e?.body)}}function N(e,t){let r=!!t?.negate,n={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(n.negate=r),"text_segment"!==e&&("newline"!==e||r)||(n.variableLength=!0),n}function L(e){let t=e?.atomic,r=e?.flags;if(t&&r)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:O(e?.body)}}function F(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:O(e?.body)}}function P(e,t,r,n){if(t>r)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:n}}function U(e){return{type:"Subroutine",ref:e}}function R(e,t){let r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},a=r.unicodePropertyMap?.get(T(e));if(!a){if(r.normalizeUnknownPropertyNames)a=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw Error(n`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:a??e,negate:r.negate}}function O(e){if(void 0===e)e=[v()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function D(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function G(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function B(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function T(e){return e.replace(/[- _]+/g,"").toLowerCase()}function W(e,t){return a(e,`${t?.type==="Character"&&93===t.value?"Empty":"Unclosed"} character class`)}function z(e){return a(e,"Unclosed group")}function j(e,t,r=null){function n(e,t){for(let r=0;r<e.length;r++){let n=i(e[r],t,r,e);r=Math.max(-1,r+n)}}function i(o,s=null,l=null,u=null){let p=0,c=!1,d={node:o,parent:s,key:l,container:u,root:e,remove(){V(u).splice(Math.max(0,H(l)+p),1),p--,c=!0},removeAllNextSiblings:()=>V(u).splice(H(l)+1),removeAllPrevSiblings(){let e=H(l)+p;return p-=e,V(u).splice(0,Math.max(0,e))},replaceWith(e,t={}){let r=!!t.traverse;u?u[Math.max(0,H(l)+p)]=e:a(s,"Can't replace root node")[l]=e,r&&i(e,s,l,u),c=!0},replaceWithMultiple(e,t={}){let r=!!t.traverse;if(V(u).splice(Math.max(0,H(l)+p),1,...e),p+=e.length-1,r){let t=0;for(let r=0;r<e.length;r++)t+=i(e[r],s,H(l)+r+t,u)}c=!0},skip(){c=!0}},{type:f}=o,g=t["*"],h=t[f],y="function"==typeof g?g:g?.enter,m="function"==typeof h?h:h?.enter;if(y?.(d,r),m?.(d,r),!c)switch(f){case"AbsenceFunction":case"CapturingGroup":case"Group":case"Alternative":case"CharacterClass":case"LookaroundAssertion":n(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":n(o.body,o),i(o.flags,o,"flags");break;default:throw Error(`Unexpected node type "${f}"`)}return h?.exit?.(d,r),g?.exit?.(d,r),p}return i(e),e}function V(e){if(!Array.isArray(e))throw Error("Container expected");return e}function H(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let X=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,Z=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function q(e,t,r,n){let a=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1],o=0,s="";for(let t of e.matchAll(a)){let{0:e,groups:{$skip:a}}=t;if(!a&&(!n||n===Z.DEFAULT==!o)){r instanceof Function?s+=r(t,{context:o?Z.CHAR_CLASS:Z.DEFAULT,negated:i[i.length-1]}):s+=r;continue}"["===e[0]?(o++,i.push("^"===e[1])):"]"===e&&o&&(o--,i.pop()),s+=e}return s}function Q(e,t,r){return!!function(e,t,r=0,n){let a;if(!RegExp(t,"su").test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let o=0;for(;a=i.exec(e);){let{0:e,groups:{$skip:t}}=a;if(!t&&(!n||n===Z.DEFAULT==!o))return a;"["===e?o++:"]"===e&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}(e,t,0,r)}let J=RegExp(String.raw`(?<noncapturingStart>${X})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),K=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Y=RegExp(String.raw`
\\(?: \d+
  | c[A-Za-z]
  | [gk]<[^>]+>
  | [pPu]\{[^\}]+\}
  | u[A-Fa-f\d]{4}
  | x[A-Fa-f\d]{2}
  )
| \((?: \? (?: [:=!>]
  | <(?:[=!]|[^>]+>)
  | [A-Za-z\-]+:
  | \(DEFINE\)
  ))?
| (?<qBase>${K})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
| \\?.
`.replace(/\s+/g,""),"gsu"),ee=String.raw,et=ee`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,er=ee`\(\?R=(?<rDepth>[^\)]+)\)|${et}`,en=ee`\(\?<(?![=!])(?<captureName>[^>]+)>`,ea=ee`${en}|(?<unnamed>\()(?!\?)`,ei=RegExp(ee`${en}|${er}|\(\?|\\?.`,"gsu"),eo="Cannot use multiple overlapping recursions";function es(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function el(e,t,r,n,a,i,o){let s=new Set;n&&q(e+t,en,({groups:{captureName:e}})=>{s.add(e)},Z.DEFAULT);let l=[r,n?s:null,a,i,o];return`${e}${eu(`(?:${e}`,"forward",...l)}(?:)${eu(`${t})`,"backward",...l)}${t}`}function eu(e,t,r,n,a,i,o){let s=e=>"forward"===t?e+2:r-e+2-1,l="";for(let t=0;t<r;t++){let r=s(t);l+=q(e,ee`${ea}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&n&&!n.has(l))return e;let u=`_$${r}`;if(s||t){let r=o+i.length+1;return i.push(r),function(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}(a,r),s?e:`(?<${t}${u}>`}return ee`\k<${l}${u}>`},Z.DEFAULT)}return l}function ep(e,t,r,n,a,i){if(e.size&&n){let o=0;q(t,ea,()=>o++,Z.DEFAULT);let s=i-o+a,l=new Map;return e.forEach((e,t)=>{let a=(n-o*r)/r,i=o*r,u=t>s+o?t+n:t,p=[];for(let t of e)if(t<=s)p.push(t);else if(t>s+o+a)p.push(t+n);else if(t<=s+o)for(let e=0;e<=r;e++)p.push(t+o*e);else for(let e=0;e<=r;e++)p.push(t+i+a*e);l.set(u,p)}),l}return e}var ec=String.fromCodePoint,ed=String.raw,ef={flagGroups:(()=>{try{RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{RegExp("[[]]","v")}catch{return!1}return!0})()};function eg(e,{enable:t,disable:r}){return{dotAll:!r?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!r?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function eh(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}ef.bugFlagVLiteralHyphenIsRange=!!ef.unicodeSets&&(()=>{try{RegExp(ed`[\d\-a]`,"v")}catch{return!0}return!1})(),ef.bugNestedClassIgnoresNegation=ef.unicodeSets&&RegExp("[[^a]]","v").test("a");var ey={ES2025:2025,ES2024:2024,ES2018:2018},em={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function eb(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");if(void 0!==e.target&&!em[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=ef.flagGroups?"ES2025":ef.unicodeSets?"ES2024":"ES2018"),t}var eC=new Set([ec(304),ec(305)]),ew=ed`[\p{L}\p{M}\p{N}\p{Pc}]`;function ex(e){if(eC.has(e))return[e];let t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),a=ev.get(r),i=eE.get(r),o=e$.get(r);return 1==[...n].length&&t.add(n),o&&t.add(o),a&&t.add(a),t.add(r),i&&t.add(i),[...t]}var ek=new Map(`C Other
Cc Control cntrl
Cf Format
Cn Unassigned
Co Private_Use
Cs Surrogate
L Letter
LC Cased_Letter
Ll Lowercase_Letter
Lm Modifier_Letter
Lo Other_Letter
Lt Titlecase_Letter
Lu Uppercase_Letter
M Mark Combining_Mark
Mc Spacing_Mark
Me Enclosing_Mark
Mn Nonspacing_Mark
N Number
Nd Decimal_Number digit
Nl Letter_Number
No Other_Number
P Punctuation punct
Pc Connector_Punctuation
Pd Dash_Punctuation
Pe Close_Punctuation
Pf Final_Punctuation
Pi Initial_Punctuation
Po Other_Punctuation
Ps Open_Punctuation
S Symbol
Sc Currency_Symbol
Sk Modifier_Symbol
Sm Math_Symbol
So Other_Symbol
Z Separator
Zl Line_Separator
Zp Paragraph_Separator
Zs Space_Separator
ASCII
ASCII_Hex_Digit AHex
Alphabetic Alpha
Any
Assigned
Bidi_Control Bidi_C
Bidi_Mirrored Bidi_M
Case_Ignorable CI
Cased
Changes_When_Casefolded CWCF
Changes_When_Casemapped CWCM
Changes_When_Lowercased CWL
Changes_When_NFKC_Casefolded CWKCF
Changes_When_Titlecased CWT
Changes_When_Uppercased CWU
Dash
Default_Ignorable_Code_Point DI
Deprecated Dep
Diacritic Dia
Emoji
Emoji_Component EComp
Emoji_Modifier EMod
Emoji_Modifier_Base EBase
Emoji_Presentation EPres
Extended_Pictographic ExtPict
Extender Ext
Grapheme_Base Gr_Base
Grapheme_Extend Gr_Ext
Hex_Digit Hex
IDS_Binary_Operator IDSB
IDS_Trinary_Operator IDST
ID_Continue IDC
ID_Start IDS
Ideographic Ideo
Join_Control Join_C
Logical_Order_Exception LOE
Lowercase Lower
Math
Noncharacter_Code_Point NChar
Pattern_Syntax Pat_Syn
Pattern_White_Space Pat_WS
Quotation_Mark QMark
Radical
Regional_Indicator RI
Sentence_Terminal STerm
Soft_Dotted SD
Terminal_Punctuation Term
Unified_Ideograph UIdeo
Uppercase Upper
Variation_Selector VS
White_Space space
XID_Continue XIDC
XID_Start XIDS`.split(/\s/).map(e=>[T(e),e])),eE=new Map([["s",ec(383)],[ec(383),"s"]]),e$=new Map([[ec(223),ec(7838)],[ec(107),ec(8490)],[ec(229),ec(8491)],[ec(969),ec(8486)]]),ev=new Map([eS(453),eS(456),eS(459),eS(498),...eI(8072,8079),...eI(8088,8095),...eI(8104,8111),eS(8124),eS(8140),eS(8188)]),eA=new Map([["alnum",ed`[\p{Alpha}\p{Nd}]`],["alpha",ed`\p{Alpha}`],["ascii",ed`\p{ASCII}`],["blank",ed`[\p{Zs}\t]`],["cntrl",ed`\p{Cc}`],["digit",ed`\p{Nd}`],["graph",ed`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ed`\p{Lower}`],["print",ed`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ed`[\p{P}\p{S}]`],["space",ed`\p{space}`],["upper",ed`\p{Upper}`],["word",ed`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ed`\p{AHex}`]]);function eS(e){let t=ec(e);return[t.toLowerCase(),t]}function eI(e,t){return(function(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r})(e,t).map(e=>eS(e))}var e_=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),eM={AbsenceFunction({node:e,parent:t,replaceWith:r}){let{body:n,kind:a}=e;if("repeater"===a){let e=L();e.body[0].body.push(F({negate:!0,body:n}),R("Any"));let a=L();a.body[0].body.push(P("greedy",0,1/0,e)),r(eW(a,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){let a=e.body.filter(e=>"flags"===e.kind);for(let e=r+1;e<t.body.length;e++)eh(n,t.body[e],[]).push(...a)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let r=eR(t.get(e));if(r){let t=L({flags:r});t.body[0].body=e.body,e.body=[eW(t,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:a,remove:i,replaceWith:o},s){let{kind:l,negate:u}=e,{asciiWordBoundaries:p,avoidSubclass:c,supportedGNodes:d,wordIsAscii:f}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if("line_end"===l)o(eW(F({body:[v({body:[A("string_end")]}),v({body:[_(10)]})]}),t));else if("line_start"===l)o(eW(eG(ed`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(d.has(e))a.flags.sticky=!0,i();else{var g;let e,a=n[r-1];if(a&&((e=["Character","CharacterClass","CharacterSet"]).includes((g=a).type)||"Quantifier"===g.type&&g.min&&e.includes(g.body.type)))o(eW(F({negate:!0}),t));else if(c)throw Error(ed`Uses "\G" in a way that requires a subclass`);else o(eT(A("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)o(eW(eG(ed`(?=\n?\z)`),t));else if("word_boundary"===l){if(!f&&!p){let e=`(?:(?<=${ew})(?!${ew})|(?<!${ew})(?=${ew}))`,r=`(?:(?<=${ew})(?=${ew})|(?<!${ew})(?!${ew}))`;o(eW(eG(u?r:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||eD(r)||(e.ref=r=eU(r,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!eD(n)&&(e.name=n=eU(n,t)),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){"intersection"===t.kind&&r(eW(M({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:a,digitIsAscii:i,spaceIsAscii:o,wordIsAscii:s}){let{kind:l,negate:u,value:p}=e;if(i&&("digit"===l||"digit"===p))return void r(eT(N("digit",{negate:u}),t));if(o&&("space"===l||"space"===p))return void r(eW(eB(eG("[	-\r ]"),u),t));if(s&&("word"===l||"word"===p))return void r(eT(N("word",{negate:u}),t));if("any"===l)r(eT(R("Any"),t));else if("digit"===l)r(eT(R("Nd",{negate:u}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===n)throw Error(ed`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",i=ed`\p{RI}{2}|${e}(?:\u200D${e})*`;r(eW(eG(ed`(?>\r\n|${a?ed`\p{RGI_Emoji}`:i}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)r(eT(R("AHex",{negate:u}),t));else if("newline"===l)r(eW(eG(u?"[^\n]":"(?>\r\n?|[\n\v\f\u2028\u2029])"),t));else if("posix"===l)if(a||"graph"!==p&&"print"!==p)r(eW(eB(eG(eA.get(p)),u),t));else{if("strict"===n)throw Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[p];u&&(e=`\0-${ec(e.codePointAt(0)-1)}${ec(e.codePointAt(2)+1)}-\u{10FFFF}`),r(eW(eG(`[${e}]`),t))}else if("property"===l)ek.has(T(p))||(e.key="sc");else if("space"===l)r(eT(R("space",{negate:u}),t));else if("word"===l)r(eW(eB(eG(ew),u),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:a,removeAllPrevSiblings:i,removeAllNextSiblings:o}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=L({flags:l});e.body[0].body=o(),a(eW(e,t),{traverse:!0})}else n();else if("keep"===s){let e=r.body[0],n=1===r.body.length&&k(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:r;if(t.parent!==n||n.body.length>1)throw Error(ed`Uses "\K" in a way that's unsupported`);let o=F({behind:!0});o.body[0].body=i(),a(eW(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:r}=e;"lookbehind"===r&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){let{kind:n}=e;if("fail"===n)r(eW(F({negate:!0}),t));else throw Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=L();t.body[0].body.push(e.body),e.body=eW(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let r=[],n=!1,a=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let r=t.find(e=>"search_start"===e.kind||function(e,t){let r={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===r.negate||e.negate===r.negate)&&1===e.body.length&&k(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!r)return null;if("search_start"===r.kind)return r;if("LookaroundAssertion"===r.type)return r.body[0].body[0];if("CapturingGroup"===r.type||"Group"===r.type){let t=[];for(let n of r.body){let r=e(n.body);if(!r)return null;Array.isArray(r)?t.push(...r):t.push(r)}return t}return null}(t.body);e?(n=!0,Array.isArray(e)?r.push(...e):r.push(e)):a=!0}n&&!a&&r.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if("strict"===t&&r&&n)throw Error(ed`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;"string"!=typeof r||eD(r)||(e.ref=r=eU(r,t))}},eN={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){let{orphan:n,ref:a}=e;n||r.set(e,[...t.get(a).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:a,groupsByName:i,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:l}){let u=a.get(e);if(u&&s.has(e.number)){let n=eT(eP(e.number),t);l.set(n,s.get(e.number)),r(n);return}s.set(e.number,e),o.set(e.number,[]),e.name&&eh(o,e.name,[]);let p=o.get(e.name??e.number);for(let t=0;t<p.length;t++){let r=p[t];if(u===r.node||u&&u===r.origin||e===r.origin){p.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:u}),e.name&&o.get(e.name).push({node:e,origin:u}),e.name){let t=eh(i,e.name,new Map),r=!1;if(u)r=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){r=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:r})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=eg(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){let{isRecursive:a,ref:i}=e;if(a){let r=t;for(;(r=r.parent)&&("CapturingGroup"!==r.type||r.name!==i&&r.number!==i););n.reffedNodesByReferencer.set(e,r);return}let o=n.subroutineRefMap.get(i),s=0===i,l=s?eP(0):function e(t,r,n,a){let i=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))"parent"===o?i.parent=Array.isArray(n)?a:n:s&&"object"==typeof s?i[o]=e(s,r,i,n):("type"===o&&"CapturingGroup"===s&&r.set(i,r.get(t)??t),i[o]=s);return i}(o,n.groupOriginByCopy,null),u=l;if(!s){var p,c;let e=eR(function(e,t){let r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}(o,e=>"Group"===e.type&&!!e.flags)),t=e?eg(n.globalFlags,e):n.globalFlags;p=t,c=n.currentFlags,(p.dotAll!==c.dotAll||p.ignoreCase!==c.ignoreCase)&&(u=L({flags:function({dotAll:e,ignoreCase:t}){let r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),e&&t||(r.disable={},e||(r.disable.dotAll=!0),t||(r.disable.ignoreCase=!0)),r}(t)})).body[0].body.push(l)}r(eW(u,t),{traverse:!s})}},eL={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}let a=n.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let r=t;do{if("Regex"===r.type)return!1;if("Alternative"===r.type)continue;if(r===e)return!1;for(let t of eO(r.parent)){if(t===r)break;if(t===e||function e(t,r){for(let n of eO(t)??[])if(n===r||e(n,r))return!0;return!1}(t,e))return!0}}while(r=r.parent)throw Error("Unexpected path")})(t,e));a.length?a.length>1?r(eW(L({atomic:!0,body:a.reverse().map(e=>v({body:[S(e.number)]}))}),t)):e.ref=a[0].number:r(eW(F({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<r;t++){let t=I();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function eF(e){j(e,{"*"({node:e,parent:t}){e.parent=t}})}function eP(e){let t=U(e);return t.isRecursive=!0,t}function eU(e,t){if(t.has(e))return t.get(e);let r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function eR(e){let t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete r.disable[t],r.enable[t]=!0),e.disable?.[t]&&(r.disable[t]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable)?r:null}function eO(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function eD(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function eG(e,t){let r=$(e,{...t,unicodePropertyMap:ek}).body;return r.length>1||r[0].body.length>1?L({body:r}):r[0].body[0]}function eB(e,t){return e.negate=t,e}function eT(e,t){return e.parent=t,e}function eW(e,t){return eF(e),e.parent=t,e}var ez={"*":{enter({node:e},t){if(eY(e)){let r=t.getCurrentModI();t.pushModI(e.flags?eg({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){eY(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){eQ(ec(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),eJ(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&e_.has(e.value)&&t.setHasCasedChar()}},ej={Alternative:({body:e},t,r)=>e.map(r).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?ed`\B`:ed`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){let{body:n,name:a,number:i}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,i>s.number&&(o.transferTo=s.number)),t.captureMap.set(i,o),`(${a?`?<${a}>`:""}${n.map(r).join("|")})`},Character({value:e},t){let r=ec(e),n=eK(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&eQ(r)){let e=ex(r);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return r},CharacterClass(e,t,r){let{kind:n,negate:a,parent:i}=e,{body:o}=e;if("intersection"===n&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");ef.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(e0)&&(o=[_(45),...o.filter(e=>!e0(e))]);let s=()=>`[${a?"^":""}${o.map(r).join("intersection"===n?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||ef.bugNestedClassIgnoresNegation)&&!a){let t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let n=L(),a=n.body[0];return n.parent=i,a.parent=n,e.body=o=o.filter(e=>!t.includes(e)),o.length?(e.parent=a,a.body.push(e)):n.body.pop(),t.forEach(e=>{let t=v({body:[e]});e.parent=t,t.parent=n,n.body.push(t)}),r(n)}}t.inCharClass=!0;let n=s();return t.inCharClass=!1,n}let l=o[0];if("union"===n&&!a&&l&&((!t.useFlagV||!t.verbose)&&"union"===i.kind&&!(ef.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===i.kind&&1===o.length&&"CharacterClassRange"!==l.type))return o.map(r).join("");if(!t.useFlagV&&"CharacterClass"===i.type)throw Error("Uses nested character class in a way that requires min target ES2024");return s()},CharacterClassRange(e,t){let r=e.min.value,n=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=eK(r,a),o=eK(n,a),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),r=[],n=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?n??=t[e]:null===n?r.push(t[e]):(r.push([n,t[e]]),n=null);return r})(eJ(e)).forEach(e=>{s.add(Array.isArray(e)?`${eK(e[0],a)}-${eK(e[1],a)}`:eK(e,a))}),`${i}-${o}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},a){if("dot"===e)return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":ed`[^\n]`;if("digit"===e)return t?ed`\D`:ed`\d`;if("property"===e){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&e_.has(r))throw Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?ed`\P`:ed`\p`}{${n?`${n}=`:""}${r}}`}if("word"===e)return t?ed`\W`:ed`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:r,parent:n},a,i){let o=a.currentFlags;r&&(a.currentFlags=eg(o,r));let s=t.map(i).join("|"),l=a.verbose||1!==t.length||"Quantifier"===n.type||e||a.useFlagMods&&r?`(?${function(e,t,r){if(e)return">";let n="";if(t&&r){let{enable:e,disable:r}=t;n=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(r?"-":"")+(r?.ignoreCase?"i":"")+(r?.dotAll?"s":"")}return`${n}:`}(e,r,a.useFlagMods)}${s})`:s;return a.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:r},n,a){let i=`${"lookahead"===t?"":"<"}${r?"!":"="}`;return`(?${i}${e.map(a).join("|")})`},Quantifier:(e,t,r)=>r(e.body)+function({kind:e,max:t,min:r}){return(r||1!==t?r||t!==1/0?1===r&&t===1/0?"+":r===t?`{${r}}`:`{${r},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},r){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let n=r.recursionLimit;return 0===t?`(?R=${n})`:ed`\g<${t}&R=${n}>`}},eV=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),eH=new Set(["-","\\","]","^","["]),eX=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),eZ=new Map([[9,ed`\t`],[10,ed`\n`],[11,ed`\v`],[12,ed`\f`],[13,ed`\r`],[8232,ed`\u2028`],[8233,ed`\u2029`],[65279,ed`\uFEFF`]]),eq=/^\p{Cased}$/u;function eQ(e){return eq.test(e)}function eJ(e,t){let r=!!t?.firstOnly,n=e.min.value,a=e.max.value,i=[];if(n<65&&(65535===a||a>=131071)||65536===n&&a>=131071)return i;for(let e=n;e<=a;e++){let t=ec(e);if(!eQ(t))continue;let o=ex(t).filter(e=>{let t=e.codePointAt(0);return t<n||t>a});if(o.length&&(i.push(...o),r))break}return i}function eK(e,{escDigit:t,inCharClass:r,useFlagV:n}){var a;if(eZ.has(e))return eZ.get(e);if(e<32||e>126&&e<160||e>262143||t&&(a=e)>47&&a<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let i=ec(e);return((r?n?eX:eH:eV).has(i)?"\\":"")+i}function eY({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function e0({type:e,value:t}){return"Character"===e&&45===t}var e1=class e extends RegExp{#e=new Map;#t=null;#r;#n=null;#a=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,r,n){const a=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw Error("Cannot provide options when copying a regexp");super(t,r),this.#r=t.source,t instanceof e&&(this.#e=t.#e,this.#n=t.#n,this.#a=t.#a,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...n};super(a?"":t,r),this.#r=t,this.#e=function(e,t){let r=new Map;for(let t of e)r.set(t,{hidden:!0});for(let[e,n]of t)for(let t of n)eh(r,t,{}).transferTo=e;return r}(e.hiddenCaptures,e.transfers),this.#a=e.strategy,this.rawOptions=n??{}}a||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...r}=this.rawOptions;this.#t=new e(this.#r,this.flags,r)}let r=this.global||this.sticky,n=this.lastIndex;if("clip_search"===this.#a&&r&&n){this.lastIndex=0;let e=this.#i(t.slice(n));return e&&(function(e,t,r,n){if(e.index+=t,e.input=r,n){let r=e.indices;for(let e=0;e<r.length;e++){let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])}let n=r.groups;n&&Object.keys(n).forEach(e=>{let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])})}}(e,n,t,this.hasIndices),this.lastIndex+=n),e}return this.#i(t)}#i(e){let t;this.#t.lastIndex=this.lastIndex;let r=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!r||!this.#e.size)return r;let n=[...r];r.length=1,this.hasIndices&&(t=[...r.indices],r.indices.length=1);let a=[0];for(let e=1;e<n.length;e++){let{hidden:i,transferTo:o}=this.#e.get(e)??{};if(i?a.push(null):(a.push(r.length),r.push(n[e]),this.hasIndices&&r.indices.push(t[e])),o&&void 0!==n[e]){let i=a[o];if(!i)throw Error(`Invalid capture transfer to "${i}"`);if(r[i]=n[e],this.hasIndices&&(r.indices[i]=t[e]),r.groups){this.#n||(this.#n=function(e){let t,r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,a=0,i=0;for(;t=r.exec(e);){let{0:e,groups:{capture:r,name:o}}=t;"["===e?a++:a?"]"===e&&a--:r&&(i++,o&&n.set(i,o))}return n}(this.source));let a=this.#n.get(o);a&&(r.groups[a]=n[e],this.hasIndices&&(r.indices.groups[a]=t[e]))}}}return r}};class e2{constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:r=!1,cache:n,regexConstructor:a}=t;if(!a)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=n?.get(e);if(t){if(t instanceof RegExp)return t;if(r)return null;throw t}try{let t=a(e);return n?.set(e,t),t}catch(t){if(n?.set(e,t),r)return null;throw t}})}regexps;findNextMatchSync(e,t,r){let n="string"==typeof e?e:e.content,a=[];function i(e,t,r=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+r,end:e[1]+r,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let r=this.regexps[e];if(r)try{r.lastIndex=t;let o=r.exec(n);if(!o)continue;if(o.index===t)return i(e,o,0);a.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(a.length){let e=Math.min(...a.map(e=>e[1].index));for(let[t,r,n]of a)if(r.index===e)return i(t,r,n)}return null}}function e8(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>{let r;return(r=function(e,t){var r;let n,a,i,o,s=eb(t),l=(r=$(e,{flags:s.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:s.rules.captureGroup,singleline:s.rules.singleline},skipBackrefValidation:s.rules.allowOrphanBackrefs,unicodePropertyMap:ek}),n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:s.accuracy,asciiWordBoundaries:s.rules.asciiWordBoundaries,avoidSubclass:s.avoidSubclass,bestEffortTarget:s.target}},eF(r),a={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ey[n.bestEffortTarget]>=ey.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:r.flags.digitIsAscii,spaceIsAscii:r.flags.spaceIsAscii,wordIsAscii:r.flags.wordIsAscii},j(r,eM,a),o={currentFlags:i={dotAll:r.flags.dotAll,ignoreCase:r.flags.ignoreCase},prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap},j(r,eN,o),j(r,eL,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),r._originMap=o.groupOriginByCopy,r._strategy=a.strategy,r),u=function(e,t){let r=eb(t),n=ey[r.target]>=ey.ES2024,a=ey[r.target]>=ey.ES2025,i=r.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,s=null;if(!a){let t=[e.flags.ignoreCase];j(e,ez,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},u=e,p={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!a&&o&&s),useFlagMods:a,useFlagV:n,verbose:r.verbose};function c(e){return p.lastNode=u,u=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(ej[e.type],`Unexpected node type "${e.type}"`)(e,p,c)}let d={pattern:e.body.map(c).join("|"),flags:c(e.flags),options:{...e.options}};return n||(delete d.options.force.v,d.options.disable.v=!0,d.options.unicodeSetsPlugin=null),d._captureTransfers=new Map,d._hiddenCaptures=[],p.captureMap.forEach((e,t)=>{e.hidden&&d._hiddenCaptures.push(t),e.transferTo&&eh(d._captureTransfers,e.transferTo,[]).push(t)}),d}(l,s),p=function(e,t){let r,{hiddenCaptures:n,mode:a}={hiddenCaptures:[],mode:"plugin",...t},i=t?.captureTransfers??new Map;if(!RegExp(er,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if("plugin"===a&&Q(e,ee`\(\?\(DEFINE\)`,Z.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let o=[],s=Q(e,ee`\\[1-9]`,Z.DEFAULT),l=new Map,u=[],p=!1,c=0,d=0;for(ei.lastIndex=0;r=ei.exec(e);){let{0:t,groups:{captureName:f,rDepth:g,gRNameOrNum:h,gRDepth:y}}=r;if("["===t)c++;else if(c)"]"===t&&c--;else if(g){if(es(g),p)throw Error(eo);if(s)throw Error(`${"external"===a?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,r.index),l=e.slice(ei.lastIndex);if(Q(l,er,Z.DEFAULT))throw Error(eo);let u=g-1;e=el(t,l,u,!1,n,o,d),i=ep(i,t,u,o.length,0,d);break}else if(h){es(y);let c=!1;for(let e of u)if(e.name===h||e.num===+h){if(c=!0,e.hasRecursedWithin)throw Error(eo);break}if(!c)throw Error(ee`Recursive \g cannot be used outside the referenced group "${"external"===a?h:ee`\g<${h}&R=${y}>`}"`);let f=l.get(h),g=function(e,t){let r,n=/\\?./gsu;n.lastIndex=t;let a=e.length,i=0,o=1;for(;r=n.exec(e);){let[e]=r;if("["===e)i++;else if(i)"]"===e&&i--;else if("("===e)o++;else if(")"===e&&!--o){a=r.index;break}}return e.slice(t,a)}(e,f);if(s&&Q(g,ee`${en}|\((?!\?)`,Z.DEFAULT))throw Error(`${"external"===a?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let m=e.slice(f,r.index),b=g.slice(m.length+t.length),C=o.length,w=y-1,x=el(m,b,w,!0,n,o,d);i=ep(i,m,w,o.length-C,C,d);let k=e.slice(0,f),E=e.slice(f+g.length);e=`${k}${x}${E}`,ei.lastIndex+=x.length-t.length-m.length-b.length,u.forEach(e=>e.hasRecursedWithin=!0),p=!0}else if(f)d++,l.set(String(d),ei.lastIndex),l.set(f,ei.lastIndex),u.push({num:d,name:f});else if("("===t[0]){let e="("===t;e&&(d++,l.set(String(d),ei.lastIndex)),u.push(e?{num:d}:{})}else")"===t&&u.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}(u.pattern,{captureTransfers:u._captureTransfers,hiddenCaptures:u._hiddenCaptures,mode:"external"}),c=function(e,t){let r,n=t?.hiddenCaptures??[],a=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:n};let i="(?:(?=(",o=[0],s=[],l=0,u=0,p=NaN;do{let t;r=!1;let c=0,d=0,f=!1;for(J.lastIndex=Number.isNaN(p)?0:p+i.length;t=J.exec(e);){let{0:g,index:h,groups:{capturingStart:y,noncapturingStart:m}}=t;if("["===g)c++;else if(c)"]"===g&&c--;else if("(?>"!==g||f){if(f&&m)d++;else if(y)f?d++:(l++,o.push(l+u));else if(")"===g&&f){if(!d){let t=l+ ++u;e=`${e.slice(0,p)}${i}${e.slice(p+3,h)}))<$$${t}>)${e.slice(h+1)}`,r=!0,s.push(t);for(let e=0;e<n.length;e++)n[e]>=t&&n[e]++;if(a.size){let e=new Map;a.forEach((r,n)=>{e.set(n>=t?n+1:n,r.map(e=>e>=t?e+1:e))}),a=e}break}d--}}else p=h,f=!0}}while(r)return n.push(...s),{pattern:e=q(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:r}})=>{if(t){let r=+t;if(r>o.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${o[r]}`}return`\\${r}`},Z.DEFAULT),captureTransfers:a,hiddenCaptures:n}}(function(e){let t;if(!RegExp(`${K}\\+`).test(e))return{pattern:e};let r=[],n=null,a=null,i="",o=0;for(Y.lastIndex=0;t=Y.exec(e);){let{0:u,index:p,groups:{qBase:c,qMod:d,invalidQ:f}}=t;if("["===u)o||(a=p),o++;else if("]"===u)o?o--:a=null;else if(!o)if("+"===d&&i&&!i.startsWith("(")){if(f)throw Error(`Invalid quantifier "${u}"`);let t=-1;if(/^\{\d+\}$/.test(c)){var s,l;s=e,l=p+c.length,e=s.slice(0,l)+""+s.slice(l+d.length)}else{if(")"===i||"]"===i){let t=")"===i?n:a;if(null===t)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,p)}${c})${e.slice(p+u.length)}`}else e=`${e.slice(0,p-i.length)}(?>${i}${c})${e.slice(p+u.length)}`;t+=4}Y.lastIndex+=t}else"("===u[0]?r.push(p):")"===u&&(n=r.length?r.pop():null);i=u}return{pattern:e}}(p.pattern).pattern,{captureTransfers:p.captureTransfers,hiddenCaptures:p.hiddenCaptures}),d={pattern:c.pattern,flags:`${s.hasIndices?"d":""}${s.global?"g":""}${u.flags}${u.options.disable.v?"u":"v"}`};if(s.avoidSubclass){if(s.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=c.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(c.captureTransfers),r=l._strategy,n=d.pattern.length>=s.lazyCompileLength;(e.length||t.length||r||n)&&(d.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...r&&{strategy:r},...n&&{lazyCompile:n}})}return d}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...{target:t.target}})).options?new e1(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)},{createScanner:e=>new e2(e,t),createString:e=>({content:e})}}e.s(["createJavaScriptRegexEngine",()=>e8],409901)},991089,136537,e=>{"use strict";var t=e.i(537366);class r extends t.default{}let n=new r;function a(e,t,r){return n.diff(e,t,r)}e.s(["diffChars",()=>a],991089);var i=t;function o(e,t){let r;for(r=0;r<e.length&&r<t.length&&e[r]==t[r];r++);return e.slice(0,r)}function s(e,t){let r;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(r=0;r<e.length&&r<t.length&&e[e.length-(r+1)]==t[t.length-(r+1)];r++);return e.slice(-r)}function l(e,t,r){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return r+e.slice(t.length)}function u(e,t,r){if(!t)return e+r;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+r}function p(e,t){return l(e,t,"")}function c(e,t){return t.slice(0,function(e,t){let r=0;e.length>t.length&&(r=e.length-t.length);let n=t.length;e.length<t.length&&(n=e.length);let a=Array(n),i=0;a[0]=0;for(let e=1;e<n;e++){for(t[e]==t[i]?a[e]=a[i]:a[e]=i;i>0&&t[e]!=t[i];)i=a[i];t[e]==t[i]&&i++}i=0;for(let n=r;n<e.length;n++){for(;i>0&&e[n]!=t[i];)i=a[i];e[n]==t[i]&&i++}return i}(e,t))}function d(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function f(e){let t=e.match(/^\s*/);return t?t[0]:""}let g="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",h=RegExp(`[${g}]+|\\s+|[^${g}]`,"ug");class y extends i.default{equals(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let r;if(t.intlSegmenter){let n=t.intlSegmenter;if("word"!=n.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');for(let t of(r=[],Array.from(n.segment(e)))){let e=t.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(e)?r[r.length-1]+=e:r.push(e)}}else r=e.match(h)||[];let n=[],a=null;return r.forEach(e=>{/\s/.test(e)?null==a?n.push(e):n.push(n.pop()+e):null!=a&&/\s/.test(a)?n[n.length-1]==a?n.push(n.pop()+e):n.push(a+e):n.push(e),a=e}),n}join(e){return e.map((e,t)=>0==t?e:e.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let r=null,n=null,a=null;return e.forEach(e=>{e.added?n=e:e.removed?a=e:((n||a)&&m(r,a,n,e),r=e,n=null,a=null)}),(n||a)&&m(r,a,n,null),e}}function m(e,t,r,n){var a,i,g,h;if(t&&r){let c=f(t.value),g=d(t.value),h=f(r.value),y=d(r.value);if(e){let n=o(c,h);e.value=u(e.value,h,n),t.value=p(t.value,n),r.value=p(r.value,n)}if(n){let e=s(g,y);n.value=l(n.value,y,e),a=t.value,t.value=u(a,e,""),i=r.value,r.value=u(i,e,"")}}else if(r){if(e){let e=f(r.value);r.value=r.value.substring(e.length)}if(n){let e=f(n.value);n.value=n.value.substring(e.length)}}else if(e&&n){let r=f(n.value),a=f(t.value),i=d(t.value),c=o(r,a);t.value=p(t.value,c);let h=s(p(r,c),i);g=t.value,t.value=u(g,h,""),n.value=l(n.value,r,h),e.value=u(e.value,r,r.slice(0,r.length-h.length))}else if(n){let e=f(n.value),r=c(d(t.value),e);h=t.value,t.value=u(h,r,"")}else if(e){let r=c(d(e.value),f(t.value));t.value=p(t.value,r)}}new y;class b extends i.default{tokenize(e){let t=RegExp(`(\\r?\\n)|[${g}]+|[^\\S\\n\\r]+|[^${g}]`,"ug");return e.match(t)||[]}}let C=new b;function w(e,t,r){return C.diff(e,t,r)}e.s(["diffWordsWithSpace",()=>w],136537)},208587,e=>{"use strict";function t(e={}){let{classPrefix:r="__shiki_",classSuffix:n="",classReplacer:a=e=>e}=e,i=new Map;function o(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function s(e){let t=r+function(e,t=0){let r=0xdeadbeef^t,n=0x41c6ce57^t;for(let t=0,a;t<e.length;t++)r=Math.imul(r^(a=e.charCodeAt(t)),0x9e3779b1),n=Math.imul(n^a,0x5f356495);return r=Math.imul(r^r>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35),(0x100000000*(2097151&(n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(r^r>>>13,0xc2b2ae35)))+(r>>>0)).toString(36).slice(0,6)}("string"==typeof e?e:o(e))+n;return t=a(t),i.has(t)||i.set(t,"string"==typeof e?e:{...e}),t}return{name:"@shikijs/transformers:style-to-class",pre(e){if(!e.properties.style)return;let t=s(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=s(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry:()=>i,getCSS(){let e="";for(let[t,r]of i.entries())e+=`.${t}{${"string"==typeof r?r:o(r)}}`;return e},clearRegistry(){i.clear()}}}e.s(["transformerStyleToClass",()=>t])}]);