Socket
Socket
Sign inDemoInstall

@pactsafe/pactsafe-react-sdk

Package Overview
Dependencies
90
Maintainers
24
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.7.0 to 2.8.0-0

6

es/index.js

@@ -1,4 +0,2 @@

import _PSClickWrap from './PSClickWrap';
export { _PSClickWrap as PSClickWrap };
import _PSBrowseWrap from './PSBrowseWrap';
export { _PSBrowseWrap as PSBrowseWrap };
export { default as PSClickWrap } from './PSClickWrap';
export { default as PSBrowseWrap } from './PSBrowseWrap';

@@ -1,3 +0,5 @@

function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
/* global _ps */

@@ -9,5 +11,3 @@ import React from 'react';

var PSBrowseWrap =
/*#__PURE__*/
function (_React$Component) {
var PSBrowseWrap = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(PSBrowseWrap, _React$Component);

@@ -59,13 +59,2 @@

_proto.isSnippetLoaded = function isSnippetLoaded() {
var psScriptUrl = this.props.psScriptUrl;
var scripts = document.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i += 1) {
if (scripts[i].src.indexOf(psScriptUrl) !== -1) return true;
}
return false;
};
_proto.render = function render() {

@@ -75,9 +64,6 @@ var _this$props3 = this.props,

linkText = _this$props3.linkText;
return (
/*#__PURE__*/
React.createElement("a", {
href: link,
id: this.targetSelector
}, linkText)
);
return /*#__PURE__*/React.createElement("a", {
href: link,
id: this.targetSelector
}, linkText);
};

@@ -84,0 +70,0 @@

@@ -1,7 +0,9 @@

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -13,9 +15,7 @@

