From 51ef018e881356a99c85527a52b472dcb1f0e006 Mon Sep 17 00:00:00 2001 From: Senryoku Date: Wed, 6 Nov 2024 11:41:47 +0000 Subject: [PATCH] Build: (b8d613c) zig 0.14.0-dev.1911+3bf89f55c --- 404.html | 2 +- ...VZLpGupG.js => BenchmarksView-DOu0ULpr.js} | 4 +- ...k-C4GiWKWP.js => LibBenchmark-BZxL9PZC.js} | 2 +- .../{index-M0cLSXB8.js => index-FSP9f0UY.js} | 2 +- assets/worker-CxX4GLHA-DGNBd0kf.js | 91 ------------------- assets/worker-DrAYohSc-CMxnHKXp.js | 91 +++++++++++++++++++ index.html | 2 +- 7 files changed, 97 insertions(+), 97 deletions(-) rename assets/{BenchmarksView-VZLpGupG.js => BenchmarksView-DOu0ULpr.js} (57%) rename assets/{LibBenchmark-C4GiWKWP.js => LibBenchmark-BZxL9PZC.js} (81%) rename assets/{index-M0cLSXB8.js => index-FSP9f0UY.js} (99%) delete mode 100644 assets/worker-CxX4GLHA-DGNBd0kf.js create mode 100644 assets/worker-DrAYohSc-CMxnHKXp.js diff --git a/404.html b/404.html index b9bf324..b8d8b9d 100644 --- a/404.html +++ b/404.html @@ -15,7 +15,7 @@ content="smol-string: Typescript library for localStorage compression" /> smol-string - + diff --git a/assets/BenchmarksView-VZLpGupG.js b/assets/BenchmarksView-DOu0ULpr.js similarity index 57% rename from assets/BenchmarksView-VZLpGupG.js rename to assets/BenchmarksView-DOu0ULpr.js index c8c0a1b..b8f8d71 100644 --- a/assets/BenchmarksView-VZLpGupG.js +++ b/assets/BenchmarksView-DOu0ULpr.js @@ -1,2 +1,2 @@ -const __vite__fileDeps=["assets/LibBenchmark-C4GiWKWP.js","assets/index-M0cLSXB8.js","assets/index-DWVS7X-1.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -import{d as t,c as o,a as c,w as e,S as _,b as n,o as a,e as r,u as l,f as i,_ as u}from"./index-M0cLSXB8.js";const m=n("h2",null,"Benchmarks",-1),d=n("p",null,"Running benchmarks...",-1),B=t({__name:"BenchmarksView",setup(p){const s=i(()=>u(()=>import("./LibBenchmark-C4GiWKWP.js"),__vite__mapDeps([0,1,2])));return(f,h)=>(a(),o("main",null,[m,(a(),c(_,null,{fallback:e(()=>[d]),default:e(()=>[r(l(s))]),_:1}))]))}});export{B as default}; +const __vite__fileDeps=["assets/LibBenchmark-BZxL9PZC.js","assets/index-FSP9f0UY.js","assets/index-DWVS7X-1.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{d as t,c as o,a as c,w as e,S as _,b as n,o as a,e as r,u as l,f as i,_ as u}from"./index-FSP9f0UY.js";const m=n("h2",null,"Benchmarks",-1),d=n("p",null,"Running benchmarks...",-1),B=t({__name:"BenchmarksView",setup(p){const s=i(()=>u(()=>import("./LibBenchmark-BZxL9PZC.js"),__vite__mapDeps([0,1,2])));return(f,h)=>(a(),o("main",null,[m,(a(),c(_,null,{fallback:e(()=>[d]),default:e(()=>[r(l(s))]),_:1}))]))}});export{B as default}; diff --git a/assets/LibBenchmark-C4GiWKWP.js b/assets/LibBenchmark-BZxL9PZC.js similarity index 81% rename from assets/LibBenchmark-C4GiWKWP.js rename to assets/LibBenchmark-BZxL9PZC.js index bf0fe2b..ec531c7 100644 --- a/assets/LibBenchmark-C4GiWKWP.js +++ b/assets/LibBenchmark-BZxL9PZC.js @@ -1 +1 @@ -import{_ as j,d as U,r as x,g as P,o as F,c as N,e as I,B as R}from"./index-M0cLSXB8.js";const k=new Worker(new URL(""+new URL("/smol-string/assets/worker-CxX4GLHA-DGNBd0kf.js",import.meta.url).href,import.meta.url),{type:"module"});let C=0;const S={};k.onmessage=function(v){const u=v.data.id;S[u](v.data.data),delete S[u]};async function B(v){const u=C++;return new Promise(y=>{S[u]=y,k.postMessage({command:"compress",id:u,data:v})})}async function J(v){const u=C++;return new Promise(y=>{S[u]=y,k.postMessage({command:"decompress",id:u,data:v})})}var V=function(){var v=String.fromCharCode,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",A={};function _(t,o){if(!A[t]){A[t]={};for(var a=0;a>>8,a[2*s+1]=c%256}return a},decompressFromUint8Array:function(t){if(t==null)return d.decompress(t);for(var o=new Array(t.length/2),a=0,s=o.length;a>=1}else{for(n=1,s=0;s>=1}--g==0&&(g=Math.pow(2,m),m++),delete f[p]}else for(n=l[p],s=0;s>=1;--g==0&&(g=Math.pow(2,m),m++),l[w]=O++,p=String(i)}if(p!==""){if(Object.prototype.hasOwnProperty.call(f,p)){if(p.charCodeAt(0)<256){for(s=0;s>=1}else{for(n=1,s=0;s>=1}--g==0&&(g=Math.pow(2,m),m++),delete f[p]}else for(n=l[p],s=0;s>=1;--g==0&&(g=Math.pow(2,m),m++)}for(n=2,s=0;s>=1;for(;;){if(r<<=1,e==o-1){h.push(a(r));break}e++}return h.join("")},decompress:function(t){return t==null?"":t==""?null:d._decompress(t.length,32768,function(o){return t.charCodeAt(o)})},_decompress:function(t,o,a){var s,n,c,l,f,i,w,p=[],g=4,O=4,m=3,h="",r=[],e={val:a(0),position:o,index:1};for(s=0;s<3;s+=1)p[s]=s;for(c=0,f=Math.pow(2,2),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;switch(c){case 0:for(c=0,f=Math.pow(2,8),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;w=v(c);break;case 1:for(c=0,f=Math.pow(2,16),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;w=v(c);break;case 2:return""}for(p[3]=w,n=w,r.push(w);;){if(e.index>t)return"";for(c=0,f=Math.pow(2,m),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;switch(w=c){case 0:for(c=0,f=Math.pow(2,8),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;p[O++]=v(c),w=O-1,g--;break;case 1:for(c=0,f=Math.pow(2,16),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;p[O++]=v(c),w=O-1,g--;break;case 2:return r.join("")}if(g==0&&(g=Math.pow(2,m),m++),p[w])h=p[w];else{if(w!==O)return null;h=n+n.charAt(0)}r.push(h),p[O++]=n+h.charAt(0),n=h,--g==0&&(g=Math.pow(2,m),m++)}}};return d}();const b=V,M=j(()=>import("./512KB-Cmx0pFrj.js"),[]),T=j(()=>import("./1MB-DNCdY0QL.js"),[]),E=j(()=>import("./rw_medium-B8IwR0iT.js"),[]),L=j(()=>import("./rw_large-DP7720Ef.js"),[]);JSON.stringify(await M),JSON.stringify(await T),JSON.stringify(await E),JSON.stringify(await L);const z=U({__name:"LibBenchmark",setup(v){const u=x({compressed:{},decompressed:{},success:{},size:{}});async function y(A,_,d,t,o){const a=performance.now(),s=await t(d),n=performance.now()-a;localStorage.setItem("compressed",s);const c=localStorage.getItem("compressed");localStorage.removeItem("compressed");const l=performance.now(),f=await o(c),i=performance.now()-l;u.value.compressed[_]||(u.value.compressed[_]={},u.value.decompressed[_]={},u.value.success[_]={},u.value.size[_]={}),u.value.compressed[_][A]=n,u.value.size[_][A]=100*(s.length/d.length),u.value.decompressed[_][A]=i,u.value.success[_][A]=d===f}return P(async()=>{const A=[{name:"json_512kb",input:JSON.stringify((await M).default)},{name:"json_1mb",input:JSON.stringify((await T).default)},{name:"json_4mb",input:JSON.stringify((await E).default)},{name:"json_8mb",input:JSON.stringify((await L).default)}];for(const{name:_,input:d}of A)await y("smol-string",_,d,B,J),await y("LZString",_,d,b.compress,b.decompress),await y("LZString UTF-16",_,d,b.compressToUTF16,b.decompressFromUTF16)}),(A,_)=>(F(),N("div",null,[I(R,{results:u.value},null,8,["results"])]))}});export{z as default}; +import{_ as j,d as x,r as L,g as P,o as F,c as I,e as N,B as R}from"./index-FSP9f0UY.js";const M=new Worker(new URL(""+new URL("/smol-string/assets/worker-DrAYohSc-CMxnHKXp.js",import.meta.url).href,import.meta.url),{type:"module"});let C=0;const S={};M.onmessage=function(v){const u=v.data.id;S[u](v.data.data),delete S[u]};async function J(v){const u=C++;return new Promise(y=>{S[u]=y,M.postMessage({command:"compress",id:u,data:v})})}async function B(v){const u=C++;return new Promise(y=>{S[u]=y,M.postMessage({command:"decompress",id:u,data:v})})}var V=function(){var v=String.fromCharCode,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",A={};function _(t,o){if(!A[t]){A[t]={};for(var a=0;a>>8,a[2*s+1]=c%256}return a},decompressFromUint8Array:function(t){if(t==null)return d.decompress(t);for(var o=new Array(t.length/2),a=0,s=o.length;a>=1}else{for(n=1,s=0;s>=1}--g==0&&(g=Math.pow(2,m),m++),delete f[p]}else for(n=l[p],s=0;s>=1;--g==0&&(g=Math.pow(2,m),m++),l[w]=O++,p=String(i)}if(p!==""){if(Object.prototype.hasOwnProperty.call(f,p)){if(p.charCodeAt(0)<256){for(s=0;s>=1}else{for(n=1,s=0;s>=1}--g==0&&(g=Math.pow(2,m),m++),delete f[p]}else for(n=l[p],s=0;s>=1;--g==0&&(g=Math.pow(2,m),m++)}for(n=2,s=0;s>=1;for(;;){if(r<<=1,e==o-1){h.push(a(r));break}e++}return h.join("")},decompress:function(t){return t==null?"":t==""?null:d._decompress(t.length,32768,function(o){return t.charCodeAt(o)})},_decompress:function(t,o,a){var s,n,c,l,f,i,w,p=[],g=4,O=4,m=3,h="",r=[],e={val:a(0),position:o,index:1};for(s=0;s<3;s+=1)p[s]=s;for(c=0,f=Math.pow(2,2),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;switch(c){case 0:for(c=0,f=Math.pow(2,8),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;w=v(c);break;case 1:for(c=0,f=Math.pow(2,16),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;w=v(c);break;case 2:return""}for(p[3]=w,n=w,r.push(w);;){if(e.index>t)return"";for(c=0,f=Math.pow(2,m),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;switch(w=c){case 0:for(c=0,f=Math.pow(2,8),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;p[O++]=v(c),w=O-1,g--;break;case 1:for(c=0,f=Math.pow(2,16),i=1;i!=f;)l=e.val&e.position,e.position>>=1,e.position==0&&(e.position=o,e.val=a(e.index++)),c|=(l>0?1:0)*i,i<<=1;p[O++]=v(c),w=O-1,g--;break;case 2:return r.join("")}if(g==0&&(g=Math.pow(2,m),m++),p[w])h=p[w];else{if(w!==O)return null;h=n+n.charAt(0)}r.push(h),p[O++]=n+h.charAt(0),n=h,--g==0&&(g=Math.pow(2,m),m++)}}};return d}();const b=V,T=j(()=>import("./512KB-Cmx0pFrj.js"),[]),k=j(()=>import("./1MB-DNCdY0QL.js"),[]),E=j(()=>import("./rw_medium-B8IwR0iT.js"),[]),U=j(()=>import("./rw_large-DP7720Ef.js"),[]);JSON.stringify(await T),JSON.stringify(await k),JSON.stringify(await E),JSON.stringify(await U);const z=x({__name:"LibBenchmark",setup(v){const u=L({compressed:{},decompressed:{},success:{},size:{}});async function y(A,_,d,t,o){const a=performance.now(),s=await t(d),n=performance.now()-a;localStorage.setItem("compressed",s);const c=localStorage.getItem("compressed");localStorage.removeItem("compressed");const l=performance.now(),f=await o(c),i=performance.now()-l;u.value.compressed[_]||(u.value.compressed[_]={},u.value.decompressed[_]={},u.value.success[_]={},u.value.size[_]={}),u.value.compressed[_][A]=n,u.value.size[_][A]=100*(s.length/d.length),u.value.decompressed[_][A]=i,u.value.success[_][A]=d===f}return P(async()=>{const A=[{name:"json_512kb",input:JSON.stringify((await T).default)},{name:"json_1mb",input:JSON.stringify((await k).default)},{name:"json_4mb",input:JSON.stringify((await E).default)},{name:"json_8mb",input:JSON.stringify((await U).default)}];for(const{name:_,input:d}of A)await y("smol-string",_,d,J,B),await y("LZString",_,d,b.compress,b.decompress),await y("LZString UTF-16",_,d,b.compressToUTF16,b.decompressFromUTF16)}),(A,_)=>(F(),I("div",null,[N(R,{results:u.value},null,8,["results"])]))}});export{z as default}; diff --git a/assets/index-M0cLSXB8.js b/assets/index-FSP9f0UY.js similarity index 99% rename from assets/index-M0cLSXB8.js rename to assets/index-FSP9f0UY.js index ee9c5a8..bf8c93f 100644 --- a/assets/index-M0cLSXB8.js +++ b/assets/index-FSP9f0UY.js @@ -49,5 +49,5 @@ const decompressed = decompress(compressed);`})]),rt("p",null,[Kt(" Async versio const input = JSON.stringify({ imagine: "this is a large object" }); const compressed = await compress(input); -const decompressed = await decompress(compressed);`})])])]),rt("section",null,[A0,rt("p",null,[bt(o,{to:"/bench"},{default:ri(()=>[Kt("Run the benchmarks comparing smol-string to lz-string directly in your browser.")]),_:1}),Kt(" (Warning: The page might be unresponsive while the benchmarks are running) ")]),P0,rt("div",T0,[bt(k0,{results:t})])]),L0])}}}),I0=fr(D0,[["__scopeId","data-v-0de936b2"]]),F0=Gg({history:Eg("/smol-string"),routes:[{path:"/",name:"home",component:I0},{path:"/bench",name:"bench",component:()=>op(()=>import("./BenchmarksView-VZLpGupG.js"),[])}]});function N0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jh(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&Jh(n)}),e}class Gl{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function tu(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Ne(e,...t){const n=Object.create(null);for(const s in e)n[s]=e[s];return t.forEach(function(s){for(const i in s)n[i]=s[i]}),n}const B0="",Xl=e=>!!e.scope,H0=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((s,i)=>`${s}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class z0{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=tu(t)}openNode(t){if(!Xl(t))return;const n=H0(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Xl(t)&&(this.buffer+=B0)}value(){return this.buffer}span(t){this.buffer+=``}}const Zl=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Rr{constructor(){this.rootNode=Zl(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Zl({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(s=>this._walk(t,s)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Rr._collapse(n)}))}}class j0 extends Rr{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const s=t.root;n&&(s.scope=`language:${n}`),this.add(s)}toHTML(){return new z0(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ys(e){return e?typeof e=="string"?e:e.source:null}function eu(e){return pn("(?=",e,")")}function W0(e){return pn("(?:",e,")*")}function V0(e){return pn("(?:",e,")?")}function pn(...e){return e.map(n=>ys(n)).join("")}function $0(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ar(...e){return"("+($0(e).capture?"":"?:")+e.map(s=>ys(s)).join("|")+")"}function nu(e){return new RegExp(e.toString()+"|").exec("").length-1}function U0(e,t){const n=e&&e.exec(t);return n&&n.index===0}const K0=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Pr(e,{joinWith:t}){let n=0;return e.map(s=>{n+=1;const i=n;let o=ys(s),r="";for(;o.length>0;){const a=K0.exec(o);if(!a){r+=o;break}r+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?r+="\\"+String(Number(a[1])+i):(r+=a[0],a[0]==="("&&n++)}return r}).map(s=>`(${s})`).join(t)}const Y0=/\b\B/,su="[a-zA-Z]\\w*",Tr="[a-zA-Z_]\\w*",iu="\\b\\d+(\\.\\d+)?",ou="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ru="\\b(0b[01]+)",G0="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X0=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=pn(t,/.*\b/,e.binary,/\b.*/)),Ne({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,s)=>{n.index!==0&&s.ignoreMatch()}},e)},vs={begin:"\\\\[\\s\\S]",relevance:0},Z0={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[vs]},q0={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[vs]},Q0={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bi=function(e,t,n={}){const s=Ne({scope:"comment",begin:e,end:t,contains:[]},n);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Ar("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:pn(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},J0=Bi("//","$"),tx=Bi("/\\*","\\*/"),ex=Bi("#","$"),nx={scope:"number",begin:iu,relevance:0},sx={scope:"number",begin:ou,relevance:0},ix={scope:"number",begin:ru,relevance:0},ox={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[vs,{begin:/\[/,end:/\]/,relevance:0,contains:[vs]}]},rx={scope:"title",begin:su,relevance:0},ax={scope:"title",begin:Tr,relevance:0},lx={begin:"\\.\\s*"+Tr,relevance:0},cx=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Gs=Object.freeze({__proto__:null,APOS_STRING_MODE:Z0,BACKSLASH_ESCAPE:vs,BINARY_NUMBER_MODE:ix,BINARY_NUMBER_RE:ru,COMMENT:Bi,C_BLOCK_COMMENT_MODE:tx,C_LINE_COMMENT_MODE:J0,C_NUMBER_MODE:sx,C_NUMBER_RE:ou,END_SAME_AS_BEGIN:cx,HASH_COMMENT_MODE:ex,IDENT_RE:su,MATCH_NOTHING_RE:Y0,METHOD_GUARD:lx,NUMBER_MODE:nx,NUMBER_RE:iu,PHRASAL_WORDS_MODE:Q0,QUOTE_STRING_MODE:q0,REGEXP_MODE:ox,RE_STARTERS_RE:G0,SHEBANG:X0,TITLE_MODE:rx,UNDERSCORE_IDENT_RE:Tr,UNDERSCORE_TITLE_MODE:ax});function hx(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ux(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function fx(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=hx,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function dx(e,t){Array.isArray(e.illegal)&&(e.illegal=Ar(...e.illegal))}function gx(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function px(e,t){e.relevance===void 0&&(e.relevance=1)}const mx=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=n.keywords,e.begin=pn(n.beforeMatch,eu(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},bx=["of","and","for","in","not","or","if","then","parent","list","value"],_x="keyword";function au(e,t,n=_x){const s=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(s,au(e[o],t,o))}),s;function i(o,r){t&&(r=r.map(a=>a.toLowerCase())),r.forEach(function(a){const l=a.split("|");s[l[0]]=[o,xx(l[0],l[1])]})}}function xx(e,t){return t?Number(t):yx(e)?0:1}function yx(e){return bx.includes(e.toLowerCase())}const ql={},ln=e=>{console.error(e)},Ql=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_n=(e,t)=>{ql[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ql[`${e}/${t}`]=!0)},_i=new Error;function lu(e,t,{key:n}){let s=0;const i=e[n],o={},r={};for(let a=1;a<=t.length;a++)r[a+s]=i[a],o[a+s]=!0,s+=nu(t[a-1]);e[n]=r,e[n]._emit=o,e[n]._multi=!0}function vx(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ln("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),_i;if(typeof e.beginScope!="object"||e.beginScope===null)throw ln("beginScope must be object"),_i;lu(e,e.begin,{key:"beginScope"}),e.begin=Pr(e.begin,{joinWith:""})}}function wx(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ln("skip, excludeEnd, returnEnd not compatible with endScope: {}"),_i;if(typeof e.endScope!="object"||e.endScope===null)throw ln("endScope must be object"),_i;lu(e,e.end,{key:"endScope"}),e.end=Pr(e.end,{joinWith:""})}}function Sx(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Mx(e){Sx(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),vx(e),wx(e)}function Ex(e){function t(r,a){return new RegExp(ys(r),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=nu(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(Pr(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((u,f)=>f>0&&u!==void 0),h=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,h)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([c,h])=>l.addRule(c,h)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,c=h.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(r){const a=new s;return r.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),r.terminatorEnd&&a.addRule(r.terminatorEnd,{type:"end"}),r.illegal&&a.addRule(r.illegal,{type:"illegal"}),a}function o(r,a){const l=r;if(r.isCompiled)return l;[ux,gx,Mx,mx].forEach(h=>h(r,a)),e.compilerExtensions.forEach(h=>h(r,a)),r.__beforeBegin=null,[fx,dx,px].forEach(h=>h(r,a)),r.isCompiled=!0;let c=null;return typeof r.keywords=="object"&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),c=r.keywords.$pattern,delete r.keywords.$pattern),c=c||/\w+/,r.keywords&&(r.keywords=au(r.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(r.begin||(r.begin=/\B|\b/),l.beginRe=t(l.begin),!r.end&&!r.endsWithParent&&(r.end=/\B|\b/),r.end&&(l.endRe=t(l.end)),l.terminatorEnd=ys(l.end)||"",r.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(r.end?"|":"")+a.terminatorEnd)),r.illegal&&(l.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map(function(h){return kx(h==="self"?r:h)})),r.contains.forEach(function(h){o(h,l)}),r.starts&&o(r.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ne(e.classNameAliases||{}),o(e)}function cu(e){return e?e.endsWithParent||cu(e.starts):!1}function kx(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ne(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:cu(e)?Ne(e,{starts:e.starts?Ne(e.starts):null}):Object.isFrozen(e)?Ne(e):e}var Ox="11.9.0";class Cx extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const co=tu,Jl=Ne,tc=Symbol("nomatch"),Rx=7,hu=function(e){const t=Object.create(null),n=Object.create(null),s=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",r={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:j0};function l(w){return a.noHighlightRe.test(w)}function c(w){let L=w.className+" ";L+=w.parentNode?w.parentNode.className:"";const G=a.languageDetectRe.exec(L);if(G){const Q=W(G[1]);return Q||(Ql(o.replace("{}",G[1])),Ql("Falling back to no-highlight mode for this block.",w)),Q?G[1]:"no-highlight"}return L.split(/\s+/).find(Q=>l(Q)||W(Q))}function h(w,L,G){let Q="",ot="";typeof L=="object"?(Q=w,G=L.ignoreIllegals,ot=L.language):(_n("10.7.0","highlight(lang, code, ...args) has been deprecated."),_n("10.7.0",`Please use highlight(code, options) instead. +const decompressed = await decompress(compressed);`})])])]),rt("section",null,[A0,rt("p",null,[bt(o,{to:"/bench"},{default:ri(()=>[Kt("Run the benchmarks comparing smol-string to lz-string directly in your browser.")]),_:1}),Kt(" (Warning: The page might be unresponsive while the benchmarks are running) ")]),P0,rt("div",T0,[bt(k0,{results:t})])]),L0])}}}),I0=fr(D0,[["__scopeId","data-v-0de936b2"]]),F0=Gg({history:Eg("/smol-string"),routes:[{path:"/",name:"home",component:I0},{path:"/bench",name:"bench",component:()=>op(()=>import("./BenchmarksView-DOu0ULpr.js"),[])}]});function N0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jh(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&Jh(n)}),e}class Gl{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function tu(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Ne(e,...t){const n=Object.create(null);for(const s in e)n[s]=e[s];return t.forEach(function(s){for(const i in s)n[i]=s[i]}),n}const B0="",Xl=e=>!!e.scope,H0=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((s,i)=>`${s}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class z0{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=tu(t)}openNode(t){if(!Xl(t))return;const n=H0(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Xl(t)&&(this.buffer+=B0)}value(){return this.buffer}span(t){this.buffer+=``}}const Zl=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Rr{constructor(){this.rootNode=Zl(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Zl({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(s=>this._walk(t,s)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Rr._collapse(n)}))}}class j0 extends Rr{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const s=t.root;n&&(s.scope=`language:${n}`),this.add(s)}toHTML(){return new z0(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function ys(e){return e?typeof e=="string"?e:e.source:null}function eu(e){return pn("(?=",e,")")}function W0(e){return pn("(?:",e,")*")}function V0(e){return pn("(?:",e,")?")}function pn(...e){return e.map(n=>ys(n)).join("")}function $0(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ar(...e){return"("+($0(e).capture?"":"?:")+e.map(s=>ys(s)).join("|")+")"}function nu(e){return new RegExp(e.toString()+"|").exec("").length-1}function U0(e,t){const n=e&&e.exec(t);return n&&n.index===0}const K0=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Pr(e,{joinWith:t}){let n=0;return e.map(s=>{n+=1;const i=n;let o=ys(s),r="";for(;o.length>0;){const a=K0.exec(o);if(!a){r+=o;break}r+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?r+="\\"+String(Number(a[1])+i):(r+=a[0],a[0]==="("&&n++)}return r}).map(s=>`(${s})`).join(t)}const Y0=/\b\B/,su="[a-zA-Z]\\w*",Tr="[a-zA-Z_]\\w*",iu="\\b\\d+(\\.\\d+)?",ou="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ru="\\b(0b[01]+)",G0="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X0=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=pn(t,/.*\b/,e.binary,/\b.*/)),Ne({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,s)=>{n.index!==0&&s.ignoreMatch()}},e)},vs={begin:"\\\\[\\s\\S]",relevance:0},Z0={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[vs]},q0={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[vs]},Q0={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bi=function(e,t,n={}){const s=Ne({scope:"comment",begin:e,end:t,contains:[]},n);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=Ar("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:pn(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},J0=Bi("//","$"),tx=Bi("/\\*","\\*/"),ex=Bi("#","$"),nx={scope:"number",begin:iu,relevance:0},sx={scope:"number",begin:ou,relevance:0},ix={scope:"number",begin:ru,relevance:0},ox={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[vs,{begin:/\[/,end:/\]/,relevance:0,contains:[vs]}]},rx={scope:"title",begin:su,relevance:0},ax={scope:"title",begin:Tr,relevance:0},lx={begin:"\\.\\s*"+Tr,relevance:0},cx=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Gs=Object.freeze({__proto__:null,APOS_STRING_MODE:Z0,BACKSLASH_ESCAPE:vs,BINARY_NUMBER_MODE:ix,BINARY_NUMBER_RE:ru,COMMENT:Bi,C_BLOCK_COMMENT_MODE:tx,C_LINE_COMMENT_MODE:J0,C_NUMBER_MODE:sx,C_NUMBER_RE:ou,END_SAME_AS_BEGIN:cx,HASH_COMMENT_MODE:ex,IDENT_RE:su,MATCH_NOTHING_RE:Y0,METHOD_GUARD:lx,NUMBER_MODE:nx,NUMBER_RE:iu,PHRASAL_WORDS_MODE:Q0,QUOTE_STRING_MODE:q0,REGEXP_MODE:ox,RE_STARTERS_RE:G0,SHEBANG:X0,TITLE_MODE:rx,UNDERSCORE_IDENT_RE:Tr,UNDERSCORE_TITLE_MODE:ax});function hx(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ux(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function fx(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=hx,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function dx(e,t){Array.isArray(e.illegal)&&(e.illegal=Ar(...e.illegal))}function gx(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function px(e,t){e.relevance===void 0&&(e.relevance=1)}const mx=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=n.keywords,e.begin=pn(n.beforeMatch,eu(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},bx=["of","and","for","in","not","or","if","then","parent","list","value"],_x="keyword";function au(e,t,n=_x){const s=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(o){Object.assign(s,au(e[o],t,o))}),s;function i(o,r){t&&(r=r.map(a=>a.toLowerCase())),r.forEach(function(a){const l=a.split("|");s[l[0]]=[o,xx(l[0],l[1])]})}}function xx(e,t){return t?Number(t):yx(e)?0:1}function yx(e){return bx.includes(e.toLowerCase())}const ql={},ln=e=>{console.error(e)},Ql=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_n=(e,t)=>{ql[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ql[`${e}/${t}`]=!0)},_i=new Error;function lu(e,t,{key:n}){let s=0;const i=e[n],o={},r={};for(let a=1;a<=t.length;a++)r[a+s]=i[a],o[a+s]=!0,s+=nu(t[a-1]);e[n]=r,e[n]._emit=o,e[n]._multi=!0}function vx(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw ln("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),_i;if(typeof e.beginScope!="object"||e.beginScope===null)throw ln("beginScope must be object"),_i;lu(e,e.begin,{key:"beginScope"}),e.begin=Pr(e.begin,{joinWith:""})}}function wx(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw ln("skip, excludeEnd, returnEnd not compatible with endScope: {}"),_i;if(typeof e.endScope!="object"||e.endScope===null)throw ln("endScope must be object"),_i;lu(e,e.end,{key:"endScope"}),e.end=Pr(e.end,{joinWith:""})}}function Sx(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Mx(e){Sx(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),vx(e),wx(e)}function Ex(e){function t(r,a){return new RegExp(ys(r),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=nu(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(Pr(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((u,f)=>f>0&&u!==void 0),h=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,h)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([c,h])=>l.addRule(c,h)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,c=h.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(r){const a=new s;return r.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),r.terminatorEnd&&a.addRule(r.terminatorEnd,{type:"end"}),r.illegal&&a.addRule(r.illegal,{type:"illegal"}),a}function o(r,a){const l=r;if(r.isCompiled)return l;[ux,gx,Mx,mx].forEach(h=>h(r,a)),e.compilerExtensions.forEach(h=>h(r,a)),r.__beforeBegin=null,[fx,dx,px].forEach(h=>h(r,a)),r.isCompiled=!0;let c=null;return typeof r.keywords=="object"&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),c=r.keywords.$pattern,delete r.keywords.$pattern),c=c||/\w+/,r.keywords&&(r.keywords=au(r.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(r.begin||(r.begin=/\B|\b/),l.beginRe=t(l.begin),!r.end&&!r.endsWithParent&&(r.end=/\B|\b/),r.end&&(l.endRe=t(l.end)),l.terminatorEnd=ys(l.end)||"",r.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(r.end?"|":"")+a.terminatorEnd)),r.illegal&&(l.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map(function(h){return kx(h==="self"?r:h)})),r.contains.forEach(function(h){o(h,l)}),r.starts&&o(r.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ne(e.classNameAliases||{}),o(e)}function cu(e){return e?e.endsWithParent||cu(e.starts):!1}function kx(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ne(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:cu(e)?Ne(e,{starts:e.starts?Ne(e.starts):null}):Object.isFrozen(e)?Ne(e):e}var Ox="11.9.0";class Cx extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const co=tu,Jl=Ne,tc=Symbol("nomatch"),Rx=7,hu=function(e){const t=Object.create(null),n=Object.create(null),s=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",r={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:j0};function l(w){return a.noHighlightRe.test(w)}function c(w){let L=w.className+" ";L+=w.parentNode?w.parentNode.className:"";const G=a.languageDetectRe.exec(L);if(G){const Q=W(G[1]);return Q||(Ql(o.replace("{}",G[1])),Ql("Falling back to no-highlight mode for this block.",w)),Q?G[1]:"no-highlight"}return L.split(/\s+/).find(Q=>l(Q)||W(Q))}function h(w,L,G){let Q="",ot="";typeof L=="object"?(Q=w,G=L.ignoreIllegals,ot=L.language):(_n("10.7.0","highlight(lang, code, ...args) has been deprecated."),_n("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),ot=w,Q=L),G===void 0&&(G=!0);const at={code:Q,language:ot};it("before:highlight",at);const St=at.result?at.result:u(at.language,at.code,G);return St.code=at.code,it("after:highlight",St),St}function u(w,L,G,Q){const ot=Object.create(null);function at(P,N){return P.keywords[N]}function St(){if(!R.keywords){D.addText(k);return}let P=0;R.keywordPatternRe.lastIndex=0;let N=R.keywordPatternRe.exec(k),$="";for(;N;){$+=k.substring(P,N.index);const tt=O.case_insensitive?N[0].toLowerCase():N[0],_t=at(R,tt);if(_t){const[Nt,Cs]=_t;if(D.addText($),$="",ot[tt]=(ot[tt]||0)+1,ot[tt]<=Rx&&(j+=Cs),Nt.startsWith("_"))$+=N[0];else{const Ye=O.classNameAliases[Nt]||Nt;lt(N[0],Ye)}}else $+=N[0];P=R.keywordPatternRe.lastIndex,N=R.keywordPatternRe.exec(k)}$+=k.substring(P),D.addText($)}function At(){if(k==="")return;let P=null;if(typeof R.subLanguage=="string"){if(!t[R.subLanguage]){D.addText(k);return}P=u(R.subLanguage,k,!0,I[R.subLanguage]),I[R.subLanguage]=P._top}else P=d(k,R.subLanguage.length?R.subLanguage:null);R.relevance>0&&(j+=P.relevance),D.__addSublanguage(P._emitter,P.language)}function Mt(){R.subLanguage!=null?At():St(),k=""}function lt(P,N){P!==""&&(D.startScope(N),D.addText(P),D.endScope())}function A(P,N){let $=1;const tt=N.length-1;for(;$<=tt;){if(!P._emit[$]){$++;continue}const _t=O.classNameAliases[P[$]]||P[$],Nt=N[$];_t?lt(Nt,_t):(k=Nt,St(),k=""),$++}}function V(P,N){return P.scope&&typeof P.scope=="string"&&D.openNode(O.classNameAliases[P.scope]||P.scope),P.beginScope&&(P.beginScope._wrap?(lt(k,O.classNameAliases[P.beginScope._wrap]||P.beginScope._wrap),k=""):P.beginScope._multi&&(A(P.beginScope,N),k="")),R=Object.create(P,{parent:{value:R}}),R}function z(P,N,$){let tt=U0(P.endRe,$);if(tt){if(P["on:end"]){const _t=new Gl(P);P["on:end"](N,_t),_t.isMatchIgnored&&(tt=!1)}if(tt){for(;P.endsParent&&P.parent;)P=P.parent;return P}}if(P.endsWithParent)return z(P.parent,N,$)}function U(P){return R.matcher.regexIndex===0?(k+=P[0],1):(J=!0,0)}function dt(P){const N=P[0],$=P.rule,tt=new Gl($),_t=[$.__beforeBegin,$["on:begin"]];for(const Nt of _t)if(Nt&&(Nt(P,tt),tt.isMatchIgnored))return U(N);return $.skip?k+=N:($.excludeBegin&&(k+=N),Mt(),!$.returnBegin&&!$.excludeBegin&&(k=N)),V($,P),$.returnBegin?0:N.length}function wt(P){const N=P[0],$=L.substring(P.index),tt=z(R,P,$);if(!tt)return tc;const _t=R;R.endScope&&R.endScope._wrap?(Mt(),lt(N,R.endScope._wrap)):R.endScope&&R.endScope._multi?(Mt(),A(R.endScope,P)):_t.skip?k+=N:(_t.returnEnd||_t.excludeEnd||(k+=N),Mt(),_t.excludeEnd&&(k=N));do R.scope&&D.closeNode(),!R.skip&&!R.subLanguage&&(j+=R.relevance),R=R.parent;while(R!==tt.parent);return tt.starts&&V(tt.starts,P),_t.returnEnd?0:N.length}function p(){const P=[];for(let N=R;N!==O;N=N.parent)N.scope&&P.unshift(N.scope);P.forEach(N=>D.openNode(N))}let b={};function v(P,N){const $=N&&N[0];if(k+=P,$==null)return Mt(),0;if(b.type==="begin"&&N.type==="end"&&b.index===N.index&&$===""){if(k+=L.slice(N.index,N.index+1),!i){const tt=new Error(`0 width match regex (${w})`);throw tt.languageName=w,tt.badRule=b.rule,tt}return 1}if(b=N,N.type==="begin")return dt(N);if(N.type==="illegal"&&!G){const tt=new Error('Illegal lexeme "'+$+'" for mode "'+(R.scope||"")+'"');throw tt.mode=R,tt}else if(N.type==="end"){const tt=wt(N);if(tt!==tc)return tt}if(N.type==="illegal"&&$==="")return 1;if(Y>1e5&&Y>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return k+=$,$.length}const O=W(w);if(!O)throw ln(o.replace("{}",w)),new Error('Unknown language: "'+w+'"');const C=Ex(O);let F="",R=Q||C;const I={},D=new a.__emitter(a);p();let k="",j=0,K=0,Y=0,J=!1;try{if(O.__emitTokens)O.__emitTokens(L,D);else{for(R.matcher.considerAll();;){Y++,J?J=!1:R.matcher.considerAll(),R.matcher.lastIndex=K;const P=R.matcher.exec(L);if(!P)break;const N=L.substring(K,P.index),$=v(N,P);K=P.index+$}v(L.substring(K))}return D.finalize(),F=D.toHTML(),{language:w,value:F,relevance:j,illegal:!1,_emitter:D,_top:R}}catch(P){if(P.message&&P.message.includes("Illegal"))return{language:w,value:co(L),illegal:!0,relevance:0,_illegalBy:{message:P.message,index:K,context:L.slice(K-100,K+100),mode:P.mode,resultSoFar:F},_emitter:D};if(i)return{language:w,value:co(L),illegal:!1,relevance:0,errorRaised:P,_emitter:D,_top:R};throw P}}function f(w){const L={value:co(w),illegal:!1,relevance:0,_top:r,_emitter:new a.__emitter(a)};return L._emitter.addText(w),L}function d(w,L){L=L||a.languages||Object.keys(t);const G=f(w),Q=L.filter(W).filter(Z).map(Mt=>u(Mt,w,!1));Q.unshift(G);const ot=Q.sort((Mt,lt)=>{if(Mt.relevance!==lt.relevance)return lt.relevance-Mt.relevance;if(Mt.language&<.language){if(W(Mt.language).supersetOf===lt.language)return 1;if(W(lt.language).supersetOf===Mt.language)return-1}return 0}),[at,St]=ot,At=at;return At.secondBest=St,At}function g(w,L,G){const Q=L&&n[L]||G;w.classList.add("hljs"),w.classList.add(`language-${Q}`)}function m(w){let L=null;const G=c(w);if(l(G))return;if(it("before:highlightElement",{el:w,language:G}),w.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",w);return}if(w.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(w)),a.throwUnescapedHTML))throw new Cx("One of your code blocks includes unescaped HTML.",w.innerHTML);L=w;const Q=L.textContent,ot=G?h(Q,{language:G,ignoreIllegals:!0}):d(Q);w.innerHTML=ot.value,w.dataset.highlighted="yes",g(w,G,ot.language),w.result={language:ot.language,re:ot.relevance,relevance:ot.relevance},ot.secondBest&&(w.secondBest={language:ot.secondBest.language,relevance:ot.secondBest.relevance}),it("after:highlightElement",{el:w,result:ot,text:Q})}function _(w){a=Jl(a,w)}const x=()=>{T(),_n("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){T(),_n("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let M=!1;function T(){if(document.readyState==="loading"){M=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function S(){M&&T()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",S,!1);function E(w,L){let G=null;try{G=L(e)}catch(Q){if(ln("Language definition for '{}' could not be registered.".replace("{}",w)),i)ln(Q);else throw Q;G=r}G.name||(G.name=w),t[w]=G,G.rawDefinition=L.bind(null,e),G.aliases&&X(G.aliases,{languageName:w})}function B(w){delete t[w];for(const L of Object.keys(n))n[L]===w&&delete n[L]}function H(){return Object.keys(t)}function W(w){return w=(w||"").toLowerCase(),t[w]||t[n[w]]}function X(w,{languageName:L}){typeof w=="string"&&(w=[w]),w.forEach(G=>{n[G.toLowerCase()]=L})}function Z(w){const L=W(w);return L&&!L.disableAutodetect}function q(w){w["before:highlightBlock"]&&!w["before:highlightElement"]&&(w["before:highlightElement"]=L=>{w["before:highlightBlock"](Object.assign({block:L.el},L))}),w["after:highlightBlock"]&&!w["after:highlightElement"]&&(w["after:highlightElement"]=L=>{w["after:highlightBlock"](Object.assign({block:L.el},L))})}function ct(w){q(w),s.push(w)}function yt(w){const L=s.indexOf(w);L!==-1&&s.splice(L,1)}function it(w,L){const G=w;s.forEach(function(Q){Q[G]&&Q[G](L)})}function et(w){return _n("10.7.0","highlightBlock will be removed entirely in v12.0"),_n("10.7.0","Please use highlightElement now."),m(w)}Object.assign(e,{highlight:h,highlightAuto:d,highlightAll:T,highlightElement:m,highlightBlock:et,configure:_,initHighlighting:x,initHighlightingOnLoad:y,registerLanguage:E,unregisterLanguage:B,listLanguages:H,getLanguage:W,registerAliases:X,autoDetection:Z,inherit:Jl,addPlugin:ct,removePlugin:yt}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Ox,e.regex={concat:pn,lookahead:eu,either:Ar,optional:V0,anyNumberOfTimes:W0};for(const w in Gs)typeof Gs[w]=="object"&&Jh(Gs[w]);return Object.assign(e,Gs),e},Dn=hu({});Dn.newInstance=()=>hu({});var Ax=Dn;Dn.HighlightJS=Dn;Dn.default=Dn;const rs=N0(Ax),xi="[A-Za-z$_][0-9A-Za-z$_]*",uu=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],fu=["true","false","null","undefined","NaN","Infinity"],du=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gu=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],pu=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],mu=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],bu=[].concat(pu,du,gu);function Px(e){const t=e.regex,n=(L,{after:G})=>{const Q="",end:""},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(L,G)=>{const Q=L[0].length+L.index,ot=L.input[Q];if(ot==="<"||ot===","){G.ignoreMatch();return}ot===">"&&(n(L,{after:Q})||G.ignoreMatch());let at;const St=L.input.substring(Q);if(at=St.match(/^\s*=/)){G.ignoreMatch();return}if((at=St.match(/^\s+extends\s+/))&&at.index===0){G.ignoreMatch();return}}},a={$pattern:xi,keyword:uu,literal:fu,built_in:bu,"variable.language":mu},l="[0-9](_?[0-9])*",c=`\\.(${l})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${h})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${h})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},M=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,m,_,{match:/\$\d+/},u];f.contains=M.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(M)});const T=[].concat(y,f.contains),S=T.concat([{begin:/\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),E={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S},B={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},H={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...du,...gu]}},W={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},X={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(L){return t.concat("(?!",L.join("|"),")")}const ct={match:t.concat(/\b/,q([...pu,"super","import"]),s,t.lookahead(/\(/)),className:"title.function",relevance:0},yt={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},it={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},et="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",w={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(et)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),W,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,m,_,y,{match:/\$\d+/},u,H,{className:"attr",begin:s+t.lookahead(":"),relevance:0},w,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:et,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:o},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},X,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},yt,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},ct,Z,B,it,{match:/\$[(.]/}]}}function Tx(e){const t=Px(e),n=xi,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[t.exports.CLASS_REFERENCE]},r={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"],l={$pattern:xi,keyword:uu.concat(a),literal:fu,built_in:bu.concat(s),"variable.language":mu},c={className:"meta",begin:"@"+n},h=(f,d,g)=>{const m=f.contains.findIndex(_=>_.label===d);if(m===-1)throw new Error("can not find mode to replace");f.contains.splice(m,1,g)};Object.assign(t.keywords,l),t.exports.PARAMS_CONTAINS.push(c),t.contains=t.contains.concat([c,i,o]),h(t,"shebang",e.SHEBANG()),h(t,"use_strict",r);const u=t.contains.find(f=>f.label==="func.def");return u.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function Lx(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}var ec=Ee({props:{code:{type:String,required:!0},language:{type:String,default:""},autodetect:{type:Boolean,default:!0},ignoreIllegals:{type:Boolean,default:!0}},setup:function(e){var t=on(e.language);kn(function(){return e.language},function(i){t.value=i});var n=Tt(function(){return e.autodetect||!t.value}),s=Tt(function(){return!n.value&&!rs.getLanguage(t.value)});return{className:Tt(function(){return s.value?"":"hljs "+t.value}),highlightedCode:Tt(function(){var i;if(s.value)return console.warn('The language "'+t.value+'" you specified could not be found.'),e.code.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");if(n.value){var o=rs.highlightAuto(e.code);return t.value=(i=o.language)!==null&&i!==void 0?i:"",o.value}return(o=rs.highlight(e.code,{language:t.value,ignoreIllegals:e.ignoreIllegals})).value})}},render:function(){return hn("pre",{},[hn("code",{class:this.className,innerHTML:this.highlightedCode})])}}),Dx={install:function(e){e.component("highlightjs",ec)},component:ec};const Hi=jd(np);Hi.use(Kd());Hi.use(F0);rs.registerLanguage("typescript",Tx);rs.registerLanguage("shell",Lx);Hi.use(Dx);Hi.mount("#app");export{k0 as B,Ix as S,op as _,Nx as a,rt as b,ar as c,Ee as d,bt as e,Fx as f,Lc as g,Ti as o,on as r,Qt as u,ri as w}; diff --git a/assets/worker-CxX4GLHA-DGNBd0kf.js b/assets/worker-CxX4GLHA-DGNBd0kf.js deleted file mode 100644 index fac3d20..0000000 --- a/assets/worker-CxX4GLHA-DGNBd0kf.js +++ /dev/null @@ -1,91 +0,0 @@ -function e(A, C) { - const I = new TextEncoder().encode(A), g = C.allocUint8(I.length); - return new Uint8Array( - C.memory.buffer, - g, - I.length - ).set(I), { ptr: g, length: I.length }; -} -function h(A) { - const C = new Array(A.length); - for (let I = 0; I < A.length; I++) - C[I] = String.fromCharCode(A[I]); - return C.join(""); -} -function w(A, C) { - const I = new Uint32Array( - A.buffer.slice(C, C + 8) - ), g = I.at(0), Q = I.at(1); - return { - start: C - g, - end: C, - capacity: Q - }; -} -var r = async (A = {}, C) => { - let I; - if (C.startsWith("data:")) { - const g = C.replace(/^data:.*?base64,/, ""); - let Q; - if (typeof Buffer == "function" && typeof Buffer.from == "function") - Q = Buffer.from(g, "base64"); - else if (typeof atob == "function") { - const E = atob(g); - Q = new Uint8Array(E.length); - for (let i = 0; i < E.length; i++) - Q[i] = E.charCodeAt(i); - } else - throw new Error( - "Failed to decode base64-encoded data URL, Buffer and atob are not supported" - ); - I = await WebAssembly.instantiate(Q, A); - } else { - const g = await fetch(C), Q = g.headers.get("Content-Type") || ""; - if ("instantiateStreaming" in WebAssembly && Q.startsWith("application/wasm")) - I = await WebAssembly.instantiateStreaming(g, A); - else { - const E = await g.arrayBuffer(); - I = await WebAssembly.instantiate(E, A); - } - } - return I.instance; -}, y = (A) => r(A, "data:application/wasm;base64,AGFzbQEAAAABVg1gBX9/f39/AGAEf39/fwF/YAN/f38AYAJ/fwF/YAZ/f39/f38Bf2ACf38AYAF/AX9gAn9/AX5gAn5+AX5gBH9/fn4AYAN/f38Bf2AEf39/fwBgAX8AAx4dAgIHCAkBBQMDAgICAwMKCwUCAQQADAEBAgMGBgUEBQFwAQQEBQMBABEGCQF/AUGAgMAACwdEBgZtZW1vcnkCAAhjb21wcmVzcwAHCmRlY29tcHJlc3MAFgphbGxvY1VpbnQ4ABoLYWxsb2NVaW50MTYAGwRmcmVlABwJCQEAQQELAxITFAwBAgrBPB01AgF/AX4gAkECdCIDBEAgACkCACIEpyABQarVqtV6IAIbIANBAkEAIARCIIinKAIIEQAACws1AgF/AX4gAkEDdCIDBEAgACkCACIEpyABQarVqtV6IAIbIANBAkEAIARCIIinKAIIEQAACwvtCgILfgN/IwBBQGoiDSQAAn4gAUEgTQRAIAFBEUkEQCABrSECIAFBCE8EQCACQgGGQrH/voPNuKWP5QB9IgIgACABakEIaykAACIDIAApAABCsf++g824pY/lAH0iBUIniXx+IQQgAiACIAQgA0IbiSACfiAFfIUgAn4i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gBSAHQQFqIgNB//8DcSIHIAUgB0sbOwEAIAsgCSADEAIiFadxIQQDQCAEIAhqIgUtAABBAXEEQCAJIAMgDCAEQQN0aiIFKAIAIAUoAgQQBRogBEEBaiALcSEEDAELCyAFIBVCOIinQQFyOgAAIAwgBEEDdGoiBSADNgIEIAUgCTYCACAKIARBAnRqIgNBAmogDkGAgDxxQRB2OgAAIAMgDjsBACAOQQFqIQ4MAgtBACEEIAhBACAG/AsAA0AgBEGABEcEQCACQTBqIARqQQE7AQAgBEECaiEEDAELCyACQbAEakH//z8QBiACQQA2AsgEIAJBCToAzARBgAIhDgwBCwsgAkGwBGogACAPai0AABAGCyANIAogBhAAIA0gDCAGEAEgBgRAIA0pAgAiFacgCCAGQQBBACAVQiCIpygCCBEAAAsLQX8hBCACQbAEaiACKAK0BCIAQQJqEAhB//8DcQ0AIAIoArAEIgMgAigCtARBA3RqIgUgAjUCxAQgAa1CIIaENwMAIAVBCGogAEEDdEEIaiIArSACNQK4BEIjhoQ3AwAgACADaiEECyACQYAFaiQAIAQLHgECfyABIAAoAggiA0sEfyAAIAMgARANEAwFQQALC0wCAX8BfiMAQRBrIgMkACAAIAIEfiABKQIAIgSnIAJBAEEAIARCIIinKAIAEQEAIgGtIAFFrUIghoQFQv////8PCzcCACADQRBqJAALUAEBfiACRQRAIABC/P///w83AgAPCyABKQIAIgOnIAJBAkEAIANCIIinKAIAEQEAIgFFBEAgAEKAgICAEDcCAA8LIAAgATYCACAAQQA7AQQLWgEBfyMAQSBrIgMkACADIAJB/////wNLOgAcIAAgAkGAgICABE8EfkKAgICAEAUgAyABKQIANwMIIANBEGogA0EIaiACQQJ0EAogAykDEAs3AgAgA0EgaiQAC7ACAgF+Bn8jAEEQayIFJAACQCAAKAIIIgQgAU8NACAAKAIAIQgCQCAERQ0AIAUgAUH/////AUs6AAggAUGAgICAAk8NACAAKQIMIgKnIAggBEEDdEEDIAFBA3RBACACQiCIpygCBBEEAEEBcUUNACAAIAE2AggMAQsgACkCDC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EAAEIQhoQgACAGQQN0aiIHQQhqKQMAQQAgBWtBP3GtiIMgBykDACAOQQJ0QZSAwABqIgczAQAgB0ECajEAAEIQhoSDIAVBP3GthoQhEUEBIQcLIAggEaciCjsBACAIQQJqIApB//8/cSIKQRB2OgAAQQAgCUEBaiAKQf//P0YiChshCUEJIAEgChshASAMQQFqIQwgCEEEaiEIIAYgB2ohBgwACwALQX8hAQsgBEHgAGokACABC30CAn8BfiMAQRBrIgQkAAJAIANFBEAgBCAAKQIANwMAIAQgASACEABBASEFDAELIAJFDQAgBCADQf////8DSzoADCADQYCAgIAETw0AIAApAgAiBqcgASACQQJ0QQIgA0ECdEEAIAZCIIinKAIEEQQAIQULIARBEGokACAFC34BAX8jAEEwayIDJAAgAyABKQIANwMIIANBEGogA0EIaiACEAsgAAJ/IAMvARQiAQRAIAMgATsBICADQRhqDAELIANBADsBLCADIAI2AiggAyADKAIQNgIkIANBJGoLIgIpAgA3AgAgAEEIaiACQQhqKAIANgIAIANBMGokAAvfAQIHfwF+IwBBIGsiAiQAAkAgACgCCCIDIAFPDQAgAEEMaiEFIAAoAgAhBgJAIANFDQAgBSkCACIJpyAGIANBACABQQAgCUIgiKcoAgQRBABBAXFFDQAgACABNgIIDAELIAIgBSkCADcDECACQRhqIAJBEGogARAJIAIvARwiBARAIAQhBwwBCyACKAIYIQQgACgCBCIIBEAgBCAAKAIAIAj8CgAACyADBEAgBSkCACIJpyAGIANBAEEAIAlCIIinKAIIEQAACyAAIAE2AgggACAENgIACyACQSBqJAAgBws8AQF/IwBBEGsiASQAIAFB6IDAACkDADcDACABQQhqIAEgABAJIAEvAQxFBEAgASgCCCABQRBqJAAPCwALYwICfwF+IwBBEGsiASQAIAEgAEEASCICOgAMAkAgAg0AAkAgAEEBdCIARQRAQX4hAAwBC0HogMAAKQMAIgOnIABBAUEAIANCIIinKAIAEQEAIgBFDQELIAFBEGokACAADwsACygBAX4gAQRAQeiAwAApAgAiAqcgACABQQBBACACQiCIpygCCBEAAAsLC4QBAgBBgIDAAAtvAQAAAAIAAAADAAAAeAAQABAAAAAAAAAAAQAAAAMAAAAHAAAADwAAAB8AAAA/AAAAfwAAAP8AAAD/AQAA/wMAAP8HAAD/DwAA/x8AAP8/AAD/fwAA//8AAP//AQD//wMA//8HAP//DwAAAAAAAAAQAEHwgMAACwSqqqqq"); -const f = await y(), B = f.exports; -function F(A) { - const { ptr: C, length: I } = e(A, B), g = B.compress(C, I); - if (B.free(C, I), g < 0) throw new Error("Error compressing string."); - const { start: Q, end: E, capacity: i } = w(B.memory, g), a = new Uint16Array(B.memory.buffer.slice(Q, E)), o = h(a); - return B.free(Q, i), o; -} -function c(A) { - const C = (A.charCodeAt(A.length - 3) << 16) + A.charCodeAt(A.length - 4), I = (A.charCodeAt(A.length - 1) << 16) + A.charCodeAt(A.length - 2), g = A.length - 4; - let Q = B.allocUint16(g), E = new Uint16Array( - B.memory.buffer, - Q, - g - ); - for (let D = 0; D < g; D++) - E[D] = A.charCodeAt(D); - const i = B.decompress( - Q, - g, - C, - I - ); - if (B.free(Q, 2 * g), i < 0) throw new Error("Error decompressing string."); - const { start: a, end: o, capacity: t } = w(B.memory, i), s = new Uint8Array(B.memory.buffer.slice(a, o)), n = new TextDecoder().decode(s); - return B.free(a, t), n; -} -self.onmessage = function(A) { - const { command: C, id: I, data: g } = A.data; - switch (C) { - case "decompress": { - self.postMessage({ id: I, data: c(g) }); - break; - } - case "compress": { - self.postMessage({ id: I, data: F(g) }); - break; - } - } -}; diff --git a/assets/worker-DrAYohSc-CMxnHKXp.js b/assets/worker-DrAYohSc-CMxnHKXp.js new file mode 100644 index 0000000..fef2444 --- /dev/null +++ b/assets/worker-DrAYohSc-CMxnHKXp.js @@ -0,0 +1,91 @@ +function e(A, Q) { + const I = new TextEncoder().encode(A), g = Q.allocUint8(I.length); + return new Uint8Array( + Q.memory.buffer, + g, + I.length + ).set(I), { ptr: g, length: I.length }; +} +function y(A) { + const Q = new Array(A.length); + for (let I = 0; I < A.length; I++) + Q[I] = String.fromCharCode(A[I]); + return Q.join(""); +} +function t(A, Q) { + const I = new Uint32Array( + A.buffer.slice(Q, Q + 8) + ), g = I.at(0), C = I.at(1); + return { + start: Q - g, + end: Q, + capacity: C + }; +} +var h = async (A = {}, Q) => { + let I; + if (Q.startsWith("data:")) { + const g = Q.replace(/^data:.*?base64,/, ""); + let C; + if (typeof Buffer == "function" && typeof Buffer.from == "function") + C = Buffer.from(g, "base64"); + else if (typeof atob == "function") { + const E = atob(g); + C = new Uint8Array(E.length); + for (let i = 0; i < E.length; i++) + C[i] = E.charCodeAt(i); + } else + throw new Error( + "Failed to decode base64-encoded data URL, Buffer and atob are not supported" + ); + I = await WebAssembly.instantiate(C, A); + } else { + const g = await fetch(Q), C = g.headers.get("Content-Type") || ""; + if ("instantiateStreaming" in WebAssembly && C.startsWith("application/wasm")) + I = await WebAssembly.instantiateStreaming(g, A); + else { + const E = await g.arrayBuffer(); + I = await WebAssembly.instantiate(E, A); + } + } + return I.instance; +}, r = (A) => h(A, "data:application/wasm;base64,AGFzbQEAAAABVg1gBX9/f39/AGAEf39/fwF/YAN/f38AYAJ/fwF/YAZ/f39/f38Bf2ACf38AYAF/AX9gAn9/AX5gAn5+AX5gBH9/fn4AYAN/f38Bf2AEf39/fwBgAX8AAx4dAgcICQEFAwMCAgIDAgMKCwUCAQQADAEBAgMGBgUEBQFwAQQEBQMBABEGCQF/AUGAgMAACwdEBgZtZW1vcnkCAAhjb21wcmVzcwAGCmRlY29tcHJlc3MAFgphbGxvY1VpbnQ4ABoLYWxsb2NVaW50MTYAGwRmcmVlABwJCQEAQQELAxITFAwBAgrPPB01AgF/AX4gAkECdCIDBEAgACkCACIEpyABQarVqtV6IAIbIANBAkEAIARCIIinKAIIEQAACwvtCgILfgN/IwBBQGoiDSQAAn4gAUEgTQRAIAFBEUkEQCABrSECIAFBCE8EQCACQgGGQrH/voPNuKWP5QB9IgIgACABakEIaykAACIDIAApAABCsf++g824pY/lAH0iBUIniXx+IQQgAiACI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AQQF0IgBFBEBBfiEADAELQeiAwAApAwAiA6cgAEEBQQAgA0IgiKcoAgARAQAiAEUNAQsgAUEQaiQAIAAPCwALKAEBfiABBEBB6IDAACkCACICpyAAIAFBAEEAIAJCIIinKAIIEQAACwsLhAECAEGAgMAAC28BAAAAAgAAAAMAAAB4ABAAEAAAAAAAAAABAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAAAAAAAAABAAQfCAwAALBKqqqqo="); +const f = await r(), B = f.exports; +function c(A) { + const { ptr: Q, length: I } = e(A, B), g = B.compress(Q, I); + if (B.free(Q, I), g < 0) throw new Error("Error compressing string."); + const { start: C, end: E, capacity: i } = t(B.memory, g), a = new Uint16Array(B.memory.buffer.slice(C, E)), o = y(a); + return B.free(C, i), o; +} +function F(A) { + const Q = (A.charCodeAt(A.length - 3) << 16) + A.charCodeAt(A.length - 4), I = (A.charCodeAt(A.length - 1) << 16) + A.charCodeAt(A.length - 2), g = A.length - 4; + let C = B.allocUint16(g), E = new Uint16Array( + B.memory.buffer, + C, + g + ); + for (let D = 0; D < g; D++) + E[D] = A.charCodeAt(D); + const i = B.decompress( + C, + g, + Q, + I + ); + if (B.free(C, 2 * g), i < 0) throw new Error("Error decompressing string."); + const { start: a, end: o, capacity: w } = t(B.memory, i), n = new Uint8Array(B.memory.buffer.slice(a, o)), s = new TextDecoder().decode(n); + return B.free(a, w), s; +} +self.onmessage = function(A) { + const { command: Q, id: I, data: g } = A.data; + switch (Q) { + case "decompress": { + self.postMessage({ id: I, data: F(g) }); + break; + } + case "compress": { + self.postMessage({ id: I, data: c(g) }); + break; + } + } +}; diff --git a/index.html b/index.html index b9bf324..b8d8b9d 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ content="smol-string: Typescript library for localStorage compression" /> smol-string - +