import{b as P}from"./vendor-bail-FqpXQuLt.js";import{e as y}from"./vendor-extend-fsBZP_1K.js";import{i as z}from"./vendor-is-plain-obj-C1gvLhAf.js";import{t as C}from"./vendor-trough-B_b8ryxu.js";import{V as A}from"./vendor-vfile-BCWrK60u.js";const S=(function(s){const t=this.constructor.prototype,i=t[s],f=function(){return i.apply(f,arguments)};return Object.setPrototypeOf(f,t),f}),F={}.hasOwnProperty;class x extends S{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=C()}copy(){const e=new x;let n=-1;for(;++n0){let[u,...d]=o;const E=t[a][1];z(E)&&z(u)&&(u=y(!0,E,u)),t[a]=[r,u,...d]}}}}const k=new x().freeze();function w(s,e){if(typeof e!="function")throw new TypeError("Cannot `"+s+"` without `parser`")}function g(s,e){if(typeof e!="function")throw new TypeError("Cannot `"+s+"` without `compiler`")}function b(s,e){if(e)throw new Error("Cannot call `"+s+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function I(s){if(!z(s)||typeof s.type!="string")throw new TypeError("Expected node, got `"+s+"`")}function T(s,e,n){if(!n)throw new Error("`"+s+"` finished async. Use `"+e+"` instead")}function m(s){return j(s)?s:new A(s)}function j(s){return!!(s&&typeof s=="object"&&"message"in s&&"messages"in s)}function O(s){return typeof s=="string"||D(s)}function D(s){return!!(s&&typeof s=="object"&&"byteLength"in s&&"byteOffset"in s)}export{k as u};