mq-web 0.4.2 → 0.5.0

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/dist/core.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var M=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var H=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)M(t,n,{get:e[n],enumerable:!0})},J=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!Y.call(t,i)&&i!==n&&M(t,i,{get:()=>e[i],enumerable:!(r=N(e,i))||r.enumerable});return t};var G=t=>J(M({},"__esModule",{value:!0}),t);var B={};T(B,{RunOptions:()=>j,default:()=>v,definedValues:()=>ot,diagnostics:()=>it,format:()=>rt,initSync:()=>_t,run:()=>et,toAst:()=>nt});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Q(t,e){return D+=e,D>=K&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),D=e),F.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Q(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function Z(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function tt(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return tt(t),e}function E(t){return t==null}function R(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=R(t[0]));for(let s=1;s<i;s++)_+=", "+R(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function et(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),z=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),L=g,q=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),C=g;o.run(l,z,L,q,C,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function nt(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function rt(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function it(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function ot(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function at(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&ct.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(Z(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return E(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=R(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,E(i)?0:i,!0),a().setInt32(e+4*0,!E(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=E(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function _t(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",ft.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await at(await t,e);return P(n,r)}var ft,o,A,F,K,D,p,S,g,O,h,st,j,ct,v,V=H(()=>{"use strict";ft={},A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();K=2146435072,D=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;st=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,st.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);ct=new Set(["basic","cors","default"]);v=$});var lt={};T(lt,{definedValues:()=>wt,diagnostics:()=>gt,format:()=>bt,run:()=>ut,toAst:()=>dt});module.exports=G(lt);V();var k=null;async function W(){return k||(await(async()=>{try{await v();let t=await Promise.resolve().then(()=>(V(),B));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ut(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function dt(t){return await(await W()).toAst(t)}async function bt(t){return await(await W()).format(t)}async function gt(t){return await(await W()).diagnostics(t)}async function wt(t){return await(await W()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
1
+ "use strict";var v=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var H=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)v(t,n,{get:e[n],enumerable:!0})},J=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of X(e))!Y.call(t,i)&&i!==n&&v(t,i,{get:()=>e[i],enumerable:!(r=N(e,i))||r.enumerable});return t};var G=t=>J(v({},"__esModule",{value:!0}),t);var B={};T(B,{RunOptions:()=>W,default:()=>R,definedValues:()=>ot,diagnostics:()=>it,format:()=>rt,initSync:()=>at,run:()=>et,toAst:()=>nt});function S(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Q(t,e){return M+=e,M>=K&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),M=e),F.decode(S().subarray(t,t+e))}function x(t,e){return t=t>>>0,Q(t,e)}function d(t){O===y.length&&y.push(y.length+1);let e=O;return O=y[e],y[e]=t,e}function _(t){return y[t]}function l(t,e,n){if(n===void 0){let c=j.encode(t),u=e(c.length,1)>>>0;return S().subarray(u,u+c.length).set(c),g=c.length,u}let r=t.length,i=e(r,1)>>>0,f=S(),s=0;for(;s<r;s++){let c=t.charCodeAt(s);if(c>127)break;f[i+s]=c}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let c=S().subarray(i+s,i+r),u=j.encodeInto(t,c);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function I(t){return t==null}function D(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,f="[";i>0&&(f+=D(t[0]));for(let s=1;s<i;s++)f+=", "+D(t[s]);return f+="]",f}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function Z(t,e){return t=t>>>0,S().subarray(t/1,t/1+e)}function tt(t){t<132||(y[t]=O,O=t)}function w(t){let e=_(t);return tt(t),e}function et(t,e,n){let r,i;try{let p=o.__wbindgen_add_to_stack_pointer(-16),z=l(t,o.__wbindgen_export,o.__wbindgen_export2),L=g,q=l(e,o.__wbindgen_export,o.__wbindgen_export2),C=g;o.run(p,z,L,q,C,d(n));var f=a().getInt32(p+4*0,!0),s=a().getInt32(p+4*1,!0),c=a().getInt32(p+4*2,!0),u=a().getInt32(p+4*3,!0),b=f,m=s;if(u)throw b=0,m=0,w(c);return r=b,i=m,x(b,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(r,i,1)}}function nt(t){let e,n;try{let b=o.__wbindgen_add_to_stack_pointer(-16),m=l(t,o.__wbindgen_export,o.__wbindgen_export2),p=g;o.toAst(b,m,p);var r=a().getInt32(b+4*0,!0),i=a().getInt32(b+4*1,!0),f=a().getInt32(b+4*2,!0),s=a().getInt32(b+4*3,!0),c=r,u=i;if(s)throw c=0,u=0,w(f);return e=c,n=u,x(c,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(e,n,1)}}function rt(t){let e,n;try{let b=o.__wbindgen_add_to_stack_pointer(-16),m=l(t,o.__wbindgen_export,o.__wbindgen_export2),p=g;o.format(b,m,p);var r=a().getInt32(b+4*0,!0),i=a().getInt32(b+4*1,!0),f=a().getInt32(b+4*2,!0),s=a().getInt32(b+4*3,!0),c=r,u=i;if(s)throw c=0,u=0,w(f);return e=c,n=u,x(c,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(e,n,1)}}function it(t){let e=l(t,o.__wbindgen_export,o.__wbindgen_export2),n=g,r=o.diagnostics(e,n);return w(r)}function ot(t,e){try{let c=o.__wbindgen_add_to_stack_pointer(-16),u=l(t,o.__wbindgen_export,o.__wbindgen_export2),b=g;var n=I(e)?0:l(e,o.__wbindgen_export,o.__wbindgen_export2),r=g;o.definedValues(c,u,b,n,r);var i=a().getInt32(c+4*0,!0),f=a().getInt32(c+4*1,!0),s=a().getInt32(c+4*2,!0);if(s)throw w(f);return w(i)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function ct(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&_t.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e83987f665cf5504=function(e,n){let r=Error(x(e,n));return d(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(_(n)),i=l(r,o.__wbindgen_export,o.__wbindgen_export2),f=g;a().setInt32(e+4*1,f,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let n=_(e),r=typeof n=="boolean"?n:void 0;return I(r)?16777215:r?1:0},t.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,n){let r=D(_(n)),i=l(r,o.__wbindgen_export,o.__wbindgen_export2),f=g;a().setInt32(e+4*1,f,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,n){return _(e)in _(n)},t.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let n=_(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof _(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return _(e)===void 0},t.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,n){return _(e)==_(n)},t.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,n){let r=_(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,I(i)?0:i,!0),a().setInt32(e+4*0,!I(i),!0)},t.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,n){let r=_(n),i=typeof r=="string"?r:void 0;var f=I(i)?0:l(i,o.__wbindgen_export,o.__wbindgen_export2),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,f,!0)},t.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,n){throw new Error(x(e,n))},t.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let n=Object.entries(_(e));return d(n)},t.wbg.__wbg_get_7bed016f185add81=function(e,n){let r=_(e)[n>>>0];return d(r)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){let r=_(e)[_(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let n;try{n=_(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let n;try{n=_(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_69bca3cb64fc8748=function(e){return _(e).length},t.wbg.__wbg_length_cdd215e10d9dd507=function(e){return _(e).length},t.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let n=new Uint8Array(_(e));return d(n)},t.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return d(e)},t.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,n,r){Uint8Array.prototype.set.call(Z(e,n),_(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){_(e)[w(n)]=w(r)},t.wbg.__wbg_set_c213c871859d6500=function(e,n,r){_(e)[n>>>0]=w(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=_(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function at(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",ft.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await ct(await t,e);return P(n,r)}var ft,o,A,F,K,M,y,O,g,j,h,st,W,_t,R,V=H(()=>{"use strict";ft={},A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();K=2146435072,M=0;y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);O=y.length;g=0,j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(t,e){let n=j.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;st=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,st.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);_t=new Set(["basic","cors","default"]);R=$});var lt={};T(lt,{definedValues:()=>wt,diagnostics:()=>dt,format:()=>gt,run:()=>ut,toAst:()=>bt});module.exports=G(lt);V();var k=null;async function E(){return k||(await(async()=>{try{await R();let t=await Promise.resolve().then(()=>(V(),B));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ut(t,e,n={}){return await(await E()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function bt(t){return await(await E()).toAst(t)}async function gt(t){return await(await E()).format(t)}async function dt(t){return await(await E()).diagnostics(t)}async function wt(t,e){return await(await E()).definedValues(t,e)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
package/dist/core.d.cts CHANGED
@@ -42,6 +42,6 @@ declare function diagnostics(code: string): Promise<ReadonlyArray<Diagnostic>>;
42
42
  /**
43
43
  * Get defined values from mq code
44
44
  */
45
- declare function definedValues(code: string): Promise<ReadonlyArray<DefinedValue>>;
45
+ declare function definedValues(code: string, module?: string): Promise<ReadonlyArray<DefinedValue>>;
46
46
 
47
47
  export { definedValues, diagnostics, format, run, toAst };
package/dist/core.d.ts CHANGED
@@ -42,6 +42,6 @@ declare function diagnostics(code: string): Promise<ReadonlyArray<Diagnostic>>;
42
42
  /**
43
43
  * Get defined values from mq code
44
44
  */
45
- declare function definedValues(code: string): Promise<ReadonlyArray<DefinedValue>>;
45
+ declare function definedValues(code: string, module?: string): Promise<ReadonlyArray<DefinedValue>>;
46
46
 
47
47
  export { definedValues, diagnostics, format, run, toAst };
package/dist/core.js CHANGED
@@ -1,2 +1,2 @@
1
- var q=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)q(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>j,default:()=>R,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Y(t,e){return M+=e,M>=X&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),M=e),F.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function H(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function J(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return J(t),e}function E(t){return t==null}function D(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=D(t[0]));for(let s=1;s<i;s++)_+=", "+D(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function G(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),$=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),B=g,z=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),L=g;o.run(l,$,B,z,L,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function K(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Q(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Z(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function tt(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function V(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return E(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=D(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,E(i)?0:i,!0),a().setInt32(e+4*0,!E(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=E(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return o=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,o}function it(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=V();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=V();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var o,A,F,X,M,p,S,g,O,h,et,j,nt,R,v=C(()=>{"use strict";A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();X=2146435072,M=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);nt=new Set(["basic","cors","default"]);R=U});v();var k=null;async function W(){return k||(await(async()=>{try{await R();let t=await Promise.resolve().then(()=>(v(),P));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ft(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function ut(t){return await(await W()).toAst(t)}async function dt(t){return await(await W()).format(t)}async function bt(t){return await(await W()).diagnostics(t)}async function gt(t){return await(await W()).definedValues(t)}export{gt as definedValues,bt as diagnostics,dt as format,ft as run,ut as toAst};
1
+ var q=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)q(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>W,default:()=>D,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function S(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(i.memory.buffer)),A}function Y(t,e){return v+=e,v>=X&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),v=e),F.decode(S().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function d(t){O===y.length&&y.push(y.length+1);let e=O;return O=y[e],y[e]=t,e}function _(t){return y[t]}function l(t,e,n){if(n===void 0){let c=j.encode(t),u=e(c.length,1)>>>0;return S().subarray(u,u+c.length).set(c),g=c.length,u}let r=t.length,o=e(r,1)>>>0,f=S(),s=0;for(;s<r;s++){let c=t.charCodeAt(s);if(c>127)break;f[o+s]=c}if(s!==r){s!==0&&(t=t.slice(s)),o=n(o,r,r=s+t.length*3,1)>>>0;let c=S().subarray(o+s,o+r),u=j.encodeInto(t,c);s+=u.written,o=n(o,r,s,1)>>>0}return g=s,o}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==i.memory.buffer)&&(h=new DataView(i.memory.buffer)),h}function I(t){return t==null}function M(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){let o=t.length,f="[";o>0&&(f+=M(t[0]));for(let s=1;s<o;s++)f+=", "+M(t[s]);return f+="]",f}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function H(t,e){return t=t>>>0,S().subarray(t/1,t/1+e)}function J(t){t<132||(y[t]=O,O=t)}function w(t){let e=_(t);return J(t),e}function G(t,e,n){let r,o;try{let p=i.__wbindgen_add_to_stack_pointer(-16),$=l(t,i.__wbindgen_export,i.__wbindgen_export2),B=g,z=l(e,i.__wbindgen_export,i.__wbindgen_export2),L=g;i.run(p,$,B,z,L,d(n));var f=a().getInt32(p+4*0,!0),s=a().getInt32(p+4*1,!0),c=a().getInt32(p+4*2,!0),u=a().getInt32(p+4*3,!0),b=f,m=s;if(u)throw b=0,m=0,w(c);return r=b,o=m,x(b,m)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(r,o,1)}}function K(t){let e,n;try{let b=i.__wbindgen_add_to_stack_pointer(-16),m=l(t,i.__wbindgen_export,i.__wbindgen_export2),p=g;i.toAst(b,m,p);var r=a().getInt32(b+4*0,!0),o=a().getInt32(b+4*1,!0),f=a().getInt32(b+4*2,!0),s=a().getInt32(b+4*3,!0),c=r,u=o;if(s)throw c=0,u=0,w(f);return e=c,n=u,x(c,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(e,n,1)}}function Q(t){let e,n;try{let b=i.__wbindgen_add_to_stack_pointer(-16),m=l(t,i.__wbindgen_export,i.__wbindgen_export2),p=g;i.format(b,m,p);var r=a().getInt32(b+4*0,!0),o=a().getInt32(b+4*1,!0),f=a().getInt32(b+4*2,!0),s=a().getInt32(b+4*3,!0),c=r,u=o;if(s)throw c=0,u=0,w(f);return e=c,n=u,x(c,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(e,n,1)}}function Z(t){let e=l(t,i.__wbindgen_export,i.__wbindgen_export2),n=g,r=i.diagnostics(e,n);return w(r)}function tt(t,e){try{let c=i.__wbindgen_add_to_stack_pointer(-16),u=l(t,i.__wbindgen_export,i.__wbindgen_export2),b=g;var n=I(e)?0:l(e,i.__wbindgen_export,i.__wbindgen_export2),r=g;i.definedValues(c,u,b,n,r);var o=a().getInt32(c+4*0,!0),f=a().getInt32(c+4*1,!0),s=a().getInt32(c+4*2,!0);if(s)throw w(f);return w(o)}finally{i.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function V(){let t={};return t.wbg={},t.wbg.__wbg_Error_e83987f665cf5504=function(e,n){let r=Error(x(e,n));return d(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(_(n)),o=l(r,i.__wbindgen_export,i.__wbindgen_export2),f=g;a().setInt32(e+4*1,f,!0),a().setInt32(e+4*0,o,!0)},t.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let n=_(e),r=typeof n=="boolean"?n:void 0;return I(r)?16777215:r?1:0},t.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,n){let r=M(_(n)),o=l(r,i.__wbindgen_export,i.__wbindgen_export2),f=g;a().setInt32(e+4*1,f,!0),a().setInt32(e+4*0,o,!0)},t.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,n){return _(e)in _(n)},t.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let n=_(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof _(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return _(e)===void 0},t.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,n){return _(e)==_(n)},t.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,n){let r=_(n),o=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,I(o)?0:o,!0),a().setInt32(e+4*0,!I(o),!0)},t.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,n){let r=_(n),o=typeof r=="string"?r:void 0;var f=I(o)?0:l(o,i.__wbindgen_export,i.__wbindgen_export2),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,f,!0)},t.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,n){throw new Error(x(e,n))},t.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let n=Object.entries(_(e));return d(n)},t.wbg.__wbg_get_7bed016f185add81=function(e,n){let r=_(e)[n>>>0];return d(r)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){let r=_(e)[_(n)];return d(r)},t.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let n;try{n=_(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let n;try{n=_(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_69bca3cb64fc8748=function(e){return _(e).length},t.wbg.__wbg_length_cdd215e10d9dd507=function(e){return _(e).length},t.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return d(e)},t.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let n=new Uint8Array(_(e));return d(n)},t.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return d(e)},t.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),_(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){_(e)[w(n)]=w(r)},t.wbg.__wbg_set_c213c871859d6500=function(e,n,r){_(e)[n>>>0]=w(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return d(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return d(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=_(e);return d(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return i=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,i}function it(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=V();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=V();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var i,A,F,X,v,y,O,g,j,h,et,W,nt,D,R=C(()=>{"use strict";A=null;F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();X=2146435072,v=0;y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);O=y.length;g=0,j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(t,e){let n=j.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>i.__wbg_runoptions_free(t>>>0,1)),W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();i.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);nt=new Set(["basic","cors","default"]);D=U});R();var k=null;async function E(){return k||(await(async()=>{try{await D();let t=await Promise.resolve().then(()=>(R(),P));k={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),k)}async function ft(t,e,n={}){return await(await E()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function ut(t){return await(await E()).toAst(t)}async function bt(t){return await(await E()).format(t)}async function gt(t){return await(await E()).diagnostics(t)}async function dt(t,e){return await(await E()).definedValues(t,e)}export{dt as definedValues,gt as diagnostics,bt as format,ft as run,ut as toAst};
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var k=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var Z=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},tt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K(e))!Q.call(t,i)&&i!==n&&k(t,i,{get:()=>e[i],enumerable:!(r=G(e,i))||r.enumerable});return t};var et=t=>tt(k({},"__esModule",{value:!0}),t);var q={};T(q,{RunOptions:()=>j,default:()=>R,definedValues:()=>ft,diagnostics:()=>_t,format:()=>at,initSync:()=>gt,run:()=>st,toAst:()=>ct});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function rt(t,e){return M+=e,M>=nt&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),M=e),E.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,rt(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function it(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function ot(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return ot(t),e}function D(t){return t==null}function V(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=V(t[0]));for(let s=1;s<i;s++)_+=", "+V(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function st(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),X=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),Y=g,H=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),J=g;o.run(l,X,Y,H,J,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function ct(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function at(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function _t(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function ft(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function bt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&dt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(it(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return D(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=V(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,D(i)?0:i,!0),a().setInt32(e+4*0,!D(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=D(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function gt(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",wt.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await bt(await t,e);return P(n,r)}var wt,o,A,E,nt,M,p,S,g,O,h,ut,j,dt,R,v=Z(()=>{"use strict";wt={},A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();nt=2146435072,M=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);dt=new Set(["basic","cors","default"]);R=$});var lt={};T(lt,{definedValues:()=>N,diagnostics:()=>C,format:()=>L,run:()=>B,toAst:()=>z});module.exports=et(lt);v();var F=null;async function W(){return F||(await(async()=>{try{await R();let t=await Promise.resolve().then(()=>(v(),q));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function B(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function z(t){return await(await W()).toAst(t)}async function L(t){return await(await W()).format(t)}async function C(t){return await(await W()).diagnostics(t)}async function N(t){return await(await W()).definedValues(t)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
1
+ "use strict";var k=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var Z=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>{for(var n in e)k(t,n,{get:e[n],enumerable:!0})},tt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K(e))!Q.call(t,i)&&i!==n&&k(t,i,{get:()=>e[i],enumerable:!(r=G(e,i))||r.enumerable});return t};var et=t=>tt(k({},"__esModule",{value:!0}),t);var q={};T(q,{RunOptions:()=>W,default:()=>V,definedValues:()=>ft,diagnostics:()=>ct,format:()=>at,initSync:()=>gt,run:()=>st,toAst:()=>_t});function S(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function rt(t,e){return v+=e,v>=nt&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),v=e),E.decode(S().subarray(t,t+e))}function x(t,e){return t=t>>>0,rt(t,e)}function g(t){O===y.length&&y.push(y.length+1);let e=O;return O=y[e],y[e]=t,e}function _(t){return y[t]}function l(t,e,n){if(n===void 0){let a=j.encode(t),u=e(a.length,1)>>>0;return S().subarray(u,u+a.length).set(a),d=a.length,u}let r=t.length,i=e(r,1)>>>0,f=S(),s=0;for(;s<r;s++){let a=t.charCodeAt(s);if(a>127)break;f[i+s]=a}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let a=S().subarray(i+s,i+r),u=j.encodeInto(t,a);s+=u.written,i=n(i,r,s,1)>>>0}return d=s,i}function c(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function I(t){return t==null}function M(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,f="[";i>0&&(f+=M(t[0]));for(let s=1;s<i;s++)f+=", "+M(t[s]);return f+="]",f}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function it(t,e){return t=t>>>0,S().subarray(t/1,t/1+e)}function ot(t){t<132||(y[t]=O,O=t)}function w(t){let e=_(t);return ot(t),e}function st(t,e,n){let r,i;try{let p=o.__wbindgen_add_to_stack_pointer(-16),X=l(t,o.__wbindgen_export,o.__wbindgen_export2),Y=d,H=l(e,o.__wbindgen_export,o.__wbindgen_export2),J=d;o.run(p,X,Y,H,J,g(n));var f=c().getInt32(p+4*0,!0),s=c().getInt32(p+4*1,!0),a=c().getInt32(p+4*2,!0),u=c().getInt32(p+4*3,!0),b=f,m=s;if(u)throw b=0,m=0,w(a);return r=b,i=m,x(b,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(r,i,1)}}function _t(t){let e,n;try{let b=o.__wbindgen_add_to_stack_pointer(-16),m=l(t,o.__wbindgen_export,o.__wbindgen_export2),p=d;o.toAst(b,m,p);var r=c().getInt32(b+4*0,!0),i=c().getInt32(b+4*1,!0),f=c().getInt32(b+4*2,!0),s=c().getInt32(b+4*3,!0),a=r,u=i;if(s)throw a=0,u=0,w(f);return e=a,n=u,x(a,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(e,n,1)}}function at(t){let e,n;try{let b=o.__wbindgen_add_to_stack_pointer(-16),m=l(t,o.__wbindgen_export,o.__wbindgen_export2),p=d;o.format(b,m,p);var r=c().getInt32(b+4*0,!0),i=c().getInt32(b+4*1,!0),f=c().getInt32(b+4*2,!0),s=c().getInt32(b+4*3,!0),a=r,u=i;if(s)throw a=0,u=0,w(f);return e=a,n=u,x(a,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export3(e,n,1)}}function ct(t){let e=l(t,o.__wbindgen_export,o.__wbindgen_export2),n=d,r=o.diagnostics(e,n);return w(r)}function ft(t,e){try{let a=o.__wbindgen_add_to_stack_pointer(-16),u=l(t,o.__wbindgen_export,o.__wbindgen_export2),b=d;var n=I(e)?0:l(e,o.__wbindgen_export,o.__wbindgen_export2),r=d;o.definedValues(a,u,b,n,r);var i=c().getInt32(a+4*0,!0),f=c().getInt32(a+4*1,!0),s=c().getInt32(a+4*2,!0);if(s)throw w(f);return w(i)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function dt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&bt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function U(){let t={};return t.wbg={},t.wbg.__wbg_Error_e83987f665cf5504=function(e,n){let r=Error(x(e,n));return g(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(_(n)),i=l(r,o.__wbindgen_export,o.__wbindgen_export2),f=d;c().setInt32(e+4*1,f,!0),c().setInt32(e+4*0,i,!0)},t.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let n=_(e),r=typeof n=="boolean"?n:void 0;return I(r)?16777215:r?1:0},t.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,n){let r=M(_(n)),i=l(r,o.__wbindgen_export,o.__wbindgen_export2),f=d;c().setInt32(e+4*1,f,!0),c().setInt32(e+4*0,i,!0)},t.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,n){return _(e)in _(n)},t.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let n=_(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof _(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return _(e)===void 0},t.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,n){return _(e)==_(n)},t.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,n){let r=_(n),i=typeof r=="number"?r:void 0;c().setFloat64(e+8*1,I(i)?0:i,!0),c().setInt32(e+4*0,!I(i),!0)},t.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,n){let r=_(n),i=typeof r=="string"?r:void 0;var f=I(i)?0:l(i,o.__wbindgen_export,o.__wbindgen_export2),s=d;c().setInt32(e+4*1,s,!0),c().setInt32(e+4*0,f,!0)},t.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,n){throw new Error(x(e,n))},t.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let n=Object.entries(_(e));return g(n)},t.wbg.__wbg_get_7bed016f185add81=function(e,n){let r=_(e)[n>>>0];return g(r)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){let r=_(e)[_(n)];return g(r)},t.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let n;try{n=_(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let n;try{n=_(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_69bca3cb64fc8748=function(e){return _(e).length},t.wbg.__wbg_length_cdd215e10d9dd507=function(e){return _(e).length},t.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return g(e)},t.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let n=new Uint8Array(_(e));return g(n)},t.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return g(e)},t.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,n,r){Uint8Array.prototype.set.call(it(e,n),_(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){_(e)[w(n)]=w(r)},t.wbg.__wbg_set_c213c871859d6500=function(e,n,r){_(e)[n>>>0]=w(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return g(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return g(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=_(e);return g(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function P(t,e){return o=t.exports,$.__wbindgen_wasm_module=e,h=null,A=null,o}function gt(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=U();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return P(n,t)}async function $(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",wt.url));let e=U();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await dt(await t,e);return P(n,r)}var wt,o,A,E,nt,v,y,O,d,j,h,ut,W,bt,V,R=Z(()=>{"use strict";wt={},A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();nt=2146435072,v=0;y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);O=y.length;d=0,j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(t,e){let n=j.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;ut=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ut.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);bt=new Set(["basic","cors","default"]);V=$});var lt={};T(lt,{definedValues:()=>N,diagnostics:()=>C,format:()=>L,run:()=>B,toAst:()=>z});module.exports=et(lt);R();var F=null;async function D(){return F||(await(async()=>{try{await V();let t=await Promise.resolve().then(()=>(R(),q));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function B(t,e,n={}){return await(await D()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function z(t){return await(await D()).toAst(t)}async function L(t){return await(await D()).format(t)}async function C(t){return await(await D()).diagnostics(t)}async function N(t,e){return await(await D()).definedValues(t,e)}0&&(module.exports={definedValues,diagnostics,format,run,toAst});
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var L=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)L(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>j,default:()=>V,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function I(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(o.memory.buffer)),A}function Y(t,e){return k+=e,k>=X&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),k=e),E.decode(I().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function b(t){S===p.length&&p.push(p.length+1);let e=S;return S=p[e],p[e]=t,e}function c(t){return p[t]}function y(t,e,n){if(n===void 0){let f=O.encode(t),u=e(f.length,1)>>>0;return I().subarray(u,u+f.length).set(f),g=f.length,u}let r=t.length,i=e(r,1)>>>0,_=I(),s=0;for(;s<r;s++){let f=t.charCodeAt(s);if(f>127)break;_[i+s]=f}if(s!==r){s!==0&&(t=t.slice(s)),i=n(i,r,r=s+t.length*3,1)>>>0;let f=I().subarray(i+s,i+r),u=O.encodeInto(t,f);s+=u.written,i=n(i,r,s,1)>>>0}return g=s,i}function a(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==o.memory.buffer)&&(h=new DataView(o.memory.buffer)),h}function H(t,e){return t=t>>>0,I().subarray(t/1,t/1+e)}function J(t){t<132||(p[t]=S,S=t)}function w(t){let e=c(t);return J(t),e}function D(t){return t==null}function M(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){let i=t.length,_="[";i>0&&(_+=M(t[0]));for(let s=1;s<i;s++)_+=", "+M(t[s]);return _+="]",_}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
- ${t.stack}`:r}function G(t,e,n){let r,i;try{let l=o.__wbindgen_add_to_stack_pointer(-16),$=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),q=g,B=y(e,o.__wbindgen_export_0,o.__wbindgen_export_1),z=g;o.run(l,$,q,B,z,b(n));var _=a().getInt32(l+4*0,!0),s=a().getInt32(l+4*1,!0),f=a().getInt32(l+4*2,!0),u=a().getInt32(l+4*3,!0),d=_,m=s;if(u)throw d=0,m=0,w(f);return r=d,i=m,x(d,m)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(r,i,1)}}function K(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.toAst(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Q(t){let e,n;try{let d=o.__wbindgen_add_to_stack_pointer(-16),m=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),l=g;o.format(d,m,l);var r=a().getInt32(d+4*0,!0),i=a().getInt32(d+4*1,!0),_=a().getInt32(d+4*2,!0),s=a().getInt32(d+4*3,!0),f=r,u=i;if(s)throw f=0,u=0,w(_);return e=f,n=u,x(f,u)}finally{o.__wbindgen_add_to_stack_pointer(16),o.__wbindgen_export_2(e,n,1)}}function Z(t){let e=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),n=g,r=o.diagnostics(e,n);return w(r)}function tt(t){try{let i=o.__wbindgen_add_to_stack_pointer(-16),_=y(t,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;o.definedValues(i,_,s);var e=a().getInt32(i+4*0,!0),n=a().getInt32(i+4*1,!0),r=a().getInt32(i+4*2,!0);if(r)throw w(n);return w(e)}finally{o.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function v(){let t={};return t.wbg={},t.wbg.__wbg_Error_e17e777aac105295=function(e,n){let r=Error(x(e,n));return b(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_entries_2be2f15bd5554996=function(e){let n=Object.entries(c(e));return b(n)},t.wbg.__wbg_get_0da715ceaecea5c8=function(e,n){let r=c(e)[n>>>0];return b(r)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){let r=c(e)[c(n)];return b(r)},t.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd=function(e){let n;try{n=c(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7=function(e){let n;try{n=c(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_186546c51cd61acd=function(e){return c(e).length},t.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return c(e).length},t.wbg.__wbg_new_19c25a3f2fa63a02=function(){let e=new Object;return b(e)},t.wbg.__wbg_new_1f3a344cf3123716=function(){let e=new Array;return b(e)},t.wbg.__wbg_new_638ebfaedbf32a5e=function(e){let n=new Uint8Array(c(e));return b(n)},t.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),c(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){c(e)[w(n)]=w(r)},t.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,n,r){c(e)[n>>>0]=w(r)},t.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746=function(e){let n=c(e),r=typeof n=="boolean"?n:void 0;return D(r)?16777215:r?1:0},t.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d=function(e,n){let r=M(c(n)),i=y(r,o.__wbindgen_export_0,o.__wbindgen_export_1),_=g;a().setInt32(e+4*1,_,!0),a().setInt32(e+4*0,i,!0)},t.wbg.__wbg_wbindgenin_d7a1ee10933d2d55=function(e,n){return c(e)in c(n)},t.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8=function(e){let n=c(e);return typeof n=="object"&&n!==null},t.wbg.__wbg_wbindgenisstring_d4fa939789f003b0=function(e){return typeof c(e)=="string"},t.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return c(e)===void 0},t.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1=function(e,n){return c(e)==c(n)},t.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,n){let r=c(n),i=typeof r=="number"?r:void 0;a().setFloat64(e+8*1,D(i)?0:i,!0),a().setInt32(e+4*0,!D(i),!0)},t.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f=function(e,n){let r=c(n),i=typeof r=="string"?r:void 0;var _=D(i)?0:y(i,o.__wbindgen_export_0,o.__wbindgen_export_1),s=g;a().setInt32(e+4*1,s,!0),a().setInt32(e+4*0,_,!0)},t.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,n){throw new Error(x(e,n))},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return b(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return b(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=c(e);return b(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return o=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,o}function it(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=v();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(o!==void 0)return o;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=v();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var o,A,E,X,k,p,S,g,O,h,et,j,nt,V,R=C(()=>{"use strict";A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();X=2146435072,k=0;p=new Array(128).fill(void 0);p.push(void 0,null,!0,!1);S=p.length;g=0,O=new TextEncoder;"encodeInto"in O||(O.encodeInto=function(t,e){let n=O.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>o.__wbg_runoptions_free(t>>>0,1)),j=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();o.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);nt=new Set(["basic","cors","default"]);V=U});R();var F=null;async function W(){return F||(await(async()=>{try{await V();let t=await Promise.resolve().then(()=>(R(),P));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function ot(t,e,n={}){return await(await W()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function st(t){return await(await W()).toAst(t)}async function ct(t){return await(await W()).format(t)}async function at(t){return await(await W()).diagnostics(t)}async function _t(t){return await(await W()).definedValues(t)}export{_t as definedValues,at as diagnostics,ct as format,ot as run,st as toAst};
1
+ var L=Object.defineProperty;var C=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>{for(var n in e)L(t,n,{get:e[n],enumerable:!0})};var P={};N(P,{RunOptions:()=>W,default:()=>M,definedValues:()=>tt,diagnostics:()=>Z,format:()=>Q,initSync:()=>it,run:()=>G,toAst:()=>K});function S(){return(A===null||A.byteLength===0)&&(A=new Uint8Array(i.memory.buffer)),A}function Y(t,e){return k+=e,k>=X&&(E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),E.decode(),k=e),E.decode(S().subarray(t,t+e))}function x(t,e){return t=t>>>0,Y(t,e)}function g(t){O===y.length&&y.push(y.length+1);let e=O;return O=y[e],y[e]=t,e}function _(t){return y[t]}function l(t,e,n){if(n===void 0){let a=j.encode(t),u=e(a.length,1)>>>0;return S().subarray(u,u+a.length).set(a),d=a.length,u}let r=t.length,o=e(r,1)>>>0,f=S(),s=0;for(;s<r;s++){let a=t.charCodeAt(s);if(a>127)break;f[o+s]=a}if(s!==r){s!==0&&(t=t.slice(s)),o=n(o,r,r=s+t.length*3,1)>>>0;let a=S().subarray(o+s,o+r),u=j.encodeInto(t,a);s+=u.written,o=n(o,r,s,1)>>>0}return d=s,o}function c(){return(h===null||h.buffer.detached===!0||h.buffer.detached===void 0&&h.buffer!==i.memory.buffer)&&(h=new DataView(i.memory.buffer)),h}function I(t){return t==null}function v(t){let e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){let o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){let o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){let o=t.length,f="[";o>0&&(f+=v(t[0]));for(let s=1;s<o;s++)f+=", "+v(t[s]);return f+="]",f}let n=/\[object ([^\]]+)\]/.exec(toString.call(t)),r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
2
+ ${t.stack}`:r}function H(t,e){return t=t>>>0,S().subarray(t/1,t/1+e)}function J(t){t<132||(y[t]=O,O=t)}function w(t){let e=_(t);return J(t),e}function G(t,e,n){let r,o;try{let p=i.__wbindgen_add_to_stack_pointer(-16),$=l(t,i.__wbindgen_export,i.__wbindgen_export2),q=d,B=l(e,i.__wbindgen_export,i.__wbindgen_export2),z=d;i.run(p,$,q,B,z,g(n));var f=c().getInt32(p+4*0,!0),s=c().getInt32(p+4*1,!0),a=c().getInt32(p+4*2,!0),u=c().getInt32(p+4*3,!0),b=f,m=s;if(u)throw b=0,m=0,w(a);return r=b,o=m,x(b,m)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(r,o,1)}}function K(t){let e,n;try{let b=i.__wbindgen_add_to_stack_pointer(-16),m=l(t,i.__wbindgen_export,i.__wbindgen_export2),p=d;i.toAst(b,m,p);var r=c().getInt32(b+4*0,!0),o=c().getInt32(b+4*1,!0),f=c().getInt32(b+4*2,!0),s=c().getInt32(b+4*3,!0),a=r,u=o;if(s)throw a=0,u=0,w(f);return e=a,n=u,x(a,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(e,n,1)}}function Q(t){let e,n;try{let b=i.__wbindgen_add_to_stack_pointer(-16),m=l(t,i.__wbindgen_export,i.__wbindgen_export2),p=d;i.format(b,m,p);var r=c().getInt32(b+4*0,!0),o=c().getInt32(b+4*1,!0),f=c().getInt32(b+4*2,!0),s=c().getInt32(b+4*3,!0),a=r,u=o;if(s)throw a=0,u=0,w(f);return e=a,n=u,x(a,u)}finally{i.__wbindgen_add_to_stack_pointer(16),i.__wbindgen_export3(e,n,1)}}function Z(t){let e=l(t,i.__wbindgen_export,i.__wbindgen_export2),n=d,r=i.diagnostics(e,n);return w(r)}function tt(t,e){try{let a=i.__wbindgen_add_to_stack_pointer(-16),u=l(t,i.__wbindgen_export,i.__wbindgen_export2),b=d;var n=I(e)?0:l(e,i.__wbindgen_export,i.__wbindgen_export2),r=d;i.definedValues(a,u,b,n,r);var o=c().getInt32(a+4*0,!0),f=c().getInt32(a+4*1,!0),s=c().getInt32(a+4*2,!0);if(s)throw w(f);return w(o)}finally{i.__wbindgen_add_to_stack_pointer(16)}}async function rt(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&nt.has(t.type)&&t.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function R(){let t={};return t.wbg={},t.wbg.__wbg_Error_e83987f665cf5504=function(e,n){let r=Error(x(e,n));return g(r)},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){let r=String(_(n)),o=l(r,i.__wbindgen_export,i.__wbindgen_export2),f=d;c().setInt32(e+4*1,f,!0),c().setInt32(e+4*0,o,!0)},t.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68=function(e){let n=_(e),r=typeof n=="boolean"?n:void 0;return I(r)?16777215:r?1:0},t.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763=function(e,n){let r=v(_(n)),o=l(r,i.__wbindgen_export,i.__wbindgen_export2),f=d;c().setInt32(e+4*1,f,!0),c().setInt32(e+4*0,o,!0)},t.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f=function(e,n){return _(e)in _(n)},t.wbg.__wbg___wbindgen_is_object_c818261d21f283a4=function(e){let n=_(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd=function(e){return typeof _(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478=function(e){return _(e)===void 0},t.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147=function(e,n){return _(e)==_(n)},t.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d=function(e,n){let r=_(n),o=typeof r=="number"?r:void 0;c().setFloat64(e+8*1,I(o)?0:o,!0),c().setInt32(e+4*0,!I(o),!0)},t.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b=function(e,n){let r=_(n),o=typeof r=="string"?r:void 0;var f=I(o)?0:l(o,i.__wbindgen_export,i.__wbindgen_export2),s=d;c().setInt32(e+4*1,s,!0),c().setInt32(e+4*0,f,!0)},t.wbg.__wbg___wbindgen_throw_b855445ff6a94295=function(e,n){throw new Error(x(e,n))},t.wbg.__wbg_entries_e171b586f8f6bdbf=function(e){let n=Object.entries(_(e));return g(n)},t.wbg.__wbg_get_7bed016f185add81=function(e,n){let r=_(e)[n>>>0];return g(r)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){let r=_(e)[_(n)];return g(r)},t.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38=function(e){let n;try{n=_(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98=function(e){let n;try{n=_(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_length_69bca3cb64fc8748=function(e){return _(e).length},t.wbg.__wbg_length_cdd215e10d9dd507=function(e){return _(e).length},t.wbg.__wbg_new_1acc0b6eea89d040=function(){let e=new Object;return g(e)},t.wbg.__wbg_new_5a79be3ab53b8aa5=function(e){let n=new Uint8Array(_(e));return g(n)},t.wbg.__wbg_new_e17d9f43105b08be=function(){let e=new Array;return g(e)},t.wbg.__wbg_prototypesetcall_2a6620b6922694b2=function(e,n,r){Uint8Array.prototype.set.call(H(e,n),_(r))},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){_(e)[w(n)]=w(r)},t.wbg.__wbg_set_c213c871859d6500=function(e,n,r){_(e)[n>>>0]=w(r)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){let r=x(e,n);return g(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return g(e)},t.wbg.__wbindgen_object_clone_ref=function(e){let n=_(e);return g(n)},t.wbg.__wbindgen_object_drop_ref=function(e){w(e)},t}function T(t,e){return i=t.exports,U.__wbindgen_wasm_module=e,h=null,A=null,i}function it(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module:t}=t:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let e=R();t instanceof WebAssembly.Module||(t=new WebAssembly.Module(t));let n=new WebAssembly.Instance(t,e);return T(n,t)}async function U(t){if(i!==void 0)return i;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("mq_wasm_bg.wasm",import.meta.url));let e=R();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));let{instance:n,module:r}=await rt(await t,e);return T(n,r)}var i,A,E,X,k,y,O,d,j,h,et,W,nt,M,V=C(()=>{"use strict";A=null;E=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});E.decode();X=2146435072,k=0;y=new Array(128).fill(void 0);y.push(void 0,null,!0,!1);O=y.length;d=0,j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(t,e){let n=j.encode(t);return e.set(n),{read:t.length,written:n.length}});h=null;et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>i.__wbg_runoptions_free(t>>>0,1)),W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,et.unregister(this),e}free(){let e=this.__destroy_into_raw();i.__wbg_runoptions_free(e,0)}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);nt=new Set(["basic","cors","default"]);M=U});V();var F=null;async function D(){return F||(await(async()=>{try{await M();let t=await Promise.resolve().then(()=>(V(),P));F={run:t.run,toAst:t.toAst,format:t.format,diagnostics:t.diagnostics,definedValues:t.definedValues}}catch(t){throw new Error(`Failed to initialize mq WebAssembly module: ${t}`)}})(),F)}async function ot(t,e,n={}){return await(await D()).run(t,e,{isUpdate:!1,inputFormat:"markdown",listStyle:"dash",linkUrlStyle:"none",linkTitleStyle:"paren",...n})}async function st(t){return await(await D()).toAst(t)}async function _t(t){return await(await D()).format(t)}async function at(t){return await(await D()).diagnostics(t)}async function ct(t,e){return await(await D()).definedValues(t,e)}export{ct as definedValues,at as diagnostics,_t as format,ot as run,st as toAst};
package/dist/mq_wasm.js CHANGED
@@ -110,23 +110,6 @@ function getDataViewMemory0() {
110
110
  return cachedDataViewMemory0;
111
111
  }
112
112
 
113
- function getArrayU8FromWasm0(ptr, len) {
114
- ptr = ptr >>> 0;
115
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
116
- }
117
-
118
- function dropObject(idx) {
119
- if (idx < 132) return;
120
- heap[idx] = heap_next;
121
- heap_next = idx;
122
- }
123
-
124
- function takeObject(idx) {
125
- const ret = getObject(idx);
126
- dropObject(idx);
127
- return ret;
128
- }
129
-
130
113
  function isLikeNone(x) {
131
114
  return x === undefined || x === null;
132
115
  }
@@ -195,6 +178,23 @@ function debugString(val) {
195
178
  // TODO we could test for more things here, like `Set`s and `Map`s.
196
179
  return className;
197
180
  }
181
+
182
+ function getArrayU8FromWasm0(ptr, len) {
183
+ ptr = ptr >>> 0;
184
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
185
+ }
186
+
187
+ function dropObject(idx) {
188
+ if (idx < 132) return;
189
+ heap[idx] = heap_next;
190
+ heap_next = idx;
191
+ }
192
+
193
+ function takeObject(idx) {
194
+ const ret = getObject(idx);
195
+ dropObject(idx);
196
+ return ret;
197
+ }
198
198
  /**
199
199
  * @param {string} code
200
200
  * @param {string} content
@@ -206,9 +206,9 @@ export function run(code, content, options) {
206
206
  let deferred4_1;
207
207
  try {
208
208
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
209
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
209
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
210
210
  const len0 = WASM_VECTOR_LEN;
211
- const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
211
+ const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
212
212
  const len1 = WASM_VECTOR_LEN;
213
213
  wasm.run(retptr, ptr0, len0, ptr1, len1, addHeapObject(options));
214
214
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -226,7 +226,7 @@ export function run(code, content, options) {
226
226
  return getStringFromWasm0(ptr3, len3);
227
227
  } finally {
228
228
  wasm.__wbindgen_add_to_stack_pointer(16);
229
- wasm.__wbindgen_export_2(deferred4_0, deferred4_1, 1);
229
+ wasm.__wbindgen_export3(deferred4_0, deferred4_1, 1);
230
230
  }
231
231
  }
232
232
 
@@ -239,7 +239,7 @@ export function toAst(code) {
239
239
  let deferred3_1;
240
240
  try {
241
241
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
242
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
242
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
243
243
  const len0 = WASM_VECTOR_LEN;
244
244
  wasm.toAst(retptr, ptr0, len0);
245
245
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -257,7 +257,7 @@ export function toAst(code) {
257
257
  return getStringFromWasm0(ptr2, len2);
258
258
  } finally {
259
259
  wasm.__wbindgen_add_to_stack_pointer(16);
260
- wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
260
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
261
261
  }
262
262
  }
263
263
 
@@ -270,7 +270,7 @@ export function format(code) {
270
270
  let deferred3_1;
271
271
  try {
272
272
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
273
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
273
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
274
274
  const len0 = WASM_VECTOR_LEN;
275
275
  wasm.format(retptr, ptr0, len0);
276
276
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -288,7 +288,7 @@ export function format(code) {
288
288
  return getStringFromWasm0(ptr2, len2);
289
289
  } finally {
290
290
  wasm.__wbindgen_add_to_stack_pointer(16);
291
- wasm.__wbindgen_export_2(deferred3_0, deferred3_1, 1);
291
+ wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
292
292
  }
293
293
  }
294
294
 
@@ -297,7 +297,7 @@ export function format(code) {
297
297
  * @returns {any}
298
298
  */
299
299
  export function diagnostics(code) {
300
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
300
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
301
301
  const len0 = WASM_VECTOR_LEN;
302
302
  const ret = wasm.diagnostics(ptr0, len0);
303
303
  return takeObject(ret);
@@ -305,14 +305,17 @@ export function diagnostics(code) {
305
305
 
306
306
  /**
307
307
  * @param {string} code
308
+ * @param {string | null} [module]
308
309
  * @returns {any}
309
310
  */
310
- export function definedValues(code) {
311
+ export function definedValues(code, module) {
311
312
  try {
312
313
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
313
- const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
314
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_export, wasm.__wbindgen_export2);
314
315
  const len0 = WASM_VECTOR_LEN;
315
- wasm.definedValues(retptr, ptr0, len0);
316
+ var ptr1 = isLikeNone(module) ? 0 : passStringToWasm0(module, wasm.__wbindgen_export, wasm.__wbindgen_export2);
317
+ var len1 = WASM_VECTOR_LEN;
318
+ wasm.definedValues(retptr, ptr0, len0, ptr1, len1);
316
319
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
317
320
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
318
321
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -383,30 +386,80 @@ async function __wbg_load(module, imports) {
383
386
  function __wbg_get_imports() {
384
387
  const imports = {};
385
388
  imports.wbg = {};
386
- imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
389
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
387
390
  const ret = Error(getStringFromWasm0(arg0, arg1));
388
391
  return addHeapObject(ret);
389
392
  };
390
393
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
391
394
  const ret = String(getObject(arg1));
392
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
395
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
393
396
  const len1 = WASM_VECTOR_LEN;
394
397
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
395
398
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
396
399
  };
397
- imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
400
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
401
+ const v = getObject(arg0);
402
+ const ret = typeof(v) === 'boolean' ? v : undefined;
403
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
404
+ };
405
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
406
+ const ret = debugString(getObject(arg1));
407
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
408
+ const len1 = WASM_VECTOR_LEN;
409
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
410
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
411
+ };
412
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
413
+ const ret = getObject(arg0) in getObject(arg1);
414
+ return ret;
415
+ };
416
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
417
+ const val = getObject(arg0);
418
+ const ret = typeof(val) === 'object' && val !== null;
419
+ return ret;
420
+ };
421
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
422
+ const ret = typeof(getObject(arg0)) === 'string';
423
+ return ret;
424
+ };
425
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
426
+ const ret = getObject(arg0) === undefined;
427
+ return ret;
428
+ };
429
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
430
+ const ret = getObject(arg0) == getObject(arg1);
431
+ return ret;
432
+ };
433
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
434
+ const obj = getObject(arg1);
435
+ const ret = typeof(obj) === 'number' ? obj : undefined;
436
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
437
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
438
+ };
439
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
440
+ const obj = getObject(arg1);
441
+ const ret = typeof(obj) === 'string' ? obj : undefined;
442
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
443
+ var len1 = WASM_VECTOR_LEN;
444
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
445
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
446
+ };
447
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
448
+ throw new Error(getStringFromWasm0(arg0, arg1));
449
+ };
450
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
398
451
  const ret = Object.entries(getObject(arg0));
399
452
  return addHeapObject(ret);
400
453
  };
401
- imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
454
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
402
455
  const ret = getObject(arg0)[arg1 >>> 0];
403
456
  return addHeapObject(ret);
404
457
  };
405
- imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
458
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
406
459
  const ret = getObject(arg0)[getObject(arg1)];
407
460
  return addHeapObject(ret);
408
461
  };
409
- imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
462
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
410
463
  let result;
411
464
  try {
412
465
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -416,7 +469,7 @@ function __wbg_get_imports() {
416
469
  const ret = result;
417
470
  return ret;
418
471
  };
419
- imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
472
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
420
473
  let result;
421
474
  try {
422
475
  result = getObject(arg0) instanceof Uint8Array;
@@ -426,85 +479,35 @@ function __wbg_get_imports() {
426
479
  const ret = result;
427
480
  return ret;
428
481
  };
429
- imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
482
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
430
483
  const ret = getObject(arg0).length;
431
484
  return ret;
432
485
  };
433
- imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
486
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
434
487
  const ret = getObject(arg0).length;
435
488
  return ret;
436
489
  };
437
- imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
490
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
438
491
  const ret = new Object();
439
492
  return addHeapObject(ret);
440
493
  };
441
- imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
442
- const ret = new Array();
494
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
495
+ const ret = new Uint8Array(getObject(arg0));
443
496
  return addHeapObject(ret);
444
497
  };
445
- imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
446
- const ret = new Uint8Array(getObject(arg0));
498
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
499
+ const ret = new Array();
447
500
  return addHeapObject(ret);
448
501
  };
449
- imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
502
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
450
503
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
451
504
  };
452
505
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
453
506
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
454
507
  };
455
- imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
508
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
456
509
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
457
510
  };
458
- imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
459
- const v = getObject(arg0);
460
- const ret = typeof(v) === 'boolean' ? v : undefined;
461
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
462
- };
463
- imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
464
- const ret = debugString(getObject(arg1));
465
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
466
- const len1 = WASM_VECTOR_LEN;
467
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
468
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
469
- };
470
- imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
471
- const ret = getObject(arg0) in getObject(arg1);
472
- return ret;
473
- };
474
- imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
475
- const val = getObject(arg0);
476
- const ret = typeof(val) === 'object' && val !== null;
477
- return ret;
478
- };
479
- imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
480
- const ret = typeof(getObject(arg0)) === 'string';
481
- return ret;
482
- };
483
- imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
484
- const ret = getObject(arg0) === undefined;
485
- return ret;
486
- };
487
- imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
488
- const ret = getObject(arg0) == getObject(arg1);
489
- return ret;
490
- };
491
- imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
492
- const obj = getObject(arg1);
493
- const ret = typeof(obj) === 'number' ? obj : undefined;
494
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
495
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
496
- };
497
- imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
498
- const obj = getObject(arg1);
499
- const ret = typeof(obj) === 'string' ? obj : undefined;
500
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
501
- var len1 = WASM_VECTOR_LEN;
502
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
503
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
504
- };
505
- imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
506
- throw new Error(getStringFromWasm0(arg0, arg1));
507
- };
508
511
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
509
512
  // Cast intrinsic for `Ref(String) -> Externref`.
510
513
  const ret = getStringFromWasm0(arg0, arg1);
@@ -526,10 +529,6 @@ function __wbg_get_imports() {
526
529
  return imports;
527
530
  }
528
531
 
529
- function __wbg_init_memory(imports, memory) {
530
-
531
- }
532
-
533
532
  function __wbg_finalize_init(instance, module) {
534
533
  wasm = instance.exports;
535
534
  __wbg_init.__wbindgen_wasm_module = module;
@@ -555,8 +554,6 @@ function initSync(module) {
555
554
 
556
555
  const imports = __wbg_get_imports();
557
556
 
558
- __wbg_init_memory(imports);
559
-
560
557
  if (!(module instanceof WebAssembly.Module)) {
561
558
  module = new WebAssembly.Module(module);
562
559
  }
@@ -587,8 +584,6 @@ async function __wbg_init(module_or_path) {
587
584
  module_or_path = fetch(module_or_path);
588
585
  }
589
586
 
590
- __wbg_init_memory(imports);
591
-
592
587
  const { instance, module } = await __wbg_load(await module_or_path, imports);
593
588
 
594
589
  return __wbg_finalize_init(instance, module);
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mq-web",
3
3
  "description": "A jq-like command-line tool for Markdown processing",
4
- "version": "0.4.2",
4
+ "version": "0.5.0",
5
5
  "author": "harehare",
6
6
  "license": "MIT",
7
7
  "bugs": {