-
Notifications
You must be signed in to change notification settings - Fork 0
/
worker.bndl.js
1 lines (1 loc) · 65 KB
/
worker.bndl.js
1
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){"use strict";function r(t){return null!=t&&"function"==typeof t.Dispose}e.r(n);function i(t){const n=t;return"number"==typeof n.offset?n.offset:1===t.kind?0:-6e4*t.getTimezoneOffset()}function o(t,n){return(t=t<0&&null!=n&&10!==n?4294967295+t+1:t).toString(n)}class u{static id(t){return u.idMap.has(t)||u.idMap.set(t,++u.count),u.idMap.get(t)}}function s(t){let n=0,e=5381;const r=t.length;for(;n<r;)e=33*e^t.charCodeAt(n++);return e}function c(t){return 2654435761*t|0}function a(t){return 0===t.length?0:t.reduce((t,n)=>(t<<5)+t^n)}function f(t){if(null==t)return 0;switch(typeof t){case"boolean":return t?1:0;case"number":return c(t);case"string":return s(t);default:if("function"==typeof t.GetHashCode)return t.GetHashCode();if(l(t)){const n=t,e=n.length,r=new Array(e);for(let t=0;t<e;t++)r[t]=f(n[t]);return a(r)}return s(String(t))}}function l(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function h(t,n,e){if(null==t)return null==n;if(null==n)return!1;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}function d(t,n){return h(t,n,w)}function w(t,n){return t===n||(null==t?null==n:null!=n&&("object"==typeof t&&("function"==typeof t.Equals?t.Equals(n):l(t)?l(n)&&d(t,n):t instanceof Date&&(n instanceof Date&&0===g(t,n)))))}function g(t,n){let e,r;return"offset"in t&&"offset"in n?(e=t.getTime(),r=n.getTime()):(e=t.getTime()+i(t),r=n.getTime()+i(n)),e===r?0:e<r?-1:1}function p(t,n){return t===n?0:t<n?-1:1}function m(t,n,e){if(null==t)return null==n?0:1;if(null==n)return-1;if(t.length!==n.length)return t.length<n.length?-1:1;for(let r=0,i=0;r<t.length;r++)if(0!==(i=e(t[r],n[r])))return i;return 0}function y(t,n){return m(t,n,b)}function b(t,n){return t===n?0:null==t?null==n?0:-1:null==n?1:"object"!=typeof t?t<n?-1:1:"function"==typeof t.CompareTo?t.CompareTo(n):l(t)?l(n)&&y(t,n):t instanceof Date?n instanceof Date&&g(t,n):1}u.idMap=new WeakMap,u.count=0;const v={None:0,LowerFirst:1};function E(t,n){switch(n){case v.LowerFirst:return t.charAt(0).toLowerCase()+t.slice(1);case v.None:default:return t}}function S(t,n){if(null==n)return null;switch(t){case 2:return(t,e)=>n(t)(e);case 3:return(t,e,r)=>n(t)(e)(r);case 4:return(t,e,r,i)=>n(t)(e)(r)(i);case 5:return(t,e,r,i,o)=>n(t)(e)(r)(i)(o);case 6:return(t,e,r,i,o,u)=>n(t)(e)(r)(i)(o)(u);case 7:return(t,e,r,i,o,u,s)=>n(t)(e)(r)(i)(o)(u)(s);case 8:return(t,e,r,i,o,u,s,c)=>n(t)(e)(r)(i)(o)(u)(s)(c);default:throw new Error("Uncurrying to more than 8-arity is not supported: "+t)}}function O(t,n){if(null==n)return null;switch(t){case 2:return t=>e=>n(t,e);case 3:return t=>e=>r=>n(t,e,r);case 4:return t=>e=>r=>i=>n(t,e,r,i);case 5:return t=>e=>r=>i=>o=>n(t,e,r,i,o);case 6:return t=>e=>r=>i=>o=>u=>n(t,e,r,i,o,u);case 7:return t=>e=>r=>i=>o=>u=>s=>n(t,e,r,i,o,u,s);case 8:return t=>e=>r=>i=>o=>u=>s=>c=>n(t,e,r,i,o,u,s,c);default:throw new Error("Currying to more than 8-arity is not supported: "+t)}}function x(t,n){return null!=n&&Object.getPrototypeOf(t).constructor===Object.getPrototypeOf(n).constructor}function k(t,n){return function(t,n){t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}(t,n||C),t}function C(){}function P(t,n){if(t===n)return 0;if(null==n)return-1;for(;null!=t.tail;){if(null==n.tail)return 1;const e=b(t.head,n.head);if(0!==e)return e;t=t.tail,n=n.tail}return null==n.tail?0:-1}function A(t,n){this.head=t,this.tail=n}function T(t,n,...e){this.tag=0|t,this.name=n,this.fields=e}function N(t,n){const e={},r=null==n?Object.keys(t):n(t);for(let n=0;n<r.length;n++)e[r[n]]=t[r[n]];return e}function M(t,n,e){if(t===n)return!0;if(x(t,n)){const r=null==e?Object.keys(t):e(t);for(let e=0;e<r.length;e++)if(!w(t[r[e]],n[r[e]]))return!1;return!0}return!1}function j(t,n,e){if(t===n)return 0;if(x(t,n)){const r=null==e?Object.keys(t):e(t);for(let e=0;e<r.length;e++){const i=b(t[r[e]],n[r[e]]);if(0!==i)return i}return 0}return-1}function D(){}C.prototype.toString=function(){return"{"+Object.keys(this).map(t=>t+" = "+String(this[t])).join(";\n ")+"}"},C.prototype.GetHashCode=function(){return function(t){if(null==t)return 0;switch(typeof t){case"boolean":return t?1:0;case"number":return c(t);case"string":return s(t);default:return c(u.id(t))}}(this)},C.prototype.Equals=function(t){return this===t},A.prototype.toString=function(){return"["+Array.from(this).map(t=>String(t)).join("; ")+"]"},A.prototype.toJSON=function(){return Array.from(this)},A.prototype[Symbol.iterator]=function(){let t=this;return{next:()=>{const n=t;return t=t.tail,{done:null==n.tail,value:n.head}}}},A.prototype.GetHashCode=function(){return a(Array.from(this).map(f))},A.prototype.Equals=function(t){return 0===P(this,t)},A.prototype.CompareTo=function(t){return P(this,t)},T.prototype.toString=function(){const t=this.fields.length;return 0===t?this.name:1===t?this.name+" "+String(this.fields[0]):this.name+" ("+this.fields.map(t=>String(t)).join(",")+")"},T.prototype.toJSON=function(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)},T.prototype.GetHashCode=function(){let t=this.fields.map(t=>f(t));return t.splice(0,0,c(this.tag)),a(t)},T.prototype.Equals=function(t){return this===t||x(this,t)&&this.tag===t.tag&&d(this.fields,t.fields)},T.prototype.CompareTo=function(t){return this===t?0:x(this,t)?this.tag===t.tag?y(this.fields,t.fields):this.tag<t.tag?-1:1:-1},D.prototype.toString=function(){return"{"+Object.keys(this).map(t=>t+" = "+String(this[t])).join(";\n ")+"}"},D.prototype.toJSON=function(){return N(this)},D.prototype.GetHashCode=function(){return a(Object.keys(this).map(t=>f(this[t])))},D.prototype.Equals=function(t){return M(this,t)},D.prototype.CompareTo=function(t){return j(this,t)};k(function(t){this.contents=t},D);const I=k(function(t){this.stack=Error().stack,this.message=t});function R(t){return Object.keys(t).filter(t=>"message"!==t&&"stack"!==t)}const B=k(function(){I.call(this)},I);B.prototype.toString=function(){const t=R(this),n=t.length;return 0===n?this.message:1===n?this.message+" "+String(this[t[0]]):this.message+" ("+t.map(t=>String(this[t])).join(",")+")"},B.prototype.toJSON=function(){return N(this,R)},B.prototype.GetHashCode=function(){return a(R(this).map(t=>f(this[t])))},B.prototype.Equals=function(t){return M(this,t,R)},B.prototype.CompareTo=function(t){return j(this,t,R)};k(function(t,n,e){this.arg1=t,this.arg2=0|n,this.arg3=0|e},B),k(function(){});class U{constructor(t,n,e,r){this.declaringType=t,this.tag=n,this.name=e,this.fields=r}}class L{constructor(t,n,e,r,i){this.fullname=t,this.generics=n,this.constructor=e,this.fields=r,this.cases=i}toString(){return J(this)}Equals(t){return F(this,t)}CompareTo(t){return q(this,t)}}function _(t){return null!=t.generics?t.generics:[]}function F(t,n){return t.fullname===n.fullname&&h(_(t),_(n),F)}function q(t,n){return t.fullname!==n.fullname?t.fullname<n.fullname?-1:1:m(_(t),_(n),q)}function H(t,n,e,r){return new L(t,n,e,r)}const G=new L("System.Object"),$=(new L("Microsoft.FSharp.Core.Unit"),new L("System.Char"),new L("System.String"));new L("System.Boolean"),new L("System.SByte"),new L("System.Byte"),new L("System.Int16"),new L("System.UInt16"),new L("System.Int32"),new L("System.UInt32"),new L("System.Single"),new L("System.Double"),new L("System.Decimal");function z(t){if(Array.isArray(t))return t[0];if(t instanceof U)return t.name;{const n=t.fullname.lastIndexOf(".");return-1===n?t.fullname:t.fullname.substr(n+1)}}function J(t){const n=null==t.generics||V(t)?[]:t.generics;return n.length>0?t.fullname+"["+n.map(t=>J(t)).join(",")+"]":t.fullname}function V(t){return t.fullname.endsWith("[]")}function W(t){if(null!=t.cases)return t.cases();throw new Error(`${t.fullname} is not an F# union type`)}function X(t){if(null!=t.fields)return t.fields();throw new Error(`${t.fullname} is not an F# record type`)}function Z(t){return t.fullname.startsWith("System.Tuple")}function Y(t,n){const e=(t.fields||[]).length;if(n.length!==e)throw new Error(`Expected an array of length ${e} but got ${n.length}`);return new t.declaringType.constructor(t.tag,t.name,...n)}class K{constructor(t){this.value=t}toString(){return String(this.value)}toJSON(){return this.value}GetHashCode(){return f(this.value)}Equals(t){return null!=t&&w(this.value,t instanceof K?t.value:t)}CompareTo(t){return null==t?1:b(this.value,t instanceof K?t.value:t)}}function Q(t){return null==t||t instanceof K?new K(t):t}function tt(t,n){if(null==t){if(!n)throw new Error("Option has no value");return null}return t instanceof K?t.value:t}function nt(t,n,e){return null==t?n:null!=e?e(tt(t)):tt(t)}k(function(t,n,e){T.call(this,t,n,e)},T);const et=k(function(t,n,e){T.call(this,t,n,e)},T);function rt(t,n){return 0===n.tag?(e=t(n.fields[0]),new et(0,"Ok",e)):n;var e}var it;function ot(t,n){switch(n){case 8:return t?[0,255]:[-128,127];case 16:return t?[0,65535]:[-32768,32767];case 32:return t?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function ut(t,n,e){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(t.replace("_",""));if(null!=r){const[t,i,o,u]=r;if(!function(t){switch(t){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(e=e||function(t,n){if(n&it.AllowHexSpecifier)return 16;switch(t){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(o,n)).test(u))return function(t,n){const[e,r,i,o]=t;return{sign:r||"",prefix:i||"",digits:o,radix:n}}(r,e)}return null}function st(t,n,e,r){try{return[!0,function(t,n,e,r,i){const o=ut(t,n,i);if(null!=o){let t=Number.parseInt(o.sign+o.digits,o.radix);if(!Number.isNaN(t)){const[n,i]=ot(!0,r);!e&&10!==o.radix&&t>=n&&t<=i&&(t=t<<32-r>>32-r);const[u,s]=ot(e,r);if(t>=u&&t<=s)return t}}throw new Error("Input string was not in a correct format.")}(t,n,e,r)]}catch(t){}return[!1,0]}!function(t){t[t.AllowHexSpecifier=512]="AllowHexSpecifier"}(it||(it={}));var ct=null;try{ct=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function at(t,n,e){this.low=0|t,this.high=0|n,this.unsigned=!!e}at.prototype.GetHashCode=function(){return a([this.unsigned?1:0,this.high,this.low])},at.prototype.Equals=function(t){return Lt(this,t)},at.prototype.CompareTo=function(t){return Ht(this,t)},at.prototype.toString=function(t){return It(this,t)},at.prototype.toJSON=function(){return It(this)};function ft(t){return!0===(t&&t.__isLong__)}at.prototype.__isLong__,Object.defineProperty(at.prototype,"__isLong__",{value:!0});var lt={},ht={};function dt(t,n){var e,r,i;return n?(i=0<=(t>>>=0)&&t<256)&&(r=ht[t])?r:(e=pt(t,(0|t)<0?-1:0,!0),i&&(ht[t]=e),e):(i=-128<=(t|=0)&&t<128)&&(r=lt[t])?r:(e=pt(t,t<0?-1:0,!1),i&&(lt[t]=e),e)}function wt(t,n){if(isNaN(t))return n?kt:xt;if(n){if(t<0)return kt;if(t>=Et)return Nt}else{if(t<=-St)return Mt;if(t+1>=St)return Tt}return t<0?Gt(wt(-t,n)):pt(t%vt|0,t/vt|0,n)}function gt(t,n,e){var r,i=0;switch(e){case 0:i=r=t<<24>>24;break;case 4:r=t<<24>>>24;break;case 1:i=r=t<<16>>16;break;case 5:r=t<<16>>>16;break;case 2:i=r=t>>0;break;case 6:r=t>>>0}return pt(r,i>>31,n)}function pt(t,n,e){return new at(t,n,e)}var mt=Math.pow;function yt(t,n,e){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return xt;if("number"==typeof n?(e=n,n=!1):n=!!n,(e=e||10)<2||36<e)throw RangeError("radix");var r=t.indexOf("-");if(r>0)throw Error("interior hyphen");if(0===r)return Gt(yt(t.substring(1),n,e));for(var i=wt(mt(e,8)),o=xt,u=0;u<t.length;u+=8){var s=Math.min(8,t.length-u),c=parseInt(t.substring(u,u+s),e);if(s<8)o=$t(Jt(o,wt(mt(e,s))),wt(c));else o=$t(o=Jt(o,i),wt(c))}return o.unsigned=n,o}function bt(t,n){return"number"==typeof t?wt(t,n):"string"==typeof t?yt(t,n):pt(t.low,t.high,"boolean"==typeof n?n:t.unsigned)}var vt=4294967296,Et=vt*vt,St=Et/2,Ot=dt(1<<24),xt=dt(0),kt=dt(0,!0),Ct=dt(1),Pt=dt(1,!0),At=dt(-1),Tt=pt(-1,2147483647,!1),Nt=pt(-1,-1,!0),Mt=pt(0,-2147483648,!1);function jt(t){return t.unsigned?t.low>>>0:t.low}function Dt(t){return t.unsigned?(t.high>>>0)*vt+(t.low>>>0):t.high*vt+(t.low>>>0)}function It(t,n){if((n=n||10)<2||36<n)throw RangeError("radix");if(Rt(t))return"0";if(Bt(t)){if(Lt(t,Mt)){var e=wt(n),r=Vt(t,e),i=zt(Jt(r,e),t);return It(r,n)+jt(i).toString(n)}return"-"+It(Gt(t),n)}for(var o=wt(mt(n,6),t.unsigned),u=t,s="";;){var c=Vt(u,o),a=(jt(zt(u,Jt(c,o)))>>>0).toString(n);if(Rt(u=c))return a+s;for(;a.length<6;)a="0"+a;s=""+a+s}}function Rt(t){return 0===t.high&&0===t.low}function Bt(t){return!t.unsigned&&t.high<0}function Ut(t){return 1==(1&t.low)}function Lt(t,n){return ft(n)||(n=bt(n)),(t.unsigned===n.unsigned||t.high>>>31!=1||n.high>>>31!=1)&&(t.high===n.high&&t.low===n.low)}function _t(t,n){return Ht(t,n)<0}function Ft(t,n){return Ht(t,n)>0}function qt(t,n){return Ht(t,n)>=0}function Ht(t,n){if(ft(n)||(n=bt(n)),Lt(t,n))return 0;var e=Bt(t),r=Bt(n);return e&&!r?-1:!e&&r?1:t.unsigned?n.high>>>0>t.high>>>0||n.high===t.high&&n.low>>>0>t.low>>>0?-1:1:Bt(zt(t,n))?-1:1}function Gt(t){return!t.unsigned&&Lt(t,Mt)?Mt:$t(Xt(t),Ct)}function $t(t,n){ft(n)||(n=bt(n));var e=t.high>>>16,r=65535&t.high,i=t.low>>>16,o=65535&t.low,u=n.high>>>16,s=65535&n.high,c=n.low>>>16,a=0,f=0,l=0,h=0;return l+=(h+=o+(65535&n.low))>>>16,f+=(l+=i+c)>>>16,a+=(f+=r+s)>>>16,a+=e+u,pt((l&=65535)<<16|(h&=65535),(a&=65535)<<16|(f&=65535),t.unsigned)}function zt(t,n){return ft(n)||(n=bt(n)),$t(t,Gt(n))}function Jt(t,n){if(Rt(t))return t.unsigned?kt:xt;if(ft(n)||(n=bt(n)),ct)return pt(ct.mul(t.low,t.high,n.low,n.high),ct.get_high(),t.unsigned);if(Rt(n))return t.unsigned?kt:xt;if(Lt(t,Mt))return Ut(n)?Mt:xt;if(Lt(n,Mt))return Ut(t)?Mt:xt;if(Bt(t))return Bt(n)?Jt(Gt(t),Gt(n)):Gt(Jt(Gt(t),n));if(Bt(n))return Gt(Jt(t,Gt(n)));if(_t(t,Ot)&&_t(n,Ot))return wt(Dt(t)*Dt(n),t.unsigned);var e=t.high>>>16,r=65535&t.high,i=t.low>>>16,o=65535&t.low,u=n.high>>>16,s=65535&n.high,c=n.low>>>16,a=65535&n.low,f=0,l=0,h=0,d=0;return h+=(d+=o*a)>>>16,l+=(h+=i*a)>>>16,h&=65535,l+=(h+=o*c)>>>16,f+=(l+=r*a)>>>16,l&=65535,f+=(l+=i*c)>>>16,l&=65535,f+=(l+=o*s)>>>16,f+=e*a+r*c+i*s+o*u,pt((h&=65535)<<16|(d&=65535),(f&=65535)<<16|(l&=65535),t.unsigned)}function Vt(t,n){if(ft(n)||(n=bt(n)),Rt(n))throw Error("division by zero");var e,r,i;if(ct)return t.unsigned||-2147483648!==t.high||-1!==n.low||-1!==n.high?pt((t.unsigned?ct.div_u:ct.div_s)(t.low,t.high,n.low,n.high),ct.get_high(),t.unsigned):t;if(Rt(t))return t.unsigned?kt:xt;if(t.unsigned){if(n.unsigned||(n=function(t){return t.unsigned?t:pt(t.low,t.high,!0)}(n)),Ft(n,t))return kt;if(Ft(n,function(t,n){ft(n)&&(n=jt(n));if(0==(n&=63))return t;var e=t.high;if(n<32){var r=t.low;return pt(r>>>n|e<<32-n,e>>>n,t.unsigned)}return pt(32===n?e:e>>>n-32,0,t.unsigned)}(t,1)))return Pt;i=kt}else{if(Lt(t,Mt))return Lt(n,Ct)||Lt(n,At)?Mt:Lt(n,Mt)?Ct:Lt(e=Yt(Vt(Kt(t,1),n),1),xt)?Bt(n)?Ct:At:i=$t(e,Vt(r=zt(t,Jt(n,e)),n));if(Lt(n,Mt))return t.unsigned?kt:xt;if(Bt(t))return Bt(n)?Vt(Gt(t),Gt(n)):Gt(Vt(Gt(t),n));if(Bt(n))return Gt(Vt(t,Gt(n)));i=xt}for(r=t;qt(r,n);){e=Math.max(1,Math.floor(Dt(r)/Dt(n)));for(var o=Math.ceil(Math.log(e)/Math.LN2),u=o<=48?1:mt(2,o-48),s=wt(e),c=Jt(s,n);Bt(c)||Ft(c,r);)c=Jt(s=wt(e-=u,t.unsigned),n);Rt(s)&&(s=Ct),i=$t(i,s),r=zt(r,c)}return i}function Wt(t,n){return ft(n)||(n=bt(n)),ct?pt((t.unsigned?ct.rem_u:ct.rem_s)(t.low,t.high,n.low,n.high),ct.get_high(),t.unsigned):zt(t,Jt(Vt(t,n),n))}function Xt(t){return pt(~t.low,~t.high,t.unsigned)}function Zt(t,n){return ft(n)||(n=bt(n)),pt(t.low&n.low,t.high&n.high,t.unsigned)}function Yt(t,n){return ft(n)&&(n=jt(n)),0==(n&=63)?t:n<32?pt(t.low<<n,t.high<<n|t.low>>>32-n,t.unsigned):pt(0,t.low<<n-32,t.unsigned)}function Kt(t,n){return ft(n)&&(n=jt(n)),0==(n&=63)?t:n<32?pt(t.low>>>n|t.high<<32-n,t.high>>n,t.unsigned):pt(t.high>>n-32,t.high>=0?0:-1,t.unsigned)}function Qt(t,n,e){return e?function(t,n){return new at(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)}(t,n):function(t,n){return new at(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)}(t,n)}class tn{constructor(t){this.iter=t}MoveNext(){const t=this.iter.next();return this.current=t.value,!t.done}get Current(){return this.current}Reset(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function nn(t){return new tn(t[Symbol.iterator]())}function en(t){return{next:()=>t.MoveNext()?{done:!1,value:t.Current}:{done:!0,value:null}}}function rn(t){return{[Symbol.iterator]:()=>t()[Symbol.iterator]()}}function on(t,n,e){if(Array.isArray(e)||ArrayBuffer.isView(e))return e.reduce(t,n);{let r;for(let i=0,o=e[Symbol.iterator]();!(r=o.next()).done;i++)n=t(n,r.value,i);return n}}function un(t,n){return rn(()=>sn(n=>{const e=n.next();return e.done?null:[t(e.value),n]},n[Symbol.iterator]()))}function sn(t,n){return{[Symbol.iterator]:()=>{let e=n;return{next:()=>{const n=t(e);return null!=n?(e=n[1],{done:!1,value:n[0]}):{done:!0}}}}}}const cn=k(function(){});function an(t,n){return{then(t,e){try{return n().then(t,e)}catch(t){if(w(e,null))return Promise.reject(t);try{return Promise.resolve(e(t))}catch(t){return Promise.reject(t)}}},catch(t){try{return n().catch(t)}catch(n){try{return Promise.resolve(t(n))}catch(t){return Promise.reject(t)}}}}}function fn(t,n){return new Promise(function(t,e){try{Promise.resolve(n).then(t,e)}catch(t){e(t)}})}!function(){null!=this?cn.call(this):new cn}();class ln{constructor(t,n=1){if("string"==typeof t&&"number"==typeof n)if(1===n)try{this.url=new URL(t),this.kind=n}catch(t){throw new Error("Invalid URI: The format of the URI could not be determined.")}else if(2===n){let e=!1;try{new URL(t);e=!1}catch(t){e=!0}if(!e)throw new Error("uri is not a relative path");this.url=t,this.kind=n}else this.url=t,this.kind=n;else if(t instanceof ln&&"string"==typeof n){if(1!==t.kind)throw new Error("base uri should has Absolute kind");this.url=new URL(n,t.url),this.kind=1}else if(t instanceof ln&&n instanceof ln){if(1!==t.kind)throw new Error("base uri should has Absolute kind");if(2!==n.kind)throw new Error("relative uri should has Relative kind");this.url=new URL(n.url,t.url),this.kind=1}}parseUrl(){if(1===this.kind)return this.url;if(0===this.kind)return new URL(this.url);throw new Error("relative url can not parse as a URI")}get isAbsoluteUri(){try{return this.parseUrl(),!0}catch(t){return!1}}get scheme(){const t=this.parseUrl().protocol;return t.slice(0,t.length-1)}get host(){return this.parseUrl().host}get absolutePath(){return this.parseUrl().pathname}get query(){return this.parseUrl().search}get pathAndQuery(){const t=this.parseUrl();return t.pathname+t.search}get fragment(){return this.parseUrl().hash}}function hn(t,n){if(0!=(-260&n))throw new Error("RegexOptions only supports: IgnoreCase, Multiline and ECMAScript");let e="g";return e+=1&n?"i":"",e+=2&n?"m":"",new RegExp(t,e)}function dn(t){return t.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}const wn=/(?:Z|[+-](\d+):?([0-5]?\d)?)\s*$/;function gn(t,n){const e=new Date(t);return e.kind=0|(null==n?0:n),e}function pn(t){let n=new Date(t);if(isNaN(n.getTime())){const e=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*([+-]\d+(?::\d+)?)?\s*$/.exec(t);if(null==e)throw new Error("The string is not a valid Date.");{let t=null,r=0;if(null!=e[2]){const t=e[2].split(":");r=3600*parseInt(t[0],10)+60*parseInt(t[1]||"0",10)+parseFloat(t[2]||"0"),null!=e[3]&&"PM"===e[3].toUpperCase()&&(r+=720)}if(null!=e[4]){if(null!=e[1])t=new Date(e[1]+" UTC");else{const n=new Date;t=new Date(n.getUTCFullYear()+"/"+(n.getUTCMonth()+1)+"/"+n.getUTCDate())}const n=e[4].substr(1).split(":");let i=60*parseInt(n[0],10)+parseInt(n[1]||"0",10);"+"===e[4][0]&&(i*=-1),r+=60*i}else if(null!=e[1])t=new Date(e[1]);else{const n=new Date;t=new Date(n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate())}n=new Date(t.getTime()+1e3*r),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))}}return n}function mn(t,n=!1){const e=pn(t),r=wn.exec(t),i=null!=r?n&&"Z"===r[0]?1:2:0;return gn(e.getTime(),i)}function yn(){return gn(Date.now(),2)}var bn={GetHashCode(){return a([this.s,this.e].concat(this.c))},Equals(t){return!this.cmp(t)},CompareTo(t){return this.cmp(t)}},vn=20,En=1,Sn=1e6,On=-7,xn=21,kn="[big.js] ",Cn=kn+"Invalid ",Pn=Cn+"decimal places",An=Cn+"rounding mode",Tn=void 0,Nn=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Mn(t,n,e,r){var i=t.c,o=t.e+n+1;if(o<i.length){if(1===e)r=i[o]>=5;else if(2===e)r=i[o]>5||5==i[o]&&(r||o<0||i[o+1]!==Tn||1&i[o-1]);else if(3===e)r=r||!!i[0];else if(r=!1,0!==e)throw Error(An);if(o<1)i.length=1,r?(t.e=-n,i[0]=1):i[0]=t.e=0;else{if(i.length=o--,r)for(;++i[o]>9;)i[o]=0,o--||(++t.e,i.unshift(1));for(o=i.length;!i[--o];)i.pop()}}else if(e<0||e>3||e!==~~e)throw Error(An);return t}function jn(t,n,e,r){var i,o,u=t.constructor,s=!t.c[0];if(e!==Tn){if(e!==~~e||e<(3==n)||e>Sn)throw Error(3==n?Cn+"precision":Pn);for(e=r-(t=new u(t)).e,t.c.length>++r&&Mn(t,e,u.RM),2==n&&(r=t.e+e+1);t.c.length<r;)t.c.push(0)}if(i=t.e,e=(o=t.c.join("")).length,2!=n&&(1==n||3==n&&r<=i||i<=u.NE||i>=u.PE))o=o.charAt(0)+(e>1?"."+o.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)o="0"+o;o="0."+o}else if(i>0)if(++i>e)for(i-=e;i--;)o+="0";else i<e&&(o=o.slice(0,i)+"."+o.slice(i));else e>1&&(o=o.charAt(0)+"."+o.slice(1));return t.s<0&&(!s||4==n)?"-"+o:o}bn.abs=function(){var t=new this.constructor(this);return t.s=1,t},bn.cmp=function(t){var n,e=this,r=e.c,i=(t=new e.constructor(t)).c,o=e.s,u=t.s,s=e.e,c=t.e;if(!r[0]||!i[0])return r[0]?o:i[0]?-u:0;if(o!=u)return o;if(n=o<0,s!=c)return s>c^n?1:-1;for(u=(s=r.length)<(c=i.length)?s:c,o=-1;++o<u;)if(r[o]!=i[o])return r[o]>i[o]^n?1:-1;return s==c?0:s>c^n?1:-1},bn.div=function(t){var n=this,e=n.constructor,r=n.c,i=(t=new e(t)).c,o=n.s==t.s?1:-1,u=e.DP;if(u!==~~u||u<0||u>Sn)throw Error(Pn);if(!i[0])throw Error("[big.js] Division by zero");if(!r[0])return new e(0*o);var s,c,a,f,l,h=i.slice(),d=s=i.length,w=r.length,g=r.slice(0,s),p=g.length,m=t,y=m.c=[],b=0,v=u+(m.e=n.e-t.e)+1;for(m.s=o,o=v<0?0:v,h.unshift(0);p++<s;)g.push(0);do{for(a=0;a<10;a++){if(s!=(p=g.length))f=s>p?1:-1;else for(l=-1,f=0;++l<s;)if(i[l]!=g[l]){f=i[l]>g[l]?1:-1;break}if(!(f<0))break;for(c=p==s?i:h;p;){if(g[--p]<c[p]){for(l=p;l&&!g[--l];)g[l]=9;--g[l],g[p]+=10}g[p]-=c[p]}for(;!g[0];)g.shift()}y[b++]=f?a:++a,g[0]&&f?g[p]=r[d]||0:g=[r[d]]}while((d++<w||g[0]!==Tn)&&o--);return y[0]||1==b||(y.shift(),m.e--),b>v&&Mn(m,u,e.RM,g[0]!==Tn),m},bn.eq=function(t){return!this.cmp(t)},bn.gt=function(t){return this.cmp(t)>0},bn.gte=function(t){return this.cmp(t)>-1},bn.lt=function(t){return this.cmp(t)<0},bn.lte=function(t){return this.cmp(t)<1},bn.minus=bn.sub=function(t){var n,e,r,i,o=this,u=o.constructor,s=o.s,c=(t=new u(t)).s;if(s!=c)return t.s=-c,o.plus(t);var a=o.c.slice(),f=o.e,l=t.c,h=t.e;if(!a[0]||!l[0])return l[0]?(t.s=-c,t):new u(a[0]?o:0);if(s=f-h){for((i=s<0)?(s=-s,r=a):(h=f,r=l),r.reverse(),c=s;c--;)r.push(0);r.reverse()}else for(e=((i=a.length<l.length)?a:l).length,s=c=0;c<e;c++)if(a[c]!=l[c]){i=a[c]<l[c];break}if(i&&(r=a,a=l,l=r,t.s=-t.s),(c=(e=l.length)-(n=a.length))>0)for(;c--;)a[n++]=0;for(c=n;e>s;){if(a[--e]<l[e]){for(n=e;n&&!a[--n];)a[n]=9;--a[n],a[e]+=10}a[e]-=l[e]}for(;0===a[--c];)a.pop();for(;0===a[0];)a.shift(),--h;return a[0]||(t.s=1,a=[h=0]),t.c=a,t.e=h,t},bn.mod=function(t){var n,e=this,r=e.constructor,i=e.s,o=(t=new r(t)).s;if(!t.c[0])throw Error("[big.js] Division by zero");return e.s=t.s=1,n=1==t.cmp(e),e.s=i,t.s=o,n?new r(e):(i=r.DP,o=r.RM,r.DP=r.RM=0,e=e.div(t),r.DP=i,r.RM=o,this.minus(e.times(t)))},bn.plus=bn.add=function(t){var n,e=this,r=e.constructor,i=e.s,o=(t=new r(t)).s;if(i!=o)return t.s=-o,e.minus(t);var u=e.e,s=e.c,c=t.e,a=t.c;if(!s[0]||!a[0])return a[0]?t:new r(s[0]?e:0*i);if(s=s.slice(),i=u-c){for(i>0?(c=u,n=a):(i=-i,n=s),n.reverse();i--;)n.push(0);n.reverse()}for(s.length-a.length<0&&(n=a,a=s,s=n),i=a.length,o=0;i;s[i]%=10)o=(s[--i]=s[i]+a[i]+o)/10|0;for(o&&(s.unshift(o),++c),i=s.length;0===s[--i];)s.pop();return t.c=s,t.e=c,t},bn.pow=function(t){var n=this,e=new n.constructor(1),r=e,i=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(Cn+"exponent");for(i&&(t=-t);1&t&&(r=r.times(n)),t>>=1;)n=n.times(n);return i?e.div(r):r},bn.round=function(t,n){var e=this.constructor;if(t===Tn)t=0;else if(t!==~~t||t<-Sn||t>Sn)throw Error(Pn);return Mn(new e(this),t,n===Tn?e.RM:n)},bn.sqrt=function(){var t,n,e,r=this,i=r.constructor,o=r.s,u=r.e,s=new i(.5);if(!r.c[0])return new i(r);if(o<0)throw Error(kn+"No square root");0===(o=Math.sqrt(r+""))||o===1/0?((n=r.c.join("")).length+u&1||(n+="0"),u=((u+1)/2|0)-(u<0||1&u),t=new i(((o=Math.sqrt(n))==1/0?"1e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+u)):t=new i(o),u=t.e+(i.DP+=4);do{e=t,t=s.times(e.plus(r.div(e)))}while(e.c.slice(0,u).join("")!==t.c.slice(0,u).join(""));return Mn(t,i.DP-=4,i.RM)},bn.times=bn.mul=function(t){var n,e=this,r=e.constructor,i=e.c,o=(t=new r(t)).c,u=i.length,s=o.length,c=e.e,a=t.e;if(t.s=e.s==t.s?1:-1,!i[0]||!o[0])return new r(0*t.s);for(t.e=c+a,u<s&&(n=i,i=o,o=n,a=u,u=s,s=a),n=new Array(a=u+s);a--;)n[a]=0;for(c=s;c--;){for(s=0,a=u+c;a>c;)s=n[a]+o[c]*i[a-c-1]+s,n[a--]=s%10,s=s/10|0;n[a]=(n[a]+s)%10}for(s?++t.e:n.shift(),c=n.length;!n[--c];)n.pop();return t.c=n,t},bn.toExponential=function(t){return jn(this,1,t,t)},bn.toFixed=function(t){return jn(this,2,t,this.e+t)},bn.toPrecision=function(t){return jn(this,3,t,t-1)},bn.toString=function(){return jn(this)},bn.valueOf=bn.toJSON=function(){return jn(this,4)};var Dn=function t(){function n(e){var r=this;if(!(r instanceof n))return e===Tn?t():new n(e);e instanceof n?(r.s=e.s,r.e=e.e,r.c=e.c.slice()):function(t,n){var e,r,i;if(0===n&&1/n<0)n="-0";else if(!Nn.test(n+=""))throw Error(Cn+"number");for(t.s="-"==n.charAt(0)?(n=n.slice(1),-1):1,(e=n.indexOf("."))>-1&&(n=n.replace(".","")),(r=n.search(/e/i))>0?(e<0&&(e=r),e+=+n.slice(r+1),n=n.substring(0,r)):e<0&&(e=n.length),i=n.length,r=0;r<i&&"0"==n.charAt(r);)++r;if(r==i)t.c=[t.e=0];else{for(;i>0&&"0"==n.charAt(--i););for(t.e=e-r-1,t.c=[],e=0;r<=i;)t.c[e++]=+n.charAt(r++)}}(r,e),r.constructor=n}return n.prototype=bn,n.DP=vn,n.RM=En,n.NE=On,n.PE=xn,n.version="5.2.2",n}();new Dn(0),new Dn(1),new Dn(-1),new Dn("79228162514264337593543950335"),new Dn("-79228162514264337593543950335");const In=/(^|[^%])%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,Rn=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Bn(t){return t instanceof at?It(t.unsigned?t:Qt((n=t,e?function(t){var n=t.high,e=t.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&n,n>>>8&255,n>>>16&255,n>>>24]}(n):function(t){var n=t.high,e=t.low;return[n>>>24,n>>>16&255,n>>>8&255,255&n,e>>>24,e>>>16&255,e>>>8&255,255&e]}(n)),!0),16):(Number(t)>>>0).toString(16);var n,e}function Un(t){return{input:t,cont:(n=t,t=>In.test(n)?function t(n,e){return(...r)=>{let i=n;for(const t of r)i=_n(i,t);return In.test(i)?t(i,e):e(i.replace(/%%/g,"%"))}}(n,t):t(n))};var n}function Ln(t){return t.cont(t=>t)}function _n(t,n){return t.replace(In,(t,e,r,i,o,u)=>{switch(u){case"f":case"F":n=Number(n).toFixed(o||6);break;case"g":case"G":n=Number(n).toPrecision(o);break;case"e":case"E":n=Number(n).toExponential(o);break;case"O":case"A":n=String(n);break;case"x":n=Bn(n);break;case"X":n=Bn(n).toUpperCase()}const s=r.indexOf("+")>=0&&parseInt(n,10)>=0;if(i=parseInt(i,10),!isNaN(i)){const t=i>=0&&r.indexOf("0")>=0?"0":" ";n=Hn(String(n),Math.abs(i)-(s?1:0),t,i<0)}return(e+(s?"+"+n:n)).replace(/%/g,"%%")})}function Fn(t,...n){return n.map(t=>String(t)).join(t)}function qn(t,n){const e=function(t,...n){if(0===n.length)return t.trim();const e="["+dn(n.join(""))+"]+";return t.replace(new RegExp("^"+e),"").replace(new RegExp(e+"$"),"")}(t,"{","}").toLowerCase();if(Rn.test(e))return n?[!0,e]:e;if(n)return[!1,"00000000-0000-0000-0000-000000000000"];throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}function Hn(t,n,e,r){e=e||" ",n-=t.length;for(let i=0;i<n;i++)t=r?t+e:e+t;return t}const Gn=k(function(t,n,...e){T.call(this,t,n,...e)},T);function $n(){return new Gn(0,"MapEmpty")}function zn(t){switch(t.tag){case 1:return 1;case 2:return 0|(0|t.fields[4]);default:return 0}}function Jn(t,n,e,r){const i=[t,r];switch(0===i[0].tag&&0===i[1].tag?0:1){case 0:return new Gn(1,"MapOne",n,e);case 1:{const i=0|zn(t),o=0|zn(r);return new Gn(2,"MapNode",n,e,t,r,(0|(i<o?o:i))+1)}}}function Vn(t,n,e,r){const i=0|zn(t),o=0|zn(r);if(o>i+2){if(2===r.tag){const o=r.fields[1],u=r.fields[3],s=r.fields[2],c=r.fields[0];if(zn(s)>i+1){if(2===s.tag){const r=s.fields[1],i=s.fields[3],a=s.fields[2],f=s.fields[0];return Jn(Jn(t,n,e,a),f,r,Jn(i,c,o,u))}throw new Error("rebalance")}return Jn(Jn(t,n,e,s),c,o,u)}throw new Error("rebalance")}if(i>o+2){if(2===t.tag){const i=t.fields[1],u=t.fields[3],s=t.fields[2],c=t.fields[0];if(zn(u)>o+1){if(2===u.tag){const t=u.fields[1],o=u.fields[3],a=u.fields[2],f=u.fields[0];return Jn(Jn(s,c,i,a),f,t,Jn(o,n,e,r))}throw new Error("re balance")}return Jn(s,c,i,Jn(u,n,e,r))}throw new Error("rebalance")}return Jn(t,n,e,r)}function Wn(t,n,e,r){switch(r.tag){case 1:{const i=r.fields[0],o=0|t.Compare(n,i);return o<0?new Gn(2,"MapNode",n,e,new Gn(0,"MapEmpty"),r,2):0===o?new Gn(1,"MapOne",n,e):new Gn(2,"MapNode",n,e,r,new Gn(0,"MapEmpty"),2)}case 2:{const i=r.fields[1],o=r.fields[3],u=r.fields[2],s=r.fields[0],c=0|r.fields[4],a=0|t.Compare(n,s);return a<0?Vn(Wn(t,n,e,u),s,i,o):0===a?new Gn(2,"MapNode",n,e,u,o,c):Vn(u,s,i,Wn(t,n,e,o))}default:return new Gn(1,"MapOne",n,e)}}function Xn(t,n,e){t:for(;;){switch(e.tag){case 1:{const r=e.fields[1],i=e.fields[0];return 0===(0|t.Compare(n,i))?Q(r):null}case 2:{const r=e.fields[1],i=e.fields[3],o=e.fields[2],u=e.fields[0],s=0|t.Compare(n,u);if(s<0){t=t,n=n,e=o;continue t}if(0===s)return Q(r);t=t,n=n,e=i;continue t}default:return null}break}}function Zn(t,n){const e=nn(n);try{return function(t,n,e){for(;;){if(!e.MoveNext())return n;{const r=e.Current,i=n,o=t,u=e;t=o,n=Wn(o,r[0],r[1],i),e=u}}}(t,$n(),e)}finally{r(e)&&e.Dispose()}}const Yn=k(function(t,n){this.stack=t,this.started=n},D);function Kn(t){t:for(;;){if(null!=t.tail){if(1===t.head.tag)return t;if(2===t.head.tag){const n=t;t=new A(n.head.fields[2],new A(new Gn(1,"MapOne",n.head.fields[0],n.head.fields[1]),new A(n.head.fields[3],n.tail)));continue t}t=t.tail;continue t}return new A}}function Qn(t){return new Yn(Kn(new A(t,new A)),!1)}function te(t){if(t.started){const n=t.stack;if(null==n.tail)return function(){throw new Error("enumeration already finished")}();if(1===n.head.tag)return[n.head.fields[0],n.head.fields[1]];throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}const ne=k(function(t){this.s=t,this.i=Qn(this.s)});function ee(t){return function(t){return null!=this?ne.call(this,t):new ne(t)}(t)}Object.defineProperty(ne.prototype,"Current",{get:function(){return te(this.i)}}),ne.prototype.MoveNext=function(){return function(t){if(t.started){const n=t.stack;if(null==n.tail)return!1;if(1===n.head.tag)return t.stack=Kn(n.tail),!(null==t.stack.tail);throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return t.started=!0,!(null==t.stack.tail)}(this.i)},ne.prototype.Reset=function(){this.i=Qn(this.s)},ne.prototype.Dispose=function(){};const re=k(function(t,n){this.comparer=t,this.tree=n});function ie(t,n){return null!=this?re.call(this,t,n):new re(t,n)}function oe(t){return t.tree}function ue(t,n){return r=t,Xn((e=n).comparer,r,e.tree);var e,r}function se(t){return ie(t,new Gn(0,"MapEmpty"))}re.prototype.toString=function(){return"map ["+Fn("; ",...un(function(t){return Ln(Un("(%A, %A)"))(t[0])(t[1])},this))+"]"},re.prototype.GetHashCode=function(){const t=function(t,n){return(t<<1)+n+631};let n=0;const e=ee(oe(this));for(;e.MoveNext();){const r=e.Current;n=t(n,f(r[0])),n=t(n,f(r[1]))}return 0|Math.abs(n)},re.prototype.Equals=function(t){return 0===this.CompareTo(t)},re.prototype[Symbol.iterator]=function(){return en(ee(this.tree))},re.prototype.CompareTo=function(t){const n=this,e=t;let i=0,o=!1;const u=ee(oe(n));try{const t=ee(oe(e));try{for(;!o&&0===i;){const e=[u.MoveNext(),t.MoveNext()];if(e[0])if(e[1]){const e=u.Current,r=t.Current,o=0|n.comparer.Compare(e[0],r[0]);i=0!==o?o:b(e[1],r[1])}else i=1;else e[1]?i=-1:o=!0}return 0|i}finally{r(t)&&t.Dispose()}}finally{r(u)&&u.Dispose()}};const ce=k(function(t,n,...e){T.call(this,t,n,...e)},T);function ae(t){return new ce(2,"SetOne",t)}function fe(t,n,e,r){return new ce(1,"SetNode",t,n,e,r)}function le(t){switch(t.tag){case 2:return 1;case 1:return 0|(0|t.fields[3]);default:return 0}}const he=2;function de(t,n,e){const r=[t,e];switch(0===r[0].tag&&0===r[1].tag?0:1){case 0:return ae(n);case 1:{const r=0|le(t),i=0|le(e);return fe(n,t,e,(0|(r<i?i:r))+1)}}}function we(t,n,e){const r=0|le(t),i=0|le(e);if(i>r+he){if(1===e.tag){const i=e.fields[2],o=e.fields[1],u=e.fields[0];if(le(o)>r+1){if(1===o.tag){const e=o.fields[2],r=o.fields[1],s=o.fields[0];return de(de(t,n,r),s,de(e,u,i))}throw new Error("rebalance")}return de(de(t,n,o),u,i)}throw new Error("rebalance")}if(r>i+he){if(1===t.tag){const r=t.fields[2],o=t.fields[1],u=t.fields[0];if(le(r)>i+1){if(1===r.tag){const t=r.fields[2],i=r.fields[1],s=r.fields[0];return de(de(o,u,i),s,de(t,n,e))}throw new Error("rebalance")}return de(o,u,de(r,n,e))}throw new Error("rebalance")}return de(t,n,e)}function ge(t,n,e){switch(e.tag){case 2:{const r=e.fields[0],i=0|t.Compare(n,r);return i<0?fe(n,new ce(0,"SetEmpty"),e,2):0===i?e:fe(n,e,new ce(0,"SetEmpty"),2)}case 0:return ae(n);default:{const r=e.fields[2],i=e.fields[1],o=e.fields[0],u=0|t.Compare(n,o);return u<0?we(ge(t,n,i),o,r):0===u?e:we(i,o,ge(t,n,r))}}}const pe=k(function(t,n){this.stack=t,this.started=n},D);function me(t){t:for(;;){if(null!=t.tail){if(2===t.head.tag)return t;if(1===t.head.tag){const n=t;t=new A(n.head.fields[1],new A(ae(n.head.fields[0]),new A(n.head.fields[2],n.tail)));continue t}t=t.tail;continue t}return new A}}function ye(t){return new pe(me(new A(t,new A)),!1)}function be(t){if(t.started){const n=t.stack;if(null==n.tail)return function(){throw new Error("Enumeration already started")}();if(2===n.head.tag)return n.head.fields[0];throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}const ve=k(function(t){this.s=t,this.i=ye(this.s)});function Ee(t){return function(t){return null!=this?ve.call(this,t):new ve(t)}(t)}function Se(t,n,e){const r=[n,e];return 0===r[0].tag?0===r[1].tag?0:-1:0===r[1].tag?1:0|function(t,n,e){t:for(;;){const F=[n,e];var r,i,o,u,s,c,a,f,l,h,d,w,g,p,m,y,b,v,E,S,O,x,k,C,P,T,N,M,j,D,I,R,B,U,L,_;switch(null!=F[0].tail?null!=F[1].tail?2===F[1].head.tag?2===F[0].head.tag?(r=4,u=F[0].head.fields[0],s=F[1].head.fields[0],c=F[0].tail,a=F[1].tail):1===F[0].head.tag?0===F[0].head.fields[1].tag?(r=6,g=F[0].head.fields[1],p=F[0].head.fields[0],m=F[0].head.fields[2],y=F[1].head.fields[0],b=F[0].tail,v=F[1].tail):(r=9,N=F[0].head.fields[0],M=F[0].head.fields[1],j=F[0].head.fields[2],D=F[0].tail):(r=10,I=F[1].head.fields[0],R=F[1].tail):1===F[1].head.tag?0===F[1].head.fields[1].tag?2===F[0].head.tag?(r=5,f=F[0].head.fields[0],l=F[1].head.fields[0],h=F[1].head.fields[2],d=F[0].tail,w=F[1].tail):1===F[0].head.tag?0===F[0].head.fields[1].tag?(r=7,E=F[0].head.fields[0],S=F[0].head.fields[2],O=F[1].head.fields[0],x=F[1].head.fields[2],k=F[0].tail,C=F[1].tail):(r=9,N=F[0].head.fields[0],M=F[0].head.fields[1],j=F[0].head.fields[2],D=F[0].tail):(r=11,B=F[1].head.fields[0],U=F[1].head.fields[1],L=F[1].head.fields[2],_=F[1].tail):2===F[0].head.tag?(r=8,P=F[0].head.fields[0],T=F[0].tail):1===F[0].head.tag?(r=9,N=F[0].head.fields[0],M=F[0].head.fields[1],j=F[0].head.fields[2],D=F[0].tail):(r=11,B=F[1].head.fields[0],U=F[1].head.fields[1],L=F[1].head.fields[2],_=F[1].tail):2===F[0].head.tag?(r=8,P=F[0].head.fields[0],T=F[0].tail):1===F[0].head.tag?(r=9,N=F[0].head.fields[0],M=F[0].head.fields[1],j=F[0].head.fields[2],D=F[0].tail):(r=3,i=F[0].tail,o=F[1].tail):r=2:r=null!=F[1].tail?1:0,r){case 0:return 0;case 1:return-1;case 2:return 1;case 3:t=t,n=i,e=o;continue t;case 4:{const r=0|t.Compare(u,s);if(0!==r)return 0|r;t=t,n=c,e=a;continue t}case 5:{const r=0|t.Compare(f,l);if(0!==r)return 0|r;t=t,n=new A(new ce(0,"SetEmpty"),d),e=new A(h,w);continue t}case 6:{const r=0|t.Compare(p,y);if(0!==r)return 0|r;t=t,n=new A(m,b),e=new A(g,v);continue t}case 7:{const r=0|t.Compare(E,O);if(0!==r)return 0|r;t=t,n=new A(S,k),e=new A(x,C);continue t}case 8:{const r=e;t=t,n=new A(new ce(0,"SetEmpty"),new A(ae(P),T)),e=r;continue t}case 9:{const r=e;t=t,n=new A(M,new A(fe(N,new ce(0,"SetEmpty"),j,0),D)),e=r;continue t}case 10:t=t,n=n,e=new A(new ce(0,"SetEmpty"),new A(ae(I),R));continue t;case 11:t=t,n=n,e=new A(U,new A(fe(B,new ce(0,"SetEmpty"),L,0),_));continue t}break}}(t,new A(n,new A),new A(e,new A))}function Oe(t,n){const e=nn(n);try{return function(t,n,e){for(;;){if(!e.MoveNext())return n;{const r=n,i=t,o=e;t=i,n=ge(i,o.Current,r),e=o}}}(t,new ce(0,"SetEmpty"),e)}finally{r(e)&&e.Dispose()}}Object.defineProperty(ve.prototype,"Current",{get:function(){return be(this.i)}}),ve.prototype.MoveNext=function(){return function(t){if(t.started){const n=t.stack;if(null==n.tail)return!1;if(2===n.head.tag)return t.stack=me(n.tail),!(null==t.stack.tail);throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return t.started=!0,!(null==t.stack.tail)}(this.i)},ve.prototype.Reset=function(){this.i=ye(this.s)},ve.prototype.Dispose=function(){};const xe=k(function(t,n){this.comparer=t,this.tree=n});function ke(t,n){return null!=this?xe.call(this,t,n):new xe(t,n)}function Ce(t){return t.comparer}function Pe(t){return t.tree}function Ae(t,n){return ke(n,Oe(n,t))}function Te(t,n,e,r){return t.fill(r,n,n+e),t}function Ne(t,n,e){if(ArrayBuffer.isView(n)){const r=0|n.length,i=new e(r);for(let e=0;e<=r-1;e++)i[e]=t(n[e]);return i}return n.map(function(n){return t(n)})}function Me(t,n,e){if(t<0)throw new Error("The input must be non-negative\\nParameter name: count");const r=new e(t);for(let e=0;e<=t-1;e++)r[e]=n(e);return r}function je(t,n,e){return e.reduce(t,n)}function De(t,n,e,r){return function(t,n,e,r){let i=r;if(n.length!==e.length)throw new Error("Arrays had different lengths");const o=0|n.length;for(let r=1;r<=o;r++)i=t(r-1,n[o-r],e[o-r],i);return i}(function(n,e,r,i){return t(e,r,i)},n,e,r)}function Ie(t,n){return n.from(t)}xe.prototype.toString=function(){return"set ["+Fn("; ",...un(String,this))+"]"},xe.prototype.GetHashCode=function(){let t=0;const n=Ee(Pe(this));for(;n.MoveNext();)e=t,r=f(n.Current),t=(e<<1)+r+631;var e,r;return 0|Math.abs(t)},xe.prototype.Equals=function(t){return 0===Se(Ce(this),Pe(this),Pe(t))},xe.prototype.CompareTo=function(t){return 0|Se(Ce(this),Pe(this),Pe(t))},xe.prototype[Symbol.iterator]=function(){return en(Ee(Pe(this)))};const Re=k(function(t,n,e,r){this.tlsVersion=t,this.tlsCipher=n,this.country=e,this.colo=r},D);function Be(t){return fn(0,an(0,function(){return Promise.resolve(t)}))}function Ue(t){var n;return function(t){const n=0|t.length;let e=new A;for(let r=n-1;r>=0;r--)e=new A(t[r],e);return e}((n=function(t,n,e,r=0){if("string"==typeof t){const r=t;t=hn(n,e),n=r,e=void 0}return(n=n.substring(r)).split(t,e)}(new ln(t.url).absolutePath.toLocaleLowerCase(),"\\/"),0!==function(t,n,e){if(null==n)return null==e?0:-1;if(null==e)return 1;{let r=0,i=0;const o=0|n.length,u=0|e.length;if(o>u)return 1;if(o<u)return-1;for(;r<o&&0===i;)i=t(n[r],e[r]),r+=1;return 0|i}}(b,n,null)&&2===n.length&&""===n[0]&&""===n[1]?[]:n.slice(1,n.length)))}function Le(t){return Be(new Response(t,{status:"200"}))}const _e=k(function(t,n,...e){T.call(this,t,n,...e)},T);const Fe=k(function(t,n,e){this.ave=t,this.sum=n,this.count=0|e},D);let qe=new Fe(Number.NaN,0,0);const He=k(function(t,n,...e){T.call(this,t,n,...e)},T);const Ge=k(function(){this.cache=new Map([])});function $e(){return null!=this?Ge.call(this):new Ge}$e(),$e();const ze=k(function(t,n){this.bound=0|t,this.digits=n},D);function Je(t,n){for(;;){if(0===n)return 1;if(n%2!=0)return t*Je(t*t,~~(n/2))|0;t=t*t,n=~~(n/2)}}pt(2013265921,0,!1),pt(2013265921,0,!0);Me(28,function(t){return Je(2,t)},Int32Array);function Ve(t){return t.bound}function We(t,n){return t.digits[n]}function Xe(t,n){return gt(We(t,n),!1,2)}function Ze(t,n,e){t.digits[n]=e}function Ye(t,n){for(;;){if(0===n)return pt(1,0,!1);if(n%2!=0)return Jt(t,Ye(Jt(t,t),~~(n/2)));{const e=n;t=Jt(t,t),n=~~(e/2)}}}function Ke(t,n){for(;;){if(0===n)return 1;if(n%2!=0)return t*Ke(t*t,~~(n/2))|0;t=t*t,n=~~(n/2)}}const Qe=24,tr=16777216,nr=pt(16777216,0,!1),er=pt(16777215,0,!1);pt(16777215,0,!0);function rr(t){return new ze(t,new Int32Array(t))}function ir(t){const n=0|function(t,n){for(;;){if(-1===n||0!==t[n])return n+1|0;t=t,n-=1}}(t.digits,t.bound-1);return t.bound=n,t}const or=2,ur=3;function sr(t){const n=0|(t<0?0:t);if(n<tr){const t=rr(1);return t.digits[0]=n,ir(t)}{const t=rr(or);for(let e=0;e<=or-1;e++)t.digits[e]=~~(n/Ke(tr,e))%tr;return ir(t)}}const cr=sr(1),ar=sr(0);function fr(t){return t.bound-1}function lr(t){return 0===t.bound}function hr(t,n){if(t.bound===n.bound){return function(t,n,e){for(;;){if(-1===e)return!0;if(t[e]!==n[e])return!1;t=t,n=n,e=e-1}}(t.digits,n.digits,t.bound-1)}return!1}function dr(t,n){if(t.bound<n.bound)return-1;if(t.bound>n.bound)return 1;return 0|function(t,n,e){for(;;){if(-1===e)return 0;if(t[e]!==n[e])return t[e]<n[e]?-1:1;t=t,n=n,e=e-1}}(t.digits,n.digits,t.bound-1)}function wr(t,n){return-1===dr(t,n)}function gr(t,n,e){for(;Ht(n,pt(0,0,!1))>0;){const r=$t(Xe(t,e),n);Ze(t,e,~~jt(Zt(r,er)));const i=e;t=t,n=Vt(r,nr),e=i+1}}function pr(t,n){const e=0|Ve(t),r=rr(e+1|0),i=gt(n,!1,2);let o=pt(0,0,!1);for(let n=0;n<=e-1;n++){const e=$t($t(o,Xe(r,n)),Jt(Xe(t,n),i));Ze(r,n,~~jt(Zt(e,er))),o=Vt(e,nr)}return gr(r,o,e),ir(r)}function mr(t,n){const e=1===Ve(t),r=1===Ve(n);return e&&r?function(t,n){const e=rr(2),r=Jt(gt(t,!1,2),gt(n,!1,2));return Ze(e,0,~~jt(Zt(r,er))),Ze(e,1,~~jt(Vt(r,nr))),ir(e)}(We(t,0),We(n,0)):e?pr(n,We(t,0)):r?pr(t,We(n,0)):function(t,n){const e=rr(t.bound+n.bound|0),r=e.digits,i=t.digits,o=n.digits;for(let u=0;u<=t.bound-1;u++){const t=gt(i[u],!1,2);let s=pt(0,0,!1),c=0|u;for(let e=0;e<=n.bound-1;e++){const n=gt(o[e],!1,2),i=$t($t(gt(r[c],!1,2),s),Jt(t,n));r[c]=~~jt(Zt(i,er)),s=Vt(i,nr),c+=1}gr(e,s,c)}return ir(e)}(t,n)}const yr=k(function(t,n,e,r,i,o,u){this.bigL=0|t,this.twoToBigL=0|n,this.k=0|e,this.bigK=0|r,this.bigN=0|i,this.split=0|o,this.splits=u},D);function br(t,n,e,r){return new yr(t,Ke(2,t),n,e,r,~~(Qe/t),Me(~~(Qe/t),function(n){return Ke(2,t*n)},Int32Array))}const vr=[br(1,28,268435456,268435456),br(2,26,67108864,134217728),br(3,24,16777216,50331648),br(4,22,4194304,16777216),br(5,20,1048576,5242880),br(6,18,262144,1572864),br(7,16,65536,458752),br(8,14,16384,131072),br(9,12,4096,36864),br(10,10,1024,10240),br(11,8,256,2816),br(12,6,64,768),br(13,4,16,208)];Me(Qe,function(t){return Ke(2,t)-1},Int32Array),Me(Qe,function(t){return Ke(2,t)},Int32Array),Me(Qe,function(t){return Ye(pt(2,0,!1),t)},Array);vr[0].bigN;function Er(t,n){return mr(t,n)}function Sr(t,n,e,r){const i=t,o=[t.digits,fr(t)],u=[e.digits,fr(e)],s=gt(n,!1,2);let c=0,a=Jt(s,gt(u[0][0],!1,2));for(;Ht(a,pt(0,0,!1))>0||c<u[1];){if(c>o[1])throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let t=0|~~jt(Zt(a,er)),n=Vt(a,nr);t<=o[0][c+r]?o[0][c+r]=o[0][c+r]-t:(o[0][c+r]=o[0][c+r]+(tr-t),n=$t(n,pt(1,0,!1))),a=c<u[1]?$t(n,Jt(s,gt(u[0][c+1],!1,2))):n,c+=1}ir(i)}function Or(t,n,e,r){const i=t,o=[t.digits,fr(t)],u=[e.digits,fr(e)],s=gt(n,!1,2);let c=0,a=Jt(s,gt(u[0][0],!1,2));for(;Ht(a,pt(0,0,!1))>0||c<u[1];){if(c>o[1])throw new Error("scaleSubInPlace: pre-condition did not apply, result would be -ve");let t=0|~~jt(Zt(a,er)),n=Vt(a,nr);t<tr-o[0][c+r]?o[0][c+r]=o[0][c+r]+t:(o[0][c+r]=t-(tr-o[0][c+r]),n=$t(n,pt(1,0,!1))),a=c<u[1]?$t(n,Jt(s,gt(u[0][c+1],!1,2))):n,c+=1}ir(i)}function xr(t,n,e){const r=[fr(n),fr(t)];if(r[1]<r[0]+e)return 0;{const c=[n.digits,t.digits];let a;if(0===r[0])if(r[1]===e)a=~~(c[1][e]/c[0][0]);else{a=~~jt(Vt($t(Jt(gt(c[1][r[1]],!1,2),nr),gt(c[1][r[1]-1],!1,2)),gt(c[0][0],!1,2)))}else if(r[1]===r[0]+e)a=~~(c[1][r[1]]/(c[0][r[0]]+1));else{a=~~jt(Vt($t(Jt(gt(c[1][r[1]],!1,2),nr),gt(c[1][r[1]-1],!1,2)),$t(gt(c[0][r[0]],!1,2),pt(1,0,!1))))}if(0===a){return 1!=(o=e,u=t,s=0,(i=n).bound+o<u.bound+s?-1:i.bound+o>u.bound+o?1:0|function(t,n,e){t:for(;;){if(-1===e)return 0;{const r=0|(e<o?0:t[e-o]),i=0|(e<s?0:n[e-s]);if(r===i){t=t,n=n,e-=1;continue t}return r<i?-1:1}}}(i.digits,u.digits,i.bound+o-1))?1:0}return 0|a}var i,o,u,s}function kr(t,n){if(lr(n))throw new Error;if(fr(t)<fr(n))return[ar,t];{const i=new ze((e=t).bound,(r=e.digits,Int32Array,r.slice())),o=rr(fr(t)-fr(n)+1+1);let u=0|fr(t);const s=0|fr(n);let c=u-s|0;const a=function(t){};let f=!1;for(;!f;){a([o,i,c,u]);const t=0|xr(i,n,c);t>0?(Sr(i,t,n,c),Or(o,t,cr,c),a([o,i,c,u])):(f=0===t&&0===c)||(u===s+c?(a([o,i,c-1,u]),c-=1):(a([o,i,c-1,u-1]),c-=1,u-=1))}return[ir(o),ir(i)]}var e,r}sr(2);function Cr(t){return sr(t)}function Pr(t){return function(t){const n=Ht(t,pt(0,0,!1))<0?pt(0,0,!1):t,e=rr(ur);for(let t=0;t<=ur-1;t++)e.digits[t]=~~jt(Wt(Vt(n,Ye(nr,t)),nr));return ir(e)}(t)}function Ar(t){const n=0|fr(t),e=function(t,e,r){t:for(;;){if(fr(r)>n)return new A([e,r],t);{const n=e,i=r;t=new A([n,i],t),e=n+1,r=Er(i,i);continue t}}}(new A,0,sr(10)),r=function t(n,e,r,i){if(null!=i.tail){const o=i.head[1],u=i.tail,s=kr(r,o);if(n&&lr(s[0]))return t(n,e,s[1],u);{const r=t(!1,e,s[1],u);return t(n,r,s[0],u)}}{const t=0|function(t){if(1===t.bound)return 0|t.digits[0];{let n=0;for(let e=t.bound-1;e>=0;e--)n=t.digits[e]+tr*n;return 0|n}}(r);return n&&0===t?e:new A(o(t),e)}}(!0,new A,t,e);return null==r.tail?"0":Fn("",...Ie(r,Array))}function Tr(t){return t.bound<=1}function Nr(t){return 0<t.bound?0|t.digits[0]:0}const Mr=k(function(t,n){this.signInt=t,this.v=n},D);function jr(t,n){return null!=this?Mr.call(this,t,n):new Mr(t,n)}function Dr(t){return Tr(t)&&Nr(t)<Mr.smallLim?Mr.smallPosTab[Nr(t)]:t}function Ir(t){return t.signInt}function Rr(t){return t.v}function Br(t,n){const e=[Ir(t),Ir(n)];switch(-1===e[0]?-1===e[1]?1:0===e[1]?8:1===e[1]?3:9:0===e[0]?-1===e[1]?6:0===e[1]?4:1===e[1]?5:9:1===e[0]?-1===e[1]?2:0===e[1]?7:1===e[1]?0:9:9){case 0:case 1:return hr(Rr(t),Rr(n));case 2:case 3:return!!lr(Rr(t))&&lr(Rr(n));case 4:return!0;case 5:case 6:return lr(Rr(n));case 7:case 8:return lr(Rr(t));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Ur(t,n){const e=[Ir(t),Ir(n)];switch(-1===e[0]?-1===e[1]?1:0===e[1]?8:1===e[1]?3:9:0===e[0]?-1===e[1]?6:0===e[1]?4:1===e[1]?5:9:1===e[0]?-1===e[1]?2:0===e[1]?7:1===e[1]?0:9:9){case 0:return wr(Rr(t),Rr(n));case 1:return wr(Rr(n),Rr(t));case 2:return!1;case 3:return!lr(Rr(t))||!lr(Rr(n));case 4:return!1;case 5:return!lr(Rr(n));case 6:case 7:return!1;case 8:return!lr(Rr(t));case 9:throw new Error("signs should be +/- 1 or 0\\nParameter name: x")}}function Lr(t){return t>=0?jr.call(this,1,Dr(Cr(t))):-2147483648===t?jr.call(this,-1,Dr(Pr(Gt(gt(t,!1,2))))):jr.call(this,-1,Dr(Cr(-t)))}function _r(){return Mr.one}function Fr(){return Mr.two}function qr(){return Mr.zero}Mr.smallLim=4096,Mr.smallPosTab=Me(Mr.smallLim,Cr,Array),Mr.one=Lr(1),Mr.two=Lr(2),Mr.zero=Lr(0),Mr.prototype.toString=function(){const t=this;switch(0|Ir(t)){case-1:return lr(Rr(t))?"0":"-"+Ar(Rr(t));case 0:return"0";case 1:return Ar(Rr(t));default:throw new Error("signs should be +/- 1 or 0")}},Mr.prototype.Equals=function(t){if(t instanceof Mr){return Br(this,t)}return!1},Mr.prototype.GetHashCode=function(){return 0|(0===Ir(t=this)?1:Ir(t)+function(t){let n=0;for(let e=0;e<=t.bound-1;e++)n=t.digits[e]+(n<<3);return 0|n}(Rr(t))|0);var t},Mr.prototype.CompareTo=function(t){if(t instanceof Mr){return 0|(Ur(n=this,e=t)?-1:Br(n,e)?0:1)}throw new Error("the objects are not comparable\\nParameter name: obj");var n,e};qr(),_r();qr(),_r(),Fr();function Hr(t,n){const e=new Date(t);return e.offset=null!=n?n:-6e4*(new Date).getTimezoneOffset(),e}function Gr(t){const n=pn(t),e=wn.exec(t),r=null==e?-6e4*n.getTimezoneOffset():"Z"===e[0]?0:36e5*parseInt(e[1],10)+6e4*parseInt(e[2],10);return Hr(n.getTime(),r)}function $r(t=0,n=0,e=0,r=0,i=0){switch(arguments.length){case 1:return Dt(Vt(arguments[0],1e4));case 3:t=0,n=arguments[0],e=arguments[1],r=arguments[2],i=0}return 864e5*t+36e5*n+6e4*e+1e3*r+i}function zr(t){const n=t.search("\\."),e=t.search("\\:");if(-1===n&&-1===e){const n=parseInt(t,0);if(isNaN(n))throw new Error("String was not recognized as a valid TimeSpan.");return $r(n,0,0,0,0)}if(e>0){const n=/^((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(t);if(null!=n&&null!=n[3]&&null!=n[4]){let t=0,e=0,r=0;const i=+n[3],o=+n[4];return null!=n[2]&&(t=+n[2]),null!=n[6]&&(r=+n[6]),null!=n[7]&&(e=+n[7]),$r(t,i,o,r,e)}}throw new Error("String was not recognized as a valid TimeSpan.")}function Jr(t,n,e){for(;;){const r=t,i=n,o=e;if(null==o.tail)return i;{const u=o.tail;t=r,n=r(i,o.head),e=u}}}function Vr(t){return Jr(function(t,n){return new A(n,t)},new A,t)}function Wr(t){let n=new A;for(let r=(l(e=t)?e.length:e.size)-1;r>=0;r--)n=new A(t[r],n);var e;return n}function Xr(t){return void 0===t}function Zr(t,n,e){try{return"Expecting "+t+" but instead got:"+(e?"\n":" ")+JSON.stringify(n,null,4)}catch(n){return"Expecting "+t+" but decoder failed. Couldn't report given value due to circular structure."+(e?"\n":" ")}}function Yr(t,n){let e;switch(n.tag){case 2:{const t=n.fields[1];e=Zr(n.fields[0],t,!0);break}case 1:{const t=n.fields[1],r=n.fields[2];e=Zr(n.fields[0],t,!1)+"\nReason: "+r;break}case 3:{const t=n.fields[1];e=Zr(n.fields[0],t,!0);break}case 4:{const t=n.fields[1],r=n.fields[0],i=n.fields[2];e=Zr(r,t,!0)+"\nNode `"+i+"` is unkown.";break}case 5:{const t=n.fields[1];e="Expecting "+n.fields[0]+".\n"+JSON.stringify(t,null,4);break}case 7:e="I run into the following problems:\n\n"+Fn("\n",...n.fields[0]);break;case 6:e="I run into a `fail` decoder: "+n.fields[0];break;default:{const t=n.fields[1];e=Zr(n.fields[0],t,!1)}}return 7===n.tag?e:"Error at: `"+t+"`\n"+e}const Kr=k(function(t){this.Data0=t},B);function Qr(t,n,e){const r=n(t,e);if(1===r.tag){const t=r.fields[0];return new et(1,"Error",Yr(t[0],t[1]))}{const t=r.fields[0];return new et(0,"Ok",t)}}function ti(t,n){try{return Qr("$",t,JSON.parse(n))}catch(t){if(t instanceof SyntaxError){return new et(1,"Error","Given an invalid JSON: "+t.message)}if(t instanceof Kr)return new et(1,"Error",Yr(t.Data0[0],t.Data0[1]));throw t}}function ni(t,n){if("string"==typeof n){const r=function(t){try{return[!0,mn(t)]}catch(t){return[!1,gn(-621355968e5,0)]}}(n);return r[0]?new et(0,"Ok",1===(e=r[1]).kind?e:gn(e.getTime(),1)):new et(1,"Error",[t,new He(0,"BadPrimitive","a datetime",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","a datetime",n)]);var e}function ei(t,n){if("string"==typeof n){const e=function(t){try{return[!0,Gr(t)]}catch(t){return[!1,Hr(-621355968e5,0)]}}(n);return e[0]?new et(0,"Ok",e[1]):new et(1,"Error",[t,new He(0,"BadPrimitive","a datetimeoffset",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","a datetime",n)])}function ri(t,n){if("string"==typeof n){const e=function(t){try{return[!0,zr(t)]}catch(t){return[!1,0]}}(n);return e[0]?new et(0,"Ok",e[1]):new et(1,"Error",[t,new He(0,"BadPrimitive","a timespan",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","a timespan",n)])}function ii(t,n,e,r){if(null!==r&&Object.getPrototypeOf(r||!1)===Object.prototype){const i=r[t],o=n(e+"."+t,i);if(1===o.tag){const n=o;return Xr(i)?new et(1,"Error",[e,new He(3,"BadField","an object with a field named `"+t+"`",r)]):n}return o}return new et(1,"Error",[e,new He(2,"BadType","an object",r)])}function oi(t,n,e,r){const i=e+".["+o(t)+"]";if(Array.isArray(r)){const e=r;if(t<e.length)return n(i,e[t]);{const n="a longer array. Need index `"+o(t)+"` but there are only `"+o(0|e.length)+"` entries";return new et(1,"Error",[i,new He(5,"TooSmallArray",n,r)])}}return new et(1,"Error",[i,new He(0,"BadPrimitive","an array",r)])}function ui(t,n,e){return null==e?new et(0,"Ok",null):rt(function(t){return Q(t)},t(n,e))}function si(t,n,e){if(Array.isArray(e)){let r=-1;const i=e;return rt(Vr,je(function(e,i){if(r+=1,0===e.tag){const u=e.fields[0],s=t(n+".["+o(r)+"]",i);if(0===s.tag){const t=s.fields[0];return new et(0,"Ok",new A(t,u))}{const t=s.fields[0];return new et(1,"Error",t)}}return e},new et(0,"Ok",new A),i))}return new et(1,"Error",[n,new He(0,"BadPrimitive","a list",e)])}function ci(t,n,e){if(Array.isArray(e)){let r=-1;const i=e,u=Te(new Array(i.length),0,i.length,null);return je(function(e,i){if(r+=1,0===e.tag){const u=e.fields[0],s=t(n+".["+o(r)+"]",i);if(0===s.tag){const t=s.fields[0];return u[r]=t,new et(0,"Ok",u)}{const t=s.fields[0];return new et(1,"Error",t)}}return e},new et(0,"Ok",u),i)}return new et(1,"Error",[n,new He(0,"BadPrimitive","an array",e)])}function ai(t,n,e){return new et(0,"Ok",t)}function fi(t,n,e,r){const i=n(e,r);if(0===i.tag){return t(i.fields[0],e,r)}{const t=i.fields[0];return new et(1,"Error",t)}}function li(t,n,e,r){const i=n(e,r);if(1===i.tag){const t=i.fields[0];return new et(1,"Error",t)}{const n=i.fields[0];return new et(0,"Ok",t(n))}}function hi(t){return ie(n={Compare:b},Zn(n,t));var n}function di(t,n,e,r){return n.length!==r.length?new et(1,"Error",[e,new He(6,"FailMessage",Ln(Un("Expected %i %s but got %i"))(n.length)(t)(r.length))]):De(function(t,n,r){return(i=t,function(t){return function(n){if(0===n.tag){const r=n.fields[0];return rt(function(t){return new A(t,r)},t(e,i))}return n}})(S(2,n))(r);var i},r,n,new et(0,"Ok",new A))}function wi(t,n,e,r,i,o){const u=(s=function(t){return z(t)===r},W(e).find(s));var s;if(null!=u){const e=u;if(0===o.length)return new et(0,"Ok",Y(e,[]));return rt(function(t){return Y(e,Ie(t,Array))},di("union fields",Ne(function(e){return pi(t,n,!1,e[1])},function(t){return null==t.fields?[]:t.fields.map((t,n)=>["Data"+n,t])}(e),Array),i,o))}return new et(1,"Error",[i,new He(6,"FailMessage","Cannot find case "+r+" in "+J(e))])}function gi(t,n,e,r){if((i=r)instanceof L?null!=i.fields:i instanceof D){const e=Ne(function(e){return[n?z(e).slice(null,1).toLowerCase()+z(e).slice(1,z(e).length):z(e),pi(t,n,!1,e[1])]},X(r),Array);return function(t){return function(n){return rt(function(t){return function(t,n){const e=X(t);if(e.length!==n.length)throw new Error(`Expected an array of length ${e.length} but got ${n.length}`);return new t.constructor(...n)}(r,Ie(t,Array))},(i=e,o=t,null===(u=n)||Object.getPrototypeOf(u||!1)!==Object.prototype?new et(1,"Error",[o,new He(0,"BadPrimitive","an object",u)]):(s=function(t,n){if(0===n.tag){const e=n.fields[0];return rt(function(t){return new A(t,e)},ii(t[0],S(2,t[1]),o,u))}return n},c=i,a=new et(0,"Ok",new A),c.reduceRight(function(t,n){return s(n,t)},a))));var i,o,u,s,c,a}}}return function(t){return t instanceof L?null!=t.cases:t instanceof T}(r)?function(e){return function(i){if("string"==typeof i){return wi(t,n,r,i,e,[])}if(Array.isArray(i)){const o=i,u=o[0];return wi(t,n,r,u,e,o.slice(1,o.length))}return new et(1,"Error",[e,new He(0,"BadPrimitive","a string or array",i)])}}:e?function(t){return function(n){return new et(1,"Error",[t,new He(2,"BadType","an extra coder for "+J(r),n)])}}:function(t){throw new Error(t)}(Ln(Un("Cannot generate auto decoder for %s. Please pass an extra decoder."))(J(r)));var i}function pi(t,n,e,r){const i=J(r),o=ue(i,t);if(null==o){if(V(r)){const e=(a=V(f=r)?f.generics[0]:null,pi(t,n,!1,a));return O(2,function(t,n){return ci(S(2,e),t,n)})}if(function(t){return null!=t.generics&&t.generics.length>0}(r)){if(Z(r)){const e=Ne(function(e){return pi(t,n,!1,e)},function(t){if(Z(t))return t.generics;throw new Error(`${t.fullname} is not a tuple type`)}(r),Array);return function(t){return function(n){return Array.isArray(n)?rt(function(t){return Ie(t,Array)},di("tuple elements",e,t,n)):new et(1,"Error",[t,new He(0,"BadPrimitive","an array",n)])}}}{const i=J(function(t){return null==t.generics?t:new L(t.fullname,t.generics.map(()=>G))}(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===i)return O(2,function(e,i){return ui(S(2,(o=_(r)[0],pi(t,n,!0,o))),e,i);var o});if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===i)return O(2,function(e,i){return si(S(2,(o=_(r)[0],pi(t,n,!1,o))),e,i);var o});if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===i){const e=(c=_(r)[0],pi(t,n,!1,c)),i=(s=_(r)[1],pi(t,n,!1,s));return function(t){return function(n){return li(function(t){return hi(t)},function(t,n){return r=Wr([function(t){return function(n){return r=S(2,e),o=S(2,i),u=t,null===(s=n)||Object.getPrototypeOf(s||!1)!==Object.prototype?new et(1,"Error",[u,new He(0,"BadPrimitive","an object",s)]):on(function(t,n){if(0===t.tag){const e=t.fields[0],i=r(u,n);if(0===i.tag){const t=i.fields[0],r=ii(n,o,u,s);if(0===r.tag){const n=r.fields[0];return new et(0,"Ok",new A([t,n],e))}{const t=r.fields[0];return new et(1,"Error",t)}}{const t=i.fields[0];return new et(1,"Error",t)}}return t},new et(0,"Ok",new A),Object.keys(s));var r,o,u,s}},function(t){return function(n){return si(S(2,(r=S(2,e),o=S(2,i),function(t){return function(n){return fi(function(t,n,e){return fi(S(3,function(n){const e=[t,n];return function(t){return function(t){return ai(e)}}}),function(t,n){return oi(1,o,t,n)},n,e)},function(t,n){return oi(0,r,t,n)},t,n)}})),t,n);var r,o}}]),o=t,u=n,function(t,n){t:for(;;){if(null==t.tail)return new et(1,"Error",[o,new He(7,"BadOneOf",n)]);{const r=t.tail,i=t.head,s=Qr(o,S(2,i),u);if(1===s.tag){const i=s.fields[0];t=r,e=n,n=Jr(function(t,n){return new A(n,t)},new A(i,new A),Vr(e));continue t}{const t=s.fields[0];return new et(0,"Ok",t)}}}var e}(r,new A);var r,o,u},t,n)}}}if("Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===i){const e=(u=_(r)[0],pi(t,n,!1,u));return function(t){return function(n){const r=ci(S(2,e),t,n);if(0===r.tag){const t=r.fields[0];return new et(0,"Ok",Ae(t,{Compare:b}))}{const t=r.fields[0];return new et(1,"Error",t)}}}}return gi(t,n,e,r)}}return"System.Boolean"===i?function(t){return function(n){return e=t,"boolean"==typeof(r=n)?new et(0,"Ok",r):new et(1,"Error",[e,new He(0,"BadPrimitive","a boolean",r)]);var e,r}}:"System.String"===i?function(t){return function(n){return e=t,"string"==typeof(r=n)?new et(0,"Ok",r):new et(1,"Error",[e,new He(0,"BadPrimitive","a string",r)]);var e,r}}:"System.Int32"===i?function(t){return function(n){return function(t,n){if("number"==typeof n)return-2147483648<n&&n<2147483647&&(0|n)===n?new et(0,"Ok",n):new et(1,"Error",[t,new He(1,"BadPrimitiveExtra","an int",n,"Value was either too large or too small for an int")]);if("string"==typeof n){const e=st(n,511,!1,32);return e[0]?new et(0,"Ok",e[1]):new et(1,"Error",[t,new He(0,"BadPrimitive","an int",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","an int",n)])}(t,n)}}:"System.UInt32"===i?function(t){return function(n){return function(t,n){if("number"==typeof n){const e=n;return e>=0&&e<=4294967295?new et(0,"Ok",n>>>0):new et(1,"Error",[t,new He(1,"BadPrimitiveExtra","an uint32",n,"Value was either too large or too small for an uint32")])}if("string"==typeof n){const e=st(n,511,!0,32);return e[0]?new et(0,"Ok",e[1]):new et(1,"Error",[t,new He(0,"BadPrimitive","an uint32",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","an uint32",n)])}(t,n)}}:"System.Double"===i?function(t){return function(n){return e=t,"number"==typeof(r=n)?new et(0,"Ok",r):new et(1,"Error",[e,new He(0,"BadPrimitive","a float",r)]);var e,r}}:"System.DateTime"===i?function(t){return function(n){return ni(t,n)}}:"System.DateTimeOffset"===i?function(t){return function(n){return ei(t,n)}}:"System.TimeSpan"===i?function(t){return function(n){return ri(t,n)}}:"System.Guid"===i?function(t){return function(n){return function(t,n){if("string"==typeof n){const e=qn(n,!0);return e[0]?new et(0,"Ok",e[1]):new et(1,"Error",[t,new He(0,"BadPrimitive","a guid",n)])}return new et(1,"Error",[t,new He(0,"BadPrimitive","a guid",n)])}(t,n)}}:"System.Object"===i?function(t){return function(t){return new et(0,"Ok",t)}}:gi(t,n,e,r)}return o[1];var u,s,c,a,f}k(function(){});function mi(t,n,e){const r=nt(t,!1);let i;if(null==n)i=se({Compare:p});else{i=n}return O(2,S(2,(o=e.ResolveType(),pi(i,r,!1,o))));var o}const yi=k(function(t){this.Name=t},D);const bi=mi(null,null,{ResolveType:()=>H("Contacts.Contact",[],yi,()=>[["Name",$]])});function vi(t,n,e){const r=[t,n];var i,o,u,s;switch(0===r[0].tag?null==r[1].tail?i=1:null==r[1].tail.tail?(i=0,o=r[1].head):i=3:i=1===r[0].tag&&null==r[1].tail?2:3,i){case 0:return s=o,Be(new Response(Ln(Un("Get contact with id %s"))(s),{status:"200"}));case 1:return Be(new Response("Get contacts",{status:"200"}));case 2:return u=e,fn(0,an(0,function(){return u.text().then(function(t){const n=t,e=ti(S(2,bi),n);if(1===e.tag){const t=e.fields[0];return Promise.resolve(new Response(Ln(Un("Unable to process: %s because: %O"))(n)(t),{status:"200"}))}{const t=e.fields[0];return Promise.resolve(new Response(Ln(Un("Post contact %s"))(t.Name),{status:"200"}))}})}));case 3:return Be(new Response("Invalid contact request",{status:"200"}))}}k(function(){});k(function(t,n,...e){T.call(this,t,n,...e)},T);k(function(t,n,...e){T.call(this,t,n,...e)},T);function Ei(t,n){return fetch(t,function(t,n=v.None){function e(t){throw new Error("Cannot infer key and value of "+String(t))}const r={},i=n;for(let n of t){let t=v.None;if(null==n&&e(n),"function"==typeof n.toJSON&&(n=n.toJSON(),t=i),Array.isArray(n))switch(n.length){case 0:e(n);break;case 1:r[E(n[0],t)]=!0;break;case 2:const i=n[1];r[E(n[0],t)]=i;break;default:r[E(n[0],t)]=n.slice(1)}else"string"==typeof n?r[E(n,t)]=!0:e(n)}return r}(n,1)).then(function(t){if(t.ok)return t;throw new Error(o((n=t).status)+" "+n.statusText+" for URL "+n.url);var n})}k(function(t){this.data=t},D);k(function(t,n,e){this.base=t,this.currency=n,this.amount=e},D);const Si=k(function(t,n,e){this.btc=t,this.ltc=n,this.eth=e},D);function Oi(t,n,e){const r=[t,n];switch(null!=r[1].tail&&"aggregating"===r[1].head&&null==r[1].tail.tail?0:1){case 0:return fn(0,an(0,function(){return Promise.all(Ne(function(t){return Ei(t,new A)},["https://api.coinbase.com/v2/prices/BTC-USD/spot","https://api.coinbase.com/v2/prices/ETH-USD/spot","https://api.coinbase.com/v2/prices/LTC-USD/spot"],Array)).then(function(t){const n=t;return Promise.all(Ne(function(t){return t.json()},n,Array)).then(function(t){const n=Ne(function(t){return t.data.amount},t,Array),e=new Si(n[0],n[1],n[2]);return Promise.resolve(new Response(String(e),{status:"200"}))})})}));case 1:return Be(new Response("Invalid recipes request",{status:"200"}))}}function xi(t,n,e){const r=[t,n];var i,o,u,s,c;switch(0===r[0].tag?null!=r[1].tail?"hello"===r[1].head?null!=r[1].tail.tail?"bye"===r[1].tail.head?null!=r[1].tail.tail.tail?null==r[1].tail.tail.tail.tail?(i=4,o=r[1].tail.tail.head):i=8:i=3:i=8:i=1:"bye"===r[1].head?i=null==r[1].tail.tail?2:8:"stats"===r[1].head?i=null==r[1].tail.tail?5:8:"contacts"===r[1].head?(i=6,u=r[1].tail):"cf_recipes"===r[1].head?(i=7,s=r[1].tail):i=8:i=0:null!=r[1].tail?"contacts"===r[1].head?(i=6,u=r[1].tail):"cf_recipes"===r[1].head?(i=7,s=r[1].tail):i=8:i=8,i){case 0:return Le("Home sweet home!");case 1:return Le(Ln(Un("Hello world from F# at: %A"))(yn()));case 2:return Le("Goodbye cruel world.");case 3:return Le("I say hello and the goodbye.");case 4:return Le(Ln(Un("Hello-bye id: %s"))(o));case 5:return function(t){const n=10*Math.random(),e=[qe.sum+n,qe.count+1];let r;const i=t.cf;r=null!=i?i:new Re("?","?","?","?");qe=new Fe(e[0]/e[1],e[0]+n,e[1]);const o=new Response(Ln(Un("Some request stats:\n\nColo: %s Cntry: %s\nTLSVersion: %s TLSCiper: %s\nCount: %i Ave %f\nTime: %O"))(r.colo)(r.country)(r.tlsVersion)(r.tlsCipher)(qe.count)(qe.ave)(yn()),{status:"200"});return o.headers.append("foo","bar"),Be(o)}(e);case 6:return vi(t,u,e);case 7:return Oi(t,s);case 8:return c=e,Be(new Response(Ln(Un("No handler for: %s on: %s"))(c.method)(c.url),{status:"404"}))}}function ki(t){return xi(function(t){switch(t.method.toLocaleUpperCase()){case"GET":return new _e(0,"GET");case"POST":return new _e(1,"POST");case"PUT":return new _e(2,"PUT");case"PATCH":return new _e(3,"PATCH");case"DELETE":return new _e(4,"DELETE");case"OPTION":return new _e(5,"OPTION");case"HEAD":return new _e(6,"HEAD");case"TRACE":return new _e(7,"TRACE");case"CONNECT":return new _e(8,"CONNECT");default:return new _e(9,"UNDEFINED")}}(t),Ue(t),t)}addEventListener("fetch",function(t){return t.respondWith(ki(t.request))})}]);