var q=new WeakMap;function v(e,t){e.before(t)}function A(e){e.remove()}function T(e,t){e.replaceWith(t)}function W(){let e=document.createDocumentFragment();return e.append("",""),e}function M(e){return q.set(e,[e.firstChild,e.lastChild]),e.lastChild}function N(e,t){e.textContent=t}function D(e,t,n){e.setAttribute(t,n)}function L(e,t){e.className=t}function S(e,t){return n=>koboldCallback(n,e,t)}function j(e,t,n,o,s,r,d){let c=document.createElement("div");c.className="container";let f=document.createElement("div");f.className="jumbotron";let u=document.createElement("div");u.className="row";let m=document.createElement("div");m.className="col-md-6";let _=document.createElement("h1");_.append("Kobold"),m.append(_);let g=document.createElement("div");g.className="col-md-6";let x=document.createElement("div");x.className="row",x.append(e,t,n,o,s,r),g.append(x),u.append(m,g),f.append(u);let C=document.createElement("table");C.className="table table-hover table-striped test-data";let E=document.createElement("tbody");E.append(d),C.append(E);let k=document.createElement("span");return k.className="preloadicon glyphicon glyphicon-remove",k.setAttribute("aria-hidden","true"),c.append(f,C,k),c}function R(e,t){let n=document.createElement("button");return n.className="btn btn-primary btn-block",n.setAttribute("type","button"),n.addEventListener("click",e),n.append(t),n}function B(e){let t=document.createElement("div");return t.className="col-sm-6 smallpad",t.append(e),t}function U(e,t,n,o,s){let r=document.createElement("tr");r.className=e;let d=document.createElement("td");d.className="col-md-1",d.append(t);let c=document.createElement("td");c.className="col-md-4";let f=document.createElement("a");f.addEventListener("click",n),f.append(o),c.append(f);let u=document.createElement("td");u.className="col-md-1";let m=document.createElement("a");m.addEventListener("click",s);let _=document.createElement("span");_.className="glyphicon glyphicon-remove",_.setAttribute("aria-hidden","true"),m.append(_),u.append(m);let g=document.createElement("td");return g.className="col-md-6",r.append(d,c,u,g),r}var l,b=new Array(128).fill(void 0);b.push(void 0,null,!0,!1);function a(e){return b[e]}var h=b.length;function z(e){e<132||(b[e]=h,h=e)}function y(e){let t=a(e);return z(e),t}var H=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&H.decode();var w=null;function K(){return(w===null||w.byteLength===0)&&(w=new Uint8Array(l.memory.buffer)),w}function p(e,t){return e=e>>>0,H.decode(K().subarray(e,e+t))}function te(){l.start()}function i(e){h===b.length&&b.push(b.length+1);let t=h;return h=b[t],b[t]=e,t}function V(e){return()=>{throw new Error(`${e} is not defined`)}}function ne(e,t,n){l.koboldCallback(i(e),t,n)}async function $(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.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",o);else throw o}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function O(){let e={};return e.wbg={},e.wbg.__wbg_replaceNode_69a9c8181075f4e2=function(t,n){T(a(t),a(n))},e.wbg.__wbg_removeNode_e942a04e90481722=function(t){A(a(t))},e.wbg.__wbindgen_object_drop_ref=function(t){y(t)},e.wbg.__wbg_setClassName_eae7f898f2504e81=function(t,n,o){L(a(t),p(n,o))},e.wbg.__wbg_setTextContent_0f383978c1de6512=function(t,n){N(a(t),n)},e.wbg.__wbg_setTextContent_a2c9f494c8cfcc8a=function(t,n,o){N(a(t),p(n,o))},e.wbg.__wbg_createTextNode_ba7d6eef66aa31f0=function(t){let n=document.createTextNode(t);return i(n)},e.wbg.__wbg_createTextNode_3d87d707f7fb4397=function(t,n){let o=document.createTextNode(p(t,n));return i(o)},e.wbg.__wbg_makeEventHandler_2c9a6f8025ab58b1=function(t,n){let o=S(t,n>>>0);return i(o)},e.wbg.__wbg_e07e970beef19ed0b9_09a72c718b996154=function(t,n,o,s,r,d){let c=U(p(t,n),a(o),y(s),a(r),y(d));return i(c)},e.wbg.__wbg_appendBefore_320ba3f940df5bc0=function(t,n){v(a(t),a(n))},e.wbg.__wbg_random_30eff71f0a789ce8=typeof Math.random=="function"?Math.random:V("Math.random"),e.wbg.__wbg_e15b9b3dfbcd197f75_74b12045ff747159=function(t,n){let o=R(y(t),a(n));return i(o)},e.wbg.__wbg_e0d71cee6b942846f2_e6b1cea3356c10f1=function(t){let n=B(a(t));return i(n)},e.wbg.__wbg_setAttribute_6e31ba17b364838a=function(t,n,o,s,r){D(a(t),p(n,o),p(s,r))},e.wbg.__wbg_fragment_9bee698b3e6a6553=function(){let t=W();return i(t)},e.wbg.__wbg_fragmentDecorate_6087637383887c5e=function(t){let n=M(a(t));return i(n)},e.wbg.__wbg_e0f543312a9dbfd6ab_9194a2a2a4fe4de4=function(t,n,o,s,r,d,c){let f=j(a(t),a(n),a(o),a(s),a(r),a(d),a(c));return i(f)},e.wbg.__wbg_appendChild_2fd6214ce2fcb493=function(t){document.body.appendChild(a(t))},e.wbg.__wbindgen_throw=function(t,n){throw new Error(p(t,n))},e}function F(e,t){return l=e.exports,I.__wbindgen_wasm_module=t,w=null,l.__wbindgen_start(),l}function oe(e){if(l!==void 0)return l;let t=O();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return F(n,e)}async function I(e){if(l!==void 0)return l;typeof e>"u"&&(e=new URL("js-framework-benchmark-kobold_bg.wasm",import.meta.url));let t=O();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:o}=await $(await e,t);return F(n,o)}var ae=I;export{ae as default,oe as initSync,ne as koboldCallback,te as start};

var q=new WeakMap;function v(e,t){e.before(t)}function A(e){e.remove()}function T(e,t){e.replaceWith(t)}function W(){let e=document.createDocumentFragment();return e.append("",""),e}function M(e){return q.set(e,[e.firstChild,e.lastChild]),e.lastChild}function N(e,t){e.textContent=t}function D(e,t,n){e.setAttribute(t,n)}function L(e,t){e.className=t}function S(e,t){return n=>koboldCallback(n,e,t)}function j(e,t,n,o,s,r,d){let c=document.createElement("div");c.className="container";let f=document.createElement("div");f.className="jumbotron";let u=document.createElement("div");u.className="row";let m=document.createElement("div");m.className="col-md-6";let _=document.createElement("h1");_.append("Kobold"),m.append(_);let g=document.createElement("div");g.className="col-md-6";let x=document.createElement("div");x.className="row",x.append(e,t,n,o,s,r),g.append(x),u.append(m,g),f.append(u);let C=document.createElement("table");C.className="table table-hover table-striped test-data";let E=document.createElement("tbody");E.append(d),C.append(E);let k=document.createElement("span");return k.className="preloadicon glyphicon glyphicon-remove",k.setAttribute("aria-hidden","true"),c.append(f,C,k),c}function R(e,t){let n=document.createElement("button");return n.className="btn btn-primary btn-block",n.setAttribute("type","button"),n.addEventListener("click",e),n.append(t),n}function B(e){let t=document.createElement("div");return t.className="col-sm-6 smallpad",t.append(e),t}function U(e,t,n,o,s){let r=document.createElement("tr");r.className=e;let d=document.createElement("td");d.className="col-md-1",d.append(t);let c=document.createElement("td");c.className="col-md-4";let f=document.createElement("a");f.addEventListener("click",n),f.append(o),c.append(f);let u=document.createElement("td");u.className="col-md-1";let m=document.createElement("a");m.addEventListener("click",s);let _=document.createElement("span");_.className="glyphicon glyphicon-remove",_.setAttribute("aria-hidden","true"),m.append(_),u.append(m);let g=document.createElement("td");return g.className="col-md-6",r.append(d,c,u,g),r}var l,b=new Array(128).fill(void 0);b.push(void 0,null,!0,!1);function a(e){return b[e]}var h=b.length;function z(e){e<132||(b[e]=h,h=e)}function y(e){let t=a(e);return z(e),t}var H=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&H.decode();var w=null;function K(){return(w===null||w.byteLength===0)&&(w=new Uint8Array(l.memory.buffer)),w}function p(e,t){return e=e>>>0,H.decode(K().subarray(e,e+t))}function te(){l.start()}function i(e){h===b.length&&b.push(b.length+1);let t=h;return h=b[t],b[t]=e,t}function V(e){return()=>{throw new Error(`${e} is not defined`)}}function ne(e,t,n){l.koboldCallback(i(e),t,n)}async function $(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(o){if(e.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",o);else throw o}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function O(){let e={};return e.wbg={},e.wbg.__wbg_replaceNode_69a9c8181075f4e2=function(t,n){T(a(t),a(n))},e.wbg.__wbg_removeNode_e942a04e90481722=function(t){A(a(t))},e.wbg.__wbindgen_object_drop_ref=function(t){y(t)},e.wbg.__wbg_setClassName_eae7f898f2504e81=function(t,n,o){L(a(t),p(n,o))},e.wbg.__wbg_setTextContent_0f383978c1de6512=function(t,n){N(a(t),n)},e.wbg.__wbg_setTextContent_a2c9f494c8cfcc8a=function(t,n,o){N(a(t),p(n,o))},e.wbg.__wbg_createTextNode_ba7d6eef66aa31f0=function(t){let n=document.createTextNode(t);return i(n)},e.wbg.__wbg_createTextNode_3d87d707f7fb4397=function(t,n){let o=document.createTextNode(p(t,n));return i(o)},e.wbg.__wbg_makeEventHandler_2c9a6f8025ab58b1=function(t,n){let o=S(t,n>>>0);return i(o)},e.wbg.__wbg_e07e970beef19ed0b9_09a72c718b996154=function(t,n,o,s,r,d){let c=U(p(t,n),a(o),y(s),a(r),y(d));return i(c)},e.wbg.__wbg_appendBefore_320ba3f940df5bc0=function(t,n){v(a(t),a(n))},e.wbg.__wbg_random_30eff71f0a789ce8=typeof Math.random=="function"?Math.random:V("Math.random"),e.wbg.__wbg_e15b9b3dfbcd197f75_74b12045ff747159=function(t,n){let o=R(y(t),a(n));return i(o)},e.wbg.__wbg_e0d71cee6b942846f2_e6b1cea3356c10f1=function(t){let n=B(a(t));return i(n)},e.wbg.__wbg_setAttribute_6e31ba17b364838a=function(t,n,o,s,r){D(a(t),p(n,o),p(s,r))},e.wbg.__wbg_fragment_9bee698b3e6a6553=function(){let t=W();return i(t)},e.wbg.__wbg_fragmentDecorate_6087637383887c5e=function(t){let n=M(a(t));return i(n)},e.wbg.__wbg_e0f543312a9dbfd6ab_9194a2a2a4fe4de4=function(t,n,o,s,r,d,c){let f=j(a(t),a(n),a(o),a(s),a(r),a(d),a(c));return i(f)},e.wbg.__wbg_appendChild_2fd6214ce2fcb493=function(t){document.body.appendChild(a(t))},e.wbg.__wbindgen_throw=function(t,n){throw new Error(p(t,n))},e}function F(e,t){return l=e.exports,I.__wbindgen_wasm_module=t,w=null,l.__wbindgen_start(),l}function oe(e){if(l!==void 0)return l;let t=O();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return F(n,e)}async function I(e){if(l!==void 0)return l;typeof e>"u"&&(e=new URL("js-framework-benchmark-kobold_bg.wasm",import.meta.url));let t=O();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:o}=await $(await e,t);return F(n,o)}var ae=I;export{ae as default,oe as initSync,ne as koboldCallback,te as start};
