Something went wrong. Try again.
jetstream v2 in zig stream.waow.tech
Something went wrong. Try again.
12var Y=class{name;constructor(e){this.name=e?.replace(/[^A-Za-z0-9_$]/g,"_")}},te=Symbol(),N=class z{strings;values;#e;constructor(t,n,s){this.strings=t,this.values=n,this.#e=s}eval(){let t=new Map,n=[],s=[],i=0,g=r=>{let a=r.strings[0];for(let c=0;c<r.values.length;c++){let o=r.values[c];if(o instanceof z)a+=g(o);else{let u=Object.is(o,-0)?te:o,d=t.get(u);d===void 0&&(d="_$_"+i++,o instanceof Y?o.name!==void 0&&(d+="_"+o.name):(n.push(d),s.push(o)),t.set(u,d)),a+=d}a+=r.strings[c+1]}return a},m=g(this);return new Function(this.#e(n.join(",")),this.#e(m)).apply(void 0,s)}},U=e=>e,M=[],G=e=>{let t=U;if(e?.policyName!==void 0){let s=globalThis.trustedTypes?.createPolicy(e.policyName,{createScript:U});s!==void 0&&(t=i=>s.createScript(i))}let n=(s,...i)=>new N(s,i,t);return Object.defineProperties(n,{empty:{configurable:!0,get(){let s=new N([""],M,t);return Object.defineProperty(n,"empty",{configurable:!1,value:s}),s}},local:{value:s=>new Y(s)},raw:{value:s=>new N([s],M,t)}})};var p=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),S=e=>({get value(){let t=e();return p(this,"value",t)}}),C=Array.isArray,O=e=>typeof e=="object"&&e!==null&&!C(e),F=e=>{try{let t=G(e);return t.empty.eval(),t}catch{return}},D=S(()=>{if(!(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare")))return F({policyName:"atcute-lexicons"})??F()});var E=(e,t)=>e?{ok:!1,code:"join",left:e,right:t}:t,v=(e,t)=>({ok:!1,code:"prepend",key:e,tree:t}),P=e=>({ok:!0,value:e}),W=0,I=1,ne=2,re=(e,t)=>{let{ok:n,msg:s,...i}=e;return{...i,path:t}},X=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{X(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push(re(e,t)),n}},q=e=>{let t=0;for(;;)switch(e.code){case"join":{t+=q(e.left),e=e.right;continue}case"prepend":{e=e.tree;continue}default:return t+1}};var se=e=>{let t="",n=0;for(;;){switch(e.code){case"join":{n+=q(e.right),e=e.left;continue}case"prepend":{t+=`.${e.key}`,e=e.tree;continue}}break}let s=e.msg(),i=`${e.code} at ${t||"."} (${s})`;return n>0&&(i+=` (+${n} other issue(s))`),i},B=class extends Error{name="ValidationError";#e;constructor(t){super(),this.#e=t}get message(){return se(this.#e)}get issues(){return X(this.#e)}};var J=(e,t,n)=>{let s=W;n?.strict&&(s|=ne);let i=e["~run"](t,s);if(i===void 0)return t;if(i.ok)return i.value;throw new B(i)},Z=(e,t=[],n=[])=>{for(;;)switch(e.code){case"join":{Z(e.left,t.slice(),n),e=e.right;continue}case"prepend":{t.push(e.key),e=e.tree;continue}default:return n.push({message:e.msg(),path:t.length>0?t:void 0}),n}},T=e=>({version:1,vendor:"@atcute/lexicons",validate(t){let n=e["~run"](t,W);return n===void 0?{value:t}:n.ok?{value:n.value}:{issues:Z(n)}}});var H={ok:!1,code:"invalid_type",expected:"integer",msg(){return"expected integer"}},ie={kind:"schema",type:"integer","~run"(e,t){if(typeof e!="number"||!Number.isSafeInteger(e))return H},get"~standard"(){return p(this,"~standard",T(this))}},f=()=>ie;var oe={ok:!1,code:"invalid_type",expected:"string",msg(){return"expected string"}},ae={kind:"schema",type:"string",format:null,"~run"(e,t){if(typeof e!="string")return oe},get"~standard"(){return p(this,"~standard",T(this))}},Q=()=>ae;var ce=e=>e.type==="optional",ue={ok:!1,code:"invalid_type",expected:"array",msg(){return"expected array"}},V=e=>{let t=S(()=>typeof e=="function"?e():e);return{kind:"schema",type:"array",get item(){return p(this,"item",t.value)},get"~run"(){let n=t.value;return p(this,"~run",(i,g)=>{if(!C(i))return ue;let m,r;for(let a=0,c=i.length;a<c;a++){let o=i[a],u=n["~run"](o,g);if(u!==void 0)if(u.ok)r===void 0&&(r=i.slice()),r[a]=u.value;else{if(g&I)return v(a,u);m=E(m,v(a,u))}}if(m!==void 0)return m;if(r!==void 0)return P(r)})},get"~standard"(){return p(this,"~standard",T(this))}}};var K={ok:!1,code:"invalid_type",expected:"object",msg(){return"expected object"}},de={ok:!1,code:"missing_value",msg(){return"missing value"}},le=(e,t,n)=>{t==="__proto__"?Object.defineProperty(e,t,{value:n}):e[t]=n},R=e=>{let t=S(()=>{let n=[];for(let s in e){let i=e[s];n.push({key:s,schema:i,optional:ce(i),missing:v(s,de)})}return n});return{kind:"schema",type:"object",get shape(){let n=t.value,s={};for(let i of n)s[i.key]=i.schema;return p(this,"shape",s)},get"~run"(){let n=t.value,s=n.length,i=r=>{let a=r.local(),c=r.local(),o=r.local(),u=r.local(),d=(l,h)=>l==="__proto__"?r`Object.defineProperty(${u}??={...${a}},${l},{value:${h}})`:r`(${u}??={...${a}})[${l}]=${h}`,_=l=>r`if(((${o}=${E}(${o},${l})),${c}&${I}))return ${o};`,y=r.empty;for(let l=0;l<s;l++){let h=n[l],b=h.key,$=r.local(),x=r.local(),w,A,j=r.empty;if(h.optional){let L=h.schema,k=L.default;if(w=r`${$}!==undefined`,A=L.wrapped,k!==void 0){let ee=typeof k=="function"?r`${k}()`:r`${k}`;j=r`else ${d(b,ee)};`}}else w=r`${$}!==undefined||${b} in ${a}`,A=h.schema,j=r`else ${_(r`${h.missing}`)}`;y=r`${y}const ${$}=${a}[${b}];if(${w}){const ${x}=${A}["~run"](${$},${c});if(${x}!==undefined)if(${x}.ok)${d(b,r`${x}.value`)};else ${_(r`${v}(${b},${x})`)}}${j}`}return y=r`return function matcher(${a},${c}){let ${o},${u};${y}if(${o}!==undefined)return ${o};if(${u}!==undefined)return ${P}(${u});}`,y.eval()},g=D.value;if(g!==void 0){let r=i(g);return p(this,"~run",(c,o)=>O(c)?r(c,o):K)}return p(this,"~run",(r,a)=>{if(!O(r))return K;let c,o;for(let u=0;u<s;u++){let d=n[u],_=d.key,y=r[_];if(!d.optional&&y===void 0&&!(_ in r)){if(c=E(c,d.missing),a&I)return c;continue}let l=d.schema["~run"](y,a);if(l!==void 0){if(l.ok)o===void 0&&(o={...r}),le(o,_,l.value);else if(c=E(c,v(_,l)),a&I)return c}}if(c!==void 0)return c;if(o!==void 0)return P(o)})},get"~standard"(){return p(this,"~standard",T(this))}}};var pe=R({name:Q(),index:f(),fileBytes:f(),compressedFrameBytes:f(),uncompressedBlockBytes:f(),framingBytes:f(),headerBytes:f(),footerBytes:f(),blocks:f(),collections:f(),mixedNamespaceFrameBytes:f()}),ge=R({measuredAt:f(),segmentCount:f(),sealedFileBytes:f(),probes:V(pe)}),xe=e=>J(ge,e);export{xe as parseStorageReport};