import isRequiredIf from 'react-proptype-conditional-require';
import uuid from 'uuid/v4';
import { v4 as uuidv4 } from 'uuid';
import isEqual from 'lodash.isequal';
import PSSnippet from './PSSnippet';
var PSClickWrap =
/*#__PURE__*/
function (_React$Component) {
var PSClickWrap = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(PSClickWrap, _React$Component);

@@ -79,3 +79,3 @@

_ps('set', 'client_version', "2.7.0");
_ps('set', 'client_version', "2.8.0-0");

@@ -96,3 +96,5 @@ return _this;

var _this$props2 = this.props,
acceptanceLanguage = _this$props2.acceptanceLanguage,
clickWrapStyle = _this$props2.clickWrapStyle,
customData = _this$props2.customData,
filter = _this$props2.filter,

@@ -117,2 +119,10 @@ groupKey = _this$props2.groupKey,

if (!isEqual(customData, prevProps.customData)) {
_ps('set', 'custom_data', customData);
}
if (acceptanceLanguage !== prevProps.acceptanceLanguage) {
_ps('set', 'acceptance_language', acceptanceLanguage);
}
if (!isEqual(renderData, prevProps.renderData)) {

@@ -194,3 +204,3 @@ if (clickWrapStyle && _psLoadedValidGroup) {

var newEventListenerID = uuid();
var newEventListenerID = uuidv4();

@@ -248,3 +258,5 @@ eventCallbackFn.toString = function () {

var _this$props4 = this.props,
acceptanceLanguage = _this$props4.acceptanceLanguage,
clickWrapStyle = _this$props4.clickWrapStyle,
customData = _this$props4.customData,
confirmationEmail = _this$props4.confirmationEmail,

@@ -262,12 +274,14 @@ containerId = _this$props4.containerId,

var options = {
filter: filter,
allow_disagreed: allowDisagreed || false,
acceptance_language: acceptanceLanguage,
auto_run: displayImmediately,
confirmation_email: confirmationEmail,
container_selector: containerId,
confirmation_email: confirmationEmail,
signer_id_selector: signerIdSelector,
style: clickWrapStyle,
custom_data: customData,
display_all: displayAll,
filter: filter,
force_scroll: forceScroll,
render_data: renderData,
auto_run: displayImmediately,
force_scroll: forceScroll,
allow_disagreed: allowDisagreed || false
signer_id_selector: signerIdSelector,
style: clickWrapStyle
};

@@ -314,8 +328,5 @@ if (injectSnippetOnly) return;

var containerId = this.props.containerId;
return (
/*#__PURE__*/
React.createElement("div", {
id: containerId
})
);
return /*#__PURE__*/React.createElement("div", {
id: containerId
});
};

@@ -331,2 +342,3 @@

PSClickWrap.propTypes = process.env.NODE_ENV !== "production" ? {
acceptanceLanguage: PropTypes.string,
accessId: isRequiredIf(PropTypes.string, function (props) {

@@ -337,2 +349,3 @@ return !props.hasOwnProperty('injectSnippetOnly');

confirmationEmail: PropTypes.bool,
customData: PropTypes.object,
disableSending: PropTypes.bool,

@@ -339,0 +352,0 @@ displayAll: PropTypes.bool,

"use strict";
exports.__esModule = true;
exports.PSClickWrap = exports.PSBrowseWrap = void 0;
var _PSClickWrap2 = _interopRequireDefault(require("./PSClickWrap"));
var _PSClickWrap = _interopRequireDefault(require("./PSClickWrap"));
exports.PSClickWrap = _PSClickWrap2["default"];
exports.PSClickWrap = _PSClickWrap["default"];
var _PSBrowseWrap2 = _interopRequireDefault(require("./PSBrowseWrap"));
var _PSBrowseWrap = _interopRequireDefault(require("./PSBrowseWrap"));
exports.PSBrowseWrap = _PSBrowseWrap2["default"];
exports.PSBrowseWrap = _PSBrowseWrap["default"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -16,7 +16,7 @@ "use strict";

function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
var PSBrowseWrap =
/*#__PURE__*/
function (_React$Component) {
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var PSBrowseWrap = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(PSBrowseWrap, _React$Component);

@@ -68,13 +68,2 @@

_proto.isSnippetLoaded = function isSnippetLoaded() {
var psScriptUrl = this.props.psScriptUrl;
var scripts = document.getElementsByTagName('script');
for (var i = 0; i < scripts.length; i += 1) {
if (scripts[i].src.indexOf(psScriptUrl) !== -1) return true;
}
return false;
};
_proto.render = function render() {

@@ -84,9 +73,6 @@ var _this$props3 = this.props,

linkText = _this$props3.linkText;
return (
/*#__PURE__*/
_react["default"].createElement("a", {
href: link,
id: this.targetSelector
}, linkText)
);
return /*#__PURE__*/_react["default"].createElement("a", {
href: link,
id: this.targetSelector
}, linkText);
};

@@ -93,0 +79,0 @@

@@ -12,3 +12,3 @@ "use strict";

var _v = _interopRequireDefault(require("uuid/v4"));
var _uuid = require("uuid");

@@ -21,13 +21,13 @@ var _lodash = _interopRequireDefault(require("lodash.isequal"));

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var PSClickWrap =
/*#__PURE__*/
function (_React$Component) {
var PSClickWrap = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(PSClickWrap, _React$Component);

@@ -91,3 +91,3 @@

_ps('set', 'client_version', "2.7.0");
_ps('set', 'client_version', "2.8.0-0");

@@ -108,3 +108,5 @@ return _this;

var _this$props2 = this.props,
acceptanceLanguage = _this$props2.acceptanceLanguage,
clickWrapStyle = _this$props2.clickWrapStyle,
customData = _this$props2.customData,
filter = _this$props2.filter,

@@ -129,2 +131,10 @@ groupKey = _this$props2.groupKey,

if (!(0, _lodash["default"])(customData, prevProps.customData)) {
_ps('set', 'custom_data', customData);
}
if (acceptanceLanguage !== prevProps.acceptanceLanguage) {
_ps('set', 'acceptance_language', acceptanceLanguage);
}
if (!(0, _lodash["default"])(renderData, prevProps.renderData)) {

@@ -206,3 +216,3 @@ if (clickWrapStyle && _psLoadedValidGroup) {

var newEventListenerID = (0, _v["default"])();
var newEventListenerID = (0, _uuid.v4)();

@@ -260,3 +270,5 @@ eventCallbackFn.toString = function () {

var _this$props4 = this.props,
acceptanceLanguage = _this$props4.acceptanceLanguage,
clickWrapStyle = _this$props4.clickWrapStyle,
customData = _this$props4.customData,
confirmationEmail = _this$props4.confirmationEmail,

@@ -274,12 +286,14 @@ containerId = _this$props4.containerId,

var options = {
filter: filter,
allow_disagreed: allowDisagreed || false,
acceptance_language: acceptanceLanguage,
auto_run: displayImmediately,
confirmation_email: confirmationEmail,
container_selector: containerId,
confirmation_email: confirmationEmail,
signer_id_selector: signerIdSelector,
style: clickWrapStyle,
custom_data: customData,
display_all: displayAll,
filter: filter,
force_scroll: forceScroll,
render_data: renderData,
auto_run: displayImmediately,
force_scroll: forceScroll,
allow_disagreed: allowDisagreed || false
signer_id_selector: signerIdSelector,
style: clickWrapStyle
};

@@ -326,8 +340,5 @@ if (injectSnippetOnly) return;

var containerId = this.props.containerId;
return (
/*#__PURE__*/
_react["default"].createElement("div", {
id: containerId
})
);
return /*#__PURE__*/_react["default"].createElement("div", {
id: containerId
});
};

@@ -343,2 +354,3 @@

PSClickWrap.propTypes = process.env.NODE_ENV !== "production" ? {
acceptanceLanguage: _propTypes["default"].string,
accessId: (0, _reactProptypeConditionalRequire["default"])(_propTypes["default"].string, function (props) {

@@ -349,2 +361,3 @@ return !props.hasOwnProperty('injectSnippetOnly');

confirmationEmail: _propTypes["default"].bool,
customData: _propTypes["default"].object,
disableSending: _propTypes["default"].bool,

@@ -351,0 +364,0 @@ displayAll: _propTypes["default"].bool,

{
"name": "@pactsafe/pactsafe-react-sdk",
"version": "2.7.0",
"description": "PactSafe React SDK - React SDK for easy Clickwrap/Browsewrap implementation leveraging PactSafe's JavaScript API",
"author": "PactSafe",
"version": "2.8.0-0",
"description": "Ironclad Clickwrap React SDK - SDK for easy Ironclad Clickwrap implementations leveraging the Ironclad JavaScript Library & API",
"author": "Ironclad",
"license": "MIT",

@@ -31,8 +31,8 @@ "main": "lib/index.js",

"dependencies": {
"classnames": "^2.3.1",
"dotenv-webpack": "^1.8.0",
"classnames": "^2.3.2",
"dotenv-webpack": "^8.0.1",
"lodash.isequal": "^4.5.0",
"prop-types": "^15.7.2",
"prop-types": "^15.8.1",
"react-proptype-conditional-require": "^1.0.4",
"uuid": "^3.4.0"
"uuid": "^9.0.0"
},

@@ -43,22 +43,23 @@ "peerDependencies": {

"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.0",
"babel-jest": "^23.6.0",
"@babel/core": "^7.19.1",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-export-default-from": "^7.18.10",
"@babel/preset-env": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"babel-jest": "^29.0.3",
"babel-plugin-search-and-replace": "^1.1.1",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"enzyme-to-json": "^3.3.4",
"eslint": "^5.8.0",
"eslint-config-airbnb": "^17.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jest": "^22.0.1",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"gh-pages": "^2.0.1",
"jest": "^24.9.0",
"jsdom": "^13.0.0",
"np": "^7.5.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.2",
"eslint": "^8.23.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.31.8",
"gh-pages": "^4.0.0",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"jsdom": "^20.0.0",
"np": "^7.6.2",
"nwb": "^0.25.2",

@@ -85,3 +86,4 @@ "react": "^16.6.0",

"^.+\\.js$": "<rootDir>/jest.transform.js"
}
},
"testEnvironment": "jsdom"
},

@@ -91,9 +93,2 @@ "publishConfig": {

},
"contributors": [
{
"name": "Kyle Peeler",
"email": "kpeeler@pactsafe.com",
"url": "https://pactsafe.com"
}
],
"keywords": [

@@ -105,4 +100,5 @@ "react-component",

"browsewrap",
"pactsafe"
"pactsafe",
"ironclad"
]
}

@@ -1,16 +0,17 @@

# PactSafe React SDK
# Ironclad Clickwrap React SDK
[![npm package][npm-badge]][npm]
## Features
- Automatically loads the PactSafe Snippet into your app so all you have to do is call `_ps` to use the [PactSafe library](https://developer.pactsafe.com/docs/get-to-know-our-javascript-library).
Automatically loads the Ironclad Clickwrap JavaScript Library into your app so all you have to do is call `_ps` to use the [Ironclad Clickwrap JavaScript library](https://developer.pactsafe.com/docs/get-to-know-our-javascript-library).
#### PSClickWrap Component
### PSClickWrap Component
- Renders a PactSafe ClickWrap group by providing a site access ID and group key
- Ability to render PactSafe ClickWrap groups dynamically using a filter to specify contract ID's and/or tags
- Ability to render a dynamic PactSafe ClickWrap by passing in a custom `render_data` object
- Ability to override properties set within the PactSafe App's group configuration such as:
- ClickWrap style using the `clickWrapStyle` prop
- Renders a clickwrap group by providing a site access ID and group key
- Render clickwrap groups dynamically using a filter to specify template ID's and/or tags
- Dynamically add data to contracts by passing in a custom `render_data` object
- Ability to override properties set within the Ironclad Clickwrap App's group configuration such as:
- Clickwrap style using the `clickWrapStyle` prop
- Signer ID selector using the `signerIdSelector` prop

@@ -21,24 +22,12 @@ - Displaying all contracts using the `displayAll` prop

#### PSBrowseWrap Component
- Renders a PactSafe BrowseWrap group by providing a site access ID and group key
- Ability to override properties set within the PactSafe App's group configuration such as:
- Position of BrowseWrap with the `position` prop
- Whether the BrowseWrap should always be visible with the `alwaysVisible` prop
- and more! ([See more detailed documentation on available PSBrowseWrap props here](#props))
## Demo & Examples
[Check out a live demo of both the PSClickwrap and PSBrowsewrap components here](https://pactsafe.github.io/pactsafe-react-sdk/)
[Check out a live demo of both the PSClickwrap here](https://pactsafe.github.io/pactsafe-react-sdk/)
#### PSClickWrap
### PSClickWrap
![PSClickCrap](images/psclickwrap.gif "PSClickWrap")
#### PSBrowseWrap
To build the examples locally (after cloning this repo from Github), you must first add your Ironclad Clickwrap Site Access ID by creating a `.env` file in the root directory and add the following contents:
![PSBrowseWrap](images/psbrowsewrap.gif "PSBrowseWrap")
To build the examples locally (after cloning this repo from Github), you must first add your PactSafe access id by creating a `.env` file in the root directory and add the following contents:
```

@@ -48,6 +37,6 @@ PACTSAFE_ACCESS_ID=<YOUR_PACTSAFE_ACCESS_ID_HERE>

After doing this, you need to create both a clickwrap group with the group key `example-clickwrap` and a browsewrap with the key `example-browsewrap`. In your example clickwrap group, if you
want the render data to work properly, create three tokens in a contract within the `example-clickwrap` group with the API field names to be: `user_token_value`, `another_token_value`, and `last_token_value`.
After doing this, you need to create both a clickwrap group with the group key `example-clickwrap`. In your example clickwrap group, if you
want the render data to work properly, create three tokens in a template within the `example-clickwrap` group with the API field names to be: `user_token_value`, `another_token_value`, and `last_token_value`.
[Some helpful information on creating contracts with render data can be found here.](https://developer.pactsafe.com/docs/how-to-use-smart-contracts-with-the-javascript-library)
[Some helpful information on creating templates with render data can be found here.](https://clickwrap-developer.ironcladapp.com/docs/how-to-use-dynamic-contracts-with-the-javascript-library)
(Note: You shouldn't have to write any javascript to get the demo to work! When implementing yourself, the React SDK uses the `dynamic` and `renderData` props to handle rendering of dynamic contracts instead of having to make `_ps` calls.)

@@ -96,5 +85,5 @@

Replace with `YOUR_PACTSAFE_ACCESS_ID_HERE` with your PactSafe Site Access ID found [here](https://app.pactsafe.com/settings/account)
Replace with `YOUR_PACTSAFE_ACCESS_ID_HERE` with your Ironclad Clickwrap Site Access ID found [here](https://app.pactsafe.com/settings/account)
Replace `YOUR_GROUP_KEY_HERE` with your group's key found within your [PactSafe group's configuration](https://app.pactsafe.com/groups)
Replace `YOUR_GROUP_KEY_HERE` with your group's key found within your [Ironclad Clickwrap Group's configuration](https://app.pactsafe.com/groups)

@@ -105,14 +94,2 @@ Pass in any additional options using props on the `PSClickWrap` component.

#### Using PSBrowseWrap
Your PSBrowseWrap component should be placed where you would like your Legal Center link to appear on the page. Pass what you want the link's text to display as using the `linkText` prop.
```JSX
import { PSBrowseWrap } from '@pactsafe/pactsafe-react-sdk'
...
<PSBrowseWrap accessId={YOUR_PACTSAFE_ACCESS_ID_HERE} groupKey={YOUR_GROUP_KEY_HERE} linkText={'View Legal Center'}/>
```
---

@@ -128,6 +105,8 @@

|:--------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------:|:-------------------------------------------:|:--------------------------------------------:|
| `accessId` | PactSafe site access ID | string | Yes, if `injectSnippetOnly` is not passed | undefined |
| `clickWrapStyle` | Override the clickwrap style specified in the PactSafe Group Interface | string.oneOf[`'full'`, `'scroll'`, `'checkbox'`, `'combined'`, `'embedded'`] | No | Value specified in PactSafe Group's UI |
| `confirmationEmail` | Override whether to send a confirmation email to the signer upon contract acceptance | bool | No | Value specified in PactSafe Group's UI |
| `acceptanceLanguage` | Override the acceptance language specified in the Ironclad Clickwrap App's UI. | string | No | Value specified in Ironclad Clickwrap Group's UI |
| `accessId` | Ironclad Clickwrap Site Access ID | string | Yes, if `injectSnippetOnly` is not passed | undefined |
| `clickWrapStyle` | Override the clickwrap style specified in the Ironclad Clickwrap Group Interface | string.oneOf[`'full'`, `'scroll'`, `'checkbox'`, `'combined'`, `'embedded'`] | No | Value specified in Ironclad Clickwrap Group's UI |
| `confirmationEmail` | Override whether to send a confirmation email to the signer upon contract acceptance | bool | No | Value specified in Ironclad Clickwrap Group's UI |
| `containerId` | The div ID that will contain your clickwrap. You should override this if you plan on displaying more than one contract on a page. | string | No | ps-clickwrap |
| `customData` | Object containing custom keys and values you specify that is added to the metadata on your acceptance. | object | No | undefined |
| `disableSending` | Turn this on if you want to manually send the agreed event instead of it automatically being sent on contract acceptance. [See documentation on manually sending the agreed event here.](https://developer.pactsafe.com/docs/get-to-know-our-javascript-library#section-3-sending-agreed-in-javascript) | bool | No | false |

@@ -138,4 +117,4 @@ | `displayAll` | Display all contracts in the group immediately. If disabled, a contract will only be displayed if the signer hasn't accepted the latest version. | bool | No | true |

| `filter` | Allows you to dynamically load contracts without having to specify a group. Filter must be in the format: `id==123,456` OR `id==12345 and tags==tag1,tag2` OR `tags==tag1,tag2`. [See documentation for more information on using dynamic groups.](https://developer.pactsafe.com/docs/dynamic-groups-and-how-to-use-them) | string | No, Yes if `groupKey` prop is not passed | undefined |
| `forceScroll` | Disable acceptance until the signer scrolls to the bottom of each contract. | bool | No | Value specified in PactSafe Group's UI |
| `groupKey` | PactSafe group key, this is found within the PactSafe Groups configuration. | string | Yes, unless `filter` prop is passed | undefined |
| `forceScroll` | Disable acceptance until the signer scrolls to the bottom of each contract. | bool | No | Value specified in Ironclad Clickwrap Group's UI |
| `groupKey` | Ironclad Clickwrap group key, this is found within the Ironclad Clickwrap Groups configuration. | string | Yes, unless `filter` prop is passed | undefined |
| `injectSnippetOnly` | Prop to use if you only want to inject the snippet and do not want the SDK to create and initialize a clickwrap for you. | boolean | No | false |

@@ -147,3 +126,3 @@ | `psScriptUrl` | If using a custom (or development) version of the ps.js file, pass the file URL in here. You probably won't need to use this. | string | No | '//vault.pactsafe.io/ps.min.js' |

| `signerId` | Use this to set the signer id directly. Note that if this value is tied to a state variable updated via user input, you may hit rate limits if it is updated frequently in a short period of time. To avoid hitting a rate limit, it is best to set the value tied to this prop only when the user's input is complete as opposed to changing this value on a per character basis. | string | No, unless `signerIdSelector` is not passed | undefined |
| `testMode` | Enable this to register any contract acceptances as test data that can be cleared within the PactSafe UI | bool | No | false |
| `testMode` | Enable this to register any contract acceptances as test data that can be cleared within the Ironclad Clickwrap UI | bool | No | false |
| `allowDisagreed` | Enable this to allow invalid events to be triggered when a signer unchecks a checkbox. | bool | If `onInvalid` is passed | false |

@@ -204,3 +183,3 @@ | `onAll` | See [onAll](#onAll) below | function | No | undefined |

The list below describes the props names and corresponding PactSafe event:
The list below describes the props names and corresponding Ironclad Clickwrap events:

@@ -370,18 +349,2 @@ ## <a name="onAll"></a> onAll

### PSBrowseWrap Props
(*Note you may have to scroll to the right to see the description*)
| Prop | Type | Default | Required? | Description |
|:----------------------:|:------------------------------------------------------------------:|:---------------------------------------:|:----------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| `accessId` | string | Required Value | Yes | PactSafe site access ID |
| `alwaysVisible` | bool | false | No | Keep the badge visible on the page at all times. If disabled, the badge will be hidden if the target link is visible on screen. |
| `badgeText` | string | value of `linkText` | No | Provide alternate text for the BrowseWrap badge |
| `groupKey` | string | null | Yes | PactSafe group key, this is found within the PactSafe Groups configuration. |
| `link` | string | null | If `openLegalCenter` is set to false | Location of where the BrowseWrap link should redirect to, should only be used if `openLegalCenter` is set to false, otherwise the link will open the group's PactSafe legal center |
| `linkText` | string | null | Yes | The text that your BrowseWrap link will display (for example, 'Legal Center' or 'Terms of Service') |
| `openLegalCenter` | bool | true | No | Open this group's legal center page when the badge or link is clicked. If enabled, the target link's original `href` will be replaced. |
| `position` | string.oneOf[`'middle'`, `'left'`, `'right'`, `'auto'`] | auto | Yes | Position of where the BrowseWrap badge will float within the browser window |
| `psScriptUrl` | string | '//vault.pactsafe.io/ps.min.js' | Yes | If using a custom (or development) version of the ps.js file, pass the file URL in here. You probably won't need to use this. |
## Development (`src`, `lib` and the build process)

@@ -395,5 +358,5 @@

Copyright &copy; 2019 PactSafe.
Copyright &copy; 2019 Ironclad.
[npm-badge]: https://img.shields.io/npm/v/@pactsafe/pactsafe-react-sdk.svg
[npm]: https://www.npmjs.com/package/@pactsafe/pactsafe-react-sdk
/*!
* @pactsafe/pactsafe-react-sdk v2.7.0 - https://github.com/PactSafe/pactsafe-react-sdk
* @pactsafe/pactsafe-react-sdk v2.8.0-0 - https://github.com/PactSafe/pactsafe-react-sdk
* MIT Licensed
*/
!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.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){var r,n,o,i,a,c,s,u,p,l;r=window,n=document,o="script",i=e,a=t,c="_ps",s=function(){console.log("Unable to load the PactSafe PS.JS Library.")},r.PactSafeObject=c,r._ps=r._ps||function(){(r._ps.q=r._ps.q||[]).push(arguments)},r._ps.on=function(){(r._ps.e=r._ps.e||[]).push(arguments)},r._ps.once=function(){(r._ps.eo=r._ps.eo||[]).push(arguments)},r._ps.off=function(){(r._ps.o=r._ps.o||[]).push(arguments)},r._ps.t=1*new Date,r._ps.l=0,u=n.createElement(o),p=n.getElementsByTagName(o)[0],u.async=1,u.src=i,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p?p.parentNode.insertBefore(u,p):document.body.appendChild(u),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,(u=n.createElement(o)).async=1,u.src=a,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p.parentNode.insertBefore(u,p),(l=function(e,t){try{(t=n.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+r._ps.t+"&u="+encodeURIComponent(e),n.getElementsByTagName("body")[0].appendChild(t)}catch(e){}})(i),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,s&&s.call(this),l(a))}),4e3))}),4e3)},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(t[r].src&&-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(!0!=!!e||!e)},o=function(e,t){return Object.hasOwnProperty.call(e,t)},i=function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")};t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(a,c,s){for(var u=arguments.length,p=Array(3<u?u-3:0),l=3;l<u;l++)p[l-3]=arguments[l];return n(t,a,c,s)?o(a,c)?e.apply(void 0,[a,c,s].concat(p)):i(a,c,s,r):e.apply(void 0,[a,c,s].concat(p))}}},function(e,t,r){var n=r(6),o=r(7);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var c=0;c<16;++c)t[i+c]=a[c];return t||o(a)}},function(e,t,r){(function(e,r){var n="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",c=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[i]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var p="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,f=p||l||Function("return this")(),d=t&&!t.nodeType&&t,_=d&&"object"==typeof r&&r&&!r.nodeType&&r,y=_&&_.exports===d,h=y&&p.process,v=function(){try{return h&&h.binding&&h.binding("util")}catch(e){}}(),g=v&&v.isTypedArray;function b(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function m(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var S,w,E,O=Array.prototype,k=Function.prototype,A=Object.prototype,P=f["__core-js_shared__"],R=k.toString,L=A.hasOwnProperty,M=(S=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",I=A.toString,D=RegExp("^"+R.call(L).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=y?f.Buffer:void 0,x=f.Symbol,K=f.Uint8Array,B=A.propertyIsEnumerable,C=O.splice,W=x?x.toStringTag:void 0,U=Object.getOwnPropertySymbols,z=T?T.isBuffer:void 0,N=(w=Object.keys,E=Object,function(e){return w(E(e))}),G=ve(f,"DataView"),V=ve(f,"Map"),F=ve(f,"Promise"),$=ve(f,"Set"),q=ve(f,"WeakMap"),Y=ve(Object,"create"),H=je(G),J=je(V),Q=je(F),X=je($),Z=je(q),ee=x?x.prototype:void 0,te=ee?ee.valueOf:void 0;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new oe;++t<r;)this.add(e[t])}function ae(e){var t=this.__data__=new ne(e);this.size=t.size}function ce(e,t){var r=Ee(e),n=!r&&we(e),o=!r&&!n&&Oe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,c=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=c.length;for(var u in e)!t&&!L.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||me(u,s))||c.push(u);return c}function se(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=L.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var o=I.call(e);n&&(t?e[W]=r:delete e[W]);return o}(e):function(e){return I.call(e)}(e)}function pe(e){return Re(e)&&ue(e)==n}function le(e,t,r,c,s){return e===t||(null==e||null==t||!Re(e)&&!Re(t)?e!=e&&t!=t:function(e,t,r,c,s,u){var p=Ee(e),l=Ee(t),f=p?"[object Array]":be(e),d=l?"[object Array]":be(t),_=(f=f==n?i:f)==i,y=(d=d==n?i:d)==i,h=f==d;if(h&&Oe(e)){if(!Oe(t))return!1;p=!0,_=!1}if(h&&!_)return u||(u=new ae),p||Le(e)?_e(e,t,r,c,s,u):function(e,t,r,n,i,c,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new K(e),new K(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=m;case a:var p=1&n;if(u||(u=j),e.size!=t.size&&!p)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var f=_e(u(e),u(t),n,i,c,s);return s.delete(e),f;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,f,r,c,s,u);if(!(1&r)){var v=_&&L.call(e,"__wrapped__"),g=y&&L.call(t,"__wrapped__");if(v||g){var b=v?e.value():e,S=g?t.value():t;return u||(u=new ae),s(b,S,r,c,u)}}if(!h)return!1;return u||(u=new ae),function(e,t,r,n,o,i){var a=1&r,c=ye(e),s=c.length,u=ye(t).length;if(s!=u&&!a)return!1;var p=s;for(;p--;){var l=c[p];if(!(a?l in t:L.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var d=!0;i.set(e,t),i.set(t,e);var _=a;for(;++p<s;){l=c[p];var y=e[l],h=t[l];if(n)var v=a?n(h,y,l,t,e,i):n(y,h,l,e,t,i);if(!(void 0===v?y===h||o(y,h,r,n,i):v)){d=!1;break}_||(_="constructor"==l)}if(d&&!_){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,c,s,u)}(e,t,r,c,le,s))}function fe(e){return!(!Pe(e)||function(e){return!!M&&M in e}(e))&&(ke(e)?D:c).test(je(e))}function de(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||A,t!==n)return N(e);var t,r,n,o=[];for(var i in Object(e))L.call(e,i)&&"constructor"!=i&&o.push(i);return o}function _e(e,t,r,n,o,i){var a=1&r,c=e.length,s=t.length;if(c!=s&&!(a&&s>c))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,l=!0,f=2&r?new ie:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var d=e[p],_=t[p];if(n)var y=a?n(_,d,p,t,e,i):n(d,_,p,e,t,i);if(void 0!==y){if(y)continue;l=!1;break}if(f){if(!b(t,(function(e,t){if(a=t,!f.has(a)&&(d===e||o(d,e,r,n,i)))return f.push(t);var a}))){l=!1;break}}else if(d!==_&&!o(d,_,r,n,i)){l=!1;break}}return i.delete(e),i.delete(t),l}function ye(e){return function(e,t,r){var n=t(e);return Ee(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Me,ge)}function he(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ve(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return fe(r)?r:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return L.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:L.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=se(t,e);return!(r<0)&&(r==t.length-1?t.pop():C.call(t,r,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,r=se(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=se(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(V||ne),string:new re}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(e,t),this.size=r.size,this};var ge=U?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(U(e),(function(t){return B.call(e,t)})))}:function(){return[]},be=ue;function me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}function je(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(G&&"[object DataView]"!=be(new G(new ArrayBuffer(1)))||V&&be(new V)!=o||F&&"[object Promise]"!=be(F.resolve())||$&&be(new $)!=a||q&&"[object WeakMap]"!=be(new q))&&(be=function(e){var t=ue(e),r=t==i?e.constructor:void 0,n=r?je(r):"";if(n)switch(n){case H:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case X:return a;case Z:return"[object WeakMap]"}return t});var we=pe(function(){return arguments}())?pe:function(e){return Re(e)&&L.call(e,"callee")&&!B.call(e,"callee")},Ee=Array.isArray;var Oe=z||function(){return!1};function ke(e){if(!Pe(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Pe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var Le=g?function(e){return function(t){return e(t)}}(g):function(e){return Re(e)&&Ae(e.length)&&!!u[ue(e)]};function Me(e){return null!=(t=e)&&Ae(t.length)&&!ke(t)?ce(e):de(e);var t}r.exports=function(e,t){return le(e,t)}}).call(this,r(8),r(9)(e))},function(e,t,r){e.exports=r(10)},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,o=r;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"PSClickWrap",(function(){return _})),r.d(t,"PSBrowseWrap",(function(){return h}));var n=r(0),o=r.n(n),i=(r(2),r(3)),a=r.n(i),c=r(4),s=r.n(c),u=r(1),p=r.n(u);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=function(e){var t,r;function n(t){var r,n,o,i;r=e.call(this,t)||this,n=f(r),i=!1,(o="_isMounted")in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.createClickWrap=r.createClickWrap.bind(f(r)),r.state={clickwrapGroupKey:null,dynamicGroup:!1},r.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var a=r.props,c=a.accessId,s=a.backupScriptURL,u=a.debug,l=a.disableSending,d=a.dynamic,_=a.injectSnippetOnly,y=a.psScriptUrl,h=a.signerId,v=a.testMode;return p.a.isSnippetLoaded(y,s)||p.a.injectSnippet(y,s),u&&(_ps.debug=!0),_?f(r):(_ps("create",c,{test_mode:v,disable_sending:l,dynamic:d,signer_id:h}),_ps("set","client_library","react-sdk"),_ps("set","client_version","2.7.0"),r)}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props.injectSnippetOnly;this._isMounted=!0,e||this.createClickWrap()},i.componentDidUpdate=function(e){var t=this.props,r=t.clickWrapStyle,n=t.filter,o=t.groupKey,i=t.injectSnippetOnly,a=t.renderData,c=t.signerId,u=this.state,p=u.clickwrapGroupKey,l=u.dynamicGroup,f=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&p&&_ps.getByKey(p);i||(r!==e.clickWrapStyle&&!l&&f&&(_ps.getByKey(p).site.set("style",r),_ps.getByKey(p).retrieveHTML()),s()(a,e.renderData)||(r&&f&&_ps.getByKey(p).site.set("style",r),_ps(p+":retrieveHTML",a)),c!==e.signerId&&(r&&f&&_ps.getByKey(p).site.set("style",r),_ps("set","signer_id",c)),r!==e.clickWrapStyle&&l&&this.createClickWrap(),n!==e.filter&&this.createClickWrap(),o===e.groupKey||l||(this.createClickWrap(),f&&_ps.getByKey(p).retrieveHTML()))},i.componentWillUnmount=function(){this._isMounted=!1;var e=this.props,t=e.injectSnippetOnly,r=e.groupKey;t||(_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(r)&&(_ps.getByKey(r).rendered&&(_ps.getByKey(r).rendered=!1),_ps.getByKey(r).resetData()),this.unregisterEventListeners())},i.registerEventListener=function(e,t){var r=this,n=function(){for(var n,o=!1,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];(a.forEach((function(e){(e&&e.get&&e.get("key")&&e.get("key")===t||e&&"[object Site]"===e.toString())&&(o=!0)})),o)&&(n=r.props)[e].apply(n,a)},o=a()();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},i.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach((function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))})),this._isMounted&&this.setState({eventListeners:r})},i.unregisterEventListeners=function(){var e=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach((function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)}))},i.createClickWrap=function(){var e=this,t=this.props,r=t.clickWrapStyle,n=t.confirmationEmail,o=t.containerId,i=t.displayAll,a=t.displayImmediately,c=t.filter,s=t.forceScroll,u=t.groupKey,p=t.injectSnippetOnly,f=t.renderData,d={filter:c,container_selector:o,confirmation_email:n,signer_id_selector:t.signerIdSelector,style:r,display_all:i,render_data:f,auto_run:a,force_scroll:s,allow_disagreed:t.allowDisagreed||!1};if(!p){u&&this._isMounted&&this.setState({clickwrapGroupKey:u,dynamicGroup:!1});var _=!u,y=function(t,r){if(r){var n=u||r.get("key"),o={clickwrapGroupKey:n};_&&(o.dynamicGroup=!0),e._isMounted&&e.setState(o),_||r.render(),e.registerEventListeners(n)}};u?_ps("load",u,l({},d,{event_callback:y})):_ps("load",l({},d,{event_callback:y}))}},i.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},n}(o.a.Component);d.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",d.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",d.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",d.MUST_SET_ALLOW_DISAGREED="PSClickWrap Error: You must set allowDisagreed as true to make onInvalid work",d.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var _=d;var y=function(e){var t,r;function n(t){var r,n=(r=e.call(this,t)||this).props,o=n.psScriptUrl,i=n.groupKey,a=n.accessId;return p.a.isSnippetLoaded(o)||p.a.injectSnippet(o),r.targetSelector="psbw-"+i,_ps("create",a),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=n.prototype;return i.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},i.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},i.isSnippetLoaded=function(){for(var e=this.props.psScriptUrl,t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)if(-1!==t[r].src.indexOf(e))return!0;return!1},i.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},n}(o.a.Component);y.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",y.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var h=y}]).default}));
!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.PSReactSDK=t(require("react")):e.PSReactSDK=t(e.React)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(t,r){t.exports=e},function(e,t){e.exports={injectSnippet:function(e,t){var r,n,o,i,a,c,s,u,p,l;r=window,n=document,o="script",i=e,a=t,c="_ps",s=function(){console.log("Unable to load the PactSafe PS.JS Library.")},r.PactSafeObject=c,r._ps=r._ps||function(){(r._ps.q=r._ps.q||[]).push(arguments)},r._ps.on=function(){(r._ps.e=r._ps.e||[]).push(arguments)},r._ps.once=function(){(r._ps.eo=r._ps.eo||[]).push(arguments)},r._ps.off=function(){(r._ps.o=r._ps.o||[]).push(arguments)},r._ps.t=1*new Date,r._ps.l=0,u=n.createElement(o),p=n.getElementsByTagName(o)[0],u.async=1,u.src=i,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p?p.parentNode.insertBefore(u,p):document.body.appendChild(u),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,(u=n.createElement(o)).async=1,u.src=a,u.onload=u.onreadystatechange=function(){r._ps.l=1},u.onerror=u.onabort=function(){r._ps.l=0},p.parentNode.insertBefore(u,p),(l=function(e,t){try{(t=n.createElement("img")).src="https://d3r8bdci515tjv.cloudfront.net/error.gif?t="+r._ps.t+"&u="+encodeURIComponent(e),n.getElementsByTagName("body")[0].appendChild(t)}catch(e){}})(i),setTimeout((function(){r._ps.l||r._ps.loaded||(r._ps.error=1,s&&s.call(this),l(a))}),4e3))}),4e3)},isSnippetLoaded:function(e){var t=document.getElementsByTagName("script");if(window._ps&&window._ps.loaded&&317===window._ps.realThang)return!0;for(var r=0;r<t.length;r+=1)if(t[r].src&&-1!==t[r].src.indexOf(e))return!0;return!1}}},function(e,t,r){(function(e,r){var n="[object Arguments]",o="[object Map]",i="[object Object]",a="[object Set]",c=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[o]=u["[object Number]"]=u[i]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var p="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,f=p||l||Function("return this")(),d=t&&!t.nodeType&&t,_=d&&"object"==typeof r&&r&&!r.nodeType&&r,y=_&&_.exports===d,h=y&&p.process,v=function(){try{return h&&h.binding&&h.binding("util")}catch(e){}}(),g=v&&v.isTypedArray;function b(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function m(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var S,w,E,O=Array.prototype,k=Function.prototype,P=Object.prototype,D=f["__core-js_shared__"],A=k.toString,I=P.hasOwnProperty,L=(S=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",R=P.toString,M=RegExp("^"+A.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=y?f.Buffer:void 0,K=f.Symbol,T=f.Uint8Array,B=P.propertyIsEnumerable,C=O.splice,x=K?K.toStringTag:void 0,W=Object.getOwnPropertySymbols,z=U?U.isBuffer:void 0,G=(w=Object.keys,E=Object,function(e){return w(E(e))}),N=ve(f,"DataView"),V=ve(f,"Map"),F=ve(f,"Promise"),$=ve(f,"Set"),q=ve(f,"WeakMap"),Y=ve(Object,"create"),H=je(N),J=je(V),Q=je(F),X=je($),Z=je(q),ee=K?K.prototype:void 0,te=ee?ee.valueOf:void 0;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new oe;++t<r;)this.add(e[t])}function ae(e){var t=this.__data__=new ne(e);this.size=t.size}function ce(e,t){var r=Ee(e),n=!r&&we(e),o=!r&&!n&&Oe(e),i=!r&&!n&&!o&&Ie(e),a=r||n||o||i,c=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=c.length;for(var u in e)!t&&!I.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||me(u,s))||c.push(u);return c}function se(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":x&&x in Object(e)?function(e){var t=I.call(e,x),r=e[x];try{e[x]=void 0;var n=!0}catch(e){}var o=R.call(e);n&&(t?e[x]=r:delete e[x]);return o}(e):function(e){return R.call(e)}(e)}function pe(e){return Ae(e)&&ue(e)==n}function le(e,t,r,c,s){return e===t||(null==e||null==t||!Ae(e)&&!Ae(t)?e!=e&&t!=t:function(e,t,r,c,s,u){var p=Ee(e),l=Ee(t),f=p?"[object Array]":be(e),d=l?"[object Array]":be(t),_=(f=f==n?i:f)==i,y=(d=d==n?i:d)==i,h=f==d;if(h&&Oe(e)){if(!Oe(t))return!1;p=!0,_=!1}if(h&&!_)return u||(u=new ae),p||Ie(e)?_e(e,t,r,c,s,u):function(e,t,r,n,i,c,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!c(new T(e),new T(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Se(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=m;case a:var p=1&n;if(u||(u=j),e.size!=t.size&&!p)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var f=_e(u(e),u(t),n,i,c,s);return s.delete(e),f;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,f,r,c,s,u);if(!(1&r)){var v=_&&I.call(e,"__wrapped__"),g=y&&I.call(t,"__wrapped__");if(v||g){var b=v?e.value():e,S=g?t.value():t;return u||(u=new ae),s(b,S,r,c,u)}}if(!h)return!1;return u||(u=new ae),function(e,t,r,n,o,i){var a=1&r,c=ye(e),s=c.length,u=ye(t).length;if(s!=u&&!a)return!1;var p=s;for(;p--;){var l=c[p];if(!(a?l in t:I.call(t,l)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var d=!0;i.set(e,t),i.set(t,e);var _=a;for(;++p<s;){l=c[p];var y=e[l],h=t[l];if(n)var v=a?n(h,y,l,t,e,i):n(y,h,l,e,t,i);if(!(void 0===v?y===h||o(y,h,r,n,i):v)){d=!1;break}_||(_="constructor"==l)}if(d&&!_){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,c,s,u)}(e,t,r,c,le,s))}function fe(e){return!(!De(e)||function(e){return!!L&&L in e}(e))&&(ke(e)?M:c).test(je(e))}function de(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||P,t!==n)return G(e);var t,r,n,o=[];for(var i in Object(e))I.call(e,i)&&"constructor"!=i&&o.push(i);return o}function _e(e,t,r,n,o,i){var a=1&r,c=e.length,s=t.length;if(c!=s&&!(a&&s>c))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,l=!0,f=2&r?new ie:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var d=e[p],_=t[p];if(n)var y=a?n(_,d,p,t,e,i):n(d,_,p,e,t,i);if(void 0!==y){if(y)continue;l=!1;break}if(f){if(!b(t,(function(e,t){if(a=t,!f.has(a)&&(d===e||o(d,e,r,n,i)))return f.push(t);var a}))){l=!1;break}}else if(d!==_&&!o(d,_,r,n,i)){l=!1;break}}return i.delete(e),i.delete(t),l}function ye(e){return function(e,t,r){var n=t(e);return Ee(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Le,ge)}function he(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ve(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return fe(r)?r:void 0}re.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return I.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:I.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=se(t,e);return!(r<0)&&(r==t.length-1?t.pop():C.call(t,r,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,r=se(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=se(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},oe.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(V||ne),string:new re}},oe.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},oe.prototype.get=function(e){return he(this,e).get(e)},oe.prototype.has=function(e){return he(this,e).has(e)},oe.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new oe(n)}return r.set(e,t),this.size=r.size,this};var ge=W?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(W(e),(function(t){return B.call(e,t)})))}:function(){return[]},be=ue;function me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}function je(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){return e===t||e!=e&&t!=t}(N&&"[object DataView]"!=be(new N(new ArrayBuffer(1)))||V&&be(new V)!=o||F&&"[object Promise]"!=be(F.resolve())||$&&be(new $)!=a||q&&"[object WeakMap]"!=be(new q))&&(be=function(e){var t=ue(e),r=t==i?e.constructor:void 0,n=r?je(r):"";if(n)switch(n){case H:return"[object DataView]";case J:return o;case Q:return"[object Promise]";case X:return a;case Z:return"[object WeakMap]"}return t});var we=pe(function(){return arguments}())?pe:function(e){return Ae(e)&&I.call(e,"callee")&&!B.call(e,"callee")},Ee=Array.isArray;var Oe=z||function(){return!1};function ke(e){if(!De(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function De(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var Ie=g?function(e){return function(t){return e(t)}}(g):function(e){return Ae(e)&&Pe(e.length)&&!!u[ue(e)]};function Le(e){return null!=(t=e)&&Pe(t.length)&&!ke(t)?ce(e):de(e);var t}r.exports=function(e,t){return le(e,t)}}).call(this,r(5),r(6)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,r,n){return"boolean"==typeof e?e:"function"==typeof e?e(t,r,n):!(!0!=!!e||!e)},o=function(e,t){return Object.hasOwnProperty.call(e,t)},i=function(e,t,r,n){return n?new Error(n):new Error("Required "+e[t]+" `"+t+"` was not specified in `"+r+"`.")};t.default=function(e,t,r){return function(e,t){if("function"!=typeof e)throw new TypeError("The typeValidator argument must be a function with the signature function(props, propName, componentName).");if(t&&"string"!=typeof t)throw new TypeError("The error message is optional, but must be a string if provided.")}(e,r),function(a,c,s){for(var u=arguments.length,p=Array(3<u?u-3:0),l=3;l<u;l++)p[l-3]=arguments[l];return n(t,a,c,s)?o(a,c)?e.apply(void 0,[a,c,s].concat(p)):i(a,c,s,r):e.apply(void 0,[a,c,s].concat(p))}}},function(e,t,r){e.exports=r(7)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"PSClickWrap",(function(){return m})),r.d(t,"PSBrowseWrap",(function(){return w}));var n=r(0),o=r.n(n);r(3);var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let a;const c=new Uint8Array(16);function s(){if(!a&&(a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(c)}const u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));function p(e,t=0){return(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase()}var l=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();const n=(e=e||{}).random||(e.rng||s)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return p(n)},f=r(2),d=r.n(f),_=r(1),y=r.n(_);function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var b=function(e){var t,r;function n(t){var r,n,o,i;r=e.call(this,t)||this,n=v(r),i=!1,(o="_isMounted")in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,r.createClickWrap=r.createClickWrap.bind(v(r)),r.state={clickwrapGroupKey:null,dynamicGroup:!1},r.propsEventMap={onAll:"all",onSent:"sent",onRetrieved:"retrieved",onSet:"set",onSetSignerId:"set:signer_id",onValid:"valid",onInvalid:"invalid",onRendered:"rendered",onDisplayed:"displayed",onScrolledContract:"scrolled:contract",onScrolled:"scrolled",onError:"error"};var a=r.props,c=a.accessId,s=a.backupScriptURL,u=a.debug,p=a.disableSending,l=a.dynamic,f=a.injectSnippetOnly,d=a.psScriptUrl,_=a.signerId,h=a.testMode;return y.a.isSnippetLoaded(d,s)||y.a.injectSnippet(d,s),u&&(_ps.debug=!0),f?v(r):(_ps("create",c,{test_mode:h,disable_sending:p,dynamic:l,signer_id:_}),_ps("set","client_library","react-sdk"),_ps("set","client_version","2.8.0-0"),r)}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,g(t,r);var i=n.prototype;return i.componentDidMount=function(){var e=this.props.injectSnippetOnly;this._isMounted=!0,e||this.createClickWrap()},i.componentDidUpdate=function(e){var t=this.props,r=t.acceptanceLanguage,n=t.clickWrapStyle,o=t.customData,i=t.filter,a=t.groupKey,c=t.injectSnippetOnly,s=t.renderData,u=t.signerId,p=this.state,l=p.clickwrapGroupKey,f=p.dynamicGroup,_=_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&l&&_ps.getByKey(l);c||(n!==e.clickWrapStyle&&!f&&_&&(_ps.getByKey(l).site.set("style",n),_ps.getByKey(l).retrieveHTML()),d()(o,e.customData)||_ps("set","custom_data",o),r!==e.acceptanceLanguage&&_ps("set","acceptance_language",r),d()(s,e.renderData)||(n&&_&&_ps.getByKey(l).site.set("style",n),_ps(l+":retrieveHTML",s)),u!==e.signerId&&(n&&_&&_ps.getByKey(l).site.set("style",n),_ps("set","signer_id",u)),n!==e.clickWrapStyle&&f&&this.createClickWrap(),i!==e.filter&&this.createClickWrap(),a===e.groupKey||f||(this.createClickWrap(),_&&_ps.getByKey(l).retrieveHTML()))},i.componentWillUnmount=function(){this._isMounted=!1;var e=this.props,t=e.injectSnippetOnly,r=e.groupKey;t||(_ps&&_ps.getByKey&&"function"==typeof _ps.getByKey&&_ps.getByKey(r)&&(_ps.getByKey(r).rendered&&(_ps.getByKey(r).rendered=!1),_ps.getByKey(r).resetData()),this.unregisterEventListeners())},i.registerEventListener=function(e,t){var r=this,n=function(){for(var n,o=!1,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];(a.forEach((function(e){(e&&e.get&&e.get("key")&&e.get("key")===t||e&&"[object Site]"===e.toString())&&(o=!0)})),o)&&(n=r.props)[e].apply(n,a)},o=l();return n.toString=function(){return o},_ps.on(this.propsEventMap[e],n),n.toString()},i.registerEventListeners=function(e){var t=this,r={};Object.keys(this.propsEventMap).forEach((function(n){t.props[n]&&(r[t.propsEventMap[n]]=t.registerEventListener(n,e))})),this._isMounted&&this.setState({eventListeners:r})},i.unregisterEventListeners=function(){var e=this;this.state.eventListeners&&Object.keys(this.state.eventListeners).forEach((function(t){var r=e.state.eventListeners[t],n=function(){return r};n.toString=function(){return r},_ps.off(t,n)}))},i.createClickWrap=function(){var e=this,t=this.props,r=t.acceptanceLanguage,n=t.clickWrapStyle,o=t.customData,i=t.confirmationEmail,a=t.containerId,c=t.displayAll,s=t.displayImmediately,u=t.filter,p=t.forceScroll,l=t.groupKey,f=t.injectSnippetOnly,d=t.renderData,_=t.signerIdSelector,y={allow_disagreed:t.allowDisagreed||!1,acceptance_language:r,auto_run:s,confirmation_email:i,container_selector:a,custom_data:o,display_all:c,filter:u,force_scroll:p,render_data:d,signer_id_selector:_,style:n};if(!f){l&&this._isMounted&&this.setState({clickwrapGroupKey:l,dynamicGroup:!1});var v=!l,g=function(t,r){if(r){var n=l||r.get("key"),o={clickwrapGroupKey:n};v&&(o.dynamicGroup=!0),e._isMounted&&e.setState(o),v||r.render(),e.registerEventListeners(n)}};l?_ps("load",l,h({},y,{event_callback:g})):_ps("load",h({},y,{event_callback:g}))}},i.render=function(){var e=this.props.containerId;return o.a.createElement("div",{id:e})},n}(o.a.Component);b.FILTER_OR_GROUPKEY_REQUIRED_ERROR_MESSAGE="PSClickWrap Error: You must provide either a groupKey or filter prop in order to use the PactSafe ClickWrap component!",b.MUST_PROVIDE_RENDER_DATA_ERROR_MESSAGE="PSClickWrap Error: You must provide a renderData prop when passing down the dynamic prop",b.MUST_PROVIDE_SIGNER_ID_OR_SIGNER_ID_SELECTOR="PSClickWrap Error: You must provide either a signer ID or a signer ID selector",b.MUST_SET_ALLOW_DISAGREED="PSClickWrap Error: You must set allowDisagreed as true to make onInvalid work",b.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",backupScriptURL:"//d3l1mqnl5xpsuc.cloudfront.net/ps.min.js",containerId:"ps-clickwrap",displayImmediately:!0,disableSending:!1,displayAll:!0,dynamic:!1,testMode:!1};var m=b;function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var S=function(e){var t,r;function n(t){var r,n=(r=e.call(this,t)||this).props,o=n.psScriptUrl,i=n.groupKey,a=n.accessId;return y.a.isSnippetLoaded(o)||y.a.injectSnippet(o),r.targetSelector="psbw-"+i,_ps("create",a),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,j(t,r);var i=n.prototype;return i.componentDidMount=function(){var e=this.props,t=e.groupKey,r=e.position,n=e.badgeText,o=e.alwaysVisible,i=e.openLegalCenter;_ps("load",t,{target_selector:this.targetSelector,position:r,badge_text:n,always_visible:o,open_legal_center:i})},i.componentWillUnmount=function(){var e=this.props.groupKey;_ps.getByKey(e).rendered=!1},i.render=function(){var e=this.props,t=e.link,r=e.linkText;return o.a.createElement("a",{href:t,id:this.targetSelector},r)},n}(o.a.Component);S.MUST_PROVIDE_LINK_IF_OPEN_LEGAL_CENTER_FALSE="PSBrowseWrap Error: You must provide a link prop if openLegalCenter is passed false",S.defaultProps={psScriptUrl:"//vault.pactsafe.io/ps.min.js",position:"auto",link:"#",openLegalCenter:!0};var w=S}]).default}));
//# sourceMappingURL=pactsafe-react-sdk.min.js.map

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc