vendor: 13,910 bytes, lines 1-34
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BCvYCnic.js","./DWoPI72w.js","./ywsZRAT7.js","./entry.BkZcdQP3.css","./BN_7HF1G.js","./B86lgHW_.js","./C3uaqbz5.js","./CnnebwVN.js","./wDzz0qaB.js","./DPfMkruS.js","./Dw0ZUpBv.js","./BPQ3VLAy.js","./Cp-IABpG.js","./25uufFqr.js","./BMG7h6za.js","./Cvjx9yec.js","./Buea-lGh.js"])))=>i.map(i=>d[i]); 2import{_ as b}from"./ywsZRAT7.js";import{getMdcConfigs as $t}from"./bNaE6FFb.js";function K(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function At(e,r,t){return e.has(r)||e.set(r,t),e.get(r)}const ve=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),$=String.raw;function Y(e,r){if(e==null)throw new Error(r??"Value expected");return e}const Ye=$`\[\^?`,et=`c.? | C(?:-.?)?|${$`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${$`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${$`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${$`o\{[^\}]*\}?`}|${$`\d{1,3}`}`,Ie=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ae=new RegExp($` 3 \\ (?: 4 ${et} 5 | [gk]<[^>]*>? 6 | [gk]'[^']*'? 7 | . 8 ) 9 | \( (?: 10 \? (?: 11 [:=!>({] 12 | <[=!] 13 | <[^>]*> 14 | '[^']*' 15 | ~\|? 16 | #(?:[^)\\]|\\.?)* 17 | [^:)]*[:)] 18 )? 19 | \*[^\)]*\)? 20 )? 21 | (?:${Ie.source})+ 22 | ${Ye} 23 | . 24`.replace(/\s+/g,""),"gsu"),ge=new RegExp($` 25 \\ (?: 26 ${et} 27 | . 28 ) 29 | \[:(?:\^?\p{Alpha}+|\^):\] 30 | ${Ye} 31 | && 32 | . 33`.replace(/\s+/g,""),"gsu");function vt(e,r={}){const t={flags:"",...r,rules:{captureGroup:!1,singleline:!1,...r.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const n=Wt(t.flags),a=[n.extended],s={captureGroup:t.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(p){a.push(p)},replaceCurrentModX(p){a[a.length-1]=p},singleline:t.rules.singleline};let o=[],i;for(ae.lastIndex=0;i=ae.exec(e);){const p=It(s,e,i[0],ae.lastIndex);p.tokens?o.push(...p.tokens):p.token&&o.push(p.token),p.lastIndex!==void 0&&(ae.lastIndex=p.lastIndex)}const u=[];let c=0;o.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++c:p.raw==="("&&u.push(p)}),c||u.forEach((p,d)=>{p.kind="capturing",p.number=d+1});const l=c||u.length;return{tokens:o.map(p=>p.type==="EscapedNumber"?Zt(p,l):p).flat(),flags:n}}function It(e,r,t,n){const[a,s]=t;if(t==="["||t==="[^"){const o=St(r,t,n);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(s))return{token:Pe(t,t)};if(/^\\g[<']/.test(t)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:Gt(t)}}if(/^\\k[<']/.test(t)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:rt(t)}}if(s==="K")return{token:nt("keep",t)};if(s==="N"||s==="R")return{token:j("newline",t,{negate:s==="N"})};if(s==="O")return{token:j("any",t)};if(s==="X")return{token:j("text_segment",t)};const o=tt(t,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(a==="("){if(s==="*")return{token:zt(t)};if(t==="(?{")throw new Error(`Unsupported callout "${t}"`);if(t.startsWith("(?#")){if(r[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(t))return{token:Bt(t,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,t==="("&&!e.captureGroup||t==="(?:")return{token:q("group",t)};if(t==="(?>")return{token:q("atomic",t)};if(t==="(?="||t==="(?!"||t==="(?<="||t==="(?<!")return{token:q(t[2]==="<"?"lookbehind":"lookahead",t,{negate:t.endsWith("!")})};if(t==="("&&e.captureGroup||t.startsWith("(?<")&&t.endsWith(">")||t.startsWith("(?'")&&t.endsWith("'"))return{token:q("capturing",t,{...t!=="("&&{name:t.slice(3,-1)}})};if(t.startsWith("(?~")){if(t==="(?~|")throw new Error(`Unsupported absence function kind "${t}"`);return{token:q("absence_repeater",t)}}throw t==="(?("?new Error(`Unsupported conditional "${t}"`):new Error(`Invalid or unsupported group option "${t}"`)}if(t===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Ft(t)}}if(e.getCurrentModX()){if(t==="#"){const o=r.indexOf(` 34`,n);return{lastIndex:o===-1?r.length:o}}if(/^\s$/.test(t)){const o=/\s+/y;return o.lastIndex=n,{lastIndex:o.exec(r)?o.lastIndex:n}}}if(t===".")return{token:j("dot",t)};if(t==="^"||t==="$"){const o=e.singleline?{"^":$`\A`,$:$`\Z`}[t]:t;return{token:Pe(o,t)}}return t==="|"?{token:Nt(t)}:Ie.test(t)?{tokens:Qt(t)}:{token:T(K(t),t)}}function St(e,r,t){const n=[Re(r[1]==="^",r)];let a=1,s;for(ge.lastIndex=t;s=ge.exec(e);){const o=s[0];if(o[0]==="["&&o[1]!==":")a++,n.push(Re(o[1]==="^",o));else if(o==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(T(93,o));else if(a--,n.push(Mt(o)),!a)break}else{const i=Lt(o);Array.isArray(i)?n.push(...i):n.push(i)}}return{tokens:n,lastIndex:ge.lastIndex||e.length}}function Lt(e){if(e[0]==="\\")return tt(e,{inCharClass:!0});if(e[0]==="["){const r=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!r||!ve.has(r.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return j("posix",e,{value:r.groups.name,negate:!!r.groups.negate})}return e==="-"?Pt(e):e==="&&"?Rt(e):T(K(e),e)}function tt(e,{inCharClass:r}){const t=e[1];if(t==="c"||t==="C")return Vt(e);if("dDhHsSwW".includes(t))return Ht(e);if(e.startsWith($`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return jt(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const n=e.split(/\\x/).slice(1).map(o=>parseInt(o,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...a].map(o=>{const i=[...s.encode(o)].map(u=>`\\x${u.toString(16)}`).join("");return T(K(o),i)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(t==="u"||t==="x")return T(Xt(e),e);if(Oe.has(t))return T(Oe.get(t),e);if(/\d/.test(t))return Ot(r,e);if(e==="\\")throw new Error($`Incomplete escape "\"`);if(t==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return T(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Nt(e){return{type:"Alternator",raw:e}}function Pe(e,r){return{type:"Assertion",kind:e,raw:r}}function rt(e){return{type:"Backreference",raw:e}}function T(e,r){return{type:"Character",value:e,raw:r}}function Mt(e){return{type:"CharacterClassClose",raw:e}}function Pt(e){return{type:"CharacterClassHyphen",raw:e}}function Rt(e){return{type:"CharacterClassIntersector",raw:e}}function Re(e,r){return{type:"CharacterClassOpen",negate:e,raw:r}}function j(e,r,t={}){return{type:"CharacterSet",kind:e,...t,raw:r}}function nt(e,r,t={}){return e==="keep"?{type:"Directive",kind:e,raw:r}:{type:"Directive",kind:e,flags:Y(t.flags),raw:r}}function Ot(e,r){return{type:"EscapedNumber",inCharClass:e,raw:r}}function Ft(e){return{type:"GroupClose",raw:e}}function q(e,r,t={}){return{type:"GroupOpen",kind:e,...t,raw:r}}function Dt(e,r,t,n){return{type:"NamedCallout",kind:e,tag:r,arguments:t,raw:n}}function Tt(e,r,t,n){return{type:"Quantifier",kind:e,min:r,max:t,raw:n}}function Gt(e){return{type:"Subroutine",raw:e}}const Ut=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Oe=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Vt(e){const r=e[1]==="c"?e[2]:e[3];if(!r||!/[A-Za-z]/.test(r))throw new Error(`Unsupported control character "${e}"`);return T(K(r.toUpperCase())-64,e)}function Bt(e,r){let{on:t,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";const a=(r.getCurrentModX()||t.includes("x"))&&!n.includes("x"),s=De(t),o=De(n),i={};if(s&&(i.enable=s),o&&(i.disable=o),e.endsWith(")"))return r.replaceCurrentModX(a),nt("flags",e,{flags:i});if(e.endsWith(":"))return r.pushModX(a),r.numOpenGroups++,q("group",e,{...(s||o)&&{flags:i}});throw new Error(`Unexpected flag modifier "${e}"`)}function zt(e){const r=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!r)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:t,tag:n,args:a}=r.groups;if(!t)throw new Error(`Invalid named callout "${e}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=a?a.split(",").filter(l=>l!=="").map(l=>/^[+-]?\d+$/.test(l)?+l:l):[],[o,i,u]=s,c=Ut.has(t)?t.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${i}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof i=="number"||!/^(?:[<>!=]=|[<>])$/.test(i))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${t}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Dt(c,n??null,a?.split(",")??null,e)}function Fe(e){let r=null,t,n;if(e[0]==="{"){const{minStr:a,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+a>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(t=+a,n=s===void 0?+a:s===""?1/0:+s,t>n&&(r="possessive",[t,n]=[n,t]),e.endsWith("?")){if(r==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');r="lazy"}else r||(r="greedy")}else t=e[0]==="+"?1:0,n=e[0]==="?"?1:1/0,r=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Tt(r,t,n,e)}function Ht(e){const r=e[1].toLowerCase();return j({d:"digit",h:"hex",s:"space",w:"word"}[r],e,{negate:e[1]!==r})}function jt(e){const{p:r,neg:t,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return j("property",e,{value:n,negate:r==="P"&&!t||r==="p"&&!!t})}function De(e){const r={};return e.includes("i")&&(r.ignoreCase=!0),e.includes("m")&&(r.dotAll=!0),e.includes("x")&&(r.extended=!0),Object.keys(r).length?r:null}function Wt(e){const r={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let t=0;t<e.length;t++){const n=e[t];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(e.slice(t)))throw new Error('Invalid or unspecified flag "y" mode');r.textSegmentMode=e[t+2]==="g"?"grapheme":"word",t+=3;continue}r[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return r}function Xt(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const r=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(r,16)}function Zt(e,r){const{raw:t,inCharClass:n}=e,a=t.slice(1);if(!n&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=r))return[rt(t)];const s=[],o=a.match(/^[0-7]+|\d/g);for(let i=0;i<o.length;i++){const u=o[i];let c;if(i===0&&u!=="8"&&u!=="9"){if(c=parseInt(u,8),c>127)throw new Error($`Octal encoded byte above 177 unsupported "${t}"`)}else c=K(u);s.push(T(c,(i===0?"\\":"")+u))}return s}function Qt(e){const r=[],t=new RegExp(Ie,"gy");let n;for(;n=t.exec(e);){const a=n[0];if(a[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(s){const{min:o,max:i}=s.groups;if(+o>+i&&a.endsWith("?")){t.lastIndex--,r.push(Fe(a.slice(0,-1)));continue}}}r.push(Fe(a))}return r}function st(e,r){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const t=e.body[0];return!r||Object.keys(r).every(n=>r[n]===t[n])}function qt(e){return Jt.has(e.type)}const Jt=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function at(e,r={}){const t={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...r,rules:{captureGroup:!1,singleline:!1,...r.rules}},n=vt(e,{flags:t.flags,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline}}),a=(d,g)=>{const f=n.tokens[s.nextIndex];switch(s.parent=d,s.nextIndex++,f.type){case"Alternator":return W();case"Assertion":return Kt(f);case"Backreference":return Yt(f,s);case"Character":return le(f.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return er(f,s,g);case"CharacterClassOpen":return tr(f,s,g);case"CharacterSet":return rr(f,s);case"Directive":return ur(f.kind,{flags:f.flags});case"GroupOpen":return nr(f,s,g);case"NamedCallout":return lr(f.kind,f.tag,f.arguments);case"Quantifier":return sr(f,s);
vendor: 7,386 bytes, line 34
34case"Subroutine":return ar(f,s);default:throw new Error(`Unexpected token type "${f.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:t.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:t.skipBackrefValidation,skipLookbehindValidation:t.skipLookbehindValidation,skipPropertyNameValidation:t.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:t.unicodePropertyMap,walk:a},o=fr(cr(n.flags));let i=o.body[0];for(;s.nextIndex<n.tokens.length;){const d=a(i,{});d.type==="Alternative"?(o.body.push(d),i=d):i.body.push(d)}const{capturingGroups:u,hasNumberedRef:c,namedGroupsByName:l,subroutines:p}=s;if(c&&l.size&&!t.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:d}of p)if(typeof d=="number"){if(d>u.length)throw new Error("Subroutine uses a group number that's not defined");d&&(u[d-1].isSubroutined=!0)}else if(l.has(d)){if(l.get(d).length>1)throw new Error($`Subroutine uses a duplicate group name "\g<${d}>"`);l.get(d)[0].isSubroutined=!0}else throw new Error($`Subroutine uses a group name that's not defined "\g<${d}>"`);return o}function Kt({kind:e}){return _e(Y({"^":"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===$`\B`||e===$`\Y`})}function Yt({raw:e},r){const t=/^\\k[<']/.test(e),n=t?e.slice(3,-1):e.slice(1),a=(s,o=!1)=>{const i=r.capturingGroups.length;let u=!1;if(s>i)if(r.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return r.hasNumberedRef=!0,Ee(o?i+1-s:s,{orphan:u})};if(t){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return a(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${e}"`);if(!r.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${e}"`);return Ee(n)}return a(+n)}function er(e,r,t){const{tokens:n,walk:a}=r,s=r.parent,o=s.body.at(-1),i=n[r.nextIndex];if(!t.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&i&&i.type!=="CharacterClassOpen"&&i.type!=="CharacterClassClose"&&i.type!=="CharacterClassIntersector"){const u=a(s,{...t,isCheckingRangeEnd:!0});if(o.type==="Character"&&u.type==="Character")return s.body.pop(),ir(o,u);throw new Error("Invalid character class range")}return le(K("-"))}function tr({negate:e},r,t){const{tokens:n,walk:a}=r,s=n[r.nextIndex],o=[ue()];let i=Ue(s);for(;i.type!=="CharacterClassClose";){if(i.type==="CharacterClassIntersector")o.push(ue()),r.nextIndex++;else{const c=o.at(-1);c.body.push(a(c,t))}i=Ue(n[r.nextIndex],s)}const u=ue({negate:e});return o.length===1?u.body=o[0].body:(u.kind="intersection",u.body=o.map(c=>c.body.length===1?c.body[0]:c)),r.nextIndex++,u}function rr({kind:e,negate:r,value:t},n){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:o}=n;if(e==="property"){const i=pe(t);if(ve.has(i)&&!o?.has(i))e="posix",t=i;else return J(t,{negate:r,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?pr(t,{negate:r}):ke(e,{negate:r})}function nr(e,r,t){const{tokens:n,capturingGroups:a,namedGroupsByName:s,skipLookbehindValidation:o,walk:i}=r,u=dr(e),c=u.type==="AbsenceFunction",l=Ge(u),p=l&&u.negate;if(u.type==="CapturingGroup"&&(a.push(u),u.name&&At(s,u.name,[]).push(u)),c&&t.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let d=Ve(n[r.nextIndex]);for(;d.type!=="GroupClose";){if(d.type==="Alternator")u.body.push(W()),r.nextIndex++;else{const g=u.body.at(-1),f=i(g,{...t,isInAbsenceFunction:t.isInAbsenceFunction||c,isInLookbehind:t.isInLookbehind||l,isInNegLookbehind:t.isInNegLookbehind||p});if(g.body.push(f),(l||t.isInLookbehind)&&!o){const m="Lookbehind includes a pattern not allowed by Oniguruma";if(p||t.isInNegLookbehind){if(Te(f)||f.type==="CapturingGroup")throw new Error(m)}else if(Te(f)||Ge(f)&&f.negate)throw new Error(m)}}d=Ve(n[r.nextIndex])}return r.nextIndex++,u}function sr({kind:e,min:r,max:t},n){const a=n.parent,s=a.body.at(-1);if(!s||!qt(s))throw new Error("Quantifier requires a repeatable token");const o=it(e,r,t,s);return a.body.pop(),o}function ar({raw:e},r){const{capturingGroups:t,subroutines:n}=r;let a=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(s){const i=+s.groups.num,u=t.length;if(r.hasNumberedRef=!0,a={"":i,"+":u+i,"-":u+1-i}[s.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const o=ut(a);return n.push(o),o}function or(e,r){return{type:"AbsenceFunction",kind:e,body:ne(r?.body)}}function W(e){return{type:"Alternative",body:ct(e?.body)}}function _e(e,r){const t={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(t.negate=!!r?.negate),t}function Ee(e,r){const t=!!r?.orphan;return{type:"Backreference",ref:e,...t&&{orphan:t}}}function ot(e,r){const t={name:void 0,isSubroutined:!1,...r};if(t.name!==void 0&&!gr(t.name))throw new Error(`Group name "${t.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...t.name&&{name:t.name},...t.isSubroutined&&{isSubroutined:t.isSubroutined},body:ne(r?.body)}}function le(e,r){const t={useLastValid:!1,...r};if(e>1114111){const n=e.toString(16);if(t.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:e}}function ue(e){const r={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:r.kind,negate:r.negate,body:ct(e?.body)}}function ir(e,r){if(r.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:r}}function ke(e,r){const t=!!r?.negate,n={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(n.negate=t),(e==="text_segment"||e==="newline"&&!t)&&(n.variableLength=!0),n}function ur(e,r={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Y(r.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function cr(e){return{type:"Flags",...e}}function O(e){const r=e?.atomic,t=e?.flags;if(r&&t)throw new Error("Atomic group cannot have flags");return{type:"Group",...r&&{atomic:r},...t&&{flags:t},body:ne(e?.body)}}function H(e){const r={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:r.behind?"lookbehind":"lookahead",negate:r.negate,body:ne(e?.body)}}function lr(e,r,t){return{type:"NamedCallout",kind:e,tag:r,arguments:t}}function pr(e,r){const t=!!r?.negate;if(!ve.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:t}}function it(e,r,t,n){if(r>t)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:r,max:t,body:n}}function fr(e,r){return{type:"Regex",body:ne(r?.body),flags:e}}function ut(e){return{type:"Subroutine",ref:e}}function J(e,r){const t={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...r};let n=t.unicodePropertyMap?.get(pe(e));
vendor: 9,507 bytes, lines 34-49
34if(!n){if(t.normalizeUnknownPropertyNames)n=hr(e);else if(t.unicodePropertyMap&&!t.skipPropertyNameValidation)throw new Error($`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:t.negate}}function dr({flags:e,kind:r,name:t,negate:n,number:a}){switch(r){case"absence_repeater":return or("repeater");case"atomic":return O({atomic:!0});case"capturing":return ot(a,{name:t});case"group":return O({flags:e});case"lookahead":case"lookbehind":return H({behind:r==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${r}"`)}}function ne(e){if(e===void 0)e=[W()];else if(!Array.isArray(e)||!e.length||!e.every(r=>r.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function ct(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(r=>!!r.type))throw new Error("Invalid body; expected array of nodes");return e}function Te(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Ge(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function gr(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function hr(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}function pe(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Ue(e,r){return Y(e,`${r?.type==="Character"&&r.value===93?"Empty":"Unclosed"} character class`)}function Ve(e){return Y(e,"Unclosed group")}function te(e,r,t=null){function n(s,o){for(let i=0;i<s.length;i++){const u=a(s[i],o,i,s);i=Math.max(-1,i+u)}}function a(s,o=null,i=null,u=null){let c=0,l=!1;const p={node:s,parent:o,key:i,container:u,root:e,remove(){oe(u).splice(Math.max(0,Z(i)+c),1),c--,l=!0},removeAllNextSiblings(){return oe(u).splice(Z(i)+1)},removeAllPrevSiblings(){const C=Z(i)+c;return c-=C,oe(u).splice(0,Math.max(0,C))},replaceWith(C,x={}){const A=!!x.traverse;u?u[Math.max(0,Z(i)+c)]=C:Y(o,"Can't replace root node")[i]=C,A&&a(C,o,i,u),l=!0},replaceWithMultiple(C,x={}){const A=!!x.traverse;if(oe(u).splice(Math.max(0,Z(i)+c),1,...C),c+=C.length-1,A){let E=0;for(let v=0;v<C.length;v++)E+=a(C[v],o,Z(i)+v+E,u)}l=!0},skip(){l=!0}},{type:d}=s,g=r["*"],f=r[d],m=typeof g=="function"?g:g?.enter,y=typeof f=="function"?f:f?.enter;if(m?.(p,t),y?.(p,t),!l)switch(d){case"AbsenceFunction":case"CapturingGroup":case"Group":n(s.body,s);break;case"Alternative":case"CharacterClass":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(s.min,s,"min"),a(s.max,s,"max");break;case"LookaroundAssertion":n(s.body,s);break;case"Quantifier":a(s.body,s,"body");break;case"Regex":n(s.body,s),a(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${d}"`)}return f?.exit?.(p,t),g?.exit?.(p,t),c}return a(e),e}function oe(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Z(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const mr=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function wr(e,r){for(let t=0;t<e.length;t++)e[t]>=r&&e[t]++}function yr(e,r,t,n){return e.slice(0,r)+n+e.slice(r+t.length)}const R=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Se(e,r,t,n){const a=new RegExp(String.raw`${r}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,i="";for(const u of e.matchAll(a)){const{0:c,groups:{$skip:l}}=u;if(!l&&(!n||n===R.DEFAULT==!o)){t instanceof Function?i+=t(u,{context:o?R.CHAR_CLASS:R.DEFAULT,negated:s[s.length-1]}):i+=t;continue}c[0]==="["?(o++,s.push(c[1]==="^")):c==="]"&&o&&(o--,s.pop()),i+=c}return i}function lt(e,r,t,n){Se(e,r,t,n)}function Cr(e,r,t=0,n){if(!new RegExp(r,"su").test(e))return null;const a=new RegExp(`${r}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=t;let s=0,o;for(;o=a.exec(e);){const{0:i,groups:{$skip:u}}=o;if(!u&&(!n||n===R.DEFAULT==!s))return o;i==="["?s++:i==="]"&&s&&s--,a.lastIndex==o.index&&a.lastIndex++}return null}function ie(e,r,t){return!!Cr(e,r,0,t)}function br(e,r){const t=/\\?./gsu;t.lastIndex=r;let n=e.length,a=0,s=1,o;for(;o=t.exec(e);){const[i]=o;if(i==="[")a++;else if(a)i==="]"&&a--;else if(i==="(")s++;else if(i===")"&&(s--,!s)){n=o.index;break}}return e.slice(r,n)}const Be=new RegExp(String.raw`(?<noncapturingStart>${mr})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function _r(e,r){const t=r?.hiddenCaptures??[];let n=r?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:t};const a="(?>",s="(?:(?=(",o=[0],i=[];let u=0,c=0,l=NaN,p;do{p=!1;let d=0,g=0,f=!1,m;for(Be.lastIndex=Number.isNaN(l)?0:l+s.length;m=Be.exec(e);){const{0:y,index:C,groups:{capturingStart:x,noncapturingStart:A}}=m;if(y==="[")d++;else if(d)y==="]"&&d--;else if(y===a&&!f)l=C,f=!0;else if(f&&A)g++;else if(x)f?g++:(u++,o.push(u+c));else if(y===")"&&f){if(!g){c++;const E=u+c;if(e=`${e.slice(0,l)}${s}${e.slice(l+a.length,C)}))<$$${E}>)${e.slice(C+1)}`,p=!0,i.push(E),wr(t,E),n.size){const v=new Map;n.forEach((L,S)=>{v.set(S>=E?S+1:S,L.map(M=>M>=E?M+1:M))}),n=v}break}g--}}}while(p);return t.push(...i),e=Se(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:d,groups:{backrefNum:g,wrappedBackrefNum:f}})=>{if(g){const m=+g;if(m>o.length-1)throw new Error(`Backref "${d}" greater than number of captures`);return`\\${o[m]}`}return`\\${f}`},R.DEFAULT),{pattern:e,captureTransfers:n,hiddenCaptures:t}}const pt=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,he=new RegExp(String.raw` 35\\(?: \d+ 36 | c[A-Za-z] 37 | [gk]<[^>]+> 38 | [pPu]\{[^\}]+\} 39 | u[A-Fa-f\d]{4} 40 | x[A-Fa-f\d]{2} 41 ) 42| \((?: \? (?: [:=!>] 43 | <(?:[=!]|[^>]+>) 44 | [A-Za-z\-]+: 45 | \(DEFINE\) 46 ))? 47| (?<qBase>${pt})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?) 48| \\?. 49`.replace(/\s+/g,""),"gsu");function Er(e){if(!new RegExp(`${pt}\\+`).test(e))return{pattern:e};const r=[];let t=null,n=null,a="",s=0,o;for(he.lastIndex=0;o=he.exec(e);){const{0:i,index:u,groups:{qBase:c,qMod:l,invalidQ:p}}=o;if(i==="[")s||(n=u),s++;else if(i==="]")s?s--:n=null;else if(!s)if(l==="+"&&a&&!a.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${i}"`);let d=-1;if(/^\{\d+\}$/.test(c))e=yr(e,u+c.length,l,"");else{if(a===")"||a==="]"){const g=a===")"?t:n;if(g===null)throw new Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,g)}(?>${e.slice(g,u)}${c})${e.slice(u+i.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${c})${e.slice(u+i.length)}`;d+=4}he.lastIndex+=d}else i[0]==="("?r.push(u):i===")"&&(t=r.length?r.pop():null);a=i}return{pattern:e}}const P=String.raw,kr=P`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,xe=P`\(\?R=(?<rDepth>[^\)]+)\)|${kr}`,fe=P`\(\?<(?![=!])(?<captureName>[^>]+)>`,ft=P`${fe}|(?<unnamed>\()(?!\?)`,z=new RegExp(P`${fe}|${xe}|\(\?|\\?.`,"gsu"),me="Cannot use multiple overlapping recursions";function xr(e,r){const{hiddenCaptures:t,mode:n}={hiddenCaptures:[],mode:"plugin",...r};let a=r?.captureTransfers??new Map;if(!new RegExp(xe,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:t};if(n==="plugin"&&ie(e,P`\(\?\(DEFINE\)`,R.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=ie(e,P`\\[1-9]`,R.DEFAULT),i=new Map,u=[];let c=!1,l=0,p=0,d;for(z.lastIndex=0;d=z.exec(e);){const{0:g,groups:{captureName:f,rDepth:m,gRNameOrNum:y,gRDepth:C}}=d;if(g==="[")l++;else if(l)g==="]"&&l--;else if(m){if(ze(m),c)throw new Error(me);if(o)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const x=e.slice(0,d.index),A=e.slice(z.lastIndex);if(ie(A,xe,R.DEFAULT))throw new Error(me);const E=+m-1;e=He(x,A,E,!1,t,s,p),a=We(a,x,E,s.length,0,p);break}else if(y){ze(C);let x=!1;for(const N of u)if(N.name===y||N.num===+y){if(x=!0,N.hasRecursedWithin)throw new Error(me);break}if(!x)throw new Error(P`Recursive \g cannot be used outside the referenced group "${n==="external"?y:P`\g<${y}&R=${C}>`}"`);const A=i.get(y),E=br(e,A);if(o&&ie(E,P`${fe}|\((?!\?)`,R.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=e.slice(A,d.index),L=E.slice(v.length+g.length),S=s.length,M=+C-1,U=He(v,L,M,!0,t,s,p);a=We(a,v,M,s.length-S,S,p);const ee=e.slice(0,A),Me=e.slice(A+E.length);e=`${ee}${U}${Me}`,z.lastIndex+=U.length-g.length-v.length-L.length,u.forEach(N=>N.hasRecursedWithin=!0),c=!0}else if(f)p++,i.set(String(p),z.lastIndex),i.set(f,z.lastIndex),u.push({num:p,name:f});else if(g[0]==="("){const x=g==="(";x&&(p++,i.set(String(p),z.lastIndex)),u.push(x?{num:p}:{})}else g===")"&&u.pop()}return t.push(...s),{pattern:e,captureTransfers:a,hiddenCaptures:t}}function ze(e){const r=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(r);if(e=+e,e<2||e>100)throw new Error(r)}function He(e,r,t,n,a,s,o){const i=new Set;n&<(e+r,fe,({groups:{captureName:c}})=>{i.add(c)},R.DEFAULT);const u=[t,n?i:null,a,s,o];return`${e}${je(`(?:${e}`,"forward",...u)}(?:)${je(`${r})`,"backward",...u)}${r}`}function je(e,r,t,n,a,s,o){const u=l=>r==="forward"?l+2:t-l+2-1;let c="";for(let l=0;l<t;l++){const p=u(l);c+=Se(e,P`${ft}|\\k<(?<backref>[^>]+)>`,({0:d,groups:{captureName:g,unnamed:f,backref:m}})=>{if(m&&n&&!n.has(m))return d;const y=`_$${p}`;if(f||g){const C=o+s.length+1;return s.push(C),$r(a,C),f?d:`(?<${g}${y}>`}return P`\k<${m}${y}>`},R.DEFAULT)}return c}function $r(e,r){for(let t=0;t<e.length;t++)e[t]>=r&&e[t]++}
49function We(e,r,t,n,a,s){if(e.size&&n){let o=0;lt(r,ft,()=>o++,R.DEFAULT);const i=s-o+a,u=new Map;return e.forEach((c,l)=>{const p=(n-o*t)/t,d=o*t,g=l>i+o?l+n:l,f=[];for(const m of c)if(m<=i)f.push(m);else if(m>i+o+p)f.push(m+n);else if(m<=i+o)for(let y=0;y<=t;y++)f.push(m+o*y);else for(let y=0;y<=t;y++)f.push(m+d+p*y);u.set(g,f)}),u}return e}var k=String.fromCodePoint,h=String.raw,G={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};G.bugFlagVLiteralHyphenIsRange=G.unicodeSets?(()=>{try{new RegExp(h`[\d\-a]`,"v")}catch{return!0}return!1})():!1;G.bugNestedClassIgnoresNegation=G.unicodeSets&&new RegExp("[[^a]]","v").test("a");function ce(e,{enable:r,disable:t}){return{dotAll:!t?.dotAll&&!!(r?.dotAll||e.dotAll),ignoreCase:!t?.ignoreCase&&!!(r?.ignoreCase||e.ignoreCase)}}function re(e,r,t){return e.has(r)||e.set(r,t),e.get(r)}function $e(e,r){return Xe[e]>=Xe[r]}function Ar(e,r){if(e==null)throw new Error(r??"Value expected");return e}var Xe={ES2025:2025,ES2024:2024,ES2018:2018},vr={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function dt(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");
vendor: 2,272 bytes, lines 49-131
49if(e.target!==void 0&&!vr[e.target])throw new Error(`Unexpected target "${e.target}"`);const r={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 r.target==="auto"&&(r.target=G.flagGroups?"ES2025":G.unicodeSets?"ES2024":"ES2018"),r}var Ir="[ -\r ]",Sr=new Set([k(304),k(305)]),F=h`[\p{L}\p{M}\p{N}\p{Pc}]`;function gt(e){if(Sr.has(e))return[e];const r=new Set,t=e.toLowerCase(),n=t.toUpperCase(),a=Mr.get(t),s=Lr.get(t),o=Nr.get(t);return[...n].length===1&&r.add(n),o&&r.add(o),a&&r.add(a),r.add(t),s&&r.add(s),[...r]}var Le=new Map(`C Other 50Cc Control cntrl 51Cf Format 52Cn Unassigned 53Co Private_Use 54Cs Surrogate 55L Letter 56LC Cased_Letter 57Ll Lowercase_Letter 58Lm Modifier_Letter 59Lo Other_Letter 60Lt Titlecase_Letter 61Lu Uppercase_Letter 62M Mark Combining_Mark 63Mc Spacing_Mark 64Me Enclosing_Mark 65Mn Nonspacing_Mark 66N Number 67Nd Decimal_Number digit 68Nl Letter_Number 69No Other_Number 70P Punctuation punct 71Pc Connector_Punctuation 72Pd Dash_Punctuation 73Pe Close_Punctuation 74Pf Final_Punctuation 75Pi Initial_Punctuation 76Po Other_Punctuation 77Ps Open_Punctuation 78S Symbol 79Sc Currency_Symbol 80Sk Modifier_Symbol 81Sm Math_Symbol 82So Other_Symbol 83Z Separator 84Zl Line_Separator 85Zp Paragraph_Separator 86Zs Space_Separator 87ASCII 88ASCII_Hex_Digit AHex 89Alphabetic Alpha 90Any 91Assigned 92Bidi_Control Bidi_C 93Bidi_Mirrored Bidi_M 94Case_Ignorable CI 95Cased 96Changes_When_Casefolded CWCF 97Changes_When_Casemapped CWCM 98Changes_When_Lowercased CWL 99Changes_When_NFKC_Casefolded CWKCF 100Changes_When_Titlecased CWT 101Changes_When_Uppercased CWU 102Dash 103Default_Ignorable_Code_Point DI 104Deprecated Dep 105Diacritic Dia 106Emoji 107Emoji_Component EComp 108Emoji_Modifier EMod 109Emoji_Modifier_Base EBase 110Emoji_Presentation EPres 111Extended_Pictographic ExtPict 112Extender Ext 113Grapheme_Base Gr_Base 114Grapheme_Extend Gr_Ext 115Hex_Digit Hex 116IDS_Binary_Operator IDSB 117IDS_Trinary_Operator IDST 118ID_Continue IDC 119ID_Start IDS 120Ideographic Ideo 121Join_Control Join_C 122Logical_Order_Exception LOE 123Lowercase Lower 124Math 125Noncharacter_Code_Point NChar 126Pattern_Syntax Pat_Syn 127Pattern_White_Space Pat_WS 128Quotation_Mark QMark 129Radical 130Regional_Indicator RI 131Sentence_Terminal STerm
132Soft_Dotted SD 133Terminal_Punctuation Term 134Unified_Ideograph UIdeo 135Uppercase Upper 136Variation_Selector VS 137White_Space space 138XID_Continue XIDC 139XID_Start XIDS`.split(/\s/).map(e=>[pe(e),e])),Lr=new Map([["s",k(383)],[k(383),"s"]]),Nr=new Map([[k(223),k(7838)],[k(107),k(8490)],[k(229),k(8491)],[k(969),k(8486)]]),Mr=new Map([V(453),V(456),V(459),V(498),...we(8072,8079),...we(8088,8095),...we(8104,8111),V(8124),V(8140),V(8188)]),Pr=new Map([["alnum",h`[\p{Alpha}\p{Nd}]`],["alpha",h`\p{Alpha}`],["ascii",h`\p{ASCII}`],["blank",h`[\p{Zs}\t]`],["cntrl",h`\p{Cc}`],["digit",h`\p{Nd}`],["graph",h`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",h`\p{Lower}`],["print",h`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",h`[\p{P}\p{S}]`],["space",h`\p{space}`],["upper",h`\p{Upper}`],["word",h`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",h`\p{AHex}`]]);function Rr(e,r){const t=[];for(let n=e;n<=r;n++)t.push(n);return t}function V(e){const r=k(e);return[r.toLowerCase(),r]}function we(e,r){return Rr(e,r).map(t=>V(t))}var ht=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Or(e,r){const t={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...r};mt(e);const n={accuracy:t.accuracy,asciiWordBoundaries:t.asciiWordBoundaries,avoidSubclass:t.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:$e(t.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};te(e,Fr,n);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};te(e,Dr,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return te(e,Tr,o),e._originMap=s.groupOriginByCopy,e._strategy=n.strategy,e}var Fr={AbsenceFunction({node:e,parent:r,replaceWith:t}){const{body:n,kind:a}=e;if(a==="repeater"){const s=O();s.body[0].body.push(H({negate:!0,body:n}),J("Any"));const o=O();o.body[0].body.push(it("greedy",0,1/0,s)),t(_(o,r),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:r,key:t},{flagDirectivesByAlt:n}){const a=e.body.filter(s=>s.kind==="flags");for(let s=t+1;
vendor: 23,369 bytes, lines 139-142
139s<r.body.length;s++){const o=r.body[s];re(n,o,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:r}){if(r.get(e)?.length){const t=yt(r.get(e));if(t){const n=O({flags:t});n.body[0].body=e.body,e.body=[_(n,e)]}}}},Assertion({node:e,parent:r,key:t,container:n,root:a,remove:s,replaceWith:o},i){const{kind:u,negate:c}=e,{asciiWordBoundaries:l,avoidSubclass:p,supportedGNodes:d,wordIsAscii:g}=i;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(u==="line_end")o(_(H({body:[W({body:[_e("string_end")]}),W({body:[le(10)]})]}),r));else if(u==="line_start")o(_(D(h`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),r));else if(u==="search_start")if(d.has(e))a.flags.sticky=!0,s();else{const f=n[t-1];if(f&&Hr(f))o(_(H({negate:!0}),r));else{if(p)throw new Error(h`Uses "\G" in a way that requires a subclass`);o(B(_e("string_start"),r)),i.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")o(_(D(h`(?=\n?\z)`),r));else if(u==="word_boundary"){if(!g&&!l){const f=`(?:(?<=${F})(?!${F})|(?<!${F})(?=${F}))`,m=`(?:(?<=${F})(?=${F})|(?<!${F})(?!${F}))`;o(_(D(c?m:f),r))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:r}){let{ref:t}=e;typeof t=="string"&&!Ce(t)&&(t=ye(t,r),e.ref=t)},CapturingGroup({node:e},{jsGroupNameMap:r,subroutineRefMap:t}){let{name:n}=e;n&&!Ce(n)&&(n=ye(n,r),e.name=n),t.set(e.number,e),n&&t.set(n,e)},CharacterClassRange({node:e,parent:r,replaceWith:t}){if(r.kind==="intersection"){const n=ue({body:[e]});t(_(n,r),{traverse:!0})}},CharacterSet({node:e,parent:r,replaceWith:t},{accuracy:n,minTargetEs2024:a,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:i}){const{kind:u,negate:c,value:l}=e;if(s&&(u==="digit"||l==="digit")){t(B(ke("digit",{negate:c}),r));return}if(o&&(u==="space"||l==="space")){t(_(be(D(Ir),c),r));return}if(i&&(u==="word"||l==="word")){t(B(ke("word",{negate:c}),r));return}if(u==="any")t(B(J("Any"),r));else if(u==="digit")t(B(J("Nd",{negate:c}),r));else if(u!=="dot")if(u==="text_segment"){if(n==="strict")throw new Error(h`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",d=h`\p{RI}{2}|${p}(?:\u200D${p})*`;t(_(D(h`(?>\r\n|${a?h`\p{RGI_Emoji}`:d}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),r))}else if(u==="hex")t(B(J("AHex",{negate:c}),r));else if(u==="newline")t(_(D(c?`[^ 140]`:`(?>\r 141?|[ 142\v\f \u2028\u2029])`),r));else if(u==="posix")if(!a&&(l==="graph"||l==="print")){if(n==="strict")throw new Error(`POSIX class "${l}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[l];c&&(p=`\0-${k(p.codePointAt(0)-1)}${k(p.codePointAt(2)+1)}-ô¿¿`),t(_(D(`[${p}]`),r))}else t(_(be(D(Pr.get(l)),c),r));else if(u==="property")Le.has(pe(l))||(e.key="sc");else if(u==="space")t(B(J("space",{negate:c}),r));else if(u==="word")t(_(be(D(F),c),r));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:r,root:t,remove:n,replaceWith:a,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:i,flags:u}=e;if(i==="flags")if(!u.enable&&!u.disable)n();else{const c=O({flags:u});c.body[0].body=o(),a(_(c,r),{traverse:!0})}else if(i==="keep"){const c=t.body[0],p=t.body.length===1&&st(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:t;if(r.parent!==p||p.body.length>1)throw new Error(h`Uses "\K" in a way that's unsupported`);const d=H({behind:!0});d.body[0].body=s(),a(_(d,r))}else throw new Error(`Unexpected directive kind "${i}"`)},Flags({node:e,parent:r}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new 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}),r.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:r,disable:t}=e.flags;r?.extended&&delete r.extended,t?.extended&&delete t.extended,r?.dotAll&&t?.dotAll&&delete r.dotAll,r?.ignoreCase&&t?.ignoreCase&&delete r.ignoreCase,r&&!Object.keys(r).length&&delete e.flags.enable,t&&!Object.keys(t).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},r){const{kind:t}=e;t==="lookbehind"&&(r.passedLookbehind=!0)},NamedCallout({node:e,parent:r,replaceWith:t}){const{kind:n}=e;if(n==="fail")t(_(H({negate:!0}),r));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const r=O();r.body[0].body.push(e.body),e.body=_(r,e)}},Regex:{enter({node:e},{supportedGNodes:r}){const t=[];let n=!1,a=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=bt(s.body);o?(n=!0,Array.isArray(o)?t.push(...o):t.push(o)):a=!0}n&&!a&&t.forEach(s=>r.add(s))},exit(e,{accuracy:r,passedLookbehind:t,strategy:n}){if(r==="strict"&&t&&n)throw new Error(h`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:r}){let{ref:t}=e;typeof t=="string"&&!Ce(t)&&(t=ye(t,r),e.ref=t)}},Dr={Backreference({node:e},{multiplexCapturesToLeftByRef:r,reffedNodesByReferencer:t}){const{orphan:n,ref:a}=e;n||t.set(e,[...r.get(a).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:r,replaceWith:t,skip:n},{groupOriginByCopy:a,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:i,reffedNodesByReferencer:u}){const c=a.get(e);if(c&&i.has(e.number)){const p=B(Ze(e.number),r);u.set(p,i.get(e.number)),t(p);return}i.set(e.number,e),o.set(e.number,[]),e.name&&re(o,e.name,[]);const l=o.get(e.name??e.number);for(let p=0;p<l.length;p++){const d=l[p];if(c===d.node||c&&c===d.origin||e===d.origin){l.splice(p,1);break}}if(o.get(e.number).push({node:e,origin:c}),e.name&&o.get(e.name).push({node:e,origin:c}),e.name){const p=re(s,e.name,new Map);let d=!1;if(c)d=!0;else for(const g of p.values())if(!g.hasDuplicateNameToRemove){d=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:d})}},exit({node:e},{openRefs:r}){r.delete(e.number)}},Group:{enter({node:e},r){r.prevFlags=r.currentFlags,e.flags&&(r.currentFlags=ce(r.currentFlags,e.flags))},exit(e,r){r.currentFlags=r.prevFlags}},Subroutine({node:e,parent:r,replaceWith:t},n){const{isRecursive:a,ref:s}=e;if(a){let l=r;for(;(l=l.parent)&&!(l.type==="CapturingGroup"&&(l.name===s||l.number===s)););n.reffedNodesByReferencer.set(e,l);return}const o=n.subroutineRefMap.get(s),i=s===0,u=i?Ze(0):wt(o,n.groupOriginByCopy,null);let c=u;if(!i){const l=yt(Vr(o,d=>d.type==="Group"&&!!d.flags)),p=l?ce(n.globalFlags,l):n.globalFlags;Gr(p,n.currentFlags)||(c=O({flags:Br(p)}),c.body[0].body.push(u))}t(_(c,r),{traverse:!i})}},Tr={Backreference({node:e,parent:r,replaceWith:t},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}const s=n.reffedNodesByReferencer.get(e).filter(o=>Ur(o,e));if(!s.length)t(_(H({negate:!0}),r));else if(s.length>1){const o=O({atomic:!0,body:s.reverse().map(i=>W({body:[Ee(i.number)]}))});t(_(o,r))}else e.ref=s[0].number},CapturingGroup({node:e},r){e.number=++r.numCapturesToLeft,e.name&&r.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},r){const t=Math.max(r.highestOrphanBackref-r.numCapturesToLeft,0);for(let n=0;n<t;n++){const a=ot();e.body.at(-1).body.push(a)}}},Subroutine({node:e},r){!e.isRecursive||e.ref===0||(e.ref=r.reffedNodesByReferencer.get(e).number)}};function mt(e){te(e,{"*"({node:r,parent:t}){r.parent=t}})}function Gr(e,r){return e.dotAll===r.dotAll&&e.ignoreCase===r.ignoreCase}function Ur(e,r){let t=r;do{if(t.type==="Regex")return!1;if(t.type==="Alternative")continue;if(t===e)return!1;const n=Ct(t.parent);for(const a of n){if(a===t)break;if(a===e||_t(a,e))return!0}}while(t=t.parent);throw new Error("Unexpected path")}function wt(e,r,t,n){const a=Array.isArray(e)?[]:{};for(const[s,o]of Object.entries(e))s==="parent"?a.parent=Array.isArray(t)?n:t:o&&typeof o=="object"?a[s]=wt(o,r,a,t):(s==="type"&&o==="CapturingGroup"&&r.set(a,r.get(e)??e),a[s]=o);return a}function Ze(e){const r=ut(e);return r.isRecursive=!0,r}function Vr(e,r){const t=[];for(;e=e.parent;)(!r||r(e))&&t.push(e);return t}function ye(e,r){if(r.has(e))return r.get(e);const t=`$${r.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return r.set(e,t),t}function yt(e){const r=["dotAll","ignoreCase"],t={enable:{},disable:{}};return e.forEach(({flags:n})=>{r.forEach(a=>{n.enable?.[a]&&(delete t.disable[a],t.enable[a]=!0),n.disable?.[a]&&(t.disable[a]=!0)})}),Object.keys(t.enable).length||delete t.enable,Object.keys(t.disable).length||delete t.disable,t.enable||t.disable?t:null}function Br({dotAll:e,ignoreCase:r}){const t={};return(e||r)&&(t.enable={},e&&(t.enable.dotAll=!0),r&&(t.enable.ignoreCase=!0)),(!e||!r)&&(t.disable={},!e&&(t.disable.dotAll=!0),!r&&(t.disable.ignoreCase=!0)),t}function Ct(e){if(!e)throw new Error("Node expected");const{body:r}=e;return Array.isArray(r)?r:r?[r]:null}function bt(e){const r=e.find(t=>t.kind==="search_start"||jr(t,{negate:!1})||!zr(t));if(!r)return null;if(r.kind==="search_start")return r;if(r.type==="LookaroundAssertion")return r.body[0].body[0];if(r.type==="CapturingGroup"||r.type==="Group"){const t=[];for(const n of r.body){const a=bt(n.body);if(!a)return null;Array.isArray(a)?t.push(...a):t.push(a)}return t}return null}function _t(e,r){const t=Ct(e)??[];for(const n of t)if(n===r||_t(n,r))return!0;return!1}function zr({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Hr(e){const r=["Character","CharacterClass","CharacterSet"];return r.includes(e.type)||e.type==="Quantifier"&&e.min&&r.includes(e.body.type)}function jr(e,r){const t={negate:null,...r};return e.type==="LookaroundAssertion"&&(t.negate===null||e.negate===t.negate)&&e.body.length===1&&st(e.body[0],{type:"Assertion",kind:"search_start"})}function Ce(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function D(e,r){const n=at(e,{...r,unicodePropertyMap:Le}).body;return n.length>1||n[0].body.length>1?O({body:n}):n[0].body[0]}function be(e,r){return e.negate=r,e}function B(e,r){return e.parent=r,e}function _(e,r){return mt(e),e.parent=r,e}function Wr(e,r){const t=dt(r),n=$e(t.target,"ES2024"),a=$e(t.target,"ES2025"),s=t.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,i=null;if(!a){const g=[e.flags.ignoreCase];te(e,Xr,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(f){g.push(f)},setHasCasedChar(){g.at(-1)?o=!0:i=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!i)};let c=e;const l={accuracy:t.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!a&&o&&i),useFlagMods:a,useFlagV:n,verbose:t.verbose};function p(g){return l.lastNode=c,c=g,Ar(Zr[g.type],`Unexpected node type "${g.type}"`)(g,l,p)}const d={pattern:e.body.map(p).join("|"),flags:p(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=[],l.captureMap.forEach((g,f)=>{g.hidden&&d._hiddenCaptures.push(f),g.transferTo&&re(d._captureTransfers,g.transferTo,[]).push(f)}),d}var Xr={"*":{enter({node:e},r){if(qe(e)){const t=r.getCurrentModI();r.pushModI(e.flags?ce({ignoreCase:t},e.flags).ignoreCase:t)}},exit({node:e},r){qe(e)&&r.popModI()}},Backreference(e,r){r.setHasCasedChar()},Character({node:e},r){Ne(k(e.value))&&r.setHasCasedChar()},CharacterClassRange({node:e,skip:r},t){r(),Et(e,{firstOnly:!0}).length&&t.setHasCasedChar()},CharacterSet({node:e},r){e.kind==="property"&&ht.has(e.value)&&r.setHasCasedChar()}},Zr={Alternative({body:e},r,t){return e.map(t).join("")},Assertion({kind:e,negate:r}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return r?h`\B`:h`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},r){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!r.useFlagMods&&r.accuracy==="strict"&&r.currentFlags.ignoreCase&&!r.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,r,t){const{body:n,name:a,number:s}=e,o={ignoreCase:r.currentFlags.ignoreCase},i=r.originMap.get(e);return i&&(o.hidden=!0,s>i.number&&(o.transferTo=i.number)),r.captureMap.set(s,o),`(${a?`?<${a}>`:""}${n.map(t).join("|")})`},Character({value:e},r){const t=k(e),n=Q(e,{escDigit:r.lastNode.type==="Backreference",inCharClass:r.inCharClass,useFlagV:r.useFlagV});if(n!==t)return n;if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&Ne(t)){const a=gt(t);return r.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return t},CharacterClass(e,r,t){const{kind:n,negate:a,parent:s}=e;let{body:o}=e;if(n==="intersection"&&!r.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");G.bugFlagVLiteralHyphenIsRange&&r.useFlagV&&o.some(Je)&&(o=[le(45),...o.filter(c=>!Je(c))]);const i=()=>`[${a?"^":""}${o.map(t).join(n==="intersection"?"&&":"")}]`;if(!r.inCharClass){if((!r.useFlagV||G.bugNestedClassIgnoresNegation)&&!a){const l=o.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(l.length){const p=O(),d=p.body[0];return p.parent=s,d.parent=p,o=o.filter(g=>!l.includes(g)),e.body=o,o.length?(e.parent=d,d.body.push(e)):p.body.pop(),l.forEach(g=>{const f=W({body:[g]});g.parent=f,f.parent=p,p.body.push(f)}),t(p)}}r.inCharClass=!0;const c=i();return r.inCharClass=!1,c}const u=o[0];if(n==="union"&&!a&&u&&((!r.useFlagV||!r.verbose)&&s.kind==="union"&&!(G.bugFlagVLiteralHyphenIsRange&&r.useFlagV)||!r.verbose&&s.kind==="intersection"&&o.length===1&&u.type!=="CharacterClassRange"))return o.map(t).join("");if(!r.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return i()},CharacterClassRange(e,r){const t=e.min.value,n=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:r.useFlagV},s=Q(t,a),o=Q(n,a),i=new Set;if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase){const u=Et(e);Yr(u).forEach(l=>{i.add(Array.isArray(l)?`${Q(l[0],a)}-${Q(l[1],a)}`:Q(l,a))})}return`${s}-${o}${[...i].join("")}`},CharacterSet({kind:e,negate:r,value:t,key:n},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":h`[^\n]`;if(e==="digit")return r?h`\D`:h`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&ht.has(t))throw new Error(`Unicode property "${t}" can't be case-insensitive when other chars have specific case`);return`${r?h`\P`:h`\p`}{${n?`${n}=`:""}${t}}`}if(e==="word")return r?h`\W`:h`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,r){return(r.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:r,flags:t,parent:n},a,s){const o=a.currentFlags;t&&(a.currentFlags=ce(o,t));const i=r.map(s).join("|"),u=!a.verbose&&r.length===1&&n.type!=="Quantifier"&&!e&&(!a.useFlagMods||!t)?i:`(?${en(e,t,a.useFlagMods)}${i})`;return a.currentFlags=o,u},LookaroundAssertion({body:e,kind:r,negate:t},n,a){return`(?${`${r==="lookahead"?"":"<"}${t?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,r,t){return t(e.body)+tn(e)},Subroutine({isRecursive:e,ref:r},t){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=t.recursionLimit;return r===0?`(?R=${n})`:h`\g<${r}&R=${n}>`}},Qr=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),qr=new Set(["-","\\","]","^","["]),Jr=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Qe=new Map([[9,h`\t`],[10,h`\n`],[11,h`\v`],[12,h`\f`],[13,h`\r`],[8232,h`\u2028`],[8233,h`\u2029`],[65279,h`\uFEFF`]]),Kr=new RegExp("^\\p{Cased}$","u");function Ne(e){return Kr.test(e)}function Et(e,r){const t=!!r?.firstOnly,n=e.min.value,a=e.max.value,s=[];if(n<65&&(a===65535||a>=131071)||n===65536&&a>=131071)return s;for(let o=n;o<=a;o++){const i=k(o);if(!Ne(i))continue;const u=gt(i).filter(c=>{const l=c.codePointAt(0);return l<n||l>a});if(u.length&&(s.push(...u),t))break}return s}function Q(e,{escDigit:r,inCharClass:t,useFlagV:n}){if(Qe.has(e))return Qe.get(e);if(e<32||e>126&&e<160||e>262143||r&&rn(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=t?n?Jr:qr:Qr,s=k(e);return(a.has(s)?"\\":"")+s}function Yr(e){const r=e.map(a=>a.codePointAt(0)).sort((a,s)=>a-s),t=[];let n=null;for(let a=0;a<r.length;a++)r[a+1]===r[a]+1?n??=r[a]:n===null?t.push(r[a]):(t.push([n,r[a]]),n=null);return t}function en(e,r,t){if(e)return">";let n="";if(r&&t){const{enable:a,disable:s}=r;n=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${n}:`}function tn({kind:e,max:r,min:t}){let n;return!t&&r===1?n="?":!t&&r===1/0?n="*":t===1&&r===1/0?n="+":t===r?n=`{${t}}`:n=`{${t},${r===1/0?"":r}}`,n+{greedy:"",lazy:"?",possessive:"+"}[e]}function qe({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function rn(e){return e>47&&e<58}function Je({type:e,value:r}){return e==="Character"&&r===45}var nn=class Ae extends RegExp{#t=new Map;#e=null;#n;#r=null;#s=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(r,t,n){const a=!!n?.lazyCompile;if(r instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const s=r;super(s,t),this.#n=s.source,s instanceof Ae&&(this.#t=s.#t,this.#r=s.#r,this.#s=s.#s,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...n};super(a?"":r,t),this.#n=r,this.#t=an(s.hiddenCaptures,s.transfers),this.#s=s.strategy,this.rawOptions=n??{}}a||(this.#e=this)}exec(r){if(!this.#e){const{lazyCompile:a,...s}=this.rawOptions;this.#e=new Ae(this.#n,this.flags,s)}const t=this.global||this.sticky,n=this.lastIndex;if(this.#s==="clip_search"&&t&&n){this.lastIndex=0;const a=this.#a(r.slice(n));return a&&(sn(a,n,r,this.hasIndices),this.lastIndex+=n),a}return this.#a(r)}#a(r){this.#e.lastIndex=this.lastIndex;const t=super.exec.call(this.#e,r);if(this.lastIndex=this.#e.lastIndex,!t||!this.#t.size)return t;const n=[...t];t.length=1;let a;this.hasIndices&&(a=[...t.indices],t.indices.length=1);const s=[0];for(let o=1;o<n.length;o++){const{hidden:i,transferTo:u}=this.#t.get(o)??{};if(i?s.push(null):(s.push(t.length),t.push(n[o]),this.hasIndices&&t.indices.push(a[o])),u&&n[o]!==void 0){const c=s[u];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(t[c]=n[o],this.hasIndices&&(t.indices[c]=a[o]),t.groups){this.#r||(this.#r=on(this.source));const l=this.#r.get(u);l&&(t.groups[l]=n[o],this.hasIndices&&(t.indices.groups[l]=a[o]))}}}return t}};function sn(e,r,t,n){if(e.index+=r,e.input=t,n){const a=e.indices;for(let o=0;o<a.length;o++){const i=a[o];i&&(a[o]=[i[0]+r,i[1]+r])}const s=a.groups;s&&Object.keys(s).forEach(o=>{const i=s[o];i&&(s[o]=[i[0]+r,i[1]+r])})}}function an(e,r){const t=new Map;for(const n of e)t.set(n,{hidden:!0});for(const[n,a]of r)for(const s of a)re(t,s,{}).transferTo=n;return t}function on(e){const r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,t=new Map;let n=0,a=0,s;for(;s=r.exec(e);){const{0:o,groups:{capture:i,name:u}}=s;o==="["?n++:n?o==="]"&&n--:i&&(a++,u&&t.set(a,u))}return t}function un(e,r){const t=cn(e,r);return t.options?new nn(t.pattern,t.flags,t.options):new RegExp(t.pattern,t.flags)}function cn(e,r){const t=dt(r),n=at(e,{flags:t.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline},skipBackrefValidation:t.rules.allowOrphanBackrefs,unicodePropertyMap:Le}),a=Or(n,{accuracy:t.accuracy,asciiWordBoundaries:t.rules.asciiWordBoundaries,avoidSubclass:t.avoidSubclass,bestEffortTarget:t.target}),s=Wr(a,t),o=xr(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),i=Er(o.pattern),u=_r(i.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),c={pattern:u.pattern,flags:`${t.hasIndices?"d":""}${t.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(t.avoidSubclass){if(t.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const l=u.hiddenCaptures.sort((f,m)=>f-m),p=Array.from(u.captureTransfers),d=a._strategy,g=c.pattern.length>=t.lazyCompileLength;(l.length||p.length||d||g)&&(c.options={...l.length&&{hiddenCaptures:l},...p.length&&{transfers:p},...d&&{strategy:d},...g&&{lazyCompile:g}})}return c}const Ke=4294967295;class ln{constructor(r,t={}){this.patterns=r,this.options=t;const{forgiving:n=!1,cache:a,regexConstructor:s}=t;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=r.map(o=>{if(typeof o!="string")return o;const i=a?.get(o);if(i){if(i instanceof RegExp)return i;if(n)return null;throw i}try{const u=s(o);return a?.set(o,u),u}catch(u){if(a?.set(o,u),n)return null;throw u}})}regexps;findNextMatchSync(r,t,n){const a=typeof r=="string"?r:r.content,s=[];function o(i,u,c=0){return{index:i,captureIndices:u.indices.map(l=>l==null?{start:Ke,end:Ke,length:0}:{start:l[0]+c,end:l[1]+c,length:l[1]-l[0]})}}for(let i=0;i<this.regexps.length;i++){const u=this.regexps[i];if(u)try{u.lastIndex=t;const c=u.exec(a);if(!c)continue;if(c.index===t)return o(i,c,0);s.push([i,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(s.length){const i=Math.min(...s.map(u=>u[1].index));for(const[u,c,l]of s)if(c.index===i)return o(u,c,l)}return null}}function pn(e,r){return un(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...r})}function kt(e={}){const r=Object.assign({target:"auto",cache:new Map},e);return r.regexConstructor||=t=>pn(t,{target:r.target}),{createScanner(t){return new ln(t,r)},createString(t){return{content:t}}}}function fn({langs:e=[],themes:r=[],bundledLangs:t={},bundledThemes:n={},getMdcConfigs:a,options:s,engine:o}={}){let i,u;async function c(){const{createHighlighterCore:g,addClassToHast:f,isSpecialLang:m,isSpecialTheme:y}=await b(async()=>{const{createHighlighterCore:L,addClassToHast:S,isSpecialLang:M,isSpecialTheme:U}=await import("./BCvYCnic.js");return{createHighlighterCore:L,addClassToHast:S,isSpecialLang:M,isSpecialTheme:U}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),{transformerNotationDiff:C,transformerNotationErrorLevel:x,transformerNotationFocus:A,transformerNotationHighlight:E}=await b(async()=>{const{transformerNotationDiff:L,transformerNotationErrorLevel:S,transformerNotationFocus:M,transformerNotationHighlight:U}=await import("./BUm4nZhI.js");return{transformerNotationDiff:L,transformerNotationErrorLevel:S,transformerNotationFocus:M,transformerNotationHighlight:U}},[],import.meta.url),v=await g({langs:e,themes:r,engine:o||kt()});for await(const L of await p())await L.shiki?.setup?.(v);return{shiki:v,addClassToHast:f,isSpecialLang:m,isSpecialTheme:y,transformers:[C(),x(),A(),E()]}}
142async function l(){return i||(i=c()),i}async function p(){return u||(u=Promise.resolve(a?.()||[])),u}return async(g,f,m,y={})=>{const{shiki:C,addClassToHast:x,isSpecialLang:A,isSpecialTheme:E,transformers:v}=await l(),L={defaultColor:!1,meta:{__raw:y.meta}};f==="ts-type"||f==="typescript-type"?(f="typescript",L.grammarContextCode="let a:"):(f==="vue-html"||f==="vue-template")&&(f="vue",L.grammarContextCode="<template>");const S={...typeof m=="string"?{default:m}:m||{}},M=C.getLoadedThemes(),U=C.getLoadedLanguages();typeof f=="string"&&!U.includes(f)&&!A(f)&&(t[f]?await C.loadLanguage(t[f]):f="text");for(const[w,I]of Object.entries(S))typeof I=="string"&&!M.includes(I)&&!E(I)&&(n[I]?await C.loadTheme(n[I]):S[w]="none");const ee=new Map;for(const w of v)ee.set(w.name||`transformer:${Math.random()}-${w.constructor.name}`,w);for(const w of await p()){const I=typeof w.shiki?.transformers=="function"?await w.shiki?.transformers(g,f,m,y):w.shiki?.transformers||[];for(const X of I)ee.set(X.name||`transformer:${Math.random()}-${X.constructor.name}`,X)}const N=C.codeToHast(g.trimEnd(),{lang:f,...L,themes:S,transformers:[...ee.values(),{name:"mdc:highlight",line(w,I){y.highlights?.includes(I)&&x(w,"highlight"),w.properties.line=I}},{name:"mdc:newline",line(w){if(g?.includes(` 143`)){if(w.children.length===0||w.children.length===1&&w.children[0].type==="element"&&w.children[0].children.length===1&&w.children[0].children[0].type==="text"&&w.children[0].children[0].value===""){w.children=[{type:"element",tagName:"span",properties:{emptyLinePlaceholder:!0},children:[{type:"text",value:` 144`}]}];return}const I=w.children.at(-1);if(I?.type==="element"&&I.tagName==="span"){const X=I.children.at(-1);X?.type==="text"&&(X.value+=` 145`)}}}}]}).children[0],xt=N.children[0],se=s?.wrapperStyle;N.properties.style=se?typeof se=="string"?se:N.properties.style:"";const de=[];return Object.keys(S).forEach(w=>{const I=w!=="default"?`.${w}`:"";de.push(se?`${I} .shiki,`:"",`html .${w} .shiki span {`,`color: var(--shiki-${w});`,`background: var(--shiki-${w}-bg);`,`font-style: var(--shiki-${w}-font-style);`,`font-weight: var(--shiki-${w}-font-weight);`,`text-decoration: var(--shiki-${w}-text-decoration);`,"}"),de.push(`html${I} .shiki span {`,`color: var(--shiki-${w});`,`background: var(--shiki-${w}-bg);`,`font-style: var(--shiki-${w}-font-style);`,`font-weight: var(--shiki-${w}-font-weight);`,`text-decoration: var(--shiki-${w}-text-decoration);`,"}")}),{tree:xt.children,className:Array.isArray(N.properties.class)?N.properties.class.join(" "):N.properties.class,inlineStyle:N.properties.style,style:de.join("")}}}const dn={shellscript:()=>b(()=>import("./Yzrsuije.js"),[],import.meta.url).then(e=>e.default||e),bash:()=>b(()=>import("./Yzrsuije.js"),[],import.meta.url).then(e=>e.default||e),sh:()=>b(()=>import("./Yzrsuije.js"),[],import.meta.url).then(e=>e.default||e),shell:()=>b(()=>import("./Yzrsuije.js"),[],import.meta.url).then(e=>e.default||e),zsh:()=>b(()=>import("./Yzrsuije.js"),[],import.meta.url).then(e=>e.default||e),diff:()=>b(()=>import("./D97Zzqfu.js"),[],import.meta.url).then(e=>e.default||e),json:()=>b(()=>import("./Cp-IABpG.js"),[],import.meta.url).then(e=>e.default||e),javascript:()=>b(()=>import("./wDzz0qaB.js"),[],import.meta.url).then(e=>e.default||e),js:()=>b(()=>import("./wDzz0qaB.js"),[],import.meta.url).then(e=>e.default||e),cjs:()=>b(()=>import("./wDzz0qaB.js"),[],import.meta.url).then(e=>e.default||e),mjs:()=>b(()=>import("./wDzz0qaB.js"),[],import.meta.url).then(e=>e.default||e),typescript:()=>b(()=>import("./BPQ3VLAy.js"),[],import.meta.url).then(e=>e.default||e),ts:()=>b(()=>import("./BPQ3VLAy.js"),[],import.meta.url).then(e=>e.default||e),cts:()=>b(()=>import("./BPQ3VLAy.js"),[],import.meta.url).then(e=>e.default||e),mts:()=>b(()=>import("./BPQ3VLAy.js"),[],import.meta.url).then(e=>e.default||e),html:()=>b(()=>import("./CnnebwVN.js"),__vite__mapDeps([7,8,9]),import.meta.url).then(e=>e.default||e),css:()=>b(()=>import("./DPfMkruS.js"),[],import.meta.url).then(e=>e.default||e),vue:()=>b(()=>import("./Dw0ZUpBv.js"),__vite__mapDeps([10,9,8,11,12,7,13]),import.meta.url).then(e=>e.default||e),mdc:()=>b(()=>import("./BMG7h6za.js"),__vite__mapDeps([14,15,16,13,7,8,9]),import.meta.url).then(e=>e.default||e),markdown:()=>b(()=>import("./Cvjx9yec.js"),[],import.meta.url).then(e=>e.default||e),md:()=>b(()=>import("./Cvjx9yec.js"),[],import.meta.url).then(e=>e.default||e),yaml:()=>b(()=>import("./Buea-lGh.js"),[],import.meta.url).then(e=>e.default||e),yml:()=>b(()=>import("./Buea-lGh.js"),[],import.meta.url).then(e=>e.default||e)},gn={"material-theme-lighter":()=>b(()=>import("./BsHhGFQr.js"),[],import.meta.url).then(e=>e.default||e),"material-theme":()=>b(()=>import("./BjSij5jK.js"),[],import.meta.url).then(e=>e.default||e),"material-theme-palenight":()=>b(()=>import("./GGCMgrXw.js"),[],import.meta.url).then(e=>e.default||e)},hn={},mn=kt({forgiving:!0}),Cn=fn({bundledLangs:dn,bundledThemes:gn,options:hn,getMdcConfigs:$t,engine:mn});export{fn as createShikiHighlighter,Cn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.