New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-splitz

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-splitz - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-14
dist/main.production.min.js

@@ -1,14 +0,1 @@

!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=8)}([function(e,t,n){"use strict";e.exports=n(3)},function(e,t,n){e.exports=n(5)()},function(e,t,n){"use strict";(function(t){var n=256,r=[],o=void 0===t?window:t,i=Math.pow(n,6),u=Math.pow(2,52),a=2*u,c=n-1,f=Math.random;function l(e,t){for(var n,r=e+"",o=0;o<r.length;)t[c&o]=c&(n^=19*t[c&o])+r.charCodeAt(o++);return s(t)}function s(e){return String.fromCharCode.apply(0,e)}e.exports=function(t,f){if(f&&!0===f.global)return f.global=!1,Math.random=e.exports(t,f),f.global=!0,Math.random;var p=[],y=(l(function e(t,n){var r,o=[],i=(typeof t)[0];if(n&&"o"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"s"==i?t:t+"\0"}(f&&f.entropy||!1?[t,s(r)]:0 in arguments?t:function(e){try{return o.crypto.getRandomValues(e=new Uint8Array(n)),s(e)}catch(e){return[+new Date,o,o.navigator&&o.navigator.plugins,o.screen,s(r)]}}(),3),p),new function(e){var t,r=e.length,o=this,i=0,u=o.i=o.j=0,a=o.S=[];r||(e=[r++]);for(;i<n;)a[i]=i++;for(i=0;i<n;i++)a[i]=a[u=c&u+e[i%r]+(t=a[i])],a[u]=t;(o.g=function(e){for(var t,r=0,i=o.i,u=o.j,a=o.S;e--;)t=a[i=c&i+1],r=r*n+a[c&(a[i]=a[u=c&u+t])+(a[u]=t)];return o.i=i,o.j=u,r})(n)}(p));return l(s(y.S),r),function(){for(var e=y.g(6),t=i,r=0;e<u;)e=(e+r)*n,t*=n,r=y.g(1);for(;e>=a;)e/=2,t/=2,r>>>=1;return(e+r)/t}},e.exports.resetGlobal=function(){Math.random=f},l(Math.random(),r)}).call(this,n(7))},function(e,t,n){"use strict";
/** @license React v16.6.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=n(4),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,u=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,f=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,s=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.concurrent_mode"):60111,y=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,b="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,u,a){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,u,a],f=0;(e=Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O={};function w(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}function x(){}function j(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&v("85"),this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var S=j.prototype=new x;S.constructor=j,r(S,w.prototype),S.isPureReactComponent=!0;var _={current:null,currentDispatcher:null},E=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,n){var r=void 0,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)E.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var f=Array(c),l=0;l<c;l++)f[l]=arguments[l+2];o.children=f}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:u,ref:a,props:o,_owner:_.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var T=/\/+/g,R=[];function $(e,t,n,r){if(R.length){var o=R.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function M(e,t,n){return null==e?0:function e(t,n,r,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var c=!1;if(null===t)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case u:c=!0}}if(c)return r(o,t,""===n?"."+N(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var f=0;f<t.length;f++){var l=n+N(a=t[f],f);c+=e(a,l,r,o)}else if(l=null===t||"object"!=typeof t?null:"function"==typeof(l=b&&t[b]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),f=0;!(a=t.next()).done;)c+=e(a=a.value,l=n+N(a,f++),r,o);else"object"===a&&v("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return c}(e,"",t,n)}function N(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function V(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?U(e,r,n,function(e){return e}):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(T,"$&/")+"/")+n)),r.push(e))}function U(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(T,"$&/")+"/"),M(e,I,t=$(t,i,r,o)),A(t)}var q={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return U(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;M(e,V,t=$(null,null,t,n)),A(t)},count:function(e){return M(e,function(){return null},null)},toArray:function(e){var t=[];return U(e,t,null,function(e){return e}),t},only:function(e){return C(e)||v("143"),e}},createRef:function(){return{current:null}},Component:w,PureComponent:j,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:y,render:e}},lazy:function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},Fragment:a,StrictMode:c,Suspense:d,createElement:P,cloneElement:function(e,t,n){(null===e||void 0===e)&&v("267",e);var o=void 0,u=r({},e.props),a=e.key,c=e.ref,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=_.current),void 0!==t.key&&(a=""+t.key);var l=void 0;for(o in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)E.call(t,o)&&!k.hasOwnProperty(o)&&(u[o]=void 0===t[o]&&void 0!==l?l[o]:t[o])}if(1===(o=arguments.length-2))u.children=n;else if(1<o){l=Array(o);for(var s=0;s<o;s++)l[s]=arguments[s+2];u.children=l}return{$$typeof:i,type:e.type,key:a,ref:c,props:u,_owner:f}},createFactory:function(e){var t=P.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.6.3",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:_,assign:r}};q.unstable_ConcurrentMode=p,q.unstable_Profiler=f;var D={default:q},F=D&&q||D;e.exports=F.default||F},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,a=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var f in n=Object(arguments[c]))o.call(n,f)&&(a[f]=n[f]);if(r){u=r(n);for(var l=0;l<u.length;l++)i.call(n,u[l])&&(a[u[l]]=n[u[l]])}}return a}},function(e,t,n){"use strict";var r=n(6);function o(){}e.exports=function(){function e(e,t,n,o,i,u){if(u!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(1),u=n.n(i),a=n(2),c=n.n(a);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return"object"===("undefined"==typeof window?"undefined":l(window))&&"null"!==window}function p(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}var y=function(e){if(s())for(var t=e+"=",n=document.cookie.split(";"),r=null,o=0;o<n.length;o+=1){for(r=n[o];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}return null},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365;if(s()){var r=e+"="+encodeURIComponent(t),o=new Date;o.setTime(o.getTime()+864e5*n);var i="expires="+o.toGMTString();document.cookie=[r,i,"path=/"].join(";")}};function h(e,t){return e.filter(function(e){return e.name===t})[0]}function m(e){var t=e.variants,n=e.chosenVariantName;return{name:e.name,chosenVariantName:n,variants:t}}function b(e,t){return(e=t?e:function(e){var t=[];return e.forEach(function(e){for(var n=e.weight,r=n?10*n:1,o=0;o<r;o++)t.push(e)}),t}(e))[function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;return r&&(e=c()(r)()),Math.floor((e||Math.random())*(n-t+1))+t}(0,e.length-1,t)]}function v(e){for(var t={},n=Object.entries(e),r=0;r<n.length;r++){var o=f(n[r],2),i=o[0],u=o[1].chosenVariantName;t[i]=u}return t}var g="react_splitz";o.a.createContext({exps:{},updateExperiments:function(){}});function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var E=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?_(e):t}(this,j(t).apply(this,arguments))).updateExperiments=e.updateExperiments.bind(_(_(e))),e.state={exps:e.getChosenVariants(),updateExperiments:e.updateExperiments},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(t,r["Component"]),function(e,t,n){t&&x(e.prototype,t),n&&x(e,n)}(t,[{key:"getChosenVariants",value:function(){var e=this.props,t=e.experiments,n=e.forcedExperiments,r=e.disableAll,o=e.getExperiments,i=this.props,u=i.getCookie,a=i.setCookie;s()&&(u=y,a=d);var c=function(e){var t=e.disableAll,n=e.experiments,r=e.getCookie,o=e.setCookie,i=e.forcedExperiments,u=void 0===i?{}:i;if("function"!=typeof r||"function"!=typeof o)throw new Error("Both `getCookie` & `setCookie` function props must be provided when rendering components on the server.");if(!Array.isArray(n))throw new Error("The `experiments` prop must be an array and provided to `TestContainer` in order to enable experiments.");var a={};if(!t){var c=JSON.parse(r(g)||"{}");n.forEach(function(e){var t=e.name,n=e.variants,r=e.identifier,o=c[t],i=o,f=h(n,i),l=u[t],s=h(n,l);s?(i=l,f=s):!r&&o&&f||(i=(f=b(n,r)).name),a[t]=m({name:t,chosenVariantName:f.name,variants:n})})}var f=v(a);return o(g,JSON.stringify(f)),{chosenExperiments:a}}({experiments:t,getCookie:u,setCookie:a,forcedExperiments:n,disableAll:r}).chosenExperiments;return"function"==typeof o&&o(c),c}},{key:"updateExperiments",value:function(e,t){if(s()){var n=function(e,t){for(var n={},r=Object.entries(t),o=0;o<r.length;o++){var i=f(r[o],2),u=i[0],a=i[1];void 0===e[u]?p('Experiment "'.concat(u,"\" is not a currently running experiment and therefore cannot be updated. Check your input in the 'updateExperiments function to make sure you don't have a typo.")):h(e[u].variants,a)?n[u]=m({name:u,chosenVariantName:a,variants:e[u].variants}):p('Variant "'.concat(a,'" is not defined in experiment "').concat(u,'". Please check updateExperiments function for any typos.'))}return n}(this.state.exps,e),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){w(e,t,n[t])})}return e}({},this.state.exps,n);this.setState({exps:r},function(){if("function"==typeof t)return t()});var o=v(r);d(g,JSON.stringify(o))}else p("updateExperiments() can only be called in the browser. This is a no-op. Please check the code where you are calling this function.")}},{key:"render",value:function(){return o.a.createElement(V.Provider,{value:this.state},o.a.Children.only(this.props.children))}}]),t}();E.propTypes={children:u.a.element.isRequired,experiments:u.a.arrayOf(u.a.object),getCookie:u.a.func,setCookie:u.a.func,forcedExperiments:u.a.object,disableAll:u.a.bool,getExperiments:u.a.func};var k=E;function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(){return(C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function T(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){return t=t||{},function(n){var i=function(i){function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),$(this,A(u).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(u,r["Component"]),function(e,t,n){t&&R(e.prototype,t),n&&R(e,n)}(u,[{key:"render",value:function(){var r=this.props,i=r.forwardRef,u=T(r,["forwardRef"]);return o.a.createElement(V.Consumer,null,function(r){var a=r.exps,c=r.updateExperiments,f=function(e,t){var n={};return Object.keys(t).forEach(function(r){var o=t[r],i=e[o];i&&(n[r]={variant:i.chosenVariantName})}),n}(a,e),l={};return t.updateExperiments&&(l.updateExperiments=c),o.a.createElement(n,C({},f,u,{ref:i},l))})}}]),u}();return o.a.forwardRef(function(e,t){return o.a.createElement(i,C({},e,{forwardRef:t}))})}}n.d(t,"ExperimentContext",function(){return V}),n.d(t,"TestContainer",function(){return k}),n.d(t,"withTest",function(){return N});var V=o.a.createContext({exps:{},updateExperiments:function(){}})}]));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactSplitz=t(require("react")):e.ReactSplitz=t(e.react)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=6)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(3)()},function(e,t,n){"use strict";(function(t){var n=256,r=[],o=void 0===t?window:t,i=Math.pow(n,6),a=Math.pow(2,52),u=2*a,c=n-1,f=Math.random;function p(e,t){for(var n,r=e+"",o=0;o<r.length;)t[c&o]=c&(n^=19*t[c&o])+r.charCodeAt(o++);return s(t)}function s(e){return String.fromCharCode.apply(0,e)}e.exports=function(t,f){if(f&&!0===f.global)return f.global=!1,Math.random=e.exports(t,f),f.global=!0,Math.random;var l=[],y=(p(function e(t,n){var r,o=[],i=(typeof t)[0];if(n&&"o"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"s"==i?t:t+"\0"}(f&&f.entropy||!1?[t,s(r)]:0 in arguments?t:function(e){try{return o.crypto.getRandomValues(e=new Uint8Array(n)),s(e)}catch(e){return[+new Date,o,o.navigator&&o.navigator.plugins,o.screen,s(r)]}}(),3),l),new function(e){var t,r=e.length,o=this,i=0,a=o.i=o.j=0,u=o.S=[];r||(e=[r++]);for(;i<n;)u[i]=i++;for(i=0;i<n;i++)u[i]=u[a=c&a+e[i%r]+(t=u[i])],u[a]=t;(o.g=function(e){for(var t,r=0,i=o.i,a=o.j,u=o.S;e--;)t=u[i=c&i+1],r=r*n+u[c&(u[i]=u[a=c&a+t])+(u[a]=t)];return o.i=i,o.j=a,r})(n)}(l));return p(s(y.S),r),function(){for(var e=y.g(6),t=i,r=0;e<a;)e=(e+r)*n,t*=n,r=y.g(1);for(;e>=u;)e/=2,t/=2,r>>>=1;return(e+r)/t}},e.exports.resetGlobal=function(){Math.random=f},p(Math.random(),r)}).call(this,n(5))},function(e,t,n){"use strict";var r=n(4);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(1),a=n.n(i),u=n(2),c=n.n(u);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return"object"===("undefined"==typeof window?"undefined":p(window))&&"null"!==window}function l(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}var y=function(e){if(s())for(var t=e+"=",n=document.cookie.split(";"),r=null,o=0;o<n.length;o+=1){for(r=n[o];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}return null},d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365;if(s()){var r=e+"="+encodeURIComponent(t),o=new Date;o.setTime(o.getTime()+864e5*n);var i="expires="+o.toGMTString();document.cookie=[r,i,"path=/"].join(";")}};function h(e,t){return e.filter(function(e){return e.name===t})[0]}function b(e){var t=e.variants,n=e.chosenVariantName;return{name:e.name,chosenVariantName:n,variants:t}}function m(e,t){return(e=t?e:function(e){var t=[];return e.forEach(function(e){for(var n=e.weight,r=n?10*n:1,o=0;o<r;o++)t.push(e)}),t}(e))[function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;return r&&(e=c()(r)()),Math.floor((e||Math.random())*(n-t+1))+t}(0,e.length-1,t)]}function v(e){for(var t={},n=Object.entries(e),r=0;r<n.length;r++){var o=f(n[r],2),i=o[0],a=o[1].chosenVariantName;t[i]=a}return t}var g="react_splitz";o.a.createContext({exps:{},updateExperiments:function(){}});function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?S(e):t}(this,j(t).apply(this,arguments))).updateExperiments=e.updateExperiments.bind(S(S(e))),e.state={exps:e.getChosenVariants(),updateExperiments:e.updateExperiments},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(t,r["Component"]),function(e,t,n){t&&O(e.prototype,t),n&&O(e,n)}(t,[{key:"getChosenVariants",value:function(){var e=this.props,t=e.experiments,n=e.forcedExperiments,r=e.disableAll,o=e.getExperiments,i=this.props,a=i.getCookie,u=i.setCookie;s()&&(a=y,u=d);var c=function(e){var t=e.disableAll,n=e.experiments,r=e.getCookie,o=e.setCookie,i=e.forcedExperiments,a=void 0===i?{}:i;if("function"!=typeof r||"function"!=typeof o)throw new Error("Both `getCookie` & `setCookie` function props must be provided when rendering components on the server.");if(!Array.isArray(n))throw new Error("The `experiments` prop must be an array and provided to `TestContainer` in order to enable experiments.");var u={};if(!t){var c=JSON.parse(r(g)||"{}");n.forEach(function(e){var t=e.name,n=e.variants,r=e.identifier,o=c[t],i=o,f=h(n,i),p=a[t],s=h(n,p);s?(i=p,f=s):!r&&o&&f||(i=(f=m(n,r)).name),u[t]=b({name:t,chosenVariantName:f.name,variants:n})})}var f=v(u);return o(g,JSON.stringify(f)),{chosenExperiments:u}}({experiments:t,getCookie:a,setCookie:u,forcedExperiments:n,disableAll:r}).chosenExperiments;return"function"==typeof o&&o(c),c}},{key:"updateExperiments",value:function(e,t){if(s()){var n=function(e,t){for(var n={},r=Object.entries(t),o=0;o<r.length;o++){var i=f(r[o],2),a=i[0],u=i[1];void 0===e[a]?l('Experiment "'.concat(a,"\" is not a currently running experiment and therefore cannot be updated. Check your input in the 'updateExperiments function to make sure you don't have a typo.")):h(e[a].variants,u)?n[a]=b({name:a,chosenVariantName:u,variants:e[a].variants}):l('Variant "'.concat(u,'" is not defined in experiment "').concat(a,'". Please check updateExperiments function for any typos.'))}return n}(this.state.exps,e),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){w(e,t,n[t])})}return e}({},this.state.exps,n);this.setState({exps:r},function(){if("function"==typeof t)return t()});var o=v(r);d(g,JSON.stringify(o))}else l("updateExperiments() can only be called in the browser. This is a no-op. Please check the code where you are calling this function.")}},{key:"render",value:function(){return o.a.createElement(I.Provider,{value:this.state},o.a.Children.only(this.props.children))}}]),t}();_.propTypes={children:a.a.element.isRequired,experiments:a.a.arrayOf(a.a.object),getCookie:a.a.func,setCookie:a.a.func,forcedExperiments:a.a.object,disableAll:a.a.bool,getExperiments:a.a.func};var C=_;function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(){return(k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function T(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e,t){return t=t||{},function(n){var i=function(i){function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),M(this,A(a).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}(a,r["Component"]),function(e,t,n){t&&R(e.prototype,t),n&&R(e,n)}(a,[{key:"render",value:function(){var r=this.props,i=r.forwardRef,a=T(r,["forwardRef"]);return o.a.createElement(I.Consumer,null,function(r){var u=r.exps,c=r.updateExperiments,f=function(e,t){var n={};return Object.keys(t).forEach(function(r){var o=t[r],i=e[o];i&&(n[r]={variant:i.chosenVariantName})}),n}(u,e),p={};return t.updateExperiments&&(p.updateExperiments=c),o.a.createElement(n,k({},f,a,{ref:i},p))})}}]),a}();return o.a.forwardRef(function(e,t){return o.a.createElement(i,k({},e,{forwardRef:t}))})}}n.d(t,"ExperimentContext",function(){return I}),n.d(t,"TestContainer",function(){return C}),n.d(t,"withTest",function(){return N});var I=o.a.createContext({exps:{},updateExperiments:function(){}})}])});
+1
-1
{
"name": "react-splitz",
"version": "1.0.0",
"version": "1.0.1",
"description": "A/B & Multivariate Testing library for React projects",

@@ -5,0 +5,0 @@ "keywords": [

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