@cbortech/cbor 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +127 -49
- package/README.md +128 -49
- package/dist/ast/CborAppSeqResult.d.ts +20 -0
- package/dist/ast/CborArray.d.ts +3 -3
- package/dist/ast/CborBignum.d.ts +5 -5
- package/dist/ast/CborByteString.d.ts +2 -2
- package/dist/ast/CborEllipsis.d.ts +2 -2
- package/dist/ast/CborEmbeddedCBOR.d.ts +3 -3
- package/dist/ast/CborFloat.d.ts +8 -2
- package/dist/ast/CborIndefiniteByteString.d.ts +3 -3
- package/dist/ast/CborIndefiniteTextString.d.ts +3 -3
- package/dist/ast/CborItem.d.ts +22 -10
- package/dist/ast/CborMap.d.ts +3 -3
- package/dist/ast/CborNint.d.ts +2 -2
- package/dist/ast/CborSimple.d.ts +2 -2
- package/dist/ast/CborTag.d.ts +3 -3
- package/dist/ast/CborTextString.d.ts +2 -2
- package/dist/ast/CborUint.d.ts +2 -2
- package/dist/ast/CborUnresolvedAppExt.d.ts +2 -2
- package/dist/ast/index.cjs +1 -1
- package/dist/ast/index.js +2 -2
- package/dist/cbor.d.ts +44 -26
- package/dist/cdn/parser.d.ts +7 -0
- package/dist/{edn → cdn}/serialize-utils.d.ts +20 -7
- package/dist/cdn/serializer.d.ts +7 -0
- package/dist/cdn/test-vectors/runner.d.ts +22 -0
- package/dist/{edn → cdn}/tokenizer.d.ts +28 -25
- package/dist/extensions/b32.d.ts +5 -0
- package/dist/extensions/cri.d.ts +7 -7
- package/dist/extensions/dt.d.ts +10 -19
- package/dist/extensions/float.d.ts +7 -0
- package/dist/extensions/ip.d.ts +8 -8
- package/dist/extensions/same.d.ts +7 -0
- package/dist/extensions/types.d.ts +30 -8
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +244 -77
- package/dist/index.js.map +1 -1
- package/dist/mapEntries-BccT62HT.cjs +36 -0
- package/dist/mapEntries-BccT62HT.cjs.map +1 -0
- package/dist/{mapEntries-D5MWtXqq.js → mapEntries-ZR8QJ0Yj.js} +1157 -853
- package/dist/mapEntries-ZR8QJ0Yj.js.map +1 -0
- package/dist/simple.d.ts +2 -2
- package/dist/tag.d.ts +1 -1
- package/dist/types.d.ts +141 -30
- package/dist/utils/hexfloat.d.ts +2 -2
- package/dist/utils/strip-comments.d.ts +12 -0
- package/package.json +13 -11
- package/dist/edn/parser.d.ts +0 -7
- package/dist/edn/serializer.d.ts +0 -7
- package/dist/mapEntries-D5MWtXqq.js.map +0 -1
- package/dist/mapEntries-bihZ3yks.cjs +0 -31
- package/dist/mapEntries-bihZ3yks.cjs.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var e=Symbol.for(`cbor.tag`),t=class{valueOf(){return null}toJSON(){return null}},n=class{valueOf(){}toJSON(){}};function r(t){if(!s(t))return;let n=t[e];return typeof n==`bigint`?n:void 0}function i(r,i){let a;switch(typeof r){case`number`:a=new Number(r);break;case`string`:a=new String(r);break;case`boolean`:a=new Boolean(r);break;case`bigint`:a=Object(r);break;case`undefined`:a=new n;break;case`object`:if(r===null){a=new t;break}a=r;break;default:throw TypeError(`setCborTag: cannot tag value of type ${typeof r}`)}return a[e]=i,a}function a(r){if(r instanceof Number||r instanceof String||r instanceof Boolean||Object.prototype.toString.call(r)===`[object BigInt]`)return r.valueOf();if(r instanceof t)return null;if(!(r instanceof n))return typeof r==`object`&&r&&delete r[e],r}function o(e){if(e instanceof Number||e instanceof String||e instanceof Boolean||Object.prototype.toString.call(e)===`[object BigInt]`)return e.valueOf();if(e instanceof t)return null;if(!(e instanceof n))return e}function s(e){return typeof e==`object`&&!!e}var c=class{constructor(){}static symbol=e;static Null=t;static Undefined=n;static get(e){return r(e)}static set(e,t){return i(e,t)}static remove(e){return a(e)}static getValue(e){return o(e)}},l=Symbol(`cbor.omit`),u=class e{value;constructor(e){if(!Number.isInteger(e)||e<0||e>255)throw RangeError(`Simple value must be an integer in 0–255`);this.value=e}valueOf(){return this.value}toJSON(){throw TypeError(`simple(${this.value}) cannot be serialized to JSON`)}static is(t){return t instanceof e}static get(t){return t instanceof e?t.value:void 0}};function d(e){let t=e?.indent;return t===void 0?null:typeof t==`number`?` `.repeat(t):t}function f(e,t){return e.repeat(t)}function p(e){return!!(e.comments?.leading?.length||e.comments?.trailing?.length||e.comments?.dangling?.length)}function ee(e){return!!(e.comments?.trailing?.length||e.comments?.dangling?.length)}function m(e,t){if(!t)return e.text;let{marker:n,text:r}=e;if(t===`c-style`)return n===`#`?`//`+r.slice(1):n===`/`?`/*`+r.slice(1,-1)+`*/`:r;if(n===`//`)return`#`+r.slice(2);if(n===`/*`){let e=r.slice(2,-2);return e.includes(`/`)?r:`/`+(e.startsWith(`*`)||e.startsWith(`/`)?` `+e:e)+`/`}return r}function te(e,t,n){return(e.comments?.leading??[]).map(e=>t+m(e,n))}function h(e,t){let n=e.comments?.trailing??[];return n.length===0?``:` `+n.map(e=>m(e,t)).join(` `)}function ne(e,t,n){return(e.comments?.dangling??[]).map(e=>t+m(e,n))}function re(e,t=!1){let n=e?.commas??`comma`,r=n!==`none`;return{inlineSep:r?t?`,`:`, `:` `,multilineSep:r?`,`:``,trailSep:n===`trailing`?`,`:``,colSep:t?`:`:`: `}}function ie(e){return typeof e.toHex==`function`?e.toHex():Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}var g=typeof new Uint8Array().toBase64==`function`;function ae(e){if(g)return e.toBase64({omitPadding:!0});let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/=/g,``)}function oe(e){if(g)return e.toBase64({alphabet:`base64url`,omitPadding:!0});let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}var se=`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`,ce=`0123456789ABCDEFGHIJKLMNOPQRSTUV`;function le(e,t){let n=``,r=0,i=0;for(let a of e)for(r=r<<8|a,i+=8;i>=5;)i-=5,n+=t[r>>i&31];return i>0&&(n+=t[r<<5-i&31]),n}function ue(e){for(let t of e){let e=t.codePointAt(0);if(e<32||e===127)return!0}return!1}function de(e,t,n){if(n===`string`){let t=fe(e);if(t!=null)return me(t)}if(n===`printable-string`||n===void 0){let t=fe(e);if(t!=null&&!ue(t))return me(t)}switch(t){case`base64`:return`b64'${ae(e)}'`;case`base64url`:return`b64'${oe(e)}'`;case`base32`:return`b32'${le(e,se)}'`;case`base32hex`:return`h32'${le(e,ce)}'`;default:return`h'${ie(e)}'`}}function fe(e){try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e)}catch{return null}}function pe(e,t){let n=t.codePointAt(0),r=t;for(let i of e){let e=i.codePointAt(0);switch(e){case n:r+=`\\${t}`;break;case 92:r+=`\\\\`;break;case 10:r+=`\\n`;break;case 13:r+=`\\r`;break;case 9:r+=`\\t`;break;default:e<32||e===127||e===8232||e===8233||e===8203||e===8204||e===8205||e===65279?r+=`\\u${e.toString(16).padStart(4,`0`)}`:r+=i}}return r+t}function me(e){return pe(e,`'`)}function he(e){return pe(e,`'`)}function ge(e){return pe(e,`"`)}function _e(e){if(isNaN(e))return`NaN`;if(!isFinite(e))return e>0?`Infinity`:`-Infinity`;if(Object.is(e,-0))return`-0.0`;let t=e.toString();return t.includes(`.`)||t.includes(`e`)?t:t+`.0`}function ve(e,t,n){return t===void 0||t===n?``:t===`half`?`_1`:t===`single`?`_2`:`_3`}var _=class{start;end;comments;warnings;_defaults;toCBOR(e){let t=this._defaults?{...this._defaults,...e}:e;return this._toCBOR(t)}toCDN(e){let t=this._defaults?{...this._defaults,...e}:e,n=this._toCDN(t,0),r=t?.preserveComments;if(!r)return n;let i=typeof r==`string`?r:void 0,a=this.comments?.leading?.map(e=>m(e,i))??[],o=this.comments?.trailing??[],s=o.length===0?n:`${n} ${o.map(e=>m(e,i).trimEnd()).join(` `)}`;return[...a,s].join(`
|
|
2
|
+
`)}toEDN(e){return this.toCDN(e)}toJS(e){let t=this._defaults?{...this._defaults,...e}:e,n=this._toJS(t);if(!t?.reviver)return n;let r=t.reviver.call({"":n},``,n);return r===l?void 0:r}toHexDump(e){let t=this._defaults?{...this._defaults,...e}:e,n=t?.indent??3,r=typeof n==`string`?n:` `.repeat(n),i=(t?.commentStyle??`--`)+` `,a=this._toHexDump(0,t),o=Math.max(...a.map(e=>e.depth*r.length+e.hex.length))+2;return a.map(e=>(r.repeat(e.depth)+e.hex).padEnd(o)+i+e.comment).join(`
|
|
3
|
+
`)}_toHexDump(e,t){return[{depth:e,hex:Array.from(this._toCBOR(),e=>e.toString(16).toUpperCase().padStart(2,`0`)).join(` `),comment:this._toCDN(t,0)}]}},ye=`getFloat16`in DataView.prototype&&`setFloat16`in DataView.prototype,be=new DataView(new ArrayBuffer(8));function xe(e){be.setFloat64(0,e,!1);let t=be.getUint32(0,!1),n=be.getUint32(4,!1),r=t>>>31&1,i=t>>>20&2047,a=t&1048575;if(i===2047){if(a===0&&n===0)return r<<15|31744;let e=a>>10|(n===0?0:1)||1;return r<<15|31744|e&1023}let o=i-1023+15;if(o>=31)return r<<15|31744;let s,c,l;if(o<=0){if(o<-10)return r<<15;let e=1<<20|a,t=11-o;t<=20?(s=e>>t&1023,c=e>>t-1&1,l=(e&(1<<t-1)-1)!=0||n!==0):(s=0,c=1,l=a!==0||n!==0)}else s=a>>10,c=a>>9&1,l=(a&511)!=0||n!==0;if(c!==0&&(l||s&1)&&s++,s>=1024){let e=o<=0?1:o+1;return e>=31?r<<15|31744:r<<15|e<<10}let u=o<=0?0:o;return r<<15|u<<10|s}function v(e){let t=e>>>15&1,n=e>>>10&31,r=e&1023;return n===31?r===0?t?-1/0:1/0:NaN:n===0?r===0?t?-0:0:(t?-1:1)*2**-14*(r/1024):(t?-1:1)*2**(n-15)*(1+r/1024)}var Se=ye?(e,t,n,r)=>{e.setFloat16(t,n,r)}:(e,t,n,r)=>{e.setUint16(t,xe(n),r)};function y(e,t,n){if(n!==void 0){if(n===`i`){if(t>23n)throw RangeError(`value ${t} does not fit in immediate encoding _i (max 23)`);return new Uint8Array([e<<5|Number(t)])}let r=[255n,65535n,4294967295n,18446744073709551615n];if(t>r[n])throw RangeError(`value ${t} does not fit in encodingWidth _${n} (max ${r[n]})`);let i=24+n;if(i===24)return new Uint8Array([e<<5|24,Number(t)]);if(i===25){let n=new Uint8Array(3);return n[0]=e<<5|25,n[1]=Number(t>>8n),n[2]=Number(t&255n),n}if(i===26){let n=new Uint8Array(5);return n[0]=e<<5|26,new DataView(n.buffer).setUint32(1,Number(t),!1),n}let a=new Uint8Array(9);return a[0]=e<<5|27,new DataView(a.buffer).setBigUint64(1,t,!1),a}if(t<=23n)return new Uint8Array([e<<5|Number(t)]);if(t<=255n)return new Uint8Array([e<<5|24,Number(t)]);if(t<=65535n){let n=new Uint8Array(3);return n[0]=e<<5|25,n[1]=Number(t>>8n),n[2]=Number(t&255n),n}if(t<=4294967295n){let n=new Uint8Array(5);return n[0]=e<<5|26,new DataView(n.buffer).setUint32(1,Number(t),!1),n}let r=new Uint8Array(9);return r[0]=e<<5|27,new DataView(r.buffer).setBigUint64(1,t,!1),r}function b(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}var Ce=new DataView(new ArrayBuffer(4));function we(e){return Object.is(v(xe(e)),e)}function Te(e){return Ce.setFloat32(0,e,!1),Object.is(Ce.getFloat32(0,!1),e)}function Ee(e){return we(e)?`half`:Te(e)?`single`:`double`}var x=class extends _{value;encodingWidth;constructor(e,t){if(super(),this.value=BigInt(e),this.value<0n)throw RangeError(`CborUint value must be non-negative`);if(this.value>18446744073709551615n)throw RangeError(`CborUint value exceeds maximum uint64`);this.encodingWidth=t?.encodingWidth}_toCBOR(e){return y(0,this.value,this.encodingWidth)}_toCDN(e,t){let n=this.encodingWidth===void 0?``:`_${this.encodingWidth}`,r=this.value;switch(e?.intFormat){case`hex`:return`0x${r.toString(16)}${n}`;case`octal`:return`0o${r.toString(8)}${n}`;case`binary`:return`0b${r.toString(2)}${n}`;default:return r.toString()+n}}_toJS(e){let t=e?.integerAs??`auto`;return t===`bigint`?this.value:t===`number`||this.value<=BigInt(2**53-1)?Number(this.value):this.value}},S=class extends _{argument;encodingWidth;constructor(e,t){super();let n=BigInt(e);if(n>=0n)throw RangeError(`CborNint value must be negative`);if(n<-18446744073709551616n)throw RangeError(`CborNint value exceeds minimum int64`);this.argument=-1n-n,this.encodingWidth=t?.encodingWidth}get value(){return-1n-this.argument}_toCBOR(e){return y(1,this.argument,this.encodingWidth)}_toCDN(e,t){let n=this.encodingWidth===void 0?``:`_${this.encodingWidth}`,r=this.argument+1n;switch(e?.intFormat){case`hex`:return`-0x${r.toString(16)}${n}`;case`octal`:return`-0o${r.toString(8)}${n}`;case`binary`:return`-0b${r.toString(2)}${n}`;default:return this.value.toString()+n}}_toJS(e){let t=this.value,n=e?.integerAs??`auto`;return n===`bigint`?t:n===`number`||t>=BigInt(-(2**53-1))?Number(t):t}},De=new DataView(new ArrayBuffer(8));function Oe(e){let t=e.startsWith(`-`),n=e.slice(t?3:2),r=n.search(/[pP]/);if(r===-1)throw SyntaxError(`EDN parse error: hex float missing 'p' exponent: ${e}`);let i=n.slice(0,r),a=n.slice(r+1);if(!/^[+-]?\d+$/.test(a))throw SyntaxError(`EDN parse error: hex float has invalid or missing exponent: ${e}`);let o=parseInt(a,10),s=i.indexOf(`.`),c;if(s===-1){if(!/^[0-9a-fA-F]+$/.test(i))throw SyntaxError(`EDN parse error: hex float has no mantissa digits: ${e}`);c=parseInt(i,16)}else{let t=i.slice(0,s),n=i.slice(s+1);if(t===``&&n===``)throw SyntaxError(`EDN parse error: hex float has no mantissa digits: ${e}`);if(t!==``&&!/^[0-9a-fA-F]+$/.test(t)||n!==``&&!/^[0-9a-fA-F]+$/.test(n))throw SyntaxError(`EDN parse error: hex float has invalid mantissa: ${e}`);c=(t===``?0:parseInt(t,16))+(n===``?0:parseInt(n,16)/16**n.length)}let l=c*2**o;return t?-l:l}function ke(e){if(isNaN(e))return`NaN`;if(!isFinite(e))return e>0?`Infinity`:`-Infinity`;let t=Object.is(e,-0)||e<0,n=Math.abs(e);if(n===0)return t?`-0x0p+0`:`0x0p+0`;De.setFloat64(0,n,!1);let r=De.getUint32(0,!1),i=De.getUint32(4,!1),a=r>>>20&2047,o=r&1048575,s=i,c=(o.toString(16).padStart(5,`0`)+s.toString(16).padStart(8,`0`)).replace(/0+$/,``),l=c===``?``:`.${c}`,u,d;a===0?(u=`0`,d=-1022):(u=`1`,d=a-1023);let f=d>=0?`+${d}`:`${d}`,p=`0x${u}${l}p${f}`;return t?`-${p}`:p}var C=class extends _{value;precision;ednSource;constructor(e,t){super(),this.value=e,this.precision=t?.precision}_toCBOR(e){let t=this.precision??Ee(this.value);if(t===`half`){let e=new Uint8Array(3);return e[0]=249,Se(new DataView(e.buffer),1,this.value,!1),e}if(t===`single`){let e=new Uint8Array(5);return e[0]=250,new DataView(e.buffer).setFloat32(1,this.value,!1),e}let n=new Uint8Array(9);return n[0]=251,new DataView(n.buffer).setFloat64(1,this.value,!1),n}_toCDN(e,t){if(e?.appStrings!==!1&&this.ednSource!==void 0)return this.ednSource;let n=Ee(this.value);return(e?.floatFormat===`hex`?ke(this.value):_e(this.value))+ve(this.value,this.precision,n)}_toJS(e){return this.value}},w=class extends _{tag;content;encodingWidth;constructor(e,t,n){if(super(),this.tag=BigInt(e),this.tag<0n)throw RangeError(`CborTag tag number must be non-negative`);this.content=t,this.encodingWidth=n?.encodingWidth}_toCBOR(e){return b([y(6,this.tag,this.encodingWidth),this.content._toCBOR(e)])}_toCDN(e,t){let n=this.encodingWidth===void 0?``:`_${this.encodingWidth}`;return`${this.tag}${n}(${this.content._toCDN(e,t)})`}_toHexDump(e,t){let n=[{depth:e,hex:(e=>Array.from(e,e=>e.toString(16).toUpperCase().padStart(2,`0`)).join(` `))(y(6,this.tag,this.encodingWidth)),comment:`Tag ${this.tag}`}];return n.push(...this.content._toHexDump(e+1,t)),n}_toJS(e){let t=this.content._toJS(e);return e?.stripTags?t:c.set(t,this.tag)}};function Ae(e,t){let n=1,r=1;for(let i=0;i<t;i++)e[i]===`
|
|
4
|
+
`?(n++,r=1):r++;return{line:n,col:r}}var je=class{input;pos;line;col;_peeked=null;_lastConsumedEndOffset;comments=[];onEscapeWarning;constructor(e,t){this.input=e;let n=t?.offset??0;if(!Number.isInteger(n)||n<0||n>e.length)throw RangeError(`EDN parse offset must be an integer between 0 and ${e.length}`);let r=Ae(e,n);this.pos=n,this.line=r.line,this.col=r.col,this._lastConsumedEndOffset=n}peek(){return this._peeked===null&&(this._peeked=this._readNext()),this._peeked}consume(){let e=this._peeked===null?this._readNext():this._peeked;return this._peeked=null,this._lastConsumedEndOffset=e.endOffset,e}get lastEndOffset(){return this._lastConsumedEndOffset}get source(){return this.input}_ch(){return this.input[this.pos]??``}_eof(){return this.pos>=this.input.length}_advance(){let e=this.input[this.pos++]??``;return e===`
|
|
5
|
+
`?(this.line++,this.col=1):this.col++,e}_fail(e,t=this.line,n=this.col){throw SyntaxError(`EDN parse error at line ${t}, column ${n}: ${e}`)}_skipWS(){for(;;){for(;!this._eof()&&/\s/.test(this._ch());)this._advance();if(this._eof())return;let e=this._ch();if(e===`#`){let e=this.pos,t=this.line,n=this.col;for(;!this._eof()&&this._ch()!==`
|
|
6
|
+
`;)this._advance();this.comments.push({kind:`line`,marker:`#`,text:this.input.slice(e,this.pos),start:e,end:this.pos,line:t,col:n});continue}if(e===`/`){let e=this.input[this.pos+1]??``;if(e===`/`){let e=this.pos,t=this.line,n=this.col;for(this._advance(),this._advance();!this._eof()&&this._ch()!==`
|
|
7
|
+
`;)this._advance();this.comments.push({kind:`line`,marker:`//`,text:this.input.slice(e,this.pos),start:e,end:this.pos,line:t,col:n});continue}if(e===`*`){let e=this.pos,t=this.line,n=this.col;this._advance(),this._advance(),this._skipBlockCommentStar(),this.comments.push({kind:`block`,marker:`/*`,text:this.input.slice(e,this.pos),start:e,end:this.pos,line:t,col:n});continue}let t=this.pos,n=this.line,r=this.col;this._advance(),this._skipBlockCommentSlash(),this.comments.push({kind:`block`,marker:`/`,text:this.input.slice(t,this.pos),start:t,end:this.pos,line:n,col:r});continue}return}}_skipByteStringComment(e){let t=this._ch();if(t===`/`){let t=this.input[this.pos+1]??``;if(t===`/`){for(this._advance(),this._advance();!this._eof()&&this._ch()!==`
|
|
8
|
+
`;){if(this._ch()===`\\`){this._advance(),!this._eof()&&this._ch()!==`
|
|
9
|
+
`&&this._advance();continue}if(this._ch()===e)break;this._advance()}return!0}return t===`*`?(this._advance(),this._advance(),this._skipBlockCommentStar(),!0):(this._advance(),this._skipBlockCommentSlash(),!0)}if(t===`#`){for(;!this._eof()&&this._ch()!==`
|
|
10
|
+
`;){if(this._ch()===`\\`){if(this._advance(),this._eof()||this._ch()===`
|
|
11
|
+
`)continue;this._advance()===`u`&&this._validateHexCommentUnicodeEscape();continue}if(this._ch()===e)break;this._advance()}return!0}return!1}_validateHexCommentUnicodeEscape(){let e=this.line,t=this.col;if(!this._eof()&&this._ch()===`{`){this._advance();let n=``;for(;!this._eof()&&this._ch()!==`}`&&this._ch()!==`
|
|
12
|
+
`;)n+=this._advance();!this._eof()&&this._ch()===`}`&&this._advance();let r=parseInt(n||`0`,16);r>=55296&&r<=57343&&this._fail(`\\u{${n}} is a surrogate code point, not allowed in hex string comments`,e,t);return}let n=``;for(let e=0;e<4&&!(this._eof()||this._ch()===`
|
|
13
|
+
`||!/[0-9a-fA-F]/.test(this._ch()));e++)n+=this._advance();if(n.length<4)return;let r=parseInt(n,16);if(r>=55296&&r<=56319){(this._ch()!==`\\`||(this.input[this.pos+1]??``)!==`u`)&&this._fail(`lone high surrogate \\u${n} in hex string comment`,e,t),this._advance(),this._advance();let r=``;for(let e=0;e<4&&!(this._eof()||this._ch()===`
|
|
14
|
+
`||!/[0-9a-fA-F]/.test(this._ch()));e++)r+=this._advance();let i=parseInt(r||`0`,16);(i<56320||i>57343)&&this._fail(`\\u${n} (high surrogate) not followed by valid low surrogate in hex string comment`,e,t);return}r>=56320&&r<=57343&&this._fail(`lone low surrogate \\u${n} in hex string comment`,e,t)}_skipRawComment(e,t,n,r,i){let a=e[t];if(a===`/`){if(t++,e[t]===`/`){for(t++;t<e.length&&e[t]!==`
|
|
15
|
+
`;)t++;return t}if(e[t]===`*`){for(t++;t<e.length;){if(e[t]===`*`&&e[t+1]===`/`)return t+2;t++}return t}for(;t<e.length&&e[t]!==`/`;)t++;if(t>=e.length)throw SyntaxError(`EDN parse error at line ${r}, column ${i}: unterminated block comment in ${n}`);return t+1}if(a===`#`){for(;t<e.length&&e[t]!==`
|
|
16
|
+
`;)t++;return t}return-1}_skipBlockCommentSlash(){let e=this.line,t=this.col;for(;!this._eof();){if(this._ch()===`\\`){this._advance(),this._eof()||this._advance();continue}if(this._ch()===`/`)break;this._advance()}this._eof()&&this._fail(`unterminated block comment`,e,t),this._advance()}_skipBlockCommentStar(){let e=this.line,t=this.col;for(;!this._eof();){if(this._ch()===`*`&&(this.input[this.pos+1]??``)===`/`){this._advance(),this._advance();return}this._advance()}this._fail(`unterminated block comment`,e,t)}_readStringContent(e){this._advance();let t=``;for(;!this._eof()&&this._ch()!==e;){let n=this._ch();if(n===`\r`){this._advance();continue}let r=n.codePointAt(0);if((r<32&&r!==10||r===127)&&this._fail(`unescaped control character U+${r.toString(16).padStart(4,`0`)} is not allowed in string literals`),n===`\\`){let n=this.pos,r=this.line,i=this.col;this._advance();let a=this._advance();switch(a){case`n`:t+=`
|
|
17
|
+
`;break;case`r`:t+=`\r`;break;case`t`:t+=` `;break;case`b`:t+=`\b`;break;case`f`:t+=`\f`;break;case`\\`:t+=`\\`;break;case`u`:t+=this._readUnicodeEscape(e,n,r,i);break;default:if(a===e){t+=a;break}if(a===`/`){e===`'`&&this._fail(`\\/ is not a valid escape in single-quoted byte strings (§5.1)`,r,i),t+=`/`;break}if(this.onEscapeWarning){if(a===`0`){this.onEscapeWarning(`\\0 is a non-standard escape sequence; use \\u0000 instead`,n,r,i),t+=`\0`;break}if(a===`v`){this.onEscapeWarning(`\\v is a non-standard escape sequence; use \\u000b instead`,n,r,i),t+=`\v`;break}if(a===`x`){let e=this._ch(),a=this.input[this.pos+1]??``;(!/[0-9a-fA-F]/.test(e)||!/[0-9a-fA-F]/.test(a))&&this._fail(`\\x escape requires exactly two hex digits`,r,i),this._advance(),this._advance();let o=parseInt(e+a,16);this.onEscapeWarning(`\\x${e}${a} is a non-standard escape sequence; use \\u00${e}${a} instead`,n,r,i),t+=String.fromCharCode(o);break}if(a===`"`||a===`'`){this.onEscapeWarning(`\\${a} inside ${e===`"`?`double`:`single`}-quoted string is non-standard`,n,r,i),t+=a;break}if(a===`
|
|
18
|
+
`||a===`\r`){a===`\r`&&this._ch()===`
|
|
19
|
+
`&&this._advance(),this.onEscapeWarning(`line continuation (\\<newline>) is non-standard; the newline is ignored`,n,r,i);break}this.onEscapeWarning(`\\${a} is an unknown escape sequence; interpreted as '${a}'`,n,r,i),t+=a;break}this._fail(`invalid escape sequence \\${a} in ${e===`"`?`double`:`single`}-quoted string`,r,i)}}else t+=this._advance()}return this._eof()&&this._fail(`unterminated string literal`),this._advance(),t}_readUnicodeEscape(e,t,n,r){let i=this.line,a=this.col,o=o=>{if(e===`'`&&o>=32&&o<=126){let e=`\\u escape for printable ASCII U+${o.toString(16).padStart(4,`0`).toUpperCase()} is not allowed in single-quoted strings (§5.1 hexchar-s)`;if(this.onEscapeWarning){this.onEscapeWarning(e,t??this.pos,n??i,r??a);return}this._fail(e,i,a)}};if(!this._eof()&&this._ch()===`{`){this._advance();let e=``;for(;!this._eof()&&this._ch()!==`}`;){let t=this._ch();/[0-9a-fA-F]/.test(t)||this._fail(`invalid character in \\u{} escape: ${JSON.stringify(t)}`,i,a),e+=this._advance()}this._eof()&&this._fail(`unterminated \\u{} escape`,i,a),this._advance(),e.length===0&&this._fail(`empty \\u{} escape`,i,a);let t=parseInt(e,16);return t>1114111&&this._fail(`\\u{${e}} exceeds maximum Unicode code point U+10FFFF`,i,a),t>=55296&&t<=57343&&this._fail(`\\u{${e}} is a surrogate code point, which is not a valid Unicode scalar value`,i,a),o(t),String.fromCodePoint(t)}let s=``;for(let e=0;e<4;e++){this._eof()&&this._fail(`truncated \\uXXXX escape`,i,a);let e=this._ch();/[0-9a-fA-F]/.test(e)||this._fail(`invalid hex digit in \\uXXXX escape: ${JSON.stringify(e)}`,i,a),s+=this._advance()}let c=parseInt(s,16);if(c>=55296&&c<=56319){(this._ch()!==`\\`||(this.input[this.pos+1]??``)!==`u`)&&this._fail(`lone high surrogate \\u${s} must be followed by \\uDC00–\\uDFFF`,i,a),this._advance(),this._advance();let e=this.line,t=this.col,n=``;for(let r=0;r<4;r++)this._eof()&&this._fail(`truncated low-surrogate escape`,e,t),n+=this._advance();let r=parseInt(n,16);return(r<56320||r>57343)&&this._fail(`\\u${s} (high surrogate) not followed by a valid low surrogate (got \\u${n})`,i,a),String.fromCodePoint(65536+(c-55296)*1024+(r-56320))}return c>=56320&&c<=57343&&this._fail(`lone low surrogate \\u${s} is not valid`,i,a),o(c),String.fromCharCode(c)}_readRawStringContent(){let e=this.line,t=this.col,n=0;for(;!this._eof()&&this._ch()==="`";)this._advance(),n++;!this._eof()&&this._ch()===`\r`&&this._advance(),!this._eof()&&this._ch()===`
|
|
20
|
+
`&&this._advance();let r=``;for(;!this._eof();){let i=this._ch();if(i===`\r`){this._advance();continue}if(i==="`"){let i=0;for(;!this._eof()&&this._ch()==="`";)this._advance(),i++;if(i>=n)return r+="`".repeat(i-n),r===``&&this._fail(`raw string must not be empty (§2.5.3)`,e,t),r;r+="`".repeat(i)}else{let e=i.codePointAt(0);e<32&&e!==10&&e!==13&&this._fail(`raw string content must not contain control character U+${e.toString(16).toUpperCase().padStart(4,`0`)} (§2.5.3)`,this.line,this.col),e===127&&this._fail(`raw string content must not contain DEL (U+007F) (§2.5.3)`,this.line,this.col),r+=this._advance()}}this._fail(`unterminated raw string literal`,e,t)}_processRawHexContent(e,t,n){let r=``,i=!1,a=0;for(;a<e.length;){let o=e[a];if(o===`
|
|
21
|
+
`||o===` `||o===`\r`){a++;continue}if(o===` `)throw SyntaxError(`EDN parse error at line ${t}, column ${n}: horizontal tab (HT) is not allowed inside h\`\` raw byte string literals (§5.3.3)`);let s=this._skipRawComment(e,a,"h`` raw byte string",t,n);if(s!==-1){a=s;continue}if(o===`.`&&e[a+1]===`.`&&e[a+2]===`.`){for(a+=3;a<e.length&&e[a]===`.`;)a++;r+=`...`,i=!0;continue}if(/[0-9a-fA-F]/.test(o)){r+=o,a++;continue}throw SyntaxError(`EDN parse error at line ${t}, column ${n}: unexpected character ${JSON.stringify(o)} in h\`\` raw byte string`)}return{value:r,elided:i}}_processRawB64Content(e,t,n){let r=``,i=0;for(;i<e.length;){let a=e[i];if(a===`
|
|
22
|
+
`||a===` `||a===`\r`){i++;continue}if(a===` `)throw SyntaxError(`EDN parse error at line ${t}, column ${n}: horizontal tab (HT) is not allowed inside b64\`\` raw byte string literals (§5.3.4)`);if(a===`#`){for(;i<e.length&&e[i]!==`
|
|
23
|
+
`;)i++;continue}r+=a,i++}return r}_readByteContent(e){this._advance();let t=``;for(;!this._eof()&&this._ch()!==e;){let n=this._ch();if(n===`
|
|
24
|
+
`||n===` `){this._advance();continue}if(n===`\r`){this._advance();continue}if(n===` `&&this._fail(`horizontal tab (HT) is not allowed inside byte string literals (§5.2.2)`,this.line,this.col),n===`#`){for(;!this._eof()&&this._ch()!==`
|
|
25
|
+
`;){if(this._ch()===`\\`){this._advance(),!this._eof()&&this._ch()!==`
|
|
26
|
+
`&&this._advance();continue}if(this._ch()===e)break;this._advance()}continue}t+=this._advance()}return this._eof()&&this._fail(`unterminated byte string literal`),this._advance(),t}_readHexByteContentElisionAware(e){this._advance();let t=``,n=!1;for(;!this._eof()&&this._ch()!==e;){let r=this._ch();if(r===`
|
|
27
|
+
`||r===` `||r===`\r`){this._advance();continue}if(r===` `&&this._fail(`horizontal tab (HT) is not allowed inside hex byte string literals (§5.2.1)`,this.line,this.col),!this._skipByteStringComment(e)){if(r===`.`&&(this.input[this.pos+1]??``)===`.`&&(this.input[this.pos+2]??``)===`.`){for(this._advance(),this._advance(),this._advance();!this._eof()&&this._ch()===`.`;)this._advance();t.endsWith(`...`)||(t+=`...`),n=!0;continue}if(/[0-9a-fA-F]/.test(r)){t+=this._advance();continue}this._fail(`unexpected character ${JSON.stringify(r)} in hex byte string`)}}return this._eof()&&this._fail(`unterminated hex byte string literal`),this._advance(),{value:t,elided:n}}_readNext(){this._skipWS();let e=this.pos;return{...this._readNextCore(),raw:this.input.slice(e,this.pos),offset:e,endOffset:this.pos}}_readNextCore(){let e=this.line,t=this.col;if(this._eof())return{type:`EOF`,value:``,line:e,col:t};let n=this._ch();switch(n){case`[`:return this._advance(),{type:`LBRACKET`,value:`[`,line:e,col:t};case`]`:return this._advance(),{type:`RBRACKET`,value:`]`,line:e,col:t};case`{`:return this._advance(),{type:`LBRACE`,value:`{`,line:e,col:t};case`}`:return this._advance(),{type:`RBRACE`,value:`}`,line:e,col:t};case`(`:return this._advance(),{type:`LPAREN`,value:`(`,line:e,col:t};case`)`:return this._advance(),{type:`RPAREN`,value:`)`,line:e,col:t};case`:`:return this._advance(),{type:`COLON`,value:`:`,line:e,col:t};case`,`:return this._advance(),{type:`COMMA`,value:`,`,line:e,col:t};case`<`:if((this.input[this.pos+1]??``)===`<`)return this._advance(),this._advance(),{type:`LT_LT`,value:`<<`,line:e,col:t};this._fail(`unexpected character '<'`,e,t);case`>`:if((this.input[this.pos+1]??``)===`>`)return this._advance(),this._advance(),{type:`GT_GT`,value:`>>`,line:e,col:t};this._fail(`unexpected character '>'`,e,t);case`+`:{let n=this.input.slice(this.pos+1);if(n.startsWith(`Infinity`)){let r=n[8]??``,i=r===`_`&&/[0-3i]/.test(n[9]??``)&&!/[a-zA-Z0-9_]/.test(n[10]??``);if(!/[a-zA-Z0-9_]/.test(r)||i){this._advance();for(let e=0;e<8;e++)this._advance();let n=`Infinity`;return i&&(n+=this._advance()+this._advance()),{type:`FLOAT`,value:n,line:e,col:t}}}let r=n[0]??``;return r>=`0`&&r<=`9`||r===`.`?(this._advance(),this._readNumber(e,t)):(this._advance(),{type:`PLUS`,value:`+`,line:e,col:t})}case"`":return{type:`RAWSTRING`,value:this._readRawStringContent(),line:e,col:t};case`"`:{let n=this._readStringContent(`"`);return n===``&&this._ch()===`_`?(this._advance(),{type:`EMPTY_INDEF_TEXT`,value:``,line:e,col:t}):{type:`TSTR`,value:n,line:e,col:t}}case`'`:{if((this.input[this.pos+1]??``)===`'`&&(this.input[this.pos+2]??``)===`_`)return this._advance(),this._advance(),this._advance(),{type:`EMPTY_INDEF_BYTES`,value:``,line:e,col:t};let n=this._readStringContent(`'`),r=new TextEncoder().encode(n);return{type:`SQSTR`,value:Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``),line:e,col:t}}}if(n===`-`){let n=this.input.slice(this.pos+1);if(n.startsWith(`Infinity`)){let r=n[8]??``,i=r===`_`&&/[0-7i]/.test(n[9]??``)&&!/[a-zA-Z0-9_]/.test(n[10]??``);if(!/[a-zA-Z0-9_]/.test(r)||i){this._advance();for(let e=0;e<8;e++)this._advance();let n=`-Infinity`;return i&&(n+=this._advance()+this._advance()),{type:`FLOAT`,value:n,line:e,col:t}}}return this._readNumber(e,t)}if(n===`+`){let n=this.input.slice(this.pos+1);if(n.startsWith(`Infinity`)){let r=n[8]??``,i=r===`_`&&/[0-7i]/.test(n[9]??``)&&!/[a-zA-Z0-9_]/.test(n[10]??``);if(!/[a-zA-Z0-9_]/.test(r)||i){this._advance();for(let e=0;e<8;e++)this._advance();let n=`Infinity`;return i&&(n+=this._advance()+this._advance()),{type:`FLOAT`,value:n,line:e,col:t}}}return this._advance(),this._readNumber(e,t)}if(n>=`0`&&n<=`9`||n===`.`&&/[0-9]/.test(this.input[this.pos+1]??``))return this._readNumber(e,t);if(/[a-zA-Z_]/.test(n))return this._readIdent(e,t);if(n===`.`){if((this.input[this.pos+1]??``)===`.`&&(this.input[this.pos+2]??``)===`.`){for(this._advance(),this._advance(),this._advance();!this._eof()&&this._ch()===`.`;)this._advance();return{type:`ELLIPSIS`,value:`...`,line:e,col:t}}this._fail(`unexpected character '.'`,e,t)}this._fail(`unexpected character ${JSON.stringify(n)}`,e,t)}_readNumber(e,t){let n=``;if(this._ch()===`-`&&(n+=this._advance()),this._ch()===`0`){let r=this.input[this.pos+1]??``;if(r===`x`||r===`X`){n+=this._advance()+this._advance();let r=n.length;for(;!this._eof()&&/[0-9a-fA-F]/.test(this._ch());)n+=this._advance();let i=n.length>r,a=!1,o=!1;if(!this._eof()&&this._ch()===`.`){a=!0,n+=this._advance();let e=n.length;for(;!this._eof()&&/[0-9a-fA-F]/.test(this._ch());)n+=this._advance();o=n.length>e}if(!this._eof()&&(this._ch()===`p`||this._ch()===`P`)){a=!0,!i&&!o&&this._fail(`hex float has no mantissa digits: ${n}`,e,t),n+=this._advance(),!this._eof()&&(this._ch()===`+`||this._ch()===`-`)&&(n+=this._advance());let r=n.length;for(;!this._eof()&&this._ch()>=`0`&&this._ch()<=`9`;)n+=this._advance();n.length===r&&this._fail(`hex float missing exponent digits: ${n}`,e,t)}else a&&this._fail(`hex float missing 'p' exponent: ${n}`,e,t);if(a){if(this._ch()===`_`){let e=this.input[this.pos+1]??``,t=this.input[this.pos+2]??``;(e===`0`||e===`1`||e===`2`||e===`3`||e===`4`||e===`5`||e===`6`||e===`7`||e===`i`)&&!/[0-9a-zA-Z_]/.test(t)&&(n+=this._advance()+this._advance())}return{type:`FLOAT`,value:n,line:e,col:t}}return{type:`INTEGER`,value:n,line:e,col:t}}if(r===`o`||r===`O`){for(n+=this._advance()+this._advance();!this._eof()&&this._ch()>=`0`&&this._ch()<=`7`;)n+=this._advance();return{type:`INTEGER`,value:n,line:e,col:t}}if(r===`b`||r===`B`){for(n+=this._advance()+this._advance();!this._eof()&&(this._ch()===`0`||this._ch()===`1`);)n+=this._advance();return{type:`INTEGER`,value:n,line:e,col:t}}}for(;!this._eof()&&this._ch()>=`0`&&this._ch()<=`9`;)n+=this._advance();let r=!1;if(!this._eof()&&this._ch()===`.`)for(r=!0,n+=this._advance();!this._eof()&&this._ch()>=`0`&&this._ch()<=`9`;)n+=this._advance();if(!this._eof()&&(this._ch()===`e`||this._ch()===`E`)){r=!0,n+=this._advance(),!this._eof()&&(this._ch()===`+`||this._ch()===`-`)&&(n+=this._advance());let i=n.length;for(;!this._eof()&&this._ch()>=`0`&&this._ch()<=`9`;)n+=this._advance();n.length===i&&this._fail(`float exponent has no digits: ${JSON.stringify(n)}`,e,t)}if(this._ch()===`_`){let e=this.input[this.pos+1]??``,t=this.input[this.pos+2]??``;(e===`0`||e===`1`||e===`2`||e===`3`||e===`4`||e===`5`||e===`6`||e===`7`||e===`i`)&&!/[0-9a-zA-Z_]/.test(t)&&(n+=this._advance()+this._advance())}return{type:r?`FLOAT`:`INTEGER`,value:n,line:e,col:t}}_readIdent(e,t){let n=``;for(;!this._eof()&&/[a-zA-Z0-9_]/.test(this._ch());)n+=this._advance();switch(n){case`true`:return{type:`TRUE`,value:n,line:e,col:t};case`false`:return{type:`FALSE`,value:n,line:e,col:t};case`null`:return{type:`NULL`,value:n,line:e,col:t};case`undefined`:return{type:`UNDEFINED`,value:n,line:e,col:t};case`NaN`:case`NaN_0`:case`NaN_1`:case`NaN_2`:case`NaN_3`:case`NaN_4`:case`NaN_5`:case`NaN_6`:case`NaN_7`:case`NaN_i`:case`Infinity`:case`Infinity_0`:case`Infinity_1`:case`Infinity_2`:case`Infinity_3`:case`Infinity_4`:case`Infinity_5`:case`Infinity_6`:case`Infinity_7`:case`Infinity_i`:return{type:`FLOAT`,value:n,line:e,col:t};case`simple`:return{type:`SIMPLE`,value:n,line:e,col:t};case`_`:return{type:`UNDERSCORE`,value:`_`,line:e,col:t};case`_0`:return{type:`ENCODING_INDICATOR`,value:`0`,line:e,col:t};case`_1`:return{type:`ENCODING_INDICATOR`,value:`1`,line:e,col:t};case`_2`:return{type:`ENCODING_INDICATOR`,value:`2`,line:e,col:t};case`_3`:return{type:`ENCODING_INDICATOR`,value:`3`,line:e,col:t};case`_4`:return{type:`ENCODING_INDICATOR`,value:`4`,line:e,col:t};case`_5`:return{type:`ENCODING_INDICATOR`,value:`5`,line:e,col:t};case`_6`:return{type:`ENCODING_INDICATOR`,value:`6`,line:e,col:t};case`_7`:return{type:`ENCODING_INDICATOR`,value:`7`,line:e,col:t};case`_i`:return{type:`ENCODING_INDICATOR`,value:`i`,line:e,col:t}}let r=n[0]??``,i=r>=`a`&&r<=`z`;if(i||r>=`A`&&r<=`Z`){let r=n.slice(1);if(i?/^[a-z0-9]*$/.test(r):/^[A-Z0-9]*$/.test(r)){for(;!this._eof();){let e=this._ch();if(!(i?e>=`a`&&e<=`z`||e>=`0`&&e<=`9`||e===`-`:e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`-`))break;n+=this._advance()}let r=this._ch();if(r===`"`&&this._fail(`"${n}" prefix requires single quotes or backticks, not double quotes`,e,t),r===`'`)switch(n){case`h`:{let{value:n,elided:i}=this._readHexByteContentElisionAware(r);return{type:i?`BYTES_HEX_ELIDED`:`BYTES_HEX`,value:n,line:e,col:t}}case`b64`:return{type:`BYTES_B64`,value:this._readByteContent(r),line:e,col:t};default:return{type:`APP_STRING`,appPrefix:n,value:this._readStringContent(r),line:e,col:t}}if(r==="`"){let r=this._readRawStringContent();switch(n){case`h`:{let{value:n,elided:i}=this._processRawHexContent(r,e,t);return{type:i?`BYTES_HEX_ELIDED`:`BYTES_HEX`,value:n,line:e,col:t}}case`b64`:return{type:`BYTES_B64`,value:this._processRawB64Content(r,e,t),line:e,col:t};default:return{type:`APP_STRING`,appPrefix:n,value:r,line:e,col:t}}}if(r===`<`&&(this.input[this.pos+1]??``)===`<`)return this._advance(),this._advance(),{type:`APP_SEQUENCE`,appPrefix:n,value:``,line:e,col:t}}}this._fail(`unknown identifier ${JSON.stringify(n)}`,e,t)}},T=class extends _{indefiniteLength=!1;value;ednEncoding;encodingWidth;ednSource;constructor(e,t){super(),this.value=e,this.ednEncoding=t?.ednEncoding??`hex`,this.encodingWidth=t?.encodingWidth,this.ednSource=t?.ednSource}_toCBOR(e){return b([y(2,BigInt(this.value.length),this.encodingWidth),this.value])}_toCDN(e,t){let n=this.encodingWidth===void 0?``:`_${this.encodingWidth}`;if(e?.preserveByteString&&this.ednSource!==void 0)return this.ednSource+n;let r=e?.bstrEncoding??this.ednEncoding;return e?.appStrings===!1&&r!==`hex`&&(r=`hex`),de(this.value,r,e?.sqstr)+n}_toJS(e){return this.value}},E=class extends _{indefiniteLength=!0;chunks;constructor(e){super(),this.chunks=e}_toCBOR(e){let t=[new Uint8Array([95])];for(let n of this.chunks)t.push(n._toCBOR(e));return t.push(new Uint8Array([255])),b(t)}_toCDN(e,t){return this.chunks.length===0?`''_`:`(_ ${this.chunks.map(t=>t._toCDN(e,0)).join(`, `)})`}_toHexDump(e,t){let n=e=>e.toString(16).toUpperCase().padStart(2,`0`),r=[{depth:e,hex:n(95),comment:`Start indefinite-length byte string`}];for(let n of this.chunks)r.push(...n._toHexDump(e+1,t));return r.push({depth:e,hex:n(255),comment:`"break"`}),r}_toJS(e){let t=this.chunks.reduce((e,t)=>e+t.value.length,0),n=new Uint8Array(t),r=0;for(let e of this.chunks)n.set(e.value,r),r+=e.value.length;return n}},D=class extends _{indefiniteLength=!0;chunks;constructor(e){super(),this.chunks=e}_toCBOR(e){let t=[new Uint8Array([127])];for(let n of this.chunks)t.push(n._toCBOR(e));return t.push(new Uint8Array([255])),b(t)}_toCDN(e,t){return this.chunks.length===0?`""_`:`(_ ${this.chunks.map(t=>t._toCDN(e,0)).join(`, `)})`}_toHexDump(e,t){let n=e=>e.toString(16).toUpperCase().padStart(2,`0`),r=[{depth:e,hex:n(127),comment:`Start indefinite-length text string`}];for(let n of this.chunks)r.push(...n._toHexDump(e+1,t));return r.push({depth:e,hex:n(255),comment:`"break"`}),r}_toJS(e){return this.chunks.map(e=>e.value).join(``)}},O=class extends _{items;indefiniteLength;encodingWidth;constructor(e,t){super(),this.items=e,this.indefiniteLength=t?.indefiniteLength??!1,this.encodingWidth=t?.encodingWidth}_toCBOR(e){if(this.indefiniteLength){let t=[new Uint8Array([159])];for(let n of this.items)t.push(n._toCBOR(e));return t.push(new Uint8Array([255])),b(t)}let t=[y(4,BigInt(this.items.length),this.encodingWidth)];for(let n of this.items)t.push(n._toCBOR(e));return b(t)}_toCDN(e,t){let n=d(e),r=e?.preserveComments,i=typeof r==`string`?r:void 0,a=r&&(ee(this)||this.items.some(p));n===null&&a&&(n=` `);let{inlineSep:o,multilineSep:s,trailSep:c}=re(e,n===null),l=!this.indefiniteLength&&this.encodingWidth!==void 0?`_${this.encodingWidth} `:``;if(n===null||this.items.length===0&&!a){let n=this.items.map(n=>n._toCDN(e,t+1)).join(o);return this.indefiniteLength?this.items.length===0?`[_ ]`:`[_ ${n}]`:`[${l}${n}]`}let u=f(n,t+1),m=f(n,t),ie=this.indefiniteLength?`[_ `:`[${l}`,g=[];for(let n=0;n<this.items.length;n++){let a=this.items[n];r&&g.push(...te(a,u,i));let o=n<this.items.length-1?s:c;g.push(`${u}${a._toCDN(e,t+1)}${o}${r?h(a,i):``}`)}return r&&g.push(...ne(this,u,i)),`${ie}\n${g.join(`
|
|
28
|
+
`)}\n${m}]`}_toHexDump(e,t){let n=e=>e.toString(16).toUpperCase().padStart(2,`0`),r=e=>Array.from(e,e=>e.toString(16).toUpperCase().padStart(2,`0`)).join(` `);if(this.indefiniteLength){let r=[{depth:e,hex:n(159),comment:`Start indefinite-length array`}];for(let n of this.items)r.push(...n._toHexDump(e+1,t));return r.push({depth:e,hex:n(255),comment:`"break"`}),r}let i=[{depth:e,hex:r(y(4,BigInt(this.items.length),this.encodingWidth)),comment:`Array of length ${this.items.length}`}];for(let n of this.items)i.push(...n._toHexDump(e+1,t));return i}_toJS(e){let t=e?.reviver;if(!t)return this.items.map(t=>t._toJS(e));let n=e?{...e,reviver:void 0}:void 0,r=this.items.map(e=>e._toJS(n)),i=0;for(let n=0;n<this.items.length;n++){let a=n-i,o=this.items[n]._toJS(e),s=t.call(r,String(n),o);s===l||e?.undefinedOmits&&s===void 0?(r.splice(a,1),i++):r[a]=s}return r}},k=class extends _{entries;indefiniteLength;encodingWidth;constructor(e,t){super(),this.entries=e,this.indefiniteLength=t?.indefiniteLength??!1,this.encodingWidth=t?.encodingWidth}_toCBOR(e){if(this.indefiniteLength){let t=[new Uint8Array([191])];for(let[n,r]of this.entries)t.push(n._toCBOR(e),r._toCBOR(e));return t.push(new Uint8Array([255])),b(t)}let t=[y(5,BigInt(this.entries.length),this.encodingWidth)];for(let[n,r]of this.entries)t.push(n._toCBOR(e),r._toCBOR(e));return b(t)}_toCDN(e,t){let n=d(e),r=e?.preserveComments,i=typeof r==`string`?r:void 0,a=r&&(ee(this)||this.entries.some(([e,t])=>p(e)||p(t)));n===null&&a&&(n=` `);let{inlineSep:o,multilineSep:s,trailSep:c,colSep:l}=re(e,n===null),u=!this.indefiniteLength&&this.encodingWidth!==void 0?`_${this.encodingWidth} `:``,m=this.indefiniteLength?`{_ `:`{${u}`;if(n===null||this.entries.length===0&&!a){let n=this.entries.map(([n,r])=>`${n._toCDN(e,t+1)}${l}${r._toCDN(e,t+1)}`).join(o);return this.indefiniteLength?this.entries.length===0?`{_ }`:`{_ ${n}}`:`{${u}${n}}`}let h=f(n,t+1),ie=f(n,t),g=[];for(let n=0;n<this.entries.length;n++){let[a,o]=this.entries[n];r&&g.push(...te(a,h,i));let u=n<this.entries.length-1?s:c,d=r?Me([...a.comments?.trailing??[],...o.comments?.leading??[],...o.comments?.trailing??[]],i):``;g.push(`${h}${a._toCDN(e,t+1)}${l}${o._toCDN(e,t+1)}${u}${d}`)}return r&&g.push(...ne(this,h,i)),`${m}\n${g.join(`
|
|
29
|
+
`)}\n${ie}}`}_toHexDump(e,t){let n=e=>e.toString(16).toUpperCase().padStart(2,`0`),r=e=>Array.from(e,e=>e.toString(16).toUpperCase().padStart(2,`0`)).join(` `);if(this.indefiniteLength){let r=[{depth:e,hex:n(191),comment:`Start indefinite-length map`}];for(let[n,i]of this.entries)r.push(...n._toHexDump(e+1,t)),r.push(...i._toHexDump(e+1,t));return r.push({depth:e,hex:n(255),comment:`"break"`}),r}let i=[{depth:e,hex:r(y(5,BigInt(this.entries.length),this.encodingWidth)),comment:`Map of length ${this.entries.length}`}];for(let[n,r]of this.entries)i.push(...n._toHexDump(e+1,t)),i.push(...r._toHexDump(e+1,t));return i}_toJS(e){let t=e?.reviver,n=()=>{let n=$.from(this.entries,([t,n])=>[t._toJS(e),n._toJS(e)]);if(!t)return n;let r=e?.undefinedOmits;for(let e=0;e<n.length;e++){let[i,a]=n[e],o=t.call(n,i,a);o===l||r&&o===void 0?n.splice(e--,1):n[e]=[i,o]}return n};return e?.mapAs===`entries`?n():e?.mapAs===`object`||this.entries.every(([e])=>e instanceof I)?(()=>{let n=e?{...e,reviver:void 0}:void 0,r={};for(let[e,t]of this.entries){let i=e instanceof I?e.value:e.toCDN(),a=t._toJS(n);i===`__proto__`?Object.defineProperty(r,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):r[i]=a}if(!t)return r;let i=new Map;for(let e=0;e<this.entries.length;e++){let[t]=this.entries[e];i.set(t instanceof I?t.value:t.toCDN(),e)}for(let n=0;n<this.entries.length;n++){let[a,o]=this.entries[n],s=a instanceof I?a.value:a.toCDN();if(i.get(s)!==n)continue;let c=o._toJS(e),u=t.call(r,s,c);u===l||e?.undefinedOmits&&u===void 0?delete r[s]:s===`__proto__`?Object.defineProperty(r,s,{value:u,writable:!0,enumerable:!0,configurable:!0}):r[s]=u}return r})():n()}};function Me(e,t){return e.length===0?``:` `+e.map(e=>m(e,t).trimEnd()).join(` `)}var A=class e extends _{value;constructor(e){if(super(),!Number.isInteger(e)||e<0||e>255)throw RangeError(`CborSimple value must be an integer in 0–255`);this.value=e}static FALSE=new e(20);static TRUE=new e(21);static NULL=new e(22);static UNDEFINED=new e(23);_toCBOR(e){return this.value<=23?new Uint8Array([224|this.value]):new Uint8Array([248,this.value])}_toCDN(e,t){switch(this.value){case 20:return`false`;case 21:return`true`;case 22:return`null`;case 23:return`undefined`;default:return`simple(${this.value})`}}_toJS(e){switch(this.value){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;default:return new u(this.value)}}},j=class extends _{items;constructor(e){super(),this.items=e}_content(e){return b(this.items.map(t=>t._toCBOR(e)))}_toCBOR(e){let t=this._content(e);return b([y(2,BigInt(t.length)),t])}_toCDN(e,t){if(this.items.length===0)return`<<>>`;let n=d(e),{inlineSep:r,multilineSep:i,trailSep:a}=re(e,n===null);if(n===null)return`<<${this.items.map(n=>n._toCDN(e,t+1)).join(r)}>>`;let o=f(n,t+1),s=f(n,t),c=this.items.map(n=>`${o}${n._toCDN(e,t+1)}`),l=c.length-1;return`<<\n${c.map((e,t)=>t<l?`${e}${i}`:`${e}${a}`).join(`
|
|
30
|
+
`)}\n${s}>>`}_toHexDump(e,t){let n=e=>Array.from(e,e=>e.toString(16).toUpperCase().padStart(2,`0`)).join(` `),r=this._content().length,i=[{depth:e,hex:n(y(2,BigInt(r))),comment:`Embedded CBOR sequence, ${r} byte${r===1?``:`s`}`}];for(let n of this.items)i.push(...n._toHexDump(e+1,t));return i}_toJS(e){return this._content()}},Ne=999n,M=class extends w{constructor(e,t){let n=t.length===1&&t[0]instanceof I?t[0]:new O(t);super(Ne,new O([new I(e),n]))}_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);let n=this.content,r=n.items[0].value,i=n.items[1];return i instanceof I?`${r}${he(i.value)}`:`${r}<<${i.items.map(n=>n._toCDN(e,t)).join(`, `)}>>`}},Pe=class extends _{inner;ednSource;constructor(e,t){super(),this.inner=e,this.ednSource=t}_toCBOR(e){return this.inner._toCBOR(e)}_toCDN(e,t){return e?.appStrings===!1?this.inner._toCDN(e,t):this.ednSource}_toJS(e){return this.inner._toJS(e)}},Fe=888n,N=class extends w{constructor(e){e===void 0?super(Fe,A.NULL):super(Fe,new O(e))}_toCDN(e,t){return this.content instanceof A?`...`:this.content instanceof O?this.content.items.map(n=>n._toCDN(e,t)).join(` + `):super._toCDN(e,t)}},Ie=2n,Le=3n,Re=18446744073709551615n,ze=-18446744073709551616n;function Be(e){if(e<0n)throw RangeError(`bigintToBytes requires a non-negative value`);if(e===0n)return new Uint8Array;let t=e.toString(16);t.length%2!=0&&(t=`0`+t);let n=new Uint8Array(t.length/2);for(let e=0;e<n.length;e++)n[e]=parseInt(t.slice(e*2,e*2+2),16);return n}function Ve(e){let t=0n;for(let n of e)t=t<<8n|BigInt(n);return t}var P=class extends w{bigValue;constructor(e){if(e<=Re)throw RangeError(`CborBigUint value ${e} fits in CborUint; use CborUint instead`);super(Ie,new T(Be(e))),this.bigValue=e}_toCDN(e,t){return this.bigValue.toString()}_toJS(e){return this.bigValue}},F=class extends w{bigValue;constructor(e){if(e>=ze)throw RangeError(`CborBigNint value ${e} fits in CborNint; use CborNint instead`);super(Le,new T(Be(-1n-e))),this.bigValue=e}_toCDN(e,t){return this.bigValue.toString()}_toJS(e){return this.bigValue}};function He(e,t){let n=new je(e,{offset:t?.offset}),r=new Qe(n,t??{}).parse();return t?.preserveComments&&Je(r,n.comments,e),r}function Ue(e){let t=e,n;return/[_][0-7i]$/.test(e)&&(n=e[e.length-1],t=e.slice(0,-2)),{numStr:t,rawSuffix:n}}function We(e){return e.startsWith(`-`)?-BigInt(e.slice(1)):BigInt(e)}function Ge(e,t){if(e.endsWith(`_i`)||e.endsWith(`_0`)){let n=`_0 and _i encoding indicators are not valid for floating-point values`;if(t)t(n),e=e.slice(0,-2);else throw SyntaxError(`EDN parse error: ${n}`)}else if(/[_][4567]$/.test(e)){let n=e[e.length-1],r=n===`7`?`indefinite-length encoding (_7) is not valid for floating-point values`:`encoding indicator _${n} (AI ${Number(n)+24}) is reserved and not valid`;if(t)t(r),e=e.slice(0,-2);else throw SyntaxError(`EDN parse error: ${r}`)}if(e===`NaN`)return{value:NaN,precision:void 0};if(e===`Infinity`)return{value:1/0,precision:void 0};if(e===`-Infinity`)return{value:-1/0,precision:void 0};let n=e,r;return e.endsWith(`_1`)?(r=`half`,n=e.slice(0,-2)):e.endsWith(`_2`)?(r=`single`,n=e.slice(0,-2)):e.endsWith(`_3`)&&(r=`double`,n=e.slice(0,-2)),/^-?0[xX]/.test(n)?{value:Oe(n),precision:r}:{value:parseFloat(n),precision:r}}function Ke(e){if(typeof Uint8Array.fromHex==`function`)return Uint8Array.fromHex(e);if(e.length%2!=0)throw SyntaxError(`hex string has odd length: ${e.length}`);let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t}function qe(e,t){let n=e.indexOf(`=`),r=n>=0?e.slice(0,n):e,i=n>=0?e.slice(n):``;if(/[^A-Za-z0-9+/\-_]/.test(r)){let e=[...r].find(e=>!/[A-Za-z0-9+/\-_]/.test(e))??``;throw SyntaxError(`invalid character ${JSON.stringify(e)} in base64 data`)}if(i&&!/^=+$/.test(i))throw SyntaxError(`invalid character after base64 '=' padding`);let a=r.length%4;if(a===1)throw SyntaxError(`invalid base64 length: ${r.length} data characters (length mod 4 = 1 is never valid)`);let o=a===0?0:4-a;if(i.length>o){let e=`base64 has ${i.length} '=' character${i.length>1?`s`:``} but the data length (${r.length}) requires at most ${o}`;if(t)t(e);else throw SyntaxError(e)}if(i.length>0&&i.length<o){let e=`base64 has ${i.length} '=' character${i.length>1?`s`:``} but needs exactly ${o} — use full padding or no padding at all`;if(t)t(e);else throw SyntaxError(e)}if(a!==0&&r.length>0){let e=r[r.length-1].replace(`-`,`+`).replace(`_`,`/`),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.indexOf(e);if(n>=0&&n&(a===2?15:3)){let e=`base64 has non-zero trailing bits in the final quantum (RFC 4648 §3.5)`;if(t)t(e);else throw SyntaxError(e)}}let s=r.replace(/-/g,`+`).replace(/_/g,`/`)+`=`.repeat(o);if(typeof Uint8Array.fromBase64==`function`)return Uint8Array.fromBase64(s,{alphabet:`base64`,lastChunkHandling:`loose`});let c=atob(s),l=new Uint8Array(c.length);for(let e=0;e<c.length;e++)l[e]=c.charCodeAt(e);return l}function Je(e,t,n){if(t.length===0)return;let r=Ye(e),i=Ze(n);for(let a of t){let t={...a},o=[...r].filter(e=>e.end<=a.start).sort((e,t)=>t.end-e.end||t.start-e.start)[0],s=o?n.slice(o.end,a.start):``;if(o&&i(o.end)===a.line&&!s.includes(`:`)){Xe(o.node,`trailing`,t);continue}let c=[...r].filter(e=>e.start<a.start&&a.end<e.end).sort((e,t)=>t.start-e.start||e.end-t.end)[0],l=[...r].filter(e=>e.start>=a.end).sort((e,t)=>e.start-t.start||t.end-e.end)[0];if((!c||l&&l.end<=c.end)&&l){Xe(l.node,`leading`,t);continue}Xe(c?.node??e,`dangling`,t)}}function Ye(e){let t=[],n=e=>{if(e.start!==void 0&&e.end!==void 0&&t.push({node:e,start:e.start,end:e.end}),e instanceof O||e instanceof j){for(let t of e.items)n(t);return}if(e instanceof k){for(let[t,r]of e.entries)n(t),n(r);return}if(e instanceof E||e instanceof D){for(let t of e.chunks)n(t);return}e instanceof w&&n(e.content)};return n(e),t}function Xe(e,t,n){e.comments??={},e.comments[t]??=[],e.comments[t].push(n)}function Ze(e){let t=[0];for(let n=0;n<e.length;n++)e[n]===`
|
|
31
|
+
`&&t.push(n+1);return n=>{let r=Math.max(0,Math.min(e.length,n));r>0&&r===e.length&&r--;let i=0,a=t.length-1;for(;i<=a;){let e=i+a>>1;t[e]<=r?i=e+1:a=e-1}return a+1}}var Qe=class{t;_options;extByPrefix;extByTag;unresolvedExtension;_pendingWarnings=[];constructor(e,t){this.t=e,this._options=t,this.extByPrefix=new Map,this.extByTag=new Map,this.unresolvedExtension=t.unresolvedExtension??`cpa999`;for(let e of[...Z,...t.extensions??[]]){for(let t of e.appStringPrefixes??[])this.extByPrefix.set(t,e);for(let t of e.tagNumbers??[])this.extByTag.set(t,e)}this.t.onEscapeWarning=(e,t,n,r)=>{let i={message:e,offset:t,line:n,column:r};if(this._pendingWarnings.push(i),this._options.onWarning?this._options.onWarning(i):this._options.silent||console.warn(`CDN strict violation at line ${n}, column ${r}: ${e}`),this._options.strict!==!1)throw SyntaxError(`EDN parse error at line ${n}, column ${r}: ${e}`)}}parse(){let e=this.parseValue();if(this._options.allowTrailing)return e;let t=this.t.peek();return t.type!==`EOF`&&this._fail(`unexpected token after value: ${JSON.stringify(t.value)}`,t),e}parseValue(){let e=this.t.peek().offset,t=this._parseValueNode();if(this._pendingWarnings.length>0){t.warnings??=[];for(let e of this._pendingWarnings)t.warnings.push(e);this._pendingWarnings=[]}return t.start=e,t.end=this.t.lastEndOffset,t}_parseValueNode(){let e=this.t.peek();switch(e.type){case`INTEGER`:return this.parseIntegerOrTag();case`FLOAT`:return this.parseFloat();case`TSTR`:case`RAWSTRING`:return this.parseString();case`BYTES_HEX`:case`SQSTR`:case`BYTES_B64`:return this.t.consume(),this._parseBytesConcat(this._decodeBytesToken(e),e.type,e.raw);case`EMPTY_INDEF_BYTES`:return this.t.consume(),new E([]);case`EMPTY_INDEF_TEXT`:return this.t.consume(),new D([]);case`TRUE`:return this.t.consume(),A.TRUE;case`FALSE`:return this.t.consume(),A.FALSE;case`NULL`:return this.t.consume(),A.NULL;case`UNDEFINED`:return this.t.consume(),A.UNDEFINED;case`SIMPLE`:return this.parseSimple();case`LBRACKET`:return this.parseArray();case`LBRACE`:return this.parseMap();case`LPAREN`:return this.parseIndefGroup();case`LT_LT`:return this.parseEmbeddedCBOR();case`APP_STRING`:{this.t.consume();let t=this.extByPrefix.get(e.appPrefix);if(!t?.parseAppString){if(this.unresolvedExtension===`cpa999`)return new M(e.appPrefix,[new I(e.value)]);this._fail(`unknown app-string extension: ${JSON.stringify(e.appPrefix)}`,e)}{let n=this._pendingWarnings.length;try{let n=t.parseAppString(e.appPrefix,e.value,this._extOnError(e));return n instanceof T&&Object.getPrototypeOf(n)===T.prototype&&n.ednSource===void 0?new T(n.value,{ednEncoding:n.ednEncoding,encodingWidth:n.encodingWidth,ednSource:e.raw}):(n instanceof C&&n.ednSource===void 0&&(n.ednSource=e.raw),n)}catch(t){if(this._options.strict!==!1)throw t;return this._pendingWarnings.length===n&&this._warn(t instanceof Error?t.message:String(t),e),new M(e.appPrefix,[new I(e.value)])}}}case`APP_SEQUENCE`:{this.t.consume();let t=[];for(;this.t.peek().type!==`GT_GT`&&(this.t.peek().type===`EOF`&&this._fail(`unterminated ${e.appPrefix}<<...>>`,e),!(t.length>0&&this.t.peek().type===`COMMA`&&(this.t.consume(),this.t.peek().type===`GT_GT`)));)t.push(this.parseValue());this.expect(`GT_GT`);let n=this.extByPrefix.get(e.appPrefix);if(!n){if(this.unresolvedExtension===`cpa999`)return new M(e.appPrefix,t);this._fail(`unknown app-string extension: ${JSON.stringify(e.appPrefix)}`,e)}n.parseAppSequence||this._fail(`app-string extension ${JSON.stringify(e.appPrefix)} does not support <<...>> form`,e);{let r=this._pendingWarnings.length;try{let r=n.parseAppSequence(e.appPrefix,t,this._extOnError(e)),i=this.t.source.slice(e.offset,this.t.lastEndOffset);if(r instanceof C)r.ednSource===void 0&&(r.ednSource=i);else if(n.preserveAppSeqSource)return new Pe(r,i);return r}catch(n){if(this._options.strict!==!1)throw n;return this._pendingWarnings.length===r&&this._warn(n instanceof Error?n.message:String(n),e),new M(e.appPrefix,t)}}}case`ELLIPSIS`:{if(this.t.consume(),this.t.peek().type!==`PLUS`)return new N;let e=[new N];for(;this.t.peek().type===`PLUS`;)this.t.consume(),e.push(this.parseValue());return new N(e)}case`BYTES_HEX_ELIDED`:return this.t.consume(),this._parseHexElidedConcat(e);default:this._fail(`unexpected token: ${JSON.stringify(e.value)}`,e)}}parseIntegerOrTag(){let e=this.t.consume(),{numStr:t,rawSuffix:n}=Ue(e.value),r=n===void 0?this.consumeEncodingIndicator():this._resolveEncodingWidth(n,e),i=We(t);if(i>18446744073709551615n)return this.t.peek().type===`LPAREN`&&this._fail(`tag number exceeds maximum uint64`,e),new P(i);if(i<-18446744073709551616n)return new F(i);if(r!==void 0){let t=i>=0n?i:-(i+1n);r=this._validateEncodingFit(t,r,e)}let a=i>=0n?new x(i,r===void 0?void 0:{encodingWidth:r}):new S(i,r===void 0?void 0:{encodingWidth:r});if(this.t.peek().type===`LPAREN`){a instanceof x||this._fail(`tag number must be non-negative`,e),this.t.consume();let t=this._pendingWarnings.splice(0),n=this.parseValue();this.expect(`RPAREN`);let i=a.value,o=this.extByTag.get(i);if(o?.parseTag){let e=o.parseTag(i,n);if(e!==void 0)return t.length>0&&(e.warnings??=[],e.warnings.push(...t)),e}let s=new w(i,n,r===void 0?void 0:{encodingWidth:r});return t.length>0&&(s.warnings??=[],s.warnings.push(...t)),s}return a}parseFloat(){let e=this.t.consume(),t=t=>{this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)},{value:n,precision:r}=Ge(e.value,t);if(r===`half`||r===`single`){let e=r===`half`?v(xe(n)):Math.fround(n);Object.is(n,e)||isNaN(n)&&isNaN(e)||t(`${n} cannot be exactly represented as ${r===`half`?`f16 (_1)`:`f32 (_2)`}; use _3 or remove the indicator`)}return new C(n,r===void 0?void 0:{precision:r})}parseString(){let e=this.t.consume();if(this.t.peek().type!==`PLUS`){let t=BigInt(new TextEncoder().encode(e.value).length),n=this.consumeEncodingIndicator(t);return new I(e.value,n===void 0?void 0:{encodingWidth:n})}let t=!1,n=[{text:e.value}];for(;this.t.peek().type===`PLUS`;){this.t.consume();let e=this.t.peek();e.type===`ELLIPSIS`?(this.t.consume(),n.push({ellipsis:!0}),t=!0):e.type===`TSTR`||e.type===`RAWSTRING`?(this.t.consume(),n.push({text:e.value})):this._isBytesToken(e.type)?(this.t.consume(),n.push({text:this._decodeUtf8(this._decodeBytesToken(e),e)})):this._fail(`expected string or byte string after +, got ${JSON.stringify(e.value)}`,e)}if(!t){let e=n.map(e=>`text`in e?e.text:``).join(``),t=BigInt(new TextEncoder().encode(e).length),r=this.consumeEncodingIndicator(t);return new I(e,r===void 0?void 0:{encodingWidth:r})}let r=[],i=``;for(let e of n)`ellipsis`in e?(i!==``&&(r.push(new I(i)),i=``),r.push(new N)):i+=e.text;return i!==``&&r.push(new I(i)),new N(r)}_isBytesToken(e){return e===`BYTES_HEX`||e===`SQSTR`||e===`BYTES_B64`}_decodeBytesToken(e){let t=t=>{this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)};switch(e.type){case`BYTES_HEX`:case`SQSTR`:return Ke(e.value);case`BYTES_B64`:return qe(e.value,t);default:this._fail(`expected byte string token`,e)}}_decodeUtf8(e,t){if(this._options.allowInvalidUtf8)return new TextDecoder(`utf-8`,{fatal:!1}).decode(e);try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e)}catch{let n=`byte string in text concatenation is not valid UTF-8`;return this._warn(n,t),this._options.strict!==!1&&this._fail(n,t),new TextDecoder(`utf-8`,{fatal:!1}).decode(e)}}_tokenTypeToCdnEncoding(e){return e===`BYTES_B64`?`base64`:`hex`}_parseBytesConcat(e,t,n){if(this.t.peek().type!==`PLUS`){let r=this.consumeEncodingIndicator(BigInt(e.length));return new T(e,{ednEncoding:this._tokenTypeToCdnEncoding(t),ednSource:n,...r===void 0?{}:{encodingWidth:r}})}let r=!1,i=[{bytes:e}];for(;this.t.peek().type===`PLUS`;){this.t.consume();let e=this.t.peek();if(e.type===`ELLIPSIS`)this.t.consume(),i.push({ellipsis:!0}),r=!0;else if(e.type===`BYTES_HEX_ELIDED`){this.t.consume();let t=this._buildBytesElidedItems(e.value);for(let e of t)e instanceof N?(i.push({ellipsis:!0}),r=!0):e instanceof T&&i.push({bytes:e.value})}else if(this._isBytesToken(e.type))this.t.consume(),i.push({bytes:this._decodeBytesToken(e)});else if(e.type===`TSTR`||e.type===`RAWSTRING`){this.t.consume();let t=`text string in a byte-string concatenation is not allowed; use a byte string literal (h'...', b64'...', or '...') instead`;this._warn(t,e),this._options.strict!==!1&&this._fail(t,e),i.push({bytes:new TextEncoder().encode(e.value)})}else this._fail(`expected byte string after +, got ${JSON.stringify(e.value)}`,e)}if(!r){let e=i.map(e=>`bytes`in e?e.bytes:new Uint8Array),t=this._concatBytes(e),n=this.consumeEncodingIndicator(BigInt(t.length));return new T(t,n===void 0?void 0:{encodingWidth:n})}let a=[],o=[],s=()=>{o.length>0&&(a.push(new T(this._concatBytes([...o]))),o.length=0)};for(let e of i)`ellipsis`in e?(s(),a.push(new N)):o.push(e.bytes);return s(),new N(a)}_parseHexElidedConcat(e){let t=this._buildBytesElidedItems(e.value);for(;this.t.peek().type===`PLUS`;){this.t.consume();let e=this.t.peek();if(e.type===`ELLIPSIS`)this.t.consume(),t.push(new N);else if(e.type===`BYTES_HEX_ELIDED`){this.t.consume();let n=this._buildBytesElidedItems(e.value);this._mergeFirstBytesItem(t,n)}else if(this._isBytesToken(e.type)){this.t.consume();let n=this._decodeBytesToken(e),r=t[t.length-1];r instanceof T?t[t.length-1]=new T(this._concatBytes([r.value,n])):t.push(new T(n))}else this._fail(`expected byte string after +, got ${JSON.stringify(e.value)}`,e)}return new N(t)}_buildBytesElidedItems(e){let t=e.split(`...`),n=[];for(let e=0;e<t.length;e++)e>0&&n.push(new N),t[e].length>0&&n.push(new T(Ke(t[e])));return n}_mergeFirstBytesItem(e,t){if(t.length===0)return;let n=e[e.length-1],r=t[0];n instanceof T&&r instanceof T?(e[e.length-1]=new T(this._concatBytes([n.value,r.value])),e.push(...t.slice(1))):e.push(...t)}_concatBytes(e){let t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}parseSimple(){this.t.consume(),this.expect(`LPAREN`);let e=this.t.peek();e.type!==`INTEGER`&&this._fail(`expected integer inside simple(), got ${JSON.stringify(e.value)}`,e),this.t.consume();let{numStr:t}=Ue(e.value),n=Number(We(t));return this.expect(`RPAREN`),new A(n)}parseEmbeddedCBOR(){this.t.consume();let e=[];for(;this.t.peek().type!==`GT_GT`&&!(e.length>0&&this.t.peek().type===`COMMA`&&(this.t.consume(),this.t.peek().type===`GT_GT`));)e.push(this.parseValue());return this.expect(`GT_GT`),new j(e)}parseArray(){this.t.consume();let e=!1,t,n;if(this.t.peek().type===`UNDERSCORE`)this.t.consume(),e=!0;else if(this.t.peek().type===`ENCODING_INDICATOR`)if(n=this.t.consume(),n.value===`7`){e=!0;let t=`encoding indicator _7 is non-standard; use _ to indicate indefinite length`;this._warn(t,n),this._options.strict!==!1&&this._fail(t,n),n=void 0}else t=this._resolveEncodingWidth(n.value,n);let r=this._pendingWarnings.splice(0),i=[];for(;this.t.peek().type!==`RBRACKET`&&!(i.length>0&&this.t.peek().type===`COMMA`&&(this.t.consume(),this.t.peek().type===`RBRACKET`));)i.push(this.parseValue());this.expect(`RBRACKET`),t!==void 0&&n!==void 0&&(t=this._validateEncodingFit(BigInt(i.length),t,n));let a=new O(i,{indefiniteLength:e,encodingWidth:t});return r.length>0&&(a.warnings??=[],a.warnings.push(...r)),a}parseMap(){this.t.consume();let e=!1,t,n;if(this.t.peek().type===`UNDERSCORE`)this.t.consume(),e=!0;else if(this.t.peek().type===`ENCODING_INDICATOR`)if(n=this.t.consume(),n.value===`7`){e=!0;let t=`encoding indicator _7 is non-standard; use _ to indicate indefinite length`;this._warn(t,n),this._options.strict!==!1&&this._fail(t,n),n=void 0}else t=this._resolveEncodingWidth(n.value,n);let r=this._pendingWarnings.splice(0),i=[];for(;this.t.peek().type!==`RBRACE`&&!(i.length>0&&this.t.peek().type===`COMMA`&&(this.t.consume(),this.t.peek().type===`RBRACE`));){let e=this.parseValue();this.expect(`COLON`);let t=this.parseValue();i.push([e,t])}this.expect(`RBRACE`),t!==void 0&&n!==void 0&&(t=this._validateEncodingFit(BigInt(i.length),t,n));let a=new k(i,{indefiniteLength:e,encodingWidth:t});return r.length>0&&(a.warnings??=[],a.warnings.push(...r)),a}parseIndefGroup(){this.t.consume();let e=this.t.peek();if(e.type===`UNDERSCORE`)this.t.consume();else if(e.type===`ENCODING_INDICATOR`&&e.value===`7`){this.t.consume();let t=`encoding indicator _7 is non-standard; use _ to indicate indefinite length`;this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)}else if(e.type===`ENCODING_INDICATOR`){let e=this.t.consume(),t=`encoding indicator _${e.value} is not valid in an indefinite string group; use _`;this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)}else if(e.type!==`RPAREN`){let t=`indefinite string group is missing _ after (; interpreting as (_ ...)`;this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)}let t=this._pendingWarnings.splice(0),n=[];for(;this.t.peek().type!==`RPAREN`&&!(n.length>0&&this.t.peek().type===`COMMA`&&(this.t.consume(),this.t.peek().type===`RPAREN`));)n.push(this.parseValue());this.expect(`RPAREN`),n.length===0&&this._fail(`empty indefinite group (_ ) is ambiguous; use ''_ for bytes or ""_ for text`);let r=n[0];if(r instanceof T){let e=new E(n.map((e,t)=>{if(e instanceof T)return e;this._fail(`indefinite byte string chunk ${t} must be a byte string, not a text string`)}));return t.length>0&&(e.warnings=t),e}if(r instanceof I){let e=new D(n.map((e,t)=>{if(e instanceof I)return e;this._fail(`indefinite text string chunk ${t} must be a text string, not a byte string`)}));return t.length>0&&(e.warnings=t),e}this._fail(`indefinite group chunks must be byte strings or text strings`)}consumeEncodingIndicator(e){if(this.t.peek().type===`ENCODING_INDICATOR`){let t=this.t.consume(),n=this._resolveEncodingWidth(t.value,t);return n!==void 0&&e!==void 0&&(n=this._validateEncodingFit(e,n,t)),n}}expect(e){let t=this.t.consume();return t.type!==e&&this._fail(`expected ${e}, got ${t.type} (${JSON.stringify(t.value)})`,t),t}_validateEncodingFit(e,t,n){let r={i:23n,0:255n,1:65535n,2:4294967295n,3:18446744073709551615n};if(e<=r[t])return t;let i=`value ${e} does not fit in encoding indicator ${t===`i`?`_i (max 23)`:`_${t} (max ${r[t]})`}`;this._warn(i,n),this._options.strict!==!1&&this._fail(i,n)}_resolveEncodingWidth(e,t){if(e===`4`||e===`5`||e===`6`){let n=`encoding indicator _${e} (AI ${Number(e)+24}) is reserved and not valid`;this._warn(n,t),this._options.strict!==!1&&this._fail(n,t);return}if(e===`7`){let e=`indefinite-length encoding (_7) is not valid here; use [_ ...] or {_ ...} for indefinite collections`;this._warn(e,t),this._options.strict!==!1&&this._fail(e,t);return}return e===`i`?`i`:Number(e)}_extOnError(e){return t=>{this._warn(t,e),this._options.strict!==!1&&this._fail(t,e)}}_warn(e,t){let n={message:e};if(t!==void 0&&(n.offset=t.offset,n.line=t.line,n.column=t.col),this._pendingWarnings.push(n),this._options.onWarning)this._options.onWarning(n);else if(!this._options.silent){let n=t?` at line ${t.line}, column ${t.col}`:``;console.warn(`CDN strict violation${n}: ${e}`)}}_fail(e,t){let n=t?` at line ${t.line}, column ${t.col}`:``;throw SyntaxError(`EDN parse error${n}: ${e}`)}},$e=new TextEncoder,et=!1,I=class extends _{indefiniteLength=!1;value;encodingWidth;constructor(e,t){super(),this.value=e,this.encodingWidth=t?.encodingWidth}_toCBOR(e){let t=$e.encode(this.value);return b([y(3,BigInt(t.length),this.encodingWidth),t])}_toCDN(e,t){let n=this.encodingWidth===void 0?``:`_${this.encodingWidth}`;return tt(this.value,n,e,t)}_toJS(e){return this.value}};function tt(e,t,n,r){let i=nt(n?.textStringFormat??[]),a=d(n);if(i.length===0||a===null)return ge(e)+t;let o=new Map,s=null;if(i.includes(`cdn`)&&(s=it(e),s!==null))for(let{point:e,contentDepth:t}of s)o.set(e,t);if(i.includes(`newline`)){let t=s===null?rt(e,0):at(e);for(let{point:e,contentDepth:n}of t)o.has(e)||o.set(e,n)}let c=ft(e,o);if(c.length<=1)return ge(e)+t;let l=c.map(({text:e},n)=>{let r=ge(e);return n===c.length-1?r+t:r}),u=l[0];for(let e=1;e<l.length;e++){let t=f(a,r+1+c[e].contentDepth);u+=` +\n${t}${l[e]}`}return u}function nt(e){return e.map(e=>e===`cboredn`?(et||(et=!0,console.warn("`textStringFormat: ['cboredn']` is deprecated; use `textStringFormat: ['cdn']` instead.")),`cdn`):e)}function rt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];i===`\r`?e[r+1]===`
|
|
32
|
+
`?(n.push({point:r+2,contentDepth:t}),r++):n.push({point:r+1,contentDepth:t}):i===`
|
|
33
|
+
`&&n.push({point:r+1,contentDepth:t})}return n}function it(e){try{He(e)}catch{return null}let t=[],n=new je(e),r=0,i=null,a=!1,o=0;for(;;){let s=n.consume();if(s.type===`EOF`)break;let c=!1;if(a||(a=!0,s.offset>0&&ut(n.comments,0,s.offset)&&t.push({point:s.offset,contentDepth:r})),i!==null){if(i.kind===`opener`&&st.has(s.type)){i.point=s.endOffset,o=s.endOffset;continue}else i.kind===`opener`&<.has(s.type)&&dt(e,i.point,s.offset)?c=!0:t.push({point:s.offset,contentDepth:i.contentDepth});i=null}ct.has(s.type)?(r++,i={point:s.endOffset,contentDepth:r,kind:`opener`}):lt.has(s.type)?(r=Math.max(0,r-1),c||t.push({point:s.offset,contentDepth:r})):s.type===`COMMA`&&(i={point:s.endOffset,contentDepth:r,kind:`comma`}),o=s.endOffset}let s=n.comments.find(e=>e.start>=o);return s!==void 0&&t.push({point:s.start,contentDepth:r}),t}function at(e){let t=[],n=new je(e),r=0;for(;;){let i=n.consume();if(i.type===`EOF`)break;if(ct.has(i.type))r++;else if(lt.has(i.type))r=Math.max(0,r-1);else if(i.type!==`COMMA`){if(i.type===`TSTR`){let n=e.slice(i.offset,i.endOffset);for(let e of ot(n))t.push({point:i.offset+e,contentDepth:r+1})}else if(i.type===`RAWSTRING`){let n=e.slice(i.offset,i.endOffset);for(let{point:e}of rt(n,0))t.push({point:i.offset+e,contentDepth:r+1})}}}return t}function ot(e){let t=[],n=1,r=e.length-1;for(;n<r;){let r=e[n];if(r===`\\`){let r=e[n+1];if(r===`n`||r===`r`)t.push(n+2),n+=2;else if(r===`u`)if(e[n+2]===`{`){let t=e.indexOf(`}`,n+3);n=t>=0?t+1:n+2}else n+=6;else n+=2}else r===`\r`?e[n+1]===`
|
|
34
|
+
`?(t.push(n+2),n+=2):(t.push(n+1),n++):(r===`
|
|
35
|
+
`&&t.push(n+1),n++)}return t}var st=new Set([`ENCODING_INDICATOR`,`UNDERSCORE`]),ct=new Set([`LBRACKET`,`LBRACE`,`LPAREN`,`LT_LT`]),lt=new Set([`RBRACKET`,`RBRACE`,`RPAREN`,`GT_GT`]);function ut(e,t,n){return e.some(e=>e.start>=t&&e.end<=n)}function dt(e,t,n){return/^[\t\n\r ]*$/.test(e.slice(t,n))}function ft(e,t){let n=[...t].filter(([t])=>t>0&&t<e.length).sort(([e],[t])=>e-t);if(n.length===0)return[{text:e,contentDepth:0}];let r=[],i=0,a=0;for(let[t,o]of n)t!==i&&(r.push({text:e.slice(i,t),contentDepth:a}),i=t,a=o);return i<e.length&&r.push({text:e.slice(i),contentDepth:a}),r}function L(e){if(Number.isInteger(e))return new Date(e*1e3).toISOString().replace(/\.000Z$/,`Z`);let t=Math.round(e*1e3);if(t/1e3===e)return new Date(t).toISOString().replace(/\.000Z$/,`Z`);let n=Math.floor(e),r=e-n,i=new Date(n*1e3).toISOString().replace(/\.\d+Z$/,``),a=r.toString(),o=a.indexOf(`.`),s=o>=0?a.slice(o+1):`0`;for(;s.length<3;)s+=`0`;return`${i}.${s}Z`}function pt(e){if(e.length!==1)throw SyntaxError(`dt<<...>>: expected exactly one item`);let t=e[0];if(t instanceof I)return t.value;if(t instanceof T)return new TextDecoder(`utf-8`,{fatal:!0}).decode(t.value);throw SyntaxError(`dt<<...>>: expected a text string or byte string`)}var mt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/i;function ht(e,t){if(!mt.test(e)){let n=`dt: invalid RFC 3339 date-time: ${JSON.stringify(e)}`;if(t)t(n);else throw SyntaxError(n)}let n=e.match(/^(.+T\d{2}:\d{2}:\d{2})(\.\d+)(Z|[+-]\d{2}:\d{2})$/i),r,i;n?(r=n[1]+n[3],i=parseFloat(`0`+n[2])):(r=e,i=void 0);let a=Date.parse(r);if(isNaN(a))throw SyntaxError(`dt: invalid RFC 3339 date-time: ${JSON.stringify(e)}`);if(i===void 0){let e=a/1e3;return e>=0?new _t(BigInt(e)):new vt(BigInt(e))}return new yt(a/1e3+i)}var gt=1n,_t=class extends x{constructor(e,t){super(e,t)}_toCDN(e,t){return e?.appStrings===!1?super._toCDN(e,t):`dt'${L(Number(this.value))}'`}},vt=class extends S{constructor(e,t){super(e,t)}_toCDN(e,t){return e?.appStrings===!1?super._toCDN(e,t):`dt'${L(Number(this.value))}'`}},yt=class extends C{constructor(e,t){super(e,t)}_toCDN(e,t){return e?.appStrings===!1?super._toCDN(e,t):`dt'${L(this.value)}'`}},bt=class extends w{constructor(e,t){super(gt,ht(e),t)}_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);let n=this.content;return`DT'${L(n instanceof C?n.value:Number(n.value))}'`}},xt=class extends bt{constructor(e,t){super(e,t)}_toJS(e){let t=this.content,n=t instanceof C?t.value*1e3:Number(t.value)*1e3;return new Date(n)}};function St(e){let t=e?.jsDate??!1;function n(e){return t?new xt(e):new bt(e)}let r={appStringPrefixes:[`dt`,`DT`],tagNumbers:[gt],parseAppString(e,t,r){return e===`DT`?n(t):ht(t,r)},parseAppSequence(e,t,r){let i=pt(t);return e===`DT`?n(i):ht(i,r)},parseTag(e,t){if(e!==1n)return;let r;if(t instanceof x)r=Number(t.value);else if(t instanceof S)r=Number(t.value);else if(t instanceof C)r=t.value;else return;return n(L(r))}};return t&&(r.fromJS=(e,t)=>{if(e instanceof Date)return new xt(L(e.getTime()/1e3))},r.isJSType=e=>e instanceof Date),r}var Ct=St(),wt=St({jsDate:!0});function Tt(e){let t=e.split(`.`);if(t.length!==4)throw SyntaxError(`ip: invalid IPv4 address: ${JSON.stringify(e)}`);let n=new Uint8Array(4);for(let e=0;e<4;e++){let r=t[e];if(!/^\d+$/.test(r)||r.length>1&&r[0]===`0`)throw SyntaxError(`ip: invalid IPv4 octet: ${JSON.stringify(r)}`);let i=parseInt(r,10);if(i>255)throw SyntaxError(`ip: IPv4 octet out of range: ${i}`);n[e]=i}return n}function Et(e){let t=new Uint8Array(16);if(e===`::`)return t;let n=e,r=null,i=e.match(/^(.*):(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/);i&&(n=i[1],n.endsWith(`:`)&&(n+=`:`),r=Tt(i[2]));let a=n.split(`::`);if(a.length>2)throw SyntaxError(`ip: invalid IPv6 address: ${JSON.stringify(e)}`);let o=a.length===2,s=a[0]?a[0].split(`:`):[],c=o&&a[1]?a[1].split(`:`):[],l=r?6:8;if(!o&&s.length!==l||o&&s.length+c.length>=l)throw SyntaxError(`ip: invalid IPv6 address: ${JSON.stringify(e)}`);let u=l-s.length-c.length,d=[...s,...Array(u).fill(`0`),...c],f=0;for(let e of d){if(!/^[0-9a-fA-F]{1,4}$/.test(e))throw SyntaxError(`ip: invalid IPv6 group: ${JSON.stringify(e)}`);let n=parseInt(e,16);t[f++]=n>>8&255,t[f++]=n&255}return r&&t.set(r,12),t}function Dt(e){return Array.from(e).join(`.`)}function Ot(e){let t=e.slice(0,10).every(e=>e===0)&&e[10]===255&&e[11]===255?Dt(e.slice(12)):null,n=t?6:8,r=[];for(let t=0;t<n*2;t+=2)r.push(e[t]<<8|e[t+1]);let i=-1,a=0,o=0;for(;o<n;)if(r[o]===0){let e=o+1;for(;e<n&&r[e]===0;)e++;e-o>a&&(i=o,a=e-o),o=e}else o++;a<2&&(i=-1);let s=e=>e.toString(16),c;return c=i===-1?r.map(s).join(`:`):`${r.slice(0,i).map(s).join(`:`)}::${r.slice(i+a).map(s).join(`:`)}`,t?`${c}:${t}`:c}var kt=`ip`,R=`IP`,z=52n,B=54n;function At(e){if(e.length!==1)throw SyntaxError(`ip<<...>>: expected exactly one item`);let t=e[0];if(t instanceof I)return t.value;if(t instanceof T)return new TextDecoder(`utf-8`,{fatal:!0}).decode(t.value);throw SyntaxError(`ip<<...>>: expected a text string or byte string`)}function jt(e){return/^\d/.test(e)&&e.includes(`.`)&&!e.includes(`:`)?{bytes:Tt(e),isV4:!0}:{bytes:Et(e),isV4:!1}}function V(e){if(e.length===4)return Dt(e);if(e.length===16)return Ot(e);throw SyntaxError(`ip: unexpected byte length: ${e.length}`)}function Mt(e,t){let n=new Uint8Array(e.length);n.set(e);let r=Math.floor(t/8),i=t%8;i>0&&r<e.length&&(n[r]&=255<<8-i&255);for(let t=r+ +(i>0);t<e.length;t++)n[t]=0;let a=Math.ceil(t/8);for(;a>0&&n[a-1]===0;)a--;return n.slice(0,a)}function Nt(e,t){let n=new Uint8Array(t);return n.set(e),n}var Pt=class extends T{_toCDN(e,t){return e?.appStrings===!1?super._toCDN(e,t):`${kt}'${V(this.value)}'`}},Ft=class extends O{_isV4;constructor(e,t,n){super([new x(BigInt(e)),new T(t)]),this._isV4=n}_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);let n=Number(this.items[0].value),r=this.items[1].value;return`${kt}'${V(Nt(r,this._isV4?4:16))}/${n}'`}},It=class extends w{constructor(e,t){super(e,t)}_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);let n=this.tag===z?4:16,r=this.content;if(r instanceof T)return`${R}'${V(r.value)}'`;if(r instanceof O&&r.items.length===2&&r.items[0]instanceof x&&r.items[1]instanceof T){let e=Number(r.items[0].value);return`${R}'${V(Nt(r.items[1].value,n))}/${e}'`}return super._toCDN(e,t)}};function Lt(e,t){let n=t.indexOf(`/`);if(n===-1){let{bytes:n,isV4:r}=jt(t);return e===R?new It(r?z:B,new T(n)):new Pt(n)}let r=t.slice(0,n),i=t.slice(n+1);if(!/^\d+$/.test(i))throw SyntaxError(`ip: invalid prefix length: ${JSON.stringify(i)}`);let a=parseInt(i,10),{bytes:o,isV4:s}=jt(r),c=s?32:128;if(a>c)throw SyntaxError(`ip: prefix length ${a} exceeds maximum ${c} for ${s?`IPv4`:`IPv6`}`);let l=Mt(o,a);return e===R?new It(s?z:B,new O([new x(BigInt(a)),new T(l)])):new Ft(a,l,s)}var Rt={appStringPrefixes:[kt,R],tagNumbers:[z,B],parseAppString(e,t){return Lt(e,t)},parseAppSequence(e,t){return Lt(e,At(t))},parseTag(e,t){if(!(e!==z&&e!==B)&&(t instanceof T||t instanceof O))return new It(e,t)}},zt=18446744073709551615n,Bt=-18446744073709551616n,Vt={tagNumbers:[Ie,Le],parseTag(e,t){if(t instanceof T){if(e===2n){let e=Ve(t.value);return e>zt?new P(e):void 0}if(e===3n){let e=-1n-Ve(t.value);return e<Bt?new F(e):void 0}}}},Ht=`cri`,Ut=`CRI`,Wt=99n,Gt=new Map([[`coap`,-1n],[`coaps`,-2n],[`http`,-3n],[`https`,-4n],[`urn`,-5n],[`did`,-6n],[`coap+tcp`,-7n],[`coaps+tcp`,-8n],[`coap+ws`,-25n],[`coaps+ws`,-26n]]),Kt=new Map([...Gt.entries()].map(([e,t])=>[t,e]));function H(e){try{return decodeURIComponent(e)}catch{return e}}function qt(e){return Array.from(new TextEncoder().encode(e),e=>`%${e.toString(16).toUpperCase().padStart(2,`0`)}`).join(``)}function U(e,t){let n=``;for(let r of e)n+=t(r)?r:qt(r);return n}function Jt(e){return/[A-Za-z0-9\-._~]/.test(e)}function Yt(e){return/[!$&'()*+,;=]/.test(e)}function Xt(e){return Jt(e)||Yt(e)||e===`:`||e===`@`}function Zt(e){return(Xt(e)||e===`/`||e===`?`)&&e!==`&`}function Qt(e){return Xt(e)||e===`/`||e===`?`}function $t(e){return Jt(e)||Yt(e)||e===`:`}function en(e){return Jt(e)||Yt(e)}function tn(e){let t=[],n=e,r=n.indexOf(`@`);r>=0&&(t.push(A.FALSE),t.push(new I(H(n.slice(0,r)))),n=n.slice(r+1));let i,a=null;if(n.startsWith(`[`)){let e=n.indexOf(`]`);if(e<0)throw SyntaxError(`cri: unterminated IPv6 bracket in authority`);i=n.slice(1,e);let r=n.slice(e+1);if(r.startsWith(`:`))a=r.slice(1);else if(r.length>0)throw SyntaxError(`cri: unexpected characters after ']' in authority`);t.push(new T(Et(i)))}else{let e=n.lastIndexOf(`:`);if(e>=0?(i=n.slice(0,e),a=n.slice(e+1)):i=n,i!==``)if(/^\d{1,3}(\.\d{1,3}){3}$/.test(i))t.push(new T(Tt(i)));else for(let e of i.toLowerCase().split(`.`))t.push(new I(e))}if(a!==null&&a!==``){if(!/^\d+$/.test(a))throw SyntaxError(`cri: invalid port: ${JSON.stringify(a)}`);let e=parseInt(a,10);if(e>65535)throw SyntaxError(`cri: port ${e} out of range`);t.push(new x(BigInt(e)))}return new O(t)}function nn(e){let t=e.items,n=0,r=``;if(n<t.length&&t[n]instanceof A&&t[n].value===20){n++;let e=t[n++];r+=U(e.value,$t)+`@`}if(n>=t.length)return r;let i=t[n];if(i instanceof T){n++;let{length:e}=i.value;if(e===4)r+=Dt(i.value);else if(e===16)r+=`[`+Ot(i.value)+`]`;else throw Error(`cri: unexpected host-ip byte length: ${e}`);n<t.length&&t[n]instanceof I&&(r+=`%25${U(t[n++].value,en)}`)}else{let e=[];for(;n<t.length&&t[n]instanceof I;)e.push(U(t[n++].value,en));r+=e.join(`.`)}return n<t.length&&t[n]instanceof x&&(r+=`:`+t[n].value.toString()),r}function rn(e){let t=e.slice(2),n=t.indexOf(`/`),r,i;return n>=0?(r=t.slice(0,n),i=t.slice(n+1).split(`/`).map(e=>new I(H(e)))):(r=t,i=[]),{authority:tn(r),pathSegments:i}}function an(e){let t=e,n=null,r=t.indexOf(`#`);r>=0&&(n=H(t.slice(r+1)),t=t.slice(0,r));let i=null,a=t.indexOf(`?`);if(a>=0){let e=t.slice(a+1);t=t.slice(0,a),i=e.split(`&`).map(e=>new I(H(e)))}let o=[],s=/^([a-zA-Z][a-zA-Z0-9+.\-]*):([\s\S]*)$/.exec(t);if(s){let e=s[1].toLowerCase(),t=s[2],n=Gt.get(e);if(o.push(n===void 0?new I(e):new S(n)),t.startsWith(`//`)){let{authority:e,pathSegments:n}=rn(t);o.push(e,new O(n))}else if(t.startsWith(`/`)){let e=t.slice(1).split(`/`).map(e=>new I(H(e)));o.push(A.NULL,new O(e))}else{let e=t.split(`/`).map(e=>new I(H(e)));o.push(A.TRUE,new O(e))}}else if(t.startsWith(`//`)){let{authority:e,pathSegments:n}=rn(t);o.push(A.FALSE,e,new O(n))}else if(t.startsWith(`/`)){let e=t.slice(1).split(`/`).map(e=>new I(H(e)));o.push(A.TRUE,new O(e))}else if(t===``)o.push(new x(0n));else{let n=1n,r=t,i=!1;for(r.startsWith(`./`)&&(i=!0,r=r.slice(2));r.startsWith(`../`);)n++,r=r.slice(3);if(r===`..`?(n++,r=``):r===`.`&&(r=``),n===1n&&!i&&r!==``&&r.split(`/`)[0].includes(`:`))throw SyntaxError(`cri: invalid relative-path reference — first segment must not contain ':' without a './' prefix (RFC 3986 §3.3): ${JSON.stringify(e)}`);let a=r===``?[]:r.split(`/`).map(e=>new I(H(e)));o.push(new x(n),new O(a))}if(i!==null&&o.push(new O(i)),n!==null&&(i===null&&o.push(A.NULL),o.push(new I(n))),n!==null&&i===null&&o.splice(o.length-2,1),i===null&&n===null){let e=o[o.length-1];e instanceof O&&e.items.length===0&&o.pop()}return o.length===1&&o[0]instanceof x&&o[0].value===0n?[]:o}function W(e,t){let n=t,r=``;if(n<e.length){let t=e[n];if(t instanceof O){if(n++,t.items.length>0){let e=t.items.map(e=>{if(!(e instanceof I))throw Error(`cri: query item must be a text string`);return U(e.value,Zt)});r+=`?`+e.join(`&`)}}else t instanceof A&&t.value===22&&n++}return n<e.length&&e[n]instanceof I&&(r+=`#`+U(e[n].value,Qt)),r}function G(e){return e.items.map(e=>{if(!(e instanceof I))throw Error(`cri: path segment must be a text string`);return U(e.value,Xt)})}function on(e){if(e.length===0)return``;let t=0,n=e[t++];if(n instanceof S||n instanceof I){let r;if(n instanceof S){let e=Kt.get(n.value);if(e===void 0)throw Error(`cri: unrecognised scheme-id ${n.value}`);r=e+`:`}else r=n.value+`:`;if(t>=e.length)return r;let i=e[t++],a=``,o=!1;if(i instanceof O)a=`//`+nn(i),o=!0;else if(i instanceof A)if(i.value===22)o=!0;else if(i.value===21)o=!1;else throw Error(`cri: unexpected no-authority value: simple(${i.value})`);else throw Error(`cri: unexpected type for authority element`);let s=``;if(t<e.length&&e[t]instanceof O){let n=e[t++];n.items.length>0&&(s=(o?`/`:``)+G(n).join(`/`))}return r+a+s+W(e,t)}if(n instanceof A&&n.value===20){if(t>=e.length||!(e[t]instanceof O))throw Error(`cri: network-path reference requires an authority array`);let n=nn(e[t++]),r=``;if(t<e.length&&e[t]instanceof O){let n=e[t++];n.items.length>0&&(r=`/`+G(n).join(`/`))}return`//`+n+r+W(e,t)}if(n instanceof A&&n.value===21){let n=`/`;if(t<e.length&&e[t]instanceof O){let r=e[t++];n=`/`+G(r).join(`/`)}return n+W(e,t)}if(n instanceof x){let r=n.value;if(r===0n)return W(e,t);let i=r===1n?``:`../`.repeat(Number(r)-1),a;if(t<e.length&&e[t]instanceof O){let n=e[t++];if(n.items.length>0){let e=G(n);a=(r===1n&&e[0].includes(`:`)?`./`:i)+e.join(`/`)}else a=i===``?`./`:i}else a=i===``?`./`:i;return a+W(e,t)}throw Error(`cri: unrecognised first element type in CRI array`)}var sn=class extends O{_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);try{return`${Ht}'${on(this.items)}'`}catch{return super._toCDN(e,t)}}},cn=class extends w{constructor(e){super(Wt,e)}_toCDN(e,t){if(e?.appStrings===!1)return super._toCDN(e,t);try{return`${Ut}'${on(this.content.items)}'`}catch{return super._toCDN(e,t)}}};function ln(e){if(e.length!==1)throw SyntaxError(`cri<<...>>: expected exactly one item`);let t=e[0];if(t instanceof I)return t.value;if(t instanceof T)return new TextDecoder(`utf-8`,{fatal:!0}).decode(t.value);throw SyntaxError(`cri<<...>>: expected a text string or byte string`)}function un(e,t){let n=new sn(an(t));return e===Ut?new cn(n):n}var dn={appStringPrefixes:[Ht,Ut],tagNumbers:[Wt],parseAppString(e,t){return un(e,t)},parseAppSequence(e,t){return un(e,ln(t))},parseTag(e,t){if(e===99n&&t instanceof O)return new cn(new sn(t.items,{indefiniteLength:t.indefiniteLength,encodingWidth:t.encodingWidth}))}},fn=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0}),pn=new TextDecoder(`utf-8`,{fatal:!1,ignoreBOM:!0});function K(e){throw Error(`CBOR decode error: ${e}`)}function q(e,t,n){let r={message:e,offset:t};if(n?.onWarning?n.onWarning(r):n?.silent||console.warn(`CBOR strict violation at offset ${t}: ${e}`),n?.strict!==!1)throw Error(`CBOR decode error: ${e}`);return r}function mn(e,t){e.warnings??=[],e.warnings.push(t)}function J(e){if(e instanceof x)return[`u`,String(e.value)];if(e instanceof S)return[`n`,String(e.value)];if(e instanceof I)return[`t`,e.value];if(e instanceof D)return[`t`,e.chunks.map(e=>e.value).join(``)];if(e instanceof T){let t=``;for(let n of e.value)t+=n.toString(16).padStart(2,`0`);return[`b`,t]}if(e instanceof E){let t=``;for(let n of e.chunks)for(let e of n.value)t+=e.toString(16).padStart(2,`0`);return[`b`,t]}if(e instanceof C)return isNaN(e.value)?[`f`,`NaN`]:Object.is(e.value,-0)?[`f`,`-0`]:[`f`,String(e.value)];if(e instanceof A)return[`s`,e.value];if(e instanceof O)return[`A`,e.items.map(J)];if(e instanceof k){let t=e.entries.map(([e,t])=>[J(e),J(t)]);return t.sort((e,t)=>{let n=JSON.stringify(e[0]),r=JSON.stringify(t[0]);return n<r?-1:+(n>r)}),[`M`,t]}if(e instanceof w)return[`G`,String(e.tag),J(e.content)];let t=e.toCBOR(),n=``;for(let e of t)n+=e.toString(16).padStart(2,`0`);return[`c`,n]}function hn(e){return JSON.stringify(J(e))}function Y(e,t,n){if(n<=23)return{value:BigInt(n),nextOffset:t};switch(n){case 24:return t+1>e.byteLength&&K(`unexpected end of input`),{value:BigInt(e.getUint8(t)),nextOffset:t+1};case 25:return t+2>e.byteLength&&K(`unexpected end of input`),{value:BigInt(e.getUint16(t,!1)),nextOffset:t+2};case 26:return t+4>e.byteLength&&K(`unexpected end of input`),{value:BigInt(e.getUint32(t,!1)),nextOffset:t+4};case 27:return t+8>e.byteLength&&K(`unexpected end of input`),{value:e.getBigUint64(t,!1),nextOffset:t+8};default:K(`reserved additional info value: ${n}`)}}function X(e,t,n){let r=t,i=gn(e,t,n);return i.value.start=r,i.value.end=i.nextOffset,i}function gn(e,t,n){t>=e.byteLength&&K(`unexpected end of input`);let r=e.getUint8(t++),i=r>>5,a=r&31;switch(i){case 0:{let{value:n,nextOffset:r}=Y(e,t,a);return{value:new x(n),nextOffset:r}}case 1:{let{value:n,nextOffset:r}=Y(e,t,a);return{value:new S(-1n-n),nextOffset:r}}case 2:{if(a===31){let r=[],i=t;for(;;){if(i>=e.byteLength&&K(`unexpected end of indefinite byte string`),e.getUint8(i)===255){i++;break}let t=X(e,i,n);t.value instanceof T||K(`indefinite-length byte string chunk must be a definite byte string`),r.push(t.value),i=t.nextOffset}return{value:new E(r),nextOffset:i}}let{value:r,nextOffset:i}=Y(e,t,a),o=Number(r);return i+o>e.byteLength&&K(`byte string extends beyond input`),{value:new T(new Uint8Array(e.buffer,e.byteOffset+i,o).slice()),nextOffset:i+o}}case 3:{if(a===31){let r=[],i=t;for(;;){if(i>=e.byteLength&&K(`unexpected end of indefinite text string`),e.getUint8(i)===255){i++;break}let t=X(e,i,n);t.value instanceof I||K(`indefinite-length text string chunk must be a definite text string`),r.push(t.value),i=t.nextOffset}return{value:new D(r),nextOffset:i}}let{value:r,nextOffset:i}=Y(e,t,a),o=Number(r);i+o>e.byteLength&&K(`text string extends beyond input`);let s=new Uint8Array(e.buffer,e.byteOffset+i,o),c,l;try{c=fn.decode(s)}catch{l=q(`invalid UTF-8 sequence in text string`,i,n),c=pn.decode(s)}let u=new I(c);return l&&mn(u,l),{value:u,nextOffset:i+o}}case 4:{if(a===31){let r=[],i=t;for(;;){if(i>=e.byteLength&&K(`unexpected end of indefinite array`),e.getUint8(i)===255){i++;break}let t=X(e,i,n);r.push(t.value),i=t.nextOffset}return{value:new O(r,{indefiniteLength:!0}),nextOffset:i}}let{value:r,nextOffset:i}=Y(e,t,a),o=Number(r),s=[],c=i;for(let t=0;t<o;t++){let t=X(e,c,n);s.push(t.value),c=t.nextOffset}return{value:new O(s),nextOffset:c}}case 5:{if(a===31){let r=[],i=new Set,a=[],o=t;for(;;){if(o>=e.byteLength&&K(`unexpected end of indefinite map`),e.getUint8(o)===255){o++;break}let t=X(e,o,n),s=hn(t.value);i.has(s)&&a.push(q(`duplicate map key at offset ${t.value.start}`,t.value.start,n)),i.add(s),o=t.nextOffset;let c=X(e,o,n);o=c.nextOffset,r.push([t.value,c.value])}let s=new k(r,{indefiniteLength:!0});for(let e of a)mn(s,e);return{value:s,nextOffset:o}}let{value:r,nextOffset:i}=Y(e,t,a),o=Number(r),s=[],c=new Set,l=[],u=i;for(let t=0;t<o;t++){let t=X(e,u,n),r=hn(t.value);c.has(r)&&l.push(q(`duplicate map key at offset ${t.value.start}`,t.value.start,n)),c.add(r),u=t.nextOffset;let i=X(e,u,n);u=i.nextOffset,s.push([t.value,i.value])}let d=new k(s);for(let e of l)mn(d,e);return{value:d,nextOffset:u}}case 6:{a===31&&K(`tags cannot use indefinite-length encoding`);let{value:r,nextOffset:i}=Y(e,t,a),o=X(e,i,n);for(let e of[...n?.extensions??[],...Z])if(e.parseTag){let t=e.parseTag(r,o.value,n);if(t!==void 0)return{value:t,nextOffset:o.nextOffset}}return{value:new w(r,o.value),nextOffset:o.nextOffset}}case 7:if(a<=19)return{value:new A(a),nextOffset:t};if(a===20)return{value:A.FALSE,nextOffset:t};if(a===21)return{value:A.TRUE,nextOffset:t};if(a===22)return{value:A.NULL,nextOffset:t};if(a===23)return{value:A.UNDEFINED,nextOffset:t};if(a===24){t+1>e.byteLength&&K(`unexpected end of input`);let r=e.getUint8(t);if(r<32){let e=q(`simple value ${r} must be encoded in initial byte (0–31 reserved for extended encoding)`,t-1,n),i=new A(r);return mn(i,e),{value:i,nextOffset:t+1}}return{value:new A(r),nextOffset:t+1}}return a===25?(t+2>e.byteLength&&K(`unexpected end of input`),{value:new C(v(e.getUint16(t,!1)),{precision:`half`}),nextOffset:t+2}):a===26?(t+4>e.byteLength&&K(`unexpected end of input`),{value:new C(e.getFloat32(t,!1),{precision:`single`}),nextOffset:t+4}):a===27?(t+8>e.byteLength&&K(`unexpected end of input`),{value:new C(e.getFloat64(t,!1),{precision:`double`}),nextOffset:t+8}):(a<31&&K(`reserved additional info value in major type 7: ${a}`),K(`unexpected break code outside indefinite-length item`))}return K(`unknown major type: ${i}`)}function _n(e){if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw TypeError(`expected ArrayBufferView or ArrayBufferLike`)}function vn(e,t){let n=_n(e),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=t?.offset??0;if(!Number.isInteger(i)||i<0||i>r.byteLength)throw RangeError(`CBOR decode offset must be an integer between 0 and ${r.byteLength}`);let{value:a,nextOffset:o}=X(r,i,t);return!t?.allowTrailing&&o!==r.byteLength&&K(`${r.byteLength-o} trailing byte(s) after end of CBOR item`),a}var yn=24n,Z=[Ct,Rt,Vt,dn,{tagNumbers:[yn],parseTag(e,t,n){if(e!==24n||!(t instanceof T))return;let r=n?{extensions:n.extensions,strict:n.strict,onWarning:n.onWarning,silent:n.silent}:void 0;try{return new w(yn,new j([vn(t.value,r)]))}catch(e){if(r?.strict!==!1)throw e;return}}}];function Q(e,t){if(t?.replacer){let{replacer:n,...r}=t,i=Sn(e,n,r.extensions,r.undefinedOmits);return i===l?A.UNDEFINED:Q(i,Object.keys(r).length>0?r:void 0)}return bn(e,t,!0)}function bn(e,t,n){for(let n of[...t?.extensions??[],...Z])if(n.fromJS){let r=n.fromJS(e,t??{});if(r!==void 0)return r}if(n&&typeof e==`object`&&e&&c.symbol in e){let n=e[c.symbol],r=bn(e,t,!1);for(let e of[...t?.extensions??[],...Z])if(e.parseTag){let t=e.parseTag(n,r);if(t!==void 0)return t}return new w(n,r)}if(e instanceof c.Null)return A.NULL;if(e instanceof c.Undefined)return A.UNDEFINED;if(e instanceof u)return new A(e.value);if(e===null)return A.NULL;if(e===void 0)return A.UNDEFINED;if(e===!0)return A.TRUE;if(e===!1)return A.FALSE;if(typeof e==`bigint`)return e>18446744073709551615n?new P(e):e<-18446744073709551616n?new F(e):e>=0n?new x(e):new S(e);if(typeof e==`number`)return(t?.encodeIntegerAs??`int`)===`int`&&Number.isInteger(e)&&!Object.is(e,-0)?e>=0?new x(BigInt(e)):new S(BigInt(e)):new C(e);if(typeof e==`string`)return new I(e);if(e instanceof Number||e instanceof Boolean||e instanceof String||Object.prototype.toString.call(e)===`[object BigInt]`)return bn(e.valueOf(),t,!1);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return new T(new Uint8Array(e));if(ArrayBuffer.isView(e))return e instanceof Uint8Array&&t?.uint8ArrayAs===`array`?new O(Array.from(e,e=>new x(BigInt(e)))):new T(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));if(e instanceof $)return new k([...e].map(([e,n])=>[Q(e,t),Q(n,t)]));if(Array.isArray(e))return new O(e.map(e=>Q(e,t)));if(typeof e==`object`){let n=[];for(let[r,i]of Object.entries(e))n.push([new I(r),Q(i,t)]);return new k(n)}throw TypeError(`fromJS: unsupported value type: ${typeof e}`)}function xn(e){return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||e instanceof Number||e instanceof Boolean||e instanceof String||Object.prototype.toString.call(e)===`[object BigInt]`||e instanceof c.Null||e instanceof c.Undefined||e instanceof u}function Sn(e,t,n,r){let i=[...n??[],...Z];function a(e){return e===l||r===!0&&e===void 0}if(Array.isArray(t)){let n=t.map(String);function o(e){if(typeof e!=`object`||!e)return e;if(e instanceof $)return $.from(e,([e,t])=>[e,o(t)]);if(Array.isArray(e))return e.map(o);if(c.symbol in e||xn(e)||i.some(t=>t.isJSType?.(e)))return e;let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null){let t=e.toJSON;if(typeof t==`function`)return o(t.call(e))}let r={};for(let t of n)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=o(e[t]));return r}return o(e)}let s=t;function u(e,t,n){if(typeof e==`object`&&e&&!(e instanceof $)){let n=Object.getPrototypeOf(e);if(n===Object.prototype||n===null){let n=e.toJSON;typeof n==`function`&&(e=n.call(e,t))}}if(e=s.call(n,t,e),typeof e==`object`&&e){if(c.symbol in e)return e;if(e instanceof $){let t=new $;for(let[n,r]of e){let i=u(r,n,e);a(i)||t.push([n,i])}return t}if(Array.isArray(e))return e.map((t,n)=>{let r=u(t,String(n),e);return a(r)?null:r});if(xn(e)||i.some(t=>t.isJSType?.(e)))return e;let t={};for(let n of Object.keys(e)){let r=u(e[n],n,e);a(r)||(t[n]=r)}return t}return e}return u(e,``,{"":e})}var $=class extends Array{toJSON(){let e={};for(let[t,n]of this){let r=typeof t==`string`?t:Q(t).toCDN();r===`__proto__`?Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[r]=n}return e}};Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return vn}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Sn}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return S}});
|
|
36
|
+
//# sourceMappingURL=mapEntries-BccT62HT.cjs.map
|