code-playpad 0.6.0 → 0.8.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.
Files changed (52) hide show
  1. package/JAVA-COMPATIBILITY.md +18 -18
  2. package/README.md +85 -14
  3. package/dist/cdn.js +2 -2
  4. package/dist/dist--J_vhCIU.js +14 -0
  5. package/dist/{dist-B5vq9x6M.js → dist-BIgiGgKu.js} +1 -1
  6. package/dist/dist-BNvM_BAY.js +6 -0
  7. package/dist/{dist-XlpaG2JF.js → dist-BkpKCrXQ.js} +1 -1
  8. package/dist/{dist-BKRQwpg6.js → dist-CJxiVI4a.js} +1 -1
  9. package/dist/dist-D25hs99E.js +10 -0
  10. package/dist/dist-D2igTc4m.js +6 -0
  11. package/dist/{dist-CqpVTRAq.js → dist-D7jBL3Ib.js} +9 -9
  12. package/dist/dist-DXjodKfp.js +6 -0
  13. package/dist/dist-DfFrsBkU.js +8 -0
  14. package/dist/dist-Vr-fb58P.js +12 -0
  15. package/dist/{element-9sv2r5Jv.js → element-BTbopmDc.js} +5 -5
  16. package/dist/element.js +1 -1
  17. package/dist/{hints-v5iHTd1l.js → hints-CCMgezw9.js} +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/java-CAuQOfuB.js +1 -0
  20. package/dist/java-library-bitset.generated-C3m-nf8F.js +6 -0
  21. package/dist/java-library-math.generated-BQwpn8sQ.js +6 -0
  22. package/dist/java-library-regex.generated-ItYSF2aV.js +6 -0
  23. package/dist/java-library-time.generated-Dl0XA7nZ.js +6 -0
  24. package/dist/java-library.generated-B7ib0gOX.js +6 -0
  25. package/dist/java-p3d2UdsW.js +6 -0
  26. package/dist/{javascript-CX-lsX2u.js → javascript-BUUMtBcS.js} +4 -2
  27. package/dist/{javascript-BIBG4Etb.js → javascript-BgIyjzbD.js} +4 -2
  28. package/dist/{pyodide-Crdd9em4.js → pyodide-BCtQRDyT.js} +2 -2
  29. package/dist/{pyodide-5mtewJ6F.js → pyodide-DKoE92s5.js} +1 -1
  30. package/dist/react.js +1 -1
  31. package/dist/runtime/java-library-bitset.generated.d.ts +9 -0
  32. package/dist/runtime/java-library-math.generated.d.ts +9 -0
  33. package/dist/runtime/java-library-regex.generated.d.ts +9 -0
  34. package/dist/runtime/java-library-time.generated.d.ts +9 -0
  35. package/dist/runtime/java-library.generated.d.ts +3 -3
  36. package/dist/runtime/java-worker.generated.d.ts +3 -3
  37. package/dist/standalone.js +5 -5
  38. package/dist/worker-runtime-C2AhIV7u.js +9 -0
  39. package/dist/worker-runtime-DJs9O_oY.js +4 -0
  40. package/package.json +2 -2
  41. package/dist/dist-BThnYaQ5.js +0 -12
  42. package/dist/dist-CnC1nMtN.js +0 -6
  43. package/dist/dist-D0FPZcUi.js +0 -8
  44. package/dist/dist-DOsLUKSb.js +0 -10
  45. package/dist/dist-D_qJovVA.js +0 -14
  46. package/dist/dist-DlIO0dzi.js +0 -6
  47. package/dist/dist-DmrP6yta.js +0 -6
  48. package/dist/java-C08pjr71.js +0 -6
  49. package/dist/java-library.generated-9nfQ3go0.js +0 -6
  50. package/dist/java-xCWvYPkx.js +0 -1
  51. package/dist/worker-runtime-CNPpMRo1.js +0 -9
  52. package/dist/worker-runtime-DXqFOKYs.js +0 -4
