Comparing version 2.1.2 to 2.1.3
# crio changelog | ||
#### 2.1.3 | ||
* Use try / catch with JSON.stringify for fastest and most consistent object-to-string conversion, will fallback to use stringifier when recursive | ||
* Write more tests for new functions | ||
#### 2.1.2 | ||
* Convert hash to use hashCode mechanism from Java (simpler, faster) | ||
#### 2.1.1 | ||
* Version tick for update to README | ||
#### 2.1.0 | ||
* Performance improvements | ||
* Make hash SHA1-based | ||
#### 2.0.2 | ||
@@ -4,0 +18,0 @@ * Fix behavior difference between .concat() and .push() |
@@ -1,1 +0,1 @@ | ||
var crio=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){t.exports=r(1)},function(t,n,r){"use strict";function e(t){if(Array.isArray(t)){for(var n=0,r=Array(t.length);n<t.length;n++)r[n]=t[n];return r}return Array.from(t)}function o(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.CrioObject=n.CrioArray=n.isCrio=n.getRealValue=n.assignOnDeepMatch=void 0;var i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},u=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}();r(2),r(56),r(59),r(63);var a=r(65),c=Array.prototype,f=Object.entries,s=Object.freeze,l=Object.keys,h=Object.getOwnPropertyNames,v=Object.prototype,y=Object.values,p="CrioArray",g="CrioObject",d=["$$hashCode","$$type","length"],b=function(t){return(0,a.isCrio)(t)?t:(0,a.isArray)(t)?new w(t):(0,a.isObject)(t)?new k(t):t},O=function(t,n,r){return(0,a.hasChanged)(t,n)?new r(n):t},m=function(t,n,r){var e=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],o=n.length,i=o-1,u=(0,a.isArray)(t)?w:k,c=t.thaw(),f=c,s=void 0;return(0,a.forEach)(n,function(t,n){var o=c[t];(0,a.isArray)(o)||(0,a.isObject)(o)||(c[t]={}),n===i?(s=(0,a.isArray)(c)?w:k,c[t]=e?s.prototype.merge.apply(c[t],r):r):c=c[t]}),O(t,f,u)},w=function(){function t(n){var r=this;if(o(this,t),(0,a.isCrio)(n))return n;var e=n.length;(0,a.forEach)(n,function(t,n){r[n]=b(t)});var i=(0,a.hash)(n);return(0,a.setNonEnumerable)(this,"$$hashCode",i),(0,a.setNonEnumerable)(this,"length",e),s(this)}return u(t,[{key:"concat",value:function(){for(var n=arguments.length,r=Array(n),e=0;e<n;e++)r[e]=arguments[e];if(!r.length)return this;var o=(0,a.shallowCloneArray)(this),i=c.concat.apply(o,r);return new t(i)}},{key:"copyWithin",value:function(){for(var n=(0,a.shallowCloneArray)(this),r=arguments.length,e=Array(r),o=0;o<r;o++)e[o]=arguments[o];var i=c.copyWithin.apply(n,e);return O(this,i,t)}},{key:"entries",value:function(){return f(this)}},{key:"equals",value:function(t){return!!(0,a.isCrio)(t)&&this.$$hashCode===t.$$hashCode}},{key:"every",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];return c.every.call(n,t)}},{key:"fill",value:function(){for(var n=(0,a.shallowCloneArray)(this),r=arguments.length,e=Array(r),o=0;o<r;o++)e[o]=arguments[o];return c.fill.apply(n,e),O(this,n,t)}},{key:"filter",value:function(n){var r=arguments.length<=1||void 0===arguments[1]?this:arguments[1],e=c.filter.call(this,n,r);return O(this,e,t)}},{key:"find",value:function(t){for(var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=-1,e=void 0;++r<this.length;)if(e=this[r],t.call(n,e,r,this))return e}},{key:"findIndex",value:function(t){for(var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=-1;++r<this.length;)if(t.call(n,this[r],r,this))return r;return-1}},{key:"forEach",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];c.forEach.call(this,t,n)}},{key:"get",value:function(t){return this[t]}},{key:"getIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=t.length,r=n-1,e=this,o=-1,i=void 0;++o<n;){if(i=t[o],(0,a.isUndefined)(e[i])||o===r)return e[i];e=e[i]}}},{key:"includes",value:function(t){return!!~this.indexOf(t)}},{key:"indexOf",value:function(t){return c.indexOf.call(this,t)}},{key:"join",value:function(){var t=arguments.length<=0||void 0===arguments[0]?",":arguments[0];return c.join.call(this,t)}},{key:"keys",value:function(){return l(this)}},{key:"lastIndexOf",value:function(t){return c.lastIndexOf.call(this,t)}},{key:"map",value:function(n){var r=arguments.length<=1||void 0===arguments[1]?this:arguments[1],e=c.map.call(this,n,r);return O(this,e,t)}},{key:"merge",value:function(){for(var n=(0,a.isCrio)(this)?(0,a.shallowCloneArray)(this):this,r=arguments.length,e=Array(r),o=0;o<r;o++)e[o]=arguments[o];return(0,a.forEach)(e,function(t){n=n.map(function(r,e){return t[e]||n[e]})},this),O(this,n,t)}},{key:"mergeIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.length?m(this,t,r,!0):this}},{key:"mutate",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=t.call(n,this.thaw(),this);return(0,a.hasChanged)(this,r)?b(r):this}},{key:"pop",value:function(){return this.slice(0,this.length-1)}},{key:"push",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.concat(n)}},{key:"reduce",value:function(t,n){var r=arguments.length<=2||void 0===arguments[2]?this:arguments[2],e=c.reduce.call(this,t,n,r);return(0,a.hasChanged)(this,e)?b(e):this}},{key:"reduceRight",value:function(t,n){var r=arguments.length<=2||void 0===arguments[2]?this:arguments[2],e=c.reduceRight.call(this,t,n,r);return(0,a.hasChanged)(this,e)?b(e):this}},{key:"set",value:function(n,r){var e=+n;if(e>this.length)throw new Error("Cannot set a key for sparsed array on crio objects.");var o=(0,a.shallowCloneArray)(this);return o[e]=r,O(this,o,t)}},{key:"setIn",value:function(t,n){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');return m(this,t,n)}},{key:"shift",value:function(){return this.slice(1,this.length)}},{key:"slice",value:function(){for(var n=arguments.length,r=Array(n),e=0;e<n;e++)r[e]=arguments[e];return r.length?new t(c.slice.apply(this,r)):this}},{key:"some",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];return c.some.call(this,t,n)}},{key:"sort",value:function(n){var r=(0,a.shallowCloneArray)(this),e=c.sort.call(r,n);return O(this,e,t)}},{key:"splice",value:function(){var n=(0,a.shallowCloneArray)(this);return n.splice.apply(n,arguments),O(this,n,t)}},{key:"thaw",value:function(){return c.map.call(this,function(t){return(0,a.isCrio)(t)?t.thaw():t})}},{key:"toLocaleString",value:function(){return(0,a.stringify)(this)}},{key:"toString",value:function(){return(0,a.stringify)(this)}},{key:"unshift",value:function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.length?new t([].concat(r,e(this))):this}},{key:"values",value:function(){return y(this)}},{key:Symbol.iterator,value:function(){var t=this,n=0;return{next:function(){var r=t[n],e=n>=t.length;return n++,{value:r,done:e}}}}},{key:"$$type",get:function(){return p}}]),t}(),k=function(){function t(n){var r=this;if(o(this,t),(0,a.isCrio)(n))return n;var e=h(n),i=0;(0,a.forEach)(e,function(t){~d.indexOf(t)||(r[t]=b(n[t]),i++)},this);var u=(0,a.hash)(n);return(0,a.setNonEnumerable)(this,"$$hashCode",u),(0,a.setNonEnumerable)(this,"length",i),s(this)}return u(t,[{key:"entries",value:function(){return f(this)}},{key:"equals",value:function(t){return!!(0,a.isCrio)(t)&&this.$$hashCode===t.$$hashCode}},{key:"get",value:function(t){return this[t.toString()]}},{key:"getIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=t.length,r=n-1,e=this,o=-1,i=void 0;++o<n;){if(i=t[o],(0,a.isUndefined)(e[i])||o===r)return e[i];e=e[i]}}},{key:"hasOwnProperty",value:function(t){return v.hasOwnProperty.call(this,t)}},{key:"isPrototypeOf",value:function(t){return v.isPrototypeOf.call(this,t)}},{key:"keys",value:function(){return l(this)}},{key:"merge",value:function(){for(var n=(0,a.isCrio)(this)?i({},this):this,r=arguments.length,e=Array(r),o=0;o<r;o++)e[o]=arguments[o];return(0,a.forEach)(e,function(t){Object.assign(n,t)},n),O(this,n,t)}},{key:"mergeIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.length?m(this,t,r,!0):this}},{key:"mutate",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=t.call(n,this.thaw(),this);return(0,a.hasChanged)(this,r)?b(r):this}},{key:"propertyIsEnumerable",value:function(t){return v.propertyIsEnumerable.call(this,t)}},{key:"set",value:function(n,r){var e=i({},this);return e[n]=r,O(this,e,t)}},{key:"setIn",value:function(t,n){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');return m(this,t,n)}},{key:"thaw",value:function(){var t=this,n=h(this),r={};return(0,a.forEach)(n,function(n){if(d.indexOf(n)===-1){var e=t[n],o=(0,a.isCrio)(e)?e.thaw():e;(0,a.setStandard)(r,n,o,t.propertyIsEnumerable(n))}},this),r}},{key:"toLocaleString",value:function(){return(0,a.stringify)(this)}},{key:"toString",value:function(){return(0,a.stringify)(this)}},{key:"valueOf",value:function(){return v.valueOf.call(this)}},{key:"values",value:function(){return y(this)}},{key:Symbol.iterator,value:function(){var t=this,n=l(this),r=0;return{next:function(){var e=n[r],o=t[e],i=r>=t.length;return r++,{value:o,done:i}}}}},{key:"$$type",get:function(){return g}}]),t}(),j=function(t){return(0,a.isArray)(t)?new w(t):(0,a.isObject)(t)?new k(t):t};n.assignOnDeepMatch=m,n.getRealValue=b,n.isCrio=a.isCrio,n.CrioArray=w,n.CrioObject=k,n.default=j},function(t,n,r){r(3),r(52),r(54),r(55),t.exports=r(9).Symbol},function(t,n,r){"use strict";var e=r(4),o=r(5),i=r(6),u=r(8),a=r(18),c=r(22).KEY,f=r(7),s=r(23),l=r(24),h=r(19),v=r(25),y=r(26),p=r(27),g=r(29),d=r(42),b=r(45),O=r(12),m=r(32),w=r(16),k=r(17),j=r(46),x=r(49),S=r(51),C=r(11),E=r(30),A=S.f,P=C.f,$=x.f,_=e.Symbol,I=e.JSON,M=I&&I.stringify,N="prototype",F=v("_hidden"),T=v("toPrimitive"),D={}.propertyIsEnumerable,R=s("symbol-registry"),U=s("symbols"),W=s("op-symbols"),z=Object[N],J="function"==typeof _,G=e.QObject,K=!G||!G[N]||!G[N].findChild,L=i&&f(function(){return 7!=j(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=A(z,n);e&&delete z[n],P(t,n,r),e&&t!==z&&P(z,n,e)}:P,q=function(t){var n=U[t]=j(_[N]);return n._k=t,n},B=J&&"symbol"==typeof _.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof _},V=function(t,n,r){return t===z&&V(W,n,r),O(t),n=w(n,!0),O(r),o(U,n)?(r.enumerable?(o(t,F)&&t[F][n]&&(t[F][n]=!1),r=j(r,{enumerable:k(0,!1)})):(o(t,F)||P(t,F,k(1,{})),t[F][n]=!0),L(t,n,r)):P(t,n,r)},Y=function(t,n){O(t);for(var r,e=d(n=m(n)),o=0,i=e.length;i>o;)V(t,r=e[o++],n[r]);return t},Q=function(t,n){return void 0===n?j(t):Y(j(t),n)},H=function(t){var n=D.call(this,t=w(t,!0));return!(this===z&&o(U,t)&&!o(W,t))&&(!(n||!o(this,t)||!o(U,t)||o(this,F)&&this[F][t])||n)},X=function(t,n){if(t=m(t),n=w(n,!0),t!==z||!o(U,n)||o(W,n)){var r=A(t,n);return!r||!o(U,n)||o(t,F)&&t[F][n]||(r.enumerable=!0),r}},Z=function(t){for(var n,r=$(m(t)),e=[],i=0;r.length>i;)o(U,n=r[i++])||n==F||n==c||e.push(n);return e},tt=function(t){for(var n,r=t===z,e=$(r?W:m(t)),i=[],u=0;e.length>u;)!o(U,n=e[u++])||r&&!o(z,n)||i.push(U[n]);return i};J||(_=function(){if(this instanceof _)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===z&&n.call(W,r),o(this,F)&&o(this[F],t)&&(this[F][t]=!1),L(this,t,k(1,r))};return i&&K&&L(z,t,{configurable:!0,set:n}),q(t)},a(_[N],"toString",function(){return this._k}),S.f=X,C.f=V,r(50).f=x.f=Z,r(44).f=H,r(43).f=tt,i&&!r(28)&&a(z,"propertyIsEnumerable",H,!0),y.f=function(t){return q(v(t))}),u(u.G+u.W+u.F*!J,{Symbol:_});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)v(nt[rt++]);for(var nt=E(v.store),rt=0;nt.length>rt;)p(nt[rt++]);u(u.S+u.F*!J,"Symbol",{"for":function(t){return o(R,t+="")?R[t]:R[t]=_(t)},keyFor:function(t){if(B(t))return g(R,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){K=!0},useSimple:function(){K=!1}}),u(u.S+u.F*!J,"Object",{create:Q,defineProperty:V,defineProperties:Y,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),I&&u(u.S+u.F*(!J||f(function(){var t=_();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!B(t)){for(var n,r,e=[t],o=1;arguments.length>o;)e.push(arguments[o++]);return n=e[1],"function"==typeof n&&(r=n),!r&&b(n)||(n=function(t,n){if(r&&(n=r.call(this,t,n)),!B(n))return n}),e[1]=n,M.apply(I,e)}}}),_[N][T]||r(10)(_[N],T,_[N].valueOf),l(_,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){t.exports=!r(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(4),o=r(9),i=r(10),u=r(18),a=r(20),c="prototype",f=function(t,n,r){var s,l,h,v,y=t&f.F,p=t&f.G,g=t&f.S,d=t&f.P,b=t&f.B,O=p?e:g?e[n]||(e[n]={}):(e[n]||{})[c],m=p?o:o[n]||(o[n]={}),w=m[c]||(m[c]={});p&&(r=n);for(s in r)l=!y&&O&&void 0!==O[s],h=(l?O:r)[s],v=b&&l?a(h,e):d&&"function"==typeof h?a(Function.call,h):h,O&&u(O,s,h,t&f.U),m[s]!=h&&i(m,s,v),d&&w[s]!=h&&(w[s]=h)};e.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){var e=r(11),o=r(17);t.exports=r(6)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(12),o=r(14),i=r(16),u=Object.defineProperty;n.f=r(6)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(a){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(13);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){t.exports=!r(6)&&!r(7)(function(){return 7!=Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(13),o=r(4).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,r){var e=r(13);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(4),o=r(10),i=r(5),u=r(19)("src"),a="toString",c=Function[a],f=(""+c).split(a);r(9).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,a){var c="function"==typeof r;c&&(i(r,"name")||o(r,"name",n)),t[n]!==r&&(c&&(i(r,u)||o(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:a?t[n]?t[n]=r:o(t,n,r):(delete t[n],o(t,n,r)))})(Function.prototype,a,function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(21);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(19)("meta"),o=r(13),i=r(5),u=r(11).f,a=0,c=Object.isExtensible||function(){return!0},f=!r(7)(function(){return c(Object.preventExtensions({}))}),s=function(t){u(t,e,{value:{i:"O"+ ++a,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,e)){if(!c(t))return"F";if(!n)return"E";s(t)}return t[e].i},h=function(t,n){if(!i(t,e)){if(!c(t))return!0;if(!n)return!1;s(t)}return t[e].w},v=function(t){return f&&y.NEED&&c(t)&&!i(t,e)&&s(t),t},y=t.exports={KEY:e,NEED:!1,fastKey:l,getWeak:h,onFreeze:v}},function(t,n,r){var e=r(4),o="__core-js_shared__",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(11).f,o=r(5),i=r(25)("toStringTag");t.exports=function(t,n,r){t&&!o(t=r?t:t.prototype,i)&&e(t,i,{configurable:!0,value:n})}},function(t,n,r){var e=r(23)("wks"),o=r(19),i=r(4).Symbol,u="function"==typeof i,a=t.exports=function(t){return e[t]||(e[t]=u&&i[t]||(u?i:o)("Symbol."+t))};a.store=e},function(t,n,r){n.f=r(25)},function(t,n,r){var e=r(4),o=r(9),i=r(28),u=r(26),a=r(11).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n){t.exports=!1},function(t,n,r){var e=r(30),o=r(32);t.exports=function(t,n){for(var r,i=o(t),u=e(i),a=u.length,c=0;a>c;)if(i[r=u[c++]]===n)return r}},function(t,n,r){var e=r(31),o=r(41);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){var e=r(5),o=r(32),i=r(36)(!1),u=r(40)("IE_PROTO");t.exports=function(t,n){var r,a=o(t),c=0,f=[];for(r in a)r!=u&&e(a,r)&&f.push(r);for(;n.length>c;)e(a,r=n[c++])&&(~i(f,r)||f.push(r));return f}},function(t,n,r){var e=r(33),o=r(35);t.exports=function(t){return e(o(t))}},function(t,n,r){var e=r(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(32),o=r(37),i=r(39);t.exports=function(t){return function(n,r,u){var a,c=e(n),f=o(c.length),s=i(u,f);if(t&&r!=r){for(;f>s;)if(a=c[s++],a!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===r)return t||s||0;return!t&&-1}}},function(t,n,r){var e=r(38),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(38),o=Math.max,i=Math.min;t.exports=function(t,n){return t=e(t),t<0?o(t+n,0):i(t,n)}},function(t,n,r){var e=r(23)("keys"),o=r(19);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(30),o=r(43),i=r(44);t.exports=function(t){var n=e(t),r=o.f;if(r)for(var u,a=r(t),c=i.f,f=0;a.length>f;)c.call(t,u=a[f++])&&n.push(u);return n}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(34);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(12),o=r(47),i=r(41),u=r(40)("IE_PROTO"),a=function(){},c="prototype",f=function(){var t,n=r(15)("iframe"),e=i.length,o=">";for(n.style.display="none",r(48).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+o),t.close(),f=t.F;e--;)delete f[c][i[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(a[c]=e(t),r=new a,a[c]=null,r[u]=t):r=f(),void 0===n?r:o(r,n)}},function(t,n,r){var e=r(11),o=r(12),i=r(30);t.exports=r(6)?Object.defineProperties:function(t,n){o(t);for(var r,u=i(n),a=u.length,c=0;a>c;)e.f(t,r=u[c++],n[r]);return t}},function(t,n,r){t.exports=r(4).document&&document.documentElement},function(t,n,r){var e=r(32),o=r(50).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(n){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?a(t):o(e(t))}},function(t,n,r){var e=r(31),o=r(41).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},function(t,n,r){var e=r(44),o=r(17),i=r(32),u=r(16),a=r(5),c=r(14),f=Object.getOwnPropertyDescriptor;n.f=r(6)?f:function(t,n){if(t=i(t),n=u(n,!0),c)try{return f(t,n)}catch(r){}if(a(t,n))return o(!e.f.call(t,n),t[n])}},function(t,n,r){"use strict";var e=r(53),o={};o[r(25)("toStringTag")]="z",o+""!="[object z]"&&r(18)(Object.prototype,"toString",function(){return"[object "+e(this)+"]"},!0)},function(t,n,r){var e=r(34),o=r(25)("toStringTag"),i="Arguments"==e(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(r){}};t.exports=function(t){var n,r,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(n=Object(t),o))?r:i?e(n):"Object"==(a=e(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,r){r(27)("asyncIterator")},function(t,n,r){r(27)("observable")},function(t,n,r){r(57),t.exports=r(9).Object.entries},function(t,n,r){var e=r(8),o=r(58)(!0);e(e.S,"Object",{entries:function(t){return o(t)}})},function(t,n,r){var e=r(30),o=r(32),i=r(44).f;t.exports=function(t){return function(n){for(var r,u=o(n),a=e(u),c=a.length,f=0,s=[];c>f;)i.call(u,r=a[f++])&&s.push(t?[r,u[r]]:u[r]);return s}}},function(t,n,r){r(60),t.exports=r(9).Object.keys},function(t,n,r){var e=r(61),o=r(30);r(62)("keys",function(){return function(t){return o(e(t))}})},function(t,n,r){var e=r(35);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(8),o=r(9),i=r(7);t.exports=function(t,n){var r=(o.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*i(function(){r(1)}),"Object",u)}},function(t,n,r){r(64),t.exports=r(9).Object.values},function(t,n,r){var e=r(8),o=r(58)(!1);e(e.S,"Object",{values:function(t){return o(t)}})},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=n.shallowCloneArray=n.setStandard=n.setNonEnumerable=n.returnObjectOnlyIfNew=n.isUndefined=n.isObject=n.isCrio=n.isArray=n.hash=n.hasChanged=n.forEach=void 0;var o=r(66),i=e(o),u={maxDepth:25,indent:" "},a=(0,i.default)(u),c="[object Array]",f="[object Object]",s=function j(t){if(!p(t)&&!d(t))return t.toString();for(var n=Object.keys(t),r="",e=n.length,o=-1,i=void 0,u=void 0,a=void 0,c=void 0,f=void 0;++o<e;)if(u=n[o],a=t[u],d(a))r+="|"+u+":"+j(a)+"|";else if(p(a)){for(i=[],c=a.length,f=-1;++f<c;)i.push(j(a[f]));i.length>0&&(r+=u+":["+i.join(",")+"]")}else r+="|"+u+":"+a+"|";return r},l=function(t,n,r){for(var e=t.length,o=-1;++o<e;)n.call(r,t[o],o,t)},h=function(t){return Object.prototype.toString.call(t)},v=function(t,n){var r=y(n);return t.$$hashCode!==r},y=function x(t){var n=s(t),r=n.length;if(0===r)return 0;for(var x=0,e=-1;++e<r;)x=(x<<5)-x+n.charCodeAt(e),x&=x;return x},p=function(t){return h(t)===c||!(!t||"CrioArray"!==t.$$type)},g=function(t){return!(!t||!t.$$type)},d=function(t){return h(t)===f&&!!t&&"CrioArray"!==t.$$type||!(!t||"CrioObject"!==t.$$type)},b=function(t){return void 0===t},O=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.$$hashCode!==n.$$hashCode?n:t},m=function(t){var n=[];return l(t,function(t,r){n[r]=t},t),n},w=function(t,n,r){Object.defineProperty(t,n,{configurable:!1,enumerable:!1,value:r,writable:!1})},k=function(t,n,r){var e=arguments.length<=3||void 0===arguments[3]||arguments[3];Object.defineProperty(t,n,{configurable:!0,enumerable:e,value:r,writable:!0})};n.forEach=l,n.hasChanged=v,n.hash=y,n.isArray=p,n.isCrio=g,n.isObject=d,n.isUndefined=b,n.returnObjectOnlyIfNew=O,n.setNonEnumerable=w,n.setStandard=k,n.shallowCloneArray=m,n.stringify=a},function(t,n){t.exports=void 0}]); | ||
var crio=function(t){function n(e){if(r[e])return r[e].exports;var i=r[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){t.exports=r(1)},function(t,n,r){"use strict";function e(t){if(Array.isArray(t)){for(var n=0,r=Array(t.length);n<t.length;n++)r[n]=t[n];return r}return Array.from(t)}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.CrioObject=n.CrioArray=n.isCrio=n.getRealValue=n.assignOnDeepMatch=void 0;var o=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},u=function(){function t(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(n,r,e){return r&&t(n.prototype,r),e&&t(n,e),n}}();r(2),r(56),r(59),r(63);var a=r(65),c=Array.prototype,f=Object.entries,s=Object.freeze,l=Object.keys,h=Object.getOwnPropertyNames,y=Object.prototype,v=Object.values,p="CrioArray",g="CrioObject",d=["$$hashCode","$$type","length"],b=function(t){return(0,a.isCrio)(t)?t:(0,a.isArray)(t)?new w(t):(0,a.isObject)(t)?new k(t):t},O=function(t,n,r){return(0,a.hasChanged)(t,n)?new r(n):t},m=function(t,n,r){var e=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],i=n.length,o=i-1,u=(0,a.isArray)(t)?w:k,c=t.thaw(),f=c,s=void 0;return(0,a.forEach)(n,function(t,n){var i=c[t];(0,a.isArray)(i)||(0,a.isObject)(i)||(c[t]={}),n===o?(s=(0,a.isArray)(c)?w:k,c[t]=e?s.prototype.merge.apply(c[t],r):r):c=c[t]}),O(t,f,u)},w=function(){function t(n){var r=this;if(i(this,t),(0,a.isCrio)(n))return n;var e=n.length;(0,a.forEach)(n,function(t,n){r[n]=b(t)});var o=(0,a.hash)(n);return(0,a.setNonEnumerable)(this,"$$hashCode",o),(0,a.setNonEnumerable)(this,"length",e),s(this)}return u(t,[{key:"concat",value:function(){for(var n=arguments.length,r=Array(n),e=0;e<n;e++)r[e]=arguments[e];if(!r.length)return this;var i=(0,a.shallowCloneArray)(this),o=c.concat.apply(i,r);return new t(o)}},{key:"copyWithin",value:function(){for(var n=(0,a.shallowCloneArray)(this),r=arguments.length,e=Array(r),i=0;i<r;i++)e[i]=arguments[i];var o=c.copyWithin.apply(n,e);return O(this,o,t)}},{key:"entries",value:function(){return f(this)}},{key:"equals",value:function(t){return!!(0,a.isCrio)(t)&&this.$$hashCode===t.$$hashCode}},{key:"every",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];return c.every.call(n,t)}},{key:"fill",value:function(){for(var n=(0,a.shallowCloneArray)(this),r=arguments.length,e=Array(r),i=0;i<r;i++)e[i]=arguments[i];return c.fill.apply(n,e),O(this,n,t)}},{key:"filter",value:function(n){var r=arguments.length<=1||void 0===arguments[1]?this:arguments[1],e=c.filter.call(this,n,r);return O(this,e,t)}},{key:"find",value:function(t){for(var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=-1,e=void 0;++r<this.length;)if(e=this[r],t.call(n,e,r,this))return e}},{key:"findIndex",value:function(t){for(var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=-1;++r<this.length;)if(t.call(n,this[r],r,this))return r;return-1}},{key:"forEach",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];c.forEach.call(this,t,n)}},{key:"get",value:function(t){return this[t]}},{key:"getIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=t.length,r=n-1,e=this,i=-1,o=void 0;++i<n;){if(o=t[i],(0,a.isUndefined)(e[o])||i===r)return e[o];e=e[o]}}},{key:"includes",value:function(t){return!!~this.indexOf(t)}},{key:"indexOf",value:function(t){return c.indexOf.call(this,t)}},{key:"join",value:function(){var t=arguments.length<=0||void 0===arguments[0]?",":arguments[0];return c.join.call(this,t)}},{key:"keys",value:function(){return l(this)}},{key:"lastIndexOf",value:function(t){return c.lastIndexOf.call(this,t)}},{key:"map",value:function(n){var r=arguments.length<=1||void 0===arguments[1]?this:arguments[1],e=c.map.call(this,n,r);return O(this,e,t)}},{key:"merge",value:function(){for(var n=(0,a.isCrio)(this)?(0,a.shallowCloneArray)(this):this,r=arguments.length,e=Array(r),i=0;i<r;i++)e[i]=arguments[i];return(0,a.forEach)(e,function(t){n=n.map(function(r,e){return t[e]||n[e]})},this),O(this,n,t)}},{key:"mergeIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.length?m(this,t,r,!0):this}},{key:"mutate",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=t.call(n,this.thaw(),this);return(0,a.hasChanged)(this,r)?b(r):this}},{key:"pop",value:function(){return this.slice(0,this.length-1)}},{key:"push",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.concat(n)}},{key:"reduce",value:function(t,n){var r=arguments.length<=2||void 0===arguments[2]?this:arguments[2],e=c.reduce.call(this,t,n,r);return(0,a.hasChanged)(this,e)?b(e):this}},{key:"reduceRight",value:function(t,n){var r=arguments.length<=2||void 0===arguments[2]?this:arguments[2],e=c.reduceRight.call(this,t,n,r);return(0,a.hasChanged)(this,e)?b(e):this}},{key:"set",value:function(n,r){var e=+n;if(e>this.length)throw new Error("Cannot set a key for sparsed array on crio objects.");var i=(0,a.shallowCloneArray)(this);return i[e]=r,O(this,i,t)}},{key:"setIn",value:function(t,n){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');return m(this,t,n)}},{key:"shift",value:function(){return this.slice(1,this.length)}},{key:"slice",value:function(){for(var n=arguments.length,r=Array(n),e=0;e<n;e++)r[e]=arguments[e];return r.length?new t(c.slice.apply(this,r)):this}},{key:"some",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1];return c.some.call(this,t,n)}},{key:"sort",value:function(n){var r=(0,a.shallowCloneArray)(this),e=c.sort.call(r,n);return O(this,e,t)}},{key:"splice",value:function(){var n=(0,a.shallowCloneArray)(this);return n.splice.apply(n,arguments),O(this,n,t)}},{key:"thaw",value:function(){return c.map.call(this,function(t){return(0,a.isCrio)(t)?t.thaw():t})}},{key:"toLocaleString",value:function(){return(0,a.stringify)(this)}},{key:"toString",value:function(){return(0,a.stringify)(this)}},{key:"unshift",value:function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length?new t([].concat(r,e(this))):this}},{key:"values",value:function(){return v(this)}},{key:Symbol.iterator,value:function(){var t=this,n=0;return{next:function(){var r=t[n],e=n>=t.length;return n++,{value:r,done:e}}}}},{key:"$$type",get:function(){return p}}]),t}(),k=function(){function t(n){var r=this;if(i(this,t),(0,a.isCrio)(n))return n;var e=h(n),o=0;(0,a.forEach)(e,function(t){~d.indexOf(t)||(r[t]=b(n[t]),o++)},this);var u=(0,a.hash)(n);return(0,a.setNonEnumerable)(this,"$$hashCode",u),(0,a.setNonEnumerable)(this,"length",o),s(this)}return u(t,[{key:"entries",value:function(){return f(this)}},{key:"equals",value:function(t){return!!(0,a.isCrio)(t)&&this.$$hashCode===t.$$hashCode}},{key:"get",value:function(t){return this[t.toString()]}},{key:"getIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=t.length,r=n-1,e=this,i=-1,o=void 0;++i<n;){if(o=t[i],(0,a.isUndefined)(e[o])||i===r)return e[o];e=e[o]}}},{key:"hasOwnProperty",value:function(t){return y.hasOwnProperty.call(this,t)}},{key:"isPrototypeOf",value:function(t){return y.isPrototypeOf.call(this,t)}},{key:"keys",value:function(){return l(this)}},{key:"merge",value:function(){for(var n=(0,a.isCrio)(this)?o({},this):this,r=arguments.length,e=Array(r),i=0;i<r;i++)e[i]=arguments[i];return(0,a.forEach)(e,function(t){Object.assign(n,t)},n),O(this,n,t)}},{key:"mergeIn",value:function(t){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];return r.length?m(this,t,r,!0):this}},{key:"mutate",value:function(t){var n=arguments.length<=1||void 0===arguments[1]?this:arguments[1],r=t.call(n,this.thaw(),this);return(0,a.hasChanged)(this,r)?b(r):this}},{key:"propertyIsEnumerable",value:function(t){return y.propertyIsEnumerable.call(this,t)}},{key:"set",value:function(n,r){var e=o({},this);return e[n]=r,O(this,e,t)}},{key:"setIn",value:function(t,n){if(!(0,a.isArray)(t))throw new Error('Must provide keys as an array, such as ["foo", "bar"].');return m(this,t,n)}},{key:"thaw",value:function(){var t=this,n=h(this),r={};return(0,a.forEach)(n,function(n){if(d.indexOf(n)===-1){var e=t[n],i=(0,a.isCrio)(e)?e.thaw():e;(0,a.setStandard)(r,n,i,t.propertyIsEnumerable(n))}},this),r}},{key:"toLocaleString",value:function(){return(0,a.stringify)(this)}},{key:"toString",value:function(){return(0,a.stringify)(this)}},{key:"valueOf",value:function(){return y.valueOf.call(this)}},{key:"values",value:function(){return v(this)}},{key:Symbol.iterator,value:function(){var t=this,n=l(this),r=0;return{next:function(){var e=n[r],i=t[e],o=r>=t.length;return r++,{value:i,done:o}}}}},{key:"$$type",get:function(){return g}}]),t}(),j=function(t){return(0,a.isArray)(t)?new w(t):(0,a.isObject)(t)?new k(t):t};n.assignOnDeepMatch=m,n.getRealValue=b,n.isCrio=a.isCrio,n.CrioArray=w,n.CrioObject=k,n.default=j},function(t,n,r){r(3),r(52),r(54),r(55),t.exports=r(9).Symbol},function(t,n,r){"use strict";var e=r(4),i=r(5),o=r(6),u=r(8),a=r(18),c=r(22).KEY,f=r(7),s=r(23),l=r(24),h=r(19),y=r(25),v=r(26),p=r(27),g=r(29),d=r(42),b=r(45),O=r(12),m=r(32),w=r(16),k=r(17),j=r(46),x=r(49),S=r(51),C=r(11),E=r(30),A=S.f,P=C.f,$=x.f,_=e.Symbol,M=e.JSON,I=M&&M.stringify,N="prototype",F=y("_hidden"),T=y("toPrimitive"),D={}.propertyIsEnumerable,z=s("symbol-registry"),R=s("symbols"),U=s("op-symbols"),W=Object[N],J="function"==typeof _,G=e.QObject,K=!G||!G[N]||!G[N].findChild,L=o&&f(function(){return 7!=j(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=A(W,n);e&&delete W[n],P(t,n,r),e&&t!==W&&P(W,n,e)}:P,q=function(t){var n=R[t]=j(_[N]);return n._k=t,n},B=J&&"symbol"==typeof _.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof _},H=function(t,n,r){return t===W&&H(U,n,r),O(t),n=w(n,!0),O(r),i(R,n)?(r.enumerable?(i(t,F)&&t[F][n]&&(t[F][n]=!1),r=j(r,{enumerable:k(0,!1)})):(i(t,F)||P(t,F,k(1,{})),t[F][n]=!0),L(t,n,r)):P(t,n,r)},V=function(t,n){O(t);for(var r,e=d(n=m(n)),i=0,o=e.length;o>i;)H(t,r=e[i++],n[r]);return t},Y=function(t,n){return void 0===n?j(t):V(j(t),n)},Q=function(t){var n=D.call(this,t=w(t,!0));return!(this===W&&i(R,t)&&!i(U,t))&&(!(n||!i(this,t)||!i(R,t)||i(this,F)&&this[F][t])||n)},X=function(t,n){if(t=m(t),n=w(n,!0),t!==W||!i(R,n)||i(U,n)){var r=A(t,n);return!r||!i(R,n)||i(t,F)&&t[F][n]||(r.enumerable=!0),r}},Z=function(t){for(var n,r=$(m(t)),e=[],o=0;r.length>o;)i(R,n=r[o++])||n==F||n==c||e.push(n);return e},tt=function(t){for(var n,r=t===W,e=$(r?U:m(t)),o=[],u=0;e.length>u;)!i(R,n=e[u++])||r&&!i(W,n)||o.push(R[n]);return o};J||(_=function(){if(this instanceof _)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===W&&n.call(U,r),i(this,F)&&i(this[F],t)&&(this[F][t]=!1),L(this,t,k(1,r))};return o&&K&&L(W,t,{configurable:!0,set:n}),q(t)},a(_[N],"toString",function(){return this._k}),S.f=X,C.f=H,r(50).f=x.f=Z,r(44).f=Q,r(43).f=tt,o&&!r(28)&&a(W,"propertyIsEnumerable",Q,!0),v.f=function(t){return q(y(t))}),u(u.G+u.W+u.F*!J,{Symbol:_});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)y(nt[rt++]);for(var nt=E(y.store),rt=0;nt.length>rt;)p(nt[rt++]);u(u.S+u.F*!J,"Symbol",{"for":function(t){return i(z,t+="")?z[t]:z[t]=_(t)},keyFor:function(t){if(B(t))return g(z,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){K=!0},useSimple:function(){K=!1}}),u(u.S+u.F*!J,"Object",{create:Y,defineProperty:H,defineProperties:V,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),M&&u(u.S+u.F*(!J||f(function(){var t=_();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!B(t)){for(var n,r,e=[t],i=1;arguments.length>i;)e.push(arguments[i++]);return n=e[1],"function"==typeof n&&(r=n),!r&&b(n)||(n=function(t,n){if(r&&(n=r.call(this,t,n)),!B(n))return n}),e[1]=n,I.apply(M,e)}}}),_[N][T]||r(10)(_[N],T,_[N].valueOf),l(_,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){t.exports=!r(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(4),i=r(9),o=r(10),u=r(18),a=r(20),c="prototype",f=function(t,n,r){var s,l,h,y,v=t&f.F,p=t&f.G,g=t&f.S,d=t&f.P,b=t&f.B,O=p?e:g?e[n]||(e[n]={}):(e[n]||{})[c],m=p?i:i[n]||(i[n]={}),w=m[c]||(m[c]={});p&&(r=n);for(s in r)l=!v&&O&&void 0!==O[s],h=(l?O:r)[s],y=b&&l?a(h,e):d&&"function"==typeof h?a(Function.call,h):h,O&&u(O,s,h,t&f.U),m[s]!=h&&o(m,s,y),d&&w[s]!=h&&(w[s]=h)};e.core=i,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){var e=r(11),i=r(17);t.exports=r(6)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(12),i=r(14),o=r(16),u=Object.defineProperty;n.f=r(6)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(a){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(13);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){t.exports=!r(6)&&!r(7)(function(){return 7!=Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(13),i=r(4).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){var e=r(13);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(4),i=r(10),o=r(5),u=r(19)("src"),a="toString",c=Function[a],f=(""+c).split(a);r(9).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,a){var c="function"==typeof r;c&&(o(r,"name")||i(r,"name",n)),t[n]!==r&&(c&&(o(r,u)||i(r,u,t[n]?""+t[n]:f.join(String(n)))),t===e?t[n]=r:a?t[n]?t[n]=r:i(t,n,r):(delete t[n],i(t,n,r)))})(Function.prototype,a,function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(21);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(19)("meta"),i=r(13),o=r(5),u=r(11).f,a=0,c=Object.isExtensible||function(){return!0},f=!r(7)(function(){return c(Object.preventExtensions({}))}),s=function(t){u(t,e,{value:{i:"O"+ ++a,w:{}}})},l=function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,e)){if(!c(t))return"F";if(!n)return"E";s(t)}return t[e].i},h=function(t,n){if(!o(t,e)){if(!c(t))return!0;if(!n)return!1;s(t)}return t[e].w},y=function(t){return f&&v.NEED&&c(t)&&!o(t,e)&&s(t),t},v=t.exports={KEY:e,NEED:!1,fastKey:l,getWeak:h,onFreeze:y}},function(t,n,r){var e=r(4),i="__core-js_shared__",o=e[i]||(e[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){var e=r(11).f,i=r(5),o=r(25)("toStringTag");t.exports=function(t,n,r){t&&!i(t=r?t:t.prototype,o)&&e(t,o,{configurable:!0,value:n})}},function(t,n,r){var e=r(23)("wks"),i=r(19),o=r(4).Symbol,u="function"==typeof o,a=t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))};a.store=e},function(t,n,r){n.f=r(25)},function(t,n,r){var e=r(4),i=r(9),o=r(28),u=r(26),a=r(11).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||a(n,t,{value:u.f(t)})}},function(t,n){t.exports=!1},function(t,n,r){var e=r(30),i=r(32);t.exports=function(t,n){for(var r,o=i(t),u=e(o),a=u.length,c=0;a>c;)if(o[r=u[c++]]===n)return r}},function(t,n,r){var e=r(31),i=r(41);t.exports=Object.keys||function(t){return e(t,i)}},function(t,n,r){var e=r(5),i=r(32),o=r(36)(!1),u=r(40)("IE_PROTO");t.exports=function(t,n){var r,a=i(t),c=0,f=[];for(r in a)r!=u&&e(a,r)&&f.push(r);for(;n.length>c;)e(a,r=n[c++])&&(~o(f,r)||f.push(r));return f}},function(t,n,r){var e=r(33),i=r(35);t.exports=function(t){return e(i(t))}},function(t,n,r){var e=r(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){var e=r(32),i=r(37),o=r(39);t.exports=function(t){return function(n,r,u){var a,c=e(n),f=i(c.length),s=o(u,f);if(t&&r!=r){for(;f>s;)if(a=c[s++],a!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===r)return t||s||0;return!t&&-1}}},function(t,n,r){var e=r(38),i=Math.min;t.exports=function(t){return t>0?i(e(t),9007199254740991):0}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(38),i=Math.max,o=Math.min;t.exports=function(t,n){return t=e(t),t<0?i(t+n,0):o(t,n)}},function(t,n,r){var e=r(23)("keys"),i=r(19);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(30),i=r(43),o=r(44);t.exports=function(t){var n=e(t),r=i.f;if(r)for(var u,a=r(t),c=o.f,f=0;a.length>f;)c.call(t,u=a[f++])&&n.push(u);return n}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(34);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){var e=r(12),i=r(47),o=r(41),u=r(40)("IE_PROTO"),a=function(){},c="prototype",f=function(){var t,n=r(15)("iframe"),e=o.length,i=">";for(n.style.display="none",r(48).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+i),t.close(),f=t.F;e--;)delete f[c][o[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(a[c]=e(t),r=new a,a[c]=null,r[u]=t):r=f(),void 0===n?r:i(r,n)}},function(t,n,r){var e=r(11),i=r(12),o=r(30);t.exports=r(6)?Object.defineProperties:function(t,n){i(t);for(var r,u=o(n),a=u.length,c=0;a>c;)e.f(t,r=u[c++],n[r]);return t}},function(t,n,r){t.exports=r(4).document&&document.documentElement},function(t,n,r){var e=r(32),i=r(50).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(n){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?a(t):i(e(t))}},function(t,n,r){var e=r(31),i=r(41).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,i)}},function(t,n,r){var e=r(44),i=r(17),o=r(32),u=r(16),a=r(5),c=r(14),f=Object.getOwnPropertyDescriptor;n.f=r(6)?f:function(t,n){if(t=o(t),n=u(n,!0),c)try{return f(t,n)}catch(r){}if(a(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){"use strict";var e=r(53),i={};i[r(25)("toStringTag")]="z",i+""!="[object z]"&&r(18)(Object.prototype,"toString",function(){return"[object "+e(this)+"]"},!0)},function(t,n,r){var e=r(34),i=r(25)("toStringTag"),o="Arguments"==e(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(r){}};t.exports=function(t){var n,r,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(n=Object(t),i))?r:o?e(n):"Object"==(a=e(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,r){r(27)("asyncIterator")},function(t,n,r){r(27)("observable")},function(t,n,r){r(57),t.exports=r(9).Object.entries},function(t,n,r){var e=r(8),i=r(58)(!0);e(e.S,"Object",{entries:function(t){return i(t)}})},function(t,n,r){var e=r(30),i=r(32),o=r(44).f;t.exports=function(t){return function(n){for(var r,u=i(n),a=e(u),c=a.length,f=0,s=[];c>f;)o.call(u,r=a[f++])&&s.push(t?[r,u[r]]:u[r]);return s}}},function(t,n,r){r(60),t.exports=r(9).Object.keys},function(t,n,r){var e=r(61),i=r(30);r(62)("keys",function(){return function(t){return i(e(t))}})},function(t,n,r){var e=r(35);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(8),i=r(9),o=r(7);t.exports=function(t,n){var r=(i.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*o(function(){r(1)}),"Object",u)}},function(t,n,r){r(64),t.exports=r(9).Object.values},function(t,n,r){var e=r(8),i=r(58)(!1);e(e.S,"Object",{values:function(t){return i(t)}})},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0}),n.stringifySerializerForHash=n.stringify=n.shallowCloneArray=n.setStandard=n.setNonEnumerable=n.isUndefined=n.isObject=n.isCrio=n.isArray=n.hash=n.hasChanged=n.forEach=void 0;var i=r(66),o=e(i),u={handlers:{"function":function(t){var n=t.value;return n.toString()}},maxDepth:10},a={maxDepth:10,indent:" "},c=(0,o.default)(a),f=(0,o.default)(u),s="[object Array]",l="[object Object]",h=function(t){return d(t)===s||!(!t||"CrioArray"!==t.$$type)},y=function(t){return!(!t||!t.$$type)},v=function(t){return d(t)===l&&!!t&&"CrioArray"!==t.$$type||!(!t||"CrioObject"!==t.$$type)},p=function(t){return void 0===t},g=function(t,n,r){for(var e=t.length,i=-1;++i<e;)n.call(r,t[i],i,t)},d=function(t){return Object.prototype.toString.call(t)},b=function(t,n){var r=m(n);return t.$$hashCode!==r},O=function(t,n){return"function"==typeof n?n.toString():n},m=function x(t){var n=void 0;try{n=JSON.stringify(t,O)}catch(r){n=f(t)}var e=n.length;if(0===e)return 0;for(var x=0,i=-1;++i<e;)x=(x<<5)-x+n.charCodeAt(i),x&=x;return x},w=function(t){var n=[];return g(t,function(t,r){n[r]=t},t),n},k=function(t,n,r){Object.defineProperty(t,n,{configurable:!1,enumerable:!1,value:r,writable:!1})},j=function(t,n,r){var e=arguments.length<=3||void 0===arguments[3]||arguments[3];Object.defineProperty(t,n,{configurable:!0,enumerable:e,value:r,writable:!0})};n.forEach=g,n.hasChanged=b,n.hash=m,n.isArray=h,n.isCrio=y,n.isObject=v,n.isUndefined=p,n.setNonEnumerable=k,n.setStandard=j,n.shallowCloneArray=w,n.stringify=c,n.stringifySerializerForHash=O},function(t,n){t.exports=void 0}]); |
166
lib/utils.js
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.stringify = exports.shallowCloneArray = exports.setStandard = exports.setNonEnumerable = exports.returnObjectOnlyIfNew = exports.isUndefined = exports.isObject = exports.isCrio = exports.isArray = exports.hash = exports.hasChanged = exports.forEach = undefined; | ||
exports.stringifySerializerForHash = exports.stringify = exports.shallowCloneArray = exports.setStandard = exports.setNonEnumerable = exports.isUndefined = exports.isObject = exports.isCrio = exports.isArray = exports.hash = exports.hasChanged = exports.forEach = undefined; | ||
@@ -15,4 +15,14 @@ var _stringifier = require('stringifier'); | ||
var STRINGIFIER_HASH_OPTIONS = { | ||
handlers: { | ||
'function': function _function(_ref) { | ||
var value = _ref.value; | ||
return value.toString(); | ||
} | ||
}, | ||
maxDepth: 10 | ||
}; | ||
var STRINGIFIER_OPTIONS = { | ||
maxDepth: 25, | ||
maxDepth: 10, | ||
indent: ' ' | ||
@@ -22,2 +32,3 @@ }; | ||
var stringify = (0, _stringifier2.default)(STRINGIFIER_OPTIONS); | ||
var stringifyForHash = (0, _stringifier2.default)(STRINGIFIER_HASH_OPTIONS); | ||
@@ -28,47 +39,39 @@ var ARRAY_TYPE = '[object Array]'; | ||
/** | ||
* convert object to readable string | ||
* | ||
* determine if object is array | ||
* | ||
* @param {any} object | ||
* @return {string} | ||
* @return {boolean} | ||
*/ | ||
var buildStringForHash = function buildStringForHash(object) { | ||
if (!isArray(object) && !isObject(object)) { | ||
return object.toString(); | ||
} | ||
var isArray = function isArray(object) { | ||
return toString(object) === ARRAY_TYPE || !!(object && object.$$type === 'CrioArray'); | ||
}; | ||
var keys = Object.keys(object); | ||
/** | ||
* is object a CrioArray or CrioObject | ||
* | ||
* @param {any} object | ||
* @returns {boolean} | ||
*/ | ||
var isCrio = function isCrio(object) { | ||
return !!(object && object.$$type); | ||
}; | ||
var string = '', | ||
length = keys.length, | ||
index = -1, | ||
elements = void 0, | ||
key = void 0, | ||
value = void 0, | ||
valueLength = void 0, | ||
valueIndex = void 0; | ||
/** | ||
* determine if object is object | ||
* | ||
* @param {any} object | ||
* @return {boolean} | ||
*/ | ||
var isObject = function isObject(object) { | ||
return toString(object) === OBJECT_TYPE && !!object && object.$$type !== 'CrioArray' || !!(object && object.$$type === 'CrioObject'); | ||
}; | ||
while (++index < length) { | ||
key = keys[index]; | ||
value = object[key]; | ||
if (isObject(value)) { | ||
string += '|' + key + ':' + buildStringForHash(value) + '|'; | ||
} else if (isArray(value)) { | ||
elements = []; | ||
valueLength = value.length; | ||
valueIndex = -1; | ||
while (++valueIndex < valueLength) { | ||
elements.push(buildStringForHash(value[valueIndex])); | ||
} | ||
if (elements.length > 0) { | ||
string += key + ':[' + elements.join(',') + ']'; | ||
} | ||
} else { | ||
string += '|' + key + ':' + value + '|'; | ||
} | ||
} | ||
return string; | ||
/** | ||
* determine if object is undefined | ||
* | ||
* @param {any} object | ||
* @return {boolean} | ||
*/ | ||
var isUndefined = function isUndefined(object) { | ||
return object === void 0; | ||
}; | ||
@@ -116,2 +119,10 @@ | ||
var stringifySerializerForHash = function stringifySerializerForHash(key, value) { | ||
if (typeof value === 'function') { | ||
return value.toString(); | ||
} | ||
return value; | ||
}; | ||
/** | ||
@@ -124,3 +135,10 @@ * convert object into unique hash value | ||
var hash = function hash(object) { | ||
var string = buildStringForHash(object); | ||
var string = void 0; | ||
try { | ||
string = JSON.stringify(object, stringifySerializerForHash); | ||
} catch (exception) { | ||
string = stringifyForHash(object); | ||
} | ||
var length = string.length; | ||
@@ -144,60 +162,2 @@ | ||
/** | ||
* determine if object is array | ||
* | ||
* @param {any} object | ||
* @return {boolean} | ||
*/ | ||
var isArray = function isArray(object) { | ||
return toString(object) === ARRAY_TYPE || !!(object && object.$$type === 'CrioArray'); | ||
}; | ||
/** | ||
* is object a CrioArray or CrioObject | ||
* | ||
* @param {any} object | ||
* @returns {boolean} | ||
*/ | ||
var isCrio = function isCrio(object) { | ||
return !!(object && object.$$type); | ||
}; | ||
/** | ||
* determine if object is object | ||
* | ||
* @param {any} object | ||
* @return {boolean} | ||
*/ | ||
var isObject = function isObject(object) { | ||
return toString(object) === OBJECT_TYPE && !!object && object.$$type !== 'CrioArray' || !!(object && object.$$type === 'CrioObject'); | ||
}; | ||
/** | ||
* determine if object is undefined | ||
* | ||
* @param {any} object | ||
* @return {boolean} | ||
*/ | ||
var isUndefined = function isUndefined(object) { | ||
return object === void 0; | ||
}; | ||
/** | ||
* based on hashCodes, either return the current object or the newly generated on | ||
* | ||
* @param {object} currentObject={} | ||
* @param {object} newObject={} | ||
* @return {object<T>} | ||
*/ | ||
var returnObjectOnlyIfNew = function returnObjectOnlyIfNew() { | ||
var currentObject = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var newObject = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
if (currentObject.$$hashCode !== newObject.$$hashCode) { | ||
return newObject; | ||
} | ||
return currentObject; | ||
}; | ||
/** | ||
* return a new array from the existing CrioArray | ||
@@ -260,6 +220,6 @@ * | ||
exports.isUndefined = isUndefined; | ||
exports.returnObjectOnlyIfNew = returnObjectOnlyIfNew; | ||
exports.setNonEnumerable = setNonEnumerable; | ||
exports.setStandard = setStandard; | ||
exports.shallowCloneArray = shallowCloneArray; | ||
exports.stringify = stringify; | ||
exports.stringify = stringify; | ||
exports.stringifySerializerForHash = stringifySerializerForHash; |
@@ -67,3 +67,3 @@ { | ||
}, | ||
"version": "2.1.2" | ||
"version": "2.1.3" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
263372
2123