From 32a890c61f3e686f67ee825d0dadbfad49e6407d Mon Sep 17 00:00:00 2001 From: Frank Lam Date: Thu, 17 Sep 2015 03:11:27 -0700 Subject: [PATCH] build dist --- dist/godash.js | 55 +++++++++++++++++++++++++++------------------- dist/godash.min.js | 2 +- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/dist/godash.js b/dist/godash.js index e14e093..62a3007 100644 --- a/dist/godash.js +++ b/dist/godash.js @@ -17331,6 +17331,7 @@ exports.group = group; exports.liberties = liberties; exports.oppositeColor = oppositeColor; exports.isLegalMove = isLegalMove; +exports.prettyString = prettyString; var _lodash = require('lodash'); @@ -17450,10 +17451,10 @@ function group(board, position) { while (!queue.isEmpty()) { var current = queue.first(); - var more_matching = matchingAdjacentPositions(board, position); + var more_matching = matchingAdjacentPositions(board, current); - queue = queue.rest().union(more_matching.subtract(found)); found = found.add(current); + queue = queue.rest().union(more_matching.subtract(found)); } return found; @@ -17509,6 +17510,34 @@ function isLegalMove(board, position, color) { return will_have_liberty || will_kill_something; } +/** + * @private + */ + +function prettyString(board) { + var size = board.get(SIZE_KEY); + var pretty_string = ''; + + for (var i = 0; i < size; i++) { + for (var j = 0; j < size; j++) { + var color = board.get(_immutable.List.of(i, j), EMPTY); + switch (color) { + case BLACK: + pretty_string += 'O'; + break; + case WHITE: + pretty_string += 'X'; + break; + case EMPTY: + pretty_string += '+'; + break; + } + } + pretty_string += '\n'; + } + return pretty_string; +} + exports['default'] = { isLegalMove: isLegalMove, oppositeColor: oppositeColor, liberties: liberties, group: group }; @@ -17740,27 +17769,7 @@ var Board = (function () { }, { key: 'toPrettyString', value: function toPrettyString() { - var size = this.board_size; - var pretty_string = ''; - - for (var i = 0; i < this.board_size; i++) { - for (var j = 0; j < this.board_size; j++) { - var color = this.positions.get(_immutable.List.of(i, j), _analysis.EMPTY); - switch (color) { - case _analysis.BLACK: - pretty_string += 'O'; - break; - case _analysis.WHITE: - pretty_string += 'X'; - break; - case _analysis.EMPTY: - pretty_string += '+'; - break; - } - } - pretty_string += '\n'; - } - return pretty_string; + return (0, _analysis.prettyString)(this.positions); } }, { key: 'positions', diff --git a/dist/godash.min.js b/dist/godash.min.js index 374bbef..4c62650 100644 --- a/dist/godash.min.js +++ b/dist/godash.min.js @@ -1,4 +1,4 @@ !function t(r,n,e){function i(u,a){if(!n[u]){if(!r[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(o)return o(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[u]={exports:{}};r[u][0].call(c.exports,function(t){var n=r[u][1][t];return i(n?n:t)},c,c.exports,t,r,n,e)}return n[u].exports}for(var o="function"==typeof require&&require,u=0;ui;i++)e[i]=t[i+r];return e}function o(t){return void 0===t.size&&(t.size=t.__iterate(a)),t.size}function u(t,r){if("number"!=typeof r){var n=+r;if(""+n!==r)return NaN;r=n}return 0>r?o(t)+r:r}function a(){return!0}function s(t,r,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===r||void 0!==n&&r>=n)}function f(t,r){return h(t,r,0)}function c(t,r){return h(t,r,r)}function h(t,r,n){return void 0===t?n:0>t?Math.max(0,r+t):void 0===r?t:Math.min(r,t)}function l(t){return y(t)?t:k(t)}function p(t){return d(t)?t:O(t)}function _(t){return g(t)?t:j(t)}function v(t){return y(t)&&!m(t)?t:q(t)}function y(t){return!(!t||!t[vn])}function d(t){return!(!t||!t[yn])}function g(t){return!(!t||!t[dn])}function m(t){return d(t)||g(t)}function w(t){return!(!t||!t[gn])}function b(t){this.next=t}function I(t,r,n,e){var i=0===t?r:1===t?n:[r,n];return e?e.value=i:e={value:i,done:!1},e}function S(){return{value:void 0,done:!0}}function x(t){return!!M(t)}function z(t){return t&&"function"==typeof t.next}function E(t){var r=M(t);return r&&r.call(t)}function M(t){var r=t&&(In&&t[In]||t[Sn]);return"function"==typeof r?r:void 0}function A(t){return t&&"number"==typeof t.length}function k(t){return null===t||void 0===t?B():y(t)?t.toSeq():K(t)}function O(t){return null===t||void 0===t?B().toKeyedSeq():y(t)?d(t)?t.toSeq():t.fromEntrySeq():W(t)}function j(t){return null===t||void 0===t?B():y(t)?d(t)?t.entrySeq():t.toIndexedSeq():C(t)}function q(t){return(null===t||void 0===t?B():y(t)?d(t)?t.entrySeq():t:C(t)).toSetSeq()}function D(t){this._array=t,this.size=t.length}function R(t){var r=Object.keys(t);this._object=t,this._keys=r,this.size=r.length}function L(t){this._iterable=t,this.size=t.length||t.size}function U(t){this._iterator=t,this._iteratorCache=[]}function T(t){return!(!t||!t[zn])}function B(){return En||(En=new D([]))}function W(t){var r=Array.isArray(t)?new D(t).fromEntrySeq():z(t)?new U(t).fromEntrySeq():x(t)?new L(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!r)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return r}function C(t){var r=P(t);if(!r)throw new TypeError("Expected Array or iterable object of values: "+t);return r}function K(t){var r=P(t)||"object"==typeof t&&new R(t);if(!r)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return r}function P(t){return A(t)?new D(t):z(t)?new U(t):x(t)?new L(t):void 0}function N(t,r,n,e){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var a=i[n?o-u:u];if(r(a[1],e?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(r,n)}function $(t,r,n,e){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[n?o-u:u];return u++>o?S():I(r,e?t[0]:u-1,t[1])})}return t.__iteratorUncached(r,n)}function F(){throw TypeError("Abstract")}function H(){}function J(){}function V(){}function Y(t,r){if(t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1;if("function"==typeof t.valueOf&&"function"==typeof r.valueOf){if(t=t.valueOf(),r=r.valueOf(),t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1}return"function"==typeof t.equals&&"function"==typeof r.equals&&t.equals(r)?!0:!1}function Z(t,r){return r?X(r,t,"",{"":t}):G(t)}function X(t,r,n,e){return Array.isArray(r)?t.call(e,n,j(r).map(function(n,e){return X(t,n,e,r)})):Q(r)?t.call(e,n,O(r).map(function(n,e){return X(t,n,e,r)})):r}function G(t){return Array.isArray(t)?j(t).map(G).toList():Q(t)?O(t).map(G).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function rt(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var r=typeof t;if("number"===r){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===r?t.length>Rn?nt(t):et(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var r=Tn[t];return void 0===r&&(r=et(t),Un===Ln&&(Un=0,Tn={}),Un++,Tn[t]=r),r}function et(t){for(var r=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,r){if(!t)throw new Error(r)}function at(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function st(t,r){this._iter=t,this._useKeys=r,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function lt(t){var r=Dt(t);return r._iter=t,r.size=t.size,r.flip=function(){return t},r.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},r.has=function(r){return t.includes(r)},r.includes=function(r){return t.has(r)},r.cacheResult=Rt,r.__iterateUncached=function(r,n){var e=this;return t.__iterate(function(t,n){return r(n,t,e)!==!1},n)},r.__iteratorUncached=function(r,n){if(r===bn){var e=t.__iterator(r,n);return new b(function(){var t=e.next();if(!t.done){var r=t.value[0];t.value[0]=t.value[1],t.value[1]=r}return t})}return t.__iterator(r===wn?mn:wn,n)},r}function pt(t,r,n){var e=Dt(t);return e.size=t.size,e.has=function(r){return t.has(r)},e.get=function(e,i){var o=t.get(e,ln);return o===ln?i:r.call(n,o,e,t)},e.__iterateUncached=function(e,i){var o=this;return t.__iterate(function(t,i,u){return e(r.call(n,t,i,u),i,o)!==!1},i)},e.__iteratorUncached=function(e,i){var o=t.__iterator(bn,i);return new b(function(){var i=o.next();if(i.done)return i;var u=i.value,a=u[0];return I(e,a,r.call(n,u[1],a,t),i)})},e}function _t(t,r){var n=Dt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var r=lt(t);return r.reverse=function(){return t.flip()},r}),n.get=function(n,e){return t.get(r?n:-1-n,e)},n.has=function(n){return t.has(r?n:-1-n)},n.includes=function(r){return t.includes(r)},n.cacheResult=Rt,n.__iterate=function(r,n){var e=this;return t.__iterate(function(t,n){return r(t,n,e)},!n)},n.__iterator=function(r,n){return t.__iterator(r,!n)},n}function vt(t,r,n,e){var i=Dt(t);return e&&(i.has=function(e){var i=t.get(e,ln);return i!==ln&&!!r.call(n,i,e,t)},i.get=function(e,i){var o=t.get(e,ln);return o!==ln&&r.call(n,o,e,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,a=0;return t.__iterate(function(t,o,s){return r.call(n,t,o,s)?(a++,i(t,e?o:a-1,u)):void 0},o),a},i.__iteratorUncached=function(i,o){var u=t.__iterator(bn,o),a=0;return new b(function(){for(;;){var o=u.next();if(o.done)return o;var s=o.value,f=s[0],c=s[1];if(r.call(n,c,f,t))return I(i,e?f:a++,c,o)}})},i}function yt(t,r,n){var e=Tt().asMutable();return t.__iterate(function(i,o){e.update(r.call(n,i,o,t),0,function(t){return t+1})}),e.asImmutable()}function dt(t,r,n){var e=d(t),i=(w(t)?Sr():Tt()).asMutable();t.__iterate(function(o,u){i.update(r.call(n,o,u,t),function(t){return t=t||[],t.push(e?[u,o]:o),t})});var o=qt(t);return i.map(function(r){return kt(t,o(r))})}function gt(t,r,n,e){var i=t.size;if(void 0!==r&&(r=0|r),void 0!==n&&(n=0|n),s(r,n,i))return t;var o=f(r,i),a=c(n,i);if(o!==o||a!==a)return gt(t.toSeq().cacheResult(),r,n,e);var h,l=a-o;l===l&&(h=0>l?0:l);var p=Dt(t);return p.size=0===h?h:t.size&&h||void 0,!e&&T(t)&&h>=0&&(p.get=function(r,n){return r=u(this,r),r>=0&&h>r?t.get(r+o,n):n}),p.__iterateUncached=function(r,n){var i=this;if(0===h)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0,a=!0,s=0;return t.__iterate(function(t,n){return a&&(a=u++h)return S();var t=i.next();return e||r===wn?t:r===mn?I(r,a-1,void 0,t):I(r,a-1,t.value[1],t)})},p}function mt(t,r,n){var e=Dt(t);return e.__iterateUncached=function(e,i){var o=this;if(i)return this.cacheResult().__iterate(e,i);var u=0;return t.__iterate(function(t,i,a){return r.call(n,t,i,a)&&++u&&e(t,i,o)}),u},e.__iteratorUncached=function(e,i){var o=this;if(i)return this.cacheResult().__iterator(e,i);var u=t.__iterator(bn,i),a=!0;return new b(function(){if(!a)return S();var t=u.next();if(t.done)return t;var i=t.value,s=i[0],f=i[1];return r.call(n,f,s,o)?e===bn?t:I(e,s,f,t):(a=!1,S())})},e}function wt(t,r,n,e){var i=Dt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,s=0;return t.__iterate(function(t,o,f){return a&&(a=r.call(n,t,o,f))?void 0:(s++,i(t,e?o:s-1,u))}),s},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(bn,o),s=!0,f=0;return new b(function(){var t,o,c;do{if(t=a.next(),t.done)return e||i===wn?t:i===mn?I(i,f++,void 0,t):I(i,f++,t.value[1],t);var h=t.value;o=h[0],c=h[1],s&&(s=r.call(n,c,o,u))}while(s);return i===bn?t:I(i,o,c,t)})},i}function bt(t,r){var n=d(t),e=[t].concat(r).map(function(t){return y(t)?n&&(t=p(t)):t=n?W(t):C(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===e.length)return t;if(1===e.length){var i=e[0];if(i===t||n&&d(i)||g(t)&&g(i))return i}var o=new D(e);return n?o=o.toKeyedSeq():g(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=e.reduce(function(t,r){if(void 0!==t){var n=r.size;if(void 0!==n)return t+n}},0),o}function It(t,r,n){var e=Dt(t);return e.__iterateUncached=function(e,i){function o(t,s){var f=this;t.__iterate(function(t,i){return(!r||r>s)&&y(t)?o(t,s+1):e(t,n?i:u++,f)===!1&&(a=!0),!a},i)}var u=0,a=!1;return o(t,0),u},e.__iteratorUncached=function(e,i){var o=t.__iterator(e,i),u=[],a=0;return new b(function(){for(;o;){var t=o.next();if(t.done===!1){var s=t.value;if(e===bn&&(s=s[1]),r&&!(u.length0}function At(t,r,n){var e=Dt(t);return e.size=new D(n).map(function(t){return t.size}).min(),e.__iterate=function(t,r){for(var n,e=this.__iterator(wn,r),i=0;!(n=e.next()).done&&t(n.value,i++,this)!==!1;);return i},e.__iteratorUncached=function(t,e){var i=n.map(function(t){return t=l(t),E(e?t.reverse():t)}),o=0,u=!1;return new b(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?S():I(t,o++,r.apply(null,n.map(function(t){return t.value})))})},e}function kt(t,r){return T(t)?r:t.constructor(r)}function Ot(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function jt(t){return at(t.size),o(t)}function qt(t){return d(t)?p:g(t)?_:v}function Dt(t){return Object.create((d(t)?O:g(t)?j:q).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):k.prototype.cacheResult.call(this)}function Lt(t,r){return t>r?1:r>t?-1:0}function Ut(t){var r=E(t);if(!r){if(!A(t))throw new TypeError("Expected iterable or array-like: "+t);r=E(l(t))}return r}function Tt(t){return null===t||void 0===t?Vt():Bt(t)&&!w(t)?t:Vt().withMutations(function(r){var n=p(t);at(n.size),n.forEach(function(t,n){return r.set(n,t)})})}function Bt(t){return!(!t||!t[Bn])}function Wt(t,r){this.ownerID=t,this.entries=r}function Ct(t,r,n){this.ownerID=t,this.bitmap=r,this.nodes=n}function Kt(t,r,n){this.ownerID=t,this.count=r,this.nodes=n}function Pt(t,r,n){this.ownerID=t,this.keyHash=r,this.entries=n}function Nt(t,r,n){this.ownerID=t,this.keyHash=r,this.entry=n}function $t(t,r,n){this._type=r,this._reverse=n,this._stack=t._root&&Ht(t._root)}function Ft(t,r){return I(t,r[0],r[1])}function Ht(t,r){return{node:t,index:0,__prev:r}}function Jt(t,r,n,e){var i=Object.create(Wn);return i.size=t,i._root=r,i.__ownerID=n,i.__hash=e,i.__altered=!1,i}function Vt(){return Cn||(Cn=Jt(0))}function Yt(t,n,e){var i,o;if(t._root){var u=r(pn),a=r(_n);if(i=Zt(t._root,t.__ownerID,0,void 0,n,e,u,a),!a.value)return t;o=t.size+(u.value?e===ln?-1:1:0)}else{if(e===ln)return t;o=1,i=new Wt(t.__ownerID,[[n,e]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Jt(o,i):Vt()}function Zt(t,r,e,i,o,u,a,s){return t?t.update(r,e,i,o,u,a,s):u===ln?t:(n(s),n(a),new Nt(r,i,[o,u]))}function Xt(t){return t.constructor===Nt||t.constructor===Pt}function Gt(t,r,n,e,i){if(t.keyHash===e)return new Pt(r,e,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&hn,a=(0===n?e:e>>>n)&hn,s=u===a?[Gt(t,r,n+fn,e,i)]:(o=new Nt(r,e,i),a>u?[t,o]:[o,t]);return new Ct(r,1<a;a++,s<<=1){var c=r[a];void 0!==c&&a!==e&&(i|=s,u[o++]=c)}return new Ct(t,i,u)}function rr(t,r,n,e,i){for(var o=0,u=new Array(cn),a=0;0!==n;a++,n>>>=1)u[a]=1&n?r[o++]:void 0;return u[e]=i,new Kt(t,o+1,u)}function nr(t,r,n){for(var e=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function ar(t,r,n,e){var o=e?t:i(t);return o[r]=n,o}function sr(t,r,n,e){var i=t.length+1;if(e&&r+1===i)return t[r]=n,t;for(var o=new Array(i),u=0,a=0;i>a;a++)a===r?(o[a]=n,u=-1):o[a]=t[a+u];return o}function fr(t,r,n){var e=t.length-1;if(n&&r===e)return t.pop(),t;for(var i=new Array(e),o=0,u=0;e>u;u++)u===r&&(o=1),i[u]=t[u+o];return i}function cr(t){var r=vr();if(null===t||void 0===t)return r;if(hr(t))return t;var n=_(t),e=n.size;return 0===e?r:(at(e),e>0&&cn>e?_r(0,e,fn,null,new lr(n.toArray())):r.withMutations(function(t){t.setSize(e),n.forEach(function(r,n){return t.set(n,r)})}))}function hr(t){return!(!t||!t[$n])}function lr(t,r){this.array=t,this.ownerID=r}function pr(t,r){function n(t,r,n){return 0===r?e(t,n):i(t,r,n)}function e(t,n){var e=n===a?s&&s.array:t&&t.array,i=n>o?0:o-n,f=u-n;return f>cn&&(f=cn),function(){if(i===f)return Jn;var t=r?--f:i++;return e&&e[t]}}function i(t,e,i){var a,s=t&&t.array,f=i>o?0:o-i>>e,c=(u-i>>e)+1;return c>cn&&(c=cn),function(){for(;;){if(a){var t=a();if(t!==Jn)return t;a=null}if(f===c)return Jn;var o=r?--c:f++;a=n(s&&s[o],e-fn,i+(o<=t.size||0>n)return t.withMutations(function(t){0>n?wr(t,n).set(0,e):wr(t,0,n+1).set(n,e)});n+=t._origin;var i=t._tail,o=t._root,a=r(_n);return n>=Ir(t._capacity)?i=dr(i,t.__ownerID,0,n,e,a):o=dr(o,t.__ownerID,t._level,n,e,a),a.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_r(t._origin,t._capacity,t._level,o,i):t}function dr(t,r,e,i,o,u){var a=i>>>e&hn,s=t&&a0){var c=t&&t.array[a],h=dr(c,r,e-fn,i,o,u);return h===c?t:(f=gr(t,r),f.array[a]=h,f)}return s&&t.array[a]===o?t:(n(u),f=gr(t,r),void 0===o&&a===f.array.length-1?f.array.pop():f.array[a]=o,f)}function gr(t,r){return r&&t&&r===t.ownerID?t:new lr(t?t.array.slice():[],r)}function mr(t,r){if(r>=Ir(t._capacity))return t._tail;if(r<1<0;)n=n.array[r>>>e&hn],e-=fn;return n}}function wr(t,r,n){void 0!==r&&(r=0|r),void 0!==n&&(n=0|n);var i=t.__ownerID||new e,o=t._origin,u=t._capacity,a=o+r,s=void 0===n?u:0>n?u+n:o+n;if(a===o&&s===u)return t;if(a>=s)return t.clear();for(var f=t._level,c=t._root,h=0;0>a+h;)c=new lr(c&&c.array.length?[void 0,c]:[],i),f+=fn,h+=1<=1<p?mr(t,s-1):p>l?new lr([],i):_;if(_&&p>l&&u>a&&_.array.length){c=gr(c,i);for(var y=c,d=f;d>fn;d-=fn){var g=l>>>d&hn;y=y.array[g]=gr(y.array[g],i)}y.array[l>>>fn&hn]=_}if(u>s&&(v=v&&v.removeAfter(i,0,s)),a>=p)a-=p,s-=p,f=fn,c=null,v=v&&v.removeBefore(i,0,a);else if(a>o||l>p){for(h=0;c;){var m=a>>>f&hn;if(m!==p>>>f&hn)break;m&&(h+=(1<o&&(c=c.removeBefore(i,f,a-h)),c&&l>p&&(c=c.removeAfter(i,f,p-h)),h&&(a-=h,s-=h)}return t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=f,t._root=c,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_r(a,s,f,c,v)}function br(t,r,n){for(var e=[],i=0,o=0;oi&&(i=a.size),y(u)||(a=a.map(function(t){return Z(t)})),e.push(a)}return i>t.size&&(t=t.setSize(i)),ir(t,r,e)}function Ir(t){return cn>t?0:t-1>>>fn<=cn&&u.size>=2*o.size?(i=u.filter(function(t,r){return void 0!==t&&a!==r}),e=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(e.__ownerID=i.__ownerID=t.__ownerID)):(e=o.remove(r),i=a===u.size-1?u.pop():u.set(a,void 0))}else if(s){if(n===u.get(a)[1])return t;e=o,i=u.set(a,[r,n])}else e=o.set(r,u.size),i=u.set(u.size,[r,n]);return t.__ownerID?(t.size=e.size,t._map=e,t._list=i,t.__hash=void 0,t):zr(e,i)}function Ar(t){return null===t||void 0===t?jr():kr(t)?t:jr().unshiftAll(t)}function kr(t){return!(!t||!t[Yn])}function Or(t,r,n,e){var i=Object.create(Zn);return i.size=t,i._head=r,i.__ownerID=n,i.__hash=e,i.__altered=!1,i}function jr(){return Xn||(Xn=Or(0))}function qr(t){return null===t||void 0===t?Ur():Dr(t)&&!w(t)?t:Ur().withMutations(function(r){var n=v(t);at(n.size),n.forEach(function(t){return r.add(t)})})}function Dr(t){return!(!t||!t[Gn])}function Rr(t,r){return t.__ownerID?(t.size=r.size,t._map=r,t):r===t._map?t:0===r.size?t.__empty():t.__make(r)}function Lr(t,r){var n=Object.create(Qn);return n.size=t?t.size:0,n._map=t,n.__ownerID=r,n}function Ur(){return te||(te=Lr(Vt()))}function Tr(t){return null===t||void 0===t?Cr():Br(t)?t:Cr().withMutations(function(r){var n=v(t);at(n.size),n.forEach(function(t){return r.add(t)})})}function Br(t){return Dr(t)&&w(t)}function Wr(t,r){var n=Object.create(re);return n.size=t?t.size:0,n._map=t,n.__ownerID=r,n}function Cr(){return ne||(ne=Wr(Er()))}function Kr(t,r){var n,e=function(o){if(o instanceof e)return o;if(!(this instanceof e))return new e(o);if(!n){n=!0;var u=Object.keys(t);$r(i,u),i.size=u.length,i._name=r,i._keys=u,i._defaultValues=t}this._map=Tt(o)},i=e.prototype=Object.create(ee);return i.constructor=e,e}function Pr(t,r,n){var e=Object.create(Object.getPrototypeOf(t));return e._map=r,e.__ownerID=n,e}function Nr(t){return t._name||t.constructor.name||"Record"}function $r(t,r){try{r.forEach(Fr.bind(void 0,t))}catch(n){}}function Fr(t,r){Object.defineProperty(t,r,{get:function(){return this.get(r)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(r,t)}})}function Hr(t,r){if(t===r)return!0;if(!y(r)||void 0!==t.size&&void 0!==r.size&&t.size!==r.size||void 0!==t.__hash&&void 0!==r.__hash&&t.__hash!==r.__hash||d(t)!==d(r)||g(t)!==g(r)||w(t)!==w(r))return!1;if(0===t.size&&0===r.size)return!0;var n=!m(t);if(w(t)){var e=t.entries();return r.every(function(t,r){var i=e.next().value;return i&&Y(i[1],t)&&(n||Y(i[0],r))})&&e.next().done}var i=!1;if(void 0===t.size)if(void 0===r.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=r,r=o}var u=!0,a=r.__iterate(function(r,e){return(n?t.has(r):i?Y(r,t.get(e,ln)):Y(t.get(e,ln),r))?void 0:(u=!1,!1)});return u&&t.size===a}function Jr(t,r,n){if(!(this instanceof Jr))return new Jr(t,r,n);if(ut(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),t>r&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(ie)return ie;ie=this}}function Vr(t,r){if(!(this instanceof Vr))return new Vr(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(oe)return oe;oe=this}}function Yr(t,r){var n=function(n){t.prototype[n]=r[n]};return Object.keys(r).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(r).forEach(n),t}function Zr(t,r){return r}function Xr(t,r){return[r,t]}function Gr(t){return function(){return!t.apply(this,arguments)}}function Qr(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function rn(){return i(arguments)}function nn(t,r){return r>t?1:t>r?-1:0}function en(t){if(t.size===1/0)return 0;var r=w(t),n=d(t),e=r?1:0,i=t.__iterate(n?r?function(t,r){e=31*e+un(rt(t),rt(r))|0}:function(t,r){e=e+un(rt(t),rt(r))|0}:r?function(t){e=31*e+rt(t)|0}:function(t){e=e+rt(t)|0});return on(i,e)}function on(t,r){return r=An(r,3432918353),r=An(r<<15|r>>>-15,461845907),r=An(r<<13|r>>>-13,5),r=(r+3864292196|0)^t,r=An(r^r>>>16,2246822507),r=An(r^r>>>13,3266489909),r=tt(r^r>>>16)}function un(t,r){return t^r+2654435769+(t<<6)+(t>>2)|0}var an=Array.prototype.slice,sn="delete",fn=5,cn=1<=i;i++)if(t(n[r?e-i:i],i,this)===!1)return i+1;return i},D.prototype.__iterator=function(t,r){var n=this._array,e=n.length-1,i=0;return new b(function(){return i>e?S():I(t,i,n[r?e-i++:i++])})},t(R,O),R.prototype.get=function(t,r){return void 0===r||this.has(t)?this._object[t]:r},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,r){for(var n=this._object,e=this._keys,i=e.length-1,o=0;i>=o;o++){var u=e[r?i-o:o];if(t(n[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,r){var n=this._object,e=this._keys,i=e.length-1,o=0;return new b(function(){var u=e[r?i-o:o];return o++>i?S():I(t,u,n[u])})},R.prototype[gn]=!0,t(L,j),L.prototype.__iterateUncached=function(t,r){if(r)return this.cacheResult().__iterate(t,r);var n=this._iterable,e=E(n),i=0;if(z(e))for(var o;!(o=e.next()).done&&t(o.value,i++,this)!==!1;);return i},L.prototype.__iteratorUncached=function(t,r){if(r)return this.cacheResult().__iterator(t,r);var n=this._iterable,e=E(n);if(!z(e))return new b(S);var i=0;return new b(function(){var r=e.next();return r.done?r:I(t,i++,r.value)})},t(U,j),U.prototype.__iterateUncached=function(t,r){if(r)return this.cacheResult().__iterate(t,r);for(var n=this._iterator,e=this._iteratorCache,i=0;i=e.length){var r=n.next();if(r.done)return r;e[i]=r.value}return I(t,i,e[i++])})};var En;t(F,l),t(H,F),t(J,F),t(V,F),F.Keyed=H,F.Indexed=J,F.Set=V;var Mn,An="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,r){t=0|t,r=0|r;var n=65535&t,e=65535&r;return n*e+((t>>>16)*e+n*(r>>>16)<<16>>>0)|0},kn=Object.isExtensible,On=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),jn="function"==typeof WeakMap;jn&&(Mn=new WeakMap);var qn=0,Dn="__immutablehash__";"function"==typeof Symbol&&(Dn=Symbol(Dn));var Rn=16,Ln=255,Un=0,Tn={};t(st,O),st.prototype.get=function(t,r){return this._iter.get(t,r)},st.prototype.has=function(t){return this._iter.has(t)},st.prototype.valueSeq=function(){return this._iter.valueSeq()},st.prototype.reverse=function(){var t=this,r=_t(this,!0);return this._useKeys||(r.valueSeq=function(){return t._iter.toSeq().reverse()}),r},st.prototype.map=function(t,r){var n=this,e=pt(this,t,r);return this._useKeys||(e.valueSeq=function(){return n._iter.toSeq().map(t,r)}),e},st.prototype.__iterate=function(t,r){var n,e=this;return this._iter.__iterate(this._useKeys?function(r,n){return t(r,n,e)}:(n=r?jt(this):0,function(i){return t(i,r?--n:n++,e)}),r)},st.prototype.__iterator=function(t,r){if(this._useKeys)return this._iter.__iterator(t,r);var n=this._iter.__iterator(wn,r),e=r?jt(this):0;return new b(function(){var i=n.next();return i.done?i:I(t,r?--e:e++,i.value,i)})},st.prototype[gn]=!0,t(ft,j),ft.prototype.includes=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,r){var n=this,e=0;return this._iter.__iterate(function(r){return t(r,e++,n)},r)},ft.prototype.__iterator=function(t,r){var n=this._iter.__iterator(wn,r),e=0;return new b(function(){var r=n.next();return r.done?r:I(t,e++,r.value,r)})},t(ct,q),ct.prototype.has=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,r){var n=this;return this._iter.__iterate(function(r){return t(r,r,n)},r)},ct.prototype.__iterator=function(t,r){var n=this._iter.__iterator(wn,r);return new b(function(){var r=n.next();return r.done?r:I(t,r.value,r.value,r)})},t(ht,O),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,r){var n=this;return this._iter.__iterate(function(r){if(r){Ot(r);var e=y(r);return t(e?r.get(1):r[1],e?r.get(0):r[0],n)}},r)},ht.prototype.__iterator=function(t,r){var n=this._iter.__iterator(wn,r);return new b(function(){for(;;){var r=n.next();if(r.done)return r;var e=r.value;if(e){Ot(e);var i=y(e);return I(t,i?e.get(0):e[0],i?e.get(1):e[1],r)}}})},ft.prototype.cacheResult=st.prototype.cacheResult=ct.prototype.cacheResult=ht.prototype.cacheResult=Rt,t(Tt,H),Tt.prototype.toString=function(){return this.__toString("Map {","}")},Tt.prototype.get=function(t,r){return this._root?this._root.get(0,void 0,t,r):r},Tt.prototype.set=function(t,r){return Yt(this,t,r)},Tt.prototype.setIn=function(t,r){return this.updateIn(t,ln,function(){return r})},Tt.prototype.remove=function(t){return Yt(this,t,ln)},Tt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return ln})},Tt.prototype.update=function(t,r,n){return 1===arguments.length?t(this):this.updateIn([t],r,n)},Tt.prototype.updateIn=function(t,r,n){n||(n=r,r=void 0);var e=or(this,Ut(t),r,n);return e===ln?void 0:e},Tt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Vt()},Tt.prototype.merge=function(){return nr(this,void 0,arguments)},Tt.prototype.mergeWith=function(t){var r=an.call(arguments,1);return nr(this,t,r)},Tt.prototype.mergeIn=function(t){var r=an.call(arguments,1);return this.updateIn(t,Vt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,r):r[r.length-1]})},Tt.prototype.mergeDeep=function(){return nr(this,er(void 0),arguments)},Tt.prototype.mergeDeepWith=function(t){var r=an.call(arguments,1);return nr(this,er(t),r)},Tt.prototype.mergeDeepIn=function(t){var r=an.call(arguments,1);return this.updateIn(t,Vt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,r):r[r.length-1]; })},Tt.prototype.sort=function(t){return Sr(zt(this,t))},Tt.prototype.sortBy=function(t,r){return Sr(zt(this,r,t))},Tt.prototype.withMutations=function(t){var r=this.asMutable();return t(r),r.wasAltered()?r.__ensureOwner(this.__ownerID):this},Tt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new e)},Tt.prototype.asImmutable=function(){return this.__ensureOwner()},Tt.prototype.wasAltered=function(){return this.__altered},Tt.prototype.__iterator=function(t,r){return new $t(this,t,r)},Tt.prototype.__iterate=function(t,r){var n=this,e=0;return this._root&&this._root.iterate(function(r){return e++,t(r[1],r[0],n)},r),e},Tt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Jt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Tt.isMap=Bt;var Bn="@@__IMMUTABLE_MAP__@@",Wn=Tt.prototype;Wn[Bn]=!0,Wn[sn]=Wn.remove,Wn.removeIn=Wn.deleteIn,Wt.prototype.get=function(t,r,n,e){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(n,i[o][0]))return i[o][1];return e},Wt.prototype.update=function(t,r,e,o,u,a,s){for(var f=u===ln,c=this.entries,h=0,l=c.length;l>h&&!Y(o,c[h][0]);h++);var p=l>h;if(p?c[h][1]===u:f)return this;if(n(s),(f||!p)&&n(a),!f||1!==c.length){if(!p&&!f&&c.length>=Kn)return Qt(t,c,o,u);var _=t&&t===this.ownerID,v=_?c:i(c);return p?f?h===l-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Wt(t,v)}},Ct.prototype.get=function(t,r,n,e){void 0===r&&(r=rt(n));var i=1<<((0===t?r:r>>>t)&hn),o=this.bitmap;return 0===(o&i)?e:this.nodes[ur(o&i-1)].get(t+fn,r,n,e)},Ct.prototype.update=function(t,r,n,e,i,o,u){void 0===n&&(n=rt(e));var a=(0===r?n:n>>>r)&hn,s=1<=Pn)return rr(t,l,f,a,_);if(c&&!_&&2===l.length&&Xt(l[1^h]))return l[1^h];if(c&&_&&1===l.length&&Xt(_))return _;var v=t&&t===this.ownerID,y=c?_?f:f^s:f|s,d=c?_?ar(l,h,_,v):fr(l,h,v):sr(l,h,_,v);return v?(this.bitmap=y,this.nodes=d,this):new Ct(t,y,d)},Kt.prototype.get=function(t,r,n,e){void 0===r&&(r=rt(n));var i=(0===t?r:r>>>t)&hn,o=this.nodes[i];return o?o.get(t+fn,r,n,e):e},Kt.prototype.update=function(t,r,n,e,i,o,u){void 0===n&&(n=rt(e));var a=(0===r?n:n>>>r)&hn,s=i===ln,f=this.nodes,c=f[a];if(s&&!c)return this;var h=Zt(c,t,r+fn,n,e,i,o,u);if(h===c)return this;var l=this.count;if(c){if(!h&&(l--,Nn>l))return tr(t,f,l,a)}else l++;var p=t&&t===this.ownerID,_=ar(f,a,h,p);return p?(this.count=l,this.nodes=_,this):new Kt(t,l,_)},Pt.prototype.get=function(t,r,n,e){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(n,i[o][0]))return i[o][1];return e},Pt.prototype.update=function(t,r,e,o,u,a,s){void 0===e&&(e=rt(o));var f=u===ln;if(e!==this.keyHash)return f?this:(n(s),n(a),Gt(this,t,r,e,[o,u]));for(var c=this.entries,h=0,l=c.length;l>h&&!Y(o,c[h][0]);h++);var p=l>h;if(p?c[h][1]===u:f)return this;if(n(s),(f||!p)&&n(a),f&&2===l)return new Nt(t,this.keyHash,c[1^h]);var _=t&&t===this.ownerID,v=_?c:i(c);return p?f?h===l-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),_?(this.entries=v,this):new Pt(t,this.keyHash,v)},Nt.prototype.get=function(t,r,n,e){return Y(n,this.entry[0])?this.entry[1]:e},Nt.prototype.update=function(t,r,e,i,o,u,a){var s=o===ln,f=Y(i,this.entry[0]);return(f?o===this.entry[1]:s)?this:(n(a),s?void n(u):f?t&&t===this.ownerID?(this.entry[1]=o,this):new Nt(t,this.keyHash,[i,o]):(n(u),Gt(this,t,r,rt(i),[i,o])))},Wt.prototype.iterate=Pt.prototype.iterate=function(t,r){for(var n=this.entries,e=0,i=n.length-1;i>=e;e++)if(t(n[r?i-e:e])===!1)return!1},Ct.prototype.iterate=Kt.prototype.iterate=function(t,r){for(var n=this.nodes,e=0,i=n.length-1;i>=e;e++){var o=n[r?i-e:e];if(o&&o.iterate(t,r)===!1)return!1}},Nt.prototype.iterate=function(t,r){return t(this.entry)},t($t,b),$t.prototype.next=function(){for(var t=this._type,r=this._stack;r;){var n,e=r.node,i=r.index++;if(e.entry){if(0===i)return Ft(t,e.entry)}else if(e.entries){if(n=e.entries.length-1,n>=i)return Ft(t,e.entries[this._reverse?n-i:i])}else if(n=e.nodes.length-1,n>=i){var o=e.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Ft(t,o.entry);r=this._stack=Ht(o,r)}continue}r=this._stack=this._stack.__prev}return S()};var Cn,Kn=cn/4,Pn=cn/2,Nn=cn/4;t(cr,J),cr.of=function(){return this(arguments)},cr.prototype.toString=function(){return this.__toString("List [","]")},cr.prototype.get=function(t,r){if(t=u(this,t),t>=0&&t>>r&hn;if(e>=this.array.length)return new lr([],t);var i,o=0===e;if(r>0){var u=this.array[e];if(i=u&&u.removeBefore(t,r-fn,n),i===u&&o)return this}if(o&&!i)return this;var a=gr(this,t);if(!o)for(var s=0;e>s;s++)a.array[s]=void 0;return i&&(a.array[e]=i),a},lr.prototype.removeAfter=function(t,r,n){if(n===(r?1<>>r&hn;if(e>=this.array.length)return this;var i;if(r>0){var o=this.array[e];if(i=o&&o.removeAfter(t,r-fn,n),i===o&&e===this.array.length-1)return this}var u=gr(this,t);return u.array.splice(e+1),i&&(u.array[e]=i),u};var Hn,Jn={};t(Sr,Tt),Sr.of=function(){return this(arguments)},Sr.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Sr.prototype.get=function(t,r){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:r},Sr.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Er()},Sr.prototype.set=function(t,r){return Mr(this,t,r)},Sr.prototype.remove=function(t){return Mr(this,t,ln)},Sr.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Sr.prototype.__iterate=function(t,r){var n=this;return this._list.__iterate(function(r){return r&&t(r[1],r[0],n)},r)},Sr.prototype.__iterator=function(t,r){return this._list.fromEntrySeq().__iterator(t,r)},Sr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?zr(r,n,t,this.__hash):(this.__ownerID=t,this._map=r,this._list=n,this)},Sr.isOrderedMap=xr,Sr.prototype[gn]=!0,Sr.prototype[sn]=Sr.prototype.remove;var Vn;t(Ar,J),Ar.of=function(){return this(arguments)},Ar.prototype.toString=function(){return this.__toString("Stack [","]")},Ar.prototype.get=function(t,r){var n=this._head;for(t=u(this,t);n&&t--;)n=n.next;return n?n.value:r},Ar.prototype.peek=function(){return this._head&&this._head.value},Ar.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:arguments[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Or(t,r)},Ar.prototype.pushAll=function(t){if(t=_(t),0===t.size)return this;at(t.size);var r=this.size,n=this._head;return t.reverse().forEach(function(t){r++,n={value:t,next:n}}),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Or(r,n)},Ar.prototype.pop=function(){return this.slice(1)},Ar.prototype.unshift=function(){return this.push.apply(this,arguments)},Ar.prototype.unshiftAll=function(t){return this.pushAll(t)},Ar.prototype.shift=function(){return this.pop.apply(this,arguments)},Ar.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):jr()},Ar.prototype.slice=function(t,r){if(s(t,r,this.size))return this;var n=f(t,this.size),e=c(r,this.size);if(e!==this.size)return J.prototype.slice.call(this,t,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Or(i,o)},Ar.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Or(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ar.prototype.__iterate=function(t,r){if(r)return this.reverse().__iterate(t);for(var n=0,e=this._head;e&&t(e.value,n++,this)!==!1;)e=e.next;return n},Ar.prototype.__iterator=function(t,r){if(r)return this.reverse().__iterator(t);var n=0,e=this._head;return new b(function(){if(e){var r=e.value;return e=e.next,I(t,n++,r)}return S()})},Ar.isStack=kr;var Yn="@@__IMMUTABLE_STACK__@@",Zn=Ar.prototype;Zn[Yn]=!0,Zn.withMutations=Wn.withMutations,Zn.asMutable=Wn.asMutable,Zn.asImmutable=Wn.asImmutable,Zn.wasAltered=Wn.wasAltered;var Xn;t(qr,V),qr.of=function(){return this(arguments)},qr.fromKeys=function(t){return this(p(t).keySeq())},qr.prototype.toString=function(){return this.__toString("Set {","}")},qr.prototype.has=function(t){return this._map.has(t)},qr.prototype.add=function(t){return Rr(this,this._map.set(t,!0))},qr.prototype.remove=function(t){return Rr(this,this._map.remove(t))},qr.prototype.clear=function(){return Rr(this,this._map.clear())},qr.prototype.union=function(){var t=an.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(r){for(var n=0;n1?" by "+this._step:"")+" ]"},Jr.prototype.get=function(t,r){return this.has(t)?this._start+u(this,t)*this._step:r},Jr.prototype.includes=function(t){var r=(t-this._start)/this._step;return r>=0&&r=r?new Jr(0,0):new Jr(this.get(t,this._end),this.get(r,this._end),this._step))},Jr.prototype.indexOf=function(t){var r=t-this._start;if(r%this._step===0){var n=r/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=r?-e:e}return o},Jr.prototype.__iterator=function(t,r){var n=this.size-1,e=this._step,i=r?this._start+n*e:this._start,o=0;return new b(function(){var u=i;return i+=r?-e:e,o>n?S():I(t,o++,u)})},Jr.prototype.equals=function(t){return t instanceof Jr?this._start===t._start&&this._end===t._end&&this._step===t._step:Hr(this,t)};var ie;t(Vr,j),Vr.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Vr.prototype.get=function(t,r){return this.has(t)?this._value:r},Vr.prototype.includes=function(t){return Y(this._value,t)},Vr.prototype.slice=function(t,r){var n=this.size;return s(t,r,n)?this:new Vr(this._value,c(r,n)-f(t,n))},Vr.prototype.reverse=function(){return this},Vr.prototype.indexOf=function(t){return Y(this._value,t)?0:-1},Vr.prototype.lastIndexOf=function(t){return Y(this._value,t)?this.size:-1},Vr.prototype.__iterate=function(t,r){for(var n=0;nt?this.count():this.size);var e=this.slice(0,t);return kt(this,1===n?e:e.concat(i(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var n=this.toKeyedSeq().findLastKey(t,r);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return kt(this,It(this,t,!1))},get:function(t,r){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?r:this.find(function(r,n){return n===t},void 0,r)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||tr&&!o||!i||n&&!u&&a||e&&a)return 1;if(r>t&&!n||!a||o&&!e&&i||u&&i)return-1}return 0}function i(t,r,n){for(var e=t.length,i=n?e:-1;n?i--:++i-1;);return n}function f(t,r){for(var n=t.length;n--&&r.indexOf(t.charAt(n))>-1;);return n}function c(t,r){return e(t.criteria,r.criteria)||t.index-r.index}function h(t,r,n){for(var i=-1,o=t.criteria,u=r.criteria,a=o.length,s=n.length;++i=s)return f;var c=n[i];return f*("asc"===c||c===!0?1:-1)}}return t.index-r.index}function l(t){return $t[t]}function p(t){return Ft[t]}function _(t,r,n){return r?t=Vt[t]:n&&(t=Yt[t]),"\\"+t}function v(t){return"\\"+Yt[t]}function y(t,r,n){for(var e=t.length,i=r+(n?0:-1);n?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function m(t,r){for(var n=-1,e=t.length,i=-1,o=[];++nr,i=n?t.length:0,o=Hn(0,i,this.__views__),u=o.start,a=o.end,s=a-u,f=e?a:u-1,c=this.__iteratees__,h=c.length,l=0,p=Su(s,this.__takeCount__);if(!n||C>i||i==s&&p==s)return nn(e&&n?t.reverse():t,this.__actions__);var _=[];t:for(;s--&&p>l;){f+=r;for(var v=-1,y=t[f];++v=C?vn(r):null,f=r.length;s&&(u=Xt,a=!1,r=s);t:for(;++in&&(n=-n>i?0:i+n),e=e===z||e>i?i:+e||0,0>e&&(e+=i),i=n>e?0:e>>>0,n>>>=0;i>n;)t[n++]=r;return t}function Mr(t,r){var n=[];return Uu(t,function(t,e,i){r(t,e,i)&&n.push(t)}),n}function Ar(t,r,n,e){var i;return n(t,function(t,n,o){return r(t,n,o)?(i=e?n:t,!1):void 0}),i}function kr(t,r,n,e){e||(e=[]);for(var i=-1,o=t.length;++ie;)t=t[r[e++]];return e&&e==i?t:z}}function Lr(t,r,n,e,i,o){ return t===r?!0:null==t||null==r||!Ri(t)&&!d(r)?t!==t&&r!==r:Ur(t,r,Lr,n,e,i,o)}function Ur(t,r,n,e,i,o,u){var a=ka(t),s=ka(r),f=H,c=H;a||(f=eu.call(t),f==F?f=Q:f!=Q&&(a=Ni(t))),s||(c=eu.call(r),c==F?c=Q:c!=Q&&(s=Ni(r)));var h=f==Q,l=c==Q,p=f==c;if(p&&!a&&!h)return Wn(t,r,f);if(!i){var _=h&&ru.call(t,"__wrapped__"),v=l&&ru.call(r,"__wrapped__");if(_||v)return n(_?t.value():t,v?r.value():r,e,i,o,u)}if(!p)return!1;o||(o=[]),u||(u=[]);for(var y=o.length;y--;)if(o[y]==t)return u[y]==r;o.push(t),u.push(r);var d=(a?Bn:Cn)(t,r,n,e,i,o,u);return o.pop(),u.pop(),d}function Tr(t,r,n){var e=r.length,i=e,o=!n;if(null==t)return!i;for(t=he(t);e--;){var u=r[e];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++er&&(r=-r>i?0:i+r),n=n===z||n>i?i:+n||0,0>n&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var o=Ko(i);++e=C,s=a?vn():null,f=[];s?(e=Xt,u=!1):(a=!1,s=r?[]:f);t:for(;++n=i){for(;i>e;){var o=e+i>>>1,u=t[o];(n?r>=u:r>u)&&null!==u?e=o+1:i=o}return i}return on(t,r,Ao,n)}function on(t,r,n,e){r=n(r);for(var i=0,o=t?t.length:0,u=r!==r,a=null===r,s=r===z;o>i;){var f=gu((i+o)/2),c=n(t[f]),h=c!==z,l=c===c;if(u)var p=l||e;else p=a?l&&h&&(e||null!=c):s?l&&(e||h):null==c?!1:e?r>=c:r>c;p?i=f+1:o=f}return Su(o,Ou)}function un(t,r,n){if("function"!=typeof t)return Ao;if(r===z)return t;switch(n){case 1:return function(n){return t.call(r,n)};case 3:return function(n,e,i){return t.call(r,n,e,i)};case 4:return function(n,e,i,o){return t.call(r,n,e,i,o)};case 5:return function(n,e,i,o,u){return t.call(r,n,e,i,o,u)}}return function(){return t.apply(r,arguments)}}function an(t){var r=new uu(t.byteLength),n=new _u(r);return n.set(new _u(t)),r}function sn(t,r,n){for(var e=n.length,i=-1,o=Iu(t.length-e,0),u=-1,a=r.length,s=Ko(a+o);++u2?n[i-2]:z,u=i>2?n[2]:z,a=i>1?n[i-1]:z;for("function"==typeof o?(o=un(o,a,5),i-=2):(o="function"==typeof a?a:z,i-=o?1:0),u&&Qn(n[0],n[1],u)&&(o=3>i?z:o,i=1);++e-1?n[u]:z}return Ar(n,e,t)}}function In(t){return function(r,n,e){return r&&r.length?(n=Kn(n,e,3),i(r,n,t)):-1}}function Sn(t){return function(r,n,e){return n=Kn(n,e,3),Ar(r,n,t,!0)}}function xn(t){return function(){for(var r,n=arguments.length,e=t?n:-1,i=0,o=Ko(n);t?e--:++e=C)return r.plant(e).value();for(var i=0,u=n?o[i].apply(this,t):e;++ig){var x=a?tr(a):z,E=Iu(f-g,0),k=_?S:z,O=_?z:S,j=_?b:z,R=_?z:b;r|=_?q:D,r&=~(_?D:q),v||(r&=~(M|A));var L=[t,r,n,j,k,R,O,x,s,E],U=qn.apply(z,L);return re(t)&&Nu(U,L),U.placeholder=I,U}}var T=l?n:this,B=p?T[t]:t;return a&&(b=se(b,a)),h&&s=r||!wu(r))return"";var i=r-e;return n=null==n?" ":n+"",yo(n,yu(i/n.length)).slice(0,i)}function Rn(t,r,n,e){function i(){for(var r=-1,a=arguments.length,s=-1,f=e.length,c=Ko(f+a);++ss))return!1;for(;++a-1&&t%1==0&&r>t}function Qn(t,r,n){if(!Ri(n))return!1;var e=typeof r;if("number"==e?Xn(n)&&Gn(r,n.length):"string"==e&&r in n){var i=n[r];return t===t?t===i:i!==i}return!1}function te(t,r){var n=typeof t;if("string"==n&&zt.test(t)||"number"==n)return!0;if(ka(t))return!1;var e=!xt.test(t);return e||null!=r&&t in he(r)}function re(t){var n=Pn(t);if(!(n in X.prototype))return!1;var e=r[n];if(t===e)return!0;var i=Ku(e);return!!i&&t===i[0]}function ne(t){return"number"==typeof t&&t>-1&&t%1==0&&qu>=t}function ee(t){return t===t&&!Ri(t)}function ie(t,r){var n=t[1],e=r[1],i=n|e,o=R>i,u=e==R&&n==O||e==R&&n==L&&t[7].length<=r[8]||e==(R|L)&&n==O;if(!o&&!u)return t;e&M&&(t[2]=r[2],i|=n&M?0:k);var a=r[3];if(a){var s=t[3];t[3]=s?sn(s,a,r[4]):tr(a),t[4]=s?m(t[3],$):tr(r[4])}return a=r[5],a&&(s=t[5],t[5]=s?fn(s,a,r[6]):tr(a),t[6]=s?m(t[5],$):tr(r[6])),a=r[7],a&&(t[7]=tr(a)),e&R&&(t[8]=null==t[8]?r[8]:Su(t[8],r[8])),null==t[9]&&(t[9]=r[9]),t[0]=r[0],t[1]=i,t}function oe(t,r){return t===z?r:Oa(t,r,oe)}function ue(t,r){t=he(t);for(var n=-1,e=r.length,i={};++ne;)u[++o]=Vr(t,e,e+=r);return u}function ve(t){for(var r=-1,n=t?t.length:0,e=-1,i=[];++rr?0:r)):[]}function de(t,r,n){var e=t?t.length:0;return e?((n?Qn(t,r,n):null==r)&&(r=1),r=e-(+r||0),Vr(t,0,0>r?0:r)):[]}function ge(t,r,n){return t&&t.length?rn(t,Kn(r,n,3),!0,!0):[]}function me(t,r,n){return t&&t.length?rn(t,Kn(r,n,3),!0):[]}function we(t,r,n,e){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&Qn(t,r,n)&&(n=0,e=i),Er(t,r,n,e)):[]}function be(t){return t?t[0]:z}function Ie(t,r,n){var e=t?t.length:0;return n&&Qn(t,r,n)&&(r=!1),e?kr(t,r):[]}function Se(t){var r=t?t.length:0;return r?kr(t,!0):[]}function xe(t,r,n){var e=t?t.length:0;if(!e)return-1;if("number"==typeof n)n=0>n?Iu(e+n,0):n;else if(n){var i=en(t,r);return e>i&&(r===r?r===t[i]:t[i]!==t[i])?i:-1}return o(t,r,n||0)}function ze(t){return de(t,1)}function Ee(t){var r=t?t.length:0;return r?t[r-1]:z}function Me(t,r,n){var e=t?t.length:0;if(!e)return-1;var i=e;if("number"==typeof n)i=(0>n?Iu(e+n,0):Su(n||0,e-1))+1;else if(n){i=en(t,r,!0)-1;var o=t[i];return(r===r?r===o:o!==o)?i:-1}if(r!==r)return y(t,i,!0);for(;i--;)if(t[i]===r)return i;return-1}function Ae(){var t=arguments,r=t[0];if(!r||!r.length)return r;for(var n=0,e=Nn(),i=t.length;++n-1;)pu.call(r,o,1);return r}function ke(t,r,n){var e=[];if(!t||!t.length)return e;var i=-1,o=[],u=t.length;for(r=Kn(r,n,3);++ir?0:r)):[]}function De(t,r,n){var e=t?t.length:0;return e?((n?Qn(t,r,n):null==r)&&(r=1),r=e-(+r||0),Vr(t,0>r?0:r)):[]}function Re(t,r,n){return t&&t.length?rn(t,Kn(r,n,3),!1,!0):[]}function Le(t,r,n){return t&&t.length?rn(t,Kn(r,n,3)):[]}function Ue(t,r,n,e){var i=t?t.length:0;if(!i)return[];null!=r&&"boolean"!=typeof r&&(e=n,n=Qn(t,r,e)?z:r,r=!1);var u=Kn();return(null!=n||u!==wr)&&(n=u(n,e,3)),r&&Nn()==o?w(t,n):Qr(t,n)}function Te(t){if(!t||!t.length)return[];var r=-1,n=0;t=ar(t,function(t){return Xn(t)?(n=Iu(t.length,n),!0):void 0});for(var e=Ko(n);++rn?Iu(i+n,0):n||0,"string"==typeof t||!ka(t)&&Pi(t)?i>=n&&t.indexOf(r,n)>-1:!!i&&Nn(t,r,n)>-1}function ti(t,r,n){var e=ka(t)?sr:Br;return r=Kn(r,n,3),e(t,r)}function ri(t,r){return ti(t,Ro(r))}function ni(t,r,n){var e=ka(t)?ar:Mr;return r=Kn(r,n,3),e(t,function(t,n,e){return!r(t,n,e)})}function ei(t,r,n){if(n?Qn(t,r,n):null==r){t=ce(t);var e=t.length;return e>0?t[Hr(0,e-1)]:z}var i=-1,o=Ji(t),e=o.length,u=e-1;for(r=Su(0>r?0:+r||0,e);++i0&&(n=r.apply(this,arguments)),1>=t&&(r=z),n}}function pi(t,r,n){function e(){p&&au(p),f&&au(f),v=0,f=p=_=z}function i(r,n){n&&au(n),f=p=_=z,r&&(v=va(),c=t.apply(l,s),p||f||(s=l=z))}function o(){var t=r-(va()-h);0>=t||t>r?i(_,f):p=lu(o,t)}function u(){i(d,p)}function a(){if(s=arguments,h=va(),l=this,_=d&&(p||!g),y===!1)var n=g&&!p;else{f||g||(v=h);var e=y-(h-v),i=0>=e||e>y;i?(f&&(f=au(f)),v=h,c=t.apply(l,s)):f||(f=lu(u,e))}return i&&p?p=au(p):p||r===y||(p=lu(o,r)),n&&(i=!0,c=t.apply(l,s)),!i||p||f||(s=l=z),c}var s,f,c,h,l,p,_,v=0,y=!1,d=!0;if("function"!=typeof t)throw new Zo(N);if(r=0>r?0:+r||0,n===!0){var g=!0;d=!1}else Ri(n)&&(g=!!n.leading,y="maxWait"in n&&Iu(+n.maxWait||0,r),d="trailing"in n?!!n.trailing:d);return a.cancel=e,a}function _i(t,r){if("function"!=typeof t||r&&"function"!=typeof r)throw new Zo(N);var n=function(){var e=arguments,i=r?r.apply(this,e):e[0],o=n.cache;if(o.has(i))return o.get(i);var u=t.apply(this,e);return n.cache=o.set(i,u),u};return n.cache=new _i.Cache,n}function vi(t){if("function"!=typeof t)throw new Zo(N);return function(){return!t.apply(this,arguments)}}function yi(t){return li(2,t)}function di(t,r){if("function"!=typeof t)throw new Zo(N);return r=Iu(r===z?t.length-1:+r||0,0),function(){for(var n=arguments,e=-1,i=Iu(n.length-r,0),o=Ko(i);++er}function xi(t,r){return t>=r}function zi(t){return d(t)&&Xn(t)&&ru.call(t,"callee")&&!cu.call(t,"callee")}function Ei(t){return t===!0||t===!1||d(t)&&eu.call(t)==J}function Mi(t){return d(t)&&eu.call(t)==V}function Ai(t){return!!t&&1===t.nodeType&&d(t)&&!Ci(t)}function ki(t){return null==t?!0:Xn(t)&&(ka(t)||Pi(t)||zi(t)||d(t)&&Di(t.splice))?!t.length:!Ca(t).length}function Oi(t,r,n,e){n="function"==typeof n?un(n,e,3):z;var i=n?n(t,r):z;return i===z?Lr(t,r,n):!!i}function ji(t){return d(t)&&"string"==typeof t.message&&eu.call(t)==Y}function qi(t){return"number"==typeof t&&wu(t)}function Di(t){return Ri(t)&&eu.call(t)==Z}function Ri(t){var r=typeof t;return!!t&&("object"==r||"function"==r)}function Li(t,r,n,e){return n="function"==typeof n?un(n,e,3):z,Tr(t,$n(r),n)}function Ui(t){return Wi(t)&&t!=+t}function Ti(t){return null==t?!1:Di(t)?ou.test(tu.call(t)):d(t)&&Rt.test(t)}function Bi(t){return null===t}function Wi(t){return"number"==typeof t||d(t)&&eu.call(t)==G}function Ci(t){var r;if(!d(t)||eu.call(t)!=Q||zi(t)||!ru.call(t,"constructor")&&(r=t.constructor,"function"==typeof r&&!(r instanceof r)))return!1;var n;return Or(t,function(t,r){n=r}),n===z||ru.call(t,n)}function Ki(t){return Ri(t)&&eu.call(t)==tt}function Pi(t){return"string"==typeof t||d(t)&&eu.call(t)==nt}function Ni(t){return d(t)&&ne(t.length)&&!!Pt[eu.call(t)]}function $i(t){return t===z}function Fi(t,r){return r>t}function Hi(t,r){return r>=t}function Ji(t){var r=t?Pu(t):0;return ne(r)?r?tr(t):[]:oo(t)}function Vi(t){return mr(t,to(t))}function Yi(t,r,n){var e=Lu(t);return n&&Qn(t,r,n)&&(r=z),r?dr(e,r):e}function Zi(t){return Dr(t,to(t))}function Xi(t,r,n){var e=null==t?z:Rr(t,le(r),r+"");return e===z?n:e}function Gi(t,r){if(null==t)return!1;var n=ru.call(t,r);if(!n&&!te(r)){if(r=le(r),t=1==r.length?t:Rr(t,Vr(r,0,-1)),null==t)return!1;r=Ee(r),n=ru.call(t,r)}return n||ne(t.length)&&Gn(r,t.length)&&(ka(t)||zi(t))}function Qi(t,r,n){n&&Qn(t,r,n)&&(r=z);for(var e=-1,i=Ca(t),o=i.length,u={};++e0;++e=Su(r,n)&&tn?0:+n||0,e),n-=r.length,n>=0&&t.indexOf(r,n)==n}function lo(t){return t=a(t),t&&wt.test(t)?t.replace(gt,p):t}function po(t){return t=a(t),t&&At.test(t)?t.replace(Mt,_):t||"(?:)"}function _o(t,r,n){t=a(t),r=+r;var e=t.length;if(e>=r||!wu(r))return t;var i=(r-e)/2,o=gu(i),u=yu(i);return n=Dn("",u,n),n.slice(0,o)+t+n}function vo(t,r,n){return(n?Qn(t,r,n):null==r)?r=0:r&&(r=+r),t=wo(t),zu(t,r||(Dt.test(t)?16:10))}function yo(t,r){var n="";if(t=a(t),r=+r,1>r||!t||!wu(r))return n;do r%2&&(n+=t),r=gu(r/2),t+=t;while(r);return n}function go(t,r,n){return t=a(t),n=null==n?0:Su(0>n?0:+n||0,t.length),t.lastIndexOf(r,n)==n}function mo(t,n,e){var i=r.templateSettings;e&&Qn(t,n,e)&&(n=e=z),t=a(t),n=yr(dr({},e||n),i,vr);var o,u,s=yr(dr({},n.imports),i.imports,vr),f=Ca(s),c=tn(s,f),h=0,l=n.interpolate||Tt,p="__p += '",_=Vo((n.escape||Tt).source+"|"+l.source+"|"+(l===St?jt:Tt).source+"|"+(n.evaluate||Tt).source+"|$","g"),y="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Kt+"]")+"\n";t.replace(_,function(r,n,e,i,a,s){return e||(e=i),p+=t.slice(h,s).replace(Bt,v),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),e&&(p+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),h=s+r.length,r}),p+="';\n";var d=n.variable;d||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(_t,""):p).replace(vt,"$1").replace(yt,"$1;"),p="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xa(function(){return $o(f,y+"return "+p).apply(z,c)});if(g.source=p,ji(g))throw g;return g}function wo(t,r,n){var e=t;return(t=a(t))?(n?Qn(e,r,n):null==r)?t.slice(b(t),I(t)+1):(r+="",t.slice(s(t,r),f(t,r)+1)):t}function bo(t,r,n){var e=t;return t=a(t),t?(n?Qn(e,r,n):null==r)?t.slice(b(t)):t.slice(s(t,r+"")):t}function Io(t,r,n){var e=t;return t=a(t),t?(n?Qn(e,r,n):null==r)?t.slice(0,I(t)+1):t.slice(0,f(t,r+"")+1):t}function So(t,r,n){n&&Qn(t,r,n)&&(r=z);var e=U,i=T;if(null!=r)if(Ri(r)){var o="separator"in r?r.separator:o;e="length"in r?+r.length||0:e,i="omission"in r?a(r.omission):i}else e=+r||0;if(t=a(t),e>=t.length)return t;var u=e-i.length;if(1>u)return i;var s=t.slice(0,u);if(null==o)return s+i;if(Ki(o)){if(t.slice(u).search(o)){var f,c,h=t.slice(0,u);for(o.global||(o=Vo(o.source,(qt.exec(o)||"")+"g")),o.lastIndex=0;f=o.exec(h);)c=f.index;s=s.slice(0,null==c?u:c)}}else if(t.indexOf(o,u)!=u){var l=s.lastIndexOf(o);l>-1&&(s=s.slice(0,l))}return s+i}function xo(t){return t=a(t),t&&mt.test(t)?t.replace(dt,S):t}function zo(t,r,n){return n&&Qn(t,r,n)&&(r=z),t=a(t),t.match(r||Wt)||[]}function Eo(t,r,n){return n&&Qn(t,r,n)&&(r=z),d(t)?ko(t):wr(t,r)}function Mo(t){return function(){return t}}function Ao(t){return t}function ko(t){return Wr(br(t,!0))}function Oo(t,r){return Cr(t,br(r,!0))}function jo(t,r,n){if(null==n){var e=Ri(r),i=e?Ca(r):z,o=i&&i.length?Dr(r,i):z;(o?o.length:e)||(o=!1,n=r,r=t,t=this)}o||(o=Dr(r,Ca(r)));var u=!0,a=-1,s=Di(t),f=o.length;n===!1?u=!1:Ri(n)&&"chain"in n&&(u=n.chain);for(;++at||!wu(t))return[];var e=-1,i=Ko(Su(t,ku));for(r=un(r,n,1);++ee?i[e]=r(e):r(e);return i}function Bo(t){var r=++nu;return a(t)+r}function Wo(t,r){return(+t||0)+(+r||0)}function Co(t,r,n){return n&&Qn(t,r,n)&&(r=z),r=Kn(r,n,3),1==r.length?pr(ka(t)?t:ce(t),r):Gr(t,r)}t=t?er.defaults(nr.Object(),t,er.pick(nr,Ct)):nr;var Ko=t.Array,Po=t.Date,No=t.Error,$o=t.Function,Fo=t.Math,Ho=t.Number,Jo=t.Object,Vo=t.RegExp,Yo=t.String,Zo=t.TypeError,Xo=Ko.prototype,Go=Jo.prototype,Qo=Yo.prototype,tu=$o.prototype.toString,ru=Go.hasOwnProperty,nu=0,eu=Go.toString,iu=nr._,ou=Vo("^"+tu.call(ru).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uu=t.ArrayBuffer,au=t.clearTimeout,su=t.parseFloat,fu=Fo.pow,cu=Go.propertyIsEnumerable,hu=Fn(t,"Set"),lu=t.setTimeout,pu=Xo.splice,_u=t.Uint8Array,vu=Fn(t,"WeakMap"),yu=Fo.ceil,du=Fn(Jo,"create"),gu=Fo.floor,mu=Fn(Ko,"isArray"),wu=t.isFinite,bu=Fn(Jo,"keys"),Iu=Fo.max,Su=Fo.min,xu=Fn(Po,"now"),zu=t.parseInt,Eu=Fo.random,Mu=Ho.NEGATIVE_INFINITY,Au=Ho.POSITIVE_INFINITY,ku=4294967295,Ou=ku-1,ju=ku>>>1,qu=9007199254740991,Du=vu&&new vu,Ru={};r.support={};r.templateSettings={escape:bt,evaluate:It,interpolate:St,variable:"",imports:{_:r}};var Lu=function(){function t(){}return function(r){if(Ri(r)){t.prototype=r;var n=new t;t.prototype=z}return n||{}}}(),Uu=ln(jr),Tu=ln(qr,!0),Bu=pn(),Wu=pn(!0),Cu=Du?function(t,r){return Du.set(t,r),t}:Ao,Ku=Du?function(t){return Du.get(t)}:Do,Pu=Nr("length"),Nu=function(){var t=0,r=0;return function(n,e){var i=va(),o=W-(i-r);if(r=i,o>0){if(++t>=B)return n}else t=0;return Cu(n,e)}}(),$u=di(function(t,r){return d(t)&&Xn(t)?Sr(t,kr(r,!1,!0)):[]}),Fu=In(),Hu=In(!0),Ju=di(function(t){for(var r=t.length,n=r,e=Ko(h),i=Nn(),u=i==o,a=[];n--;){var s=t[n]=Xn(s=t[n])?s:[];e[n]=u&&s.length>=120?vn(n&&s):null}var f=t[0],c=-1,h=f?f.length:0,l=e[0];t:for(;++c2?t[r-2]:z,e=r>1?t[r-1]:z;return r>2&&"function"==typeof n?r-=2:(n=r>1&&"function"==typeof e?(--r,e):z,e=z),t.length=r,Be(t,n,e)}),ra=di(function(t){return t=kr(t),this.thru(function(r){return Qt(ka(r)?r:[he(r)],t)})}),na=di(function(t,r){return gr(t,kr(r))}),ea=cn(function(t,r,n){ru.call(t,n)?++t[n]:t[n]=1}),ia=bn(Uu),oa=bn(Tu,!0),ua=zn(rr,Uu),aa=zn(ir,Tu),sa=cn(function(t,r,n){ru.call(t,n)?t[n].push(r):t[n]=[r]}),fa=cn(function(t,r,n){t[n]=r}),ca=di(function(t,r,n){var e=-1,i="function"==typeof r,o=te(r),u=Xn(t)?Ko(t.length):[];return Uu(t,function(t){var a=i?r:o&&null!=t?t[r]:z;u[++e]=a?a.apply(t,n):Zn(t,r,n)}),u}),ha=cn(function(t,r,n){t[n?0:1].push(r)},function(){return[[],[]]}),la=jn(cr,Uu),pa=jn(hr,Tu),_a=di(function(t,r){if(null==t)return[];var n=r[2];return n&&Qn(r[0],r[1],n)&&(r.length=1),Xr(t,kr(r),[])}),va=xu||function(){return(new Po).getTime()},ya=di(function(t,r,n){var e=M;if(n.length){var i=m(n,ya.placeholder); -e|=q}return Tn(t,e,r,n,i)}),da=di(function(t,r){r=r.length?kr(r):Zi(t);for(var n=-1,e=r.length;++n0||0>r)?new X(n):(0>t?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==z&&(r=+r||0,n=0>r?n.dropRight(-r):n.take(r-t)),n)},X.prototype.takeRightWhile=function(t,r){return this.reverse().takeWhile(t,r).reverse()},X.prototype.toArray=function(){return this.take(Au)},jr(X.prototype,function(t,n){var e=/^(?:filter|map|reject)|While$/.test(n),i=/^(?:first|last)$/.test(n),o=r[i?"take"+("last"==n?"Right":""):n];o&&(r.prototype[n]=function(){var r=i?[1]:arguments,n=this.__chain__,u=this.__wrapped__,a=!!this.__actions__.length,s=u instanceof X,f=r[0],c=s||ka(u);c&&e&&"function"==typeof f&&1!=f.length&&(s=c=!1);var h=function(t){return i&&n?o(t,1)[0]:o.apply(z,fr([t],r))},l={func:Ne,args:[h],thisArg:z},p=s&&!a;if(i&&!n)return p?(u=u.clone(),u.__actions__.push(l),t.call(u)):o.call(z,this.value())[0];if(!i&&c){u=p?u:new X(this);var _=t.apply(u,r);return _.__actions__.push(l),new g(_,n)}return this.thru(h)})}),rr(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Qo:Xo)[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);r.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[e](function(r){return n.apply(r,t)})}}),jr(X.prototype,function(t,n){var e=r[n];if(e){var i=e.name,o=Ru[i]||(Ru[i]=[]);o.push({name:n,func:e})}}),Ru[qn(z,A).name]=[{name:"wrapper",func:z}],X.prototype.clone=rt,X.prototype.reverse=et,X.prototype.value=$t,r.prototype.chain=$e,r.prototype.commit=Fe,r.prototype.concat=ra,r.prototype.plant=He,r.prototype.reverse=Je,r.prototype.toString=Ve,r.prototype.run=r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=Ye,r.prototype.collect=r.prototype.map,r.prototype.head=r.prototype.first,r.prototype.select=r.prototype.filter,r.prototype.tail=r.prototype.rest,r}var z,E="3.10.1",M=1,A=2,k=4,O=8,j=16,q=32,D=64,R=128,L=256,U=30,T="...",B=150,W=16,C=200,K=1,P=2,N="Expected a function",$="__lodash_placeholder__",F="[object Arguments]",H="[object Array]",J="[object Boolean]",V="[object Date]",Y="[object Error]",Z="[object Function]",X="[object Map]",G="[object Number]",Q="[object Object]",tt="[object RegExp]",rt="[object Set]",nt="[object String]",et="[object WeakMap]",it="[object ArrayBuffer]",ot="[object Float32Array]",ut="[object Float64Array]",at="[object Int8Array]",st="[object Int16Array]",ft="[object Int32Array]",ct="[object Uint8Array]",ht="[object Uint8ClampedArray]",lt="[object Uint16Array]",pt="[object Uint32Array]",_t=/\b__p \+= '';/g,vt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39|#96);/g,gt=/[&<>"'`]/g,mt=RegExp(dt.source),wt=RegExp(gt.source),bt=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,St=/<%=([\s\S]+?)%>/g,xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Mt=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,At=RegExp(Mt.source),kt=/[\u0300-\u036f\ufe20-\ufe23]/g,Ot=/\\(\\)?/g,jt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qt=/\w*$/,Dt=/^0[xX]/,Rt=/^\[object .+?Constructor\]$/,Lt=/^\d+$/,Ut=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Tt=/($^)/,Bt=/['\n\r\u2028\u2029\\]/g,Wt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",r="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+r+")|"+t+"?"+r+"|"+t+"+|[0-9]+","g")}(),Ct=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Kt=-1,Pt={};Pt[ot]=Pt[ut]=Pt[at]=Pt[st]=Pt[ft]=Pt[ct]=Pt[ht]=Pt[lt]=Pt[pt]=!0,Pt[F]=Pt[H]=Pt[it]=Pt[J]=Pt[V]=Pt[Y]=Pt[Z]=Pt[X]=Pt[G]=Pt[Q]=Pt[tt]=Pt[rt]=Pt[nt]=Pt[et]=!1;var Nt={};Nt[F]=Nt[H]=Nt[it]=Nt[J]=Nt[V]=Nt[ot]=Nt[ut]=Nt[at]=Nt[st]=Nt[ft]=Nt[G]=Nt[Q]=Nt[tt]=Nt[nt]=Nt[ct]=Nt[ht]=Nt[lt]=Nt[pt]=!0,Nt[Y]=Nt[Z]=Nt[X]=Nt[rt]=Nt[et]=!1;var $t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ft={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Jt={"function":!0,object:!0},Vt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zt=Jt[typeof n]&&n&&!n.nodeType&&n,Xt=Jt[typeof r]&&r&&!r.nodeType&&r,Gt=Zt&&Xt&&"object"==typeof t&&t&&t.Object&&t,Qt=Jt[typeof self]&&self&&self.Object&&self,tr=Jt[typeof window]&&window&&window.Object&&window,rr=Xt&&Xt.exports===Zt&&Zt,nr=Gt||tr!==(this&&this.window)&&tr||Qt||this,er=x();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nr._=er,define(function(){return er})):Zt&&Xt?rr?(Xt.exports=er)._=er:Zt._=er:nr._=er}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,r,n){"use strict";function e(t){return p.Set(l.flatten(l.map(l.range(t),function(r){return l.map(l.zip(l.range(t),l.fill(Array(t),r)),p.List)})))}function i(t){return e(t.get(d)).subtract(t.keys())}function o(t,r){var n=function(t){return t+1},e=function(t){return t-1},i=t.get(d),o=r.first(),u=r.last(),a=l.compose(l.curry(Math.min,2)(i-1),l.curry(Math.max,2)(0));return p.Set([[l.identity,n],[l.identity,e],[n,l.identity],[e,l.identity]].map(function(t){var r=h(t,2),n=r[0],e=r[1];return p.List.of(a(n(o)),a(e(u)))})).subtract(p.Set.of(r))}function u(t,r,n){return void 0===n&&(n=t.get(r,y)),o(t,r).filter(function(r){return t.get(r,y)===n})}function a(t,r){for(var n=p.Set(),e=p.Set.of(r);!e.isEmpty();){var i=e.first(),o=u(t,r);e=e.rest().union(o.subtract(n)),n=n.add(i)}return n}function s(t,r){return a(t,r).reduce(function(r,n){return r.union(u(t,n,y))},p.Set()).size}function f(t){if(t!==_&&t!==v)throw"Must pass in a color";return t===_?v:_}function c(t,r,n){var e=s(t.set(r,n),r)>0,i=u(t,r,f(n)).some(function(r){return 1===s(t,r)});return e||i}Object.defineProperty(n,"__esModule",{value:!0});var h=function(){function t(t,r){var n=[],e=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(e=(u=a.next()).done)&&(n.push(u.value),!r||n.length!==r);e=!0);}catch(s){i=!0,o=s}finally{try{!e&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();n.allPossibleMoves=e,n.emptyPositions=i,n.adjacentPositions=o,n.matchingAdjacentPositions=u,n.group=a,n.liberties=s,n.oppositeColor=f,n.isLegalMove=c;var l=t("lodash"),p=t("immutable"),_="black";n.BLACK=_;var v="white";n.WHITE=v;var y=null;n.EMPTY=y;var d="size";n.SIZE_KEY=d,n["default"]={isLegalMove:c,oppositeColor:f,liberties:s,group:a}},{immutable:1,lodash:2}],4:[function(t,r,n){"use strict";function e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t){return u.Map.isMap(t)&&a.isPositiveInteger(t.get(s.SIZE_KEY,0))}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,r){for(var n=0;nn;n++)r[n]=arguments[n];return new(i.apply(u.Board,[null].concat(r)))}Object.defineProperty(n,"__esModule",{value:!0});var i=Function.prototype.bind,o=t("./analysis"),u=t("./board"),a=t("./position");e.prototype=u.Board.prototype,n["default"]={Board:e,position:a.position,isValidPosition:a.isValidPosition,BLACK:o.BLACK,WHITE:o.WHITE},r.exports=n["default"]},{"./analysis":3,"./board":4,"./position":7}],7:[function(t,r,n){"use strict";function e(t,r){var n=0===t||s.isPositiveInteger(t),e=0===r||s.isPositiveInteger(r);if(!n||!e)throw TypeError("Both passed arguments must be integers greater than or equal to 0");return a.List.of(t,r)}function i(t,r){return o(t)&&t.every(function(t){return r>t})}function o(t){return a.List.isList(t)&&2===t.size&&t.every(s.isPositiveInteger)}function u(t){var r=a.Set(t);if(!r.every(o))throw TypeError("Must pass an iterable of positions, Immutable.List types of length 2, containing non-negative integers");return r}Object.defineProperty(n,"__esModule",{value:!0}),n.position=e,n.isValidPosition=i,n.positions=u;var a=t("immutable"),s=t("./utils")},{"./utils":9,immutable:1}],8:[function(t,r,n){"use strict";function e(t){if(!s.isNumber(t)||0>=t||t!==parseInt(t))throw"An empty board must be created from a positive integer.";return f.Map().set(c.SIZE_KEY,t)}function i(t,r,n){if(!c.isLegalMove(t,r,n))throw"Not a valid position";if(t.has(r))throw"There is already a stone there";var e=c.matchingAdjacentPositions(t,r,c.oppositeColor(n)).reduce(function(r,n){return r.union(1===c.liberties(t,n)?c.group(t,n):f.Set())},f.Set());return a(t,e).set(r,n)}function o(t,r){return i(t,r,c.BLACK)}function u(t,r){return i(t,r,c.WHITE)}function a(t,r){return r.reduce(function(t,r){return t["delete"](r)},t)}Object.defineProperty(n,"__esModule",{value:!0}),n.emptyBoard=e,n.addMove=i,n.addBlackMove=o,n.addWhiteMove=u,n.removeMoves=a;var s=t("lodash"),f=t("immutable"),c=t("./analysis");n["default"]={emptyBoard:e,addBlackMove:o,addWhiteMove:u,removeMoves:a}},{"./analysis":3,immutable:1,lodash:2}],9:[function(t,r,n){"use strict";function e(t){return i.isNumber(t)&&t===parseInt(t)&&t>0}Object.defineProperty(n,"__esModule",{value:!0}),n.isPositiveInteger=e;var i=t("lodash")},{lodash:2}]},{},[5]); \ No newline at end of file +e|=q}return Tn(t,e,r,n,i)}),da=di(function(t,r){r=r.length?kr(r):Zi(t);for(var n=-1,e=r.length;++n0||0>r)?new X(n):(0>t?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==z&&(r=+r||0,n=0>r?n.dropRight(-r):n.take(r-t)),n)},X.prototype.takeRightWhile=function(t,r){return this.reverse().takeWhile(t,r).reverse()},X.prototype.toArray=function(){return this.take(Au)},jr(X.prototype,function(t,n){var e=/^(?:filter|map|reject)|While$/.test(n),i=/^(?:first|last)$/.test(n),o=r[i?"take"+("last"==n?"Right":""):n];o&&(r.prototype[n]=function(){var r=i?[1]:arguments,n=this.__chain__,u=this.__wrapped__,a=!!this.__actions__.length,s=u instanceof X,f=r[0],c=s||ka(u);c&&e&&"function"==typeof f&&1!=f.length&&(s=c=!1);var h=function(t){return i&&n?o(t,1)[0]:o.apply(z,fr([t],r))},l={func:Ne,args:[h],thisArg:z},p=s&&!a;if(i&&!n)return p?(u=u.clone(),u.__actions__.push(l),t.call(u)):o.call(z,this.value())[0];if(!i&&c){u=p?u:new X(this);var _=t.apply(u,r);return _.__actions__.push(l),new g(_,n)}return this.thru(h)})}),rr(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Qo:Xo)[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);r.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[e](function(r){return n.apply(r,t)})}}),jr(X.prototype,function(t,n){var e=r[n];if(e){var i=e.name,o=Ru[i]||(Ru[i]=[]);o.push({name:n,func:e})}}),Ru[qn(z,A).name]=[{name:"wrapper",func:z}],X.prototype.clone=rt,X.prototype.reverse=et,X.prototype.value=$t,r.prototype.chain=$e,r.prototype.commit=Fe,r.prototype.concat=ra,r.prototype.plant=He,r.prototype.reverse=Je,r.prototype.toString=Ve,r.prototype.run=r.prototype.toJSON=r.prototype.valueOf=r.prototype.value=Ye,r.prototype.collect=r.prototype.map,r.prototype.head=r.prototype.first,r.prototype.select=r.prototype.filter,r.prototype.tail=r.prototype.rest,r}var z,E="3.10.1",M=1,A=2,k=4,O=8,j=16,q=32,D=64,R=128,L=256,U=30,T="...",B=150,W=16,C=200,K=1,P=2,N="Expected a function",$="__lodash_placeholder__",F="[object Arguments]",H="[object Array]",J="[object Boolean]",V="[object Date]",Y="[object Error]",Z="[object Function]",X="[object Map]",G="[object Number]",Q="[object Object]",tt="[object RegExp]",rt="[object Set]",nt="[object String]",et="[object WeakMap]",it="[object ArrayBuffer]",ot="[object Float32Array]",ut="[object Float64Array]",at="[object Int8Array]",st="[object Int16Array]",ft="[object Int32Array]",ct="[object Uint8Array]",ht="[object Uint8ClampedArray]",lt="[object Uint16Array]",pt="[object Uint32Array]",_t=/\b__p \+= '';/g,vt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39|#96);/g,gt=/[&<>"'`]/g,mt=RegExp(dt.source),wt=RegExp(gt.source),bt=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,St=/<%=([\s\S]+?)%>/g,xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Mt=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,At=RegExp(Mt.source),kt=/[\u0300-\u036f\ufe20-\ufe23]/g,Ot=/\\(\\)?/g,jt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qt=/\w*$/,Dt=/^0[xX]/,Rt=/^\[object .+?Constructor\]$/,Lt=/^\d+$/,Ut=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Tt=/($^)/,Bt=/['\n\r\u2028\u2029\\]/g,Wt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",r="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+r+")|"+t+"?"+r+"|"+t+"+|[0-9]+","g")}(),Ct=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Kt=-1,Pt={};Pt[ot]=Pt[ut]=Pt[at]=Pt[st]=Pt[ft]=Pt[ct]=Pt[ht]=Pt[lt]=Pt[pt]=!0,Pt[F]=Pt[H]=Pt[it]=Pt[J]=Pt[V]=Pt[Y]=Pt[Z]=Pt[X]=Pt[G]=Pt[Q]=Pt[tt]=Pt[rt]=Pt[nt]=Pt[et]=!1;var Nt={};Nt[F]=Nt[H]=Nt[it]=Nt[J]=Nt[V]=Nt[ot]=Nt[ut]=Nt[at]=Nt[st]=Nt[ft]=Nt[G]=Nt[Q]=Nt[tt]=Nt[nt]=Nt[ct]=Nt[ht]=Nt[lt]=Nt[pt]=!0,Nt[Y]=Nt[Z]=Nt[X]=Nt[rt]=Nt[et]=!1;var $t={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ft={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Jt={"function":!0,object:!0},Vt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Zt=Jt[typeof n]&&n&&!n.nodeType&&n,Xt=Jt[typeof r]&&r&&!r.nodeType&&r,Gt=Zt&&Xt&&"object"==typeof t&&t&&t.Object&&t,Qt=Jt[typeof self]&&self&&self.Object&&self,tr=Jt[typeof window]&&window&&window.Object&&window,rr=Xt&&Xt.exports===Zt&&Zt,nr=Gt||tr!==(this&&this.window)&&tr||Qt||this,er=x();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nr._=er,define(function(){return er})):Zt&&Xt?rr?(Xt.exports=er)._=er:Zt._=er:nr._=er}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,r,n){"use strict";function e(t){return _.Set(p.flatten(p.map(p.range(t),function(r){return p.map(p.zip(p.range(t),p.fill(Array(t),r)),_.List)})))}function i(t){return e(t.get(g)).subtract(t.keys())}function o(t,r){var n=function(t){return t+1},e=function(t){return t-1},i=t.get(g),o=r.first(),u=r.last(),a=p.compose(p.curry(Math.min,2)(i-1),p.curry(Math.max,2)(0));return _.Set([[p.identity,n],[p.identity,e],[n,p.identity],[e,p.identity]].map(function(t){var r=l(t,2),n=r[0],e=r[1];return _.List.of(a(n(o)),a(e(u)))})).subtract(_.Set.of(r))}function u(t,r,n){return void 0===n&&(n=t.get(r,d)),o(t,r).filter(function(r){return t.get(r,d)===n})}function a(t,r){for(var n=_.Set(),e=_.Set.of(r);!e.isEmpty();){var i=e.first(),o=u(t,i);n=n.add(i),e=e.rest().union(o.subtract(n))}return n}function s(t,r){return a(t,r).reduce(function(r,n){return r.union(u(t,n,d))},_.Set()).size}function f(t){if(t!==v&&t!==y)throw"Must pass in a color";return t===v?y:v}function c(t,r,n){var e=s(t.set(r,n),r)>0,i=u(t,r,f(n)).some(function(r){return 1===s(t,r)});return e||i}function h(t){for(var r=t.get(g),n="",e=0;r>e;e++){for(var i=0;r>i;i++){var o=t.get(_.List.of(e,i),d);switch(o){case v:n+="O";break;case y:n+="X";break;case d:n+="+"}}n+="\n"}return n}Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function t(t,r){var n=[],e=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(e=(u=a.next()).done)&&(n.push(u.value),!r||n.length!==r);e=!0);}catch(s){i=!0,o=s}finally{try{!e&&a["return"]&&a["return"]()}finally{if(i)throw o}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return t(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();n.allPossibleMoves=e,n.emptyPositions=i,n.adjacentPositions=o,n.matchingAdjacentPositions=u,n.group=a,n.liberties=s,n.oppositeColor=f,n.isLegalMove=c,n.prettyString=h;var p=t("lodash"),_=t("immutable"),v="black";n.BLACK=v;var y="white";n.WHITE=y;var d=null;n.EMPTY=d;var g="size";n.SIZE_KEY=g,n["default"]={isLegalMove:c,oppositeColor:f,liberties:s,group:a}},{immutable:1,lodash:2}],4:[function(t,r,n){"use strict";function e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t){return u.Map.isMap(t)&&a.isPositiveInteger(t.get(s.SIZE_KEY,0))}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,r){for(var n=0;nn;n++)r[n]=arguments[n];return new(i.apply(u.Board,[null].concat(r)))}Object.defineProperty(n,"__esModule",{value:!0});var i=Function.prototype.bind,o=t("./analysis"),u=t("./board"),a=t("./position");e.prototype=u.Board.prototype,n["default"]={Board:e,position:a.position,isValidPosition:a.isValidPosition,BLACK:o.BLACK,WHITE:o.WHITE},r.exports=n["default"]},{"./analysis":3,"./board":4,"./position":7}],7:[function(t,r,n){"use strict";function e(t,r){var n=0===t||s.isPositiveInteger(t),e=0===r||s.isPositiveInteger(r);if(!n||!e)throw TypeError("Both passed arguments must be integers greater than or equal to 0");return a.List.of(t,r)}function i(t,r){return o(t)&&t.every(function(t){return r>t})}function o(t){return a.List.isList(t)&&2===t.size&&t.every(s.isPositiveInteger)}function u(t){var r=a.Set(t);if(!r.every(o))throw TypeError("Must pass an iterable of positions, Immutable.List types of length 2, containing non-negative integers");return r}Object.defineProperty(n,"__esModule",{value:!0}),n.position=e,n.isValidPosition=i,n.positions=u;var a=t("immutable"),s=t("./utils")},{"./utils":9,immutable:1}],8:[function(t,r,n){"use strict";function e(t){if(!s.isNumber(t)||0>=t||t!==parseInt(t))throw"An empty board must be created from a positive integer.";return f.Map().set(c.SIZE_KEY,t)}function i(t,r,n){if(!c.isLegalMove(t,r,n))throw"Not a valid position";if(t.has(r))throw"There is already a stone there";var e=c.matchingAdjacentPositions(t,r,c.oppositeColor(n)).reduce(function(r,n){return r.union(1===c.liberties(t,n)?c.group(t,n):f.Set())},f.Set());return a(t,e).set(r,n)}function o(t,r){return i(t,r,c.BLACK)}function u(t,r){return i(t,r,c.WHITE)}function a(t,r){return r.reduce(function(t,r){return t["delete"](r)},t)}Object.defineProperty(n,"__esModule",{value:!0}),n.emptyBoard=e,n.addMove=i,n.addBlackMove=o,n.addWhiteMove=u,n.removeMoves=a;var s=t("lodash"),f=t("immutable"),c=t("./analysis");n["default"]={emptyBoard:e,addBlackMove:o,addWhiteMove:u,removeMoves:a}},{"./analysis":3,immutable:1,lodash:2}],9:[function(t,r,n){"use strict";function e(t){return i.isNumber(t)&&t===parseInt(t)&&t>0}Object.defineProperty(n,"__esModule",{value:!0}),n.isPositiveInteger=e;var i=t("lodash")},{lodash:2}]},{},[5]); \ No newline at end of file