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

immutable

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

6

dist/immutable.d.ts

@@ -1340,2 +1340,8 @@ /**

*
* If any of the values provided to `merge` are not Iterable (would return
* false for `Immutable.isIterable`) then they are deeply converted via
* `Immutable.fromJS` before being merged. However, if the value is an
* Iterable but contains non-iterable JS objects or arrays, those nested
* values will be preserved.
*
* var x = Immutable.Map({a: 10, b: 20, c: 30});

@@ -1342,0 +1348,0 @@ * var y = Immutable.Map({b: 40, a: 50, d: 60});

50

dist/immutable.min.js

@@ -9,26 +9,26 @@ /**

*/
function t(){function t(t,e,r,n){var i;if(n){var s=n.prototype;i=nr.create(s)}else i=t.prototype;return nr.keys(e).forEach(function(t){i[t]=e[t]}),nr.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return nr.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t&&"function"==typeof t.equals?t.equals(e):!1}function i(t,e){if(!t)throw Error(e)}function s(t){return t.value=!1,t}function u(t){t&&(t.value=!0)}function a(){}function o(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function h(t){i(1/0!==t,"Cannot perform this action with an infinite size.")}function c(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function f(t,e){return e>=0?e:c(t)+e}function _(){return!0}function l(t){return t&&t.constructor===Object}function v(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function p(t,e){return g(t,e,0)}function d(t,e){return g(t,e,e)}function g(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function y(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&vr;t=""+t,e="string"}return"string"===e?t.length>gr?m(t):w(t):t.hashCode?y("function"==typeof t.hashCode?t.hashCode():t.hashCode):S(t)}function m(t){var e=wr[t];return void 0===e&&(e=w(t),mr===yr&&(mr=0,wr={}),mr++,wr[t]=e),e}function w(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&vr;return e}function S(t){var e=lr&&lr.get(t);if(e)return e;if(e=t[dr])return e;if(!_r){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[dr])return e;if(e=z(t))return e}if(Object.isExtensible&&!Object.isExtensible(t))throw Error("Non-extensible objects are not allowed as keys.");if(e=++pr&vr,lr)lr.set(t,e);else if(_r)Object.defineProperty(t,dr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)
},t.propertyIsEnumerable[dr]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[dr]=e}return e}function z(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function I(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function b(){return{value:void 0,done:!0}}function q(t){return!!D(t)}function x(t){return t&&"function"==typeof t.next}function M(t){var e=D(t);return e&&e.call(t)}function D(t){var e=t&&(qr&&t[qr]||t[br]);return"function"==typeof e?e:void 0}function E(t){return!(!t||!t[Or])}function k(t){return!(!t||!t[Cr])}function O(t){return!(!t||!t[Ar])}function C(t){return k(t)||O(t)}function A(t){return t}function R(t,e){return e}function j(t,e){return[e,t]}function U(t){return function(){return!t.apply(this,arguments)}}function K(t){return"string"==typeof t?JSON.stringify(t):t}function L(t,e){return t>e?1:e>t?-1:0}function B(t,e){var r=t.prototype;return Object.keys(e).forEach(function(t){r[t]=e[t]}),t}function T(t){return!(!t||!t[Qr])}function W(){return Zr||(Zr=new Xr([]))}function J(t,e){var r=e&&"string"==typeof t?new Xr([t]):P(t)?new Xr(t):x(t)?new Hr(t):q(t)?new Gr(t):(e?l(t):"object"==typeof t)?new Fr(t):e?new Xr([t]):void 0;if(!r)throw new TypeError("Expected iterable: "+t);return r}function P(t){return t&&"number"==typeof t.length}function N(t,e,r,n){h(t.size);var i=t._cache;if(i){for(var s=i.length-1,u=0;s>=u;u++){var a=i[r?s-u:u];if(e(a[1],n?a[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function V(t,e,r,n){var i=t._cache;if(i){var s=i.length-1,u=0;return new Mr(function(){var t=i[r?s-u:u];return u++>s?b():I(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function Y(t){return!(!t||!t[hn])}function Q(t,e){return I(t,e[0],e[1])}function X(t,e){return{node:t,index:0,__prev:e}}function F(t,e,r,n){var i=Object.create(cn);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function G(){return wn||(wn=F(0))}function H(t,e,r){var n=s(cr),i=s(fr),u=Z(t._root,t.__ownerID,0,y(e),e,r,n,i);
if(!i.value)return t;var a=t.size+(n.value?r===hr?-1:1:0);return t.__ownerID?(t.size=a,t._root=u,t.__hash=void 0,t.__altered=!0,t):u?F(a,u):G()}function Z(t,e,r,n,i,s,a,o){return t?t.update(e,r,n,i,s,a,o):s===hr?t:(u(o),u(a),new gn(e,n,[i,s]))}function $(t){return t.constructor===gn||t.constructor===pn}function te(t,e,r,n,i){if(t.hash===n)return new pn(e,n,[t.entry,i]);var s,u=(0===r?t.hash:t.hash>>>r)&or,a=(0===r?n:n>>>r)&or,o=u===a?[te(t,e,r+ur,n,i)]:(s=new gn(e,n,i),a>u?[t,s]:[s,t]);return new fn(e,1<<u|1<<a,o)}function ee(t,e,r,n){for(var i=0,s=0,u=Array(r),a=0,o=1,h=e.length;h>a;a++,o<<=1){var c=e[a];void 0!==c&&a!==n&&(i|=o,u[s++]=c)}return new fn(t,i,u)}function re(t,e,r,n,i){for(var s=0,u=Array(ar),a=0;0!==r;a++,r>>>=1)u[a]=1&r?e[s++]:void 0;return u[n]=i,new ln(t,s+1,u)}function ne(t,e,r){for(var n=[],i=0;r.length>i;i++)r[i]&&n.push(jr(r[i]));return se(t,e,n)}function ie(t){return function(e,r){return e&&e.mergeDeepWith?e.mergeDeepWith(t,r):t?t(e,r):r}}function se(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){var i=t.get(n,hr);t.set(n,i===hr?r:e(i,r))}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function ue(t,e,r,n,s){i(!t||t.set,"updateIn with invalid keyPath");var u=e[s],a=t?t.get(u,hr):hr,o=a===hr?void 0:a,h=s===e.length-1?n(a===hr?r:a):ue(o,e,r,n,s+1);return h===o?t:h===hr?t&&t.remove(u):(t||G()).set(u,h)}function ae(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function oe(t,e,r,n){var i=n?t:o(t);return i[e]=r,i}function he(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var s=Array(i),u=0,a=0;i>a;a++)a===e?(s[a]=r,u=-1):s[a]=t[a+u];return s}function ce(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),s=0,u=0;n>u;u++)u===e&&(s=1),i[u]=t[u+s];return i}function fe(t){var e=Ee(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)
},e.contains=function(e){return t.has(e)},e.cacheResult=ke,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Ir){var n=t.__iterator(e,r);return new Mr(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===zr?Sr:zr,r)},e}function _e(t,e,r){var n=Ee(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var s=t.get(n,hr);return s===hr?i:e.call(r,s,n,t)},n.__iterateUncached=function(n,i){var s=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,s)!==!1},i)},n.__iteratorUncached=function(n,i){var s=t.__iterator(Ir,i);return new Mr(function(){var i=s.next();if(i.done)return i;var u=i.value,a=u[0];return I(n,a,e.call(r,u[1],a,t),i)})},n}function le(t,e){var r=Ee(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=fe(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=ke,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function ve(t,e,r,n){var i=Ee(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var s=t.get(n,hr);return s!==hr&&e.call(r,s,n,t)?s:i}),i.__iterateUncached=function(i,s){var u=this,a=0;return t.__iterate(function(t,s,o){return e.call(r,t,s,o)?(a++,i(t,n?s:a-1,u)):void 0},s),a},i.__iteratorUncached=function(i,s){var u=t.__iterator(Ir,s),a=0;return new Mr(function(){for(;;){var s=u.next();if(s.done)return s;var o=s.value,h=o[0],c=o[1];if(e.call(r,c,h,t))return I(i,n?h:a++,c,s)}})},i}function pe(t,e,r){var n=an().asMutable();return t.__iterate(function(i,s){n.update(e.call(r,i,s,t),0,function(t){return t+1})}),n.asImmutable()}function de(t,e,r){var n=k(t),i=an().asMutable();
t.__iterate(function(s,u){i.update(e.call(r,s,u,t),[],function(t){return t.push(n?[u,s]:s),t})});var s=De(t);return i.map(function(e){return qe(t,s(e))})}function ge(t,e){if(e>t.size)return t;0>e&&(e=0);var r=Ee(t);return r.size=t.size&&Math.min(t.size,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var s=0;return t.__iterate(function(t,n){return++s&&r(t,n,i)!==!1&&e>s}),s},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),s=0;return new Mr(function(){return s++>e?b():i.next()})},r}function ye(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){var s=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++u&&n(t,i,s)}),u},n.__iteratorUncached=function(n,i){var s=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(Ir,i),a=!0;return new Mr(function(){if(!a)return b();var t=u.next();if(t.done)return t;var i=t.value,o=i[0],h=i[1];return e.call(r,h,o,s)?n===Ir?t:I(n,o,h,t):(a=!1,b())})},n}function me(t,e,r){if(0>=e)return t;var n=Ee(t);return n.size=t.size&&Math.max(0,t.size-e),n.__iterateUncached=function(n,i){var s=this;if(i)return this.cacheResult().__iterate(n,i);var u=0,a=!0,o=0;return t.__iterate(function(t,i){return a&&(a=u++<e)?void 0:(o++,n(t,r?i:o-1,s))}),o},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var s=e&&t.__iterator(n,i),u=0,a=0;return new Mr(function(){for(;e>u;)u++,s.next();var t=s.next();return r||n===zr?t:n===Sr?I(n,a++,void 0,t):I(n,a++,t.value[1],t)})},n}function we(t,e,r,n){var i=Ee(t);return i.__iterateUncached=function(i,s){var u=this;if(s)return this.cacheResult().__iterate(i,s);var a=!0,o=0;return t.__iterate(function(t,s,h){return a&&(a=e.call(r,t,s,h))?void 0:(o++,i(t,n?s:o-1,u))}),o},i.__iteratorUncached=function(i,s){var u=this;if(s)return this.cacheResult().__iterator(i,s);var a=t.__iterator(Ir,s),o=!0,h=0;return new Mr(function(){var t,s,c;
do{if(t=a.next(),t.done)return n||i===zr?t:i===Sr?I(i,h++,void 0,t):I(i,h++,t.value[1],t);var f=t.value;s=f[0],c=f[1],o&&(o=e.call(r,c,s,u))}while(o);return i===Ir?t:I(i,s,c,t)})},i}function Se(t,e){var r=k(t),n=new Xr([t].concat(e)).map(function(t){return E(t)||(t=J(t,!0)),r&&(t=jr(t)),t});r?n=n.toKeyedSeq():O(t)||(n=n.toSetSeq());var i=n.flatten(!0);return i.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),i}function ze(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){function s(t,o){var h=this;t.__iterate(function(t,i){return(!e||e>o)&&E(t)?s(t,o+1):n(t,r?i:u++,h)===!1&&(a=!0),!a},i)}var u=0,a=!1;return s(t,0),u},n.__iteratorUncached=function(n,i){var s=t.__iterator(n,i),u=[],a=0;return new Mr(function(){for(;s;){var t=s.next();if(t.done===!1){var o=t.value;if(n===Ir&&(o=o[1]),e&&!(e>u.length)||!E(o))return r?t:I(n,a++,o,t);u.push(s),s=o.__iterator(n,i)}else s=u.pop()}return b()})},n}function Ie(t,e,r){var n=De(t);return t.toSeq().map(function(i,s){return n(e.call(r,i,s,t))}).flatten(!0)}function be(t,e){var r=Ee(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,s=0;return t.__iterate(function(t){return(!s||r(e,s++,i)!==!1)&&r(t,s++,i)!==!1},n),s},r.__iteratorUncached=function(r,n){var i,s=t.__iterator(zr,n),u=0;return new Mr(function(){return(!i||u%2)&&(i=s.next(),i.done)?i:u%2?I(r,u++,e):I(r,u++,i.value,i)})},r}function qe(t,e){return T(t)?e:t.constructor(e)}function xe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Me(t){return h(t.size),c(t)}function De(t){return k(t)?jr:O(t)?Kr:Lr}function Ee(t){return Object.create((k(t)?Wr:O(t)?Pr:Vr).prototype)}function ke(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Br.prototype.cacheResult.call(this)}function Oe(t){return!(!t||!t[En])}function Ce(t,e,r,n,i,s){var u,a=t&&t.array;if(0===e){var o=0>r?-r:0,h=n-r;for(h>ar&&(h=ar),u=o;h>u;u++)if(i(a&&a[s?o+h-1-u:u])===!1)return!1}else{var c=1<<e,f=e-ur;for(u=0;or>=u;u++){var _=s?or-u:u,l=r+(_<<e);
if(n>l&&l+c>0){var v=a&&a[_];if(!Ce(v,f,l,n,i,s))return!1}}}return!0}function Ae(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,rawMax:n-r>>e,index:0,__prev:i}}function Re(t,e,r,n,i,s,u){var a=Object.create(kn);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=s,a.__hash=u,a.__altered=!1,a}function je(){return Rn||(Rn=Re(0,0,ur))}function Ue(t,e,r){if(e=f(t,e),e>=t.size||0>e)return t.withMutations(function(t){0>e?Te(t,e).set(0,r):Te(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,u=s(fr);return e>=Je(t._capacity)?n=Ke(n,t.__ownerID,0,e,r,u):i=Ke(i,t.__ownerID,t._level,e,r,u),u.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Re(t._origin,t._capacity,t._level,i,n):t}function Ke(t,e,r,n,i,s){var a=n>>>r&or,o=t&&t.array.length>a;if(!o&&void 0===i)return t;var h;if(r>0){var c=t&&t.array[a],f=Ke(c,e,r-ur,n,i,s);return f===c?t:(h=Le(t,e),h.array[a]=f,h)}return o&&t.array[a]===i?t:(u(s),h=Le(t,e),void 0===i&&a===h.array.length-1?h.array.pop():h.array[a]=i,h)}function Le(t,e){return e&&t&&e===t.ownerID?t:new On(t?t.array.slice():[],e)}function Be(t,e){if(e>=Je(t._capacity))return t._tail;if(1<<t._level+ur>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&or],n-=ur;return r}}function Te(t,e,r){var n=t.__ownerID||new a,i=t._origin,s=t._capacity,u=i+e,o=void 0===r?s:0>r?s+r:i+r;if(u===i&&o===s)return t;if(u>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>u+f;)c=new On(c&&c.array.length?[void 0,c]:[],n),h+=ur,f+=1<<h;f&&(u+=f,i+=f,o+=f,s+=f);for(var _=Je(s),l=Je(o);l>=1<<h+ur;)c=new On(c&&c.array.length?[c]:[],n),h+=ur;var v=t._tail,p=_>l?Be(t,o-1):l>_?new On([],n):v;if(v&&l>_&&s>u&&v.array.length){c=Le(c,n);for(var d=c,g=h;g>ur;g-=ur){var y=_>>>g&or;d=d.array[y]=Le(d.array[y],n)}d.array[_>>>ur&or]=v}if(s>o&&(p=p&&p.removeAfter(n,0,o)),u>=l)u-=l,o-=l,h=ur,c=null,p=p&&p.removeBefore(n,0,u);else if(u>i||_>l){for(f=0;c;){var m=u>>>h&or;if(m!==l>>>h&or)break;m&&(f+=(1<<h)*m),h-=ur,c=c.array[m]}c&&u>i&&(c=c.removeBefore(n,h,u-f)),c&&_>l&&(c=c.removeAfter(n,h,l-f)),f&&(u-=f,o-=f)
}return t.__ownerID?(t.size=o-u,t._origin=u,t._capacity=o,t._level=h,t._root=c,t._tail=p,t.__hash=void 0,t.__altered=!0,t):Re(u,o,h,c,p)}function We(t,e,r){for(var n=[],i=0;r.length>i;i++){var s=r[i];s&&n.push(Er(s))}var u=Math.max.apply(Math,n.map(function(t){return t.size||0}));return u>t.size&&(t=t.setSize(u)),se(t,e,n)}function Je(t){return ar>t?0:t-1>>>ur<<ur}function Pe(t){return!(!t||!t[Kn])}function Ne(t,e,r,n){var i=Object.create(Ln);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ve(){return Bn||(Bn=Ne(0))}function Ye(t){return!(!t||!t[Jn])}function Qe(t,e){var r=Object.create(Pn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Xe(){return Nn||(Nn=Qe(G()))}function Fe(t){return!(!t||!t[Qn])}function Ge(t,e,r,n){var i=Object.create(Vn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function He(){return Xn||(Xn=Ge(G(),je()))}function Ze(t,e,r){var n=t._map,i=t._list,s=n.get(e),u=void 0!==s,a=r===hr;if(!u&&a||u&&r===i.get(s)[1])return t;u||(s=i.size);var o=a?n.remove(e):u?n:n.set(e,s),h=a?i.remove(s):i.set(s,[e,r]);return t.__ownerID?(t.size=o.size,t._map=o,t._list=h,t.__hash=void 0,t):Ge(o,h)}function $e(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function tr(t,e){return e?er(e,t,"",{"":t}):rr(t)}function er(t,e,r,n){return Array.isArray(e)||l(e)?t.call(n,r,Er(e).map(function(r,n){return er(t,r,n,e)})):e}function rr(t){if(t&&"object"==typeof t){if(Array.isArray(t))return Er(t).map(rr).toList();if(t.constructor===Object)return Er(t).map(rr).toMap()}return t}var nr=Object,ir={};ir.createClass=t,ir.superCall=e,ir.defaultSuperCall=r;var sr="delete",ur=5,ar=1<<ur,or=ar-1,hr={},cr={value:!1},fr={value:!1},_r=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),lr="function"==typeof WeakMap&&new WeakMap,vr=2147483647,pr=0,dr="__immutablehash__";"function"==typeof Symbol&&(dr=Symbol(dr));var gr=16,yr=255,mr=0,wr={},Sr=0,zr=1,Ir=2,br="@@iterator",qr="function"==typeof Symbol&&Symbol.iterator,xr=qr||br,Mr=function(t){this.next=t
};ir.createClass(Mr,{toString:function(){return"[Iterator]"}},{}),Mr.KEYS=Sr,Mr.VALUES=zr,Mr.ENTRIES=Ir;var Dr=Mr.prototype;Dr.inspect=Dr.toSource=function(){return""+this},Dr[xr]=function(){return this};var Er=function(t){return E(t)?t:Br.apply(void 0,arguments)},kr=Er;ir.createClass(Er,{toArray:function(){h(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new bn(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toKeyedSeq:function(){return new In(this,!0)},toMap:function(){return h(this.size),an(this.toKeyedSeq())},toObject:function(){h(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return h(this.size),Vn(this.toKeyedSeq())},toSet:function(){return h(this.size),Tn(this)},toSetSeq:function(){return new qn(this,!0)},toSeq:function(){return O(this)?this.toIndexedSeq():k(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return h(this.size),jn(this)},toList:function(){return h(this.size),Mn(this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return qe(this,Se(this,t,!0))},contains:function(t){return this.some(function(e){return n(e,t)})},entries:function(){return this.__iterator(Ir)},every:function(t,e){var r=!0;return this.__iterate(function(n,i,s){return t.call(e,n,i,s)?void 0:(r=!1,!1)}),r},filter:function(t,e){return qe(this,ve(this,t,e,!0))},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,s){return t.call(e,r,i,s)?(n=r,!1):void 0}),n},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},join:function(t){t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n:""}),e},keys:function(){return this.__iterator(Sr)},map:function(t,e){return qe(this,_e(this,t,e))},reduce:function(t,e,r){var n,i;
return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,s,u){i?(i=!1,n=e):n=t.call(r,n,e,s,u)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return qe(this,le(this,!0))},slice:function(t,e){if(v(t,e,this.size))return this;var r=p(t,this.size),n=d(e,this.size);if(r!==r||n!==n)return this.toSeq().cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return qe(this,void 0===n||n===this.size?i:i.take(n-r))},some:function(t,e){return!this.every(U(t),e)},sort:function(t){return this.sortBy(A,t)},values:function(){return this.__iterator(zr)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return pe(this,t,e)},equals:function(t){if(this===t)return!0;if(!t||"function"!=typeof t.equals)return!1;if(void 0!==this.size&&void 0!==t.size){if(this.size!==t.size)return!1;if(0===this.size&&0===t.size)return!0}return void 0!==this.__hash&&void 0!==t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)},__deepEquals:function(t){var e=this.entries();return"function"==typeof t.every&&t.every(function(t,r){var i=e.next().value;return i&&n(i[0],r)&&n(i[1],t)})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return new Xr(t._cache);var e=t.toSeq().map(j).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(U(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(_)},flatMap:function(t,e){return qe(this,Ie(this,t,e))},flatten:function(t){return qe(this,ze(this,t,!0))},fromEntrySeq:function(){return new xn(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},void 0,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],hr):hr,r===hr)return e;return r},groupBy:function(t,e){return de(this,t,e)},has:function(t){return this.get(t,hr)!==hr},isSubset:function(t){return t="function"==typeof t.contains?t:kr(t),this.every(function(e){return t.contains(e)
})},isSuperset:function(t){return t.isSubset(this)},keySeq:function(){return this.toSeq().map(R).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return this.maxBy(A,t)},maxBy:function(t,e){var r=this;e=e||L;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))>0?i:n});return n&&n[1]},min:function(t){return this.minBy(A,t)},minBy:function(t,e){var r=this;e=e||L;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))<0?i:n});return n&&n[1]},rest:function(){return this.slice(1)},skip:function(t){return qe(this,me(this,t,!0))},skipLast:function(t){return qe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return qe(this,we(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(U(t),e)},sortBy:function(t,e){var r=this;return e=e||L,qe(this,new Xr(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq())},take:function(t){return qe(this,ge(this,t))},takeLast:function(t){return qe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return qe(this,ye(this,t,e))},takeUntil:function(t,e){return this.takeWhile(U(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=1/0===this.size?0:this.reduce(function(t,e,r){return t+(y(e)^(e===r?0:y(r)))&vr},0))}},{});var Or="@@__IMMUTABLE_ITERABLE__@@",Cr="@@__IMMUTABLE_KEYED__@@",Ar="@@__IMMUTABLE_INDEXED__@@",Rr=Er.prototype;Rr[Or]=!0,Rr[xr]=Rr.values,Rr.toJSON=Rr.toJS,Rr.__toJS=Rr.toArray,Rr.__toStringMapper=K,Rr.inspect=Rr.toSource=function(){return""+this},Rr.chain=Rr.flatMap,function(){try{Object.defineProperty(Rr,"length",{get:function(){if(!Er.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size
}}})}catch(t){}}();var jr=function(t){return k(t)?t:Wr.apply(void 0,arguments)};ir.createClass(jr,{flip:function(){return qe(this,fe(this))},findKey:function(t,e){var r;return this.__iterate(function(n,i,s){return t.call(e,n,i,s)?(r=i,!1):void 0}),r},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return n(e,t)})},lastKeyOf:function(t){return this.toSeq().reverse().keyOf(t)},mapEntries:function(t,e){var r=this,n=0;return qe(this,this.toSeq().map(function(i,s){return t.call(e,[s,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return qe(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}},{},Er);var Ur=jr.prototype;Ur[Cr]=!0,Ur[xr]=Rr.entries,Ur.__toJS=Rr.toObject,Ur.__toStringMapper=function(t,e){return e+": "+K(t)};var Kr=function(t){return O(t)?t:Pr.apply(void 0,arguments)};ir.createClass(Kr,{toKeyedSeq:function(){return new In(this,!1)},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return qe(this,Se(this,t,!1))},filter:function(t,e){return qe(this,ve(this,t,e,!1))},findIndex:function(t,e){var r=this.toKeyedSeq().findKey(t,e);return void 0===r?-1:r},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return qe(this,le(this,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=p(t,this.size);var n=this.slice(0,t);return qe(this,1===r?n:n.concat(o(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return qe(this,ze(this,t,!1))},get:function(t,e){return t=f(this,t),0>t||1/0===this.size||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=f(this,t),t>=0&&(void 0!==this.size?1/0===this.size||this.size>t:-1!==this.indexOf(t))
},interpose:function(t){return qe(this,be(this,t))},last:function(){return this.get(-1)},skip:function(t){var e=this,r=me(e,t,!1);return T(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0?e.get(r+t,n):n}),qe(this,r)},skipWhile:function(t,e){return qe(this,we(this,t,e,!1))},sortBy:function(t,e){var r=this;return e=e||L,qe(this,new Xr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq())},take:function(t){var e=this,r=ge(e,t);return T(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0&&t>r?e.get(r,n):n}),qe(this,r)}},{},Er),Kr.prototype[Ar]=!0;var Lr=function(t){return E(t)&&!C(t)?t:Vr.apply(void 0,arguments)};ir.createClass(Lr,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}},{},Er),Lr.prototype.has=Rr.contains,Er.isIterable=E,Er.isKeyed=k,Er.isIndexed=O,Er.isAssociative=C,Er.Keyed=jr,Er.Indexed=Kr,Er.Set=Lr,Er.Iterator=Mr;var Br=function(t){return 0===arguments.length?W():(E(t)?t:J(t,!1)).toSeq()},Tr=Br;ir.createClass(Br,{toSeq:function(){return this},toString:function(){return this.__toString("Seq {","}")},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},__iterate:function(t,e){return N(this,t,e,!0)},__iterator:function(t,e){return V(this,t,e,!0)}},{of:function(){return Tr(arguments)}},Er);var Wr=function(t){return 0===arguments.length?W().toKeyedSeq():(E(t)||(t=J(t,!1)),k(t)?t.toSeq():t.fromEntrySeq())},Jr=Wr;ir.createClass(Wr,{toKeyedSeq:function(){return this},toSeq:function(){return this}},{of:function(){return Jr(arguments)}},Br),B(Wr,jr.prototype);var Pr=function(t){return 0===arguments.length?W():(E(t)?t:J(t,!1)).toIndexedSeq()},Nr=Pr;ir.createClass(Pr,{toIndexedSeq:function(){return this},toString:function(){return this.__toString("Seq [","]")},__iterate:function(t,e){return N(this,t,e,!1)},__iterator:function(t,e){return V(this,t,e,!1)}},{of:function(){return Nr(arguments)
}},Br),B(Pr,Kr.prototype);var Vr=function(t){return 0===arguments.length?W().toSetSeq():(E(t)?t:J(t,!1)).toSetSeq()},Yr=Vr;ir.createClass(Vr,{toSetSeq:function(){return this}},{of:function(){return Yr(arguments)}},Br),B(Vr,Lr.prototype),Br.isSeq=T,Br.Keyed=Wr,Br.Set=Vr,Br.Indexed=Pr;var Qr="@@__IMMUTABLE_SEQ__@@";Br.prototype[Qr]=!0;var Xr=function(t){this._array=t,this.size=t.length};ir.createClass(Xr,{get:function(t,e){return this.has(t)?this._array[f(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new Mr(function(){return i>n?b():I(t,i,r[e?n-i++:i++])})}},{},Pr);var Fr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length};ir.createClass(Fr,{get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,s=0;i>=s;s++){var u=n[e?i-s:s];if(t(r[u],u,this)===!1)return s+1}return s},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,s=0;return new Mr(function(){var u=n[e?i-s:s];return s++>i?b():I(t,u,r[u])})}},{},Wr);var Gr=function(t){this._iterable=t,this.size=t.length||t.size};ir.createClass(Gr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=M(r),i=0;if(x(n))for(var s;!(s=n.next()).done&&t(s.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=M(r);if(!x(n))return new Mr(b);var i=0;return new Mr(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})}},{},Pr);var Hr=function(t){this._iterator=t,this._iteratorCache=[]};ir.createClass(Hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var s;!(s=r.next()).done;){var u=s.value;
if(n[i]=u,t(u,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Mr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})}},{},Pr);var Zr,$r=function(){throw TypeError("Abstract")};ir.createClass($r,{},{},Er);var tn=function(){ir.defaultSuperCall(this,en.prototype,arguments)},en=tn;ir.createClass(tn,{},{},$r),B(tn,jr.prototype);var rn=function(){ir.defaultSuperCall(this,nn.prototype,arguments)},nn=rn;ir.createClass(rn,{},{},$r),B(rn,Kr.prototype);var sn=function(){ir.defaultSuperCall(this,un.prototype,arguments)},un=sn;ir.createClass(sn,{},{},$r),B(sn,Lr.prototype),$r.Keyed=tn,$r.Indexed=rn,$r.Set=sn;var an=function(t){return 0===arguments.length?G():t&&t.constructor===on?t:G().merge(t)},on=an;ir.createClass(an,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,y(t),t,e):e},set:function(t,e){return H(this,t,e)},setIn:function(t,e){return i(t.length>0,"Requires non-empty key path."),this.updateIn(t,function(){return e})},remove:function(t){return H(this,t,hr)},removeIn:function(t){return i(t.length>0,"Requires non-empty key path."),this.updateIn(t,function(){return hr})},update:function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},updateIn:function(t,e,r){return r||(r=e,e=void 0),0===t.length?r(this):ue(this,t,e,r,0)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):G()},merge:function(){return ne(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ne(this,t,e)},mergeDeep:function(){return ne(this,ie(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ne(this,ie(t),e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this
},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new a)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new mn(this,t,e)},__iterate:function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?F(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{},tn),an.isMap=Y;var hn="@@__IMMUTABLE_MAP__@@",cn=an.prototype;cn[hn]=!0,cn[sr]=cn.remove;var fn=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},_n=fn;ir.createClass(fn,{get:function(t,e,r,n){var i=1<<((0===t?e:e>>>t)&or),s=this.bitmap;return 0===(s&i)?n:this.nodes[ae(s&i-1)].get(t+ur,e,r,n)},update:function(t,e,r,n,i,s,u){var a=(0===e?r:r>>>e)&or,o=1<<a,h=this.bitmap,c=0!==(h&o);if(!c&&i===hr)return this;var f=ae(h&o-1),_=this.nodes,l=c?_[f]:void 0,v=Z(l,t,e+ur,r,n,i,s,u);if(v===l)return this;if(!c&&v&&_.length>=Sn)return re(t,_,h,a,v);if(c&&!v&&2===_.length&&$(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&$(v))return v;var p=t&&t===this.ownerID,d=c?v?h:h^o:h|o,g=c?v?oe(_,f,v,p):ce(_,f,p):he(_,f,v,p);return p?(this.bitmap=d,this.nodes=g,this):new _n(t,d,g)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var ln=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},vn=ln;ir.createClass(ln,{get:function(t,e,r,n){var i=(0===t?e:e>>>t)&or,s=this.nodes[i];return s?s.get(t+ur,e,r,n):n},update:function(t,e,r,n,i,s,u){var a=(0===e?r:r>>>e)&or,o=i===hr,h=this.nodes,c=h[a];if(o&&!c)return this;var f=Z(c,t,e+ur,r,n,i,s,u);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,zn>_))return ee(t,h,_,a)}else _++;var l=t&&t===this.ownerID,v=oe(h,a,f,l);return l?(this.count=_,this.nodes=v,this):new vn(t,_,v)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var s=r[e?i-n:n];if(s&&s.iterate(t,e)===!1)return!1}}},{});var pn=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r
},dn=pn;ir.createClass(pn,{get:function(t,e,r,i){for(var s=this.entries,u=0,a=s.length;a>u;u++)if(n(r,s[u][0]))return s[u][1];return i},update:function(t,e,r,i,s,a,h){var c=s===hr;if(r!==this.hash)return c?this:(u(h),u(a),te(this,t,e,r,[i,s]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(c&&!v)return this;if(u(h),(c||!v)&&u(a),c&&2===l)return new gn(t,this.hash,f[1^_]);var p=t&&t===this.ownerID,d=p?f:o(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,s]:d.push([i,s]),p?(this.entries=d,this):new dn(t,this.hash,d)},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var gn=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},yn=gn;ir.createClass(gn,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,s,a,o){var h=s===hr,c=n(i,this.entry[0]);return(c?s===this.entry[1]:h)?this:(u(o),h?void u(a):c?t&&t===this.ownerID?(this.entry[1]=s,this):new yn(t,r,[i,s]):(u(a),te(this,t,e,r,[i,s])))},iterate:function(t){return t(this.entry)}},{});var mn=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&X(t._root)};ir.createClass(mn,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Q(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Q(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var s=n.nodes[this._reverse?r-i:i];if(s){if(s.entry)return Q(t,s.entry);e=this._stack=X(s,e)}continue}e=this._stack=this._stack.__prev}return b()}},{},Mr);var wn,Sn=ar/2,zn=ar/4,In=function(t,e){this._iter=t,this._useKeys=e,this.size=t.size};ir.createClass(In,{get:function(t,e){return this._iter.get(t,e)},has:function(t){return this._iter.has(t)},valueSeq:function(){return this._iter.valueSeq()},reverse:function(){var t=this,e=le(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},map:function(t,e){var r=this,n=_e(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)
}),n},__iterate:function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Me(this):0,function(i){return t(i,e?--r:r++,n)}),e)},__iterator:function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(zr,e),n=e?Me(this):0;return new Mr(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})}},{},Wr);var bn=function(t){this._iter=t,this.size=t.size};ir.createClass(bn,{contains:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(zr,e),n=0;return new Mr(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})}},{},Pr);var qn=function(t){this._iter=t,this.size=t.size};ir.createClass(qn,{has:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(zr,e);return new Mr(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})}},{},Vr);var xn=function(t){this._iter=t,this.size=t.size};ir.createClass(xn,{entrySeq:function(){return this._iter.toSeq()},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return e?(xe(e),t(e[1],e[0],r)):void 0},e)},__iterator:function(t,e){var r=this._iter.__iterator(zr,e);return new Mr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return xe(n),t===Ir?e:I(t,n[0],n[1],e)}})}},{},Wr),bn.prototype.cacheResult=In.prototype.cacheResult=qn.prototype.cacheResult=xn.prototype.cacheResult=ke;var Mn=function(t){var e=je();if(0===arguments.length)return e;if(t&&t.constructor===Dn)return t;var r=Array.isArray(t);r||(t=Er(t));var n=r?t.length:t.size;return 0===n?e:n>0&&ar>n?Re(0,n,ur,null,new On(r?o(t):t.toArray())):e.merge(t)},Dn=Mn;ir.createClass(Mn,{toString:function(){return this.__toString("List [","]")},get:function(t,e){if(t=f(this,t),0>t||t>=this.size)return e;t+=this._origin;
var r=Be(this,t);return r&&r.array[t&or]},set:function(t,e){return Ue(this,t,e)},remove:function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=ur,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):je()},push:function(){var t=arguments,e=this.size;return this.withMutations(function(r){Te(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return Te(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){Te(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return Te(this,1)},merge:function(){return We(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return We(this,t,e)},mergeDeep:function(){return We(this,ie(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return We(this,ie(t),e)},setSize:function(t){return Te(this,0,t)},slice:function(t,e){var r=this.size;return v(t,e,r)?this:Te(this,p(t,r),d(e,r))},__iterator:function(t,e){return new An(this,t,e)},__iterate:function(t,e){var r=this,n=0,i=function(e){return t(e,n++,r)},s=Je(this._capacity);return e?Ce(this._tail,0,s-this._origin,this._capacity-this._origin,i,e)&&Ce(this._root,this._level,-this._origin,s-this._origin,i,e):Ce(this._root,this._level,-this._origin,s-this._origin,i,e)&&Ce(this._tail,0,s-this._origin,this._capacity-this._origin,i,e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Re(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{of:function(){return this(arguments)}},rn),Mn.isList=Oe;var En="@@__IMMUTABLE_LIST__@@",kn=Mn.prototype;kn[En]=!0,kn[sr]=kn.remove,kn.setIn=cn.setIn,kn.removeIn=cn.removeIn,kn.update=cn.update,kn.updateIn=cn.updateIn,kn.withMutations=cn.withMutations,kn.asMutable=cn.asMutable,kn.asImmutable=cn.asImmutable,kn.wasAltered=cn.wasAltered;
var On=function(t,e){this.array=t,this.ownerID=e},Cn=On;ir.createClass(On,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&or;if(n>=this.array.length)return new Cn([],t);var i,s=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ur,r),i===u&&s)return this}if(s&&!i)return this;var a=Le(this,t);if(!s)for(var o=0;n>o;o++)a.array[o]=void 0;return i&&(a.array[n]=i),a},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&or;if(n>=this.array.length)return this;var i,s=n===this.array.length-1;if(e>0){var u=this.array[n];if(i=u&&u.removeAfter(t,e-ur,r),i===u&&s)return this}if(s&&!i)return this;var a=Le(this,t);return s||a.array.pop(),i&&(a.array[n]=i),a}},{});var An=function(t,e,r){this._type=e,this._reverse=!!r,this._maxIndex=t.size-1;var n=Je(t._capacity),i=Ae(t._root&&t._root.array,t._level,-t._origin,n-t._origin-1),s=Ae(t._tail&&t._tail.array,0,n-t._origin,t._capacity-t._origin-1);this._stack=r?s:i,this._stack.__prev=r?i:s};ir.createClass(An,{next:function(){for(var t=this._stack;t;){var e=t.array,r=t.index++;if(this._reverse&&(r=or-r,r>t.rawMax&&(r=t.rawMax,t.index=ar-r)),r>=0&&ar>r&&t.rawMax>=r){var n=e&&e[r];if(0===t.level){var i,s=this._type;return 1!==s&&(i=t.offset+(r<<t.level),this._reverse&&(i=this._maxIndex-i)),I(s,i,n)}this._stack=t=Ae(n&&n.array,t.level-ur,t.offset+(r<<t.level),t.max,t)}else t=this._stack=this._stack.__prev}return b()}},{},Mr);var Rn,jn=function(t){return 0===arguments.length?Ve():t&&t.constructor===Un?t:Ve().unshiftAll(t)},Un=jn;ir.createClass(jn,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},push:function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ne(t,e)},pushAll:function(t){if(t=Er(t),0===t.size)return this;
var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ne(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ve()},slice:function(t,e){if(v(t,e,this.size))return this;var r=p(t,this.size),n=d(e,this.size);if(n!==this.size)return ir.superCall(this,Un.prototype,"slice",[t,e]);for(var i=this.size-r,s=this._head;r--;)s=s.next;return this.__ownerID?(this.size=i,this._head=s,this.__hash=void 0,this.__altered=!0,this):Ne(i,s)},__ensureOwner:function(t){return t===this.__ownerID?this:t?Ne(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterate:function(t,e){if(e)return this.toSeq().cacheResult.__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iterator:function(t,e){if(e)return this.toSeq().cacheResult().__iterator(t,e);var r=0,n=this._head;return new Mr(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return b()})}},{of:function(){return this(arguments)}},rn),jn.isStack=Pe;var Kn="@@__IMMUTABLE_STACK__@@",Ln=jn.prototype;Ln[Kn]=!0,Ln.withMutations=cn.withMutations,Ln.asMutable=cn.asMutable,Ln.asImmutable=cn.asImmutable,Ln.wasAltered=cn.wasAltered;var Bn,Tn=function(t){return 0===arguments.length?Xe():t&&t.constructor===Wn?t:Xe().union(t)},Wn=Tn;ir.createClass(Tn,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},add:function(t){var e=this._map.set(t,!0);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:Qe(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:0===e.size?Xe():Qe(e)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this):Xe()
},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)Er(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Er(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Er(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?Qe(e,t):(this.__ownerID=t,this._map=e,this)}},{of:function(){return this(arguments)},fromKeys:function(t){return this(Wr(t).flip())}},sn),Tn.isSet=Ye;var Jn="@@__IMMUTABLE_SET__@@",Pn=Tn.prototype;Pn[Jn]=!0,Pn[sr]=Pn.remove,Pn.mergeDeep=Pn.merge,Pn.mergeDeepWith=Pn.mergeWith,Pn.withMutations=cn.withMutations,Pn.asMutable=cn.asMutable,Pn.asImmutable=cn.asImmutable;var Nn,Vn=function(t){return 0===arguments.length?He():t&&t.constructor===Yn?t:He().merge(t)},Yn=Vn;ir.createClass(Vn,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):He()},set:function(t,e){return Ze(this,t,e)},remove:function(t){return Ze(this,t,hr)
},wasAltered:function(){return this._map.wasAltered()||this._list.wasAltered()},__iterate:function(t,e){var r=this;return this._list.__iterate(function(e){return t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ge(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)}},{of:function(){return this(arguments)}},an),Vn.isOrderedMap=Fe;var Qn="@@__IMMUTABLE_ORDERED_MAP__@@";Vn.prototype[Qn]=!0,Vn.prototype[sr]=Vn.prototype.remove;var Xn,Fn=function(t,e){var r=function(t){return this instanceof r?void(this._map=an(t)):new r(t)},n=Object.keys(t),s=r.prototype=Object.create(Gn);s.constructor=r,e&&(s._name=e),s._defaultValues=t,s._keys=n,s.size=n.length;try{Er(t).forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){i(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})})}catch(u){}return r};ir.createClass(Fn,{toString:function(){return this.__toString(this._name+" {","}")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=$e(this,G()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:$e(this,r)},remove:function(t){if(!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:$e(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;return Er(this._defaultValues).map(function(t,e){return r.get(e)
}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?$e(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},tn);var Gn=Fn.prototype;Gn._name="Record",Gn[sr]=Gn.remove,Gn.merge=cn.merge,Gn.mergeWith=cn.mergeWith,Gn.mergeDeep=cn.mergeDeep,Gn.mergeDeepWith=cn.mergeDeepWith,Gn.update=cn.update,Gn.updateIn=cn.updateIn,Gn.withMutations=cn.withMutations,Gn.asMutable=cn.asMutable,Gn.asImmutable=cn.asImmutable;var Hn=function(t,e,r){return this instanceof Zn?(i(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),t===e&&ti?ti:(r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.size=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new Zn(t,e,r)},Zn=Hn;ir.createClass(Hn,{toString:function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+f(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},slice:function(t,e){return v(t,e,this.size)?this:(t=p(t,this.size),e=d(e,this.size),t>=e?ti:new Zn(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,s=0;r>=s;s++){if(t(i,s,this)===!1)return s+1;i+=e?-n:n}return s},__iterator:function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,s=0;return new Mr(function(){var u=i;return i+=e?-n:n,s>r?b():I(t,s++,u)})},__deepEquals:function(t){return t instanceof Zn?this._start===t._start&&this._end===t._end&&this._step===t._step:ir.superCall(this,Zn.prototype,"__deepEquals",[t])}},{},Pr);var $n=Hn.prototype;$n.__toJS=$n.toArray,$n.first=kn.first,$n.last=kn.last;
var ti=Hn(0,0),ei=function(t,e){return 0>=e&&ii?ii:this instanceof ri?(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),void(0===this.size&&(ii=this))):new ri(t,e)},ri=ei;ir.createClass(ei,{toString:function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.size;return v(t,e,r)?this:new ri(this._value,d(e,r)-p(t,r))},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.size:-1},__iterate:function(t){for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new Mr(function(){return e.size>r?I(t,r++,e._value):b()})},__deepEquals:function(t){return t instanceof ri?n(this._value,t._value):ir.superCall(this,ri.prototype,"__deepEquals",[t])}},{},Pr);var ni=ei.prototype;ni.last=ni.first,ni.has=$n.has,ni.take=$n.take,ni.skip=$n.skip,ni.__toJS=$n.__toJS;var ii,si={Iterable:Er,Seq:Br,Collection:$r,Map:an,List:Mn,Stack:jn,Set:Tn,OrderedMap:Vn,Record:Fn,Range:Hn,Repeat:ei,is:n,fromJS:tr};return si}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=ir.create(u)}else i=t.prototype;return ir.keys(e).forEach(function(t){i[t]=e[t]}),ir.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return ir.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t&&"function"==typeof t.equals?t.equals(e):!1}function i(t,e){if(!t)throw Error(e)}function u(t){return t.value=!1,t}function s(t){t&&(t.value=!0)}function a(){}function o(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function h(t){i(1/0!==t,"Cannot perform this action with an infinite size.")}function c(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function f(t,e){return e>=0?e:c(t)+e}function _(){return!0}function l(t){return t&&t.constructor===Object}function v(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function p(t,e){return g(t,e,0)}function d(t,e){return g(t,e,e)}function g(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function y(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&pr;t=""+t,e="string"}return"string"===e?t.length>yr?m(t):w(t):t.hashCode?y("function"==typeof t.hashCode?t.hashCode():t.hashCode):S(t)}function m(t){var e=Sr[t];return void 0===e&&(e=w(t),wr===mr&&(wr=0,Sr={}),wr++,Sr[t]=e),e}function w(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&pr;return e}function S(t){var e=vr&&vr.get(t);if(e)return e;if(e=t[gr])return e;if(!lr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[gr])return e;if(e=z(t))return e}if(Object.isExtensible&&!Object.isExtensible(t))throw Error("Non-extensible objects are not allowed as keys.");if(e=++dr&pr,vr)vr.set(t,e);else if(lr)Object.defineProperty(t,gr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)
},t.propertyIsEnumerable[gr]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[gr]=e}return e}function z(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function I(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function b(){return{value:void 0,done:!0}}function q(t){return!!D(t)}function x(t){return t&&"function"==typeof t.next}function M(t){var e=D(t);return e&&e.call(t)}function D(t){var e=t&&(xr&&t[xr]||t[qr]);return"function"==typeof e?e:void 0}function E(t){return!(!t||!t[Cr])}function k(t){return!(!t||!t[Ar])}function O(t){return!(!t||!t[Rr])}function C(t){return k(t)||O(t)}function A(t){return t}function R(t,e){return e}function j(t,e){return[e,t]}function U(t){return function(){return!t.apply(this,arguments)}}function K(t){return"string"==typeof t?JSON.stringify(t):t}function L(t,e){return t>e?1:e>t?-1:0}function B(t,e){var r=t.prototype;return Object.keys(e).forEach(function(t){r[t]=e[t]}),t}function T(t){return!(!t||!t[Xr])}function W(){return $r||($r=new Fr([]))}function J(t,e){return e&&"string"==typeof t?void 0:N(t)?new Fr(t):x(t)?new Zr(t):q(t)?new Hr(t):(e?l(t):"object"==typeof t)?new Gr(t):void 0}function P(t,e){var r=J(t,e);if(void 0===r){if(!e)throw new TypeError("Expected iterable: "+t);r=new Fr([t])}return r}function N(t){return t&&"number"==typeof t.length}function V(t,e,r,n){h(t.size);var i=t._cache;if(i){for(var u=i.length-1,s=0;u>=s;s++){var a=i[r?u-s:s];if(e(a[1],n?a[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)}function Y(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,s=0;return new Dr(function(){var t=i[r?u-s:s];return s++>u?b():I(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function Q(t,e){return e?X(e,t,"",{"":t}):F(t)}function X(t,e,r,n){return Array.isArray(e)||l(e)?t.call(n,r,kr(e).map(function(r,n){return X(t,r,n,e)})):e}function F(t){if(t&&"object"==typeof t){if(Array.isArray(t))return kr(t).map(F).toList();
if(t.constructor===Object)return kr(t).map(F).toMap()}return t}function G(t){return!(!t||!t[cn])}function H(t,e){return I(t,e[0],e[1])}function Z(t,e){return{node:t,index:0,__prev:e}}function $(t,e,r,n){var i=Object.create(fn);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function te(){return Sn||(Sn=$(0))}function ee(t,e,r){var n=u(fr),i=u(_r),s=re(t._root,t.__ownerID,0,y(e),e,r,n,i);if(!i.value)return t;var a=t.size+(n.value?r===cr?-1:1:0);return t.__ownerID?(t.size=a,t._root=s,t.__hash=void 0,t.__altered=!0,t):s?$(a,s):te()}function re(t,e,r,n,i,u,a,o){return t?t.update(e,r,n,i,u,a,o):u===cr?t:(s(o),s(a),new yn(e,n,[i,u]))}function ne(t){return t.constructor===yn||t.constructor===dn}function ie(t,e,r,n,i){if(t.hash===n)return new dn(e,n,[t.entry,i]);var u,s=(0===r?t.hash:t.hash>>>r)&hr,a=(0===r?n:n>>>r)&hr,o=s===a?[ie(t,e,r+ar,n,i)]:(u=new yn(e,n,i),a>s?[t,u]:[u,t]);return new _n(e,1<<s|1<<a,o)}function ue(t,e,r,n){for(var i=0,u=0,s=Array(r),a=0,o=1,h=e.length;h>a;a++,o<<=1){var c=e[a];void 0!==c&&a!==n&&(i|=o,s[u++]=c)}return new _n(t,i,s)}function se(t,e,r,n,i){for(var u=0,s=Array(or),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[u++]:void 0;return s[n]=i,new vn(t,u+1,s)}function ae(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i],s=Ur(u);E(u)||(s=s.map(function(t){return Q(t)})),n.push(s)}return he(t,e,n)}function oe(t){return function(e,r){return e&&e.mergeDeepWith&&E(r)?e.mergeDeepWith(t,r):t?t(e,r):r}}function he(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,cr,function(t){return t===cr?r:e(t,r)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function ce(t,e,r,n,u){i(!t||t.set,"updateIn with invalid keyPath");var s=e[u],a=t?t.get(s,cr):cr,o=a===cr?void 0:a,h=u===e.length-1?n(a===cr?r:a):ce(o,e,r,n,u+1);return h===o?t:h===cr?t&&t.remove(s):(t||te()).set(s,h)}function fe(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function _e(t,e,r,n){var i=n?t:o(t);return i[e]=r,i}function le(t,e,r,n){var i=t.length+1;
if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),s=0,a=0;i>a;a++)a===e?(u[a]=r,s=-1):u[a]=t[a+s];return u}function ve(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,s=0;n>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function pe(t){var e=Ae(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Re,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===br){var n=t.__iterator(e,r);return new Dr(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===Ir?zr:Ir,r)},e}function de(t,e,r){var n=Ae(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,cr);return u===cr?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(br,i);return new Dr(function(){var i=u.next();if(i.done)return i;var s=i.value,a=s[0];return I(n,a,e.call(r,s[1],a,t),i)})},n}function ge(t,e){var r=Ae(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pe(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=Re,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function ye(t,e,r,n){var i=Ae(t);return n&&(i.has=function(n){var i=t.get(n,cr);return i!==cr&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,cr);return u!==cr&&e.call(r,u,n,t)?u:i}),i.__iterateUncached=function(i,u){var s=this,a=0;return t.__iterate(function(t,u,o){return e.call(r,t,u,o)?(a++,i(t,n?u:a-1,s)):void 0
},u),a},i.__iteratorUncached=function(i,u){var s=t.__iterator(br,u),a=0;return new Dr(function(){for(;;){var u=s.next();if(u.done)return u;var o=u.value,h=o[0],c=o[1];if(e.call(r,c,h,t))return I(i,n?h:a++,c,u)}})},i}function me(t,e,r){var n=on().asMutable();return t.__iterate(function(i,u){n.update(e.call(r,i,u,t),0,function(t){return t+1})}),n.asImmutable()}function we(t,e,r){var n=k(t),i=on().asMutable();t.__iterate(function(u,s){i.update(e.call(r,u,s,t),[],function(t){return t.push(n?[s,u]:u),t})});var u=Ce(t);return i.map(function(e){return Ee(t,u(e))})}function Se(t,e){if(e>t.size)return t;0>e&&(e=0);var r=Ae(t);return r.size=t.size&&Math.min(t.size,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new Dr(function(){return u++>e?b():i.next()})},r}function ze(t,e,r){var n=Ae(t);return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,a){return e.call(r,t,i,a)&&++s&&n(t,i,u)}),s},n.__iteratorUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(br,i),a=!0;return new Dr(function(){if(!a)return b();var t=s.next();if(t.done)return t;var i=t.value,o=i[0],h=i[1];return e.call(r,h,o,u)?n===br?t:I(n,o,h,t):(a=!1,b())})},n}function Ie(t,e,r){if(0>=e)return t;var n=Ae(t);return n.size=t.size&&Math.max(0,t.size-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0,a=!0,o=0;return t.__iterate(function(t,i){return a&&(a=s++<e)?void 0:(o++,n(t,r?i:o-1,u))}),o},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),s=0,a=0;return new Dr(function(){for(;e>s;)s++,u.next();var t=u.next();return r||n===Ir?t:n===zr?I(n,a++,void 0,t):I(n,a++,t.value[1],t)
})},n}function be(t,e,r,n){var i=Ae(t);return i.__iterateUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterate(i,u);var a=!0,o=0;return t.__iterate(function(t,u,h){return a&&(a=e.call(r,t,u,h))?void 0:(o++,i(t,n?u:o-1,s))}),o},i.__iteratorUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterator(i,u);var a=t.__iterator(br,u),o=!0,h=0;return new Dr(function(){var t,u,c;do{if(t=a.next(),t.done)return n||i===Ir?t:i===zr?I(i,h++,void 0,t):I(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],o&&(o=e.call(r,c,u,s))}while(o);return i===br?t:I(i,u,c,t)})},i}function qe(t,e){var r=k(t),n=new Fr([t].concat(e)).map(function(t){return E(t)||(t=P(t,!0)),r&&(t=Ur(t)),t});r?n=n.toKeyedSeq():O(t)||(n=n.toSetSeq());var i=n.flatten(!0);return i.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),i}function xe(t,e,r){var n=Ae(t);return n.__iterateUncached=function(n,i){function u(t,o){var h=this;t.__iterate(function(t,i){return(!e||e>o)&&E(t)?u(t,o+1):n(t,r?i:s++,h)===!1&&(a=!0),!a},i)}var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],a=0;return new Dr(function(){for(;u;){var t=u.next();if(t.done===!1){var o=t.value;if(n===br&&(o=o[1]),e&&!(e>s.length)||!E(o))return r?t:I(n,a++,o,t);s.push(u),u=o.__iterator(n,i)}else u=s.pop()}return b()})},n}function Me(t,e,r){var n=Ce(t);return t.toSeq().map(function(i,u){return n(e.call(r,i,u,t))}).flatten(!0)}function De(t,e){var r=Ae(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Ir,n),s=0;return new Dr(function(){return(!i||s%2)&&(i=u.next(),i.done)?i:s%2?I(r,s++,e):I(r,s++,i.value,i)})},r}function Ee(t,e){return T(t)?e:t.constructor(e)}function ke(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Oe(t){return h(t.size),c(t)}function Ce(t){return k(t)?Ur:O(t)?Lr:Br}function Ae(t){return Object.create((k(t)?Jr:O(t)?Nr:Yr).prototype)
}function Re(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Tr.prototype.cacheResult.call(this)}function je(t){return!(!t||!t[kn])}function Ue(t,e,r,n,i,u){var s,a=t&&t.array;if(0===e){var o=0>r?-r:0,h=n-r;for(h>or&&(h=or),s=o;h>s;s++)if(i(a&&a[u?o+h-1-s:s])===!1)return!1}else{var c=1<<e,f=e-ar;for(s=0;hr>=s;s++){var _=u?hr-s:s,l=r+(_<<e);if(n>l&&l+c>0){var v=a&&a[_];if(!Ue(v,f,l,n,i,u))return!1}}}return!0}function Ke(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,rawMax:n-r>>e,index:0,__prev:i}}function Le(t,e,r,n,i,u,s){var a=Object.create(On);return a.size=e-t,a._origin=t,a._capacity=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=u,a.__hash=s,a.__altered=!1,a}function Be(){return jn||(jn=Le(0,0,ar))}function Te(t,e,r){if(e=f(t,e),e>=t.size||0>e)return t.withMutations(function(t){0>e?Ne(t,e).set(0,r):Ne(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,s=u(_r);return e>=Ye(t._capacity)?n=We(n,t.__ownerID,0,e,r,s):i=We(i,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Le(t._origin,t._capacity,t._level,i,n):t}function We(t,e,r,n,i,u){var a=n>>>r&hr,o=t&&t.array.length>a;if(!o&&void 0===i)return t;var h;if(r>0){var c=t&&t.array[a],f=We(c,e,r-ar,n,i,u);return f===c?t:(h=Je(t,e),h.array[a]=f,h)}return o&&t.array[a]===i?t:(s(u),h=Je(t,e),void 0===i&&a===h.array.length-1?h.array.pop():h.array[a]=i,h)}function Je(t,e){return e&&t&&e===t.ownerID?t:new Cn(t?t.array.slice():[],e)}function Pe(t,e){if(e>=Ye(t._capacity))return t._tail;if(1<<t._level+ar>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&hr],n-=ar;return r}}function Ne(t,e,r){var n=t.__ownerID||new a,i=t._origin,u=t._capacity,s=i+e,o=void 0===r?u:0>r?u+r:i+r;if(s===i&&o===u)return t;if(s>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Cn(c&&c.array.length?[void 0,c]:[],n),h+=ar,f+=1<<h;f&&(s+=f,i+=f,o+=f,u+=f);for(var _=Ye(u),l=Ye(o);l>=1<<h+ar;)c=new Cn(c&&c.array.length?[c]:[],n),h+=ar;var v=t._tail,p=_>l?Pe(t,o-1):l>_?new Cn([],n):v;
if(v&&l>_&&u>s&&v.array.length){c=Je(c,n);for(var d=c,g=h;g>ar;g-=ar){var y=_>>>g&hr;d=d.array[y]=Je(d.array[y],n)}d.array[_>>>ar&hr]=v}if(u>o&&(p=p&&p.removeAfter(n,0,o)),s>=l)s-=l,o-=l,h=ar,c=null,p=p&&p.removeBefore(n,0,s);else if(s>i||_>l){for(f=0;c;){var m=s>>>h&hr;if(m!==l>>>h&hr)break;m&&(f+=(1<<h)*m),h-=ar,c=c.array[m]}c&&s>i&&(c=c.removeBefore(n,h,s-f)),c&&_>l&&(c=c.removeAfter(n,h,l-f)),f&&(s-=f,o-=f)}return t.__ownerID?(t.size=o-s,t._origin=s,t._capacity=o,t._level=h,t._root=c,t._tail=p,t.__hash=void 0,t.__altered=!0,t):Le(s,o,h,c,p)}function Ve(t,e,r){for(var n=[],i=0,u=0;r.length>u;u++){var s=r[u],a=kr(s);a.size>i&&(i=a.size),E(s)||(a=a.map(function(t){return Q(t)})),n.push(a)}return i>t.size&&(t=t.setSize(i)),he(t,e,n)}function Ye(t){return or>t?0:t-1>>>ar<<ar}function Qe(t){return!(!t||!t[Ln])}function Xe(t,e,r,n){var i=Object.create(Bn);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Fe(){return Tn||(Tn=Xe(0))}function Ge(t){return!(!t||!t[Pn])}function He(t,e){var r=Object.create(Nn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ze(){return Vn||(Vn=He(te()))}function $e(t){return!(!t||!t[Xn])}function tr(t,e,r,n){var i=Object.create(Yn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function er(){return Fn||(Fn=tr(te(),Be()))}function rr(t,e,r){var n=t._map,i=t._list,u=n.get(e),s=void 0!==u,a=r===cr;if(!s&&a||s&&r===i.get(u)[1])return t;s||(u=i.size);var o=a?n.remove(e):s?n:n.set(e,u),h=a?i.remove(u):i.set(u,[e,r]);return t.__ownerID?(t.size=o.size,t._map=o,t._list=h,t.__hash=void 0,t):tr(o,h)}function nr(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}var ir=Object,ur={};ur.createClass=t,ur.superCall=e,ur.defaultSuperCall=r;var sr="delete",ar=5,or=1<<ar,hr=or-1,cr={},fr={value:!1},_r={value:!1},lr=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),vr="function"==typeof WeakMap&&new WeakMap,pr=2147483647,dr=0,gr="__immutablehash__";"function"==typeof Symbol&&(gr=Symbol(gr));
var yr=16,mr=255,wr=0,Sr={},zr=0,Ir=1,br=2,qr="@@iterator",xr="function"==typeof Symbol&&Symbol.iterator,Mr=xr||qr,Dr=function(t){this.next=t};ur.createClass(Dr,{toString:function(){return"[Iterator]"}},{}),Dr.KEYS=zr,Dr.VALUES=Ir,Dr.ENTRIES=br;var Er=Dr.prototype;Er.inspect=Er.toSource=function(){return""+this},Er[Mr]=function(){return this};var kr=function(t){return E(t)?t:Tr.apply(void 0,arguments)},Or=kr;ur.createClass(kr,{toArray:function(){h(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new qn(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toKeyedSeq:function(){return new bn(this,!0)},toMap:function(){return h(this.size),on(this.toKeyedSeq())},toObject:function(){h(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return h(this.size),Yn(this.toKeyedSeq())},toSet:function(){return h(this.size),Wn(this)},toSetSeq:function(){return new xn(this,!0)},toSeq:function(){return O(this)?this.toIndexedSeq():k(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return h(this.size),Un(this)},toList:function(){return h(this.size),Dn(this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Ee(this,qe(this,t,!0))},contains:function(t){return this.some(function(e){return n(e,t)})},entries:function(){return this.__iterator(br)},every:function(t,e){var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return Ee(this,ye(this,t,e,!0))},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},join:function(t){t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n:""
}),e},keys:function(){return this.__iterator(zr)},map:function(t,e){return Ee(this,de(this,t,e))},reduce:function(t,e,r){var n,i;return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,u,s){i?(i=!1,n=e):n=t.call(r,n,e,u,s)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return Ee(this,ge(this,!0))},slice:function(t,e){if(v(t,e,this.size))return this;var r=p(t,this.size),n=d(e,this.size);if(r!==r||n!==n)return this.toSeq().cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return Ee(this,void 0===n||n===this.size?i:i.take(n-r))},some:function(t,e){return!this.every(U(t),e)},sort:function(t){return this.sortBy(A,t)},values:function(){return this.__iterator(Ir)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return me(this,t,e)},equals:function(t){if(this===t)return!0;if(!t||"function"!=typeof t.equals)return!1;if(void 0!==this.size&&void 0!==t.size){if(this.size!==t.size)return!1;if(0===this.size&&0===t.size)return!0}return void 0!==this.__hash&&void 0!==t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)},__deepEquals:function(t){var e=this.entries();return"function"==typeof t.every&&t.every(function(t,r){var i=e.next().value;return i&&n(i[0],r)&&n(i[1],t)})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return new Fr(t._cache);var e=t.toSeq().map(j).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(U(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(_)},flatMap:function(t,e){return Ee(this,Me(this,t,e))},flatten:function(t){return Ee(this,xe(this,t,!0))},fromEntrySeq:function(){return new Mn(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},void 0,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],cr):cr,r===cr)return e;return r},groupBy:function(t,e){return we(this,t,e)
},has:function(t){return this.get(t,cr)!==cr},isSubset:function(t){return t="function"==typeof t.contains?t:Or(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this)},keySeq:function(){return this.toSeq().map(R).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return this.maxBy(A,t)},maxBy:function(t,e){var r=this;e=e||L;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))>0?i:n});return n&&n[1]},min:function(t){return this.minBy(A,t)},minBy:function(t,e){var r=this;e=e||L;var n=this.entrySeq().reduce(function(n,i){return e(t(i[1],i[0],r),t(n[1],n[0],r))<0?i:n});return n&&n[1]},rest:function(){return this.slice(1)},skip:function(t){return Ee(this,Ie(this,t,!0))},skipLast:function(t){return Ee(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ee(this,be(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(U(t),e)},sortBy:function(t,e){var r=this;return e=e||L,Ee(this,new Fr(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq())},take:function(t){return Ee(this,Se(this,t))},takeLast:function(t){return Ee(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ee(this,ze(this,t,e))},takeUntil:function(t,e){return this.takeWhile(U(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=1/0===this.size?0:this.reduce(function(t,e,r){return t+(y(e)^(e===r?0:y(r)))&pr},0))}},{});var Cr="@@__IMMUTABLE_ITERABLE__@@",Ar="@@__IMMUTABLE_KEYED__@@",Rr="@@__IMMUTABLE_INDEXED__@@",jr=kr.prototype;jr[Cr]=!0,jr[Mr]=jr.values,jr.toJSON=jr.toJS,jr.__toJS=jr.toArray,jr.__toStringMapper=K,jr.inspect=jr.toSource=function(){return""+this},jr.chain=jr.flatMap,function(){try{Object.defineProperty(jr,"length",{get:function(){if(!kr.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size
}}})}catch(t){}}();var Ur=function(t){return k(t)?t:Jr.apply(void 0,arguments)};ur.createClass(Ur,{flip:function(){return Ee(this,pe(this))},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return n(e,t)})},lastKeyOf:function(t){return this.toSeq().reverse().keyOf(t)},mapEntries:function(t,e){var r=this,n=0;return Ee(this,this.toSeq().map(function(i,u){return t.call(e,[u,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Ee(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}},{},kr);var Kr=Ur.prototype;Kr[Ar]=!0,Kr[Mr]=jr.entries,Kr.__toJS=jr.toObject,Kr.__toStringMapper=function(t,e){return e+": "+K(t)};var Lr=function(t){return O(t)?t:Nr.apply(void 0,arguments)};ur.createClass(Lr,{toKeyedSeq:function(){return new bn(this,!1)},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Ee(this,qe(this,t,!1))},filter:function(t,e){return Ee(this,ye(this,t,e,!1))},findIndex:function(t,e){var r=this.toKeyedSeq().findKey(t,e);return void 0===r?-1:r},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Ee(this,ge(this,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=p(t,this.size);var n=this.slice(0,t);return Ee(this,1===r?n:n.concat(o(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ee(this,xe(this,t,!1))},get:function(t,e){return t=f(this,t),0>t||1/0===this.size||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=f(this,t),t>=0&&(void 0!==this.size?1/0===this.size||this.size>t:-1!==this.indexOf(t))
},interpose:function(t){return Ee(this,De(this,t))},last:function(){return this.get(-1)},skip:function(t){var e=this,r=Ie(e,t,!1);return T(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0?e.get(r+t,n):n}),Ee(this,r)},skipWhile:function(t,e){return Ee(this,be(this,t,e,!1))},sortBy:function(t,e){var r=this;return e=e||L,Ee(this,new Fr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq())},take:function(t){var e=this,r=Se(e,t);return T(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0&&t>r?e.get(r,n):n}),Ee(this,r)}},{},kr),Lr.prototype[Rr]=!0;var Br=function(t){return E(t)&&!C(t)?t:Yr.apply(void 0,arguments)};ur.createClass(Br,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}},{},kr),Br.prototype.has=jr.contains,kr.isIterable=E,kr.isKeyed=k,kr.isIndexed=O,kr.isAssociative=C,kr.Keyed=Ur,kr.Indexed=Lr,kr.Set=Br,kr.Iterator=Dr;var Tr=function(t){return 0===arguments.length?W():(E(t)?t:P(t,!1)).toSeq()},Wr=Tr;ur.createClass(Tr,{toSeq:function(){return this},toString:function(){return this.__toString("Seq {","}")},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},__iterate:function(t,e){return V(this,t,e,!0)},__iterator:function(t,e){return Y(this,t,e,!0)}},{of:function(){return Wr(arguments)}},kr);var Jr=function(t){return 0===arguments.length?W().toKeyedSeq():(E(t)||(t=P(t,!1)),k(t)?t.toSeq():t.fromEntrySeq())},Pr=Jr;ur.createClass(Jr,{toKeyedSeq:function(){return this},toSeq:function(){return this}},{of:function(){return Pr(arguments)}},Tr),B(Jr,Ur.prototype);var Nr=function(t){return 0===arguments.length?W():(E(t)?t:P(t,!1)).toIndexedSeq()},Vr=Nr;ur.createClass(Nr,{toIndexedSeq:function(){return this},toString:function(){return this.__toString("Seq [","]")},__iterate:function(t,e){return V(this,t,e,!1)},__iterator:function(t,e){return Y(this,t,e,!1)}},{of:function(){return Vr(arguments)
}},Tr),B(Nr,Lr.prototype);var Yr=function(t){return 0===arguments.length?W().toSetSeq():(E(t)?t:P(t,!1)).toSetSeq()},Qr=Yr;ur.createClass(Yr,{toSetSeq:function(){return this}},{of:function(){return Qr(arguments)}},Tr),B(Yr,Br.prototype),Tr.isSeq=T,Tr.Keyed=Jr,Tr.Set=Yr,Tr.Indexed=Nr;var Xr="@@__IMMUTABLE_SEQ__@@";Tr.prototype[Xr]=!0;var Fr=function(t){this._array=t,this.size=t.length};ur.createClass(Fr,{get:function(t,e){return this.has(t)?this._array[f(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new Dr(function(){return i>n?b():I(t,i,r[e?n-i++:i++])})}},{},Nr);var Gr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length};ur.createClass(Gr,{get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var s=n[e?i-u:u];if(t(r[s],s,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new Dr(function(){var s=n[e?i-u:u];return u++>i?b():I(t,s,r[s])})}},{},Jr);var Hr=function(t){this._iterable=t,this.size=t.length||t.size};ur.createClass(Hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=M(r),i=0;if(x(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=M(r);if(!x(n))return new Dr(b);var i=0;return new Dr(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})}},{},Nr);var Zr=function(t){this._iterator=t,this._iteratorCache=[]};ur.createClass(Zr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var s=u.value;
if(n[i]=s,t(s,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Dr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})}},{},Nr);var $r,tn=function(){throw TypeError("Abstract")};ur.createClass(tn,{},{},kr);var en=function(){ur.defaultSuperCall(this,rn.prototype,arguments)},rn=en;ur.createClass(en,{},{},tn),B(en,Ur.prototype);var nn=function(){ur.defaultSuperCall(this,un.prototype,arguments)},un=nn;ur.createClass(nn,{},{},tn),B(nn,Lr.prototype);var sn=function(){ur.defaultSuperCall(this,an.prototype,arguments)},an=sn;ur.createClass(sn,{},{},tn),B(sn,Br.prototype),tn.Keyed=en,tn.Indexed=nn,tn.Set=sn;var on=function(t){return 0===arguments.length?te():t&&t.constructor===hn?t:te().merge(Ur(t))},hn=on;ur.createClass(on,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,y(t),t,e):e},set:function(t,e){return ee(this,t,e)},setIn:function(t,e){return i(t.length>0,"Requires non-empty key path."),this.updateIn(t,function(){return e})},remove:function(t){return ee(this,t,cr)},removeIn:function(t){return i(t.length>0,"Requires non-empty key path."),this.updateIn(t,function(){return cr})},update:function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},updateIn:function(t,e,r){return r||(r=e,e=void 0),0===t.length?r(this):ce(this,t,e,r,0)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):te()},merge:function(){return ae(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ae(this,t,e)},mergeDeep:function(){return ae(this,oe(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return ae(this,oe(t),e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this
},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new a)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new wn(this,t,e)},__iterate:function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?$(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{},en),on.isMap=G;var cn="@@__IMMUTABLE_MAP__@@",fn=on.prototype;fn[cn]=!0,fn[sr]=fn.remove;var _n=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},ln=_n;ur.createClass(_n,{get:function(t,e,r,n){var i=1<<((0===t?e:e>>>t)&hr),u=this.bitmap;return 0===(u&i)?n:this.nodes[fe(u&i-1)].get(t+ar,e,r,n)},update:function(t,e,r,n,i,u,s){var a=(0===e?r:r>>>e)&hr,o=1<<a,h=this.bitmap,c=0!==(h&o);if(!c&&i===cr)return this;var f=fe(h&o-1),_=this.nodes,l=c?_[f]:void 0,v=re(l,t,e+ar,r,n,i,u,s);if(v===l)return this;if(!c&&v&&_.length>=zn)return se(t,_,h,a,v);if(c&&!v&&2===_.length&&ne(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&ne(v))return v;var p=t&&t===this.ownerID,d=c?v?h:h^o:h|o,g=c?v?_e(_,f,v,p):ve(_,f,p):le(_,f,v,p);return p?(this.bitmap=d,this.nodes=g,this):new ln(t,d,g)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var vn=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},pn=vn;ur.createClass(vn,{get:function(t,e,r,n){var i=(0===t?e:e>>>t)&hr,u=this.nodes[i];return u?u.get(t+ar,e,r,n):n},update:function(t,e,r,n,i,u,s){var a=(0===e?r:r>>>e)&hr,o=i===cr,h=this.nodes,c=h[a];if(o&&!c)return this;var f=re(c,t,e+ar,r,n,i,u,s);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,In>_))return ue(t,h,_,a)}else _++;var l=t&&t===this.ownerID,v=_e(h,a,f,l);return l?(this.count=_,this.nodes=v,this):new pn(t,_,v)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var dn=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r
},gn=dn;ur.createClass(dn,{get:function(t,e,r,i){for(var u=this.entries,s=0,a=u.length;a>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,a,h){var c=u===cr;if(r!==this.hash)return c?this:(s(h),s(a),ie(this,t,e,r,[i,u]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(c&&!v)return this;if(s(h),(c||!v)&&s(a),c&&2===l)return new yn(t,this.hash,f[1^_]);var p=t&&t===this.ownerID,d=p?f:o(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new gn(t,this.hash,d)},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var yn=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},mn=yn;ur.createClass(yn,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,u,a,o){var h=u===cr,c=n(i,this.entry[0]);return(c?u===this.entry[1]:h)?this:(s(o),h?void s(a):c?t&&t===this.ownerID?(this.entry[1]=u,this):new mn(t,r,[i,u]):(s(a),ie(this,t,e,r,[i,u])))},iterate:function(t){return t(this.entry)}},{});var wn=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Z(t._root)};ur.createClass(wn,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return H(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return H(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return H(t,u.entry);e=this._stack=Z(u,e)}continue}e=this._stack=this._stack.__prev}return b()}},{},Dr);var Sn,zn=or/2,In=or/4,bn=function(t,e){this._iter=t,this._useKeys=e,this.size=t.size};ur.createClass(bn,{get:function(t,e){return this._iter.get(t,e)},has:function(t){return this._iter.has(t)},valueSeq:function(){return this._iter.valueSeq()},reverse:function(){var t=this,e=ge(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},map:function(t,e){var r=this,n=de(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)
}),n},__iterate:function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Oe(this):0,function(i){return t(i,e?--r:r++,n)}),e)},__iterator:function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(Ir,e),n=e?Oe(this):0;return new Dr(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})}},{},Jr);var qn=function(t){this._iter=t,this.size=t.size};ur.createClass(qn,{contains:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Ir,e),n=0;return new Dr(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})}},{},Nr);var xn=function(t){this._iter=t,this.size=t.size};ur.createClass(xn,{has:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Ir,e);return new Dr(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})}},{},Yr);var Mn=function(t){this._iter=t,this.size=t.size};ur.createClass(Mn,{entrySeq:function(){return this._iter.toSeq()},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return e?(ke(e),t(e[1],e[0],r)):void 0},e)},__iterator:function(t,e){var r=this._iter.__iterator(Ir,e);return new Dr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return ke(n),t===br?e:I(t,n[0],n[1],e)}})}},{},Jr),qn.prototype.cacheResult=bn.prototype.cacheResult=xn.prototype.cacheResult=Mn.prototype.cacheResult=Re;var Dn=function(t){var e=Be();if(0===arguments.length)return e;if(t&&t.constructor===En)return t;t=kr(t);var r=t.size;return 0===r?e:r>0&&or>r?Le(0,r,ar,null,new Cn(t.toArray())):e.merge(t)},En=Dn;ur.createClass(Dn,{toString:function(){return this.__toString("List [","]")},get:function(t,e){if(t=f(this,t),0>t||t>=this.size)return e;t+=this._origin;var r=Pe(this,t);return r&&r.array[t&hr]},set:function(t,e){return Te(this,t,e)
},remove:function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=ar,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Be()},push:function(){var t=arguments,e=this.size;return this.withMutations(function(r){Ne(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return Ne(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){Ne(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return Ne(this,1)},merge:function(){return Ve(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Ve(this,t,e)},mergeDeep:function(){return Ve(this,oe(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Ve(this,oe(t),e)},setSize:function(t){return Ne(this,0,t)},slice:function(t,e){var r=this.size;return v(t,e,r)?this:Ne(this,p(t,r),d(e,r))},__iterator:function(t,e){return new Rn(this,t,e)},__iterate:function(t,e){var r=this,n=0,i=function(e){return t(e,n++,r)},u=Ye(this._capacity);return e?Ue(this._tail,0,u-this._origin,this._capacity-this._origin,i,e)&&Ue(this._root,this._level,-this._origin,u-this._origin,i,e):Ue(this._root,this._level,-this._origin,u-this._origin,i,e)&&Ue(this._tail,0,u-this._origin,this._capacity-this._origin,i,e),n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Le(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{of:function(){return this(arguments)}},nn),Dn.isList=je;var kn="@@__IMMUTABLE_LIST__@@",On=Dn.prototype;On[kn]=!0,On[sr]=On.remove,On.setIn=fn.setIn,On.removeIn=fn.removeIn,On.update=fn.update,On.updateIn=fn.updateIn,On.withMutations=fn.withMutations,On.asMutable=fn.asMutable,On.asImmutable=fn.asImmutable,On.wasAltered=fn.wasAltered;var Cn=function(t,e){this.array=t,this.ownerID=e
},An=Cn;ur.createClass(Cn,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&hr;if(n>=this.array.length)return new An([],t);var i,u=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-ar,r),i===s&&u)return this}if(u&&!i)return this;var a=Je(this,t);if(!u)for(var o=0;n>o;o++)a.array[o]=void 0;return i&&(a.array[n]=i),a},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&hr;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var s=this.array[n];if(i=s&&s.removeAfter(t,e-ar,r),i===s&&u)return this}if(u&&!i)return this;var a=Je(this,t);return u||a.array.pop(),i&&(a.array[n]=i),a}},{});var Rn=function(t,e,r){this._type=e,this._reverse=!!r,this._maxIndex=t.size-1;var n=Ye(t._capacity),i=Ke(t._root&&t._root.array,t._level,-t._origin,n-t._origin-1),u=Ke(t._tail&&t._tail.array,0,n-t._origin,t._capacity-t._origin-1);this._stack=r?u:i,this._stack.__prev=r?i:u};ur.createClass(Rn,{next:function(){for(var t=this._stack;t;){var e=t.array,r=t.index++;if(this._reverse&&(r=hr-r,r>t.rawMax&&(r=t.rawMax,t.index=or-r)),r>=0&&or>r&&t.rawMax>=r){var n=e&&e[r];if(0===t.level){var i,u=this._type;return 1!==u&&(i=t.offset+(r<<t.level),this._reverse&&(i=this._maxIndex-i)),I(u,i,n)}this._stack=t=Ke(n&&n.array,t.level-ar,t.offset+(r<<t.level),t.max,t)}else t=this._stack=this._stack.__prev}return b()}},{},Dr);var jn,Un=function(t){return 0===arguments.length?Fe():t&&t.constructor===Kn?t:Fe().unshiftAll(t)},Kn=Un;ur.createClass(Un,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},push:function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Xe(t,e)},pushAll:function(t){if(t=kr(t),0===t.size)return this;var e=this.size,r=this._head;
return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Xe(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Fe()},slice:function(t,e){if(v(t,e,this.size))return this;var r=p(t,this.size),n=d(e,this.size);if(n!==this.size)return ur.superCall(this,Kn.prototype,"slice",[t,e]);for(var i=this.size-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):Xe(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?Xe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterate:function(t,e){if(e)return this.toSeq().cacheResult.__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iterator:function(t,e){if(e)return this.toSeq().cacheResult().__iterator(t,e);var r=0,n=this._head;return new Dr(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return b()})}},{of:function(){return this(arguments)}},nn),Un.isStack=Qe;var Ln="@@__IMMUTABLE_STACK__@@",Bn=Un.prototype;Bn[Ln]=!0,Bn.withMutations=fn.withMutations,Bn.asMutable=fn.asMutable,Bn.asImmutable=fn.asImmutable,Bn.wasAltered=fn.wasAltered;var Tn,Wn=function(t){return 0===arguments.length?Ze():t&&t.constructor===Jn?t:Ze().union(t)},Jn=Wn;ur.createClass(Wn,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},add:function(t){var e=this._map.set(t,!0);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:He(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.size=e.size,this._map=e,this):e===this._map?this:0===e.size?Ze():He(e)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this):Ze()
},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)kr(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return kr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return kr(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?He(e,t):(this.__ownerID=t,this._map=e,this)}},{of:function(){return this(arguments)},fromKeys:function(t){return this(Jr(t).flip())}},sn),Wn.isSet=Ge;var Pn="@@__IMMUTABLE_SET__@@",Nn=Wn.prototype;Nn[Pn]=!0,Nn[sr]=Nn.remove,Nn.mergeDeep=Nn.merge,Nn.mergeDeepWith=Nn.mergeWith,Nn.withMutations=fn.withMutations,Nn.asMutable=fn.asMutable,Nn.asImmutable=fn.asImmutable;var Vn,Yn=function(t){return 0===arguments.length?er():t&&t.constructor===Qn?t:er().merge(Ur(t))},Qn=Yn;ur.createClass(Yn,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):er()},set:function(t,e){return rr(this,t,e)},remove:function(t){return rr(this,t,cr)
},wasAltered:function(){return this._map.wasAltered()||this._list.wasAltered()},__iterate:function(t,e){var r=this;return this._list.__iterate(function(e){return t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?tr(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)}},{of:function(){return this(arguments)}},on),Yn.isOrderedMap=$e;var Xn="@@__IMMUTABLE_ORDERED_MAP__@@";Yn.prototype[Xn]=!0,Yn.prototype[sr]=Yn.prototype.remove;var Fn,Gn=function(t,e){var r=function(t){return this instanceof r?void(this._map=0===arguments.length?on():on(t)):new r(t)},n=Object.keys(t),u=r.prototype=Object.create(Hn);u.constructor=r,e&&(u._name=e),u._defaultValues=t,u._keys=n,u.size=n.length;try{kr(t).forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){i(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})})}catch(s){}return r};ur.createClass(Gn,{toString:function(){return this.__toString(this._name+" {","}")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=nr(this,te()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:nr(this,r)},remove:function(t){if(!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:nr(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;
return kr(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?nr(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},en);var Hn=Gn.prototype;Hn._name="Record",Hn[sr]=Hn.remove,Hn.merge=fn.merge,Hn.mergeWith=fn.mergeWith,Hn.mergeDeep=fn.mergeDeep,Hn.mergeDeepWith=fn.mergeDeepWith,Hn.update=fn.update,Hn.updateIn=fn.updateIn,Hn.withMutations=fn.withMutations,Hn.asMutable=fn.asMutable,Hn.asImmutable=fn.asImmutable;var Zn=function(t,e,r){return this instanceof $n?(i(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),t===e&&ei?ei:(r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.size=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new $n(t,e,r)},$n=Zn;ur.createClass(Zn,{toString:function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+f(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},slice:function(t,e){return v(t,e,this.size)?this:(t=p(t,this.size),e=d(e,this.size),t>=e?ei:new $n(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new Dr(function(){var s=i;return i+=e?-n:n,u>r?b():I(t,u++,s)})},__deepEquals:function(t){return t instanceof $n?this._start===t._start&&this._end===t._end&&this._step===t._step:ur.superCall(this,$n.prototype,"__deepEquals",[t])
}},{},Nr);var ti=Zn.prototype;ti.__toJS=ti.toArray,ti.first=On.first,ti.last=On.last;var ei=Zn(0,0),ri=function(t,e){return 0>=e&&ui?ui:this instanceof ni?(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),void(0===this.size&&(ui=this))):new ni(t,e)},ni=ri;ur.createClass(ri,{toString:function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.size;return v(t,e,r)?this:new ni(this._value,d(e,r)-p(t,r))},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.size:-1},__iterate:function(t){for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new Dr(function(){return e.size>r?I(t,r++,e._value):b()})},__deepEquals:function(t){return t instanceof ni?n(this._value,t._value):ur.superCall(this,ni.prototype,"__deepEquals",[t])}},{},Nr);var ii=ri.prototype;ii.last=ii.first,ii.has=ti.has,ii.take=ti.take,ii.skip=ti.skip,ii.__toJS=ti.__toJS;var ui,si={Iterable:kr,Seq:Tr,Collection:tn,Map:on,List:Dn,Stack:Un,Set:Wn,OrderedMap:Yn,Record:Gn,Range:Zn,Repeat:ri,is:n,fromJS:Q};return si}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
{
"name": "immutable",
"version": "3.0.1",
"version": "3.0.2",
"description": "Immutable Data Collections",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js",

@@ -10,4 +10,4 @@ Immutable Data Collections

`Immutable` provides `List`, `Stack`, `Map`,
`OrderedMap`, and `Set` by using persistent [hash maps tries](http://en.wikipedia.org/wiki/Hash_array_mapped_trie)
`Immutable` provides `List`, `Stack`, `Map`, `OrderedMap`, `Record`
and `Set` by using persistent [hash maps tries](http://en.wikipedia.org/wiki/Hash_array_mapped_trie)
and [vector tries](http://hypirion.com/musings/understanding-persistent-vector-pt-1)

@@ -14,0 +14,0 @@ as popularized by Clojure and Scala. They achieve efficiency on modern

Sorry, the diff of this file is too big to display

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