Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fable-core

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fable-core - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

40

fable-core.js

@@ -27,4 +27,4 @@ /* global define */

exports.Choice = function Choice(t, d) {
this.tag = t;
this.data0 = d;
this.Case = t;
this.Fields = [d];
};

@@ -57,2 +57,28 @@

Util.compareTo = function (x, y) {
function sortIfMapOrSet (o) {
return o instanceof Map || o instanceof Set ? Array.from(o).sort() : o;
}
if (typeof x != typeof y) {
return -1;
}
if (x != null && y != null && typeof x == "object" && typeof y == "object") {
var lengthComp;
if (Object.getPrototypeOf(x) != Object.getPrototypeOf(y)) {
return -1;
}
if (x[Symbol.iterator] && y[Symbol.iterator]) {
lengthComp = Util.compareTo(Seq.length(x), Seq.length(y));
return lengthComp != 0 ? lengthComp : Seq.fold2(function (prev, v1, v2) {
return prev != 0 ? prev : Util.compareTo(v1, v2);
}, 0, sortIfMapOrSet(x), sortIfMapOrSet(y));
}
if (x instanceof Date && y instanceof Date) {
return x < y ? -1 : (x > y ? 1 : 0);
}
var keys1 = Object.getOwnPropertyNames(x), keys2 = Object.getOwnPropertyNames(y);
lengthComp = Util.compareTo(keys1.length, keys2.length);
return lengthComp != 0 ? lengthComp : Seq.fold2(function (prev, k1, k2) {
return prev != 0 ? prev : Util.compareTo(x[k1], y[k2]);
}, 0, keys1.sort(), keys2.sort());
}
return x < y ? -1 : (x > y ? 1 : 0);

@@ -65,3 +91,3 @@ };

}, {}, fields);
}
};

@@ -1940,9 +1966,9 @@ var TimeSpan = exports.TimeSpan = {};

var res = f(v);
return res.tag == "Choice1Of2"
? res.data0 : null;
return res.Case == "Choice1Of2"
? res.Fields[0] : null;
}, w),
Obs.choose(function (v) {
var res = f(v);
return res.tag == "Choice2Of2"
? res.data0 : null;
return res.Case == "Choice2Of2"
? res.Fields[0] : null;
}, w),

@@ -1949,0 +1975,0 @@ ];

2

fable-core.min.js

@@ -1,1 +0,1 @@

