OverviewFilesCommitsIssuesDocsReleasesPeers

apds / lib / frontmatter.js

32 lines · javascript ref:
/* esm.sh - esbuild bundle(@jsr/std__front-matter@1.0.5) es2022 production */
var G="\\ufeff?",st="= yaml =|---",ot=`(---yaml|${st})\\s*`,ge=`(?:---|${st})`,at="\\+\\+\\+|= toml =",lt=`(---toml|${at})\\s*`,Ee=`(?:---|${at})`,ht="= json =",ut=`(---json|${ht})\\s*`,we=`(?:---|${ht})`,Y="([\\s\\S]+?)",H="\\r?\\n?",Lr=new RegExp(`^${ot}$`,"im"),vr=new RegExp(`^${lt}$`,"im"),Pr=new RegExp(`^${ut}$`,"im"),X=new RegExp(`^(${G}${ot}$${Y}^${ge}\\s*$${H})`,"im"),j=new RegExp(`^(${G}${lt}$${Y}^${Ee}\\s*$${H})`,"im"),K=new RegExp(`^(${G}${ut}$${Y}^${we}\\s*$${H})`,"im");var q=new Map([["yaml",X],["toml",j],["json",K]]);function T(t,e,r){let n=e.exec(t);if(!n||n.index!==0)throw new TypeError("Unexpected end of input");let i=n.at(-1)?.replace(/^\s+|\s+$/g,"")??"",s=r(i),o=t.replace(n[0],"");return{frontMatter:i,body:o,attrs:s}}function Se(t){return T(t,K,JSON.parse)}function ct(t,e){let r=0;for(let n of t)e(n)&&(t[r]=n,r+=1);return t.splice(r),t}function O(t,e,r){return mt(t,e,new Set,r)}function mt(t,e,r,n){let i={},s=new Set([...dt(t),...dt(e)]);for(let o of s){if(o==="__proto__")continue;let l=t[o];if(!Object.hasOwn(e,o)){i[o]=l;continue}let a=e[o];if(xt(l)&&xt(a)&&!r.has(l)&&!r.has(a)){r.add(l),r.add(a),i[o]=ke(l,a,r,n);continue}i[o]=a}return i}function ke(t,e,r,n={arrays:"merge",sets:"merge",maps:"merge"}){if(ft(t)&&ft(e))return mt(t,e,r,n);if(pt(t)&&pt(e)){if(Array.isArray(t)&&Array.isArray(e))return n.arrays==="merge"?t.concat(e):e;if(t instanceof Map&&e instanceof Map)return n.maps==="merge"?new Map([...t,...e]):e;if(t instanceof Set&&e instanceof Set)return n.sets==="merge"?new Set([...t,...e]):e}return e}function ft(t){return Object.getPrototypeOf(t)===Object.prototype}function pt(t){return typeof t[Symbol.iterator]=="function"}function xt(t){return t!==null&&typeof t=="object"}function dt(t){let e=Object.getOwnPropertySymbols(t);return ct(e,r=>Object.prototype.propertyIsEnumerable.call(t,r)),e.push(...Object.keys(t)),e}var W=class{#e=/[ \t]/;#t=0;#r;constructor(e){this.#r=e}char(e=0){return this.#r[this.#t+e]??""}slice(e,r){return this.#r.slice(this.#t+e,this.#t+r)}next(e){if(typeof e=="number")for(let r=0;r<e;r++)this.#t++;else this.#t++}nextUntilChar(e={comment:!0}){if(e.inline)for(;this.#e.test(this.char())&&!this.eof();)this.next();else for(;!this.eof();){let r=this.char();if(this.#e.test(r)||this.isCurrentCharEOL())this.next();else if(e.comment&&this.char()==="#")for(;!this.isCurrentCharEOL()&&!this.eof();)this.next();else break}if(!this.isCurrentCharEOL()&&/\s/.test(this.char())){let r="\\u"+this.char().charCodeAt(0).toString(16),n=this.#t;throw new SyntaxError(`Cannot parse the TOML: It contains invalid whitespace at position '${n}': \`${r}\``)}}eof(){return this.position()>=this.#r.length}position(){return this.#t}isCurrentCharEOL(){return this.char()===`
`||this.slice(0,2)===`\r
`}};function u(t){return{ok:!0,body:t}}function p(){return{ok:!1}}function Q(t,e={},r){let n={};if(t.length===0)return r;r||(r=e);let i=t[t.length-1];return typeof i=="string"&&(n[i]=r),Q(t.slice(0,-1),e,n)}function N(t,e){if(e.key.length===0||e.key[0]==null)throw new Error("Cannot parse the TOML: key length is not a positive number");let r=t[e.key[0]];if(typeof r>"u")Object.assign(t,Q(e.key,e.type==="Table"?e.value:[e.value]));else if(Array.isArray(r))if(e.type==="TableArray"&&e.key.length===1)r.push(e.value);else{let n=r[r.length-1];N(n,{type:e.type,key:e.key.slice(1),value:e.value})}else if(typeof r=="object"&&r!==null)N(r,{type:e.type,key:e.key.slice(1),value:e.value});else throw new Error("Unexpected assign")}function V(t){return e=>{for(let r of t){let n=r(e);if(n.ok)return n}return p()}}function wt(t,e){let r=R(e);return n=>{let i=t(n);if(!i.ok)return p();let s=[i.body];for(;!n.eof()&&r(n).ok;){let o=t(n);if(!o.ok)throw new SyntaxError(`Invalid token after "${e}"`);s.push(o.body)}return u(s)}}function ye(t,e,r){let n=R(e);return i=>{let s=t(i);if(!s.ok)return p();if(!n(i).ok)throw new SyntaxError(`key/value pair doesn't have "${e}"`);let l=r(i);if(!l.ok)throw new SyntaxError("Value of key/value pair is invalid data format");return u(Q(s.body,l.body))}}function Ae(t){return e=>{let r=t(e);if(!r.ok)return p();let n={};for(let i of r.body)typeof n=="object"&&n!==null&&(n=O(n,i));return u(n)}}function St(t){return e=>{let r=[];for(;!e.eof();){let n=t(e);if(!n.ok)break;r.push(n.body),e.nextUntilChar()}return r.length===0?p():u(r)}}function Z(t,e,r){let n=R(t),i=R(r);return s=>{if(!n(s).ok)return p();let o=e(s);if(!o.ok)throw new SyntaxError(`Invalid token after "${t}"`);if(!i(s).ok)throw new SyntaxError(`Not closed by "${r}" after started with "${t}"`);return u(o.body)}}function R(t){return e=>(e.nextUntilChar({inline:!0}),e.slice(0,t.length)!==t?p():(e.next(t.length),e.nextUntilChar({inline:!0}),u(void 0)))}var gt=/[A-Za-z0-9_-]/,Et=/[0-9_\.e+\-]/i,Ce=/[ \t\r\n#,}\]]/;function Te(t){if(t.nextUntilChar({inline:!0}),!t.char()||!gt.test(t.char()))return p();let e=[];for(;t.char()&&gt.test(t.char());)e.push(t.char()),t.next();let r=e.join("");return u(r)}function kt(t){if(t.char()!=="\\")return p();switch(t.next(),t.char()){case"b":return t.next(),u("\b");case"t":return t.next(),u("	");case"n":return t.next(),u(`
`);case"f":return t.next(),u("\f");case"r":return t.next(),u("\r");case"u":case"U":{let e=t.char()==="u"?4:6,r=parseInt("0x"+t.slice(1,1+e),16),n=String.fromCodePoint(r);return t.next(e+1),u(n)}case'"':return t.next(),u('"');case"\\":return t.next(),u("\\");default:throw new SyntaxError(`Invalid escape sequence: \\${t.char()}`)}}function yt(t){if(t.nextUntilChar({inline:!0}),t.char()!=='"')return p();t.next();let e=[];for(;t.char()!=='"'&&!t.eof();){if(t.char()===`
`)throw new SyntaxError("Single-line string cannot contain EOL");let r=kt(t);r.ok?e.push(r.body):(e.push(t.char()),t.next())}if(t.eof())throw new SyntaxError(`Single-line string is not closed:
${e.join("")}`);return t.next(),u(e.join(""))}function At(t){if(t.nextUntilChar({inline:!0}),t.char()!=="'")return p();t.next();let e=[];for(;t.char()!=="'"&&!t.eof();){if(t.char()===`
`)throw new SyntaxError("Single-line string cannot contain EOL");e.push(t.char()),t.next()}if(t.eof())throw new SyntaxError(`Single-line string is not closed:
${e.join("")}`);return t.next(),u(e.join(""))}function _e(t){if(t.nextUntilChar({inline:!0}),t.slice(0,3)!=='"""')return p();t.next(3),t.char()===`
`?t.next():t.slice(0,2)===`\r
`&&t.next(2);let e=[];for(;t.slice(0,3)!=='"""'&&!t.eof();){if(t.slice(0,2)===`\\
`){t.next(),t.nextUntilChar({comment:!1});continue}else if(t.slice(0,3)===`\\\r
`){t.next(),t.nextUntilChar({comment:!1});continue}let r=kt(t);r.ok?e.push(r.body):(e.push(t.char()),t.next())}if(t.eof())throw new SyntaxError(`Multi-line string is not closed:
${e.join("")}`);return t.char(3)==='"'&&(e.push('"'),t.next()),t.next(3),u(e.join(""))}function be(t){if(t.nextUntilChar({inline:!0}),t.slice(0,3)!=="'''")return p();t.next(3),t.char()===`
`?t.next():t.slice(0,2)===`\r
`&&t.next(2);let e=[];for(;t.slice(0,3)!=="'''"&&!t.eof();)e.push(t.char()),t.next();if(t.eof())throw new SyntaxError(`Multi-line string is not closed:
${e.join("")}`);return t.char(3)==="'"&&(e.push("'"),t.next()),t.next(3),u(e.join(""))}var Ie=[["true",!0],["false",!1],["inf",1/0],["+inf",1/0],["-inf",-1/0],["nan",NaN],["+nan",NaN],["-nan",NaN]];function Me(t){t.nextUntilChar({inline:!0});let e=Ie.find(([i])=>t.slice(0,i.length)===i);if(!e)return p();let[r,n]=e;return t.next(r.length),u(n)}var J=wt(V([Te,yt,At]),".");function Oe(t){t.nextUntilChar({inline:!0});let e=t.slice(0,2);if(e.length===2&&/0(?:x|o|b)/i.test(e)){t.next(2);let i=[e];for(;/[0-9a-f_]/i.test(t.char())&&!t.eof();)i.push(t.char()),t.next();return i.length===1?p():u(i.join(""))}let r=[];for(/[+-]/.test(t.char())&&(r.push(t.char()),t.next());/[0-9_]/.test(t.char())&&!t.eof();)r.push(t.char()),t.next();if(r.length===0||r.length===1&&/[+-]/.test(r[0]))return p();let n=parseInt(r.filter(i=>i!=="_").join(""));return u(n)}function Ne(t){t.nextUntilChar({inline:!0});let e=0;for(;t.char(e)&&!Ce.test(t.char(e));){if(!Et.test(t.char(e)))return p();e++}let r=[];for(/[+-]/.test(t.char())&&(r.push(t.char()),t.next());Et.test(t.char())&&!t.eof();)r.push(t.char()),t.next();if(r.length===0)return p();let n=parseFloat(r.filter(i=>i!=="_").join(""));return isNaN(n)?p():u(n)}function Re(t){t.nextUntilChar({inline:!0});let e=t.slice(0,10);if(!/^\d{4}-\d{2}-\d{2}/.test(e))return p();t.next(10);let r=[];for(;/[ 0-9TZ.:-]/.test(t.char())&&!t.eof();)r.push(t.char()),t.next();e+=r.join("");let n=new Date(e.trim());if(isNaN(n.getTime()))throw new SyntaxError(`Invalid date string "${e}"`);return u(n)}function Le(t){t.nextUntilChar({inline:!0});let e=t.slice(0,8);if(!/^(\d{2}):(\d{2}):(\d{2})/.test(e))return p();t.next(8);let r=[];if(t.char()!==".")return u(e);for(r.push(t.char()),t.next();/[0-9]/.test(t.char())&&!t.eof();)r.push(t.char()),t.next();return e+=r.join(""),u(e)}function ve(t){if(t.nextUntilChar({inline:!0}),t.char()!=="[")return p();t.next();let e=[];for(;!t.eof();){t.nextUntilChar();let r=Ct(t);if(!r.ok||(e.push(r.body),t.nextUntilChar({inline:!0}),t.char()!==","))break;t.next()}if(t.nextUntilChar(),t.char()!=="]")throw new SyntaxError("Array is not closed");return t.next(),u(e)}function Pe(t){if(t.nextUntilChar(),t.char(1)==="}")return t.next(2),u({});let e=Z("{",wt(Tt,","),"}")(t);if(!e.ok)return p();let r={};for(let n of e.body)r=O(r,n);return u(r)}var Ct=V([_e,be,yt,At,Me,Re,Le,Ne,Oe,ve,Pe]),Tt=ye(J,"=",Ct);function z(t){t.nextUntilChar();let e=Ae(St(Tt))(t);return e.ok?u({type:"Block",value:e.body}):p()}var $e=Z("[",J,"]");function Ue(t){t.nextUntilChar();let e=$e(t);if(!e.ok)return p();t.nextUntilChar();let r=z(t);return u({type:"Table",key:e.body,value:r.ok?r.body.value:{}})}var Fe=Z("[[",J,"]]");function De(t){t.nextUntilChar();let e=Fe(t);if(!e.ok)return p();t.nextUntilChar();let r=z(t);return u({type:"TableArray",key:e.body,value:r.ok?r.body.value:{}})}function _t(t){let e=St(V([z,De,Ue]))(t);if(!e.ok)return p();let r={};for(let n of e.body)switch(n.type){case"Block":{r=O(r,n.value);break}case"Table":{N(r,n);break}case"TableArray":{N(r,n);break}}return u(r)}function bt(t){return e=>{let r=new W(e),n=null,i=null;try{n=t(r)}catch(s){i=s instanceof Error?s:new Error("Invalid error type caught")}if(i||!n||!n.ok||!r.eof()){let s=r.position(),o=e.slice(0,s),l=o.split(`
`),a=l.length,c=(()=>{let h=o.length;for(let x of l){if(h<=x.length)break;h-=x.length+1}return h})(),f=`Parse error on line ${a}, column ${c}: ${i?i.message:`Unexpected character: "${r.char()}"`}`;throw new SyntaxError(f)}return n.body}}function It(t){return bt(_t)(t)}function Be(t){return T(t,j,It)}function E(t){return t===10||t===13}function k(t){return t===9||t===32}function g(t){return k(t)||E(t)}function y(t){return t===44||t===91||t===93||t===123||t===125}var tt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Ge(t){if(t===null)return!1;let e,r=0,n=t.length,i=tt;for(let s=0;s<n;s++)if(e=i.indexOf(t.charAt(s)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function Ye(t){let e=t.replace(/[\r\n=]/g,""),r=e.length,n=tt,i=[],s=0;for(let l=0;l<r;l++)l%4===0&&l&&(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)),s=s<<6|n.indexOf(e.charAt(l));let o=r%4*6;return o===0?(i.push(s>>16&255),i.push(s>>8&255),i.push(s&255)):o===18?(i.push(s>>10&255),i.push(s>>2&255)):o===12&&i.push(s>>4&255),new Uint8Array(i)}function He(t){let e=t.length,r=tt,n="",i=0;for(let o=0;o<e;o++)o%3===0&&o&&(n+=r[i>>18&63],n+=r[i>>12&63],n+=r[i>>6&63],n+=r[i&63]),i=(i<<8)+t[o];let s=e%3;return s===0?(n+=r[i>>18&63],n+=r[i>>12&63],n+=r[i>>6&63],n+=r[i&63]):s===2?(n+=r[i>>10&63],n+=r[i>>4&63],n+=r[i<<2&63],n+=r[64]):s===1&&(n+=r[i>>2&63],n+=r[i<<4&63],n+=r[64],n+=r[64]),n}function Xe(t){return t instanceof Uint8Array}var Mt={tag:"tag:yaml.org,2002:binary",construct:Ye,kind:"scalar",predicate:Xe,represent:He,resolve:Ge};var Ot=["true","True","TRUE"],je=["false","False","FALSE"],Ke=[...Ot,...je],Nt={tag:"tag:yaml.org,2002:bool",kind:"scalar",defaultStyle:"lowercase",predicate:t=>typeof t=="boolean"||t instanceof Boolean,construct:t=>Ot.includes(t),resolve:t=>Ke.includes(t),represent:{lowercase:t=>(t instanceof Boolean?t.valueOf():t)?"true":"false",uppercase:t=>(t instanceof Boolean?t.valueOf():t)?"TRUE":"FALSE",camelcase:t=>(t instanceof Boolean?t.valueOf():t)?"True":"False"}};function Rt(t){return t!==null&&typeof t=="object"}function _(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}function A(t){return Object.prototype.toString.call(t)==="[object Object]"}var qe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function We(t){return!(!qe.test(t)||t[t.length-1]==="_")}function Qe(t){let e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1;return e[0]&&"+-".includes(e[0])&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e)}var Ve=/^[-+]?[0-9]+e/;function Ze(t,e){let r=t instanceof Number?t.valueOf():t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_(r))return"-0.0";let n=r.toString(10);return Ve.test(n)?n.replace("e",".e"):n}function Je(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&(t%1!==0||_(t))}var Lt={tag:"tag:yaml.org,2002:float",construct:Qe,defaultStyle:"lowercase",kind:"scalar",predicate:Je,represent:Ze,resolve:We};function b(t,e,r){return e<=t&&t<=r}function ze(t){return b(t,48,57)||b(t,65,70)||b(t,97,102)}function tr(t){return b(t,48,55)}function er(t){return b(t,48,57)}function rr(t){let e=t.length,r=0,n=!1;if(!e)return!1;let i=t[r];if((i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!ze(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}for(;r<e;r++)if(i=t[r],i!=="_"){if(!tr(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!er(t.charCodeAt(r)))return!1;n=!0}return!n||i==="_"?!1:/^(:[0-5]?[0-9])+$/.test(t.slice(r))}function ir(t){let e=t;e.includes("_")&&(e=e.replace(/_/g,""));let r=1,n=e[0];return(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0"?0:n==="0"?e[1]==="b"?r*parseInt(e.slice(2),2):e[1]==="x"?r*parseInt(e,16):r*parseInt(e,8):r*parseInt(e,10)}function nr(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&t%1===0&&!_(t)}var vt={tag:"tag:yaml.org,2002:int",construct:ir,defaultStyle:"decimal",kind:"scalar",predicate:nr,represent:{binary(t){let e=t instanceof Number?t.valueOf():t;return e>=0?`0b${e.toString(2)}`:`-0b${e.toString(2).slice(1)}`},octal(t){let e=t instanceof Number?t.valueOf():t;return e>=0?`0${e.toString(8)}`:`-0${e.toString(8).slice(1)}`},decimal(t){return(t instanceof Number?t.valueOf():t).toString(10)},hexadecimal(t){let e=t instanceof Number?t.valueOf():t;return e>=0?`0x${e.toString(16).toUpperCase()}`:`-0x${e.toString(16).toUpperCase().slice(1)}`}},resolve:rr};var Pt={tag:"tag:yaml.org,2002:map",resolve(){return!0},construct(t){return t!==null?t:{}},kind:"mapping"};var $t={tag:"tag:yaml.org,2002:merge",kind:"scalar",resolve:t=>t==="<<"||t===null,construct:t=>t};var Ut={tag:"tag:yaml.org,2002:null",kind:"scalar",defaultStyle:"lowercase",predicate:t=>t===null,construct:()=>null,resolve:t=>t==="~"||t==="null"||t==="Null"||t==="NULL",represent:{lowercase:()=>"null",uppercase:()=>"NULL",camelcase:()=>"Null"}};function sr(t){let e=new Set;for(let r of t){if(!A(r))return!1;let n=Object.keys(r);if(n.length!==1)return!1;for(let i of n){if(e.has(i))return!1;e.add(i)}}return!0}var Ft={tag:"tag:yaml.org,2002:omap",kind:"sequence",resolve:sr,construct(t){return t}};function or(t){return t===null?!0:t.every(e=>A(e)&&Object.keys(e).length===1)}var Dt={tag:"tag:yaml.org,2002:pairs",construct(t){return t?.flatMap(Object.entries)??[]},kind:"sequence",resolve:or};var Bt=/^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/,Gt={tag:"tag:yaml.org,2002:js/regexp",kind:"scalar",resolve(t){if(t===null||!t.length)return!1;if(t.charAt(0)==="/"){let e=t.match(Bt)?.groups;if(!e)return!1;let r=e.modifiers??"";if(new Set(r).size<r.length)return!1}return!0},construct(t){let{regexp:e=t,modifiers:r=""}=t.match(Bt)?.groups??{};return new RegExp(e,r)},predicate:t=>t instanceof RegExp,represent:t=>t.toString()};var Yt={tag:"tag:yaml.org,2002:seq",kind:"sequence",resolve:()=>!0,construct:t=>t!==null?t:[]};var Ht={tag:"tag:yaml.org,2002:set",kind:"mapping",construct:t=>t!==null?t:{},resolve:t=>t===null?!0:Object.values(t).every(e=>e===null)};var Xt={tag:"tag:yaml.org,2002:str",kind:"scalar",resolve:()=>!0,construct:t=>t!==null?t:""};var jt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Kt=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ar(t){return t===null?!1:jt.exec(t)!==null||Kt.exec(t)!==null}function lr(t){let e=jt.exec(t);if(e===null&&(e=Kt.exec(t)),e===null)throw new Error("Cannot construct YAML timestamp: date resolve error");let r=+e[1],n=+e[2]-1,i=+e[3];if(!e[4])return new Date(Date.UTC(r,n,i));let s=+e[4],o=+e[5],l=+e[6],a=0;if(e[7]){let h=e[7].slice(0,3);for(;h.length<3;)h+="0";a=+h}let c=null;if(e[9]&&e[10]){let h=+e[10],x=+(e[11]||0);c=(h*60+x)*6e4,e[9]==="-"&&(c=-c)}let f=new Date(Date.UTC(r,n,i,s,o,l,a));return c&&f.setTime(f.getTime()-c),f}function hr(t){return t.toISOString()}var qt={tag:"tag:yaml.org,2002:timestamp",construct:lr,predicate(t){return t instanceof Date},kind:"scalar",represent:hr,resolve:ar};var Wt={tag:"tag:yaml.org,2002:js/undefined",kind:"scalar",resolve(){return!0},construct(){},predicate(t){return typeof t>"u"},represent(){return""}};function ur(t,e){let r={fallback:new Map,mapping:new Map,scalar:new Map,sequence:new Map},n=r.fallback;for(let i of[...t,...e])r[i.kind].set(i.tag,i),n.set(i.tag,i);return r}function I({explicitTypes:t=[],implicitTypes:e=[],include:r}){r&&(e.push(...r.implicitTypes),t.push(...r.explicitTypes));let n=ur(e,t);return{implicitTypes:e,explicitTypes:t,typeMap:n}}var Qt=I({explicitTypes:[Xt,Yt,Pt]}),Vt=I({implicitTypes:[Ut,Nt,vt,Lt],include:Qt}),Zt=I({include:Vt}),L=I({explicitTypes:[Mt,Ft,Dt,Ht],implicitTypes:[qt,$t],include:Zt}),cr=I({explicitTypes:[Gt,Wt],include:L}),Jt=new Map([["core",Zt],["default",L],["failsafe",Qt],["json",Vt],["extended",cr]]);var F=1,ae=2,le=3,D=4,nt=1,kr=2,he=3,yr=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ar=/[\x85\u2028\u2029]/,Cr=/[,\[\]\{\}]/,ue=/^(?:!|!!|![a-z\-]+!)$/i,ce=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,Tr=new Map([[120,2],[117,4],[85,8]]),fe=new Map([[48,"\0"],[97,"\x07"],[98,"\b"],[116,"	"],[9,"	"],[110,`
`],[118,"\v"],[102,"\f"],[114,"\r"],[101,"\x1B"],[32," "],[34,'"'],[47,"/"],[92,"\\"],[78,"\x85"],[95,"\xA0"],[76,"\u2028"],[80,"\u2029"]]);function _r(t){if(48<=t&&t<=57)return t-48;let e=t|32;return 97<=e&&e<=102?e-97+10:-1}function br(t){return 48<=t&&t<=57?t-48:-1}function Ir(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var pe=4,xe=75,de=`\0\r
\x85\u2028\u2029`;function Mr(t,e){if(!t)return null;let r=e,n=e,i="",s="";for(;r>0&&!de.includes(t.charAt(r-1));)if(r--,e-r>xe/2-1){i=" ... ",r+=5;break}for(;n<t.length&&!de.includes(t.charAt(n));)if(n++,n-e>xe/2-1){s=" ... ",n-=5;break}let o=t.slice(r,n),l=" ".repeat(pe),a=" ".repeat(pe+e-r+i.length);return`${l+i+o+s}
${a}^`}function Or(t,e,r,n){let i=`at line ${r+1}, column ${n+1}`,s=Mr(t,e);return s&&(i+=`:
${s}`),i}var B=class{input;length;lineIndent=0;lineStart=0;position=0;line=0;onWarning;allowDuplicateKeys;implicitTypes;typeMap;version;checkLineBreaks=!1;tagMap=new Map;anchorMap=new Map;tag;anchor;kind;result="";constructor(e,{schema:r=L,onWarning:n,allowDuplicateKeys:i=!1}){this.input=e,this.onWarning=n,this.allowDuplicateKeys=i,this.implicitTypes=r.implicitTypes,this.typeMap=r.typeMap,this.length=e.length,this.version=null,this.readIndent()}readIndent(){let e=this.peek();for(;e===32;)this.lineIndent+=1,e=this.next()}peek(e=0){return this.input.charCodeAt(this.position+e)}next(){return this.position+=1,this.peek()}#e(e){let r=Or(this.input,this.position,this.line,this.position-this.lineStart);return new SyntaxError(`${e} ${r}`)}throwError(e){throw this.#e(e)}dispatchWarning(e){let r=this.#e(e);this.onWarning?.(r)}yamlDirectiveHandler(...e){if(this.version!==null)return this.throwError("Cannot handle YAML directive: duplication of %YAML directive");if(e.length!==1)return this.throwError("Cannot handle YAML directive: YAML directive accepts exactly one argument");let r=/^([0-9]+)\.([0-9]+)$/.exec(e[0]);if(r===null)return this.throwError("Cannot handle YAML directive: ill-formed argument");let n=parseInt(r[1],10),i=parseInt(r[2],10);if(n!==1)return this.throwError("Cannot handle YAML directive: unacceptable YAML version");if(this.version=e[0]??null,this.checkLineBreaks=i<2,i!==1&&i!==2)return this.dispatchWarning("Cannot handle YAML directive: unsupported YAML version")}tagDirectiveHandler(...e){if(e.length!==2)return this.throwError(`Cannot handle tag directive: directive accepts exactly two arguments, received ${e.length}`);let r=e[0],n=e[1];if(!ue.test(r))return this.throwError(`Cannot handle tag directive: ill-formed handle (first argument) in "${r}"`);if(this.tagMap.has(r))return this.throwError(`Cannot handle tag directive: previously declared suffix for "${r}" tag handle`);if(!ce.test(n))return this.throwError("Cannot handle tag directive: ill-formed tag prefix (second argument) of the TAG directive");this.tagMap.set(r,n)}captureSegment(e,r,n){let i;if(e<r){if(i=this.input.slice(e,r),n)for(let s=0;s<i.length;s++){let o=i.charCodeAt(s);if(!(o===9||32<=o&&o<=1114111))return this.throwError(`Expected valid JSON character: received "${o}"`)}else if(yr.test(i))return this.throwError("Stream contains non-printable characters");this.result+=i}}readBlockSequence(e){let r,n,i=!1,s,o=this.tag,l=this.anchor,a=[];for(this.anchor!==null&&typeof this.anchor<"u"&&this.anchorMap.set(this.anchor,a),s=this.peek();s!==0&&!(s!==45||(n=this.peek(1),!g(n)));){if(i=!0,this.position++,this.skipSeparationSpace(!0,-1)&&this.lineIndent<=e){a.push(null),s=this.peek();continue}if(r=this.line,this.composeNode(e,le,!1,!0),a.push(this.result),this.skipSeparationSpace(!0,-1),s=this.peek(),(this.line===r||this.lineIndent>e)&&s!==0)return this.throwError("Cannot read block sequence: bad indentation of a sequence entry");if(this.lineIndent<e)break}return i?(this.tag=o,this.anchor=l,this.kind="sequence",this.result=a,!0):!1}mergeMappings(e,r,n){if(!Rt(r))return this.throwError("Cannot merge mappings: the provided source object is unacceptable");for(let[i,s]of Object.entries(r))Object.hasOwn(e,i)||(Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0}),n.add(i))}storeMappingPair(e,r,n,i,s,o,l){if(Array.isArray(i)){i=Array.prototype.slice.call(i);for(let a=0;a<i.length;a++){if(Array.isArray(i[a]))return this.throwError("Cannot store mapping pair: nested arrays are not supported inside keys");typeof i=="object"&&A(i[a])&&(i[a]="[object Object]")}}if(typeof i=="object"&&A(i)&&(i="[object Object]"),i=String(i),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(let a=0;a<s.length;a++)this.mergeMappings(e,s[a],r);else this.mergeMappings(e,s,r);else{if(!this.allowDuplicateKeys&&!r.has(i)&&Object.hasOwn(e,i))return this.line=o||this.line,this.position=l||this.position,this.throwError("Cannot store mapping pair: duplicated key");Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0}),r.delete(i)}return e}readLineBreak(){let e=this.peek();if(e===10)this.position++;else if(e===13)this.position++,this.peek()===10&&this.position++;else return this.throwError("Cannot read line: line break not found");this.line+=1,this.lineStart=this.position}skipSeparationSpace(e,r){let n=0,i=this.peek();for(;i!==0;){for(;k(i);)i=this.next();if(e&&i===35)do i=this.next();while(i!==10&&i!==13&&i!==0);if(E(i))this.readLineBreak(),i=this.peek(),n++,this.lineIndent=0,this.readIndent(),i=this.peek();else break}return r!==-1&&n!==0&&this.lineIndent<r&&this.dispatchWarning("deficient indentation"),n}testDocumentSeparator(){let e=this.peek();return!!((e===45||e===46)&&e===this.peek(1)&&e===this.peek(2)&&(e=this.peek(3),e===0||g(e)))}writeFoldedLines(e){e===1?this.result+=" ":e>1&&(this.result+=`
`.repeat(e-1))}readPlainScalar(e,r){let n=this.kind,i=this.result,s=this.peek();if(g(s)||y(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96)return!1;let o;if((s===63||s===45)&&(o=this.peek(1),g(o)||r&&y(o)))return!1;this.kind="scalar",this.result="";let l=this.position,a=this.position,c=!1,f=0;for(;s!==0;){if(s===58){if(o=this.peek(1),g(o)||r&&y(o))break}else if(s===35){let h=this.peek(-1);if(g(h))break}else{if(this.position===this.lineStart&&this.testDocumentSeparator()||r&&y(s))break;if(E(s)){f=this.line;let h=this.lineStart,x=this.lineIndent;if(this.skipSeparationSpace(!1,-1),this.lineIndent>=e){c=!0,s=this.peek();continue}else{this.position=l,this.line=f,this.lineStart=h,this.lineIndent=x;break}}}c&&(this.captureSegment(a,l,!1),this.writeFoldedLines(this.line-f),a=l=this.position,c=!1),k(s)||(l=this.position+1),s=this.next()}return this.captureSegment(a,l,!1),this.result?!0:(this.kind=n,this.result=i,!1)}readSingleQuotedScalar(e){let r,n,i;if(r=this.peek(),r!==39)return!1;for(this.kind="scalar",this.result="",this.position++,n=i=this.position;(r=this.peek())!==0;)if(r===39)if(this.captureSegment(n,this.position,!0),r=this.next(),r===39)n=this.position,this.position++,i=this.position;else return!0;else if(E(r))this.captureSegment(n,i,!0),this.writeFoldedLines(this.skipSeparationSpace(!1,e)),n=i=this.position;else{if(this.position===this.lineStart&&this.testDocumentSeparator())return this.throwError("Unexpected end of the document within a single quoted scalar");this.position++,i=this.position}return this.throwError("Unexpected end of the stream within a single quoted scalar")}readDoubleQuotedScalar(e){let r=this.peek();if(r!==34)return!1;this.kind="scalar",this.result="",this.position++;let n=this.position,i=this.position,s;for(;(r=this.peek())!==0;){if(r===34)return this.captureSegment(i,this.position,!0),this.position++,!0;if(r===92){if(this.captureSegment(i,this.position,!0),r=this.next(),E(r))this.skipSeparationSpace(!1,e);else if(r<256&&fe.has(r))this.result+=fe.get(r),this.position++;else if((s=Tr.get(r)??0)>0){let o=s,l=0;for(;o>0;o--)if(r=this.next(),(s=_r(r))>=0)l=(l<<4)+s;else return this.throwError("Cannot read double quoted scalar: expected hexadecimal character");this.result+=Ir(l),this.position++}else return this.throwError("Cannot read double quoted scalar: unknown escape sequence");i=n=this.position}else if(E(r))this.captureSegment(i,n,!0),this.writeFoldedLines(this.skipSeparationSpace(!1,e)),i=n=this.position;else{if(this.position===this.lineStart&&this.testDocumentSeparator())return this.throwError("Unexpected end of the document within a double quoted scalar");this.position++,n=this.position}}return this.throwError("Unexpected end of the stream within a double quoted scalar")}readFlowCollection(e){let r=this.peek(),n,i=!0,s={};if(r===91)n=93,i=!1,s=[];else if(r===123)n=125;else return!1;this.anchor!==null&&typeof this.anchor<"u"&&this.anchorMap.set(this.anchor,s),r=this.next();let o=this.tag,l=this.anchor,a=!0,c=null,f=null,h=null,x=!1,w=!1,d=0,S=0,m=new Set;for(;r!==0;){if(this.skipSeparationSpace(!0,e),r=this.peek(),r===n)return this.position++,this.tag=o,this.anchor=l,this.kind=i?"mapping":"sequence",this.result=s,!0;if(!a)return this.throwError("Cannot read flow collection: missing comma between flow collection entries");h=f=c=null,w=x=!1,r===63&&(d=this.peek(1),g(d)&&(w=x=!0,this.position++,this.skipSeparationSpace(!0,e))),S=this.line,this.composeNode(e,F,!1,!0),h=this.tag||null,f=this.result,this.skipSeparationSpace(!0,e),r=this.peek(),(x||this.line===S)&&r===58&&(w=!0,r=this.next(),this.skipSeparationSpace(!0,e),this.composeNode(e,F,!1,!0),c=this.result),i?this.storeMappingPair(s,m,h,f,c):w?s.push(this.storeMappingPair({},m,h,f,c)):s.push(f),this.skipSeparationSpace(!0,e),r=this.peek(),r===44?(a=!0,r=this.next()):a=!1}return this.throwError("Cannot read flow collection: unexpected end of the stream within a flow collection")}readBlockScalar(e){let r=nt,n=!1,i=!1,s=e,o=0,l=!1,a=this.peek(),c=!1;if(a===124)c=!1;else if(a===62)c=!0;else return!1;this.kind="scalar",this.result="";let f=0;for(;a!==0;)if(a=this.next(),a===43||a===45)if(nt===r)r=a===43?he:kr;else return this.throwError("Cannot read block: chomping mode identifier repeated");else if((f=br(a))>=0){if(f===0)return this.throwError("Cannot read block: indentation width must be greater than 0");if(!i)s=e+f-1,i=!0;else return this.throwError("Cannot read block: indentation width identifier repeated")}else break;if(k(a)){do a=this.next();while(k(a));if(a===35)do a=this.next();while(!E(a)&&a!==0)}for(;a!==0;){for(this.readLineBreak(),this.lineIndent=0,a=this.peek();(!i||this.lineIndent<s)&&a===32;)this.lineIndent++,a=this.next();if(!i&&this.lineIndent>s&&(s=this.lineIndent),E(a)){o++;continue}if(this.lineIndent<s){r===he?this.result+=`
`.repeat(n?1+o:o):r===nt&&n&&(this.result+=`
`);break}c?k(a)?(l=!0,this.result+=`
`.repeat(n?1+o:o)):l?(l=!1,this.result+=`
`.repeat(o+1)):o===0?n&&(this.result+=" "):this.result+=`
`.repeat(o):this.result+=`
`.repeat(n?1+o:o),n=!0,i=!0,o=0;let h=this.position;for(;!E(a)&&a!==0;)a=this.next();this.captureSegment(h,this.position,!1)}return!0}readBlockMapping(e,r){let n=this.tag,i=this.anchor,s={},o=new Set,l,a=!1,c,f,h=null,x=null,w=null,d=!1,S=!1,m;for(this.anchor!==null&&typeof this.anchor<"u"&&this.anchorMap.set(this.anchor,s),m=this.peek();m!==0;){if(l=this.peek(1),c=this.line,f=this.position,(m===63||m===58)&&g(l)){if(m===63)d&&(this.storeMappingPair(s,o,h,x,null),h=x=w=null),S=!0,d=!0,a=!0;else if(d)d=!1,a=!0;else return this.throwError("Cannot read block as explicit mapping pair is incomplete: a key node is missed or followed by a non-tabulated empty line");this.position+=1,m=l}else if(this.composeNode(r,ae,!1,!0))if(this.line===c){for(m=this.peek();k(m);)m=this.next();if(m===58){if(m=this.next(),!g(m))return this.throwError("Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");d&&(this.storeMappingPair(s,o,h,x,null),h=x=w=null),S=!0,d=!1,a=!1,h=this.tag,x=this.result}else return S?this.throwError("Cannot read an implicit mapping pair: missing colon"):(this.tag=n,this.anchor=i,!0)}else return S?this.throwError("Cannot read a block mapping entry: a multiline key may not be an implicit key"):(this.tag=n,this.anchor=i,!0);else break;if((this.line===c||this.lineIndent>e)&&(this.composeNode(e,D,!0,a)&&(d?x=this.result:w=this.result),d||(this.storeMappingPair(s,o,h,x,w,c,f),h=x=w=null),this.skipSeparationSpace(!0,-1),m=this.peek()),this.lineIndent>e&&m!==0)return this.throwError("Cannot read block: bad indentation of a mapping entry");if(this.lineIndent<e)break}return d&&this.storeMappingPair(s,o,h,x,null),S&&(this.tag=n,this.anchor=i,this.kind="mapping",this.result=s),S}readTagProperty(){let e,r=!1,n=!1,i="",s,o;if(o=this.peek(),o!==33)return!1;if(this.tag!==null)return this.throwError("Cannot read tag property: duplication of a tag property");if(o=this.next(),o===60?(r=!0,o=this.next()):o===33?(n=!0,i="!!",o=this.next()):i="!",e=this.position,r){do o=this.next();while(o!==0&&o!==62);if(this.position<this.length)s=this.input.slice(e,this.position),o=this.next();else return this.throwError("Cannot read tag property: unexpected end of stream")}else{for(;o!==0&&!g(o);){if(o===33){if(n)return this.throwError("Cannot read tag property: tag suffix cannot contain an exclamation mark");if(i=this.input.slice(e-1,this.position+1),!ue.test(i))return this.throwError("Cannot read tag property: named tag handle contains invalid characters");n=!0,e=this.position+1}o=this.next()}if(s=this.input.slice(e,this.position),Cr.test(s))return this.throwError("Cannot read tag property: tag suffix cannot contain flow indicator characters")}if(s&&!ce.test(s))return this.throwError(`Cannot read tag property: invalid characters in tag name "${s}"`);if(r)this.tag=s;else if(this.tagMap.has(i))this.tag=this.tagMap.get(i)+s;else if(i==="!")this.tag=`!${s}`;else if(i==="!!")this.tag=`tag:yaml.org,2002:${s}`;else return this.throwError(`Cannot read tag property: undeclared tag handle "${i}"`);return!0}readAnchorProperty(){let e=this.peek();if(e!==38)return!1;if(this.anchor!==null)return this.throwError("Cannot read anchor property: duplicate anchor property");e=this.next();let r=this.position;for(;e!==0&&!g(e)&&!y(e);)e=this.next();return this.position===r?this.throwError("Cannot read anchor property: name of an anchor node must contain at least one character"):(this.anchor=this.input.slice(r,this.position),!0)}readAlias(){if(this.peek()!==42)return!1;let e=this.next(),r=this.position;for(;e!==0&&!g(e)&&!y(e);)e=this.next();if(this.position===r)return this.throwError("Cannot read alias: alias name must contain at least one character");let n=this.input.slice(r,this.position);return this.anchorMap.has(n)?(this.result=this.anchorMap.get(n),this.skipSeparationSpace(!0,-1),!0):this.throwError(`Cannot read alias: unidentified alias "${n}"`)}composeNode(e,r,n,i){let s,o,l=1,a=!1,c=!1,f,h,x;this.tag=null,this.anchor=null,this.kind=null,this.result=null;let w=s=o=D===r||le===r;if(n&&this.skipSeparationSpace(!0,-1)&&(a=!0,this.lineIndent>e?l=1:this.lineIndent===e?l=0:this.lineIndent<e&&(l=-1)),l===1)for(;this.readTagProperty()||this.readAnchorProperty();)this.skipSeparationSpace(!0,-1)?(a=!0,o=w,this.lineIndent>e?l=1:this.lineIndent===e?l=0:this.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=a||i),l===1||D===r)if(h=F===r||ae===r?e:e+1,x=this.position-this.lineStart,l===1)if(o&&(this.readBlockSequence(x)||this.readBlockMapping(x,h))||this.readFlowCollection(h))c=!0;else{if(s&&this.readBlockScalar(h)||this.readSingleQuotedScalar(h)||this.readDoubleQuotedScalar(h))c=!0;else if(this.readAlias()){if(c=!0,this.tag!==null||this.anchor!==null)return this.throwError("Cannot compose node: alias node should not have any properties")}else this.readPlainScalar(h,F===r)&&(c=!0,this.tag===null&&(this.tag="?"));this.anchor!==null&&this.anchorMap.set(this.anchor,this.result)}else l===0&&(c=o&&this.readBlockSequence(x));if(this.tag!==null&&this.tag!=="!")if(this.tag==="?"){for(let d=0;d<this.implicitTypes.length;d++)if(f=this.implicitTypes[d],f.resolve(this.result)){this.result=f.construct(this.result),this.tag=f.tag,this.anchor!==null&&this.anchorMap.set(this.anchor,this.result);break}}else if(this.typeMap[this.kind??"fallback"].has(this.tag)){if(f=this.typeMap[this.kind??"fallback"].get(this.tag),this.result!==null&&f.kind!==this.kind)return this.throwError(`Unacceptable node kind for !<${this.tag}> tag: it should be "${f.kind}", not "${this.kind}"`);if(f.resolve(this.result))this.result=f.construct(this.result),this.anchor!==null&&this.anchorMap.set(this.anchor,this.result);else return this.throwError(`Cannot resolve a node with !<${this.tag}> explicit tag`)}else return this.throwError(`Cannot resolve unknown tag !<${this.tag}>`);return this.tag!==null||this.anchor!==null||c}readDocument(){let e=this.position,r,n,i,s=!1,o;for(this.version=null,this.checkLineBreaks=!1,this.tagMap=new Map,this.anchorMap=new Map;(o=this.peek())!==0&&(this.skipSeparationSpace(!0,-1),o=this.peek(),!(this.lineIndent>0||o!==37));){for(s=!0,o=this.next(),r=this.position;o!==0&&!g(o);)o=this.next();if(n=this.input.slice(r,this.position),i=[],n.length<1)return this.throwError("Cannot read document: directive name length must be greater than zero");for(;o!==0;){for(;k(o);)o=this.next();if(o===35){do o=this.next();while(o!==0&&!E(o));break}if(E(o))break;for(r=this.position;o!==0&&!g(o);)o=this.next();i.push(this.input.slice(r,this.position))}switch(o!==0&&this.readLineBreak(),n){case"YAML":this.yamlDirectiveHandler(...i);break;case"TAG":this.tagDirectiveHandler(...i);break;default:this.dispatchWarning(`unknown document directive "${n}"`);break}}if(this.skipSeparationSpace(!0,-1),this.lineIndent===0&&this.peek()===45&&this.peek(1)===45&&this.peek(2)===45)this.position+=3,this.skipSeparationSpace(!0,-1);else if(s)return this.throwError("Cannot read document: directives end mark is expected");if(this.composeNode(this.lineIndent-1,D,!1,!0),this.skipSeparationSpace(!0,-1),this.checkLineBreaks&&Ar.test(this.input.slice(e,this.position))&&this.dispatchWarning("non-ASCII line breaks are interpreted as content"),this.position===this.lineStart&&this.testDocumentSeparator())this.peek()===46&&(this.position+=3,this.skipSeparationSpace(!0,-1));else if(this.position<this.length-1)return this.throwError("Cannot read document: end of the stream or a document separator is expected");return this.result}*readDocuments(){for(;this.position<this.length-1;)yield this.readDocument()}};function Nr(t){return t=String(t),t.length>0&&(E(t.charCodeAt(t.length-1))||(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1))),t+="\0",t}function me(t,e={}){t=Nr(t);let n=new B(t,{...e,schema:Jt.get(e.schema)}).readDocuments(),i=n.next().value;if(!n.next().done)throw new SyntaxError("Found more than 1 document in the stream: expected a single document");return i??null}function Rr(t){return T(t,X,e=>me(e))}function Vi(t,e){e||(e=[...q.keys()]);for(let r of e){let n=q.get(r);if(!n)throw new TypeError(`Unable to test for ${r} front matter format`);if(n.exec(t)?.index===0)return!0}return!1}export{Se as extractJson,Be as extractToml,Rr as extractYaml,Vi as test};
//# sourceMappingURL=mod.bundle.js.map