cspace-ui
Version:
CollectionSpace user interface for browsers
1 lines • 2.76 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cspaceUI=t():e.cspaceUI=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1658)}([function(e,t,n){e.exports=n(813)()},function(e,t,n){"use strict";e.exports=n(87)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:W(e)}function o(e){return s(e)?e:V(e)}function r(e){return l(e)?e:Z(e)}function a(e){return i(e)&&!c(e)?e:J(e)}function i(e){return!(!e||!e[d])}function s(e){return!(!e||!e[p])}function l(e){return!(!e||!e[m])}function c(e){return s(e)||l(e)}function u(e){return!(!e||!e[f])}t(o,n),t(r,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=l,n.isAssociative=c,n.isOrdered=u,n.Keyed=o,n.Indexed=r,n.Set=a;var d="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",m="@@__IMMUTABLE_INDEXED__@@",f="@@__IMMUTABLE_ORDERED__@@",h=5,g=1<<h,y=g-1,v={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function T(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),o=new Array(n),r=0;r<n;r++)o[r]=e[r+t];return o}function E(e){return void 0===e.size&&(e.size=e.__iterate(x)),e.size}function C(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?E(e)+t:t}function x(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function L(e,t){return k(e,t,0)}function D(e,t){return k(e,t,t)}function k(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,P=1,N=2,j="function"==typeof Symbol&&Symbol.iterator,R="@@iterator",A=j||R;function B(e){this.next=e}function Y(e,t,n,o){var r=0===e?t:1===e?n:[t,n];return o?o.value=r:o={value:r,done:!1},o}function z(){return{value:void 0,done:!0}}function H(e){return!!G(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=G(e);return t&&t.call(e)}function G(e){var t=e&&(j&&e[j]||e[R]);if("function"==typeof t)return t}function q(e){return e&&"number"==typeof e.length}function W(e){return null==e?ae():i(e)?e.toSeq():function(e){var t=le(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function V(e){return null==e?ae().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():ie(e)}function Z(e){return null==e?ae():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():se(e)}function J(e){return(null==e?ae():i(e)?s(e)?e.entrySeq():e:se(e)).toSetSeq()}B.prototype.toString=function(){return"[Iterator]"},B.KEYS=I,B.VALUES=P,B.ENTRIES=N,B.prototype.inspect=B.prototype.toSource=function(){return this.toString()},B.prototype[A]=function(){return this},t(W,n),W.of=function(){return W(arguments)},W.prototype.toSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq {","}")},W.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},W.prototype.__iterate=function(e,t){return ce(this,e,t,!0)},W.prototype.__iterator=function(e,t){return ue(this,e,t,!0)},t(V,W),V.prototype.toKeyedSeq=function(){return this},t(Z,W),Z.of=function(){return Z(arguments)},Z.prototype.toIndexedSeq=function(){return this},Z.prototype.toString=function(){return this.__toString("Seq [","]")},Z.prototype.__iterate=function(e,t){return ce(this,e,t,!1)},Z.prototype.__iterator=function(e,t){return ue(this,e,t,!1)},t(J,W),J.of=function(){return J(arguments)},J.prototype.toSetSeq=function(){return this},W.isSeq=re,W.Keyed=V,W.Set=J,W.Indexed=Z;var K,Q,X,$="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function re(e){return!(!e||!e[$])}function ae(){return K||(K=new ee([]))}function ie(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():F(e)?new oe(e).fromEntrySeq():H(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function le(e){return q(e)?new ee(e):F(e)?new oe(e):H(e)?new ne(e):void 0}function ce(e,t,n,o){var r=e._cache;if(r){for(var a=r.length-1,i=0;i<=a;i++){var s=r[n?a-i:i];if(!1===t(s[1],o?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function ue(e,t,n,o){var r=e._cache;if(r){var a=r.length-1,i=0;return new B(function(){var e=r[n?a-i:i];return i++>a?{value:void 0,done:!0}:Y(t,o?e[0]:i-1,e[1])})}return e.__iteratorUncached(t,n)}function de(e,t){return t?function e(t,n,o,r){return Array.isArray(n)?t.call(r,o,Z(n).map(function(o,r){return e(t,o,r,n)})):me(n)?t.call(r,o,V(n).map(function(o,r){return e(t,o,r,n)})):n}(t,e,"",{"":e}):pe(e)}function pe(e){return Array.isArray(e)?Z(e).map(pe).toList():me(e)?V(e).map(pe).toMap():e}function me(e){return e&&(e.constructor===Object||void 0===e.constructor)}function fe(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function he(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(u(e)){var o=e.entries();return t.every(function(e,t){var r=o.next().value;return r&&fe(r[1],e)&&(n||fe(r[0],t))})&&o.next().done}var r=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{r=!0;var a=e;e=t,t=a}var d=!0,p=t.__iterate(function(t,o){if(n?!e.has(t):r?!fe(t,e.get(o,v)):!fe(e.get(o,v),t))return d=!1,!1});return d&&e.size===p}function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Q)return Q;Q=this}}function ye(e,t){if(!e)throw new Error(t)}function ve(e,t,n){if(!(this instanceof ve))return new ve(e,t,n);if(ye(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(X)return X;X=this}}function be(){throw TypeError("Abstract")}function _e(){}function we(){}function Me(){}W.prototype[$]=!0,t(ee,Z),ee.prototype.get=function(e,t){return this.has(e)?this._array[C(this,e)]:t},ee.prototype.__iterate=function(e,t){for(var n=this._array,o=n.length-1,r=0;r<=o;r++)if(!1===e(n[t?o-r:r],r,this))return r+1;return r},ee.prototype.__iterator=function(e,t){var n=this._array,o=n.length-1,r=0;return new B(function(){return r>o?{value:void 0,done:!0}:Y(e,r,n[t?o-r++:r++])})},t(te,V),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,o=this._keys,r=o.length-1,a=0;a<=r;a++){var i=o[t?r-a:a];if(!1===e(n[i],i,this))return a+1}return a},te.prototype.__iterator=function(e,t){var n=this._object,o=this._keys,r=o.length-1,a=0;return new B(function(){var i=o[t?r-a:a];return a++>r?{value:void 0,done:!0}:Y(e,i,n[i])})},te.prototype[f]=!0,t(ne,Z),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,o=U(n),r=0;if(F(o))for(var a;!(a=o.next()).done&&!1!==e(a.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,o=U(n);if(!F(o))return new B(z);var r=0;return new B(function(){var t=o.next();return t.done?t:Y(e,r++,t.value)})},t(oe,Z),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,o=this._iterator,r=this._iteratorCache,a=0;a<r.length;)if(!1===e(r[a],a++,this))return a;for(;!(n=o.next()).done;){var i=n.value;if(r[a]=i,!1===e(i,a++,this))break}return a},oe.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,o=this._iteratorCache,r=0;return new B(function(){if(r>=o.length){var t=n.next();if(t.done)return t;o[r]=t.value}return Y(e,r,o[r++])})},t(ge,Z),ge.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ge.prototype.get=function(e,t){return this.has(e)?this._value:t},ge.prototype.includes=function(e){return fe(this._value,e)},ge.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:new ge(this._value,D(t,n)-L(e,n))},ge.prototype.reverse=function(){return this},ge.prototype.indexOf=function(e){return fe(this._value,e)?0:-1},ge.prototype.lastIndexOf=function(e){return fe(this._value,e)?this.size:-1},ge.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ge.prototype.__iterator=function(e,t){var n=this,o=0;return new B(function(){return o<n.size?Y(e,o++,n._value):{value:void 0,done:!0}})},ge.prototype.equals=function(e){return e instanceof ge?fe(this._value,e._value):he(e)},t(ve,Z),ve.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ve.prototype.get=function(e,t){return this.has(e)?this._start+C(this,e)*this._step:t},ve.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ve.prototype.slice=function(e,t){return O(e,t,this.size)?this:(e=L(e,this.size),(t=D(t,this.size))<=e?new ve(0,0):new ve(this.get(e,this._end),this.get(t,this._end),this._step))},ve.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ve.prototype.lastIndexOf=function(e){return this.indexOf(e)},ve.prototype.__iterate=function(e,t){for(var n=this.size-1,o=this._step,r=t?this._start+n*o:this._start,a=0;a<=n;a++){if(!1===e(r,a,this))return a+1;r+=t?-o:o}return a},ve.prototype.__iterator=function(e,t){var n=this.size-1,o=this._step,r=t?this._start+n*o:this._start,a=0;return new B(function(){var i=r;return r+=t?-o:o,a>n?{value:void 0,done:!0}:Y(e,a++,i)})},ve.prototype.equals=function(e){return e instanceof ve?this._start===e._start&&this._end===e._end&&this._step===e._step:he(this,e)},t(be,n),t(_e,be),t(we,be),t(Me,be),be.Keyed=_e,be.Indexed=we,be.Set=Me;var Te="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),o=65535&(t|=0);return n*o+((e>>>16)*o+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Ee(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Pe?function(e){var t=Re[e];return void 0===t&&(t=Ce(e),je===Ne&&(je=0,Re={}),je++,Re[e]=t),t}(e):Ce(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(De&&void 0!==(t=xe.get(e)))return t;if(void 0!==(t=e[Ie]))return t;if(!Le){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ie]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++ke,1073741824&ke&&(ke=0),De)xe.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Le)Object.defineProperty(e,Ie,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ie]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ie]=t}}return t}(e);if("function"==typeof e.toString)return Ce(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function Ce(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Se(t)}var xe,Oe=Object.isExtensible,Le=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),De="function"==typeof WeakMap;De&&(xe=new WeakMap);var ke=0,Ie="__immutablehash__";"function"==typeof Symbol&&(Ie=Symbol(Ie));var Pe=16,Ne=255,je=0,Re={};function Ae(e){ye(e!==1/0,"Cannot perform this action with an infinite size.")}function Be(e){return null==e?Xe():Ye(e)&&!u(e)?e:Xe().withMutations(function(t){var n=o(e);Ae(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ye(e){return!(!e||!e[He])}t(Be,_e),Be.of=function(){var t=e.call(arguments,0);return Xe().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Be.prototype.toString=function(){return this.__toString("Map {","}")},Be.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Be.prototype.set=function(e,t){return $e(this,e,t)},Be.prototype.setIn=function(e,t){return this.updateIn(e,v,function(){return t})},Be.prototype.remove=function(e){return $e(this,e,v)},Be.prototype.deleteIn=function(e){return this.updateIn(e,function(){return v})},Be.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Be.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var o=function e(t,n,o,r){var a=t===v,i=n.next();if(i.done){var s=a?o:t,l=r(s);return l===s?t:l}ye(a||t&&t.set,"invalid keyPath");var c=i.value,u=a?v:t.get(c,v),d=e(u,n,o,r);return d===u?t:d===v?t.remove(c):(a?Xe():t).set(c,d)}(this,nn(e),t,n);return o===v?void 0:o},Be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xe()},Be.prototype.merge=function(){return ot(this,void 0,arguments)},Be.prototype.mergeWith=function(t){var n=e.call(arguments,1);return ot(this,t,n)},Be.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Be.prototype.mergeDeep=function(){return ot(this,rt,arguments)},Be.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ot(this,at(t),n)},Be.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Be.prototype.sort=function(e){return Lt(qt(this,e))},Be.prototype.sortBy=function(e,t){return Lt(qt(this,t,e))},Be.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Be.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new T)},Be.prototype.asImmutable=function(){return this.__ensureOwner()},Be.prototype.wasAltered=function(){return this.__altered},Be.prototype.__iterator=function(e,t){return new Ze(this,e,t)},Be.prototype.__iterate=function(e,t){var n=this,o=0;return this._root&&this._root.iterate(function(t){return o++,e(t[1],t[0],n)},t),o},Be.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Qe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Be.isMap=Ye;var ze,He="@@__IMMUTABLE_MAP__@@",Fe=Be.prototype;function Ue(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function qe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function We(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ze(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ke(e._root)}function Je(e,t){return Y(e,t[0],t[1])}function Ke(e,t){return{node:e,index:0,__prev:t}}function Qe(e,t,n,o){var r=Object.create(Fe);return r.size=e,r._root=t,r.__ownerID=n,r.__hash=o,r.__altered=!1,r}function Xe(){return ze||(ze=Qe(0))}function $e(e,t,n){var o,r;if(e._root){var a=w(b),i=w(_);if(o=et(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;r=e.size+(a.value?n===v?-1:1:0)}else{if(n===v)return e;r=1,o=new Ue(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=r,e._root=o,e.__hash=void 0,e.__altered=!0,e):o?Qe(r,o):Xe()}function et(e,t,n,o,r,a,i,s){return e?e.update(t,n,o,r,a,i,s):a===v?e:(M(s),M(i),new Ve(t,o,[r,a]))}function tt(e){return e.constructor===Ve||e.constructor===We}function nt(e,t,n,o,r){if(e.keyHash===o)return new We(t,o,[e.entry,r]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?o:o>>>n)&y,l=i===s?[nt(e,t,n+h,o,r)]:(a=new Ve(t,o,r),i<s?[e,a]:[a,e]);return new Ge(t,1<<i|1<<s,l)}function ot(e,t,n){for(var r=[],a=0;a<n.length;a++){var s=n[a],l=o(s);i(s)||(l=l.map(function(e){return de(e)})),r.push(l)}return it(e,t,r)}function rt(e,t,n){return e&&e.mergeDeep&&i(t)?e.mergeDeep(t):fe(e,t)?e:t}function at(e){return function(t,n,o){if(t&&t.mergeDeepWith&&i(n))return t.mergeDeepWith(e,n);var r=e(t,n,o);return fe(t,r)?t:r}}function it(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var o=t?function(n,o){e.update(o,v,function(e){return e===v?n:t(e,n,o)})}:function(t,n){e.set(n,t)},r=0;r<n.length;r++)n[r].forEach(o)}):e.constructor(n[0])}function st(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function lt(e,t,n,o){var r=o?e:S(e);return r[t]=n,r}Fe[He]=!0,Fe.delete=Fe.remove,Fe.removeIn=Fe.deleteIn,Ue.prototype.get=function(e,t,n,o){for(var r=this.entries,a=0,i=r.length;a<i;a++)if(fe(n,r[a][0]))return r[a][1];return o},Ue.prototype.update=function(e,t,n,o,r,a,i){for(var s=r===v,l=this.entries,c=0,u=l.length;c<u&&!fe(o,l[c][0]);c++);var d=c<u;if(d?l[c][1]===r:s)return this;if(M(i),(s||!d)&&M(a),!s||1!==l.length){if(!d&&!s&&l.length>=ct)return function(e,t,n,o){e||(e=new T);for(var r=new Ve(e,Ee(n),[n,o]),a=0;a<t.length;a++){var i=t[a];r=r.update(e,0,void 0,i[0],i[1])}return r}(e,l,o,r);var p=e&&e===this.ownerID,m=p?l:S(l);return d?s?c===u-1?m.pop():m[c]=m.pop():m[c]=[o,r]:m.push([o,r]),p?(this.entries=m,this):new Ue(e,m)}},Ge.prototype.get=function(e,t,n,o){void 0===t&&(t=Ee(n));var r=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&r)?o:this.nodes[st(a&r-1)].get(e+h,t,n,o)},Ge.prototype.update=function(e,t,n,o,r,a,i){void 0===n&&(n=Ee(o));var s=(0===t?n:n>>>t)&y,l=1<<s,c=this.bitmap,u=0!=(c&l);if(!u&&r===v)return this;var d=st(c&l-1),p=this.nodes,m=u?p[d]:void 0,f=et(m,e,t+h,n,o,r,a,i);if(f===m)return this;if(!u&&f&&p.length>=ut)return function(e,t,n,o,r){for(var a=0,i=new Array(g),s=0;0!==n;s++,n>>>=1)i[s]=1&n?t[a++]:void 0;return i[o]=r,new qe(e,a+1,i)}(e,p,c,s,f);if(u&&!f&&2===p.length&&tt(p[1^d]))return p[1^d];if(u&&f&&1===p.length&&tt(f))return f;var b=e&&e===this.ownerID,_=u?f?c:c^l:c|l,w=u?f?lt(p,d,f,b):function(e,t,n){var o=e.length-1;if(n&&t===o)return e.pop(),e;for(var r=new Array(o),a=0,i=0;i<o;i++)i===t&&(a=1),r[i]=e[i+a];return r}(p,d,b):function(e,t,n,o){var r=e.length+1;if(o&&t+1===r)return e[t]=n,e;for(var a=new Array(r),i=0,s=0;s<r;s++)s===t?(a[s]=n,i=-1):a[s]=e[s+i];return a}(p,d,f,b);return b?(this.bitmap=_,this.nodes=w,this):new Ge(e,_,w)},qe.prototype.get=function(e,t,n,o){void 0===t&&(t=Ee(n));var r=(0===e?t:t>>>e)&y,a=this.nodes[r];return a?a.get(e+h,t,n,o):o},qe.prototype.update=function(e,t,n,o,r,a,i){void 0===n&&(n=Ee(o));var s=(0===t?n:n>>>t)&y,l=r===v,c=this.nodes,u=c[s];if(l&&!u)return this;var d=et(u,e,t+h,n,o,r,a,i);if(d===u)return this;var p=this.count;if(u){if(!d&&--p<dt)return function(e,t,n,o){for(var r=0,a=0,i=new Array(n),s=0,l=1,c=t.length;s<c;s++,l<<=1){var u=t[s];void 0!==u&&s!==o&&(r|=l,i[a++]=u)}return new Ge(e,r,i)}(e,c,p,s)}else p++;var m=e&&e===this.ownerID,f=lt(c,s,d,m);return m?(this.count=p,this.nodes=f,this):new qe(e,p,f)},We.prototype.get=function(e,t,n,o){for(var r=this.entries,a=0,i=r.length;a<i;a++)if(fe(n,r[a][0]))return r[a][1];return o},We.prototype.update=function(e,t,n,o,r,a,i){void 0===n&&(n=Ee(o));var s=r===v;if(n!==this.keyHash)return s?this:(M(i),M(a),nt(this,e,t,n,[o,r]));for(var l=this.entries,c=0,u=l.length;c<u&&!fe(o,l[c][0]);c++);var d=c<u;if(d?l[c][1]===r:s)return this;if(M(i),(s||!d)&&M(a),s&&2===u)return new Ve(e,this.keyHash,l[1^c]);var p=e&&e===this.ownerID,m=p?l:S(l);return d?s?c===u-1?m.pop():m[c]=m.pop():m[c]=[o,r]:m.push([o,r]),p?(this.entries=m,this):new We(e,this.keyHash,m)},Ve.prototype.get=function(e,t,n,o){return fe(n,this.entry[0])?this.entry[1]:o},Ve.prototype.update=function(e,t,n,o,r,a,i){var s=r===v,l=fe(o,this.entry[0]);return(l?r===this.entry[1]:s)?this:(M(i),s?void M(a):l?e&&e===this.ownerID?(this.entry[1]=r,this):new Ve(e,this.keyHash,[o,r]):(M(a),nt(this,e,t,Ee(o),[o,r])))},Ue.prototype.iterate=We.prototype.iterate=function(e,t){for(var n=this.entries,o=0,r=n.length-1;o<=r;o++)if(!1===e(n[t?r-o:o]))return!1},Ge.prototype.iterate=qe.prototype.iterate=function(e,t){for(var n=this.nodes,o=0,r=n.length-1;o<=r;o++){var a=n[t?r-o:o];if(a&&!1===a.iterate(e,t))return!1}},Ve.prototype.iterate=function(e,t){return e(this.entry)},t(Ze,B),Ze.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,o=t.node,r=t.index++;if(o.entry){if(0===r)return Je(e,o.entry)}else if(o.entries){if(n=o.entries.length-1,r<=n)return Je(e,o.entries[this._reverse?n-r:r])}else if(n=o.nodes.length-1,r<=n){var a=o.nodes[this._reverse?n-r:r];if(a){if(a.entry)return Je(e,a.entry);t=this._stack=Ke(a,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var ct=g/4,ut=g/2,dt=g/4;function pt(e){var t=Mt();if(null==e)return t;if(mt(e))return e;var n=r(e),o=n.size;return 0===o?t:(Ae(o),o>0&&o<g?wt(0,o,h,null,new gt(n.toArray())):t.withMutations(function(e){e.setSize(o),n.forEach(function(t,n){return e.set(n,t)})}))}function mt(e){return!(!e||!e[ft])}t(pt,we),pt.of=function(){return this(arguments)},pt.prototype.toString=function(){return this.__toString("List [","]")},pt.prototype.get=function(e,t){if((e=C(this,e))>=0&&e<this.size){var n=Et(this,e+=this._origin);return n&&n.array[e&y]}return t},pt.prototype.set=function(e,t){return function(e,t,n){if((t=C(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Ct(e,t).set(0,n):Ct(e,0,t+1).set(t,n)});t+=e._origin;var o=e._tail,r=e._root,a=w(_);return t>=Ot(e._capacity)?o=Tt(o,e.__ownerID,0,t,n,a):r=Tt(r,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=r,e._tail=o,e.__hash=void 0,e.__altered=!0,e):wt(e._origin,e._capacity,e._level,r,o):e}(this,e,t)},pt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},pt.prototype.insert=function(e,t){return this.splice(e,0,t)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=h,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Mt()},pt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Ct(n,0,t+e.length);for(var o=0;o<e.length;o++)n.set(t+o,e[o])})},pt.prototype.pop=function(){return Ct(this,0,-1)},pt.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Ct(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},pt.prototype.shift=function(){return Ct(this,1)},pt.prototype.merge=function(){return xt(this,void 0,arguments)},pt.prototype.mergeWith=function(t){var n=e.call(arguments,1);return xt(this,t,n)},pt.prototype.mergeDeep=function(){return xt(this,rt,arguments)},pt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return xt(this,at(t),n)},pt.prototype.setSize=function(e){return Ct(this,0,e)},pt.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:Ct(this,L(e,n),D(t,n))},pt.prototype.__iterator=function(e,t){var n=0,o=_t(this,t);return new B(function(){var t=o();return t===bt?{value:void 0,done:!0}:Y(e,n++,t)})},pt.prototype.__iterate=function(e,t){for(var n,o=0,r=_t(this,t);(n=r())!==bt&&!1!==e(n,o++,this););return o},pt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},pt.isList=mt;var ft="@@__IMMUTABLE_LIST__@@",ht=pt.prototype;function gt(e,t){this.array=e,this.ownerID=t}ht[ft]=!0,ht.delete=ht.remove,ht.setIn=Fe.setIn,ht.deleteIn=ht.removeIn=Fe.removeIn,ht.update=Fe.update,ht.updateIn=Fe.updateIn,ht.mergeIn=Fe.mergeIn,ht.mergeDeepIn=Fe.mergeDeepIn,ht.withMutations=Fe.withMutations,ht.asMutable=Fe.asMutable,ht.asImmutable=Fe.asImmutable,ht.wasAltered=Fe.wasAltered,gt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var o=n>>>t&y;if(o>=this.array.length)return new gt([],e);var r,a=0===o;if(t>0){var i=this.array[o];if((r=i&&i.removeBefore(e,t-h,n))===i&&a)return this}if(a&&!r)return this;var s=St(this,e);if(!a)for(var l=0;l<o;l++)s.array[l]=void 0;return r&&(s.array[o]=r),s},gt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var o,r=n-1>>>t&y;if(r>=this.array.length)return this;if(t>0){var a=this.array[r];if((o=a&&a.removeAfter(e,t-h,n))===a&&r===this.array.length-1)return this}var i=St(this,e);return i.array.splice(r+1),o&&(i.array[r]=o),i};var yt,vt,bt={};function _t(e,t){var n=e._origin,o=e._capacity,r=Ot(o),a=e._tail;return i(e._root,e._level,0);function i(e,s,l){return 0===s?function(e,i){var s=i===r?a&&a.array:e&&e.array,l=i>n?0:n-i,c=o-i;return c>g&&(c=g),function(){if(l===c)return bt;var e=t?--c:l++;return s&&s[e]}}(e,l):function(e,r,a){var s,l=e&&e.array,c=a>n?0:n-a>>r,u=1+(o-a>>r);return u>g&&(u=g),function(){for(;;){if(s){var e=s();if(e!==bt)return e;s=null}if(c===u)return bt;var n=t?--u:c++;s=i(l&&l[n],r-h,a+(n<<r))}}}(e,s,l)}}function wt(e,t,n,o,r,a,i){var s=Object.create(ht);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=o,s._tail=r,s.__ownerID=a,s.__hash=i,s.__altered=!1,s}function Mt(){return yt||(yt=wt(0,0,h))}function Tt(e,t,n,o,r,a){var i,s=o>>>n&y,l=e&&s<e.array.length;if(!l&&void 0===r)return e;if(n>0){var c=e&&e.array[s],u=Tt(c,t,n-h,o,r,a);return u===c?e:((i=St(e,t)).array[s]=u,i)}return l&&e.array[s]===r?e:(M(a),i=St(e,t),void 0===r&&s===i.array.length-1?i.array.pop():i.array[s]=r,i)}function St(e,t){return t&&e&&t===e.ownerID?e:new gt(e?e.array.slice():[],t)}function Et(e,t){if(t>=Ot(e._capacity))return e._tail;if(t<1<<e._level+h){for(var n=e._root,o=e._level;n&&o>0;)n=n.array[t>>>o&y],o-=h;return n}}function Ct(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var o=e.__ownerID||new T,r=e._origin,a=e._capacity,i=r+t,s=void 0===n?a:n<0?a+n:r+n;if(i===r&&s===a)return e;if(i>=s)return e.clear();for(var l=e._level,c=e._root,u=0;i+u<0;)c=new gt(c&&c.array.length?[void 0,c]:[],o),u+=1<<(l+=h);u&&(i+=u,r+=u,s+=u,a+=u);for(var d=Ot(a),p=Ot(s);p>=1<<l+h;)c=new gt(c&&c.array.length?[c]:[],o),l+=h;var m=e._tail,f=p<d?Et(e,s-1):p>d?new gt([],o):m;if(m&&p>d&&i<a&&m.array.length){for(var g=c=St(c,o),v=l;v>h;v-=h){var b=d>>>v&y;g=g.array[b]=St(g.array[b],o)}g.array[d>>>h&y]=m}if(s<a&&(f=f&&f.removeAfter(o,0,s)),i>=p)i-=p,s-=p,l=h,c=null,f=f&&f.removeBefore(o,0,i);else if(i>r||p<d){for(u=0;c;){var _=i>>>l&y;if(_!==p>>>l&y)break;_&&(u+=(1<<l)*_),l-=h,c=c.array[_]}c&&i>r&&(c=c.removeBefore(o,l,i-u)),c&&p<d&&(c=c.removeAfter(o,l,p-u)),u&&(i-=u,s-=u)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=c,e._tail=f,e.__hash=void 0,e.__altered=!0,e):wt(i,s,l,c,f)}function xt(e,t,n){for(var o=[],a=0,s=0;s<n.length;s++){var l=n[s],c=r(l);c.size>a&&(a=c.size),i(l)||(c=c.map(function(e){return de(e)})),o.push(c)}return a>e.size&&(e=e.setSize(a)),it(e,t,o)}function Ot(e){return e<g?0:e-1>>>h<<h}function Lt(e){return null==e?It():Dt(e)?e:It().withMutations(function(t){var n=o(e);Ae(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Dt(e){return Ye(e)&&u(e)}function kt(e,t,n,o){var r=Object.create(Lt.prototype);return r.size=e?e.size:0,r._map=e,r._list=t,r.__ownerID=n,r.__hash=o,r}function It(){return vt||(vt=kt(Xe(),Mt()))}function Pt(e,t,n){var o,r,a=e._map,i=e._list,s=a.get(t),l=void 0!==s;if(n===v){if(!l)return e;i.size>=g&&i.size>=2*a.size?(r=i.filter(function(e,t){return void 0!==e&&s!==t}),o=r.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(o.__ownerID=r.__ownerID=e.__ownerID)):(o=a.remove(t),r=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(n===i.get(s)[1])return e;o=a,r=i.set(s,[t,n])}else o=a.set(t,i.size),r=i.set(i.size,[t,n]);return e.__ownerID?(e.size=o.size,e._map=o,e._list=r,e.__hash=void 0,e):kt(o,r)}function Nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function jt(e){this._iter=e,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function At(e){this._iter=e,this.size=e.size}function Bt(e){var t=$t(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=en,t.__iterateUncached=function(t,n){var o=this;return e.__iterate(function(e,n){return!1!==t(n,e,o)},n)},t.__iteratorUncached=function(t,n){if(t===N){var o=e.__iterator(t,n);return new B(function(){var e=o.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===P?I:P,n)},t}function Yt(e,t,n){var o=$t(e);return o.size=e.size,o.has=function(t){return e.has(t)},o.get=function(o,r){var a=e.get(o,v);return a===v?r:t.call(n,a,o,e)},o.__iterateUncached=function(o,r){var a=this;return e.__iterate(function(e,r,i){return!1!==o(t.call(n,e,r,i),r,a)},r)},o.__iteratorUncached=function(o,r){var a=e.__iterator(N,r);return new B(function(){var r=a.next();if(r.done)return r;var i=r.value,s=i[0];return Y(o,s,t.call(n,i[1],s,e),r)})},o}function zt(e,t){var n=$t(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Bt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,o){return e.get(t?n:-1-n,o)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=en,n.__iterate=function(t,n){var o=this;return e.__iterate(function(e,n){return t(e,n,o)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Ht(e,t,n,o){var r=$t(e);return o&&(r.has=function(o){var r=e.get(o,v);return r!==v&&!!t.call(n,r,o,e)},r.get=function(o,r){var a=e.get(o,v);return a!==v&&t.call(n,a,o,e)?a:r}),r.__iterateUncached=function(r,a){var i=this,s=0;return e.__iterate(function(e,a,l){if(t.call(n,e,a,l))return s++,r(e,o?a:s-1,i)},a),s},r.__iteratorUncached=function(r,a){var i=e.__iterator(N,a),s=0;return new B(function(){for(;;){var a=i.next();if(a.done)return a;var l=a.value,c=l[0],u=l[1];if(t.call(n,u,c,e))return Y(r,o?c:s++,u,a)}})},r}function Ft(e,t,n,o){var r=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=r:n|=0),O(t,n,r))return e;var a=L(t,r),i=D(n,r);if(a!=a||i!=i)return Ft(e.toSeq().cacheResult(),t,n,o);var s,l=i-a;l==l&&(s=l<0?0:l);var c=$t(e);return c.size=0===s?s:e.size&&s||void 0,!o&&re(e)&&s>=0&&(c.get=function(t,n){return(t=C(this,t))>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var r=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var i=0,l=!0,c=0;return e.__iterate(function(e,n){if(!l||!(l=i++<a))return c++,!1!==t(e,o?n:c-1,r)&&c!==s}),c},c.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var r=0!==s&&e.__iterator(t,n),i=0,l=0;return new B(function(){for(;i++<a;)r.next();if(++l>s)return{value:void 0,done:!0};var e=r.next();return o||t===P?e:Y(t,l-1,t===I?void 0:e.value[1],e)})},c}function Ut(e,t,n,o){var r=$t(e);return r.__iterateUncached=function(r,a){var i=this;if(a)return this.cacheResult().__iterate(r,a);var s=!0,l=0;return e.__iterate(function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return l++,r(e,o?a:l-1,i)}),l},r.__iteratorUncached=function(r,a){var i=this;if(a)return this.cacheResult().__iterator(r,a);var s=e.__iterator(N,a),l=!0,c=0;return new B(function(){var e,a,u;do{if((e=s.next()).done)return o||r===P?e:Y(r,c++,r===I?void 0:e.value[1],e);var d=e.value;a=d[0],u=d[1],l&&(l=t.call(n,u,a,i))}while(l);return r===N?e:Y(r,a,u,e)})},r}function Gt(e,t,n){var o=$t(e);return o.__iterateUncached=function(o,r){var a=0,s=!1;return function e(l,c){var u=this;l.__iterate(function(r,l){return(!t||c<t)&&i(r)?e(r,c+1):!1===o(r,n?l:a++,u)&&(s=!0),!s},r)}(e,0),a},o.__iteratorUncached=function(o,r){var a=e.__iterator(o,r),s=[],l=0;return new B(function(){for(;a;){var e=a.next();if(!1===e.done){var c=e.value;if(o===N&&(c=c[1]),t&&!(s.length<t)||!i(c))return n?e:Y(o,l++,c,e);s.push(a),a=c.__iterator(o,r)}else a=s.pop()}return{value:void 0,done:!0}})},o}function qt(e,t,n){t||(t=tn);var o=s(e),r=0,a=e.toSeq().map(function(t,o){return[o,t,r++,n?n(t,o,e):t]}).toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(o?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),o?V(a):l(e)?Z(a):J(a)}function Wt(e,t,n){if(t||(t=tn),n){var o=e.toSeq().map(function(t,o){return[t,n(t,o,e)]}).reduce(function(e,n){return Vt(t,e[1],n[1])?n:e});return o&&o[0]}return e.reduce(function(e,n){return Vt(t,e,n)?n:e})}function Vt(e,t,n){var o=e(n,t);return 0===o&&n!==t&&(null==n||n!=n)||o>0}function Zt(e,t,o){var r=$t(e);return r.size=new ee(o).map(function(e){return e.size}).min(),r.__iterate=function(e,t){for(var n,o=this.__iterator(P,t),r=0;!(n=o.next()).done&&!1!==e(n.value,r++,this););return r},r.__iteratorUncached=function(e,r){var a=o.map(function(e){return e=n(e),U(r?e.reverse():e)}),i=0,s=!1;return new B(function(){var n;return s||(n=a.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?{value:void 0,done:!0}:Y(e,i++,t.apply(null,n.map(function(e){return e.value})))})},r}function Jt(e,t){return re(e)?t:e.constructor(t)}function Kt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Qt(e){return Ae(e.size),E(e)}function Xt(e){return s(e)?o:l(e)?r:a}function $t(e){return Object.create((s(e)?V:l(e)?Z:J).prototype)}function en(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function tn(e,t){return e>t?1:e<t?-1:0}function nn(e){var t=U(e);if(!t){if(!q(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function on(e,t){var n,o=function(a){if(a instanceof o)return a;if(!(this instanceof o))return new o(a);if(!n){n=!0;var i=Object.keys(e);!function(e,t){try{t.forEach(function(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){ye(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}.bind(void 0,e))}catch(e){}}(r,i),r.size=i.length,r._name=t,r._keys=i,r._defaultValues=e}this._map=Be(a)},r=o.prototype=Object.create(rn);return r.constructor=o,o}t(Lt,Be),Lt.of=function(){return this(arguments)},Lt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Lt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):It()},Lt.prototype.set=function(e,t){return Pt(this,e,t)},Lt.prototype.remove=function(e){return Pt(this,e,v)},Lt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Lt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Lt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Lt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?kt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Lt.isOrderedMap=Dt,Lt.prototype[f]=!0,Lt.prototype.delete=Lt.prototype.remove,t(Nt,V),Nt.prototype.get=function(e,t){return this._iter.get(e,t)},Nt.prototype.has=function(e){return this._iter.has(e)},Nt.prototype.valueSeq=function(){return this._iter.valueSeq()},Nt.prototype.reverse=function(){var e=this,t=zt(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Nt.prototype.map=function(e,t){var n=this,o=Yt(this,e,t);return this._useKeys||(o.valueSeq=function(){return n._iter.toSeq().map(e,t)}),o},Nt.prototype.__iterate=function(e,t){var n,o=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,o)}:(n=t?Qt(this):0,function(r){return e(r,t?--n:n++,o)}),t)},Nt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(P,t),o=t?Qt(this):0;return new B(function(){var r=n.next();return r.done?r:Y(e,t?--o:o++,r.value,r)})},Nt.prototype[f]=!0,t(jt,Z),jt.prototype.includes=function(e){return this._iter.includes(e)},jt.prototype.__iterate=function(e,t){var n=this,o=0;return this._iter.__iterate(function(t){return e(t,o++,n)},t)},jt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t),o=0;return new B(function(){var t=n.next();return t.done?t:Y(e,o++,t.value,t)})},t(Rt,J),Rt.prototype.has=function(e){return this._iter.includes(e)},Rt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Rt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new B(function(){var t=n.next();return t.done?t:Y(e,t.value,t.value,t)})},t(At,V),At.prototype.entrySeq=function(){return this._iter.toSeq()},At.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Kt(t);var o=i(t);return e(o?t.get(1):t[1],o?t.get(0):t[0],n)}},t)},At.prototype.__iterator=function(e,t){var n=this._iter.__iterator(P,t);return new B(function(){for(;;){var t=n.next();if(t.done)return t;var o=t.value;if(o){Kt(o);var r=i(o);return Y(e,r?o.get(0):o[0],r?o.get(1):o[1],t)}}})},jt.prototype.cacheResult=Nt.prototype.cacheResult=Rt.prototype.cacheResult=At.prototype.cacheResult=en,t(on,_e),on.prototype.toString=function(){return this.__toString(sn(this)+" {","}")},on.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},on.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},on.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=an(this,Xe()))},on.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+sn(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var o=this._map&&this._map.set(e,t);return this.__ownerID||o===this._map?this:an(this,o)},on.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:an(this,t)},on.prototype.wasAltered=function(){return this._map.wasAltered()},on.prototype.__iterator=function(e,t){var n=this;return o(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},on.prototype.__iterate=function(e,t){var n=this;return o(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},on.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?an(this,t,e):(this.__ownerID=e,this._map=t,this)};var rn=on.prototype;function an(e,t,n){var o=Object.create(Object.getPrototypeOf(e));return o._map=t,o.__ownerID=n,o}function sn(e){return e._name||e.constructor.name||"Record"}function ln(e){return null==e?hn():cn(e)&&!u(e)?e:hn().withMutations(function(t){var n=a(e);Ae(n.size),n.forEach(function(e){return t.add(e)})})}function cn(e){return!(!e||!e[dn])}rn.delete=rn.remove,rn.deleteIn=rn.removeIn=Fe.removeIn,rn.merge=Fe.merge,rn.mergeWith=Fe.mergeWith,rn.mergeIn=Fe.mergeIn,rn.mergeDeep=Fe.mergeDeep,rn.mergeDeepWith=Fe.mergeDeepWith,rn.mergeDeepIn=Fe.mergeDeepIn,rn.setIn=Fe.setIn,rn.update=Fe.update,rn.updateIn=Fe.updateIn,rn.withMutations=Fe.withMutations,rn.asMutable=Fe.asMutable,rn.asImmutable=Fe.asImmutable,t(ln,Me),ln.of=function(){return this(arguments)},ln.fromKeys=function(e){return this(o(e).keySeq())},ln.prototype.toString=function(){return this.__toString("Set {","}")},ln.prototype.has=function(e){return this._map.has(e)},ln.prototype.add=function(e){return mn(this,this._map.set(e,!0))},ln.prototype.remove=function(e){return mn(this,this._map.remove(e))},ln.prototype.clear=function(){return mn(this,this._map.clear())},ln.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)a(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},ln.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},ln.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return a(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},ln.prototype.merge=function(){return this.union.apply(this,arguments)},ln.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},ln.prototype.sort=function(e){return gn(qt(this,e))},ln.prototype.sortBy=function(e,t){return gn(qt(this,t,e))},ln.prototype.wasAltered=function(){return this._map.wasAltered()},ln.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,o){return e(o,o,n)},t)},ln.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},ln.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},ln.isSet=cn;var un,dn="@@__IMMUTABLE_SET__@@",pn=ln.prototype;function mn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function fn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function hn(){return un||(un=fn(Xe()))}function gn(e){return null==e?wn():yn(e)?e:wn().withMutations(function(t){var n=a(e);Ae(n.size),n.forEach(function(e){return t.add(e)})})}function yn(e){return cn(e)&&u(e)}pn[dn]=!0,pn.delete=pn.remove,pn.mergeDeep=pn.merge,pn.mergeDeepWith=pn.mergeWith,pn.withMutations=Fe.withMutations,pn.asMutable=Fe.asMutable,pn.asImmutable=Fe.asImmutable,pn.__empty=hn,pn.__make=fn,t(gn,ln),gn.of=function(){return this(arguments)},gn.fromKeys=function(e){return this(o(e).keySeq())},gn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},gn.isOrderedSet=yn;var vn,bn=gn.prototype;function _n(e,t){var n=Object.create(bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function wn(){return vn||(vn=_n(It()))}function Mn(e){return null==e?On():Tn(e)?e:On().unshiftAll(e)}function Tn(e){return!(!e||!e[En])}bn[f]=!0,bn.__empty=wn,bn.__make=_n,t(Mn,we),Mn.of=function(){return this(arguments)},Mn.prototype.toString=function(){return this.__toString("Stack [","]")},Mn.prototype.get=function(e,t){var n=this._head;for(e=C(this,e);n&&e--;)n=n.next;return n?n.value:t},Mn.prototype.peek=function(){return this._head&&this._head.value},Mn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):xn(e,t)},Mn.prototype.pushAll=function(e){if(0===(e=r(e)).size)return this;Ae(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):xn(t,n)},Mn.prototype.pop=function(){return this.slice(1)},Mn.prototype.unshift=function(){return this.push.apply(this,arguments)},Mn.prototype.unshiftAll=function(e){return this.pushAll(e)},Mn.prototype.shift=function(){return this.pop.apply(this,arguments)},Mn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):On()},Mn.prototype.slice=function(e,t){if(O(e,t,this.size))return this;var n=L(e,this.size),o=D(t,this.size);if(o!==this.size)return we.prototype.slice.call(this,e,t);for(var r=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=r,this._head=a,this.__hash=void 0,this.__altered=!0,this):xn(r,a)},Mn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Mn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,o=this._head;o&&!1!==e(o.value,n++,this);)o=o.next;return n},Mn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,o=this._head;return new B(function(){if(o){var t=o.value;return o=o.next,Y(e,n++,t)}return{value:void 0,done:!0}})},Mn.isStack=Tn;var Sn,En="@@__IMMUTABLE_STACK__@@",Cn=Mn.prototype;function xn(e,t,n,o){var r=Object.create(Cn);return r.size=e,r._head=t,r.__ownerID=n,r.__hash=o,r.__altered=!1,r}function On(){return Sn||(Sn=xn(0))}function Ln(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Cn[En]=!0,Cn.withMutations=Fe.withMutations,Cn.asMutable=Fe.asMutable,Cn.asImmutable=Fe.asImmutable,Cn.wasAltered=Fe.wasAltered,n.Iterator=B,Ln(n,{toArray:function(){Ae(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new jt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Nt(this,!0)},toMap:function(){return Be(this.toKeyedSeq())},toObject:function(){Ae(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Lt(this.toKeyedSeq())},toOrderedSet:function(){return gn(s(this)?this.valueSeq():this)},toSet:function(){return ln(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Rt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Mn(s(this)?this.valueSeq():this)},toList:function(){return pt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Jt(this,function(e,t){var n=s(e),r=[e].concat(t).map(function(e){return i(e)?n&&(e=o(e)):e=n?ie(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var a=r[0];if(a===e||n&&s(a)||l(e)&&l(a))return a}var c=new ee(r);return n?c=c.toKeyedSeq():l(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}(this,t))},includes:function(e){return this.some(function(t){return fe(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Ae(this.size);var n=!0;return this.__iterate(function(o,r,a){if(!e.call(t,o,r,a))return n=!1,!1}),n},filter:function(e,t){return Jt(this,Ht(this,e,t,!0))},find:function(e,t,n){var o=this.findEntry(e,t);return o?o[1]:n},forEach:function(e,t){return Ae(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ae(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(o){n?n=!1:t+=e,t+=null!=o?o.toString():""}),t},keys:function(){return this.__iterator(I)},map:function(e,t){return Jt(this,Yt(this,e,t))},reduce:function(e,t,n){var o,r;return Ae(this.size),arguments.length<2?r=!0:o=t,this.__iterate(function(t,a,i){r?(r=!1,o=t):o=e.call(n,o,t,a,i)}),o},reduceRight:function(e,t,n){var o=this.toKeyedSeq().reverse();return o.reduce.apply(o,arguments)},reverse:function(){return Jt(this,zt(this,!0))},slice:function(e,t){return Jt(this,Ft(this,e,t,!0))},some:function(e,t){return!this