this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add Editor.View.set_doc

ArthurW 1becf891 5f53cc70

+377 -301
example/src/index.bc-for-jsoo

This is a binary file and will not be displayed.

+358 -301
example/src/index.bc.js
··· 1 1 // Generated by js_of_ocaml 2 - //# buildInfo:effects=false, kind=exe, use-js-string=true, version=5.7.1 2 + //# buildInfo:effects=disabled, kind=exe, use-js-string=true, version=6.0.1 3 3 (function(a){typeof 4 4 globalThis!=="object"&&(this?b():(a.defineProperty(a.prototype,"_T_",{configurable:true,get:b}),_T_));function 5 5 b(){var ··· 5932 5932 sb(){if(eC)return eC;var 5933 5933 a=r9(new 5934 5934 cU(C.create({extensions:fr}),0,true));return eC=a?a.options:[]}ar.__CM__view=e;ar.__CM__state=C;ar.__CM__lint=jL;ar.__CM__autocomplete=jK;ar.__CM__hoverTooltip=kw;ar.__CM__basic_setup=pS;ar.__CM__dark=jM;ar.__CM__stream_parser=jJ;ar.__CM__mllike=tN;ar.__CM__markdown=tb}())}(globalThis));(function(a){var 5935 - b=a;b.__CM__view=require("@codemirror/basic-setup").EditorView;b.__CM__state=require("@codemirror/basic-setup").EditorState;b.__CM__basic_setup=require("@codemirror/basic-setup").basicSetup;b.__CM__markdown=require("@codemirror/lang-markdown").markdown}(globalThis));(function(d){"use strict";var 5936 - ax=252,aG="Sys_error",k=0x80,aE="ENOTEMPTY",aF="EEXIST",aP="Invalid_argument",ad="mkdir",aw=": file descriptor already closed",V="EBADF",_=" : flags Open_text and Open_binary are not compatible",aY="console",z=1024,ac="fs",aX="/static/",aD="Stack_overflow",Y=": Not a directory",Z="ENOENT",aO="Pervasives.do_at_exit",U=" : flags Open_rdonly and Open_wronly are not compatible",aC="Undefined_recursive_module",aN=65536,aW="Assert_failure",aM=512,aB=0x800,aK="Match_failure",aL="closedir",az="Division_by_zero",aA=" : is a directory",aV=0xdfff,aU="End_of_file",w=0x3f,aS="Out_of_memory",aT=": closedir failed",f="",av="([^/]+)",$="rmdir",T="jsError",aR="Not_found",F='"',X=" : file already exists",aJ="fd ",ab="Failure",G=": No such file or directory",W=128,H="Unix.Unix_error",at="Sys_blocked_io",au=0xdc00,aQ="^",g=248,aa="ENOTDIR",aI=0xe0,m="/",ay="index out of bounds",aH=0xf0;function 5937 - bt(a){var 5935 + b=a;b.__CM__view=require("@codemirror/basic-setup").EditorView;b.__CM__state=require("@codemirror/basic-setup").EditorState;b.__CM__basic_setup=require("@codemirror/basic-setup").basicSetup;b.__CM__markdown=require("@codemirror/lang-markdown").markdown}(globalThis));(function(c){"use strict";var 5936 + aN="Sys_error",aO="readdir",o=0x80,aM="ENOTEMPTY",ah="EEXIST",L=1000,ao="mkdir",an="open",ba=" doesn't exist",a$="/static/",aL="Stack_overflow",H="ENOENT",am="node:fs",v=0xff,aK="Undefined_recursive_module",U="no such file or directory",T="lseek",a_="Assert_failure",al="EISDIR",a9="not a directory",A=0x8000,aJ=0x800,aI="Division_by_zero",a7="file already exists",a8=0xdfff,a6="End_of_file",z=0x3f,a4="Out_of_memory",a5="illegal operation on a directory",K="bad file descriptor",a3="win32",a2="Not_found",ak="Failure",aH="truncate",ag=128,a1="Unix.Unix_error",a0="^",J="invalid argument",V="ENOTDIR",q="/",aG="index out of bounds",aZ="write",aF=252,aY="Invalid_argument",y="EBADF",t=0xffffff,I=1024,aX="Pervasives.do_at_exit",x="EINVAL",aW=65536,aT="read",aU=", ",aV=512,aS="Match_failure",e="",aE="([^/]+)",aj="rmdir",af="jsError",S='"',G=0xffff,aR="fd ",aD="illegal seek",aB="Sys_blocked_io",aC=0xdc00,i=248,ai="ESPIPE",aQ=0xe0,aP=0xf0;function 5937 + bT(a){var 5938 5938 c=[0];while(a!==0){var 5939 5939 d=a[1];for(var 5940 5940 b=1;b<d.length;b++)c.push(d[b]);a=a[2]}return c}function 5941 - bu(a){return a[1]}function 5942 - I(d,c){var 5943 - f=d.l>=0?d.l:d.l=d.length,e=c.length,b=f-e;if(b==0)return d.apply(null,c);else if(b<0){var 5944 - a=d.apply(null,c.slice(0,f));if(typeof 5945 - a!=="function")return a;return I(a,c.slice(f))}else{switch(b){case 5941 + bU(a){return a[1]}function 5942 + W(c,e){var 5943 + f=c.l>=0?c.l:c.l=c.length,d=e.length,b=f-d;if(b===0)return c(...e);else if(b<0){var 5944 + a=c(...e.slice(0,f));if(typeof 5945 + a!=="function")return a;return W(a,e.slice(f))}else{switch(b){case 5946 5946 1:{var 5947 5947 a=function(a){var 5948 5948 f=new 5949 - Array(e+1);for(var 5950 - b=0;b<e;b++)f[b]=c[b];f[e]=a;return d.apply(null,f)};break}case 5949 + Array(d+1);for(var 5950 + b=0;b<d;b++)f[b]=e[b];f[d]=a;return c(...f)};break}case 5951 5951 2:{var 5952 5952 a=function(a,b){var 5953 5953 g=new 5954 - Array(e+2);for(var 5955 - f=0;f<e;f++)g[f]=c[f];g[e]=a;g[e+1]=b;return d.apply(null,g)};break}default:var 5956 - a=function(){var 5957 - e=arguments.length==0?1:arguments.length,b=new 5958 - Array(c.length+e);for(var 5959 - a=0;a<c.length;a++)b[a]=c[a];for(var 5960 - a=0;a<arguments.length;a++)b[c.length+a]=arguments[a];return I(d,b)}}a.l=b;return a}}function 5961 - bW(a){var 5962 - b=d.process;if(b&&b.env&&b.env[a]!=undefined)return b.env[a];if(d.jsoo_static_env&&d.jsoo_static_env[a])return d.jsoo_static_env[a]}var 5963 - am=0;(function(){var 5964 - c=bW("OCAMLRUNPARAM");if(c!==undefined){var 5954 + Array(d+2);for(var 5955 + f=0;f<d;f++)g[f]=e[f];g[d]=a;g[d+1]=b;return c(...g)};break}default:var 5956 + a=function(...a){if(a.length===0)a=[undefined];return W(c,e.concat(a))}}a.l=b;return a}}var 5957 + by={};function 5958 + cn(a){if(by[a])return by[a];var 5959 + b=c.process;if(b&&b.env&&b.env[a]!==undefined)return b.env[a];if(c.jsoo_env&&typeof 5960 + c.jsoo_env[a]==="string")return c.jsoo_env[a]}var 5961 + Y=0;(function(){var 5962 + c=cn("OCAMLRUNPARAM");if(c!==undefined){var 5965 5963 b=c.split(",");for(var 5966 - a=0;a<b.length;a++)if(b[a]=="b"){am=1;break}else if(b[a].startsWith("b="))am=+b[a].slice(2);else 5964 + a=0;a<b.length;a++)if(b[a]==="b"){Y=1;break}else if(b[a].startsWith("b="))Y=+b[a].slice(2);else 5967 5965 continue}}());var 5968 - i=[0];function 5969 - bB(a,b){if(!a.js_error||b||a[0]==g)a.js_error=new 5970 - d.Error("Js exception containing backtrace");return a}function 5971 - ak(a,b){return am?bB(a,b):a}function 5972 - bO(a,b){throw ak([0,a,b])}function 5973 - s(a){return a}function 5974 - al(a,b){bO(a,s(b))}function 5975 - aj(a){al(i.Invalid_argument,a)}function 5976 - bs(){aj(ay)}function 5977 - by(a,b){if(b>>>0>=a.length-1)bs();return a}var 5978 - bN=0;function 5979 - bD(){return bN++}function 5980 - ai(a){if(!i.Failure)i.Failure=[g,s(ab),-3];al(i.Failure,a)}function 5981 - an(a){if(a.length<24){for(var 5966 + cf=Y,j=[0];function 5967 + b2(a,b){if(!a.js_error||b||a[0]===i)a.js_error=new 5968 + c.Error("Js exception containing backtrace");return a}function 5969 + at(a,b){return Y&&cf?b2(a,b):a}function 5970 + bq(a,b){throw at([0,a,b])}function 5971 + Q(a){return a}function 5972 + bs(a,b){bq(a,Q(b))}function 5973 + as(a){bs(j.Invalid_argument,a)}function 5974 + bS(){as(aG)}function 5975 + bZ(a,b){if(b>>>0>=a.length-1)bS();return a}var 5976 + cd=0;function 5977 + b4(){return cd++}function 5978 + bf(a){if(!j.Failure)j.Failure=[i,Q(ak),-3];bs(j.Failure,a)}function 5979 + av(a){if(a.length<24){for(var 5982 5980 b=0;b<a.length;b++)if(a.charCodeAt(b)>127)return false;return true}else 5983 5981 return!/[^\x00-\x7f]/.test(a)}function 5984 - a$(a){for(var 5985 - l=f,d=f,h,g,i,b,c=0,j=a.length;c<j;c++){g=a.charCodeAt(c);if(g<k){for(var 5986 - e=c+1;e<j&&(g=a.charCodeAt(e))<k;e++);if(e-c>aM){d.substr(0,1);l+=d;d=f;l+=a.slice(c,e)}else 5987 - d+=a.slice(c,e);if(e==j)break;c=e}b=1;if(++c<j&&((i=a.charCodeAt(c))&-64)==W){h=i+(g<<6);if(g<aI){b=h-0x3080;if(b<k)b=1}else{b=2;if(++c<j&&((i=a.charCodeAt(c))&-64)==W){h=i+(h<<6);if(g<aH){b=h-0xe2080;if(b<aB||b>=0xd7ff&&b<0xe000)b=2}else{b=3;if(++c<j&&((i=a.charCodeAt(c))&-64)==W&&g<0xf5){b=i-0x3c82080+(h<<6);if(b<0x10000||b>0x10ffff)b=3}}}}}if(b<4){c-=b;d+="\ufffd"}else if(b>0xffff)d+=String.fromCharCode(0xd7c0+(b>>10),au+(b&0x3FF));else 5988 - d+=String.fromCharCode(b);if(d.length>z){d.substr(0,1);l+=d;d=f}}return l+d}function 5989 - a5(a){if(an(a))return a;return a$(a)}function 5990 - E(){return typeof 5991 - d.process!=="undefined"&&typeof 5992 - d.process.versions!=="undefined"&&typeof 5993 - d.process.versions.node!=="undefined"}function 5994 - bX(){function 5995 - a(a){if(a.charAt(0)===m)return[f,a.substring(1)];return}function 5982 + bw(a){for(var 5983 + k=e,d=e,h,g,i,b,c=0,j=a.length;c<j;c++){g=a.charCodeAt(c);if(g<o){for(var 5984 + f=c+1;f<j&&(g=a.charCodeAt(f))<o;f++);if(f-c>aV){d.slice(0,1);k+=d;d=e;k+=a.slice(c,f)}else 5985 + d+=a.slice(c,f);if(f===j)break;c=f}b=1;if(++c<j&&((i=a.charCodeAt(c))&-64)===ag){h=i+(g<<6);if(g<aQ){b=h-0x3080;if(b<o)b=1}else{b=2;if(++c<j&&((i=a.charCodeAt(c))&-64)===ag){h=i+(h<<6);if(g<aP){b=h-0xe2080;if(b<aJ||b>=0xd7ff&&b<0xe000)b=2}else{b=3;if(++c<j&&((i=a.charCodeAt(c))&-64)===ag&&g<0xf5){b=i-0x3c82080+(h<<6);if(b<0x10000||b>0x10ffff)b=3}}}}}if(b<4){c-=b;d+="\ufffd"}else if(b>G)d+=String.fromCharCode(0xd7c0+(b>>10),aC+(b&0x3ff));else 5986 + d+=String.fromCharCode(b);if(d.length>I){d.slice(0,1);k+=d;d=e}}return k+d}function 5987 + bl(a){if(av(a))return a;return bw(a)}function 5988 + R(){return typeof 5989 + c.process!=="undefined"&&typeof 5990 + c.process.versions!=="undefined"&&typeof 5991 + c.process.versions.node!=="undefined"}function 5992 + co(){function 5993 + a(a){if(a.charAt(0)===q)return[e,a.slice(1)];return}function 5996 5994 b(a){var 5997 - h=/^([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?([\\/])?([\s\S]*?)$/,b=h.exec(a),c=b[1]||f,e=Boolean(c&&c.charAt(1)!==":");if(Boolean(b[2]||e)){var 5998 - d=b[1]||f,g=b[2]||f;return[d,a.substring(d.length+g.length)]}return}return E()&&d.process&&d.process.platform?d.process.platform==="win32"?b:a:a}var 5999 - ao=bX();function 6000 - a_(a){return a.slice(-1)!==m?a+m:a}if(E()&&d.process&&d.process.cwd)var 6001 - C=d.process.cwd().replace(/\\/g,m);else 5995 + h=/^([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?([\\/])?([\s\S]*?)$/,b=h.exec(a),c=b[1]||e,f=c.length>0&&c.charAt(1)!==":";if(b[2]||f){var 5996 + d=b[1]||e,g=b[2]||e;return[d,a.slice(d.length+g.length)]}return}return R()&&c.process&&c.process.platform?c.process.platform===a3?b:a:a}var 5997 + aw=co();function 5998 + bv(a){return a.slice(-1)!==q?a+q:a}if(R()&&c.process&&c.process.cwd)var 5999 + N=c.process.cwd().replace(/\\/g,q);else 6002 6000 var 6003 - C="/static";C=a_(C);function 6004 - bG(a){a=a5(a);if(!ao(a))a=C+a;var 6005 - e=ao(a),d=e[1].split(m),b=[];for(var 6001 + N="/static";N=bv(N);function 6002 + b8(a){a=bl(a);if(!aw(a))a=N+a;var 6003 + e=aw(a),d=e[1].split(/[/\\]/),b=[];for(var 6006 6004 c=0;c<d.length;c++)switch(d[c]){case"..":if(b.length>1)b.pop();break;case".":break;case"":break;default:b.push(d[c]);break}b.unshift(e[0]);b.orig=a;return b}function 6007 - bU(a){for(var 6008 - g=f,c=g,b,i,d=0,h=a.length;d<h;d++){b=a.charCodeAt(d);if(b<k){for(var 6009 - e=d+1;e<h&&(b=a.charCodeAt(e))<k;e++);if(e-d>aM){c.substr(0,1);g+=c;c=f;g+=a.slice(d,e)}else 6010 - c+=a.slice(d,e);if(e==h)break;d=e}if(b<aB){c+=String.fromCharCode(0xc0|b>>6);c+=String.fromCharCode(k|b&w)}else if(b<0xd800||b>=aV)c+=String.fromCharCode(aI|b>>12,k|b>>6&w,k|b&w);else if(b>=0xdbff||d+1==h||(i=a.charCodeAt(d+1))<au||i>aV)c+="\xef\xbf\xbd";else{d++;b=(b<<10)+i-0x35fdc00;c+=String.fromCharCode(aH|b>>18,k|b>>12&w,k|b>>6&w,k|b&w)}if(c.length>z){c.substr(0,1);g+=c;c=f}}return g+c}function 6011 - D(a){return an(a)?s(a):s(bU(a))}var 6012 - bY=["E2BIG","EACCES","EAGAIN",V,"EBUSY","ECHILD","EDEADLK","EDOM",aF,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",Z,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",aa,aE,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function 6013 - p(a,b,c,d){var 6014 - e=bY.indexOf(a);if(e<0){if(d==null)d=-9999;e=[0,d]}var 6015 - g=[e,D(b||f),D(c||f)];return g}var 6016 - a7={};function 6017 - r(a){return a7[a]}function 6018 - o(a,b){throw ak([0,a].concat(b))}function 6019 - bQ(a,b){if(a==0)return f;if(b.repeat)return b.repeat(a);var 6020 - d=f,c=0;for(;;){if(a&1)d+=b;a>>=1;if(a==0)return d;b+=b;c++;if(c==9)b.slice(0,1)}}function 6021 - L(a,b,c){var 6022 - d=String.fromCharCode;if(b==0&&c<=4096&&c==a.length)return d.apply(null,a);var 6023 - e=f;for(;0<c;b+=z,c-=z)e+=d.apply(null,a.slice(b,b+Math.min(c,z)));return e}function 6024 - bz(a){if(a.t==2)a.c+=bQ(a.l-a.c.length,"\0");else 6025 - a.c=L(a.c,0,a.c.length);a.t=0}function 6026 - n(a,b,c){this.t=a;this.c=b;this.l=c}n.prototype.toString=function(){switch(this.t){case 6027 - 9:return this.c;default:bz(this);case 6028 - 0:if(an(this.c)){this.t=9;return this.c}this.t=8;case 6029 - 8:return this.c}};n.prototype.toUtf16=function(){var 6030 - a=this.toString();if(this.t==9)return a;return a$(a)};n.prototype.slice=function(){var 6031 - a=this.t==4?this.c.slice():this.c;return new 6032 - n(this.t,a,this.l)};function 6033 - a3(a){return a 6005 + cl(a){for(var 6006 + g=e,c=g,b,i,d=0,h=a.length;d<h;d++){b=a.charCodeAt(d);if(b<o){for(var 6007 + f=d+1;f<h&&(b=a.charCodeAt(f))<o;f++);if(f-d>aV){c.slice(0,1);g+=c;c=e;g+=a.slice(d,f)}else 6008 + c+=a.slice(d,f);if(f===h)break;d=f}if(b<aJ){c+=String.fromCharCode(0xc0|b>>6);c+=String.fromCharCode(o|b&z)}else if(b<0xd800||b>=a8)c+=String.fromCharCode(aQ|b>>12,o|b>>6&z,o|b&z);else if(b>=0xdbff||d+1===h||(i=a.charCodeAt(d+1))<aC||i>a8)c+="\xef\xbf\xbd";else{d++;b=(b<<10)+i-0x35fdc00;c+=String.fromCharCode(aP|b>>18,o|b>>12&z,o|b>>6&z,o|b&z)}if(c.length>I){c.slice(0,1);g+=c;c=e}}return g+c}function 6009 + s(a){return av(a)?Q(a):Q(cl(a))}function 6010 + m(a){bq(j.Sys_error,s(a))}function 6011 + br(a,b){throw at([0,a].concat(b))}var 6012 + cp=["E2BIG","EACCES","EAGAIN",y,"EBUSY","ECHILD","EDEADLK","EDOM",ah,"EFAULT","EFBIG","EINTR",x,"EIO",al,"EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",H,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",V,aM,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS",ai,"ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function 6013 + bA(a,b,c,d){var 6014 + f=cp.indexOf(a);if(f<0){if(d==null)d=-9999;f=[0,-d]}var 6015 + g=[f,s(b||e),s(c||e)];return g}var 6016 + bo={};function 6017 + C(a){return bo[a]}function 6018 + f(a,b,c,d,e){var 6019 + f=C(a1);if(a&&f)br(f,bA(b,c,e));else{var 6020 + d=b+": "+d+aU+c;if(e!==undefined)d+=" '"+e+"'";m(d)}}function 6021 + ch(a,b){if(a===0)return e;if(b.repeat)return b.repeat(a);var 6022 + d=e,c=0;for(;;){if(a&1)d+=b;a>>=1;if(a===0)return d;b+=b;c++;if(c===9)b.slice(0,1)}}function 6023 + _(a,b,c){var 6024 + d=String.fromCharCode;if(b===0&&c<=4096&&c===a.length)return d.apply(null,a);var 6025 + f=e;for(;0<c;b+=I,c-=I)f+=d.apply(null,a.subarray(b,b+Math.min(c,I)));return f}function 6026 + b0(a){if(a.t===2)a.c+=ch(a.l-a.c.length,"\0");else 6027 + a.c=_(a.c,0,a.c.length);a.t=0}function 6028 + p(a,b,c){this.t=a;this.c=b;this.l=c}p.prototype.toString=function(){switch(this.t){case 6029 + 9:case 6030 + 8:return this.c;case 6031 + 4:case 6032 + 2:b0(this);case 6033 + 0:if(av(this.c))this.t=9;else 6034 + this.t=8;return this.c}};p.prototype.toUtf16=function(){var 6035 + a=this.toString();if(this.t===9)return a;return bw(a)};p.prototype.slice=function(){var 6036 + a=this.t===4?this.c.slice():this.c;return new 6037 + p(this.t,a,this.l)};function 6038 + bi(a){return a 6034 6039 instanceof 6035 - n}function 6036 - a4(a){return typeof 6040 + p}function 6041 + bj(a){return typeof 6037 6042 a==="string"&&!/[^\x00-\xff]/.test(a)}function 6038 - ae(a){if(!(a 6043 + bX(a){if(!(a 6039 6044 instanceof 6040 6045 Uint8Array))a=new 6041 6046 Uint8Array(a);return new 6042 - n(4,a,a.length)}function 6043 - a0(a){return new 6044 - n(0,a,a.length)}function 6045 - J(a){return a}function 6046 - af(a){return a0(J(a))}function 6047 - e(a){al(i.Sys_error,a)}function 6048 - a8(a){e(a+G)}function 6049 - ah(a){var 6047 + p(4,a,a.length)}function 6048 + bd(a){return new 6049 + p(0,a,a.length)}function 6050 + bk(a){return a}function 6051 + ap(a){return bd(bk(a))}function 6052 + bp(a,b){f(b,H,U,a)}function 6053 + ar(a){var 6050 6054 c=new 6051 6055 Uint8Array(a.l),e=a.c,d=e.length,b=0;for(;b<d;b++)c[b]=e.charCodeAt(b);for(d=a.l;b<d;b++)c[b]=0;a.c=c;a.t=4;return c}function 6052 - bT(a){if(a.t!=4)ah(a);return a.c}function 6053 - u(a){if(a<0)aj("Bytes.create");return new 6054 - n(a?2:9,f,a)}function 6055 - bH(a){return a.l}function 6056 - B(a,b,c,d,e){if(e==0)return 0;if(d==0&&(e>=c.l||c.t==2&&e>=c.c.length)){c.c=a.t==4?L(a.c,b,e):b==0&&a.c.length==e?a.c:a.c.substr(b,e);c.t=c.c.length==c.l?0:2}else if(c.t==2&&d==c.c.length){c.c+=a.t==4?L(a.c,b,e):b==0&&a.c.length==e?a.c:a.c.substr(b,e);c.t=c.c.length==c.l?0:2}else{if(c.t!=4)ah(c);var 6057 - g=a.c,h=c.c;if(a.t==4)if(d<=b)for(var 6056 + ck(a){if(a.t!==4)ar(a);return a.c}function 6057 + be(a){return new 6058 + p(4,a,a.length)}function 6059 + B(a){if(a<0)as("Bytes.create");return new 6060 + p(a?2:9,e,a)}function 6061 + b9(a){return a.l}function 6062 + M(a,b,c,d,e){if(e===0)return 0;if(d===0&&(e>=c.l||c.t===2&&e>=c.c.length)){c.c=a.t===4?_(a.c,b,e):b===0&&a.c.length===e?a.c:a.c.slice(b,b+e);c.t=c.c.length===c.l?0:2}else if(c.t===2&&d===c.c.length){c.c+=a.t===4?_(a.c,b,e):b===0&&a.c.length===e?a.c:a.c.slice(b,b+e);c.t=c.c.length===c.l?0:2}else{if(c.t!==4)ar(c);var 6063 + g=a.c,h=c.c;if(a.t===4)if(d<=b)for(var 6058 6064 f=0;f<e;f++)h[d+f]=g[b+f];else 6059 6065 for(var 6060 6066 f=e-1;f>=0;f--)h[d+f]=g[b+f];else{var 6061 6067 i=Math.min(e,g.length-b);for(var 6062 6068 f=0;f<i;f++)h[d+f]=g.charCodeAt(b+f);for(;f<e;f++)h[d+f]=0}}return 0}function 6063 - aZ(){}function 6064 - h(a){this.data=a}h.prototype=new 6065 - aZ();h.prototype.constructor=h;h.prototype.truncate=function(a){var 6066 - b=this.data;this.data=u(a|0);B(b,0,this.data,0,a)};h.prototype.length=function(){return bH(this.data)};h.prototype.write=function(a,b,c,d){var 6069 + bc(){}function 6070 + k(a){this.data=a}k.prototype=new 6071 + bc();k.prototype.constructor=k;k.prototype.truncate=function(a){var 6072 + b=this.data;this.data=B(a|0);M(b,0,this.data,0,a)};k.prototype.length=function(){return b9(this.data)};k.prototype.write=function(a,b,c,d){var 6067 6073 e=this.length();if(a+d>=e){var 6068 - f=u(a+d),g=this.data;this.data=f;B(g,0,this.data,0,e)}B(ae(b),c,this.data,a,d);return 0};h.prototype.read=function(a,b,c,d){var 6074 + f=B(a+d),g=this.data;this.data=f;M(g,0,this.data,0,e)}M(be(b),c,this.data,a,d);return d};k.prototype.read=function(a,b,c,d){var 6069 6075 e=this.length();if(a+d>=e)d=e-a;if(d){var 6070 - f=u(d|0);B(this.data,a,f,0,d);b.set(bT(f),c)}return d};function 6071 - t(a,b,c){this.file=b;this.name=a;this.flags=c}t.prototype.err_closed=function(){e(this.name+aw)};t.prototype.length=function(){if(this.file)return this.file.length();this.err_closed()};t.prototype.write=function(a,b,c,d){if(this.file)return this.file.write(a,b,c,d);this.err_closed()};t.prototype.read=function(a,b,c,d){if(this.file)return this.file.read(a,b,c,d);this.err_closed()};t.prototype.close=function(){this.file=undefined};function 6076 + f=B(d|0);M(this.data,a,f,0,d);b.set(ck(f),c)}return d};function 6077 + r(a,b,c){this.file=b;this.name=a;this.flags=c;this.offset=0;this.seeked=false}r.prototype.err_closed=function(a,b){f(b,y,a,K)};r.prototype.length=function(){if(this.file)return this.file.length();this.err_closed("length")};r.prototype.truncate=function(a,b){if(this.file){if(!(this.flags.wronly||this.flags.rdwr))f(b,x,aH,J);return this.file.truncate(a)}this.err_closed(aH,b)};r.prototype.write=function(a,b,c,d){if(this.file&&(this.flags.wronly||this.flags.rdwr)){var 6078 + e=this.offset;this.offset+=c;return this.file.write(e,a,b,c)}this.err_closed(aZ,d)};r.prototype.read=function(a,b,c,d){if(this.file&&!this.flags.wronly){var 6079 + e=this.offset;this.offset+=c;return this.file.read(e,a,b,c)}this.err_closed(aT,d)};r.prototype.seek=function(a,b,c){switch(b){case 6080 + 0:break;case 6081 + 1:a+=this.offset;break;case 6082 + 2:a+=this.length();break}if(a<0)f(c,x,T,J);this.offset=a;this.seeked=true};r.prototype.close=function(){if(!this.file)this.err_closed("close");this.file=undefined};r.prototype.check_stream_semantics=function(a){if(!this.file)return this.err_closed(a,1)};function 6072 6083 a(a,b){this.content={};this.root=a;this.lookupFun=b}a.prototype.nm=function(a){return this.root+a};a.prototype.create_dir_if_needed=function(a){var 6073 - d=a.split(m),c=f;for(var 6074 - b=0;b<d.length-1;b++){c+=d[b]+m;if(this.content[c])continue;this.content[c]=Symbol("directory")}};a.prototype.slash=function(a){return/\/$/.test(a)?a:a+m};a.prototype.lookup=function(a){if(!this.content[a]&&this.lookupFun){var 6084 + d=a.split(q),c=e;for(var 6085 + b=0;b<d.length-1;b++){c+=d[b]+q;if(this.content[c])continue;this.content[c]=Symbol("directory")}};a.prototype.slash=function(a){return/\/$/.test(a)?a:a+q};a.prototype.lookup=function(a){if(!this.content[a]&&this.lookupFun){var 6075 6086 b=this.lookupFun(s(this.root),s(a));if(b!==0){this.create_dir_if_needed(a);this.content[a]=new 6076 - h(af(b[1]))}}};a.prototype.exists=function(a){if(a==f)return 1;var 6077 - b=this.slash(a);if(this.content[b])return 1;this.lookup(a);return this.content[a]?1:0};a.prototype.isFile=function(a){return this.exists(a)&&!this.is_dir(a)?1:0};a.prototype.mkdir=function(a,b,c){var 6078 - g=c&&r(H);if(this.exists(a))if(g)o(g,p(aF,ad,this.nm(a)));else 6079 - e(a+": File exists");var 6080 - d=/^(.*)\/[^/]+/.exec(a);d=d&&d[1]||f;if(!this.exists(d))if(g)o(g,p(Z,ad,this.nm(d)));else 6081 - e(d+G);if(!this.is_dir(d))if(g)o(g,p(aa,ad,this.nm(d)));else 6082 - e(d+Y);this.create_dir_if_needed(this.slash(a))};a.prototype.rmdir=function(a,b){var 6083 - c=b&&r(H),d=a==f?f:this.slash(a),h=new 6084 - RegExp(aQ+d+av);if(!this.exists(a))if(c)o(c,p(Z,$,this.nm(a)));else 6085 - e(a+G);if(!this.is_dir(a))if(c)o(c,p(aa,$,this.nm(a)));else 6086 - e(a+Y);for(var 6087 - g 6087 + k(ap(b[1]))}}};a.prototype.exists=function(a,b){if(a===e)return 1;var 6088 + c=this.slash(a);if(this.content[c])return 1;if(!b)this.lookup(a);return this.content[a]?1:0};a.prototype.isFile=function(a){return this.exists(a)&&!this.is_dir(a)?1:0};a.prototype.mkdir=function(a,b,c){if(this.exists(a))f(c,ah,ao,a7,this.nm(a));var 6089 + d=/^(.*)\/[^/]+/.exec(a);d=d&&d[1]||e;if(!this.exists(d))f(c,H,ao,U,this.nm(a));if(!this.is_dir(d))f(c,V,ao,a9,this.nm(a));this.create_dir_if_needed(this.slash(a))};a.prototype.rmdir=function(a,b){var 6090 + c=a===e?e:this.slash(a),g=new 6091 + RegExp(a0+c+aE);if(!this.exists(a))f(b,H,aj,U,this.nm(a));if(!this.is_dir(a))f(b,V,aj,a9,this.nm(a));for(var 6092 + d 6088 6093 in 6089 - this.content)if(g.match(h))if(c)o(c,p(aE,$,this.nm(a)));else 6090 - e(this.nm(a)+": Directory not empty");delete 6091 - this.content[d]};a.prototype.readdir=function(a){var 6092 - h=a==f?f:this.slash(a);if(!this.exists(a))e(a+G);if(!this.is_dir(a))e(a+Y);var 6093 - i=new 6094 - RegExp(aQ+h+av),d={},c=[];for(var 6095 - g 6094 + this.content)if(d.match(g))f(b,aM,aj,"directory not empty",this.nm(a));delete 6095 + this.content[c]};a.prototype.readdir=function(a){var 6096 + g=a===e?e:this.slash(a);if(!this.exists(a))m(a+": No such file or directory");if(!this.is_dir(a))m(a+": Not a directory");var 6097 + h=new 6098 + RegExp(a0+g+aE),d={},c=[];for(var 6099 + f 6096 6100 in 6097 6101 this.content){var 6098 - b=g.match(i);if(b&&!d[b[1]]){d[b[1]]=true;c.push(b[1])}}return c};a.prototype.opendir=function(a,b){var 6099 - c=b&&r(H),d=this.readdir(a),f=false,g=0;return{readSync:function(){if(f)if(c)o(c,p(V,aL,this.nm(a)));else 6100 - e(a+aT);if(g==d.length)return null;var 6101 - b=d[g];g++;return{name:b}},closeSync:function(){if(f)if(c)o(c,p(V,aL,this.nm(a)));else 6102 - e(a+aT);f=true;d=[]}}};a.prototype.is_dir=function(a){if(a==f)return true;var 6103 - b=this.slash(a);return this.content[b]?1:0};a.prototype.unlink=function(a){var 6104 - b=this.content[a]?true:false;delete 6105 - this.content[a];return b};a.prototype.open=function(a,b){var 6106 - c;if(b.rdonly&&b.wronly)e(this.nm(a)+U);if(b.text&&b.binary)e(this.nm(a)+_);this.lookup(a);if(this.content[a]){if(this.is_dir(a))e(this.nm(a)+aA);if(b.create&&b.excl)e(this.nm(a)+X);c=this.content[a];if(b.truncate)c.truncate()}else if(b.create){this.create_dir_if_needed(a);this.content[a]=new 6107 - h(u(0));c=this.content[a]}else 6108 - a8(this.nm(a));return new 6109 - t(this.nm(a),c,b)};a.prototype.open=function(a,b){var 6110 - c;if(b.rdonly&&b.wronly)e(this.nm(a)+U);if(b.text&&b.binary)e(this.nm(a)+_);this.lookup(a);if(this.content[a]){if(this.is_dir(a))e(this.nm(a)+aA);if(b.create&&b.excl)e(this.nm(a)+X);c=this.content[a];if(b.truncate)c.truncate()}else if(b.create){this.create_dir_if_needed(a);this.content[a]=new 6111 - h(u(0));c=this.content[a]}else 6112 - a8(this.nm(a));return new 6113 - t(this.nm(a),c,b)};a.prototype.register=function(a,b){var 6114 - c;if(this.content[a])e(this.nm(a)+X);if(a3(b))c=new 6115 - h(b);if(a4(b))c=new 6116 - h(af(b));else if(b 6117 - instanceof 6118 - Array)c=new 6119 - h(ae(b));else if(typeof 6102 + b=f.match(h);if(b&&!d[b[1]]){d[b[1]]=true;c.push(b[1])}}return c};a.prototype.opendir=function(a,b){var 6103 + c=this.readdir(a),d=false,e=0;return{readSync:function(){if(d)f(b,y,aO,K);if(e===c.length)return null;var 6104 + a=c[e];e++;return{name:a}},closeSync:function(){if(d)f(b,y,aO,K);d=true;c=[]}}};a.prototype.is_dir=function(a){if(a===e)return true;var 6105 + b=this.slash(a);return this.content[b]?1:0};a.prototype.unlink=function(a,b){if(!this.exists(a,true))f(b,H,"unlink",U,a);delete 6106 + this.content[a];return 0};a.prototype.open=function(a,b,c,d){var 6107 + e;this.lookup(a);if(this.content[a]){if(this.is_dir(a))f(d,al,an,a5,this.nm(a));if(b.create&&b.excl)f(d,ah,an,a7,this.nm(a));e=this.content[a];if(b.truncate)e.truncate()}else if(b.create){this.create_dir_if_needed(a);this.content[a]=new 6108 + k(B(0));e=this.content[a]}else 6109 + bp(this.nm(a),d);return new 6110 + r(this.nm(a),e,b)};a.prototype.truncate=function(a,b,c){var 6111 + d;this.lookup(a);if(this.content[a]){if(this.is_dir(a))f(c,al,an,a5,this.nm(a));d=this.content[a];d.truncate(b)}else 6112 + bp(this.nm(a),c)};a.prototype.register=function(a,b){var 6113 + c;if(this.content[a])m(this.nm(a)+" : file already exists");if(bi(b))c=new 6114 + k(b);if(bj(b))c=new 6115 + k(ap(b));else if(Array.isArray(b))c=new 6116 + k(bX(b));else if(typeof 6120 6117 b==="string")c=new 6121 - h(a0(b));else if(b.toString){var 6122 - d=af(D(b.toString()));c=new 6123 - h(d)}if(c){this.create_dir_if_needed(a);this.content[a]=c}else 6124 - e(this.nm(a)+" : registering file with invalid content type")};a.prototype.constructor=a;function 6125 - bL(a){return a.length}function 6126 - bR(a,b){return a.charCodeAt(b)}function 6127 - b2(a){var 6128 - d=bL(a),c=new 6129 - Uint8Array(d),b=0;for(;b<d;b++)c[b]=bR(a,b);return c}function 6130 - bw(){aj(ay)}function 6131 - bx(a,b,c){c&=0xff;if(a.t!=4){if(b==a.c.length){a.c+=String.fromCharCode(c);if(b+1==a.l)a.t=0;return 0}ah(a)}a.c[b]=c;return 0}function 6132 - b0(a,b,c){if(b>>>0>=a.l)bw();return bx(a,b,c)}function 6133 - l(a,b){this.fs=require(ac);this.fd=a;this.flags=b}l.prototype=new 6134 - aZ();l.prototype.constructor=l;l.prototype.truncate=function(a){try{this.fs.ftruncateSync(this.fd,a|0)}catch(f){e(f.toString())}};l.prototype.length=function(){try{return this.fs.fstatSync(this.fd).size}catch(f){e(f.toString())}};l.prototype.write=function(a,b,c,d){try{if(this.flags.isCharacterDevice)this.fs.writeSync(this.fd,b,c,d);else 6135 - this.fs.writeSync(this.fd,b,c,d,a)}catch(f){e(f.toString())}return 0};l.prototype.read=function(a,b,c,d){try{if(this.flags.isCharacterDevice)var 6136 - f=this.fs.readSync(this.fd,b,c,d);else 6118 + k(bd(b));else if(b.toString){var 6119 + d=ap(s(b.toString()));c=new 6120 + k(d)}if(c){this.create_dir_if_needed(a);this.content[a]=c}else 6121 + m(this.nm(a)+" : registering file with invalid content type")};a.prototype.constructor=a;function 6122 + h(a,b,c){var 6123 + d=C(a1);if(b&&d){var 6124 + e=bA(a.code,c||a.syscall,a.path,a.errno);br(d,e)}else 6125 + m(a.toString())}var 6126 + O=Math.pow(2,-24);function 6127 + ce(a){throw a}function 6128 + bt(){ce(j.Division_by_zero)}function 6129 + b(a,b,c){this.lo=a&t;this.mi=b&t;this.hi=c&G}b.prototype.caml_custom="_j";b.prototype.copy=function(){return new 6130 + b(this.lo,this.mi,this.hi)};b.prototype.ucompare=function(a){if(this.hi>a.hi)return 1;if(this.hi<a.hi)return-1;if(this.mi>a.mi)return 1;if(this.mi<a.mi)return-1;if(this.lo>a.lo)return 1;if(this.lo<a.lo)return-1;return 0};b.prototype.compare=function(a){var 6131 + b=this.hi<<16,c=a.hi<<16;if(b>c)return 1;if(b<c)return-1;if(this.mi>a.mi)return 1;if(this.mi<a.mi)return-1;if(this.lo>a.lo)return 1;if(this.lo<a.lo)return-1;return 0};b.prototype.neg=function(){var 6132 + a=-this.lo,c=-this.mi+(a>>24),d=-this.hi+(c>>24);return new 6133 + b(a,c,d)};b.prototype.add=function(a){var 6134 + c=this.lo+a.lo,d=this.mi+a.mi+(c>>24),e=this.hi+a.hi+(d>>24);return new 6135 + b(c,d,e)};b.prototype.sub=function(a){var 6136 + c=this.lo-a.lo,d=this.mi-a.mi+(c>>24),e=this.hi-a.hi+(d>>24);return new 6137 + b(c,d,e)};b.prototype.mul=function(a){var 6138 + c=this.lo*a.lo,d=(c*O|0)+this.mi*a.lo+this.lo*a.mi,e=(d*O|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new 6139 + b(c,d,e)};b.prototype.isZero=function(){return(this.lo|this.mi|this.hi)===0};b.prototype.isNeg=function(){return this.hi<<16<0};b.prototype.and=function(a){return new 6140 + b(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};b.prototype.or=function(a){return new 6141 + b(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};b.prototype.xor=function(a){return new 6142 + b(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};b.prototype.shift_left=function(a){a=a&63;if(a===0)return this;if(a<24)return new 6143 + b(this.lo<<a,this.mi<<a|this.lo>>24-a,this.hi<<a|this.mi>>24-a);if(a<48)return new 6144 + b(0,this.lo<<a-24,this.mi<<a-24|this.lo>>48-a);return new 6145 + b(0,0,this.lo<<a-48)};b.prototype.shift_right_unsigned=function(a){a=a&63;if(a===0)return this;if(a<24)return new 6146 + b(this.lo>>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new 6147 + b(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new 6148 + b(this.hi>>a-48,0,0)};b.prototype.shift_right=function(a){a=a&63;if(a===0)return this;var 6149 + d=this.hi<<16>>16;if(a<24)return new 6150 + b(this.lo>>a|this.mi<<24-a,this.mi>>a|d<<24-a,this.hi<<16>>a>>>16);var 6151 + c=this.hi<<16>>31;if(a<48)return new 6152 + b(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,c&G);return new 6153 + b(this.hi<<16>>a-32,c,c)};b.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&t;this.lo=this.lo<<1&t};b.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&t;this.mi=(this.mi>>>1|this.hi<<23)&t;this.hi=this.hi>>>1};b.prototype.udivmod=function(a){var 6154 + e=0,d=this.copy(),c=a.copy(),f=new 6155 + b(0,0,0);while(d.ucompare(c)>0){e++;c.lsl1()}while(e>=0){e--;f.lsl1();if(d.ucompare(c)>=0){f.lo++;d=d.sub(c)}c.lsr1()}return{quotient:f,modulus:d}};b.prototype.div=function(a){var 6156 + b=this;if(a.isZero())bt();var 6157 + d=b.hi^a.hi;if(b.hi&A)b=b.neg();if(a.hi&A)a=a.neg();var 6158 + c=b.udivmod(a).quotient;if(d&A)c=c.neg();return c};b.prototype.mod=function(a){var 6159 + b=this;if(a.isZero())bt();var 6160 + d=b.hi;if(b.hi&A)b=b.neg();if(a.hi&A)a=a.neg();var 6161 + c=b.udivmod(a).modulus;if(d&A)c=c.neg();return c};b.prototype.toInt=function(){return this.lo|this.mi<<24};b.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};b.prototype.toArray=function(){return[this.hi>>8,this.hi&v,this.mi>>16,this.mi>>8&v,this.mi&v,this.lo>>16,this.lo>>8&v,this.lo&v]};b.prototype.lo32=function(){return this.lo|(this.mi&v)<<24};b.prototype.hi32=function(){return this.mi>>>8&G|this.hi<<16};function 6162 + b6(a){if(a<0)a=Math.ceil(a);return new 6163 + b(a&t,Math.floor(a*O)&t,Math.floor(a*O*O)&G)}function 6164 + au(a,b){var 6165 + c;if(a.isFile())c=0;else if(a.isDirectory())c=1;else if(a.isCharacterDevice())c=2;else if(a.isBlockDevice())c=3;else if(a.isSymbolicLink())c=4;else if(a.isFIFO())c=5;else if(a.isSocket())c=6;return[0,a.dev,a.ino|0,c,a.mode,a.nlink,a.uid,a.gid,a.rdev,b?b6(a.size):a.size|0,a.atimeMs/L,a.mtimeMs/L,a.ctimeMs/L]}function 6166 + cb(a){return a.length}function 6167 + ci(a,b){return a.charCodeAt(b)}function 6168 + ct(a){var 6169 + d=cb(a),c=new 6170 + Uint8Array(d),b=0;for(;b<d;b++)c[b]=ci(a,b);return c}function 6171 + bW(){as(aG)}function 6172 + bY(a,b,c){c&=v;if(a.t!==4){if(b===a.c.length){a.c+=String.fromCharCode(c);if(b+1===a.l)a.t=0;return 0}ar(a)}a.c[b]=c;return 0}function 6173 + cr(a,b,c){if(b>>>0>=a.l)bW();return bY(a,b,c)}function 6174 + l(a,b){this.fs=require(am);this.fd=a;this.flags=b;var 6175 + c=this.fs.fstatSync(a);b.noSeek=c.isCharacterDevice()||c.isFIFO()||c.isSocket();this.offset=this.flags.append?c.size:0;this.seeked=false}l.prototype=new 6176 + bc();l.prototype.constructor=l;l.prototype.truncate=function(a,b){try{this.fs.ftruncateSync(this.fd,a|0);if(this.offset>a)this.offset=a}catch(f){h(f,b)}};l.prototype.length=function(){try{return this.fs.fstatSync(this.fd).size}catch(f){m(f.toString())}};l.prototype.write=function(a,b,c,d){try{if(this.flags.noSeek||!this.seeked)var 6177 + e=this.fs.writeSync(this.fd,a,b,c);else 6137 6178 var 6138 - f=this.fs.readSync(this.fd,b,c,d,a);return f}catch(f){e(f.toString())}};l.prototype.close=function(){try{this.fs.closeSync(this.fd);return 0}catch(f){e(f.toString())}};function 6139 - c(a){this.fs=require(ac);this.root=a}c.prototype.nm=function(a){return this.root+a};c.prototype.exists=function(a){try{return this.fs.existsSync(this.nm(a))?1:0}catch(f){return 0}};c.prototype.isFile=function(a){try{return this.fs.statSync(this.nm(a)).isFile()?1:0}catch(f){e(f.toString())}};c.prototype.mkdir=function(a,b,c){try{this.fs.mkdirSync(this.nm(a),{mode:b});return 0}catch(f){this.raise_nodejs_error(f,c)}};c.prototype.rmdir=function(a,b){try{this.fs.rmdirSync(this.nm(a));return 0}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.readdir=function(a,b){try{return this.fs.readdirSync(this.nm(a))}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.is_dir=function(a){try{return this.fs.statSync(this.nm(a)).isDirectory()?1:0}catch(f){e(f.toString())}};c.prototype.unlink=function(a,b){try{var 6140 - c=this.fs.existsSync(this.nm(a))?1:0;this.fs.unlinkSync(this.nm(a));return c}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.open=function(a,b,c){var 6141 - d=require("constants"),e=0;for(var 6142 - h 6179 + e=this.fs.writeSync(this.fd,a,b,c,this.offset);this.offset+=e}catch(f){h(f,d)}return e};l.prototype.read=function(a,b,c,d){try{if(this.flags.noSeek||!this.seeked)var 6180 + e=this.fs.readSync(this.fd,a,b,c);else 6181 + var 6182 + e=this.fs.readSync(this.fd,a,b,c,this.offset);this.offset+=e;return e}catch(f){h(f,d)}};l.prototype.seek=function(a,b,c){if(this.flags.noSeek)f(c,ai,T,aD);switch(b){case 6183 + 0:break;case 6184 + 1:a+=this.offset;break;case 6185 + 2:a+=this.length();break}if(a<0)f(c,x,T,J);this.offset=a;this.seeked=true;return this.offset};l.prototype.stat=function(a){try{var 6186 + b=this.fs.fstatSync(this.fd);return au(b,a)}catch(f){h(f,1)}};l.prototype.close=function(a){try{this.fs.closeSync(this.fd);return 0}catch(f){h(f,a)}};l.prototype.check_stream_semantics=function(a){try{var 6187 + b=this.fs.fstatSync(this.fd)}catch(f){h(f,1,a)}if(!(b.isFile()||b.isCharacterDevice()||b.isFIFO()||b.isSocket()))f(1,x,a,J)};function 6188 + g(a){this.fs=require(am);this.root=a}g.prototype.nm=function(a){return this.root+a};g.prototype.exists=function(a){try{return this.fs.existsSync(this.nm(a))?1:0}catch(f){return 0}};g.prototype.isFile=function(a){try{return this.fs.statSync(this.nm(a)).isFile()?1:0}catch(f){m(f.toString())}};g.prototype.mkdir=function(a,b,c){try{this.fs.mkdirSync(this.nm(a),{mode:b});return 0}catch(f){h(f,c)}};g.prototype.rmdir=function(a,b){try{this.fs.rmdirSync(this.nm(a));return 0}catch(f){h(f,b)}};g.prototype.readdir=function(a,b){try{return this.fs.readdirSync(this.nm(a))}catch(f){h(f,b)}};g.prototype.is_dir=function(a){try{return this.fs.statSync(this.nm(a)).isDirectory()?1:0}catch(f){m(f.toString())}};g.prototype.unlink=function(a,b){try{this.fs.unlinkSync(this.nm(a));return 0}catch(f){h(f,b)}};g.prototype.utimes=function(a,b,c,d){try{if(b===0&&c===0){b=new 6189 + Date().getTime()/L;c=b}this.fs.utimesSync(this.nm(a),b,c);return 0}catch(f){h(f,d)}};g.prototype.truncate=function(a,b,c){try{this.fs.truncateSync(this.nm(a),b|0);return 0}catch(f){h(f,c)}};g.prototype.open=function(a,b,c,d){var 6190 + f=require("node:constants"),e=0;for(var 6191 + i 6143 6192 in 6144 - b)switch(h){case"rdonly":e|=d.O_RDONLY;break;case"wronly":e|=d.O_WRONLY;break;case"append":e|=d.O_WRONLY|d.O_APPEND;break;case"create":e|=d.O_CREAT;break;case"truncate":e|=d.O_TRUNC;break;case"excl":e|=d.O_EXCL;break;case"binary":e|=d.O_BINARY;break;case"text":e|=d.O_TEXT;break;case"nonblock":e|=d.O_NONBLOCK;break}try{var 6145 - f=this.fs.openSync(this.nm(a),e),g=this.fs.lstatSync(this.nm(a)).isCharacterDevice();b.isCharacterDevice=g;return new 6146 - l(f,b)}catch(f){this.raise_nodejs_error(f,c)}};c.prototype.rename=function(a,b,c){try{this.fs.renameSync(this.nm(a),this.nm(b))}catch(f){this.raise_nodejs_error(f,c)}};c.prototype.stat=function(a,b){try{var 6147 - c=this.fs.statSync(this.nm(a));return this.stats_from_js(c)}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.lstat=function(a,b){try{var 6148 - c=this.fs.lstatSync(this.nm(a));return this.stats_from_js(c)}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.symlink=function(a,b,c,d){try{this.fs.symlinkSync(this.nm(b),this.nm(c),a?"dir":"file");return 0}catch(f){this.raise_nodejs_error(f,d)}};c.prototype.readlink=function(a,b){try{var 6149 - c=this.fs.readlinkSync(this.nm(a),"utf8");return D(c)}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.opendir=function(a,b){try{return this.fs.opendirSync(this.nm(a))}catch(f){this.raise_nodejs_error(f,b)}};c.prototype.raise_nodejs_error=function(a,b){var 6150 - c=r(H);if(b&&c){var 6151 - d=p(a.code,a.syscall,a.path,a.errno);o(c,d)}else 6152 - e(a.toString())};c.prototype.stats_from_js=function(a){var 6153 - b;if(a.isFile())b=0;else if(a.isDirectory())b=1;else if(a.isCharacterDevice())b=2;else if(a.isBlockDevice())b=3;else if(a.isSymbolicLink())b=4;else if(a.isFIFO())b=5;else if(a.isSocket())b=6;return[0,a.dev,a.ino,b,a.mode,a.nlink,a.uid,a.gid,a.rdev,a.size,a.atimeMs,a.mtimeMs,a.ctimeMs]};c.prototype.constructor=c;function 6154 - a2(a){var 6155 - b=ao(a);if(!b)return;return b[0]+m}var 6156 - K=a2(C)||ai("unable to compute caml_root"),x=[];if(E())x.push({path:K,device:new 6157 - c(K)});else 6158 - x.push({path:K,device:new 6159 - a(K)});x.push({path:aX,device:new 6160 - a(aX)});function 6161 - bb(a){var 6162 - i=bG(a),a=i.join(m),h=a_(a),d;for(var 6163 - g=0;g<x.length;g++){var 6164 - b=x[g];if(h.search(b.path)==0&&(!d||d.path.length<b.path.length))d={path:b.path,device:b.device,rest:a.substring(b.path.length,a.length)}}if(!d&&E()){var 6165 - f=a2(a);if(f&&f.match(/^[a-zA-Z]:\/$/)){var 6166 - b={path:f,device:new 6167 - c(f)};x.push(b);d={path:b.path,device:b.device,rest:a.substring(b.path.length,a.length)}}}if(d)return d;e("no device found for "+h)}function 6168 - bA(a,b){var 6169 - c=bb(a);if(!c.device.register)ai("cannot register file");c.device.register(c.rest,b);return 0}function 6170 - ba(a,b){var 6171 - a=s(a),b=s(b);return bA(a,b)}function 6172 - bE(){var 6173 - b=d.caml_fs_tmp;if(b)for(var 6174 - a=0;a<b.length;a++)ba(b[a].name,b[a].content);d.jsoo_create_file=ba;d.caml_fs_tmp=[];return 0}var 6175 - q=new 6176 - Array();function 6177 - bI(a){var 6178 - b=q[a];if(!b.opened)e("Cannot flush a closed channel");if(!b.buffer||b.buffer_curr==0)return 0;if(b.output)b.output(L(b.buffer,0,b.buffer_curr));else 6179 - b.file.write(b.offset,b.buffer,0,b.buffer_curr);b.offset+=b.buffer_curr;b.buffer_curr=0;return 0}function 6180 - bS(a,b){if(b.name)try{var 6181 - d=require(ac),c=d.openSync(b.name,"rs");return new 6193 + b)switch(i){case"rdonly":e|=f.O_RDONLY;break;case"wronly":e|=f.O_WRONLY;break;case"rdwr":e|=f.O_RDWR;break;case"append":e|=f.O_APPEND;break;case"create":e|=f.O_CREAT;break;case"truncate":e|=f.O_TRUNC;break;case"excl":e|=f.O_EXCL;break;case"binary":e|=f.O_BINARY;break;case"text":e|=f.O_TEXT;break;case"nonblock":e|=f.O_NONBLOCK;break;case"noctty":e|=f.O_NOCTTY;break;case"dsync":e|=f.O_DSYNC;break;case"sync":e|=f.O_SYNC;break}try{var 6194 + g=this.fs.openSync(this.nm(a),e,c);return new 6195 + l(g,b)}catch(f){h(f,d)}};if(c.process?.platform===a3)g.prototype.rename=function(a,b,c){try{var 6196 + d=this.nm(b),e=this.nm(a),i,g;if((i=this.fs.statSync(d,{throwIfNoEntry:false}))&&(g=this.fs.statSync(e,{throwIfNoEntry:false}))&&g.isDirectory())if(i.isDirectory()){if(!d.startsWith(e))try{this.fs.rmdirSync(d)}catch{}}else{var 6197 + f=new 6198 + Error(`ENOTDIR: not a directory, rename '${e}' -> '${d}'`);throw Object.assign(f,{errno:-20,code:V,syscall:"rename",path:d})}this.fs.renameSync(this.nm(a),this.nm(b))}catch(f){h(f,c)}};else 6199 + g.prototype.rename=function(a,b,c){try{this.fs.renameSync(this.nm(a),this.nm(b))}catch(f){h(f,c)}};g.prototype.stat=function(a,b,c){try{var 6200 + d=this.fs.statSync(this.nm(a));return au(d,b)}catch(f){h(f,c)}};g.prototype.lstat=function(a,b,c){try{var 6201 + d=this.fs.lstatSync(this.nm(a));return au(d,b)}catch(f){h(f,c)}};g.prototype.symlink=function(a,b,c,d){try{this.fs.symlinkSync(b,this.nm(c),a===0?null:a[1]?"dir":"file");return 0}catch(f){h(f,d)}};g.prototype.readlink=function(a,b){try{var 6202 + c=this.fs.readlinkSync(this.nm(a),"utf8");return s(c)}catch(f){h(f,b)}};g.prototype.opendir=function(a,b){try{return this.fs.opendirSync(this.nm(a))}catch(f){h(f,b)}};g.prototype.constructor=g;function 6203 + bh(a){var 6204 + b=aw(a);if(!b)return;return b[0]+q}var 6205 + Z=bh(N)||bf("unable to compute caml_root"),E=[];if(R())E.push({path:Z,device:new 6206 + g(Z)});else 6207 + E.push({path:Z,device:new 6208 + a(Z)});E.push({path:a$,device:new 6209 + a(a$)});function 6210 + bB(a){var 6211 + h=b8(a),a=h.join(q),f=bv(a),c;for(var 6212 + e=0;e<E.length;e++){var 6213 + b=E[e];if(f.search(b.path)===0&&(!c||c.path.length<b.path.length))c={path:b.path,device:b.device,rest:a.slice(b.path.length,a.length)}}if(!c&&R()){var 6214 + d=bh(a);if(d&&d.match(/^[a-zA-Z]:\/$/)){var 6215 + b={path:d,device:new 6216 + g(d)};E.push(b);c={path:b.path,device:b.device,rest:a.slice(b.path.length,a.length)}}}if(c)return c;m("no device found for "+f)}function 6217 + b1(a,b){var 6218 + c=bB(a);if(!c.device.register)bf("cannot register file");c.device.register(c.rest,b);return 0}function 6219 + bx(a,b){var 6220 + a=s(a),b=Q(b);return b1(a,b)}function 6221 + b5(){var 6222 + b=c.jsoo_fs_tmp;if(b)for(var 6223 + a=0;a<b.length;a++)bx(b[a].name,b[a].content);c.jsoo_create_file=bx;c.jsoo_fs_tmp=[];return 0}function 6224 + bb(a){this.id=a}function 6225 + P(){this.map=new 6226 + c.WeakMap();this.opened=new 6227 + c.Set()}P.prototype.close=function(a){this.opened.delete(a)};P.prototype.get=function(a){return this.map.get(a)};P.prototype.set=function(a,b){if(b.opened)this.opened.add(a);return this.map.set(a,b)};P.prototype.all=function(){return this.opened.values()};var 6228 + X=new 6229 + P();function 6230 + bm(a){return X.get(a)}function 6231 + b_(a){var 6232 + b=bm(a);if(!b.opened)m("Cannot flush a closed channel");if(!b.buffer||b.buffer_curr===0)return 0;if(b.output)b.output(_(b.buffer,0,b.buffer_curr));else 6233 + for(var 6234 + c=0;c<b.buffer_curr;)c+=b.file.write(b.buffer,c,b.buffer_curr-c);b.offset+=b.buffer_curr;b.buffer_curr=0;return 0}function 6235 + cj(a,b){if(b.altname)try{var 6236 + d=require(am),c=d.openSync(b.altname,"rs");return new 6182 6237 l(c,b)}catch(f){}return new 6183 6238 l(a,b)}var 6184 - M=new 6239 + D=new 6185 6240 Array(3);function 6186 - A(a,b){h.call(this,u(0));this.log=function(a){return 0};if(a==1&&typeof 6187 - console.log=="function")this.log=console.log;else if(a==2&&typeof 6188 - console.error=="function")this.log=console.error;else if(typeof 6189 - console.log=="function")this.log=console.log;this.flags=b}A.prototype.length=function(){return 0};A.prototype.write=function(a,b,c,d){if(this.log){if(d>0&&c>=0&&c+d<=b.length&&b[c+d-1]==10)d--;var 6190 - f=u(d);B(ae(b),c,f,0,d);this.log(f.toUtf16());return 0}e(this.fd+aw)};A.prototype.read=function(a,b,c,d){e(this.fd+": file descriptor is write only")};A.prototype.close=function(){this.log=undefined};function 6191 - N(a,b){if(b==undefined)b=M.length;M[b]=a;return b|0}function 6192 - b1(a,b,c){var 6241 + u(a,b){k.call(this,B(0));this.log=function(a){return 0};if(a===1&&typeof 6242 + console.log==="function")this.log=console.log;else if(a===2&&typeof 6243 + console.error==="function")this.log=console.error;else if(typeof 6244 + console.log==="function")this.log=console.log;this.flags=b}u.prototype.length=function(){return 0};u.prototype.truncate=function(a,b){f(b,x,"ftruncate",J)};u.prototype.write=function(a,b,c,d){var 6245 + g=c;if(this.log){if(c>0&&b>=0&&b+c<=a.length&&a[b+c-1]===10)c--;var 6246 + e=B(c);M(be(a),b,e,0,c);this.log(e.toUtf16());return g}f(d,y,aZ,K)};u.prototype.read=function(a,b,c,d){f(d,y,aT,K)};u.prototype.seek=function(a,b,c){f(c,ai,T,aD)};u.prototype.close=function(){this.log=undefined};u.prototype.check_stream_semantics=function(a){};function 6247 + $(a,b){var 6248 + c;if(b===undefined){b=D.length;c=new 6249 + bb(b)}else if(D[b])c=D[b].chanid;else 6250 + c=new 6251 + bb(b);D[b]={file:a,chanid:c};return b|0}function 6252 + cs(a,b,c){var 6193 6253 d={};while(b){switch(b[1]){case 6194 6254 0:d.rdonly=1;break;case 6195 6255 1:d.wronly=1;break;case 6196 - 2:d.append=1;break;case 6256 + 2:d.append=1;d.writeonly=1;break;case 6197 6257 3:d.create=1;break;case 6198 6258 4:d.truncate=1;break;case 6199 6259 5:d.excl=1;break;case 6200 6260 6:d.binary=1;break;case 6201 6261 7:d.text=1;break;case 6202 - 8:d.nonblock=1;break}b=b[2]}if(d.rdonly&&d.wronly)e(J(a)+U);if(d.text&&d.binary)e(J(a)+_);var 6203 - f=bb(a),g=f.device.open(f.rest,d);return N(g,undefined)}(function(){function 6204 - a(a,b){return E()?bS(a,b):new 6205 - A(a,b)}N(a(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:true}),0);N(a(1,{buffered:2,wronly:1,isCharacterDevice:true}),1);N(a(2,{buffered:2,wronly:1,isCharacterDevice:true}),2)}());function 6206 - bJ(a){var 6207 - b=M[a];if(b.flags.wronly)e(aJ+a+" is writeonly");var 6208 - d=null,c={file:b,offset:b.flags.append?b.length():0,fd:a,opened:true,out:false,buffer_curr:0,buffer_max:0,buffer:new 6209 - Uint8Array(aN),refill:d};q[c.fd]=c;return c.fd}function 6210 - a6(a){var 6211 - b=M[a];if(b.flags.rdonly)e(aJ+a+" is readonly");var 6212 - d=b.flags.buffered!==undefined?b.flags.buffered:1,c={file:b,offset:b.flags.append?b.length():0,fd:a,opened:true,out:true,buffer_curr:0,buffer:new 6213 - Uint8Array(aN),buffered:d};q[c.fd]=c;return c.fd}function 6214 - bK(){var 6215 - b=0;for(var 6216 - a=0;a<q.length;a++)if(q[a]&&q[a].opened&&q[a].out)b=[0,q[a].fd,b];return b}function 6217 - bM(a){if(a 6218 - instanceof 6219 - Array&&a[0]==a[0]>>>0)return a[0];else if(a3(a))return ax;else if(a4(a))return ax;else if(a 6262 + 8:d.nonblock=1;break}b=b[2]}var 6263 + e=bB(a),f=e.device.open(e.rest,d,c);return $(f,undefined)}(function(){var 6264 + c=R();function 6265 + a(a,b){return c?cj(a,b):new 6266 + u(a,b)}$(a(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:true}),0);$(a(1,{buffered:c?1:2,wronly:1,isCharacterDevice:true}),1);$(a(2,{buffered:c?1:2,wronly:1,isCharacterDevice:true}),2)}());function 6267 + b$(a){var 6268 + b=D[a];if(b===undefined)m(aR+a+ba);var 6269 + d=b.file,c=b.chanid,f=null,e={file:d,offset:d.offset,fd:a,opened:true,out:false,buffer_curr:0,buffer_max:0,buffer:new 6270 + Uint8Array(aW),refill:f};X.set(c,e);return c}function 6271 + bn(a){var 6272 + c=D[a];if(c===undefined)m(aR+a+ba);var 6273 + b=c.file,d=c.chanid,e=b.flags.buffered!==undefined?b.flags.buffered:1,f={file:b,offset:b.offset,fd:a,opened:true,out:true,buffer_curr:0,buffer:new 6274 + Uint8Array(aW),buffered:e};X.set(d,f);return d}function 6275 + ca(){var 6276 + a=0,d=X.all();for(var 6277 + c 6278 + of 6279 + d){var 6280 + b=bm(c);if(b.opened&&b.out)a=[0,c,a]}return a}function 6281 + cc(a){if(Array.isArray(a)&&a[0]===a[0]>>>0)return a[0];else if(bi(a))return aF;else if(bj(a))return aF;else if(a 6220 6282 instanceof 6221 6283 Function||typeof 6222 - a=="function")return 247;else if(a&&a.caml_custom)return 255;else 6223 - return 1000}var 6224 - ag=I;function 6225 - bv(a){var 6226 - c={};if(a)for(var 6227 - b=1;b<a.length;b++)c[a5(a[b][1])]=a[b][2];return c}function 6228 - j(a,b,c){if(c){var 6229 - e=c;if(d.toplevelReloc)a=ag(d.toplevelReloc,[e]);else if(i.symbols){if(!i.symidx)i.symidx=bv(i.symbols);var 6230 - f=i.symidx[e];if(f>=0)a=f;else 6231 - ai("caml_register_global: cannot locate "+e)}}i[a+1]=b;if(c)i[c]=b}function 6232 - a9(a,b){a7[J(a)]=b;return 0}function 6233 - bV(a){{if(a 6284 + a==="function")return 247;else if(a&&a.caml_custom)return 255;else 6285 + return L}var 6286 + bz=undefined,aq=W;function 6287 + bV(a){var 6288 + d={},c=-1;if(a)for(var 6289 + b=1;b<a.length;b++){var 6290 + e=a[b][2];c=Math.max(c,e);d[bl(a[b][1])]=e}d.next_idx=c+1;return d}function 6291 + n(a,b,c){if(c){var 6292 + d=c;if(bz)a=aq(bz,[d]);else if(j.symbols){if(!j.symidx)j.symidx=bV(j.symbols);var 6293 + e=j.symidx[d];if(e>=0)a=e;else{var 6294 + a=j.symidx.next_idx++;j.symidx[d]=a}}}j[a+1]=b;if(c)j[c]=b}function 6295 + bu(a,b){bo[bk(a)]=b;return 0}function 6296 + cm(a){{if(Array.isArray(a))return a;var 6297 + b;if(c.RangeError&&a 6234 6298 instanceof 6235 - Array)return a;var 6236 - b;if(d.RangeError&&a 6237 - instanceof 6238 - d.RangeError&&a.message&&a.message.match(/maximum call stack/i))b=i.Stack_overflow;else if(d.InternalError&&a 6299 + c.RangeError&&a.message&&a.message.match(/maximum call stack/i))b=j.Stack_overflow;else if(c.InternalError&&a 6239 6300 instanceof 6240 - d.InternalError&&a.message&&a.message.match(/too much recursion/i))b=i.Stack_overflow;else if(a 6301 + c.InternalError&&a.message&&a.message.match(/too much recursion/i))b=j.Stack_overflow;else if(a 6241 6302 instanceof 6242 - d.Error&&r(T))b=[0,r(T),a];else 6243 - b=[0,i.Failure,D(String(a))];if(a 6303 + c.Error&&C(af))b=[0,C(af),a];else 6304 + b=[0,j.Failure,s(String(a))];if(a 6244 6305 instanceof 6245 - d.Error)b.js_error=a;return b}}function 6246 - bF(a){switch(a[2]){case-8:case-11:case-12:return 1;default:return 0}}function 6247 - bC(a){var 6248 - b=f;if(a[0]==0){b+=a[1][1];if(a.length==3&&a[2][0]==0&&bF(a[1]))var 6249 - e=a[2],h=1;else 6306 + c.Error)b.js_error=a;return b}}function 6307 + b7(a){switch(a[2]){case-8:case-11:case-12:return 1;default:return 0}}function 6308 + b3(a){var 6309 + b=e;if(a[0]===0){b+=a[1][1];if(a.length===3&&a[2][0]===0&&b7(a[1]))var 6310 + f=a[2],g=1;else 6250 6311 var 6251 - h=2,e=a;b+="(";for(var 6252 - d=h;d<e.length;d++){if(d>h)b+=", ";var 6253 - c=e[d];if(typeof 6254 - c=="number")b+=c.toString();else if(c 6312 + g=2,f=a;b+="(";for(var 6313 + d=g;d<f.length;d++){if(d>g)b+=aU;var 6314 + c=f[d];if(typeof 6315 + c==="number")b+=c.toString();else if(c 6255 6316 instanceof 6256 - n)b+=F+c.toString()+F;else if(typeof 6257 - c=="string")b+=F+c.toString()+F;else 6258 - b+="_"}b+=")"}else if(a[0]==g)b+=a[1];return b}function 6259 - a1(a){if(a 6260 - instanceof 6261 - Array&&(a[0]==0||a[0]==g)){var 6262 - c=r("Printexc.handle_uncaught_exception");if(c)ag(c,[a,false]);else{var 6263 - d=bC(a),b=r(aO);if(b)ag(b,[0]);console.error("Fatal error: exception "+d);if(a.js_error)throw a.js_error}}else 6317 + p)b+=S+c.toString()+S;else if(typeof 6318 + c==="string")b+=S+c.toString()+S;else 6319 + b+="_"}b+=")"}else if(a[0]===i)b+=a[1];return b}function 6320 + bg(a){if(Array.isArray(a)&&(a[0]===0||a[0]===i)){var 6321 + c=C("Printexc.handle_uncaught_exception");if(c)aq(c,[a,false]);else{var 6322 + d=b3(a),b=C(aX);if(b)aq(b,[0]);console.error("Fatal error: exception "+d);if(a.js_error)throw a.js_error}}else 6264 6323 throw a}function 6265 - bP(){var 6266 - c=d.process;if(c&&c.on)c.on("uncaughtException",function(a,b){a1(a);c.exit(2)});else if(d.addEventListener)d.addEventListener("error",function(a){if(a.error)a1(a.error)})}bP();function 6267 - S(a,b){return(a.l>=0?a.l:a.l=a.length)==1?a(b):I(a,[b])}var 6268 - bZ=undefined;bE();var 6269 - ap=[g,aG,-2];j(11,[g,aC,-12],aC);j(10,[g,aW,-11],aW);j(9,[g,at,-10],at);j(8,[g,aD,-9],aD);j(7,[g,aK,-8],aK);j(6,[g,aR,-7],aR);j(5,[g,az,-6],az);j(4,[g,aU,-5],aU);j(3,[g,aP,-4],aP);j(2,[g,ab,-3],ab);j(1,ap,aG);j(0,[g,aS,-1],aS);bJ(0);a6(1);a6(2);var 6270 - bc=[0,function(a){var 6271 - b=bK(0);for(;;){if(!b)return 0;var 6272 - d=b[2],e=b[1];try{bI(e)}catch(f){var 6273 - c=bV(f);if(c[1]!==ap)throw ak(c,0)}var 6274 - b=d}}];function 6275 - aq(a){return S(bu(bc),0)}a9(aO,aq);function 6276 - O(a,b){return b?[0,S(a,b[1])]:0}var 6277 - P=[0,[g,"Jsoo_runtime.Error.Exn",bD(0)],[0]],bj="state",bk="root",bl="dispatch",bm="parent",bg="selection",bh="extensions",bd=bM(P)===g?P:P[1];a9(T,bd);(function(a){throw a});d["Number"];var 6278 - be=null,bf=undefined;function 6279 - ar(a){var 6280 - b=a===be?1:0;return b?b:a===bf?1:0}var 6281 - b=d;function 6282 - v(a,b,c){if(!c)return;a[b]=c[1];return}b["Promise"];b["Event"];b["ArrayBuffer"];b["DataView"];b["Blob"];b["File"];b["JSON"];b["encodeURI"];b["decodeURI"];b["encodeURIComponent"];b["decodeURIComponent"];b["URL"];b["URLSearchParams"];var 6283 - Q=b["document"];if(!ar(Q))Q["documentElement"];b[aY];b[aY];b["navigator"];b["performance"];b["window"];b["isSecureContext"];var 6284 - bn=b["__CM__view"],R={},bo=[0,bt([0,[0,b["__CM__basic_setup"]],[0,[0],0]])];v(R,bg,0);v(R,bh,O(function(a){var 6285 - e=a.length-1,d=new 6286 - b["Array"](e),f=e-1|0,g=0;if(f>=0){var 6287 - c=g;for(;;){d[c]=by(a,c)[1+c];var 6288 - h=c+1|0;if(f===c)break;var 6289 - c=h}}return d},bo));var 6290 - bi=b["__CM__state"].create(R),as=Q["body"],bp=0,bq=0,br=1-ar(as)?as:S(function(a){throw a},new 6291 - b["Error"]("Document body is null. Try to defer your script execution.")),y={};v(y,bj,[0,bi]);v(y,bk,O(function(a){return a},bq));v(y,bl,bp);v(y,bm,O(function(a){return a},[0,br]));new 6292 - bn(y);aq(0);return}(globalThis)); 6324 + cg(){var 6325 + d=c.process;if(d&&d.on)d.on("uncaughtException",function(a,b){bg(a);d.exit(2)});else if(c.addEventListener)c.addEventListener("error",function(a){if(a.error)bg(a.error)})}cg();function 6326 + ae(a,b){return(a.l>=0?a.l:a.l=a.length)===1?a(b):W(a,[b])}var 6327 + cq=0;b5();var 6328 + ax=[i,aN,-2];n(11,[i,aK,-12],aK);n(10,[i,a_,-11],a_);n(9,[i,aB,-10],aB);n(8,[i,aL,-9],aL);n(7,[i,aS,-8],aS);n(6,[i,a2,-7],a2);n(5,[i,aI,-6],aI);n(4,[i,a6,-5],a6);n(3,[i,aY,-4],aY);n(2,[i,ak,-3],ak);n(1,ax,aN);n(0,[i,a4,-1],a4);b$(0);bn(1);bn(2);var 6329 + bC=[0,function(a){var 6330 + b=ca(0);for(;;){if(!b)return 0;var 6331 + d=b[2],e=b[1];try{b_(e)}catch(f){var 6332 + c=cm(f);if(c[1]!==ax)throw at(c,0)}b=d}}];function 6333 + ay(a){return ae(bU(bC),0)}bu(aX,ay);function 6334 + aa(a,b){return b?[0,ae(a,b[1])]:0}var 6335 + ab=[0,[i,"Jsoo_runtime.Error.Exn",b4(0)],[0]],bJ="state",bK="root",bL="dispatch",bM="parent",bG="selection",bH="extensions",bD=cc(ab)===i?ab:ab[1];bu(af,bD);(function(a){throw a});c.Number;var 6336 + bE=null,bF=undefined;function 6337 + az(a){var 6338 + b=a===bE?1:0;return b?b:a===bF?1:0}var 6339 + d=c;function 6340 + w(a,b,c){if(!c)return;a[b]=c[1]}d.Promise;d.Event;d.ArrayBuffer;d.DataView;d.Blob;d.File;d.JSON;d.encodeURI;d.decodeURI;d.encodeURIComponent;d.decodeURIComponent;d.URL;d.URLSearchParams;var 6341 + ac=d.document;if(!az(ac))ac.documentElement;d.console;d.console;d.navigator;d.performance;d.window;d.isSecureContext;var 6342 + ad={},bN=d.__CM__view,bO=[0,bT([0,[0,d.__CM__basic_setup],[0,[0],0]])];w(ad,bG,0);w(ad,bH,aa(function(a){var 6343 + e=a.length-1,c=new 6344 + d.Array(e),f=e-1|0,g=0;if(f>=0){var 6345 + b=g;for(;;){c[b]=bZ(a,b)[1+b];var 6346 + h=b+1|0;if(f===b)break;b=h}}return c},bO));var 6347 + bI=d.__CM__state.create(ad),aA=ac.body,bP=0,bQ=0,bR=1-az(aA)?aA:ae(function(a){throw a},new 6348 + d.Error("Document body is null. Try to defer your script execution.")),F={};w(F,bJ,[0,bI]);w(F,bK,aa(function(a){return a},bQ));w(F,bL,bP);w(F,bM,aa(function(a){return a},[0,bR]));new 6349 + bN(F);ay(0);return}(globalThis));
+17
src/editor.ml
··· 52 52 Jv.call editor_state "create" [| config |] 53 53 54 54 let doc t = Jv.get t "doc" |> Text.of_jv 55 + 56 + let set_doc t str = 57 + let arg = 58 + Jv.obj 59 + [| 60 + ("from", Jv.of_int 0); 61 + ("to", Jv.of_int (Text.length (doc t))); 62 + ("insert", Jv.of_jstr str); 63 + |] 64 + in 65 + Jv.call t "update" [| Jv.obj [| ("changes", arg) |] |] 55 66 end 56 67 57 68 (* Helper for function *) ··· 90 101 type t = Jv.t 91 102 92 103 let state t = State.of_jv @@ Jv.get t "state" 104 + let doc_changed t = Jv.to_bool @@ Jv.get t "docChanged" 93 105 94 106 include (Jv.Id : Jv.CONV with type t := t) 95 107 end ··· 102 114 Facet ((module F), F.of_jv jv) 103 115 104 116 let line_wrapping () = Jv.get g "lineWrapping" |> Extension.of_jv 117 + 118 + let set_doc t (doc : Jstr.t) = 119 + let upd = State.set_doc (state t) doc in 120 + let _ = Jv.call t "update" [| Jv.of_jv_array [| upd |] |] in 121 + () 105 122 end
+2
src/editor.mli
··· 74 74 type t 75 75 76 76 val state : t -> State.t 77 + val doc_changed : t -> bool 77 78 78 79 include Jv.CONV with type t := t 79 80 end ··· 81 82 val dom : t -> Brr.El.t 82 83 val update_listener : unit -> (Update.t -> unit, Jv.t) State.facet 83 84 val line_wrapping : unit -> Extension.t 85 + val set_doc : t -> Jstr.t -> unit 84 86 end