code-playpad 0.3.1 → 0.4.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.
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * code-playpad — MIT © 2026 Seung Hun Lee
3
+ * Bundles CodeMirror 6 and Lezer (MIT) © Marijn Haverbeke and others.
4
+ * Full third-party licences: THIRD-PARTY-NOTICES.txt in this package.
5
+ */
6
+ var e='"use strict";(()=>{function*St(n,e,t,i,a){let r=i-t;if(r<2)return;if(r<32){let o=yield*Il(e,t,i,a);yield*Rl(e,t,i,t+o,a);return}let l=new Ra(n,e,a),s=xu(r);do{let o=yield*Il(e,t,i,a);if(o<s){let u=r<=s?r:s;yield*Rl(e,t,t+u,t+o,a),o=u}l.pushRun(t,o),yield*l.mergeCollapse(),t+=o,r-=o}while(r!==0);yield*l.mergeForceCollapse()}function*Rl(n,e,t,i,a){for(i===e&&i++;i<t;i++){let r=n[i],l=e,s=i;for(;l<s;){let o=l+s>>>1;(yield*a(r,n[o]))<0?s=o:l=o+1}for(let o=i;o>l;o--)n[o]=n[o-1];n[l]=r}}function*Il(n,e,t,i){let a=e+1;if(a===t)return 1;if((yield*i(n[a++],n[e]))<0){for(;a<t&&(yield*i(n[a],n[a-1]))<0;)a++;for(let r=e,l=a-1;r<l;r++,l--)[n[r],n[l]]=[n[l],n[r]]}else for(;a<t&&(yield*i(n[a],n[a-1]))>=0;)a++;return a-e}function xu(n){let e=0;for(;n>=32;)e|=n&1,n>>=1;return n+e}function Ne(n,e,t,i,a){if(n===t&&i>e)for(let r=a-1;r>=0;r--)t[i+r]=n[e+r];else for(let r=0;r<a;r++)t[i+r]=n[e+r]}function*Va(n,e,t,i,a,r){let l=0,s=1;if((yield*r(n,e[t+a]))>0){let o=i-a;for(;s<o&&(yield*r(n,e[t+a+s]))>0;)l=s,s=(s<<1)+1,s<=0&&(s=o);s>o&&(s=o),l+=a,s+=a}else{let o=a+1;for(;s<o&&(yield*r(n,e[t+a-s]))<=0;)l=s,s=(s<<1)+1,s<=0&&(s=o);s>o&&(s=o);let u=l;l=a-s,s=a-u}for(l++;l<s;){let o=l+(s-l>>>1);(yield*r(n,e[t+o]))>0?l=o+1:s=o}return s}function*Ea(n,e,t,i,a,r){let l=1,s=0;if((yield*r(n,e[t+a]))<0){let o=a+1;for(;l<o&&(yield*r(n,e[t+a-l]))<0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o);let u=s;s=a-l,l=a-u}else{let o=i-a;for(;l<o&&(yield*r(n,e[t+a+l]))>=0;)s=l,l=(l<<1)+1,l<=0&&(l=o);l>o&&(l=o),s+=a,l+=a}for(s++;s<l;){let o=s+(l-s>>>1);(yield*r(n,e[t+o]))<0?l=o:s=o+1}return l}var Tl="Comparison method violates its general contract!",Ra=class{#e;#t;#n;#i=7;#a=[];#r=[];#l=0;constructor(e,t,i){this.#e=e,this.#t=t,this.#n=i}pushRun(e,t){this.#a[this.#l]=e,this.#r[this.#l]=t,this.#l++}*mergeCollapse(){let e=this.#r;for(;this.#l>1;){let t=this.#l-2;if(t>0&&e[t-1]<=e[t]+e[t+1]||t>1&&e[t-2]<=e[t]+e[t-1])e[t-1]<e[t+1]&&t--;else if(t<0||e[t]>e[t+1])break;yield*this.#s(t)}}*mergeForceCollapse(){let e=this.#r;for(;this.#l>1;){let t=this.#l-2;t>0&&e[t-1]<e[t+1]&&t--,yield*this.#s(t)}}*#s(e){let t=this.#t,i=this.#a[e],a=this.#r[e],r=this.#a[e+1],l=this.#r[e+1];this.#r[e]=a+l,e===this.#l-3&&(this.#a[e+1]=this.#a[e+2],this.#r[e+1]=this.#r[e+2]),this.#l--;let s=yield*Ea(t[r],t,i,a,0,this.#n);i+=s,a-=s,a!==0&&(l=yield*Va(t[i+a-1],t,r,l,l-1,this.#n),l!==0&&(this.#e.charge(a+l),a<=l?yield*this.#c(i,a,r,l):yield*this.#o(i,a,r,l)))}*#c(e,t,i,a){let r=this.#t,l=this.#n,s=r.slice(e,e+t),o=0,u=i,d=e;if(r[d++]=r[u++],--a===0){Ne(s,o,r,d,t);return}if(t===1){Ne(r,u,r,d,a),r[d+a]=s[o];return}let f=this.#i;e:for(;;){let p=0,N=0;do if((yield*l(r[u],s[o]))<0){if(r[d++]=r[u++],N++,p=0,--a===0)break e}else if(r[d++]=s[o++],p++,N=0,--t===1)break e;while((p|N)<f);do{if(p=yield*Ea(r[u],s,o,t,0,l),p!==0&&(Ne(s,o,r,d,p),d+=p,o+=p,t-=p,t<=1)||(r[d++]=r[u++],--a===0)||(N=yield*Va(s[o],r,u,a,0,l),N!==0&&(Ne(r,u,r,d,N),d+=N,u+=N,a-=N,a===0))||(r[d++]=s[o++],--t===1))break e;f--}while(p>=7||N>=7);f<0&&(f=0),f+=2}this.#i=f<1?1:f,t===1?(Ne(r,u,r,d,a),r[d+a]=s[o]):t===0?this.#e.fail("java.lang.IllegalArgumentException",Tl):Ne(s,o,r,d,t)}*#o(e,t,i,a){let r=this.#t,l=this.#n,s=r.slice(i,i+a),o=e+t-1,u=a-1,d=i+a-1;if(r[d--]=r[o--],--t===0){Ne(s,0,r,d-(a-1),a);return}if(a===1){d-=t,o-=t,Ne(r,o+1,r,d+1,t),r[d]=s[u];return}let f=this.#i;e:for(;;){let p=0,N=0;do if((yield*l(s[u],r[o]))<0){if(r[d--]=r[o--],p++,N=0,--t===0)break e}else if(r[d--]=s[u--],N++,p=0,--a===1)break e;while((p|N)<f);do{if(p=t-(yield*Ea(s[u],r,e,t,t-1,l)),p!==0&&(d-=p,o-=p,t-=p,Ne(r,o+1,r,d+1,p),t===0)||(r[d--]=s[u--],--a===1)||(N=a-(yield*Va(r[o],s,0,a,a-1,l)),N!==0&&(d-=N,u-=N,a-=N,Ne(s,u+1,r,d+1,N),a<=1))||(r[d--]=r[o--],--t===0))break e;f--}while(p>=7||N>=7);f<0&&(f=0),f+=2}this.#i=f<1?1:f,a===1?(d-=t,o-=t,Ne(r,o+1,r,d+1,t),r[d]=s[u]):a===0?this.#e.fail("java.lang.IllegalArgumentException",Tl):Ne(s,0,r,d-(a-1),a)}};var c;function Ol(n){c=n}var g=n=>n?1:0,xt=3,L=n=>n===1,b=class{hash;constructor(e){this.hash=e}*javaString(e){return`${this.className}@${this.hash.toString(16)}`}get contentEquality(){return!1}*contentEquals(e,t){return this===t}*contentHash(e){return this.hash}"equals(Object)"(e,t){return h(this.contentEquals(e,t),g)}"hashCode()"(e){return h(this.contentHash(e))}"toString()"(e){return h(this.javaString(e),t=>new c.JString(t))}},je=class extends b{};function m(n,e,t,i){if(e instanceof c.JLambda)return Qn(e.method,e.captured.length?[...e.captured,...i]:i);if(e instanceof c.JObject)return Qn(n.methodOf(e,t,i.length),[e,...i]);if(e instanceof je)return e.call(n,i);throw new Error(`library: ${t} on a value that is not a function`)}var Ta=class{invoke;args;#e=!1;constructor(e,t){this.invoke=e,this.args=t}[Symbol.iterator](){return this}next(e){return this.#e?{done:!0,value:e}:(this.#e=!0,{done:!1,value:this})}};function Qn(n,e){return new Ta(n,e)}function Yn(n){return new Oa(n)}var Oa=class{#e;constructor(e){this.#e=e}[Symbol.iterator](){return this}next(){return{done:!0,value:this.#e}}};function h(n,e=t=>t){return jl(n,n.next(),e)}function jl(n,e,t){return e.done?t(e.value):new c.NativeThen(e.value.invoke,e.value.args,i=>jl(n,n.next(i),t),n,t)}function gn(n,e,t,i,a){return e instanceof c.JLambda?new c.NativeThen(e.method,e.captured.length?[...e.captured,...i]:i,a):e instanceof c.JObject?new c.NativeThen(n.methodOf(e,t,i.length),[e,...i],a):ja(h(m(n,e,t,i)),a)}function ja(n,e){return n instanceof c.NativeThen?new c.NativeThen(n.invoke,n.args,t=>ja(n.then(t),e)):n!==null&&typeof n=="object"&&Symbol.iterator in n?ja(h(n),e):e(n)}function De(n){return n instanceof c.JString?"java.lang.String":n instanceof c.JBox?Pt[n.kind]:n instanceof c.JArray?n.descriptor:n.className}function mn(n){return n.replace(/\\$\\d+$/,"")}var Pt={int:"java.lang.Integer",long:"java.lang.Long",double:"java.lang.Double",char:"java.lang.Character",boolean:"java.lang.Boolean",float:"java.lang.Float",byte:"java.lang.Byte",short:"java.lang.Short"};function La(n){switch(n.kind){case"double":return c.doubleToString(n.value);case"float":return c.floatToString(n.value);case"char":return String.fromCharCode(n.value);case"boolean":return n.value?"true":"false";default:return String(n.value)}}function*V(n,e,t,i="(this Collection)"){if(e===null)return"null";if(e instanceof c.JString)return e.value;if(e instanceof c.JBox)return La(e);if(e===t)return i;if(e instanceof c.JObject){let a=n.toStringMethod(e);if(a<0)return c.objectToString(e);let r=yield{invoke:a,args:[e]};return r==null?"null":r.value}return e instanceof c.JArray?c.objectToString(e):e instanceof b?yield*e.javaString(n):String(e)}function _t(n,e){return e instanceof c.JObject&&n.equalsMethod(e)>=0||e instanceof b&&e.contentEquality}function pn(n,e){return n===e?n!==null:n instanceof c.JString?e instanceof c.JString&&n.value===e.value:n instanceof c.JBox?e instanceof c.JBox&&n.kind===e.kind&&Object.is(n.value,e.value):!1}function*O(n,e,t){if(e instanceof c.JObject){let i=n.equalsMethod(e);return i<0?e===t:L(yield{invoke:i,args:[e,t]})}return e instanceof b?yield*e.contentEquals(n,t):pn(e,t)}function*Q(n,e,t){return e===t||e!==null&&(yield*O(n,e,t))}function Aa(n){let e=n.cachedHash;return e!==void 0?e:n.cachedHash=ka(n.value)}function ka(n){let e=0;for(let t=0;t<n.length;t++)e=Math.imul(e,31)+n.charCodeAt(t)|0;return e}var Ia=new DataView(new ArrayBuffer(8));function vn(n){let e=BigInt.asUintN(64,BigInt(n));return Number(BigInt.asIntN(32,e^e>>32n))}function bn(n){return Ia.setFloat64(0,Number.isNaN(n)?NaN:n),Ia.getInt32(0)^Ia.getInt32(4)|0}function Nn(n){switch(n.kind){case"int":case"char":case"byte":case"short":return n.value;case"float":return c.floatToIntBits(n.value);case"long":return vn(n.value);case"double":return bn(n.value);case"boolean":return n.value?1231:1237}}function*A(n,e){if(e===null)return 0;if(e instanceof c.JString)return Aa(e);if(e instanceof c.JBox)return Nn(e);if(e instanceof c.JObject){let t=n.hashCodeMethod(e);return t<0?e.hash:yield{invoke:t,args:[e]}}return e instanceof b?yield*e.contentHash(n):e.hash}function Xe(n,e){if(n<e)return-1;if(n>e)return 1;if(n===e){if(n!==0)return 0;let a=Object.is(n,-0),r=Object.is(e,-0);return a===r?0:a?-1:1}let t=Number.isNaN(n),i=Number.isNaN(e);return t===i?0:t?1:-1}function $e(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++){let a=n.charCodeAt(i)-e.charCodeAt(i);if(a!==0)return a}return n.length-e.length}function Cn(n,e){switch(n.kind){case"double":case"float":return Xe(n.value,e.value);case"char":case"byte":case"short":return n.value-e.value;case"boolean":return n.value===e.value?0:n.value?1:-1;default:return n.value<e.value?-1:n.value>e.value?1:0}}function wl(n,e,t){return n.fail("java.lang.ClassCastException",n.castMessage(e,t))}function wa(n,e){return e instanceof c.JString?"java.lang.String":e instanceof c.JBox?Pt[e.kind]:e instanceof b&&e.className==="java.lang.StringBuilder"?"java.lang.StringBuilder":e instanceof b&&e.naturalOrder||e instanceof c.JObject&&n.methodOf(e,"compareTo",1)>=0?e.className:null}function Fe(n,e){if(e===null)return n.limitation("ordering a null element");wa(n,e)===null&&wl(n,e,"java.lang.Comparable")}function Vt(n){return n.some(e=>e instanceof c.JObject)}var Vu={"java.lang.String":"anotherString","java.lang.StringBuilder":"another","java.lang.Integer":"anotherInteger","java.lang.Long":"anotherLong","java.lang.Double":"anotherDouble","java.lang.Character":"anotherCharacter","java.lang.Boolean":"b"};function U(n,e){if(e===null)return(a,r)=>a instanceof c.JObject?(Fe(n,a),Qn(n.methodOf(a,"compareTo",1),[a,r])):Yn(ce(n,a,r));if(e instanceof je)return(a,r)=>e.call(n,[a,r]);let t=e instanceof c.JObject?n.methodOf(e,"compare",2):e.method,i=e instanceof c.JObject?[e]:e.captured;return(a,r)=>Qn(t,i.length?[...i,a,r]:[a,r])}function ce(n,e,t){if(e===null)return n.limitation("ordering a null element");if(e instanceof c.JObject&&n.methodOf(e,"compareTo",1)>=0)return n.limitation("Arrays.binarySearch over objects of the program\'s classes");if(Fe(n,e),e instanceof b&&e.naturalOrder)return e.naturalOrder(n,t);let i=wa(n,e);return t===null?n.fail("java.lang.NullPointerException",`Cannot read field "value" because "${Vu[i]}" is null`):(wa(n,t)!==i&&wl(n,t,i),e instanceof c.JString?$e(e.value,t.value):e instanceof c.JBox?Cn(e,t):$e(e.text,t.text))}var Eu="java.lang.NullPointerException",ei="java.lang.ArrayIndexOutOfBoundsException",we=n=>n.data;function Ut(n,e,t="a"){return e===null&&n.fail(Eu,`Cannot read the array length because "${t}" is null`),e}function ti(n,e,t,i){t>i&&n.fail("java.lang.IllegalArgumentException",`fromIndex(${t}) > toIndex(${i})`),t<0&&n.fail(ei,`Array index out of range: ${t}`),i>e&&n.fail(ei,`Array index out of range: ${i}`)}function Ru(n,e){switch(n){case"[D":return c.doubleToString(e);case"[F":return c.floatToString(e);case"[C":return String.fromCharCode(e);case"[Z":return e?"true":"false";default:return String(e)}}function Iu(n,e){switch(n){case"[D":return bn(e);case"[F":return c.floatToIntBits(e);case"[J":return vn(e);case"[Z":return e?1231:1237;default:return e}}var Ht=n=>n.descriptor.length===2;function*kl(n,e){if(e===null)return"null";let t=e,i=we(t);n.charge(i.length);let a=[];if(Ht(t))for(let r=0;r<i.length;r++)a.push(Ru(t.descriptor,i[r]));else for(let r=0;r<i.length;r++)a.push(yield*V(n,i[r]));return`[${a.join(", ")}]`}function*Ml(n,e,t){let i=we(e);n.charge(i.length),t.add(e);let a=[];for(let r=0;r<i.length;r++){let l=i[r];l instanceof c.JArray?Ht(l)?a.push(yield*kl(n,l)):a.push(t.has(l)?"[...]":yield*Ml(n,l,t)):a.push(yield*V(n,l))}return t.delete(e),`[${a.join(", ")}]`}function Tu(n){let e=/^\\[L(.*);$/.exec(n);return e&&e[1]!=="java.lang.Object"?e[1]:null}function Ou(n,e,t){let i=Tu(e.descriptor);if(i===null||t===null||typeof t!="object")return;let a=De(t);a!==i&&n.fail("java.lang.ArrayStoreException",a)}function Ll(n,e,t,i,a){let r=Ut(n,e),l=we(r),s=t??0,o=i??l.length;t!==null&&ti(n,l.length,s,o),Ht(r)||Ou(n,r,a),n.charge(o-s>>>2);for(let u=s;u<o;u++)l[u]=a}function Ma(n,e,t,i){let a=Ut(n,e),r=we(a),l=t??0,s=i??r.length;t!==null&&ti(n,r.length,l,s);let o=s-l;if(o<2)return;n.charge(Math.ceil(o*Math.log2(o)));let u=a.data;if(u instanceof Int32Array||u instanceof Uint16Array||u instanceof Float64Array||u instanceof Int8Array||u instanceof Int16Array||u instanceof Float32Array){u.subarray(l,s).sort();return}if(a.descriptor==="[J"){let d=Array.prototype.slice.call(r,l,s);d.sort((f,p)=>f<p?-1:f>p?1:0),d.forEach((f,p)=>r[l+p]=f)}else{if(Vt(Array.prototype.slice.call(r,l,s)))return h(St(n,r,l,s,U(n,null)),()=>{});yn(n,r,l,s)}}function yn(n,e,t,i){let a=e.slice(t,i);if(!(a.length<2)){n.charge(Math.ceil(a.length*Math.log2(a.length))),a.some(r=>r===null)&&n.limitation("sorting objects that include null");for(let r of a)ce(n,a[0],r);a.sort((r,l)=>ce(n,r,l)),a.forEach((r,l)=>e[t+l]=r)}}function Bl(n,e,t,i,a){if(a===null)return Ma(n,e,t,i);let r=Ut(n,e),l=we(r),s=t??0,o=i??l.length;return t!==null&&ti(n,l.length,s,o),h(St(n,l,s,o,U(n,a)),()=>{})}function Al(n,e,t,i=null,a=null){let r=Ut(n,e),l=we(r);i!==null&&ti(n,l.length,i,a);let s=r.descriptor==="[D"||r.descriptor==="[F"?d=>Xe(d,t):Ht(r)?d=>d<t?-1:d>t?1:0:d=>ce(n,d,t),o=i??0,u=(a??l.length)-1;for(;o<=u;){let d=o+u>>>1,f=s(l[d]);if(n.charge(1),f<0)o=d+1;else if(f>0)u=d-1;else return d}return-(o+1)}function ju(n,e,t){if(e===t)return 1;if(e===null||t===null)return 0;let i=we(e),a=we(t);if(i.length!==a.length)return 0;if(n.charge(i.length>>>2),Ht(e)){for(let r=0;r<i.length;r++)if(!Object.is(i[r],a[r]))return 0;return 1}return h((function*(){for(let r=0;r<i.length;r++)if(!(yield*Q(n,i[r],a[r])))return!1;return!0})(),g)}function wu(n,e){if(e===null)return 0;let t=e,i=we(t);return n.charge(i.length>>>2),h((function*(){let a=1;for(let r=0;r<i.length;r++){let l=Ht(t)?Iu(t.descriptor,i[r]):yield*A(n,i[r]);a=Math.imul(31,a)+l|0}return a})())}var Lu={"[I":"int","[J":"long","[C":"char","[D":"double","[Z":"boolean","[B":"byte","[S":"short","[F":"float"};function $l(n,e,t,i){let a=we(e),r=Math.min(a.length-t,i);t<0&&n.fail(ei,`arraycopy: source index ${t} out of bounds for ${Lu[e.descriptor]??"object array"}[${a.length}]`),r<0&&n.fail(ei,`arraycopy: length ${r} is negative`),n.allocate(i),n.charge(i>>>4);let l;e.data instanceof Int32Array?l=new Int32Array(i):e.data instanceof Uint16Array?l=new Uint16Array(i):e.data instanceof Float64Array?l=new Float64Array(i):e.data instanceof Uint8Array?l=new Uint8Array(i):e.data instanceof Int8Array?l=new Int8Array(i):e.data instanceof Int16Array?l=new Int16Array(i):e.data instanceof Float32Array?l=new Float32Array(i):l=new Array(i).fill(e.kind===xt?null:0);let s=l;for(let o=0;o<r;o++)s[o]=a[t+o];return new c.JArray(e.kind,l,n.hash(),e.descriptor)}function Dl(n,e,t){let i=Ut(n,e,"original");return t<0?n.fail("java.lang.NegativeArraySizeException",String(t)):$l(n,i,0,t)}function Fl(n,e,t,i){let a=Ut(n,e,"original");return t>i?n.fail("java.lang.IllegalArgumentException",`${t} > ${i}`):$l(n,a,t,i-t)}var J={};for(let n of["int","long","char","double","boolean","byte","short","float","Object"]){let e=i=>`Arrays.${i}`,t=`${n}[]`;n!=="boolean"&&(J[e(`sort(${t})`)]=(i,[a])=>Ma(i,a,null,null),J[e(`sort(${t},int,int)`)]=(i,[a,r,l])=>Ma(i,a,r,l),J[e(`binarySearch(${t},${n})`)]=(i,[a,r])=>Al(i,a,r),J[e(`binarySearch(${t},int,int,${n})`)]=(i,[a,r,l,s])=>Al(i,a,s,r,l)),J[e(`equals(${t},${t})`)]=(i,[a,r])=>ju(i,a,r),J[e(`fill(${t},${n})`)]=(i,[a,r])=>Ll(i,a,null,null,r),J[e(`fill(${t},int,int,${n})`)]=(i,[a,r,l,s])=>Ll(i,a,r,l,s),J[e(`hashCode(${t})`)]=(i,[a])=>wu(i,a),J[e(`toString(${t})`)]=(i,[a])=>h(kl(i,a),r=>new c.JString(r)),n!=="Object"&&(J[e(`copyOf(${t},int)`)]=(i,[a,r])=>Dl(i,a,r),J[e(`copyOfRange(${t},int,int)`)]=(i,[a,r,l])=>Fl(i,a,r,l))}J["Arrays.copyOf(T[],int)"]=(n,[e,t])=>Dl(n,e,t);J["Arrays.copyOfRange(T[],int,int)"]=(n,[e,t,i])=>Fl(n,e,t,i);J["Arrays.sort(T[],Comparator)"]=(n,[e,t])=>Bl(n,e,null,null,t);J["Arrays.sort(T[],int,int,Comparator)"]=(n,[e,t,i,a])=>Bl(n,e,t,i,a);J["Arrays.deepToString(Object[])"]=(n,[e])=>e===null?new c.JString("null"):h(Ml(n,e,new Set),t=>new c.JString(t));var he="java.util.NoSuchElementException",Ye="java.util.ConcurrentModificationException",D="java.lang.NullPointerException",Jl="java.lang.IndexOutOfBoundsException",Ba="java.lang.IllegalArgumentException";function*Et(n,e,t,i=0,a=e.length){if(n.charge(a-i),t===null){for(let r=i;r<a;r++)if(e[r]===null)return r}else if(_t(n,t)){for(let r=i;r<a;r++)if(yield*O(n,t,e[r]))return r}else for(let r=i;r<a;r++)if(pn(t,e[r]))return r;return-1}function*Gl(n,e,t){n.charge(e.length);for(let i=e.length-1;i>=0;i--)if(t===null?e[i]===null:yield*O(n,t,e[i]))return i;return-1}var k=class extends b{isList=!1;isSet=!1;hashed=!1;randomAccess=!1;copyItems(e){return{items:this.elements(e,!0),unknown:null}}markUnknown(e,t){}*contains(e,t){return(yield*Et(e,this.elements(e,!1),t))>=0}*javaString(e){let t=this.elements(e,!0);if(!t.length)return"[]";e.charge(t.length);let i=[];for(let a of t)i.push(yield*V(e,a,this));return`[${i.join(", ")}]`}"size()"(){return this.size}"isEmpty()"(){return g(this.size===0)}"contains(Object)"(e,t){return h(this.contains(e,t),g)}"containsAll(Collection)"(e,t){if(t===null)return e.fail(D,\'Cannot invoke "java.util.Collection.iterator()" because "c" is null\');let i=this;return h((function*(){for(let a of t.elements(e,!1))if(!(yield*i.contains(e,a)))return!1;return!0})(),g)}"toArray()"(e){let t=this.elements(e,!0);return e.allocate(t.length),new c.JArray(xt,[...t],e.hash(),"[Ljava.lang.Object;")}"toArray(T[])"(e,t){if(t===null)return e.fail(D,\'Cannot read the array length because "a" is null\');let i=t,a=this.elements(e,!0);for(let l of a)if(l!==null&&!e.storable(l,i.descriptor))return e.fail("java.lang.ArrayStoreException",`arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, ${i.descriptor.slice(2,-1)}`);let r=i.data;if(r.length<a.length)return e.allocate(a.length),new c.JArray(xt,[...a],e.hash(),i.descriptor);for(let l=0;l<a.length;l++)r[l]=a[l];return r.length>a.length&&(r[a.length]=null),i}"toArray(IntFunction)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=(yield*m(e,t,"apply",[0]))??null;return yield*et(i["toArray(T[])"](e,a))})())}get addAllNullMessage(){return\'Cannot invoke "java.util.Collection.iterator()" because "c" is null\'}"addAll(Collection)"(e,t){if(t===null)return e.fail(D,this.addAllNullMessage);if(!this.hashed)return this.addEach(e,t.elements(e,!0).slice());let{items:i,unknown:a}=t.copyItems(e);return h(et(this.addEach(e,i.slice())),r=>(a&&i.length>1&&this.markUnknown(a,i),r))}addEach(e,t){let i=!1,a=null;for(let r=0;r<t.length;r++){let l=this["add(E)"](e,t[r]);if(typeof l=="number"){i||=l===1;continue}let s=this,o=t.slice(r+1),u=l;a=(function*(){let d=(yield*u)===1,f=i||d;for(let p of o){let N=s["add(E)"](e,p);f=(typeof N=="number"?N:yield*N)===1||f}return f})();break}return a?h(a,g):g(i)}};function*xn(n,e,t){if(t===e)return!0;if(!(t instanceof k)||!t.isList)return!1;let i=e.elements(n,!0),a=t.elements(n,!0);if(i.length!==a.length)return!1;n.charge(i.length);for(let r=0;r<i.length;r++)if(!(yield*Q(n,i[r],a[r])))return!1;return!0}var de=class extends k{className="java.util.ArrayList";isList=!0;randomAccess=!0;es=[];modCount=0;get size(){return this.es.length}elements(){return this.es}get contentEquality(){return!0}*contentEquals(e,t){return yield*xn(e,this,t)}*contentHash(e){let t=1;for(let i of this.es)t=Math.imul(31,t)+(yield*A(e,i))|0;return t}#e(e,t){(t<0||t>=this.es.length)&&e.fail(Jl,`Index ${t} out of bounds for length ${this.es.length}`)}"add(E)"(e,t){return e.allocate(1),this.modCount++,this.es.push(t),1}"add(int,E)"(e,t,i){if(t<0||t>this.es.length)return e.fail(Jl,`Index: ${t}, Size: ${this.es.length}`);e.allocate(1),e.charge(this.es.length-t),this.modCount++,this.es.splice(t,0,i)}"get(int)"(e,t){return this.#e(e,t),this.es[t]}"set(int,E)"(e,t,i){this.#e(e,t);let a=this.es[t];return this.es[t]=i,a}"remove(int)"(e,t){return this.#e(e,t),e.charge(this.es.length-t),this.modCount++,this.es.splice(t,1)[0]}"remove(Object)"(e,t){return h(Et(e,this.es,t),i=>i<0?0:(this.modCount++,this.es.splice(i,1),1))}"indexOf(Object)"(e,t){return h(Et(e,this.es,t))}"lastIndexOf(Object)"(e,t){return h(Gl(e,this.es,t))}"clear()"(){this.modCount++,this.es.length=0}"addAll(Collection)"(e,t){if(t===null)return e.fail(D,\'Cannot invoke "java.util.Collection.toArray()" because "c" is null\');let i=t.elements(e,!0).slice();e.allocate(i.length),e.charge(i.length),this.modCount++;for(let a of i)this.es.push(a);return g(i.length>0)}"getFirst()"(e){return this.es.length?this.es[0]:e.fail(he,null)}"getLast()"(e){return this.es.length?this.es[this.es.length-1]:e.fail(he,null)}"removeFirst()"(e){return this.es.length?this["remove(int)"](e,0):e.fail(he,null)}"removeLast()"(e){return this.es.length?this["remove(int)"](e,this.es.length-1):e.fail(he,null)}"addFirst(E)"(e,t){return this["add(int,E)"](e,0,t)}"addLast(E)"(e,t){this["add(E)"](e,t)}"iterator()"(e){return new $a(e.hash(),this,this.iteratorName)}get iteratorName(){return"java.util.ArrayList$Itr"}"sort(Comparator)"(e,t){let i=this.modCount,a=()=>{this.modCount!==i&&e.fail(Ye,null),this.modCount++};return t===null&&!Vt(this.es)?(yn(e,this.es,0,this.es.length),a()):h(St(e,this.es,0,this.es.length,U(e,t)),a)}"forEach(Consumer)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=i.modCount,r=i.es.length;for(let l=0;i.modCount===a&&l<r;l++)yield*m(e,t,"accept",[i.es[l]]);i.modCount!==a&&e.fail(Ye,null)})(),()=>{})}"removeIf(Predicate)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=i.modCount,r=i.es.slice(),l=[];for(let o of r)l.push(L((yield*m(e,t,"test",[o]))??null));if(i.modCount!==a&&e.fail(Ye,null),!l.includes(!0))return!1;let s=r.filter((o,u)=>!l[u]);return i.es.length=0,i.es.push(...s),i.modCount++,!0})(),g)}"replaceAll(UnaryOperator)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=i.modCount,r=i.es.length;for(let l=0;i.modCount===a&&l<r;l++)i.es[l]=(yield*m(e,t,"apply",[i.es[l]]))??null;i.modCount!==a&&e.fail(Ye,null),i.modCount++})(),()=>{})}};function*et(n){return n!==null&&typeof n=="object"&&Symbol.iterator in n?yield*n:n}var $a=class extends b{className;#e;#t=0;#n=-1;#i;constructor(e,t,i){super(e),this.#e=t,this.className=i,this.#i=t.modCount}"hasNext()"(){return g(this.#t!==this.#e.size)}"next()"(e){if(this.#e.modCount!==this.#i)return e.fail(Ye,null);let t=this.#t;return t>=this.#e.size?e.fail(he,null):(this.#t=t+1,this.#n=t,this.#e.es[t])}"remove()"(e){if(this.#n<0)return e.fail("java.lang.IllegalStateException",null);if(this.#e.modCount!==this.#i)return e.fail(Ye,null);this.#e["remove(int)"](e,this.#n),this.#t=this.#n,this.#n=-1,this.#i=this.#e.modCount}},Sn=class extends k{className="java.util.ArrayDeque";get addAllNullMessage(){return\'Cannot invoke "java.util.Collection.size()" because "c" is null\'}#e=new Array(16).fill(null);#t=0;#n=0;mods=0;"forEach(Consumer)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=i.mods;for(let r of i.elements().slice())if(yield*m(e,t,"accept",[r]),i.mods!==a)return e.limitation("changing an ArrayDeque while iterating over it")})(),()=>{})}get size(){return this.#n}at(e){return this.#e[this.#t+e&this.#e.length-1]}elements(){let e=new Array(this.#n);for(let t=0;t<this.#n;t++)e[t]=this.at(t);return e}#i(){let e=this.elements();this.#e=new Array(this.#e.length*2).fill(null),e.forEach((t,i)=>this.#e[i]=t),this.#t=0}addFirst(e,t){t===null&&e.fail(D,null),e.allocate(1),this.#n===this.#e.length&&this.#i(),this.#t=this.#t-1&this.#e.length-1,this.#e[this.#t]=t,this.#n++,this.mods++}addLast(e,t){t===null&&e.fail(D,null),e.allocate(1),this.#n===this.#e.length&&this.#i(),this.#e[this.#t+this.#n&this.#e.length-1]=t,this.#n++,this.mods++}pollFirst(){if(!this.#n)return null;let e=this.#e[this.#t];return this.#e[this.#t]=null,this.#t=this.#t+1&this.#e.length-1,this.#n--,this.mods++,e}pollLast(){if(!this.#n)return null;let e=this.#t+this.#n-1&this.#e.length-1,t=this.#e[e];return this.#e[e]=null,this.#n--,this.mods++,t}removeAt(e){let t=this.elements().slice();t.splice(e,1),this.#e.fill(null),t.forEach((i,a)=>this.#e[a]=i),this.#t=0,this.#n=t.length,this.mods++}#a(e,t,i){if(t===null)return 0;let a=this.elements();return h(i?Gl(e,a,t):Et(e,a,t),r=>r<0?0:(this.removeAt(r),1))}*contains(e,t){return t!==null&&(yield*Et(e,this.elements(),t))>=0}"addFirst(E)"(e,t){this.addFirst(e,t)}"addLast(E)"(e,t){this.addLast(e,t)}"offerFirst(E)"(e,t){return this.addFirst(e,t),1}"offerLast(E)"(e,t){return this.addLast(e,t),1}"add(E)"(e,t){return this.addLast(e,t),1}"offer(E)"(e,t){return this.addLast(e,t),1}"push(E)"(e,t){this.addFirst(e,t)}"pollFirst()"(){return this.pollFirst()}"pollLast()"(){return this.pollLast()}"poll()"(){return this.pollFirst()}"removeFirst()"(e){return this.#n?this.pollFirst():e.fail(he,null)}"removeLast()"(e){return this.#n?this.pollLast():e.fail(he,null)}"pop()"(e){return this["removeFirst()"](e)}"remove()"(e){return this["removeFirst()"](e)}"getFirst()"(e){return this.#n?this.at(0):e.fail(he,null)}"getLast()"(e){return this.#n?this.at(this.#n-1):e.fail(he,null)}"element()"(e){return this["getFirst()"](e)}"peekFirst()"(){return this.#n?this.at(0):null}"peek()"(){return this.#n?this.at(0):null}"peekLast()"(){return this.#n?this.at(this.#n-1):null}"removeFirstOccurrence(Object)"(e,t){return this.#a(e,t,!1)}"remove(Object)"(e,t){return this.#a(e,t,!1)}"removeLastOccurrence(Object)"(e,t){return this.#a(e,t,!0)}"clear()"(){this.#e.fill(null),this.#t=0,this.#n=0,this.mods++}"iterator()"(e){return new ni(e.hash(),this,!1)}"descendingIterator()"(e){return new ni(e.hash(),this,!0)}},ni=class extends b{className;#e;#t;#n=0;#i=-1;#a;constructor(e,t,i){super(e),this.className=i?"java.util.ArrayDeque$DescendingIterator":"java.util.ArrayDeque$DeqIterator",this.#e=t,this.#t=i,this.#a=t.mods}#r(e){this.#e.mods!==this.#a&&e.limitation("changing an ArrayDeque while iterating over it")}"hasNext()"(e){return this.#r(e),g(this.#n<this.#e.size)}"next()"(e){if(this.#r(e),this.#n>=this.#e.size)return e.fail(he,null);let t=this.#t?this.#e.size-1-this.#n:this.#n;return this.#n++,this.#i=t,this.#e.at(t)}"remove()"(e){if(this.#i<0)return e.fail("java.lang.IllegalStateException",null);this.#r(e),this.#e.removeAt(this.#i),this.#t||this.#n--,this.#i=-1,this.#a=this.#e.mods}},Qe=class extends k{className="java.util.PriorityQueue";get addAllNullMessage(){return null}es=[];modCount=0;"forEach(Consumer)"(e,t){if(t===null)return e.fail(D,null);let i=this;return h((function*(){let a=i.modCount,r=i.es.slice();for(let l of r)yield*m(e,t,"accept",[l]);i.modCount!==a&&e.fail(Ye,null)})(),()=>{})}comparator=null;#e=!1;#t(e,t,i,a){return a instanceof c.JObject&&(this.#e=!0),this.comparator===null&&!this.#e?i(e()):h(t(),i)}noteContents(){Vt(this.es)&&(this.#e=!0)}get#n(){return this.comparator!==null||this.#e}*siftUpWith(e,t,i){this.comparator===null&&Fe(e,i);let a=U(e,this.comparator),r=this.es;for(;t>0;){let l=t-1>>>1,s=r[l];if((yield*a(i,s))>=0)break;r[t]=s,t=l}r[t]=i}*siftDownWith(e,t,i,a){this.comparator===null&&Fe(e,i);let r=U(e,this.comparator),l=this.es,s=a>>>1;for(;t<s;){let o=2*t+1,u=l[o],d=o+1;if(d<a&&(yield*r(u,l[d]))>0&&(u=l[o=d]),(yield*r(i,u))<=0)break;l[t]=u,t=o}l[t]=i}*heapifyWith(e){let t=this.es.length;e.charge(t);for(let i=(t>>>1)-1;i>=0;i--)yield*this.siftDownWith(e,i,this.es[i],t)}*removeAtWith(e,t){this.modCount++;let i=this.es.length-1;if(i===t){this.es.pop();return}let a=this.es.pop();yield*this.siftDownWith(e,t,a,i),this.es[t]===a&&(yield*this.siftUpWith(e,t,a))}get size(){return this.es.length}elements(){return this.es}siftUp(e,t,i){Fe(e,i);let a=this.es;for(;t>0;){let r=t-1>>>1,l=a[r];if(ce(e,i,l)>=0)break;a[t]=l,t=r}a[t]=i}siftDown(e,t,i,a){Fe(e,i);let r=this.es,l=a>>>1;for(;t<l;){let s=2*t+1,o=r[s],u=s+1;if(u<a&&ce(e,o,r[u])>0&&(o=r[s=u]),ce(e,i,o)<=0)break;r[t]=o,t=s}r[t]=i}heapify(e){let t=this.es.length;e.charge(t);for(let i=(t>>>1)-1;i>=0;i--)this.siftDown(e,i,this.es[i],t)}removeAt(e,t){this.modCount++;let i=this.es.length-1;if(i===t){this.es.pop();return}let a=this.es.pop();this.siftDown(e,t,a,i),this.es[t]===a&&this.siftUp(e,t,a)}"offer(E)"(e,t){if(t===null)return e.fail(D,null);e.allocate(1),e.charge(Math.log2(this.es.length+1)|0),this.modCount++,this.es.push(null);let i=this.es.length-1;return this.#t(()=>this.siftUp(e,i,t),()=>this.siftUpWith(e,i,t),()=>1,t)}"add(E)"(e,t){return this["offer(E)"](e,t)}"poll()"(e){if(!this.es.length)return null;e.charge(Math.log2(this.es.length)|0),this.modCount++;let t=this.es[0],i=this.es.pop(),a=this.es.length;return a?this.#t(()=>this.siftDown(e,0,i,a),()=>this.siftDownWith(e,0,i,a),()=>t):t}"peek()"(){return this.es.length?this.es[0]:null}"element()"(e){return this.es.length?this.es[0]:e.fail(he,null)}"remove()"(e){return this.es.length?this["poll()"](e):e.fail(he,null)}*contains(e,t){return t!==null&&(yield*Et(e,this.es,t))>=0}"remove(Object)"(e,t){if(t===null)return 0;let i=this;return h((function*(){let a=yield*Et(e,i.es,t);return a<0?!1:(i.#n?yield*i.removeAtWith(e,a):i.removeAt(e,a),!0)})(),g)}"clear()"(){this.modCount++,this.es.length=0}"iterator()"(e){return new Da(e.hash(),this)}heapifyAll(e){return this.#t(()=>this.heapify(e),()=>this.heapifyWith(e),()=>this)}},Da=class extends b{className="java.util.PriorityQueue$Itr";#e;#t=0;#n;constructor(e,t){super(e),this.#e=t,this.#n=t.modCount}"hasNext()"(){return g(this.#t<this.#e.size)}"next()"(e){return this.#e.modCount!==this.#n?e.fail(Ye,null):this.#t<this.#e.size?this.#e.es[this.#t++]:e.fail(he,null)}"remove()"(e){return e.limitation("Iterator.remove() on a PriorityQueue\'s iterator")}},Au=(n,e,t)=>{e<0&&n.fail(Ba,`${t}: ${e}`)},Kl={"Collections.sort(List)":(n,[e])=>e===null?n.fail(D,\'Cannot invoke "java.util.List.sort(java.util.Comparator)" because "list" is null\'):e["sort(Comparator)"](n,null),"Collections.sort(List,Comparator)":(n,[e,t])=>e===null?n.fail(D,\'Cannot invoke "java.util.List.sort(java.util.Comparator)" because "list" is null\'):e["sort(Comparator)"](n,t)},ii={"ArrayList.<init>()":n=>new de(n.hash()),"ArrayList.<init>(int)":(n,[e])=>(Au(n,e,"Illegal Capacity"),new de(n.hash())),"ArrayList.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(D,\'Cannot invoke "java.util.Collection.toArray()" because "c" is null\');let t=new de(n.hash()),i=e.elements(n,!0);return n.allocate(i.length),t.es.push(...i),t},"ArrayDeque.<init>()":n=>new Sn(n.hash()),"ArrayDeque.<init>(int)":n=>new Sn(n.hash()),"ArrayDeque.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(D,\'Cannot invoke "java.util.Collection.size()" because "c" is null\');let t=new Sn(n.hash());for(let i of e.elements(n,!0))t.addLast(n,i);return t},"PriorityQueue.<init>()":n=>new Qe(n.hash()),"PriorityQueue.<init>(int)":(n,[e])=>e<1?n.fail(Ba,null):new Qe(n.hash()),"PriorityQueue.<init>(Comparator)":(n,[e])=>{let t=new Qe(n.hash());return t.comparator=e,t},"PriorityQueue.<init>(int,Comparator)":(n,[e,t])=>{if(e<1)return n.fail(Ba,null);let i=new Qe(n.hash());return i.comparator=t,i},"PriorityQueue.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(D,\'Cannot invoke "java.util.Collection.toArray()" because "c" is null\');let t=new Qe(n.hash()),i=e.elements(n,!0);return n.allocate(i.length),t.es.push(...i),t.noteContents(),e instanceof Qe?(t.comparator=e.comparator,t):i.length===1&&i[0]===null?n.fail(D,null):t.heapifyAll(n)}};var ku="java.util.NoSuchElementException",ri="java.util.ConcurrentModificationException",Ce="java.lang.NullPointerException",Mu="java.lang.IllegalArgumentException",Bu="java.lang.IllegalStateException",Pl="java.lang.UnsupportedOperationException",Je=1<<30,_l=8,Ul=6,$u=64,Ge={identity:"iterating over or printing a HashMap or HashSet whose keys use identity hash codes (objects without hashCode(), enums): the JDK\'s order differs on every run",tree:"iterating over or printing a HashMap or HashSet after keys were removed from a bucket of colliding keys (the JDK\'s order there is not reproduced)",tie:"iterating over or printing a HashMap or HashSet with many keys whose hash codes are equal (the JDK orders them by identity hash code)",copied:"iterating over a HashMap or HashSet filled from a collection whose order differs on every JDK run (Set.of, Map.of, or keys hashed by identity)"};function Du(n,e){return e===null||e instanceof c.JString||e instanceof c.JBox?!1:e instanceof c.JObject?n.hashCodeMethod(e)<0:e instanceof b?!e.contentEquality:!0}function Ja(n,e){return e instanceof c.JObject&&n.hashCodeMethod(e)>=0||e instanceof b&&e.contentEquality}function ai(n){return n^n>>>16}function qt(n){return n===null?0:n instanceof c.JString?ai(Aa(n)):n instanceof c.JBox?ai(Nn(n)):ai(n.hash)}function*zt(n,e){return Ja(n,e)?ai(yield*A(n,e)):qt(e)}function Hl(n){let e=-1>>>Math.clz32(n-1)|0;return e<0?1:e>=Je?Je:e+1}function Fu(n){let e=Math.fround(Math.fround(Math.fround(n)/Math.fround(.75))+1);return e<Je?Math.trunc(e):Je}var li=class{hash;key;value;next=null;before=null;after=null;tree=!1;prev=null;parent=null;left=null;right=null;red=!1;entry=null;constructor(e,t,i){this.hash=e,this.key=t,this.value=i}};function zl(n,e){let t=e.right;if(!t)return n;let i=e.right=t.left;i&&(i.parent=e);let a=t.parent=e.parent;return a?a.left===e?a.left=t:a.right=t:(n=t,t.red=!1),t.left=e,e.parent=t,n}function ql(n,e){let t=e.left;if(!t)return n;let i=e.left=t.right;i&&(i.parent=e);let a=t.parent=e.parent;return a?a.right===e?a.right=t:a.left=t:(n=t,t.red=!1),t.right=e,e.parent=t,n}function Wl(n,e){for(e.red=!0;;){let t=e.parent;if(!t)return e.red=!1,e;let i=t.parent;if(!t.red||!i)return n;if(t===i.left){let a=i.right;a&&a.red?(a.red=!1,t.red=!1,i.red=!0,e=i):(e===t.right&&(e=t,n=zl(n,e),t=e.parent,i=t?t.parent:null),t&&(t.red=!1,i&&(i.red=!0,n=ql(n,i))))}else{let a=i.left;a&&a.red?(a.red=!1,t.red=!1,i.red=!0,e=i):(e===t.left&&(e=t,n=ql(n,e),t=e.parent,i=t?t.parent:null),t&&(t.red=!1,i&&(i.red=!0,n=zl(n,i))))}}}var Yl=n=>n instanceof b&&"entryKey"in n,nt=class n extends b{copyMappings(e){return{mappings:this.mappings(e,!0),unknown:null}}get contentEquality(){return!0}*javaString(e){let t=[],i=this.mappings(e,!0);e.charge(i.length);for(let a of i)t.push(`${yield*V(e,a.entryKey,this,"(this Map)")}=${yield*V(e,a.entryValue,this,"(this Map)")}`);return`{${t.join(", ")}}`}*contentEquals(e,t){if(t===this)return!0;if(!(t instanceof n)||t.size!==this.size)return!1;for(let i of this.mappings(e,!1)){let a=yield*t.lookup(e,i.entryKey);if(a===void 0||(i.entryValue===null?a!==null:!(yield*O(e,i.entryValue,a))))return!1}return!0}*contentHash(e){let t=0;for(let i of this.mappings(e,!1))t=t+((yield*A(e,i.entryKey))^(yield*A(e,i.entryValue)))|0;return t}"size()"(){return this.size}"isEmpty()"(){return g(this.size===0)}},W=class extends nt{className="java.util.HashMap";table=null;#e=0;threshold=0;modCount=0;unknown=null;linked=!1;head=null;tail=null;#t=null;#n=null;#i=null;get size(){return this.#e}initialCapacity(e,t){t<0&&e.fail(Mu,`Illegal initial capacity: ${t}`),this.threshold=Hl(t)}#a(e,t){let i=this.table;if(!i)return null;for(let a=i[i.length-1&e]??null;a;a=a.next)if(a.hash===e&&(a.key===t||t!==null&&pn(t,a.key)))return a;return null}*find(e,t,i){if(i===null||!_t(e,i))return this.#a(t,i);let a=this.table;if(!a)return null;for(let r=a[a.length-1&t]??null;r;r=r.next)if(r.hash===t&&(r.key===i||(yield*O(e,i,r.key))))return r;return null}*getNode(e,t){return yield*this.find(e,yield*zt(e,t),t)}*lookup(e,t){let i=yield*this.getNode(e,t);return i?i.value:void 0}#r(e,t){if(!(Ja(e,t)||t!==null&&_t(e,t)))return this.#a(qt(t),t)}*put(e,t,i,a=!1){let r=yield*zt(e,t),l=yield*this.find(e,r,t);if(l){let s=l.value;return(!a||s===null)&&(l.value=i),this.accessed(l),s}return this.addNode(e,r,t,i),null}accessed(e){}addNode(e,t,i,a){e.allocate(1);let r=this.table;(!r||r.length===0)&&(r=this.resize(e));let l=r.length-1&t,s=new li(t,i,a),o=r[l]??null;if(!o)r[l]=s;else if(o.tree)this.#h(e,r,o,s);else{let u=1,d=o;for(;d.next;)d=d.next,u++;d.next=s,u>=_l&&this.#o(e,r,t)}return this.linked&&(s.before=this.tail,this.tail?this.tail.after=s:this.head=s,this.tail=s),this.modCount++,++this.#e>this.threshold&&this.resize(e),s}resize(e){let t=this.table,i=t?t.length:0,a=this.threshold,r=0,l=0;if(i>0){if(i>=Je)return this.threshold=2147483647,t;r=i<<1,r<Je&&i>=16&&(l=a<<1)}else a>0?r=a:(r=16,l=12);if(l===0){let o=r*.75;l=r<Je&&o<Je?Math.trunc(o):2147483647}this.threshold=l,e.allocate(r-i);let s=new Array(r).fill(null);if(this.table=s,t){e.charge(i);for(let o=0;o<i;o++){let u=t[o];if(u)if(t[o]=null,!u.next)s[u.hash&r-1]=u;else if(u.tree)this.#d(s,o,i,u);else{let d=null,f=null,p=null,N=null;for(let x=u;x;x=x.next)(x.hash&i)===0?(f?f.next=x:d=x,f=x):(N?N.next=x:p=x,N=x);f&&(f.next=null,s[o]=d),N&&(N.next=null,s[o+i]=p)}}}return s}#l(e,t,i){if(i.hash>e)return-1;if(i.hash<e)return 1;let a=i.key;if(t instanceof c.JString&&a instanceof c.JString){let r=$e(t.value,a.value);if(r!==0)return r}else if(t instanceof c.JBox&&a instanceof c.JBox&&t.kind===a.kind){let r=Cn(t,a);if(r!==0)return r}if(t!==null&&a!==null){let r=$e(De(t),De(a));if(r!==0)return r}return this.unknown??=Ge.tie,-1}#s(e,t){let i=null;for(let a=t;a;a=a.next){if(a.left=a.right=null,!i){a.parent=null,a.red=!1,i=a;continue}for(let r=i;;){let l=this.#l(a.hash,a.key,r),s=l<=0?r.left:r.right;if(s){r=s;continue}a.parent=r,l<=0?r.left=a:r.right=a,i=Wl(i,a);break}}this.#c(e,i)}#c(e,t){let i=e.length-1&t.hash,a=e[i]??null;if(t===a)return;let r=t.next,l=t.prev;r&&(r.prev=l),l&&(l.next=r),a&&(a.prev=t),t.next=a,t.prev=null,e[i]=t}#o(e,t,i){if(t.length<$u){this.resize(e);return}let a=t[t.length-1&i]??null,r=null;for(let l=a;l;l=l.next)l.tree=!0,l.prev=r,r=l;a&&this.#s(t,a)}#h(e,t,i,a){let r=i;for(;r.parent;)r=r.parent;for(let l=r;;){let s=this.#l(a.hash,a.key,l),o=s<=0?l.left:l.right;if(o){l=o;continue}a.tree=!0;let u=l.next;a.next=u,l.next=a,a.parent=a.prev=l,u&&(u.prev=a),s<=0?l.left=a:l.right=a,this.#c(t,Wl(r,a));return}}#d(e,t,i,a){let r=null,l=null,s=null,o=null,u=0,d=0;for(let f=a,p;f;f=p)p=f.next,f.next=null,(f.hash&i)===0?(f.prev=l,l?l.next=f:r=f,l=f,u++):(f.prev=o,o?o.next=f:s=f,o=f,d++);r&&(u<=Ul?e[t]=Fa(r):(e[t]=r,s&&this.#s(e,r))),s&&(d<=Ul?e[t+i]=Fa(s):(e[t+i]=s,r&&this.#s(e,s)))}removeNode(e){let t=this.table,i=t.length-1&e.hash;if(e.tree){let r=Fa(t[i]);t[i]=r,this.linked||(this.unknown??=Ge.tree)}let a=t[i]??null;if(a===e)t[i]=e.next;else{for(;a&&a.next!==e;)a=a.next;a&&(a.next=e.next)}this.linked&&(e.before?e.before.after=e.after:this.head=e.after,e.after?e.after.before=e.before:this.tail=e.before,e.before=e.after=null),this.modCount++,this.#e--}*remove(e,t){let i=yield*this.getNode(e,t);return i&&this.removeNode(i),i}clear(){this.modCount++,this.table&&this.#e>0&&(this.#e=0,this.table.fill(null)),this.head=this.tail=null,this.unknown=null}orderProblem(e){if(this.#e<2)return null;if(this.unknown)return this.unknown;if(this.linked)return null;for(let t of this.#u())if(Du(e,t.key))return Ge.identity;return null}#u(){let e=[];if(this.linked){for(let i=this.head;i;i=i.after)e.push(i);return e}let t=this.table;if(!t||this.#e===0)return e;for(let i of t)for(let a=i;a;a=a.next)e.push(a);return e}nodes(e,t){if(t){let i=this.orderProblem(e);i&&e.limitation(i)}return e.charge(this.#e),this.#u()}mappings(e,t){return this.nodes(e,t).map(i=>En(e,i))}copyMappings(e){let t=this.orderProblem(e);return{mappings:this.nodes(e,!1).map(i=>En(e,i)),unknown:t?Ge.copied:null}}firstFrom(e){let t=this.table;if(!t)return{node:null,index:e};for(;e<t.length;){let i=t[e++]??null;if(i)return{node:i,index:e}}return{node:null,index:e}}*putMappings(e,t){let i=t.size;if(i>0)if(this.table)for(;i>this.threshold&&this.table.length<Je;)this.resize(e);else{let l=Fu(i);l>this.threshold&&(this.threshold=Hl(l))}let{mappings:a,unknown:r}=t.copyMappings(e);for(let l of a)yield*this.put(e,l.entryKey,l.entryValue);r&&i>1&&this.copiedInUnknownOrder(r,a.map(l=>l.entryKey))}copiedInUnknownOrder(e,t){if(this.linked){this.unknown??=e;return}let i=new Set(t);for(let a of this.table??[]){let r=0;for(let l=a;l;l=l.next)if(i.has(l.key)&&++r>1){this.unknown??=e;return}}}#f(e){return this.#e>this.threshold||!this.table||this.table.length===0?this.resize(e):this.table}#m(e,t,i,a,r){e.allocate(1);let l=t.length-1&i,s=t[l]??null,o=new li(i,a,r);if(s&&s.tree)this.#h(e,t,s,o);else{let u=0;for(let d=s;d;d=d.next)u++;o.next=s,t[l]=o,u>=_l-1&&this.#o(e,t,i)}this.linked&&(o.before=this.tail,this.tail?this.tail.after=o:this.head=o,this.tail=o),this.modCount++,this.#e++}#g(e,t){this.modCount!==t&&e.fail(ri,null)}#p(e,t){return t===null||!(Ja(e,t)||_t(e,t))}"computeIfAbsent(K,Function)"(e,t,i){if(i===null)return e.fail(Ce,null);let a=(l,s,o,u,d)=>{let f=d??null;return this.#g(e,u),f===null?null:o?(o.value=f,this.accessed(o),f):(this.#m(e,l,s,t,f),f)};if(this.#p(e,t)){let l=qt(t),s=this.#f(e),o=this.#a(l,t);if(o&&o.value!==null)return this.accessed(o),o.value;let u=this.modCount;return gn(e,i,"apply",[t],d=>a(s,l,o,u,d))}let r=this;return h((function*(){let l=yield*zt(e,t),s=r.#f(e),o=yield*r.find(e,l,t);if(o&&o.value!==null)return r.accessed(o),o.value;let u=r.modCount;return a(s,l,o,u,yield*m(e,i,"apply",[t]))})())}"computeIfPresent(K,BiFunction)"(e,t,i){if(i===null)return e.fail(Ce,null);let a=(l,s,o)=>{let u=o??null;return this.#g(e,s),u===null?(this.removeNode(l),null):(l.value=u,this.accessed(l),u)};if(this.#p(e,t)){let l=this.#a(qt(t),t);if(!l||l.value===null)return null;let s=this.modCount;return gn(e,i,"apply",[t,l.value],o=>a(l,s,o))}let r=this;return h((function*(){let l=yield*r.getNode(e,t);if(!l||l.value===null)return null;let s=r.modCount,o=yield*m(e,i,"apply",[t,l.value]);return r.#g(e,s),(o??null)===null&&(yield*zt(e,t)),a(l,s,o)})())}"compute(K,BiFunction)"(e,t,i){if(i===null)return e.fail(Ce,null);let a=(l,s,o,u,d)=>{let f=d??null;return this.#g(e,u),o?f!==null?(o.value=f,this.accessed(o)):this.removeNode(o):f!==null&&this.#m(e,l,s,t,f),f};if(this.#p(e,t)){let l=qt(t),s=this.#f(e),o=this.#a(l,t),u=this.modCount;return gn(e,i,"apply",[t,o?o.value:null],d=>a(s,l,o,u,d))}let r=this;return h((function*(){let l=yield*zt(e,t),s=r.#f(e),o=yield*r.find(e,l,t),u=r.modCount;return a(s,l,o,u,yield*m(e,i,"apply",[t,o?o.value:null]))})())}"merge(K,V,BiFunction)"(e,t,i,a){if(i===null||a===null)return e.fail(Ce,null);let r=(s,o)=>(o!==null?(s.value=o,this.accessed(s)):this.removeNode(s),o);if(this.#p(e,t)){let s=qt(t),o=this.#f(e),u=this.#a(s,t);if(!u)return this.#m(e,o,s,t,i),i;if(u.value===null)return r(u,i);let d=this.modCount;return gn(e,a,"apply",[u.value,i],f=>(this.#g(e,d),r(u,f??null)))}let l=this;return h((function*(){let s=yield*zt(e,t),o=l.#f(e),u=yield*l.find(e,s,t);if(!u)return l.#m(e,o,s,t,i),i;if(u.value===null)return r(u,i);let d=l.modCount,f=(yield*m(e,a,"apply",[u.value,i]))??null;return l.#g(e,d),r(u,f)})())}*each(e,t){let i=this.orderProblem(e);i&&e.limitation(i);let a=this.modCount;if(this.linked)for(let r=this.head;r;r=r.after)yield*t(r);else{let r=this.table;if(this.#e>0&&r)for(let l of r)for(let s=l;s;s=s.next)yield*t(s)}this.modCount!==a&&e.fail(ri,null)}"forEach(BiConsumer)"(e,t){return t===null?e.fail(Ce,null):h(this.each(e,function*(i){yield*m(e,t,"accept",[i.key,i.value])}),()=>{})}"replaceAll(BiFunction)"(e,t){return t===null?e.fail(Ce,null):h(this.each(e,function*(i){i.value=(yield*m(e,t,"apply",[i.key,i.value]))??null}),()=>{})}"get(Object)"(e,t){let i=this.#r(e,t);return i!==void 0?i?i.value:null:h(this.getNode(e,t),a=>a?a.value:null)}"getOrDefault(Object,V)"(e,t,i){let a=this.#r(e,t);return a!==void 0?a?a.value:i:h(this.getNode(e,t),r=>r?r.value:i)}"containsKey(Object)"(e,t){let i=this.#r(e,t);return i!==void 0?g(i!==null):h(this.getNode(e,t),a=>g(a!==null))}"containsValue(Object)"(e,t){let i=this.nodes(e,!1);return h((function*(){for(let a of i)if(a.value===t||t!==null&&(yield*O(e,t,a.value)))return!0;return!1})(),g)}"put(K,V)"(e,t,i){return h(this.put(e,t,i))}"putIfAbsent(K,V)"(e,t,i){return h(this.put(e,t,i,!0))}"remove(Object)"(e,t){return h(this.remove(e,t),i=>i?i.value:null)}"remove(Object,Object)"(e,t,i){let a=this;return h((function*(){let r=yield*a.getNode(e,t);return!r||!(yield*Q(e,r.value,i))?!1:(a.removeNode(r),!0)})(),g)}"replace(K,V)"(e,t,i){return h(this.getNode(e,t),a=>{if(!a)return null;let r=a.value;return a.value=i,this.accessed(a),r})}"replace(K,V,V)"(e,t,i,a){let r=this;return h((function*(){let l=yield*r.getNode(e,t);return!l||!(yield*Q(e,l.value,i))?!1:(l.value=a,r.accessed(l),!0)})(),g)}"putAll(Map)"(e,t){return t===null?e.fail(Ce,\'Cannot invoke "java.util.Map.size()" because "m" is null\'):h(this.putMappings(e,t),()=>{})}"clear()"(){this.clear()}"keySet()"(e){return this.#t??=new Ka(e.hash(),this)}"values()"(e){return this.#n??=new Pa(e.hash(),this)}"entrySet()"(e){return this.#i??=new _a(e.hash(),this)}};function Fa(n){for(let e=n;e;e=e.next)e.tree=!1,e.prev=e.parent=e.left=e.right=null,e.red=!1;return n}var tt=class extends W{className="java.util.LinkedHashMap";linked=!0};function En(n,e){return e.entry??=new Ga(n.hash(),e)}var Ga=class extends b{className="java.util.HashMap$Node";node;constructor(e,t){super(e),this.node=t}get entryKey(){return this.node.key}get entryValue(){return this.node.value}get contentEquality(){return!0}*javaString(e){return yield*Zt(e,this)}*contentEquals(e,t){return yield*Rt(e,this,t)}*contentHash(e){return yield*Xt(e,this)}"getKey()"(){return this.node.key}"getValue()"(){return this.node.value}"setValue(V)"(e,t){let i=this.node.value;return this.node.value=t,i}};function*Zt(n,e){return`${yield*V(n,e.entryKey,e)}=${yield*V(n,e.entryValue,e)}`}function*Rt(n,e,t){return t===e?!0:Yl(t)?(yield*Q(n,e.entryKey,t.entryKey))&&(yield*Q(n,e.entryValue,t.entryValue)):!1}function*Xt(n,e){return(yield*A(n,e.entryKey))^(yield*A(n,e.entryValue))|0}var Rn=class extends k{map;constructor(e,t){super(e),this.map=t}get size(){return this.map.size}#e(e,t){return this.kind==="key"?t.key:this.kind==="value"?t.value:En(e,t)}elements(e,t){return this.map.nodes(e,t).map(i=>this.#e(e,i))}copyItems(e){let t=this.map.orderProblem(e);return{items:this.elements(e,!1),unknown:t?Ge.copied:null}}"add(E)"(e){return e.fail(Pl,null)}"addAll(Collection)"(e){return e.fail(Pl,null)}"clear()"(){this.map.clear()}"iterator()"(e){return new si(e,this.map,this.kind)}"forEach(Consumer)"(e,t){if(t===null)return e.fail(Ce,null);let i=this.kind;return h(this.map.each(e,function*(a){yield*m(e,t,"accept",[i==="key"?a.key:i==="value"?a.value:En(e,a)])}),()=>{})}};function*Ua(n,e,t){if(t===e)return!0;if(!(t instanceof k)||!t.isSet||t.size!==e.size)return!1;for(let i of t.elements(n,!1))if(!(yield*e.contains(n,i)))return!1;return!0}function*Ha(n,e){let t=0;for(let i of e.elements(n,!1))t=t+(yield*A(n,i))|0;return t}var Ka=class extends Rn{kind="key";isSet=!0;get className(){return this.map.linked?"java.util.LinkedHashMap$LinkedKeySet":"java.util.HashMap$KeySet"}get contentEquality(){return!0}*contentEquals(e,t){return yield*Ua(e,this,t)}*contentHash(e){return yield*Ha(e,this)}*contains(e,t){return(yield*this.map.getNode(e,t))!==null}"remove(Object)"(e,t){return h(this.map.remove(e,t),i=>g(i!==null))}},Pa=class extends Rn{kind="value";get className(){return this.map.linked?"java.util.LinkedHashMap$LinkedValues":"java.util.HashMap$Values"}*contains(e,t){for(let i of this.map.nodes(e,!1))if(t===null?i.value===null:yield*O(e,t,i.value))return!0;return!1}"remove(Object)"(e,t){let i=this.map;return h((function*(){for(let a of i.nodes(e,!0))if(t===null?a.value===null:yield*O(e,t,a.value))return i.removeNode(a),!0;return!1})(),g)}},_a=class extends Rn{kind="entry";isSet=!0;get className(){return this.map.linked?"java.util.LinkedHashMap$LinkedEntrySet":"java.util.HashMap$EntrySet"}get contentEquality(){return!0}*contentEquals(e,t){return yield*Ua(e,this,t)}*contentHash(e){return yield*Ha(e,this)}*#e(e,t){if(!Yl(t))return null;let i=yield*this.map.getNode(e,t.entryKey);return i&&(yield*Q(e,i.value,t.entryValue))?i:null}*contains(e,t){return(yield*this.#e(e,t))!==null}"remove(Object)"(e,t){return h(this.#e(e,t),i=>(i&&this.map.removeNode(i),g(i!==null)))}},si=class extends b{className;#e;#t;#n;#i=null;#a=0;#r;constructor(e,t,i){super(e.hash());let a=t.orderProblem(e);a&&e.limitation(a),this.#e=t,this.#t=i;let r=i==="key"?"Key":i==="value"?"Value":"Entry";this.className=t.linked?`java.util.LinkedHashMap$Linked${r}Iterator`:`java.util.HashMap$${r}Iterator`,this.#r=t.modCount,t.linked?this.#n=t.head:t.size>0?{node:this.#n,index:this.#a}=t.firstFrom(0):this.#n=null}"hasNext()"(){return g(this.#n!==null)}"next()"(e){let t=this.#n;return this.#e.modCount!==this.#r?e.fail(ri,null):t?(this.#i=t,this.#e.linked?this.#n=t.after:(this.#n=t.next)===null&&({node:this.#n,index:this.#a}=this.#e.firstFrom(this.#a)),e.charge(1),this.#t==="key"?t.key:this.#t==="value"?t.value:En(e,t)):e.fail(ku,null)}"remove()"(e){let t=this.#i;if(!t)return e.fail(Bu,null);if(this.#e.modCount!==this.#r)return e.fail(ri,null);this.#i=null,this.#e.removeNode(t),this.#r=this.#e.modCount}},Wt=class extends k{className="java.util.HashSet";isSet=!0;hashed=!0;map;constructor(e,t){super(e),this.map=t}get size(){return this.map.size}elements(e,t){return this.map.nodes(e,t).map(i=>i.key)}copyItems(e){let t=this.map.orderProblem(e);return{items:this.elements(e,!1),unknown:t?Ge.copied:null}}markUnknown(e,t){this.map.copiedInUnknownOrder(e,t)}get contentEquality(){return!0}*contentEquals(e,t){return yield*Ua(e,this,t)}*contentHash(e){return yield*Ha(e,this)}*contains(e,t){return(yield*this.map.getNode(e,t))!==null}"contains(Object)"(e,t){return this.map["containsKey(Object)"](e,t)}"add(E)"(e,t){let i=this.map.size;return h(this.map.put(e,t,Ju),()=>g(this.map.size!==i))}"remove(Object)"(e,t){return h(this.map.remove(e,t),i=>g(i!==null))}"clear()"(){this.map.clear()}"iterator()"(e){return new si(e,this.map,"key")}},Ju=null,Vn=class extends Wt{className="java.util.LinkedHashSet"};function Zl(n,e,t){let{items:i,unknown:a}=t.copyItems(n);return h(Gu(e.addEach(n,i)),()=>(a&&i.length>1&&e.markUnknown(a,i),e))}var Xl=\'Cannot invoke "java.util.Collection.size()" because "c" is null\',Ql=\'Cannot invoke "java.util.Map.size()" because "m" is null\',Qt={"HashMap.<init>()":n=>new W(n.hash()),"HashMap.<init>(int)":(n,[e])=>{let t=new W(n.hash());return t.initialCapacity(n,e),t},"HashMap.<init>(Map)":(n,[e])=>{if(e===null)return n.fail(Ce,Ql);let t=new W(n.hash());return h(t.putMappings(n,e),()=>t)},"LinkedHashMap.<init>()":n=>new tt(n.hash()),"LinkedHashMap.<init>(int)":(n,[e])=>{let t=new tt(n.hash());return t.initialCapacity(n,e),t},"LinkedHashMap.<init>(Map)":(n,[e])=>{if(e===null)return n.fail(Ce,Ql);let t=new tt(n.hash());return h(t.putMappings(n,e),()=>t)},"HashSet.<init>()":n=>new Wt(n.hash(),new W(n.hash())),"HashSet.<init>(int)":(n,[e])=>{let t=new W(n.hash());return t.initialCapacity(n,e),new Wt(n.hash(),t)},"HashSet.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(Ce,Xl);let t=new W(n.hash());return t.initialCapacity(n,Math.max(Math.trunc(Math.fround(e.size/Math.fround(.75)))+1,16)),Zl(n,new Wt(n.hash(),t),e)},"LinkedHashSet.<init>()":n=>new Vn(n.hash(),new tt(n.hash())),"LinkedHashSet.<init>(int)":(n,[e])=>{let t=new tt(n.hash());return t.initialCapacity(n,e),new Vn(n.hash(),t)},"LinkedHashSet.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(Ce,Xl);let t=new tt(n.hash());return t.initialCapacity(n,Math.max(2*e.size,11)),Zl(n,new Vn(n.hash(),t),e)}};function*Gu(n){return n!==null&&typeof n=="object"&&Symbol.iterator in n?yield*n:n}var en="java.lang.NullPointerException",oi=class extends je{*javaString(e){return e.limitation("printing a lambda")}},Ke=class extends oi{samKey="compare(T,T)";call(e,t){return this.compare(e,t[0],t[1])}};function lt(n,e,t,i){return U(n,e)(t,i)}function ui(n,e,t){return U(n,null)(e,t)}var tn=class extends Ke{className="java.util.Comparator$$Lambda";#e;#t;constructor(e,t,i){super(e),this.#e=t,this.#t=i}*compare(e,t,i){let a=yield*m(e,this.#e,"apply",[t]),r=yield*m(e,this.#e,"apply",[i]);return this.#t!==void 0?yield*lt(e,this.#t,a,r):a===null?e.fail(en,\'Cannot invoke "java.lang.Comparable.compareTo(Object)" because the return value of "java.util.function.Function.apply(Object)" is null\'):yield*ui(e,a,r)}},rt=class extends Ke{className="java.util.Comparator$$Lambda";#e;#t;constructor(e,t,i){super(e),this.#e=t,this.#t=i}*compare(e,t,i){let a=yield*m(e,this.#e,this.#t,[t]),r=yield*m(e,this.#e,this.#t,[i]);return this.#t==="applyAsDouble"?Xe(a,r):a<r?-1:a>r?1:0}},it=class extends Ke{className="java.util.Comparator$$Lambda";#e;#t;constructor(e,t,i){super(e),this.#e=t,this.#t=i}*compare(e,t,i){let a=yield*lt(e,this.#e,t,i);return a!==0?a:yield*lt(e,this.#t,t,i)}},at=class extends Ke{className;reverse;constructor(e,t){super(e),this.reverse=t,this.className=t?"java.util.Collections$ReverseComparator":"java.util.Comparators$NaturalOrderComparator"}*javaString(e){return this.reverse?`${this.className}@${this.hash.toString(16)}`:"INSTANCE"}*compare(e,t,i){return this.reverse?i===null?e.fail(en,\'Cannot invoke "java.lang.Comparable.compareTo(Object)" because "c2" is null\'):yield*ui(e,i,t):t===null?e.fail(en,\'Cannot invoke "java.lang.Comparable.compareTo(Object)" because "c1" is null\'):yield*ui(e,t,i)}},ci=class extends Ke{className="java.util.Collections$ReverseComparator2";inner;constructor(e,t){super(e),this.inner=t}*javaString(e){return`${this.className}@${this.hash.toString(16)}`}*compare(e,t,i){return yield*lt(e,this.inner,i,t)}},nn=class extends Ke{className="java.util.Comparators$NullComparator";nullFirst;inner;constructor(e,t,i){super(e),this.nullFirst=t,this.inner=i}*javaString(e){return`${this.className}@${this.hash.toString(16)}`}*compare(e,t,i){return t===null?i===null?0:this.nullFirst?-1:1:i===null?this.nullFirst?1:-1:this.inner===null?0:yield*lt(e,this.inner,t,i)}},Yt=class extends Ke{className="java.util.Map$Entry$$Lambda";#e;#t;constructor(e,t,i){super(e),this.#e=t,this.#t=i}*compare(e,t,i){let a=s=>{if(s===null)return e.fail(en,`Cannot invoke "java.util.Map$Entry.${this.#e?"getKey":"getValue"}()" because "c1" is null`);let o=s;return this.#e?o.entryKey:o.entryValue},r=a(t),l=a(i);return this.#t!==null?yield*lt(e,this.#t,r,l):r===null?e.fail(en,`Cannot invoke "java.lang.Comparable.compareTo(Object)" because the return value of "java.util.Map$Entry.${this.#e?"getKey":"getValue"}()" is null`):yield*ui(e,r,l)}};function za(n,e){return e instanceof ci?e.inner:e instanceof at?new at(n.hash(),!e.reverse):e instanceof nn?new nn(n.hash(),!e.nullFirst,e.inner===null?null:za(n,e.inner)):new ci(n.hash(),e)}var w=(n,e)=>{e===null&&n.fail(en,null)},Y=class extends oi{className;samKey;#e;constructor(e,t,i,a){super(e),this.className=t,this.samKey=i,this.#e=a}*call(e,t){return yield*this.#e(e,t)}},es={"Comparator.comparing(Function)":(n,[e])=>(w(n,e),new tn(n.hash(),e)),"Comparator.comparing(Function,Comparator)":(n,[e,t])=>(w(n,e),w(n,t),new tn(n.hash(),e,t)),"Comparator.comparingInt(ToIntFunction)":(n,[e])=>(w(n,e),new rt(n.hash(),e,"applyAsInt")),"Comparator.comparingLong(ToLongFunction)":(n,[e])=>(w(n,e),new rt(n.hash(),e,"applyAsLong")),"Comparator.comparingDouble(ToDoubleFunction)":(n,[e])=>(w(n,e),new rt(n.hash(),e,"applyAsDouble")),"Comparator.naturalOrder()":n=>new at(n.hash(),!1),"Comparator.reverseOrder()":n=>new at(n.hash(),!0),"Comparator.nullsFirst(Comparator)":(n,[e])=>new nn(n.hash(),!0,e),"Comparator.nullsLast(Comparator)":(n,[e])=>new nn(n.hash(),!1,e),"Collections.reverseOrder()":n=>new at(n.hash(),!0),"Collections.reverseOrder(Comparator)":(n,[e])=>e===null?new at(n.hash(),!0):za(n,e),"Entry.comparingByKey()":n=>new Yt(n.hash(),!0,null),"Entry.comparingByValue()":n=>new Yt(n.hash(),!1,null),"Entry.comparingByKey(Comparator)":(n,[e])=>(w(n,e),new Yt(n.hash(),!0,e)),"Entry.comparingByValue(Comparator)":(n,[e])=>(w(n,e),new Yt(n.hash(),!1,e)),"Function.identity()":n=>new Y(n.hash(),"java.util.function.Function$$Lambda","apply(T)",function*(e,[t]){return t}),"UnaryOperator.identity()":n=>new Y(n.hash(),"java.util.function.UnaryOperator$$Lambda","apply(T)",function*(e,[t]){return t}),"Predicate.not(Predicate)":(n,[e])=>(w(n,e),ts(n,e)),"Predicate.isEqual(Object)":(n,[e])=>new Y(n.hash(),"java.util.function.Predicate$$Lambda","test(T)",function*(t,[i]){return g(e===null?i===null:yield*O(t,e,i))}),"BinaryOperator.minBy(Comparator)":(n,[e])=>(w(n,e),new Y(n.hash(),"java.util.function.BinaryOperator$$Lambda","apply(T,U)",function*(t,[i,a]){return(yield*lt(t,e,i,a))<=0?i:a})),"BinaryOperator.maxBy(Comparator)":(n,[e])=>(w(n,e),new Y(n.hash(),"java.util.function.BinaryOperator$$Lambda","apply(T,U)",function*(t,[i,a]){return(yield*lt(t,e,i,a))>=0?i:a}))};function ts(n,e){return new Y(n.hash(),"java.util.function.Predicate$$Lambda","test(T)",function*(t,[i]){return g(!L(yield*m(t,e,"test",[i])))})}var ye={"reversed()":(n,e)=>za(n,e),"thenComparing(Comparator)":(n,e,[t])=>(w(n,t),new it(n.hash(),e,t)),"thenComparing(Function)":(n,e,[t])=>(w(n,t),new it(n.hash(),e,new tn(n.hash(),t))),"thenComparing(Function,Comparator)":(n,e,[t,i])=>(w(n,t),w(n,i),new it(n.hash(),e,new tn(n.hash(),t,i))),"thenComparingInt(ToIntFunction)":(n,e,[t])=>(w(n,t),new it(n.hash(),e,new rt(n.hash(),t,"applyAsInt"))),"thenComparingLong(ToLongFunction)":(n,e,[t])=>(w(n,t),new it(n.hash(),e,new rt(n.hash(),t,"applyAsLong"))),"thenComparingDouble(ToDoubleFunction)":(n,e,[t])=>(w(n,t),new it(n.hash(),e,new rt(n.hash(),t,"applyAsDouble"))),"andThen(Function)":(n,e,[t])=>{w(n,t);let a=(e instanceof c.JLambda||e instanceof je?e.samKey:null)==="apply(T,U)";return new Y(n.hash(),"java.util.function.Function$$Lambda",a?"apply(T,U)":"apply(T)",function*(r,l){let s=yield*m(r,e,"apply",l);return yield*m(r,t,"apply",[s])})},"compose(Function)":(n,e,[t])=>(w(n,t),new Y(n.hash(),"java.util.function.Function$$Lambda","apply(T)",function*(i,[a]){let r=yield*m(i,t,"apply",[a]);return yield*m(i,e,"apply",[r])})),"and(Predicate)":(n,e,[t])=>(w(n,t),new Y(n.hash(),"java.util.function.Predicate$$Lambda","test(T)",function*(i,[a]){return g(L(yield*m(i,e,"test",[a]))&&L(yield*m(i,t,"test",[a])))})),"or(Predicate)":(n,e,[t])=>(w(n,t),new Y(n.hash(),"java.util.function.Predicate$$Lambda","test(T)",function*(i,[a]){return g(L(yield*m(i,e,"test",[a]))||L(yield*m(i,t,"test",[a])))})),"negate()":(n,e)=>ts(n,e),"andThen(Consumer)":(n,e,[t])=>(w(n,t),new Y(n.hash(),"java.util.function.Consumer$$Lambda","accept(T)",function*(i,[a]){yield*m(i,e,"accept",[a]),yield*m(i,t,"accept",[a])})),"forEach(Consumer)":(n,e,[t])=>(w(n,t),h((function*(){let i=yield*H(n,e,"iterator","iterator()",[]);for(;L(yield*H(n,i,"hasNext","hasNext()",[]));){let a=yield*H(n,i,"next","next()",[]);yield*m(n,t,"accept",[a])}})(),()=>{})),"forEachRemaining(Consumer)":(n,e,[t])=>(w(n,t),h((function*(){for(;L(yield*H(n,e,"hasNext","hasNext()",[]));){let i=yield*H(n,e,"next","next()",[]);yield*m(n,t,"accept",[i])}})(),()=>{})),"removeIf(Predicate)":(n,e,[t])=>(w(n,t),h((function*(){let i=!1,a=yield*H(n,e,"iterator","iterator()",[]);for(;L(yield*H(n,a,"hasNext","hasNext()",[]));){let r=yield*H(n,a,"next","next()",[]);L(yield*m(n,t,"test",[r]))&&(yield*H(n,a,"remove","remove()",[]),i=!0)}return i})(),g))};function*H(n,e,t,i,a){if(e instanceof c.JObject)return yield{invoke:n.methodOf(e,t,a.length),args:[e,...a]};if(e instanceof b){let r=Reflect.get(e,i);if(typeof r=="function"){let s=r.call(e,n,...a);return s!==null&&typeof s=="object"&&Symbol.iterator in s?yield*s:s}let l=ye[i];if(l){let s=l(n,e,a);return s!==null&&typeof s=="object"&&Symbol.iterator in s?yield*s:s}}throw new Error(`library: no ${i} on ${String(e)}`)}var $="java.lang.NullPointerException",C="java.lang.UnsupportedOperationException",tr="java.lang.IllegalArgumentException",gi="java.util.NoSuchElementException",fi="java.lang.IndexOutOfBoundsException",is="java.lang.ArrayIndexOutOfBoundsException",nr="iterating over or printing a Set.of, Set.copyOf, Map.of or Map.copyOf of more than one element (the JDK\'s order differs on every run)";function*ir(n,e){let t=1;for(let i of e)t=Math.imul(31,t)+(yield*A(n,i))|0;return t}var Tt=class extends k{isList=!0;get size(){return this.items.length}elements(){return this.items}get contentEquality(){return!0}*contentEquals(e,t){return yield*xn(e,this,t)}*contentHash(e){return yield*ir(e,this.items)}"get(int)"(e,t){return t<0||t>=this.items.length?this.outOfRange(e,t):this.items[t]}"indexOf(Object)"(e,t){return h(this.indexOf(e,t,!1))}"lastIndexOf(Object)"(e,t){return h(this.indexOf(e,t,!0))}*contains(e,t){return(yield*this.indexOf(e,t,!1))>=0}*indexOf(e,t,i){let a=this.items;e.charge(a.length);for(let r=0;r<a.length;r++){let l=i?a.length-1-r:r;if(t===null?a[l]===null:yield*O(e,t,a[l]))return l}return-1}"getFirst()"(e){return this.items.length?this.items[0]:e.fail(gi,null)}"getLast()"(e){return this.items.length?this.items[this.items.length-1]:e.fail(gi,null)}"iterator()"(e){return new Ot(e.hash(),this.items,`${this.className}$Itr`)}"add(E)"(e){return e.fail(C,null)}"add(int,E)"(e){return e.fail(C,null)}"remove(int)"(e){return e.fail(C,null)}"remove(Object)"(e){return e.fail(C,null)}"clear()"(e){return e.fail(C,null)}"addAll(Collection)"(e){return e.fail(C,null)}"addFirst(E)"(e){return e.fail(C,null)}"addLast(E)"(e){return e.fail(C,null)}"removeFirst()"(e){return e.fail(C,null)}"removeLast()"(e){return e.fail(C,null)}"set(int,E)"(e,t,i){return this.setAt(e,t,i)}setAt(e,t,i){return e.fail(C,null)}"sort(Comparator)"(e,t){return this.sortWith(e,t)}sortWith(e,t){return e.fail(C,null)}"removeIf(Predicate)"(e,t){return t===null?e.fail($,null):this.className==="java.util.Collections$EmptyList"?0:this.className==="java.util.Arrays$ArrayList"||this.className==="java.util.Collections$CopiesList"?ye["removeIf(Predicate)"](e,this,[t]):e.fail(C,null)}"replaceAll(UnaryOperator)"(e,t){if(t===null)return e.fail($,null);if(this.className!=="java.util.Arrays$ArrayList")return e.fail(C,null);let i=this.items;return h((function*(){for(let a=0;a<i.length;a++)i[a]=(yield*m(e,t,"apply",[i[a]]))??null})(),()=>{})}},Ot=class extends b{className;#e;#t=0;constructor(e,t,i){super(e),this.#e=t,this.className=i}"hasNext()"(){return g(this.#t<this.#e.length)}"next()"(e){return this.#t>=this.#e.length?e.fail(gi,null):this.#e[this.#t++]}"remove()"(e){return e.fail(C,null)}},st=class extends Tt{className;items;constructor(e,t){super(e),this.items=t,this.className=t.length===1||t.length===2?"java.util.ImmutableCollections$List12":"java.util.ImmutableCollections$ListN"}outOfRange(e,t){return this.items.length===1||this.items.length===2?e.fail(fi,`Index: ${t} Size: ${this.items.length}`):e.fail(is,`Index ${t} out of bounds for length ${this.items.length}`)}*indexOf(e,t,i){return t===null?e.fail($,null):yield*super.indexOf(e,t,i)}"iterator()"(e){return new Ot(e.hash(),this.items,"java.util.ImmutableCollections$ListItr")}},Wa=class extends Tt{className="java.util.Arrays$ArrayList";array;constructor(e,t){super(e),this.array=t}get items(){return this.array.data}outOfRange(e,t){return e.fail(is,`Index ${t} out of bounds for length ${this.items.length}`)}setAt(e,t,i){if(t<0||t>=this.items.length)return this.outOfRange(e,t);if(i!==null&&!e.storable(i,this.array.descriptor))return e.fail("java.lang.ArrayStoreException",e.className(i));let a=this.items[t];return this.items[t]=i,a}sortWith(e,t){return wt(e,this.items,t,()=>{})}"iterator()"(e){return new Ot(e.hash(),this.items,"java.util.Arrays$ArrayItr")}};function wt(n,e,t,i){return t===null&&!Vt(e)?(yn(n,e,0,e.length),i()):h(St(n,e,0,e.length,U(n,t)),i)}var In=class extends Tt{className;items;#e;constructor(e,t,i){super(e),this.#e=t,this.items=i,this.className=t==="empty"?"java.util.Collections$EmptyList":t==="singleton"?"java.util.Collections$SingletonList":"java.util.Collections$CopiesList"}outOfRange(e,t){return this.#e==="empty"?e.fail(fi,`Index: ${t}`):this.#e==="singleton"?e.fail(fi,`Index: ${t}, Size: 1`):e.fail(fi,`Index ${t} out of bounds for length ${this.items.length}`)}},jt=class extends k{className;isSet=!0;#e;#t;#n;#i;constructor(e,t,i,a,r){super(e),this.#e=t,this.#t=i,this.className=a,this.#n=r,this.#i=a.startsWith("java.util.ImmutableCollections")}get size(){return this.#t.length}elements(e,t){return t&&this.#n&&this.#t.length>1&&e.limitation(nr),this.#t}copyItems(e){return{items:this.#t,unknown:this.#n&&this.#t.length>1?Ge.copied:null}}get contentEquality(){return!0}*contentEquals(e,t){if(t===this)return!0;if(!(t instanceof k)||!t.isSet||t.size!==this.size)return!1;for(let i of t.elements(e,!1))if(!(yield*this.contains(e,i)))return!1;return!0}*contentHash(e){let t=0;for(let i of this.#t)t=t+(yield*A(e,i))|0;return t}*contains(e,t){return t===null&&this.#i?this.className.endsWith("Set12")?e.fail($,\'Cannot invoke "Object.equals(Object)" because "o" is null\'):e.fail($,null):(yield*this.#e.getNode(e,t))!==null}"iterator()"(e){return new Ot(e.hash(),this.elements(e,!0),`${this.className}Iterator`)}"add(E)"(e){return e.fail(C,null)}"remove(Object)"(e){return e.fail(C,null)}"clear()"(e){return e.fail(C,null)}"addAll(Collection)"(e){return e.fail(C,null)}"removeIf(Predicate)"(e,t){return t===null?e.fail($,null):this.#t.length===0&&!this.#i?0:e.fail(C,null)}};function*qa(n,e,t,i,a){let r=new W(n.hash()),l=[];for(let o of e){if(o===null)return n.fail($,null);let u=r.size;if(yield*r.put(n,o,null),r.size!==u)l.push(o);else if(a)return n.fail(tr,`duplicate element: ${yield*V(n,o)}`)}let s=t||(l.length===1||l.length===2?"java.util.ImmutableCollections$Set12":"java.util.ImmutableCollections$SetN");return new jt(n.hash(),r,l,s,i)}var Tn=class extends b{className="java.util.KeyValueHolder";entryKey;entryValue;constructor(e,t,i){super(e),this.entryKey=t,this.entryValue=i}get contentEquality(){return!0}*javaString(e){return yield*Zt(e,this)}*contentEquals(e,t){return yield*Rt(e,this,t)}*contentHash(e){return yield*Xt(e,this)}"getKey()"(){return this.entryKey}"getValue()"(){return this.entryValue}"setValue(V)"(e){return e.fail(C,"not supported")}},an=class extends nt{className;#e;#t;#n;constructor(e,t,i,a,r){super(e),this.#e=t,this.#t=i,this.className=a,this.#n=r}get size(){return this.#t.length}mappings(e,t){return t&&this.#n&&this.#t.length>1&&e.limitation(nr),this.#t}copyMappings(e){return{mappings:this.#t,unknown:this.#n&&this.#t.length>1?Ge.copied:null}}#i(e,t){if(this.className.startsWith("java.util.ImmutableCollections"))return this.className.endsWith("Map1")?e.fail($,\'Cannot invoke "Object.equals(Object)" because "o" is null\'):t==="containsKey"?e.fail($,null):e.fail($,\'Cannot invoke "Object.hashCode()" because "pk" is null\')}*lookup(e,t){let i=yield*this.#e.getNode(e,t);return i?i.value:void 0}"get(Object)"(e,t){return t===null&&this.#i(e,"get"),h(this.lookup(e,t),i=>i===void 0?null:i)}"getOrDefault(Object,V)"(e,t,i){return t===null&&this.#i(e,"get"),h(this.lookup(e,t),a=>a===void 0?i:a)}"containsKey(Object)"(e,t){return t===null&&this.#i(e,"containsKey"),h(this.lookup(e,t),i=>g(i!==void 0))}"containsValue(Object)"(e,t){if(t===null&&this.className.startsWith("java.util.ImmutableCollections"))return e.fail($,null);let i=this.#t;return h((function*(){for(let a of i)if(t!==null&&(yield*O(e,t,a.entryValue)))return!0;return!1})(),g)}"keySet()"(e){return new jt(e.hash(),this.#e,this.#t.map(t=>t.entryKey),"java.util.AbstractMap$1",this.#n)}"values()"(e){return new Za(e.hash(),this.#t.map(t=>t.entryValue),this.#n)}"entrySet()"(e){let t=new W(e.hash());return h((function*(i){for(let a of i.#t)yield*t.put(e,a,null);return new jt(e.hash(),t,i.#t,"java.util.ImmutableCollections$MapN$1",i.#n)})(this))}"put(K,V)"(e){return e.fail(C,null)}"putIfAbsent(K,V)"(e){return e.fail(C,null)}"remove(Object)"(e){return e.fail(C,null)}"remove(Object,Object)"(e){return e.fail(C,null)}"replace(K,V)"(e){return e.fail(C,null)}"replace(K,V,V)"(e){return e.fail(C,null)}"putAll(Map)"(e){return e.fail(C,null)}"clear()"(e){return e.fail(C,null)}"computeIfAbsent(K,Function)"(e){return e.fail(C,null)}"computeIfPresent(K,BiFunction)"(e){return e.fail(C,null)}"compute(K,BiFunction)"(e){return e.fail(C,null)}"merge(K,V,BiFunction)"(e){return e.fail(C,null)}"replaceAll(BiFunction)"(e){return e.fail(C,null)}"forEach(BiConsumer)"(e,t){if(t===null)return e.fail($,null);let i=this.mappings(e,!0);return h((function*(){for(let a of i)yield*m(e,t,"accept",[a.entryKey,a.entryValue])})(),()=>{})}},Za=class extends k{className="java.util.AbstractMap$2";#e;#t;constructor(e,t,i){super(e),this.#e=t,this.#t=i}get size(){return this.#e.length}elements(e,t){return t&&this.#t&&this.#e.length>1&&e.limitation(nr),this.#e}"iterator()"(e){return new Ot(e.hash(),this.elements(e,!0),"java.util.AbstractMap$2$1")}"add(E)"(e){return e.fail(C,null)}};function*Xa(n,e,t,i,a){let r=new W(n.hash()),l=[];for(let[o,u]of e){if(o===null||u===null)return n.fail($,null);let d=r.size;if(yield*r.put(n,o,u),r.size!==d)l.push(new Tn(n.hash(),o,u));else if(a)return n.fail(tr,`duplicate key: ${yield*V(n,o)}`)}let s=t||(l.length===1?"java.util.ImmutableCollections$Map1":"java.util.ImmutableCollections$MapN");return new an(n.hash(),r,l,s,i)}var Re=class extends k{className;c;isList;isSet;constructor(e,t,i){super(e),this.c=t,this.className=i,this.isList=t.isList&&i.includes("List"),this.isSet=t.isSet&&i.includes("Set")}get size(){return this.c.size}elements(e,t){return this.c.elements(e,t)}copyItems(e){return this.c.copyItems(e)}*javaString(e){return yield*this.c.javaString(e)}get contentEquality(){return this.isList||this.isSet}*contentEquals(e,t){return t===this||this.contentEquality&&(yield*this.c.contentEquals(e,t))}*contentHash(e){return this.contentEquality?yield*this.c.contentHash(e):this.hash}*contains(e,t){return yield*this.c.contains(e,t)}"get(int)"(e,t){return this.c["get(int)"].call(this.c,e,t)}"indexOf(Object)"(e,t){return this.c["indexOf(Object)"].call(this.c,e,t)}"lastIndexOf(Object)"(e,t){return this.c["lastIndexOf(Object)"].call(this.c,e,t)}"getFirst()"(e){return this.c["getFirst()"].call(this.c,e)}"getLast()"(e){return this.c["getLast()"].call(this.c,e)}"iterator()"(e){let t=this.c["iterator()"](e);return new Qa(e.hash(),t)}"add(E)"(e){return e.fail(C,null)}"add(int,E)"(e){return e.fail(C,null)}"set(int,E)"(e){return e.fail(C,null)}"remove(Object)"(e){return e.fail(C,null)}"remove(int)"(e){return e.fail(C,null)}"clear()"(e){return e.fail(C,null)}"addAll(Collection)"(e){return e.fail(C,null)}"sort(Comparator)"(e){return e.fail(C,null)}"addFirst(E)"(e){return e.fail(C,null)}"addLast(E)"(e){return e.fail(C,null)}"removeFirst()"(e){return e.fail(C,null)}"removeLast()"(e){return e.fail(C,null)}"removeIf(Predicate)"(e){return e.fail(C,null)}"replaceAll(UnaryOperator)"(e){return e.fail(C,null)}"forEach(Consumer)"(e,t){return this.c["forEach(Consumer)"]?.call(this.c,e,t)??ye["forEach(Consumer)"](e,this.c,[t])}},Qa=class extends b{className="java.util.Collections$UnmodifiableCollection$1";#e;constructor(e,t){super(e),this.#e=t}"hasNext()"(e){return this.#e["hasNext()"].call(this.#e,e)}"next()"(e){return this.#e["next()"].call(this.#e,e)}"remove()"(e){return e.fail(C,null)}},Ya=class extends nt{className="java.util.Collections$UnmodifiableMap";m;constructor(e,t){super(e),this.m=t}get size(){return this.m.size}mappings(e,t){return this.m.mappings(e,t)}copyMappings(e){return this.m.copyMappings(e)}*lookup(e,t){return yield*this.m.lookup(e,t)}#e(e,t,...i){return this.m[e].call(this.m,t,...i)}"get(Object)"(e,t){return this.#e("get(Object)",e,t)}"getOrDefault(Object,V)"(e,t,i){return this.#e("getOrDefault(Object,V)",e,t,i)}"containsKey(Object)"(e,t){return this.#e("containsKey(Object)",e,t)}"containsValue(Object)"(e,t){return this.#e("containsValue(Object)",e,t)}"keySet()"(e){return new Re(e.hash(),this.#e("keySet()",e),"java.util.Collections$UnmodifiableSet")}"values()"(e){return new Re(e.hash(),this.#e("values()",e),"java.util.Collections$UnmodifiableCollection")}"entrySet()"(e){return new Re(e.hash(),this.#e("entrySet()",e),"java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet")}"put(K,V)"(e){return e.fail(C,null)}"putIfAbsent(K,V)"(e){return e.fail(C,null)}"remove(Object)"(e){return e.fail(C,null)}"remove(Object,Object)"(e){return e.fail(C,null)}"replace(K,V)"(e){return e.fail(C,null)}"replace(K,V,V)"(e){return e.fail(C,null)}"putAll(Map)"(e){return e.fail(C,null)}"clear()"(e){return e.fail(C,null)}"computeIfAbsent(K,Function)"(e){return e.fail(C,null)}"computeIfPresent(K,BiFunction)"(e){return e.fail(C,null)}"compute(K,BiFunction)"(e){return e.fail(C,null)}"merge(K,V,BiFunction)"(e){return e.fail(C,null)}"replaceAll(BiFunction)"(e){return e.fail(C,null)}"forEach(BiConsumer)"(e,t){return this.#e("forEach(BiConsumer)",e,t)}},hi=n=>[...n.data],ee=(n,e,t)=>(e===null&&n.fail($,t),e);function*It(n,e,t,i){let a=e["set(int,E)"].call(e,n,t,i);return yield*Ku(a)}function er(n,e,t){return e["get(int)"].call(e,n,t)}function*di(n,e,t,i){let a=e.elements(n,!0);if(!a.length)return n.fail(gi,null);let r=a[0];t===null&&Fe(n,r);let l=U(n,t);n.charge(a.length);for(let s=1;s<a.length;s++){let o=a[s],u=t===null&&!(o instanceof c.JObject)&&!(r instanceof c.JObject)?ce(n,o,r):yield*l(o,r);i*u>0&&(r=o)}return r}var ar={"List.of(E[])":(n,[e])=>{let t=hi(e);return t.includes(null)?n.fail($,null):(n.allocate(t.length),new st(n.hash(),t))},"List.copyOf(Collection)":(n,[e])=>{if(e instanceof st)return e;let t=[...ee(n,e,\'Cannot invoke "java.util.Collection.toArray()" because "coll" is null\').elements(n,!0)];return t.includes(null)?n.fail($,null):(n.allocate(t.length),new st(n.hash(),t))},"Set.of(E[])":(n,[e])=>h(qa(n,hi(e),"",!0,!0)),"Set.copyOf(Collection)":(n,[e])=>{if(e instanceof jt&&e.className.startsWith("java.util.ImmutableCollections"))return e;let{items:t}=ee(n,e,\'Cannot invoke "java.util.Collection.toArray()" because "coll" is null\').copyItems(n);return h(qa(n,t,"",!0,!1))},"Map.entry(K,V)":(n,[e,t])=>e===null||t===null?n.fail($,null):new Tn(n.hash(),e,t),"Map.ofEntries(Entry[])":(n,[e])=>{let t=[];for(let i of hi(e)){if(i===null)return n.fail($,null);t.push([i.entryKey,i.entryValue])}return h(Xa(n,t,"",!0,!0))},"Map.copyOf(Map)":(n,[e])=>{if(e===null)return n.fail($,null);if(e instanceof an&&e.className.startsWith("java.util.ImmutableCollections"))return e;let{mappings:t}=e.copyMappings(n);return h(Xa(n,t.map(i=>[i.entryKey,i.entryValue]),"",!0,!1))},"Arrays.asList(T[])":(n,[e])=>new Wa(n.hash(),e),"Collections.emptyList()":n=>new In(n.hash(),"empty",[]),"Collections.singletonList(T)":(n,[e])=>new In(n.hash(),"singleton",[e]),"Collections.nCopies(int,T)":(n,[e,t])=>e<0?n.fail(tr,`List length = ${e}`):(n.allocate(e),new In(n.hash(),"copies",new Array(e).fill(t))),"Collections.emptySet()":n=>h(qa(n,[],"java.util.Collections$EmptySet",!1,!1)),"Collections.singleton(T)":(n,[e])=>{let t=new W(n.hash());return h(t.put(n,e,null),()=>new jt(n.hash(),t,[e],"java.util.Collections$SingletonSet",!1))},"Collections.emptyMap()":n=>new an(n.hash(),new W(n.hash()),[],"java.util.Collections$EmptyMap",!1),"Collections.singletonMap(K,V)":(n,[e,t])=>{let i=new W(n.hash());return h(i.put(n,e,t),()=>new an(n.hash(),i,[new Tn(n.hash(),e,t)],"java.util.Collections$SingletonMap",!1))},"Collections.unmodifiableList(List)":(n,[e])=>{let t=ee(n,e,null);return new Re(n.hash(),t,t.randomAccess?"java.util.Collections$UnmodifiableRandomAccessList":"java.util.Collections$UnmodifiableList")},"Collections.unmodifiableSet(Set)":(n,[e])=>new Re(n.hash(),ee(n,e,null),"java.util.Collections$UnmodifiableSet"),"Collections.unmodifiableCollection(Collection)":(n,[e])=>new Re(n.hash(),ee(n,e,null),"java.util.Collections$UnmodifiableCollection"),"Collections.unmodifiableMap(Map)":(n,[e])=>e===null?n.fail($,null):new Ya(n.hash(),e),"Collections.reverse(List)":(n,[e])=>{let t=ee(n,e,\'Cannot invoke "java.util.List.size()" because "list" is null\');return h((function*(){let i=t.size;for(let a=0,r=i-1;a<r;a++,r--){let l=er(n,t,a);yield*It(n,t,a,yield*It(n,t,r,l))}})(),()=>{})},"Collections.swap(List,int,int)":(n,[e,t,i])=>{let a=ee(n,e,\'Cannot invoke "java.util.List.get(int)" because "l" is null\');return h((function*(){let r=er(n,a,t);yield*It(n,a,t,yield*It(n,a,i,r))})(),()=>{})},"Collections.max(Collection)":(n,[e])=>h(di(n,ee(n,e,\'Cannot invoke "java.util.Collection.iterator()" because "coll" is null\'),null,1)),"Collections.min(Collection)":(n,[e])=>h(di(n,ee(n,e,\'Cannot invoke "java.util.Collection.iterator()" because "coll" is null\'),null,-1)),"Collections.max(Collection,Comparator)":(n,[e,t])=>h(di(n,ee(n,e,\'Cannot invoke "java.util.Collection.iterator()" because "coll" is null\'),t,1)),"Collections.min(Collection,Comparator)":(n,[e,t])=>h(di(n,ee(n,e,\'Cannot invoke "java.util.Collection.iterator()" because "coll" is null\'),t,-1)),"Collections.frequency(Collection,Object)":(n,[e,t])=>{let i=ee(n,e,\'Cannot invoke "java.util.Collection.iterator()" because "c" is null\').elements(n,!1);return h((function*(){let a=0;n.charge(i.length);for(let r of i)(t===null?r===null:yield*O(n,t,r))&&a++;return a})())},"Collections.addAll(Collection,T[])":(n,[e,t])=>ee(n,e,\'Cannot invoke "java.util.Collection.add(Object)" because "c" is null\').addEach(n,hi(t)),"Collections.fill(List,T)":(n,[e,t])=>{let i=ee(n,e,\'Cannot invoke "java.util.List.size()" because "list" is null\');return h((function*(){for(let a=0;a<i.size;a++)yield*It(n,i,a,t)})(),()=>{})},"Collections.shuffle(List,Random)":(n,[e,t])=>ns(n,e,t),"Collections.shuffle(List)":(n,[e])=>ns(n,e,null)};for(let n=0;n<=10;n++){let e=`Map.of(${Array.from({length:n},()=>"K,V").join(",")})`;ar[e]=(t,i)=>{let a=[];for(let r=0;r<n;r++)a.push([i[2*r],i[2*r+1]]);return h(Xa(t,a,"",!0,!0))}}function ns(n,e,t){let i=ee(n,e,\'Cannot invoke "java.util.List.size()" because "list" is null\'),a=t??rr.make(n);return h((function*(){for(let r=i.size;r>1;r--){let l=a["nextInt(int)"](n,r),s=er(n,i,r-1);yield*It(n,i,r-1,yield*It(n,i,l,s))}})(),()=>{})}var rr={make:()=>null};function*Ku(n){return n!==null&&typeof n=="object"&&Symbol.iterator in n?yield*n:n}var lr="java.util.NoSuchElementException",mi="java.util.ConcurrentModificationException",Pu="java.lang.IllegalStateException",as="java.lang.IndexOutOfBoundsException",Le="java.lang.ArrayIndexOutOfBoundsException",pi=class extends de{className="java.util.LinkedList";randomAccess=!1;get iteratorName(){return"java.util.LinkedList$ListItr"}#e(e,t){(t<0||t>=this.es.length)&&e.fail(as,`Index: ${t}, Size: ${this.es.length}`)}"get(int)"(e,t){return this.#e(e,t),this.es[t]}"set(int,E)"(e,t,i){this.#e(e,t);let a=this.es[t];return this.es[t]=i,a}"remove(int)"(e,t){return this.#e(e,t),this.modCount++,this.es.splice(t,1)[0]}"add(int,E)"(e,t,i){if(t<0||t>this.es.length)return e.fail(as,`Index: ${t}, Size: ${this.es.length}`);e.allocate(1),this.modCount++,this.es.splice(t,0,i)}"sort(Comparator)"(e,t){return wt(e,this.es,t,()=>{})}"offer(E)"(e,t){return this["add(E)"](e,t)}"offerFirst(E)"(e,t){return this["add(int,E)"](e,0,t),1}"offerLast(E)"(e,t){return this["add(E)"](e,t)}"push(E)"(e,t){this["add(int,E)"](e,0,t)}"pop()"(e){return this["removeFirst()"](e)}"remove()"(e){return this["removeFirst()"](e)}"element()"(e){return this["getFirst()"](e)}"peek()"(){return this.es.length?this.es[0]:null}"peekFirst()"(){return this.es.length?this.es[0]:null}"peekLast()"(){return this.es.length?this.es[this.es.length-1]:null}"poll()"(e){return this.es.length?this["removeFirst()"](e):null}"pollFirst()"(e){return this.es.length?this["removeFirst()"](e):null}"pollLast()"(e){return this.es.length?this["removeLast()"](e):null}"removeFirstOccurrence(Object)"(e,t){return this["remove(Object)"](e,t)}"removeLastOccurrence(Object)"(e,t){let i=this;return h((function*(){for(let a=i.es.length-1;a>=0;a--)if(yield*Q(e,t,i.es[a]))return i.modCount++,i.es.splice(a,1),!0;return!1})(),g)}"descendingIterator()"(e){return new sr(e.hash(),this)}"forEach(Consumer)"(e,t){return ye["forEach(Consumer)"](e,this,[t])}"removeIf(Predicate)"(e,t){return ye["removeIf(Predicate)"](e,this,[t])}"replaceAll(UnaryOperator)"(e,t){if(t===null)return e.fail("java.lang.NullPointerException",null);let i=this;return h((function*(){let a=i.modCount;for(let r=0;r<i.es.length;r++){i.modCount!==a&&e.fail(mi,null);let l=(yield*m(e,t,"apply",[i.es[r]]))??null;i.modCount!==a&&e.fail(mi,null),i.es[r]=l}})(),()=>{})}},sr=class extends b{className="java.util.LinkedList$DescendingIterator";#e;#t;#n=-1;#i;constructor(e,t){super(e),this.#e=t,this.#t=t.es.length,this.#i=t.modCount}"hasNext()"(){return g(this.#t>0)}"next()"(e){return this.#e.modCount!==this.#i?e.fail(mi,null):this.#t<=0?e.fail(lr,null):(this.#n=--this.#t,this.#e.es[this.#t])}"remove()"(e){if(this.#n<0)return e.fail(Pu,null);if(this.#e.modCount!==this.#i)return e.fail(mi,null);this.#e["remove(int)"](e,this.#n),this.#n=-1,this.#i=this.#e.modCount}},or=class extends de{className="java.util.Stack";capacity=10;get iteratorName(){return"java.util.Vector$Itr"}#e(e){e>this.capacity&&(this.capacity=Math.max(this.capacity*2,e))}#t(e,t){t>=this.es.length&&e.fail(Le,`Array index out of range: ${t}`),t<0&&e.fail(Le,`Index ${t} out of bounds for length ${this.capacity}`)}"add(E)"(e,t){return this.#e(this.es.length+1),super["add(E)"](e,t)}"add(int,E)"(e,t,i){if(t>this.es.length)return e.fail(Le,`${t} > ${this.es.length}`);if(t<0)return e.fail(Le,`arraycopy: source index ${t} out of bounds for object array[${this.capacity}]`);this.#e(this.es.length+1),e.allocate(1),this.modCount++,this.es.splice(t,0,i)}addEach(e,t){return this.#e(this.es.length+t.length),super.addEach(e,t)}"addAll(Collection)"(e,t){return t!==null&&this.#e(this.es.length+t.size),super["addAll(Collection)"](e,t)}"get(int)"(e,t){return this.#t(e,t),this.es[t]}"set(int,E)"(e,t,i){this.#t(e,t);let a=this.es[t];return this.es[t]=i,a}"remove(int)"(e,t){return this.#t(e,t),this.modCount++,this.es.splice(t,1)[0]}"push(E)"(e,t){return this["add(E)"](e,t),t}"pop()"(e){return this.es.length?(this.modCount++,this.es.pop()):e.fail("java.util.EmptyStackException",null)}"peek()"(e){return this.es.length?this.es[this.es.length-1]:e.fail("java.util.EmptyStackException",null)}"empty()"(){return g(this.es.length===0)}"search(Object)"(e,t){let i=this;return h((function*(){for(let a=i.es.length-1;a>=0;a--)if(yield*Q(e,t,i.es[a]))return i.es.length-a;return-1})())}"capacity()"(){return this.capacity}"firstElement()"(e){return this.es.length?this.es[0]:e.fail(lr,null)}"lastElement()"(e){return this.es.length?this.es[this.es.length-1]:e.fail(lr,null)}"elementAt(int)"(e,t){return t>=this.es.length?e.fail(Le,`${t} >= ${this.es.length}`):t<0?e.fail(Le,`Index ${t} out of bounds for length ${this.capacity}`):this.es[t]}"setElementAt(E,int)"(e,t,i){if(i>=this.es.length)return e.fail(Le,`${i} >= ${this.es.length}`);if(i<0)return e.fail(Le,`Index ${i} out of bounds for length ${this.capacity}`);this.es[i]=t}"insertElementAt(E,int)"(e,t,i){return this["add(int,E)"](e,i,t)}"removeElementAt(int)"(e,t){if(t>=this.es.length)return e.fail(Le,`${t} >= ${this.es.length}`);if(t<0)return e.fail(Le,`Array index out of range: ${t}`);this.modCount++,this.es.splice(t,1)}"addElement(E)"(e,t){this["add(E)"](e,t)}"removeElement(Object)"(e,t){return this["remove(Object)"](e,t)}"removeAllElements()"(){this.modCount++,this.es.length=0}},rs={"LinkedList.<init>()":n=>new pi(n.hash()),"LinkedList.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail("java.lang.NullPointerException",\'Cannot invoke "java.util.Collection.toArray()" because "c" is null\');let t=new pi(n.hash()),i=e.elements(n,!0);return n.allocate(i.length),t.es.push(...i),t},"Stack.<init>()":n=>new or(n.hash())};var ss="java.util.NoSuchElementException",bi="java.util.ConcurrentModificationException",re="java.lang.NullPointerException",On="java.lang.IllegalArgumentException",_u="java.lang.IllegalStateException",hr="java.lang.UnsupportedOperationException",Ni=class extends b{className="java.util.TreeMap$Entry";key;value;left=null;right=null;parent;black=!0;constructor(e,t,i,a){super(e),this.key=t,this.value=i,this.parent=a}get entryKey(){return this.key}get entryValue(){return this.value}get contentEquality(){return!0}*javaString(e){return yield*Zt(e,this)}*contentEquals(e,t){return yield*Rt(e,this,t)}*contentHash(e){return yield*Xt(e,this)}"getKey()"(){return this.key}"getValue()"(){return this.value}"setValue(V)"(e,t){let i=this.value;return this.value=t,i}},ur=class extends b{className="java.util.AbstractMap$SimpleImmutableEntry";entryKey;entryValue;constructor(e,t,i){super(e),this.entryKey=t,this.entryValue=i}get contentEquality(){return!0}*javaString(e){return yield*Zt(e,this)}*contentEquals(e,t){return yield*Rt(e,this,t)}*contentHash(e){return yield*Xt(e,this)}"getKey()"(){return this.entryKey}"getValue()"(){return this.entryValue}"setValue(V)"(e){return e.fail(hr,null)}};function jn(n,e,t){return e instanceof c.JBox&&t instanceof c.JBox&&e.kind===t.kind&&e.kind!=="double"&&e.kind!=="boolean"?e.value<t.value?-1:e.value>t.value?1:0:e instanceof c.JString&&t instanceof c.JString?$e(e.value,t.value):ce(n,e,t)}var fe=n=>n?n.black:!0,S=n=>n?n.parent:null,Se=n=>n?n.left:null,Ae=n=>n?n.right:null,j=(n,e)=>{n&&(n.black=e)};function Ln(n){if(!n)return null;if(n.right){let i=n.right;for(;i.left;)i=i.left;return i}let e=n.parent,t=n;for(;e&&t===e.right;)t=e,e=e.parent;return e}function vi(n){if(!n)return null;if(n.left){let i=n.left;for(;i.right;)i=i.right;return i}let e=n.parent,t=n;for(;e&&t===e.left;)t=e,e=e.parent;return e}var rn=class{root=null;size=0;modCount=0;comparator;order;constructor(e,t=null){this.comparator=e,this.order=t}#e=null;compare(e,t,i){return this.order?Yn(this.order(t,i)):this.comparator===null&&(t instanceof c.JString||t instanceof c.JBox)?Yn(jn(e,t,i)):this.comparator===null&&t===null?e.fail(re,\'Cannot invoke "java.lang.Comparable.compareTo(Object)" because "k1" is null\'):(this.#e??=U(e,this.comparator))(t,i)}#t(e){return this.comparator===null&&(e instanceof c.JString||e instanceof c.JBox)}*find(e,t){if(this.comparator===null&&t===null)return e.fail(re,null);let i=this.#t(t),a=this.root;for(;a;){let r=i?jn(e,t,a.key):yield*this.compare(e,t,a.key);if(r<0)a=a.left;else if(r>0)a=a.right;else return a}return null}*above(e,t,i){let a=this.#t(t),r=this.root,l=null;for(;r;){let s=a?jn(e,t,r.key):yield*this.compare(e,t,r.key);if(s<0||s===0&&i){if(s===0)return r;l=r,r=r.left}else r=r.right}return l}*below(e,t,i){let a=this.#t(t),r=this.root,l=null;for(;r;){let s=a?jn(e,t,r.key):yield*this.compare(e,t,r.key);if(s>0||s===0&&i){if(s===0)return r;l=r,r=r.right}else r=r.left}return l}first(){let e=this.root;if(e)for(;e.left;)e=e.left;return e}last(){let e=this.root;if(e)for(;e.right;)e=e.right;return e}*put(e,t,i,a=!1){let r=this.root;if(!r){yield*this.compare(e,t,t),e.allocate(1),this.root=new Ni(e.hash(),t,i,null),this.size=1,this.modCount++;return}if(this.comparator===null&&t===null)return e.fail(re,null);let l=this.#t(t),s,o;do if(s=r,o=l?jn(e,t,r.key):yield*this.compare(e,t,r.key),o<0)r=r.left;else if(o>0)r=r.right;else{let d=r.value;return(!a||d===null)&&(r.value=i),d}while(r);e.allocate(1);let u=new Ni(e.hash(),t,i,s);o<0?s.left=u:s.right=u,this.#a(u),this.size++,this.modCount++}#n(e){if(!e)return;let t=e.right;e.right=t.left,t.left&&(t.left.parent=e),t.parent=e.parent,e.parent?e.parent.left===e?e.parent.left=t:e.parent.right=t:this.root=t,t.left=e,e.parent=t}#i(e){if(!e)return;let t=e.left;e.left=t.right,t.right&&(t.right.parent=e),t.parent=e.parent,e.parent?e.parent.right===e?e.parent.right=t:e.parent.left=t:this.root=t,t.right=e,e.parent=t}#a(e){for(e.black=!1;e&&e!==this.root&&!e.parent.black;)if(S(e)===Se(S(S(e)))){let t=Ae(S(S(e)));fe(t)?(e===Ae(S(e))&&(e=S(e),this.#n(e)),j(S(e),!0),j(S(S(e)),!1),this.#i(S(S(e)))):(j(S(e),!0),j(t,!0),j(S(S(e)),!1),e=S(S(e)))}else{let t=Se(S(S(e)));fe(t)?(e===Se(S(e))&&(e=S(e),this.#i(e)),j(S(e),!0),j(S(S(e)),!1),this.#n(S(S(e)))):(j(S(e),!0),j(t,!0),j(S(S(e)),!1),e=S(S(e)))}this.root.black=!0}delete(e){if(this.modCount++,this.size--,e.left&&e.right){let i=Ln(e);e.key=i.key,e.value=i.value,e=i}let t=e.left??e.right;t?(t.parent=e.parent,e.parent?e===e.parent.left?e.parent.left=t:e.parent.right=t:this.root=t,e.left=e.right=e.parent=null,e.black&&this.#r(t)):e.parent?(e.black&&this.#r(e),e.parent&&(e===e.parent.left?e.parent.left=null:e===e.parent.right&&(e.parent.right=null),e.parent=null)):this.root=null}#r(e){let t=e;for(;t!==this.root&&fe(t);)if(t===Se(S(t))){let i=Ae(S(t));fe(i)||(j(i,!0),j(S(t),!1),this.#n(S(t)),i=Ae(S(t))),fe(Se(i))&&fe(Ae(i))?(j(i,!1),t=S(t)):(fe(Ae(i))&&(j(Se(i),!0),j(i,!1),this.#i(i),i=Ae(S(t))),j(i,fe(S(t))),j(S(t),!0),j(Ae(i),!0),this.#n(S(t)),t=this.root)}else{let i=Se(S(t));fe(i)||(j(i,!0),j(S(t),!1),this.#i(S(t)),i=Se(S(t))),fe(Ae(i))&&fe(Se(i))?(j(i,!1),t=S(t)):(fe(Se(i))&&(j(Ae(i),!0),j(i,!1),this.#n(i),i=Se(S(t))),j(i,fe(S(t))),j(S(t),!0),j(Se(i),!0),this.#i(S(t)),t=this.root)}j(t,!0)}clear(){this.modCount++,this.size=0,this.root=null}},Pe=class n extends nt{className;tree;lo;hi;descending;ctx;constructor(e,t,i,a,r,l){super(e.hash()),this.ctx=e,this.tree=t,this.lo=i,this.hi=a,this.descending=r,this.className=l??(r?"java.util.TreeMap$DescendingSubMap":"java.util.TreeMap$AscendingSubMap")}get whole(){return!this.lo&&!this.hi}*tooLow(e,t){if(!this.lo)return!1;let i=yield*this.tree.compare(e,t,this.lo.key);return i<0||i===0&&!this.lo.inclusive}*tooHigh(e,t){if(!this.hi)return!1;let i=yield*this.tree.compare(e,t,this.hi.key);return i>0||i===0&&!this.hi.inclusive}*inRange(e,t){return!(yield*this.tooLow(e,t))&&!(yield*this.tooHigh(e,t))}*absLowest(e){let t=this.lo?yield*this.tree.above(e,this.lo.key,this.lo.inclusive):this.tree.first();return!t||(yield*this.tooHigh(e,t.key))?null:t}*absHighest(e){let t=this.hi?yield*this.tree.below(e,this.hi.key,this.hi.inclusive):this.tree.last();return!t||(yield*this.tooLow(e,t.key))?null:t}*#e(e,t,i,a){if(i){if(yield*this.tooLow(e,t))return yield*this.absLowest(e);let l=yield*this.tree.above(e,t,a);return!l||(yield*this.tooHigh(e,l.key))?null:l}if(yield*this.tooHigh(e,t))return yield*this.absHighest(e);let r=yield*this.tree.below(e,t,a);return!r||(yield*this.tooLow(e,r.key))?null:r}*firstNode(e){return this.descending?yield*this.absHighest(e):yield*this.absLowest(e)}*lastNode(e){return this.descending?yield*this.absLowest(e):yield*this.absHighest(e)}*near(e,t,i,a){return yield*this.#e(e,t,i!==this.descending,a)}*#t(e){let t=yield*this.firstNode(e),i;return this.descending?i=this.lo?yield*this.tree.below(e,this.lo.key,!this.lo.inclusive):null:i=this.hi?yield*this.tree.above(e,this.hi.key,!this.hi.inclusive):null,{first:t,fence:i}}*nodes(e){let t=[],{first:i,fence:a}=yield*this.#t(e);for(let r=i;r&&r!==a;r=this.descending?vi(r):Ln(r))t.push(r);return e.charge(t.length),t}#n(e){let i=this.nodes(e).next();return i.done?i.value:e.limitation("copying a TreeMap or TreeSet view whose range the program\'s comparator decides")}*javaString(e){let t=[];for(let i of yield*this.nodes(e))t.push(`${yield*V(e,i.key,this,"(this Map)")}=${yield*V(e,i.value,this,"(this Map)")}`);return`{${t.join(", ")}}`}get size(){return this.sizeNow(this.ctx)}sizeNow(e){return this.whole?this.tree.size:this.#n(e).length}mappings(e){return this.#n(e)}*lookup(e,t){if(!this.whole&&!(yield*this.inRange(e,t)))return;let i=yield*this.tree.find(e,t);return i?i.value:void 0}iterator(e,t){return h(this.#t(e),({first:i,fence:a})=>new cr(e.hash(),this,i,a,t))}*view(e,t,i,a){let[r,l]=this.descending?[i,t]:[t,i];if(r&&!this.whole&&!(yield*this.#i(e,r)))return e.fail(On,`${this.descending?"toKey":"fromKey"} out of range`);if(l&&!this.whole&&!(yield*this.#i(e,l)))return e.fail(On,`${this.descending?"fromKey":"toKey"} out of range`);if(r??=this.lo,l??=this.hi,r&&l){if((yield*this.tree.compare(e,r.key,l.key))>0)return e.fail(On,"fromKey > toKey")}else r?yield*this.tree.compare(e,r.key,r.key):l&&(yield*this.tree.compare(e,l.key,l.key));return new n(e,this.tree,r,l,a)}*#i(e,t){if(this.lo){let i=yield*this.tree.compare(e,t.key,this.lo.key);if(i<0||i===0&&!this.lo.inclusive&&t.inclusive)return!1}if(this.hi){let i=yield*this.tree.compare(e,t.key,this.hi.key);if(i>0||i===0&&!this.hi.inclusive&&t.inclusive)return!1}return!0}"size()"(e=this.ctx){return this.whole?this.tree.size:h(this.nodes(e),t=>t.length)}"isEmpty()"(e=this.ctx){return this.whole?g(this.tree.size===0):h(this.firstNode(e),t=>g(t===null))}"get(Object)"(e,t){return h(this.lookup(e,t),i=>i===void 0?null:i)}"getOrDefault(Object,V)"(e,t,i){return h(this.lookup(e,t),a=>a===void 0?i:a)}"containsKey(Object)"(e,t){return h(this.lookup(e,t),i=>g(i!==void 0))}"containsValue(Object)"(e,t){let i=this;return h((function*(){for(let a of yield*i.nodes(e))if(t===null?a.value===null:yield*O(e,t,a.value))return!0;return!1})(),g)}*#a(e,t,i,a){if(!this.whole&&!(yield*this.inRange(e,t)))return e.fail(On,"key out of range");let r=yield*this.tree.put(e,t,i,a);return r===void 0?null:r}"put(K,V)"(e,t,i){return h(this.#a(e,t,i,!1))}"putIfAbsent(K,V)"(e,t,i){return h(this.#a(e,t,i,!0))}*removeKey(e,t){if(!this.whole&&!(yield*this.inRange(e,t)))return null;let i=yield*this.tree.find(e,t);if(!i)return null;let a=i.value;return this.tree.delete(i),{value:a}}"remove(Object)"(e,t){return h(this.removeKey(e,t),i=>i?i.value:null)}"remove(Object,Object)"(e,t,i){let a=this;return h((function*(){if(!a.whole&&!(yield*a.inRange(e,t)))return!1;let r=yield*a.tree.find(e,t);return!r||!(i===null?r.value===null:yield*O(e,i,r.value))?!1:(a.tree.delete(r),!0)})(),g)}"replace(K,V)"(e,t,i){let a=this;return h((function*(){if(!a.whole&&!(yield*a.inRange(e,t)))return null;let r=yield*a.tree.find(e,t);if(!r)return null;let l=r.value;return r.value=i,l})())}"replace(K,V,V)"(e,t,i,a){let r=this;return h((function*(){if(!r.whole&&!(yield*r.inRange(e,t)))return!1;let l=yield*r.tree.find(e,t);return!l||!(i===null?l.value===null:yield*O(e,i,l.value))?!1:(l.value=a,!0)})(),g)}"putAll(Map)"(e,t){if(t===null)return e.fail(re,\'Cannot invoke "java.util.Map.size()" because "map" is null\');let i=this;return h((function*(){for(let a of t.copyMappings(e).mappings)yield*i.#a(e,a.entryKey,a.entryValue,!1)})(),()=>{})}"clear()"(e){if(this.whole){this.tree.clear();return}return h(this.#r(e),()=>{})}*#r(e){let{first:t,fence:i}=yield*this.#t(e),a=i?i.key:void 0,r=t;for(;r&&(a===void 0||r.key!==a);){let l=this.descending?vi(r):Ln(r);!this.descending&&r.left&&r.right&&(l=r),this.tree.delete(r),r=l}}*#l(e,t){let i=this.tree,a=i.modCount,{first:r,fence:l}=yield*this.#t(e),s=l?l.key:void 0;for(let o=r;o&&(s===void 0||o.key!==s);o=this.descending?vi(o):Ln(o))yield*t(o),i.modCount!==a&&e.fail(bi,null)}"forEach(BiConsumer)"(e,t){return t===null?e.fail(re,null):h(this.#l(e,function*(i){yield*m(e,t,"accept",[i.key,i.value])}),()=>{})}"replaceAll(BiFunction)"(e,t){return t===null?e.fail(re,null):h(this.#l(e,function*(i){i.value=(yield*m(e,t,"apply",[i.key,i.value]))??null}),()=>{})}*#s(e,t,i){let a=this.tree.modCount,r=(yield*m(e,t,"apply",i))??null;return this.tree.modCount!==a&&e.fail(bi,null),r}"computeIfAbsent(K,Function)"(e,t,i){if(i===null)return e.fail(re,null);let a=this;return h((function*(){let r=a.tree.root?yield*a.#c(e,t):null;if(r&&r.value!==null)return r.value;let l=yield*a.#s(e,i,[t]);return l===null?null:(r?r.value=l:yield*a.#a(e,t,l,!1),l)})())}"computeIfPresent(K,BiFunction)"(e,t,i){if(i===null)return e.fail(re,null);let a=this;return h((function*(){let r=yield*a.#c(e,t);if(!r||r.value===null)return null;let l=yield*a.#s(e,i,[t,r.value]);return l===null?a.tree.delete(r):r.value=l,l})())}"compute(K,BiFunction)"(e,t,i){if(i===null)return e.fail(re,null);let a=this;return h((function*(){let r=a.tree.root?yield*a.#c(e,t):null,l=yield*a.#s(e,i,[t,r?r.value:null]);return r?l===null?a.tree.delete(r):r.value=l:l!==null&&(yield*a.#a(e,t,l,!1)),l})())}"merge(K,V,BiFunction)"(e,t,i,a){if(i===null||a===null)return e.fail(re,null);let r=this;return h((function*(){let l=r.tree.root?yield*r.#c(e,t):null;if(!l)return yield*r.#a(e,t,i,!1),i;let s=l.value===null?i:yield*r.#s(e,a,[l.value,i]);return s===null?r.tree.delete(l):l.value=s,s})())}*#c(e,t){return!this.whole&&!(yield*this.inRange(e,t))?e.fail(On,"key out of range"):yield*this.tree.find(e,t)}"comparator()"(e){return this.descending?e.limitation("comparator() of a descending TreeMap or TreeSet view"):this.tree.comparator}#o(e,t){return t?t.key:e.fail(ss,null)}#h(e,t){return t?new ur(e.hash(),t.key,t.value):null}"firstKey()"(e){return h(this.firstNode(e),t=>this.#o(e,t))}"lastKey()"(e){return h(this.lastNode(e),t=>this.#o(e,t))}"firstEntry()"(e){return h(this.firstNode(e),t=>this.#h(e,t))}"lastEntry()"(e){return h(this.lastNode(e),t=>this.#h(e,t))}#d(e,t){return h(t?this.lastNode(e):this.firstNode(e),i=>{let a=this.#h(e,i);return i&&this.tree.delete(i),a})}"pollFirstEntry()"(e){return this.#d(e,!1)}"pollLastEntry()"(e){return this.#d(e,!0)}#u(e,t,i,a){return h(this.near(e,t,i,a),r=>r?r.key:null)}#f(e,t,i,a){return h(this.near(e,t,i,a),r=>this.#h(e,r))}"ceilingKey(K)"(e,t){return this.#u(e,t,!0,!0)}"higherKey(K)"(e,t){return this.#u(e,t,!0,!1)}"floorKey(K)"(e,t){return this.#u(e,t,!1,!0)}"lowerKey(K)"(e,t){return this.#u(e,t,!1,!1)}"ceilingEntry(K)"(e,t){return this.#f(e,t,!0,!0)}"higherEntry(K)"(e,t){return this.#f(e,t,!0,!1)}"floorEntry(K)"(e,t){return this.#f(e,t,!1,!0)}"lowerEntry(K)"(e,t){return this.#f(e,t,!1,!1)}"headMap(K)"(e,t){return h(this.view(e,null,{key:t,inclusive:!1},this.descending))}"headMap(K,boolean)"(e,t,i){return h(this.view(e,null,{key:t,inclusive:i===1},this.descending))}"tailMap(K)"(e,t){return h(this.view(e,{key:t,inclusive:!0},null,this.descending))}"tailMap(K,boolean)"(e,t,i){return h(this.view(e,{key:t,inclusive:i===1},null,this.descending))}"subMap(K,K)"(e,t,i){return h(this.view(e,{key:t,inclusive:!0},{key:i,inclusive:!1},this.descending))}"subMap(K,boolean,K,boolean)"(e,t,i,a,r){return h(this.view(e,{key:t,inclusive:i===1},{key:a,inclusive:r===1},this.descending))}"descendingMap()"(e){return new n(e,this.tree,this.lo,this.hi,!this.descending)}"keySet()"(e){return new xe(e,this,"java.util.TreeMap$KeySet")}"navigableKeySet()"(e){return new xe(e,this,"java.util.TreeMap$KeySet")}"descendingKeySet()"(e){return new xe(e,new n(e,this.tree,this.lo,this.hi,!this.descending),"java.util.TreeMap$KeySet")}"values()"(e){return new Ci(e,this,"value")}"entrySet()"(e){return new Ci(e,this,"entry")}},cr=class extends b{className;#e;#t;#n;#i=null;#a;#r;constructor(e,t,i,a,r){super(e),this.#e=t,this.#t=i,this.#n=a?a.key:void 0,this.#a=t.tree.modCount,this.#r=r;let l=r==="key"?"Key":r==="value"?"Value":"Entry";this.className=t.whole&&!t.descending?`java.util.TreeMap$${l}Iterator`:`java.util.TreeMap$NavigableSubMap$SubMap${l}Iterator`}"hasNext()"(){return g(this.#t!==null&&(this.#n===void 0||this.#t.key!==this.#n))}"next()"(e){let t=this.#t;return!t||this.#n!==void 0&&t.key===this.#n?e.fail(ss,null):this.#e.tree.modCount!==this.#a?e.fail(bi,null):(this.#t=this.#e.descending?vi(t):Ln(t),this.#i=t,e.charge(1),this.#r==="key"?t.key:this.#r==="value"?t.value:t)}"remove()"(e){let t=this.#i;if(!t)return e.fail(_u,null);if(this.#e.tree.modCount!==this.#a)return e.fail(bi,null);!this.#e.descending&&t.left&&t.right&&(this.#t=t),this.#e.tree.delete(t),this.#i=null,this.#a=this.#e.tree.modCount}},Ci=class extends k{className;map;kind;isSet;constructor(e,t,i){super(e.hash()),this.map=t,this.kind=i,this.isSet=i==="entry",this.className=i==="value"?"java.util.TreeMap$Values":t.whole?"java.util.TreeMap$EntrySet":"java.util.TreeMap$NavigableSubMap$EntrySetView"}get size(){return this.map.size}elements(e){return this.map.mappings(e).map(t=>this.kind==="value"?t.value:t)}*javaString(e){let t=[];for(let i of yield*this.map.nodes(e))t.push(yield*V(e,this.kind==="value"?i.value:i,this));return`[${t.join(", ")}]`}"size()"(e=this.map.ctx){return this.map["size()"](e)}"isEmpty()"(e=this.map.ctx){return this.map["isEmpty()"](e)}*contains(e,t){if(this.kind==="value"){for(let r of yield*this.map.nodes(e))if(t===null?r.value===null:yield*O(e,t,r.value))return!0;return!1}if(!(t instanceof b)||!("entryKey"in t))return!1;let i=t,a=yield*this.map.lookup(e,i.entryKey);return a!==void 0&&(a===null?i.entryValue===null:yield*O(e,a,i.entryValue))}get contentEquality(){return this.kind==="entry"}*contentEquals(e,t){if(t===this)return!0;if(this.kind!=="entry"||!(t instanceof k)||!t.isSet||t.size!==this.size)return!1;for(let i of t.elements(e,!1))if(!(yield*this.contains(e,i)))return!1;return!0}*contentHash(e){if(this.kind!=="entry")return this.hash;let t=0;for(let i of this.elements(e))t=t+(yield*A(e,i))|0;return t}"iterator()"(e){return this.map.iterator(e,this.kind)}"add(E)"(e){return e.fail(hr,null)}"remove(Object)"(e,t){let i=this.map,a=this.kind;return h((function*(){for(let r of yield*i.nodes(e))if(a==="value"?t===null?r.value===null:yield*O(e,t,r.value):yield*Rt(e,r,t))return i.tree.delete(r),!0;return!1})(),g)}"clear()"(e){return this.map["clear()"](e)}},xe=class n extends k{className;isSet=!0;map;constructor(e,t,i="java.util.TreeSet"){super(e.hash()),this.map=t,this.className=i}get size(){return this.map.size}elements(e){return this.map.mappings(e).map(t=>t.key)}*javaString(e){let t=[];for(let i of yield*this.map.nodes(e))t.push(yield*V(e,i.key,this));return`[${t.join(", ")}]`}get contentEquality(){return!0}*contentEquals(e,t){if(t===this)return!0;if(!(t instanceof k)||!t.isSet||t.size!==this.size)return!1;for(let i of t.elements(e,!1))if(!(yield*this.contains(e,i)))return!1;return!0}*contentHash(e){let t=0;for(let i of this.elements(e))t=t+(yield*A(e,i))|0;return t}*contains(e,t){return(yield*this.map.lookup(e,t))!==void 0}"size()"(e=this.map.ctx){return this.map["size()"](e)}"isEmpty()"(e=this.map.ctx){return this.map["isEmpty()"](e)}"add(E)"(e,t){if(this.className!=="java.util.TreeSet")return e.fail(hr,null);let i=this.map.tree.size;return h(wn(this.map["put(K,V)"](e,t,null)),()=>g(this.map.tree.size!==i))}"remove(Object)"(e,t){return h(this.map.removeKey(e,t),i=>g(i!==null))}"clear()"(e){return this.map["clear()"](e)}"iterator()"(e){return this.map.iterator(e,"key")}"descendingIterator()"(e){return new Pe(e,this.map.tree,this.map.lo,this.map.hi,!this.map.descending).iterator(e,"key")}"comparator()"(e){return this.map["comparator()"](e)}"first()"(e){return this.map["firstKey()"](e)}"last()"(e){return this.map["lastKey()"](e)}#e(e,t,i,a){return h(this.map.near(e,t,i,a),r=>r?r.key:null)}"ceiling(E)"(e,t){return this.#e(e,t,!0,!0)}"higher(E)"(e,t){return this.#e(e,t,!0,!1)}"floor(E)"(e,t){return this.#e(e,t,!1,!0)}"lower(E)"(e,t){return this.#e(e,t,!1,!1)}#t(e,t){return h(t?this.map.lastNode(e):this.map.firstNode(e),i=>{if(!i)return null;let a=i.key;return this.map.tree.delete(i),a})}"pollFirst()"(e){return this.#t(e,!1)}"pollLast()"(e){return this.#t(e,!0)}#n(e,t,i){return h(this.map.view(e,t,i,this.map.descending),a=>new n(e,a,this.className))}"headSet(E)"(e,t){return this.#n(e,null,{key:t,inclusive:!1})}"headSet(E,boolean)"(e,t,i){return this.#n(e,null,{key:t,inclusive:i===1})}"tailSet(E)"(e,t){return this.#n(e,{key:t,inclusive:!0},null)}"tailSet(E,boolean)"(e,t,i){return this.#n(e,{key:t,inclusive:i===1},null)}"subSet(E,E)"(e,t,i){return this.#n(e,{key:t,inclusive:!0},{key:i,inclusive:!1})}"subSet(E,boolean,E,boolean)"(e,t,i,a,r){return this.#n(e,{key:t,inclusive:i===1},{key:a,inclusive:r===1})}"descendingSet()"(e){return new n(e,new Pe(e,this.map.tree,this.map.lo,this.map.hi,!this.map.descending),this.className)}};function*wn(n){return n!==null&&typeof n=="object"&&Symbol.iterator in n?yield*n:n}var ot=(n,e)=>new Pe(n,new rn(e),null,null,!1,"java.util.TreeMap"),ls=n=>n instanceof Pe?n.tree.comparator:n instanceof xe?n.map.tree.comparator:null,os={"TreeMap.<init>()":n=>ot(n,null),"TreeMap.<init>(Comparator)":(n,[e])=>ot(n,e),"TreeMap.<init>(Map)":(n,[e])=>{if(e===null)return n.fail(re,\'Cannot invoke "java.util.Map.size()" because "map" is null\');let t=ot(n,null);return h(wn(t["putAll(Map)"](n,e)),()=>t)},"TreeMap.<init>(SortedMap)":(n,[e])=>{if(e===null)return n.fail(re,\'Cannot invoke "java.util.SortedMap.comparator()" because "m" is null\');let t=ot(n,ls(e));return h(wn(t["putAll(Map)"](n,e)),()=>t)},"TreeSet.<init>()":n=>new xe(n,ot(n,null)),"TreeSet.<init>(Comparator)":(n,[e])=>new xe(n,ot(n,e)),"TreeSet.<init>(Collection)":(n,[e])=>{if(e===null)return n.fail(re,\'Cannot invoke "java.util.Collection.size()" because "c" is null\');let t=new xe(n,ot(n,null));return h(wn(t.addEach(n,e.copyItems(n).items)),()=>t)},"TreeSet.<init>(SortedSet)":(n,[e])=>{if(e===null)return n.fail(re,\'Cannot invoke "java.util.SortedSet.comparator()" because "s" is null\');let t=new xe(n,ot(n,ls(e)));return h(wn(t.addEach(n,e.elements(n,!0))),()=>t)}};var ct="java.lang.NumberFormatException",yi="java.lang.StringIndexOutOfBoundsException",Ie="java.lang.NullPointerException",us=\'Cannot invoke "String.length()" because "tgtStr" is null\',cs=\'Cannot read field "value" because "tgtStr" is null\',An=class extends b{className="java.lang.StringBuilder";text;constructor(e,t){super(e),this.text=t}*javaString(){return this.text}#e(e,t,i=this.text.length+t){e.checkString(i),e.charge(t>>>4)}#t(e,t){return this.#e(e,t.length),this.text+=t,this}#n(e,t){(t<0||t>=this.text.length)&&e.fail(yi,`Index ${t} out of bounds for length ${this.text.length}`)}#i(e,t,i){let a=this.text.length;(t<0||t>i||i>a)&&e.fail(yi,`Range [${t}, ${i}) out of bounds for length ${a}`)}#a(e,t,i){let a=this.text.length;return(t<0||t>a)&&e.fail(yi,`Range [${t}, ${a}) out of bounds for length ${a}`),this.#e(e,i.length+a,i.length+a),this.text=this.text.slice(0,t)+i+this.text.slice(t),this}"append(Object)"(e,t){return h(V(e,t),i=>this.#t(e,i))}"append(String)"(e,t){return this.#t(e,t===null?"null":t.value)}"append(char[])"(e,t){return t===null?e.fail(Ie,\'Cannot read the array length because "str" is null\'):this.#t(e,Vi(t))}"append(boolean)"(e,t){return this.#t(e,t?"true":"false")}"append(char)"(e,t){return this.#t(e,String.fromCharCode(t))}"append(int)"(e,t){return this.#t(e,String(t))}"append(long)"(e,t){return this.#t(e,String(t))}"append(double)"(e,t){return this.#t(e,c.doubleToString(t))}"append(float)"(e,t){return this.#t(e,c.floatToString(t))}"insert(int,Object)"(e,t,i){return h(V(e,i),a=>this.#a(e,t,a))}"insert(int,String)"(e,t,i){return this.#a(e,t,i===null?"null":i.value)}"insert(int,char[])"(e,t,i){return i===null?e.fail(Ie,\'Cannot read the array length because "str" is null\'):this.#a(e,t,Vi(i))}"insert(int,boolean)"(e,t,i){return this.#a(e,t,i?"true":"false")}"insert(int,char)"(e,t,i){return this.#a(e,t,String.fromCharCode(i))}"insert(int,int)"(e,t,i){return this.#a(e,t,String(i))}"insert(int,long)"(e,t,i){return this.#a(e,t,String(i))}"insert(int,double)"(e,t,i){return this.#a(e,t,c.doubleToString(i))}"insert(int,float)"(e,t,i){return this.#a(e,t,c.floatToString(i))}"length()"(){return this.text.length}"isEmpty()"(){return g(this.text.length===0)}"charAt(int)"(e,t){return this.#n(e,t),this.text.charCodeAt(t)}"setCharAt(int,char)"(e,t,i){this.#n(e,t),this.#e(e,this.text.length,this.text.length),this.text=this.text.slice(0,t)+String.fromCharCode(i)+this.text.slice(t+1)}"setLength(int)"(e,t){if(t<0)return e.fail(yi,`String index out of range: ${t}`);t<=this.text.length?this.text=this.text.slice(0,t):(this.#e(e,t-this.text.length,t),this.text+="\\0".repeat(t-this.text.length))}"deleteCharAt(int)"(e,t){return this.#n(e,t),this.#e(e,this.text.length,this.text.length),this.text=this.text.slice(0,t)+this.text.slice(t+1),this}"delete(int,int)"(e,t,i){return i=Math.min(i,this.text.length),this.#i(e,t,i),this.#e(e,this.text.length,this.text.length),this.text=this.text.slice(0,t)+this.text.slice(i),this}"replace(int,int,String)"(e,t,i,a){if(i=Math.min(i,this.text.length),this.#i(e,t,i),a===null)return e.fail(Ie,\'Cannot invoke "String.length()" because "str" is null\');let r=a.value;return this.#e(e,this.text.length+r.length,this.text.length+r.length-(i-t)),this.text=this.text.slice(0,t)+r+this.text.slice(i),this}"reverse()"(e){this.#e(e,this.text.length,this.text.length);let t=this.text.split("");t.reverse();for(let i=0;i<t.length-1;i++){let a=t[i].charCodeAt(0),r=t[i+1].charCodeAt(0);a>=56320&&a<=57343&&r>=55296&&r<=56319&&(t[i]=String.fromCharCode(r),t[i+1]=String.fromCharCode(a),i++)}return this.text=t.join(""),this}"indexOf(String)"(e,t){return t===null?e.fail(Ie,us):(e.charge(this.text.length>>>4),this.text.indexOf(t.value))}"indexOf(String,int)"(e,t,i){return t===null?e.fail(Ie,us):(e.charge(this.text.length>>>4),this.text.indexOf(t.value,Math.max(0,i)))}"lastIndexOf(String)"(e,t){return t===null?e.fail(Ie,cs):(e.charge(this.text.length>>>4),this.text.lastIndexOf(t.value))}"lastIndexOf(String,int)"(e,t,i){return t===null?e.fail(Ie,cs):(e.charge(this.text.length>>>4),i<0?-1:this.text.lastIndexOf(t.value,i))}"substring(int)"(e,t){return this["substring(int,int)"](e,t,this.text.length)}"substring(int,int)"(e,t,i){return this.#i(e,t,i),new c.JString(this.text.slice(t,i))}"compareTo(StringBuilder)"(e,t){return t===null?e.fail(Ie,\'Cannot read field "value" because "another" is null\'):$e(this.text,t.text)}};function Vi(n){let e=n.data,t="";for(let i=0;i<e.length;i+=8192)t+=String.fromCharCode(...e.subarray(i,i+8192));return t}var ys={"StringBuilder.<init>()":n=>new An(n.hash(),""),"StringBuilder.<init>(int)":(n,[e])=>e<0?n.fail("java.lang.NegativeArraySizeException",String(e)):new An(n.hash(),""),"StringBuilder.<init>(String)":(n,[e])=>e===null?n.fail(Ie,\'Cannot invoke "String.length()" because "str" is null\'):new An(n.hash(),e.value)},Uu="0000000000000000002020202020000000000000000000000000000020202020a000000000000000000000000000000006060606060606060606000000000000004d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d00000000000055555555555555555555555555555555555555555555555555550000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000550000000000000000000055000000005500000000004d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d004d4d4d4d4d4d4d555555555555555555555555555555555555555555555555005555555555555555",Ss=new Uint8Array(256);for(let n=0;n<256;n++)Ss[n]=parseInt(Uu.slice(n*2,n*2+2),16);var hs=1,ds=2,fs=4,gs=8,ms=16,ps=32,Hu=64,vs=128,zu={178:2,179:3,185:1,188:-2,189:-2,190:-2};function Ei(n,e,t){if(e<0||e>255){let i=(e>>>0).toString(16).toUpperCase().padStart(4,"0");n.limitation(`Character.${t} for characters outside Latin-1 (here U+${i})`)}return e}var te=(n,e)=>(t,[i])=>g((Ss[Ei(t,i,n)]&e)!==0);function Si(n,e,t){Ei(n,e,t?"toUpperCase":"toLowerCase");let i=String.fromCharCode(e),a=t?i.toUpperCase():i.toLowerCase();return a.length===1?a.charCodeAt(0):e}function mr(n){return n>=48&&n<=57?n-48:n>=65&&n<=90?n-55:n>=97&&n<=122?n-87:-1}function bs(n,e,t){if(t<2||t>36)return-1;Ei(n,e,"digit");let i=mr(e);return i<t?i:-1}function Ns(n,e){return Ei(n,e,"getNumericValue"),zu[e]??mr(e)}function _e(n,e,t,i){if(e===null)return n.fail(ct,"Cannot parse null string");if(t<2)return n.fail(ct,`radix ${t} less than Character.MIN_RADIX`);if(t>36)return n.fail(ct,`radix ${t} greater than Character.MAX_RADIX`);let a=e.value,r=()=>n.fail(ct,t===10?`For input string: "${a}"`:`For input string: "${a}" under radix ${t}`);a.length||r();let l=0,s=!1,o=a.charCodeAt(0);o<48&&(o===45?s=!0:o!==43&&r(),a.length===1&&r(),l=1);let u=(1n<<BigInt(i-1))-(s?0n:1n),d=BigInt(t),f=0n;for(n.charge(a.length>>>2);l<a.length;l++){let p=a.charCodeAt(l);p>255&&/\\p{Nd}/u.test(a[l])&&n.limitation("parsing digits outside Latin-1");let N=p>255?-1:mr(p);(N<0||N>=t)&&r(),f=f*d+BigInt(N),f>u&&r()}return s?-f:f}var qu=/^[+-]?(NaN|Infinity|(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?[fFdD]?)$/,Wu=/^[+-]?0[xX]/;function xi(n,e,t=!1){if(e===null)return n.fail(Ie,\'Cannot invoke "String.length()" because "in" is null\');let i=e.value,a=i.replace(/^[\\0- ]+|[\\0- ]+$/g,"");if(!a.length)return n.fail(ct,"empty String");if(qu.test(a)){let r=a.replace(/[fFdD]$/,"").replace(/^\\+/,"");return t?/^-?(NaN|Infinity)$/.test(r)?Math.fround(Number(r)):c.parseDecimalFloat(r):Number(r)}if(Wu.test(a)){let r=c.parseHexFloating(a,t);if(!Number.isNaN(r))return r}return(/^[+-]?([0-9.]*)/.exec(a)[1].match(/\\./g)?.length??0)>1?n.fail(ct,"multiple points"):n.fail(ct,`For input string: "${i}"`)}function ut(n,e,t,i){let a=Number(_e(n,e,t,32)),r=i===8?128:32768;return a<-r||a>=r?n.fail(ct,`Value out of range. Value:"${e.value}" Radix:${t}`):a}var Zu=n=>n<<24>>24,Xu=n=>n<<16>>16,gr=n=>c.normLong(BigInt.asIntN(64,n)),kn=n=>BigInt(n);function Qu(n){return Number.isNaN(n)?0:n>=2147483647?2147483647:n<=-2147483648?-2147483648:Math.trunc(n)}function Yu(n){return Number.isNaN(n)?0:n>=9223372036854776e3?gr((1n<<63n)-1n):n<=-9223372036854776e3?gr(-(1n<<63n)):c.normLong(BigInt(Math.trunc(n)))}var dr=(n,e)=>n<e?-1:n>e?1:0;function ec(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),Math.imul(n+(n>>>4)&252645135,16843009)>>>24|0}function tc(n){let e=0;for(let t=0;t<32;t++)e=e<<1|n&1,n>>>=1;return e|0}var ln=n=>BigInt.asUintN(64,kn(n)),z=n=>new c.JString(n),Cs=n=>n<2||n>36?10:n;function nc(n){let e=ln(n);return e===0n?64:64-e.toString(2).length}function ic(n){let e=ln(n);if(e===0n)return 64;let t=0;for(let i=e;(i&1n)===0n;i>>=1n)t++;return t}var xs={"Integer.toString(int,int)":(n,[e,t])=>z(e.toString(Cs(t))),"Integer.toHexString(int)":(n,[e])=>z((e>>>0).toString(16)),"Integer.toOctalString(int)":(n,[e])=>z((e>>>0).toString(8)),"Integer.toBinaryString(int)":(n,[e])=>z((e>>>0).toString(2)),"Integer.toString(int)":(n,[e])=>z(String(e)),"Integer.parseInt(String,int)":(n,[e,t])=>Number(_e(n,e,t,32)),"Integer.parseInt(String)":(n,[e])=>Number(_e(n,e,10,32)),"Integer.valueOf(String,int)":(n,[e,t])=>n.box("int",Number(_e(n,e,t,32))),"Integer.valueOf(String)":(n,[e])=>n.box("int",Number(_e(n,e,10,32))),"Integer.valueOf(int)":(n,[e])=>n.box("int",e),"Integer.hashCode(int)":(n,[e])=>e,"Integer.compare(int,int)":(n,[e,t])=>dr(e,t),"Integer.highestOneBit(int)":(n,[e])=>e===0?0:2147483648>>>Math.clz32(e)|0,"Integer.numberOfLeadingZeros(int)":(n,[e])=>Math.clz32(e),"Integer.numberOfTrailingZeros(int)":(n,[e])=>e===0?32:31-Math.clz32(e&-e),"Integer.bitCount(int)":(n,[e])=>ec(e),"Integer.reverse(int)":(n,[e])=>tc(e),"Integer.signum(int)":(n,[e])=>Math.sign(e),"Integer.sum(int,int)":(n,[e,t])=>e+t|0,"Integer.max(int,int)":(n,[e,t])=>Math.max(e,t),"Integer.min(int,int)":(n,[e,t])=>Math.min(e,t),"Long.toString(long,int)":(n,[e,t])=>z(kn(e).toString(Cs(t))),"Long.toHexString(long)":(n,[e])=>z(ln(e).toString(16)),"Long.toOctalString(long)":(n,[e])=>z(ln(e).toString(8)),"Long.toBinaryString(long)":(n,[e])=>z(ln(e).toString(2)),"Long.toString(long)":(n,[e])=>z(String(e)),"Long.parseLong(String,int)":(n,[e,t])=>c.normLong(_e(n,e,t,64)),"Long.parseLong(String)":(n,[e])=>c.normLong(_e(n,e,10,64)),"Long.valueOf(String,int)":(n,[e,t])=>n.box("long",c.normLong(_e(n,e,t,64))),"Long.valueOf(String)":(n,[e])=>n.box("long",c.normLong(_e(n,e,10,64))),"Long.valueOf(long)":(n,[e])=>n.box("long",e),"Long.hashCode(long)":(n,[e])=>vn(e),"Long.compare(long,long)":(n,[e,t])=>dr(e,t),"Long.numberOfLeadingZeros(long)":(n,[e])=>nc(e),"Long.numberOfTrailingZeros(long)":(n,[e])=>ic(e),"Long.bitCount(long)":(n,[e])=>[...ln(e).toString(2)].filter(t=>t==="1").length,"Long.signum(long)":(n,[e])=>dr(e,0),"Long.sum(long,long)":(n,[e,t])=>gr(kn(e)+kn(t)),"Long.max(long,long)":(n,[e,t])=>e>=t?e:t,"Long.min(long,long)":(n,[e,t])=>e<=t?e:t,"Double.toString(double)":(n,[e])=>z(c.doubleToString(e)),"Double.valueOf(String)":(n,[e])=>n.box("double",xi(n,e)),"Double.valueOf(double)":(n,[e])=>n.box("double",e),"Double.parseDouble(String)":(n,[e])=>xi(n,e),"Double.isNaN(double)":(n,[e])=>g(Number.isNaN(e)),"Double.isInfinite(double)":(n,[e])=>g(e===1/0||e===-1/0),"Double.isFinite(double)":(n,[e])=>g(Number.isFinite(e)),"Double.hashCode(double)":(n,[e])=>bn(e),"Double.compare(double,double)":(n,[e,t])=>Xe(e,t),"Double.sum(double,double)":(n,[e,t])=>e+t,"Double.max(double,double)":(n,[e,t])=>Math.max(e,t),"Double.min(double,double)":(n,[e,t])=>Math.min(e,t),"Float.toString(float)":(n,[e])=>z(c.floatToString(e)),"Float.valueOf(String)":(n,[e])=>n.box("float",xi(n,e,!0)),"Float.valueOf(float)":(n,[e])=>n.box("float",e),"Float.parseFloat(String)":(n,[e])=>xi(n,e,!0),"Float.isNaN(float)":(n,[e])=>g(Number.isNaN(e)),"Float.isInfinite(float)":(n,[e])=>g(e===1/0||e===-1/0),"Float.isFinite(float)":(n,[e])=>g(Number.isFinite(e)),"Float.hashCode(float)":(n,[e])=>c.floatToIntBits(e),"Float.floatToIntBits(float)":(n,[e])=>c.floatToIntBits(e),"Float.floatToRawIntBits(float)":(n,[e])=>Number.isNaN(e)?2143289344:c.floatToIntBits(e),"Float.intBitsToFloat(int)":(n,[e])=>c.intBitsToFloat(e),"Float.compare(float,float)":(n,[e,t])=>Xe(e,t),"Float.sum(float,float)":(n,[e,t])=>Math.fround(e+t),"Float.max(float,float)":(n,[e,t])=>Math.max(e,t),"Float.min(float,float)":(n,[e,t])=>Math.min(e,t),"Byte.toString(byte)":(n,[e])=>z(String(e)),"Byte.valueOf(byte)":(n,[e])=>n.box("byte",e),"Byte.parseByte(String,int)":(n,[e,t])=>ut(n,e,t,8),"Byte.parseByte(String)":(n,[e])=>ut(n,e,10,8),"Byte.valueOf(String,int)":(n,[e,t])=>n.box("byte",ut(n,e,t,8)),"Byte.valueOf(String)":(n,[e])=>n.box("byte",ut(n,e,10,8)),"Byte.hashCode(byte)":(n,[e])=>e,"Byte.compare(byte,byte)":(n,[e,t])=>e-t,"Byte.toUnsignedInt(byte)":(n,[e])=>e&255,"Byte.toUnsignedLong(byte)":(n,[e])=>e&255,"Short.toString(short)":(n,[e])=>z(String(e)),"Short.valueOf(short)":(n,[e])=>n.box("short",e),"Short.parseShort(String,int)":(n,[e,t])=>ut(n,e,t,16),"Short.parseShort(String)":(n,[e])=>ut(n,e,10,16),"Short.valueOf(String,int)":(n,[e,t])=>n.box("short",ut(n,e,t,16)),"Short.valueOf(String)":(n,[e])=>n.box("short",ut(n,e,10,16)),"Short.hashCode(short)":(n,[e])=>e,"Short.compare(short,short)":(n,[e,t])=>e-t,"Short.toUnsignedInt(short)":(n,[e])=>e&65535,"Short.toUnsignedLong(short)":(n,[e])=>e&65535,"Character.valueOf(char)":(n,[e])=>n.box("char",e),"Character.hashCode(char)":(n,[e])=>e,"Character.toString(char)":(n,[e])=>z(String.fromCharCode(e)),"Character.isLowerCase(char)":te("isLowerCase",ms),"Character.isLowerCase(int)":te("isLowerCase",ms),"Character.isUpperCase(char)":te("isUpperCase",gs),"Character.isUpperCase(int)":te("isUpperCase",gs),"Character.isDigit(char)":te("isDigit",ds),"Character.isDigit(int)":te("isDigit",ds),"Character.isLetter(char)":te("isLetter",hs),"Character.isLetter(int)":te("isLetter",hs),"Character.isLetterOrDigit(char)":te("isLetterOrDigit",fs),"Character.isLetterOrDigit(int)":te("isLetterOrDigit",fs),"Character.isAlphabetic(int)":te("isAlphabetic",Hu),"Character.isSpaceChar(char)":te("isSpaceChar",vs),"Character.isSpaceChar(int)":te("isSpaceChar",vs),"Character.isWhitespace(char)":te("isWhitespace",ps),"Character.isWhitespace(int)":te("isWhitespace",ps),"Character.toLowerCase(char)":(n,[e])=>Si(n,e,!1),"Character.toLowerCase(int)":(n,[e])=>Si(n,e,!1),"Character.toUpperCase(char)":(n,[e])=>Si(n,e,!0),"Character.toUpperCase(int)":(n,[e])=>Si(n,e,!0),"Character.digit(char,int)":(n,[e,t])=>bs(n,e,t),"Character.digit(int,int)":(n,[e,t])=>bs(n,e,t),"Character.getNumericValue(char)":(n,[e])=>Ns(n,e),"Character.getNumericValue(int)":(n,[e])=>Ns(n,e),"Character.forDigit(int,int)":(n,[e,t])=>{let i=e,a=t;return a<2||a>36||i<0||i>=a?0:i<10?48+i:87+i},"Character.compare(char,char)":(n,[e,t])=>e-t,"Boolean.parseBoolean(String)":(n,[e])=>g(e!==null&&/^true$/i.test(e.value)),"Boolean.valueOf(boolean)":(n,[e])=>n.box("boolean",e),"Boolean.valueOf(String)":(n,[e])=>n.box("boolean",g(e!==null&&/^true$/i.test(e.value))),"Boolean.toString(boolean)":(n,[e])=>z(e?"true":"false"),"Boolean.hashCode(boolean)":(n,[e])=>e?1231:1237,"Boolean.compare(boolean,boolean)":(n,[e,t])=>e===t?0:e?1:-1,"Boolean.logicalAnd(boolean,boolean)":(n,[e,t])=>g(e===1&&t===1),"Boolean.logicalOr(boolean,boolean)":(n,[e,t])=>g(e===1||t===1),"Boolean.logicalXor(boolean,boolean)":(n,[e,t])=>g(e!==t)},ac={int:"anotherInteger",long:"anotherLong",double:"anotherDouble",char:"anotherCharacter",boolean:"b",float:"anotherFloat",byte:"anotherByte",short:"anotherShort"},fr=n=>n.kind==="double"||n.kind==="float"?Qu(n.value):n.kind==="long"?Number(BigInt.asIntN(32,kn(n.value))):n.value,Vs={"intValue()":(n,e)=>fr(e),"longValue()":(n,e)=>e.kind==="double"||e.kind==="float"?Yu(e.value):e.value,"doubleValue()":(n,e)=>Number(e.value),"floatValue()":(n,e)=>e.kind==="long"?c.l2f(e.value):Math.fround(Number(e.value)),"byteValue()":(n,e)=>Zu(fr(e)),"shortValue()":(n,e)=>Xu(fr(e)),"charValue()":(n,e)=>e.value,"booleanValue()":(n,e)=>e.value,"isNaN()":(n,e)=>g(Number.isNaN(e.value)),"isInfinite()":(n,e)=>g(e.value===1/0||e.value===-1/0),"toString()":(n,e)=>z(La(e)),"hashCode()":(n,e)=>Nn(e),"equals(Object)":(n,e,[,t])=>g(t instanceof c.JBox&&t.kind===e.kind&&Object.is(t.value,e.value)),compareTo:(n,e,[,t])=>t===null?n.fail(Ie,`Cannot read field "value" because "${ac[e.kind]}" is null`):Cn(e,t)};var pr=["int size()","boolean isEmpty()","boolean contains(Object)","boolean add(E)","boolean remove(Object)","boolean addAll(Collection<? extends E>)","boolean containsAll(Collection<?>)","void clear()","Iterator<E> iterator()","boolean equals(Object)","int hashCode()","Object[] toArray()","<T> T[] toArray(T[])","<T> T[] toArray(IntFunction<T[]>)","boolean removeIf(Predicate<? super E>)","void forEach(Consumer<? super E>)"],Es=["boolean offer(E)","E poll()","E peek()","E element()","E remove()"],rc=[{decl:"class Class<T>",pkg:"java.lang",members:["String getName()","String getSimpleName()","boolean isInterface()","boolean isArray()"],unsupported:"forName getTypeName getCanonicalName getPackageName getSuperclass getInterfaces getModifiers getMethods getMethod getDeclaredMethods getDeclaredMethod getFields getField getDeclaredFields getDeclaredField getConstructors getConstructor getDeclaredConstructors getDeclaredConstructor isInstance isAssignableFrom isPrimitive isEnum isRecord getEnumConstants cast newInstance getComponentType getClassLoader getResource getResourceAsStream arrayType componentType describeConstable descriptorString isAnnotation getAnnotations getAnnotation desiredAssertionStatus getNestHost isNestmateOf isHidden isSealed getRecordComponents getPermittedSubclasses getDeclaringClass getEnclosingClass isAnonymousClass isLocalClass isMemberClass isSynthetic"},{decl:"interface Comparable<T>",pkg:"java.lang",members:["int compareTo(T)"]},{decl:"interface Comparator<T>",pkg:"java.util",functional:"compare",members:["int compare(T, T)","boolean equals(Object)","Comparator<T> reversed()","Comparator<T> thenComparing(Comparator<? super T>)","<U extends Comparable> Comparator<T> thenComparing(Function<? super T, ? extends U>)","<U> Comparator<T> thenComparing(Function<? super T, ? extends U>, Comparator<? super U>)","Comparator<T> thenComparingInt(ToIntFunction<? super T>)","Comparator<T> thenComparingLong(ToLongFunction<? super T>)","Comparator<T> thenComparingDouble(ToDoubleFunction<? super T>)","static <T, U extends Comparable> Comparator<T> comparing(Function<? super T, ? extends U>)","static <T, U> Comparator<T> comparing(Function<? super T, ? extends U>, Comparator<? super U>)","static <T> Comparator<T> comparingInt(ToIntFunction<? super T>)","static <T> Comparator<T> comparingLong(ToLongFunction<? super T>)","static <T> Comparator<T> comparingDouble(ToDoubleFunction<? super T>)","static <T extends Comparable> Comparator<T> naturalOrder()","static <T extends Comparable> Comparator<T> reverseOrder()","static <T> Comparator<T> nullsFirst(Comparator<? super T>)","static <T> Comparator<T> nullsLast(Comparator<? super T>)"]},{decl:"interface Runnable",pkg:"java.lang",functional:"run",members:["void run()"]},{decl:"interface Function<T, R>",pkg:"java.util.function",functional:"apply",members:["R apply(T)","<V> Function<T, V> andThen(Function<? super R, ? extends V>)","<V> Function<V, R> compose(Function<? super V, ? extends T>)","static <T> Function<T, T> identity()"]},{decl:"interface BiFunction<T, U, R>",pkg:"java.util.function",functional:"apply",members:["R apply(T, U)","<V> BiFunction<T, U, V> andThen(Function<? super R, ? extends V>)"]},{decl:"interface UnaryOperator<T> extends Function<T, T>",pkg:"java.util.function",functional:"apply",members:["static <T> UnaryOperator<T> identity()"]},{decl:"interface BinaryOperator<T> extends BiFunction<T, T, T>",pkg:"java.util.function",functional:"apply",members:["static <T> BinaryOperator<T> minBy(Comparator<? super T>)","static <T> BinaryOperator<T> maxBy(Comparator<? super T>)"]},{decl:"interface Supplier<T>",pkg:"java.util.function",functional:"get",members:["T get()"]},{decl:"interface Consumer<T>",pkg:"java.util.function",functional:"accept",members:["void accept(T)","Consumer<T> andThen(Consumer<? super T>)"]},{decl:"interface BiConsumer<T, U>",pkg:"java.util.function",functional:"accept",members:["void accept(T, U)"],unsupported:"andThen"},{decl:"interface Predicate<T>",pkg:"java.util.function",functional:"test",members:["boolean test(T)","Predicate<T> and(Predicate<? super T>)","Predicate<T> or(Predicate<? super T>)","Predicate<T> negate()","static <T> Predicate<T> not(Predicate<? super T>)","static <T> Predicate<T> isEqual(Object)"]},{decl:"interface BiPredicate<T, U>",pkg:"java.util.function",functional:"test",members:["boolean test(T, U)"],unsupported:"and or negate"},{decl:"interface IntBinaryOperator",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(int, int)"]},{decl:"interface IntUnaryOperator",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(int)"],unsupported:"andThen compose identity"},{decl:"interface IntPredicate",pkg:"java.util.function",functional:"test",members:["boolean test(int)"],unsupported:"and or negate"},{decl:"interface IntFunction<R>",pkg:"java.util.function",functional:"apply",members:["R apply(int)"]},{decl:"interface IntConsumer",pkg:"java.util.function",functional:"accept",members:["void accept(int)"],unsupported:"andThen"},{decl:"interface IntSupplier",pkg:"java.util.function",functional:"getAsInt",members:["int getAsInt()"]},{decl:"interface ToIntFunction<T>",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(T)"]},{decl:"interface ToLongFunction<T>",pkg:"java.util.function",functional:"applyAsLong",members:["long applyAsLong(T)"]},{decl:"interface ToDoubleFunction<T>",pkg:"java.util.function",functional:"applyAsDouble",members:["double applyAsDouble(T)"]},{decl:"interface ToIntBiFunction<T, U>",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(T, U)"]},{decl:"interface LongBinaryOperator",pkg:"java.util.function",functional:"applyAsLong",members:["long applyAsLong(long, long)"]},{decl:"interface LongUnaryOperator",pkg:"java.util.function",functional:"applyAsLong",members:["long applyAsLong(long)"],unsupported:"andThen compose identity"},{decl:"interface DoubleBinaryOperator",pkg:"java.util.function",functional:"applyAsDouble",members:["double applyAsDouble(double, double)"]},{decl:"interface DoubleUnaryOperator",pkg:"java.util.function",functional:"applyAsDouble",members:["double applyAsDouble(double)"],unsupported:"andThen compose identity"},{decl:"interface BooleanSupplier",pkg:"java.util.function",functional:"getAsBoolean",members:["boolean getAsBoolean()"]},{decl:"interface ObjIntConsumer<T>",pkg:"java.util.function",functional:"accept",members:["void accept(T, int)"]},{decl:"interface Stream<T>",pkg:"java.util.stream",members:["Stream<T> filter(Predicate<? super T>)","<R> Stream<R> map(Function<? super T, ? extends R>)","IntStream mapToInt(ToIntFunction<? super T>)","LongStream mapToLong(ToLongFunction<? super T>)","DoubleStream mapToDouble(ToDoubleFunction<? super T>)","<R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends R>>)","IntStream flatMapToInt(Function<? super T, ? extends IntStream>)","Stream<T> distinct()","Stream<T> sorted()","Stream<T> sorted(Comparator<? super T>)","Stream<T> peek(Consumer<? super T>)","Stream<T> limit(long)","Stream<T> skip(long)","Stream<T> takeWhile(Predicate<? super T>)","Stream<T> dropWhile(Predicate<? super T>)","void forEach(Consumer<? super T>)","void forEachOrdered(Consumer<? super T>)","Object[] toArray()","<A> A[] toArray(IntFunction<A[]>)","T reduce(T, BinaryOperator<T>)","Optional<T> reduce(BinaryOperator<T>)","<R, A> R collect(Collector<? super T, A, R>)","!<R> R collect(Supplier<R>, BiConsumer<R, ? super T>, BiConsumer<R, R>)","!<U> U reduce(U, BiFunction<U, ? super T, U>, BinaryOperator<U>)","List<T> toList()","Optional<T> min(Comparator<? super T>)","Optional<T> max(Comparator<? super T>)","long count()","boolean anyMatch(Predicate<? super T>)","boolean allMatch(Predicate<? super T>)","boolean noneMatch(Predicate<? super T>)","Optional<T> findFirst()","Optional<T> findAny()","static <T> Stream<T> of(T)","static <T> Stream<T> of(T...)","static <T> Stream<T> ofNullable(T)","static <T> Stream<T> empty()","static <T> Stream<T> iterate(T, UnaryOperator<T>)","static <T> Stream<T> iterate(T, Predicate<? super T>, UnaryOperator<T>)","static <T> Stream<T> generate(Supplier<? extends T>)","static <T> Stream<T> concat(Stream<? extends T>, Stream<? extends T>)"],unsupported:"parallel sequential unordered onClose close iterator spliterator isParallel mapMulti collect flatMapToLong flatMapToDouble"},{decl:"interface IntStream",pkg:"java.util.stream",members:["IntStream filter(IntPredicate)","IntStream map(IntUnaryOperator)","<U> Stream<U> mapToObj(IntFunction<? extends U>)","LongStream mapToLong(IntToLongFunction)","DoubleStream mapToDouble(IntToDoubleFunction)","IntStream flatMap(IntFunction<? extends IntStream>)","IntStream distinct()","IntStream sorted()","IntStream peek(IntConsumer)","IntStream limit(long)","IntStream skip(long)","IntStream takeWhile(IntPredicate)","IntStream dropWhile(IntPredicate)","void forEach(IntConsumer)","void forEachOrdered(IntConsumer)","int[] toArray()","int reduce(int, IntBinaryOperator)","OptionalInt reduce(IntBinaryOperator)","int sum()","OptionalInt min()","OptionalInt max()","long count()","OptionalDouble average()","IntSummaryStatistics summaryStatistics()","boolean anyMatch(IntPredicate)","boolean allMatch(IntPredicate)","boolean noneMatch(IntPredicate)","OptionalInt findFirst()","OptionalInt findAny()","Stream<Integer> boxed()","static IntStream of(int...)","static IntStream empty()","LongStream asLongStream()","DoubleStream asDoubleStream()","static IntStream range(int, int)","static IntStream rangeClosed(int, int)","static IntStream iterate(int, IntUnaryOperator)","static IntStream iterate(int, IntPredicate, IntUnaryOperator)","static IntStream generate(IntSupplier)","static IntStream concat(IntStream, IntStream)"],unsupported:"parallel sequential unordered onClose close iterator spliterator isParallel mapMulti collect average"},{decl:"interface LongStream",pkg:"java.util.stream",members:["LongStream filter(LongPredicate)","LongStream map(LongUnaryOperator)","<U> Stream<U> mapToObj(LongFunction<? extends U>)","IntStream mapToInt(LongToIntFunction)","DoubleStream mapToDouble(LongToDoubleFunction)","LongStream flatMap(LongFunction<? extends LongStream>)","LongStream distinct()","LongStream sorted()","LongStream peek(LongConsumer)","LongStream limit(long)","LongStream skip(long)","LongStream takeWhile(LongPredicate)","LongStream dropWhile(LongPredicate)","void forEach(LongConsumer)","void forEachOrdered(LongConsumer)","long[] toArray()","long reduce(long, LongBinaryOperator)","OptionalLong reduce(LongBinaryOperator)","long sum()","OptionalLong min()","OptionalLong max()","long count()","OptionalDouble average()","LongSummaryStatistics summaryStatistics()","boolean anyMatch(LongPredicate)","boolean allMatch(LongPredicate)","boolean noneMatch(LongPredicate)","OptionalLong findFirst()","OptionalLong findAny()","Stream<Long> boxed()","static LongStream of(long...)","static LongStream empty()","DoubleStream asDoubleStream()","static LongStream range(long, long)","static LongStream rangeClosed(long, long)"],unsupported:"parallel sequential unordered onClose close iterator spliterator isParallel mapMulti collect iterate generate concat"},{decl:"interface DoubleStream",pkg:"java.util.stream",members:["DoubleStream filter(DoublePredicate)","DoubleStream map(DoubleUnaryOperator)","<U> Stream<U> mapToObj(DoubleFunction<? extends U>)","IntStream mapToInt(DoubleToIntFunction)","LongStream mapToLong(DoubleToLongFunction)","DoubleStream flatMap(DoubleFunction<? extends DoubleStream>)","DoubleStream distinct()","DoubleStream sorted()","DoubleStream peek(DoubleConsumer)","DoubleStream limit(long)","DoubleStream skip(long)","DoubleStream takeWhile(DoublePredicate)","DoubleStream dropWhile(DoublePredicate)","void forEach(DoubleConsumer)","void forEachOrdered(DoubleConsumer)","double[] toArray()","double reduce(double, DoubleBinaryOperator)","OptionalDouble reduce(DoubleBinaryOperator)","double sum()","OptionalDouble min()","OptionalDouble max()","long count()","OptionalDouble average()","DoubleSummaryStatistics summaryStatistics()","boolean anyMatch(DoublePredicate)","boolean allMatch(DoublePredicate)","boolean noneMatch(DoublePredicate)","OptionalDouble findFirst()","OptionalDouble findAny()","Stream<Double> boxed()","static DoubleStream of(double...)","static DoubleStream empty()"],unsupported:"parallel sequential unordered onClose close iterator spliterator isParallel mapMulti collect iterate generate concat"},{decl:"interface Collector<T, A, R>",pkg:"java.util.stream",members:[],unsupported:"supplier accumulator combiner finisher characteristics of"},{decl:"class Collectors",pkg:"java.util.stream",members:["static <T> Collector<T, ?, List<T>> toList()","static <T> Collector<T, ?, List<T>> toUnmodifiableList()","static <T> Collector<T, ?, Set<T>> toSet()","static <T, C extends Collection<T>> Collector<T, ?, C> toCollection(Supplier<C>)","static Collector<String, ?, String> joining()","static Collector<String, ?, String> joining(String)","static Collector<String, ?, String> joining(String, String, String)","static <T, K, U> Collector<T, ?, Map<K, U>> toMap(Function<? super T, ? extends K>, Function<? super T, ? extends U>)","static <T, K, U> Collector<T, ?, Map<K, U>> toMap(Function<? super T, ? extends K>, Function<? super T, ? extends U>, BinaryOperator<U>)","static <T, K, U, M extends Map<K, U>> Collector<T, ?, M> toMap(Function<? super T, ? extends K>, Function<? super T, ? extends U>, BinaryOperator<U>, Supplier<M>)","static <T, K> Collector<T, ?, Map<K, List<T>>> groupingBy(Function<? super T, ? extends K>)","static <T, K, A, D> Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K>, Collector<? super T, A, D>)","static <T, K, D, A, M extends Map<K, D>> Collector<T, ?, M> groupingBy(Function<? super T, ? extends K>, Supplier<M>, Collector<? super T, A, D>)","static <T> Collector<T, ?, Map<Boolean, List<T>>> partitioningBy(Predicate<? super T>)","static <T, D, A> Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T>, Collector<? super T, A, D>)","static <T> Collector<T, ?, Long> counting()","static <T> Collector<T, ?, Integer> summingInt(ToIntFunction<? super T>)","static <T> Collector<T, ?, Long> summingLong(ToLongFunction<? super T>)","static <T> Collector<T, ?, Double> summingDouble(ToDoubleFunction<? super T>)","static <T> Collector<T, ?, Double> averagingInt(ToIntFunction<? super T>)","static <T> Collector<T, ?, Double> averagingLong(ToLongFunction<? super T>)","static <T> Collector<T, ?, Double> averagingDouble(ToDoubleFunction<? super T>)","static <T> Collector<T, ?, IntSummaryStatistics> summarizingInt(ToIntFunction<? super T>)","static <T> Collector<T, ?, LongSummaryStatistics> summarizingLong(ToLongFunction<? super T>)","static <T> Collector<T, ?, DoubleSummaryStatistics> summarizingDouble(ToDoubleFunction<? super T>)","static <T, U, A, R> Collector<T, ?, R> mapping(Function<? super T, ? extends U>, Collector<? super U, A, R>)","static <T, A, R> Collector<T, ?, R> filtering(Predicate<? super T>, Collector<? super T, A, R>)","static <T, U, A, R> Collector<T, ?, R> flatMapping(Function<? super T, ? extends Stream<? extends U>>, Collector<? super U, A, R>)","static <T, A, R, RR> Collector<T, A, RR> collectingAndThen(Collector<T, A, R>, Function<R, RR>)","static <T> Collector<T, ?, T> reducing(T, BinaryOperator<T>)","static <T, U> Collector<T, ?, U> reducing(U, Function<? super T, ? extends U>, BinaryOperator<U>)","static <T> Collector<T, ?, Optional<T>> reducing(BinaryOperator<T>)","static <T> Collector<T, ?, Optional<T>> minBy(Comparator<? super T>)","static <T> Collector<T, ?, Optional<T>> maxBy(Comparator<? super T>)"],unsupported:"toUnmodifiableSet toUnmodifiableMap toConcurrentMap groupingByConcurrent teeing"},{decl:"class Optional<T>",pkg:"java.util",members:["T get()","boolean isPresent()","boolean isEmpty()","T orElse(T)","T orElseGet(Supplier<? extends T>)","T orElseThrow()","<X extends Throwable> T orElseThrow(Supplier<? extends X>)","void ifPresent(Consumer<? super T>)","void ifPresentOrElse(Consumer<? super T>, Runnable)","<U> Optional<U> map(Function<? super T, ? extends U>)","<U> Optional<U> flatMap(Function<? super T, ? extends Optional<? extends U>>)","Optional<T> filter(Predicate<? super T>)","Optional<T> or(Supplier<? extends Optional<? extends T>>)","Stream<T> stream()","static <T> Optional<T> of(T)","static <T> Optional<T> ofNullable(T)","static <T> Optional<T> empty()"]},{decl:"class OptionalInt",pkg:"java.util",members:["int getAsInt()","boolean isPresent()","boolean isEmpty()","int orElse(int)","int orElseGet(IntSupplier)","int orElseThrow()","void ifPresent(IntConsumer)","IntStream stream()","static OptionalInt of(int)","static OptionalInt empty()"],unsupported:"ifPresentOrElse"},{decl:"class IntSummaryStatistics",pkg:"java.util",members:["IntSummaryStatistics()","long getCount()","long getSum()","int getMin()","int getMax()","double getAverage()","void accept(int)"],unsupported:"combine"},{decl:"class OptionalLong",pkg:"java.util",members:["long getAsLong()","boolean isPresent()","boolean isEmpty()","long orElse(long)","long orElseGet(LongSupplier)","long orElseThrow()","void ifPresent(LongConsumer)","LongStream stream()","static OptionalLong of(long)","static OptionalLong empty()"],unsupported:"ifPresentOrElse"},{decl:"class LongSummaryStatistics",pkg:"java.util",members:["LongSummaryStatistics()","long getCount()","long getSum()","long getMin()","long getMax()","double getAverage()","void accept(long)"],unsupported:"combine"},{decl:"class OptionalDouble",pkg:"java.util",members:["double getAsDouble()","boolean isPresent()","boolean isEmpty()","double orElse(double)","double orElseGet(DoubleSupplier)","double orElseThrow()","void ifPresent(DoubleConsumer)","DoubleStream stream()","static OptionalDouble of(double)","static OptionalDouble empty()"],unsupported:"ifPresentOrElse"},{decl:"class DoubleSummaryStatistics",pkg:"java.util",members:["DoubleSummaryStatistics()","long getCount()","double getSum()","double getMin()","double getMax()","double getAverage()","void accept(double)"],unsupported:"combine"},{decl:"interface LongPredicate",pkg:"java.util.function",functional:"test",members:["boolean test(long)"]},{decl:"interface DoublePredicate",pkg:"java.util.function",functional:"test",members:["boolean test(double)"]},{decl:"interface LongConsumer",pkg:"java.util.function",functional:"accept",members:["void accept(long)"]},{decl:"interface DoubleConsumer",pkg:"java.util.function",functional:"accept",members:["void accept(double)"]},{decl:"interface LongSupplier",pkg:"java.util.function",functional:"getAsLong",members:["long getAsLong()"]},{decl:"interface DoubleSupplier",pkg:"java.util.function",functional:"getAsDouble",members:["double getAsDouble()"]},{decl:"interface LongFunction<R>",pkg:"java.util.function",functional:"apply",members:["R apply(long)"]},{decl:"interface DoubleFunction<R>",pkg:"java.util.function",functional:"apply",members:["R apply(double)"]},{decl:"interface IntToLongFunction",pkg:"java.util.function",functional:"applyAsLong",members:["long applyAsLong(int)"]},{decl:"interface IntToDoubleFunction",pkg:"java.util.function",functional:"applyAsDouble",members:["double applyAsDouble(int)"]},{decl:"interface LongToIntFunction",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(long)"]},{decl:"interface LongToDoubleFunction",pkg:"java.util.function",functional:"applyAsDouble",members:["double applyAsDouble(long)"]},{decl:"interface DoubleToIntFunction",pkg:"java.util.function",functional:"applyAsInt",members:["int applyAsInt(double)"]},{decl:"interface DoubleToLongFunction",pkg:"java.util.function",functional:"applyAsLong",members:["long applyAsLong(double)"]},{decl:"interface Iterable<E>",pkg:"java.lang",members:["Iterator<E> iterator()","void forEach(Consumer<? super E>)"],unsupported:"spliterator"},{decl:"interface Iterator<E>",pkg:"java.util",members:["boolean hasNext()","E next()","void remove()","void forEachRemaining(Consumer<? super E>)"]},{decl:"interface Collection<E> extends Iterable<E>",pkg:"java.util",members:[...pr,"Stream<E> stream()"],unsupported:"parallelStream removeAll retainAll spliterator"},{decl:"interface List<E> extends Collection<E>",pkg:"java.util",members:[...pr,"E get(int)","E set(int, E)","void add(int, E)","E remove(int)","int indexOf(Object)","int lastIndexOf(Object)","E getFirst()","E getLast()","E removeFirst()","E removeLast()","void addFirst(E)","void addLast(E)","void sort(Comparator<? super E>)","!boolean addAll(int, Collection<? extends E>)","static <E> List<E> of(E...)","static <E> List<E> copyOf(Collection<? extends E>)","void replaceAll(UnaryOperator<E>)","List<E> subList(int, int)"],unsupported:"listIterator reversed"},{decl:"interface Set<E> extends Collection<E>",pkg:"java.util",members:[...pr,"static <E> Set<E> of(E...)","static <E> Set<E> copyOf(Collection<? extends E>)"]},{decl:"interface Queue<E> extends Collection<E>",pkg:"java.util",members:["boolean add(E)",...Es]},{decl:"interface Deque<E> extends Queue<E>",pkg:"java.util",members:["void addFirst(E)","void addLast(E)","boolean offerFirst(E)","boolean offerLast(E)","E removeFirst()","E removeLast()","E pollFirst()","E pollLast()","E getFirst()","E getLast()","E peekFirst()","E peekLast()","boolean removeFirstOccurrence(Object)","boolean removeLastOccurrence(Object)","boolean add(E)",...Es,"boolean addAll(Collection<? extends E>)","void push(E)","E pop()","boolean remove(Object)","boolean contains(Object)","int size()","Iterator<E> iterator()","Iterator<E> descendingIterator()"],unsupported:"reversed"},{decl:"interface Map<K, V>",pkg:"java.util",members:["int size()","boolean isEmpty()","boolean containsKey(Object)","boolean containsValue(Object)","V get(Object)","V put(K, V)","V remove(Object)","void putAll(Map<? extends K, ? extends V>)","void clear()","boolean equals(Object)","int hashCode()","V getOrDefault(Object, V)","V putIfAbsent(K, V)","boolean remove(Object, Object)","boolean replace(K, V, V)","V replace(K, V)","Set<K> keySet()","Collection<V> values()","Set<Entry<K, V>> entrySet()",...Array.from({length:11},(n,e)=>`static <K, V> Map<K, V> of(${Array.from({length:e},()=>"K, V").join(", ")})`),"static <K, V> Map<K, V> ofEntries(Entry<? extends K, ? extends V>...)","static <K, V> Entry<K, V> entry(K, V)","static <K, V> Map<K, V> copyOf(Map<? extends K, ? extends V>)","void forEach(BiConsumer<? super K, ? super V>)","void replaceAll(BiFunction<? super K, ? super V, ? extends V>)","V computeIfAbsent(K, Function<? super K, ? extends V>)","V computeIfPresent(K, BiFunction<? super K, ? super V, ? extends V>)","V compute(K, BiFunction<? super K, ? super V, ? extends V>)","V merge(K, V, BiFunction<? super V, ? super V, ? extends V>)"]},{decl:"interface Entry<K, V>",pkg:"java.util",binary:"java.util.Map$Entry",members:["K getKey()","V getValue()","V setValue(V)","boolean equals(Object)","int hashCode()","static <K extends Comparable, V> Comparator<Entry<K, V>> comparingByKey()","static <K, V extends Comparable> Comparator<Entry<K, V>> comparingByValue()","static <K, V> Comparator<Entry<K, V>> comparingByKey(Comparator<? super K>)","static <K, V> Comparator<Entry<K, V>> comparingByValue(Comparator<? super V>)"],unsupported:"copyOf"},{decl:"class ArrayList<E> implements List<E>",pkg:"java.util",members:["ArrayList(int)","ArrayList()","ArrayList(Collection<? extends E>)"],unsupported:"trimToSize ensureCapacity clone"},{decl:"class HashSet<E> implements Set<E>",pkg:"java.util",members:["HashSet()","HashSet(Collection<? extends E>)","HashSet(int)","!HashSet(int, float)"],unsupported:"clone newHashSet"},{decl:"class LinkedHashSet<E> extends HashSet<E>",pkg:"java.util",members:["LinkedHashSet()","LinkedHashSet(Collection<? extends E>)","LinkedHashSet(int)","!LinkedHashSet(int, float)"],unsupported:"newLinkedHashSet reversed addFirst addLast getFirst getLast removeFirst removeLast"},{decl:"class LinkedList<E> implements List<E>, Deque<E>",pkg:"java.util",members:["LinkedList()","LinkedList(Collection<? extends E>)"],unsupported:"clone spliterator reversed"},{decl:"class Stack<E> implements List<E>",pkg:"java.util",members:["Stack()","E push(E)","E pop()","E peek()","boolean empty()","int search(Object)","int capacity()","E firstElement()","E lastElement()","E elementAt(int)","void setElementAt(E, int)","void insertElementAt(E, int)","void removeElementAt(int)","void addElement(E)","boolean removeElement(Object)","void removeAllElements()"],unsupported:"copyInto trimToSize ensureCapacity setSize elements clone"},{decl:"interface SortedMap<K, V> extends Map<K, V>",pkg:"java.util",members:["Comparator<K> comparator()","K firstKey()","K lastKey()","SortedMap<K, V> headMap(K)","SortedMap<K, V> tailMap(K)","SortedMap<K, V> subMap(K, K)"],unsupported:"reversed putFirst putLast sequencedKeySet sequencedValues sequencedEntrySet"},{decl:"interface NavigableMap<K, V> extends SortedMap<K, V>",pkg:"java.util",members:["Entry<K, V> lowerEntry(K)","K lowerKey(K)","Entry<K, V> floorEntry(K)","K floorKey(K)","Entry<K, V> ceilingEntry(K)","K ceilingKey(K)","Entry<K, V> higherEntry(K)","K higherKey(K)","Entry<K, V> firstEntry()","Entry<K, V> lastEntry()","Entry<K, V> pollFirstEntry()","Entry<K, V> pollLastEntry()","NavigableMap<K, V> descendingMap()","NavigableSet<K> navigableKeySet()","NavigableSet<K> descendingKeySet()","NavigableMap<K, V> headMap(K, boolean)","NavigableMap<K, V> tailMap(K, boolean)","NavigableMap<K, V> subMap(K, boolean, K, boolean)"]},{decl:"class TreeMap<K, V> implements NavigableMap<K, V>",pkg:"java.util",members:["TreeMap()","TreeMap(Comparator<? super K>)","TreeMap(Map<? extends K, ? extends V>)","TreeMap(SortedMap<K, ? extends V>)"],unsupported:"clone"},{decl:"interface SortedSet<E> extends Set<E>",pkg:"java.util",members:["Comparator<E> comparator()","E first()","E last()","SortedSet<E> headSet(E)","SortedSet<E> tailSet(E)","SortedSet<E> subSet(E, E)"],unsupported:"reversed getFirst getLast removeFirst removeLast addFirst addLast"},{decl:"interface NavigableSet<E> extends SortedSet<E>",pkg:"java.util",members:["E lower(E)","E floor(E)","E ceiling(E)","E higher(E)","E pollFirst()","E pollLast()","NavigableSet<E> descendingSet()","Iterator<E> descendingIterator()","NavigableSet<E> headSet(E, boolean)","NavigableSet<E> tailSet(E, boolean)","NavigableSet<E> subSet(E, boolean, E, boolean)"]},{decl:"class TreeSet<E> implements NavigableSet<E>",pkg:"java.util",members:["TreeSet()","TreeSet(Comparator<? super E>)","TreeSet(Collection<? extends E>)","TreeSet(SortedSet<E>)"],unsupported:"clone"},{decl:"class EnumMap<K, V> implements Map<K, V>",pkg:"java.util",members:["EnumMap(Class<K>)","EnumMap(EnumMap<K, ? extends V>)","EnumMap(Map<K, ? extends V>)"],unsupported:"clone"},{decl:"class EnumSet<E> implements Set<E>",pkg:"java.util",members:["static <E> EnumSet<E> noneOf(Class<E>)","static <E> EnumSet<E> allOf(Class<E>)","static <E> EnumSet<E> of(E)","static <E> EnumSet<E> of(E, E)","static <E> EnumSet<E> of(E, E, E)","static <E> EnumSet<E> of(E, E, E, E)","static <E> EnumSet<E> of(E, E, E, E, E)","static <E> EnumSet<E> of(E, E...)","static <E> EnumSet<E> range(E, E)","static <E> EnumSet<E> complementOf(EnumSet<E>)","static <E> EnumSet<E> copyOf(EnumSet<E>)","static <E> EnumSet<E> copyOf(Collection<E>)","boolean removeAll(Collection<?>)","boolean retainAll(Collection<?>)","EnumSet<E> clone()"]},{decl:"class ArrayDeque<E> implements Deque<E>",pkg:"java.util",members:["ArrayDeque()","ArrayDeque(int)","ArrayDeque(Collection<? extends E>)"],unsupported:"clone"},{decl:"class PriorityQueue<E> implements Queue<E>",pkg:"java.util",members:["PriorityQueue()","PriorityQueue(int)","PriorityQueue(Comparator<? super E>)","PriorityQueue(int, Comparator<? super E>)","PriorityQueue(Collection<? extends E>)"],unsupported:"comparator"},{decl:"class HashMap<K, V> implements Map<K, V>",pkg:"java.util",members:["HashMap(int)","HashMap()","HashMap(Map<? extends K, ? extends V>)","!HashMap(int, float)"],unsupported:"clone newHashMap"},{decl:"class LinkedHashMap<K, V> extends HashMap<K, V>",pkg:"java.util",members:["LinkedHashMap(int)","LinkedHashMap()","LinkedHashMap(Map<? extends K, ? extends V>)","!LinkedHashMap(int, float)","!LinkedHashMap(int, float, boolean)"],unsupported:"removeEldestEntry newLinkedHashMap reversed sequencedKeySet sequencedValues sequencedEntrySet firstEntry lastEntry pollFirstEntry pollLastEntry putFirst putLast"},{decl:"class Arrays",pkg:"java.util",members:["static IntStream stream(int[])","static IntStream stream(int[], int, int)","static LongStream stream(long[])","static DoubleStream stream(double[])","static <T> Stream<T> stream(T[])","static <T> Stream<T> stream(T[], int, int)","static void sort(int[])","static void sort(int[], int, int)","static void sort(long[])","static void sort(long[], int, int)","static void sort(short[])","static void sort(short[], int, int)","static void sort(char[])","static void sort(char[], int, int)","static void sort(byte[])","static void sort(byte[], int, int)","static void sort(float[])","static void sort(float[], int, int)","static void sort(double[])","static void sort(double[], int, int)","static void sort(Object[])","static void sort(Object[], int, int)","static <T> void sort(T[], Comparator<? super T>)","static <T> void sort(T[], int, int, Comparator<? super T>)","static int binarySearch(long[], long)","static int binarySearch(long[], int, int, long)","static int binarySearch(int[], int)","static int binarySearch(int[], int, int, int)","static int binarySearch(short[], short)","static int binarySearch(short[], int, int, short)","static int binarySearch(char[], char)","static int binarySearch(char[], int, int, char)","static int binarySearch(byte[], byte)","static int binarySearch(byte[], int, int, byte)","static int binarySearch(double[], double)","static int binarySearch(double[], int, int, double)","static int binarySearch(float[], float)","static int binarySearch(float[], int, int, float)","static int binarySearch(Object[], Object)","static int binarySearch(Object[], int, int, Object)","static boolean equals(long[], long[])","static boolean equals(int[], int[])","static boolean equals(short[], short[])","static boolean equals(char[], char[])","static boolean equals(byte[], byte[])","static boolean equals(boolean[], boolean[])","static boolean equals(double[], double[])","static boolean equals(float[], float[])","static boolean equals(Object[], Object[])","static void fill(long[], long)","static void fill(long[], int, int, long)","static void fill(int[], int)","static void fill(int[], int, int, int)","static void fill(short[], short)","static void fill(short[], int, int, short)","static void fill(char[], char)","static void fill(char[], int, int, char)","static void fill(byte[], byte)","static void fill(byte[], int, int, byte)","static void fill(boolean[], boolean)","static void fill(boolean[], int, int, boolean)","static void fill(double[], double)","static void fill(double[], int, int, double)","static void fill(float[], float)","static void fill(float[], int, int, float)","static void fill(Object[], Object)","static void fill(Object[], int, int, Object)","static <T> T[] copyOf(T[], int)","static byte[] copyOf(byte[], int)","static short[] copyOf(short[], int)","static int[] copyOf(int[], int)","static long[] copyOf(long[], int)","static char[] copyOf(char[], int)","static float[] copyOf(float[], int)","static double[] copyOf(double[], int)","static boolean[] copyOf(boolean[], int)","static <T> T[] copyOfRange(T[], int, int)","static byte[] copyOfRange(byte[], int, int)","static short[] copyOfRange(short[], int, int)","static int[] copyOfRange(int[], int, int)","static long[] copyOfRange(long[], int, int)","static char[] copyOfRange(char[], int, int)","static float[] copyOfRange(float[], int, int)","static double[] copyOfRange(double[], int, int)","static boolean[] copyOfRange(boolean[], int, int)","static int hashCode(long[])","static int hashCode(int[])","static int hashCode(short[])","static int hashCode(char[])","static int hashCode(byte[])","static int hashCode(boolean[])","static int hashCode(float[])","static int hashCode(double[])","static int hashCode(Object[])","static String toString(long[])","static String toString(int[])","static String toString(short[])","static String toString(char[])","static String toString(byte[])","static String toString(boolean[])","static String toString(float[])","static String toString(double[])","static String toString(Object[])","static String deepToString(Object[])","static <T> List<T> asList(T...)"],unsupported:"stream setAll parallelSort parallelPrefix parallelSetAll deepEquals deepHashCode mismatch compare spliterator"},{decl:"class BigInteger extends Number, Comparable<BigInteger>",pkg:"java.math",fields:["BigInteger ZERO","BigInteger ONE","BigInteger TWO","BigInteger TEN"],members:["BigInteger(String)","BigInteger(String, int)","static BigInteger valueOf(long)","BigInteger add(BigInteger)","BigInteger subtract(BigInteger)","BigInteger multiply(BigInteger)","BigInteger divide(BigInteger)","BigInteger remainder(BigInteger)","BigInteger[] divideAndRemainder(BigInteger)","BigInteger mod(BigInteger)","BigInteger pow(int)","BigInteger modPow(BigInteger, BigInteger)","BigInteger modInverse(BigInteger)","BigInteger gcd(BigInteger)","BigInteger abs()","BigInteger negate()","int signum()","int compareTo(BigInteger)","BigInteger max(BigInteger)","BigInteger min(BigInteger)","BigInteger sqrt()","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","int intValueExact()","long longValueExact()","String toString()","String toString(int)","int hashCode()","boolean equals(Object)","int bitLength()","int bitCount()","boolean testBit(int)","BigInteger setBit(int)","BigInteger clearBit(int)","BigInteger flipBit(int)","int getLowestSetBit()","BigInteger shiftLeft(int)","BigInteger shiftRight(int)","BigInteger and(BigInteger)","BigInteger or(BigInteger)","BigInteger xor(BigInteger)","BigInteger not()","BigInteger andNot(BigInteger)","boolean isProbablePrime(int)","BigInteger nextProbablePrime()"],unsupported:"probablePrime toByteArray sqrtAndRemainder shortValueExact byteValueExact parallelMultiply"},{decl:"class RoundingMode implements Comparable<RoundingMode>",pkg:"java.math",fields:["RoundingMode UP","RoundingMode DOWN","RoundingMode CEILING","RoundingMode FLOOR","RoundingMode HALF_UP","RoundingMode HALF_DOWN","RoundingMode HALF_EVEN","RoundingMode UNNECESSARY"],members:["static RoundingMode[] values()","static RoundingMode valueOf(String)","String name()","int ordinal()","int compareTo(RoundingMode)","String toString()","boolean equals(Object)","int hashCode()"],unsupported:"getDeclaringClass describeConstable"},{decl:"class MathContext",pkg:"java.math",fields:["MathContext UNLIMITED","MathContext DECIMAL32","MathContext DECIMAL64","MathContext DECIMAL128"],members:["MathContext(int)","MathContext(int, RoundingMode)","int getPrecision()","RoundingMode getRoundingMode()","String toString()","boolean equals(Object)","int hashCode()"]},{decl:"class BigDecimal extends Number, Comparable<BigDecimal>",pkg:"java.math",fields:["BigDecimal ZERO","BigDecimal ONE","BigDecimal TWO","BigDecimal TEN"],members:["BigDecimal(String)","BigDecimal(double)","BigDecimal(int)","BigDecimal(long)","BigDecimal(BigInteger)","BigDecimal(BigInteger, int)","static BigDecimal valueOf(long)","static BigDecimal valueOf(long, int)","static BigDecimal valueOf(double)","BigDecimal add(BigDecimal)","BigDecimal subtract(BigDecimal)","BigDecimal multiply(BigDecimal)","BigDecimal divide(BigDecimal)","BigDecimal divide(BigDecimal, int, RoundingMode)","BigDecimal divide(BigDecimal, RoundingMode)","BigDecimal divide(BigDecimal, MathContext)","BigDecimal divideToIntegralValue(BigDecimal)","BigDecimal remainder(BigDecimal)","BigDecimal setScale(int, RoundingMode)","BigDecimal setScale(int)","BigDecimal round(MathContext)","BigDecimal sqrt(MathContext)","BigDecimal pow(int)","BigDecimal negate()","BigDecimal abs()","BigDecimal plus()","int signum()","int scale()","int precision()","BigInteger unscaledValue()","int compareTo(BigDecimal)","BigDecimal max(BigDecimal)","BigDecimal min(BigDecimal)","BigDecimal movePointLeft(int)","BigDecimal movePointRight(int)","BigDecimal scaleByPowerOfTen(int)","BigDecimal stripTrailingZeros()","String toString()","String toPlainString()","BigInteger toBigInteger()","BigInteger toBigIntegerExact()","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","int intValueExact()","long longValueExact()","int hashCode()","boolean equals(Object)","!BigDecimal add(BigDecimal, MathContext)","!BigDecimal subtract(BigDecimal, MathContext)","!BigDecimal multiply(BigDecimal, MathContext)","!BigDecimal pow(int, MathContext)","!BigDecimal abs(MathContext)","!BigDecimal negate(MathContext)","!BigDecimal plus(MathContext)","!BigDecimal remainder(BigDecimal, MathContext)"],unsupported:"toEngineeringString ulp divideAndRemainder byteValueExact shortValueExact"},{decl:"class Collections",pkg:"java.util",members:["static <T extends Comparable<? super T>> void sort(List<T>)","static <T> void sort(List<T>, Comparator<? super T>)","static void reverse(List<?>)","static void swap(List<?>, int, int)","static <T extends Object & Comparable<? super T>> T max(Collection<? extends T>)","static <T> T max(Collection<? extends T>, Comparator<? super T>)","static <T extends Object & Comparable<? super T>> T min(Collection<? extends T>)","static <T> T min(Collection<? extends T>, Comparator<? super T>)","static int frequency(Collection<?>, Object)","static <T> List<T> nCopies(int, T)","static <T> List<T> emptyList()","static <T> Set<T> emptySet()","static <K, V> Map<K, V> emptyMap()","static <T> List<T> singletonList(T)","static <T> Set<T> singleton(T)","static <K, V> Map<K, V> singletonMap(K, V)","static <T> List<T> unmodifiableList(List<? extends T>)","static <T> Set<T> unmodifiableSet(Set<? extends T>)","static <T> Collection<T> unmodifiableCollection(Collection<? extends T>)","static <K, V> Map<K, V> unmodifiableMap(Map<? extends K, ? extends V>)","static <T> boolean addAll(Collection<? super T>, T...)","static <T> void fill(List<? super T>, T)","static void shuffle(List<?>)","static void shuffle(List<?>, Random)","static <T> Comparator<T> reverseOrder()","static <T> Comparator<T> reverseOrder(Comparator<T>)"],unsupported:"binarySearch copy rotate replaceAll indexOfSubList lastIndexOfSubList synchronizedList synchronizedMap checkedList emptyIterator enumeration list disjoint newSetFromMap asLifoQueue"},{decl:"class StringBuilder",pkg:"java.lang",members:["StringBuilder()","StringBuilder(int)","StringBuilder(String)","int compareTo(StringBuilder)","StringBuilder append(Object)","StringBuilder append(String)","StringBuilder append(char[])","StringBuilder append(boolean)","StringBuilder append(char)","StringBuilder append(int)","StringBuilder append(long)","StringBuilder append(float)","StringBuilder append(double)","StringBuilder delete(int, int)","StringBuilder deleteCharAt(int)","StringBuilder replace(int, int, String)","StringBuilder insert(int, Object)","StringBuilder insert(int, String)","StringBuilder insert(int, char[])","StringBuilder insert(int, boolean)","StringBuilder insert(int, char)","StringBuilder insert(int, int)","StringBuilder insert(int, long)","StringBuilder insert(int, float)","StringBuilder insert(int, double)","int indexOf(String)","int indexOf(String, int)","int lastIndexOf(String)","int lastIndexOf(String, int)","StringBuilder reverse()","String toString()","int length()","char charAt(int)","void setCharAt(int, char)","void setLength(int)","String substring(int)","String substring(int, int)","boolean isEmpty()"],unsupported:"capacity ensureCapacity trimToSize codePointAt codePointBefore codePointCount offsetByCodePoints getChars subSequence appendCodePoint repeat chars codePoints"},{decl:"class Number",pkg:"java.lang",members:["int intValue()","long longValue()","float floatValue()","double doubleValue()","byte byteValue()","short shortValue()"]},{decl:"class Integer extends Number",pkg:"java.lang",box:"int",members:["static String toString(int, int)","static String toHexString(int)","static String toOctalString(int)","static String toBinaryString(int)","static String toString(int)","static int parseInt(String, int)","static int parseInt(String)","static Integer valueOf(String, int)","static Integer valueOf(String)","static Integer valueOf(int)","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","String toString()","int hashCode()","static int hashCode(int)","boolean equals(Object)","int compareTo(Integer)","static int compare(int, int)","static int highestOneBit(int)","static int numberOfLeadingZeros(int)","static int numberOfTrailingZeros(int)","static int bitCount(int)","static int reverse(int)","static int signum(int)","static int sum(int, int)","static int max(int, int)","static int min(int, int)"],unsupported:"toUnsignedString parseUnsignedInt decode getInteger compareUnsigned toUnsignedLong divideUnsigned remainderUnsigned lowestOneBit rotateLeft rotateRight reverseBytes compress expand describeConstable resolveConstantDesc"},{decl:"class Long extends Number",pkg:"java.lang",box:"long",members:["static String toString(long, int)","static String toHexString(long)","static String toOctalString(long)","static String toBinaryString(long)","static String toString(long)","static long parseLong(String, int)","static long parseLong(String)","static Long valueOf(String, int)","static Long valueOf(String)","static Long valueOf(long)","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","String toString()","int hashCode()","static int hashCode(long)","boolean equals(Object)","int compareTo(Long)","static int compare(long, long)","static int numberOfLeadingZeros(long)","static int numberOfTrailingZeros(long)","static int bitCount(long)","static int signum(long)","static long sum(long, long)","static long max(long, long)","static long min(long, long)"],unsupported:"toUnsignedString parseUnsignedLong decode getLong compareUnsigned divideUnsigned remainderUnsigned highestOneBit lowestOneBit rotateLeft rotateRight reverse reverseBytes compress expand describeConstable resolveConstantDesc"},{decl:"class Double extends Number",pkg:"java.lang",box:"double",members:["static String toString(double)","static Double valueOf(String)","static Double valueOf(double)","static double parseDouble(String)","static boolean isNaN(double)","static boolean isInfinite(double)","static boolean isFinite(double)","boolean isNaN()","boolean isInfinite()","String toString()","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","int hashCode()","static int hashCode(double)","boolean equals(Object)","static int compare(double, double)","int compareTo(Double)","static double sum(double, double)","static double max(double, double)","static double min(double, double)"],unsupported:"toHexString doubleToLongBits doubleToRawLongBits longBitsToDouble describeConstable resolveConstantDesc"},{decl:"class Float extends Number",pkg:"java.lang",box:"float",members:["static String toString(float)","static Float valueOf(String)","static Float valueOf(float)","static float parseFloat(String)","static boolean isNaN(float)","static boolean isInfinite(float)","static boolean isFinite(float)","boolean isNaN()","boolean isInfinite()","String toString()","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","int hashCode()","static int hashCode(float)","boolean equals(Object)","static int floatToIntBits(float)","static int floatToRawIntBits(float)","static float intBitsToFloat(int)","int compareTo(Float)","static int compare(float, float)","static float sum(float, float)","static float max(float, float)","static float min(float, float)"],unsupported:"toHexString float16ToFloat floatToFloat16 describeConstable resolveConstantDesc"},{decl:"class Byte extends Number",pkg:"java.lang",box:"byte",members:["static String toString(byte)","static Byte valueOf(byte)","static byte parseByte(String, int)","static byte parseByte(String)","static Byte valueOf(String, int)","static Byte valueOf(String)","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","String toString()","int hashCode()","static int hashCode(byte)","boolean equals(Object)","int compareTo(Byte)","static int compare(byte, byte)","static int toUnsignedInt(byte)","static long toUnsignedLong(byte)"],unsupported:"decode compareUnsigned describeConstable"},{decl:"class Short extends Number",pkg:"java.lang",box:"short",members:["static String toString(short)","static short parseShort(String, int)","static short parseShort(String)","static Short valueOf(String, int)","static Short valueOf(String)","static Short valueOf(short)","byte byteValue()","short shortValue()","int intValue()","long longValue()","float floatValue()","double doubleValue()","String toString()","int hashCode()","static int hashCode(short)","boolean equals(Object)","int compareTo(Short)","static int compare(short, short)","static int toUnsignedInt(short)","static long toUnsignedLong(short)"],unsupported:"decode compareUnsigned reverseBytes describeConstable"},{decl:"class Character",pkg:"java.lang",box:"char",members:["static Character valueOf(char)","char charValue()","int hashCode()","static int hashCode(char)","boolean equals(Object)","String toString()","static String toString(char)","static boolean isLowerCase(char)","static boolean isLowerCase(int)","static boolean isUpperCase(char)","static boolean isUpperCase(int)","static boolean isDigit(char)","static boolean isDigit(int)","static boolean isLetter(char)","static boolean isLetter(int)","static boolean isLetterOrDigit(char)","static boolean isLetterOrDigit(int)","static boolean isAlphabetic(int)","static char toLowerCase(char)","static int toLowerCase(int)","static char toUpperCase(char)","static int toUpperCase(int)","static int digit(char, int)","static int digit(int, int)","static int getNumericValue(char)","static int getNumericValue(int)","static boolean isSpaceChar(char)","static boolean isSpaceChar(int)","static boolean isWhitespace(char)","static boolean isWhitespace(int)","static char forDigit(int, int)","int compareTo(Character)","static int compare(char, char)"],unsupported:"isValidCodePoint isBmpCodePoint isSupplementaryCodePoint isHighSurrogate isLowSurrogate isSurrogate isSurrogatePair charCount toCodePoint codePointAt codePointBefore highSurrogate lowSurrogate toChars codePointCount offsetByCodePoints isTitleCase isDefined isIdeographic isJavaIdentifierStart isJavaIdentifierPart isUnicodeIdentifierStart isUnicodeIdentifierPart isIdentifierIgnorable isEmoji isEmojiPresentation isEmojiModifier isEmojiModifierBase isEmojiComponent isExtendedPictographic toTitleCase getType isISOControl isMirrored getDirectionality reverseBytes getName codePointOf isJavaLetter isJavaLetterOrDigit isSpace describeConstable"},{decl:"class Boolean",pkg:"java.lang",box:"boolean",members:["static boolean parseBoolean(String)","boolean booleanValue()","static Boolean valueOf(boolean)","static Boolean valueOf(String)","static String toString(boolean)","String toString()","int hashCode()","static int hashCode(boolean)","boolean equals(Object)","int compareTo(Boolean)","static int compare(boolean, boolean)","static boolean logicalAnd(boolean, boolean)","static boolean logicalOr(boolean, boolean)","static boolean logicalXor(boolean, boolean)"],unsupported:"getBoolean describeConstable"},{decl:"class Random",pkg:"java.util",members:["Random()","Random(long)","void setSeed(long)","int nextInt()","int nextInt(int)","int nextInt(int, int)","long nextLong()","long nextLong(long)","long nextLong(long, long)","boolean nextBoolean()","double nextDouble()","double nextDouble(double)","double nextDouble(double, double)","float nextFloat()","double nextGaussian()","!double nextGaussian(double, double)"],unsupported:"nextBytes nextExponential ints longs doubles from isDeprecated"}],lc=[{decl:"class String",pkg:"java.lang",members:["String()","String(String)","String(char[])","String(char[], int, int)","String(StringBuilder)","boolean equalsIgnoreCase(String)","int compareToIgnoreCase(String)","boolean startsWith(String, int)","boolean startsWith(String)","boolean endsWith(String)","int hashCode()","int indexOf(int)","int indexOf(int, int)","!int indexOf(int, int, int)","int lastIndexOf(int)","int lastIndexOf(int, int)","int indexOf(String)","int indexOf(String, int)","!int indexOf(String, int, int)","int lastIndexOf(String)","int lastIndexOf(String, int)","String substring(int)","String substring(int, int)","String concat(String)","String replace(char, char)","boolean matches(String)","boolean contains(String)","String replaceFirst(String, String)","String replaceAll(String, String)","String replace(String, String)","String[] split(String, int)","String[] split(String)","static String join(String, String...)","static String join(String, Iterable<? extends String>)","String toLowerCase()","String toUpperCase()","IntStream chars()","String trim()","String strip()","String stripLeading()","String stripTrailing()","boolean isBlank()","String toString()","static String format(String, Object...)","String formatted(Object...)","static String valueOf(Object)","static String valueOf(char[])","static String valueOf(char[], int, int)","static String copyValueOf(char[])","static String valueOf(boolean)","static String valueOf(char)","static String valueOf(int)","static String valueOf(long)","static String valueOf(float)","static String valueOf(double)","String repeat(int)","Stream<String> lines()","String stripIndent()","String translateEscapes()","String indent(int)"],unsupported:"codePoints intern codePointAt codePointBefore codePointCount offsetByCodePoints getBytes getChars transform describeConstable resolveConstantDesc contentEquals regionMatches subSequence getClass wait notify notifyAll splitWithDelimiters"},{decl:"class Math",pkg:"java.lang",members:["static double sin(double)","static double cos(double)","static double tan(double)","static double asin(double)","static double acos(double)","static double atan(double)","static double toRadians(double)","static double toDegrees(double)","static double exp(double)","static double log(double)","static double log10(double)","static double cbrt(double)","static double rint(double)","static double atan2(double, double)","static double pow(double, double)","static double random()","static int addExact(int, int)","static long addExact(long, long)","static int subtractExact(int, int)","static long subtractExact(long, long)","static int multiplyExact(int, int)","static long multiplyExact(long, int)","static long multiplyExact(long, long)","static int incrementExact(int)","static long incrementExact(long)","static int decrementExact(int)","static long decrementExact(long)","static int negateExact(int)","static long negateExact(long)","static int toIntExact(long)","static int floorDiv(int, int)","static long floorDiv(long, int)","static long floorDiv(long, long)","static int floorMod(int, int)","static int floorMod(long, int)","static long floorMod(long, long)","static int absExact(int)","static long absExact(long)","static int clamp(long, int, int)","static long clamp(long, long, long)","static double clamp(double, double, double)","static float clamp(float, float, float)","static double ulp(double)","static float ulp(float)","static double signum(double)","static float signum(float)","static double sinh(double)","static double cosh(double)","static double tanh(double)","static double hypot(double, double)","static double expm1(double)","static double log1p(double)","static double nextUp(double)","static float nextUp(float)","static double nextDown(double)","static float nextDown(float)"],unsupported:"IEEEremainder fma copySign getExponent nextAfter scalb multiplyHigh unsignedMultiplyHigh multiplyFull floorDivExact ceilDiv ceilDivExact ceilMod divideExact"},{decl:"class System",pkg:"java.lang",members:["static long currentTimeMillis()","static long nanoTime()","static void arraycopy(Object, int, Object, int, int)","static int identityHashCode(Object)","static String lineSeparator()","static void exit(int)"],unsupported:"getProperty getProperties setProperty clearProperty getenv gc setOut setErr setIn console inheritedChannel getLogger load loadLibrary mapLibraryName runFinalization"},{decl:"class Objects",pkg:"java.util",members:["static boolean equals(Object, Object)","static int hashCode(Object)","static int hash(Object...)","static String toString(Object)","static String toString(Object, String)","static boolean isNull(Object)","static boolean nonNull(Object)","static <T> T requireNonNull(T)","static <T> T requireNonNull(T, String)","static <T> T requireNonNullElse(T, T)","static int checkIndex(int, int)","static <T> int compare(T, T, Comparator<? super T>)"],unsupported:"deepEquals requireNonNullElseGet checkFromToIndex checkFromIndexSize toIdentityString"},{decl:"class InputStream",pkg:"java.io",members:[],unsupported:"read available close skip skipNBytes mark reset markSupported readAllBytes readNBytes transferTo nullInputStream"},{decl:"class Scanner",pkg:"java.util",closeable:!0,members:["Scanner(InputStream)","Scanner(String)","void close()","boolean hasNext()","String next()","boolean hasNextBoolean()","boolean nextBoolean()","boolean hasNextInt()","!boolean hasNextInt(int)","int nextInt()","!int nextInt(int)","boolean hasNextLong()","!boolean hasNextLong(int)","long nextLong()","!long nextLong(int)","boolean hasNextDouble()","double nextDouble()","boolean hasNextFloat()","float nextFloat()","boolean hasNextByte()","!boolean hasNextByte(int)","byte nextByte()","!byte nextByte(int)","boolean hasNextBigInteger()","BigInteger nextBigInteger()","boolean hasNextBigDecimal()","BigDecimal nextBigDecimal()","boolean hasNextShort()","!boolean hasNextShort(int)","short nextShort()","!short nextShort(int)","boolean hasNextLine()","String nextLine()"],unsupported:"useDelimiter delimiter findInLine findWithinHorizon skip match useLocale locale useRadix radix reset tokens findAll ioException remove forEachRemaining"},{decl:"interface CharSequence",pkg:"java.lang",members:[],unsupported:"length charAt subSequence chars codePoints isEmpty compare"},{decl:"class OutputStream",pkg:"java.io",members:[],unsupported:"write flush close nullOutputStream"},{decl:"class Reader",pkg:"java.io",closeable:!0,members:["int read() throws IOException","int read(char[]) throws IOException","int read(char[], int, int) throws IOException","boolean ready() throws IOException","long skip(long) throws IOException","void close() throws IOException"],unsupported:"mark reset markSupported transferTo nullReader of"},{decl:"class InputStreamReader extends Reader",pkg:"java.io",members:["InputStreamReader(InputStream)","!InputStreamReader(InputStream, String)"],unsupported:"getEncoding"},{decl:"class StringReader extends Reader",pkg:"java.io",members:["StringReader(String)"]},{decl:"class BufferedReader extends Reader",pkg:"java.io",members:["BufferedReader(Reader)","BufferedReader(Reader, int)","String readLine() throws IOException","Stream<String> lines()"]},{decl:"class Writer",pkg:"java.io",closeable:!0,members:["void write(int) throws IOException","void write(char[]) throws IOException","void write(char[], int, int) throws IOException","void write(String) throws IOException","void write(String, int, int) throws IOException","Writer append(CharSequence) throws IOException","Writer append(CharSequence, int, int) throws IOException","Writer append(char) throws IOException","void flush() throws IOException","void close() throws IOException"],unsupported:"nullWriter"},{decl:"class OutputStreamWriter extends Writer",pkg:"java.io",members:["OutputStreamWriter(OutputStream)","!OutputStreamWriter(OutputStream, String)"],unsupported:"getEncoding"},{decl:"class BufferedWriter extends Writer",pkg:"java.io",members:["BufferedWriter(Writer)","BufferedWriter(Writer, int)","void newLine() throws IOException"]},{decl:"class StringWriter extends Writer",pkg:"java.io",members:["StringWriter()","StringWriter(int)","void write(int)","void write(char[], int, int)","void write(String)","void write(String, int, int)","StringWriter append(CharSequence)","StringWriter append(CharSequence, int, int)","StringWriter append(char)","void flush()","String toString()"],unsupported:"getBuffer"},{decl:"class PrintWriter extends Writer",pkg:"java.io",members:["PrintWriter(Writer)","PrintWriter(Writer, boolean)","PrintWriter(OutputStream)","PrintWriter(OutputStream, boolean)","!PrintWriter(String)",...["boolean","char","int","long","float","double","char[]","String","Object"].map(n=>`void print(${n})`),"void println()",...["boolean","char","int","long","float","double","char[]","String","Object"].map(n=>`void println(${n})`),"PrintWriter printf(String, Object...)","PrintWriter format(String, Object...)","void write(int)","void write(char[])","void write(char[], int, int)","void write(String)","void write(String, int, int)","PrintWriter append(CharSequence)","PrintWriter append(CharSequence, int, int)","PrintWriter append(char)","void flush()","void close()","boolean checkError()"]},{decl:"class StreamTokenizer",pkg:"java.io",members:["StreamTokenizer(Reader)","int nextToken() throws IOException","void pushBack()","int lineno()","String toString()","void resetSyntax()","void wordChars(int, int)","void whitespaceChars(int, int)","void ordinaryChars(int, int)","void ordinaryChar(int)","void commentChar(int)","void quoteChar(int)","void parseNumbers()","void eolIsSignificant(boolean)","void lowerCaseMode(boolean)"],unsupported:"slashStarComments slashSlashComments",instanceFields:["int ttype","double nval","String sval"]},{decl:"class StringTokenizer",pkg:"java.util",members:["StringTokenizer(String)","StringTokenizer(String, String)","StringTokenizer(String, String, boolean)","boolean hasMoreTokens()","String nextToken()","String nextToken(String)","boolean hasMoreElements()","Object nextElement()","int countTokens()"],unsupported:"asIterator"}],sc=["boolean equals(Object)","int hashCode()","String toString()"],Rs={int:{tag:"int"},long:{tag:"long"},double:{tag:"double"},char:{tag:"char"},boolean:{tag:"boolean"},void:{tag:"void"},float:{tag:"float"},byte:{tag:"byte"},short:{tag:"short"},String:{tag:"string"},Object:{tag:"object"}},ht=class{#e;#t;#n;#i=0;varargs=!1;constructor(e,t,i){this.#e=e,this.#t=t,this.#n=i}get done(){return this.#a(),this.#i>=this.#e.length}#a(){for(;this.#e[this.#i]===" ";)this.#i++}peek(){return this.#a(),this.#e[this.#i]??""}expect(e){if(this.peek()!==e)throw new Error(`library signature: expected \'${e}\' in ${this.#e}`);this.#i++}word(){this.#a();let e=this.#i;for(;/[\\w<>]/.test(this.#e[this.#i]??"")&&this.#e[this.#i]!=="<"&&this.#e[this.#i]!==">";)this.#i++;return this.#e.slice(e,this.#i)}type(){if(this.peek()==="?"){if(this.#i++,this.peek()==="e"||this.peek()==="s"){let i=this.word()==="super";return{tag:"wildcard",bound:this.type(),isSuper:i}}return{tag:"wildcard",bound:null}}let e=this.word(),t;if(Rs[e])t=Rs[e];else if(this.#t.includes(e))t={tag:"typevar",name:e};else{let i=this.#n.get(e);if(!i)throw new Error(`library signature: unknown type ${e}`);let a=[];if(this.peek()==="<"){for(this.#i++,a.push(this.type());this.peek()===",";)this.#i++,a.push(this.type());this.expect(">")}t={tag:"library",symbol:i,args:a}}for(;this.peek()==="[";)this.#i++,this.expect("]"),t={tag:"array",element:t};return this.#e.startsWith("...",this.#i)&&(this.#i+=3,this.varargs=!0,t={tag:"array",element:t}),t}};function Ri(n,e,t){switch(n.tag){case"typevar":{let i=e.indexOf(n.name);return i>=0&&t[i]?t[i]:n}case"array":return{tag:"array",element:Ri(n.element,e,t)};case"library":return{tag:"library",symbol:n.symbol,args:n.args.map(i=>Ri(i,e,t))};case"wildcard":return n.bound?{tag:"wildcard",bound:Ri(n.bound,e,t),...n.isSuper?{isSuper:!0}:{}}:n;default:return n}}function Ii(n){switch(n.tag){case"typevar":return n.name;case"library":return n.symbol.name;case"array":return`${Ii(n.element)}[]`;case"string":return"String";case"object":return"Object";default:return n.tag}}function oc(n){let e=0,t=1,i=[];for(let a=0;a<n.length;a++){let r=n[a];if(r==="<")e++;else{if(r===">"&&--e===0)return i.push(n.slice(t,a).trim()),[n.slice(0,a+2),i];r===","&&e===1&&(i.push(n.slice(t,a).trim()),t=a+1)}}throw new Error(`library signature: unclosed type parameters in ${n}`)}function Is(n,e,t){let i=n.startsWith("!"),a=n.indexOf(" throws "),r=a>=0?n.slice(a+8).split(", ").map(Ct=>uc[Ct]+"."+Ct):null;a>=0&&(n=n.slice(0,a));let l=i?n.slice(1):n,s=l.startsWith("static "),o=s?l.slice(7):l,u=o.startsWith("<")?oc(o):null;u&&(o=o.slice(u[0].length));let d=u?u[1]:[],f=d.map(Ct=>Ct.split(" ")[0]),p=[...e.typeParams,...f],N=o.indexOf("("),x=o.slice(0,N).trim(),ie=x===e.name,_=x.lastIndexOf(" "),ae=ie?"<init>":x.slice(_+1),yu=ie?{tag:"void"}:new ht(x.slice(0,_),p,t).type(),Kt=new ht(o.slice(N+1,o.lastIndexOf(")")),p,t),Xn=[];if(!Kt.done)for(Xn.push(Kt.type());Kt.peek()===",";)Kt.expect(","),Xn.push(Kt.type());let Vl=`${ae}(${Xn.map(Ii).join(",")})`,Su=i?"":s||ie?`${e.name}.${Vl}`:Vl,Nt={name:ae,params:Xn,returnType:yu,isStatic:s,native:Su,owner:e.name};if(Kt.varargs&&(Nt.varargs=!0),r&&(Nt.throws=r),u){Nt.typeParams=f;let Ct=d.filter(fn=>/^(Object & )?Comparable/.test(fn.split(" extends ")[1]??"")).map(fn=>fn.split(" ")[0]);Ct.length&&(Nt.comparableParams=Ct);for(let fn of d){let[El,yt]=fn.split(" extends ");if(yt?.includes(" & ")){(Nt.typeParamShown??={})[El]=yt.split(" & ").join(",");continue}!yt||yt==="Comparable"||yt==="Throwable"||!yt.includes("<")||((Nt.typeParamBounds??={})[El]=new ht(yt,p,t).type())}}return{method:Nt,isConstructor:ie}}var uc={IOException:"java.io"},Ts=(n,e)=>n.name===e.name&&n.params.length===e.params.length&&n.params.every((t,i)=>Ii(t)===Ii(e.params[i]));function Os(){let n=new Map,e=[...rc,...lc].map(t=>{let[,i,a,r=""]=/^(interface|class) (\\w+)(?:<([^>]*)>)?/.exec(t.decl),l={name:a,qualifiedName:t.binary??`${t.pkg}.${a}`,packageName:t.pkg,typeParams:r?r.split(",").map(s=>s.trim()):[],supertypes:[],constructors:[],methods:[],unsupported:new Set(t.unsupported?.split(" ")??[]),isInterface:i==="interface",...t.box?{box:t.box}:{},...t.functional?{functional:t.functional}:{}};return n.set(l.name,l),{spec:t,symbol:l}});for(let{spec:t,symbol:i}of e){let a=/(?:extends|implements) (.*)$/.exec(t.decl)?.[1];if(a){let o=new ht(a,i.typeParams,n);for(i.supertypes.push(o.type());o.peek()===",";)o.expect(","),i.supertypes.push(o.type())}for(let o of t.fields??[]){let u=o.lastIndexOf(" ");(i.staticFields??={})[o.slice(u+1)]=new ht(o.slice(0,u),i.typeParams,n).type()}for(let o of t.instanceFields??[]){let u=o.lastIndexOf(" ");(i.instanceFields??={})[o.slice(u+1)]=new ht(o.slice(0,u),i.typeParams,n).type()}(t.closeable||i.supertypes.some(o=>o.tag==="library"&&o.symbol.closeable))&&(i.closeable=!0);let r=[];for(let o of t.members){let{method:u,isConstructor:d}=Is(o,i,n);(d?i.constructors:r).push(u)}let l=[...r],s=i.unsupported;for(let o of i.supertypes){if(o.tag!=="library")continue;let u=d=>Ri(d,o.symbol.typeParams,o.args);for(let d of o.symbol.methods){if(d.isStatic&&o.symbol.isInterface)continue;let f=d.typeParams?.length||!o.args.length?d:{...d,params:d.params.map(u),returnType:u(d.returnType)};l.some(p=>Ts(p,f))||l.push(i.isInterface?f:{...f,owner:i.name})}for(let d of o.symbol.unsupported)s.add(d)}if(!i.supertypes.length)for(let o of sc){let{method:u}=Is(o,i,n);l.some(d=>Ts(d,u))||l.push(i.isInterface?{...u,owner:"Object"}:u)}i.methods.push(...l)}return n}var le="java.lang.NumberFormatException",M="java.lang.ArithmeticException",He="java.lang.NullPointerException",Hs="java.lang.IllegalArgumentException",B=n=>10n**BigInt(n),G=n=>n<0n?-n:n,Vr=n=>n>0n?1:n<0n?-1:0,At=n=>n===0n?1:G(n).toString().length,vr=[0,0,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5],gt=class n extends b{className="java.math.BigInteger";v;constructor(e,t){super(e),this.v=t}*javaString(){return this.v.toString()}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.v===this.v}*contentHash(){return zs(this.v)}naturalOrder(e,t){let i=Z(e,t);return this.v<i.v?-1:this.v>i.v?1:0}"add(BigInteger)"(e,t){return E(e,this.v+Z(e,t).v)}"subtract(BigInteger)"(e,t){return E(e,this.v-Z(e,t).v)}"multiply(BigInteger)"(e,t){return e.charge(dt(this.v)*dt(Z(e,t).v)),E(e,this.v*t.v)}"divide(BigInteger)"(e,t){return E(e,this.v/br(e,t))}"remainder(BigInteger)"(e,t){return E(e,this.v%br(e,t))}"divideAndRemainder(BigInteger)"(e,t){let i=br(e,t);return new c.JArray(3,[E(e,this.v/i),E(e,this.v%i)],e.hash(),"[Ljava.math.BigInteger;")}"mod(BigInteger)"(e,t){let i=Nr(e,t),a=this.v%i;return E(e,a<0n?a+i:a)}"pow(int)"(e,t){return t<0?e.fail(M,"Negative exponent"):(e.charge(dt(this.v)*t),E(e,this.v**BigInt(t)))}"modPow(BigInteger,BigInteger)"(e,t,i){let a=Z(e,t).v,r=Nr(e,i);if(r===1n)return E(e,0n);let l=(this.v%r+r)%r;return a<0n&&(l=js(e,l,r)),e.charge(G(a).toString(2).length*dt(r)*dt(r)),E(e,qs(l,G(a),r))}"modInverse(BigInteger)"(e,t){let i=Nr(e,t);return i===1n?E(e,0n):E(e,js(e,(this.v%i+i)%i,i))}"gcd(BigInteger)"(e,t){let i=G(this.v),a=G(Z(e,t).v);for(;a;)[i,a]=[a,i%a];return E(e,i)}"abs()"(e){return this.v<0n?E(e,-this.v):this}"negate()"(e){return E(e,-this.v)}"signum()"(){return Vr(this.v)}"compareTo(BigInteger)"(e,t){return this.naturalOrder(e,t)}"max(BigInteger)"(e,t){return this.v>=Z(e,t).v?this:t}"min(BigInteger)"(e,t){return this.v<=Z(e,t).v?this:t}"sqrt()"(e){return this.v<0n?e.fail(M,"Negative BigInteger"):E(e,Ws(this.v))}"intValue()"(){return Number(BigInt.asIntN(32,this.v))}"longValue()"(){return c.normLong(BigInt.asIntN(64,this.v))}"doubleValue()"(){return Number(this.v)}"floatValue()"(){return c.parseDecimalFloat(this.v.toString())}"byteValue()"(){return Number(BigInt.asIntN(8,this.v))}"shortValue()"(){return Number(BigInt.asIntN(16,this.v))}"intValueExact()"(e){return BigInt.asIntN(32,this.v)!==this.v?e.fail(M,"BigInteger out of int range"):Number(this.v)}"longValueExact()"(e){return BigInt.asIntN(64,this.v)!==this.v?e.fail(M,"BigInteger out of long range"):c.normLong(this.v)}"toString(int)"(e,t){let i=t;return new c.JString(this.v.toString(i<2||i>36?10:i))}"bitLength()"(){let e=this.v<0n?-this.v-1n:this.v;return e===0n?0:e.toString(2).length}"bitCount()"(){let e=this.v<0n?-this.v-1n:this.v,t=0;for(let i of e.toString(2))i==="1"&&t++;return t}"testBit(int)"(e,t){return t<0?e.fail(M,"Negative bit address"):g((this.v>>BigInt(t)&1n)===1n)}"setBit(int)"(e,t){return t<0?e.fail(M,"Negative bit address"):E(e,this.v|1n<<BigInt(t))}"clearBit(int)"(e,t){return t<0?e.fail(M,"Negative bit address"):E(e,this.v&~(1n<<BigInt(t)))}"flipBit(int)"(e,t){return t<0?e.fail(M,"Negative bit address"):E(e,this.v^1n<<BigInt(t))}"getLowestSetBit()"(){if(this.v===0n)return-1;let e=0;for(;(this.v>>BigInt(e)&1n)===0n;)e++;return e}"shiftLeft(int)"(e,t){let i=t;return E(e,i>=0?this.v<<BigInt(i):this.v>>BigInt(-i))}"shiftRight(int)"(e,t){let i=t;return E(e,i>=0?this.v>>BigInt(i):this.v<<BigInt(-i))}"and(BigInteger)"(e,t){return E(e,this.v&Z(e,t).v)}"or(BigInteger)"(e,t){return E(e,this.v|Z(e,t).v)}"xor(BigInteger)"(e,t){return E(e,this.v^Z(e,t).v)}"not()"(e){return E(e,~this.v)}"andNot(BigInteger)"(e,t){return E(e,this.v&~Z(e,t).v)}"isProbablePrime(int)"(e,t){return t<=0?1:(e.charge(dt(this.v)**2*40),g(ws(G(this.v))))}"nextProbablePrime()"(e){if(this.v<0n)return e.fail(M,`start < 0: ${this.v}`);let t=this.v<2n?2n:this.v+1n;for(t>2n&&t%2n===0n&&t++;!ws(t);)e.charge(dt(t)**2*40),t+=t===2n?1n:2n;return E(e,t)}};function zs(n){let e=G(n),t=[];for(;e>0n;)t.unshift(Number(e&0xffffffffn)|0),e>>=32n;let i=0;for(let a of t)i=Math.imul(31,i)+a|0;return Math.imul(i,Vr(n))}var dt=n=>Math.max(1,Math.ceil(G(n).toString(16).length/8));function Z(n,e){return e===null?n.fail(He,\'Cannot read field "signum" because "val" is null\'):e}function br(n,e){let t=Z(n,e).v;return t===0n?n.fail(M,"BigInteger divide by zero"):t}function Nr(n,e){let t=Z(n,e).v;return t<=0n?n.fail(M,"BigInteger: modulus not positive"):t}function js(n,e,t){let[i,a]=[e,t],[r,l]=[1n,0n];for(;a;){let s=i/a;[i,a]=[a,i-s*a],[r,l]=[l,r-s*l]}return i!==1n?n.fail(M,"BigInteger not invertible."):(r%t+t)%t}function qs(n,e,t){let i=1n,a=n%t;for(;e>0n;)e&1n&&(i=i*a%t),a=a*a%t,e>>=1n;return i}function Ws(n){if(n<2n)return n;let e=BigInt(Math.floor(Math.sqrt(Number(n))));for(;;){let t=e+n/e>>1n;if(t>=e)break;e=t}for(;e*e>n;)e--;for(;(e+1n)*(e+1n)<=n;)e++;return e}function ws(n){if(n<2n)return!1;let e=[2n,3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n];for(let a of e){if(n===a)return!0;if(n%a===0n)return!1}let t=n-1n,i=0;for(;(t&1n)===0n;)t>>=1n,i++;e:for(let a of e){let r=qs(a,t,n);if(!(r===1n||r===n-1n)){for(let l=1;l<i;l++)if(r=r*r%n,r===n-1n)continue e;return!1}}return!0}var Ls=new WeakMap;function E(n,e){if(e>=-16n&&e<=16n){let t=Ls.get(n);t||Ls.set(n,t=new Map);let i=t.get(e);return i||t.set(e,i=new gt(n.hash(),e)),i}return new gt(n.hash(),e)}function As(n,e,t){if(e===null)return n.fail(He,\'Cannot invoke "String.length()" because "val" is null\');let i=e.value;if(t<2||t>36)return n.fail(le,"Radix out of range");if(!i.length)return n.fail(le,"Zero length BigInteger");let a=0,r=!1,l=i.lastIndexOf("-"),s=i.lastIndexOf("+");if(l>=0){if(l!==0||s>=0)return n.fail(le,"Illegal embedded sign character");r=!0,a=1}else if(s>=0){if(s!==0)return n.fail(le,"Illegal embedded sign character");a=1}if(a===i.length)return n.fail(le,"Zero length BigInteger");if(/[^\\P{Nd}0-9]/u.test(i))return n.limitation("parsing digits outside ASCII");let o=N=>{let x=parseInt(N,36);return Number.isNaN(x)||x>=t?-1:x};for(;a<i.length&&o(i[a])===0;)a++;if(a===i.length)return 0n;let u=i.length-a,d=u%vr[t];d===0&&(d=vr[t]);let f=0n,p=BigInt(t);for(n.charge(u>>>3);a<i.length;){let N=i.slice(a,a+d);if(a+=d,d=vr[t],!N.length||[...N].some(x=>o(x)<0))return n.fail(le,`For input string: "${N}"${t===10?"":` under radix ${t}`}`);for(let x of N)f=f*p+BigInt(o(x))}return r?-f:f}var Er=["UP","DOWN","CEILING","FLOOR","HALF_UP","HALF_DOWN","HALF_EVEN","UNNECESSARY"],Sr=class extends b{className="java.math.RoundingMode";name;ordinal;constructor(e,t){super(e),this.ordinal=t,this.name=Er[t]}*javaString(){return this.name}naturalOrder(e,t){return t===null?e.fail(He,null):this.ordinal-t.ordinal}"name()"(){return new c.JString(this.name)}"ordinal()"(){return this.ordinal}"compareTo(RoundingMode)"(e,t){return this.naturalOrder(e,t)}},ks=new WeakMap;function xr(n){let e=ks.get(n);return e||ks.set(n,e=Er.map((t,i)=>new Sr(n.hash(),i))),e}var ge=(n,e)=>xr(n)[Er.indexOf(e)];function Cr(n,e){return e===null?n.fail(He,\'Cannot invoke "java.math.RoundingMode.ordinal()" because "roundingMode" is null\'):e.name}function wi(n,e,t,i){let a=e/t,r=e-a*t;if(r===0n)return a;let l=e<0n!=t<0n?-1n:1n,s=2n*G(r),o=s===G(t)?0:s>G(t)?1:-1;switch(i){case"UP":return a+l;case"DOWN":return a;case"CEILING":return l>0n?a+1n:a;case"FLOOR":return l<0n?a-1n:a;case"HALF_UP":return o>=0?a+l:a;case"HALF_DOWN":return o>0?a+l:a;case"HALF_EVEN":return o>0||o===0&&(a&1n)!==0n?a+l:a;case"UNNECESSARY":return n.fail(M,"Rounding necessary")}}var Lt=class n extends b{className="java.math.MathContext";precision;mode;constructor(e,t,i){super(e),this.precision=t,this.mode=i}*javaString(){return`precision=${this.precision} roundingMode=${this.mode.name}`}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.precision===this.precision&&t.mode===this.mode}*contentHash(){return this.mode.hash<<24|this.precision}"getPrecision()"(){return this.precision}"getRoundingMode()"(){return this.mode}},Ms=new WeakMap;function Ti(n,e){let t=Ms.get(n);return t||(t={UNLIMITED:new Lt(n.hash(),0,ge(n,"HALF_UP")),DECIMAL32:new Lt(n.hash(),7,ge(n,"HALF_EVEN")),DECIMAL64:new Lt(n.hash(),16,ge(n,"HALF_EVEN")),DECIMAL128:new Lt(n.hash(),34,ge(n,"HALF_EVEN"))},Ms.set(n,t)),t[e]}function Bs(n,e,t){return e<0?n.fail(Hs,"Digits < 0"):t===null?n.fail(He,"null RoundingMode"):new Lt(n.hash(),e,t)}function yr(n,e){return e===null?n.fail(He,\'Cannot read field "precision" because "mc" is null\'):e}var Rr=-2147483648,Ir=2147483647,Bn=class n extends b{className="java.math.BigDecimal";u;scale;constructor(e,t,i){super(e),this.u=t,this.scale=i}*javaString(){return Oi(this.u,this.scale)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.u===this.u&&t.scale===this.scale}*contentHash(){return Math.imul(31,zs(this.u))+this.scale|0}naturalOrder(e,t){let i=ke(e,t),[a,r]=Mn(this,i);return a<r?-1:a>r?1:0}"add(BigDecimal)"(e,t){let i=ke(e,t),[a,r,l]=Mn(this,i);return I(e,a+r,l)}"subtract(BigDecimal)"(e,t){let i=ke(e,t),[a,r,l]=Mn(this,i);return I(e,a-r,l)}"multiply(BigDecimal)"(e,t){let i=ke(e,t);return I(e,this.u*i.u,Ue(e,this.scale+i.scale))}"divide(BigDecimal)"(e,t){return Js(e,this,ke(e,t))}"divide(BigDecimal,int,RoundingMode)"(e,t,i,a){return Gs(e,this,ke(e,t),i,Cr(e,a))}"divide(BigDecimal,RoundingMode)"(e,t,i){return Gs(e,this,ke(e,t),this.scale,Cr(e,i))}"divide(BigDecimal,MathContext)"(e,t,i){let a=yr(e,i),r=ke(e,t);return a.precision===0?Js(e,this,r):fc(e,this,r,a.precision,a.mode.name)}"divideToIntegralValue(BigDecimal)"(e,t){return Ks(e,this,ke(e,t))}"remainder(BigDecimal)"(e,t){let i=ke(e,t),a=Ks(e,this,i),r=new n(0,a.u*i.u,a.scale+i.scale),[l,s,o]=Mn(this,r);return I(e,l-s,o)}"setScale(int,RoundingMode)"(e,t,i){return Ps(e,this,t,Cr(e,i))}"setScale(int)"(e,t){return Ps(e,this,t,"UNNECESSARY")}"round(MathContext)"(e,t){let i=yr(e,t);return gc(e,this,i.precision,i.mode.name)}"sqrt(MathContext)"(e,t){return mc(e,this,yr(e,t))}"pow(int)"(e,t){let i=t;return i<0||i>999999999?e.fail(M,"Invalid operation"):(e.charge(dt(this.u)*i),I(e,this.u**BigInt(i),Ue(e,this.scale*i)))}"negate()"(e){return I(e,-this.u,this.scale)}"abs()"(e){return this.u<0n?I(e,-this.u,this.scale):this}"plus()"(){return this}"signum()"(){return Vr(this.u)}"scale()"(){return this.scale}"precision()"(){return At(this.u)}"unscaledValue()"(e){return E(e,this.u)}"compareTo(BigDecimal)"(e,t){return this.naturalOrder(e,t)}"max(BigDecimal)"(e,t){return this.naturalOrder(e,t)>=0?this:t}"min(BigDecimal)"(e,t){return this.naturalOrder(e,t)<=0?this:t}"movePointLeft(int)"(e,t){return _s(e,this,Ue(e,this.scale+t))}"movePointRight(int)"(e,t){return _s(e,this,Ue(e,this.scale-t))}"scaleByPowerOfTen(int)"(e,t){return I(e,this.u,Ue(e,this.scale-t))}"stripTrailingZeros()"(e){if(this.u===0n)return I(e,0n,0);let t=this.u,i=this.scale;for(;t%10n===0n;)t/=10n,i--;return I(e,t,i)}"toPlainString()"(){return new c.JString(Ds(this.u,this.scale))}"toBigInteger()"(e){return E(e,ft(this))}"toBigIntegerExact()"(e){return ft(this)*(this.scale>0?B(this.scale):1n)!==(this.scale>0?this.u:this.u*B(-this.scale))?e.fail(M,"Rounding necessary"):E(e,ft(this))}"intValue()"(){return Number(BigInt.asIntN(32,ft(this)))}"longValue()"(){return c.normLong(BigInt.asIntN(64,ft(this)))}"intValueExact()"(e){let t=Fs(e,this);return BigInt.asIntN(32,t)!==t?e.fail(M,"Overflow"):Number(t)}"longValueExact()"(e){let t=Fs(e,this);return BigInt.asIntN(64,t)!==t?e.fail(M,"Overflow"):c.normLong(t)}"doubleValue()"(){return Number(Oi(this.u,this.scale))}"floatValue()"(){return c.parseDecimalFloat(Ds(this.u,this.scale))}"byteValue()"(){return Number(BigInt.asIntN(8,ft(this)))}"shortValue()"(){return Number(BigInt.asIntN(16,ft(this)))}};function ke(n,e){return e===null?n.fail(He,\'Cannot read field "scale" because "augend" is null\'):e}function Ue(n,e){return e<Rr||e>Ir?n.fail(M,e>0?"Underflow":"Overflow"):e}function Mn(n,e){return n.scale===e.scale?[n.u,e.u,n.scale]:n.scale>e.scale?[n.u,e.u*B(n.scale-e.scale),n.scale]:[n.u*B(e.scale-n.scale),e.u,e.scale]}var $s=new WeakMap;function I(n,e,t){return new Bn(n.hash(),e,t)}function sn(n,e){if(e<0n||e>10n)return I(n,e,0);let t=$s.get(n);t||$s.set(n,t=new Map);let i=t.get(e);return i||t.set(e,i=I(n,e,0)),i}function Oi(n,e){let t=n<0n?"-":"",i=G(n).toString();if(e===0)return t+i;let a=-e+(i.length-1);if(e>0&&a>=-6)return i.length>e?`${t}${i.slice(0,i.length-e)}.${i.slice(i.length-e)}`:`${t}0.${"0".repeat(e-i.length)}${i}`;let r=i.length>1?`${i[0]}.${i.slice(1)}`:i;return`${t}${r}E${a>=0?"+":""}${a}`}function Ds(n,e){return e<=0?n===0n?"0":n.toString()+"0".repeat(-e):Oi(n,e).includes("E")?cc(n,e):Oi(n,e)}function cc(n,e){let t=n<0n?"-":"",i=G(n).toString().padStart(e+1,"0");return`${t}${i.slice(0,i.length-e)}.${i.slice(i.length-e)}`}function ft(n){return n.scale<=0?n.u*B(-n.scale):n.u/B(n.scale)}function Fs(n,e){return e.scale>0&&e.u%B(e.scale)!==0n?n.fail(M,"Rounding necessary"):ft(e)}function Li(n,e,t){t.u===0n&&n.fail(M,e.u===0n?"Division undefined":"Division by zero")}function $n(n,e,t){for(;e>t&&n!==0n&&n%10n===0n;)n/=10n,e--;return[n,e]}var Tr=n=>Math.max(Rr,Math.min(Ir,n));function Js(n,e,t){Li(n,e,t);let i=Tr(e.scale-t.scale);if(e.u===0n)return I(n,0n,i);let a=e.u,r=t.u;r<0n&&(a=-a,r=-r);let l=hc(G(a),r);a/=l,r/=l;let s=0,o=0,u=r;for(;u%2n===0n;)u/=2n,s++;for(;u%5n===0n;)u/=5n,o++;if(u!==1n)return n.fail(M,"Non-terminating decimal expansion; no exact representable decimal result.");let d=Math.max(s,o);l=a*B(d)/r;let[f,p]=$n(l,i+d,i);return I(n,f,Ue(n,p))}function hc(n,e){for(;e;)[n,e]=[e,n%e];return n}function Gs(n,e,t,i,a){Li(n,e,t);let r=i-e.scale+t.scale,l=r>=0?e.u*B(r):e.u,s=r>=0?t.u:t.u*B(-r);return I(n,wi(n,l,s,a),i)}function dc(n,e){let t=n.toString().length-e.toString().length;return(t>=0?n<e*B(t):n*B(-t)<e)&&t--,t}function fc(n,e,t,i,a){Li(n,e,t);let r=Tr(e.scale-t.scale);if(e.u===0n)return I(n,0n,r);let l=G(e.u),s=G(t.u),o=dc(l,s)-r,u=i-1-o,d=u-r,f=d>=0?e.u*B(d):e.u,p=d>=0?t.u:t.u*B(-d),N=wi(n,f,p,a),x=f%p===0n;return At(N)>i&&(N/=10n,u--),x&&([N,u]=$n(N,u,r)),I(n,N,Ue(n,u))}function Ks(n,e,t){Li(n,e,t);let i=Tr(e.scale-t.scale),[a,r]=Mn(e,t);if(G(a)<G(r))return I(n,0n,i);let l=a/r;if(i>=0)return I(n,l*B(i),i);let[s,o]=$n(l,0,i);return I(n,s,o)}function Ps(n,e,t,i){return t>=e.scale?I(n,e.u*B(t-e.scale),t):I(n,wi(n,e.u,B(e.scale-t),i),t)}function gc(n,e,t,i){let a=At(e.u);if(t===0||a<=t)return e;let r=a-t,l=wi(n,e.u,B(r),i),s=e.scale-r;return At(l)>t&&(l/=10n,s--),I(n,l,Ue(n,s))}function _s(n,e,t){return t<0?I(n,e.u*B(-t),0):I(n,e.u,t)}function mc(n,e,t){if(e.u<0n)return n.fail(M,"Attempted square root of negative BigDecimal");let i=Math.trunc(e.scale/2);if(e.u===0n)return I(n,0n,i);let a=t.precision===0?"UNNECESSARY":t.mode.name,r=t.precision===0?Math.ceil(At(e.u)/2)+1:t.precision,l=Math.floor((At(e.u)-1-e.scale)/2),s=r-1-l,o=N=>{let x=2*N-e.scale,ie=x>=0?e.u*B(x):e.u,_=x>=0?1n:B(-x),ae=Ws(ie/_);return{u:ae,exact:ae*ae*_===ie,num:ie,den:_}},{u,exact:d,num:f,den:p}=o(s);if(d)[u,s]=$n(u,s,i);else{if(a==="UNNECESSARY")return n.fail(M,"Computed square root not exact.");let N=(2n*u+1n)**2n*p<4n*f;(a==="UP"||a==="CEILING"||(a==="HALF_UP"||a==="HALF_DOWN"||a==="HALF_EVEN")&&N)&&u++,At(u)>r&&(u/=10n,s--)}return I(n,u,Ue(n,s))}function ji(n,e){if(e===null)return n.fail(He,\'Cannot invoke "String.toCharArray()" because "val" is null\');let t=e.value;if(!t.length)return n.fail(le,null);let i=0;(t[0]==="+"||t[0]==="-")&&i++;let a="",r=0,l=!1,s=0;for(;i<t.length;i++){let d=t[i];if(d>="0"&&d<="9")a+=d,l&&r++;else if(d==="."){if(l)return n.fail(le,"Character array contains more than one decimal point.");l=!0}else if(d==="e"||d==="E"){let f=t.slice(i+1);if(!/^[+-]?\\d+$/.test(f))return n.fail(le,null);s=Number(f);break}else return/\\p{Nd}/u.test(d)?n.limitation("parsing digits outside ASCII"):n.fail(le,`Character ${d} is neither a decimal digit number, decimal point, nor "e" notation exponential mark.`)}if(!a.length)return n.fail(le,"No digits found.");let o=r-s;if(o<Rr||o>Ir)return n.fail(le,"Scale out of range.");let u=BigInt(a);return I(n,t[0]==="-"?-u:u,o)}function pc(n,e){if(!Number.isFinite(e))return n.fail(le,"Infinite or NaN");if(e===0)return I(n,0n,0);let t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);let i=t.getBigUint64(0),a=Number(i>>52n&0x7ffn),r=i&(1n<<52n)-1n,l;a===0?l=-1074:(r|=1n<<52n,l=a-1075);let s=e<0?-1n:1n;if(l>=0)return I(n,s*(r<<BigInt(l)),0);let[o,u]=$n(r*5n**BigInt(-l),-l,0);return I(n,s*o,u)}var Us=n=>n.value,Zs={"BigInteger.ZERO":n=>E(n,0n),"BigInteger.ONE":n=>E(n,1n),"BigInteger.TWO":n=>E(n,2n),"BigInteger.TEN":n=>E(n,10n),"BigInteger.<init>(String)":(n,[e])=>new gt(n.hash(),As(n,e,10)),"BigInteger.<init>(String,int)":(n,[e,t])=>new gt(n.hash(),As(n,e,t)),"BigInteger.valueOf(long)":(n,[e])=>E(n,BigInt(e)),"BigDecimal.ZERO":n=>sn(n,0n),"BigDecimal.ONE":n=>sn(n,1n),"BigDecimal.TWO":n=>sn(n,2n),"BigDecimal.TEN":n=>sn(n,10n),"BigDecimal.<init>(String)":(n,[e])=>ji(n,e),"BigDecimal.<init>(double)":(n,[e])=>pc(n,e),"BigDecimal.<init>(int)":(n,[e])=>I(n,BigInt(e),0),"BigDecimal.<init>(long)":(n,[e])=>I(n,BigInt(e),0),"BigDecimal.<init>(BigInteger)":(n,[e])=>I(n,Z(n,e).v,0),"BigDecimal.<init>(BigInteger,int)":(n,[e,t])=>I(n,Z(n,e).v,t),"BigDecimal.valueOf(long)":(n,[e])=>sn(n,BigInt(e)),"BigDecimal.valueOf(long,int)":(n,[e,t])=>t===0?sn(n,BigInt(e)):I(n,BigInt(e),t),"BigDecimal.valueOf(double)":(n,[e])=>Number.isFinite(e)?ji(n,new c.JString(c.doubleToString(e))):n.fail(le,"Infinite or NaN"),"RoundingMode.UP":n=>ge(n,"UP"),"RoundingMode.DOWN":n=>ge(n,"DOWN"),"RoundingMode.CEILING":n=>ge(n,"CEILING"),"RoundingMode.FLOOR":n=>ge(n,"FLOOR"),"RoundingMode.HALF_UP":n=>ge(n,"HALF_UP"),"RoundingMode.HALF_DOWN":n=>ge(n,"HALF_DOWN"),"RoundingMode.HALF_EVEN":n=>ge(n,"HALF_EVEN"),"RoundingMode.UNNECESSARY":n=>ge(n,"UNNECESSARY"),"RoundingMode.values()":n=>new c.JArray(3,xr(n).slice(),n.hash(),"[Ljava.math.RoundingMode;"),"RoundingMode.valueOf(String)":(n,[e])=>e===null?n.fail(He,"Name is null"):xr(n).find(i=>i.name===Us(e))??n.fail(Hs,`No enum constant java.math.RoundingMode.${Us(e)}`),"MathContext.UNLIMITED":n=>Ti(n,"UNLIMITED"),"MathContext.DECIMAL32":n=>Ti(n,"DECIMAL32"),"MathContext.DECIMAL64":n=>Ti(n,"DECIMAL64"),"MathContext.DECIMAL128":n=>Ti(n,"DECIMAL128"),"MathContext.<init>(int)":(n,[e])=>Bs(n,e,ge(n,"HALF_UP")),"MathContext.<init>(int,RoundingMode)":(n,[e,t])=>Bs(n,e,t)};var Or=/%(\\d+\\$|<)?([-#+ 0,(]*)?(\\d+)?(\\.\\d+)?([tT])?([a-zA-Z%])/y;function Ve(n,e,t){return n.fail(`java.util.${e}`,t)}function wr(n){return n instanceof c.JString?"java.lang.String":n instanceof c.JBox?Pt[n.kind]:De(n)}function Te(n,e,t){return e===void 0||n.length>=e?n:t?n+" ".repeat(e-n.length):" ".repeat(e-n.length)+n}function Xs(n){return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g,",")}function Ar(n){if(typeof n!="number")return n;if(n===0)return{digits:"0",point:1};let[e,t]=Math.abs(n).toExponential().split("e");return{digits:e.replace(".","").replace(/0+$/,"")||"0",point:Number(t)+1}}function vc(n,e){if(n===0n)return{digits:"0",point:1};let t=(n<0n?-n:n).toString();return{digits:t.replace(/0+$/,""),point:t.length-e}}function kr(n,e,t){let i=e+t;if(i<0)return{digits:"0",point:1};if(n.length<=i)return{digits:n,point:e};let a=n.slice(0,i).split("").map(Number);if(Number(n[i])>=5){let r=a.length-1;for(;r>=0;r--)if(a[r]===9)a[r]=0;else{a[r]++;break}r<0&&(a.unshift(1),e++)}return{digits:a.join("")||"0",point:e}}function kt(n,e){let t=Ar(n),{digits:i,point:a}=kr(t.digits,t.point,e),r=a<=0?"0".repeat(1-a)+i:i.padEnd(a,"0"),l=Math.max(a,1),s=r.slice(0,l).replace(/^0+(?=\\d)/,"")||"0",o=r.slice(l).padEnd(e,"0").slice(0,e);return e?`${s}.${o}`:s}function Lr(n,e,t){let{digits:i,point:a}=Ar(n),r=kr(i,1,e),l=a-1+(r.point-1),s=r.digits.padEnd(e+1,"0"),o=e?`${s[0]}.${s.slice(1,e+1)}`:s[0],u=`${l<0?"-":"+"}${String(Math.abs(l)).padStart(2,"0")}`;return`${o}${t?"E":"e"}${u}`}function Qs(n,e,t){let i=e===0?1:e;if(n===0||typeof n!="number"&&n.digits==="0")return kt(0,i-1);let{digits:a,point:r}=Ar(n),s=kr(a,r,i-r).point-1;return s>=-4&&s<i?kt(n,Math.max(i-(s+1),0)):Lr(n,i-1,t)}function mt(n,e,t){for(let i of e.flags)t.includes(i)||Ve(n,"FormatFlagsConversionMismatchException",`Conversion = ${e.conversion}, Flags = ${i}`);(e.flags.includes("-")||e.flags.includes("0"))&&e.width===void 0&&Ve(n,"MissingFormatWidthException",e.text),e.flags.includes("-")&&e.flags.includes("0")&&Ve(n,"IllegalFormatFlagsException",`Flags = \'${e.flags}\'`),e.flags.includes("+")&&e.flags.includes(" ")&&Ve(n,"IllegalFormatFlagsException",`Flags = \'${e.flags}\'`)}function jr(n,e){e.precision!==void 0&&Ve(n,"IllegalFormatPrecisionException",String(e.precision))}function Ai(n,e,t){let i=n.flags;if(i.includes(",")){let l=t.indexOf(".");t=l<0?Xs(t):Xs(t.slice(0,l))+t.slice(l)}let a="",r="";if(e?i.includes("(")?(a="(",r=")"):a="-":i.includes("+")?a="+":i.includes(" ")&&(a=" "),i.includes("0")&&n.width!==void 0){let l=n.width-a.length-r.length-t.length;l>0&&(t="0".repeat(l)+t)}return Te(a+t+r,n.width,i.includes("-"))}function Ys(n,e,t){if(t===null)return null;let i={int:32,long:64,byte:8,short:16},a=t instanceof c.JBox?i[t.kind]:void 0;return a!==void 0?{value:BigInt(t.value),bits:a}:t instanceof gt?{value:t.v,bits:0}:Ve(n,"IllegalFormatConversionException",`${e.conversion} != ${wr(t)}`)}function*bc(n,e,t){let i=e.flags.includes("-"),a=e.conversion===e.conversion.toUpperCase();switch(e.conversion.toLowerCase()){case"b":{mt(n,e,"-");let r=t===null?"false":t instanceof c.JBox&&t.kind==="boolean"?t.value?"true":"false":"true";return e.precision!==void 0&&(r=r.slice(0,e.precision)),Te(a?r.toUpperCase():r,e.width,i)}case"h":{mt(n,e,"-");let r=t===null?"null":((yield*A(n,t))>>>0).toString(16);return e.precision!==void 0&&(r=r.slice(0,e.precision)),Te(a?r.toUpperCase():r,e.width,i)}case"s":{mt(n,e,"-");let r=yield*V(n,t);return e.precision!==void 0&&(r=r.slice(0,e.precision)),Te(a?r.toUpperCase():r,e.width,i)}case"c":{if(mt(n,e,"-"),jr(n,e),t===null)return Te(a?"NULL":"null",e.width,i);let r;if(t instanceof c.JBox&&t.kind==="char")r=t.value;else if(t instanceof c.JBox&&(t.kind==="int"||t.kind==="byte"||t.kind==="short"))r=t.value,(r<0||r>1114111)&&Ve(n,"IllegalFormatCodePointException",`Code point = 0x${(r>>>0).toString(16)}`);else return Ve(n,"IllegalFormatConversionException",`c != ${wr(t)}`);let l=String.fromCodePoint(r);return Te(a?l.toUpperCase():l,e.width,i)}case"d":{mt(n,e,"-+ 0,("),jr(n,e);let r=Ys(n,e,t);return r?Ai(e,r.value<0n,(r.value<0n?-r.value:r.value).toString()):Te("null",e.width,i)}case"o":case"x":{mt(n,e,"-#0"),jr(n,e);let r=Ys(n,e,t);if(!r)return Te("null",e.width,i);let l=e.conversion.toLowerCase()==="o"?8:16,s=r.bits===0&&r.value<0n,o=(r.bits===0?s?-r.value:r.value:BigInt.asUintN(r.bits,r.value)).toString(l);return e.flags.includes("#")&&(o=(l===8?"0":"0x")+o),a&&(o=o.toUpperCase()),Ai({...e,flags:e.flags.replace("#","")},s,o)}case"e":case"f":case"g":{let r=e.conversion.toLowerCase();if(mt(n,e,r==="e"?"-#+ 0(":"-#+ 0,("),t===null)return Te("null",e.width,i);if(t instanceof Bn){let d=vc(t.u,t.scale),f=e.precision??6,p=r==="f"?kt(d,f):r==="e"?Lr(d,f,a):Qs(d,f,a);return a&&(p=p.toUpperCase()),Ai(e,t.u<0n,p)}if(!(t instanceof c.JBox&&(t.kind==="double"||t.kind==="float")))return Ve(n,"IllegalFormatConversionException",`${e.conversion} != ${wr(t)}`);let l=t.value;if(!Number.isFinite(l)){let d=Number.isNaN(l)?"NaN":l>0?e.flags.includes("+")?"+Infinity":"Infinity":e.flags.includes("(")?"(Infinity)":"-Infinity";return Te(a?d.toUpperCase():d,e.width,i)}let s=e.precision??6,o=Math.abs(l),u=r==="f"?kt(o,s):r==="e"?Lr(o,s,a):Qs(o,s,a);return a&&(u=u.toUpperCase()),Ai(e,l<0||Object.is(l,-0),u)}case"a":return n.limitation("hexadecimal floating point (%a) in String.format");default:return Ve(n,"UnknownFormatConversionException",`Conversion = \'${e.conversion}\'`)}}function*Mt(n,e,t){if(e===null)return n.fail("java.lang.NullPointerException",\'Cannot invoke "String.length()" because "s" is null\');let i=e.value,a=t?.data??[],r="",l=0,s=-1,o=0;for(n.charge(i.length);o<i.length;){let u=i.indexOf("%",o);if(u<0){r+=i.slice(o);break}r+=i.slice(o,u),Or.lastIndex=u;let d=Or.exec(i);if(!d){let N=i[u+1];Ve(n,"UnknownFormatConversionException",`Conversion = \'${N===void 0?"%":N}\'`)}o=Or.lastIndex;let f={index:d[1],flags:d[2]??"",width:d[3]?Number(d[3]):void 0,precision:d[4]?Number(d[4].slice(1)):void 0,conversion:d[6],text:d[0]};if(d[5]&&n.limitation("date and time conversions (%t) in String.format"),f.conversion==="n"){r+=`\n`;continue}if(f.conversion==="%"){mt(n,{...f,conversion:"%"},"-"),r+=Te("%",f.width,f.flags.includes("-"));continue}let p;f.index==="<"?p=s:f.index?p=Number(f.index.slice(0,-1))-1:p=l++,(p<0||t!==null&&p>=a.length)&&Ve(n,"MissingFormatArgumentException",`Format specifier \'${f.text}\'`),s=p,r+=yield*bc(n,f,t===null?null:a[p]),n.checkString(r.length)}return r}var Dn=class extends Error{index;constructor(e,t){super(e),this.index=t}},se=class extends Error{},to="\\\\n\\\\r\\\\u0085\\\\u2028\\\\u2029",eo=`(?=(?:\\\\r\\\\n|[${to}])?(?![\\\\s\\\\S]))(?!(?<=\\\\r)\\\\n)`,$i=" \\\\t\\\\n\\\\x0B\\\\f\\\\r",Mr=" \\\\t\\\\xA0\\\\u1680\\\\u180E\\\\u2000-\\\\u200A\\\\u202F\\\\u205F\\\\u3000",ki="\\\\n\\\\x0B\\\\f\\\\r\\\\x85\\\\u2028\\\\u2029",Mi={Lower:"a-z",Upper:"A-Z",ASCII:"\\\\x00-\\\\x7F",Alpha:"a-zA-Z",Digit:"0-9",Alnum:"a-zA-Z0-9",Punct:"!-\\\\/:-@\\\\[-`{-~",Graph:"!-~",Print:" -~",Blank:" \\\\t",Cntrl:"\\\\x00-\\\\x1F\\\\x7F",XDigit:"0-9a-fA-F",Space:$i},Nc="\\\\^$.|?*+()[]{}";function Me(n){let e=n.charCodeAt(0);return Nc.includes(n)||n==="-"||n==="/"?"\\\\"+n:e<32||e===127?`\\\\x${e.toString(16).padStart(2,"0")}`:n}var Br=class{#e;#t=0;groups=0;names=new Map;dotAll=!1;caseInsensitive=!1;constructor(e){this.#e=e}#n(e,t=this.#t){throw new Dn(e,t)}parse(){for(;;){let t=/^\\(\\?([a-zA-Z]+)\\)/.exec(this.#e.slice(this.#t));if(!t)break;for(let i of t[1])if(i==="i")this.caseInsensitive=!0;else if(i==="s")this.dotAll=!0;else{if("mxuUdc".includes(i))throw new se(`the regex flag (?${i})`);this.#n("Unknown inline modifier",this.#t+2+t[1].indexOf(i))}this.#t+=t[0].length}let e=this.#a(0);return this.#t<this.#e.length&&this.#n("Unmatched closing \')\'",this.#t-1),e}#i(e=0){return this.#e[this.#t+e]}#a(e){let t=[this.#r(e)];for(;this.#i()==="|";)this.#t++,t.push(this.#r(e));return t.join("|")}#r(e){let t="";for(;this.#t<this.#e.length;){let i=this.#i();if(i==="|")break;if(i===")"){e===0&&this.#n("Unmatched closing \')\'",this.#t-1);break}let a=this.#t,r=this.#s(e);r!==null&&(t+=r+this.#l(a))}return t}#l(e){let t="",i=this.#i();if(i==="*"||i==="+"||i==="?")t=i,this.#t++;else if(i==="{"){let r=/^\\{(\\d+)(,(\\d*))?\\}/.exec(this.#e.slice(this.#t));r||(/^\\{\\d+(,\\d*)?$/.test(this.#e.slice(this.#t))&&this.#n("Unclosed counted closure",this.#e.length),this.#n("Illegal repetition",this.#t+1)),r[3]&&Number(r[3])<Number(r[1])&&this.#n("Illegal repetition range",this.#t+r[0].length-1),t=r[0],this.#t+=r[0].length}else return"";if(this.#i()==="?")t+="?",this.#t++;else if(this.#i()==="+")throw new se("possessive quantifiers in a regex");let a=this.#i();return(a==="*"||a==="+"||a==="?")&&this.#n(`Dangling meta character \'${a}\'`,this.#t),t}#s(e){let t=this.#e[this.#t++];switch(t){case"*":case"+":case"?":this.#n(`Dangling meta character \'${t}\'`,this.#t-1);break;case"{":this.#n("Illegal repetition",this.#t);break;case".":return this.dotAll?"[\\\\s\\\\S]":`[^${to}]`;case"^":return"^";case"$":return eo;case"[":return this.#u();case"(":return this.#c(e);case"\\\\":return this.#h(!1);default:return Me(t)}return""}#c(e){let t=this.#t-1,i="(";if(this.#i()==="?"){let a=this.#e.slice(this.#t+1);if(a.startsWith(":"))i="(?:";else if(a.startsWith("="))i="(?=";else if(a.startsWith("!"))i="(?!";else if(a.startsWith("<="))i="(?<=";else if(a.startsWith("<!"))i="(?<!";else{if(a.startsWith(">"))throw new se("atomic groups (?>...) in a regex");if(a.startsWith("<")){let r=/^<([a-zA-Z][a-zA-Z0-9]*)>/.exec(a);return r||this.#n("named capturing group is missing trailing \'>\'",this.#t+1),this.groups++,this.names.set(r[1],this.groups),this.#t+=r[0].length+1,this.#o(`(?<${r[1]}>`,e,t)}else{if(/^[a-zA-Z-]/.test(a))throw new se("regex flags written inside the pattern, (?i) other than at its start");this.#n("Unknown inline modifier",this.#t+1)}}return this.#t+=i.length-1,this.#o(i,e,t)}return this.groups++,this.#o(i,e,t)}#o(e,t,i){let a=this.#a(t+1);return this.#i()!==")"&&this.#n("Unclosed group",this.#e.length),this.#t++,e+a+")"}#h(e){let t=this.#e[this.#t++];switch(t===void 0&&this.#n("Unescaped trailing backslash",this.#e.length),t){case"d":return e?"0-9":"[0-9]";case"D":return e?this.#d():"[^0-9]";case"w":return e?"a-zA-Z_0-9":"[a-zA-Z_0-9]";case"W":return e?this.#d():"[^a-zA-Z_0-9]";case"s":return e?$i:`[${$i}]`;case"S":return e?this.#d():`[^${$i}]`;case"h":return e?Mr:`[${Mr}]`;case"H":return e?this.#d():`[^${Mr}]`;case"v":return e?ki:`[${ki}]`;case"V":return e?this.#d():`[^${ki}]`;case"R":return e&&this.#n("Illegal/unsupported escape sequence",this.#t-1),`(?:\\\\r\\\\n|[${ki}])`;case"b":case"B":return e&&this.#n("Illegal/unsupported escape sequence",this.#t-1),"\\\\"+t;case"A":return"^";case"z":return"(?![\\\\s\\\\S])";case"Z":return eo;case"G":throw new se("\\\\G in a regex");case"t":return"\\\\t";case"n":return"\\\\n";case"r":return"\\\\r";case"f":return"\\\\f";case"a":return"\\\\x07";case"e":return"\\\\x1B";case"0":{let i=/^[0-3]?[0-7]{1,2}/.exec(this.#e.slice(this.#t));return i||this.#n("Illegal octal escape sequence",this.#t),this.#t+=i[0].length,Me(String.fromCharCode(parseInt(i[0],8)))}case"x":{let i=/^(?:[0-9a-fA-F]{2}|\\{[0-9a-fA-F]+\\})/.exec(this.#e.slice(this.#t));i||this.#n("Illegal hexadecimal escape sequence",this.#t),this.#t+=i[0].length;let a=parseInt(i[0].replace(/[{}]/g,""),16);if(a>65535)throw new se("supplementary characters in a regex");return Me(String.fromCharCode(a))}case"u":{let i=/^[0-9a-fA-F]{4}/.exec(this.#e.slice(this.#t));return i||this.#n("Illegal Unicode escape sequence",this.#t),this.#t+=4,Me(String.fromCharCode(parseInt(i[0],16)))}case"c":{let i=this.#e[this.#t++];return i===void 0&&this.#n("Illegal control escape sequence",this.#t),Me(String.fromCharCode(i.charCodeAt(0)^64))}case"Q":{let i=this.#e.indexOf("\\\\E",this.#t),a=i<0?this.#e.slice(this.#t):this.#e.slice(this.#t,i);return this.#t=i<0?this.#e.length:i+2,[...a].map(Me).join("")||(e?"":"(?:)")}case"E":return"";case"p":case"P":{let i=/^\\{(?:Is)?([A-Za-z]+)\\}/.exec(this.#e.slice(this.#t)),a=i?.[1];if(!a||!(a in Mi)){if(i)throw new se(`the regex class \\\\${t}{${i[1]}}`);this.#n("Unknown character property name {"+this.#e.slice(this.#t+1,this.#e.indexOf("}",this.#t))+"}",this.#t)}return this.#t+=i[0].length,t==="P"?e?this.#d():`[^${Mi[a]}]`:e?Mi[a]:`[${Mi[a]}]`}case"k":{let i=/^<([a-zA-Z][a-zA-Z0-9]*)>/.exec(this.#e.slice(this.#t));return i||this.#n("\\\\k is not followed by \'<\' for named capturing group",this.#t),this.names.has(i[1])||this.#n(`named capturing group <${i[1]}> does not exist`,this.#t+i[0].length-1),this.#t+=i[0].length,`\\\\k<${i[1]}>`}default:if(t>="1"&&t<="9"){e&&this.#n("Illegal/unsupported escape sequence",this.#t-1);let i=Number(t);for(;/[0-9]/.test(this.#i()??"")&&i*10+Number(this.#i())<=this.groups;)i=i*10+Number(this.#e[this.#t++]);return i>this.groups?"(?!)":`\\\\${i}(?:)`}return/[a-zA-Z]/.test(t)&&this.#n("Illegal/unsupported escape sequence",this.#t-1),Me(t)}}#d(){throw new se("negated classes such as \\\\S inside [...] in a regex")}#u(){let e=this.#t-1,t="[";this.#i()==="^"&&(t+="^",this.#t++);let i=!0;for(;;){let a=this.#i();if(a===void 0&&this.#n("Unclosed character class",this.#e.length-1),a==="]"&&!i){this.#t++;break}if(i=!1,a==="[")throw new se("nested character classes in a regex");if(a==="&"&&this.#i(1)==="&")throw new se("character class intersections (&&) in a regex");let r=this.#f();if(r.single!==null&&this.#i()==="-"&&this.#i(1)===void 0&&this.#n("Illegal character range",this.#e.length),r.single!==null&&this.#i()==="-"&&this.#i(1)!=="]"){this.#t++;let l=this.#f();l.single===null&&this.#n("Illegal character range",this.#t-1),l.single.charCodeAt(0)<r.single.charCodeAt(0)&&this.#n("Illegal character range",this.#t-1),t+=`${Me(r.single)}-${Me(l.single)}`}else t+=r.text}return t==="["?"(?!)":t==="[^"?"[\\\\s\\\\S]":t+"]"}#f(){let e=this.#e[this.#t++];if(e!=="\\\\")return{single:e,text:Me(e)};let t=this.#t,i=this.#e[this.#t],a=this.#h(!0);return i!==void 0&&"dDwWsShHvVpPQ".includes(i)?{single:null,text:a}:{single:a.startsWith("\\\\x")?String.fromCharCode(parseInt(a.slice(2),16)):a.length===2&&a[0]==="\\\\"?Cc(a[1]):a,text:a}}};function Cc(n){return{t:" ",n:`\n`,r:"\\r",f:"\\f"}[n]??n}var Bi=new Map;function Di(n,e){let t=Bi.get(e);if(!t){try{let i=new Br(e),a=i.parse(),r=i.caseInsensitive?"i":"";t={regex:new RegExp(a,"g"+r),whole:new RegExp(`^(?:${a})(?![\\\\s\\\\S])`,r),groups:i.groups,names:i.names,caseInsensitive:i.caseInsensitive}}catch(i){if(!(i instanceof Dn||i instanceof se))throw i;t=i}Bi.size>200&&Bi.clear(),Bi.set(e,t)}if(t instanceof se)return n.limitation(t.message);if(t instanceof Dn){let i=t.index>=0&&t.index<e.length?`\n${" ".repeat(t.index)}^`:"";return n.fail("java.util.regex.PatternSyntaxException",`${t.message} near index ${t.index}\n${e}${i}`)}return t}function Fi(n,e,t){e.caseInsensitive&&/[^\\x00-\\x7f]/.test(t)&&n.limitation("case-insensitive regex matching of non-ASCII text"),n.charge(t.length)}function $r(n,e,t=1/0){let i=n.regex;i.lastIndex=0;let a=[];for(;a.length<t;){let r=i.exec(e);if(!r||(a.push(r),r[0]===""&&(i.lastIndex=r.index+1),i.lastIndex>e.length))break}return a}function no(n,e,t,i){let a="";for(let r=0;r<t.length;r++){let l=t[r];if(l==="\\\\")r++,r>=t.length&&n.fail("java.lang.IllegalArgumentException","character to be escaped is missing"),a+=t[r];else if(l==="$"){r++,r>=t.length&&n.fail("java.lang.IllegalArgumentException","Illegal group reference: group index is missing");let s;if(t[r]==="{"){let o=t.indexOf("}",r),u=o<0?"":t.slice(r+1,o);(o<0||!/^[a-zA-Z][a-zA-Z0-9]*$/.test(u))&&n.fail("java.lang.IllegalArgumentException","named capturing group is missing trailing \'}\'"),e.names.has(u)||n.fail("java.lang.IllegalArgumentException",`No group with name {${u}}`),s=e.names.get(u),r=o}else{let o=t.charCodeAt(r)-48;for((o<0||o>9)&&n.fail("java.lang.IllegalArgumentException","Illegal group reference"),s=o;r+1<t.length;){let u=t.charCodeAt(r+1)-48;if(u<0||u>9||s*10+u>e.groups)break;s=s*10+u,r++}s>e.groups&&n.fail("java.lang.IndexOutOfBoundsException",`No group ${s}`)}a+=i[s]??""}else a+=l}return a}var ze="java.lang.NullPointerException",go="java.lang.StringIndexOutOfBoundsException",yc=3,R=n=>new c.JString(n),Dr=n=>n.value;function io(n,e){return n.allocate(e.length),new c.JArray(yc,e.map(R),n.hash(),"[Ljava.lang.String;")}var Ji=n=>n>=0&&n<=1114111;function F(n,e,t){return e===null&&n.fail(ze,t),Dr(e)}function ao(n,e,t,i){(t<0||t>i||i>e.length)&&n.fail(go,`Range [${t}, ${i}) out of bounds for length ${e.length}`)}var qe=n=>/[\\t\\n\\x0B\\f\\r\\x1C-\\x1F]/.test(n)||/[\\p{Zs}\\p{Zl}\\p{Zp}]/u.test(n)&&!/[\xA0  ]/.test(n),ro=n=>n.toUpperCase().length===1?n.toUpperCase():n,lo=n=>n.toLowerCase().length===1?n.toLowerCase():n;function so(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++){let a=n[i],r=e[i];if(a!==r&&(a=ro(a),r=ro(r),a!==r&&(a=lo(a),r=lo(r),a!==r)))return a.charCodeAt(0)-r.charCodeAt(0)}return n.length-e.length}function Gi(n){let e=n.data,t="";for(let i=0;i<e.length;i+=8192)t+=String.fromCharCode(...e.subarray(i,i+8192));return t}function oo(n,e,t,i){if(e===null)return n.fail(ze,\'Cannot read the array length because "value" is null\');let a=e.data.length;return(t<0||i<0||t>a-i)&&n.fail(go,`Range [${t}, ${t} + ${i}) out of bounds for length ${a}`),Gi(e).slice(t,t+i)}function uo(n,e,t,i){let a=Di(n,F(n,t,\'Cannot invoke "String.length()" because "regex" is null\'));Fi(n,a,e);let r=[],l=0,s=!1;for(let o of $r(a,e)){let u=o.index,d=u+o[0].length;if(i>0&&r.length>=i-1)break;u===0&&d===0||(s=!0,r.push(e.slice(l,u)),l=d)}if(!s)return io(n,[e]);if(r.push(e.slice(l)),i===0)for(;r.length&&r[r.length-1]==="";)r.pop();return io(n,r)}var mo=\'Cannot invoke "String.isEmpty()" because "this.pattern" is null\';function co(n,e,t,i,a){let r=Di(n,F(n,t,mo));a&&i===null&&n.fail(ze,"replacement"),Fi(n,r,e);let l=$r(r,e,a?1:1/0);if(!l.length)return R(e);let s=F(n,i,\'Cannot invoke "String.length()" because "replacement" is null\'),o="",u=0;for(let d of l)o+=e.slice(u,d.index)+no(n,r,s,d),u=d.index+d[0].length,n.checkString(o.length);return R(o+e.slice(u))}var Ki={"substring(int)":(n,e,[,t])=>(ao(n,e.value,t,e.value.length),R(e.value.slice(t))),"substring(int,int)":(n,e,[,t,i])=>(ao(n,e.value,t,i),R(e.value.slice(t,i))),"indexOf(String)":(n,e,[,t])=>e.value.indexOf(F(n,t,\'Cannot invoke "String.coder()" because "str" is null\')),"indexOf(String,int)":(n,e,[,t,i])=>e.value.indexOf(F(n,t,\'Cannot invoke "String.length()" because "tgtStr" is null\'),Math.max(0,i)),"indexOf(int)":(n,e,[,t])=>Ji(t)?e.value.indexOf(String.fromCodePoint(t)):-1,"indexOf(int,int)":(n,e,[,t,i])=>Ji(t)?e.value.indexOf(String.fromCodePoint(t),Math.max(0,i)):-1,"lastIndexOf(String)":(n,e,[,t])=>e.value.lastIndexOf(F(n,t,\'Cannot read field "value" because "tgtStr" is null\')),"lastIndexOf(String,int)":(n,e,[,t,i])=>{let a=F(n,t,\'Cannot read field "value" because "tgtStr" is null\');return i<0?-1:e.value.lastIndexOf(a,i)},"lastIndexOf(int)":(n,e,[,t])=>Ji(t)?e.value.lastIndexOf(String.fromCodePoint(t)):-1,"lastIndexOf(int,int)":(n,e,[,t,i])=>i<0||!Ji(t)?-1:e.value.lastIndexOf(String.fromCodePoint(t),i),"contains(String)":(n,e,[,t])=>g(e.value.includes(F(n,t,\'Cannot invoke "java.lang.CharSequence.toString()" because "s" is null\'))),"startsWith(String)":(n,e,[,t])=>g(e.value.startsWith(F(n,t,\'Cannot invoke "String.length()" because "prefix" is null\'))),"startsWith(String,int)":(n,e,[,t,i])=>{let a=F(n,t,\'Cannot invoke "String.length()" because "prefix" is null\'),r=i;return g(r>=0&&r<=e.value.length-a.length&&e.value.startsWith(a,r))},"endsWith(String)":(n,e,[,t])=>g(e.value.endsWith(F(n,t,\'Cannot invoke "String.length()" because "suffix" is null\'))),"toUpperCase()":(n,e)=>R(e.value.toUpperCase()),"toLowerCase()":(n,e)=>R(e.value.toLowerCase()),"trim()":(n,e)=>R(e.value.replace(/^[\\0- ]+|[\\0- ]+$/g,"")),"strip()":(n,e)=>{let t=0,i=e.value.length;for(;t<i&&qe(e.value[t]);)t++;for(;i>t&&qe(e.value[i-1]);)i--;return R(e.value.slice(t,i))},"stripLeading()":(n,e)=>{let t=0;for(;t<e.value.length&&qe(e.value[t]);)t++;return R(e.value.slice(t))},"stripTrailing()":(n,e)=>{let t=e.value.length;for(;t>0&&qe(e.value[t-1]);)t--;return R(e.value.slice(0,t))},"isBlank()":(n,e)=>g([...e.value].every(qe)),"stripIndent()":(n,e)=>(n.charge(e.value.length),R(xc(e.value))),"translateEscapes()":(n,e)=>(n.charge(e.value.length),R(Vc(n,e.value))),"indent(int)":(n,e,[,t])=>{let i=t;if(!e.value)return R("");let r=Fr(e.value).map(l=>{if(i>0)return" ".repeat(i)+l;if(i===0)return l;let s=0;for(;s<l.length&&s<-i&&qe(l[s]);)s++;return l.slice(s)}).map(l=>l+`\n`).join("");return n.checkString(r.length),R(r)},"repeat(int)":(n,e,[,t])=>{let i=t;return i<0&&n.fail("java.lang.IllegalArgumentException",`count is negative: ${i}`),n.checkString(e.value.length*i),R(e.value.repeat(i))},"replace(char,char)":(n,e,[,t,i])=>R(e.value.split(String.fromCharCode(t)).join(String.fromCharCode(i))),"replace(String,String)":(n,e,[,t,i])=>{let a=F(n,t,\'Cannot invoke "java.lang.CharSequence.toString()" because "target" is null\'),r=F(n,i,\'Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null\'),l=e.value.replaceAll(a,()=>r);return n.checkString(l.length),R(l)},"equalsIgnoreCase(String)":(n,e,[,t])=>g(t!==null&&Dr(t).length===e.value.length&&so(e.value,Dr(t))===0),"compareToIgnoreCase(String)":(n,e,[,t])=>so(e.value,F(n,t,\'Cannot read field "value" because "s2" is null\')),"concat(String)":(n,e,[,t])=>R(e.value+F(n,t,\'Cannot invoke "String.isEmpty()" because "str" is null\')),"hashCode()":(n,e)=>ka(e.value),"toString()":(n,e)=>e,"split(String)":(n,e,[,t])=>uo(n,e.value,t,0),"split(String,int)":(n,e,[,t,i])=>uo(n,e.value,t,i),"replaceAll(String,String)":(n,e,[,t,i])=>co(n,e.value,t,i,!1),"replaceFirst(String,String)":(n,e,[,t,i])=>co(n,e.value,t,i,!0),"matches(String)":(n,e,[,t])=>{let i=Di(n,F(n,t,mo));return Fi(n,i,e.value),g(i.whole.test(e.value))},"compareTo(T)":(n,e,[,t])=>{let i=F(n,t,\'Cannot read field "value" because "anotherString" is null\'),a=e.value,r=Math.min(a.length,i.length);for(let l=0;l<r;l++)if(a.charCodeAt(l)!==i.charCodeAt(l))return a.charCodeAt(l)-i.charCodeAt(l);return a.length-i.length},"formatted(Object[])":(n,e,[,t])=>h(Mt(n,e,t),R)};function*Sc(n,e){return yield*V(n,e)}function*ho(n,e,t){let i=F(n,e,\'Cannot invoke "java.lang.CharSequence.toString()" because "delimiter" is null\'),a=[];for(let r of t)a.push(r===null?"null":yield*V(n,r));return n.charge(a.length),a.join(i)}var po={"String.valueOf(Object)":(n,[e])=>h(Sc(n,e),R),"String.valueOf(char[])":(n,[e])=>e===null?n.fail(ze,\'Cannot read the array length because "value" is null\'):R(Gi(e)),"String.valueOf(char[],int,int)":(n,[e,t,i])=>R(oo(n,e,t,i)),"String.copyValueOf(char[])":(n,[e])=>e===null?n.fail(ze,\'Cannot read the array length because "value" is null\'):R(Gi(e)),"String.valueOf(boolean)":(n,[e])=>R(e?"true":"false"),"String.valueOf(char)":(n,[e])=>R(String.fromCharCode(e)),"String.valueOf(int)":(n,[e])=>R(String(e)),"String.valueOf(long)":(n,[e])=>R(String(e)),"String.valueOf(double)":(n,[e])=>R(c.doubleToString(e)),"String.valueOf(float)":(n,[e])=>R(c.floatToString(e)),"String.format(String,Object[])":(n,[e,t])=>h(Mt(n,e,t),R),"String.join(String,String[])":(n,[e,t])=>e!==null&&t===null?n.fail(ze,\'Cannot read the array length because "elements" is null\'):h(ho(n,e,t.data),R),"String.join(String,Iterable)":(n,[e,t])=>e===null||t===null?n.fail(ze,null):h(ho(n,e,t.elements(n,!0)),R),"String.<init>()":()=>R(""),"String.<init>(String)":(n,[e])=>R(F(n,e,\'Cannot read field "value" because "original" is null\')),"String.<init>(char[])":(n,[e])=>e===null?n.fail(ze,\'Cannot read the array length because "value" is null\'):R(Gi(e)),"String.<init>(char[],int,int)":(n,[e,t,i])=>R(oo(n,e,t,i)),"String.<init>(StringBuilder)":(n,[e])=>e===null?n.fail(ze,\'Cannot invoke "java.lang.AbstractStringBuilder.getValue()" because "asb" is null\'):R(e.text)};function Fr(n){if(!n)return[];let e=n.split(/\\r\\n|\\r|\\n/);return e[e.length-1]===""&&e.pop(),e}function xc(n){let e=n.split(/\\r\\n|\\r|\\n/),t=a=>[...a].every(qe),i=1/0;return e.forEach((a,r)=>{if(t(a)&&r!==e.length-1)return;let l=0;for(;l<a.length&&qe(a[l]);)l++;i=Math.min(i,l)}),e.map(a=>{if(t(a))return"";let r=a.length;for(;r>0&&qe(a[r-1]);)r--;return a.slice(i,r)}).join(`\n`)}var fo={b:"\\b",s:" ",t:" ",n:`\n`,f:"\\f",r:"\\r",\'"\':\'"\',"\'":"\'","\\\\":"\\\\"};function Vc(n,e){let t="";for(let i=0;i<e.length;i++){let a=e[i];if(a!=="\\\\"){t+=a;continue}let r=e[++i]??"\\0";if(Object.hasOwn(fo,r))t+=fo[r];else{if(r===`\n`)continue;if(r==="\\r")e[i+1]===`\n`&&i++;else if(r>="0"&&r<="7"){let l=r<="3"?3:2,s="";for(;s.length<l&&i<e.length&&e[i]>="0"&&e[i]<="7";)s+=e[i++];i--,t+=String.fromCharCode(parseInt(s,8))}else{let l=r.charCodeAt(0).toString(16).toUpperCase().padStart(4,"0");n.fail("java.lang.IllegalArgumentException",`Invalid escape sequence: \\\\${r} \\\\\\\\u${l}`)}}}return t}var Ec={I:"int",J:"long",D:"double",C:"char",Z:"boolean",B:"byte",S:"short",F:"float"};function Gr(n){if(n.startsWith("[")){let t=n.slice(1);return(t.startsWith("[")?Gr(t):t.startsWith("L")?Gr(t.slice(1,-1)):Ec[t]??t)+"[]"}return n.slice(Math.max(n.lastIndexOf("$"),n.lastIndexOf("."))+1).replace(/^\\d+/,"")}var Kr=class extends b{className="java.lang.Class";name;isInterface;constructor(e,t,i){super(e),this.name=t,this.isInterface=i}*javaString(){return`${this.isInterface?"interface":"class"} ${this.name}`}"getName()"(){return new c.JString(this.name)}"getSimpleName()"(){return new c.JString(Gr(this.name))}"isInterface()"(){return g(this.isInterface)}"isArray()"(){return g(this.name.startsWith("["))}},vo=new WeakMap;function Jr(n,e,t=!1){let i=vo.get(n);i||vo.set(n,i=new Map);let a=i.get(e);return a||i.set(e,a=new Kr(n.hash(),e,t)),a}var Pi="java.lang.NullPointerException",bo={"Object.getClass":(n,[e])=>e instanceof c.JLambda?n.limitation("getClass() of a lambda (the JDK\'s class name has an address)"):Jr(n,De(e)),"Enum.getDeclaringClass":(n,[e])=>Jr(n,mn(e.className)),"Class.literal":(n,[e,t])=>Jr(n,e.value,t===1),"Objects.equals(Object,Object)":(n,[e,t])=>h(Q(n,e,t),g),"Objects.hashCode(Object)":(n,[e])=>e===null?0:h(A(n,e)),"Objects.hash(Object[])":(n,[e])=>{if(e===null)return 0;let t=e.data;return h((function*(){let i=1;for(let a of t)i=Math.imul(31,i)+(a===null?0:yield*A(n,a))|0;return i})())},"Objects.isNull(Object)":(n,[e])=>g(e===null),"Objects.nonNull(Object)":(n,[e])=>g(e!==null),"Objects.toString(Object)":(n,[e])=>h(V(n,e),t=>new c.JString(t)),"Objects.toString(Object,String)":(n,[e,t])=>e===null?t:h(V(n,e),i=>new c.JString(i)),"Objects.requireNonNull(T)":(n,[e])=>e===null?n.fail(Pi,null):e,"Objects.requireNonNull(T,String)":(n,[e,t])=>e===null?n.fail(Pi,t===null?null:t.value):e,"Objects.requireNonNullElse(T,T)":(n,[e,t])=>e!==null?e:t!==null?t:n.fail(Pi,"defaultObj"),"Objects.checkIndex(int,int)":(n,[e,t])=>{let i=e,a=t;return i<0||i>=a?n.fail("java.lang.IndexOutOfBoundsException",`Index ${i} out of bounds for length ${a}`):i},"Objects.compare(T,T,Comparator)":(n,[e,t,i])=>e===t?0:i===null?n.fail(Pi,null):h(U(n,i)(e,t))};var X="java.lang.NullPointerException",Yr="java.lang.IllegalStateException",Rc="java.lang.IllegalArgumentException",Ic="java.util.NoSuchElementException",wo=n=>n,Jn=()=>null;function el(n){return{size:n.length,*push(e,t){t.begin(n.length);for(let i of n){if(t.cancelled())break;e.charge(1),yield*t.accept(i)}yield*t.end()}}}function Zr(n){return{size:null,*push(e,t){for(t.begin(-1);!t.cancelled();){e.charge(1);let i=yield*n(e);if(!i)break;yield*t.accept(i.value)}yield*t.end()}}}var Tc={ref:"java.util.stream.ReferencePipeline",int:"java.util.stream.IntPipeline",long:"java.util.stream.LongPipeline",double:"java.util.stream.DoublePipeline"},P=class n extends b{className;kind;#e;#t;#n=!1;constructor(e,t,i,a=[],r=!0){super(e),this.kind=t,this.#e=i,this.#t=a,this.className=`${Tc[t]}${r?"$Head":"$StatelessOp"}`}#i(e){this.#n&&e.fail(Yr,"stream has already been operated upon or closed"),this.#n=!0}then(e,t,i){return this.#i(e),new n(e.hash(),t,this.#e,[...this.#t,i],!1)}knownSize(){let e=this.#e().size;for(let t of this.#t)e=t.size(e);return e}*run(e,t){this.#i(e);let i=t;for(let a=this.#t.length-1;a>=0;a--)i=this.#t[a].wrap(e,i);yield*this.#e().push(e,i)}*count(e){let t=this.knownSize();if(t!==null)return this.#i(e),t;let i=0;return yield*this.run(e,oe(function*(){i++})),i}*items(e){let t=[];return yield*this.run(e,oe(function*(i){t.push(i)})),t}};function oe(n,e=()=>!1){return{begin(){},accept:n,*end(){},cancelled:e}}function Qi(n,e=wo){return{size:e,wrap(t,i){return{begin:a=>i.begin(e(a===-1?null:a)??-1),accept:a=>n(t,a,i),end:()=>i.end(),cancelled:()=>i.cancelled()}}}}var Fn=(n,e,t)=>e==="ref"?t:n.box(e,t);function No(n){return c.normLong(BigInt(n))}function We(n){return BigInt(n)}function tl(n,e,t){if(n==="long"){let r=We(e),l=We(t);return r<l?-1:r>l?1:0}let i=e,a=t;if(n==="double"){if(i<a)return-1;if(i>a)return 1;let r=Object.is(i,-0)?0:Number.isNaN(i)?2:1,l=Object.is(a,-0)?0:Number.isNaN(a)?2:1;return r-l}return i<a?-1:i>a?1:0}var Dt=class{sum=0;compensation=0;simple=0;add(e){this.simple+=e;let t=e-this.compensation,i=this.sum+t;this.compensation=i-this.sum-t,this.sum=i}get value(){let e=this.sum-this.compensation;return Number.isNaN(e)&&!Number.isFinite(this.simple)&&!Number.isNaN(this.simple)?this.simple:e}},Co={ref:"Optional",int:"OptionalInt",long:"OptionalLong",double:"OptionalDouble"},q=class n extends b{className;kind;present;value;constructor(e,t,i,a=null){super(e),this.kind=t,this.present=i,this.value=a,this.className=`java.util.${Co[t]}`}*javaString(e){let t=Co[this.kind];return this.present?`${t}[${yield*V(e,Fn(e,this.kind,this.value))}]`:`${t}.empty`}get contentEquality(){return!0}*contentEquals(e,t){return t===this?!0:!(t instanceof n)||t.kind!==this.kind?!1:!this.present||!t.present?this.present===t.present:this.kind==="ref"?yield*O(e,this.value,t.value):tl(this.kind,this.value,t.value)===0&&Object.is(this.value,t.value)===(this.kind!=="double"||Object.is(this.value,t.value))}*contentHash(e){return this.present?yield*A(e,Fn(e,this.kind,this.value)):0}#e(e){return this.present?this.value:e.fail(Ic,"No value present")}"get()"(e){return this.#e(e)}"getAsInt()"(e){return this.#e(e)}"getAsLong()"(e){return this.#e(e)}"getAsDouble()"(e){return this.#e(e)}"orElseThrow()"(e){return this.#e(e)}"orElseThrow(Supplier)"(e,t){return this.present?this.value:h((function*(){let i=yield*m(e,t,"get",[]);return i===null?e.fail(X,null):e.raise(i)})())}"isPresent()"(){return g(this.present)}"isEmpty()"(){return g(!this.present)}#t(e){return this.present?this.value:e}"orElse(T)"(e,t){return this.#t(t)}"orElse(int)"(e,t){return this.#t(t)}"orElse(long)"(e,t){return this.#t(t)}"orElse(double)"(e,t){return this.#t(t)}#n(e,t,i){return this.present?this.value:h(m(e,t,i,[]))}"orElseGet(Supplier)"(e,t){return this.#n(e,t,"get")}"orElseGet(IntSupplier)"(e,t){return this.#n(e,t,"getAsInt")}"orElseGet(LongSupplier)"(e,t){return this.#n(e,t,"getAsLong")}"orElseGet(DoubleSupplier)"(e,t){return this.#n(e,t,"getAsDouble")}#i(e,t){if(this.present)return h(m(e,t,"accept",[this.value]),()=>{})}"ifPresent(Consumer)"(e,t){return this.#i(e,t)}"ifPresent(IntConsumer)"(e,t){return this.#i(e,t)}"ifPresent(LongConsumer)"(e,t){return this.#i(e,t)}"ifPresent(DoubleConsumer)"(e,t){return this.#i(e,t)}"ifPresentOrElse(Consumer,Runnable)"(e,t,i){return this.present?this.#i(e,t):h(m(e,i,"run",[]),()=>{})}"map(Function)"(e,t){return t===null?e.fail(X,null):this.present?h(m(e,t,"apply",[this.value]),i=>new n(e.hash(),"ref",i!==null,i??null)):this}"flatMap(Function)"(e,t){return this.present?h(m(e,t,"apply",[this.value]),i=>i===null?e.fail(X,null):i):this}"filter(Predicate)"(e,t){return this.present?h(m(e,t,"test",[this.value]),i=>L(i)?this:new n(e.hash(),"ref",!1)):this}"or(Supplier)"(e,t){return this.present?this:h(m(e,t,"get",[]),i=>i===null?e.fail(X,null):i)}"stream()"(e){let t=this.present?[this.value]:[];return new P(e.hash(),this.kind,()=>el(t))}},_i={ref:n=>new q(n.hash(),"ref",!1),int:n=>new q(n.hash(),"int",!1),long:n=>new q(n.hash(),"long",!1),double:n=>new q(n.hash(),"double",!1)},yo={int:"IntSummaryStatistics",long:"LongSummaryStatistics",double:"DoubleSummaryStatistics"},$t=class extends b{className;kind;count=0;sum;min;max;#e=new Dt;constructor(e,t){super(e),this.kind=t,this.className=`java.util.${yo[t]}`,this.sum=t==="long"?0n:0,this.min=t==="int"?2147483647:t==="long"?9223372036854775807n:1/0,this.max=t==="int"?-2147483648:t==="long"?-9223372036854775808n:-1/0}add(e){if(this.count++,this.kind==="double"){let t=e;this.#e.add(t),this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}else if(this.kind==="long"){let t=We(e);this.sum=BigInt.asIntN(64,this.sum+t),t<this.min&&(this.min=t),t>this.max&&(this.max=t)}else{let t=e;this.sum=this.sum+t,this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}#t(){return this.kind==="double"?this.#e.value:this.sum}#n(){return this.count?Number(this.#t())/this.count:0}*javaString(){let e=this.#n(),t=(e<0||Object.is(e,-0)?"-":"")+kt(Math.abs(e),6),i=a=>this.kind==="double"?kt(Math.abs(a),6).replace(/^/,a<0?"-":""):String(a);return`${yo[this.kind]}{count=${this.count}, sum=${i(this.#t())}, min=${i(this.min)}, average=${t}, max=${i(this.max)}}`}"getCount()"(){return No(this.count)}"getSum()"(){let e=this.#t();return typeof e=="bigint"?c.normLong(e):this.kind==="int"?No(e):e}"getMin()"(){return typeof this.min=="bigint"?c.normLong(this.min):this.min}"getMax()"(){return typeof this.max=="bigint"?c.normLong(this.max):this.max}"getAverage()"(){return this.#n()}"accept(int)"(e,t){this.add(t)}"accept(long)"(e,t){this.add(t)}"accept(double)"(e,t){this.add(t)}},ne=class extends b{className="java.util.stream.Collectors$CollectorImpl";supply;add;finish;constructor(e,t,i,a=null){super(e),this.supply=t,this.add=i,this.finish=a}*collect(e,t){let i=yield*this.supply(e);for(let a of t)yield*this.add(e,i,a);return this.finish?yield*this.finish(e,i):i}},Xi=class extends b{className="java.lang.Object";value;constructor(e,t){super(e),this.value=t}};function pt(n,e){return n===null?e.fail(X,null):n}var So=n=>ii["ArrayList.<init>()"](n,[]),Lo=n=>Qt["HashSet.<init>()"](n,[]),Ao=n=>Qt["HashMap.<init>()"](n,[]);function*Ui(n,e,t){return yield*H(n,e,"add","add(E)",[t])}function*nl(n,e){return yield*m(n,e,"get",[])}function xo(n,e,t){return new Y(n.hash(),"java.util.stream.Collectors$$Lambda",e,t)}function Pr(n,e,t,i){return new ne(n.hash(),function*(a){return t?yield*nl(a,t):Ao(a)},function*(a,r,l){let s=yield*m(a,e,"apply",[l]);if(s===null)return a.fail(X,"element cannot be mapped to a null key");let o=yield*H(a,r,"computeIfAbsent","computeIfAbsent(K,Function)",[s,xo(a,"apply(T)",function*(u){return yield*i.supply(u)})]);return yield*i.add(a,o,l)},i.finish?function*(a,r){let l=i.finish;return yield*H(a,r,"replaceAll","replaceAll(BiFunction)",[xo(a,"apply(T,U)",function*(s,[,o]){return yield*l(s,o)})]),r}:null)}function Vo(n,e,t){return new ne(n.hash(),function*(i){return new Xi(i.hash(),[yield*t.supply(i),yield*t.supply(i)])},function*(i,a,r){let l=a.value,s=L(yield*m(i,e,"test",[r]))?1:0;return yield*t.add(i,l[s],r)},function*(i,a){let r=a.value,l=Qt["LinkedHashMap.<init>()"](i,[]);for(let[s,o]of[!1,!0].entries()){let u=t.finish?yield*t.finish(i,r[s]):r[s];yield*H(i,l,"put","put(K,V)",[i.box("boolean",o?1:0),u])}return l})}function Be(n,e,t,i){return new ne(n.hash(),function*(a){return new Xi(a.hash(),e())},function*(a,r,l){let s=r;s.value=yield*t(a,s.value,l)},function*(a,r){return i(a,r.value)})}function*me(n,e,t,i){return yield*m(n,e,t,[i])}function*Oc(n,e){return yield*V(n,e)}var Xr={"Collectors.toList()":n=>new ne(n.hash(),function*(e){return So(e)},Ui),"Collectors.toUnmodifiableList()":n=>new ne(n.hash(),function*(e){return So(e)},Ui,function*(e,t){let i=t.es;return i.includes(null)?e.fail(X,null):new st(e.hash(),i.slice())}),"Collectors.toSet()":n=>new ne(n.hash(),function*(e){return Lo(e)},Ui),"Collectors.toCollection(Supplier)":(n,[e])=>new ne(n.hash(),t=>nl(t,e),Ui),"Collectors.joining()":n=>_r(n,"","",""),"Collectors.joining(String)":(n,[e])=>_r(n,Hi(n,e),"",""),"Collectors.joining(String,String,String)":(n,[e,t,i])=>_r(n,Hi(n,e),Hi(n,t),Hi(n,i)),"Collectors.toMap(Function,Function)":(n,[e,t])=>zr(n,e,t,null,null),"Collectors.toMap(Function,Function,BinaryOperator)":(n,[e,t,i])=>zr(n,e,t,i,null),"Collectors.toMap(Function,Function,BinaryOperator,Supplier)":(n,[e,t,i,a])=>zr(n,e,t,i,a),"Collectors.groupingBy(Function)":(n,[e])=>Pr(n,e,null,Xr["Collectors.toList()"](n,[])),"Collectors.groupingBy(Function,Collector)":(n,[e,t])=>Pr(n,e,null,pt(t,n)),"Collectors.groupingBy(Function,Supplier,Collector)":(n,[e,t,i])=>Pr(n,e,t,pt(i,n)),"Collectors.partitioningBy(Predicate)":(n,[e])=>Vo(n,e,Xr["Collectors.toList()"](n,[])),"Collectors.partitioningBy(Predicate,Collector)":(n,[e,t])=>Vo(n,e,pt(t,n)),"Collectors.counting()":n=>Be(n,()=>0n,function*(e,t){return t+1n},(e,t)=>e.box("long",c.normLong(t))),"Collectors.summingInt(ToIntFunction)":(n,[e])=>Be(n,()=>0,function*(t,i,a){return i+(yield*me(t,e,"applyAsInt",a))|0},(t,i)=>t.box("int",i)),"Collectors.summingLong(ToLongFunction)":(n,[e])=>Be(n,()=>0n,function*(t,i,a){return BigInt.asIntN(64,i+We(yield*me(t,e,"applyAsLong",a)))},(t,i)=>t.box("long",c.normLong(i))),"Collectors.summingDouble(ToDoubleFunction)":(n,[e])=>Be(n,()=>new Dt,function*(t,i,a){return i.add(yield*me(t,e,"applyAsDouble",a)),i},(t,i)=>t.box("double",i.value)),"Collectors.averagingInt(ToIntFunction)":(n,[e])=>Eo(n,e,"applyAsInt"),"Collectors.averagingLong(ToLongFunction)":(n,[e])=>Eo(n,e,"applyAsLong"),"Collectors.averagingDouble(ToDoubleFunction)":(n,[e])=>Be(n,()=>({s:new Dt,n:0}),function*(t,i,a){return i.s.add(yield*me(t,e,"applyAsDouble",a)),i.n++,i},(t,i)=>t.box("double",i.n?i.s.value/i.n:0)),"Collectors.summarizingInt(ToIntFunction)":(n,[e])=>Ur(n,e,"int","applyAsInt"),"Collectors.summarizingLong(ToLongFunction)":(n,[e])=>Ur(n,e,"long","applyAsLong"),"Collectors.summarizingDouble(ToDoubleFunction)":(n,[e])=>Ur(n,e,"double","applyAsDouble"),"Collectors.mapping(Function,Collector)":(n,[e,t])=>{let i=pt(t,n);return new ne(n.hash(),i.supply,function*(a,r,l){return yield*i.add(a,r,yield*me(a,e,"apply",l))},i.finish)},"Collectors.filtering(Predicate,Collector)":(n,[e,t])=>{let i=pt(t,n);return new ne(n.hash(),i.supply,function*(a,r,l){L(yield*me(a,e,"test",l))&&(yield*i.add(a,r,l))},i.finish)},"Collectors.flatMapping(Function,Collector)":(n,[e,t])=>{let i=pt(t,n);return new ne(n.hash(),i.supply,function*(a,r,l){let s=yield*me(a,e,"apply",l);if(s)for(let o of yield*s.items(a))yield*i.add(a,r,Fn(a,s.kind,o))},i.finish)},"Collectors.collectingAndThen(Collector,Function)":(n,[e,t])=>{let i=pt(e,n);return new ne(n.hash(),i.supply,i.add,function*(a,r){let l=i.finish?yield*i.finish(a,r):r;return yield*me(a,t,"apply",l)})},"Collectors.reducing(T,BinaryOperator)":(n,[e,t])=>Be(n,()=>e,function*(i,a,r){return yield*m(i,t,"apply",[a,r])},(i,a)=>a),"Collectors.reducing(U,Function,BinaryOperator)":(n,[e,t,i])=>Be(n,()=>e,function*(a,r,l){return yield*m(a,i,"apply",[r,yield*me(a,t,"apply",l)])},(a,r)=>r),"Collectors.reducing(BinaryOperator)":(n,[e])=>Hr(n,function*(t,i,a){return yield*m(t,e,"apply",[i,a])}),"Collectors.minBy(Comparator)":(n,[e])=>Hr(n,function*(t,i,a){return(yield*m(t,e,"compare",[i,a]))<=0?i:a}),"Collectors.maxBy(Comparator)":(n,[e])=>Hr(n,function*(t,i,a){return(yield*m(t,e,"compare",[i,a]))>=0?i:a})};function Hi(n,e){return e===null?n.fail(X,null):e.value}function _r(n,e,t,i){return Be(n,()=>[],function*(a,r,l){let s=yield*Oc(a,l);return r.push(s),a.checkString(r.reduce((o,u)=>o+u.length,0)),r},(a,r)=>new c.JString(t+r.join(e)+i))}function Eo(n,e,t){return Be(n,()=>({sum:0n,n:0}),function*(i,a,r){let l=yield*me(i,e,t,r);return a.sum+=BigInt(l),a.n++,a},(i,a)=>i.box("double",a.n?Number(a.sum)/a.n:0))}function Ur(n,e,t,i){return new ne(n.hash(),function*(a){return new $t(a.hash(),t)},function*(a,r,l){r.add(yield*me(a,e,i,l))})}function Hr(n,e){return Be(n,()=>({present:!1,value:null}),function*(t,i,a){return i.present?i.value=yield*e(t,i.value,a):(i.present=!0,i.value=a),i},(t,i)=>i.present&&i.value===null?t.fail(X,null):new q(t.hash(),"ref",i.present,i.value))}function zr(n,e,t,i,a){return new ne(n.hash(),function*(r){return a?yield*nl(r,a):Ao(r)},function*(r,l,s){let o=yield*me(r,e,"apply",s),u=yield*me(r,t,"apply",s);if(i)return yield*H(r,l,"merge","merge(K,V,BiFunction)",[o,u,i]);if(u===null)return r.fail(X,null);let d=yield*H(r,l,"putIfAbsent","putIfAbsent(K,V)",[o,u]);if(d!==null){let f=`Duplicate key ${yield*V(r,o)} (attempted merging values ${yield*V(r,d)} and ${yield*V(r,u)})`;return r.fail(Yr,f)}})}var Zi={ref:{predicate:"test",unary:"apply",consumer:"accept",binary:"apply"},int:{predicate:"test",unary:"applyAsInt",consumer:"accept",binary:"applyAsInt"},long:{predicate:"test",unary:"applyAsLong",consumer:"accept",binary:"applyAsLong"},double:{predicate:"test",unary:"applyAsDouble",consumer:"accept",binary:"applyAsDouble"}};function T(n,e){return e===null?n.fail(X,null):e}function jc(n,e){return Qi(function*(t,i,a){L(yield*m(t,n,e,[i]))&&(yield*a.accept(i))},Jn)}function Bt(n,e,t=(i,a)=>a){return Qi(function*(i,a,r){yield*r.accept(t(i,yield*m(i,n,e,[a])))})}function wc(n){return Qi(function*(e,t,i){yield*m(e,n,"accept",[t]),yield*i.accept(t)})}function qr(n){return Qi(function*(e,t,i){yield*i.accept(n(e,t))})}function Wr(n,e){return{size:Jn,wrap(t,i){return{begin:()=>i.begin(-1),*accept(a){let r=yield*m(t,n,e,[a]);r&&(yield*r.run(t,{begin(){},accept:l=>i.accept(l),*end(){},cancelled:()=>i.cancelled()}))},end:()=>i.end(),cancelled:()=>i.cancelled()}}}}function Ro(n,e){return{size:wo,wrap(t,i){let a=[];return{begin:()=>{},*accept(r){t.allocate(1),a.push(r)},*end(){n==="ref"?yield*et(wt(t,a,e,()=>{})):a.sort((r,l)=>tl(n,r,l)),i.begin(a.length);for(let r of a){if(i.cancelled())break;yield*i.accept(r)}yield*i.end()},cancelled:()=>!1}}}}function Lc(n){return{size:Jn,wrap(e,t){let i=Lo(e);return{begin:()=>t.begin(-1),*accept(a){let r=yield*H(e,i,"add","add(E)",[Fn(e,n,a)]);L(r)&&(yield*t.accept(a))},end:()=>t.end(),cancelled:()=>t.cancelled()}}}}function Ac(n){return{size:e=>e===null?null:Math.min(e,n),wrap(e,t){let i=0;return{begin:a=>t.begin(a===-1?-1:Math.min(a,n)),*accept(a){i<n&&(i++,yield*t.accept(a))},end:()=>t.end(),cancelled:()=>i>=n||t.cancelled()}}}}function kc(n){return{size:e=>e===null?null:Math.max(0,e-n),wrap(e,t){let i=0;return{begin:a=>t.begin(a===-1?-1:Math.max(0,a-n)),*accept(a){i<n?i++:yield*t.accept(a)},end:()=>t.end(),cancelled:()=>t.cancelled()}}}}function Mc(n){return{size:Jn,wrap(e,t){let i=!0;return{begin:()=>t.begin(-1),*accept(a){i&&L(yield*m(e,n,"test",[a]))?yield*t.accept(a):i=!1},end:()=>t.end(),cancelled:()=>!i||t.cancelled()}}}}function Bc(n){return{size:Jn,wrap(e,t){let i=!0;return{begin:()=>t.begin(-1),*accept(a){i&&L(yield*m(e,n,"test",[a]))||(i=!1,yield*t.accept(a))},end:()=>t.end(),cancelled:()=>t.cancelled()}}}}function Io(n,e){let t=Number(e);return t<0?n.fail(Rc,String(t)):t}function $c(){let n=P.prototype,e=(t,i)=>{n[t]=i};for(let[t,i,a,r,l]of[["Predicate","Function","Consumer","BinaryOperator","Supplier"],["IntPredicate","IntUnaryOperator","IntConsumer","IntBinaryOperator","IntSupplier"],["LongPredicate","LongUnaryOperator","LongConsumer","LongBinaryOperator","LongSupplier"],["DoublePredicate","DoubleUnaryOperator","DoubleConsumer","DoubleBinaryOperator","DoubleSupplier"]]){e(`filter(${t})`,function(o,u){return this.then(o,this.kind,jc(T(o,u),"test"))}),e(`takeWhile(${t})`,function(o,u){return this.then(o,this.kind,Mc(T(o,u)))}),e(`dropWhile(${t})`,function(o,u){return this.then(o,this.kind,Bc(T(o,u)))}),e(`peek(${a})`,function(o,u){return this.then(o,this.kind,wc(T(o,u)))}),e(`forEach(${a})`,function(o,u){return T(o,u),h(this.run(o,oe(function*(d){yield*m(o,u,"accept",[d])})),()=>{})}),e(`forEachOrdered(${a})`,function(o,u){return n[`forEach(${a})`].call(this,o,u)});for(let[o,u,d]of[["anyMatch",!1,!0],["allMatch",!0,!1],["noneMatch",!0,!0]])e(`${o}(${t})`,function(f,p){T(f,p);let N=u,x=!1;return h(this.run(f,oe(function*(ie){if(x)return;L(yield*m(f,p,"test",[ie]))===d&&(x=!0,N=!u)},()=>x)),()=>g(N))});i!=="Function"&&e(`map(${i})`,function(o,u){return this.then(o,this.kind,Bt(T(o,u),Zi[this.kind].unary))}),e(`reduce(${r})`,function(o,u){T(o,u);let d=this.kind,f=!1,p=null;return h(this.run(o,oe(function*(N){f?p=yield*m(o,u,Zi[d].binary,[p,N]):(f=!0,p=N)})),()=>d==="ref"&&f&&p===null?o.fail(X,null):new q(o.hash(),d,f,p))});let s={Predicate:"T",IntPredicate:"int",LongPredicate:"long",DoublePredicate:"double"}[t];e(`reduce(${s},${r})`,function(o,u,d){T(o,d);let f=this.kind,p=u;return h(this.run(o,oe(function*(N){p=yield*m(o,d,Zi[f].binary,[p,N])})),()=>p)})}e("distinct()",function(t){return this.then(t,this.kind,Lc(this.kind))}),e("sorted()",function(t){return this.then(t,this.kind,Ro(this.kind,null))}),e("sorted(Comparator)",function(t,i){return this.then(t,this.kind,Ro(this.kind,i))}),e("limit(long)",function(t,i){return this.then(t,this.kind,Ac(Io(t,i)))}),e("skip(long)",function(t,i){return this.then(t,this.kind,kc(Io(t,i)))}),e("count()",function(t){return h(this.count(t),i=>c.normLong(BigInt(i)))}),e("boxed()",function(t){let i=this.kind;return this.then(t,"ref",qr((a,r)=>Fn(a,i,r)))}),e("findFirst()",function(t){return To(t,this)}),e("findAny()",function(t){return To(t,this)}),e("toArray()",function(t){let i=this.kind;return h(this.items(t),a=>(t.allocate(a.length),i==="ref"?new c.JArray(xt,a,t.hash(),"[Ljava.lang.Object;"):i==="int"?new c.JArray(0,Int32Array.from(a),t.hash(),"[I"):i==="double"?new c.JArray(5,Float64Array.from(a),t.hash(),"[D"):new c.JArray(4,a.slice(),t.hash(),"[J")))}),e("toArray(IntFunction)",function(t,i){T(t,i);let a=this;return h((function*(){let r=yield*a.items(t),l=yield*m(t,i,"apply",[r.length]);return l===null?t.fail(X,null):l.data.length!==r.length?t.fail(Yr,`Begin size ${r.length} is not equal to fixed size ${l.data.length}`):(r.forEach((s,o)=>{s!==null&&!t.storable(s,l.descriptor)&&t.fail("java.lang.ArrayStoreException",t.className(s)),l.data[o]=s}),l)})())}),e("map(Function)",function(t,i){return this.then(t,"ref",Bt(T(t,i),"apply"))}),e("mapToInt(ToIntFunction)",function(t,i){return this.then(t,"int",Bt(T(t,i),"applyAsInt"))}),e("mapToLong(ToLongFunction)",function(t,i){return this.then(t,"long",Bt(T(t,i),"applyAsLong"))}),e("mapToDouble(ToDoubleFunction)",function(t,i){return this.then(t,"double",Bt(T(t,i),"applyAsDouble"))}),e("flatMap(Function)",function(t,i){return this.then(t,"ref",Wr(T(t,i),"apply"))}),e("flatMapToInt(Function)",function(t,i){return this.then(t,"int",Wr(T(t,i),"apply"))}),e("collect(Collector)",function(t,i){let a=pt(i,t),r=this;return h((function*(){let l=yield*a.supply(t);return yield*r.run(t,oe(function*(s){yield*a.add(t,l,s)})),a.finish?yield*a.finish(t,l):l})())}),e("toList()",function(t){return h(this.items(t),i=>new Qr(t.hash(),i))}),e("min(Comparator)",function(t,i){return Oo(t,this,T(t,i),-1)}),e("max(Comparator)",function(t,i){return Oo(t,this,T(t,i),1)});for(let t of["int","long","double"]){let i=t==="int"?"Int":t==="long"?"Long":"Double";e(`mapToObj(${i}Function)`,function(a,r){return this.then(a,"ref",Bt(T(a,r),"apply"))}),e(`flatMap(${i}Function)`,function(a,r){return this.then(a,this.kind,Wr(T(a,r),"apply"))});for(let a of["int","long","double"]){if(a===t)continue;let r=a==="int"?"Int":a==="long"?"Long":"Double";e(`mapTo${r}(${i}To${r}Function)`,function(l,s){return this.then(l,a,Bt(T(l,s),`applyAs${r}`))})}}e("asLongStream()",function(t){return this.then(t,"long",qr((i,a)=>c.normLong(BigInt(a))))}),e("asDoubleStream()",function(t){return this.then(t,"double",qr((i,a)=>Number(a)))}),e("sum()",function(t){let i=this.kind;if(i==="double"){let r=new Dt;return h(this.run(t,oe(function*(l){r.add(l)})),()=>r.value)}let a=i==="long"?0n:0;return h(this.run(t,oe(function*(r){a=i==="long"?BigInt.asIntN(64,a+We(r)):a+r|0})),()=>i==="long"?c.normLong(a):a)});for(let[t,i]of[["min",-1],["max",1]])e(`${t}()`,function(a){let r=this.kind,l=!1,s=null;return h(this.run(a,oe(function*(o){(!l||r==="double"&&Number.isNaN(o)||!(r==="double"&&Number.isNaN(s))&&tl(r,o,s)*i>0)&&(s=o),l=!0})),()=>new q(a.hash(),r,l,s))});e("average()",function(t){let i=this.kind,a=new Dt,r=0n,l=0;return h(this.run(t,oe(function*(s){l++,i==="double"?a.add(s):r+=BigInt(s)})),()=>new q(t.hash(),"double",l>0,l?(i==="double"?a.value:Number(r))/l:null))}),e("summaryStatistics()",function(t){let i=new $t(t.hash(),this.kind);return h(this.run(t,oe(function*(a){i.add(a)})),()=>i)})}function*Dc(n,e){let t=!1,i=null;return yield*e.run(n,oe(function*(a){t||(t=!0,i=a)},()=>t)),e.kind==="ref"&&t&&i===null?n.fail(X,null):new q(n.hash(),e.kind,t,i)}function To(n,e){return h(Dc(n,e))}function Oo(n,e,t,i){let a=!1,r=null;return h(e.run(n,oe(function*(l){if(!a){a=!0,r=l;return}let s=yield*m(n,t,"compare",[r,l]);(i<0?s>0:s<0)&&(r=l)})),()=>a&&r===null?n.fail(X,null):new q(n.hash(),"ref",a,r))}var Qr=class extends st{className="java.util.ImmutableCollections$ListN";*indexOf(e,t,i){let a=this.items;for(let r=0;r<a.length;r++){let l=i?a.length-1-r:r;if(t===null?a[l]===null:yield*O(e,t,a[l]))return l}return-1}};$c();function zi(n,e,t){let i=e>n?Number(e-n):0;return{size:i,*push(a,r){r.begin(i);for(let l=n;l<e&&!r.cancelled();l++)a.charge(1),yield*r.accept(t==="int"?Number(l):c.normLong(l));yield*r.end()}}}function qi(n,e,t,i){let a=Zi[n].unary,r=!1,l=e,s=!1;return Zr(function*(o){return s?null:(r&&(l=yield*m(o,t,a,[l])),r=!0,i&&!L(yield*m(o,i,"test",[l]))?(s=!0,null):{value:l})})}function jo(n,e,t){let i=n.knownSize()!==null&&e.knownSize()!==null?n.knownSize()+e.knownSize():null;return{size:i,*push(a,r){r.begin(i??-1);let l={begin(){},accept:s=>r.accept(s),*end(){},cancelled:()=>r.cancelled()};yield*n.run(t,l),r.cancelled()||(yield*e.run(t,l)),yield*r.end()}}}function on(n,e,t,i){if(e===null)return n.fail(X,null);let a=Array.from(e.data),r=t===null?0:t,l=i===null?a.length:i;return r<0||l>a.length||r>l?r>l?n.fail("java.lang.ArrayIndexOutOfBoundsException",`origin(${r}) > fence(${l})`):n.fail("java.lang.ArrayIndexOutOfBoundsException",`Array index out of range: ${r<0?r:l}`):a.slice(r,l)}function K(n,e,t){return new P(n.hash(),e,()=>el(t()))}function Yi(n,e){return K(n,"ref",e)}function Wi(n){return n===null?[]:Array.from(n.data)}var Fc={"Stream.of(T)":(n,[e])=>K(n,"ref",()=>[e]),"Stream.of(T[])":(n,[e])=>K(n,"ref",()=>Wi(T(n,e))),"Stream.ofNullable(T)":(n,[e])=>K(n,"ref",()=>e===null?[]:[e]),"Stream.empty()":n=>K(n,"ref",()=>[]),"Stream.iterate(T,UnaryOperator)":(n,[e,t])=>new P(n.hash(),"ref",()=>qi("ref",e,T(n,t),null)),"Stream.iterate(T,Predicate,UnaryOperator)":(n,[e,t,i])=>new P(n.hash(),"ref",()=>qi("ref",e,T(n,i),T(n,t))),"Stream.generate(Supplier)":(n,[e])=>new P(n.hash(),"ref",()=>Zr(function*(t){return{value:yield*m(t,e,"get",[])}})),"Stream.concat(Stream,Stream)":(n,[e,t])=>new P(n.hash(),"ref",()=>jo(T(n,e),T(n,t),n)),"IntStream.range(int,int)":(n,[e,t])=>new P(n.hash(),"int",()=>zi(BigInt(e),BigInt(t),"int")),"IntStream.rangeClosed(int,int)":(n,[e,t])=>new P(n.hash(),"int",()=>zi(BigInt(e),BigInt(t)+1n,"int")),"IntStream.of(int[])":(n,[e])=>K(n,"int",()=>Wi(T(n,e))),"IntStream.empty()":n=>K(n,"int",()=>[]),"IntStream.iterate(int,IntUnaryOperator)":(n,[e,t])=>new P(n.hash(),"int",()=>qi("int",e,T(n,t),null)),"IntStream.iterate(int,IntPredicate,IntUnaryOperator)":(n,[e,t,i])=>new P(n.hash(),"int",()=>qi("int",e,T(n,i),T(n,t))),"IntStream.generate(IntSupplier)":(n,[e])=>new P(n.hash(),"int",()=>Zr(function*(t){return{value:yield*m(t,e,"getAsInt",[])}})),"IntStream.concat(IntStream,IntStream)":(n,[e,t])=>new P(n.hash(),"int",()=>jo(T(n,e),T(n,t),n)),"LongStream.range(long,long)":(n,[e,t])=>new P(n.hash(),"long",()=>zi(We(e),We(t),"long")),"LongStream.rangeClosed(long,long)":(n,[e,t])=>new P(n.hash(),"long",()=>zi(We(e),We(t)+1n,"long")),"LongStream.of(long[])":(n,[e])=>K(n,"long",()=>Wi(T(n,e))),"LongStream.empty()":n=>K(n,"long",()=>[]),"DoubleStream.of(double[])":(n,[e])=>K(n,"double",()=>Wi(T(n,e))),"DoubleStream.empty()":n=>K(n,"double",()=>[]),"Arrays.stream(int[])":(n,[e])=>K(n,"int",()=>on(n,e,null,null)),"Arrays.stream(int[],int,int)":(n,[e,t,i])=>K(n,"int",()=>on(n,e,t,i)),"Arrays.stream(long[])":(n,[e])=>K(n,"long",()=>on(n,e,null,null)),"Arrays.stream(double[])":(n,[e])=>K(n,"double",()=>on(n,e,null,null)),"Arrays.stream(T[])":(n,[e])=>K(n,"ref",()=>on(n,e,null,null)),"Arrays.stream(T[],int,int)":(n,[e,t,i])=>K(n,"ref",()=>on(n,e,t,i)),"Optional.of(T)":(n,[e])=>new q(n.hash(),"ref",!0,T(n,e)),"Optional.ofNullable(T)":(n,[e])=>new q(n.hash(),"ref",e!==null,e??null),"Optional.empty()":n=>_i.ref(n),"OptionalInt.of(int)":(n,[e])=>new q(n.hash(),"int",!0,e),"OptionalInt.empty()":n=>_i.int(n),"OptionalLong.of(long)":(n,[e])=>new q(n.hash(),"long",!0,e),"OptionalLong.empty()":n=>_i.long(n),"OptionalDouble.of(double)":(n,[e])=>new q(n.hash(),"double",!0,e),"OptionalDouble.empty()":n=>_i.double(n),"IntSummaryStatistics.<init>()":n=>new $t(n.hash(),"int"),"LongSummaryStatistics.<init>()":n=>new $t(n.hash(),"long"),"DoubleSummaryStatistics.<init>()":n=>new $t(n.hash(),"double"),...Xr},ko=Fc;function Mo(n,e){let t=e;return new P(n.hash(),"ref",()=>{let i=t.elements(n,!0);return el(i.slice())})}function Bo(n,e){return K(n,"int",()=>{let t=[];for(let i=0;i<e.value.length;i++)t.push(e.value.charCodeAt(i));return t})}var Jc="java.util.ConcurrentModificationException",Gc="java.lang.UnsupportedOperationException",Gn="java.util.NoSuchElementException",ea="java.lang.IndexOutOfBoundsException",Kc="java.lang.IllegalArgumentException";function il(n,e,t,i){e<0&&n.fail(ea,`fromIndex = ${e}`),t>i&&n.fail(ea,`toIndex = ${t}`),e>t&&n.fail(Kc,`fromIndex(${e}) > toIndex(${t})`)}function Pc(n){return n.kind==="fixed"?n.list.className.startsWith("java.util.ImmutableCollections$")?"java.util.ImmutableCollections$SubList":"java.util.AbstractList$RandomAccessSubList":n.list.className==="java.util.LinkedList"?"java.util.AbstractList$SubList":n.list.className==="java.util.Stack"?"java.util.Collections$SynchronizedRandomAccessList":"java.util.ArrayList$SubList"}var ta=class n extends k{className;isList=!0;randomAccess;root;parent;offset;length;modCount;constructor(e,t,i,a,r){super(e),this.root=t,this.parent=i,this.offset=a,this.length=r,this.modCount=this.#t(),this.className=Pc(t),this.randomAccess=this.className!=="java.util.AbstractList$SubList"}get size(){return this.length}#e(){return this.root.kind==="array"?this.root.list.es:this.root.list.items}#t(){return this.root.kind==="array"?this.root.list.modCount:0}check(e){this.#t()!==this.modCount&&e.fail(Jc,null)}#n(e){return this.root.kind!=="array"?e.fail(Gc,null):this.root.list}#i(e){let t=this.root.list;t.modCount++;for(let i=this;i;i=i.parent)i.length+=e,i.modCount=t.modCount}#a(e,t){(t<0||t>=this.length)&&e.fail(ea,`Index ${t} out of bounds for length ${this.length}`)}elements(e){return this.check(e),this.#e().slice(this.offset,this.offset+this.length)}get contentEquality(){return!0}*contentEquals(e,t){return yield*xn(e,this,t)}*contentHash(e){return yield*ir(e,this.elements(e))}"size()"(e){return e&&this.check(e),this.length}"isEmpty()"(e){return e&&this.check(e),g(this.length===0)}"get(int)"(e,t){return this.check(e),this.#a(e,t),this.#e()[this.offset+t]}"set(int,E)"(e,t,i){if(this.root.kind==="fixed")return this.#a(e,t),this.root.list.setAt(e,this.offset+t,i);this.check(e),this.#a(e,t);let a=this.#e(),r=a[this.offset+t];return a[this.offset+t]=i,r}"add(E)"(e,t){return this["add(int,E)"](e,this.length,t),1}"add(int,E)"(e,t,i){let a=this.#n(e);if(t<0||t>this.length)return e.fail(ea,`Index: ${t}, Size: ${this.length}`);this.check(e),e.allocate(1),a.es.splice(this.offset+t,0,i),this.#i(1)}"remove(int)"(e,t){let i=this.#n(e);this.#a(e,t),this.check(e);let[a]=i.es.splice(this.offset+t,1);return this.#i(-1),a}"remove(Object)"(e,t){let i=this;return h((function*(){let a=yield*i.#r(e,t,!1);return a<0?!1:(i["remove(int)"](e,a),!0)})(),g)}"clear()"(e){let t=this.#n(e);this.check(e),t.es.splice(this.offset,this.length),this.#i(-this.length)}"addAll(Collection)"(e,t){let i=this.#n(e);if(t===null)return e.fail("java.lang.NullPointerException",null);let a=t.elements(e,!0).slice();return this.check(e),a.length?(e.allocate(a.length),i.es.splice(this.offset+this.length,0,...a),this.#i(a.length),1):0}*#r(e,t,i){let a=this.elements(e);for(let r=0;r<a.length;r++){let l=i?a.length-1-r:r;if(t===null?a[l]===null:yield*O(e,t,a[l]))return l}return-1}"indexOf(Object)"(e,t){return h(this.#r(e,t,!1))}"lastIndexOf(Object)"(e,t){return h(this.#r(e,t,!0))}"getFirst()"(e){return this.length?this["get(int)"](e,0):e.fail(Gn,null)}"getLast()"(e){return this.length?this["get(int)"](e,this.length-1):e.fail(Gn,null)}"removeFirst()"(e){return this.length?this["remove(int)"](e,0):e.fail(Gn,null)}"removeLast()"(e){return this.length?this["remove(int)"](e,this.length-1):e.fail(Gn,null)}"addFirst(E)"(e,t){return this["add(int,E)"](e,0,t)}"addLast(E)"(e,t){return this["add(int,E)"](e,this.length,t)}"sort(Comparator)"(e,t){let i=this.elements(e).slice(),a=this;return h((function*(){yield*et(wt(e,i,t,()=>{}));for(let r=0;r<i.length;r++)yield*et(a["set(int,E)"](e,r,i[r]))})(),()=>{})}"replaceAll(UnaryOperator)"(e,t){if(t===null)return e.fail("java.lang.NullPointerException",null);let i=this;return h((function*(){i.check(e);for(let a=0;a<i.length;a++){let r=yield*m(e,t,"apply",[i.#e()[i.offset+a]]);yield*et(i["set(int,E)"](e,a,r))}i.check(e)})(),()=>{})}"removeIf(Predicate)"(e,t){let i=this.#n(e);if(t===null)return e.fail("java.lang.NullPointerException",null);let a=this;return h((function*(){let r=a.elements(e),l=[];for(let s of r)L(yield*m(e,t,"test",[s]))||l.push(s);return a.check(e),l.length===r.length?!1:(i.es.splice(a.offset,a.length,...l),a.#i(l.length-r.length),!0)})(),g)}"forEach(Consumer)"(e,t){if(t===null)return e.fail("java.lang.NullPointerException",null);let i=this;return h((function*(){let a=i.elements(e);for(let r of a)yield*m(e,t,"accept",[r]),i.check(e)})(),()=>{})}"iterator()"(e){return this.check(e),new al(e.hash(),this)}"subList(int,int)"(e,t,i){return this.check(e),il(e,t,i,this.length),new n(e.hash(),this.root,this,this.offset+t,i-t)}},al=class extends b{className;#e;#t=0;#n=-1;constructor(e,t){super(e),this.#e=t,this.className=t.className.includes("ArrayList")?"java.util.ArrayList$SubList$1":"java.util.AbstractList$SubList$1"}"hasNext()"(){return g(this.#t!==this.#e.length)}"next()"(e){if(this.#e.check(e),this.#t>=this.#e.length)return e.fail(Gn,null);let t=this.#e["get(int)"](e,this.#t);return this.#n=this.#t++,t}"remove()"(e){if(this.#n<0)return e.fail("java.lang.IllegalStateException",null);this.#e["remove(int)"](e,this.#n),this.#t=this.#n,this.#n=-1}};function _c(){let n=(e,t)=>{e["subList(int,int)"]=t};n(de.prototype,function(e,t,i){let a=this;return il(e,t,i,a.es.length),new ta(e.hash(),{kind:"array",list:a},null,t,i-t)}),n(Tt.prototype,function(e,t,i){let a=this;return il(e,t,i,a.items.length),new ta(e.hash(),{kind:"fixed",list:a},null,t,i-t)}),n(Re.prototype,function(e,t,i){let a=this,r=a.c["subList(int,int)"].call(a.c,e,t,i);return new Re(e.hash(),r,a.className)})}_c();var $o="java.util.NoSuchElementException",Ee="java.util.InputMismatchException";function Do(n){return n>=9&&n<=13||n>=28&&n<=32||n===5760||n>=8192&&n<=8202&&n!==8199||n===8232||n===8233||n===8287||n===12288}var Fo=/\\r\\n|[\\n\\r\\u2028\\u2029\\u0085]/g,Jo=new WeakMap;function ia(n){let e=Jo.get(n);return e||Jo.set(n,e={reader:null,position:0,stream:null}),e}var aa="a BufferedReader or InputStreamReader";function la(n,e){let t=ia(n);return!e||t.reader===e||(t.reader==="scanner"&&n.limitation(`reading System.in through ${aa} after a Scanner was made over it (on the JDK the Scanner may already hold the input)`),t.reader==="io"&&n.limitation(`reading System.in through ${aa} after IO.readln() (on the JDK IO.readln may already hold the input)`),t.reader!==null&&n.limitation("reading System.in through a second reader (on the JDK the first one may already hold the input); make one BufferedReader and pass it where it is needed"),t.reader=e),t}var sl=class extends b{className="java.io.BufferedInputStream"},Po="(?:[0-9]+|[1-9][0-9]{0,2}(?:,[0-9]{3})+)",rl=new RegExp(`^[+-]?${Po}$`),ll=new RegExp(`^[+-]?(?:${Po}(?:\\\\.[0-9]*)?|\\\\.[0-9]+)(?:[eE][+-]?[0-9]+)?$`),Uc=/^[+-]?(?:NaN|Infinity)$/,Hc=/^[+-]?\\u221e$/,Go=/^[+-]?0[xX][0-9a-fA-F]*\\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+)?$/;function na(n){return/[^\\P{Nd}0-9]/u.test(n)}var ra=class extends b{className="java.util.Scanner";#e;#t=0;#n=!1;constructor(e,t){super(e),this.#e=t}*javaString(e){return e.limitation("printing a Scanner")}#i(e){this.#n&&e.fail("java.lang.IllegalStateException","Scanner closed")}#a(e){let t=this.#t;for(;t<this.#e.length&&Do(this.#e.charCodeAt(t));)t++;return e.charge(t-this.#t),t}#r(e){this.#i(e);let t=this.#a(e);if(t>=this.#e.length)return null;let i=t;for(;i<this.#e.length&&!Do(this.#e.charCodeAt(i));)i++;return e.charge(i-t),{token:this.#e.slice(t,i),end:i}}#l(e){let t=this.#r(e);return t||(e.inputExhausted(),e.fail($o,null))}#s(e,t,i,a){if(!rl.test(t))return na(t)&&e.limitation(`reading "${t}" as a number (digits outside ASCII)`),null;let r=t.replace(/,/g,""),l=BigInt(r),s=(1n<<BigInt(i-1))-1n;return l>s||l<-s-1n?(a&&e.fail(Ee,`For input string: "${r}"`),null):l}#c(e,t,i=!1){return Uc.test(t)?t.endsWith("NaN")?NaN:t.startsWith("-")?-1/0:1/0:ll.test(t)?Number(t.replace(/,/g,"")):Hc.test(t)?(i&&e.fail(Ee,`For input string: "${t}"`),null):Go.test(t)?c.parseHexFloating(t,!1):(na(t)&&e.limitation(`reading "${t}" as a number (digits outside ASCII)`),null)}"close()"(){this.#n=!0}"hasNext()"(e){return g(this.#r(e)!==null)}"next()"(e){let{token:t,end:i}=this.#l(e);return this.#t=i,new c.JString(t)}"hasNextBoolean()"(e){let t=this.#r(e);return g(t!==null&&/^(?:true|false)$/i.test(t.token))}"nextBoolean()"(e){let{token:t,end:i}=this.#l(e);return/^(?:true|false)$/i.test(t)?(this.#t=i,g(t.toLowerCase()==="true")):e.fail(Ee,null)}"hasNextInt()"(e){let t=this.#r(e);return g(t!==null&&this.#s(e,t.token,32,!1)!==null)}"nextInt()"(e){let{token:t,end:i}=this.#l(e),a=this.#s(e,t,32,!0);return a===null?e.fail(Ee,null):(this.#t=i,Number(a))}"hasNextLong()"(e){let t=this.#r(e);return g(t!==null&&this.#s(e,t.token,64,!1)!==null)}"nextLong()"(e){let{token:t,end:i}=this.#l(e),a=this.#s(e,t,64,!0);return a===null?e.fail(Ee,null):(this.#t=i,c.normLong(a))}#o(e,t,i,a){let r=this.#s(e,t,32,a);if(r===null)return null;let l=i===8?128n:32768n;return r<-l||r>=l?(a&&e.fail(Ee,`Value out of range. Value:"${t.replace(/,/g,"")}" Radix:10`),null):Number(r)}"hasNextByte()"(e){let t=this.#r(e);return g(t!==null&&this.#o(e,t.token,8,!1)!==null)}"nextByte()"(e){let{token:t,end:i}=this.#l(e),a=this.#o(e,t,8,!0);return a===null?e.fail(Ee,null):(this.#t=i,a)}"hasNextShort()"(e){let t=this.#r(e);return g(t!==null&&this.#o(e,t.token,16,!1)!==null)}"nextShort()"(e){let{token:t,end:i}=this.#l(e),a=this.#o(e,t,16,!0);return a===null?e.fail(Ee,null):(this.#t=i,a)}#h(e,t,i=!1){let a=this.#c(e,t,i);return a===null||!Number.isFinite(a)?a:Go.test(t)?c.parseHexFloating(t,!0):c.parseDecimalFloat(t.replace(/,/g,"").replace(/^\\+/,""))}"hasNextFloat()"(e){let t=this.#r(e);return g(t!==null&&this.#h(e,t.token)!==null)}"nextFloat()"(e){let{token:t,end:i}=this.#l(e),a=this.#h(e,t,!0);return a===null?e.fail(Ee,null):(this.#t=i,a)}"hasNextBigInteger()"(e){let t=this.#r(e);return g(t!==null&&rl.test(t.token))}"nextBigInteger()"(e){let{token:t,end:i}=this.#l(e);return rl.test(t)?(this.#t=i,E(e,BigInt(t.replace(/,/g,"")))):(na(t)&&e.limitation(`reading "${t}" as a number (digits outside ASCII)`),e.fail(Ee,null))}"hasNextBigDecimal()"(e){let t=this.#r(e);return g(t!==null&&ll.test(t.token))}"nextBigDecimal()"(e){let{token:t,end:i}=this.#l(e);return ll.test(t)?(this.#t=i,ji(e,new c.JString(t.replace(/,/g,"").replace(/^\\+/,"")))):(na(t)&&e.limitation(`reading "${t}" as a number (digits outside ASCII)`),e.fail(Ee,null))}"hasNextDouble()"(e){let t=this.#r(e);return g(t!==null&&this.#c(e,t.token)!==null)}"nextDouble()"(e){let{token:t,end:i}=this.#l(e),a=this.#c(e,t,!0);return a===null?e.fail(Ee,null):(this.#t=i,a)}"hasNextLine()"(e){return this.#i(e),g(this.#t<this.#e.length)}"nextLine()"(e){if(this.#i(e),this.#t>=this.#e.length)return e.inputExhausted(),e.fail($o,"No line found");Fo.lastIndex=this.#t;let t=Fo.exec(this.#e),i=t?t.index:this.#e.length,a=this.#e.slice(this.#t,i);return e.charge(i-this.#t),this.#t=t?i+t[0].length:i,new c.JString(a)}};function Ko(n){let e=ia(n);e.reader==="scanner"&&n.limitation("IO.readln() after a Scanner was made over System.in (on the JDK the Scanner may already hold the input)"),e.reader instanceof b&&n.limitation(`IO.readln() after ${aa} read System.in (on the JDK the reader may already hold the input)`),e.reader="io";let t=n.stdin();if(e.position>=t.length)return null;let i=/\\r\\n|[\\n\\r]/g;i.lastIndex=e.position;let a=i.exec(t),r=a?a.index:t.length,l=t.slice(e.position,r);return n.charge(r-e.position),e.position=a?r+a[0].length:r,new c.JString(l)}var _o={"System.in":n=>{let e=ia(n);return e.stream??=new sl(n.hash()),e.stream},"Scanner.<init>(InputStream)":(n,[e])=>{if(e===null)return n.fail("java.lang.NullPointerException",null);let t=ia(n);return t.reader==="scanner"&&n.limitation("a second Scanner over System.in (on the JDK the first one may already hold the input); make one Scanner and pass it where it is needed"),t.reader==="io"&&n.limitation("a Scanner over System.in after IO.readln() (on the JDK IO.readln may already hold the input)"),t.reader instanceof b&&n.limitation(`a Scanner over System.in after ${aa} read it (on the JDK the reader may already hold the input)`),t.reader="scanner",new ra(n.hash(),n.stdin())},"Scanner.<init>(String)":(n,[e])=>e===null?n.fail("java.lang.NullPointerException",null):new ra(n.hash(),e.value),"IO.readln()":n=>Ko(n),"IO.readln(String)":(n,[e])=>(n.print("out",e===null?"null":e.value),Ko(n))};var be="java.lang.NullPointerException",ol="java.lang.IllegalArgumentException",zc="java.util.NoSuchElementException",qc="java.lang.IllegalStateException",un=n=>n.fields[1],Uo=(n,e)=>un(n)-un(e),Kn=(n,e)=>n instanceof c.JObject&&mn(n.className)===e;function*sa(n,e){let t=n.staticMethod(e,"values",0);return t<0?n.limitation(`EnumSet or EnumMap of ${e}, which is not an enum of the program`):(yield{invoke:t,args:[]}).data}var Ft=class extends Pe{enumClass;constructor(e,t){super(e,new rn(null,Uo),null,null,!1,"java.util.EnumMap"),this.enumClass=t}*lookup(e,t){if(Kn(t,this.enumClass))return yield*super.lookup(e,t)}*removeKey(e,t){return Kn(t,this.enumClass)?yield*super.removeKey(e,t):null}"put(K,V)"(e,t,i){return t===null?e.fail(be,\'Cannot invoke "Object.getClass()" because "key" is null\'):super["put(K,V)"](e,t,i)}"putIfAbsent(K,V)"(e,t,i){return t===null?e.fail(be,\'Cannot invoke "Object.getClass()" because "key" is null\'):super["putIfAbsent(K,V)"](e,t,i)}},oa=class n extends xe{enumClass;constructor(e,t,i){super(e,new Pe(e,new rn(null,Uo),null,null,!1,"java.util.EnumMap"),i>64?"java.util.JumboEnumSet":"java.util.RegularEnumSet"),this.enumClass=t}"add(E)"(e,t){if(t===null)return e.fail(be,\'Cannot invoke "Object.getClass()" because "e" is null\');let i=this.map.tree.size;return h(cn(this.map["put(K,V)"](e,t,null)),()=>g(this.map.tree.size!==i))}"remove(Object)"(e,t){return Kn(t,this.enumClass)?super["remove(Object)"](e,t):0}*contains(e,t){return Kn(t,this.enumClass)?yield*super.contains(e,t):!1}"iterator()"(e){return new cl(e.hash(),this,this.elements(e).slice())}"removeAll(Collection)"(e,t){if(t===null)return e.fail(be,null);let i=t.elements(e,!1),a=!1;for(let r of i)Kn(r,this.enumClass)&&this.map.tree.size&&this["remove(Object)"](e,r)===1&&(a=!0);return g(a)}"retainAll(Collection)"(e,t){if(t===null)return e.fail(be,null);let i=t,a=this;return h((function*(){let r=!1;for(let l of a.elements(e).slice())(yield*i.contains(e,l))||(a["remove(Object)"](e,l),r=!0);return r})(),g)}"clone()"(e){let t=new n(e,this.enumClass,0);return h(cn(t.addEach(e,this.elements(e))),()=>Wc(t,this.className))}},Wc=(n,e)=>Object.assign(n,{className:e}),cl=class extends b{className="java.util.RegularEnumSet$EnumSetIterator";#e;#t;#n=0;#i;constructor(e,t,i){super(e),this.#e=t,this.#t=i}"hasNext()"(){return g(this.#n<this.#t.length)}"next()"(e){return this.#n>=this.#t.length?e.fail(zc,null):(this.#i=this.#t[this.#n++],this.#i)}"remove()"(e){if(this.#i===void 0)return e.fail(qc,null);this.#e["remove(Object)"](e,this.#i),this.#i=void 0}};function*cn(n){return n!==null&&typeof n=="object"&&Symbol.iterator in n?yield*n:n}function*pe(n,e,t){let i=yield*sa(n,e),a=new oa(n,e,i.length);return yield*cn(a.addEach(n,t)),a}function ul(n,e,t){return e===null?n.fail(be,`Cannot invoke "java.lang.Class.getEnumConstantsShared()" because "${t}" is null`):e.name}function Ze(n,e){return e===null?n.fail(be,\'Cannot invoke "Object.getClass()" because "e" is null\'):mn(e.className)}var ve=n=>h(n),Ho={"EnumMap.<init>(Class)":(n,[e])=>new Ft(n,ul(n,e,"keyType")),"EnumMap.<init>(EnumMap)":(n,[e])=>{if(e===null)return n.fail(be,\'Cannot read field "keyType" because "m" is null\');let t=new Ft(n,e.enumClass);return h(cn(t["putAll(Map)"](n,e)),()=>t)},"EnumMap.<init>(Map)":(n,[e])=>{if(e===null)return n.fail(be,\'Cannot invoke "java.util.Map.isEmpty()" because "m" is null\');if(e instanceof Ft){let a=new Ft(n,e.enumClass);return h(cn(a["putAll(Map)"](n,e)),()=>a)}let t=e.mappings(n,!0).map(a=>a.entryKey);if(!t.length)return n.fail(ol,"Specified map is empty");let i=new Ft(n,Ze(n,t[0]));return h(cn(i["putAll(Map)"](n,e)),()=>i)},"EnumSet.noneOf(Class)":(n,[e])=>ve(pe(n,ul(n,e,"elementType"),[])),"EnumSet.allOf(Class)":(n,[e])=>{let t=ul(n,e,"elementType");return ve((function*(){return yield*pe(n,t,yield*sa(n,t))})())},"EnumSet.of(E)":(n,[e])=>ve(pe(n,Ze(n,e),[e])),"EnumSet.of(E,E)":(n,e)=>ve(pe(n,Ze(n,e[0]),e)),"EnumSet.of(E,E,E)":(n,e)=>ve(pe(n,Ze(n,e[0]),e)),"EnumSet.of(E,E,E,E)":(n,e)=>ve(pe(n,Ze(n,e[0]),e)),"EnumSet.of(E,E,E,E,E)":(n,e)=>ve(pe(n,Ze(n,e[0]),e)),"EnumSet.of(E,E[])":(n,[e,t])=>ve(pe(n,Ze(n,e),[e,...t.data])),"EnumSet.range(E,E)":(n,[e,t])=>{let i=Ze(n,e);if(t===null)return n.fail(be,\'Cannot invoke "java.lang.Enum.ordinal()" because "to" is null\');if(un(e)>un(t)){let a=r=>r.fields[0].value;return n.fail(ol,`${a(e)} > ${a(t)}`)}return ve((function*(){let a=yield*sa(n,i);return yield*pe(n,i,a.slice(un(e),un(t)+1))})())},"EnumSet.complementOf(EnumSet)":(n,[e])=>{if(e===null)return n.fail(be,\'Cannot invoke "java.util.EnumSet.clone()" because "s" is null\');let t=e;return ve((function*(){let i=yield*sa(n,t.enumClass),a=new Set(t.elements(n));return yield*pe(n,t.enumClass,i.filter(r=>!a.has(r)))})())},"EnumSet.copyOf(EnumSet)":(n,[e])=>e===null?n.fail(be,\'Cannot invoke "java.util.EnumSet.clone()" because "s" is null\'):ve(pe(n,e.enumClass,e.elements(n))),"EnumSet.copyOf(Collection)":(n,[e])=>{if(e===null)return n.fail(be,\'Cannot invoke "java.util.Collection.isEmpty()" because "c" is null\');if(e instanceof oa)return ve(pe(n,e.enumClass,e.elements(n)));let t=e.elements(n,!0);return t.length?ve(pe(n,Ze(n,t[0]),t)):n.fail(ol,"Collection is empty")}};var va="java.io.IOException",Oe="java.lang.NullPointerException",ba="Stream closed",tu=8192;function nu(n,e,t,i){(e<0||t<0||e+t>i||e+t<0)&&n.fail("java.lang.IndexOutOfBoundsException",`Range [${e}, ${e} + ${t}) out of bounds for length ${i}`)}function da(n,e,t){return e===null?n.fail(Oe,`Cannot read the array length because "${t}" is null`):Vi(e)}function iu(n,e,t,i,a){if(e===null)return n.fail(Oe,`Cannot read the array length because "${a}" is null`);let r=e.data;nu(n,t,i,r.length);let l="";for(let s=t;s<t+i;s+=8192)l+=String.fromCharCode(...r.subarray(s,Math.min(s+8192,t+i)));return l}function au(n,e,t,i,a){if(e===null)return n.fail(Oe,`Cannot invoke "String.length()" because "${a}" is null`);let r=e.value;return i<=0?"":((t<0||t+i>r.length)&&n.fail("java.lang.StringIndexOutOfBoundsException",`Range [${t}, ${t+i}) out of bounds for length ${r.length}`),r.slice(t,t+i))}function ru(n,e,t,i){let a=e===null?"null":e instanceof c.JString?e.value:e.text;return(t<0||i>a.length||t>i)&&n.fail("java.lang.StringIndexOutOfBoundsException",`begin ${t}, end ${i}, length ${a.length}`),a.slice(t,i)}function lu(n){return n===null?"null":n instanceof c.JString?n.value:n.text}var fa=class extends b{className="java.io.PrintStream";stream;#e=!1;constructor(e,t){super(e),this.stream=t}write(e,t){e.streamClosed(this.stream)?this.#e=!0:e.print(this.stream,t)}flush(e){e.streamClosed(this.stream)&&(this.#e=!0)}close(e){e.closeStream(this.stream)}checkError(e){return this.flush(e),this.#e}},zo=new WeakMap;function vt(n,e){let t=zo.get(n);return t||zo.set(n,t={out:new fa(n.hash(),"out"),err:new fa(n.hash(),"err")}),t[e]}var Hn=class extends b{putChar(e,t){return this.put(e,String.fromCharCode(t&65535))}putChars(e,t){return this.put(e,t)}#e(e,t){t||e.fail(va,ba)}"write(int)"(e,t){return this.#e(e,this.putChar(e,t))}"write(String)"(e,t){return t===null?e.fail(Oe,\'Cannot invoke "String.length()" because "str" is null\'):this.#e(e,this.put(e,t.value))}"write(String,int,int)"(e,t,i,a){return this.#e(e,this.put(e,au(e,t,i,a,"str")))}"write(char[])"(e,t){return this.#e(e,this.putChars(e,da(e,t,"cbuf")))}"write(char[],int,int)"(e,t,i,a){return this.#e(e,this.putChars(e,iu(e,t,i,a,"cbuf")))}"append(CharSequence)"(e,t){return this.#e(e,this.put(e,lu(t))),this}"append(CharSequence,int,int)"(e,t,i,a){return this.#e(e,this.put(e,ru(e,t,i,a))),this}"append(char)"(e,t){return this.#e(e,this.putChar(e,t)),this}"flush()"(e){return this.#e(e,this.flushAll(e))}"close()"(e){this.shut(e)}},Zc=/^[\\x00-\\x7f]*$/,qo=8192,zn=class extends Hn{className="java.io.OutputStreamWriter";#e;#t=512;#n="";#i=0;#a="";#r=!1;constructor(e,t){super(e),this.#e=t}#l(e){this.#n&&(this.#e.write(e,this.#n),this.#n="",this.#i=0)}put(e,t){if(this.#r)return!1;let i=t.length;if(!i)return!0;if(i*3>this.#t&&this.#t<qo&&(this.#l(e),this.#t=Math.min(qo,i*3)),this.#a&&(t=this.#a+t,this.#a=""),e.charge(t.length>>>4),Zc.test(t)){let a=0;for(;a<t.length;){let r=this.#t-this.#i;if(r===0){this.#l(e);continue}let l=Math.min(r,t.length-a);this.#n+=l===t.length?t:t.slice(a,a+l),this.#i+=l,a+=l}return!0}for(let a=0;a<t.length;a++){let r=t.charCodeAt(a),l,s;if(r>=55296&&r<=56319){if(a+1===t.length){this.#a=t[a];break}let o=t.charCodeAt(a+1);o>=56320&&o<=57343?(l=t.slice(a,a+2),s=4,a++):(l="?",s=1)}else r>=56320&&r<=57343?(l="?",s=1):(l=t[a],s=r<128?1:r<2048?2:3);this.#i+s>this.#t&&this.#l(e),this.#n+=l,this.#i+=s}return!0}flushAll(e){return this.#r?!1:(this.#l(e),this.#e.flush(e),!0)}shut(e){this.#r||(this.#a&&(this.#a="",this.put(e,"?")),this.#l(e),this.#e.close(e),this.#r=!0)}get printStream(){return this.#e}},hn=class extends Hn{className="java.io.BufferedWriter";#e;#t;#n="";#i=!1;constructor(e,t,i){super(e),this.#e=t,this.#t=i}#a(e){if(!this.#n)return!0;let t=this.#n;return this.#n="",this.#e.put(e,t)}put(e,t){if(this.#i)return!1;let i=0;for(;i<t.length;){let a=Math.min(this.#t-this.#n.length,t.length-i);if(this.#n+=a===t.length?t:t.slice(i,i+a),i+=a,this.#n.length>=this.#t&&!this.#a(e))return!1}return!0}putChar(e,t){return this.#i||this.#n.length>=this.#t&&!this.#a(e)?!1:(this.#n+=String.fromCharCode(t&65535),!0)}putChars(e,t){return this.#i?!1:t.length<this.#t?this.put(e,t):this.#a(e)&&this.#e.putChars(e,t)}flushAll(e){return this.#i?!1:this.#a(e)&&this.#e.flushAll(e)}shut(e){this.#i||(this.#a(e),this.#e.shut(e),this.#i=!0)}get sink(){return this.#e}"newLine()"(e){this.put(e,`\n`)||e.fail(va,ba)}},ga=class extends Hn{className="java.io.StringWriter";text="";put(e,t){return e.checkString(this.text.length+t.length),this.text+=t,!0}flushAll(){return!0}shut(){}*javaString(){return this.text}"write(String)"(e,t){this.put(e,t===null?"null":t.value)}},ma=class extends b{className="java.io.PrintWriter";#e;#t;#n;#i=!1;constructor(e,t,i,a){super(e),this.#e=t,this.#t=i,this.#n=a}#a(e,t){(!this.#e||!this.#e.put(e,t))&&(this.#i=!0)}#r(e,t){(!this.#e||!this.#e.putChar(e,t))&&(this.#i=!0)}#l(e,t){(!this.#e||!this.#e.putChars(e,t))&&(this.#i=!0)}#s(e){(!this.#e||!this.#e.flushAll(e))&&(this.#i=!0)}#c(e){this.#a(e,`\n`),this.#t&&this.#s(e)}#o(e,t){this.#a(e,t)}#h(e,t){return this.#a(e,t),this.#c(e)}"print(boolean)"(e,t){return this.#o(e,t?"true":"false")}"print(char)"(e,t){this.#r(e,t)}"print(int)"(e,t){return this.#o(e,String(t))}"print(long)"(e,t){return this.#o(e,String(t))}"print(float)"(e,t){return this.#o(e,c.floatToString(t))}"print(double)"(e,t){return this.#o(e,c.doubleToString(t))}"print(char[])"(e,t){this.#l(e,da(e,t,"buf"))}"print(String)"(e,t){return this.#o(e,t===null?"null":t.value)}"print(Object)"(e,t){return h(V(e,t),i=>this.#o(e,i))}"println()"(e){return this.#c(e)}"println(boolean)"(e,t){return this.#h(e,t?"true":"false")}"println(char)"(e,t){return this.#r(e,t),this.#c(e)}"println(int)"(e,t){return this.#h(e,String(t))}"println(long)"(e,t){return this.#h(e,String(t))}"println(float)"(e,t){return this.#h(e,c.floatToString(t))}"println(double)"(e,t){return this.#h(e,c.doubleToString(t))}"println(char[])"(e,t){return this.#l(e,da(e,t,"buf")),this.#c(e)}"println(String)"(e,t){return this.#h(e,t===null?"null":t.value)}"println(Object)"(e,t){return h(V(e,t),i=>this.#h(e,i))}"printf(String,Object[])"(e,t,i){return h(Mt(e,t,i),a=>(this.#a(e,a),this.#t&&this.#s(e),this))}"format(String,Object[])"(e,t,i){return this["printf(String,Object[])"](e,t,i)}"write(int)"(e,t){this.#r(e,t)}"write(String)"(e,t){return t===null?e.fail(Oe,\'Cannot invoke "String.length()" because "s" is null\'):this.#o(e,t.value)}"write(String,int,int)"(e,t,i,a){return this.#o(e,au(e,t,i,a,"s"))}"write(char[])"(e,t){this.#l(e,da(e,t,"buf"))}"write(char[],int,int)"(e,t,i,a){this.#l(e,iu(e,t,i,a,"buf"))}"append(CharSequence)"(e,t){return this.#a(e,lu(t)),this}"append(CharSequence,int,int)"(e,t,i,a){return this.#a(e,ru(e,t,i,a)),this}"append(char)"(e,t){return this.#r(e,t),this}"flush()"(e){this.#s(e)}"close()"(e){this.#e&&(this.#e.shut(e),this.#e=null)}"checkError()"(e){return this.#e&&this.#s(e),g(this.#i||this.#n!==null&&this.#n.checkError(e))}};function su(n){return n instanceof zn?n.printStream:n instanceof hn?su(n.sink):null}var qn=class extends b{closed=!1;claim(e,t){}exhausted(e){}open(e){this.closed&&e.fail(va,ba)}readChar(e,t){this.open(e),this.claim(e,t);let i=this.text(e),a=this.position(e);return a>=i.length?(this.exhausted(e),-1):(this.seek(e,a+1),i.charCodeAt(a))}"read()"(e){return this.readChar(e,this)}"read(char[])"(e,t){return t===null?e.fail(Oe,\'Cannot read the array length because "cbuf" is null\'):this["read(char[],int,int)"](e,t,0,t.data.length)}"read(char[],int,int)"(e,t,i,a){if(this.open(e),t===null)return e.fail(Oe,\'Cannot read the array length because "cbuf" is null\');let r=t.data;if(nu(e,i,a,r.length),a===0)return 0;this.claim(e,this);let l=this.text(e),s=this.position(e);if(s>=l.length)return this.exhausted(e),-1;let o=Math.min(a,l.length-s);for(let u=0;u<o;u++)r[i+u]=l.charCodeAt(s+u);return e.charge(o),this.seek(e,s+o),o}"ready()"(e){return this.open(e),g(this.position(e)<this.text(e).length||this.readyAtEnd)}"skip(long)"(e,t){let i=Number(t);i<0&&e.fail("java.lang.IllegalArgumentException","skip value is negative"),this.open(e),this.claim(e,this);let a=this.position(e),r=Math.min(i,this.text(e).length-a);return this.seek(e,a+r),c.normLong(BigInt(r))}"close()"(e){this.closed=!0}},pl=class extends qn{className="java.io.InputStreamReader";readyAtEnd=!1;text(e){return e.stdin()}position(e){return la(e).position}seek(e,t){la(e).position=t}claim(e,t){la(e,t)}exhausted(e){e.inputExhausted()}},vl=class extends qn{className="java.io.StringReader";readyAtEnd=!0;#e;#t=0;constructor(e,t){super(e),this.#e=t}text(){return this.#e}position(){return this.#t}seek(e,t){this.#t=t}},pa=class extends qn{className="java.io.BufferedReader";#e;constructor(e,t){super(e),this.#e=t}get readyAtEnd(){return this.#e.readyAtEnd}text(e){return this.#e.text(e)}position(e){return this.#e.position(e)}seek(e,t){this.#e.seek(e,t)}claim(e,t){this.#e.claim(e,t)}exhausted(e){this.#e.exhausted(e)}open(e){(this.closed||this.#e.closed)&&e.fail(va,ba)}line(e){this.open(e),this.claim(e,this);let t=this.text(e),i=this.position(e);if(i>=t.length)return this.exhausted(e),null;let a=i;for(;a<t.length;){let l=t.charCodeAt(a);if(l===10||l===13)break;a++}e.charge(a-i);let r=a;return r<t.length&&(r+=t.charCodeAt(r)===13&&t.charCodeAt(r+1)===10?2:1),this.seek(e,r),t.slice(i,a)}"readLine()"(e){let t=this.line(e);return t===null?null:new c.JString(t)}"lines()"(e){return Yi(e,()=>{let t=[];for(let i=this.line(e);i!==null;i=this.line(e))t.push(new c.JString(i));return e.allocate(t.length),t})}"close()"(e){this.closed=!0,this.#e.closed=!0}},Xc=` \n\\r\\f`,bl=class extends b{className="java.util.StringTokenizer";#e;#t;#n;#i=0;constructor(e,t,i,a){super(e),this.#e=t,this.#t=i,this.#n=a}#a(e){return this.#t.indexOf(String.fromCharCode(e))>=0}#r(e,t){this.#t===null&&e.fail(Oe,null);let i=t;if(!this.#n)for(;i<this.#e.length&&this.#a(this.#e.charCodeAt(i));)i++;return i}#l(e){let t=e;for(;t<this.#e.length&&!this.#a(this.#e.charCodeAt(t));)t++;return this.#n&&t===e&&t<this.#e.length&&t++,t}#s(e){let t=this.#r(e,this.#i);t>=this.#e.length&&e.fail("java.util.NoSuchElementException",null);let i=this.#l(t);return e.charge(i-this.#i),this.#i=i,this.#e.slice(t,i)}"hasMoreTokens()"(e){return g(this.#r(e,this.#i)<this.#e.length)}"hasMoreElements()"(e){return this["hasMoreTokens()"](e)}"nextToken()"(e){return new c.JString(this.#s(e))}"nextElement()"(e){return new c.JString(this.#s(e))}"nextToken(String)"(e,t){return t===null?e.fail(Oe,null):(this.#t=t.value,new c.JString(this.#s(e)))}"countTokens()"(e){let t=0;for(let i=this.#r(e,this.#i);i<this.#e.length;i=this.#r(e,i))i=this.#l(i),t++;return e.charge(this.#e.length-this.#i),t}},hl=1,Pn=2,ua=4,_n=8,dl=16,ca=-1,fl=10,Wo=-2,Zo=-3,gl=-4,Un=-5,Xo=-6,Nl=class extends b{className="java.io.StreamTokenizer";#e;#t=new Uint8Array(256);#n=Un;#i=!1;#a=!1;#r=!1;#l=1;ttype=gl;nval=0;sval=null;constructor(e,t){super(e),this.#e=t,this.#c(97,122),this.#c(65,90),this.#c(160,255),this.#o(0,32),this.#t[47]=dl,this.#t[34]=_n,this.#t[39]=_n,this.#h()}#s(e,t){return[Math.max(e,0),Math.min(t,255)]}#c(e,t){let[i,a]=this.#s(e,t);for(let r=i;r<=a;r++)this.#t[r]|=ua}#o(e,t){let[i,a]=this.#s(e,t);for(let r=i;r<=a;r++)this.#t[r]=hl}#h(){for(let e=48;e<=57;e++)this.#t[e]|=Pn;this.#t[46]|=Pn,this.#t[45]|=Pn}#d(e){return e<256?this.#t[e]:ua}#u(e){return this.#e.readChar(e,this.#e)}next(e){if(this.#i)return this.#i=!1,this.ttype;this.sval=null;let t=this.#n;if(t===Xo){if(t=this.#u(e),t<0)return this.ttype=ca;t===10&&(t=Un)}if(t===Un&&(t=this.#u(e)),t<0)return this.ttype=ca;this.ttype=t,this.#n=Un;let i=this.#d(t);for(;i&hl;){if(t===13){if(this.#l++,this.#a)return this.#n=Xo,this.ttype=fl;t=this.#u(e),t===10&&(t=this.#u(e))}else{if(t===10&&(this.#l++,this.#a))return this.ttype=fl;t=this.#u(e)}if(t<0)return this.ttype=ca;i=this.#d(t)}if(i&Pn){let a=!1;if(t===45){if(t=this.#u(e),t!==46&&(t<48||t>57))return this.#n=t,this.ttype=45;a=!0}let r=0,l=0,s=0;for(;;){if(t===46&&s===0)s=1;else if(t>=48&&t<=57)r=r*10+(t-48),l+=s;else break;t=this.#u(e)}if(this.#n=t,l!==0){let o=10;for(l--;l>0;l--)o*=10;r=r/o}return this.nval=a?-r:r,this.ttype=Wo}if(i&ua){let a="";do a+=String.fromCharCode(t),t=this.#u(e),i=t<0?hl:this.#d(t);while(i&(ua|Pn));return e.charge(a.length),this.#n=t,this.sval=this.#r?a.toLowerCase():a,this.ttype=Zo}if(i&_n){this.ttype=t;let a="",r=this.#u(e);for(;r>=0&&r!==this.ttype&&r!==10&&r!==13;){if(r===92){t=this.#u(e);let l=t;if(t>=48&&t<=55){t-=48;let s=this.#u(e);s>=48&&s<=55?(t=(t<<3)+(s-48),s=this.#u(e),s>=48&&s<=55&&l<=51?(t=(t<<3)+(s-48),r=this.#u(e)):r=s):r=s}else{switch(t){case 97:t=7;break;case 98:t=8;break;case 102:t=12;break;case 110:t=10;break;case 114:t=13;break;case 116:t=9;break;case 118:t=11;break}r=this.#u(e)}}else t=r,r=this.#u(e);t>=0&&(a+=String.fromCharCode(t))}return e.charge(a.length),this.#n=r===this.ttype?Un:r,this.sval=a,this.ttype}if(i&dl){for(;(t=this.#u(e))!==10&&t!==13&&t>=0;);return this.#n=t,this.next(e)}return this.ttype=t}*javaString(){let e;switch(this.ttype){case ca:e="EOF";break;case fl:e="EOL";break;case Zo:e=this.sval??"null";break;case Wo:e=`n=${c.doubleToString(this.nval)}`;break;case gl:e="NOTHING";break;default:e=this.ttype<256&&this.#t[this.ttype]&_n?this.sval??"null":`\'${String.fromCharCode(this.ttype)}\'`}return`Token[${e}], line ${this.#l}`}"nextToken()"(e){return this.next(e)}"pushBack()"(){this.ttype!==gl&&(this.#i=!0)}"lineno()"(){return this.#l}"resetSyntax()"(){this.#t.fill(0)}"wordChars(int,int)"(e,t,i){this.#c(t,i)}"whitespaceChars(int,int)"(e,t,i){this.#o(t,i)}"ordinaryChars(int,int)"(e,t,i){let[a,r]=this.#s(t,i);for(let l=a;l<=r;l++)this.#t[l]=0}"ordinaryChar(int)"(e,t){t>=0&&t<256&&(this.#t[t]=0)}"commentChar(int)"(e,t){t>=0&&t<256&&(this.#t[t]=dl)}"quoteChar(int)"(e,t){t>=0&&t<256&&(this.#t[t]=_n)}"parseNumbers()"(){this.#h()}"eolIsSignificant(boolean)"(e,t){this.#a=t===1}"lowerCaseMode(boolean)"(e,t){this.#r=t===1}};function bt(n,e){return e===null?n.fail(Oe,null):e}function Qo(n,e){return e<=0&&n.fail("java.lang.IllegalArgumentException","Buffer size <= 0"),e}function ha(n,e){return bt(n,e)}function Yo(n,e,t){return new ma(n.hash(),e,t,su(e))}function eu(n,e,t){let i=bt(n,e),a=new hn(n.hash(),new zn(n.hash(),i),tu);return new ma(n.hash(),a,t,i)}function ml(n,e,t,i){return e===null?n.fail(Oe,\'Cannot invoke "String.length()" because "str" is null\'):new bl(n.hash(),e.value,t,i)}var ou={"System.out":n=>vt(n,"out"),"System.err":n=>vt(n,"err"),"PrintStream.out.flush()":n=>{vt(n,"out").flush(n)},"PrintStream.err.flush()":n=>{vt(n,"err").flush(n)},"PrintStream.out.close()":n=>{vt(n,"out").close(n)},"PrintStream.err.close()":n=>{vt(n,"err").close(n)},"PrintStream.out.checkError()":n=>g(vt(n,"out").checkError(n)),"PrintStream.err.checkError()":n=>g(vt(n,"err").checkError(n)),"InputStreamReader.<init>(InputStream)":(n,[e])=>(bt(n,e),new pl(n.hash())),"StringReader.<init>(String)":(n,[e])=>new vl(n.hash(),bt(n,e).value),"BufferedReader.<init>(Reader)":(n,[e])=>new pa(n.hash(),bt(n,e)),"BufferedReader.<init>(Reader,int)":(n,[e,t])=>(bt(n,e),Qo(n,t),new pa(n.hash(),e)),"OutputStreamWriter.<init>(OutputStream)":(n,[e])=>new zn(n.hash(),bt(n,e)),"BufferedWriter.<init>(Writer)":(n,[e])=>new hn(n.hash(),ha(n,e),tu),"BufferedWriter.<init>(Writer,int)":(n,[e,t])=>{let i=ha(n,e);return new hn(n.hash(),i,Qo(n,t))},"StringWriter.<init>()":n=>new ga(n.hash()),"StringWriter.<init>(int)":(n,[e])=>(e<0&&n.fail("java.lang.IllegalArgumentException","Negative buffer size"),new ga(n.hash())),"PrintWriter.<init>(Writer)":(n,[e])=>Yo(n,ha(n,e),!1),"PrintWriter.<init>(Writer,boolean)":(n,[e,t])=>Yo(n,ha(n,e),t===1),"PrintWriter.<init>(OutputStream)":(n,[e])=>eu(n,e,!1),"PrintWriter.<init>(OutputStream,boolean)":(n,[e,t])=>eu(n,e,t===1),"StreamTokenizer.<init>(Reader)":(n,[e])=>new Nl(n.hash(),bt(n,e)),"StreamTokenizer#ttype":(n,[e])=>e.ttype,"StreamTokenizer#nval":(n,[e])=>e.nval,"StreamTokenizer#sval":(n,[e])=>{let t=e.sval;return t===null?null:new c.JString(t)},"StringTokenizer.<init>(String)":(n,[e])=>ml(n,e,Xc,!1),"StringTokenizer.<init>(String,String)":(n,[e,t])=>ml(n,e,t===null?null:t.value,!1),"StringTokenizer.<init>(String,String,boolean)":(n,[e,t,i])=>ml(n,e,t===null?null:t.value,i===1)};var Wn="java.lang.ArithmeticException",ue="java.lang.IllegalArgumentException",gu=-2147483648,Sl=2147483647,mu=-(1n<<63n),Qc=(1n<<63n)-1n,y=n=>BigInt(n),uu=n=>c.normLong(BigInt.asIntN(64,n));function Jt(n,e){return(e<gu||e>Sl)&&n.fail(Wn,"integer overflow"),e}function Gt(n,e){return(e<mu||e>Qc)&&n.fail(Wn,"long overflow"),c.normLong(e)}function xa(n,e,t){t===0n&&n.fail(Wn,"/ by zero");let i=e/t;return e%t!==0n&&e<0n!=t<0n?i-1n:i}function Cl(n,e,t){return e-xa(n,e,t)*t}var Na=new DataView(new ArrayBuffer(8));function dn(n,e){if(Number.isNaN(n)||n===(e?1/0:-1/0))return n;if(n===0)return e?Number.MIN_VALUE:-Number.MIN_VALUE;Na.setFloat64(0,n);let t=Na.getBigInt64(0);return t+=n>0===e?1n:-1n,Na.setBigInt64(0,t),Na.getFloat64(0)}function Ca(n,e){if(Number.isNaN(n)||n===(e?1/0:-1/0))return n;if(n===0)return e?c.intBitsToFloat(1):-c.intBitsToFloat(1);let t=c.floatToIntBits(n);return c.intBitsToFloat(t+(n>0===e?1:-1))}function Yc(n){if(Number.isNaN(n))return NaN;if(!Number.isFinite(n))return 1/0;let e=Math.abs(n);return e===Number.MAX_VALUE?e-dn(e,!1):dn(e,!0)-e}function eh(n){if(!Number.isFinite(n)||Math.abs(n)>=2**52)return n;let e=Math.floor(n),t=n-e,i=t<.5?e:t>.5?e+1:e%2===0?e:e+1;return i===0&&(n<0||Object.is(n,-0))?-0:i}var cu=new WeakMap;function pu(n){let e=cu.get(n);return e||cu.set(n,e={identity:new WeakMap}),e}var v=n=>n,vu={"Math.pow(double,double)":(n,[e,t])=>Math.pow(v(e),v(t)),"Math.exp(double)":(n,[e])=>Math.exp(v(e)),"Math.log(double)":(n,[e])=>Math.log(v(e)),"Math.log10(double)":(n,[e])=>Math.log10(v(e)),"Math.sin(double)":(n,[e])=>Math.sin(v(e)),"Math.cos(double)":(n,[e])=>Math.cos(v(e)),"Math.tan(double)":(n,[e])=>Math.tan(v(e)),"Math.asin(double)":(n,[e])=>Math.asin(v(e)),"Math.acos(double)":(n,[e])=>Math.acos(v(e)),"Math.atan(double)":(n,[e])=>Math.atan(v(e)),"Math.atan2(double,double)":(n,[e,t])=>Math.atan2(v(e),v(t)),"Math.sinh(double)":(n,[e])=>Math.sinh(v(e)),"Math.cosh(double)":(n,[e])=>Math.cosh(v(e)),"Math.tanh(double)":(n,[e])=>Math.tanh(v(e)),"Math.cbrt(double)":(n,[e])=>Math.cbrt(v(e)),"Math.hypot(double,double)":(n,[e,t])=>Math.hypot(v(e),v(t)),"Math.expm1(double)":(n,[e])=>Math.expm1(v(e)),"Math.log1p(double)":(n,[e])=>Math.log1p(v(e)),"Math.signum(double)":(n,[e])=>v(e)>0?1:v(e)<0?-1:v(e),"Math.toRadians(double)":(n,[e])=>v(e)*.017453292519943295,"Math.toDegrees(double)":(n,[e])=>v(e)*57.29577951308232,"Math.rint(double)":(n,[e])=>eh(v(e)),"Math.ulp(double)":(n,[e])=>Yc(v(e)),"Math.nextUp(double)":(n,[e])=>dn(v(e),!0),"Math.nextDown(double)":(n,[e])=>dn(v(e),!1),"Math.signum(float)":(n,[e])=>v(e)>0?1:v(e)<0?-1:v(e),"Math.ulp(float)":(n,[e])=>{let t=Math.abs(v(e));return Number.isNaN(t)?NaN:Number.isFinite(t)?t===34028234663852886e22?t-Ca(t,!1):Ca(t,!0)-t:1/0},"Math.nextUp(float)":(n,[e])=>Ca(v(e),!0),"Math.nextDown(float)":(n,[e])=>Ca(v(e),!1),"Math.random()":n=>{let e=pu(n);return e.random??=new Zn(n.hash(),n.seed()),e.random.nextDouble()},"Math.floorDiv(int,int)":(n,[e,t])=>Number(BigInt.asIntN(32,xa(n,y(e),y(t)))),"Math.floorDiv(long,int)":(n,[e,t])=>uu(xa(n,y(e),y(t))),"Math.floorDiv(long,long)":(n,[e,t])=>uu(xa(n,y(e),y(t))),"Math.floorMod(int,int)":(n,[e,t])=>Number(Cl(n,y(e),y(t))),"Math.floorMod(long,int)":(n,[e,t])=>Number(Cl(n,y(e),y(t))),"Math.floorMod(long,long)":(n,[e,t])=>c.normLong(Cl(n,y(e),y(t))),"Math.addExact(int,int)":(n,[e,t])=>Jt(n,v(e)+v(t)),"Math.addExact(long,long)":(n,[e,t])=>Gt(n,y(e)+y(t)),"Math.subtractExact(int,int)":(n,[e,t])=>Jt(n,v(e)-v(t)),"Math.subtractExact(long,long)":(n,[e,t])=>Gt(n,y(e)-y(t)),"Math.multiplyExact(int,int)":(n,[e,t])=>Jt(n,Number(y(e)*y(t))),"Math.multiplyExact(long,int)":(n,[e,t])=>Gt(n,y(e)*y(t)),"Math.multiplyExact(long,long)":(n,[e,t])=>Gt(n,y(e)*y(t)),"Math.negateExact(int)":(n,[e])=>Jt(n,-v(e)),"Math.negateExact(long)":(n,[e])=>Gt(n,-y(e)),"Math.incrementExact(int)":(n,[e])=>Jt(n,v(e)+1),"Math.incrementExact(long)":(n,[e])=>Gt(n,y(e)+1n),"Math.decrementExact(int)":(n,[e])=>Jt(n,v(e)-1),"Math.decrementExact(long)":(n,[e])=>Gt(n,y(e)-1n),"Math.toIntExact(long)":(n,[e])=>Jt(n,Number(y(e))),"Math.absExact(int)":(n,[e])=>(e===gu&&n.fail(Wn,"Overflow to represent absolute value of Integer.MIN_VALUE"),Math.abs(v(e))),"Math.absExact(long)":(n,[e])=>(y(e)===mu&&n.fail(Wn,"Overflow to represent absolute value of Long.MIN_VALUE"),c.normLong(y(e)<0n?-y(e):y(e))),"Math.clamp(long,int,int)":(n,[e,t,i])=>(v(t)>v(i)&&n.fail(ue,`${t} > ${i}`),Number(y(e)<y(t)?y(t):y(e)>y(i)?y(i):y(e))),"Math.clamp(long,long,long)":(n,[e,t,i])=>(y(t)>y(i)&&n.fail(ue,`${t} > ${i}`),c.normLong(y(e)<y(t)?y(t):y(e)>y(i)?y(i):y(e))),"Math.clamp(double,double,double)":(n,[e,t,i])=>(Number.isNaN(v(t))&&n.fail(ue,"min is NaN"),Number.isNaN(v(i))&&n.fail(ue,"max is NaN"),v(t)>v(i)&&n.fail(ue,`${c.doubleToString(v(t))} > ${c.doubleToString(v(i))}`),Math.min(v(i),Math.max(v(e),v(t)))),"Math.clamp(float,float,float)":(n,[e,t,i])=>(Number.isNaN(v(t))&&n.fail(ue,"min is NaN"),Number.isNaN(v(i))&&n.fail(ue,"max is NaN"),v(t)>v(i)&&n.fail(ue,`${c.floatToString(v(t))} > ${c.floatToString(v(i))}`),Math.min(v(i),Math.max(v(e),v(t))))},th={"[I":"int","[J":"long","[D":"double","[C":"char","[Z":"boolean"};function ya(n){return`${th[n.descriptor]??"object array"}[${n.data.length}]`}var nh={I:"int",J:"long",D:"double",C:"char",Z:"boolean"};function bu(n){return n.startsWith("[")?`${bu(n.slice(1))}[]`:n.startsWith("L")?n.slice(1,-1):nh[n]??n}var Sa=n=>bu(n.descriptor);function yl(n){return n instanceof c.JString?"java.lang.String":n instanceof c.JBox?Pt[n.kind]:n instanceof c.JArray?n.descriptor:n.className}function ih(n,e,t,i,a,r){let l="java.lang.ArrayStoreException",s="java.lang.ArrayIndexOutOfBoundsException";if(e===null||i===null)return n.fail("java.lang.NullPointerException",null);if(!(e instanceof c.JArray))return n.fail(l,`arraycopy: source type ${yl(e)} is not an array`);if(!(i instanceof c.JArray))return n.fail(l,`arraycopy: destination type ${yl(i)} is not an array`);let o=_=>_.descriptor.length===2;if((o(e)||o(i))&&e.descriptor!==i.descriptor){let _=ae=>o(ae)?Sa(ae):"object array[]";return n.fail(l,`arraycopy: type mismatch: can not copy ${_(e)} into ${_(i)}`)}if(t<0)return n.fail(s,`arraycopy: source index ${t} out of bounds for ${ya(e)}`);if(a<0)return n.fail(s,`arraycopy: destination index ${a} out of bounds for ${ya(i)}`);if(r<0)return n.fail(s,`arraycopy: length ${r} is negative`);if(t+r>e.data.length)return n.fail(s,`arraycopy: last source index ${t+r} out of bounds for ${ya(e)}`);if(a+r>i.data.length)return n.fail(s,`arraycopy: last destination index ${a+r} out of bounds for ${ya(i)}`);let u=e.descriptor.slice(1),d=i.descriptor.slice(1),f="Ljava.lang.Object;";if(!o(e)&&u!==d&&d!==f&&u!==f)return n.fail(l,`arraycopy: type mismatch: can not copy ${Sa(e)} into ${Sa(i)}`);n.charge(r>>>2);let p=e.data,N=i.data,x=Array.prototype.slice.call(p,t,t+r),ie=u!==d&&d!==f?d.startsWith("L")?d.slice(1,-1):d:null;for(let _=0;_<x.length;_++){let ae=x[_];if(ie&&ae!==null&&typeof ae=="object"&&yl(ae)!==ie)return n.fail(l,`arraycopy: element type mismatch: can not cast one of the elements of ${Sa(e)} to the type of the destination array, ${ie}`);N[a+_]=ae}}var Nu={"System.currentTimeMillis()":()=>c.normLong(BigInt(Date.now())),"System.nanoTime()":()=>c.normLong(BigInt(Math.round(globalThis.performance.now()*1e6))),"System.exit(int)":(n,[e])=>n.exit(e),"System.lineSeparator()":()=>new c.JString(`\n`),"System.identityHashCode(Object)":(n,[e])=>{if(e===null)return 0;if(typeof e=="object"&&"hash"in e)return e.hash;let t=pu(n).identity,i=t.get(e);return i===void 0&&t.set(e,i=n.hash()),i},"System.arraycopy(Object,int,Object,int,int)":(n,[e,t,i,a,r])=>ih(n,e,t,i,a,r),"PrintStream.out.printf(String,Object[])":(n,[e,t])=>hu(n,"out",e,t),"PrintStream.err.printf(String,Object[])":(n,[e,t])=>hu(n,"err",e,t)};function hu(n,e,t,i){return h(Mt(n,t,i),a=>{n.print(e,a)})}var du=0x5deece66dn,fu=(1n<<48n)-1n,Zn=class extends b{className="java.util.Random";#e=0n;#t=null;constructor(e,t){super(e),this.setSeed(t)}setSeed(e){this.#e=(BigInt.asIntN(64,e)^du)&fu,this.#t=null}next(e){return this.#e=this.#e*du+0xbn&fu,Number(BigInt.asIntN(32,this.#e>>BigInt(48-e)))}nextInt(){return this.next(32)}nextBounded(e){let t=this.next(31),i=e-1;if((e&i)===0)return Number(BigInt(e)*BigInt(t)>>31n);for(let a=t;a-(t=a%e)+i>Sl;a=this.next(31));return t}nextLong(){return BigInt.asIntN(64,(BigInt(this.next(32))<<32n)+BigInt(this.next(32)))}nextDouble(){return Number((BigInt(this.next(26))<<27n)+BigInt(this.next(27)))*2**-53}nextGaussian(){if(this.#t!==null){let r=this.#t;return this.#t=null,r}let e,t,i;do e=2*this.nextDouble()-1,t=2*this.nextDouble()-1,i=e*e+t*t;while(i>=1||i===0);let a=Math.sqrt(-2*Math.log(i)/i);return this.#t=t*a,e*a}nextIntBetween(e,t){let i=this.nextInt(),a=t-e|0,r=a-1|0;if(a>0&&(a&r)===0)return(i&r)+e|0;if(a>0){for(let l=i>>>1;l+r-(i=l%a)>Sl;l=this.nextInt()>>>1);return i+e|0}for(;i<e||i>=t;)i=this.nextInt();return i}nextLongBetween(e,t){let i=this.nextLong(),a=BigInt.asIntN(64,t-e),r=a-1n;if(a>0n&&(a&r)===0n)return BigInt.asIntN(64,(i&r)+e);if(a>0n){for(let l=BigInt.asUintN(64,i)>>1n;BigInt.asIntN(64,l+r-(i=l%a))<0n;l=BigInt.asUintN(64,this.nextLong())>>1n);return BigInt.asIntN(64,i+e)}for(;i<e||i>=t;)i=this.nextLong();return i}"nextInt()"(){return this.nextInt()}"nextInt(int)"(e,t){return v(t)<=0?e.fail(ue,"bound must be positive"):this.nextBounded(v(t))}"nextInt(int,int)"(e,t,i){return v(t)>=v(i)?e.fail(ue,"bound must be greater than origin"):this.nextIntBetween(v(t),v(i))}"nextLong()"(){return c.normLong(this.nextLong())}"nextLong(long)"(e,t){return y(t)<=0n?e.fail(ue,"bound must be positive"):c.normLong(this.nextLongBetween(0n,y(t)))}"nextLong(long,long)"(e,t,i){return y(t)>=y(i)?e.fail(ue,"bound must be greater than origin"):c.normLong(this.nextLongBetween(y(t),y(i)))}"nextDouble()"(){return this.nextDouble()}"nextDouble(double)"(e,t){let i=v(t);if(!(i>0&&Number.isFinite(i)))return e.fail(ue,"bound must be finite and positive");let a=this.nextDouble()*i;return a<i?a:dn(i,!1)}"nextDouble(double,double)"(e,t,i){let a=v(t),r=v(i);if(!(a<r&&Number.isFinite(r-a)))return e.fail(ue,"bound must be greater than origin");let l=this.nextDouble()*(r-a)+a;return l<r?l:dn(r,!1)}"nextBoolean()"(){return g(this.next(1)!==0)}"nextFloat()"(){return this.next(24)/(1<<24)}"nextGaussian()"(){return this.nextGaussian()}"setSeed(long)"(e,t){this.setSeed(y(t))}},xl={"Random.<init>()":n=>new Zn(n.hash(),n.seed()),"Random.<init>(long)":(n,[e])=>new Zn(n.hash(),y(e))};ye["stream()"]=(n,e)=>Mo(n,e);Ki["chars()"]=(n,e)=>Bo(n,e);Ki["lines()"]=(n,e)=>Yi(n,()=>Fr(e.value).map(t=>new c.JString(t)));function ah(n){let e=Vs[n.startsWith("compareTo(")?"compareTo":n],t=Ki[n],i=n.slice(0,n.indexOf("(")),a=n.endsWith("()")?0:n.split(",").length;return(r,l)=>{let s=l[0];if(s instanceof b&&!(s instanceof je)){let u=s[n];if(typeof u=="function")switch(l.length){case 1:return u.call(s,r);case 2:return u.call(s,r,l[1]);case 3:return u.call(s,r,l[1],l[2]);case 4:return u.call(s,r,l[1],l[2],l[3]);default:return u.call(s,r,...l.slice(1))}}if(s instanceof c.JObject){let u=r.methodOf(s,i,a);if(u<0){let d=ye[n];if(d)return d(r,s,l.slice(1));throw new Error(`library: ${s.className} has no ${n}`)}return(function*(){return yield{invoke:u,args:l}})()}if(s instanceof c.JString){if(!t)throw new Error(`library: no ${n} on a String`);return t(r,s,l)}if(s instanceof c.JLambda)return rh(n,r,s,l);if(s instanceof c.JBox){if(!e)throw new Error(`library: no ${n} on a boxed value`);return e(r,s,l)}if(s instanceof je&&n===s.samKey)return h(s.call(r,l.slice(1)));let o=Reflect.get(s,n);if(typeof o!="function"){let u=ye[n];if(u)return u(r,s,l.slice(1));throw new Error(`library: ${s.className} has no ${n}`)}return o.call(s,r,...l.slice(1))}}function rh(n,e,t,i){if(n===t.samKey)return(function*(){return yield{invoke:t.method,args:[...t.captured,...i.slice(1)]}})();let a=ye[n];if(a)return a(e,t,i.slice(1));switch(n){case"equals(Object)":return t===i[1]?1:0;case"hashCode()":return t.hash;default:return e.limitation(`${n} on a lambda`)}}function*lh(n,e){return e instanceof c.JLambda?n.limitation("printing a lambda"):yield*e.javaString(n)}var sh=[[/^java\\.util\\.(ImmutableCollections\\$List(12|N)|Arrays\\$ArrayList|Collections\\$(EmptyList|SingletonList|CopiesList|UnmodifiableRandomAccessList|UnmodifiableList))$/,"java.util.List"],[/^java\\.util\\.(ImmutableCollections\\$Set(12|N)|ImmutableCollections\\$MapN\\$1|Collections\\$(EmptySet|SingletonSet|UnmodifiableSet|UnmodifiableMap\\$UnmodifiableEntrySet)|HashMap\\$(KeySet|EntrySet)|LinkedHashMap\\$Linked(KeySet|EntrySet)|AbstractMap\\$1)$/,"java.util.Set"],[/^java\\.util\\.(HashMap\\$Values|LinkedHashMap\\$LinkedValues|AbstractMap\\$2|Collections\\$UnmodifiableCollection)$/,"java.util.Collection"],[/^java\\.util\\.(ImmutableCollections\\$Map(1|N)|Collections\\$(EmptyMap|SingletonMap|UnmodifiableMap))$/,"java.util.Map"],[/^java\\.util\\.(HashMap\\$Node|KeyValueHolder|TreeMap\\$Entry|AbstractMap\\$SimpleImmutableEntry)$/,"java.util.Map$Entry"],[/^java\\.util\\.TreeMap\\$(AscendingSubMap|DescendingSubMap)$/,"java.util.NavigableMap"],[/^java\\.util\\.TreeMap\\$KeySet$/,"java.util.NavigableSet"],[/^java\\.util\\.TreeMap\\$(EntrySet|NavigableSubMap\\$EntrySetView)$/,"java.util.Set"],[/^java\\.util\\.TreeMap\\$Values$/,"java.util.Collection"],[/^java\\.util\\.(Regular|Jumbo)EnumSet$/,"java.util.EnumSet"],[/^java\\.io\\.PrintStream$/,"java.io.OutputStream"],[/(Iterator|Itr|\\$1|\\$2\\$1)$/,"java.util.Iterator"]];function oh(n,e){for(let[t,i]of sh)if(t.test(n))return[n,...e.get(i)];return[n,"java.lang.Object"]}var Cu=n=>{Ol(n),Object.setPrototypeOf(b.prototype,n.JLibObject.prototype);let e=Os(),t=new Map,i=(r,l)=>{l.add(r.qualifiedName);for(let s of r.supertypes)s.tag==="library"&&i(s.symbol,l)};for(let r of e.values()){let l=new Set;i(r,l),l.add("java.lang.Object"),t.set(r.qualifiedName,[...l])}let a={...ii,...Qt,...ar,...es,...os,...rs,...Kl,...ys,...xs,...J,...po,...vu,...Nu,...xl,..._o,...bo,...ko,...Zs,...Ho,...ou};for(let r of e.values())for(let l of[...r.methods,...r.constructors])if(!(!l.native||a[l.native])){if(l.isStatic||l.name==="<init>")throw new Error(`library: no native for ${l.native}`);a[l.native]=ah(l.native)}return rr.make=r=>xl["Random.<init>()"](r,[]),a["Iterable.iterator"]=a["iterator()"],a["Iterator.hasNext"]=a["hasNext()"],a["Iterator.next"]=a["next()"],{classes:e,natives:a,toString:(r,l)=>lh(r,l),typesOf:r=>t.get(r)??oh(r,t),newList:(r,l)=>{let s=new de(r.hash());return r.allocate(l.length),s.es.push(...l),s},listItems:r=>r instanceof de?r.es:null}};globalThis.javaOnlineCompilerLibrary=Cu;})();\n';export{e as JAVA_LIBRARY_SOURCE};