@@ -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={name:`java-online-compiler`,version:`0.39.0`,commit:`b00eddf254edc4545e4856c2bf729adfc6d7265c`,dirty:!1,sha256:`059abe477f6a313ca43107e462a96571ac981a21285a2b5554dfb68af49ba82f`,module:`java-library-bitset`},t='(()=>{var x=Object.create;var b=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var w=(r,t)=>()=>{try{return t||r((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var S=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of y(t))!B.call(r,i)&&i!==e&&b(r,i,{get:()=>t[i],enumerable:!(n=p(t,i))||n.enumerable});return r};var f=(r,t,e)=>(e=r!=null?x(R(r)):{},S(t||!r||!r.__esModule?b(e,"default",{value:r,enumerable:!0}):e,r));var m=w((U,N)=>{var h=globalThis.javaOnlineCompilerLibraryShared;if(!h||!h.common)throw new Error("the library chunk does not publish common, which java-library-bitset needs");N.exports=h.common});var c=w((A,g)=>{var d=globalThis.javaOnlineCompilerLibraryShared;if(!d||!d.streams)throw new Error("the library chunk does not publish streams, which java-library-bitset needs");g.exports=d.streams});var s=f(m(),1),C=f(c(),1),a="java.lang.IndexOutOfBoundsException",v=(1n<<64n)-1n,E=r=>{let t=0;for(let e=r;e;e&=e-1n)t++;return t},u=class r extends s.LibObject{className="java.util.BitSet";words;sticky;constructor(t,e,n){super(t),this.words=new Array(e).fill(0n),this.sticky=n}get wordsInUse(){let t=this.words.length;for(;t>0&&this.words[t-1]===0n;)t--;return t}#n(t,e){if(this.words.length>=e)return;let n=Math.max(2*this.words.length,e);for(t.allocate(n-this.words.length);this.words.length<n;)this.words.push(0n);this.sticky=!1}#i(t,e){e<0&&t.fail(a,`bitIndex < 0: ${e}`)}#a(t,e,n){e<0&&t.fail(a,`fromIndex < 0: ${e}`),n<0&&t.fail(a,`toIndex < 0: ${n}`),e>n&&t.fail(a,`fromIndex: ${e} > toIndex: ${n}`)}#t(t){let e=t>>6;return e<this.words.length&&(this.words[e]>>BigInt(t&63)&1n)===1n}#e(t,e,n){let i=e>>6;n?(this.#n(t,i+1),this.words[i]=this.words[i]|1n<<BigInt(e&63)):i<this.words.length&&(this.words[i]=this.words[i]&~(1n<<BigInt(e&63))&v)}#s(t,e,n,i){this.#a(t,e,n),t.charge(n-e>>>6);for(let o=e;o<n;o++)i(o)}bits(){let t=[];return this.words.forEach((e,n)=>{for(let i=0;e;i++,e>>=1n)e&1n&&t.push(n*64+i)}),t}*javaString(t){let e=this.bits();return t.charge(e.length),`{${e.join(", ")}}`}get contentEquality(){return!0}*contentEquals(t,e){if(e===this)return!0;if(!(e instanceof r))return!1;let n=this.wordsInUse;if(n!==e.wordsInUse)return!1;for(let i=0;i<n;i++)if(this.words[i]!==e.words[i])return!1;return!0}*contentHash(){let t=1234n;for(let e=this.wordsInUse;--e>=0;)t=(t^this.words[e]*BigInt(e+1))&v;return Number(BigInt.asIntN(32,t>>32n^t))}"get(int)"(t,e){return this.#i(t,e),(0,s.bool)(this.#t(e))}"get(int,int)"(t,e,n){this.#a(t,e,n);let i=new r(t.hash(),0,!1),o=this.#o();for(let l=e;l<Math.min(n,o);l++)this.#t(l)&&i.#e(t,l-e,!0);return i.words.length=i.wordsInUse,i}"set(int)"(t,e){this.#i(t,e),this.#e(t,e,!0)}"set(int,boolean)"(t,e,n){this.#i(t,e),this.#e(t,e,n===1)}"set(int,int)"(t,e,n){e<n&&this.#n(t,(n-1>>6)+1),this.#s(t,e,n,i=>this.#e(t,i,!0))}"set(int,int,boolean)"(t,e,n,i){return i===1?this["set(int,int)"](t,e,n):this["clear(int,int)"](t,e,n)}"clear(int)"(t,e){this.#i(t,e),this.#e(t,e,!1)}"clear(int,int)"(t,e,n){this.#s(t,e,n,i=>this.#e(t,i,!1))}"clear()"(){this.words.fill(0n)}"flip(int)"(t,e){this.#i(t,e),this.#e(t,e,!this.#t(e))}"flip(int,int)"(t,e,n){e<n&&this.#n(t,(n-1>>6)+1),this.#s(t,e,n,i=>this.#e(t,i,!this.#t(i)))}#o(){let t=this.wordsInUse;return t===0?0:64*(t-1)+this.words[t-1].toString(2).length}"length()"(){return this.#o()}"size()"(){return this.words.length*64}"isEmpty()"(){return(0,s.bool)(this.wordsInUse===0)}"cardinality()"(){return this.words.reduce((t,e)=>t+E(e),0)}"nextSetBit(int)"(t,e){if(e<0)return t.fail(a,`fromIndex < 0: ${e}`);let n=this.words.length*64;t.charge(n-e>>>6);for(let i=e;i<n;i++)if(this.#t(i))return i;return-1}"nextClearBit(int)"(t,e){if(e<0)return t.fail(a,`fromIndex < 0: ${e}`);let n=e;for(;this.#t(n);)n++;return n}"previousSetBit(int)"(t,e){if(e<-1)return t.fail(a,`fromIndex < -1: ${e}`);for(let n=e;n>=0;n--)if(this.#t(n))return n;return-1}"previousClearBit(int)"(t,e){if(e<-1)return t.fail(a,`fromIndex < -1: ${e}`);for(let n=e;n>=0;n--)if(!this.#t(n))return n;return-1}#r(t,e){return e===null?t.fail("java.lang.NullPointerException",null):e}"and(BitSet)"(t,e){let n=this.#r(t,e);for(let i=0;i<this.words.length;i++)this.words[i]=this.words[i]&(n.words[i]??0n)}"or(BitSet)"(t,e){let n=this.#r(t,e);this.#n(t,n.wordsInUse);for(let i=0;i<n.wordsInUse;i++)this.words[i]=this.words[i]|n.words[i]}"xor(BitSet)"(t,e){let n=this.#r(t,e);this.#n(t,n.wordsInUse);for(let i=0;i<n.wordsInUse;i++)this.words[i]=this.words[i]^n.words[i]}"andNot(BitSet)"(t,e){let n=this.#r(t,e);for(let i=0;i<Math.min(this.words.length,n.words.length);i++)this.words[i]=this.words[i]&~n.words[i]&v}"intersects(BitSet)"(t,e){let n=this.#r(t,e);for(let i=0;i<Math.min(this.words.length,n.words.length);i++)if(this.words[i]&n.words[i])return(0,s.bool)(!0);return(0,s.bool)(!1)}"clone()"(t){let e=new r(t.hash(),0,this.sticky);return e.words=(this.sticky?this.words:this.words.slice(0,this.wordsInUse)).slice(),e}"toLongArray()"(t){let e=this.words.slice(0,this.wordsInUse).map(n=>s.K.normLong(n));return t.allocate(e.length),new s.K.JArray(4,e,t.hash(),"[J")}"stream()"(t){return(0,C.lazyIntStream)(t,()=>this.bits())}},I={"BitSet.<init>()":r=>new u(r.hash(),1,!1),"BitSet.<init>(int)":(r,[t])=>t<0?r.fail("java.lang.NegativeArraySizeException",`nbits < 0: ${t}`):new u(r.hash(),(t-1>>6)+1,!0),"BitSet.valueOf(long[])":(r,[t])=>{if(t===null)return r.fail("java.lang.NullPointerException",null);let e=Array.from(t.data,o=>BigInt.asUintN(64,BigInt(o))),n=e.length;for(;n>0&&e[n-1]===0n;)n--;let i=new u(r.hash(),0,!1);return i.words=e.slice(0,n),i}};(globalThis.javaOnlineCompilerLibraryParts??={})["java-library-bitset"]=I;})();\n';export{e as JAVA_LIBRARY,t as JAVA_LIBRARY_SOURCE};
@@ -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={name:`java-online-compiler`,version:`0.39.0`,commit:`b00eddf254edc4545e4856c2bf729adfc6d7265c`,dirty:!1,sha256:`de645a0e067cb410e3bc4ffbeb940bb6c0f6df45495d499c7eb5c272726daf5a`,module:`java-library-math`},t='(()=>{var Ee=Object.create;var ie=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Ae=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Je=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}};var Oe=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of we(e))!Le.call(t,r)&&r!==n&&ie(t,r,{get:()=>e[r],enumerable:!(i=Se(e,r))||i.enumerable});return t};var xe=(t,e,n)=>(n=t!=null?Ee(Ae(t)):{},Oe(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ae=Je((je,re)=>{var $=globalThis.javaOnlineCompilerLibraryShared;if(!$||!$.common)throw new Error("the library chunk does not publish common, which java-library-math needs");re.exports=$.common});var h=xe(ae(),1),I="java.lang.NumberFormatException",N="java.lang.ArithmeticException",D="java.lang.NullPointerException",Re="java.lang.IllegalArgumentException",m=t=>10n**BigInt(t),f=t=>t<0n?-t:t,Q=t=>t>0n?1:t<0n?-1:0,A=t=>t===0n?1:f(t).toString().length,j=[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],J=class t extends h.LibObject{className="java.math.BigInteger";v;constructor(e,n){super(e),this.v=n}*javaString(){return this.v.toString()}get contentEquality(){return!0}*contentEquals(e,n){return n instanceof t&&n.v===this.v}*contentHash(){return pe(this.v)}naturalOrder(e,n){let i=b(e,n);return this.v<i.v?-1:this.v>i.v?1:0}"add(BigInteger)"(e,n){return s(e,this.v+b(e,n).v)}"subtract(BigInteger)"(e,n){return s(e,this.v-b(e,n).v)}"multiply(BigInteger)"(e,n){return e.charge(E(this.v)*E(b(e,n).v)),s(e,this.v*n.v)}"divide(BigInteger)"(e,n){return s(e,this.v/G(e,n))}"remainder(BigInteger)"(e,n){return s(e,this.v%G(e,n))}"divideAndRemainder(BigInteger)"(e,n){let i=G(e,n);return new h.K.JArray(3,[s(e,this.v/i),s(e,this.v%i)],e.hash(),"[Ljava.math.BigInteger;")}"mod(BigInteger)"(e,n){let i=k(e,n),r=this.v%i;return s(e,r<0n?r+i:r)}"pow(int)"(e,n){return n<0?e.fail(N,"Negative exponent"):(e.charge(E(this.v)*n),s(e,this.v**BigInt(n)))}"modPow(BigInteger,BigInteger)"(e,n,i){let r=b(e,n).v,a=k(e,i);if(a===1n)return s(e,0n);let u=(this.v%a+a)%a;return r<0n&&(u=ue(e,u,a)),e.charge(f(r).toString(2).length*E(a)*E(a)),s(e,Me(u,f(r),a))}"modInverse(BigInteger)"(e,n){let i=k(e,n);return i===1n?s(e,0n):s(e,ue(e,(this.v%i+i)%i,i))}"gcd(BigInteger)"(e,n){let i=f(this.v),r=f(b(e,n).v);for(;r;)[i,r]=[r,i%r];return s(e,i)}"abs()"(e){return this.v<0n?s(e,-this.v):this}"negate()"(e){return s(e,-this.v)}"signum()"(){return Q(this.v)}"compareTo(BigInteger)"(e,n){return this.naturalOrder(e,n)}"max(BigInteger)"(e,n){return this.v>=b(e,n).v?this:n}"min(BigInteger)"(e,n){return this.v<=b(e,n).v?this:n}"sqrt()"(e){return this.v<0n?e.fail(N,"Negative BigInteger"):s(e,De(this.v))}"intValue()"(){return Number(BigInt.asIntN(32,this.v))}"longValue()"(){return h.K.normLong(BigInt.asIntN(64,this.v))}"doubleValue()"(){return Number(this.v)}"floatValue()"(){return h.K.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(N,"BigInteger out of int range"):Number(this.v)}"longValueExact()"(e){return BigInt.asIntN(64,this.v)!==this.v?e.fail(N,"BigInteger out of long range"):h.K.normLong(this.v)}"toString(int)"(e,n){let i=n;return new h.K.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,n=0;for(let i of e.toString(2))i==="1"&&n++;return n}"testBit(int)"(e,n){return n<0?e.fail(N,"Negative bit address"):(0,h.bool)((this.v>>BigInt(n)&1n)===1n)}"setBit(int)"(e,n){return n<0?e.fail(N,"Negative bit address"):s(e,this.v|1n<<BigInt(n))}"clearBit(int)"(e,n){return n<0?e.fail(N,"Negative bit address"):s(e,this.v&~(1n<<BigInt(n)))}"flipBit(int)"(e,n){return n<0?e.fail(N,"Negative bit address"):s(e,this.v^1n<<BigInt(n))}"getLowestSetBit()"(){if(this.v===0n)return-1;let e=0;for(;(this.v>>BigInt(e)&1n)===0n;)e++;return e}"shiftLeft(int)"(e,n){let i=n;return s(e,i>=0?this.v<<BigInt(i):this.v>>BigInt(-i))}"shiftRight(int)"(e,n){let i=n;return s(e,i>=0?this.v>>BigInt(i):this.v<<BigInt(-i))}"and(BigInteger)"(e,n){return s(e,this.v&b(e,n).v)}"or(BigInteger)"(e,n){return s(e,this.v|b(e,n).v)}"xor(BigInteger)"(e,n){return s(e,this.v^b(e,n).v)}"not()"(e){return s(e,~this.v)}"andNot(BigInteger)"(e,n){return s(e,this.v&~b(e,n).v)}"isProbablePrime(int)"(e,n){return n<=0?1:(e.charge(E(this.v)**2*40),(0,h.bool)(se(f(this.v))))}"nextProbablePrime()"(e){if(this.v<0n)return e.fail(N,`start < 0: ${this.v}`);let n=this.v<2n?2n:this.v+1n;for(n>2n&&n%2n===0n&&n++;!se(n);)e.charge(E(n)**2*40),n+=n===2n?1n:2n;return s(e,n)}};function pe(t){let e=f(t),n=[];for(;e>0n;)n.unshift(Number(e&0xffffffffn)|0),e>>=32n;let i=0;for(let r of n)i=Math.imul(31,i)+r|0;return Math.imul(i,Q(t))}var E=t=>Math.max(1,Math.ceil(f(t).toString(16).length/8));function b(t,e){return e===null?t.fail(D,\'Cannot read field "signum" because "val" is null\'):e}function G(t,e){let n=b(t,e).v;return n===0n?t.fail(N,"BigInteger divide by zero"):n}function k(t,e){let n=b(t,e).v;return n<=0n?t.fail(N,"BigInteger: modulus not positive"):n}function ue(t,e,n){let[i,r]=[e,n],[a,u]=[1n,0n];for(;r;){let l=i/r;[i,r]=[r,i-l*r],[a,u]=[u,a-l*u]}return i!==1n?t.fail(N,"BigInteger not invertible."):(a%n+n)%n}function Me(t,e,n){let i=1n,r=t%n;for(;e>0n;)e&1n&&(i=i*r%n),r=r*r%n,e>>=1n;return i}function De(t){if(t<2n)return t;let e=BigInt(Math.floor(Math.sqrt(Number(t))));for(;;){let n=e+t/e>>1n;if(n>=e)break;e=n}for(;e*e>t;)e--;for(;(e+1n)*(e+1n)<=t;)e++;return e}function se(t){if(t<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 r of e){if(t===r)return!0;if(t%r===0n)return!1}let n=t-1n,i=0;for(;(n&1n)===0n;)n>>=1n,i++;e:for(let r of e){let a=Me(r,n,t);if(!(a===1n||a===t-1n)){for(let u=1;u<i;u++)if(a=a*a%t,a===t-1n)continue e;return!1}}return!0}var oe=new WeakMap;function s(t,e){if(e>=-16n&&e<=16n){let n=oe.get(t);n||oe.set(t,n=new Map);let i=n.get(e);return i||n.set(e,i=new J(t.hash(),e)),i}return new J(t.hash(),e)}function le(t,e,n){if(e===null)return t.fail(D,\'Cannot invoke "String.length()" because "val" is null\');let i=e.value;if(n<2||n>36)return t.fail(I,"Radix out of range");if(!i.length)return t.fail(I,"Zero length BigInteger");let r=0,a=!1,u=i.lastIndexOf("-"),l=i.lastIndexOf("+");if(u>=0){if(u!==0||l>=0)return t.fail(I,"Illegal embedded sign character");a=!0,r=1}else if(l>=0){if(l!==0)return t.fail(I,"Illegal embedded sign character");r=1}if(r===i.length)return t.fail(I,"Zero length BigInteger");if(/[^\\P{Nd}0-9]/u.test(i))return t.limitation("parsing digits outside ASCII");let v=d=>{let C=parseInt(d,36);return Number.isNaN(C)||C>=n?-1:C};for(;r<i.length&&v(i[r])===0;)r++;if(r===i.length)return 0n;let g=i.length-r,c=g%j[n];c===0&&(c=j[n]);let B=0n,V=BigInt(n);for(t.charge(g>>>3);r<i.length;){let d=i.slice(r,r+c);if(r+=c,c=j[n],!d.length||[...d].some(C=>v(C)<0))return t.fail(I,`For input string: "${d}"${n===10?"":` under radix ${n}`}`);for(let C of d)B=B*V+BigInt(v(C))}return a?-B:B}var X=["UP","DOWN","CEILING","FLOOR","HALF_UP","HALF_DOWN","HALF_EVEN","UNNECESSARY"],Y=class extends h.LibObject{className="java.math.RoundingMode";name;ordinal;constructor(e,n){super(e),this.ordinal=n,this.name=X[n]}*javaString(){return this.name}naturalOrder(e,n){return n===null?e.fail(D,null):this.ordinal-n.ordinal}"name()"(){return new h.K.JString(this.name)}"ordinal()"(){return this.ordinal}"compareTo(RoundingMode)"(e,n){return this.naturalOrder(e,n)}},ge=new WeakMap;function Z(t){let e=ge.get(t);return e||ge.set(t,e=X.map((n,i)=>new Y(t.hash(),i))),e}var R=(t,e)=>Z(t)[X.indexOf(e)];function q(t,e){return e===null?t.fail(D,\'Cannot invoke "java.math.RoundingMode.ordinal()" because "roundingMode" is null\'):e.name}function P(t,e,n,i){let r=e/n,a=e-r*n;if(a===0n)return r;let u=e<0n!=n<0n?-1n:1n,l=2n*f(a),v=l===f(n)?0:l>f(n)?1:-1;switch(i){case"UP":return r+u;case"DOWN":return r;case"CEILING":return u>0n?r+1n:r;case"FLOOR":return u<0n?r-1n:r;case"HALF_UP":return v>=0?r+u:r;case"HALF_DOWN":return v>0?r+u:r;case"HALF_EVEN":return v>0||v===0&&(r&1n)!==0n?r+u:r;case"UNNECESSARY":return t.fail(N,"Rounding necessary")}}var w=class t extends h.LibObject{className="java.math.MathContext";precision;mode;constructor(e,n,i){super(e),this.precision=n,this.mode=i}*javaString(){return`precision=${this.precision} roundingMode=${this.mode.name}`}get contentEquality(){return!0}*contentEquals(e,n){return n instanceof t&&n.precision===this.precision&&n.mode===this.mode}*contentHash(){return this.mode.hash<<24|this.precision}"getPrecision()"(){return this.precision}"getRoundingMode()"(){return this.mode}},ve=new WeakMap;function y(t,e){let n=ve.get(t);return n||(n={UNLIMITED:new w(t.hash(),0,R(t,"HALF_UP")),DECIMAL32:new w(t.hash(),7,R(t,"HALF_EVEN")),DECIMAL64:new w(t.hash(),16,R(t,"HALF_EVEN")),DECIMAL128:new w(t.hash(),34,R(t,"HALF_EVEN"))},ve.set(t,n)),n[e]}function he(t,e,n){return e<0?t.fail(Re,"Digits < 0"):n===null?t.fail(D,"null RoundingMode"):new w(t.hash(),e,n)}function W(t,e){return e===null?t.fail(D,\'Cannot read field "precision" because "mc" is null\'):e}var ee=-2147483648,te=2147483647,z=class t extends h.LibObject{className="java.math.BigDecimal";u;scale;constructor(e,n,i){super(e),this.u=n,this.scale=i}*javaString(){return F(this.u,this.scale)}get contentEquality(){return!0}*contentEquals(e,n){return n instanceof t&&n.u===this.u&&n.scale===this.scale}*contentHash(){return Math.imul(31,pe(this.u))+this.scale|0}naturalOrder(e,n){let i=p(e,n),[r,a]=O(this,i);return r<a?-1:r>a?1:0}"add(BigDecimal)"(e,n){let i=p(e,n),[r,a,u]=O(this,i);return o(e,r+a,u)}"subtract(BigDecimal)"(e,n){let i=p(e,n),[r,a,u]=O(this,i);return o(e,r-a,u)}"multiply(BigDecimal)"(e,n){let i=p(e,n);return o(e,this.u*i.u,M(e,this.scale+i.scale))}"divide(BigDecimal)"(e,n){return fe(e,this,p(e,n))}"divide(BigDecimal,int,RoundingMode)"(e,n,i,r){return de(e,this,p(e,n),i,q(e,r))}"divide(BigDecimal,RoundingMode)"(e,n,i){return de(e,this,p(e,n),this.scale,q(e,i))}"divide(BigDecimal,MathContext)"(e,n,i){let r=W(e,i),a=p(e,n);return r.precision===0?fe(e,this,a):_e(e,this,a,r.precision,r.mode.name)}"divideToIntegralValue(BigDecimal)"(e,n){return be(e,this,p(e,n))}"remainder(BigDecimal)"(e,n){let i=p(e,n),r=be(e,this,i),a=new t(0,r.u*i.u,r.scale+i.scale),[u,l,v]=O(this,a);return o(e,u-l,v)}"setScale(int,RoundingMode)"(e,n,i){return Ce(e,this,n,q(e,i))}"setScale(int)"(e,n){return Ce(e,this,n,"UNNECESSARY")}"round(MathContext)"(e,n){let i=W(e,n);return Te(e,this,i.precision,i.mode.name)}"sqrt(MathContext)"(e,n){return He(e,this,W(e,n))}"pow(int)"(e,n){let i=n;return i<0||i>999999999?e.fail(N,"Invalid operation"):(e.charge(E(this.u)*i),o(e,this.u**BigInt(i),M(e,this.scale*i)))}"negate()"(e){return o(e,-this.u,this.scale)}"abs()"(e){return this.u<0n?o(e,-this.u,this.scale):this}"plus()"(){return this}"signum()"(){return Q(this.u)}"scale()"(){return this.scale}"precision()"(){return A(this.u)}"unscaledValue()"(e){return s(e,this.u)}"compareTo(BigDecimal)"(e,n){return this.naturalOrder(e,n)}"max(BigDecimal)"(e,n){return this.naturalOrder(e,n)>=0?this:n}"min(BigDecimal)"(e,n){return this.naturalOrder(e,n)<=0?this:n}"movePointLeft(int)"(e,n){return Be(e,this,M(e,this.scale+n))}"movePointRight(int)"(e,n){return Be(e,this,M(e,this.scale-n))}"scaleByPowerOfTen(int)"(e,n){return o(e,this.u,M(e,this.scale-n))}"stripTrailingZeros()"(e){if(this.u===0n)return o(e,0n,0);let n=this.u,i=this.scale;for(;n%10n===0n;)n/=10n,i--;return o(e,n,i)}"toPlainString()"(){return new h.K.JString(Ne(this.u,this.scale))}"toBigInteger()"(e){return s(e,S(this))}"toBigIntegerExact()"(e){return S(this)*(this.scale>0?m(this.scale):1n)!==(this.scale>0?this.u:this.u*m(-this.scale))?e.fail(N,"Rounding necessary"):s(e,S(this))}"intValue()"(){return Number(BigInt.asIntN(32,S(this)))}"longValue()"(){return h.K.normLong(BigInt.asIntN(64,S(this)))}"intValueExact()"(e){let n=me(e,this);return BigInt.asIntN(32,n)!==n?e.fail(N,"Overflow"):Number(n)}"longValueExact()"(e){let n=me(e,this);return BigInt.asIntN(64,n)!==n?e.fail(N,"Overflow"):h.K.normLong(n)}"doubleValue()"(){return Number(F(this.u,this.scale))}"floatValue()"(){return h.K.parseDecimalFloat(Ne(this.u,this.scale))}"byteValue()"(){return Number(BigInt.asIntN(8,S(this)))}"shortValue()"(){return Number(BigInt.asIntN(16,S(this)))}};function p(t,e){return e===null?t.fail(D,\'Cannot read field "scale" because "augend" is null\'):e}function M(t,e){return e<ee||e>te?t.fail(N,e>0?"Underflow":"Overflow"):e}function O(t,e){return t.scale===e.scale?[t.u,e.u,t.scale]:t.scale>e.scale?[t.u,e.u*m(t.scale-e.scale),t.scale]:[t.u*m(e.scale-t.scale),e.u,e.scale]}var ce=new WeakMap;function o(t,e,n){return new z(t.hash(),e,n)}function L(t,e){if(e<0n||e>10n)return o(t,e,0);let n=ce.get(t);n||ce.set(t,n=new Map);let i=n.get(e);return i||n.set(e,i=o(t,e,0)),i}function F(t,e){let n=t<0n?"-":"",i=f(t).toString();if(e===0)return n+i;let r=-e+(i.length-1);if(e>0&&r>=-6)return i.length>e?`${n}${i.slice(0,i.length-e)}.${i.slice(i.length-e)}`:`${n}0.${"0".repeat(e-i.length)}${i}`;let a=i.length>1?`${i[0]}.${i.slice(1)}`:i;return`${n}${a}E${r>=0?"+":""}${r}`}function Ne(t,e){return e<=0?t===0n?"0":t.toString()+"0".repeat(-e):F(t,e).includes("E")?ye(t,e):F(t,e)}function ye(t,e){let n=t<0n?"-":"",i=f(t).toString().padStart(e+1,"0");return`${n}${i.slice(0,i.length-e)}.${i.slice(i.length-e)}`}function S(t){return t.scale<=0?t.u*m(-t.scale):t.u/m(t.scale)}function me(t,e){return e.scale>0&&e.u%m(e.scale)!==0n?t.fail(N,"Rounding necessary"):S(e)}function _(t,e,n){n.u===0n&&t.fail(N,e.u===0n?"Division undefined":"Division by zero")}function x(t,e,n){for(;e>n&&t!==0n&&t%10n===0n;)t/=10n,e--;return[t,e]}var ne=t=>Math.max(ee,Math.min(te,t));function fe(t,e,n){_(t,e,n);let i=ne(e.scale-n.scale);if(e.u===0n)return o(t,0n,i);let r=e.u,a=n.u;a<0n&&(r=-r,a=-a);let u=Fe(f(r),a);r/=u,a/=u;let l=0,v=0,g=a;for(;g%2n===0n;)g/=2n,l++;for(;g%5n===0n;)g/=5n,v++;if(g!==1n)return t.fail(N,"Non-terminating decimal expansion; no exact representable decimal result.");let c=Math.max(l,v);u=r*m(c)/a;let[B,V]=x(u,i+c,i);return o(t,B,M(t,V))}function Fe(t,e){for(;e;)[t,e]=[e,t%e];return t}function de(t,e,n,i,r){_(t,e,n);let a=i-e.scale+n.scale,u=a>=0?e.u*m(a):e.u,l=a>=0?n.u:n.u*m(-a);return o(t,P(t,u,l,r),i)}function Pe(t,e){let n=t.toString().length-e.toString().length;return(n>=0?t<e*m(n):t*m(-n)<e)&&n--,n}function _e(t,e,n,i,r){_(t,e,n);let a=ne(e.scale-n.scale);if(e.u===0n)return o(t,0n,a);let u=f(e.u),l=f(n.u),v=Pe(u,l)-a,g=i-1-v,c=g-a,B=c>=0?e.u*m(c):e.u,V=c>=0?n.u:n.u*m(-c),d=P(t,B,V,r),C=B%V===0n;return A(d)>i&&(d/=10n,g--),C&&([d,g]=x(d,g,a)),o(t,d,M(t,g))}function be(t,e,n){_(t,e,n);let i=ne(e.scale-n.scale),[r,a]=O(e,n);if(f(r)<f(a))return o(t,0n,i);let u=r/a;if(i>=0)return o(t,u*m(i),i);let[l,v]=x(u,0,i);return o(t,l,v)}function Ce(t,e,n,i){return n>=e.scale?o(t,e.u*m(n-e.scale),n):o(t,P(t,e.u,m(e.scale-n),i),n)}function Te(t,e,n,i){let r=A(e.u);if(n===0||r<=n)return e;let a=r-n,u=P(t,e.u,m(a),i),l=e.scale-a;return A(u)>n&&(u/=10n,l--),o(t,u,M(t,l))}function Be(t,e,n){return n<0?o(t,e.u*m(-n),0):o(t,e.u,n)}function He(t,e,n){if(e.u<0n)return t.fail(N,"Attempted square root of negative BigDecimal");let i=Math.trunc(e.scale/2);if(e.u===0n)return o(t,0n,i);let r=n.precision===0?"UNNECESSARY":n.mode.name,a=n.precision===0?Math.ceil(A(e.u)/2)+1:n.precision,u=Math.floor((A(e.u)-1-e.scale)/2),l=a-1-u,v=d=>{let C=2*d-e.scale,T=C>=0?e.u*m(C):e.u,H=C>=0?1n:m(-C),U=De(T/H);return{u:U,exact:U*U*H===T,num:T,den:H}},{u:g,exact:c,num:B,den:V}=v(l);if(c)[g,l]=x(g,l,i);else{if(r==="UNNECESSARY")return t.fail(N,"Computed square root not exact.");let d=(2n*g+1n)**2n*V<4n*B;(r==="UP"||r==="CEILING"||(r==="HALF_UP"||r==="HALF_DOWN"||r==="HALF_EVEN")&&d)&&g++,A(g)>a&&(g/=10n,l--)}return o(t,g,M(t,l))}function K(t,e){if(e===null)return t.fail(D,\'Cannot invoke "String.toCharArray()" because "val" is null\');let n=e.value;if(!n.length)return t.fail(I,null);let i=0;(n[0]==="+"||n[0]==="-")&&i++;let r="",a=0,u=!1,l=0;for(;i<n.length;i++){let c=n[i];if(c>="0"&&c<="9")r+=c,u&&a++;else if(c==="."){if(u)return t.fail(I,"Character array contains more than one decimal point.");u=!0}else if(c==="e"||c==="E"){let B=n.slice(i+1);if(!/^[+-]?\\d+$/.test(B))return t.fail(I,null);l=Number(B);break}else return/\\p{Nd}/u.test(c)?t.limitation("parsing digits outside ASCII"):t.fail(I,`Character ${c} is neither a decimal digit number, decimal point, nor "e" notation exponential mark.`)}if(!r.length)return t.fail(I,"No digits found.");let v=a-l;if(v<ee||v>te)return t.fail(I,"Scale out of range.");let g=BigInt(r);return o(t,n[0]==="-"?-g:g,v)}function Ue(t,e){if(!Number.isFinite(e))return t.fail(I,"Infinite or NaN");if(e===0)return o(t,0n,0);let n=new DataView(new ArrayBuffer(8));n.setFloat64(0,e);let i=n.getBigUint64(0),r=Number(i>>52n&0x7ffn),a=i&(1n<<52n)-1n,u;r===0?u=-1074:(a|=1n<<52n,u=r-1075);let l=e<0?-1n:1n;if(u>=0)return o(t,l*(a<<BigInt(u)),0);let[v,g]=x(a*5n**BigInt(-u),-u,0);return o(t,l*v,g)}var Ie=t=>t.value;h.BIG_MATH.integer=s;h.BIG_MATH.decimal=K;var Ve={"BigInteger.ZERO":t=>s(t,0n),"BigInteger.ONE":t=>s(t,1n),"BigInteger.TWO":t=>s(t,2n),"BigInteger.TEN":t=>s(t,10n),"BigInteger.<init>(String)":(t,[e])=>new J(t.hash(),le(t,e,10)),"BigInteger.<init>(String,int)":(t,[e,n])=>new J(t.hash(),le(t,e,n)),"BigInteger.valueOf(long)":(t,[e])=>s(t,BigInt(e)),"BigDecimal.ZERO":t=>L(t,0n),"BigDecimal.ONE":t=>L(t,1n),"BigDecimal.TWO":t=>L(t,2n),"BigDecimal.TEN":t=>L(t,10n),"BigDecimal.<init>(String)":(t,[e])=>K(t,e),"BigDecimal.<init>(double)":(t,[e])=>Ue(t,e),"BigDecimal.<init>(int)":(t,[e])=>o(t,BigInt(e),0),"BigDecimal.<init>(long)":(t,[e])=>o(t,BigInt(e),0),"BigDecimal.<init>(BigInteger)":(t,[e])=>o(t,b(t,e).v,0),"BigDecimal.<init>(BigInteger,int)":(t,[e,n])=>o(t,b(t,e).v,n),"BigDecimal.valueOf(long)":(t,[e])=>L(t,BigInt(e)),"BigDecimal.valueOf(long,int)":(t,[e,n])=>n===0?L(t,BigInt(e)):o(t,BigInt(e),n),"BigDecimal.valueOf(double)":(t,[e])=>Number.isFinite(e)?K(t,new h.K.JString(h.K.doubleToString(e))):t.fail(I,"Infinite or NaN"),"RoundingMode.UP":t=>R(t,"UP"),"RoundingMode.DOWN":t=>R(t,"DOWN"),"RoundingMode.CEILING":t=>R(t,"CEILING"),"RoundingMode.FLOOR":t=>R(t,"FLOOR"),"RoundingMode.HALF_UP":t=>R(t,"HALF_UP"),"RoundingMode.HALF_DOWN":t=>R(t,"HALF_DOWN"),"RoundingMode.HALF_EVEN":t=>R(t,"HALF_EVEN"),"RoundingMode.UNNECESSARY":t=>R(t,"UNNECESSARY"),"RoundingMode.values()":t=>new h.K.JArray(3,Z(t).slice(),t.hash(),"[Ljava.math.RoundingMode;"),"RoundingMode.valueOf(String)":(t,[e])=>e===null?t.fail(D,"Name is null"):Z(t).find(i=>i.name===Ie(e))??t.fail(Re,`No enum constant java.math.RoundingMode.${Ie(e)}`),"MathContext.UNLIMITED":t=>y(t,"UNLIMITED"),"MathContext.DECIMAL32":t=>y(t,"DECIMAL32"),"MathContext.DECIMAL64":t=>y(t,"DECIMAL64"),"MathContext.DECIMAL128":t=>y(t,"DECIMAL128"),"MathContext.<init>(int)":(t,[e])=>he(t,e,R(t,"HALF_UP")),"MathContext.<init>(int,RoundingMode)":(t,[e,n])=>he(t,e,n)};(globalThis.javaOnlineCompilerLibraryParts??={})["java-library-math"]=Ve;})();\n';export{e as JAVA_LIBRARY,t as JAVA_LIBRARY_SOURCE};
@@ -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={name:`java-online-compiler`,version:`0.39.0`,commit:`b00eddf254edc4545e4856c2bf729adfc6d7265c`,dirty:!1,sha256:`0ee5814d5c14fa664c3d5e684054e83de5a6fd14824e04b3bd0f147fe0cf8223`,module:`java-library-regex`},t='(()=>{var F=Object.create;var C=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var o=(n,t)=>()=>{try{return t||n((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}};var _=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $(t))!M.call(n,i)&&i!==e&&C(n,i,{get:()=>t[i],enumerable:!(r=L(t,i))||r.enumerable});return n};var h=(n,t,e)=>(e=n!=null?F(q(n)):{},_(t||!n||!n.__esModule?C(e,"default",{value:n,enumerable:!0}):e,n));var y=o((D,R)=>{var v=globalThis.javaOnlineCompilerLibraryShared;if(!v||!v.common)throw new Error("the library chunk does not publish common, which java-library-regex needs");R.exports=v.common});var j=o((H,w)=>{var c=globalThis.javaOnlineCompilerLibraryShared;if(!c||!c.lang)throw new Error("the library chunk does not publish lang, which java-library-regex needs");w.exports=c.lang});var J=o((Q,V)=>{var d=globalThis.javaOnlineCompilerLibraryShared;if(!d||!d.regex)throw new Error("the library chunk does not publish regex, which java-library-regex needs");V.exports=d.regex});var P=o((U,E)=>{var x=globalThis.javaOnlineCompilerLibraryShared;if(!x||!x.streams)throw new Error("the library chunk does not publish streams, which java-library-regex needs");E.exports=x.streams});var k=o((X,T)=>{var f=globalThis.javaOnlineCompilerLibraryShared;if(!f||!f.strings)throw new Error("the library chunk does not publish strings, which java-library-regex needs");T.exports=f.strings});var a=h(y(),1),Y=h(j(),1),u=h(J(),1),O=h(P(),1),I=h(k(),1),l="java.lang.NullPointerException",G="java.lang.IllegalStateException",A="java.lang.IndexOutOfBoundsException",z="java.lang.IllegalArgumentException",N=class extends a.LibObject{className="java.util.regex.Pattern";text;javaFlags;compiled;constructor(t,e,r,i){super(t),this.text=e,this.javaFlags=r,this.compiled=i}*javaString(){return this.text}"matcher(String)"(t,e){return e===null?t.fail(l,\'Cannot invoke "java.lang.CharSequence.length()" because "text" is null\'):new S(t.hash(),this,e.value)}"pattern()"(){return new a.K.JString(this.text)}"toString()"(){return new a.K.JString(this.text)}"flags()"(){return this.javaFlags}"split(String)"(t,e){return this["split(String,int)"](t,e,0)}"split(String,int)"(t,e,r){return e===null?t.fail(l,\'Cannot invoke "java.lang.CharSequence.length()" because "input" is null\'):(0,I.splitWith)(t,this.compiled,e.value,r)}};function K(n){let t=[],e=[],r=[];for(let i=0;i<n.length;i++){let s=n.indices?.[i];t.push(n[i]??null),e.push(s?s[0]:-1),r.push(s?s[1]:-1)}return{texts:t,starts:e,ends:r}}var g=class extends a.LibObject{#t(t,e){let r=this.current(t);return(e<0||e>=r.texts.length)&&t.fail(A,`No group ${e}`),r}#e(t,e){if(this.current(t),e===null)return t.fail(l,"Group name");let r=e.value,i=this.pattern.compiled.names.get(r);return i===void 0?t.fail(z,`No group with name <${r}>`):i}"group()"(t){return this["group(int)"](t,0)}"group(int)"(t,e){let r=this.#t(t,e).texts[e]??null;return r===null?null:new a.K.JString(r)}"group(String)"(t,e){return this["group(int)"](t,this.#e(t,e))}"start()"(t){return this.current(t).starts[0]}"start(int)"(t,e){return this.#t(t,e).starts[e]}"start(String)"(t,e){return this["start(int)"](t,this.#e(t,e))}"end()"(t){return this.current(t).ends[0]}"end(int)"(t,e){return this.#t(t,e).ends[e]}"end(String)"(t,e){return this["end(int)"](t,this.#e(t,e))}"groupCount()"(){return this.pattern.compiled.groups}},p=class extends g{className="java.util.regex.Matcher$ImmutableMatchResult";pattern;#t;constructor(t,e,r){super(t),this.pattern=e,this.#t=r}current(){return this.#t}},S=class extends g{className="java.util.regex.Matcher";pattern;text;first=-1;last=0;#t=null;#e=0;constructor(t,e,r){super(t),this.pattern=e,this.text=r}*javaString(){let t=this.first>=0?this.text.slice(this.first,this.last):"";return`java.util.regex.Matcher[pattern=${this.pattern.text} region=0,${this.text.length} lastmatch=${t}]`}current(t){return this.first<0||!this.#t?t.fail(G,"No match found"):this.#t}#n(t){let e=this.pattern.compiled;return t==="whole"?new RegExp(`^(?:${e.source})(?![\\\\s\\\\S])`,"d"+e.flags):new RegExp(e.source,t+"d"+e.flags)}#i(t){return t?(this.#t=K(t),this.first=t.index,this.last=t.index+t[0].length,!0):(this.first=-1,this.#t=null,!1)}#s(t,e){(0,u.checkInput)(t,this.pattern.compiled,this.text);let r=this.#n("g");return r.lastIndex=e,this.#i(r.exec(this.text))}"find()"(t){let e=this.last;return e===this.first&&e++,e>this.text.length?(this.#t=null,this.first=-1,(0,a.bool)(!1)):(0,a.bool)(this.#s(t,e))}"find(int)"(t,e){let r=e;return r<0||r>this.text.length?t.fail(A,"Illegal start index"):(this.#r(),(0,a.bool)(this.#s(t,r)))}"matches()"(t){return(0,u.checkInput)(t,this.pattern.compiled,this.text),(0,a.bool)(this.#i(this.#n("whole").exec(this.text)))}"lookingAt()"(t){(0,u.checkInput)(t,this.pattern.compiled,this.text);let e=this.#n("y");return e.lastIndex=0,(0,a.bool)(this.#i(e.exec(this.text)))}#r(){this.first=-1,this.last=0,this.#t=null,this.#e=0}"reset()"(){return this.#r(),this}"reset(String)"(t,e){return e===null?t.fail(l,\'Cannot invoke "java.lang.CharSequence.length()" because "text" is null\'):(this.text=e.value,this.#r(),this)}"pattern()"(){return this.pattern}"toMatchResult()"(t){return new p(t.hash(),this.pattern,this.#t??{texts:[],starts:[],ends:[]})}#a(t,e){let r=this.current(t),i=Object.assign([...r.texts.map(s=>s??void 0)],{index:this.first,input:this.text});return(0,u.expandReplacement)(t,this.pattern.compiled,e,i)}"replaceAll(String)"(t,e){return e===null?t.fail(l,"replacement"):new a.K.JString(this.#l(t,e.value,!1))}"replaceFirst(String)"(t,e){return e===null?t.fail(l,"replacement"):new a.K.JString(this.#l(t,e.value,!0))}#l(t,e,r){this.#r();let i="",s=0;for(;this["find()"](t)===1&&(i+=this.text.slice(s,this.first)+this.#a(t,e),s=this.last,!r););return i+this.text.slice(s)}"replaceAll(Function)"(t,e){if(e===null)return t.fail(l,null);let r=this;return(0,a.settle)((function*(){r.#r();let i="",s=0;for(;r["find()"](t)===1;){let b=yield*(0,a.callFunctional)(t,e,"apply",[r]);i+=r.text.slice(s,r.first)+r.#a(t,b===null?"null":b.value),s=r.last}return new a.K.JString(i+r.text.slice(s))})())}#u(t,e,r){if(e===null)return t.fail(l,null);if(this.first<0)return t.fail(G,"No match available");if(r===null)return t.fail(l,"replacement");let i=this.#a(t,r.value);return e["append(String)"](t,new a.K.JString(this.text.slice(this.#e,this.first)+i)),this.#e=this.last,this}"appendReplacement(StringBuilder,String)"(t,e,r){return this.#u(t,e,r)}"appendReplacement(StringBuffer,String)"(t,e,r){return this.#u(t,e,r)}#o(t,e){return e===null?t.fail(l,null):e["append(String)"](t,new a.K.JString(this.text.slice(this.#e)))}"appendTail(StringBuilder)"(t,e){return this.#o(t,e)}"appendTail(StringBuffer)"(t,e){return this.#o(t,e)}"results()"(t){return(0,O.lazyStream)(t,()=>{let e=[];for(;this["find()"](t)===1;)e.push(new p(t.hash(),this.pattern,this.#t));return e})}};function m(n,t,e){if(t===null)return n.fail(l,\'Cannot invoke "String.length()" because "this.pattern" is null\');let r=t.value;return new N(n.hash(),r,e,(0,u.compilePattern)(n,r,e))}var B={"Pattern.compile(String)":(n,[t])=>m(n,t,0),"Pattern.compile(String,int)":(n,[t,e])=>m(n,t,e),"Pattern.matches(String,String)":(n,[t,e])=>m(n,t,0)["matcher(String)"](n,e)["matches()"](n),"Pattern.quote(String)":(n,[t])=>t===null?n.fail(l,\'Cannot invoke "String.indexOf(String)" because "s" is null\'):new a.K.JString((0,u.quotePattern)(t.value))};(globalThis.javaOnlineCompilerLibraryParts??={})["java-library-regex"]=B;})();\n';export{e as JAVA_LIBRARY,t as JAVA_LIBRARY_SOURCE};
@@ -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={name:`java-online-compiler`,version:`0.39.0`,commit:`b00eddf254edc4545e4856c2bf729adfc6d7265c`,dirty:!1,sha256:`db81378da281b92ac2c229427d4ab04f398a10901c00ada8812c843be6dd6928`,module:`java-library-time`},t='(()=>{var Pt=Object.create;var ot=Object.defineProperty;var Yt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var Ft=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty;var rt=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var zt=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jt(e))!xt.call(n,i)&&i!==t&&ot(n,i,{get:()=>e[i],enumerable:!(a=Yt(e,i))||a.enumerable});return n};var st=(n,e,t)=>(t=n!=null?Pt(Ft(n)):{},zt(e||!n||!n.__esModule?ot(t,"default",{value:n,enumerable:!0}):t,n));var lt=rt((cn,ut)=>{var $e=globalThis.javaOnlineCompilerLibraryShared;if(!$e||!$e.common)throw new Error("the library chunk does not publish common, which java-library-time needs");ut.exports=$e.common});var ht=rt((dn,mt)=>{var Ue=globalThis.javaOnlineCompilerLibraryShared;if(!Ue||!Ue.streams)throw new Error("the library chunk does not publish streams, which java-library-time needs");mt.exports=Ue.streams});var l=st(lt(),1),gt=st(ht(),1),V="java.time.DateTimeException",Oe="java.time.format.DateTimeParseException",W="java.time.temporal.UnsupportedTemporalTypeException",m="java.lang.NullPointerException",j="java.lang.IllegalArgumentException",Ve="java.lang.ArithmeticException",oe=["JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"],We=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],Ge=["NANOS","MICROS","MILLIS","SECONDS","MINUTES","HOURS","HALF_DAYS","DAYS","WEEKS","MONTHS","YEARS","DECADES","CENTURIES","MILLENNIA","ERAS","FOREVER"],Me=["Nanos","Micros","Millis","Seconds","Minutes","Hours","HalfDays","Days","Weeks","Months","Years","Decades","Centuries","Millennia","Eras","Forever"],Le=-999999999,we=999999999,Bt=719528,Ee=n=>n[0]+n.slice(1).toLowerCase(),z=n=>(n&3)===0&&(n%100!==0||n%400===0),J=(n,e)=>n===2?e?29:28:n===4||n===6||n===9||n===11?30:31,pt=(n,e)=>Math.floor(n/e),re=(n,e)=>(n%e+e)%e;function ve(n,e,t){let a=365*n;return n>=0?a+=Math.trunc((n+3)/4)-Math.trunc((n+99)/100)+Math.trunc((n+399)/400):a-=Math.trunc(n/-4)-Math.trunc(n/-100)+Math.trunc(n/-400),a+=Math.trunc((367*e-362)/12),a+=t-1,e>2&&(a--,z(n)||a--),a-Bt}function bt(n){let e=n+719468,t=pt(e,146097),a=e-t*146097,i=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),s=a-(365*i+Math.floor(i/4)-Math.floor(i/100)),r=Math.floor((5*s+2)/153),u=s-Math.floor((153*r+2)/5)+1,o=r<10?r+3:r-9;return[i+t*400+(o<=2?1:0),o,u]}var xe=class extends l.LibObject{className;name;ordinal;#n;constructor(e,t,a,i,s=a){super(e),this.className=t,this.name=a,this.ordinal=i,this.#n=s}*javaString(){return this.#n}naturalOrder(e,t){return t===null?e.fail(m,null):this.ordinal-t.ordinal}"name()"(){return new l.K.JString(this.name)}"ordinal()"(){return this.ordinal}"toString()"(){return new l.K.JString(this.#n)}"getValue()"(){return this.ordinal+1}"compareTo(DayOfWeek)"(e,t){return this.naturalOrder(e,t)}"compareTo(Month)"(e,t){return this.naturalOrder(e,t)}"compareTo(ChronoUnit)"(e,t){return this.naturalOrder(e,t)}"plus(long)"(e,t){let a=this.className==="java.time.DayOfWeek"?ge(e):pe(e);return a[re(this.ordinal+Number(BigInt(t)%BigInt(a.length)),a.length)]}"minus(long)"(e,t){let a=this.className==="java.time.DayOfWeek"?ge(e):pe(e);return a[re(this.ordinal-Number(BigInt(t)%BigInt(a.length)),a.length)]}"length(boolean)"(e,t){return J(this.ordinal+1,t===1)}"maxLength()"(){return J(this.ordinal+1,!0)}"minLength()"(){return J(this.ordinal+1,!1)}"between(Temporal,Temporal)"(e,t,a){return t===null?e.fail(m,\'Cannot invoke "java.time.temporal.Temporal.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)" because "temporal1Inclusive" is null\'):t["until(Temporal,TemporalUnit)"](e,a,this)}};function qe(n,e,t){let a=new WeakMap;return i=>{let s=a.get(i);return s||a.set(i,s=n.map((r,u)=>new xe(i.hash(),e,r,u,t?.[u]))),s}}var ge=qe(We,"java.time.DayOfWeek"),pe=qe(oe,"java.time.Month"),Dt=qe(Ge,"java.time.temporal.ChronoUnit",Me),O=class n extends l.LibObject{className="java.time.LocalDate";year;month;day;constructor(e,t,a,i){super(e),this.year=t,this.month=a,this.day=i}get epochDay(){return ve(this.year,this.month,this.day)}*javaString(){return K(this)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.year===this.year&&t.month===this.month&&t.day===this.day}*contentHash(){return this.year&4294965248^((this.year<<11)+(this.month<<6)+this.day|0)}naturalOrder(e,t){if(t===null)return e.fail(m,null);let a=t;return this.year!==a.year?this.year-a.year:this.month!==a.month?this.month-a.month:this.day-a.day}get prolepticMonth(){return this.year*12+this.month-1}until(e,t,a){let i=()=>Math.trunc((t.prolepticMonth*32+t.day-(this.prolepticMonth*32+this.day))/32);switch(a.name){case"DAYS":return t.epochDay-this.epochDay;case"WEEKS":return Math.trunc((t.epochDay-this.epochDay)/7);case"MONTHS":return i();case"YEARS":return Math.trunc(i()/12);case"DECADES":return Math.trunc(i()/120);case"CENTURIES":return Math.trunc(i()/1200);case"MILLENNIA":return Math.trunc(i()/12e3);case"ERAS":return e.limitation("ChronoUnit.ERAS");default:return e.fail(W,`Unsupported unit: ${Me[a.ordinal]}`)}}"getYear()"(){return this.year}"getMonthValue()"(){return this.month}"getMonth()"(e){return pe(e)[this.month-1]}"getDayOfMonth()"(){return this.day}"getDayOfYear()"(){return this.epochDay-ve(this.year,1,1)+1}"getDayOfWeek()"(e){return ge(e)[re(this.epochDay+3,7)]}"isLeapYear()"(){return(0,l.bool)(z(this.year))}"lengthOfMonth()"(){return J(this.month,z(this.year))}"lengthOfYear()"(){return z(this.year)?366:365}"toEpochDay()"(){return this.epochDay}"plusDays(long)"(e,t){return t===0?this:ie(e,this.epochDay+Number(t))}"minusDays(long)"(e,t){return this["plusDays(long)"](e,-Number(t))}"plusWeeks(long)"(e,t){return this["plusDays(long)"](e,Number(t)*7)}"minusWeeks(long)"(e,t){return this["plusDays(long)"](e,-Number(t)*7)}"plusMonths(long)"(e,t){if(t===0)return this;let a=this.prolepticMonth+Number(t);return Ce(e,pt(a,12),re(a,12)+1,this.day)}"minusMonths(long)"(e,t){return this["plusMonths(long)"](e,-Number(t))}"plusYears(long)"(e,t){return t===0?this:Ce(e,this.year+Number(t),this.month,this.day)}"minusYears(long)"(e,t){return this["plusYears(long)"](e,-Number(t))}"plus(long,TemporalUnit)"(e,t,a){if(a===null)return e.fail(m,"unit");let i=Number(t);switch(a.name){case"DAYS":return this["plusDays(long)"](e,i);case"WEEKS":return this["plusWeeks(long)"](e,i);case"MONTHS":return this["plusMonths(long)"](e,i);case"YEARS":return this["plusYears(long)"](e,i);case"DECADES":return this["plusYears(long)"](e,i*10);case"CENTURIES":return this["plusYears(long)"](e,i*100);case"MILLENNIA":return this["plusYears(long)"](e,i*1e3);default:return e.fail(W,`Unsupported unit: ${Me[a.ordinal]}`)}}"minus(long,TemporalUnit)"(e,t,a){return this["plus(long,TemporalUnit)"](e,-Number(t),a)}"plus(TemporalAmount)"(e,t){if(t===null)return e.fail(m,"amountToAdd");if(t instanceof le)return F(e,this,t,1);let a=t,i=a.years*12+a.months;return(i===0?this:this["plusMonths(long)"](e,i))["plusDays(long)"](e,a.days)}"minus(TemporalAmount)"(e,t){if(t===null)return e.fail(m,"amountToSubtract");if(t instanceof le)return F(e,this,t,-1);let a=t,i=a.years*12+a.months;return(i===0?this:this["plusMonths(long)"](e,-i))["plusDays(long)"](e,-a.days)}"withDayOfMonth(int)"(e,t){return t===this.day?this:Y(e,this.year,this.month,t)}"withMonth(int)"(e,t){return U(e,"MonthOfYear",t,1,12),Ce(e,this.year,t,this.day)}"withYear(int)"(e,t){return ke(e,t),Ce(e,t,this.month,this.day)}"withDayOfYear(int)"(e,t){return Tt(e,this.year,t)}"isBefore(LocalDate)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)<0)}"isAfter(LocalDate)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)>0)}"isEqual(LocalDate)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)===0)}"compareTo(LocalDate)"(e,t){return this.naturalOrder(e,t)}"until(Temporal,TemporalUnit)"(e,t,a){let i=Je(e,t);return a===null?e.fail(m,Te):this.until(e,i,a)}"atTime(int,int)"(e,t,a){return R(e,this,M(e,t,a))}"atTime(int,int,int)"(e,t,a,i){return R(e,this,M(e,t,a,i))}"atTime(int,int,int,int)"(e,t,a,i,s){return R(e,this,M(e,t,a,i,s))}"atTime(LocalTime)"(e,t){return t===null?e.fail(m,"time"):R(e,this,t)}"atStartOfDay()"(e){return R(e,this,new C(e.hash(),0,0,0,0))}"atStartOfDay(ZoneId)"(e,t){return t===null?e.fail(m,"zone"):X(e,R(e,this,new C(e.hash(),0,0,0,0)),t)}"until(LocalDate)"(e,t){return t===null?e.fail(m,"endDateExclusive"):yt(e,this,t)}"format(DateTimeFormatter)"(e,t){return t===null?e.fail(m,"formatter"):new l.K.JString(t.format(e,this))}"datesUntil(LocalDate)"(e,t){if(t===null)return e.fail(m,"endExclusive");let a=t.epochDay;if(a<this.epochDay)return e.fail(j,`${K(t)} < ${K(this)}`);let i=this.epochDay;return(0,gt.lazyStream)(e,()=>{e.allocate(a-i);let s=[];for(let r=i;r<a;r++)s.push(ie(e,r));return s})}};function K(n){let e=Math.abs(n.year);return`${e<1e3?(n.year<0?"-":"")+String(e).padStart(4,"0"):n.year>9999?`+${n.year}`:String(n.year)}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function U(n,e,t,a,i,s=`${a} - ${i}`){(t<a||t>i)&&n.fail(V,`Invalid value for ${e} (valid values ${s}): ${t}`)}var ke=(n,e)=>U(n,"Year",e,Le,we);function Y(n,e,t,a){return ke(n,e),U(n,"MonthOfYear",t,1,12),U(n,"DayOfMonth",a,1,31,"1 - 28/31"),a>28&&a>J(t,z(e))&&(a===29&&n.fail(V,`Invalid date \'February 29\' as \'${e}\' is not a leap year`),n.fail(V,`Invalid date \'${oe[t-1]} ${a}\'`)),new O(n.hash(),e,t,a)}function Ce(n,e,t,a){return ke(n,e),new O(n.hash(),e,t,Math.min(a,J(t,z(e))))}function ie(n,e){if(!Number.isSafeInteger(e)||e<-365243219162||e>365241780471)return n.fail(V,`Invalid value for EpochDay (valid values -365243219162 - 365241780471): ${e}`);let[t,a,i]=bt(e);return new O(n.hash(),t,a,i)}function Tt(n,e,t){return ke(n,e),U(n,"DayOfYear",t,1,366,"1 - 365/366"),t===366&&!z(e)&&n.fail(V,`Invalid date \'DayOfYear 366\' as \'${e}\' is not a leap year`),ie(n,ve(e,1,1)+t-1)}var Q=class n extends l.LibObject{className="java.time.Period";years;months;days;constructor(e,t,a,i){super(e),this.years=t,this.months=a,this.days=i}*javaString(){return this.years===0&&this.months===0&&this.days===0?"P0D":`P${this.years?`${this.years}Y`:""}${this.months?`${this.months}M`:""}${this.days?`${this.days}D`:""}`}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.years===this.years&&t.months===this.months&&t.days===this.days}*contentHash(){let e=(t,a)=>t<<a|t>>>32-a|0;return this.years+e(this.months,8)+e(this.days,16)|0}"getYears()"(){return this.years}"getMonths()"(){return this.months}"getDays()"(){return this.days}"toTotalMonths()"(){return this.years*12+this.months}"isZero()"(){return(0,l.bool)(this.years===0&&this.months===0&&this.days===0)}"isNegative()"(){return(0,l.bool)(this.years<0||this.months<0||this.days<0)}"normalized()"(e){let t=this.years*12+this.months;return Z(e,Math.trunc(t/12),t%12,this.days)}"negated()"(e){return this["multipliedBy(int)"](e,-1)}"multipliedBy(int)"(e,t){let a=t;return Z(e,ae(e,this.years*a),ae(e,this.months*a),ae(e,this.days*a))}"plusDays(long)"(e,t){return Z(e,this.years,this.months,ae(e,this.days+Number(t)))}"plusMonths(long)"(e,t){return Z(e,this.years,ae(e,this.months+Number(t)),this.days)}"plusYears(long)"(e,t){return Z(e,ae(e,this.years+Number(t)),this.months,this.days)}};function ae(n,e){return e>2147483647||e<-2147483648?n.fail(Ve,"integer overflow"):e}var Z=(n,e,t,a)=>new Q(n.hash(),e,t,a);function yt(n,e,t){let a=t.prolepticMonth-e.prolepticMonth,i=t.day-e.day;if(a>0&&i<0){a--;let s=e["plusMonths(long)"](n,a);i=t.epochDay-s.epochDay}else a<0&&i>0&&(a++,i-=J(t.month,z(t.year)));return Z(n,Math.trunc(a/12),a%12,i)}var c=1000000000n,w=86400n*c,Wt=(1n<<63n)-1n,Gt=-(1n<<63n);function H(n){switch(n.name){case"NANOS":return 1n;case"MICROS":return 1000n;case"MILLIS":return 1000000n;case"SECONDS":return c;case"MINUTES":return 60n*c;case"HOURS":return 3600n*c;case"HALF_DAYS":return 43200n*c;case"DAYS":return w;default:return null}}var se=n=>n.ordinal<7,f=n=>BigInt(n),Ie=(n,e)=>n.fail(W,`Unsupported unit: ${Me[e.ordinal]}`);function _(n,e){return e>Wt||e<Gt?n.fail(Ve,"long overflow"):e}var te=(n,e)=>n/e-(n%e!==0n&&n<0n!=e<0n?1n:0n),ne=(n,e)=>n-te(n,e)*e;function De(n,e,t){let a=t instanceof O||t instanceof C||t instanceof I||t instanceof L||t instanceof E?Zt(n,t):t.className;return n.fail(V,`Unable to obtain ${e} from TemporalAccessor: ${a} of type ${t.className}`)}function Je(n,e){return e===null?n.fail(m,"temporal"):e instanceof O?e:e instanceof I?e.date:e instanceof L?e.local.date:De(n,"LocalDate",e)}function Ke(n,e){return e===null?n.fail(m,"temporal"):e instanceof C?e:e instanceof I?e.time:e instanceof L?e.local.time:De(n,"LocalTime",e)}function Xe(n,e){return e===null?n.fail(m,"temporal"):e instanceof I?e:e instanceof L?e.local:De(n,"LocalDateTime",e)}var Ze=\'Cannot invoke "java.time.temporal.TemporalUnit.addTo(java.time.temporal.Temporal, long)" because "unit" is null\',Te=\'Cannot invoke "java.time.temporal.TemporalUnit.between(java.time.temporal.Temporal, java.time.temporal.Temporal)" because "unit" is null\',Ct=\'Cannot invoke "java.time.temporal.TemporalUnit.getDuration()" because "unit" is null\';function F(n,e,t,a){let i=e,s=(u,o)=>{i=i["plus(long,TemporalUnit)"](n,l.K.normLong(BigInt(a)*u),Dt(n)[Ge.indexOf(o)])};if(t instanceof Q){let u=BigInt(t.years)*12n+BigInt(t.months);return t.months===0?t.years!==0&&s(BigInt(t.years),"YEARS"):u!==0n&&s(u,"MONTHS"),t.days!==0&&s(BigInt(t.days),"DAYS"),i}let r=t;return r.seconds!==0n&&s(r.seconds,"SECONDS"),r.nanos!==0&&s(BigInt(r.nanos),"NANOS"),i}function ue(n){let e=i=>String(i).padStart(2,"0"),t=`${e(n.hour)}:${e(n.minute)}`;if(n.second===0&&n.nano===0||(t+=`:${e(n.second)}`,n.nano===0))return t;let a=String(n.nano).padStart(9,"0");return t+"."+(n.nano%1e6===0?a.slice(0,3):n.nano%1e3===0?a.slice(0,6):a)}var Qe=n=>`${K(n.date)}T${ue(n.time)}`,C=class n extends l.LibObject{className="java.time.LocalTime";hour;minute;second;nano;constructor(e,t,a,i,s){super(e),this.hour=t,this.minute=a,this.second=i,this.nano=s}get nanoOfDay(){return BigInt(this.hour*3600+this.minute*60+this.second)*c+BigInt(this.nano)}*javaString(){return ue(this)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.nanoOfDay===this.nanoOfDay}*contentHash(){return(0,l.longHash)(l.K.normLong(this.nanoOfDay))}naturalOrder(e,t){if(t===null)return e.fail(m,\'Cannot read field "hour" because "other" is null\');let a=this.nanoOfDay,i=t.nanoOfDay;return a<i?-1:a>i?1:0}plusNanosOfDay(e,t){return t===0n?this:be(e,ne(this.nanoOfDay+t,w))}"getHour()"(){return this.hour}"getMinute()"(){return this.minute}"getSecond()"(){return this.second}"getNano()"(){return this.nano}"toSecondOfDay()"(){return this.hour*3600+this.minute*60+this.second}"toNanoOfDay()"(){return l.K.normLong(this.nanoOfDay)}"plusHours(long)"(e,t){return this.plusNanosOfDay(e,f(t)%24n*3600n*c)}"plusMinutes(long)"(e,t){return this.plusNanosOfDay(e,f(t)%1440n*60n*c)}"plusSeconds(long)"(e,t){return this.plusNanosOfDay(e,f(t)%86400n*c)}"plusNanos(long)"(e,t){return this.plusNanosOfDay(e,f(t)%w)}"minusHours(long)"(e,t){return this.plusNanosOfDay(e,-(f(t)%24n)*3600n*c)}"minusMinutes(long)"(e,t){return this.plusNanosOfDay(e,-(f(t)%1440n)*60n*c)}"minusSeconds(long)"(e,t){return this.plusNanosOfDay(e,-(f(t)%86400n)*c)}"minusNanos(long)"(e,t){return this.plusNanosOfDay(e,-(f(t)%w))}"plus(long,TemporalUnit)"(e,t,a){if(a===null)return e.fail(m,Ze);let i=a;if(!se(i))return Ie(e,i);let s=H(i);return this.plusNanosOfDay(e,f(t)%(w/s)*s)}"minus(long,TemporalUnit)"(e,t,a){return this["plus(long,TemporalUnit)"](e,l.K.normLong(-f(t)),a)}"plus(TemporalAmount)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.temporal.TemporalAmount.addTo(java.time.temporal.Temporal)" because "amountToAdd" is null\'):F(e,this,t,1)}"minus(TemporalAmount)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.temporal.TemporalAmount.subtractFrom(java.time.temporal.Temporal)" because "amountToSubtract" is null\'):F(e,this,t,-1)}"withHour(int)"(e,t){return M(e,t,this.minute,this.second,this.nano)}"withMinute(int)"(e,t){return M(e,this.hour,t,this.second,this.nano)}"withSecond(int)"(e,t){return M(e,this.hour,this.minute,t,this.nano)}"withNano(int)"(e,t){return M(e,this.hour,this.minute,this.second,t)}truncated(e,t){if(t===null)return e.fail(m,Ct);let a=t;if(a.name==="NANOS")return this;let i=H(a);return i===null?e.fail(W,"Unit is too large to be used for truncation"):be(e,this.nanoOfDay/i*i)}"truncatedTo(TemporalUnit)"(e,t){return this.truncated(e,t)}"isBefore(LocalTime)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)<0)}"isAfter(LocalTime)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)>0)}"compareTo(LocalTime)"(e,t){return this.naturalOrder(e,t)}"until(Temporal,TemporalUnit)"(e,t,a){let i=Ke(e,t);if(a===null)return e.fail(m,Te);let s=a;return se(s)?l.K.normLong((i.nanoOfDay-this.nanoOfDay)/H(s)):Ie(e,s)}"atDate(LocalDate)"(e,t){return t===null?e.fail(m,"date"):new I(e.hash(),t,this)}"format(DateTimeFormatter)"(e,t){return t===null?e.fail(m,"formatter"):new l.K.JString(t.format(e,this))}};function qt(n,e,t,a,i){U(n,"HourOfDay",e,0,23),U(n,"MinuteOfHour",t,0,59),U(n,"SecondOfMinute",a,0,59),U(n,"NanoOfSecond",i,0,999999999)}function M(n,e,t,a=0,i=0){return qt(n,e,t,a,i),new C(n.hash(),e,t,a,i)}function be(n,e){if(e<0n||e>=w)return n.fail(V,`Invalid value for NanoOfDay (valid values 0 - 86399999999999): ${e}`);let t=Number(e/c);return new C(n.hash(),Math.floor(t/3600),Math.floor(t/60)%60,t%60,Number(e%c))}var I=class n extends l.LibObject{className="java.time.LocalDateTime";date;time;constructor(e,t,a){super(e),this.date=t,this.time=a}*javaString(){return Qe(this)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&this.date.naturalOrder(e,t.date)===0&&t.time.nanoOfDay===this.time.nanoOfDay}*contentHash(){return(yield*this.date.contentHash())^(yield*this.time.contentHash())}naturalOrder(e,t){if(t===null)return e.fail(m,\'Cannot invoke "java.time.chrono.ChronoLocalDateTime.toLocalDate()" because "other" is null\');let a=t;return this.date.naturalOrder(e,a.date)||this.time.naturalOrder(e,a.time)}get epochNanos(){return BigInt(this.date.epochDay)*w+this.time.nanoOfDay}#n(e,t,a){return t===this.date&&a===this.time?this:new n(e.hash(),t,a)}plusNanosExact(e,t){if(t===0n)return this;let a=this.time.nanoOfDay+t,i=te(a,w),s=i===0n?this.date:ie(e,this.date.epochDay+Number(i));return this.#n(e,s,be(e,ne(a,w)))}#e(e,t){return this.#n(e,t,this.time)}#t(e,t){return this.#n(e,this.date,t)}"toLocalDate()"(){return this.date}"toLocalTime()"(){return this.time}"getYear()"(){return this.date.year}"getMonthValue()"(){return this.date.month}"getMonth()"(e){return this.date["getMonth()"](e)}"getDayOfMonth()"(){return this.date.day}"getDayOfYear()"(){return this.date["getDayOfYear()"]()}"getDayOfWeek()"(e){return this.date["getDayOfWeek()"](e)}"getHour()"(){return this.time.hour}"getMinute()"(){return this.time.minute}"getSecond()"(){return this.time.second}"getNano()"(){return this.time.nano}"plusYears(long)"(e,t){return this.#e(e,this.date["plusYears(long)"](e,t))}"plusMonths(long)"(e,t){return this.#e(e,this.date["plusMonths(long)"](e,t))}"plusWeeks(long)"(e,t){return this.#e(e,this.date["plusWeeks(long)"](e,t))}"plusDays(long)"(e,t){return this.#e(e,this.date["plusDays(long)"](e,t))}"plusHours(long)"(e,t){return this.plusNanosExact(e,f(t)*3600n*c)}"plusMinutes(long)"(e,t){return this.plusNanosExact(e,f(t)*60n*c)}"plusSeconds(long)"(e,t){return this.plusNanosExact(e,f(t)*c)}"plusNanos(long)"(e,t){return this.plusNanosExact(e,f(t))}"minusYears(long)"(e,t){return this.#e(e,this.date["minusYears(long)"](e,t))}"minusMonths(long)"(e,t){return this.#e(e,this.date["minusMonths(long)"](e,t))}"minusWeeks(long)"(e,t){return this.#e(e,this.date["minusWeeks(long)"](e,t))}"minusDays(long)"(e,t){return this.#e(e,this.date["minusDays(long)"](e,t))}"minusHours(long)"(e,t){return this.plusNanosExact(e,-f(t)*3600n*c)}"minusMinutes(long)"(e,t){return this.plusNanosExact(e,-f(t)*60n*c)}"minusSeconds(long)"(e,t){return this.plusNanosExact(e,-f(t)*c)}"minusNanos(long)"(e,t){return this.plusNanosExact(e,-f(t))}"plus(long,TemporalUnit)"(e,t,a){if(a===null)return e.fail(m,Ze);let i=a;return se(i)?this.plusNanosExact(e,f(t)*H(i)):this.#e(e,this.date["plus(long,TemporalUnit)"](e,t,a))}"minus(long,TemporalUnit)"(e,t,a){return this["plus(long,TemporalUnit)"](e,l.K.normLong(-f(t)),a)}"plus(TemporalAmount)"(e,t){return t instanceof Q?this.#e(e,this.date["plus(TemporalAmount)"](e,t)):t===null?e.fail(m,"amountToAdd"):F(e,this,t,1)}"minus(TemporalAmount)"(e,t){return t instanceof Q?this.#e(e,this.date["minus(TemporalAmount)"](e,t)):t===null?e.fail(m,"amountToSubtract"):F(e,this,t,-1)}"withYear(int)"(e,t){return this.#e(e,this.date["withYear(int)"](e,t))}"withMonth(int)"(e,t){return this.#e(e,this.date["withMonth(int)"](e,t))}"withDayOfMonth(int)"(e,t){return this.#e(e,this.date["withDayOfMonth(int)"](e,t))}"withDayOfYear(int)"(e,t){return this.#e(e,this.date["withDayOfYear(int)"](e,t))}"withHour(int)"(e,t){return this.#t(e,this.time["withHour(int)"](e,t))}"withMinute(int)"(e,t){return this.#t(e,this.time["withMinute(int)"](e,t))}"withSecond(int)"(e,t){return this.#t(e,this.time["withSecond(int)"](e,t))}"withNano(int)"(e,t){return this.#t(e,this.time["withNano(int)"](e,t))}"truncatedTo(TemporalUnit)"(e,t){return this.#t(e,this.time.truncated(e,t))}"isBefore(LocalDateTime)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)<0)}"isAfter(LocalDateTime)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)>0)}"isEqual(LocalDateTime)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.chrono.ChronoLocalDateTime.toLocalTime()" because "other" is null\'):(0,l.bool)(this.naturalOrder(e,t)===0)}"compareTo(LocalDateTime)"(e,t){return this.naturalOrder(e,t)}"until(Temporal,TemporalUnit)"(e,t,a){let i=Xe(e,t);if(a===null)return e.fail(m,Te);let s=a;if(se(s))return l.K.normLong(_(e,(i.epochNanos-this.epochNanos)/H(s)));let r=i.date;return r.epochDay>this.date.epochDay&&i.time.nanoOfDay<this.time.nanoOfDay?r=ie(e,r.epochDay-1):r.epochDay<this.date.epochDay&&i.time.nanoOfDay>this.time.nanoOfDay&&(r=ie(e,r.epochDay+1)),this.date.until(e,r,s)}"atZone(ZoneId)"(e,t){return t===null?e.fail(m,"zone"):X(e,this,t)}"toEpochSecond(ZoneOffset)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.ZoneOffset.getTotalSeconds()" because "offset" is null\'):l.K.normLong(me(this)-BigInt(t.totalSeconds))}"toInstant(ZoneOffset)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.ZoneOffset.getTotalSeconds()" because "offset" is null\'):new E(e.hash(),me(this)-BigInt(t.totalSeconds),this.time.nano)}"format(DateTimeFormatter)"(e,t){return t===null?e.fail(m,"formatter"):new l.K.JString(t.format(e,this))}},R=(n,e,t)=>new I(n.hash(),e,t),le=class n extends l.LibObject{className="java.time.Duration";seconds;nanos;constructor(e,t,a){super(e),this.seconds=t,this.nanos=a}get total(){return this.seconds*c+BigInt(this.nanos)}*javaString(){if(this.seconds===0n&&this.nanos===0)return"PT0S";let e=this.seconds<0n&&this.nanos>0,t=e?this.seconds+1n:this.seconds,a=t/3600n,i=t%3600n/60n,s=t%60n,r="PT";if(a!==0n&&(r+=`${a}H`),i!==0n&&(r+=`${i}M`),s===0n&&this.nanos===0&&r.length>2)return r;if(r+=e&&s===0n?"-0":String(s),this.nanos>0){let u=String(e?1e9-this.nanos:this.nanos).padStart(9,"0").replace(/0+$/,"");r+=`.${u}`}return r+"S"}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.seconds===this.seconds&&t.nanos===this.nanos}*contentHash(){return(0,l.longHash)(l.K.normLong(this.seconds))+51*this.nanos|0}naturalOrder(e,t){if(t===null)return e.fail(m,\'Cannot read field "seconds" because "otherDuration" is null\');let a=this.total,i=t.total;return a<i?-1:a>i?1:0}#n(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.Duration.getSeconds()" because "duration" is null\'):t}"getSeconds()"(){return l.K.normLong(this.seconds)}"getNano()"(){return this.nanos}"isZero()"(){return(0,l.bool)(this.seconds===0n&&this.nanos===0)}"isNegative()"(){return(0,l.bool)(this.seconds<0n)}"isPositive()"(){return(0,l.bool)(this.total>0n)}"plus(Duration)"(e,t){return D(e,this.total+this.#n(e,t).total)}"minus(Duration)"(e,t){return D(e,this.total-this.#n(e,t).total)}"plus(long,TemporalUnit)"(e,t,a){return D(e,this.total+ze(e,t,a))}"minus(long,TemporalUnit)"(e,t,a){return D(e,this.total-ze(e,t,a))}#e(e,t,a){let i=a>=c?_(e,f(t)*(a/c))*c:f(t)*a;return D(e,this.total+i)}"plusDays(long)"(e,t){return this.#e(e,t,w)}"plusHours(long)"(e,t){return this.#e(e,t,3600n*c)}"plusMinutes(long)"(e,t){return this.#e(e,t,60n*c)}"plusSeconds(long)"(e,t){return this.#e(e,t,c)}"plusMillis(long)"(e,t){return this.#e(e,t,1000000n)}"plusNanos(long)"(e,t){return this.#e(e,t,1n)}"minusDays(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),w)}"minusHours(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),3600n*c)}"minusMinutes(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),60n*c)}"minusSeconds(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),c)}"minusMillis(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),1000000n)}"minusNanos(long)"(e,t){return this.#e(e,l.K.normLong(-f(t)),1n)}"multipliedBy(long)"(e,t){return D(e,this.total*f(t))}"dividedBy(long)"(e,t){let a=f(t);return a===0n?e.fail(Ve,"Cannot divide by zero"):D(e,this.total/a)}"dividedBy(Duration)"(e,t){if(t===null)return e.fail(m,"divisor");let a=t.total;return a===0n?e.fail(Ve,"Cannot divide by zero"):l.K.normLong(_(e,this.total/a))}"negated()"(e){return D(e,-this.total)}"abs()"(e){return this.seconds<0n?D(e,-this.total):this}"withSeconds(long)"(e,t){return new n(e.hash(),f(t),this.nanos)}"withNanos(int)"(e,t){return U(e,"NanoOfSecond",t,0,999999999),new n(e.hash(),this.seconds,t)}"truncatedTo(TemporalUnit)"(e,t){if(t===null)return e.fail(m,"unit");let a=t;if(a.name==="SECONDS"&&(this.seconds>=0n||this.nanos===0))return new n(e.hash(),this.seconds,0);if(a.name==="NANOS")return this;let i=H(a);if(i===null)return e.fail(W,"Unit is too large to be used for truncation");let s=this.seconds%86400n*c+BigInt(this.nanos);return D(e,this.total+s/i*i-s)}"toDays()"(){return l.K.normLong(this.seconds/86400n)}"toHours()"(){return l.K.normLong(this.seconds/3600n)}"toMinutes()"(){return l.K.normLong(this.seconds/60n)}"toSeconds()"(){return l.K.normLong(this.seconds)}"toMillis()"(e){return l.K.normLong(_(e,this.total/1000000n))}"toNanos()"(e){return l.K.normLong(_(e,this.total))}"toDaysPart()"(){return l.K.normLong(this.seconds/86400n)}"toHoursPart()"(){return Number(this.seconds/3600n%24n)}"toMinutesPart()"(){return Number(this.seconds/60n%60n)}"toSecondsPart()"(){return Number(this.seconds%60n)}"toMillisPart()"(){return Math.floor(this.nanos/1e6)}"toNanosPart()"(){return this.nanos}"compareTo(Duration)"(e,t){return this.naturalOrder(e,t)}};function D(n,e){return new le(n.hash(),_(n,te(e,c)),Number(ne(e,c)))}function ze(n,e,t){if(t===null)return n.fail(m,"unit");let a=H(t);return a===null?n.fail(W,"Unit must not have an estimated duration"):(a>=c&&_(n,f(e)*(a/c)),f(e)*a)}function Jt(n,e){let t=/^([-+]?)P(?:([-+]?\\d+)D)?(T(?:([-+]?\\d+)H)?(?:([-+]?\\d+)M)?(?:([-+]?)(\\d+)(?:[.,](\\d{0,9}))?S)?)?$/i.exec(e),a=t?.[3];if(!t||t[2]===void 0&&a===void 0||a?.toUpperCase()==="T")return n.fail(Oe,"Text cannot be parsed to a Duration");let i=r=>r===void 0?0n:BigInt(r),s=i(t[2])*w+i(t[4])*3600n*c+i(t[5])*60n*c;if(t[7]!==void 0){let r=BigInt(t[7])*c+BigInt((t[8]??"").padEnd(9,"0")||"0");s+=t[6]==="-"?-r:r}return D(n,t[1]==="-"?-s:s)}function Kt(n,e,t){return e===null?n.fail(m,\'Cannot invoke "java.time.temporal.Temporal.until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit)" because "startInclusive" is null\'):e instanceof C?D(n,Ke(n,t).nanoOfDay-e.nanoOfDay):e instanceof I?D(n,Xe(n,t).epochNanos-e.epochNanos):e instanceof E?D(n,et(n,t).total-e.total):e instanceof L?D(n,tt(n,t).instant(n).total-e.instant(n).total):(Je(n,t),n.fail(W,"Unsupported unit: Seconds"))}function ft(){let n=new Date;return{date:[n.getFullYear(),n.getMonth()+1,n.getDate()],time:[n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()*1e6]}}var Rt=-31557014167219200n,St=31556889864403199n,ee=86400n;function Ot(n,e,t){let a=te(e,ee),i=Number(ne(e,ee));return R(n,new O(n.hash(),...bt(Number(a))),new C(n.hash(),Math.floor(i/3600),Math.floor(i/60)%60,i%60,t))}var me=n=>BigInt(n.date.epochDay)*ee+BigInt(n.time.hour*3600+n.time.minute*60+n.time.second),E=class n extends l.LibObject{className="java.time.Instant";seconds;nanos;constructor(e,t,a){super(e),this.seconds=t,this.nanos=a}get total(){return this.seconds*c+BigInt(this.nanos)}text(e){let t=Ot(e,this.seconds,this.nanos),a=ue(t.time);return`${K(t.date)}T${a.length===5?`${a}:00`:a}Z`}*javaString(e){return this.text(e)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.seconds===this.seconds&&t.nanos===this.nanos}*contentHash(){return(0,l.longHash)(l.K.normLong(this.seconds))+51*this.nanos|0}naturalOrder(e,t){if(t===null)return e.fail(m,\'Cannot read field "seconds" because "otherInstant" is null\');let a=t;return this.seconds!==a.seconds?this.seconds<a.seconds?-1:1:this.nanos-a.nanos}"getEpochSecond()"(){return l.K.normLong(this.seconds)}"getNano()"(){return this.nanos}"toEpochMilli()"(e){return l.K.normLong(_(e,te(this.total,1000000n)))}"plusSeconds(long)"(e,t){return k(e,this.total+f(t)*c)}"plusMillis(long)"(e,t){return k(e,this.total+f(t)*1000000n)}"plusNanos(long)"(e,t){return k(e,this.total+f(t))}"minusSeconds(long)"(e,t){return k(e,this.total-f(t)*c)}"minusMillis(long)"(e,t){return k(e,this.total-f(t)*1000000n)}"minusNanos(long)"(e,t){return k(e,this.total-f(t))}"plus(long,TemporalUnit)"(e,t,a){if(a===null)return e.fail(m,Ze);let i=a,s=H(i);return s===null?Ie(e,i):k(e,this.total+f(t)*s)}"minus(long,TemporalUnit)"(e,t,a){return this["plus(long,TemporalUnit)"](e,l.K.normLong(-f(t)),a)}"plus(TemporalAmount)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.temporal.TemporalAmount.addTo(java.time.temporal.Temporal)" because "amountToAdd" is null\'):F(e,this,t,1)}"minus(TemporalAmount)"(e,t){return t===null?e.fail(m,\'Cannot invoke "java.time.temporal.TemporalAmount.subtractFrom(java.time.temporal.Temporal)" because "amountToSubtract" is null\'):F(e,this,t,-1)}"isBefore(Instant)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)<0)}"isAfter(Instant)"(e,t){return(0,l.bool)(this.naturalOrder(e,t)>0)}"compareTo(Instant)"(e,t){return this.naturalOrder(e,t)}"until(Temporal,TemporalUnit)"(e,t,a){let i=et(e,t);if(a===null)return e.fail(m,Te);let s=a,r=H(s);return r===null?Ie(e,s):l.K.normLong(_(e,(i.total-this.total)/r))}"until(Instant)"(e,t){return t===null?e.fail(m,"endExclusive"):D(e,t.total-this.total)}"truncatedTo(TemporalUnit)"(e,t){if(t===null)return e.fail(m,Ct);let a=t;if(a.name==="NANOS")return this;let i=H(a);if(i===null)return e.fail(W,"Unit is too large to be used for truncation");let s=ne(this.total,w);return k(e,this.total-s+s/i*i)}"atZone(ZoneId)"(e,t){return t===null?e.fail(m,"zone"):B(e,this.seconds,this.nanos,t)}};function k(n,e){let t=te(e,c);return t<Rt||t>St?n.fail(V,"Instant exceeds minimum or maximum instant"):new E(n.hash(),t,Number(ne(e,c)))}function et(n,e){return e===null?n.fail(m,"temporal"):e instanceof E?e:e instanceof L?e.instant(n):De(n,"Instant",e)}var P=class n extends l.LibObject{className="java.time.ZoneOffset";totalSeconds;constructor(e,t){super(e),this.totalSeconds=t}get id(){return Xt(this.totalSeconds)}offsetAt(){return this.totalSeconds}*javaString(){return this.id}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.totalSeconds===this.totalSeconds}*contentHash(){return this.totalSeconds}naturalOrder(e,t){return t===null?e.fail(m,\'Cannot read field "totalSeconds" because "other" is null\'):t.totalSeconds-this.totalSeconds}"getId()"(){return new l.K.JString(this.id)}"getTotalSeconds()"(){return this.totalSeconds}"normalized()"(){return this}"compareTo(ZoneOffset)"(e,t){return this.naturalOrder(e,t)}};function Xt(n){if(n===0)return"Z";let e=Math.abs(n),t=i=>String(i).padStart(2,"0"),a=e%60;return`${n<0?"-":"+"}${t(Math.floor(e/3600))}:${t(Math.floor(e/60)%60)}${a?`:${t(a)}`:""}`}var ct=new Map;function Qt(n){let e=ct.get(n);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:n,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",era:"short"}),ct.set(n,e)),e}var Re=8640000000000n,x=class n extends l.LibObject{className="java.time.ZoneRegion";id;fixed;rules;constructor(e,t,a,i=t){super(e),this.id=t,this.fixed=a,this.rules=i}offsetAt(e){if(this.fixed!==null)return this.fixed;let t=e<-Re?-Re:e>Re?Re:e,a=Qt(this.rules).formatToParts(new Date(Number(t)*1e3)),i=o=>Number(a.find(v=>v.type===o)?.value??0),r=a.find(o=>o.type==="era")?.value.startsWith("B")?1-i("year"):i("year"),u=BigInt(ve(r,i("month"),i("day")))*ee+BigInt(i("hour")*3600+i("minute")*60+i("second"));return Number(u-t)}*javaString(){return this.id}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&t.id===this.id}*contentHash(){return(0,l.stringHash)(this.id)}"getId()"(){return new l.K.JString(this.id)}"normalized()"(e){return this.fixed!==null?$(e,this.fixed):this}},$=(n,e)=>new P(n.hash(),e);function Vt(n){if(n==="Z")return 0;let e=n.length===2?`${n[0]}0${n[1]}`:n,t={3:[1],5:[1,3],6:[1,4],7:[1,3,5],9:[1,4,7]}[e.length],a=`Invalid ID for ZoneOffset, invalid format: ${n}`;if(!t)return a;let i=e.length===6||e.length===9,s=[];for(let[g,p]of t.entries()){if(i&&g>0&&e[p-1]!==":")return a;let b=e.slice(p,p+2);if(!/^\\d\\d$/.test(b))return`Invalid ID for ZoneOffset, non numeric characters found: ${n}`;s.push(Number(b))}if(e[0]!=="+"&&e[0]!=="-")return`Invalid ID for ZoneOffset, plus/minus not found when expected: ${n}`;let r=e[0]==="-"?-1:1,[u,o=0,v=0]=s;return kt(r*u,r*o,r*v)}function Mt(n,e){let t=Vt(e);return typeof t=="string"?n.fail(V,t):$(n,t)}function Lt(n,e){return Math.abs(e)>18*3600?n.fail(V,"Zone offset not in valid range: -18:00 to +18:00"):$(n,e)}function wt(n,e){if(e.length<=1||e.startsWith("+")||e.startsWith("-"))return Mt(n,e);if(e==="UTC"||e==="GMT"||e==="UT")return new x(n.hash(),e,0);for(let a of["UTC","GMT","UT"])if(e.startsWith(a)&&(e[a.length]==="+"||e[a.length]==="-")){let i=Vt(e.slice(a.length));if(typeof i=="string")return n.fail(V,`Invalid ID for offset-based ZoneId: ${e}`);let s=$(n,i);return new x(n.hash(),s.totalSeconds===0?a:`${a}${s.id}`,s.totalSeconds)}if(!/^[A-Za-z][A-Za-z0-9~/._+-]+$/.test(e))return n.fail(V,`Invalid ID for region-based ZoneId, invalid format: ${e}`);let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e}).resolvedOptions().timeZone}catch{return n.fail("java.time.zone.ZoneRulesException",`Unknown time-zone ID: ${e}`)}return t.toLowerCase()===e.toLowerCase()&&t!==e?n.fail("java.time.zone.ZoneRulesException",`Unknown time-zone ID: ${e}`):new x(n.hash(),e,e.startsWith("Etc/")?new x(0,e,null,t).offsetAt(0n):null,t)}function dt(n){let e=new Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC";return e==="UTC"?new x(n.hash(),"UTC",0):new x(n.hash(),e,null)}var en=(n,e)=>n instanceof P?n.totalSeconds:n.offsetAt(e),L=class n extends l.LibObject{className="java.time.ZonedDateTime";local;offset;zone;constructor(e,t,a,i){super(e),this.local=t,this.offset=a,this.zone=i}get epochSecond(){return me(this.local)-BigInt(this.offset.totalSeconds)}instant(e){return new E(e.hash(),this.epochSecond,this.local.time.nano)}*javaString(){return Et(this)}get contentEquality(){return!0}*contentEquals(e,t){return t instanceof n&&(yield*this.local.contentEquals(e,t.local))&&t.offset.totalSeconds===this.offset.totalSeconds&&ce(t.zone)===ce(this.zone)&&t.zone instanceof P==this.zone instanceof P}*contentHash(){let e=yield*this.zone.contentHash();return(yield*this.local.contentHash())^this.offset.totalSeconds^(e<<3|e>>>29)}naturalOrder(e,t){if(t===null)return e.fail(m,\'Cannot invoke "java.time.chrono.ChronoZonedDateTime.toEpochSecond()" because "other" is null\');let a=t,i=this.epochSecond,s=a.epochSecond;if(i!==s)return i<s?-1:1;let r=this.local.time.nano-a.local.time.nano;if(r!==0)return r;let u=this.local.naturalOrder(e,a.local);if(u!==0)return u;let o=ce(this.zone),v=ce(a.zone);for(let g=0;g<Math.min(o.length,v.length);g++)if(o.charCodeAt(g)!==v.charCodeAt(g))return o.charCodeAt(g)-v.charCodeAt(g);return o.length-v.length}#n(e,t){if(t===null)return e.fail(m,\'Cannot invoke "java.time.chrono.ChronoZonedDateTime.toEpochSecond()" because "other" is null\');let a=t;return this.epochSecond!==a.epochSecond?this.epochSecond<a.epochSecond?-1:1:this.local.time.nano-a.local.time.nano}#e(e,t){return X(e,t,this.zone,this.offset)}#t(e,t){let a=this.epochSecond*c+BigInt(this.local.time.nano)+t;return B(e,te(a,c),Number(ne(a,c)),this.zone)}"getYear()"(){return this.local.date.year}"getMonthValue()"(){return this.local.date.month}"getMonth()"(e){return this.local.date["getMonth()"](e)}"getDayOfMonth()"(){return this.local.date.day}"getDayOfYear()"(){return this.local.date["getDayOfYear()"]()}"getDayOfWeek()"(e){return this.local.date["getDayOfWeek()"](e)}"getHour()"(){return this.local.time.hour}"getMinute()"(){return this.local.time.minute}"getSecond()"(){return this.local.time.second}"getNano()"(){return this.local.time.nano}"getOffset()"(){return this.offset}"getZone()"(){return this.zone}"toLocalDateTime()"(){return this.local}"toLocalDate()"(){return this.local.date}"toLocalTime()"(){return this.local.time}"toInstant()"(e){return this.instant(e)}"toEpochSecond()"(){return l.K.normLong(this.epochSecond)}"withZoneSameInstant(ZoneId)"(e,t){return t===null?e.fail(m,"zone"):B(e,this.epochSecond,this.local.time.nano,t)}"withZoneSameLocal(ZoneId)"(e,t){return t===null?e.fail(m,"zone"):X(e,this.local,t,this.offset)}"plusYears(long)"(e,t){return this.#e(e,this.local["plusYears(long)"](e,t))}"plusMonths(long)"(e,t){return this.#e(e,this.local["plusMonths(long)"](e,t))}"plusWeeks(long)"(e,t){return this.#e(e,this.local["plusWeeks(long)"](e,t))}"plusDays(long)"(e,t){return this.#e(e,this.local["plusDays(long)"](e,t))}"plusHours(long)"(e,t){return this.#t(e,f(t)*3600n*c)}"plusMinutes(long)"(e,t){return this.#t(e,f(t)*60n*c)}"plusSeconds(long)"(e,t){return this.#t(e,f(t)*c)}"plusNanos(long)"(e,t){return this.#t(e,f(t))}"minusYears(long)"(e,t){return this.#e(e,this.local["minusYears(long)"](e,t))}"minusMonths(long)"(e,t){return this.#e(e,this.local["minusMonths(long)"](e,t))}"minusWeeks(long)"(e,t){return this.#e(e,this.local["minusWeeks(long)"](e,t))}"minusDays(long)"(e,t){return this.#e(e,this.local["minusDays(long)"](e,t))}"minusHours(long)"(e,t){return this.#t(e,-f(t)*3600n*c)}"minusMinutes(long)"(e,t){return this.#t(e,-f(t)*60n*c)}"minusSeconds(long)"(e,t){return this.#t(e,-f(t)*c)}"minusNanos(long)"(e,t){return this.#t(e,-f(t))}"plus(long,TemporalUnit)"(e,t,a){if(a===null)return e.fail(m,Ze);let i=a;return se(i)?this.#t(e,f(t)*H(i)):this.#e(e,this.local["plus(long,TemporalUnit)"](e,t,a))}"minus(long,TemporalUnit)"(e,t,a){return this["plus(long,TemporalUnit)"](e,l.K.normLong(-f(t)),a)}"plus(TemporalAmount)"(e,t){return t instanceof Q?this.#e(e,this.local["plus(TemporalAmount)"](e,t)):t===null?e.fail(m,"amountToAdd"):F(e,this,t,1)}"minus(TemporalAmount)"(e,t){return t instanceof Q?this.#e(e,this.local["minus(TemporalAmount)"](e,t)):t===null?e.fail(m,"amountToSubtract"):F(e,this,t,-1)}"withYear(int)"(e,t){return this.#e(e,this.local["withYear(int)"](e,t))}"withMonth(int)"(e,t){return this.#e(e,this.local["withMonth(int)"](e,t))}"withDayOfMonth(int)"(e,t){return this.#e(e,this.local["withDayOfMonth(int)"](e,t))}"withDayOfYear(int)"(e,t){return this.#e(e,this.local["withDayOfYear(int)"](e,t))}"withHour(int)"(e,t){return this.#e(e,this.local["withHour(int)"](e,t))}#a(e,t){if(this.zone instanceof P)return this;let a=It(this.zone,this.local);if(a.length<2)return this;let i=t?Math.max(...a):Math.min(...a);return i===this.offset.totalSeconds?this:new n(e.hash(),this.local,$(e,i),this.zone)}"withEarlierOffsetAtOverlap()"(e){return this.#a(e,!0)}"withLaterOffsetAtOverlap()"(e){return this.#a(e,!1)}"withFixedOffsetZone()"(e){return this.zone===this.offset?this:new n(e.hash(),this.local,this.offset,this.offset)}"withMinute(int)"(e,t){return this.#e(e,this.local["withMinute(int)"](e,t))}"withSecond(int)"(e,t){return this.#e(e,this.local["withSecond(int)"](e,t))}"withNano(int)"(e,t){return this.#e(e,this.local["withNano(int)"](e,t))}"truncatedTo(TemporalUnit)"(e,t){return this.#e(e,this.local["truncatedTo(TemporalUnit)"](e,t))}"until(Temporal,TemporalUnit)"(e,t,a){let i=tt(e,t);if(a===null)return e.fail(m,Te);if(se(a))return this.instant(e)["until(Temporal,TemporalUnit)"](e,i.instant(e),a);let r=B(e,i.epochSecond,i.local.time.nano,this.zone).local;return this.local["until(Temporal,TemporalUnit)"](e,r,a)}"isBefore(ZonedDateTime)"(e,t){return(0,l.bool)(this.#n(e,t)<0)}"isAfter(ZonedDateTime)"(e,t){return(0,l.bool)(this.#n(e,t)>0)}"isEqual(ZonedDateTime)"(e,t){return(0,l.bool)(this.#n(e,t)===0)}"compareTo(ZonedDateTime)"(e,t){return this.naturalOrder(e,t)}"format(DateTimeFormatter)"(e,t){return t===null?e.fail(m,"formatter"):new l.K.JString(t.format(e,this))}},ce=n=>(n instanceof P,n.id);function Et(n){let e=`${Qe(n.local)}${n.offset.id}`;return n.zone instanceof P?e:`${e}[${n.zone.id}]`}function B(n,e,t,a){let i=en(a,e),s=a instanceof P?a:$(n,i);return new L(n.hash(),Ot(n,e+BigInt(i),t),s,a)}function X(n,e,t,a){if(t instanceof P)return new L(n.hash(),e,t,t);let i=me(e),s=It(t,e);if(s.length===0){let u=t.offsetAt(i-ee),o=t.offsetAt(i+ee),v=e.plusNanosExact(n,BigInt(o-u)*c);return new L(n.hash(),v,$(n,o),t)}let r=a&&s.includes(a.totalSeconds)?a.totalSeconds:Math.max(...s);return new L(n.hash(),e,a&&a.totalSeconds===r?a:$(n,r),t)}function tt(n,e){return e===null?n.fail(m,"temporal"):e instanceof L?e:De(n,"ZonedDateTime",e)}function It(n,e){let t=me(e);return[...new Set([n.offsetAt(t-ee),n.offsetAt(t),n.offsetAt(t+ee)])].filter(i=>n.offsetAt(t-BigInt(i))===i)}function At(n){let e=BigInt(Date.now());return new E(n.hash(),te(e,1000n),Number(ne(e,1000n))*1e6)}var de=(n,e)=>e===null?n.fail(m,"zone"):e;function he(n,e){let t=At(n);return B(n,t.seconds,t.nanos,de(n,e))}function kt(n,e,t){return n<-18||n>18?`Zone offset hours not in valid range: value ${n} is not in the range -18 to 18`:n>0&&(e<0||t<0)?"Zone offset minutes and seconds must be positive because hours is positive":n<0&&(e>0||t>0)?"Zone offset minutes and seconds must be negative because hours is negative":n===0&&(e>0&&t<0||e<0&&t>0)?"Zone offset minutes and seconds must have the same sign":e<-59||e>59?`Zone offset minutes not in valid range: value ${e} is not in the range -59 to 59`:t<-59||t>59?`Zone offset seconds not in valid range: value ${t} is not in the range -59 to 59`:Math.abs(n)===18&&(e!==0||t!==0)?"Zone offset not in valid range: -18:00 to +18:00":n*3600+e*60+t}function He(n,e,t,a){let i=kt(e,t,a);return typeof i=="string"?n.fail(V,i):$(n,i)}var q=class{field;constructor(e){this.field=e}},Ne=class{index;constructor(e){this.index=e}},tn="yuMLdDEHhkKmsSanVXxZ",nn="GuyDMLdQqYwWEecFaBhKkHmsSAnNVvzOXxZpg",an={y:"YearOfEra",u:"Year",M:"MonthOfYear",L:"MonthOfYear",d:"DayOfMonth",D:"DayOfYear",E:"DayOfWeek",H:"HourOfDay",h:"ClockHourOfAmPm",k:"ClockHourOfDay",K:"HourOfAmPm",m:"MinuteOfHour",s:"SecondOfMinute",S:"NanoOfSecond",n:"NanoOfSecond",a:"AmPmOfDay"},on="yuMLdDE",rn=["+HHmm","+HHMM","+HH:MM","+HHMMss","+HH:MM:ss"];function sn(n,e,t){if(n===0&&t!==null)return t;let a=Math.abs(n),i=p=>String(p).padStart(2,"0"),s=Math.floor(a/3600),r=Math.floor(a/60)%60,u=a%60,o=e.includes(":")?":":"",v=`${n<0?"-":"+"}${i(s)}`,g=e.includes("MM")||e.includes("mm")&&(r!==0||u!==0);return g&&(v+=o+i(r)),g&&(e.includes("SS")||e.includes("ss")&&u!==0)&&(v+=o+i(u)),v}function un(n,e){if(e instanceof L)return{value:e,date:e.local.date,time:e.local.time,offset:e.offset.totalSeconds,zone:e.zone,instant:e.instant(n)};if(e instanceof E)return{value:e,date:null,time:null,offset:null,zone:null,instant:e};let t=e instanceof O?e:e instanceof I?e.date:null,a=e instanceof C?e:e instanceof I?e.time:null;return{value:e,date:t,time:a,offset:null,zone:null,instant:null}}function Zt(n,e){return e instanceof O?K(e):e instanceof C?ue(e):e instanceof I?Qe(e):e instanceof L?Et(e):e.text(n)}function Nt(n){if(/^(Z|[+-]\\d)/.test(n)||/^(UTC|GMT|UT)([+-]\\d.*)?$/.test(n))return!0;try{let e=new Intl.DateTimeFormat("en-US",{timeZone:n}).resolvedOptions().timeZone;return!(e!==n&&e.toLowerCase()===n.toLowerCase())}catch{return!1}}var Ae=class extends l.LibObject{className="java.time.format.DateTimeFormatter";parts;strict;constructor(e,t,a){super(e),this.parts=t,this.strict=a}*javaString(e){return e.limitation("printing a DateTimeFormatter (the JDK\'s description of its fields)")}"format(TemporalAccessor)"(e,t){return t===null?e.fail(m,"temporal"):new l.K.JString(this.format(e,t))}format(e,t){try{return this.#n(e,this.parts,un(e,t))}catch(a){if(a instanceof q)return e.fail(W,`Unsupported field: ${a.field}`);throw a}}#n(e,t,a){let{date:i,time:s}=a,r="";for(let u of t){if(u.kind==="literal"){r+=u.text;continue}if(u.kind==="optional"){try{r+=this.#n(e,u.parts,a)}catch(h){if(!(h instanceof q))throw h}continue}if(u.kind==="offset"){if(a.offset===null)throw new q("OffsetSeconds");r+=sn(a.offset,u.pattern,u.zero);continue}if(u.kind==="zone-id"){if(!a.zone)return e.fail(V,`Unable to extract ZoneId from temporal ${Zt(e,a.value)}`);r+=ce(a.zone);continue}if(u.kind==="zone-bracket"){a.zone instanceof x&&(r+=`[${a.zone.id}]`);continue}if(u.kind==="instant"){if(!a.instant)throw new q("InstantSeconds");r+=a.instant.text(e);continue}if(u.kind==="iso-time"){if(!s)throw new q("HourOfDay");let h=T=>String(T).padStart(2,"0");r+=`${h(s.hour)}:${h(s.minute)}:${h(s.second)}`,s.nano&&(r+="."+String(s.nano).padStart(9,"0").replace(/0+$/,""));continue}let o=u.count,v=on.includes(u.letter);if(v&&!i||!v&&!s)throw new q(an[u.letter]);let g=i,p=s,b=h=>o===1?String(h):String(h).padStart(o,"0");switch(u.letter){case"y":case"u":{if(u.letter==="y"&&g.year<=0)return e.limitation("formatting a year before 1 CE with the pattern letter y");if(o===2)r+=String(re(g.year,100)).padStart(2,"0");else{let h=String(Math.abs(g.year)).padStart(o===1?1:o,"0");r+=g.year<0?`-${h}`:o>=4&&h.length>o?`+${h}`:h}break}case"M":case"L":r+=o===1?String(g.month):o===2?String(g.month).padStart(2,"0"):Pe(g.month,o);break;case"d":r+=b(g.day);break;case"D":{let h=g.epochDay-ve(g.year,1,1)+1;r+=String(h).padStart(o,"0");break}case"E":{let h=We[re(g.epochDay+3,7)];r+=o<=3?Ee(h).slice(0,3):o===4?Ee(h):h[0];break}case"H":r+=b(p.hour);break;case"h":r+=b(p.hour%12||12);break;case"k":r+=b(p.hour||24);break;case"K":r+=b(p.hour%12);break;case"m":r+=b(p.minute);break;case"s":r+=b(p.second);break;case"S":r+=String(p.nano).padStart(9,"0").slice(0,o);break;case"n":r+=b(p.nano);break;case"a":r+=p.hour<12?"AM":"PM";break}}return r}#e(e,t){let a=r=>e.fail(Oe,r),i={},s=0;try{this.#t(e,t,this.parts,i,r=>s=r,()=>s)}catch(r){throw r instanceof Ne&&a(`Text \'${t}\' could not be parsed at index ${r.index}`),r}return s<t.length&&a(`Text \'${t}\' could not be parsed, unparsed text found at index ${s}`),i}#t(e,t,a,i,s,r){let u=b=>{throw new Ne(b)},o=r(),v=()=>s(o),g=b=>{let h=b;for(;h<t.length&&t.charCodeAt(h)>=48&&t.charCodeAt(h)<=57;)h++;return h-b},p=b=>g(b)>=2?Number(t.slice(b,b+2)):null;for(let b=0;b<a.length;b++){let h=a[b];if(h.kind==="literal"){t.startsWith(h.text,o)||u(o),o+=h.text.length;continue}if(h.kind==="optional"){let d={...i};try{this.#t(e,t,h.parts,i,N=>o=N,()=>o)}catch(N){if(!(N instanceof Ne))throw N;for(let y of Object.keys(i))delete i[y];Object.assign(i,d)}continue}if(h.kind==="offset"){if(h.zero!==null&&t.startsWith(h.zero,o)){i.offset=0,o+=h.zero.length;continue}let d=t[o]==="-"?-1:t[o]==="+"?1:0,N=p(o+1);(d===0||N===null)&&u(o);let y=o+3,ye=h.pattern.includes(":"),at=Ht=>{let _e=ye?y+1:y;return ye&&t[y]!==":"||p(_e)===null?(Ht&&u(o),0):(y=_e+2,p(_e))},it=/mm|MM/.test(h.pattern),$t=it?at(h.pattern.includes("MM")):0,Ut=it&&/ss|SS/.test(h.pattern)?at(h.pattern.includes("SS")):0;i.offset=d*(N*3600+$t*60+Ut),o=y;continue}if(h.kind==="zone-id"){let d=/^[A-Za-z0-9~/._+:-]+/.exec(t.slice(o))?.[0];(!d||!Nt(d))&&u(o),i.zone=d,o+=d.length;continue}if(h.kind==="zone-bracket"){if(t[o]!=="[")continue;let d=t.indexOf("]",o),N=d<0?"":t.slice(o+1,d);if(!Nt(N))continue;i.zone=N,o=d+1;continue}if(h.kind==="instant"){this.#t(e,t,mn,i,d=>o=d,()=>o);continue}if(h.kind==="iso-time"){let d=p(o);d===null&&u(o),t[o+2]!==":"&&u(o+2);let N=p(o+3);if(N===null&&u(o+3),i.hourOfDay=d,i.minute=N,o+=5,h.seconds&&(t[o]!==":"||p(o+1)===null)&&u(o),t[o]===":"&&p(o+1)!==null&&(i.second=p(o+1),o+=3,t[o]===".")){let y=Math.min(g(o+1),9);i.nano=Number(t.slice(o+1,o+1+y).padEnd(9,"0")),o+=1+y}continue}let T=0;for(let d=b+1;d<a.length;d++){let N=a[d];if(N.kind!=="field")break;if(N.count===2&&"MLdyHhkKms".includes(N.letter))T+=2;else if(N.letter==="S")T+=N.count;else break}let S=g(o);if((h.letter==="M"||h.letter==="L")&&h.count>2){let d=oe.findIndex((N,y)=>t.startsWith(Pe(y+1,h.count),o));d<0&&u(o),i.month=d+1,o+=Pe(d+1,h.count).length;continue}switch(h.letter){case"y":case"u":{let d=1,N=o;h.count!==2&&(t[o]==="+"||t[o]==="-")&&(d=t[o]==="-"?-1:1,N++);let y=g(N)-T;if(h.count===2){S<2&&u(o),i.year=2e3+Number(t.slice(o,o+2)),o+=2;break}let ye=h.count>=4?4:h.count;y<ye&&u(o),h.count>=4&&y>4&&N===o&&u(o),i.year=d*Number(t.slice(N,N+Math.min(y,10))),o=N+Math.min(y,10);break}case"M":case"L":case"d":case"H":case"h":case"k":case"K":case"m":case"s":{let d=h.count===2?2:Math.max(1,Math.min(S-T,2));(S<d||d<1)&&u(o);let N=Number(t.slice(o,o+d)),y={M:"month",L:"month",d:"day",H:"hourOfDay",h:"clockHourOfAmPm",k:"clockHourOfDay",K:"hourOfAmPm",m:"minute",s:"second"}[h.letter];i[y]=N,o+=d;break}case"S":{S<h.count&&u(o),i.nano=Number(t.slice(o,o+h.count).padEnd(9,"0")),o+=h.count;break}case"a":{let d=t.startsWith("AM",o);!d&&!t.startsWith("PM",o)&&u(o),i.amPm=d?0:1,o+=2;break}default:return e.limitation(`parsing with the pattern letter ${h.letter}`)}}v()}parse(e,t,a){let i=this.#e(e,t),s=T=>a==="Instant"?e.fail(Oe,`Text \'${t}\' could not be parsed at index 0`):e.fail(Oe,`Text \'${t}\' could not be parsed: ${T}`,{className:V,message:T}),r=(T,S,d,N,y=`${d} - ${N}`)=>{S!==void 0&&(S<d||S>N)&&s(`Invalid value for ${T} (valid values ${y}): ${S}`)},u=null;if(i.year!==void 0||i.month!==void 0||i.day!==void 0){if(i.year===void 0||i.month===void 0||i.day===void 0)return e.limitation("parsing a date without a year, a month and a day");let{year:T,month:S}=i,d=i.day;r("Year",T,Le,we),r("MonthOfYear",S,1,12),r("DayOfMonth",d,1,31,"1 - 28/31");let N=J(S,z(T));d>N&&(this.strict?s(d===29?`Invalid date \'February 29\' as \'${T}\' is not a leap year`:`Invalid date \'${oe[S-1]} ${d}\'`):d=N),u=new O(e.hash(),T,S,d)}let v=i.hourOfDay;i.clockHourOfDay!==void 0&&((this.strict||i.clockHourOfDay!==0)&&r("ClockHourOfDay",i.clockHourOfDay,1,24),v=i.clockHourOfDay===24?0:i.clockHourOfDay);let g=i.hourOfAmPm;if(i.clockHourOfAmPm!==void 0&&((this.strict||i.clockHourOfAmPm!==0)&&r("ClockHourOfAmPm",i.clockHourOfAmPm,1,12),g=i.clockHourOfAmPm===12?0:i.clockHourOfAmPm),g!==void 0){if(r("HourOfAmPm",g,0,11),i.amPm===void 0)return e.limitation("parsing an hour of AM/PM (h or K) without the AM/PM (a)");v=i.amPm*12+g}let p=null;if(v!==void 0){if(r("HourOfDay",v,0,23),r("MinuteOfHour",i.minute,0,59),r("SecondOfMinute",i.second,0,59),i.second!==void 0&&i.minute===void 0)return e.limitation("parsing seconds without minutes");p=new C(e.hash(),v,i.minute??0,i.second??0,i.nano??0)}else if(i.minute!==void 0||i.second!==void 0||i.nano!==void 0)return e.limitation("parsing a time without its hour");let b=a==="LocalDate"?u:a==="LocalTime"?p:u&&p?R(e,u,p):null;if(b instanceof I&&(a==="ZonedDateTime"||a==="Instant")){let T=b,S=i.zone!==void 0?wt(e,i.zone):i.offset!==void 0?Lt(e,i.offset):null,d=i.offset!==void 0?me(T)-BigInt(i.offset):null;a==="Instant"?b=d===null?null:k(e,d*c+BigInt(T.time.nano)):S?b=d===null?X(e,T,S):B(e,d,T.time.nano,S):b=null}if(b)return b;let h=u&&p?`${K(u)}T${ue(p)}`:u?K(u):p?ue(p):null;return s(`Unable to obtain ${a} from TemporalAccessor: {},ISO${h?` resolved to ${h}`:""} of type java.time.format.Parsed`)}};function Pe(n,e){let t=oe[n-1];return e===3?Ee(t).slice(0,3):e===4?Ee(t):t[0]}function ln(n,e){let t=[[]],a=t[0],i,s=r=>{let u=a[a.length-1];u?.kind==="literal"?u.text+=r:a.push({kind:"literal",text:r})};for(let r=0;r<e.length;){let u=e[r];if(/[a-zA-Z]/.test(u)){let o=1;for(;e[r+o]===u;)o++;if(nn.includes(u)||n.fail(j,`Unknown pattern letter: ${u}`),!tn.includes(u)){i??=u,r+=o;continue}if(u==="S"&&o>9&&n.fail(j,`Minimum width must be from 0 to 9 inclusive but was ${o}`),u==="V"){o!==2&&n.fail(j,"Pattern letter count must be 2: V"),a.push({kind:"zone-id"}),r+=o;continue}if(u==="X"||u==="x"||u==="Z"){o>5&&n.fail(j,`Too many pattern letters: ${u}`),u==="Z"&&o===4?i??="ZZZZ":u==="Z"?a.push(o===5?{kind:"offset",pattern:"+HH:MM:ss",zero:"Z"}:{kind:"offset",pattern:"+HHMM",zero:null}):a.push({kind:"offset",pattern:rn[o-1],zero:u==="X"?"Z":null}),r+=o;continue}let v={y:19,u:19,M:5,L:5,d:2,D:3,E:5,H:2,h:2,k:2,K:2,m:2,s:2,S:9,n:19,a:1}[u];o>v&&n.fail(j,`Too many pattern letters: ${u}`),u==="L"&&o<3?a.push({kind:"field",letter:"M",count:o}):a.push({kind:"field",letter:u,count:o}),r+=o}else if(u==="\'"){if(e[r+1]==="\'"){s("\'"),r+=2;continue}let o="",v=r+1;for(;;)if(v>=e.length&&n.fail(j,`Pattern ends with an incomplete string literal: ${e}`),e[v]==="\'"){if(e[v+1]!=="\'")break;o+="\'",v+=2}else o+=e[v++];s(o),r=v+1}else if(u==="{"||u==="}"||u==="#")n.fail(j,`Pattern includes reserved character: \'${u}\'`);else if(u==="["){let o={kind:"optional",parts:[]};a.push(o),t.push(a=o.parts),r++}else u==="]"?(t.length===1&&n.fail(j,"Pattern invalid as it contains ] without previous ["),t.pop(),a=t[t.length-1],r++):(s(u),r++)}return i&&n.limitation(`the DateTimeFormatter pattern letter ${i}`),new Ae(n.hash(),t[0],!1)}var vt=new WeakMap,nt=[{kind:"field",letter:"u",count:4},{kind:"literal",text:"-"},{kind:"field",letter:"M",count:2},{kind:"literal",text:"-"},{kind:"field",letter:"d",count:2}],Ye=[...nt,{kind:"literal",text:"T"},{kind:"iso-time"}],Be={kind:"offset",pattern:"+HH:MM:ss",zero:"Z"},mn=[...nt,{kind:"literal",text:"T"},{kind:"iso-time",seconds:!0},Be],hn={date:nt,time:[{kind:"iso-time"}],dateTime:Ye,offsetDateTime:[...Ye,Be],zonedDateTime:[...Ye,Be,{kind:"zone-bracket"}],instant:[{kind:"instant"}]};function A(n,e){let t=vt.get(n);return t||vt.set(n,t={}),t[e]??=new Ae(n.hash(),hn[e],!0)}var fe=(n,e,t)=>e===null?n.fail(m,t):e.value,G=(n,e,t)=>e===null?n.fail(m,t):e instanceof l.K.JString?e.value:e.text,Se=(n,e)=>e===null?n.fail(m,"formatter"):e,je=(n,e)=>e===null?n.fail(m,"month"):e.ordinal+1;function Fe(n,e,t,a){let i={};return t.forEach((s,r)=>i[`${n}.${s}`]=u=>e(u)[r]),i[`${n}.values()`]=s=>new l.K.JArray(3,e(s).slice(),s.hash(),a),i[`${n}.valueOf(String)`]=(s,[r])=>r===null?s.fail(m,"Name is null"):e(s).find(o=>o.name===r.value)??s.fail(j,`No enum constant ${a.slice(2,-1)}.${r.value}`),i}var _t={...Fe("DayOfWeek",ge,We,"[Ljava.time.DayOfWeek;"),...Fe("Month",pe,oe,"[Ljava.time.Month;"),...Fe("ChronoUnit",Dt,Ge,"[Ljava.time.temporal.ChronoUnit;"),"DayOfWeek.of(int)":(n,[e])=>e<1||e>7?n.fail(V,`Invalid value for DayOfWeek: ${e}`):ge(n)[e-1],"Month.of(int)":(n,[e])=>e<1||e>12?n.fail(V,`Invalid value for MonthOfYear: ${e}`):pe(n)[e-1],"LocalDate.of(int,int,int)":(n,[e,t,a])=>Y(n,e,t,a),"LocalDate.of(int,Month,int)":(n,[e,t,a])=>t===null?n.fail(m,"month"):Y(n,e,t.ordinal+1,a),"LocalDate.ofEpochDay(long)":(n,[e])=>ie(n,Number(e)),"LocalDate.ofYearDay(int,int)":(n,[e,t])=>Tt(n,e,t),"LocalDate.parse(String)":(n,[e])=>A(n,"date").parse(n,fe(n,e,"text"),"LocalDate"),"LocalDate.parse(String,DateTimeFormatter)":(n,[e,t])=>{let a=fe(n,e,"text");return Se(n,t).parse(n,a,"LocalDate")},"LocalDate.now()":n=>{let e=new Date;return new O(n.hash(),e.getFullYear(),e.getMonth()+1,e.getDate())},"LocalDate.MIN":n=>new O(n.hash(),Le,1,1),"LocalDate.MAX":n=>new O(n.hash(),we,12,31),"LocalDate.EPOCH":n=>new O(n.hash(),1970,1,1),"Period.of(int,int,int)":(n,[e,t,a])=>Z(n,e,t,a),"Period.ofDays(int)":(n,[e])=>Z(n,0,0,e),"Period.ofWeeks(int)":(n,[e])=>Z(n,0,0,ae(n,e*7)),"Period.ofMonths(int)":(n,[e])=>Z(n,0,e,0),"Period.ofYears(int)":(n,[e])=>Z(n,e,0,0),"Period.ZERO":n=>Z(n,0,0,0),"Period.between(LocalDate,LocalDate)":(n,[e,t])=>e===null||t===null?n.fail(m,null):yt(n,e,t),"DateTimeFormatter.ofPattern(String)":(n,[e])=>ln(n,fe(n,e,"pattern")),"DateTimeFormatter.ISO_LOCAL_DATE":n=>A(n,"date"),"DateTimeFormatter.ISO_DATE":n=>A(n,"date"),"DateTimeFormatter.ISO_LOCAL_TIME":n=>A(n,"time"),"DateTimeFormatter.ISO_LOCAL_DATE_TIME":n=>A(n,"dateTime"),"LocalTime.of(int,int)":(n,[e,t])=>M(n,e,t),"LocalTime.of(int,int,int)":(n,[e,t,a])=>M(n,e,t,a),"LocalTime.of(int,int,int,int)":(n,[e,t,a,i])=>M(n,e,t,a,i),"LocalTime.ofSecondOfDay(long)":(n,[e])=>{let t=f(e);return t<0n||t>86399n?n.fail(V,`Invalid value for SecondOfDay (valid values 0 - 86399): ${t}`):be(n,t*c)},"LocalTime.ofNanoOfDay(long)":(n,[e])=>be(n,f(e)),"LocalTime.parse(CharSequence)":(n,[e])=>A(n,"time").parse(n,G(n,e,"text"),"LocalTime"),"LocalTime.parse(CharSequence,DateTimeFormatter)":(n,[e,t])=>{let a=G(n,e,"text");return Se(n,t).parse(n,a,"LocalTime")},"LocalTime.now()":n=>{let[e,t,a,i]=ft().time;return new C(n.hash(),e,t,a,i)},"LocalTime.MIN":n=>new C(n.hash(),0,0,0,0),"LocalTime.MIDNIGHT":n=>new C(n.hash(),0,0,0,0),"LocalTime.NOON":n=>new C(n.hash(),12,0,0,0),"LocalTime.MAX":n=>new C(n.hash(),23,59,59,999999999),"LocalDateTime.of(int,int,int,int,int)":(n,[e,t,a,i,s])=>R(n,Y(n,e,t,a),M(n,i,s)),"LocalDateTime.of(int,int,int,int,int,int)":(n,[e,t,a,i,s,r])=>R(n,Y(n,e,t,a),M(n,i,s,r)),"LocalDateTime.of(int,int,int,int,int,int,int)":(n,[e,t,a,i,s,r,u])=>R(n,Y(n,e,t,a),M(n,i,s,r,u)),"LocalDateTime.of(int,Month,int,int,int)":(n,[e,t,a,i,s])=>R(n,Y(n,e,je(n,t),a),M(n,i,s)),"LocalDateTime.of(int,Month,int,int,int,int)":(n,[e,t,a,i,s,r])=>R(n,Y(n,e,je(n,t),a),M(n,i,s,r)),"LocalDateTime.of(int,Month,int,int,int,int,int)":(n,[e,t,a,i,s,r,u])=>R(n,Y(n,e,je(n,t),a),M(n,i,s,r,u)),"LocalDateTime.of(LocalDate,LocalTime)":(n,[e,t])=>e===null?n.fail(m,"date"):t===null?n.fail(m,"time"):R(n,e,t),"LocalDateTime.parse(CharSequence)":(n,[e])=>A(n,"dateTime").parse(n,G(n,e,"text"),"LocalDateTime"),"LocalDateTime.parse(CharSequence,DateTimeFormatter)":(n,[e,t])=>{let a=G(n,e,"text");return Se(n,t).parse(n,a,"LocalDateTime")},"LocalDateTime.now()":n=>{let{date:e,time:t}=ft();return R(n,new O(n.hash(),...e),new C(n.hash(),...t))},"LocalDateTime.MIN":n=>R(n,new O(n.hash(),Le,1,1),new C(n.hash(),0,0,0,0)),"LocalDateTime.MAX":n=>R(n,new O(n.hash(),we,12,31),new C(n.hash(),23,59,59,999999999)),"DateTimeFormatter.ISO_OFFSET_DATE_TIME":n=>A(n,"offsetDateTime"),"DateTimeFormatter.ISO_ZONED_DATE_TIME":n=>A(n,"zonedDateTime"),"DateTimeFormatter.ISO_INSTANT":n=>A(n,"instant"),"LocalDate.now(ZoneId)":(n,[e])=>he(n,e).local.date,"LocalTime.now(ZoneId)":(n,[e])=>he(n,e).local.time,"LocalDateTime.now(ZoneId)":(n,[e])=>he(n,e).local,"LocalDateTime.ofInstant(Instant,ZoneId)":(n,[e,t])=>e===null?n.fail(m,"instant"):t===null?n.fail(m,"zone"):B(n,e.seconds,e.nanos,t).local,"LocalDateTime.ofEpochSecond(long,int,ZoneOffset)":(n,[e,t,a])=>a===null?n.fail(m,"offset"):(U(n,"NanoOfSecond",t,0,999999999),B(n,f(e),t,a).local),"Instant.EPOCH":n=>new E(n.hash(),0n,0),"Instant.MIN":n=>new E(n.hash(),Rt,0),"Instant.MAX":n=>new E(n.hash(),St,999999999),"Instant.ofEpochSecond(long)":(n,[e])=>k(n,f(e)*c),"Instant.ofEpochSecond(long,long)":(n,[e,t])=>k(n,f(e)*c+f(t)),"Instant.ofEpochMilli(long)":(n,[e])=>k(n,f(e)*1000000n),"Instant.now()":n=>At(n),"Instant.parse(CharSequence)":(n,[e])=>A(n,"instant").parse(n,G(n,e,"text"),"Instant"),"Instant.from(TemporalAccessor)":(n,[e])=>et(n,e),"LocalDate.from(TemporalAccessor)":(n,[e])=>Je(n,e),"LocalTime.from(TemporalAccessor)":(n,[e])=>Ke(n,e),"LocalDateTime.from(TemporalAccessor)":(n,[e])=>Xe(n,e),"ZoneId.of(String)":(n,[e])=>wt(n,fe(n,e,"zoneId")),"ZoneId.systemDefault()":n=>dt(n),"ZoneOffset.UTC":n=>$(n,0),"ZoneOffset.MIN":n=>$(n,-18*3600),"ZoneOffset.MAX":n=>$(n,18*3600),"ZoneOffset.of(String)":(n,[e])=>Mt(n,fe(n,e,"offsetId")),"ZoneOffset.ofHours(int)":(n,[e])=>He(n,e,0,0),"ZoneOffset.ofHoursMinutes(int,int)":(n,[e,t])=>He(n,e,t,0),"ZoneOffset.ofHoursMinutesSeconds(int,int,int)":(n,[e,t,a])=>He(n,e,t,a),"ZoneOffset.ofTotalSeconds(int)":(n,[e])=>Lt(n,e),"ZonedDateTime.of(int,int,int,int,int,int,int,ZoneId)":(n,[e,t,a,i,s,r,u,o])=>X(n,R(n,Y(n,e,t,a),M(n,i,s,r,u)),de(n,o)),"ZonedDateTime.of(LocalDateTime,ZoneId)":(n,[e,t])=>e===null?n.fail(m,"localDateTime"):X(n,e,de(n,t)),"ZonedDateTime.of(LocalDate,LocalTime,ZoneId)":(n,[e,t,a])=>e===null?n.fail(m,"date"):t===null?n.fail(m,"time"):X(n,R(n,e,t),de(n,a)),"ZonedDateTime.ofInstant(Instant,ZoneId)":(n,[e,t])=>e===null?n.fail(m,"instant"):B(n,e.seconds,e.nanos,de(n,t)),"ZonedDateTime.now()":n=>he(n,dt(n)),"ZonedDateTime.now(ZoneId)":(n,[e])=>he(n,e),"ZonedDateTime.parse(CharSequence)":(n,[e])=>A(n,"zonedDateTime").parse(n,G(n,e,"text"),"ZonedDateTime"),"ZonedDateTime.parse(CharSequence,DateTimeFormatter)":(n,[e,t])=>{let a=G(n,e,"text");return Se(n,t).parse(n,a,"ZonedDateTime")},"ZonedDateTime.from(TemporalAccessor)":(n,[e])=>tt(n,e),"Duration.ZERO":n=>new le(n.hash(),0n,0),"Duration.ofDays(long)":(n,[e])=>D(n,_(n,f(e)*86400n)*c),"Duration.ofHours(long)":(n,[e])=>D(n,_(n,f(e)*3600n)*c),"Duration.ofMinutes(long)":(n,[e])=>D(n,_(n,f(e)*60n)*c),"Duration.ofSeconds(long)":(n,[e])=>D(n,f(e)*c),"Duration.ofSeconds(long,long)":(n,[e,t])=>D(n,f(e)*c+f(t)),"Duration.ofMillis(long)":(n,[e])=>D(n,f(e)*1000000n),"Duration.ofNanos(long)":(n,[e])=>D(n,f(e)),"Duration.of(long,TemporalUnit)":(n,[e,t])=>D(n,ze(n,e,t)),"Duration.between(Temporal,Temporal)":(n,[e,t])=>Kt(n,e,t),"Duration.parse(CharSequence)":(n,[e])=>Jt(n,G(n,e,"text"))};(globalThis.javaOnlineCompilerLibraryParts??={})["java-library-time"]=_t;})();\n';export{e as JAVA_LIBRARY,t as JAVA_LIBRARY_SOURCE};