@bigbinary/neeto-commons-frontend 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/initializers.cjs.js +16 -4
- package/initializers.js +16 -4
- package/package.json +1 -1
- package/react-utils.cjs.js +532 -431
- package/react-utils.d.ts +11 -2
- package/react-utils.js +534 -433
package/react-utils.cjs.js
CHANGED
|
@@ -11,11 +11,11 @@ var relativeTime = require('dayjs/plugin/relativeTime');
|
|
|
11
11
|
var updateLocale = require('dayjs/plugin/updateLocale');
|
|
12
12
|
var react = require('@honeybadger-io/react');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
|
-
var reactQuery = require('react-query');
|
|
15
14
|
var i18next = require('i18next');
|
|
15
|
+
var yup = require('yup');
|
|
16
|
+
var reactQuery = require('react-query');
|
|
16
17
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
17
18
|
var formik = require('formik');
|
|
18
|
-
var yup = require('yup');
|
|
19
19
|
var reactRouterDom = require('react-router-dom');
|
|
20
20
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
21
21
|
var axios$1 = require('axios');
|
|
@@ -290,8 +290,8 @@ var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
|
290
290
|
};
|
|
291
291
|
var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
292
292
|
return ramda.filter(function (_ref) {
|
|
293
|
-
var
|
|
294
|
-
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(
|
|
293
|
+
var title = _ref.title;
|
|
294
|
+
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(title)));
|
|
295
295
|
}, columns);
|
|
296
296
|
};
|
|
297
297
|
|
|
@@ -369,16 +369,18 @@ var Columns = function Columns(_ref) {
|
|
|
369
369
|
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
370
370
|
var dataIndex = _ref4.dataIndex,
|
|
371
371
|
key = _ref4.key,
|
|
372
|
-
|
|
373
|
-
return /*#__PURE__*/React__default["default"].createElement(MenuItem
|
|
372
|
+
title = _ref4.title;
|
|
373
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem, {
|
|
374
374
|
key: key
|
|
375
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
376
|
-
className: "neeto-ui-w-full"
|
|
375
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
376
|
+
className: "neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer",
|
|
377
|
+
htmlFor: dataIndex
|
|
377
378
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Checkbox, _extends$4({
|
|
379
|
+
id: dataIndex,
|
|
378
380
|
name: dataIndex,
|
|
379
381
|
checked: !hiddenColumns.includes(dataIndex),
|
|
380
382
|
"data-cy": "neeto-ui-columns-checkbox",
|
|
381
|
-
label:
|
|
383
|
+
label: title,
|
|
382
384
|
onChange: handleChange
|
|
383
385
|
}, checkboxProps))));
|
|
384
386
|
}) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -524,6 +526,36 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
524
526
|
}, children);
|
|
525
527
|
};
|
|
526
528
|
|
|
529
|
+
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
530
|
+
var NEETO_WIDGET_USER_IDENTITY_KEY = "NeetoWidgetUserIdentity";
|
|
531
|
+
var SESSION_CONTEXT_KEY = "NeetoReplayWidgetSessionContext";
|
|
532
|
+
var DISABLE_NEETO_CHAT = "enableNeetoChat: false,";
|
|
533
|
+
var DISABLE_NEETO_CHANGELOG = "enableNeetoChangelog: false,";
|
|
534
|
+
var DISABLE_NEETO_REPLAY = "enableNeetoReplay: false,";
|
|
535
|
+
var SAMPLE_CONTEXT_CODE_STRING = "window.".concat(SESSION_CONTEXT_KEY, " = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}");
|
|
536
|
+
var SAMPLE_USER_IDENTITY_CODE_STRING = "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"USER_ID_HERE\",\n name: \"USER_NAME_HERE\",\n email: \"USER_EMAIL_HERE\",\n started_at: \"YYYY-MM-DD\",\n}");
|
|
537
|
+
var WIDGET_TYPES = {
|
|
538
|
+
changelog: "changelog",
|
|
539
|
+
chat: "chat",
|
|
540
|
+
replay: "replay"
|
|
541
|
+
};
|
|
542
|
+
var WIDGET_TYPES_VALUES = ramda.values(WIDGET_TYPES);
|
|
543
|
+
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup__namespace.object({
|
|
544
|
+
emails: yup__namespace.array().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.emails.label")),
|
|
545
|
+
subject: yup__namespace.string().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.subject.label"))
|
|
546
|
+
});
|
|
547
|
+
var QUERY_KEYS = {
|
|
548
|
+
apiKey: "neetoWidgetApiKey"
|
|
549
|
+
};
|
|
550
|
+
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
551
|
+
|
|
552
|
+
var EMAIL_TYPES = {
|
|
553
|
+
embedCode: "embedCode",
|
|
554
|
+
userIdentity: "userIdentity",
|
|
555
|
+
sessionContext: "sessionContext",
|
|
556
|
+
"null": ""
|
|
557
|
+
};
|
|
558
|
+
|
|
527
559
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
528
560
|
|
|
529
561
|
var propTypes = {exports: {}};
|
|
@@ -1708,6 +1740,125 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1708
1740
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1709
1741
|
}
|
|
1710
1742
|
|
|
1743
|
+
function useDebounce(value) {
|
|
1744
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
1745
|
+
|
|
1746
|
+
var _useState = React.useState(value),
|
|
1747
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1748
|
+
debouncedValue = _useState2[0],
|
|
1749
|
+
setDebouncedValue = _useState2[1];
|
|
1750
|
+
|
|
1751
|
+
React.useEffect(function () {
|
|
1752
|
+
var handler = setTimeout(function () {
|
|
1753
|
+
setDebouncedValue(value);
|
|
1754
|
+
}, delay);
|
|
1755
|
+
return function () {
|
|
1756
|
+
clearTimeout(handler);
|
|
1757
|
+
};
|
|
1758
|
+
}, [value]);
|
|
1759
|
+
return debouncedValue;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
var useFuncDebounce = function useFuncDebounce(func) {
|
|
1763
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
1764
|
+
var timer = React.useRef(null);
|
|
1765
|
+
|
|
1766
|
+
var debouncedFunc = function debouncedFunc() {
|
|
1767
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1768
|
+
args[_key] = arguments[_key];
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
clearTimeout(timer.current);
|
|
1772
|
+
timer.current = setTimeout(function () {
|
|
1773
|
+
return func.apply(void 0, args);
|
|
1774
|
+
}, delay);
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
debouncedFunc.cancel = function () {
|
|
1778
|
+
return clearTimeout(timer.current);
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
return debouncedFunc;
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
var useForceUpdate = function useForceUpdate() {
|
|
1785
|
+
var _useState = React.useState(0),
|
|
1786
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1787
|
+
setValue = _useState2[1];
|
|
1788
|
+
|
|
1789
|
+
return function () {
|
|
1790
|
+
return setValue(function (value) {
|
|
1791
|
+
return value + 1;
|
|
1792
|
+
});
|
|
1793
|
+
};
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
1797
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
1798
|
+
|
|
1799
|
+
var _useState = React.useState(false),
|
|
1800
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1801
|
+
isIntersecting = _useState2[0],
|
|
1802
|
+
setIntersecting = _useState2[1];
|
|
1803
|
+
|
|
1804
|
+
var forceUpdate = useForceUpdate();
|
|
1805
|
+
React.useEffect(function () {
|
|
1806
|
+
if (!target) return forceUpdate();
|
|
1807
|
+
var observer = new IntersectionObserver(function (_ref) {
|
|
1808
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1809
|
+
entry = _ref2[0];
|
|
1810
|
+
|
|
1811
|
+
return setIntersecting(entry.isIntersecting);
|
|
1812
|
+
}, options);
|
|
1813
|
+
observer.observe(target);
|
|
1814
|
+
return function () {
|
|
1815
|
+
return observer.unobserve(target);
|
|
1816
|
+
};
|
|
1817
|
+
}, [target, options]);
|
|
1818
|
+
return isIntersecting;
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
1822
|
+
React.useEffect(function () {
|
|
1823
|
+
var listener = function listener(event) {
|
|
1824
|
+
// Do nothing if clicking ref's element or descendent elements
|
|
1825
|
+
if (!ref.current || ref.current.contains(event.target)) {
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
handler(event);
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
document.addEventListener("mousedown", listener);
|
|
1833
|
+
document.addEventListener("touchstart", listener);
|
|
1834
|
+
return function () {
|
|
1835
|
+
document.removeEventListener("mousedown", listener);
|
|
1836
|
+
document.removeEventListener("touchstart", listener);
|
|
1837
|
+
};
|
|
1838
|
+
}, [handler]);
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1841
|
+
var usePrevious = function usePrevious(value) {
|
|
1842
|
+
var ref = React.useRef(value);
|
|
1843
|
+
React.useEffect(function () {
|
|
1844
|
+
ref.current = value;
|
|
1845
|
+
}, [value]);
|
|
1846
|
+
return ref.current;
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
1850
|
+
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
1851
|
+
var isInitialMount = React.useRef(true);
|
|
1852
|
+
React.useEffect(function () {
|
|
1853
|
+
if (isInitialMount.current) {
|
|
1854
|
+
isInitialMount.current = false;
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
callback();
|
|
1859
|
+
}, dependencies);
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1711
1862
|
var classnames$1 = {exports: {}};
|
|
1712
1863
|
|
|
1713
1864
|
/*!
|
|
@@ -51558,7 +51709,7 @@ var languageLoaders = {
|
|
|
51558
51709
|
return Promise.resolve().then(function () { return apex$1; });
|
|
51559
51710
|
}),
|
|
51560
51711
|
apl: createLanguageAsyncLoader("apl", function () {
|
|
51561
|
-
return Promise.resolve().then(function () { return apl; });
|
|
51712
|
+
return Promise.resolve().then(function () { return apl$1; });
|
|
51562
51713
|
}),
|
|
51563
51714
|
applescript: createLanguageAsyncLoader("applescript", function () {
|
|
51564
51715
|
return Promise.resolve().then(function () { return applescript$2; });
|
|
@@ -51591,7 +51742,7 @@ var languageLoaders = {
|
|
|
51591
51742
|
return Promise.resolve().then(function () { return autoit$2; });
|
|
51592
51743
|
}),
|
|
51593
51744
|
avisynth: createLanguageAsyncLoader("avisynth", function () {
|
|
51594
|
-
return Promise.resolve().then(function () { return avisynth
|
|
51745
|
+
return Promise.resolve().then(function () { return avisynth; });
|
|
51595
51746
|
}),
|
|
51596
51747
|
avroIdl: createLanguageAsyncLoader("avroIdl", function () {
|
|
51597
51748
|
return Promise.resolve().then(function () { return avroIdl; });
|
|
@@ -61375,54 +61526,50 @@ var apex$1 = /*#__PURE__*/_mergeNamespaces({
|
|
|
61375
61526
|
'default': apex_1
|
|
61376
61527
|
}, [apex_1]);
|
|
61377
61528
|
|
|
61378
|
-
var apl_1;
|
|
61379
|
-
|
|
61380
|
-
|
|
61381
|
-
function
|
|
61382
|
-
|
|
61383
|
-
|
|
61384
|
-
|
|
61385
|
-
|
|
61386
|
-
|
|
61387
|
-
|
|
61388
|
-
|
|
61389
|
-
|
|
61390
|
-
|
|
61391
|
-
|
|
61392
|
-
|
|
61393
|
-
|
|
61394
|
-
|
|
61395
|
-
|
|
61396
|
-
|
|
61397
|
-
|
|
61398
|
-
|
|
61399
|
-
|
|
61400
|
-
|
|
61401
|
-
|
|
61402
|
-
|
|
61403
|
-
|
|
61404
|
-
|
|
61405
|
-
|
|
61406
|
-
|
|
61407
|
-
|
|
61408
|
-
|
|
61409
|
-
|
|
61410
|
-
|
|
61411
|
-
|
|
61412
|
-
|
|
61413
|
-
|
|
61414
|
-
|
|
61415
|
-
},
|
|
61416
|
-
punctuation: /[\[;\]()◇⋄]/,
|
|
61417
|
-
dfn: {
|
|
61418
|
-
pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
|
61419
|
-
alias: 'builtin'
|
|
61420
|
-
}
|
|
61421
|
-
};
|
|
61422
|
-
}
|
|
61423
|
-
return apl_1;
|
|
61529
|
+
var apl_1 = apl;
|
|
61530
|
+
apl.displayName = 'apl';
|
|
61531
|
+
apl.aliases = [];
|
|
61532
|
+
function apl(Prism) {
|
|
61533
|
+
Prism.languages.apl = {
|
|
61534
|
+
comment: /(?:⍝|#[! ]).*$/m,
|
|
61535
|
+
string: {
|
|
61536
|
+
pattern: /'(?:[^'\r\n]|'')*'/,
|
|
61537
|
+
greedy: true
|
|
61538
|
+
},
|
|
61539
|
+
number:
|
|
61540
|
+
/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
|
|
61541
|
+
statement: /:[A-Z][a-z][A-Za-z]*\b/,
|
|
61542
|
+
'system-function': {
|
|
61543
|
+
pattern: /⎕[A-Z]+/i,
|
|
61544
|
+
alias: 'function'
|
|
61545
|
+
},
|
|
61546
|
+
constant: /[⍬⌾#⎕⍞]/,
|
|
61547
|
+
function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
|
|
61548
|
+
'monadic-operator': {
|
|
61549
|
+
pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
|
|
61550
|
+
alias: 'operator'
|
|
61551
|
+
},
|
|
61552
|
+
'dyadic-operator': {
|
|
61553
|
+
pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
|
|
61554
|
+
alias: 'operator'
|
|
61555
|
+
},
|
|
61556
|
+
assignment: {
|
|
61557
|
+
pattern: /←/,
|
|
61558
|
+
alias: 'keyword'
|
|
61559
|
+
},
|
|
61560
|
+
punctuation: /[\[;\]()◇⋄]/,
|
|
61561
|
+
dfn: {
|
|
61562
|
+
pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
|
61563
|
+
alias: 'builtin'
|
|
61564
|
+
}
|
|
61565
|
+
};
|
|
61424
61566
|
}
|
|
61425
61567
|
|
|
61568
|
+
var apl$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61569
|
+
__proto__: null,
|
|
61570
|
+
'default': apl_1
|
|
61571
|
+
}, [apl_1]);
|
|
61572
|
+
|
|
61426
61573
|
var applescript_1 = applescript$1;
|
|
61427
61574
|
applescript$1.displayName = 'applescript';
|
|
61428
61575
|
applescript$1.aliases = [];
|
|
@@ -62743,179 +62890,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
62743
62890
|
'default': autoit_1
|
|
62744
62891
|
}, [autoit_1]);
|
|
62745
62892
|
|
|
62746
|
-
var avisynth_1
|
|
62747
|
-
|
|
62748
|
-
|
|
62749
|
-
function
|
|
62893
|
+
var avisynth_1;
|
|
62894
|
+
var hasRequiredAvisynth;
|
|
62895
|
+
|
|
62896
|
+
function requireAvisynth () {
|
|
62897
|
+
if (hasRequiredAvisynth) return avisynth_1;
|
|
62898
|
+
hasRequiredAvisynth = 1;
|
|
62899
|
+
|
|
62900
|
+
avisynth_1 = avisynth;
|
|
62901
|
+
avisynth.displayName = 'avisynth';
|
|
62902
|
+
avisynth.aliases = ['avs'];
|
|
62903
|
+
function avisynth(Prism) {
|
|
62750
62904
|
(function (Prism) {
|
|
62751
|
-
|
|
62752
|
-
|
|
62753
|
-
|
|
62754
|
-
|
|
62755
|
-
|
|
62756
|
-
|
|
62757
|
-
|
|
62758
|
-
|
|
62759
|
-
|
|
62760
|
-
|
|
62761
|
-
|
|
62762
|
-
|
|
62763
|
-
|
|
62764
|
-
|
|
62765
|
-
|
|
62766
|
-
|
|
62767
|
-
|
|
62768
|
-
|
|
62769
|
-
|
|
62770
|
-
|
|
62771
|
-
|
|
62772
|
-
|
|
62773
|
-
|
|
62774
|
-
|
|
62775
|
-
|
|
62776
|
-
|
|
62777
|
-
|
|
62778
|
-
|
|
62779
|
-
|
|
62780
|
-
|
|
62781
|
-
|
|
62782
|
-
|
|
62783
|
-
|
|
62784
|
-
|
|
62785
|
-
|
|
62786
|
-
|
|
62787
|
-
|
|
62788
|
-
|
|
62789
|
-
|
|
62790
|
-
|
|
62791
|
-
|
|
62792
|
-
|
|
62793
|
-
|
|
62794
|
-
|
|
62795
|
-
|
|
62796
|
-
|
|
62797
|
-
|
|
62798
|
-
|
|
62799
|
-
|
|
62800
|
-
|
|
62801
|
-
|
|
62802
|
-
|
|
62803
|
-
|
|
62804
|
-
|
|
62805
|
-
|
|
62806
|
-
|
|
62807
|
-
|
|
62808
|
-
|
|
62809
|
-
|
|
62810
|
-
|
|
62811
|
-
|
|
62812
|
-
|
|
62813
|
-
|
|
62814
|
-
|
|
62815
|
-
|
|
62816
|
-
|
|
62817
|
-
|
|
62818
|
-
|
|
62819
|
-
|
|
62820
|
-
|
|
62821
|
-
|
|
62822
|
-
|
|
62823
|
-
|
|
62824
|
-
|
|
62825
|
-
|
|
62826
|
-
|
|
62827
|
-
|
|
62828
|
-
|
|
62829
|
-
|
|
62830
|
-
|
|
62831
|
-
|
|
62832
|
-
|
|
62833
|
-
|
|
62834
|
-
|
|
62835
|
-
|
|
62836
|
-
|
|
62837
|
-
|
|
62838
|
-
|
|
62839
|
-
|
|
62840
|
-
|
|
62841
|
-
|
|
62842
|
-
|
|
62843
|
-
|
|
62844
|
-
|
|
62845
|
-
|
|
62846
|
-
|
|
62847
|
-
|
|
62848
|
-
|
|
62849
|
-
|
|
62850
|
-
|
|
62851
|
-
|
|
62852
|
-
|
|
62853
|
-
|
|
62854
|
-
|
|
62855
|
-
|
|
62856
|
-
|
|
62857
|
-
|
|
62858
|
-
|
|
62859
|
-
|
|
62860
|
-
|
|
62861
|
-
|
|
62862
|
-
|
|
62863
|
-
|
|
62864
|
-
|
|
62865
|
-
|
|
62866
|
-
|
|
62867
|
-
|
|
62868
|
-
|
|
62869
|
-
|
|
62870
|
-
|
|
62871
|
-
|
|
62872
|
-
|
|
62873
|
-
|
|
62874
|
-
|
|
62875
|
-
|
|
62876
|
-
|
|
62877
|
-
|
|
62878
|
-
|
|
62879
|
-
|
|
62880
|
-
|
|
62881
|
-
|
|
62882
|
-
|
|
62883
|
-
|
|
62884
|
-
|
|
62885
|
-
|
|
62886
|
-
|
|
62887
|
-
|
|
62888
|
-
|
|
62889
|
-
|
|
62890
|
-
|
|
62891
|
-
|
|
62892
|
-
|
|
62893
|
-
|
|
62894
|
-
|
|
62895
|
-
|
|
62896
|
-
|
|
62897
|
-
|
|
62898
|
-
|
|
62899
|
-
|
|
62900
|
-
|
|
62901
|
-
|
|
62902
|
-
|
|
62903
|
-
|
|
62904
|
-
|
|
62905
|
-
|
|
62906
|
-
|
|
62907
|
-
|
|
62908
|
-
|
|
62909
|
-
|
|
62910
|
-
|
|
62911
|
-
|
|
62905
|
+
function replace(pattern, replacements) {
|
|
62906
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
62907
|
+
return replacements[+index]
|
|
62908
|
+
})
|
|
62909
|
+
}
|
|
62910
|
+
function re(pattern, replacements, flags) {
|
|
62911
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
62912
|
+
}
|
|
62913
|
+
var types = /bool|clip|float|int|string|val/.source;
|
|
62914
|
+
var internals = [
|
|
62915
|
+
// bools
|
|
62916
|
+
/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
|
|
62917
|
+
.source, // control
|
|
62918
|
+
/apply|assert|default|eval|import|nop|select|undefined/.source, // global
|
|
62919
|
+
/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
|
|
62920
|
+
.source, // conv
|
|
62921
|
+
/hex(?:value)?|value/.source, // numeric
|
|
62922
|
+
/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
|
|
62923
|
+
.source, // trig
|
|
62924
|
+
/a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
|
|
62925
|
+
/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/
|
|
62926
|
+
.source, // runtime
|
|
62927
|
+
/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
|
|
62928
|
+
.source, // script
|
|
62929
|
+
/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
|
|
62930
|
+
.source, // string
|
|
62931
|
+
/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
|
|
62932
|
+
.source, // version
|
|
62933
|
+
/isversionorgreater|version(?:number|string)/.source, // helper
|
|
62934
|
+
/buildpixeltype|colorspacenametopixeltype/.source, // avsplus
|
|
62935
|
+
/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
|
|
62936
|
+
].join('|');
|
|
62937
|
+
var properties = [
|
|
62938
|
+
// content
|
|
62939
|
+
/has(?:audio|video)/.source, // resolution
|
|
62940
|
+
/height|width/.source, // framerate
|
|
62941
|
+
/frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
|
|
62942
|
+
/getparity|is(?:field|frame)based/.source, // color format
|
|
62943
|
+
/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/
|
|
62944
|
+
.source, // audio
|
|
62945
|
+
/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
|
|
62946
|
+
.source
|
|
62947
|
+
].join('|');
|
|
62948
|
+
var filters = [
|
|
62949
|
+
// source
|
|
62950
|
+
/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
|
|
62951
|
+
.source, // color
|
|
62952
|
+
/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/
|
|
62953
|
+
.source, // overlay
|
|
62954
|
+
/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
|
|
62955
|
+
/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/
|
|
62956
|
+
.source, // pixel
|
|
62957
|
+
/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
|
|
62958
|
+
.source, // timeline
|
|
62959
|
+
/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/
|
|
62960
|
+
.source, // interlace
|
|
62961
|
+
/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
|
|
62962
|
+
.source, // audio
|
|
62963
|
+
/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/
|
|
62964
|
+
.source, // conditional
|
|
62965
|
+
/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
|
|
62966
|
+
.source, // export
|
|
62967
|
+
/imagewriter/.source, // debug
|
|
62968
|
+
/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
|
|
62969
|
+
.source
|
|
62970
|
+
].join('|');
|
|
62971
|
+
var allinternals = [internals, properties, filters].join('|');
|
|
62972
|
+
Prism.languages.avisynth = {
|
|
62973
|
+
comment: [
|
|
62974
|
+
{
|
|
62975
|
+
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
|
62976
|
+
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
|
62977
|
+
pattern:
|
|
62978
|
+
/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
|
62979
|
+
lookbehind: true,
|
|
62980
|
+
greedy: true
|
|
62981
|
+
},
|
|
62982
|
+
{
|
|
62983
|
+
// Matches /* */ block comments
|
|
62984
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
62985
|
+
lookbehind: true,
|
|
62986
|
+
greedy: true
|
|
62987
|
+
},
|
|
62988
|
+
{
|
|
62989
|
+
// Matches # comments
|
|
62990
|
+
pattern: /(^|[^\\$])#.*/,
|
|
62991
|
+
lookbehind: true,
|
|
62992
|
+
greedy: true
|
|
62993
|
+
}
|
|
62994
|
+
],
|
|
62995
|
+
// Handle before strings because optional arguments are surrounded by double quotes
|
|
62996
|
+
argument: {
|
|
62997
|
+
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
|
62998
|
+
inside: {
|
|
62999
|
+
keyword: /^\w+/
|
|
63000
|
+
}
|
|
63001
|
+
},
|
|
63002
|
+
// Optional argument assignment
|
|
63003
|
+
'argument-label': {
|
|
63004
|
+
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
|
63005
|
+
lookbehind: true,
|
|
63006
|
+
inside: {
|
|
63007
|
+
'argument-name': {
|
|
63008
|
+
pattern: /^\w+/,
|
|
63009
|
+
alias: 'punctuation'
|
|
63010
|
+
},
|
|
63011
|
+
punctuation: /=$/
|
|
63012
|
+
}
|
|
63013
|
+
},
|
|
63014
|
+
string: [
|
|
63015
|
+
{
|
|
63016
|
+
// triple double-quoted
|
|
63017
|
+
pattern: /"""[\s\S]*?"""/,
|
|
63018
|
+
greedy: true
|
|
63019
|
+
},
|
|
63020
|
+
{
|
|
63021
|
+
// single double-quoted
|
|
63022
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
63023
|
+
greedy: true,
|
|
63024
|
+
inside: {
|
|
63025
|
+
constant: {
|
|
63026
|
+
// These *are* case-sensitive!
|
|
63027
|
+
pattern:
|
|
63028
|
+
/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
|
|
63029
|
+
}
|
|
63030
|
+
}
|
|
63031
|
+
}
|
|
63032
|
+
],
|
|
63033
|
+
// The special "last" variable that takes the value of the last implicitly returned clip
|
|
63034
|
+
variable: /\b(?:last)\b/i,
|
|
63035
|
+
boolean: /\b(?:false|no|true|yes)\b/i,
|
|
63036
|
+
keyword:
|
|
63037
|
+
/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
|
|
63038
|
+
constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
|
|
63039
|
+
// AviSynth's internal functions, filters, and properties
|
|
63040
|
+
'builtin-function': {
|
|
63041
|
+
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
|
63042
|
+
alias: 'function'
|
|
63043
|
+
},
|
|
63044
|
+
'type-cast': {
|
|
63045
|
+
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
|
63046
|
+
alias: 'keyword'
|
|
63047
|
+
},
|
|
63048
|
+
// External/user-defined filters
|
|
63049
|
+
function: {
|
|
63050
|
+
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
|
63051
|
+
lookbehind: true
|
|
63052
|
+
},
|
|
63053
|
+
// Matches a \ as the first or last character on a line
|
|
63054
|
+
'line-continuation': {
|
|
63055
|
+
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
|
63056
|
+
lookbehind: true,
|
|
63057
|
+
alias: 'punctuation'
|
|
63058
|
+
},
|
|
63059
|
+
number:
|
|
63060
|
+
/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
|
63061
|
+
operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
|
63062
|
+
punctuation: /[{}\[\]();,.]/
|
|
63063
|
+
};
|
|
63064
|
+
Prism.languages.avs = Prism.languages.avisynth;
|
|
63065
|
+
})(Prism);
|
|
63066
|
+
}
|
|
63067
|
+
return avisynth_1;
|
|
62912
63068
|
}
|
|
62913
63069
|
|
|
62914
|
-
var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
|
|
62915
|
-
__proto__: null,
|
|
62916
|
-
'default': avisynth_1
|
|
62917
|
-
}, [avisynth_1]);
|
|
62918
|
-
|
|
62919
63070
|
var avroIdl_1;
|
|
62920
63071
|
var hasRequiredAvroIdl;
|
|
62921
63072
|
|
|
@@ -84149,7 +84300,7 @@ refractor.register(al_1);
|
|
|
84149
84300
|
refractor.register(antlr4_1);
|
|
84150
84301
|
refractor.register(apacheconf_1);
|
|
84151
84302
|
refractor.register(apex_1);
|
|
84152
|
-
refractor.register(
|
|
84303
|
+
refractor.register(apl_1);
|
|
84153
84304
|
refractor.register(applescript_1);
|
|
84154
84305
|
refractor.register(aql_1);
|
|
84155
84306
|
refractor.register(arduino_1);
|
|
@@ -84160,7 +84311,7 @@ refractor.register(asmatmel_1);
|
|
|
84160
84311
|
refractor.register(aspnet_1);
|
|
84161
84312
|
refractor.register(autohotkey_1);
|
|
84162
84313
|
refractor.register(autoit_1);
|
|
84163
|
-
refractor.register(
|
|
84314
|
+
refractor.register(requireAvisynth());
|
|
84164
84315
|
refractor.register(requireAvroIdl());
|
|
84165
84316
|
refractor.register(requireBash());
|
|
84166
84317
|
refractor.register(requireBasic());
|
|
@@ -85594,7 +85745,7 @@ var copyToClipboard = /*#__PURE__*/function () {
|
|
|
85594
85745
|
|
|
85595
85746
|
var CodeBlock = function CodeBlock(_ref) {
|
|
85596
85747
|
var _ref$title = _ref.title,
|
|
85597
|
-
title = _ref$title === void 0 ? "Code snippet" : _ref$title,
|
|
85748
|
+
title = _ref$title === void 0 ? /*#__PURE__*/React__default["default"].createElement("div", null, "Code snippet") : _ref$title,
|
|
85598
85749
|
codeString = _ref.codeString,
|
|
85599
85750
|
_ref$showCopyButton = _ref.showCopyButton,
|
|
85600
85751
|
showCopyButton = _ref$showCopyButton === void 0 ? true : _ref$showCopyButton,
|
|
@@ -85655,7 +85806,7 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
85655
85806
|
};
|
|
85656
85807
|
|
|
85657
85808
|
CodeBlock.propTypes = {
|
|
85658
|
-
title: propTypes.exports.
|
|
85809
|
+
title: propTypes.exports.object,
|
|
85659
85810
|
codeString: propTypes.exports.string,
|
|
85660
85811
|
showCopyButton: propTypes.exports.bool,
|
|
85661
85812
|
className: propTypes.exports.string,
|
|
@@ -85663,32 +85814,13 @@ CodeBlock.propTypes = {
|
|
|
85663
85814
|
codeStyles: propTypes.exports.object
|
|
85664
85815
|
};
|
|
85665
85816
|
|
|
85666
|
-
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
85667
|
-
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
85668
|
-
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
85669
|
-
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
85670
|
-
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
85671
|
-
var SAMPLE_USER_IDENTITY_CODE_STRING = "window.NeetoWidgetUserIdentity = {\n user_identifier: \"USER_ID_HERE\",\n name: \"USER_NAME_HERE\",\n email: \"USER_EMAIL_HERE\",\n started_at: \"YYYY-MM-DD\",\n}";
|
|
85672
|
-
var WIDGET_TYPES = {
|
|
85673
|
-
changelog: "changelog",
|
|
85674
|
-
chat: "chat",
|
|
85675
|
-
replay: "replay"
|
|
85676
|
-
};
|
|
85677
|
-
var WIDGET_TYPES_VALUES = ramda.values(WIDGET_TYPES);
|
|
85678
|
-
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup__namespace.object({
|
|
85679
|
-
emails: yup__namespace.array().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.emails.label")),
|
|
85680
|
-
subject: yup__namespace.string().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.subject.label"))
|
|
85681
|
-
});
|
|
85682
|
-
var QUERY_KEYS = {
|
|
85683
|
-
apiKey: "neetoWidgetApiKey"
|
|
85684
|
-
};
|
|
85685
|
-
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
85686
|
-
|
|
85687
85817
|
var getWidgetApiKeyUrl = function getWidgetApiKeyUrl() {
|
|
85688
85818
|
return "api/v1/widget/api_keys/".concat(window.globalProps.organization.subdomain);
|
|
85689
85819
|
};
|
|
85690
85820
|
var EMBED_CODE_EMAIL_URL = "api/v1/widget/email_snippets";
|
|
85691
85821
|
var WIDGET_KB_BASE_URL = "https://neetowidgethelp.neetokb.com";
|
|
85822
|
+
var NEETO_REPLAY_CONFIGURE_URL = "".concat(WIDGET_KB_BASE_URL, "/articles/configure-neetoreplay");
|
|
85823
|
+
var NEETO_CHAT_USER_IDENTITY_URL = "".concat(WIDGET_KB_BASE_URL, "/articles/configuring-neetochat");
|
|
85692
85824
|
var WIDGET_KB_HELP_URL = {
|
|
85693
85825
|
changelog: "".concat(WIDGET_KB_BASE_URL, "/categories/getting-started-with-neetochangelog"),
|
|
85694
85826
|
chat: "".concat(WIDGET_KB_BASE_URL, "/categories/getting-started-with-neetochat"),
|
|
@@ -85748,16 +85880,6 @@ var embedWidgetEnvironment = function embedWidgetEnvironment() {
|
|
|
85748
85880
|
}
|
|
85749
85881
|
};
|
|
85750
85882
|
|
|
85751
|
-
var getSampleUserIdentity = function getSampleUserIdentity(enabledWidgets) {
|
|
85752
|
-
return indentAndFormat(SAMPLE_USER_IDENTITY_CODE_STRING, function (cmd) {
|
|
85753
|
-
if (!enabledWidgets.chat && !cmd.includes("email") && !cmd.includes("{") && !cmd.includes("}") || !enabledWidgets.chat && !enabledWidgets.replay) {
|
|
85754
|
-
return getCommentedCommand(cmd, false, true);
|
|
85755
|
-
}
|
|
85756
|
-
|
|
85757
|
-
return cmd;
|
|
85758
|
-
});
|
|
85759
|
-
};
|
|
85760
|
-
|
|
85761
85883
|
var embedWidgetApiKey = function embedWidgetApiKey(apiKey) {
|
|
85762
85884
|
return "apiKey: \"".concat(apiKey, "\",");
|
|
85763
85885
|
};
|
|
@@ -85780,17 +85902,28 @@ var embedWidgetFunctionCall = function embedWidgetFunctionCall(enabledWidgets, a
|
|
|
85780
85902
|
}), "\n});");
|
|
85781
85903
|
};
|
|
85782
85904
|
|
|
85905
|
+
var filterMarkedCommands = function filterMarkedCommands(queryString) {
|
|
85906
|
+
return queryString.split("\n").filter(function (line) {
|
|
85907
|
+
return !line.includes("///") && line.trim();
|
|
85908
|
+
}).join("\n");
|
|
85909
|
+
};
|
|
85910
|
+
|
|
85911
|
+
var getSampleUserIdentity = function getSampleUserIdentity(enabledWidgets) {
|
|
85912
|
+
return filterMarkedCommands(SAMPLE_USER_IDENTITY_CODE_STRING.split("\n").map(function (cmd) {
|
|
85913
|
+
if (!enabledWidgets.chat && !cmd.includes("email") && !cmd.includes("{") && !cmd.includes("}") || !enabledWidgets.chat && !enabledWidgets.replay) {
|
|
85914
|
+
return getCommentedCommand(cmd, false, true);
|
|
85915
|
+
}
|
|
85916
|
+
|
|
85917
|
+
return cmd;
|
|
85918
|
+
}).join("\n"));
|
|
85919
|
+
};
|
|
85783
85920
|
var sampleConsolidatedCodeString = function sampleConsolidatedCodeString(enabledWidgets, apiKey) {
|
|
85784
|
-
return "".concat(EMBED_WIDGET_S3_SCRIPT_STRING, "\n<script>\n ").concat(
|
|
85785
|
-
return getCommentedCommand(cmd, enabledWidgets.replay, true);
|
|
85786
|
-
}), "\n\n ").concat(indentAndFormat(embedWidgetFunctionCall(enabledWidgets, apiKey)), "\n</script>");
|
|
85921
|
+
return filterMarkedCommands("".concat(EMBED_WIDGET_S3_SCRIPT_STRING, "\n<script>\n ").concat(enabledWidgets.chat || enabledWidgets.replay ? "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {};") : "", "\n ").concat(enabledWidgets.replay ? "window.".concat(SESSION_CONTEXT_KEY, " = {};") : "", "\n\n ").concat(indentAndFormat(embedWidgetFunctionCall(enabledWidgets, apiKey)), "\n</script>"));
|
|
85787
85922
|
};
|
|
85788
|
-
var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormInitialValues(
|
|
85923
|
+
var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormInitialValues(subject) {
|
|
85789
85924
|
return {
|
|
85790
85925
|
emails: "",
|
|
85791
|
-
subject:
|
|
85792
|
-
selectedWidgets: selectedWidgets
|
|
85793
|
-
})
|
|
85926
|
+
subject: subject
|
|
85794
85927
|
};
|
|
85795
85928
|
};
|
|
85796
85929
|
var getSelectedWidgetsCombinedText = function getSelectedWidgetsCombinedText(widgets) {
|
|
@@ -85816,7 +85949,10 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85816
85949
|
_ref$onSent = _ref.onSent,
|
|
85817
85950
|
onSent = _ref$onSent === void 0 ? noop$2 : _ref$onSent,
|
|
85818
85951
|
codeString = _ref.codeString,
|
|
85819
|
-
|
|
85952
|
+
_ref$subject = _ref.subject,
|
|
85953
|
+
subject = _ref$subject === void 0 ? "" : _ref$subject,
|
|
85954
|
+
_ref$body = _ref.body,
|
|
85955
|
+
body = _ref$body === void 0 ? "" : _ref$body;
|
|
85820
85956
|
|
|
85821
85957
|
var _useTranslation = reactI18next.useTranslation(),
|
|
85822
85958
|
t = _useTranslation.t;
|
|
@@ -85844,7 +85980,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85844
85980
|
emailMutation.mutate({
|
|
85845
85981
|
subject: formData.subject,
|
|
85846
85982
|
emails: ramda.pluck("value", formData.emails),
|
|
85847
|
-
message:
|
|
85983
|
+
message: body,
|
|
85848
85984
|
snippet: codeString
|
|
85849
85985
|
});
|
|
85850
85986
|
|
|
@@ -85861,19 +85997,13 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85861
85997
|
};
|
|
85862
85998
|
}();
|
|
85863
85999
|
|
|
85864
|
-
var getDefaultBody = function getDefaultBody() {
|
|
85865
|
-
return t("neetoCommons.widget.email.body", {
|
|
85866
|
-
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets)
|
|
85867
|
-
});
|
|
85868
|
-
};
|
|
85869
|
-
|
|
85870
86000
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
|
|
85871
86001
|
className: "rounded-lg w-1/2 mx-auto",
|
|
85872
86002
|
isOpen: isModalOpen,
|
|
85873
86003
|
size: "medium",
|
|
85874
86004
|
onClose: onClose
|
|
85875
86005
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
85876
|
-
initialValues: getEmailWidgetSnippetFormInitialValues(
|
|
86006
|
+
initialValues: getEmailWidgetSnippetFormInitialValues(subject),
|
|
85877
86007
|
validationSchema: EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA,
|
|
85878
86008
|
onSubmit: handleSubmit
|
|
85879
86009
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Form, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
@@ -85896,7 +86026,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85896
86026
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
85897
86027
|
className: "mb-6",
|
|
85898
86028
|
style: "body1"
|
|
85899
|
-
},
|
|
86029
|
+
}, body), /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
85900
86030
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
85901
86031
|
codeString: codeString,
|
|
85902
86032
|
copyButton: false,
|
|
@@ -85922,11 +86052,18 @@ CodeSnippet.propTypes = {
|
|
|
85922
86052
|
onClose: propTypes.exports.func,
|
|
85923
86053
|
onSent: propTypes.exports.func,
|
|
85924
86054
|
codeString: propTypes.exports.string,
|
|
85925
|
-
|
|
86055
|
+
subject: propTypes.exports.string,
|
|
86056
|
+
body: propTypes.exports.string
|
|
85926
86057
|
};
|
|
85927
86058
|
|
|
85928
86059
|
var useFetchApiKey = function useFetchApiKey() {
|
|
85929
86060
|
return reactQuery.useQuery(QUERY_KEYS.apiKey, function () {
|
|
86061
|
+
if (window.globalProps.railsEnv === "heroku" || !process.env.ENABLE_SSO) {
|
|
86062
|
+
return Promise.resolve({
|
|
86063
|
+
widgetApiKey: "placeholder-api-key"
|
|
86064
|
+
});
|
|
86065
|
+
}
|
|
86066
|
+
|
|
85930
86067
|
return queryWidgetApiKey();
|
|
85931
86068
|
}, {
|
|
85932
86069
|
staleTime: DEFAULT_QUERY_STALE_TIME
|
|
@@ -85944,9 +86081,8 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85944
86081
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85945
86082
|
className: "mb-1",
|
|
85946
86083
|
key: widget
|
|
85947
|
-
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.
|
|
86084
|
+
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.Switch, {
|
|
85948
86085
|
label: "neeto".concat(capitalize(widget)),
|
|
85949
|
-
size: "small",
|
|
85950
86086
|
checked: selectedWidgets.includes(widget),
|
|
85951
86087
|
onChange: function onChange() {
|
|
85952
86088
|
return updateSelectedWidgets(widget);
|
|
@@ -85958,7 +86094,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85958
86094
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85959
86095
|
className: "mb-4 px-2 w-full flex items-center justify-between gap-2"
|
|
85960
86096
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85961
|
-
className: "flex items-center justify-start gap-
|
|
86097
|
+
className: "flex items-center justify-start gap-1"
|
|
85962
86098
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85963
86099
|
className: "font-semibold text-base"
|
|
85964
86100
|
}, "neeto", formattedPrimaryWidget), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
@@ -85966,7 +86102,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85966
86102
|
target: "_blank",
|
|
85967
86103
|
rel: "noreferrer"
|
|
85968
86104
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
85969
|
-
size:
|
|
86105
|
+
size: 16
|
|
85970
86106
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85971
86107
|
className: "flex items-center justify-end gap-2"
|
|
85972
86108
|
}, renderSelectedTab()));
|
|
@@ -85979,8 +86115,6 @@ SelectionTabs.propTypes = {
|
|
|
85979
86115
|
};
|
|
85980
86116
|
|
|
85981
86117
|
var EmbedCode = function EmbedCode(_ref) {
|
|
85982
|
-
var _apiKeyResult$data2;
|
|
85983
|
-
|
|
85984
86118
|
var _ref$primaryApp = _ref.primaryApp,
|
|
85985
86119
|
primaryApp = _ref$primaryApp === void 0 ? "" : _ref$primaryApp,
|
|
85986
86120
|
_ref$initialSelectedW = _ref.initialSelectedWidgets,
|
|
@@ -85992,16 +86126,18 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
85992
86126
|
var apiKeyResult = useFetchApiKey();
|
|
85993
86127
|
var initialWidgets = ramda.uniq(ramda.intersection(ramda.append(primaryApp, initialSelectedWidgets), WIDGET_TYPES_VALUES));
|
|
85994
86128
|
|
|
85995
|
-
var _useState = React.useState(
|
|
86129
|
+
var _useState = React.useState(EMAIL_TYPES["null"]),
|
|
85996
86130
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85997
|
-
|
|
85998
|
-
|
|
86131
|
+
emailType = _useState2[0],
|
|
86132
|
+
setEmailType = _useState2[1];
|
|
85999
86133
|
|
|
86000
86134
|
var _useState3 = React.useState(ramda.intersection(initialWidgets, WIDGET_TYPES_VALUES)),
|
|
86001
86135
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
86002
86136
|
selectedWidgets = _useState4[0],
|
|
86003
86137
|
setSelectedWidgets = _useState4[1];
|
|
86004
86138
|
|
|
86139
|
+
var previousEmailType = usePrevious(emailType);
|
|
86140
|
+
|
|
86005
86141
|
var updateSelectedWidgets = function updateSelectedWidgets(widget) {
|
|
86006
86142
|
if (selectedWidgets.includes(widget)) {
|
|
86007
86143
|
setSelectedWidgets(ramda.without([widget], selectedWidgets));
|
|
@@ -86013,25 +86149,64 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
86013
86149
|
var enabledWidgets = ramda.fromPairs(selectedWidgets.map(function (widget) {
|
|
86014
86150
|
return [widget, true];
|
|
86015
86151
|
}));
|
|
86016
|
-
|
|
86152
|
+
|
|
86153
|
+
var getEmbedCodeString = function getEmbedCodeString() {
|
|
86017
86154
|
var _apiKeyResult$data;
|
|
86018
86155
|
|
|
86019
86156
|
if ((_apiKeyResult$data = apiKeyResult.data) !== null && _apiKeyResult$data !== void 0 && _apiKeyResult$data.widgetApiKey) {
|
|
86020
|
-
return sampleConsolidatedCodeString(enabledWidgets, apiKeyResult.data.widgetApiKey)
|
|
86021
|
-
return !line.includes("///") && line.trim();
|
|
86022
|
-
}).join("\n");
|
|
86157
|
+
return sampleConsolidatedCodeString(enabledWidgets, apiKeyResult.data.widgetApiKey);
|
|
86023
86158
|
}
|
|
86024
86159
|
|
|
86025
86160
|
return "";
|
|
86026
|
-
}
|
|
86161
|
+
};
|
|
86162
|
+
|
|
86163
|
+
var getSnippetProps = function getSnippetProps(selectedEmailType) {
|
|
86164
|
+
switch (selectedEmailType) {
|
|
86165
|
+
case EMAIL_TYPES.embedCode:
|
|
86166
|
+
return {
|
|
86167
|
+
codeString: getEmbedCodeString(),
|
|
86168
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.embedCode", {
|
|
86169
|
+
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets)
|
|
86170
|
+
}),
|
|
86171
|
+
body: t("neetoCommons.widget.email.body.values.embedCode", {
|
|
86172
|
+
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets),
|
|
86173
|
+
neetoKbUrl: WIDGET_KB_BASE_URL
|
|
86174
|
+
})
|
|
86175
|
+
};
|
|
86176
|
+
|
|
86177
|
+
case EMAIL_TYPES.userIdentity:
|
|
86178
|
+
return {
|
|
86179
|
+
codeString: getSampleUserIdentity(enabledWidgets),
|
|
86180
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.userIdentity"),
|
|
86181
|
+
body: t("neetoCommons.widget.email.body.values.userIdentity", {
|
|
86182
|
+
userIdentityKbUrl: enabledWidgets.chat ? NEETO_CHAT_USER_IDENTITY_URL : NEETO_REPLAY_CONFIGURE_URL
|
|
86183
|
+
})
|
|
86184
|
+
};
|
|
86185
|
+
|
|
86186
|
+
case EMAIL_TYPES.sessionContext:
|
|
86187
|
+
return {
|
|
86188
|
+
codeString: SAMPLE_CONTEXT_CODE_STRING,
|
|
86189
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.sessionContext"),
|
|
86190
|
+
body: t("neetoCommons.widget.email.body.values.sessionContext", {
|
|
86191
|
+
sessionContextKbUrl: NEETO_REPLAY_CONFIGURE_URL
|
|
86192
|
+
})
|
|
86193
|
+
};
|
|
86194
|
+
|
|
86195
|
+
case EMAIL_TYPES["null"]:
|
|
86196
|
+
return previousEmailType !== EMAIL_TYPES["null"] ? getSnippetProps(previousEmailType) : {};
|
|
86197
|
+
|
|
86198
|
+
default:
|
|
86199
|
+
throw new Error("Invalid email type received.");
|
|
86200
|
+
}
|
|
86201
|
+
};
|
|
86027
86202
|
|
|
86028
|
-
var handleSendViaEmail = function handleSendViaEmail() {
|
|
86203
|
+
var handleSendViaEmail = function handleSendViaEmail(selectedEmail) {
|
|
86029
86204
|
if (ramda.isEmpty(selectedWidgets)) {
|
|
86030
86205
|
neetoui.Toastr.error(t("neetoCommons.widget.installation.snippet.disabledError"));
|
|
86031
86206
|
return;
|
|
86032
86207
|
}
|
|
86033
86208
|
|
|
86034
|
-
|
|
86209
|
+
setEmailType(selectedEmail);
|
|
86035
86210
|
};
|
|
86036
86211
|
|
|
86037
86212
|
if (apiKeyResult.isLoading) {
|
|
@@ -86041,20 +86216,22 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
86041
86216
|
}
|
|
86042
86217
|
|
|
86043
86218
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86044
|
-
className: "mx-auto w-full flex-col items-center justify-start"
|
|
86219
|
+
className: "mx-auto w-full flex-col items-center justify-start mb-10"
|
|
86045
86220
|
}, /*#__PURE__*/React__default["default"].createElement(SelectionTabs, {
|
|
86046
86221
|
primarySelectedWidget: primaryApp,
|
|
86047
86222
|
selectedWidgets: selectedWidgets,
|
|
86048
86223
|
updateSelectedWidgets: updateSelectedWidgets
|
|
86049
86224
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86050
|
-
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start"
|
|
86225
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
86051
86226
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86052
86227
|
className: "mx-auto mb-4 w-full"
|
|
86053
86228
|
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
86054
|
-
codeString:
|
|
86229
|
+
codeString: getEmbedCodeString(),
|
|
86055
86230
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86056
|
-
title: "Embed
|
|
86057
|
-
sendViaEmail:
|
|
86231
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", null, "Embed code"),
|
|
86232
|
+
sendViaEmail: function sendViaEmail() {
|
|
86233
|
+
return handleSendViaEmail(EMAIL_TYPES.embedCode);
|
|
86234
|
+
}
|
|
86058
86235
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86059
86236
|
className: "w-full"
|
|
86060
86237
|
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
@@ -86070,14 +86247,56 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
86070
86247
|
className: "font-normal"
|
|
86071
86248
|
})
|
|
86072
86249
|
}
|
|
86073
|
-
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website.")), /*#__PURE__*/React__default["default"].createElement(
|
|
86074
|
-
|
|
86075
|
-
|
|
86076
|
-
|
|
86250
|
+
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website."))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86251
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
86252
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86253
|
+
className: "mx-auto mb-4 w-full"
|
|
86254
|
+
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
86255
|
+
codeString: getSampleUserIdentity(enabledWidgets),
|
|
86256
|
+
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86257
|
+
sendViaEmail: function sendViaEmail() {
|
|
86258
|
+
return handleSendViaEmail(EMAIL_TYPES.userIdentity);
|
|
86259
|
+
},
|
|
86260
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86261
|
+
className: "flex items-center justify-start"
|
|
86262
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, "User identity (Optional)"), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
86263
|
+
href: enabledWidgets.chat ? NEETO_CHAT_USER_IDENTITY_URL : NEETO_REPLAY_CONFIGURE_URL,
|
|
86264
|
+
target: "_blank",
|
|
86265
|
+
rel: "noreferrer",
|
|
86266
|
+
className: "ml-1"
|
|
86267
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
86268
|
+
size: 16
|
|
86269
|
+
})))
|
|
86270
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86271
|
+
className: "w-full"
|
|
86272
|
+
}, t("neetoCommons.widget.installation.instructions.userIdentity"))) : null, enabledWidgets.replay ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86273
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start"
|
|
86274
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86275
|
+
className: "mx-auto mb-4 w-full"
|
|
86276
|
+
}, /*#__PURE__*/React__default["default"].createElement(CodeBlock, {
|
|
86277
|
+
codeString: SAMPLE_CONTEXT_CODE_STRING,
|
|
86278
|
+
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86279
|
+
sendViaEmail: function sendViaEmail() {
|
|
86280
|
+
return handleSendViaEmail(EMAIL_TYPES.sessionContext);
|
|
86281
|
+
},
|
|
86282
|
+
title: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86283
|
+
className: "flex items-center justify-start"
|
|
86284
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, "Session context (Optional)"), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
86285
|
+
href: NEETO_REPLAY_CONFIGURE_URL,
|
|
86286
|
+
target: "_blank",
|
|
86287
|
+
rel: "noreferrer",
|
|
86288
|
+
className: "ml-1"
|
|
86289
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Help, {
|
|
86290
|
+
size: 16
|
|
86291
|
+
})))
|
|
86292
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
86293
|
+
className: "w-full"
|
|
86294
|
+
}, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default["default"].createElement(CodeSnippet, _extends$4({
|
|
86295
|
+
isModalOpen: !!emailType && isNotEmpty(selectedWidgets),
|
|
86077
86296
|
onClose: function onClose() {
|
|
86078
|
-
return
|
|
86297
|
+
return setEmailType(EMAIL_TYPES["null"]);
|
|
86079
86298
|
}
|
|
86080
|
-
})));
|
|
86299
|
+
}, getSnippetProps(emailType))));
|
|
86081
86300
|
};
|
|
86082
86301
|
|
|
86083
86302
|
EmbedCode.propTypes = {
|
|
@@ -86257,126 +86476,8 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
86257
86476
|
};
|
|
86258
86477
|
|
|
86259
86478
|
var NeetoWidget = {
|
|
86260
|
-
EmbedCode: EmbedCodeQueryClient
|
|
86261
|
-
|
|
86262
|
-
|
|
86263
|
-
function useDebounce(value) {
|
|
86264
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
86265
|
-
|
|
86266
|
-
var _useState = React.useState(value),
|
|
86267
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86268
|
-
debouncedValue = _useState2[0],
|
|
86269
|
-
setDebouncedValue = _useState2[1];
|
|
86270
|
-
|
|
86271
|
-
React.useEffect(function () {
|
|
86272
|
-
var handler = setTimeout(function () {
|
|
86273
|
-
setDebouncedValue(value);
|
|
86274
|
-
}, delay);
|
|
86275
|
-
return function () {
|
|
86276
|
-
clearTimeout(handler);
|
|
86277
|
-
};
|
|
86278
|
-
}, [value]);
|
|
86279
|
-
return debouncedValue;
|
|
86280
|
-
}
|
|
86281
|
-
|
|
86282
|
-
var useFuncDebounce = function useFuncDebounce(func) {
|
|
86283
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
86284
|
-
var timer = React.useRef(null);
|
|
86285
|
-
|
|
86286
|
-
var debouncedFunc = function debouncedFunc() {
|
|
86287
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
86288
|
-
args[_key] = arguments[_key];
|
|
86289
|
-
}
|
|
86290
|
-
|
|
86291
|
-
clearTimeout(timer.current);
|
|
86292
|
-
timer.current = setTimeout(function () {
|
|
86293
|
-
return func.apply(void 0, args);
|
|
86294
|
-
}, delay);
|
|
86295
|
-
};
|
|
86296
|
-
|
|
86297
|
-
debouncedFunc.cancel = function () {
|
|
86298
|
-
return clearTimeout(timer.current);
|
|
86299
|
-
};
|
|
86300
|
-
|
|
86301
|
-
return debouncedFunc;
|
|
86302
|
-
};
|
|
86303
|
-
|
|
86304
|
-
var useForceUpdate = function useForceUpdate() {
|
|
86305
|
-
var _useState = React.useState(0),
|
|
86306
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86307
|
-
setValue = _useState2[1];
|
|
86308
|
-
|
|
86309
|
-
return function () {
|
|
86310
|
-
return setValue(function (value) {
|
|
86311
|
-
return value + 1;
|
|
86312
|
-
});
|
|
86313
|
-
};
|
|
86314
|
-
};
|
|
86315
|
-
|
|
86316
|
-
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
86317
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
86318
|
-
|
|
86319
|
-
var _useState = React.useState(false),
|
|
86320
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86321
|
-
isIntersecting = _useState2[0],
|
|
86322
|
-
setIntersecting = _useState2[1];
|
|
86323
|
-
|
|
86324
|
-
var forceUpdate = useForceUpdate();
|
|
86325
|
-
React.useEffect(function () {
|
|
86326
|
-
if (!target) return forceUpdate();
|
|
86327
|
-
var observer = new IntersectionObserver(function (_ref) {
|
|
86328
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
86329
|
-
entry = _ref2[0];
|
|
86330
|
-
|
|
86331
|
-
return setIntersecting(entry.isIntersecting);
|
|
86332
|
-
}, options);
|
|
86333
|
-
observer.observe(target);
|
|
86334
|
-
return function () {
|
|
86335
|
-
return observer.unobserve(target);
|
|
86336
|
-
};
|
|
86337
|
-
}, [target, options]);
|
|
86338
|
-
return isIntersecting;
|
|
86339
|
-
};
|
|
86340
|
-
|
|
86341
|
-
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
86342
|
-
React.useEffect(function () {
|
|
86343
|
-
var listener = function listener(event) {
|
|
86344
|
-
// Do nothing if clicking ref's element or descendent elements
|
|
86345
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
86346
|
-
return;
|
|
86347
|
-
}
|
|
86348
|
-
|
|
86349
|
-
handler(event);
|
|
86350
|
-
};
|
|
86351
|
-
|
|
86352
|
-
document.addEventListener("mousedown", listener);
|
|
86353
|
-
document.addEventListener("touchstart", listener);
|
|
86354
|
-
return function () {
|
|
86355
|
-
document.removeEventListener("mousedown", listener);
|
|
86356
|
-
document.removeEventListener("touchstart", listener);
|
|
86357
|
-
};
|
|
86358
|
-
}, [handler]);
|
|
86359
|
-
};
|
|
86360
|
-
|
|
86361
|
-
var usePrevious = function usePrevious(value) {
|
|
86362
|
-
var ref = React.useRef(value);
|
|
86363
|
-
React.useEffect(function () {
|
|
86364
|
-
ref.current = value;
|
|
86365
|
-
}, [value]);
|
|
86366
|
-
return ref.current;
|
|
86367
|
-
};
|
|
86368
|
-
|
|
86369
|
-
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
86370
|
-
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
86371
|
-
var isInitialMount = React.useRef(true);
|
|
86372
|
-
React.useEffect(function () {
|
|
86373
|
-
if (isInitialMount.current) {
|
|
86374
|
-
isInitialMount.current = false;
|
|
86375
|
-
return;
|
|
86376
|
-
}
|
|
86377
|
-
|
|
86378
|
-
callback();
|
|
86379
|
-
}, dependencies);
|
|
86479
|
+
EmbedCode: EmbedCodeQueryClient,
|
|
86480
|
+
WIDGET_TYPES: WIDGET_TYPES
|
|
86380
86481
|
};
|
|
86381
86482
|
|
|
86382
86483
|
var ReducerBasedProvider = function ReducerBasedProvider(initialValue, StateContext, DispatchContext, reducer) {
|
|
@@ -88072,12 +88173,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
88072
88173
|
'default': zephirExports
|
|
88073
88174
|
}, [zephirExports]);
|
|
88074
88175
|
|
|
88075
|
-
var
|
|
88176
|
+
var avisynthExports = requireAvisynth();
|
|
88076
88177
|
|
|
88077
|
-
var
|
|
88178
|
+
var avisynth = /*#__PURE__*/_mergeNamespaces({
|
|
88078
88179
|
__proto__: null,
|
|
88079
|
-
'default':
|
|
88080
|
-
}, [
|
|
88180
|
+
'default': avisynthExports
|
|
88181
|
+
}, [avisynthExports]);
|
|
88081
88182
|
|
|
88082
88183
|
var avroIdlExports = requireAvroIdl();
|
|
88083
88184
|
|