!function(n,r){if("function"==typeof define&&define.amd)define(["exports"],r);else if("undefined"!=typeof exports)r(exports);else{var t={exports:{}};r(t.exports),n.unknown=t.exports}}(this,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=n.Symbol={interfaces:Symbol("interfaces")};n.Choice=function(n,r){this.tag=n,this.data0=r};var t=n.Util={};t.setInterfaces=function(n,t){var e=n[r.interfaces];if(Array.isArray(e))for(var o=0;o<t.length;o++)e.push(t[o]);else n[r.interfaces]=t},t.hasInterface=function(n,t){return Array.isArray(n[r.interfaces])&&n[r.interfaces].indexOf(t)>=0},t.getRestParams=function(n,r){for(var t=n.length,e=Array(t>r?t-r:0),o=r;t>o;o++)e[o-r]=n[o];return e},t.compareTo=function(n,r){return r>n?-1:n>r?1:0},t.createObj=function(n){return f.fold(function(n,r){return n[r[0]]=r[1],n},{},n)};var e=n.TimeSpan={};e.create=e.fromTicks=function(){var n=0,r=0,t=0,e=0,o=0;switch(arguments.length){case 1:return arguments[0]/1e4;case 3:r=arguments[0],t=arguments[1],e=arguments[2];break;default:n=arguments[0],r=arguments[1],t=arguments[2],e=arguments[3],o=arguments[4]||0}return 864e5*n+36e5*r+6e4*t+1e3*e+o},e.fromDays=function(n){return e.create(n,0,0,0)},e.fromHours=function(n){return e.create(n,0,0)},e.fromMinutes=function(n){return e.create(0,n,0)},e.fromSeconds=function(n){return e.create(0,0,n)},e.days=function(n){return Math.floor(n/864e5)},e.hours=function(n){return Math.floor(n%864e5/36e5)},e.minutes=function(n){return Math.floor(n%36e5/6e4)},e.seconds=function(n){return Math.floor(n%6e4/1e3)},e.milliseconds=function(n){return Math.floor(n%1e3)},e.ticks=function(n){return 1e4*n},e.totalDays=function(n){return n/864e5},e.totalHours=function(n){return n/36e5},e.totalMinutes=function(n){return n/6e4},e.totalSeconds=function(n){return n/1e3},e.duration=Math.abs,e.negate=function(n){return-n},e.add=function(n,r){return n+r},e.subtract=function(n,r){return n-r},e.compareTo=e.compare=t.compareTo;var o=n.Date={};o.__changeKind=function(n,r){var t;return n.kind==r?n:(t=new Date(n.getTime()),t.kind=r,t)},o.__getValue=function(n,r){return 1==n.kind?n["getUTC"+r]():n["get"+r]()},o.minValue=function(){return o.parse(-864e13,1)},o.maxValue=function(){return o.parse(864e13,1)},o.parse=function(n,r){var t=null==n?new Date:new Date(n);if(isNaN(t.getTime()))throw"The string is not a valid Date.";return t.kind=r||2,t},o.create=function(n,r,t,e,o,u,i,a){e=e||0,o=o||0,u=u||0,i=i||0,a=a||2;var c=1===a?new Date(Date.UTC(n,r-1,t,e,o,u,i)):new Date(n,r-1,t,e,o,u,i);if(isNaN(c.getTime()))throw"The parameters describe an unrepresentable Date.";return c.kind=a,c},o.now=o.parse,o.utcNow=function(){return o.parse(null,1)},o.today=function(){return o.date(o.now())},o.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},o.daysInMonth=function(n,r){return 2==r?o.isLeapYear(n)?29:28:r>=8?r%2==0?31:30:r%2==0?30:31},o.toUniversalTime=function(n){return o.__changeKind(n,1)},o.toLocalTime=function(n){return o.__changeKind(n,2)},o.timeOfDay=function(n){return e.create(o.hour(n),o.minute(n),o.second(n))},o.date=function(n){return o.create(o.year(n),o.month(n),o.day(n),0,0,0,0,n.kind)},o.day=function(n){return o.__getValue(n,"Date")},o.hour=function(n){return o.__getValue(n,"Hours")},o.millisecond=function(n){return o.__getValue(n,"Milliseconds")},o.minute=function(n){return o.__getValue(n,"Minutes")},o.month=function(n){return o.__getValue(n,"Month")+1},o.second=function(n){return o.__getValue(n,"Seconds")},o.year=function(n){return o.__getValue(n,"FullYear")},o.ticks=o.toBinary=function(n){return 1e4*(n.getTime()+62135604e6)},o.dayOfWeek=function(n){return o.__getValue(n,"Day")},o.dayOfYear=function(n){for(var r=o.year(n),t=o.month(n),e=o.day(n),u=1;t>u;u++)e+=o.daysInMonth(r,u);return e},o.add=o.op_Addition=function(n,r){return o.parse(n.getTime()+r,n.kind)},o.addDays=function(n,r){return o.parse(n.getTime()+864e5*r,n.kind)},o.addHours=function(n,r){return o.parse(n.getTime()+36e5*r,n.kind)},o.addMinutes=function(n,r){return o.parse(n.getTime()+6e4*r,n.kind)},o.addSeconds=function(n,r){return o.parse(n.getTime()+1e3*r,n.kind)},o.addMilliseconds=function(n,r){return o.parse(n.getTime()+r,n.kind)},o.addTicks=function(n,r){return o.parse(n.getTime()+r/1e4,n.kind)},o.addYears=function(n,r){var t=o.month(n),e=o.year(n)+r,u=o.daysInMonth(e,t),i=Math.min(u,o.day(n));return o.create(e,t,i,o.hour(n),o.minute(n),o.second(n),o.millisecond(n),n.kind)},o.addMonths=function(n,r){var t=o.month(n)+r,e=0,u=0;t>12?(e=t%12,u=Math.floor(t/12),t=e):1>t&&(e=12+t%12,u=Math.floor(t/12)+(12==e?-1:0),t=e);var i=o.year(n)+u,a=o.daysInMonth(i,t),c=Math.min(a,o.day(n));return o.create(i,t,c,o.hour(n),o.minute(n),o.second(n),o.millisecond(n),n.kind)},o.subtract=o.op_Subtraction=function(n,r){return"number"==typeof r?o.parse(n.getTime()-r,n.kind):n.getTime()-r.getTime()},o.toLongDateString=function(n){return n.toDateString()},o.toShortDateString=function(n){return n.toLocaleDateString()},o.toLongTimeString=function(n){return n.toLocaleTimeString()},o.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},o.equals=function(n,r){return n.getTime()==r.getTime()},o.compareTo=o.compare=t.compareTo;var u=n.String={};u.fsFormatRegExp=/%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,u.fsFormat=function(n){function r(n,r){return n.replace(u.fsFormatRegExp,function(n,t,e,o,i){switch(i){case"f":case"F":r=r.toFixed(o||6);break;case"g":case"G":r=r.toPrecision(o);break;case"e":case"E":r=r.toExponential(o);break;case"A":r=(r instanceof Map?"map ":r instanceof Set?"set ":"")+JSON.stringify(r,function(n,r){return r&&r[Symbol.iterator]&&!Array.isArray(r)&&!("string"==typeof r||r instanceof String)?Array.from(r):r})}var a=t.indexOf("+")>=0&&parseInt(r)>=0;if(!isNaN(e=parseInt(e))){var c=e>=0&&t.indexOf("0")>=0?"0":" ";r=u.padLeft(r,Math.abs(e)-(a?1:0),c,0>e)}return a?"+"+r:r})}function t(n){return function(o){var i=r(n,o);return u.fsFormatRegExp.test(i)?t(i):e(i)}}var e;return function(r){return e=r,u.fsFormatRegExp.test(n)?t(n):e(n)}},u.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,u.format=function(n,r){return r=t.getRestParams(arguments,1),n.replace(u.formatRegExp,function(n,t,e,i){var a=r[t];if("number"==typeof a)switch((i||"").substring(0,1)){case"f":case"F":a=i.length>1?a.toFixed(i.substring(1)):a.toFixed(2);break;case"g":case"G":a=i.length>1?a.toPrecision(i.substring(1)):a.toPrecision();break;case"e":case"E":a=i.length>1?a.toExponential(i.substring(1)):a.toExponential();break;case"p":case"P":a=(i.length>1?(100*a).toFixed(i.substring(1)):(100*a).toFixed(2))+" %"}else if(a instanceof Date){if(1===i.length)switch(i){case"D":a=a.toDateString();break;case"T":a=a.toLocaleTimeString();break;case"d":a=a.toLocaleDateString();break;case"t":a=a.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}a=i.replace(/\w+/g,function(n){var r=n;switch(n.substring(0,1)){case"y":r=n.length<4?o.year(a)%100:o.year(a);break;case"h":r=a.getHours()>12?o.hour(a)%12:o.hour(a);break;case"M":r=o.month(a);break;case"d":r=o.day(a);break;case"H":r=o.hour(a);break;case"m":r=o.minute(a);break;case"s":r=o.second(a)}return r!==n&&10>r&&n.length>1&&(r="0"+r),r})}return isNaN(e=parseInt((e||"").substring(1)))||(a=u.padLeft(a,Math.abs(e)," ",0>e)),a})},u.init=function(n,r){if(0>n)throw"String length must be non-negative";for(var t=new Array(n),e=0;n>e;e++)t[e]=r(e);return t.join("")},u.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},u.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},u.padLeft=function(n,r,t,e){var o=-1;for(t=t||" ",n=String(n),r-=n.length;++o<r;)n=e?n+t:t+n;return n},u.padRight=function(n,r,t){return u.padLeft(n,r,t,!0)},u.replace=function(n,r,t){return n.replace(new RegExp(i.escape(r),"g"),t)},u.replicate=function(n,r){return u.init(n,function(){return r})},u.split=function(n,r,e){r=Array.isArray(r)?r:t.getRestParams(arguments,1);var o=new RegExp("["+i.escape(r.join(""))+"]","g"),u=n.split(o);return e?u.filter(function(n){return n.length>0}):u},u.join=u.concat=function(n,r){return r="string"==typeof r?t.getRestParams(arguments,1):r,(Array.isArray(r)?r:Array.from(r)).join(n)},u.endsWith=function(n,r){var t=n.lastIndexOf(r);return t>=0&&t==n.length-r.length};var i=n.RegExp={};i.create=function(n,r){var t="g";return t+=1&r?"i":"",t+=2&r?"m":"",new RegExp(n,t)},i.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},i.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},i.isMatch=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);return e.test(n)},i.match=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);return e.exec(n)},i.matches=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);if(!e.global)throw"Non-global RegExp";for(var o,u=[];null!==(o=e.exec(n));)u.push(o);return u},i.options=function(n){var r=256;return r|=n.ignoreCase?1:0,r|=n.multiline?2:0},i.replace=function(n,r,t,e,o){if("string"==typeof n){var u=n;n=i.create(r,e),r=u,e=void 0}if("function"==typeof t){e=null==e?-1:e,o=null==o?0:o;var a=function(){var n=arguments[0];if(0!==e){e--;for(var r=[],o=arguments.length,u=0;o-2>u;u++)r.push(arguments[u]);r.index=arguments[o-2],r.input=arguments[o-1],n=t(r)}return n};return r.substring(0,o)+r.substring(o).replace(n,a)}if(null!=e){var c;o=null==o?0:o;var f=r.substring(o),l=i.matches(n,f),s=l.length>e?(c=l[e-1],f.substring(0,c.index+c[0].length)):f;return r.substring(0,o)+s.replace(n,t)+r.substring(o+s.length)}return r.replace(n,t)},i.split=function(n,r,t,e){if("string"==typeof n){var o=n;n=i.create(r,t),r=o,t=void 0}return r=null!=e?r.substring(e):r,r.split(n,t)};var a=n.Array={};a.addRangeInPlace=function(n,r){f.iter(function(n){r.push(n)},n)},a.blit=function(n,r,t,e,o){for(;o--;)t[e++]=n[r++]},a.partition=function(n,r){for(var t=[],e=[],o=0,u=0,i=0;i<r.length;i++)n(r[i])?t[o++]=r[i]:e[u++]=r[i];return[t,e]},a.permute=function(n,r){for(var t=r.map(function(){return 0}),e=new Array(r.length),o=0;o<r.length;o++){var u=n(o);if(0>u||u>=r.length)throw"Not a valid permutation";t[u]=r[o],e[u]=1}for(o=0;o<r.length;o++)if(1!=e[o])throw"Not a valid permutation";return t},a.removeInPlace=function(n,r){var t=r.indexOf(n);return t>-1?(r.splice(t,1),!0):!1},a.setSlice=function(n,r,t,e){var o=(t||n.length-1)-r;if(ArrayBuffer.isView(n)&&e.length<=o)n.set(e,r);else for(var u=0|r,i=0;o>=i;u++,i++)n[u]=e[i]},a.sortInPlaceBy=function(n,r,t){return t=t||1,r.sort(function(r,e){return r=n(r),e=n(e),(e>r?-1:r==e?0:1)*t})},a.unzip=function(n){for(var r=new Array(n.length),t=new Array(n.length),e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},a.unzip3=function(n){for(var r=new Array(n.length),t=new Array(n.length),e=new Array(n.length),o=0;o<n.length;o++)r[o]=n[o][0],t[o]=n[o][1],e[o]=n[o][2];return[r,t,e]};var c=n.List=function(n,r){this.head=n,this.tail=r};c.ofArray=function(n,r){for(var t=n.length-1,e=r||new c;t>=0;t--)e=new c(n[t],e);return e},Object.defineProperty(c.prototype,"length",{get:function(){return f.fold(function(n,r){return n+1},0,this)}}),c.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var r=n;return n=n.tail,{done:null==r.tail,value:r.head}}}},c.append=c.prototype.append=function(n,r){return null==r&&(r=n,n=this),f.fold(function(n,r){return new c(r,n)},r,c.rev(n))},c.choose=c.prototype.choose=function(n,r){return c.rev(f.fold(function(r,t){var e=n(t);return null!=e?new c(e,r):r},new c,r||this))},c.collect=c.prototype.collect=function(n,r){return f.fold(function(r,t){return n(t).append(r)},new c,c.rev(r||this))},c.concat=c.prototype.concat=function(n){return c.collect(function(n){return n},n||this)},c.filter=c.prototype.filter=c.where=c.prototype.where=function(n,r){return c.rev(f.fold(function(r,t){return n(t)?new c(t,r):r},new c,r||this))},c.init=function(n,r){if(0>n)throw"List length must be non-negative";for(var t=new c,e=1;n>=e;e++)t=new c(r(n-e),t);return t},c.map=c.prototype.map=function(n,r){return c.rev(f.fold(function(r,t){return new c(n(t),r)},new c,r||this))},c.mapi=c.prototype.mapi=function(n,r){return c.rev(f.fold(function(r,t,e){return new c(n(e,t),r)},new c,r||this))},c.partition=c.prototype.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1];return n(t)?[new c(t,e),o]:[e,new c(t,o)]},[new c,new c],r||this)},c.replicate=function(n,r){return c.init(n,function(){return r})},c.rev=c.prototype.rev=function(n){return f.fold(function(n,r){return new c(r,n)},new c,n||this)},c.singleton=function(n){return new c(n,new c)},c.slice=c.prototype.slice=function(n,r,t){var e=null==n,o=null==r;return c.rev(f.fold(function(t,u,i){var a=(e||i>=n)&&(o||r>=i);return a?new c(u,t):t},new c,t||this))},c.unzip=c.prototype.unzip=function(n){return f.foldBack(function(n,r){return[new c(n[0],r[0]),new c(n[1],r[1])]},n||this,[new c,new c])},c.unzip3=c.prototype.unzip3=function(n){return f.foldBack(function(n,r){return[new c(n[0],r[0]),new c(n[1],r[1]),new c(n[2],r[2])]},n||this,[new c,new c,new c])};var f=n.Seq={};f.toList=function(n){return f.foldBack(function(n,r){return new c(n,r)},n,new c)},f.ofList=function(n){return f.delay(function(){return f.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},n)})},f.ofArray=function(n){return f.delay(function(){return f.unfold(function(r){return r<n.length?[n[r],r+1]:null},0)})},f.append=function(n,r){return f.delay(function(){var t=!1,e=[n[Symbol.iterator](),r];return f.unfold(function(){var n;if(!t){if(n=e[0].next(),!n.done)return[n.value,e];t=!0,e=[null,e[1][Symbol.iterator]()]}return n=e[1].next(),n.done?null:[n.value,e]},e)})},f.average=function(n){var r=1,t=f.reduce(function(n,t){return r++,n+t},n);return t/r},f.averageBy=function(n,r){var t=1,e=f.reduce(function(r,e){return t++,(2===t?n(r):r)+n(e)},r);return e/t},f.countBy=function(n,r){return f.map(function(n){return[n[0],f.length(n[1])]},f.groupBy(n,r))},f.concat=function(n){return f.delay(function(){var r=n[Symbol.iterator]();return f.unfold(function(n){for(var t,e=null,o=!1;!o;)null==n?(t=r.next(),t.done?o=!0:n=t.value[Symbol.iterator]()):(t=n.next(),t.done?n=null:(e=t.value,o=!0));return null!=n&&null!=e?[e,n]:null},null)})},f.collect=function(n,r){return f.concat(f.map(n,r))},f.choose=function(n,r){var t=function(r){var e=r.next();if(!e.done){var o=n(e.value);return null!=o?[o,r]:t(r)}};return f.delay(function(){return f.unfold(function(n){return t(n)},r[Symbol.iterator]())})},f.compareWith=function(n,r,t){var e=f.tryFind(function(n){return 0!=n},f.map2(function(r,t){return n(r,t)},r,t));return null!=e?e:f.length(r)-f.length(t)},f.delay=function(n){var r={};return r[Symbol.iterator]=function(){return n()[Symbol.iterator]()},r},f.distinctBy=function(n,r){return f.choose(function(n){return n[0]},f.scan(function(r,t){var e=r[1],o=n(t);return e.has(o)?[null,e]:[t,e.add(o)]},[null,new Set],r))},f.distinct=function(n){return f.distinctBy(function(n){return n},n)},f.empty=function(){return f.unfold(function(){})},f.enumerateWhile=function(n,r){return f.concat(f.unfold(function(){return n()?[r,!0]:null}),!0)},f.enumerateThenFinally=function(n,r){return f.delay(function(){var t;try{t=n[Symbol.iterator]()}finally{r()}return f.unfold(function(n){try{var t=n.next();return t.done?null:[t.value,n]}finally{r()}},t)})},f.enumerateUsing=function(n,r){var t=!1,e=function(){t||(t=!0,n.dispose())};try{return f.enumerateThenFinally(r(n),e)}finally{e()}},f.exactlyOne=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";var e=r.next();if(!e.done)throw"Seq had multiple items";return t.value},f.exists=function(n,r){var t=function(r){var e=r.next();return!e.done&&(n(e.value)||t(r))};return t(r[Symbol.iterator]())},f.exists2=function(n,r,t){var e=function(r,t){var o=r.next(),u=t.next();return!o.done&&!u.done&&(n(o.value,u.value)||e(r,t))};return e(r[Symbol.iterator](),t[Symbol.iterator]())},f.filter=f.where=function(n,r){var t=function(r){var e=r.next();return e.done?void 0:n(e.value)?[e.value,r]:t(r)};return f.delay(function(){return f.unfold(t,r[Symbol.iterator]())})},f.fold=function(n,r,t){if(Array.isArray(t)||ArrayBuffer.isView(t))return t.reduce(n,r);for(var e=0,o=null,u=t[Symbol.iterator]();o=u.next(),!o.done;e++)r=n(r,o.value,e);return r},f.foldBack=function(n,r,t){for(var e=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r),o=e.length-1;o>=0;o--)t=n(e[o],t,o);return t},f.fold2=function(n,r,t,e){for(var o,u,i=t[Symbol.iterator](),a=e[Symbol.iterator](),c=0;o=i.next(),u=a.next(),!o.done&&!u.done;c++)r=n(r,o.value,u.value,c);return r},f.foldBack2=function(n,r,t,e){for(var o=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r),u=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),i=o.length-1;i>=0;i--)e=n(o[i],u[i],e,i);return e},f.forall=function(n,r){return f.fold(function(r,t){return r&&n(t)},!0,r)},f.forall2=function(n,r,t){return f.fold2(function(r,t,e){return r&&n(t,e)},!0,r,t)},f.groupBy=function(n,r){return f.fold(function(r,t){var e=n(t),o=r.get(e);return null!=o?r.set(e,new c(t,o)):r.set(e,new c(t,new c))},new Map,r)},f.head=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";return t.value},f.init=function(n,r){return f.delay(function(){return f.unfold(function(t){return n>t?[r(t),t+1]:null},0)})},f.initInfinite=function(n){return f.delay(function(){return f.unfold(function(r){return[n(r),r+1]},0)})},f.item=function(n,r){if(Array.isArray(r)||ArrayBuffer.isView(r))return r[n];for(var t=0,e=r[Symbol.iterator]();;t++){var o=e.next();if(o.done)break;if(t===n)return o.value}throw"Seq has an insufficient number of elements"},f.iter=function(n,r){f.fold(function(r,t){n(t)},null,r)},f.iter2=function(n,r,t){f.fold2(function(r,t,e){n(t,e)},null,r,t)},f.iteri=function(n,r){f.fold(function(r,t,e){n(e,t)},null,r)},f.iteri2=function(n,r,t){f.fold2(function(r,t,e,o){n(o,t,e)},null,r,t)},f.isEmpty=function(n){var r=n[Symbol.iterator]();return r.next().done},f.last=function(n){return f.reduce(function(n,r){return r},n)},f.length=function(n){return Array.isArray(n)||ArrayBuffer.isView(n)?n.length:f.fold(function(n,r){return n+1},0,n)},f.map=function(n,r){return f.delay(function(){return f.unfold(function(r){var t=r.next();return t.done?null:[n(t.value),r]},r[Symbol.iterator]())})},f.mapi=function(n,r){return f.delay(function(){var t=0;return f.unfold(function(r){var e=r.next();return e.done?null:[n(t++,e.value),r]},r[Symbol.iterator]())})},f.map2=function(n,r,t){return f.delay(function(){var e=r[Symbol.iterator](),o=t[Symbol.iterator]();return f.unfold(function(){var r=e.next(),t=o.next();return r.done||t.done?null:[n(r.value,t.value),null]})})},f.mapi2=function(n,r,t){return f.delay(function(){var e=0,o=r[Symbol.iterator](),u=t[Symbol.iterator]();return f.unfold(function(){var r=o.next(),t=u.next();return r.done||t.done?null:[n(e++,r.value,t.value),null]})})},f.map3=function(n,r,t,e){return f.delay(function(){var o=r[Symbol.iterator](),u=t[Symbol.iterator](),i=e[Symbol.iterator]();return f.unfold(function(){var r=o.next(),t=u.next(),e=i.next();return r.done||t.done||e.done?null:[n(r.value,t.value,e.value),null]})})},f.max=function(n){return f.reduce(function(n,r){return Math.max(n,r)},n)},f.maxBy=function(n,r){return f.reduce(function(r,t){return n(t)>n(r)?t:r},r)},f.min=function(n){return f.reduce(function(n,r){return Math.min(n,r)},n)},f.minBy=function(n,r){return f.reduce(function(r,t){return n(t)>n(r)?r:t},r)},f.pairwise=function(n){return f.skip(1,f.scan(function(n,r){return[n[1],r]},[0,0],n))},f.permute=function(n,r){var t=Array.from(r);return f.ofArray(a.permute(n,t))},f.rangeStep=function(n,r,t){if(0===r)throw"Step cannot be 0";return f.unfold(function(n){return r>0&&t>=n||0>r&&n>=t?[n,n+r]:null},n)},f.range=function(n,r){return f.rangeStep(n,1,r)},f.readonly=function(n){return f.map(function(n){return n},n)},f.reduce=function(n,r){if(Array.isArray(r)||ArrayBuffer.isView(r))return r.reduce(n);var t=r[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";for(var o=e.value;e=t.next(),!e.done;)o=n(o,e.value);return o},f.reduceBack=function(n,r){var t=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r);if(0===t.length)throw"Seq was empty";for(var e=t[t.length-1],o=t.length-2;o>=0;o--)e=n(t[o],e,o);return e},f.replicate=function(n,r){return f.init(n,function(){return r})},f.rev=function(n){var r=Array.isArray(n)||ArrayBuffer.isView(n)?n.slice(0):Array.from(n);return r.reverse()},f.scan=function(n,r,t){return f.delay(function(){var e=t[Symbol.iterator]();return f.unfold(function(t){if(null==t)return[r,r];var o=e.next();return o.done?void 0:(t=n(t,o.value),[t,t])},null)})},f.scanBack=function(n,r,t){return f.rev(f.scan(function(r,t){return n(t,r)},t,f.rev(r)))},f.singleton=function(n){return f.unfold(function(n){return null!=n?[n,null]:null},n)},f.skip=function(n,r){var t={};return t[Symbol.iterator]=function(){for(var t=r[Symbol.iterator](),e=1;n>=e;e++)t.next();return t},t},f.skipWhile=function(n,r){return f.delay(function(){var t=!1;return f.filter(function(r){return t||(t=!n(r))},r)})},f.sort=function(n){var r=Array.from(n);return f.ofArray(r.sort())},f.sortWith=function(n,r){var t=Array.from(r);return f.ofArray(t.sort(n))},f.sortBy=function(n,r){var t=Array.from(r);return f.ofArray(a.sortInPlaceBy(n,t))},f.sortDescending=function(n,r){var t=Array.from(r);return f.ofArray(t.sort(function(n,r){return n>r?-1:n==r?0:1}))},f.sortByDescending=function(n,r){var t=Array.from(r);return f.ofArray(a.sortInPlaceBy(n,t,-1))},f.sum=function(n,r){return r=r||function(n,r){return n+r},f.reduce(function(n,t){return r(n,t)},n)},f.sumBy=function(n,r,t){var e=!0;return t=t||function(n,r){return n+r},f.reduce(function(r,t){return r=e?n(r):r,e=!1,r+n(t)},r)},f.tail=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";var e={};return e[Symbol.iterator]=function(){return r},e},f.take=f.truncate=function(n,r){return f.delay(function(){var t=r[Symbol.iterator]();return f.unfold(function(r){if(n>r){var e=t.next();return[e.value,r+1]}},0)})},f.takeWhile=function(n,r){return f.delay(function(){var t=r[Symbol.iterator]();return f.unfold(function(r){var e=t.next();return!e.done&&n(e.value)?[e.value,null]:void 0},0)})},f.tryFind=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++)if(n(t.value,e))return t.value},f.find=function(n,r){var t=f.tryFind(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.tryFindIndex=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++)if(n(t.value,e))return e},f.findIndex=function(n,r){var t=f.tryFindIndex(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.tryPick=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++){var u=n(t.value,e);if(null!=u)return u}},f.pick=function(n,r){var t=f.tryPick(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.unfold=function(n,r){var t={};return t[Symbol.iterator]=function(){return{next:function(){var t=n(r);return null!=t?(r=t[1],{done:!1,value:t[0]}):{done:!0}}}},t},f.zip=function(n,r){return f.map2(function(n,r){return[n,r]},n,r)},f.zip3=function(n,r,t){return f.map3(function(n,r,t){return[n,r,t]},n,r,t)};var l=n.Set={};l.ofArray=function(n){for(var r=new Set,t=0;t<n.length;t++)r.add(n[t]);return r},l.ofSeq=function(n){return f.fold(function(n,r){return n.add(r)},new Set,n)},l.op_Addition=l.union=function(n,r){var t=new Set(n);return r.forEach(function(n){t.add(n)}),t},l.unionMany=function(n){return f.fold(function(n,r){return r.forEach(function(r){n.add(r)}),n},new Set,n)},l.op_Subtraction=l.difference=function(n,r){var t=new Set(n);return r.forEach(function(n){t["delete"](n)}),t},l.intersect=function(n,r){var t=new Set(n);return n.forEach(function(n){r.has(n)||t["delete"](n)}),t},l.intersectMany=function(n){var r=Array.isArray(n)?n:Array.from(n);if(0==r.length)throw"Seq was empty";var t=new Set(r[0]);return f.iter(function(n){for(var e=1;e<r.length;e++)if(!r[e].has(n)){t["delete"](n);break}},r[0]),t},l.isProperSubsetOf=l.isProperSubset=function(n,r){return f.forall(function(n){return r.has(n)},n)&&f.exists(function(r){return!n.has(r)},r)},l.isSubsetOf=l.isSubset=function(n,r){return f.forall(function(n){return r.has(n)},n)},l.isProperSupersetOf=l.isProperSuperset=function(n,r){return l.isProperSubset(r,n)},l.isSupersetOf=l.isSuperset=function(n,r){return l.isSubset(r,n)},l.copyTo=function(n,r,t,e){if(!r instanceof Array)throw"Array is invalid";e=e||r.length;for(var o=t||0,u=n[Symbol.iterator]();e--;){var i=u.next();if(i.done)break;r[o++]=i.value}},l.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1];return n(t)?[e.add(t),o]:[e,o.add(t)]},[new Set,new Set],r)},l.removeInPlace=function(n,r){return r["delete"](n),r},l.remove=function(n,r){return l.removeInPlace(n,new Set(r))};var s=n.Map={};s.ofArray=function(n){for(var r=new Map,t=0;t<n.length;t++)r.set(n[t][0],n[t][1]);return r},s.ofSeq=function(n){return f.fold(function(n,r){return n.set(r[0],r[1])},new Map,n)},s.containsValue=function(n,r){return f.fold(function(t,e){return t||r.get(e)===n},!1,r.keys())},s.exists=function(n,r){return f.exists(function(r){return n(r[0],r[1])},r)},s.filter=function(n,r){return f.fold(function(r,t){return n(t[0],t[1])?r.set(t[0],t[1]):r},new Map,r)},s.fold=function(n,r,t){return f.fold(function(r,t){return n(r,t[0],t[1])},r,t)},s.foldBack=function(n,r,t){return f.foldBack(function(r,t){return n(r[0],r[1],t)},r,t)},s.forall=function(n,r){return f.forall(function(r){return n(r[0],r[1])},r)},s.iter=function(n,r){return f.iter(function(r){n(r[0],r[1])},r)},s.map=function(n,r){return f.fold(function(r,t){return r.set(t[0],n(t[0],t[1]))},new Map,r)},s.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1],u=t[0],i=t[1];return n(u,i)?[e.set(u,i),o]:[e,o.set(u,i)]},[new Map,new Map],r)},s.findKey=function(n,r){return f.pick(function(r){return n(r[0],r[1])?r[0]:null},r)},s.tryFindKey=function(n,r){return f.tryPick(function(r){return n(r[0],r[1])?r[0]:null},r)},s.pick=function(n,r){return f.pick(function(r){var t=n(r[0],r[1]);return null!=t?t:null},r)},s.removeInPlace=l.removeInPlace,s.remove=function(n,r){return s.removeInPlace(n,new Map(r))},s.tryPick=function(n,r){return f.tryPick(function(r){var t=n(r[0],r[1]);return null!=t?t:null},r)};var d=n.Async={};d.__protectedCont=function(n){return function(r){if(null!=r.cancelToken&&r.cancelToken.isCancelled)throw"cancelled";try{n(r)}catch(t){r.onError(t)}}},d.bind=function(n,r){return d.__protectedCont(function(t){n({onSuccess:function(n){return r(n)(t)},onError:t.onError,cancelToken:t.cancelToken})})},d.combine=function(n,r){return d.bind(n,function(){return r})},d.delay=function(n){return d.__protectedCont(function(r){n()(r)})},d["for"]=function(n,r){var t=n[Symbol.iterator](),e=t.next();return d["while"](function(){return!e.done},d.delay(function(){var n=r(e.value);return e=t.next(),n}))},d["return"]=function(n){return d.__protectedCont(function(r){r.onSuccess(n)})},d.returnFrom=function(n){return n},d.tryFinally=function(n,r){return d.__protectedCont(function(t){n({onSuccess:function(n){r(),t.onSuccess(n)},onError:function(n){r(),t.onError(n)},cancelToken:t.cancelToken})})},d.tryWith=function(n,r){return d.__protectedCont(function(t){n({onSuccess:t.onSuccess,cancelToken:t.cancelToken,onError:function(n){t.onSuccess(r(n))}})})},d.using=function(n,r){return d.tryFinally(r(n),function(){n.dispose()})},d["while"]=function(n,r){return n()?d.bind(r,function(){return d["while"](n,r)}):d["return"]()},d.zero=function(){return d.__protectedCont(function(n){n.onSuccess()})},d.start=d.startImmediate=function(n,r){n({onSuccess:function(){},onError:function(){},cancelToken:r})},Object.defineProperty(d,"cancellationToken",{get:function(){return d.__protectedCont(function(n){return n.onSuccess(n.cancelToken)})}}),d.fromContinuations=function(n){return d.__protectedCont(function(r){return n(r.onSuccess,r.onError,r.onError)})},d.sleep=function(n){return d.__protectedCont(function(r){setTimeout(function(){if(null!=r.cancelToken&&r.cancelToken.isCancelled)throw"cancelled";r.onSuccess()},n)})};var y=function(n,r,t){this.onNext=n,this.onError=r||function(n){},this.onCompleted=t||function(){}};t.setInterfaces(y.prototype,["System.IObserver"]);var p=function(n){this.subscribe=n};t.setInterfaces(p.prototype,["System.IObservable"]);var m=n.Observable={};m.__protect=function(n,r,t){try{r(n())}catch(e){t(e)}},m.map=function(n,r){return new p(function(t){return r.subscribe(new y(function(r){m.__protect(function(){n(r)},t.onNext,t.onError)},t.onError,t.onCompleted))})},m.choose=function(n,r){return new p(function(t){return r.subscribe(new y(function(r){m.__protect(function(){n(r)},function(n){null!=n&&t.onNext(n)},t.onError)},t.onError,t.onCompleted))})},m.filter=function(n,r){return m.choose(function(r){return n(r)?r:null},r)},m.partition=function(n,r){return[m.filter(n,r),m.filter(function(r){return!n(r)},r)]},m.scan=function(n,r,t){return new p(function(e){return t.subscribe(new y(function(t){m.__protect(function(){n(r,t)},function(n){r=n,e.onNext(n)},e.onError)},e.onError,e.onCompleted))})},m.add=function(n,r){r.subscribe(new y(n))},m.subscribe=function(n,r){return r.subscribe(new y(n))},m.pairwise=function(n){return new p(function(r){var t=null;return n.subscribe(new y(function(n){null!=t&&r.onNext([t,n]),t=n},r.onError,r.onCompleted))})},m.merge=function(n,t){return new p(function(e){var o=!1,u=!1,i=!1,a=n.subscribe(new y(function(n){o||e.onNext(n)},function(n){o||(o=!0,e.onError(n))},function(){o||(u=!0,i&&(o=!0,e.onCompleted()))})),c=t.subscribe(new y(function(n){o||e.onNext(n)},function(n){o||(o=!0,e.onError(n))},function(){o||(i=!0,u&&(o=!0,e.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[r.interfaces]=["System.IDisposable"],f})},m.split=function(n,r){return[m.choose(function(r){var t=n(r);return"Choice1Of2"==t.tag?t.data0:null},r),m.choose(function(r){var t=n(r);return"Choice2Of2"==t.tag?t.data0:null},r)]}});
!function(n,r){if("function"==typeof define&&define.amd)define(["exports"],r);else if("undefined"!=typeof exports)r(exports);else{var t={exports:{}};r(t.exports),n.unknown=t.exports}}(this,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=n.Symbol={interfaces:Symbol("interfaces")};n.Choice=function(n,r){this.Case=n,this.Fields=[r]};var t=n.Util={};t.setInterfaces=function(n,t){var e=n[r.interfaces];if(Array.isArray(e))for(var o=0;o<t.length;o++)e.push(t[o]);else n[r.interfaces]=t},t.hasInterface=function(n,t){return Array.isArray(n[r.interfaces])&&n[r.interfaces].indexOf(t)>=0},t.getRestParams=function(n,r){for(var t=n.length,e=Array(t>r?t-r:0),o=r;t>o;o++)e[o-r]=n[o];return e},t.compareTo=function(n,r){function e(n){return n instanceof Map||n instanceof Set?Array.from(n).sort():n}if(typeof n!=typeof r)return-1;if(null!=n&&null!=r&&"object"==typeof n&&"object"==typeof r){var o;if(Object.getPrototypeOf(n)!=Object.getPrototypeOf(r))return-1;if(n[Symbol.iterator]&&r[Symbol.iterator])return o=t.compareTo(f.length(n),f.length(r)),0!=o?o:f.fold2(function(n,r,e){return 0!=n?n:t.compareTo(r,e)},0,e(n),e(r));if(n instanceof Date&&r instanceof Date)return r>n?-1:n>r?1:0;var u=Object.getOwnPropertyNames(n),i=Object.getOwnPropertyNames(r);return o=t.compareTo(u.length,i.length),0!=o?o:f.fold2(function(e,o,u){return 0!=e?e:t.compareTo(n[o],r[u])},0,u.sort(),i.sort())}return r>n?-1:n>r?1:0},t.createObj=function(n){return f.fold(function(n,r){return n[r[0]]=r[1],n},{},n)};var e=n.TimeSpan={};e.create=e.fromTicks=function(){var n=0,r=0,t=0,e=0,o=0;switch(arguments.length){case 1:return arguments[0]/1e4;case 3:r=arguments[0],t=arguments[1],e=arguments[2];break;default:n=arguments[0],r=arguments[1],t=arguments[2],e=arguments[3],o=arguments[4]||0}return 864e5*n+36e5*r+6e4*t+1e3*e+o},e.fromDays=function(n){return e.create(n,0,0,0)},e.fromHours=function(n){return e.create(n,0,0)},e.fromMinutes=function(n){return e.create(0,n,0)},e.fromSeconds=function(n){return e.create(0,0,n)},e.days=function(n){return Math.floor(n/864e5)},e.hours=function(n){return Math.floor(n%864e5/36e5)},e.minutes=function(n){return Math.floor(n%36e5/6e4)},e.seconds=function(n){return Math.floor(n%6e4/1e3)},e.milliseconds=function(n){return Math.floor(n%1e3)},e.ticks=function(n){return 1e4*n},e.totalDays=function(n){return n/864e5},e.totalHours=function(n){return n/36e5},e.totalMinutes=function(n){return n/6e4},e.totalSeconds=function(n){return n/1e3},e.duration=Math.abs,e.negate=function(n){return-n},e.add=function(n,r){return n+r},e.subtract=function(n,r){return n-r},e.compareTo=e.compare=t.compareTo;var o=n.Date={};o.__changeKind=function(n,r){var t;return n.kind==r?n:(t=new Date(n.getTime()),t.kind=r,t)},o.__getValue=function(n,r){return 1==n.kind?n["getUTC"+r]():n["get"+r]()},o.minValue=function(){return o.parse(-864e13,1)},o.maxValue=function(){return o.parse(864e13,1)},o.parse=function(n,r){var t=null==n?new Date:new Date(n);if(isNaN(t.getTime()))throw"The string is not a valid Date.";return t.kind=r||2,t},o.create=function(n,r,t,e,o,u,i,a){e=e||0,o=o||0,u=u||0,i=i||0,a=a||2;var c=1===a?new Date(Date.UTC(n,r-1,t,e,o,u,i)):new Date(n,r-1,t,e,o,u,i);if(isNaN(c.getTime()))throw"The parameters describe an unrepresentable Date.";return c.kind=a,c},o.now=o.parse,o.utcNow=function(){return o.parse(null,1)},o.today=function(){return o.date(o.now())},o.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0},o.daysInMonth=function(n,r){return 2==r?o.isLeapYear(n)?29:28:r>=8?r%2==0?31:30:r%2==0?30:31},o.toUniversalTime=function(n){return o.__changeKind(n,1)},o.toLocalTime=function(n){return o.__changeKind(n,2)},o.timeOfDay=function(n){return e.create(o.hour(n),o.minute(n),o.second(n))},o.date=function(n){return o.create(o.year(n),o.month(n),o.day(n),0,0,0,0,n.kind)},o.day=function(n){return o.__getValue(n,"Date")},o.hour=function(n){return o.__getValue(n,"Hours")},o.millisecond=function(n){return o.__getValue(n,"Milliseconds")},o.minute=function(n){return o.__getValue(n,"Minutes")},o.month=function(n){return o.__getValue(n,"Month")+1},o.second=function(n){return o.__getValue(n,"Seconds")},o.year=function(n){return o.__getValue(n,"FullYear")},o.ticks=o.toBinary=function(n){return 1e4*(n.getTime()+62135604e6)},o.dayOfWeek=function(n){return o.__getValue(n,"Day")},o.dayOfYear=function(n){for(var r=o.year(n),t=o.month(n),e=o.day(n),u=1;t>u;u++)e+=o.daysInMonth(r,u);return e},o.add=o.op_Addition=function(n,r){return o.parse(n.getTime()+r,n.kind)},o.addDays=function(n,r){return o.parse(n.getTime()+864e5*r,n.kind)},o.addHours=function(n,r){return o.parse(n.getTime()+36e5*r,n.kind)},o.addMinutes=function(n,r){return o.parse(n.getTime()+6e4*r,n.kind)},o.addSeconds=function(n,r){return o.parse(n.getTime()+1e3*r,n.kind)},o.addMilliseconds=function(n,r){return o.parse(n.getTime()+r,n.kind)},o.addTicks=function(n,r){return o.parse(n.getTime()+r/1e4,n.kind)},o.addYears=function(n,r){var t=o.month(n),e=o.year(n)+r,u=o.daysInMonth(e,t),i=Math.min(u,o.day(n));return o.create(e,t,i,o.hour(n),o.minute(n),o.second(n),o.millisecond(n),n.kind)},o.addMonths=function(n,r){var t=o.month(n)+r,e=0,u=0;t>12?(e=t%12,u=Math.floor(t/12),t=e):1>t&&(e=12+t%12,u=Math.floor(t/12)+(12==e?-1:0),t=e);var i=o.year(n)+u,a=o.daysInMonth(i,t),c=Math.min(a,o.day(n));return o.create(i,t,c,o.hour(n),o.minute(n),o.second(n),o.millisecond(n),n.kind)},o.subtract=o.op_Subtraction=function(n,r){return"number"==typeof r?o.parse(n.getTime()-r,n.kind):n.getTime()-r.getTime()},o.toLongDateString=function(n){return n.toDateString()},o.toShortDateString=function(n){return n.toLocaleDateString()},o.toLongTimeString=function(n){return n.toLocaleTimeString()},o.toShortTimeString=function(n){return n.toLocaleTimeString().replace(/:\d\d(?!:)/,"")},o.equals=function(n,r){return n.getTime()==r.getTime()},o.compareTo=o.compare=t.compareTo;var u=n.String={};u.fsFormatRegExp=/%([0+ ]*)(-?\d+)?(?:\.(\d+))?(\w)/,u.fsFormat=function(n){function r(n,r){return n.replace(u.fsFormatRegExp,function(n,t,e,o,i){switch(i){case"f":case"F":r=r.toFixed(o||6);break;case"g":case"G":r=r.toPrecision(o);break;case"e":case"E":r=r.toExponential(o);break;case"A":r=(r instanceof Map?"map ":r instanceof Set?"set ":"")+JSON.stringify(r,function(n,r){return r&&r[Symbol.iterator]&&!Array.isArray(r)&&!("string"==typeof r||r instanceof String)?Array.from(r):r})}var a=t.indexOf("+")>=0&&parseInt(r)>=0;if(!isNaN(e=parseInt(e))){var c=e>=0&&t.indexOf("0")>=0?"0":" ";r=u.padLeft(r,Math.abs(e)-(a?1:0),c,0>e)}return a?"+"+r:r})}function t(n){return function(o){var i=r(n,o);return u.fsFormatRegExp.test(i)?t(i):e(i)}}var e;return function(r){return e=r,u.fsFormatRegExp.test(n)?t(n):e(n)}},u.formatRegExp=/\{(\d+)(,-?\d+)?(?:\:(.+?))?\}/g,u.format=function(n,r){return r=t.getRestParams(arguments,1),n.replace(u.formatRegExp,function(n,t,e,i){var a=r[t];if("number"==typeof a)switch((i||"").substring(0,1)){case"f":case"F":a=i.length>1?a.toFixed(i.substring(1)):a.toFixed(2);break;case"g":case"G":a=i.length>1?a.toPrecision(i.substring(1)):a.toPrecision();break;case"e":case"E":a=i.length>1?a.toExponential(i.substring(1)):a.toExponential();break;case"p":case"P":a=(i.length>1?(100*a).toFixed(i.substring(1)):(100*a).toFixed(2))+" %"}else if(a instanceof Date){if(1===i.length)switch(i){case"D":a=a.toDateString();break;case"T":a=a.toLocaleTimeString();break;case"d":a=a.toLocaleDateString();break;case"t":a=a.toLocaleTimeString().replace(/:\d\d(?!:)/,"")}a=i.replace(/\w+/g,function(n){var r=n;switch(n.substring(0,1)){case"y":r=n.length<4?o.year(a)%100:o.year(a);break;case"h":r=a.getHours()>12?o.hour(a)%12:o.hour(a);break;case"M":r=o.month(a);break;case"d":r=o.day(a);break;case"H":r=o.hour(a);break;case"m":r=o.minute(a);break;case"s":r=o.second(a)}return r!==n&&10>r&&n.length>1&&(r="0"+r),r})}return isNaN(e=parseInt((e||"").substring(1)))||(a=u.padLeft(a,Math.abs(e)," ",0>e)),a})},u.init=function(n,r){if(0>n)throw"String length must be non-negative";for(var t=new Array(n),e=0;n>e;e++)t[e]=r(e);return t.join("")},u.isNullOrEmpty=function(n){return"string"!=typeof n||0==n.length},u.isNullOrWhiteSpace=function(n){return"string"!=typeof n||/^\s*$/.test(n)},u.padLeft=function(n,r,t,e){var o=-1;for(t=t||" ",n=String(n),r-=n.length;++o<r;)n=e?n+t:t+n;return n},u.padRight=function(n,r,t){return u.padLeft(n,r,t,!0)},u.replace=function(n,r,t){return n.replace(new RegExp(i.escape(r),"g"),t)},u.replicate=function(n,r){return u.init(n,function(){return r})},u.split=function(n,r,e){r=Array.isArray(r)?r:t.getRestParams(arguments,1);var o=new RegExp("["+i.escape(r.join(""))+"]","g"),u=n.split(o);return e?u.filter(function(n){return n.length>0}):u},u.join=u.concat=function(n,r){return r="string"==typeof r?t.getRestParams(arguments,1):r,(Array.isArray(r)?r:Array.from(r)).join(n)},u.endsWith=function(n,r){var t=n.lastIndexOf(r);return t>=0&&t==n.length-r.length};var i=n.RegExp={};i.create=function(n,r){var t="g";return t+=1&r?"i":"",t+=2&r?"m":"",new RegExp(n,t)},i.escape=function(n){return n.replace(/[\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},i.unescape=function(n){return n.replace(/\\([\-\[\/\{\}\(\)\*\+\?\.\\\^\$\|])/g,"$1")},i.isMatch=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);return e.test(n)},i.match=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);return e.exec(n)},i.matches=function(n,r,t){var e=n instanceof RegExp?(e=n,n=r,e.lastIndex=null!=t?t:0,e):e=i.create(r,t);if(!e.global)throw"Non-global RegExp";for(var o,u=[];null!==(o=e.exec(n));)u.push(o);return u},i.options=function(n){var r=256;return r|=n.ignoreCase?1:0,r|=n.multiline?2:0},i.replace=function(n,r,t,e,o){if("string"==typeof n){var u=n;n=i.create(r,e),r=u,e=void 0}if("function"==typeof t){e=null==e?-1:e,o=null==o?0:o;var a=function(){var n=arguments[0];if(0!==e){e--;for(var r=[],o=arguments.length,u=0;o-2>u;u++)r.push(arguments[u]);r.index=arguments[o-2],r.input=arguments[o-1],n=t(r)}return n};return r.substring(0,o)+r.substring(o).replace(n,a)}if(null!=e){var c;o=null==o?0:o;var f=r.substring(o),l=i.matches(n,f),s=l.length>e?(c=l[e-1],f.substring(0,c.index+c[0].length)):f;return r.substring(0,o)+s.replace(n,t)+r.substring(o+s.length)}return r.replace(n,t)},i.split=function(n,r,t,e){if("string"==typeof n){var o=n;n=i.create(r,t),r=o,t=void 0}return r=null!=e?r.substring(e):r,r.split(n,t)};var a=n.Array={};a.addRangeInPlace=function(n,r){f.iter(function(n){r.push(n)},n)},a.blit=function(n,r,t,e,o){for(;o--;)t[e++]=n[r++]},a.partition=function(n,r){for(var t=[],e=[],o=0,u=0,i=0;i<r.length;i++)n(r[i])?t[o++]=r[i]:e[u++]=r[i];return[t,e]},a.permute=function(n,r){for(var t=r.map(function(){return 0}),e=new Array(r.length),o=0;o<r.length;o++){var u=n(o);if(0>u||u>=r.length)throw"Not a valid permutation";t[u]=r[o],e[u]=1}for(o=0;o<r.length;o++)if(1!=e[o])throw"Not a valid permutation";return t},a.removeInPlace=function(n,r){var t=r.indexOf(n);return t>-1?(r.splice(t,1),!0):!1},a.setSlice=function(n,r,t,e){var o=(t||n.length-1)-r;if(ArrayBuffer.isView(n)&&e.length<=o)n.set(e,r);else for(var u=0|r,i=0;o>=i;u++,i++)n[u]=e[i]},a.sortInPlaceBy=function(n,r,t){return t=t||1,r.sort(function(r,e){return r=n(r),e=n(e),(e>r?-1:r==e?0:1)*t})},a.unzip=function(n){for(var r=new Array(n.length),t=new Array(n.length),e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},a.unzip3=function(n){for(var r=new Array(n.length),t=new Array(n.length),e=new Array(n.length),o=0;o<n.length;o++)r[o]=n[o][0],t[o]=n[o][1],e[o]=n[o][2];return[r,t,e]};var c=n.List=function(n,r){this.head=n,this.tail=r};c.ofArray=function(n,r){for(var t=n.length-1,e=r||new c;t>=0;t--)e=new c(n[t],e);return e},Object.defineProperty(c.prototype,"length",{get:function(){return f.fold(function(n,r){return n+1},0,this)}}),c.prototype[Symbol.iterator]=function(){var n=this;return{next:function(){var r=n;return n=n.tail,{done:null==r.tail,value:r.head}}}},c.append=c.prototype.append=function(n,r){return null==r&&(r=n,n=this),f.fold(function(n,r){return new c(r,n)},r,c.rev(n))},c.choose=c.prototype.choose=function(n,r){return c.rev(f.fold(function(r,t){var e=n(t);return null!=e?new c(e,r):r},new c,r||this))},c.collect=c.prototype.collect=function(n,r){return f.fold(function(r,t){return n(t).append(r)},new c,c.rev(r||this))},c.concat=c.prototype.concat=function(n){return c.collect(function(n){return n},n||this)},c.filter=c.prototype.filter=c.where=c.prototype.where=function(n,r){return c.rev(f.fold(function(r,t){return n(t)?new c(t,r):r},new c,r||this))},c.init=function(n,r){if(0>n)throw"List length must be non-negative";for(var t=new c,e=1;n>=e;e++)t=new c(r(n-e),t);return t},c.map=c.prototype.map=function(n,r){return c.rev(f.fold(function(r,t){return new c(n(t),r)},new c,r||this))},c.mapi=c.prototype.mapi=function(n,r){return c.rev(f.fold(function(r,t,e){return new c(n(e,t),r)},new c,r||this))},c.partition=c.prototype.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1];return n(t)?[new c(t,e),o]:[e,new c(t,o)]},[new c,new c],r||this)},c.replicate=function(n,r){return c.init(n,function(){return r})},c.rev=c.prototype.rev=function(n){return f.fold(function(n,r){return new c(r,n)},new c,n||this)},c.singleton=function(n){return new c(n,new c)},c.slice=c.prototype.slice=function(n,r,t){var e=null==n,o=null==r;return c.rev(f.fold(function(t,u,i){var a=(e||i>=n)&&(o||r>=i);return a?new c(u,t):t},new c,t||this))},c.unzip=c.prototype.unzip=function(n){return f.foldBack(function(n,r){return[new c(n[0],r[0]),new c(n[1],r[1])]},n||this,[new c,new c])},c.unzip3=c.prototype.unzip3=function(n){return f.foldBack(function(n,r){return[new c(n[0],r[0]),new c(n[1],r[1]),new c(n[2],r[2])]},n||this,[new c,new c,new c])};var f=n.Seq={};f.toList=function(n){return f.foldBack(function(n,r){return new c(n,r)},n,new c)},f.ofList=function(n){return f.delay(function(){return f.unfold(function(n){return null!=n.tail?[n.head,n.tail]:null},n)})},f.ofArray=function(n){return f.delay(function(){return f.unfold(function(r){return r<n.length?[n[r],r+1]:null},0)})},f.append=function(n,r){return f.delay(function(){var t=!1,e=[n[Symbol.iterator](),r];return f.unfold(function(){var n;if(!t){if(n=e[0].next(),!n.done)return[n.value,e];t=!0,e=[null,e[1][Symbol.iterator]()]}return n=e[1].next(),n.done?null:[n.value,e]},e)})},f.average=function(n){var r=1,t=f.reduce(function(n,t){return r++,n+t},n);return t/r},f.averageBy=function(n,r){var t=1,e=f.reduce(function(r,e){return t++,(2===t?n(r):r)+n(e)},r);return e/t},f.countBy=function(n,r){return f.map(function(n){return[n[0],f.length(n[1])]},f.groupBy(n,r))},f.concat=function(n){return f.delay(function(){var r=n[Symbol.iterator]();return f.unfold(function(n){for(var t,e=null,o=!1;!o;)null==n?(t=r.next(),t.done?o=!0:n=t.value[Symbol.iterator]()):(t=n.next(),t.done?n=null:(e=t.value,o=!0));return null!=n&&null!=e?[e,n]:null},null)})},f.collect=function(n,r){return f.concat(f.map(n,r))},f.choose=function(n,r){var t=function(r){var e=r.next();if(!e.done){var o=n(e.value);return null!=o?[o,r]:t(r)}};return f.delay(function(){return f.unfold(function(n){return t(n)},r[Symbol.iterator]())})},f.compareWith=function(n,r,t){var e=f.tryFind(function(n){return 0!=n},f.map2(function(r,t){return n(r,t)},r,t));return null!=e?e:f.length(r)-f.length(t)},f.delay=function(n){var r={};return r[Symbol.iterator]=function(){return n()[Symbol.iterator]()},r},f.distinctBy=function(n,r){return f.choose(function(n){return n[0]},f.scan(function(r,t){var e=r[1],o=n(t);return e.has(o)?[null,e]:[t,e.add(o)]},[null,new Set],r))},f.distinct=function(n){return f.distinctBy(function(n){return n},n)},f.empty=function(){return f.unfold(function(){})},f.enumerateWhile=function(n,r){return f.concat(f.unfold(function(){return n()?[r,!0]:null}),!0)},f.enumerateThenFinally=function(n,r){return f.delay(function(){var t;try{t=n[Symbol.iterator]()}finally{r()}return f.unfold(function(n){try{var t=n.next();return t.done?null:[t.value,n]}finally{r()}},t)})},f.enumerateUsing=function(n,r){var t=!1,e=function(){t||(t=!0,n.dispose())};try{return f.enumerateThenFinally(r(n),e)}finally{e()}},f.exactlyOne=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";var e=r.next();if(!e.done)throw"Seq had multiple items";return t.value},f.exists=function(n,r){var t=function(r){var e=r.next();return!e.done&&(n(e.value)||t(r))};return t(r[Symbol.iterator]())},f.exists2=function(n,r,t){var e=function(r,t){var o=r.next(),u=t.next();return!o.done&&!u.done&&(n(o.value,u.value)||e(r,t))};return e(r[Symbol.iterator](),t[Symbol.iterator]())},f.filter=f.where=function(n,r){var t=function(r){var e=r.next();return e.done?void 0:n(e.value)?[e.value,r]:t(r)};return f.delay(function(){return f.unfold(t,r[Symbol.iterator]())})},f.fold=function(n,r,t){if(Array.isArray(t)||ArrayBuffer.isView(t))return t.reduce(n,r);for(var e=0,o=null,u=t[Symbol.iterator]();o=u.next(),!o.done;e++)r=n(r,o.value,e);return r},f.foldBack=function(n,r,t){for(var e=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r),o=e.length-1;o>=0;o--)t=n(e[o],t,o);return t},f.fold2=function(n,r,t,e){for(var o,u,i=t[Symbol.iterator](),a=e[Symbol.iterator](),c=0;o=i.next(),u=a.next(),!o.done&&!u.done;c++)r=n(r,o.value,u.value,c);return r},f.foldBack2=function(n,r,t,e){for(var o=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r),u=Array.isArray(t)||ArrayBuffer.isView(t)?t:Array.from(t),i=o.length-1;i>=0;i--)e=n(o[i],u[i],e,i);return e},f.forall=function(n,r){return f.fold(function(r,t){return r&&n(t)},!0,r)},f.forall2=function(n,r,t){return f.fold2(function(r,t,e){return r&&n(t,e)},!0,r,t)},f.groupBy=function(n,r){return f.fold(function(r,t){var e=n(t),o=r.get(e);return null!=o?r.set(e,new c(t,o)):r.set(e,new c(t,new c))},new Map,r)},f.head=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";return t.value},f.init=function(n,r){return f.delay(function(){return f.unfold(function(t){return n>t?[r(t),t+1]:null},0)})},f.initInfinite=function(n){return f.delay(function(){return f.unfold(function(r){return[n(r),r+1]},0)})},f.item=function(n,r){if(Array.isArray(r)||ArrayBuffer.isView(r))return r[n];for(var t=0,e=r[Symbol.iterator]();;t++){var o=e.next();if(o.done)break;if(t===n)return o.value}throw"Seq has an insufficient number of elements"},f.iter=function(n,r){f.fold(function(r,t){n(t)},null,r)},f.iter2=function(n,r,t){f.fold2(function(r,t,e){n(t,e)},null,r,t)},f.iteri=function(n,r){f.fold(function(r,t,e){n(e,t)},null,r)},f.iteri2=function(n,r,t){f.fold2(function(r,t,e,o){n(o,t,e)},null,r,t)},f.isEmpty=function(n){var r=n[Symbol.iterator]();return r.next().done},f.last=function(n){return f.reduce(function(n,r){return r},n)},f.length=function(n){return Array.isArray(n)||ArrayBuffer.isView(n)?n.length:f.fold(function(n,r){return n+1},0,n)},f.map=function(n,r){return f.delay(function(){return f.unfold(function(r){var t=r.next();return t.done?null:[n(t.value),r]},r[Symbol.iterator]())})},f.mapi=function(n,r){return f.delay(function(){var t=0;return f.unfold(function(r){var e=r.next();return e.done?null:[n(t++,e.value),r]},r[Symbol.iterator]())})},f.map2=function(n,r,t){return f.delay(function(){var e=r[Symbol.iterator](),o=t[Symbol.iterator]();return f.unfold(function(){var r=e.next(),t=o.next();return r.done||t.done?null:[n(r.value,t.value),null]})})},f.mapi2=function(n,r,t){return f.delay(function(){var e=0,o=r[Symbol.iterator](),u=t[Symbol.iterator]();return f.unfold(function(){var r=o.next(),t=u.next();return r.done||t.done?null:[n(e++,r.value,t.value),null]})})},f.map3=function(n,r,t,e){return f.delay(function(){var o=r[Symbol.iterator](),u=t[Symbol.iterator](),i=e[Symbol.iterator]();return f.unfold(function(){var r=o.next(),t=u.next(),e=i.next();return r.done||t.done||e.done?null:[n(r.value,t.value,e.value),null]})})},f.max=function(n){return f.reduce(function(n,r){return Math.max(n,r)},n)},f.maxBy=function(n,r){return f.reduce(function(r,t){return n(t)>n(r)?t:r},r)},f.min=function(n){return f.reduce(function(n,r){return Math.min(n,r)},n)},f.minBy=function(n,r){return f.reduce(function(r,t){return n(t)>n(r)?r:t},r)},f.pairwise=function(n){return f.skip(1,f.scan(function(n,r){return[n[1],r]},[0,0],n))},f.permute=function(n,r){var t=Array.from(r);return f.ofArray(a.permute(n,t))},f.rangeStep=function(n,r,t){if(0===r)throw"Step cannot be 0";return f.unfold(function(n){return r>0&&t>=n||0>r&&n>=t?[n,n+r]:null},n)},f.range=function(n,r){return f.rangeStep(n,1,r)},f.readonly=function(n){return f.map(function(n){return n},n)},f.reduce=function(n,r){if(Array.isArray(r)||ArrayBuffer.isView(r))return r.reduce(n);var t=r[Symbol.iterator](),e=t.next();if(e.done)throw"Seq was empty";for(var o=e.value;e=t.next(),!e.done;)o=n(o,e.value);return o},f.reduceBack=function(n,r){var t=Array.isArray(r)||ArrayBuffer.isView(r)?r:Array.from(r);if(0===t.length)throw"Seq was empty";for(var e=t[t.length-1],o=t.length-2;o>=0;o--)e=n(t[o],e,o);return e},f.replicate=function(n,r){return f.init(n,function(){return r})},f.rev=function(n){var r=Array.isArray(n)||ArrayBuffer.isView(n)?n.slice(0):Array.from(n);return r.reverse()},f.scan=function(n,r,t){return f.delay(function(){var e=t[Symbol.iterator]();return f.unfold(function(t){if(null==t)return[r,r];var o=e.next();return o.done?void 0:(t=n(t,o.value),[t,t])},null)})},f.scanBack=function(n,r,t){return f.rev(f.scan(function(r,t){return n(t,r)},t,f.rev(r)))},f.singleton=function(n){return f.unfold(function(n){return null!=n?[n,null]:null},n)},f.skip=function(n,r){var t={};return t[Symbol.iterator]=function(){for(var t=r[Symbol.iterator](),e=1;n>=e;e++)t.next();return t},t},f.skipWhile=function(n,r){return f.delay(function(){var t=!1;return f.filter(function(r){return t||(t=!n(r))},r)})},f.sort=function(n){var r=Array.from(n);return f.ofArray(r.sort())},f.sortWith=function(n,r){var t=Array.from(r);return f.ofArray(t.sort(n))},f.sortBy=function(n,r){var t=Array.from(r);return f.ofArray(a.sortInPlaceBy(n,t))},f.sortDescending=function(n,r){var t=Array.from(r);return f.ofArray(t.sort(function(n,r){return n>r?-1:n==r?0:1}))},f.sortByDescending=function(n,r){var t=Array.from(r);return f.ofArray(a.sortInPlaceBy(n,t,-1))},f.sum=function(n,r){return r=r||function(n,r){return n+r},f.reduce(function(n,t){return r(n,t)},n)},f.sumBy=function(n,r,t){var e=!0;return t=t||function(n,r){return n+r},f.reduce(function(r,t){return r=e?n(r):r,e=!1,r+n(t)},r)},f.tail=function(n){var r=n[Symbol.iterator](),t=r.next();if(t.done)throw"Seq was empty";var e={};return e[Symbol.iterator]=function(){return r},e},f.take=f.truncate=function(n,r){return f.delay(function(){var t=r[Symbol.iterator]();return f.unfold(function(r){if(n>r){var e=t.next();return[e.value,r+1]}},0)})},f.takeWhile=function(n,r){return f.delay(function(){var t=r[Symbol.iterator]();return f.unfold(function(r){var e=t.next();return!e.done&&n(e.value)?[e.value,null]:void 0},0)})},f.tryFind=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++)if(n(t.value,e))return t.value},f.find=function(n,r){var t=f.tryFind(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.tryFindIndex=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++)if(n(t.value,e))return e},f.findIndex=function(n,r){var t=f.tryFindIndex(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.tryPick=function(n,r){for(var t,e=0,o=r[Symbol.iterator]();t=o.next(),!t.done;e++){var u=n(t.value,e);if(null!=u)return u}},f.pick=function(n,r){var t=f.tryPick(n,r);if(null==t)throw"Seq did not contain any matching elements";return t},f.unfold=function(n,r){var t={};return t[Symbol.iterator]=function(){return{next:function(){var t=n(r);return null!=t?(r=t[1],{done:!1,value:t[0]}):{done:!0}}}},t},f.zip=function(n,r){return f.map2(function(n,r){return[n,r]},n,r)},f.zip3=function(n,r,t){return f.map3(function(n,r,t){return[n,r,t]},n,r,t)};var l=n.Set={};l.ofArray=function(n){for(var r=new Set,t=0;t<n.length;t++)r.add(n[t]);return r},l.ofSeq=function(n){return f.fold(function(n,r){return n.add(r)},new Set,n)},l.op_Addition=l.union=function(n,r){var t=new Set(n);return r.forEach(function(n){t.add(n)}),t},l.unionMany=function(n){return f.fold(function(n,r){return r.forEach(function(r){n.add(r)}),n},new Set,n)},l.op_Subtraction=l.difference=function(n,r){var t=new Set(n);return r.forEach(function(n){t["delete"](n)}),t},l.intersect=function(n,r){var t=new Set(n);return n.forEach(function(n){r.has(n)||t["delete"](n)}),t},l.intersectMany=function(n){var r=Array.isArray(n)?n:Array.from(n);if(0==r.length)throw"Seq was empty";var t=new Set(r[0]);return f.iter(function(n){for(var e=1;e<r.length;e++)if(!r[e].has(n)){t["delete"](n);break}},r[0]),t},l.isProperSubsetOf=l.isProperSubset=function(n,r){return f.forall(function(n){return r.has(n)},n)&&f.exists(function(r){return!n.has(r)},r)},l.isSubsetOf=l.isSubset=function(n,r){return f.forall(function(n){return r.has(n)},n)},l.isProperSupersetOf=l.isProperSuperset=function(n,r){return l.isProperSubset(r,n)},l.isSupersetOf=l.isSuperset=function(n,r){return l.isSubset(r,n)},l.copyTo=function(n,r,t,e){if(!r instanceof Array)throw"Array is invalid";e=e||r.length;for(var o=t||0,u=n[Symbol.iterator]();e--;){var i=u.next();if(i.done)break;r[o++]=i.value}},l.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1];return n(t)?[e.add(t),o]:[e,o.add(t)]},[new Set,new Set],r)},l.removeInPlace=function(n,r){return r["delete"](n),r},l.remove=function(n,r){return l.removeInPlace(n,new Set(r))};var s=n.Map={};s.ofArray=function(n){for(var r=new Map,t=0;t<n.length;t++)r.set(n[t][0],n[t][1]);return r},s.ofSeq=function(n){return f.fold(function(n,r){return n.set(r[0],r[1])},new Map,n)},s.containsValue=function(n,r){return f.fold(function(t,e){return t||r.get(e)===n},!1,r.keys())},s.exists=function(n,r){return f.exists(function(r){return n(r[0],r[1])},r)},s.filter=function(n,r){return f.fold(function(r,t){return n(t[0],t[1])?r.set(t[0],t[1]):r},new Map,r)},s.fold=function(n,r,t){return f.fold(function(r,t){return n(r,t[0],t[1])},r,t)},s.foldBack=function(n,r,t){return f.foldBack(function(r,t){return n(r[0],r[1],t)},r,t)},s.forall=function(n,r){return f.forall(function(r){return n(r[0],r[1])},r)},s.iter=function(n,r){return f.iter(function(r){n(r[0],r[1])},r)},s.map=function(n,r){return f.fold(function(r,t){return r.set(t[0],n(t[0],t[1]))},new Map,r)},s.partition=function(n,r){return f.fold(function(r,t){var e=r[0],o=r[1],u=t[0],i=t[1];return n(u,i)?[e.set(u,i),o]:[e,o.set(u,i)]},[new Map,new Map],r)},s.findKey=function(n,r){return f.pick(function(r){return n(r[0],r[1])?r[0]:null},r)},s.tryFindKey=function(n,r){return f.tryPick(function(r){return n(r[0],r[1])?r[0]:null},r)},s.pick=function(n,r){return f.pick(function(r){var t=n(r[0],r[1]);return null!=t?t:null},r)},s.removeInPlace=l.removeInPlace,s.remove=function(n,r){return s.removeInPlace(n,new Map(r))},s.tryPick=function(n,r){return f.tryPick(function(r){var t=n(r[0],r[1]);return null!=t?t:null},r)};var d=n.Async={};d.__protectedCont=function(n){return function(r){if(null!=r.cancelToken&&r.cancelToken.isCancelled)throw"cancelled";try{n(r)}catch(t){r.onError(t)}}},d.bind=function(n,r){return d.__protectedCont(function(t){n({onSuccess:function(n){return r(n)(t)},onError:t.onError,cancelToken:t.cancelToken})})},d.combine=function(n,r){return d.bind(n,function(){return r})},d.delay=function(n){return d.__protectedCont(function(r){n()(r)})},d["for"]=function(n,r){var t=n[Symbol.iterator](),e=t.next();return d["while"](function(){return!e.done},d.delay(function(){var n=r(e.value);return e=t.next(),n}))},d["return"]=function(n){return d.__protectedCont(function(r){r.onSuccess(n)})},d.returnFrom=function(n){return n},d.tryFinally=function(n,r){return d.__protectedCont(function(t){n({onSuccess:function(n){r(),t.onSuccess(n)},onError:function(n){r(),t.onError(n)},cancelToken:t.cancelToken})})},d.tryWith=function(n,r){return d.__protectedCont(function(t){n({onSuccess:t.onSuccess,cancelToken:t.cancelToken,onError:function(n){t.onSuccess(r(n))}})})},d.using=function(n,r){return d.tryFinally(r(n),function(){n.dispose()})},d["while"]=function(n,r){return n()?d.bind(r,function(){return d["while"](n,r)}):d["return"]()},d.zero=function(){return d.__protectedCont(function(n){n.onSuccess()})},d.start=d.startImmediate=function(n,r){n({onSuccess:function(){},onError:function(){},cancelToken:r})},Object.defineProperty(d,"cancellationToken",{get:function(){return d.__protectedCont(function(n){return n.onSuccess(n.cancelToken)})}}),d.fromContinuations=function(n){return d.__protectedCont(function(r){return n(r.onSuccess,r.onError,r.onError)})},d.sleep=function(n){return d.__protectedCont(function(r){setTimeout(function(){if(null!=r.cancelToken&&r.cancelToken.isCancelled)throw"cancelled";r.onSuccess()},n)})};var y=function(n,r,t){this.onNext=n,this.onError=r||function(n){},this.onCompleted=t||function(){}};t.setInterfaces(y.prototype,["System.IObserver"]);var p=function(n){this.subscribe=n};t.setInterfaces(p.prototype,["System.IObservable"]);var m=n.Observable={};m.__protect=function(n,r,t){try{r(n())}catch(e){t(e)}},m.map=function(n,r){return new p(function(t){return r.subscribe(new y(function(r){m.__protect(function(){n(r)},t.onNext,t.onError)},t.onError,t.onCompleted))})},m.choose=function(n,r){return new p(function(t){return r.subscribe(new y(function(r){m.__protect(function(){n(r)},function(n){null!=n&&t.onNext(n)},t.onError)},t.onError,t.onCompleted))})},m.filter=function(n,r){return m.choose(function(r){return n(r)?r:null},r)},m.partition=function(n,r){return[m.filter(n,r),m.filter(function(r){return!n(r)},r)]},m.scan=function(n,r,t){return new p(function(e){return t.subscribe(new y(function(t){m.__protect(function(){n(r,t)},function(n){r=n,e.onNext(n)},e.onError)},e.onError,e.onCompleted))})},m.add=function(n,r){r.subscribe(new y(n))},m.subscribe=function(n,r){return r.subscribe(new y(n))},m.pairwise=function(n){return new p(function(r){var t=null;return n.subscribe(new y(function(n){null!=t&&r.onNext([t,n]),t=n},r.onError,r.onCompleted))})},m.merge=function(n,t){return new p(function(e){var o=!1,u=!1,i=!1,a=n.subscribe(new y(function(n){o||e.onNext(n)},function(n){o||(o=!0,e.onError(n))},function(){o||(u=!0,i&&(o=!0,e.onCompleted()))})),c=t.subscribe(new y(function(n){o||e.onNext(n)},function(n){o||(o=!0,e.onError(n))},function(){o||(i=!0,u&&(o=!0,e.onCompleted()))})),f={dispose:function(){a.dispose(),c.dispose()}};return f[r.interfaces]=["System.IDisposable"],f})},m.split=function(n,r){return[m.choose(function(r){var t=n(r);return"Choice1Of2"==t.Case?t.Fields[0]:null},r),m.choose(function(r){var t=n(r);return"Choice2Of2"==t.Case?t.Fields[0]:null},r)]}});
{
"name": "fable-core",
"version": "0.0.9",
"version": "0.0.10",
"description": "Fable core lib & bindings for native JS objects, browser and node APIs",

@@ -5,0 +5,0 @@ "main": "fable-core.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc