!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.transduce=t()}}(function(){return function t(n,r,e){function i(o,s){if(!r[o]){if(!n[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(u)return u(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var a=r[o]={exports:{}};n[o][0].call(a.exports,function(t){var r=n[o][1][t];return i(r?r:t)},a,a.exports,t,n,r,e)}return r[o].exports}for(var u="function"==typeof require&&require,o=0;o=n.arr.length?{done:!0}:{done:!1,value:n.arr[r++]}}},t[m]=p,t},t}();r.ArrayIterable=T;var O=function(){function t(n){e(this,t),this.fn=n}return t.prototype[m]=function(){var t;return t={next:this.fn},t[m]=p,t},t}();r.FunctionIterable=O;var I=function(){function t(n){e(this,t),this.obj=n,this.keys=Object.keys(n)}return t.prototype[m]=function(){var t,n=this,r=0;return t={next:function(){if(r>=n.keys.length)return{done:!0};var t=n.keys[r++];return{done:!1,value:[t,n.obj[t]]}}},t[m]=p,t},t}();r.ObjectIterable=I;var R=(h={},h[w]=function(){},h[b]=function(t,n){return n},h[g]=y.identity,h),j=(l={},l[w]=function(){return[]},l[b]=function(t,n){return t.push(n),t},l[g]=y.identity,l),F=(d={},d[w]=function(){return""},d[b]=function(t,n){return t+n},d[g]=y.identity,d),k=(v={},v[w]=function(){return{}},v[b]=function(t,n){if(y.isArray(n)&&2===n.length)t[n[0]]=n[1];else{var r;for(r in n)_.call(n,r)&&(t[r]=n[r])}return t},v[g]=y.identity,v)},{6:6}],3:[function(t,n,r){"use strict";function e(t,n){var r=n({},t);return delete r.default,r}function i(t,n){for(var r=Object.getOwnPropertyNames(n),e=0;e0&&(t=this.xfStep(t,n)),this.n<=0&&(t=u.reduced(t)),t},n}(u.Transducer),x=function(t){return function(n){return new w(t,n)}};r.takeWhile=x;var w=function(t){function n(r,i){e(this,n),t.call(this,i),this.p=r}return i(n,t),n.prototype[c]=function(t,n){return this.p(n)?this.xfStep(t,n):u.reduced(t)},n}(u.Transducer),b=function(t){return function(n){return new g(t,n)}};r.drop=b;var g=function(t){function n(r,i){e(this,n),t.call(this,i),this.n=r}return i(n,t),n.prototype[c]=function(t,n){return--this.n<0?this.xfStep(t,n):t},n}(u.Transducer),m=function(t){return function(n){return new S(t,n)}};r.dropWhile=m;var S=function(t){function n(r,i){e(this,n),t.call(this,i),this.p=r,this.found=!1}return i(n,t),n.prototype[c]=function(t,n){if(!this.found){if(this.p(n))return t;this.found=!0}return this.xfStep(t,n)},n}(u.Transducer),_=function(t){return new T(t)};r.cat=_;var T=function(t){function n(r){e(this,n),t.call(this,new O(r))}return i(n,t),n.prototype[c]=function(t,n){return o.reduce(this.xf,t,n)},n}(u.Transducer),O=function(t){function n(r){e(this,n),t.call(this,r)}return i(n,t),n.prototype[c]=function(t,n){return t=this.xfStep(t,n),u.isReduced(t)&&(t=u.reduced(t,!0)),t},n}(u.Transducer),I=function(t){return u.compose(a(t),_)};r.mapcat=I;var R=function(t){return function(n){return new j(t,n)}};r.partitionAll=R;var j=function(t){function n(r,i){e(this,n),t.call(this,i),this.n=r,this.inputs=[]}return i(n,t),n.prototype[c]=function(t,n){var r=this.inputs;return r.push(n),this.n===r.length&&(this.inputs=[],t=this.xfStep(t,r)),t},n.prototype[f]=function(t){var n=this.inputs;return n&&n.length&&(this.inputs=[],t=this.xfStep(t,n)),this.xfResult(t)},n}(u.Transducer),F=function(t){return function(n){return new k(t,n)}};r.partitionBy=F;var k=function(t){function n(r,i){e(this,n),t.call(this,i),this.f=r}return i(n,t),n.prototype[c]=function(t,n){var r=this.inputs,e=this.f(n),i=this.prev;return this.prev=e,void 0===r?this.inputs=[n]:i===e?r.push(n):(this.inputs=[],t=this.xfStep(t,r),u.isReduced(t)||this.inputs.push(n)),t},n.prototype[f]=function(t){var n=this.inputs;return n&&n.length&&(this.inputs=[],t=this.xfStep(t,n)),this.xfResult(t)},n}(u.Transducer),A=function(){return function(t){return new E(t)}};r.dedupe=A;var E=function(t){function n(r){e(this,n),t.call(this,r),this.sawFirst=!1}return i(n,t),n.prototype[c]=function(t,n){return this.sawFirst&&this.last===n||(t=this.xfStep(t,n)),this.last=n,this.sawFirst=!0,t},n}(u.Transducer),P=function(t){return function(n){return new q(t,n)}};r.unique=P;var q=function(t){function n(r,i){e(this,n),t.call(this,i),this.seen=[],this.f=r||u.identity}return i(n,t),n.prototype[c]=function(t,n){var r=this.f(n);return this.seen.indexOf(r)<0&&(this.seen.push(r),t=this.xfStep(t,n)),t},n}(u.Transducer),M=function(t){return function(n){return new C(t,n)}};r.tap=M;var C=function(t){function n(r,i){e(this,n),t.call(this,i),this.f=r}return i(n,t),n.prototype[c]=function(t,n){return this.f(t,n),this.xfStep(t,n)},n}(u.Transducer),N=function(t){return function(n){return new D(t,n)}};r.interpose=N;var D=function(t){function n(r,i){e(this,n),t.call(this,i),this.separator=r,this.started=!1}return i(n,t),n.prototype[c]=function(t,n){if(this.started){var r=this.xf[c](t,this.separator);return u.isReduced(r)?r:this.xfStep(r,n)}return this.started=!0,this.xfStep(t,n)},n}(u.Transducer)},{4:4,6:6}],6:[function(t,n,r){"use strict";function e(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function i(t){var n="[object "+t+"]";return function(t){return n===p.call(t)}}function u(t){return!!(x(t)||h(t)||t&&t[g.iterator])}function o(t){return!(!t||!l(t.next))}function s(){var t=arguments;return function(n){for(var r=t.length;r--;)n=t[r](n);return n}}function c(t,n){return!n&&T(t)||(t=new f(t)),t}function f(t){this[S]=t,this[_]=!0}function a(t){return T(t)&&(t=t[S]),t}r.__esModule=!0,r.isIterable=u,r.isIterator=o,r.compose=s,r.reduced=c,r.unreduced=a;var p=Object.prototype.toString,h=({}.hasOwnProperty,Array.isArray||i("Array"));r.isArray=h;var l=function(t){return"function"==typeof t};r.isFunction=l;var d=function(t){return void 0===t};r.isUndefined=d;var v=i("Number");r.isNumber=v;var y=i("RegExp");r.isRegExp=y;var x=i("String");r.isString=x;var w=function(t){return t};r.identity=w;var b="undefined"!=typeof Symbol,g={iterator:b?Symbol.iterator:"@@iterator",transducer:{init:"@@transducer/init",step:"@@transducer/step",result:"@@transducer/result",reduce:"@@transducer/reduce",reduced:"@@transducer/reduced",value:"@@transducer/value"}};r.protocols=g;var m=g.transducer,S=m.value,_=m.reduced,T=function(t){return!(!t||!t[_])};r.isReduced=T;var O=g.transducer,I=O.init,R=O.step,j=O.result,F=function(){function t(n){e(this,t),this.xf=n}return t.prototype[I]=function(){return this.xfInit()},t.prototype.xfInit=function(){return this.xf[I]()},t.prototype[R]=function(t,n){return this.xfStep(t,n)},t.prototype.xfStep=function(t,n){return this.xf[R](t,n)},t.prototype[j]=function(t){return this.xfResult(t)},t.prototype.xfResult=function(t){return this.xf[j](t)},t}();r.Transducer=F},{}]},{},[1])(1)});