@zengenti/contensis-react-base 3.0.2-beta.8 → 3.1.0
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 +38 -2
- package/cjs/{App-81a45001.js → App-7ff737fa.js} +70 -34
- package/cjs/App-7ff737fa.js.map +1 -0
- package/cjs/{login-51b66359.js → ChangePassword.container-a617190b.js} +246 -84
- package/cjs/ChangePassword.container-a617190b.js.map +1 -0
- package/cjs/{ContensisDeliveryApi-de88df2a.js → ContensisDeliveryApi-9e32960d.js} +156 -122
- package/cjs/ContensisDeliveryApi-9e32960d.js.map +1 -0
- package/cjs/CookieConstants-000427db.js +10 -0
- package/cjs/CookieConstants-000427db.js.map +1 -0
- package/cjs/{RouteLoader-47d70a26.js → RouteLoader-049e81e5.js} +8 -5
- package/cjs/RouteLoader-049e81e5.js.map +1 -0
- package/cjs/{ToJs-61c03582.js → ToJs-149fc5e1.js} +49 -2
- package/cjs/ToJs-149fc5e1.js.map +1 -0
- package/cjs/_commonjsHelpers-b3309d7b.js +11 -0
- package/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/cjs/client.js +14 -12
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +46 -360
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +3498 -127
- package/cjs/forms.js.map +1 -1
- package/cjs/redux.js +3 -4
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +4 -3
- package/cjs/routing.js.map +1 -1
- package/cjs/{sagas-6d12e7ca.js → sagas-e04b94c1.js} +44 -20
- package/cjs/sagas-e04b94c1.js.map +1 -0
- package/cjs/search.js +13 -13
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-c76c2676.js → selectors-46b689d0.js} +11 -11
- package/cjs/selectors-46b689d0.js.map +1 -0
- package/cjs/user.js +33 -159
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +6 -4
- package/cjs/util.js.map +1 -1
- package/cjs/{version-38afaf2a.js → version-79a027cb.js} +12 -23
- package/cjs/version-79a027cb.js.map +1 -0
- package/cjs/{version-886f49d8.js → version-afd4f77e.js} +3 -3
- package/cjs/{version-886f49d8.js.map → version-afd4f77e.js.map} +1 -1
- package/esm/{App-5f914483.js → App-ff944c78.js} +64 -29
- package/esm/App-ff944c78.js.map +1 -0
- package/esm/{login-4d07c2de.js → ChangePassword.container-ae0f9ce4.js} +229 -78
- package/esm/ChangePassword.container-ae0f9ce4.js.map +1 -0
- package/esm/{ContensisDeliveryApi-ad06857d.js → ContensisDeliveryApi-c66b0cc3.js} +155 -123
- package/esm/ContensisDeliveryApi-c66b0cc3.js.map +1 -0
- package/esm/CookieConstants-3d3b6531.js +6 -0
- package/esm/CookieConstants-3d3b6531.js.map +1 -0
- package/esm/{RouteLoader-f5d5f733.js → RouteLoader-02eef6d9.js} +8 -5
- package/esm/RouteLoader-02eef6d9.js.map +1 -0
- package/esm/{ToJs-0066e629.js → ToJs-ae860aad.js} +49 -3
- package/esm/ToJs-ae860aad.js.map +1 -0
- package/esm/_commonjsHelpers-1789f0cf.js +8 -0
- package/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/esm/client.js +15 -13
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +45 -360
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +3500 -129
- package/esm/forms.js.map +1 -1
- package/esm/redux.js +6 -7
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +4 -3
- package/esm/routing.js.map +1 -1
- package/esm/{sagas-53d2aefb.js → sagas-933a8fc8.js} +44 -20
- package/esm/sagas-933a8fc8.js.map +1 -0
- package/esm/search.js +14 -14
- package/esm/search.js.map +1 -1
- package/esm/{selectors-3f0d804d.js → selectors-01074974.js} +11 -12
- package/esm/selectors-01074974.js.map +1 -0
- package/esm/user.js +21 -151
- package/esm/user.js.map +1 -1
- package/esm/util.js +4 -4
- package/esm/{version-f4629693.js → version-0fbd1b82.js} +3 -3
- package/esm/{version-f4629693.js.map → version-0fbd1b82.js.map} +1 -1
- package/esm/{version-dd31c7f0.js → version-346a9787.js} +13 -23
- package/esm/version-346a9787.js.map +1 -0
- package/models/client/client.d.ts +1 -1
- package/models/config.d.ts +4 -4
- package/models/redux/appstate.d.ts +2 -1
- package/models/routing/redux/actions.d.ts +10 -6
- package/models/routing/redux/selectors.d.ts +5 -4
- package/models/routing/redux/types.d.ts +0 -1
- package/models/routing/routes.d.ts +20 -17
- package/models/routing/util/queries.d.ts +3 -2
- package/models/search/models/Queries.d.ts +9 -10
- package/models/search/models/Search.d.ts +26 -24
- package/models/search/models/SearchActions.d.ts +36 -36
- package/models/search/models/SearchState.d.ts +11 -11
- package/models/search/models/SearchUtil.d.ts +1 -1
- package/models/search/models/WithSearch.d.ts +1 -1
- package/models/search/redux/actions.d.ts +7 -7
- package/models/search/redux/selectors.d.ts +27 -27
- package/models/search/redux/types.d.ts +21 -21
- package/models/search/redux/util.d.ts +2 -2
- package/models/search/search/ContensisDeliveryApi.d.ts +1 -1
- package/models/search/search/expressions.d.ts +4 -4
- package/models/search/search/util.d.ts +2 -2
- package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
- package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
- package/models/server/features/linkdepth-api/search.d.ts +3 -3
- package/models/server/internalServer.d.ts +7 -5
- package/models/server/util/bundles.d.ts +2 -2
- package/models/server/util/handleExceptions.d.ts +1 -1
- package/models/testImmer/redux/reducer.d.ts +1 -1
- package/models/user/components/Login.d.ts +2 -3
- package/models/user/containers/ChangePassword.container.d.ts +2 -2
- package/models/user/containers/ForgotPassword.container.d.ts +2 -2
- package/models/user/containers/Login.container.d.ts +2 -2
- package/models/user/containers/Registration.container.d.ts +2 -2
- package/models/user/hocs/withLogin.d.ts +5 -11
- package/models/user/hocs/withRegistration.d.ts +2 -8
- package/models/user/redux/actions.d.ts +2 -2
- package/models/user/redux/sagas/login.d.ts +9 -8
- package/models/user/redux/selectors.d.ts +4 -4
- package/models/user/util/CookieConstants.d.ts +8 -0
- package/models/user/util/CookieHelper.class.d.ts +15 -3
- package/models/user/util/LoginHelper.class.d.ts +27 -23
- package/models/util/CachedDeliveryApi.d.ts +25 -0
- package/models/util/ContensisDeliveryApi.d.ts +20 -44
- package/models/util/LruCache.d.ts +12 -0
- package/models/util/ToJs.d.ts +1 -1
- package/models/util/index.d.ts +1 -1
- package/models/util/json-mapper.d.ts +1 -1
- package/package.json +10 -11
- package/cjs/App-81a45001.js.map +0 -1
- package/cjs/ContensisDeliveryApi-de88df2a.js.map +0 -1
- package/cjs/RouteLoader-47d70a26.js.map +0 -1
- package/cjs/ToJs-61c03582.js.map +0 -1
- package/cjs/login-51b66359.js.map +0 -1
- package/cjs/sagas-6d12e7ca.js.map +0 -1
- package/cjs/selectors-c76c2676.js.map +0 -1
- package/cjs/version-38afaf2a.js.map +0 -1
- package/esm/App-5f914483.js.map +0 -1
- package/esm/ContensisDeliveryApi-ad06857d.js.map +0 -1
- package/esm/RouteLoader-f5d5f733.js.map +0 -1
- package/esm/ToJs-0066e629.js.map +0 -1
- package/esm/login-4d07c2de.js.map +0 -1
- package/esm/sagas-53d2aefb.js.map +0 -1
- package/esm/selectors-3f0d804d.js.map +0 -1
- package/esm/version-dd31c7f0.js.map +0 -1
package/esm/forms.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { produce } from 'immer';
|
|
2
|
-
import { takeEvery, takeLatest, put,
|
|
2
|
+
import { takeEvery, takeLatest, put, select, all, call } from '@redux-saga/core/effects';
|
|
3
3
|
import { createSelector } from 'reselect';
|
|
4
4
|
import { selectors as selectors$1 } from '@zengenti/contensis-react-base/routing';
|
|
5
|
-
import React, { createContext, useState, useEffect } from 'react';
|
|
5
|
+
import React, { createContext, useState, useEffect, useRef } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useSelector, useDispatch } from 'react-redux';
|
|
8
8
|
import styled, { ThemeProvider as ThemeProvider$1, css } from 'styled-components';
|
|
9
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-1789f0cf.js';
|
|
9
10
|
|
|
10
11
|
const ACTION_PREFIX = '@FORM2/';
|
|
11
12
|
const SET_FORM_DATA = `${ACTION_PREFIX}SET_FORM_DATA`;
|
|
@@ -26,7 +27,8 @@ const SET_FIELD_ERROR = `${ACTION_PREFIX}SET_FIELD_ERROR`;
|
|
|
26
27
|
const SET_DATE_RANGE_VALUES = `${ACTION_PREFIX}SET_DATE_RANGE_VALUES`;
|
|
27
28
|
const SET_FORM_ENTRIES = `${ACTION_PREFIX}SET_FORM_ENTRIES`;
|
|
28
29
|
const SET_SUCCESS_MESSAGE = `${ACTION_PREFIX}SET_SUCCESS_MESSAGE`;
|
|
29
|
-
const
|
|
30
|
+
const SET_MULTIPLE_CHECKBOX_VALUE = `${ACTION_PREFIX}SET_MULTIPLE_CHECKBOX_VALUE`;
|
|
31
|
+
const SET_SINGLE_CHECKBOX_VALUE = `${ACTION_PREFIX}SET_SINGLE_CHECKBOX_VALUE`;
|
|
30
32
|
|
|
31
33
|
const initialSettings = {
|
|
32
34
|
recaptcha: {
|
|
@@ -124,22 +126,32 @@ var reducer = produce((state, action) => {
|
|
|
124
126
|
formId,
|
|
125
127
|
value
|
|
126
128
|
} = action || {};
|
|
127
|
-
state[formId].data =
|
|
129
|
+
state[formId].data = {
|
|
130
|
+
...state[formId].data,
|
|
131
|
+
...value
|
|
132
|
+
};
|
|
128
133
|
return;
|
|
129
134
|
}
|
|
130
|
-
case
|
|
135
|
+
case SET_SINGLE_CHECKBOX_VALUE:
|
|
131
136
|
{
|
|
132
137
|
const {
|
|
133
138
|
formId,
|
|
134
139
|
id,
|
|
135
|
-
value
|
|
136
|
-
isChecked
|
|
140
|
+
value
|
|
137
141
|
} = action || {};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
state[formId].data[id] = value;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
case SET_MULTIPLE_CHECKBOX_VALUE:
|
|
146
|
+
{
|
|
147
|
+
const {
|
|
148
|
+
formId,
|
|
149
|
+
id,
|
|
150
|
+
label,
|
|
141
151
|
value
|
|
142
|
-
}
|
|
152
|
+
} = action || {};
|
|
153
|
+
const checked = state[formId].data[id] || [];
|
|
154
|
+
if (value) state[formId].data[id] = [...checked, label];else state[formId].data[id] = checked.filter(v => v !== label);
|
|
143
155
|
return;
|
|
144
156
|
}
|
|
145
157
|
case SET_DATE_RANGE_VALUES:
|
|
@@ -199,7 +211,7 @@ var reducer = produce((state, action) => {
|
|
|
199
211
|
formId,
|
|
200
212
|
message
|
|
201
213
|
} = action || {};
|
|
202
|
-
state[formId].status.
|
|
214
|
+
state[formId].status.messages.success = message;
|
|
203
215
|
return;
|
|
204
216
|
}
|
|
205
217
|
case SUBMIT_FORM_ERROR:
|
|
@@ -306,7 +318,7 @@ const makeSelectFormValidationSent = formId => createSelector(selectForms, forms
|
|
|
306
318
|
var _forms$formId16;
|
|
307
319
|
return forms === null || forms === void 0 ? void 0 : (_forms$formId16 = forms[formId]) === null || _forms$formId16 === void 0 ? void 0 : _forms$formId16.status.validation.sent;
|
|
308
320
|
});
|
|
309
|
-
const makeSelectFormGroup
|
|
321
|
+
const makeSelectFormGroup = formId => createSelector(selectForms, forms => {
|
|
310
322
|
var _forms$formId17;
|
|
311
323
|
return forms === null || forms === void 0 ? void 0 : (_forms$formId17 = forms[formId]) === null || _forms$formId17 === void 0 ? void 0 : _forms$formId17.groups;
|
|
312
324
|
});
|
|
@@ -326,7 +338,7 @@ const selectors = {
|
|
|
326
338
|
makeSelectDefaultLang,
|
|
327
339
|
makeSelectFormSuccessMessage,
|
|
328
340
|
makeSelectFormValidationSent,
|
|
329
|
-
makeSelectFormGroup
|
|
341
|
+
makeSelectFormGroup,
|
|
330
342
|
makeSelectHasError
|
|
331
343
|
};
|
|
332
344
|
|
|
@@ -465,9 +477,18 @@ const doValidateField = (field, value) => {
|
|
|
465
477
|
}
|
|
466
478
|
};
|
|
467
479
|
const isValidRegex = (field, value) => {
|
|
468
|
-
|
|
469
|
-
const regexPattern =
|
|
470
|
-
if (!regexPattern
|
|
480
|
+
var _field$validations2, _field$validations2$r;
|
|
481
|
+
const regexPattern = field === null || field === void 0 ? void 0 : (_field$validations2 = field.validations) === null || _field$validations2 === void 0 ? void 0 : (_field$validations2$r = _field$validations2.regex) === null || _field$validations2$r === void 0 ? void 0 : _field$validations2$r.pattern;
|
|
482
|
+
if (!regexPattern || regexPattern === '') return false;
|
|
483
|
+
try {
|
|
484
|
+
// Create RegExp object from string pattern
|
|
485
|
+
const regexObject = new RegExp(regexPattern.replace(/^\/|\/$/g, ''));
|
|
486
|
+
// Check the value being tested
|
|
487
|
+
const result = regexObject.test(value);
|
|
488
|
+
return result;
|
|
489
|
+
} catch (err) {
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
471
492
|
};
|
|
472
493
|
const isBusinessEmailValid = (field, value) => {
|
|
473
494
|
const domain = value.split('@').pop();
|
|
@@ -527,6 +548,9 @@ const doCreateMessage = (type, minLength, maxLength, currentLength, defaultLangu
|
|
|
527
548
|
const getFieldType = field => {
|
|
528
549
|
var _field$editor, _field$editor$propert;
|
|
529
550
|
if (!field) return null;
|
|
551
|
+
if (field.id === 'country' && field.dataType === 'string') {
|
|
552
|
+
return 'country';
|
|
553
|
+
}
|
|
530
554
|
if (field.dataType === 'string' && field.editor && field.editor.id === 'multiline') {
|
|
531
555
|
return 'textarea';
|
|
532
556
|
} else if (field.dataType === 'string' && field.editor && field.editor.id === 'list-dropdown') {
|
|
@@ -550,7 +574,9 @@ const getFieldType = field => {
|
|
|
550
574
|
}
|
|
551
575
|
};
|
|
552
576
|
|
|
553
|
-
const sagas = [takeEvery(SUBMIT_FORM_SUCCESS, onFormSuccess), takeEvery(SUBMIT_FORM_FOR_VALIDATION, doValidateForm), takeEvery(SUBMIT_FORM, onSubmitForm), takeEvery(SET_FORM_ID, doFetchForm),
|
|
577
|
+
const sagas = [takeEvery(SUBMIT_FORM_SUCCESS, onFormSuccess), takeEvery(SUBMIT_FORM_FOR_VALIDATION, doValidateForm), takeEvery(SUBMIT_FORM, onSubmitForm), takeEvery(SET_FORM_ID, doFetchForm),
|
|
578
|
+
// takeLatest(VALIDATE_FIELD, onValidateField),
|
|
579
|
+
takeEvery(PAGE_FORWARD, doTogglePage), takeEvery(PAGE_BACK, doTogglePage), takeEvery(SET_FORM_DATA, getEntryPickerData), takeLatest(SET_FORM_DATA, setDefaultValueFields)];
|
|
554
580
|
function* doValidateForm(action) {
|
|
555
581
|
const {
|
|
556
582
|
formId
|
|
@@ -561,35 +587,31 @@ function* doValidateForm(action) {
|
|
|
561
587
|
formId
|
|
562
588
|
});
|
|
563
589
|
}
|
|
564
|
-
function* onValidateField
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if ((value === null || value === void 0 ? void 0 : value.length) >= 1) yield call(onValidateSingleField, formId, id, value);
|
|
571
|
-
}
|
|
572
|
-
function* validateGroupfields(formId, groupId) {
|
|
590
|
+
// function* onValidateField(action) {
|
|
591
|
+
// const { formId, id, value } = action;
|
|
592
|
+
// if (value?.length >= 1) yield call(onValidateSingleField, formId, id, value);
|
|
593
|
+
// }
|
|
594
|
+
|
|
595
|
+
function* onValidateGroupFields(formId, groupId) {
|
|
573
596
|
const state = yield select();
|
|
574
597
|
const selectPostData = makeSelectFormPostData(formId);
|
|
575
598
|
const postData = selectPostData(state);
|
|
576
599
|
const selectFormFields = makeSelectFormFields(formId);
|
|
577
600
|
const fields = selectFormFields(state);
|
|
578
|
-
const groupFields = fields.filter(f => f.
|
|
579
|
-
let
|
|
601
|
+
const groupFields = fields.filter(f => f.groupId == groupId);
|
|
602
|
+
let errors = [];
|
|
580
603
|
groupFields.forEach(field => {
|
|
581
|
-
let
|
|
582
|
-
if (postData[field.id])
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
const err = doValidateField(field, val);
|
|
586
|
-
if (err) newErrors.push(err);
|
|
604
|
+
let value = '';
|
|
605
|
+
if (postData[field.id]) value = postData[field.id];
|
|
606
|
+
const error = doValidateField(field, value);
|
|
607
|
+
if (error) errors.push(error);
|
|
587
608
|
});
|
|
588
609
|
yield put({
|
|
589
610
|
type: SET_FIELD_ERROR,
|
|
590
611
|
formId: formId,
|
|
591
|
-
value:
|
|
612
|
+
value: errors
|
|
592
613
|
});
|
|
614
|
+
return errors;
|
|
593
615
|
}
|
|
594
616
|
function* onValidateAllFields(formId) {
|
|
595
617
|
const state = yield select();
|
|
@@ -597,42 +619,17 @@ function* onValidateAllFields(formId) {
|
|
|
597
619
|
const postData = selectPostData(state);
|
|
598
620
|
const selectFormFields = makeSelectFormFields(formId);
|
|
599
621
|
const fields = selectFormFields(state);
|
|
600
|
-
|
|
622
|
+
const errors = [];
|
|
601
623
|
fields.forEach(field => {
|
|
602
|
-
let
|
|
603
|
-
if (postData[field.id])
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
const err = doValidateField(field, val);
|
|
607
|
-
if (err) newErrors.push(err);
|
|
624
|
+
let value = '';
|
|
625
|
+
if (postData[field.id]) value = postData[field.id];
|
|
626
|
+
const error = doValidateField(field, value);
|
|
627
|
+
if (error) errors.push(error);
|
|
608
628
|
});
|
|
609
629
|
yield put({
|
|
610
630
|
type: SET_FIELD_ERROR,
|
|
611
631
|
formId: formId,
|
|
612
|
-
value:
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
function* onValidateSingleField(formId, fieldId, value) {
|
|
616
|
-
const state = yield select();
|
|
617
|
-
const selectFormFields = makeSelectFormFields(formId);
|
|
618
|
-
const fields = selectFormFields(state);
|
|
619
|
-
const selectFormFieldErrors = makeSelectFormFieldErrors(formId);
|
|
620
|
-
const errors = selectFormFieldErrors(state);
|
|
621
|
-
const fieldData = fields.find(f => f.id == fieldId);
|
|
622
|
-
const newErrors = [];
|
|
623
|
-
//loop through current errors to remove any of the item we currently edit
|
|
624
|
-
errors.forEach(error => {
|
|
625
|
-
if (error.fieldId !== fieldId) {
|
|
626
|
-
//push any existing errors to new array
|
|
627
|
-
newErrors.push(error);
|
|
628
|
-
}
|
|
629
|
-
});
|
|
630
|
-
const err = doValidateField(fieldData, value);
|
|
631
|
-
if (err) newErrors.push(err);
|
|
632
|
-
yield put({
|
|
633
|
-
type: SET_FIELD_ERROR,
|
|
634
|
-
formId: formId,
|
|
635
|
-
value: newErrors
|
|
632
|
+
value: errors
|
|
636
633
|
});
|
|
637
634
|
}
|
|
638
635
|
function* doTogglePage(action) {
|
|
@@ -644,15 +641,25 @@ function* doTogglePage(action) {
|
|
|
644
641
|
const selectFormGroups = makeSelectFormGroup(formId);
|
|
645
642
|
const formGroups = selectFormGroups(state);
|
|
646
643
|
if (action.type === PAGE_FORWARD) {
|
|
647
|
-
yield
|
|
644
|
+
const errors = yield onValidateGroupFields(formId, formGroups[pageIndex - 1].id);
|
|
645
|
+
if (errors && errors.length <= 0) {
|
|
646
|
+
yield put({
|
|
647
|
+
type: SET_CURRENT_PAGE,
|
|
648
|
+
formId: formId,
|
|
649
|
+
pageId: formGroups[pageIndex].id,
|
|
650
|
+
pageCount: formGroups.length,
|
|
651
|
+
pageIndex: pageIndex
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
} else if (action.type === PAGE_BACK) {
|
|
655
|
+
yield put({
|
|
656
|
+
type: SET_CURRENT_PAGE,
|
|
657
|
+
formId: formId,
|
|
658
|
+
pageId: formGroups[pageIndex].id,
|
|
659
|
+
pageCount: formGroups.length,
|
|
660
|
+
pageIndex: pageIndex
|
|
661
|
+
});
|
|
648
662
|
}
|
|
649
|
-
yield put({
|
|
650
|
-
type: SET_CURRENT_PAGE,
|
|
651
|
-
formId: formId,
|
|
652
|
-
pageId: formGroups[pageIndex].id,
|
|
653
|
-
pageCount: formGroups.length,
|
|
654
|
-
pageIndex: pageIndex
|
|
655
|
-
});
|
|
656
663
|
}
|
|
657
664
|
function* doFetchForm(action) {
|
|
658
665
|
var _schema$groups;
|
|
@@ -699,11 +706,14 @@ function* onFormSuccess(action) {
|
|
|
699
706
|
window.location.href = redirect.default['en-GB'];
|
|
700
707
|
}
|
|
701
708
|
if (message !== null && message !== void 0 && message.default) {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
709
|
+
const m = message.default['en-GB'];
|
|
710
|
+
if (m) {
|
|
711
|
+
yield put({
|
|
712
|
+
type: SET_SUCCESS_MESSAGE,
|
|
713
|
+
message: m,
|
|
714
|
+
formId: action.formId
|
|
715
|
+
});
|
|
716
|
+
}
|
|
707
717
|
}
|
|
708
718
|
}
|
|
709
719
|
function* onSubmitForm(action) {
|
|
@@ -809,11 +819,16 @@ const setValue = (formId, id, value) => action(SET_FIELD_VALUE, {
|
|
|
809
819
|
id,
|
|
810
820
|
value
|
|
811
821
|
});
|
|
812
|
-
const
|
|
822
|
+
const setSingleCheckboxValue = (formId, id, value) => action(SET_SINGLE_CHECKBOX_VALUE, {
|
|
813
823
|
formId,
|
|
814
824
|
id,
|
|
815
|
-
value
|
|
816
|
-
|
|
825
|
+
value
|
|
826
|
+
});
|
|
827
|
+
const setMultipleCheckboxValue = (formId, id, label, value) => action(SET_MULTIPLE_CHECKBOX_VALUE, {
|
|
828
|
+
formId,
|
|
829
|
+
id,
|
|
830
|
+
label,
|
|
831
|
+
value
|
|
817
832
|
});
|
|
818
833
|
const setDateRangeValues = (formId, id, dateType, value) => action(SET_DATE_RANGE_VALUES, {
|
|
819
834
|
formId,
|
|
@@ -838,8 +853,8 @@ const actions = {
|
|
|
838
853
|
onSubmit,
|
|
839
854
|
setFormId,
|
|
840
855
|
setValue,
|
|
841
|
-
|
|
842
|
-
|
|
856
|
+
setSingleCheckboxValue,
|
|
857
|
+
setMultipleCheckboxValue,
|
|
843
858
|
onValidateField,
|
|
844
859
|
doTogglePageForward,
|
|
845
860
|
doTogglePageBack
|
|
@@ -901,7 +916,7 @@ const FormStyled = styled.form.withConfig({
|
|
|
901
916
|
theme,
|
|
902
917
|
useDefaultTheme
|
|
903
918
|
}) => {
|
|
904
|
-
return css(["", ""], useDefaultTheme && css(["> div:not(:first-child){margin-top:16px;}padding:0 16px;.success-message{font-size:18px;margin:0;}.visuallyHidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}.loading{display:block;margin:24px auto;}label{display:inline-block;.isRequired{color:", ";}}input,textarea,select{display:block;font-family:inherit;background-color:", ";border-radius:3px;border:1px solid ", ";height:40px;padding:8px;margin-top:4px;width:100%;}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px ", " inset;}textarea{height:200px;resize:none;}[aria-invalid='false']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}[aria-invalid='true']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}input ~ .svg{position:absolute;right:8px;top:50%;transform:translateY(-50%);}textarea ~ .svg{position:absolute;right:8px;top:8px;}"], theme.colors.red_darker, theme.colors.white, theme.colors.light_grey_darkest, theme.colors.white, theme.colors.green_lightest, theme.colors.green_darker, theme.colors.green_lightest, theme.colors.red_lightest, theme.colors.red_darker, theme.colors.red_lightest));
|
|
919
|
+
return css(["", ""], useDefaultTheme && css(["> div:not(:first-child){margin-top:16px;}padding:0 16px;.success-message{font-size:18px;margin:0;}.visuallyHidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}.loading{display:block;margin:24px auto;}label{display:inline-block;.isRequired{color:", ";}}input,textarea,select{display:block;font-family:inherit;background-color:", ";border-radius:3px;border:1px solid ", ";height:40px;padding:8px;margin-top:4px;width:100%;}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px ", " inset;}textarea{height:200px;resize:none;}[aria-invalid='false']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}[aria-invalid='true']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}input ~ .svg{position:absolute;right:8px;top:50%;transform:translateY(-50%);}textarea ~ .svg{position:absolute;right:8px;top:8px;}button:not(:last-of-type){margin-right:16px;}"], theme.colors.red_darker, theme.colors.white, theme.colors.light_grey_darkest, theme.colors.white, theme.colors.green_lightest, theme.colors.green_darker, theme.colors.green_lightest, theme.colors.red_lightest, theme.colors.red_darker, theme.colors.red_lightest));
|
|
905
920
|
});
|
|
906
921
|
|
|
907
922
|
const Label = ({
|
|
@@ -914,11 +929,11 @@ const Label = ({
|
|
|
914
929
|
return /*#__PURE__*/React.createElement("label", {
|
|
915
930
|
className: `${className} ${isHidden ? 'visuallyHidden' : ''}`,
|
|
916
931
|
htmlFor: id
|
|
917
|
-
}, label, isRequired
|
|
918
|
-
className: "
|
|
919
|
-
}, "
|
|
920
|
-
className: "
|
|
921
|
-
}, "
|
|
932
|
+
}, label, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
933
|
+
className: "label__required"
|
|
934
|
+
}, "(required)") : /*#__PURE__*/React.createElement("span", {
|
|
935
|
+
className: "label__optional"
|
|
936
|
+
}, "(optional)"));
|
|
922
937
|
};
|
|
923
938
|
Label.propTypes = {
|
|
924
939
|
className: PropTypes.string,
|
|
@@ -1280,7 +1295,6 @@ const CheckboxStyled = styled.div.withConfig({
|
|
|
1280
1295
|
const Checkbox = ({
|
|
1281
1296
|
className,
|
|
1282
1297
|
formId,
|
|
1283
|
-
setCheckboxValue,
|
|
1284
1298
|
id,
|
|
1285
1299
|
type,
|
|
1286
1300
|
label,
|
|
@@ -1293,14 +1307,15 @@ const Checkbox = ({
|
|
|
1293
1307
|
// NF change rules of hooks
|
|
1294
1308
|
let isDefaultChecked = defaultValue && defaultValue[defaultLanguage];
|
|
1295
1309
|
const [isChecked, setIsChecked] = useState(isDefaultChecked || '');
|
|
1310
|
+
const dispatch = useDispatch();
|
|
1296
1311
|
switch (type) {
|
|
1297
1312
|
case 'multiple':
|
|
1298
1313
|
{
|
|
1299
1314
|
if (!validations) return null;
|
|
1300
1315
|
const isRequired = validations && validations.required ? true : false;
|
|
1301
1316
|
const cbValues = validations && validations.allowedValues && validations.allowedValues.values;
|
|
1302
|
-
const _handleChange = (
|
|
1303
|
-
|
|
1317
|
+
const _handleChange = (label, value) => {
|
|
1318
|
+
dispatch(setMultipleCheckboxValue(formId, id, label, value));
|
|
1304
1319
|
};
|
|
1305
1320
|
if (!cbValues || cbValues.length < 1) return null;
|
|
1306
1321
|
return /*#__PURE__*/React.createElement(CheckboxStyled, {
|
|
@@ -1322,18 +1337,18 @@ const Checkbox = ({
|
|
|
1322
1337
|
value: val[defaultLanguage],
|
|
1323
1338
|
className: `${className ? className : ''} input-checkbox`,
|
|
1324
1339
|
onChange: e => _handleChange(e.target.value, e.target.checked)
|
|
1325
|
-
}), /*#__PURE__*/React.createElement(
|
|
1340
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
1341
|
+
className: "label-checkbox",
|
|
1326
1342
|
id: `checkbox-${idx}`,
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
}));
|
|
1343
|
+
htmlFor: `checkbox-${idx}`
|
|
1344
|
+
}, val[defaultLanguage]));
|
|
1330
1345
|
}));
|
|
1331
1346
|
}
|
|
1332
1347
|
case 'single':
|
|
1333
1348
|
{
|
|
1334
|
-
const _handleChange =
|
|
1335
|
-
setIsChecked(
|
|
1336
|
-
|
|
1349
|
+
const _handleChange = value => {
|
|
1350
|
+
setIsChecked(value);
|
|
1351
|
+
dispatch(setSingleCheckboxValue(formId, id, value));
|
|
1337
1352
|
};
|
|
1338
1353
|
return /*#__PURE__*/React.createElement(CheckboxStyled, {
|
|
1339
1354
|
className: `checkbox-container`,
|
|
@@ -1362,7 +1377,6 @@ Checkbox.propTypes = {
|
|
|
1362
1377
|
id: PropTypes.string,
|
|
1363
1378
|
type: PropTypes.string,
|
|
1364
1379
|
label: PropTypes.string,
|
|
1365
|
-
setCheckboxValue: PropTypes.func,
|
|
1366
1380
|
validations: PropTypes.object,
|
|
1367
1381
|
defaultLanguage: PropTypes.string,
|
|
1368
1382
|
name: PropTypes.object,
|
|
@@ -1413,11 +1427,11 @@ const RadioButton = ({
|
|
|
1413
1427
|
onChange: e => {
|
|
1414
1428
|
setValue(formId, id, e.target.value);
|
|
1415
1429
|
}
|
|
1416
|
-
}), /*#__PURE__*/React.createElement(
|
|
1430
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
1431
|
+
className: "label-radio",
|
|
1417
1432
|
id: val[defaultLanguage],
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
}));
|
|
1433
|
+
htmlFor: val[defaultLanguage]
|
|
1434
|
+
}, val[defaultLanguage]));
|
|
1421
1435
|
}));
|
|
1422
1436
|
};
|
|
1423
1437
|
RadioButton.propTypes = {
|
|
@@ -1700,6 +1714,3353 @@ EntryPicker.propTypes = {
|
|
|
1700
1714
|
formId: PropTypes.string
|
|
1701
1715
|
};
|
|
1702
1716
|
|
|
1717
|
+
var dist = {exports: {}};
|
|
1718
|
+
|
|
1719
|
+
(function (module, exports) {
|
|
1720
|
+
!function (t, e) {
|
|
1721
|
+
module.exports = e() ;
|
|
1722
|
+
}("undefined" != typeof self ? self : commonjsGlobal, function () {
|
|
1723
|
+
return function (t) {
|
|
1724
|
+
var e = {};
|
|
1725
|
+
function n(r) {
|
|
1726
|
+
if (e[r]) return e[r].exports;
|
|
1727
|
+
var i = e[r] = {
|
|
1728
|
+
i: r,
|
|
1729
|
+
l: !1,
|
|
1730
|
+
exports: {}
|
|
1731
|
+
};
|
|
1732
|
+
return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
|
|
1733
|
+
}
|
|
1734
|
+
return n.m = t, n.c = e, n.d = function (t, e, r) {
|
|
1735
|
+
n.o(t, e) || Object.defineProperty(t, e, {
|
|
1736
|
+
configurable: !1,
|
|
1737
|
+
enumerable: !0,
|
|
1738
|
+
get: r
|
|
1739
|
+
});
|
|
1740
|
+
}, n.n = function (t) {
|
|
1741
|
+
var e = t && t.__esModule ? function () {
|
|
1742
|
+
return t.default;
|
|
1743
|
+
} : function () {
|
|
1744
|
+
return t;
|
|
1745
|
+
};
|
|
1746
|
+
return n.d(e, "a", e), e;
|
|
1747
|
+
}, n.o = function (t, e) {
|
|
1748
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
1749
|
+
}, n.p = "", n(n.s = 2);
|
|
1750
|
+
}([function (t, e) {
|
|
1751
|
+
var n;
|
|
1752
|
+
n = function () {
|
|
1753
|
+
return this;
|
|
1754
|
+
}();
|
|
1755
|
+
try {
|
|
1756
|
+
n = n || Function("return this")() || (0, eval)("this");
|
|
1757
|
+
} catch (t) {
|
|
1758
|
+
"object" == typeof window && (n = window);
|
|
1759
|
+
}
|
|
1760
|
+
t.exports = n;
|
|
1761
|
+
}, function (t, e, n) {
|
|
1762
|
+
|
|
1763
|
+
t.exports = u;
|
|
1764
|
+
var r = n(3),
|
|
1765
|
+
i = n(4),
|
|
1766
|
+
o = Array.prototype;
|
|
1767
|
+
function u(t) {
|
|
1768
|
+
if (!(this instanceof u)) return new u(t);
|
|
1769
|
+
var e,
|
|
1770
|
+
n = i(t.className).split(/\s+/);
|
|
1771
|
+
for (this._elem = t, this.length = 0, e = 0; e < n.length; e += 1) n[e] && o.push.call(this, n[e]);
|
|
1772
|
+
}
|
|
1773
|
+
u.prototype.add = function () {
|
|
1774
|
+
var t, e;
|
|
1775
|
+
for (e = 0; e < arguments.length; e += 1) t = "" + arguments[e], r(this, t) >= 0 || o.push.call(this, t);
|
|
1776
|
+
return this._elem.className = this.toString(), this;
|
|
1777
|
+
}, u.prototype.remove = function () {
|
|
1778
|
+
var t, e, n;
|
|
1779
|
+
for (n = 0; n < arguments.length; n += 1) e = "" + arguments[n], (t = r(this, e)) < 0 || o.splice.call(this, t, 1);
|
|
1780
|
+
return this._elem.className = this.toString(), this;
|
|
1781
|
+
}, u.prototype.contains = function (t) {
|
|
1782
|
+
return r(this, t += "") >= 0;
|
|
1783
|
+
}, u.prototype.toggle = function (t, e) {
|
|
1784
|
+
return t += "", !0 === e ? this.add(t) : !1 === e ? this.remove(t) : this[this.contains(t) ? "remove" : "add"](t);
|
|
1785
|
+
}, u.prototype.toString = function () {
|
|
1786
|
+
return o.join.call(this, " ");
|
|
1787
|
+
};
|
|
1788
|
+
}, function (t, e, n) {
|
|
1789
|
+
|
|
1790
|
+
var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
|
|
1791
|
+
return typeof t;
|
|
1792
|
+
} : function (t) {
|
|
1793
|
+
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1794
|
+
},
|
|
1795
|
+
i = function () {
|
|
1796
|
+
function t(t, e) {
|
|
1797
|
+
for (var n = 0; n < e.length; n++) {
|
|
1798
|
+
var r = e[n];
|
|
1799
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
return function (e, n, r) {
|
|
1803
|
+
return n && t(e.prototype, n), r && t(e, r), e;
|
|
1804
|
+
};
|
|
1805
|
+
}(),
|
|
1806
|
+
o = E(n(1)),
|
|
1807
|
+
u = E(n(5)),
|
|
1808
|
+
s = E(n(6)),
|
|
1809
|
+
a = E(n(7)),
|
|
1810
|
+
c = E(n(8)),
|
|
1811
|
+
f = E(n(9)),
|
|
1812
|
+
l = E(n(10)),
|
|
1813
|
+
h = E(n(12)),
|
|
1814
|
+
p = E(n(14)),
|
|
1815
|
+
d = E(n(15)),
|
|
1816
|
+
g = E(n(17)),
|
|
1817
|
+
y = E(n(18)),
|
|
1818
|
+
v = E(n(19)),
|
|
1819
|
+
m = E(n(31)),
|
|
1820
|
+
b = E(n(32)),
|
|
1821
|
+
w = E(n(35));
|
|
1822
|
+
function E(t) {
|
|
1823
|
+
return t && t.__esModule ? t : {
|
|
1824
|
+
default: t
|
|
1825
|
+
};
|
|
1826
|
+
}
|
|
1827
|
+
t.exports = function () {
|
|
1828
|
+
function t(e) {
|
|
1829
|
+
var n = this;
|
|
1830
|
+
if (function (t, e) {
|
|
1831
|
+
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
1832
|
+
}(this, t), e = e || {}, this.config = (0, b.default)(e), this.input = (0, d.default)(this.config.input), this.list = (0, d.default)(this.config.list), this.cachedOpts = this.currentOpts = (0, d.default)(this.config.options, !0, this.list), this.isOpen = !1, this.currentOption = null, this.selected = [], this.groups = [], this.isHovering = !1, this.autoFilter = this.config.autoFilter, this.optionsWithEventHandlers = new Set(), this.optionsWithKeyEventHandlers = new Set(), this.config.groups) {
|
|
1833
|
+
var r = (0, d.default)(this.config.groups, !0, this.list);
|
|
1834
|
+
this.groups = r.map(function (t) {
|
|
1835
|
+
return {
|
|
1836
|
+
element: t,
|
|
1837
|
+
options: n.cachedOpts.filter(function (e) {
|
|
1838
|
+
return t.contains(e);
|
|
1839
|
+
})
|
|
1840
|
+
};
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
if (!this.input || !this.list) throw new Error("Unable to find required elements (list/input)");
|
|
1844
|
+
(0, v.default)(this.input, this.list, this.cachedOpts), this.config.useLiveRegion && (this.liveRegion = new s.default({
|
|
1845
|
+
ariaLive: "assertive"
|
|
1846
|
+
})), this.initEvents();
|
|
1847
|
+
}
|
|
1848
|
+
return i(t, [{
|
|
1849
|
+
key: "initEvents",
|
|
1850
|
+
value: function () {
|
|
1851
|
+
var t = this;
|
|
1852
|
+
(0, u.default)(this), this.optionsWithKeyEventHandlers.has(this.input) || (this.input.addEventListener("click", function () {
|
|
1853
|
+
t.openList().goTo(t.getOptIndex() || 0);
|
|
1854
|
+
}), this.input.addEventListener("blur", function () {
|
|
1855
|
+
t.isHovering || t.closeList();
|
|
1856
|
+
}), this.input.addEventListener("focus", function () {
|
|
1857
|
+
t.selected.length && (t.input.value = t.selected.length >= 2 ? "" : t.config.selectionValue(t.selected)), t.input.select();
|
|
1858
|
+
}), document.addEventListener("click", function (e) {
|
|
1859
|
+
!(0, p.default)(e.target, [t.input, t.list], !0) && t.isOpen && t.closeList();
|
|
1860
|
+
})), this.optionEvents(), this.initKeys();
|
|
1861
|
+
}
|
|
1862
|
+
}, {
|
|
1863
|
+
key: "getOptIndex",
|
|
1864
|
+
value: function () {
|
|
1865
|
+
return this.currentOption && this.currentOpts.indexOf(this.currentOption);
|
|
1866
|
+
}
|
|
1867
|
+
}, {
|
|
1868
|
+
key: "optionEvents",
|
|
1869
|
+
value: function () {
|
|
1870
|
+
var t = this;
|
|
1871
|
+
this.cachedOpts.forEach(function (e) {
|
|
1872
|
+
t.optionsWithEventHandlers.has(e.id) || t.selected.includes(e) || (e.addEventListener("click", function () {
|
|
1873
|
+
t.goTo(t.currentOpts.indexOf(e)).select();
|
|
1874
|
+
}), e.addEventListener("mouseover", function () {
|
|
1875
|
+
var n = t.currentOption;
|
|
1876
|
+
n && (0, o.default)(n).remove(t.config.activeClass), (0, o.default)(e).add(t.config.activeClass), t.isHovering = !0;
|
|
1877
|
+
}), e.addEventListener("mouseout", function () {
|
|
1878
|
+
(0, o.default)(e).remove(t.config.activeClass), t.isHovering = !1;
|
|
1879
|
+
}), t.optionsWithEventHandlers.add(e.id));
|
|
1880
|
+
});
|
|
1881
|
+
}
|
|
1882
|
+
}, {
|
|
1883
|
+
key: "openList",
|
|
1884
|
+
value: function () {
|
|
1885
|
+
(0, o.default)(this.list).add(this.config.openClass), this.input.setAttribute("aria-expanded", "true"), this.isOpen || this.announceCount(), this.isOpen = !0, this.emit("list:open");
|
|
1886
|
+
var t = (0, f.default)(this.list);
|
|
1887
|
+
if (!t.visible) {
|
|
1888
|
+
var e = "bottom" === t.position ? 0 - (window.innerHeight - (this.input.clientHeight + this.list.clientHeight)) : 0;
|
|
1889
|
+
(0, a.default)({
|
|
1890
|
+
element: this.input,
|
|
1891
|
+
offset: e,
|
|
1892
|
+
bezier: [.19, 1, .22, 1],
|
|
1893
|
+
duration: 100
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
return this;
|
|
1897
|
+
}
|
|
1898
|
+
}, {
|
|
1899
|
+
key: "closeList",
|
|
1900
|
+
value: function (t, e) {
|
|
1901
|
+
return (0, o.default)(this.list).remove(this.config.openClass), this.input.setAttribute("aria-expanded", "false"), this.isOpen = !1, t && this.input.focus(), !this.multiselect && this.selected.length && (this.input.value = this.config.selectionValue(this.selected)), e && this.input.select(), this.emit("list:close"), this;
|
|
1902
|
+
}
|
|
1903
|
+
}, {
|
|
1904
|
+
key: "initKeys",
|
|
1905
|
+
value: function () {
|
|
1906
|
+
var t = this;
|
|
1907
|
+
if (!this.optionsWithKeyEventHandlers.has(this.input)) {
|
|
1908
|
+
this.optionsWithKeyEventHandlers.add(this.input), h.default.down(this.input, [{
|
|
1909
|
+
keys: ["up", "down"],
|
|
1910
|
+
callback: function (e, n) {
|
|
1911
|
+
if (t.isOpen) return -1 === t.currentOpts.indexOf(t.currentOption) ? t.goTo(0, !0) : t.goTo("down" === n ? "next" : "prev", !0);
|
|
1912
|
+
var r = t.selected.length ? t.currentOpts.indexOf(t.selected[t.selected.length - 1]) : 0;
|
|
1913
|
+
t.goTo(r, !0).openList();
|
|
1914
|
+
},
|
|
1915
|
+
preventDefault: !0
|
|
1916
|
+
}, {
|
|
1917
|
+
keys: ["enter"],
|
|
1918
|
+
callback: function (e) {
|
|
1919
|
+
t.isOpen && (e.preventDefault(), e.stopPropagation(), t.select());
|
|
1920
|
+
}
|
|
1921
|
+
}, {
|
|
1922
|
+
keys: ["escape"],
|
|
1923
|
+
callback: function (e) {
|
|
1924
|
+
t.isOpen && (e.stopPropagation(), t.closeList(!0, !0));
|
|
1925
|
+
}
|
|
1926
|
+
}, {
|
|
1927
|
+
keys: ["backspace"],
|
|
1928
|
+
callback: function () {
|
|
1929
|
+
t.selected.length >= 2 && (t.input.value = "");
|
|
1930
|
+
}
|
|
1931
|
+
}]);
|
|
1932
|
+
var e = [9, 13, 27, 16];
|
|
1933
|
+
h.default.up(this.input, function (n) {
|
|
1934
|
+
if (t.autoFilter) {
|
|
1935
|
+
var r = t.config.filter,
|
|
1936
|
+
i = t.cachedInputValue;
|
|
1937
|
+
e.indexOf(n.which) > -1 || !r || (t.freshSelection ? (t.clearFilters(), i && i.trim() !== t.input.value.trim() && (t.filter().openList(), t.freshSelection = !1)) : t.filter().openList(), (0, y.default)(t.list, t.currentOpts, t.config.noResultsText));
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}, {
|
|
1943
|
+
key: "clearFilters",
|
|
1944
|
+
value: function () {
|
|
1945
|
+
return this.cachedOpts.forEach(function (t) {
|
|
1946
|
+
return t.style.display = "";
|
|
1947
|
+
}), this.groups.forEach(function (t) {
|
|
1948
|
+
return t.element.style.display = "";
|
|
1949
|
+
}), this.currentOpts = this.cachedOpts, this;
|
|
1950
|
+
}
|
|
1951
|
+
}, {
|
|
1952
|
+
key: "filter",
|
|
1953
|
+
value: function (t) {
|
|
1954
|
+
var e = this,
|
|
1955
|
+
n = this.config.filter,
|
|
1956
|
+
r = this.currentOpts;
|
|
1957
|
+
return this.currentOpts = "function" == typeof n ? n(this.input.value.trim(), this.cachedOpts) : l.default[n](this.input.value.trim(), this.cachedOpts), this.currentOpts = this.currentOpts || [], this.updateOpts(), r.every(function (t) {
|
|
1958
|
+
return e.currentOpts.indexOf(t) > -1;
|
|
1959
|
+
}) || t || this.announceCount(), this;
|
|
1960
|
+
}
|
|
1961
|
+
}, {
|
|
1962
|
+
key: "announceCount",
|
|
1963
|
+
value: function () {
|
|
1964
|
+
var t = this.config.announcement && this.config.announcement.count;
|
|
1965
|
+
return t && this.liveRegion && this.liveRegion.announce(t(this.currentOpts.length), 500), this;
|
|
1966
|
+
}
|
|
1967
|
+
}, {
|
|
1968
|
+
key: "updateOpts",
|
|
1969
|
+
value: function () {
|
|
1970
|
+
var t = this,
|
|
1971
|
+
e = this.config.optionValue;
|
|
1972
|
+
return this.cachedOpts.forEach(function (n) {
|
|
1973
|
+
n.style.display = -1 === t.currentOpts.indexOf(n) ? "none" : "", n.innerHTML = "string" == typeof e ? (0, m.default)(n, t.input, e) : e(n);
|
|
1974
|
+
}), this.updateGroups(), this;
|
|
1975
|
+
}
|
|
1976
|
+
}, {
|
|
1977
|
+
key: "updateGroups",
|
|
1978
|
+
value: function () {
|
|
1979
|
+
return this.groups.forEach(function (t) {
|
|
1980
|
+
var e = t.options.filter(function (t) {
|
|
1981
|
+
return "" === t.style.display;
|
|
1982
|
+
});
|
|
1983
|
+
t.element.style.display = e.length ? "" : "none";
|
|
1984
|
+
}), this;
|
|
1985
|
+
}
|
|
1986
|
+
}, {
|
|
1987
|
+
key: "select",
|
|
1988
|
+
value: function () {
|
|
1989
|
+
var t = this,
|
|
1990
|
+
e = this.currentOption;
|
|
1991
|
+
if (e) {
|
|
1992
|
+
!this.config.multiselect && this.selected.length && (0, o.default)(this.selected[0]).remove(this.config.selectedClass);
|
|
1993
|
+
var n = this.selected.indexOf(e),
|
|
1994
|
+
r = n > -1;
|
|
1995
|
+
return this.config.multiselect ? r ? this.selected.splice(n, 1) : this.selected.push(e) : this.selected = this.config.allowEmpty && r ? [] : [e], this.cachedOpts.forEach(function (e) {
|
|
1996
|
+
e.setAttribute("aria-selected", t.selected.indexOf(e) > -1 ? "true" : "false");
|
|
1997
|
+
}), r ? (e.classList.remove(this.config.selectedClass), this.emit("deselection", {
|
|
1998
|
+
text: this.input.value,
|
|
1999
|
+
option: e
|
|
2000
|
+
})) : (e.classList.add(this.config.selectedClass), this.emit("selection", {
|
|
2001
|
+
text: this.input.value,
|
|
2002
|
+
option: e
|
|
2003
|
+
})), this.freshSelection = !0, this.input.value = this.selected.length ? this.config.selectionValue(this.selected) : "", this.cachedInputValue = this.input.value, this.filter(!0).clearFilters(), this.config.multiselect || (this.closeList(), this.input.select()), this;
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
}, {
|
|
2007
|
+
key: "reset",
|
|
2008
|
+
value: function () {
|
|
2009
|
+
var t = this;
|
|
2010
|
+
return this.clearFilters(), this.input.value = "", this.updateOpts(), this.input.removeAttribute("aria-activedescendant"), this.input.removeAttribute("data-active-option"), this.currentOption = null, this.selected = [], this.cachedOpts.forEach(function (e) {
|
|
2011
|
+
(0, o.default)(e).remove(t.config.selectedClass), (0, o.default)(e).remove(t.config.activeClass), e.setAttribute("aria-selected", "false");
|
|
2012
|
+
}), this;
|
|
2013
|
+
}
|
|
2014
|
+
}, {
|
|
2015
|
+
key: "goTo",
|
|
2016
|
+
value: function (t, e) {
|
|
2017
|
+
var n = this;
|
|
2018
|
+
if ("string" == typeof t) {
|
|
2019
|
+
var r = this.getOptIndex();
|
|
2020
|
+
return this.goTo("next" === t ? r + 1 : r - 1, e);
|
|
2021
|
+
}
|
|
2022
|
+
var i = this.currentOpts[t],
|
|
2023
|
+
o = !1;
|
|
2024
|
+
if (!this.currentOpts[t]) return 0 === this.getOptIndex() && (this.list.scrollTop = 0), this;
|
|
2025
|
+
if (this.groups.length) {
|
|
2026
|
+
var u = (0, g.default)(this.groups, i);
|
|
2027
|
+
o = u && u !== this.currentGroup, this.currentGroup = u;
|
|
2028
|
+
}
|
|
2029
|
+
return this.currentOption = i, this.pseudoFocus(o), this.currentOpts.forEach(function (t) {
|
|
2030
|
+
t.classList.contains(n.config.activeClass) && !(0, c.default)(n.list, t) && (0, a.default)(t);
|
|
2031
|
+
}), this;
|
|
2032
|
+
}
|
|
2033
|
+
}, {
|
|
2034
|
+
key: "pseudoFocus",
|
|
2035
|
+
value: function (t) {
|
|
2036
|
+
var e = this.currentOption,
|
|
2037
|
+
n = this.config.activeClass,
|
|
2038
|
+
r = this.input.getAttribute("data-active-option"),
|
|
2039
|
+
i = r && document.getElementById(r);
|
|
2040
|
+
return i && n && (0, o.default)(i).remove(n), e && (this.input.setAttribute("data-active-option", e.id), n && (0, o.default)(e).add(n), this.liveRegion && (0, w.default)(e, this.config, this.liveRegion.announce.bind(this.liveRegion), t, this.currentGroup && this.currentGroup.element), this.input.setAttribute("aria-activedescendant", e.id), this.currentOption = e, this.emit("change")), this;
|
|
2041
|
+
}
|
|
2042
|
+
}, {
|
|
2043
|
+
key: "setOptions",
|
|
2044
|
+
value: function (t) {
|
|
2045
|
+
return "object" === (void 0 === t ? "undefined" : r(t)) && this.config.list.append(t), this.cachedOpts.push(t), -1 === this.currentOpts.indexOf(t) && this.currentOpts.push(t), this;
|
|
2046
|
+
}
|
|
2047
|
+
}, {
|
|
2048
|
+
key: "setCurrentOptions",
|
|
2049
|
+
value: function () {
|
|
2050
|
+
return this.currentOption = this.currentOpts[0], this;
|
|
2051
|
+
}
|
|
2052
|
+
}, {
|
|
2053
|
+
key: "updateSelectedOptions",
|
|
2054
|
+
value: function () {
|
|
2055
|
+
var t = this,
|
|
2056
|
+
e = document.getElementById(this.config.list.id),
|
|
2057
|
+
n = this.selected;
|
|
2058
|
+
for (this.emptyDropdownList(); e.hasChildNodes();) e.removeChild(e.firstChild);
|
|
2059
|
+
return n.length > 0 && n.forEach(function (e) {
|
|
2060
|
+
t.setOptions(e);
|
|
2061
|
+
}), this;
|
|
2062
|
+
}
|
|
2063
|
+
}, {
|
|
2064
|
+
key: "emptyDropdownList",
|
|
2065
|
+
value: function () {
|
|
2066
|
+
return this.currentOpts = [], this.cachedOpts = [], this.optionsWithEventHandlers.clear(), this;
|
|
2067
|
+
}
|
|
2068
|
+
}, {
|
|
2069
|
+
key: "setNoResultFound",
|
|
2070
|
+
value: function () {
|
|
2071
|
+
(0, y.default)(this.list, this.currentOpts, this.config.noResultsText);
|
|
2072
|
+
}
|
|
2073
|
+
}]), t;
|
|
2074
|
+
}();
|
|
2075
|
+
}, function (t, e) {
|
|
2076
|
+
t.exports = function (t, e) {
|
|
2077
|
+
if (t.indexOf) return t.indexOf(e);
|
|
2078
|
+
for (var n = 0; n < t.length; ++n) if (t[n] === e) return n;
|
|
2079
|
+
return -1;
|
|
2080
|
+
};
|
|
2081
|
+
}, function (t, e) {
|
|
2082
|
+
(e = t.exports = function (t) {
|
|
2083
|
+
return t.replace(/^\s*|\s*$/g, "");
|
|
2084
|
+
}).left = function (t) {
|
|
2085
|
+
return t.replace(/^\s*/, "");
|
|
2086
|
+
}, e.right = function (t) {
|
|
2087
|
+
return t.replace(/\s*$/, "");
|
|
2088
|
+
};
|
|
2089
|
+
}, function (t, e, n) {
|
|
2090
|
+
function r(t) {
|
|
2091
|
+
if (t) return function (t) {
|
|
2092
|
+
for (var e in r.prototype) t[e] = r.prototype[e];
|
|
2093
|
+
return t;
|
|
2094
|
+
}(t);
|
|
2095
|
+
}
|
|
2096
|
+
t.exports = r, r.prototype.on = r.prototype.addEventListener = function (t, e) {
|
|
2097
|
+
return this._callbacks = this._callbacks || {}, (this._callbacks["$" + t] = this._callbacks["$" + t] || []).push(e), this;
|
|
2098
|
+
}, r.prototype.once = function (t, e) {
|
|
2099
|
+
function n() {
|
|
2100
|
+
this.off(t, n), e.apply(this, arguments);
|
|
2101
|
+
}
|
|
2102
|
+
return n.fn = e, this.on(t, n), this;
|
|
2103
|
+
}, r.prototype.off = r.prototype.removeListener = r.prototype.removeAllListeners = r.prototype.removeEventListener = function (t, e) {
|
|
2104
|
+
if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;
|
|
2105
|
+
var n,
|
|
2106
|
+
r = this._callbacks["$" + t];
|
|
2107
|
+
if (!r) return this;
|
|
2108
|
+
if (1 == arguments.length) return delete this._callbacks["$" + t], this;
|
|
2109
|
+
for (var i = 0; i < r.length; i++) if ((n = r[i]) === e || n.fn === e) {
|
|
2110
|
+
r.splice(i, 1);
|
|
2111
|
+
break;
|
|
2112
|
+
}
|
|
2113
|
+
return this;
|
|
2114
|
+
}, r.prototype.emit = function (t) {
|
|
2115
|
+
this._callbacks = this._callbacks || {};
|
|
2116
|
+
var e = [].slice.call(arguments, 1),
|
|
2117
|
+
n = this._callbacks["$" + t];
|
|
2118
|
+
if (n) for (var r = 0, i = (n = n.slice(0)).length; r < i; ++r) n[r].apply(this, e);
|
|
2119
|
+
return this;
|
|
2120
|
+
}, r.prototype.listeners = function (t) {
|
|
2121
|
+
return this._callbacks = this._callbacks || {}, this._callbacks["$" + t] || [];
|
|
2122
|
+
}, r.prototype.hasListeners = function (t) {
|
|
2123
|
+
return !!this.listeners(t).length;
|
|
2124
|
+
};
|
|
2125
|
+
}, function (t, e, n) {
|
|
2126
|
+
|
|
2127
|
+
function r(t) {
|
|
2128
|
+
this.region = document.createElement("div"), this.options = t || {}, this.configure(), document.body.appendChild(this.region);
|
|
2129
|
+
}
|
|
2130
|
+
r.prototype.configure = function () {
|
|
2131
|
+
var t = this.options,
|
|
2132
|
+
e = this.region;
|
|
2133
|
+
e.setAttribute("aria-live", t.ariaLive || "polite"), e.setAttribute("role", t.role || "log"), e.setAttribute("aria-relevant", t.ariaRelevant || "additions"), e.setAttribute("aria-atomic", t.ariaAtomic || "false"), this.region.style.position = "absolute", this.region.style.width = "1px", this.region.style.height = "1px", this.region.style.marginTop = "-1px", this.region.style.clip = "rect(1px, 1px, 1px, 1px)", this.region.style.overflow = "hidden";
|
|
2134
|
+
}, r.prototype.announce = function (t, e) {
|
|
2135
|
+
var n = document.createElement("div");
|
|
2136
|
+
n.innerHTML = t, this.region.appendChild(n), (e || void 0 === e) && setTimeout(function () {
|
|
2137
|
+
this.region.removeChild(n);
|
|
2138
|
+
}.bind(this), e || 7e3);
|
|
2139
|
+
}, t.exports = r;
|
|
2140
|
+
}, function (t, e, n) {
|
|
2141
|
+
var r;
|
|
2142
|
+
r = function () {
|
|
2143
|
+
return function (t) {
|
|
2144
|
+
function e(r) {
|
|
2145
|
+
if (n[r]) return n[r].exports;
|
|
2146
|
+
var i = n[r] = {
|
|
2147
|
+
i: r,
|
|
2148
|
+
l: !1,
|
|
2149
|
+
exports: {}
|
|
2150
|
+
};
|
|
2151
|
+
return t[r].call(i.exports, i, i.exports, e), i.l = !0, i.exports;
|
|
2152
|
+
}
|
|
2153
|
+
var n = {};
|
|
2154
|
+
return e.m = t, e.c = n, e.i = function (t) {
|
|
2155
|
+
return t;
|
|
2156
|
+
}, e.d = function (t, n, r) {
|
|
2157
|
+
e.o(t, n) || Object.defineProperty(t, n, {
|
|
2158
|
+
configurable: !1,
|
|
2159
|
+
enumerable: !0,
|
|
2160
|
+
get: r
|
|
2161
|
+
});
|
|
2162
|
+
}, e.n = function (t) {
|
|
2163
|
+
var n = t && t.__esModule ? function () {
|
|
2164
|
+
return t.default;
|
|
2165
|
+
} : function () {
|
|
2166
|
+
return t;
|
|
2167
|
+
};
|
|
2168
|
+
return e.d(n, "a", n), n;
|
|
2169
|
+
}, e.o = function (t, e) {
|
|
2170
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
2171
|
+
}, e.p = "", e(e.s = 1);
|
|
2172
|
+
}([function (t, e, n) {
|
|
2173
|
+
|
|
2174
|
+
function r(t) {
|
|
2175
|
+
return t && t.__esModule ? t : {
|
|
2176
|
+
default: t
|
|
2177
|
+
};
|
|
2178
|
+
}
|
|
2179
|
+
function i() {}
|
|
2180
|
+
Object.defineProperty(e, "__esModule", {
|
|
2181
|
+
value: !0
|
|
2182
|
+
});
|
|
2183
|
+
var o = r(n(4)),
|
|
2184
|
+
u = r(n(7)),
|
|
2185
|
+
s = n(2),
|
|
2186
|
+
a = r(n(3)),
|
|
2187
|
+
c = [.19, 1, .22, 1];
|
|
2188
|
+
e.default = function (t) {
|
|
2189
|
+
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 100,
|
|
2190
|
+
n = 0,
|
|
2191
|
+
r = void 0,
|
|
2192
|
+
f = void 0;
|
|
2193
|
+
if ((0, s.isElement)(t)) r = o.default.apply(void 0, c), f = i;else {
|
|
2194
|
+
if (!(0, s.isObject)(t)) throw new TypeError("The first argument must be HTMLElement or Object.");
|
|
2195
|
+
if (!(0, s.isElement)(t.element)) throw new TypeError("`element` must be HTMLElement.");
|
|
2196
|
+
n = (0, s.isNumeric)(t.offset) ? t.offset : 0, r = (0, s.isArray)(t.bezier) && 4 === t.bezier.length ? o.default.apply(void 0, function (t) {
|
|
2197
|
+
if (Array.isArray(t)) {
|
|
2198
|
+
for (var e = 0, n = Array(t.length); e < t.length; e++) n[e] = t[e];
|
|
2199
|
+
return n;
|
|
2200
|
+
}
|
|
2201
|
+
return Array.from(t);
|
|
2202
|
+
}(t.bezier)) : o.default.apply(void 0, c), e = t.duration, f = (0, s.isFunction)(t.then) ? t.then : i, t = t.element;
|
|
2203
|
+
}
|
|
2204
|
+
(!(0, s.isNumeric)(e) || e < 0) && (e = 100);
|
|
2205
|
+
var l = (0, a.default)(t),
|
|
2206
|
+
h = l.scrollTop,
|
|
2207
|
+
p = l.offsetTop,
|
|
2208
|
+
d = null,
|
|
2209
|
+
g = ("BODY" === l.nodeName ? t.getBoundingClientRect().top + (window.scrollY || window.pageYOffset || document.body.scrollTop) - p : t.offsetTop - p) - h + n;
|
|
2210
|
+
(0, u.default)(function t(n) {
|
|
2211
|
+
null === d && (d = n);
|
|
2212
|
+
var i = n - d,
|
|
2213
|
+
o = r(i / e) * g;
|
|
2214
|
+
l.scrollTop = Math.round(h + o), i < e ? (0, u.default)(t) : f();
|
|
2215
|
+
});
|
|
2216
|
+
};
|
|
2217
|
+
}, function (t, e, n) {
|
|
2218
|
+
|
|
2219
|
+
var r = function (t) {
|
|
2220
|
+
return t && t.__esModule ? t : {
|
|
2221
|
+
default: t
|
|
2222
|
+
};
|
|
2223
|
+
}(n(0));
|
|
2224
|
+
t.exports = r.default;
|
|
2225
|
+
}, function (t, e, n) {
|
|
2226
|
+
|
|
2227
|
+
function r(t) {
|
|
2228
|
+
return Object.prototype.toString.call(t);
|
|
2229
|
+
}
|
|
2230
|
+
function i(t) {
|
|
2231
|
+
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
2232
|
+
}
|
|
2233
|
+
Object.defineProperty(e, "__esModule", {
|
|
2234
|
+
value: !0
|
|
2235
|
+
});
|
|
2236
|
+
var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
|
|
2237
|
+
return typeof t;
|
|
2238
|
+
} : function (t) {
|
|
2239
|
+
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2240
|
+
};
|
|
2241
|
+
e.isObject = function (t) {
|
|
2242
|
+
return "[object Object]" === r(t);
|
|
2243
|
+
}, e.isArray = function (t) {
|
|
2244
|
+
return null != t && "[object Array]" === r(t);
|
|
2245
|
+
}, e.isNumeric = i, e.isPositive = function (t) {
|
|
2246
|
+
return i(t) && t >= 0;
|
|
2247
|
+
}, e.isFunction = function (t) {
|
|
2248
|
+
return null != t && "[object Function]" === r(t);
|
|
2249
|
+
}, e.isElement = function (t) {
|
|
2250
|
+
return "object" === o(window.HTMLElement) ? t instanceof window.HTMLElement : !!t && "object" === (void 0 === t ? "undefined" : o(t)) && null !== t && 1 === t.nodeType && "string" == typeof t.nodeName;
|
|
2251
|
+
};
|
|
2252
|
+
}, function (t, e, n) {
|
|
2253
|
+
|
|
2254
|
+
function r(t, e) {
|
|
2255
|
+
return window.getComputedStyle(t, null).getPropertyValue(e);
|
|
2256
|
+
}
|
|
2257
|
+
function i(t) {
|
|
2258
|
+
if (1 === t.nodeType) return o.test(function (t) {
|
|
2259
|
+
return r(t, "overflow") + r(t, "overflow-y");
|
|
2260
|
+
}(t)) && t.scrollHeight > t.clientHeight;
|
|
2261
|
+
}
|
|
2262
|
+
Object.defineProperty(e, "__esModule", {
|
|
2263
|
+
value: !0
|
|
2264
|
+
});
|
|
2265
|
+
var o = /(auto|scroll)/;
|
|
2266
|
+
e.default = function (t) {
|
|
2267
|
+
for (var e = function t(e) {
|
|
2268
|
+
var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
|
|
2269
|
+
r = e.parentNode;
|
|
2270
|
+
return null === r || "HTML" === r.nodeName ? n : t(r, n.concat(r));
|
|
2271
|
+
}(t), n = document.body, r = 0, o = e.length; r < o; r++) if (i(e[r])) {
|
|
2272
|
+
n = e[r];
|
|
2273
|
+
break;
|
|
2274
|
+
}
|
|
2275
|
+
return n;
|
|
2276
|
+
};
|
|
2277
|
+
}, function (t, e) {
|
|
2278
|
+
function n(t, e) {
|
|
2279
|
+
return 1 - 3 * e + 3 * t;
|
|
2280
|
+
}
|
|
2281
|
+
function r(t, e) {
|
|
2282
|
+
return 3 * e - 6 * t;
|
|
2283
|
+
}
|
|
2284
|
+
function i(t) {
|
|
2285
|
+
return 3 * t;
|
|
2286
|
+
}
|
|
2287
|
+
function o(t, e, o) {
|
|
2288
|
+
return ((n(e, o) * t + r(e, o)) * t + i(e)) * t;
|
|
2289
|
+
}
|
|
2290
|
+
function u(t, e, o) {
|
|
2291
|
+
return 3 * n(e, o) * t * t + 2 * r(e, o) * t + i(e);
|
|
2292
|
+
}
|
|
2293
|
+
function s(t, e, n, r, i) {
|
|
2294
|
+
var u,
|
|
2295
|
+
s,
|
|
2296
|
+
a = 0;
|
|
2297
|
+
do {
|
|
2298
|
+
(u = o(s = e + (n - e) / 2, r, i) - t) > 0 ? n = s : e = s;
|
|
2299
|
+
} while (Math.abs(u) > f && ++a < l);
|
|
2300
|
+
return s;
|
|
2301
|
+
}
|
|
2302
|
+
function a(t, e, n, r) {
|
|
2303
|
+
for (var i = 0; i < c; ++i) {
|
|
2304
|
+
var s = u(e, n, r);
|
|
2305
|
+
if (0 === s) return e;
|
|
2306
|
+
e -= (o(e, n, r) - t) / s;
|
|
2307
|
+
}
|
|
2308
|
+
return e;
|
|
2309
|
+
}
|
|
2310
|
+
var c = 4,
|
|
2311
|
+
f = 1e-7,
|
|
2312
|
+
l = 10,
|
|
2313
|
+
h = 11,
|
|
2314
|
+
p = 1 / (h - 1),
|
|
2315
|
+
d = "function" == typeof Float32Array;
|
|
2316
|
+
t.exports = function (t, e, n, r) {
|
|
2317
|
+
function i(e) {
|
|
2318
|
+
for (var r = 0, i = 1, o = h - 1; i !== o && c[i] <= e; ++i) r += p;
|
|
2319
|
+
var f = r + (e - c[--i]) / (c[i + 1] - c[i]) * p,
|
|
2320
|
+
l = u(f, t, n);
|
|
2321
|
+
return l >= .001 ? a(e, f, t, n) : 0 === l ? f : s(e, r, r + p, t, n);
|
|
2322
|
+
}
|
|
2323
|
+
if (!(0 <= t && t <= 1 && 0 <= n && n <= 1)) throw new Error("bezier x values must be in [0, 1] range");
|
|
2324
|
+
var c = d ? new Float32Array(h) : new Array(h);
|
|
2325
|
+
if (t !== e || n !== r) for (var f = 0; f < h; ++f) c[f] = o(f * p, t, n);
|
|
2326
|
+
return function (u) {
|
|
2327
|
+
return t === e && n === r ? u : 0 === u ? 0 : 1 === u ? 1 : o(i(u), e, r);
|
|
2328
|
+
};
|
|
2329
|
+
};
|
|
2330
|
+
}, function (t, e, n) {
|
|
2331
|
+
(function (e) {
|
|
2332
|
+
(function () {
|
|
2333
|
+
var n, r, i, o, u, s;
|
|
2334
|
+
"undefined" != typeof performance && null !== performance && performance.now ? t.exports = function () {
|
|
2335
|
+
return performance.now();
|
|
2336
|
+
} : void 0 !== e && null !== e && e.hrtime ? (t.exports = function () {
|
|
2337
|
+
return (n() - u) / 1e6;
|
|
2338
|
+
}, r = e.hrtime, o = (n = function () {
|
|
2339
|
+
var t;
|
|
2340
|
+
return 1e9 * (t = r())[0] + t[1];
|
|
2341
|
+
})(), s = 1e9 * e.uptime(), u = o - s) : Date.now ? (t.exports = function () {
|
|
2342
|
+
return Date.now() - i;
|
|
2343
|
+
}, i = Date.now()) : (t.exports = function () {
|
|
2344
|
+
return new Date().getTime() - i;
|
|
2345
|
+
}, i = new Date().getTime());
|
|
2346
|
+
}).call(this);
|
|
2347
|
+
}).call(e, n(6));
|
|
2348
|
+
}, function (t, e) {
|
|
2349
|
+
function n() {
|
|
2350
|
+
throw new Error("setTimeout has not been defined");
|
|
2351
|
+
}
|
|
2352
|
+
function r() {
|
|
2353
|
+
throw new Error("clearTimeout has not been defined");
|
|
2354
|
+
}
|
|
2355
|
+
function i(t) {
|
|
2356
|
+
if (c === setTimeout) return setTimeout(t, 0);
|
|
2357
|
+
if ((c === n || !c) && setTimeout) return c = setTimeout, setTimeout(t, 0);
|
|
2358
|
+
try {
|
|
2359
|
+
return c(t, 0);
|
|
2360
|
+
} catch (e) {
|
|
2361
|
+
try {
|
|
2362
|
+
return c.call(null, t, 0);
|
|
2363
|
+
} catch (e) {
|
|
2364
|
+
return c.call(this, t, 0);
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
function o() {
|
|
2369
|
+
d && h && (d = !1, h.length ? p = h.concat(p) : g = -1, p.length && u());
|
|
2370
|
+
}
|
|
2371
|
+
function u() {
|
|
2372
|
+
if (!d) {
|
|
2373
|
+
var t = i(o);
|
|
2374
|
+
d = !0;
|
|
2375
|
+
for (var e = p.length; e;) {
|
|
2376
|
+
for (h = p, p = []; ++g < e;) h && h[g].run();
|
|
2377
|
+
g = -1, e = p.length;
|
|
2378
|
+
}
|
|
2379
|
+
h = null, d = !1, function (t) {
|
|
2380
|
+
if (f === clearTimeout) return clearTimeout(t);
|
|
2381
|
+
if ((f === r || !f) && clearTimeout) return f = clearTimeout, clearTimeout(t);
|
|
2382
|
+
try {
|
|
2383
|
+
f(t);
|
|
2384
|
+
} catch (e) {
|
|
2385
|
+
try {
|
|
2386
|
+
return f.call(null, t);
|
|
2387
|
+
} catch (e) {
|
|
2388
|
+
return f.call(this, t);
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
}(t);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
function s(t, e) {
|
|
2395
|
+
this.fun = t, this.array = e;
|
|
2396
|
+
}
|
|
2397
|
+
function a() {}
|
|
2398
|
+
var c,
|
|
2399
|
+
f,
|
|
2400
|
+
l = t.exports = {};
|
|
2401
|
+
!function () {
|
|
2402
|
+
try {
|
|
2403
|
+
c = "function" == typeof setTimeout ? setTimeout : n;
|
|
2404
|
+
} catch (t) {
|
|
2405
|
+
c = n;
|
|
2406
|
+
}
|
|
2407
|
+
try {
|
|
2408
|
+
f = "function" == typeof clearTimeout ? clearTimeout : r;
|
|
2409
|
+
} catch (t) {
|
|
2410
|
+
f = r;
|
|
2411
|
+
}
|
|
2412
|
+
}();
|
|
2413
|
+
var h,
|
|
2414
|
+
p = [],
|
|
2415
|
+
d = !1,
|
|
2416
|
+
g = -1;
|
|
2417
|
+
l.nextTick = function (t) {
|
|
2418
|
+
var e = new Array(arguments.length - 1);
|
|
2419
|
+
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
2420
|
+
p.push(new s(t, e)), 1 !== p.length || d || i(u);
|
|
2421
|
+
}, s.prototype.run = function () {
|
|
2422
|
+
this.fun.apply(null, this.array);
|
|
2423
|
+
}, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {}, l.on = a, l.addListener = a, l.once = a, l.off = a, l.removeListener = a, l.removeAllListeners = a, l.emit = a, l.binding = function (t) {
|
|
2424
|
+
throw new Error("process.binding is not supported");
|
|
2425
|
+
}, l.cwd = function () {
|
|
2426
|
+
return "/";
|
|
2427
|
+
}, l.chdir = function (t) {
|
|
2428
|
+
throw new Error("process.chdir is not supported");
|
|
2429
|
+
}, l.umask = function () {
|
|
2430
|
+
return 0;
|
|
2431
|
+
};
|
|
2432
|
+
}, function (t, e, n) {
|
|
2433
|
+
(function (e) {
|
|
2434
|
+
for (var r = n(5), i = "undefined" == typeof window ? e : window, o = ["moz", "webkit"], u = "AnimationFrame", s = i["request" + u], a = i["cancel" + u] || i["cancelRequest" + u], c = 0; !s && c < o.length; c++) s = i[o[c] + "Request" + u], a = i[o[c] + "Cancel" + u] || i[o[c] + "CancelRequest" + u];
|
|
2435
|
+
if (!s || !a) {
|
|
2436
|
+
var f = 0,
|
|
2437
|
+
l = 0,
|
|
2438
|
+
h = [];
|
|
2439
|
+
s = function (t) {
|
|
2440
|
+
if (0 === h.length) {
|
|
2441
|
+
var e = r(),
|
|
2442
|
+
n = Math.max(0, 1e3 / 60 - (e - f));
|
|
2443
|
+
f = n + e, setTimeout(function () {
|
|
2444
|
+
var t = h.slice(0);
|
|
2445
|
+
h.length = 0;
|
|
2446
|
+
for (var e = 0; e < t.length; e++) if (!t[e].cancelled) try {
|
|
2447
|
+
t[e].callback(f);
|
|
2448
|
+
} catch (t) {
|
|
2449
|
+
setTimeout(function () {
|
|
2450
|
+
throw t;
|
|
2451
|
+
}, 0);
|
|
2452
|
+
}
|
|
2453
|
+
}, Math.round(n));
|
|
2454
|
+
}
|
|
2455
|
+
return h.push({
|
|
2456
|
+
handle: ++l,
|
|
2457
|
+
callback: t,
|
|
2458
|
+
cancelled: !1
|
|
2459
|
+
}), l;
|
|
2460
|
+
}, a = function (t) {
|
|
2461
|
+
for (var e = 0; e < h.length; e++) h[e].handle === t && (h[e].cancelled = !0);
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
t.exports = function (t) {
|
|
2465
|
+
return s.call(i, t);
|
|
2466
|
+
}, t.exports.cancel = function () {
|
|
2467
|
+
a.apply(i, arguments);
|
|
2468
|
+
}, t.exports.polyfill = function () {
|
|
2469
|
+
i.requestAnimationFrame = s, i.cancelAnimationFrame = a;
|
|
2470
|
+
};
|
|
2471
|
+
}).call(e, n(8));
|
|
2472
|
+
}, function (t, e) {
|
|
2473
|
+
var n;
|
|
2474
|
+
n = function () {
|
|
2475
|
+
return this;
|
|
2476
|
+
}();
|
|
2477
|
+
try {
|
|
2478
|
+
n = n || Function("return this")() || (0, eval)("this");
|
|
2479
|
+
} catch (t) {
|
|
2480
|
+
"object" == typeof window && (n = window);
|
|
2481
|
+
}
|
|
2482
|
+
t.exports = n;
|
|
2483
|
+
}]);
|
|
2484
|
+
}, t.exports = r();
|
|
2485
|
+
}, function (t, e, n) {
|
|
2486
|
+
|
|
2487
|
+
t.exports = function (t, e) {
|
|
2488
|
+
var n = t.clientHeight,
|
|
2489
|
+
r = e.clientHeight,
|
|
2490
|
+
i = t.scrollTop,
|
|
2491
|
+
o = e.offsetTop;
|
|
2492
|
+
return !(i > o) && !(i + n - r < o);
|
|
2493
|
+
};
|
|
2494
|
+
}, function (t, e, n) {
|
|
2495
|
+
|
|
2496
|
+
t.exports = function (t) {
|
|
2497
|
+
var e = window.innerHeight,
|
|
2498
|
+
n = t.getBoundingClientRect(),
|
|
2499
|
+
r = n.top < 0,
|
|
2500
|
+
i = n.bottom > e,
|
|
2501
|
+
o = !r && !i,
|
|
2502
|
+
u = {
|
|
2503
|
+
visible: o
|
|
2504
|
+
};
|
|
2505
|
+
return o || (u.position = r ? "top" : "bottom"), u;
|
|
2506
|
+
};
|
|
2507
|
+
}, function (t, e, n) {
|
|
2508
|
+
|
|
2509
|
+
var r,
|
|
2510
|
+
i = n(11),
|
|
2511
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2512
|
+
default: r
|
|
2513
|
+
};
|
|
2514
|
+
t.exports = {
|
|
2515
|
+
contains: function (t, e) {
|
|
2516
|
+
return e.filter(function (e) {
|
|
2517
|
+
return (0, o.default)(e).toLowerCase().indexOf(t.toLowerCase()) > -1;
|
|
2518
|
+
});
|
|
2519
|
+
},
|
|
2520
|
+
equals: function (t, e) {
|
|
2521
|
+
return e.filter(function (e) {
|
|
2522
|
+
return (0, o.default)(e).toLowerCase() === t.toLowerCase();
|
|
2523
|
+
});
|
|
2524
|
+
},
|
|
2525
|
+
"starts-with": function (t, e) {
|
|
2526
|
+
return e.filter(function (e) {
|
|
2527
|
+
return 0 === (0, o.default)(e).toLowerCase().indexOf(t.toLowerCase());
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
};
|
|
2531
|
+
}, function (t, e, n) {
|
|
2532
|
+
|
|
2533
|
+
t.exports = function (t) {
|
|
2534
|
+
return t.getAttribute("data-value") || t.innerText;
|
|
2535
|
+
};
|
|
2536
|
+
}, function (t, e, n) {
|
|
2537
|
+
|
|
2538
|
+
var r,
|
|
2539
|
+
i = n(13),
|
|
2540
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2541
|
+
default: r
|
|
2542
|
+
};
|
|
2543
|
+
e.attach = function (t, e, n) {
|
|
2544
|
+
if ("function" == typeof n) return e.addEventListener(t, n);
|
|
2545
|
+
n && n.length && e.addEventListener(t, function (t) {
|
|
2546
|
+
var e = o.default[t.which];
|
|
2547
|
+
n.forEach(function (n) {
|
|
2548
|
+
n.keys.indexOf(e) > -1 && (n.preventDefault && t.preventDefault(), n.callback(t, e));
|
|
2549
|
+
});
|
|
2550
|
+
});
|
|
2551
|
+
}, e.up = function (t, n) {
|
|
2552
|
+
return e.attach("keyup", t, n);
|
|
2553
|
+
}, e.down = function (t, n) {
|
|
2554
|
+
return e.attach("keydown", t, n);
|
|
2555
|
+
}, e.press = function (t, n) {
|
|
2556
|
+
return e.attach("keypress", t, n);
|
|
2557
|
+
};
|
|
2558
|
+
}, function (t, e, n) {
|
|
2559
|
+
|
|
2560
|
+
t.exports = {
|
|
2561
|
+
8: "backspace",
|
|
2562
|
+
9: "tab",
|
|
2563
|
+
13: "enter",
|
|
2564
|
+
27: "escape",
|
|
2565
|
+
32: "space",
|
|
2566
|
+
37: "left",
|
|
2567
|
+
38: "up",
|
|
2568
|
+
39: "right",
|
|
2569
|
+
40: "down"
|
|
2570
|
+
};
|
|
2571
|
+
}, function (t, e, n) {
|
|
2572
|
+
|
|
2573
|
+
t.exports = function (t, e, n) {
|
|
2574
|
+
if (e = e.length ? e : [e], n && e.indexOf(t) > -1) return !0;
|
|
2575
|
+
for (var r = t.parentNode; r && "HTML" !== r.tagName;) {
|
|
2576
|
+
if (e.indexOf(r) > -1) return !0;
|
|
2577
|
+
r = r.parentNode;
|
|
2578
|
+
}
|
|
2579
|
+
return !1;
|
|
2580
|
+
};
|
|
2581
|
+
}, function (t, e, n) {
|
|
2582
|
+
|
|
2583
|
+
var r,
|
|
2584
|
+
i = n(16),
|
|
2585
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2586
|
+
default: r
|
|
2587
|
+
};
|
|
2588
|
+
t.exports = function (t, e, n) {
|
|
2589
|
+
return n = n || document, "string" == typeof t ? e ? o.default.all(t, n) : (0, o.default)(t, n) : t;
|
|
2590
|
+
};
|
|
2591
|
+
}, function (t, e, n) {
|
|
2592
|
+
|
|
2593
|
+
(t.exports = function (t, e) {
|
|
2594
|
+
return (e = e || document).querySelector(t);
|
|
2595
|
+
}).all = function (t, e) {
|
|
2596
|
+
return e = e || document, Array.prototype.slice.call(e.querySelectorAll(t));
|
|
2597
|
+
};
|
|
2598
|
+
}, function (t, e, n) {
|
|
2599
|
+
|
|
2600
|
+
t.exports = function (t, e) {
|
|
2601
|
+
var n = t.filter(function (t) {
|
|
2602
|
+
return t.options.indexOf(e) > -1;
|
|
2603
|
+
});
|
|
2604
|
+
return n.length && n[0];
|
|
2605
|
+
};
|
|
2606
|
+
}, function (t, e, n) {
|
|
2607
|
+
|
|
2608
|
+
var r,
|
|
2609
|
+
i = n(1),
|
|
2610
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2611
|
+
default: r
|
|
2612
|
+
};
|
|
2613
|
+
t.exports = function (t, e, n) {
|
|
2614
|
+
var r = t.querySelector(".combobo-no-results");
|
|
2615
|
+
!n || e.length || r ? r && e.length && t.removeChild(r) : (r = document.createElement("div"), (0, o.default)(r).add("combobo-no-results"), r.innerHTML = n, t.appendChild(r));
|
|
2616
|
+
};
|
|
2617
|
+
}, function (t, e, n) {
|
|
2618
|
+
|
|
2619
|
+
var r,
|
|
2620
|
+
i = n(20),
|
|
2621
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2622
|
+
default: r
|
|
2623
|
+
};
|
|
2624
|
+
t.exports = function (t, e, n) {
|
|
2625
|
+
e.id = e.id || (0, o.default)(), t.setAttribute("role", "combobox"), e.setAttribute("role", "listbox"), t.setAttribute("aria-controls", e.id), t.setAttribute("aria-autocomplete", "list"), t.setAttribute("aria-expanded", "false"), n.forEach(function (t) {
|
|
2626
|
+
t.setAttribute("role", "option"), t.id = t.id || (0, o.default)();
|
|
2627
|
+
});
|
|
2628
|
+
};
|
|
2629
|
+
}, function (t, e, n) {
|
|
2630
|
+
|
|
2631
|
+
var r,
|
|
2632
|
+
i = n(21),
|
|
2633
|
+
o = (r = i) && r.__esModule ? r : {
|
|
2634
|
+
default: r
|
|
2635
|
+
};
|
|
2636
|
+
t.exports = function t(e) {
|
|
2637
|
+
e = e || 8;
|
|
2638
|
+
var n = (0, o.default)(e);
|
|
2639
|
+
if (document.getElementById(n)) return t(e);
|
|
2640
|
+
return n;
|
|
2641
|
+
};
|
|
2642
|
+
}, function (t, e, n) {
|
|
2643
|
+
(function (r) {
|
|
2644
|
+
var i = n(26);
|
|
2645
|
+
function o(t) {
|
|
2646
|
+
i("string" == typeof t, "the list of characters must be a string!");
|
|
2647
|
+
var e = r.byteLength(t);
|
|
2648
|
+
return function (n) {
|
|
2649
|
+
i("number" == typeof (n = n || 10) && n >= 0, "the length of the random string must be a number!");
|
|
2650
|
+
for (var r = "", o = 0; o < n; o++) r += t[Math.floor(e * Math.random())];
|
|
2651
|
+
return r;
|
|
2652
|
+
};
|
|
2653
|
+
}
|
|
2654
|
+
(e = t.exports = o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")).base62 = e, e.base36 = o("abcdefghijklmnopqrstuvwxyz0123456789"), e.base10 = o("0123456789"), e.create = o;
|
|
2655
|
+
}).call(e, n(22).Buffer);
|
|
2656
|
+
}, function (t, e, n) {
|
|
2657
|
+
|
|
2658
|
+
(function (t) {
|
|
2659
|
+
var r = n(23),
|
|
2660
|
+
i = n(24),
|
|
2661
|
+
o = n(25);
|
|
2662
|
+
function u() {
|
|
2663
|
+
return a.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
|
|
2664
|
+
}
|
|
2665
|
+
function s(t, e) {
|
|
2666
|
+
if (u() < e) throw new RangeError("Invalid typed array length");
|
|
2667
|
+
return a.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e)).__proto__ = a.prototype : (null === t && (t = new a(e)), t.length = e), t;
|
|
2668
|
+
}
|
|
2669
|
+
function a(t, e, n) {
|
|
2670
|
+
if (!(a.TYPED_ARRAY_SUPPORT || this instanceof a)) return new a(t, e, n);
|
|
2671
|
+
if ("number" == typeof t) {
|
|
2672
|
+
if ("string" == typeof e) throw new Error("If encoding is specified then the first argument must be a string");
|
|
2673
|
+
return l(this, t);
|
|
2674
|
+
}
|
|
2675
|
+
return c(this, t, e, n);
|
|
2676
|
+
}
|
|
2677
|
+
function c(t, e, n, r) {
|
|
2678
|
+
if ("number" == typeof e) throw new TypeError('"value" argument must not be a number');
|
|
2679
|
+
return "undefined" != typeof ArrayBuffer && e instanceof ArrayBuffer ? function (t, e, n, r) {
|
|
2680
|
+
if (e.byteLength, n < 0 || e.byteLength < n) throw new RangeError("'offset' is out of bounds");
|
|
2681
|
+
if (e.byteLength < n + (r || 0)) throw new RangeError("'length' is out of bounds");
|
|
2682
|
+
e = void 0 === n && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, n) : new Uint8Array(e, n, r);
|
|
2683
|
+
a.TYPED_ARRAY_SUPPORT ? (t = e).__proto__ = a.prototype : t = h(t, e);
|
|
2684
|
+
return t;
|
|
2685
|
+
}(t, e, n, r) : "string" == typeof e ? function (t, e, n) {
|
|
2686
|
+
"string" == typeof n && "" !== n || (n = "utf8");
|
|
2687
|
+
if (!a.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');
|
|
2688
|
+
var r = 0 | d(e, n),
|
|
2689
|
+
i = (t = s(t, r)).write(e, n);
|
|
2690
|
+
i !== r && (t = t.slice(0, i));
|
|
2691
|
+
return t;
|
|
2692
|
+
}(t, e, n) : function (t, e) {
|
|
2693
|
+
if (a.isBuffer(e)) {
|
|
2694
|
+
var n = 0 | p(e.length);
|
|
2695
|
+
return 0 === (t = s(t, n)).length ? t : (e.copy(t, 0, 0, n), t);
|
|
2696
|
+
}
|
|
2697
|
+
if (e) {
|
|
2698
|
+
if ("undefined" != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer || "length" in e) return "number" != typeof e.length || (r = e.length) != r ? s(t, 0) : h(t, e);
|
|
2699
|
+
if ("Buffer" === e.type && o(e.data)) return h(t, e.data);
|
|
2700
|
+
}
|
|
2701
|
+
var r;
|
|
2702
|
+
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
|
|
2703
|
+
}(t, e);
|
|
2704
|
+
}
|
|
2705
|
+
function f(t) {
|
|
2706
|
+
if ("number" != typeof t) throw new TypeError('"size" argument must be a number');
|
|
2707
|
+
if (t < 0) throw new RangeError('"size" argument must not be negative');
|
|
2708
|
+
}
|
|
2709
|
+
function l(t, e) {
|
|
2710
|
+
if (f(e), t = s(t, e < 0 ? 0 : 0 | p(e)), !a.TYPED_ARRAY_SUPPORT) for (var n = 0; n < e; ++n) t[n] = 0;
|
|
2711
|
+
return t;
|
|
2712
|
+
}
|
|
2713
|
+
function h(t, e) {
|
|
2714
|
+
var n = e.length < 0 ? 0 : 0 | p(e.length);
|
|
2715
|
+
t = s(t, n);
|
|
2716
|
+
for (var r = 0; r < n; r += 1) t[r] = 255 & e[r];
|
|
2717
|
+
return t;
|
|
2718
|
+
}
|
|
2719
|
+
function p(t) {
|
|
2720
|
+
if (t >= u()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u().toString(16) + " bytes");
|
|
2721
|
+
return 0 | t;
|
|
2722
|
+
}
|
|
2723
|
+
function d(t, e) {
|
|
2724
|
+
if (a.isBuffer(t)) return t.length;
|
|
2725
|
+
if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer)) return t.byteLength;
|
|
2726
|
+
"string" != typeof t && (t = "" + t);
|
|
2727
|
+
var n = t.length;
|
|
2728
|
+
if (0 === n) return 0;
|
|
2729
|
+
for (var r = !1;;) switch (e) {
|
|
2730
|
+
case "ascii":
|
|
2731
|
+
case "latin1":
|
|
2732
|
+
case "binary":
|
|
2733
|
+
return n;
|
|
2734
|
+
case "utf8":
|
|
2735
|
+
case "utf-8":
|
|
2736
|
+
case void 0:
|
|
2737
|
+
return N(t).length;
|
|
2738
|
+
case "ucs2":
|
|
2739
|
+
case "ucs-2":
|
|
2740
|
+
case "utf16le":
|
|
2741
|
+
case "utf-16le":
|
|
2742
|
+
return 2 * n;
|
|
2743
|
+
case "hex":
|
|
2744
|
+
return n >>> 1;
|
|
2745
|
+
case "base64":
|
|
2746
|
+
return F(t).length;
|
|
2747
|
+
default:
|
|
2748
|
+
if (r) return N(t).length;
|
|
2749
|
+
e = ("" + e).toLowerCase(), r = !0;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
function g(t, e, n) {
|
|
2753
|
+
var r = t[e];
|
|
2754
|
+
t[e] = t[n], t[n] = r;
|
|
2755
|
+
}
|
|
2756
|
+
function y(t, e, n, r, i) {
|
|
2757
|
+
if (0 === t.length) return -1;
|
|
2758
|
+
if ("string" == typeof n ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = i ? 0 : t.length - 1), n < 0 && (n = t.length + n), n >= t.length) {
|
|
2759
|
+
if (i) return -1;
|
|
2760
|
+
n = t.length - 1;
|
|
2761
|
+
} else if (n < 0) {
|
|
2762
|
+
if (!i) return -1;
|
|
2763
|
+
n = 0;
|
|
2764
|
+
}
|
|
2765
|
+
if ("string" == typeof e && (e = a.from(e, r)), a.isBuffer(e)) return 0 === e.length ? -1 : v(t, e, n, r, i);
|
|
2766
|
+
if ("number" == typeof e) return e &= 255, a.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, n) : Uint8Array.prototype.lastIndexOf.call(t, e, n) : v(t, [e], n, r, i);
|
|
2767
|
+
throw new TypeError("val must be string, number or Buffer");
|
|
2768
|
+
}
|
|
2769
|
+
function v(t, e, n, r, i) {
|
|
2770
|
+
var o,
|
|
2771
|
+
u = 1,
|
|
2772
|
+
s = t.length,
|
|
2773
|
+
a = e.length;
|
|
2774
|
+
if (void 0 !== r && ("ucs2" === (r = String(r).toLowerCase()) || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) {
|
|
2775
|
+
if (t.length < 2 || e.length < 2) return -1;
|
|
2776
|
+
u = 2, s /= 2, a /= 2, n /= 2;
|
|
2777
|
+
}
|
|
2778
|
+
function c(t, e) {
|
|
2779
|
+
return 1 === u ? t[e] : t.readUInt16BE(e * u);
|
|
2780
|
+
}
|
|
2781
|
+
if (i) {
|
|
2782
|
+
var f = -1;
|
|
2783
|
+
for (o = n; o < s; o++) if (c(t, o) === c(e, -1 === f ? 0 : o - f)) {
|
|
2784
|
+
if (-1 === f && (f = o), o - f + 1 === a) return f * u;
|
|
2785
|
+
} else -1 !== f && (o -= o - f), f = -1;
|
|
2786
|
+
} else for (n + a > s && (n = s - a), o = n; o >= 0; o--) {
|
|
2787
|
+
for (var l = !0, h = 0; h < a; h++) if (c(t, o + h) !== c(e, h)) {
|
|
2788
|
+
l = !1;
|
|
2789
|
+
break;
|
|
2790
|
+
}
|
|
2791
|
+
if (l) return o;
|
|
2792
|
+
}
|
|
2793
|
+
return -1;
|
|
2794
|
+
}
|
|
2795
|
+
function m(t, e, n, r) {
|
|
2796
|
+
n = Number(n) || 0;
|
|
2797
|
+
var i = t.length - n;
|
|
2798
|
+
r ? (r = Number(r)) > i && (r = i) : r = i;
|
|
2799
|
+
var o = e.length;
|
|
2800
|
+
if (o % 2 != 0) throw new TypeError("Invalid hex string");
|
|
2801
|
+
r > o / 2 && (r = o / 2);
|
|
2802
|
+
for (var u = 0; u < r; ++u) {
|
|
2803
|
+
var s = parseInt(e.substr(2 * u, 2), 16);
|
|
2804
|
+
if (isNaN(s)) return u;
|
|
2805
|
+
t[n + u] = s;
|
|
2806
|
+
}
|
|
2807
|
+
return u;
|
|
2808
|
+
}
|
|
2809
|
+
function b(t, e, n, r) {
|
|
2810
|
+
return z(N(e, t.length - n), t, n, r);
|
|
2811
|
+
}
|
|
2812
|
+
function w(t, e, n, r) {
|
|
2813
|
+
return z(function (t) {
|
|
2814
|
+
for (var e = [], n = 0; n < t.length; ++n) e.push(255 & t.charCodeAt(n));
|
|
2815
|
+
return e;
|
|
2816
|
+
}(e), t, n, r);
|
|
2817
|
+
}
|
|
2818
|
+
function E(t, e, n, r) {
|
|
2819
|
+
return w(t, e, n, r);
|
|
2820
|
+
}
|
|
2821
|
+
function O(t, e, n, r) {
|
|
2822
|
+
return z(F(e), t, n, r);
|
|
2823
|
+
}
|
|
2824
|
+
function A(t, e, n, r) {
|
|
2825
|
+
return z(function (t, e) {
|
|
2826
|
+
for (var n, r, i, o = [], u = 0; u < t.length && !((e -= 2) < 0); ++u) n = t.charCodeAt(u), r = n >> 8, i = n % 256, o.push(i), o.push(r);
|
|
2827
|
+
return o;
|
|
2828
|
+
}(e, t.length - n), t, n, r);
|
|
2829
|
+
}
|
|
2830
|
+
function x(t, e, n) {
|
|
2831
|
+
return 0 === e && n === t.length ? r.fromByteArray(t) : r.fromByteArray(t.slice(e, n));
|
|
2832
|
+
}
|
|
2833
|
+
function T(t, e, n) {
|
|
2834
|
+
n = Math.min(t.length, n);
|
|
2835
|
+
for (var r = [], i = e; i < n;) {
|
|
2836
|
+
var o,
|
|
2837
|
+
u,
|
|
2838
|
+
s,
|
|
2839
|
+
a,
|
|
2840
|
+
c = t[i],
|
|
2841
|
+
f = null,
|
|
2842
|
+
l = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1;
|
|
2843
|
+
if (i + l <= n) switch (l) {
|
|
2844
|
+
case 1:
|
|
2845
|
+
c < 128 && (f = c);
|
|
2846
|
+
break;
|
|
2847
|
+
case 2:
|
|
2848
|
+
128 == (192 & (o = t[i + 1])) && (a = (31 & c) << 6 | 63 & o) > 127 && (f = a);
|
|
2849
|
+
break;
|
|
2850
|
+
case 3:
|
|
2851
|
+
o = t[i + 1], u = t[i + 2], 128 == (192 & o) && 128 == (192 & u) && (a = (15 & c) << 12 | (63 & o) << 6 | 63 & u) > 2047 && (a < 55296 || a > 57343) && (f = a);
|
|
2852
|
+
break;
|
|
2853
|
+
case 4:
|
|
2854
|
+
o = t[i + 1], u = t[i + 2], s = t[i + 3], 128 == (192 & o) && 128 == (192 & u) && 128 == (192 & s) && (a = (15 & c) << 18 | (63 & o) << 12 | (63 & u) << 6 | 63 & s) > 65535 && a < 1114112 && (f = a);
|
|
2855
|
+
}
|
|
2856
|
+
null === f ? (f = 65533, l = 1) : f > 65535 && (f -= 65536, r.push(f >>> 10 & 1023 | 55296), f = 56320 | 1023 & f), r.push(f), i += l;
|
|
2857
|
+
}
|
|
2858
|
+
return function (t) {
|
|
2859
|
+
var e = t.length;
|
|
2860
|
+
if (e <= _) return String.fromCharCode.apply(String, t);
|
|
2861
|
+
var n = "",
|
|
2862
|
+
r = 0;
|
|
2863
|
+
for (; r < e;) n += String.fromCharCode.apply(String, t.slice(r, r += _));
|
|
2864
|
+
return n;
|
|
2865
|
+
}(r);
|
|
2866
|
+
}
|
|
2867
|
+
e.Buffer = a, e.SlowBuffer = function (t) {
|
|
2868
|
+
+t != t && (t = 0);
|
|
2869
|
+
return a.alloc(+t);
|
|
2870
|
+
}, e.INSPECT_MAX_BYTES = 50, a.TYPED_ARRAY_SUPPORT = void 0 !== t.TYPED_ARRAY_SUPPORT ? t.TYPED_ARRAY_SUPPORT : function () {
|
|
2871
|
+
try {
|
|
2872
|
+
var t = new Uint8Array(1);
|
|
2873
|
+
return t.__proto__ = {
|
|
2874
|
+
__proto__: Uint8Array.prototype,
|
|
2875
|
+
foo: function () {
|
|
2876
|
+
return 42;
|
|
2877
|
+
}
|
|
2878
|
+
}, 42 === t.foo() && "function" == typeof t.subarray && 0 === t.subarray(1, 1).byteLength;
|
|
2879
|
+
} catch (t) {
|
|
2880
|
+
return !1;
|
|
2881
|
+
}
|
|
2882
|
+
}(), e.kMaxLength = u(), a.poolSize = 8192, a._augment = function (t) {
|
|
2883
|
+
return t.__proto__ = a.prototype, t;
|
|
2884
|
+
}, a.from = function (t, e, n) {
|
|
2885
|
+
return c(null, t, e, n);
|
|
2886
|
+
}, a.TYPED_ARRAY_SUPPORT && (a.prototype.__proto__ = Uint8Array.prototype, a.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && a[Symbol.species] === a && Object.defineProperty(a, Symbol.species, {
|
|
2887
|
+
value: null,
|
|
2888
|
+
configurable: !0
|
|
2889
|
+
})), a.alloc = function (t, e, n) {
|
|
2890
|
+
return function (t, e, n, r) {
|
|
2891
|
+
return f(e), e <= 0 ? s(t, e) : void 0 !== n ? "string" == typeof r ? s(t, e).fill(n, r) : s(t, e).fill(n) : s(t, e);
|
|
2892
|
+
}(null, t, e, n);
|
|
2893
|
+
}, a.allocUnsafe = function (t) {
|
|
2894
|
+
return l(null, t);
|
|
2895
|
+
}, a.allocUnsafeSlow = function (t) {
|
|
2896
|
+
return l(null, t);
|
|
2897
|
+
}, a.isBuffer = function (t) {
|
|
2898
|
+
return !(null == t || !t._isBuffer);
|
|
2899
|
+
}, a.compare = function (t, e) {
|
|
2900
|
+
if (!a.isBuffer(t) || !a.isBuffer(e)) throw new TypeError("Arguments must be Buffers");
|
|
2901
|
+
if (t === e) return 0;
|
|
2902
|
+
for (var n = t.length, r = e.length, i = 0, o = Math.min(n, r); i < o; ++i) if (t[i] !== e[i]) {
|
|
2903
|
+
n = t[i], r = e[i];
|
|
2904
|
+
break;
|
|
2905
|
+
}
|
|
2906
|
+
return n < r ? -1 : r < n ? 1 : 0;
|
|
2907
|
+
}, a.isEncoding = function (t) {
|
|
2908
|
+
switch (String(t).toLowerCase()) {
|
|
2909
|
+
case "hex":
|
|
2910
|
+
case "utf8":
|
|
2911
|
+
case "utf-8":
|
|
2912
|
+
case "ascii":
|
|
2913
|
+
case "latin1":
|
|
2914
|
+
case "binary":
|
|
2915
|
+
case "base64":
|
|
2916
|
+
case "ucs2":
|
|
2917
|
+
case "ucs-2":
|
|
2918
|
+
case "utf16le":
|
|
2919
|
+
case "utf-16le":
|
|
2920
|
+
return !0;
|
|
2921
|
+
default:
|
|
2922
|
+
return !1;
|
|
2923
|
+
}
|
|
2924
|
+
}, a.concat = function (t, e) {
|
|
2925
|
+
if (!o(t)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
2926
|
+
if (0 === t.length) return a.alloc(0);
|
|
2927
|
+
var n;
|
|
2928
|
+
if (void 0 === e) for (e = 0, n = 0; n < t.length; ++n) e += t[n].length;
|
|
2929
|
+
var r = a.allocUnsafe(e),
|
|
2930
|
+
i = 0;
|
|
2931
|
+
for (n = 0; n < t.length; ++n) {
|
|
2932
|
+
var u = t[n];
|
|
2933
|
+
if (!a.isBuffer(u)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
2934
|
+
u.copy(r, i), i += u.length;
|
|
2935
|
+
}
|
|
2936
|
+
return r;
|
|
2937
|
+
}, a.byteLength = d, a.prototype._isBuffer = !0, a.prototype.swap16 = function () {
|
|
2938
|
+
var t = this.length;
|
|
2939
|
+
if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
2940
|
+
for (var e = 0; e < t; e += 2) g(this, e, e + 1);
|
|
2941
|
+
return this;
|
|
2942
|
+
}, a.prototype.swap32 = function () {
|
|
2943
|
+
var t = this.length;
|
|
2944
|
+
if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
2945
|
+
for (var e = 0; e < t; e += 4) g(this, e, e + 3), g(this, e + 1, e + 2);
|
|
2946
|
+
return this;
|
|
2947
|
+
}, a.prototype.swap64 = function () {
|
|
2948
|
+
var t = this.length;
|
|
2949
|
+
if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
2950
|
+
for (var e = 0; e < t; e += 8) g(this, e, e + 7), g(this, e + 1, e + 6), g(this, e + 2, e + 5), g(this, e + 3, e + 4);
|
|
2951
|
+
return this;
|
|
2952
|
+
}, a.prototype.toString = function () {
|
|
2953
|
+
var t = 0 | this.length;
|
|
2954
|
+
return 0 === t ? "" : 0 === arguments.length ? T(this, 0, t) : function (t, e, n) {
|
|
2955
|
+
var r = !1;
|
|
2956
|
+
if ((void 0 === e || e < 0) && (e = 0), e > this.length) return "";
|
|
2957
|
+
if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) return "";
|
|
2958
|
+
if ((n >>>= 0) <= (e >>>= 0)) return "";
|
|
2959
|
+
for (t || (t = "utf8");;) switch (t) {
|
|
2960
|
+
case "hex":
|
|
2961
|
+
return k(this, e, n);
|
|
2962
|
+
case "utf8":
|
|
2963
|
+
case "utf-8":
|
|
2964
|
+
return T(this, e, n);
|
|
2965
|
+
case "ascii":
|
|
2966
|
+
return S(this, e, n);
|
|
2967
|
+
case "latin1":
|
|
2968
|
+
case "binary":
|
|
2969
|
+
return R(this, e, n);
|
|
2970
|
+
case "base64":
|
|
2971
|
+
return x(this, e, n);
|
|
2972
|
+
case "ucs2":
|
|
2973
|
+
case "ucs-2":
|
|
2974
|
+
case "utf16le":
|
|
2975
|
+
case "utf-16le":
|
|
2976
|
+
return P(this, e, n);
|
|
2977
|
+
default:
|
|
2978
|
+
if (r) throw new TypeError("Unknown encoding: " + t);
|
|
2979
|
+
t = (t + "").toLowerCase(), r = !0;
|
|
2980
|
+
}
|
|
2981
|
+
}.apply(this, arguments);
|
|
2982
|
+
}, a.prototype.equals = function (t) {
|
|
2983
|
+
if (!a.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
|
|
2984
|
+
return this === t || 0 === a.compare(this, t);
|
|
2985
|
+
}, a.prototype.inspect = function () {
|
|
2986
|
+
var t = "",
|
|
2987
|
+
n = e.INSPECT_MAX_BYTES;
|
|
2988
|
+
return this.length > 0 && (t = this.toString("hex", 0, n).match(/.{2}/g).join(" "), this.length > n && (t += " ... ")), "<Buffer " + t + ">";
|
|
2989
|
+
}, a.prototype.compare = function (t, e, n, r, i) {
|
|
2990
|
+
if (!a.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
|
|
2991
|
+
if (void 0 === e && (e = 0), void 0 === n && (n = t ? t.length : 0), void 0 === r && (r = 0), void 0 === i && (i = this.length), e < 0 || n > t.length || r < 0 || i > this.length) throw new RangeError("out of range index");
|
|
2992
|
+
if (r >= i && e >= n) return 0;
|
|
2993
|
+
if (r >= i) return -1;
|
|
2994
|
+
if (e >= n) return 1;
|
|
2995
|
+
if (e >>>= 0, n >>>= 0, r >>>= 0, i >>>= 0, this === t) return 0;
|
|
2996
|
+
for (var o = i - r, u = n - e, s = Math.min(o, u), c = this.slice(r, i), f = t.slice(e, n), l = 0; l < s; ++l) if (c[l] !== f[l]) {
|
|
2997
|
+
o = c[l], u = f[l];
|
|
2998
|
+
break;
|
|
2999
|
+
}
|
|
3000
|
+
return o < u ? -1 : u < o ? 1 : 0;
|
|
3001
|
+
}, a.prototype.includes = function (t, e, n) {
|
|
3002
|
+
return -1 !== this.indexOf(t, e, n);
|
|
3003
|
+
}, a.prototype.indexOf = function (t, e, n) {
|
|
3004
|
+
return y(this, t, e, n, !0);
|
|
3005
|
+
}, a.prototype.lastIndexOf = function (t, e, n) {
|
|
3006
|
+
return y(this, t, e, n, !1);
|
|
3007
|
+
}, a.prototype.write = function (t, e, n, r) {
|
|
3008
|
+
if (void 0 === e) r = "utf8", n = this.length, e = 0;else if (void 0 === n && "string" == typeof e) r = e, n = this.length, e = 0;else {
|
|
3009
|
+
if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
3010
|
+
e |= 0, isFinite(n) ? (n |= 0, void 0 === r && (r = "utf8")) : (r = n, n = void 0);
|
|
3011
|
+
}
|
|
3012
|
+
var i = this.length - e;
|
|
3013
|
+
if ((void 0 === n || n > i) && (n = i), t.length > 0 && (n < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
|
|
3014
|
+
r || (r = "utf8");
|
|
3015
|
+
for (var o = !1;;) switch (r) {
|
|
3016
|
+
case "hex":
|
|
3017
|
+
return m(this, t, e, n);
|
|
3018
|
+
case "utf8":
|
|
3019
|
+
case "utf-8":
|
|
3020
|
+
return b(this, t, e, n);
|
|
3021
|
+
case "ascii":
|
|
3022
|
+
return w(this, t, e, n);
|
|
3023
|
+
case "latin1":
|
|
3024
|
+
case "binary":
|
|
3025
|
+
return E(this, t, e, n);
|
|
3026
|
+
case "base64":
|
|
3027
|
+
return O(this, t, e, n);
|
|
3028
|
+
case "ucs2":
|
|
3029
|
+
case "ucs-2":
|
|
3030
|
+
case "utf16le":
|
|
3031
|
+
case "utf-16le":
|
|
3032
|
+
return A(this, t, e, n);
|
|
3033
|
+
default:
|
|
3034
|
+
if (o) throw new TypeError("Unknown encoding: " + r);
|
|
3035
|
+
r = ("" + r).toLowerCase(), o = !0;
|
|
3036
|
+
}
|
|
3037
|
+
}, a.prototype.toJSON = function () {
|
|
3038
|
+
return {
|
|
3039
|
+
type: "Buffer",
|
|
3040
|
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
3043
|
+
var _ = 4096;
|
|
3044
|
+
function S(t, e, n) {
|
|
3045
|
+
var r = "";
|
|
3046
|
+
n = Math.min(t.length, n);
|
|
3047
|
+
for (var i = e; i < n; ++i) r += String.fromCharCode(127 & t[i]);
|
|
3048
|
+
return r;
|
|
3049
|
+
}
|
|
3050
|
+
function R(t, e, n) {
|
|
3051
|
+
var r = "";
|
|
3052
|
+
n = Math.min(t.length, n);
|
|
3053
|
+
for (var i = e; i < n; ++i) r += String.fromCharCode(t[i]);
|
|
3054
|
+
return r;
|
|
3055
|
+
}
|
|
3056
|
+
function k(t, e, n) {
|
|
3057
|
+
var r = t.length;
|
|
3058
|
+
(!e || e < 0) && (e = 0), (!n || n < 0 || n > r) && (n = r);
|
|
3059
|
+
for (var i = "", o = e; o < n; ++o) i += Y(t[o]);
|
|
3060
|
+
return i;
|
|
3061
|
+
}
|
|
3062
|
+
function P(t, e, n) {
|
|
3063
|
+
for (var r = t.slice(e, n), i = "", o = 0; o < r.length; o += 2) i += String.fromCharCode(r[o] + 256 * r[o + 1]);
|
|
3064
|
+
return i;
|
|
3065
|
+
}
|
|
3066
|
+
function L(t, e, n) {
|
|
3067
|
+
if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint");
|
|
3068
|
+
if (t + e > n) throw new RangeError("Trying to access beyond buffer length");
|
|
3069
|
+
}
|
|
3070
|
+
function B(t, e, n, r, i, o) {
|
|
3071
|
+
if (!a.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
3072
|
+
if (e > i || e < o) throw new RangeError('"value" argument is out of bounds');
|
|
3073
|
+
if (n + r > t.length) throw new RangeError("Index out of range");
|
|
3074
|
+
}
|
|
3075
|
+
function C(t, e, n, r) {
|
|
3076
|
+
e < 0 && (e = 65535 + e + 1);
|
|
3077
|
+
for (var i = 0, o = Math.min(t.length - n, 2); i < o; ++i) t[n + i] = (e & 255 << 8 * (r ? i : 1 - i)) >>> 8 * (r ? i : 1 - i);
|
|
3078
|
+
}
|
|
3079
|
+
function j(t, e, n, r) {
|
|
3080
|
+
e < 0 && (e = 4294967295 + e + 1);
|
|
3081
|
+
for (var i = 0, o = Math.min(t.length - n, 4); i < o; ++i) t[n + i] = e >>> 8 * (r ? i : 3 - i) & 255;
|
|
3082
|
+
}
|
|
3083
|
+
function M(t, e, n, r, i, o) {
|
|
3084
|
+
if (n + r > t.length) throw new RangeError("Index out of range");
|
|
3085
|
+
if (n < 0) throw new RangeError("Index out of range");
|
|
3086
|
+
}
|
|
3087
|
+
function U(t, e, n, r, o) {
|
|
3088
|
+
return o || M(t, 0, n, 4), i.write(t, e, n, r, 23, 4), n + 4;
|
|
3089
|
+
}
|
|
3090
|
+
function D(t, e, n, r, o) {
|
|
3091
|
+
return o || M(t, 0, n, 8), i.write(t, e, n, r, 52, 8), n + 8;
|
|
3092
|
+
}
|
|
3093
|
+
a.prototype.slice = function (t, e) {
|
|
3094
|
+
var n,
|
|
3095
|
+
r = this.length;
|
|
3096
|
+
if (t = ~~t, e = void 0 === e ? r : ~~e, t < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), e < t && (e = t), a.TYPED_ARRAY_SUPPORT) (n = this.subarray(t, e)).__proto__ = a.prototype;else {
|
|
3097
|
+
var i = e - t;
|
|
3098
|
+
n = new a(i, void 0);
|
|
3099
|
+
for (var o = 0; o < i; ++o) n[o] = this[o + t];
|
|
3100
|
+
}
|
|
3101
|
+
return n;
|
|
3102
|
+
}, a.prototype.readUIntLE = function (t, e, n) {
|
|
3103
|
+
t |= 0, e |= 0, n || L(t, e, this.length);
|
|
3104
|
+
for (var r = this[t], i = 1, o = 0; ++o < e && (i *= 256);) r += this[t + o] * i;
|
|
3105
|
+
return r;
|
|
3106
|
+
}, a.prototype.readUIntBE = function (t, e, n) {
|
|
3107
|
+
t |= 0, e |= 0, n || L(t, e, this.length);
|
|
3108
|
+
for (var r = this[t + --e], i = 1; e > 0 && (i *= 256);) r += this[t + --e] * i;
|
|
3109
|
+
return r;
|
|
3110
|
+
}, a.prototype.readUInt8 = function (t, e) {
|
|
3111
|
+
return e || L(t, 1, this.length), this[t];
|
|
3112
|
+
}, a.prototype.readUInt16LE = function (t, e) {
|
|
3113
|
+
return e || L(t, 2, this.length), this[t] | this[t + 1] << 8;
|
|
3114
|
+
}, a.prototype.readUInt16BE = function (t, e) {
|
|
3115
|
+
return e || L(t, 2, this.length), this[t] << 8 | this[t + 1];
|
|
3116
|
+
}, a.prototype.readUInt32LE = function (t, e) {
|
|
3117
|
+
return e || L(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3];
|
|
3118
|
+
}, a.prototype.readUInt32BE = function (t, e) {
|
|
3119
|
+
return e || L(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
3120
|
+
}, a.prototype.readIntLE = function (t, e, n) {
|
|
3121
|
+
t |= 0, e |= 0, n || L(t, e, this.length);
|
|
3122
|
+
for (var r = this[t], i = 1, o = 0; ++o < e && (i *= 256);) r += this[t + o] * i;
|
|
3123
|
+
return r >= (i *= 128) && (r -= Math.pow(2, 8 * e)), r;
|
|
3124
|
+
}, a.prototype.readIntBE = function (t, e, n) {
|
|
3125
|
+
t |= 0, e |= 0, n || L(t, e, this.length);
|
|
3126
|
+
for (var r = e, i = 1, o = this[t + --r]; r > 0 && (i *= 256);) o += this[t + --r] * i;
|
|
3127
|
+
return o >= (i *= 128) && (o -= Math.pow(2, 8 * e)), o;
|
|
3128
|
+
}, a.prototype.readInt8 = function (t, e) {
|
|
3129
|
+
return e || L(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t];
|
|
3130
|
+
}, a.prototype.readInt16LE = function (t, e) {
|
|
3131
|
+
e || L(t, 2, this.length);
|
|
3132
|
+
var n = this[t] | this[t + 1] << 8;
|
|
3133
|
+
return 32768 & n ? 4294901760 | n : n;
|
|
3134
|
+
}, a.prototype.readInt16BE = function (t, e) {
|
|
3135
|
+
e || L(t, 2, this.length);
|
|
3136
|
+
var n = this[t + 1] | this[t] << 8;
|
|
3137
|
+
return 32768 & n ? 4294901760 | n : n;
|
|
3138
|
+
}, a.prototype.readInt32LE = function (t, e) {
|
|
3139
|
+
return e || L(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
|
|
3140
|
+
}, a.prototype.readInt32BE = function (t, e) {
|
|
3141
|
+
return e || L(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
|
|
3142
|
+
}, a.prototype.readFloatLE = function (t, e) {
|
|
3143
|
+
return e || L(t, 4, this.length), i.read(this, t, !0, 23, 4);
|
|
3144
|
+
}, a.prototype.readFloatBE = function (t, e) {
|
|
3145
|
+
return e || L(t, 4, this.length), i.read(this, t, !1, 23, 4);
|
|
3146
|
+
}, a.prototype.readDoubleLE = function (t, e) {
|
|
3147
|
+
return e || L(t, 8, this.length), i.read(this, t, !0, 52, 8);
|
|
3148
|
+
}, a.prototype.readDoubleBE = function (t, e) {
|
|
3149
|
+
return e || L(t, 8, this.length), i.read(this, t, !1, 52, 8);
|
|
3150
|
+
}, a.prototype.writeUIntLE = function (t, e, n, r) {
|
|
3151
|
+
(t = +t, e |= 0, n |= 0, r) || B(this, t, e, n, Math.pow(2, 8 * n) - 1, 0);
|
|
3152
|
+
var i = 1,
|
|
3153
|
+
o = 0;
|
|
3154
|
+
for (this[e] = 255 & t; ++o < n && (i *= 256);) this[e + o] = t / i & 255;
|
|
3155
|
+
return e + n;
|
|
3156
|
+
}, a.prototype.writeUIntBE = function (t, e, n, r) {
|
|
3157
|
+
(t = +t, e |= 0, n |= 0, r) || B(this, t, e, n, Math.pow(2, 8 * n) - 1, 0);
|
|
3158
|
+
var i = n - 1,
|
|
3159
|
+
o = 1;
|
|
3160
|
+
for (this[e + i] = 255 & t; --i >= 0 && (o *= 256);) this[e + i] = t / o & 255;
|
|
3161
|
+
return e + n;
|
|
3162
|
+
}, a.prototype.writeUInt8 = function (t, e, n) {
|
|
3163
|
+
return t = +t, e |= 0, n || B(this, t, e, 1, 255, 0), a.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), this[e] = 255 & t, e + 1;
|
|
3164
|
+
}, a.prototype.writeUInt16LE = function (t, e, n) {
|
|
3165
|
+
return t = +t, e |= 0, n || B(this, t, e, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : C(this, t, e, !0), e + 2;
|
|
3166
|
+
}, a.prototype.writeUInt16BE = function (t, e, n) {
|
|
3167
|
+
return t = +t, e |= 0, n || B(this, t, e, 2, 65535, 0), a.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : C(this, t, e, !1), e + 2;
|
|
3168
|
+
}, a.prototype.writeUInt32LE = function (t, e, n) {
|
|
3169
|
+
return t = +t, e |= 0, n || B(this, t, e, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t) : j(this, t, e, !0), e + 4;
|
|
3170
|
+
}, a.prototype.writeUInt32BE = function (t, e, n) {
|
|
3171
|
+
return t = +t, e |= 0, n || B(this, t, e, 4, 4294967295, 0), a.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : j(this, t, e, !1), e + 4;
|
|
3172
|
+
}, a.prototype.writeIntLE = function (t, e, n, r) {
|
|
3173
|
+
if (t = +t, e |= 0, !r) {
|
|
3174
|
+
var i = Math.pow(2, 8 * n - 1);
|
|
3175
|
+
B(this, t, e, n, i - 1, -i);
|
|
3176
|
+
}
|
|
3177
|
+
var o = 0,
|
|
3178
|
+
u = 1,
|
|
3179
|
+
s = 0;
|
|
3180
|
+
for (this[e] = 255 & t; ++o < n && (u *= 256);) t < 0 && 0 === s && 0 !== this[e + o - 1] && (s = 1), this[e + o] = (t / u >> 0) - s & 255;
|
|
3181
|
+
return e + n;
|
|
3182
|
+
}, a.prototype.writeIntBE = function (t, e, n, r) {
|
|
3183
|
+
if (t = +t, e |= 0, !r) {
|
|
3184
|
+
var i = Math.pow(2, 8 * n - 1);
|
|
3185
|
+
B(this, t, e, n, i - 1, -i);
|
|
3186
|
+
}
|
|
3187
|
+
var o = n - 1,
|
|
3188
|
+
u = 1,
|
|
3189
|
+
s = 0;
|
|
3190
|
+
for (this[e + o] = 255 & t; --o >= 0 && (u *= 256);) t < 0 && 0 === s && 0 !== this[e + o + 1] && (s = 1), this[e + o] = (t / u >> 0) - s & 255;
|
|
3191
|
+
return e + n;
|
|
3192
|
+
}, a.prototype.writeInt8 = function (t, e, n) {
|
|
3193
|
+
return t = +t, e |= 0, n || B(this, t, e, 1, 127, -128), a.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1;
|
|
3194
|
+
}, a.prototype.writeInt16LE = function (t, e, n) {
|
|
3195
|
+
return t = +t, e |= 0, n || B(this, t, e, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : C(this, t, e, !0), e + 2;
|
|
3196
|
+
}, a.prototype.writeInt16BE = function (t, e, n) {
|
|
3197
|
+
return t = +t, e |= 0, n || B(this, t, e, 2, 32767, -32768), a.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : C(this, t, e, !1), e + 2;
|
|
3198
|
+
}, a.prototype.writeInt32LE = function (t, e, n) {
|
|
3199
|
+
return t = +t, e |= 0, n || B(this, t, e, 4, 2147483647, -2147483648), a.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24) : j(this, t, e, !0), e + 4;
|
|
3200
|
+
}, a.prototype.writeInt32BE = function (t, e, n) {
|
|
3201
|
+
return t = +t, e |= 0, n || B(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), a.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : j(this, t, e, !1), e + 4;
|
|
3202
|
+
}, a.prototype.writeFloatLE = function (t, e, n) {
|
|
3203
|
+
return U(this, t, e, !0, n);
|
|
3204
|
+
}, a.prototype.writeFloatBE = function (t, e, n) {
|
|
3205
|
+
return U(this, t, e, !1, n);
|
|
3206
|
+
}, a.prototype.writeDoubleLE = function (t, e, n) {
|
|
3207
|
+
return D(this, t, e, !0, n);
|
|
3208
|
+
}, a.prototype.writeDoubleBE = function (t, e, n) {
|
|
3209
|
+
return D(this, t, e, !1, n);
|
|
3210
|
+
}, a.prototype.copy = function (t, e, n, r) {
|
|
3211
|
+
if (n || (n = 0), r || 0 === r || (r = this.length), e >= t.length && (e = t.length), e || (e = 0), r > 0 && r < n && (r = n), r === n) return 0;
|
|
3212
|
+
if (0 === t.length || 0 === this.length) return 0;
|
|
3213
|
+
if (e < 0) throw new RangeError("targetStart out of bounds");
|
|
3214
|
+
if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");
|
|
3215
|
+
if (r < 0) throw new RangeError("sourceEnd out of bounds");
|
|
3216
|
+
r > this.length && (r = this.length), t.length - e < r - n && (r = t.length - e + n);
|
|
3217
|
+
var i,
|
|
3218
|
+
o = r - n;
|
|
3219
|
+
if (this === t && n < e && e < r) for (i = o - 1; i >= 0; --i) t[i + e] = this[i + n];else if (o < 1e3 || !a.TYPED_ARRAY_SUPPORT) for (i = 0; i < o; ++i) t[i + e] = this[i + n];else Uint8Array.prototype.set.call(t, this.subarray(n, n + o), e);
|
|
3220
|
+
return o;
|
|
3221
|
+
}, a.prototype.fill = function (t, e, n, r) {
|
|
3222
|
+
if ("string" == typeof t) {
|
|
3223
|
+
if ("string" == typeof e ? (r = e, e = 0, n = this.length) : "string" == typeof n && (r = n, n = this.length), 1 === t.length) {
|
|
3224
|
+
var i = t.charCodeAt(0);
|
|
3225
|
+
i < 256 && (t = i);
|
|
3226
|
+
}
|
|
3227
|
+
if (void 0 !== r && "string" != typeof r) throw new TypeError("encoding must be a string");
|
|
3228
|
+
if ("string" == typeof r && !a.isEncoding(r)) throw new TypeError("Unknown encoding: " + r);
|
|
3229
|
+
} else "number" == typeof t && (t &= 255);
|
|
3230
|
+
if (e < 0 || this.length < e || this.length < n) throw new RangeError("Out of range index");
|
|
3231
|
+
if (n <= e) return this;
|
|
3232
|
+
var o;
|
|
3233
|
+
if (e >>>= 0, n = void 0 === n ? this.length : n >>> 0, t || (t = 0), "number" == typeof t) for (o = e; o < n; ++o) this[o] = t;else {
|
|
3234
|
+
var u = a.isBuffer(t) ? t : N(new a(t, r).toString()),
|
|
3235
|
+
s = u.length;
|
|
3236
|
+
for (o = 0; o < n - e; ++o) this[o + e] = u[o % s];
|
|
3237
|
+
}
|
|
3238
|
+
return this;
|
|
3239
|
+
};
|
|
3240
|
+
var I = /[^+\/0-9A-Za-z-_]/g;
|
|
3241
|
+
function Y(t) {
|
|
3242
|
+
return t < 16 ? "0" + t.toString(16) : t.toString(16);
|
|
3243
|
+
}
|
|
3244
|
+
function N(t, e) {
|
|
3245
|
+
var n;
|
|
3246
|
+
e = e || 1 / 0;
|
|
3247
|
+
for (var r = t.length, i = null, o = [], u = 0; u < r; ++u) {
|
|
3248
|
+
if ((n = t.charCodeAt(u)) > 55295 && n < 57344) {
|
|
3249
|
+
if (!i) {
|
|
3250
|
+
if (n > 56319) {
|
|
3251
|
+
(e -= 3) > -1 && o.push(239, 191, 189);
|
|
3252
|
+
continue;
|
|
3253
|
+
}
|
|
3254
|
+
if (u + 1 === r) {
|
|
3255
|
+
(e -= 3) > -1 && o.push(239, 191, 189);
|
|
3256
|
+
continue;
|
|
3257
|
+
}
|
|
3258
|
+
i = n;
|
|
3259
|
+
continue;
|
|
3260
|
+
}
|
|
3261
|
+
if (n < 56320) {
|
|
3262
|
+
(e -= 3) > -1 && o.push(239, 191, 189), i = n;
|
|
3263
|
+
continue;
|
|
3264
|
+
}
|
|
3265
|
+
n = 65536 + (i - 55296 << 10 | n - 56320);
|
|
3266
|
+
} else i && (e -= 3) > -1 && o.push(239, 191, 189);
|
|
3267
|
+
if (i = null, n < 128) {
|
|
3268
|
+
if ((e -= 1) < 0) break;
|
|
3269
|
+
o.push(n);
|
|
3270
|
+
} else if (n < 2048) {
|
|
3271
|
+
if ((e -= 2) < 0) break;
|
|
3272
|
+
o.push(n >> 6 | 192, 63 & n | 128);
|
|
3273
|
+
} else if (n < 65536) {
|
|
3274
|
+
if ((e -= 3) < 0) break;
|
|
3275
|
+
o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128);
|
|
3276
|
+
} else {
|
|
3277
|
+
if (!(n < 1114112)) throw new Error("Invalid code point");
|
|
3278
|
+
if ((e -= 4) < 0) break;
|
|
3279
|
+
o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128);
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
return o;
|
|
3283
|
+
}
|
|
3284
|
+
function F(t) {
|
|
3285
|
+
return r.toByteArray(function (t) {
|
|
3286
|
+
if ((t = function (t) {
|
|
3287
|
+
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
|
|
3288
|
+
}(t).replace(I, "")).length < 2) return "";
|
|
3289
|
+
for (; t.length % 4 != 0;) t += "=";
|
|
3290
|
+
return t;
|
|
3291
|
+
}(t));
|
|
3292
|
+
}
|
|
3293
|
+
function z(t, e, n, r) {
|
|
3294
|
+
for (var i = 0; i < r && !(i + n >= e.length || i >= t.length); ++i) e[i + n] = t[i];
|
|
3295
|
+
return i;
|
|
3296
|
+
}
|
|
3297
|
+
}).call(e, n(0));
|
|
3298
|
+
}, function (t, e, n) {
|
|
3299
|
+
|
|
3300
|
+
e.byteLength = function (t) {
|
|
3301
|
+
return 3 * t.length / 4 - c(t);
|
|
3302
|
+
}, e.toByteArray = function (t) {
|
|
3303
|
+
var e,
|
|
3304
|
+
n,
|
|
3305
|
+
r,
|
|
3306
|
+
u,
|
|
3307
|
+
s,
|
|
3308
|
+
a = t.length;
|
|
3309
|
+
u = c(t), s = new o(3 * a / 4 - u), n = u > 0 ? a - 4 : a;
|
|
3310
|
+
var f = 0;
|
|
3311
|
+
for (e = 0; e < n; e += 4) r = i[t.charCodeAt(e)] << 18 | i[t.charCodeAt(e + 1)] << 12 | i[t.charCodeAt(e + 2)] << 6 | i[t.charCodeAt(e + 3)], s[f++] = r >> 16 & 255, s[f++] = r >> 8 & 255, s[f++] = 255 & r;
|
|
3312
|
+
2 === u ? (r = i[t.charCodeAt(e)] << 2 | i[t.charCodeAt(e + 1)] >> 4, s[f++] = 255 & r) : 1 === u && (r = i[t.charCodeAt(e)] << 10 | i[t.charCodeAt(e + 1)] << 4 | i[t.charCodeAt(e + 2)] >> 2, s[f++] = r >> 8 & 255, s[f++] = 255 & r);
|
|
3313
|
+
return s;
|
|
3314
|
+
}, e.fromByteArray = function (t) {
|
|
3315
|
+
for (var e, n = t.length, i = n % 3, o = "", u = [], s = 0, a = n - i; s < a; s += 16383) u.push(f(t, s, s + 16383 > a ? a : s + 16383));
|
|
3316
|
+
1 === i ? (e = t[n - 1], o += r[e >> 2], o += r[e << 4 & 63], o += "==") : 2 === i && (e = (t[n - 2] << 8) + t[n - 1], o += r[e >> 10], o += r[e >> 4 & 63], o += r[e << 2 & 63], o += "=");
|
|
3317
|
+
return u.push(o), u.join("");
|
|
3318
|
+
};
|
|
3319
|
+
for (var r = [], i = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = 0, a = u.length; s < a; ++s) r[s] = u[s], i[u.charCodeAt(s)] = s;
|
|
3320
|
+
function c(t) {
|
|
3321
|
+
var e = t.length;
|
|
3322
|
+
if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
3323
|
+
return "=" === t[e - 2] ? 2 : "=" === t[e - 1] ? 1 : 0;
|
|
3324
|
+
}
|
|
3325
|
+
function f(t, e, n) {
|
|
3326
|
+
for (var i, o, u = [], s = e; s < n; s += 3) i = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (255 & t[s + 2]), u.push(r[(o = i) >> 18 & 63] + r[o >> 12 & 63] + r[o >> 6 & 63] + r[63 & o]);
|
|
3327
|
+
return u.join("");
|
|
3328
|
+
}
|
|
3329
|
+
i["-".charCodeAt(0)] = 62, i["_".charCodeAt(0)] = 63;
|
|
3330
|
+
}, function (t, e) {
|
|
3331
|
+
e.read = function (t, e, n, r, i) {
|
|
3332
|
+
var o,
|
|
3333
|
+
u,
|
|
3334
|
+
s = 8 * i - r - 1,
|
|
3335
|
+
a = (1 << s) - 1,
|
|
3336
|
+
c = a >> 1,
|
|
3337
|
+
f = -7,
|
|
3338
|
+
l = n ? i - 1 : 0,
|
|
3339
|
+
h = n ? -1 : 1,
|
|
3340
|
+
p = t[e + l];
|
|
3341
|
+
for (l += h, o = p & (1 << -f) - 1, p >>= -f, f += s; f > 0; o = 256 * o + t[e + l], l += h, f -= 8);
|
|
3342
|
+
for (u = o & (1 << -f) - 1, o >>= -f, f += r; f > 0; u = 256 * u + t[e + l], l += h, f -= 8);
|
|
3343
|
+
if (0 === o) o = 1 - c;else {
|
|
3344
|
+
if (o === a) return u ? NaN : 1 / 0 * (p ? -1 : 1);
|
|
3345
|
+
u += Math.pow(2, r), o -= c;
|
|
3346
|
+
}
|
|
3347
|
+
return (p ? -1 : 1) * u * Math.pow(2, o - r);
|
|
3348
|
+
}, e.write = function (t, e, n, r, i, o) {
|
|
3349
|
+
var u,
|
|
3350
|
+
s,
|
|
3351
|
+
a,
|
|
3352
|
+
c = 8 * o - i - 1,
|
|
3353
|
+
f = (1 << c) - 1,
|
|
3354
|
+
l = f >> 1,
|
|
3355
|
+
h = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
3356
|
+
p = r ? 0 : o - 1,
|
|
3357
|
+
d = r ? 1 : -1,
|
|
3358
|
+
g = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
|
|
3359
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (s = isNaN(e) ? 1 : 0, u = f) : (u = Math.floor(Math.log(e) / Math.LN2), e * (a = Math.pow(2, -u)) < 1 && (u--, a *= 2), (e += u + l >= 1 ? h / a : h * Math.pow(2, 1 - l)) * a >= 2 && (u++, a /= 2), u + l >= f ? (s = 0, u = f) : u + l >= 1 ? (s = (e * a - 1) * Math.pow(2, i), u += l) : (s = e * Math.pow(2, l - 1) * Math.pow(2, i), u = 0)); i >= 8; t[n + p] = 255 & s, p += d, s /= 256, i -= 8);
|
|
3360
|
+
for (u = u << i | s, c += i; c > 0; t[n + p] = 255 & u, p += d, u /= 256, c -= 8);
|
|
3361
|
+
t[n + p - d] |= 128 * g;
|
|
3362
|
+
};
|
|
3363
|
+
}, function (t, e) {
|
|
3364
|
+
var n = {}.toString;
|
|
3365
|
+
t.exports = Array.isArray || function (t) {
|
|
3366
|
+
return "[object Array]" == n.call(t);
|
|
3367
|
+
};
|
|
3368
|
+
}, function (t, e, n) {
|
|
3369
|
+
|
|
3370
|
+
(function (e) {
|
|
3371
|
+
function r(t, e) {
|
|
3372
|
+
if (t === e) return 0;
|
|
3373
|
+
for (var n = t.length, r = e.length, i = 0, o = Math.min(n, r); i < o; ++i) if (t[i] !== e[i]) {
|
|
3374
|
+
n = t[i], r = e[i];
|
|
3375
|
+
break;
|
|
3376
|
+
}
|
|
3377
|
+
return n < r ? -1 : r < n ? 1 : 0;
|
|
3378
|
+
}
|
|
3379
|
+
function i(t) {
|
|
3380
|
+
return e.Buffer && "function" == typeof e.Buffer.isBuffer ? e.Buffer.isBuffer(t) : !(null == t || !t._isBuffer);
|
|
3381
|
+
}
|
|
3382
|
+
var o = n(27),
|
|
3383
|
+
u = Object.prototype.hasOwnProperty,
|
|
3384
|
+
s = Array.prototype.slice,
|
|
3385
|
+
a = "foo" === function () {}.name;
|
|
3386
|
+
function c(t) {
|
|
3387
|
+
return Object.prototype.toString.call(t);
|
|
3388
|
+
}
|
|
3389
|
+
function f(t) {
|
|
3390
|
+
return !i(t) && "function" == typeof e.ArrayBuffer && ("function" == typeof ArrayBuffer.isView ? ArrayBuffer.isView(t) : !!t && (t instanceof DataView || !!(t.buffer && t.buffer instanceof ArrayBuffer)));
|
|
3391
|
+
}
|
|
3392
|
+
var l = t.exports = v,
|
|
3393
|
+
h = /\s*function\s+([^\(\s]*)\s*/;
|
|
3394
|
+
function p(t) {
|
|
3395
|
+
if (o.isFunction(t)) {
|
|
3396
|
+
if (a) return t.name;
|
|
3397
|
+
var e = t.toString().match(h);
|
|
3398
|
+
return e && e[1];
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
function d(t, e) {
|
|
3402
|
+
return "string" == typeof t ? t.length < e ? t : t.slice(0, e) : t;
|
|
3403
|
+
}
|
|
3404
|
+
function g(t) {
|
|
3405
|
+
if (a || !o.isFunction(t)) return o.inspect(t);
|
|
3406
|
+
var e = p(t);
|
|
3407
|
+
return "[Function" + (e ? ": " + e : "") + "]";
|
|
3408
|
+
}
|
|
3409
|
+
function y(t, e, n, r, i) {
|
|
3410
|
+
throw new l.AssertionError({
|
|
3411
|
+
message: n,
|
|
3412
|
+
actual: t,
|
|
3413
|
+
expected: e,
|
|
3414
|
+
operator: r,
|
|
3415
|
+
stackStartFunction: i
|
|
3416
|
+
});
|
|
3417
|
+
}
|
|
3418
|
+
function v(t, e) {
|
|
3419
|
+
t || y(t, !0, e, "==", l.ok);
|
|
3420
|
+
}
|
|
3421
|
+
function m(t, e, n, u) {
|
|
3422
|
+
if (t === e) return !0;
|
|
3423
|
+
if (i(t) && i(e)) return 0 === r(t, e);
|
|
3424
|
+
if (o.isDate(t) && o.isDate(e)) return t.getTime() === e.getTime();
|
|
3425
|
+
if (o.isRegExp(t) && o.isRegExp(e)) return t.source === e.source && t.global === e.global && t.multiline === e.multiline && t.lastIndex === e.lastIndex && t.ignoreCase === e.ignoreCase;
|
|
3426
|
+
if (null !== t && "object" == typeof t || null !== e && "object" == typeof e) {
|
|
3427
|
+
if (f(t) && f(e) && c(t) === c(e) && !(t instanceof Float32Array || t instanceof Float64Array)) return 0 === r(new Uint8Array(t.buffer), new Uint8Array(e.buffer));
|
|
3428
|
+
if (i(t) !== i(e)) return !1;
|
|
3429
|
+
var a = (u = u || {
|
|
3430
|
+
actual: [],
|
|
3431
|
+
expected: []
|
|
3432
|
+
}).actual.indexOf(t);
|
|
3433
|
+
return -1 !== a && a === u.expected.indexOf(e) || (u.actual.push(t), u.expected.push(e), function (t, e, n, r) {
|
|
3434
|
+
if (null === t || void 0 === t || null === e || void 0 === e) return !1;
|
|
3435
|
+
if (o.isPrimitive(t) || o.isPrimitive(e)) return t === e;
|
|
3436
|
+
if (n && Object.getPrototypeOf(t) !== Object.getPrototypeOf(e)) return !1;
|
|
3437
|
+
var i = b(t),
|
|
3438
|
+
u = b(e);
|
|
3439
|
+
if (i && !u || !i && u) return !1;
|
|
3440
|
+
if (i) return t = s.call(t), e = s.call(e), m(t, e, n);
|
|
3441
|
+
var a,
|
|
3442
|
+
c,
|
|
3443
|
+
f = O(t),
|
|
3444
|
+
l = O(e);
|
|
3445
|
+
if (f.length !== l.length) return !1;
|
|
3446
|
+
for (f.sort(), l.sort(), c = f.length - 1; c >= 0; c--) if (f[c] !== l[c]) return !1;
|
|
3447
|
+
for (c = f.length - 1; c >= 0; c--) if (a = f[c], !m(t[a], e[a], n, r)) return !1;
|
|
3448
|
+
return !0;
|
|
3449
|
+
}(t, e, n, u));
|
|
3450
|
+
}
|
|
3451
|
+
return n ? t === e : t == e;
|
|
3452
|
+
}
|
|
3453
|
+
function b(t) {
|
|
3454
|
+
return "[object Arguments]" == Object.prototype.toString.call(t);
|
|
3455
|
+
}
|
|
3456
|
+
function w(t, e) {
|
|
3457
|
+
if (!t || !e) return !1;
|
|
3458
|
+
if ("[object RegExp]" == Object.prototype.toString.call(e)) return e.test(t);
|
|
3459
|
+
try {
|
|
3460
|
+
if (t instanceof e) return !0;
|
|
3461
|
+
} catch (t) {}
|
|
3462
|
+
return !Error.isPrototypeOf(e) && !0 === e.call({}, t);
|
|
3463
|
+
}
|
|
3464
|
+
function E(t, e, n, r) {
|
|
3465
|
+
var i;
|
|
3466
|
+
if ("function" != typeof e) throw new TypeError('"block" argument must be a function');
|
|
3467
|
+
"string" == typeof n && (r = n, n = null), i = function (t) {
|
|
3468
|
+
var e;
|
|
3469
|
+
try {
|
|
3470
|
+
t();
|
|
3471
|
+
} catch (t) {
|
|
3472
|
+
e = t;
|
|
3473
|
+
}
|
|
3474
|
+
return e;
|
|
3475
|
+
}(e), r = (n && n.name ? " (" + n.name + ")." : ".") + (r ? " " + r : "."), t && !i && y(i, n, "Missing expected exception" + r);
|
|
3476
|
+
var u = "string" == typeof r,
|
|
3477
|
+
s = !t && o.isError(i),
|
|
3478
|
+
a = !t && i && !n;
|
|
3479
|
+
if ((s && u && w(i, n) || a) && y(i, n, "Got unwanted exception" + r), t && i && n && !w(i, n) || !t && i) throw i;
|
|
3480
|
+
}
|
|
3481
|
+
l.AssertionError = function (t) {
|
|
3482
|
+
var e;
|
|
3483
|
+
this.name = "AssertionError", this.actual = t.actual, this.expected = t.expected, this.operator = t.operator, t.message ? (this.message = t.message, this.generatedMessage = !1) : (this.message = d(g((e = this).actual), 128) + " " + e.operator + " " + d(g(e.expected), 128), this.generatedMessage = !0);
|
|
3484
|
+
var n = t.stackStartFunction || y;
|
|
3485
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, n);else {
|
|
3486
|
+
var r = new Error();
|
|
3487
|
+
if (r.stack) {
|
|
3488
|
+
var i = r.stack,
|
|
3489
|
+
o = p(n),
|
|
3490
|
+
u = i.indexOf("\n" + o);
|
|
3491
|
+
if (u >= 0) {
|
|
3492
|
+
var s = i.indexOf("\n", u + 1);
|
|
3493
|
+
i = i.substring(s + 1);
|
|
3494
|
+
}
|
|
3495
|
+
this.stack = i;
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
}, o.inherits(l.AssertionError, Error), l.fail = y, l.ok = v, l.equal = function (t, e, n) {
|
|
3499
|
+
t != e && y(t, e, n, "==", l.equal);
|
|
3500
|
+
}, l.notEqual = function (t, e, n) {
|
|
3501
|
+
t == e && y(t, e, n, "!=", l.notEqual);
|
|
3502
|
+
}, l.deepEqual = function (t, e, n) {
|
|
3503
|
+
m(t, e, !1) || y(t, e, n, "deepEqual", l.deepEqual);
|
|
3504
|
+
}, l.deepStrictEqual = function (t, e, n) {
|
|
3505
|
+
m(t, e, !0) || y(t, e, n, "deepStrictEqual", l.deepStrictEqual);
|
|
3506
|
+
}, l.notDeepEqual = function (t, e, n) {
|
|
3507
|
+
m(t, e, !1) && y(t, e, n, "notDeepEqual", l.notDeepEqual);
|
|
3508
|
+
}, l.notDeepStrictEqual = function t(e, n, r) {
|
|
3509
|
+
m(e, n, !0) && y(e, n, r, "notDeepStrictEqual", t);
|
|
3510
|
+
}, l.strictEqual = function (t, e, n) {
|
|
3511
|
+
t !== e && y(t, e, n, "===", l.strictEqual);
|
|
3512
|
+
}, l.notStrictEqual = function (t, e, n) {
|
|
3513
|
+
t === e && y(t, e, n, "!==", l.notStrictEqual);
|
|
3514
|
+
}, l.throws = function (t, e, n) {
|
|
3515
|
+
E(!0, t, e, n);
|
|
3516
|
+
}, l.doesNotThrow = function (t, e, n) {
|
|
3517
|
+
E(!1, t, e, n);
|
|
3518
|
+
}, l.ifError = function (t) {
|
|
3519
|
+
if (t) throw t;
|
|
3520
|
+
};
|
|
3521
|
+
var O = Object.keys || function (t) {
|
|
3522
|
+
var e = [];
|
|
3523
|
+
for (var n in t) u.call(t, n) && e.push(n);
|
|
3524
|
+
return e;
|
|
3525
|
+
};
|
|
3526
|
+
}).call(e, n(0));
|
|
3527
|
+
}, function (t, e, n) {
|
|
3528
|
+
(function (t, r) {
|
|
3529
|
+
var i = /%[sdj%]/g;
|
|
3530
|
+
e.format = function (t) {
|
|
3531
|
+
if (!v(t)) {
|
|
3532
|
+
for (var e = [], n = 0; n < arguments.length; n++) e.push(s(arguments[n]));
|
|
3533
|
+
return e.join(" ");
|
|
3534
|
+
}
|
|
3535
|
+
n = 1;
|
|
3536
|
+
for (var r = arguments, o = r.length, u = String(t).replace(i, function (t) {
|
|
3537
|
+
if ("%%" === t) return "%";
|
|
3538
|
+
if (n >= o) return t;
|
|
3539
|
+
switch (t) {
|
|
3540
|
+
case "%s":
|
|
3541
|
+
return String(r[n++]);
|
|
3542
|
+
case "%d":
|
|
3543
|
+
return Number(r[n++]);
|
|
3544
|
+
case "%j":
|
|
3545
|
+
try {
|
|
3546
|
+
return JSON.stringify(r[n++]);
|
|
3547
|
+
} catch (t) {
|
|
3548
|
+
return "[Circular]";
|
|
3549
|
+
}
|
|
3550
|
+
default:
|
|
3551
|
+
return t;
|
|
3552
|
+
}
|
|
3553
|
+
}), a = r[n]; n < o; a = r[++n]) g(a) || !w(a) ? u += " " + a : u += " " + s(a);
|
|
3554
|
+
return u;
|
|
3555
|
+
}, e.deprecate = function (n, i) {
|
|
3556
|
+
if (m(t.process)) return function () {
|
|
3557
|
+
return e.deprecate(n, i).apply(this, arguments);
|
|
3558
|
+
};
|
|
3559
|
+
if (!0 === r.noDeprecation) return n;
|
|
3560
|
+
var o = !1;
|
|
3561
|
+
return function () {
|
|
3562
|
+
if (!o) {
|
|
3563
|
+
if (r.throwDeprecation) throw new Error(i);
|
|
3564
|
+
r.traceDeprecation ? console.trace(i) : console.error(i), o = !0;
|
|
3565
|
+
}
|
|
3566
|
+
return n.apply(this, arguments);
|
|
3567
|
+
};
|
|
3568
|
+
};
|
|
3569
|
+
var o,
|
|
3570
|
+
u = {};
|
|
3571
|
+
function s(t, n) {
|
|
3572
|
+
var r = {
|
|
3573
|
+
seen: [],
|
|
3574
|
+
stylize: c
|
|
3575
|
+
};
|
|
3576
|
+
return arguments.length >= 3 && (r.depth = arguments[2]), arguments.length >= 4 && (r.colors = arguments[3]), d(n) ? r.showHidden = n : n && e._extend(r, n), m(r.showHidden) && (r.showHidden = !1), m(r.depth) && (r.depth = 2), m(r.colors) && (r.colors = !1), m(r.customInspect) && (r.customInspect = !0), r.colors && (r.stylize = a), f(r, t, r.depth);
|
|
3577
|
+
}
|
|
3578
|
+
function a(t, e) {
|
|
3579
|
+
var n = s.styles[e];
|
|
3580
|
+
return n ? "[" + s.colors[n][0] + "m" + t + "[" + s.colors[n][1] + "m" : t;
|
|
3581
|
+
}
|
|
3582
|
+
function c(t, e) {
|
|
3583
|
+
return t;
|
|
3584
|
+
}
|
|
3585
|
+
function f(t, n, r) {
|
|
3586
|
+
if (t.customInspect && n && A(n.inspect) && n.inspect !== e.inspect && (!n.constructor || n.constructor.prototype !== n)) {
|
|
3587
|
+
var i = n.inspect(r, t);
|
|
3588
|
+
return v(i) || (i = f(t, i, r)), i;
|
|
3589
|
+
}
|
|
3590
|
+
var o = function (t, e) {
|
|
3591
|
+
if (m(e)) return t.stylize("undefined", "undefined");
|
|
3592
|
+
if (v(e)) {
|
|
3593
|
+
var n = "'" + JSON.stringify(e).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3594
|
+
return t.stylize(n, "string");
|
|
3595
|
+
}
|
|
3596
|
+
if (y(e)) return t.stylize("" + e, "number");
|
|
3597
|
+
if (d(e)) return t.stylize("" + e, "boolean");
|
|
3598
|
+
if (g(e)) return t.stylize("null", "null");
|
|
3599
|
+
}(t, n);
|
|
3600
|
+
if (o) return o;
|
|
3601
|
+
var u = Object.keys(n),
|
|
3602
|
+
s = function (t) {
|
|
3603
|
+
var e = {};
|
|
3604
|
+
return t.forEach(function (t, n) {
|
|
3605
|
+
e[t] = !0;
|
|
3606
|
+
}), e;
|
|
3607
|
+
}(u);
|
|
3608
|
+
if (t.showHidden && (u = Object.getOwnPropertyNames(n)), O(n) && (u.indexOf("message") >= 0 || u.indexOf("description") >= 0)) return l(n);
|
|
3609
|
+
if (0 === u.length) {
|
|
3610
|
+
if (A(n)) {
|
|
3611
|
+
var a = n.name ? ": " + n.name : "";
|
|
3612
|
+
return t.stylize("[Function" + a + "]", "special");
|
|
3613
|
+
}
|
|
3614
|
+
if (b(n)) return t.stylize(RegExp.prototype.toString.call(n), "regexp");
|
|
3615
|
+
if (E(n)) return t.stylize(Date.prototype.toString.call(n), "date");
|
|
3616
|
+
if (O(n)) return l(n);
|
|
3617
|
+
}
|
|
3618
|
+
var c,
|
|
3619
|
+
w = "",
|
|
3620
|
+
x = !1,
|
|
3621
|
+
T = ["{", "}"];
|
|
3622
|
+
(p(n) && (x = !0, T = ["[", "]"]), A(n)) && (w = " [Function" + (n.name ? ": " + n.name : "") + "]");
|
|
3623
|
+
return b(n) && (w = " " + RegExp.prototype.toString.call(n)), E(n) && (w = " " + Date.prototype.toUTCString.call(n)), O(n) && (w = " " + l(n)), 0 !== u.length || x && 0 != n.length ? r < 0 ? b(n) ? t.stylize(RegExp.prototype.toString.call(n), "regexp") : t.stylize("[Object]", "special") : (t.seen.push(n), c = x ? function (t, e, n, r, i) {
|
|
3624
|
+
for (var o = [], u = 0, s = e.length; u < s; ++u) S(e, String(u)) ? o.push(h(t, e, n, r, String(u), !0)) : o.push("");
|
|
3625
|
+
return i.forEach(function (i) {
|
|
3626
|
+
i.match(/^\d+$/) || o.push(h(t, e, n, r, i, !0));
|
|
3627
|
+
}), o;
|
|
3628
|
+
}(t, n, r, s, u) : u.map(function (e) {
|
|
3629
|
+
return h(t, n, r, s, e, x);
|
|
3630
|
+
}), t.seen.pop(), function (t, e, n) {
|
|
3631
|
+
if (t.reduce(function (t, e) {
|
|
3632
|
+
return e.indexOf("\n") >= 0 && 0, t + e.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3633
|
+
}, 0) > 60) return n[0] + ("" === e ? "" : e + "\n ") + " " + t.join(",\n ") + " " + n[1];
|
|
3634
|
+
return n[0] + e + " " + t.join(", ") + " " + n[1];
|
|
3635
|
+
}(c, w, T)) : T[0] + w + T[1];
|
|
3636
|
+
}
|
|
3637
|
+
function l(t) {
|
|
3638
|
+
return "[" + Error.prototype.toString.call(t) + "]";
|
|
3639
|
+
}
|
|
3640
|
+
function h(t, e, n, r, i, o) {
|
|
3641
|
+
var u, s, a;
|
|
3642
|
+
if ((a = Object.getOwnPropertyDescriptor(e, i) || {
|
|
3643
|
+
value: e[i]
|
|
3644
|
+
}).get ? s = a.set ? t.stylize("[Getter/Setter]", "special") : t.stylize("[Getter]", "special") : a.set && (s = t.stylize("[Setter]", "special")), S(r, i) || (u = "[" + i + "]"), s || (t.seen.indexOf(a.value) < 0 ? (s = g(n) ? f(t, a.value, null) : f(t, a.value, n - 1)).indexOf("\n") > -1 && (s = o ? s.split("\n").map(function (t) {
|
|
3645
|
+
return " " + t;
|
|
3646
|
+
}).join("\n").substr(2) : "\n" + s.split("\n").map(function (t) {
|
|
3647
|
+
return " " + t;
|
|
3648
|
+
}).join("\n")) : s = t.stylize("[Circular]", "special")), m(u)) {
|
|
3649
|
+
if (o && i.match(/^\d+$/)) return s;
|
|
3650
|
+
(u = JSON.stringify("" + i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u = u.substr(1, u.length - 2), u = t.stylize(u, "name")) : (u = u.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u = t.stylize(u, "string"));
|
|
3651
|
+
}
|
|
3652
|
+
return u + ": " + s;
|
|
3653
|
+
}
|
|
3654
|
+
function p(t) {
|
|
3655
|
+
return Array.isArray(t);
|
|
3656
|
+
}
|
|
3657
|
+
function d(t) {
|
|
3658
|
+
return "boolean" == typeof t;
|
|
3659
|
+
}
|
|
3660
|
+
function g(t) {
|
|
3661
|
+
return null === t;
|
|
3662
|
+
}
|
|
3663
|
+
function y(t) {
|
|
3664
|
+
return "number" == typeof t;
|
|
3665
|
+
}
|
|
3666
|
+
function v(t) {
|
|
3667
|
+
return "string" == typeof t;
|
|
3668
|
+
}
|
|
3669
|
+
function m(t) {
|
|
3670
|
+
return void 0 === t;
|
|
3671
|
+
}
|
|
3672
|
+
function b(t) {
|
|
3673
|
+
return w(t) && "[object RegExp]" === x(t);
|
|
3674
|
+
}
|
|
3675
|
+
function w(t) {
|
|
3676
|
+
return "object" == typeof t && null !== t;
|
|
3677
|
+
}
|
|
3678
|
+
function E(t) {
|
|
3679
|
+
return w(t) && "[object Date]" === x(t);
|
|
3680
|
+
}
|
|
3681
|
+
function O(t) {
|
|
3682
|
+
return w(t) && ("[object Error]" === x(t) || t instanceof Error);
|
|
3683
|
+
}
|
|
3684
|
+
function A(t) {
|
|
3685
|
+
return "function" == typeof t;
|
|
3686
|
+
}
|
|
3687
|
+
function x(t) {
|
|
3688
|
+
return Object.prototype.toString.call(t);
|
|
3689
|
+
}
|
|
3690
|
+
function T(t) {
|
|
3691
|
+
return t < 10 ? "0" + t.toString(10) : t.toString(10);
|
|
3692
|
+
}
|
|
3693
|
+
e.debuglog = function (t) {
|
|
3694
|
+
if (m(o) && (o = Object({
|
|
3695
|
+
NODE_ENV: "production"
|
|
3696
|
+
}).NODE_DEBUG || ""), t = t.toUpperCase(), !u[t]) if (new RegExp("\\b" + t + "\\b", "i").test(o)) {
|
|
3697
|
+
var n = r.pid;
|
|
3698
|
+
u[t] = function () {
|
|
3699
|
+
var r = e.format.apply(e, arguments);
|
|
3700
|
+
console.error("%s %d: %s", t, n, r);
|
|
3701
|
+
};
|
|
3702
|
+
} else u[t] = function () {};
|
|
3703
|
+
return u[t];
|
|
3704
|
+
}, e.inspect = s, s.colors = {
|
|
3705
|
+
bold: [1, 22],
|
|
3706
|
+
italic: [3, 23],
|
|
3707
|
+
underline: [4, 24],
|
|
3708
|
+
inverse: [7, 27],
|
|
3709
|
+
white: [37, 39],
|
|
3710
|
+
grey: [90, 39],
|
|
3711
|
+
black: [30, 39],
|
|
3712
|
+
blue: [34, 39],
|
|
3713
|
+
cyan: [36, 39],
|
|
3714
|
+
green: [32, 39],
|
|
3715
|
+
magenta: [35, 39],
|
|
3716
|
+
red: [31, 39],
|
|
3717
|
+
yellow: [33, 39]
|
|
3718
|
+
}, s.styles = {
|
|
3719
|
+
special: "cyan",
|
|
3720
|
+
number: "yellow",
|
|
3721
|
+
boolean: "yellow",
|
|
3722
|
+
undefined: "grey",
|
|
3723
|
+
null: "bold",
|
|
3724
|
+
string: "green",
|
|
3725
|
+
date: "magenta",
|
|
3726
|
+
regexp: "red"
|
|
3727
|
+
}, e.isArray = p, e.isBoolean = d, e.isNull = g, e.isNullOrUndefined = function (t) {
|
|
3728
|
+
return null == t;
|
|
3729
|
+
}, e.isNumber = y, e.isString = v, e.isSymbol = function (t) {
|
|
3730
|
+
return "symbol" == typeof t;
|
|
3731
|
+
}, e.isUndefined = m, e.isRegExp = b, e.isObject = w, e.isDate = E, e.isError = O, e.isFunction = A, e.isPrimitive = function (t) {
|
|
3732
|
+
return null === t || "boolean" == typeof t || "number" == typeof t || "string" == typeof t || "symbol" == typeof t || void 0 === t;
|
|
3733
|
+
}, e.isBuffer = n(29);
|
|
3734
|
+
var _ = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
3735
|
+
function S(t, e) {
|
|
3736
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
3737
|
+
}
|
|
3738
|
+
e.log = function () {
|
|
3739
|
+
var t, n;
|
|
3740
|
+
console.log("%s - %s", (t = new Date(), n = [T(t.getHours()), T(t.getMinutes()), T(t.getSeconds())].join(":"), [t.getDate(), _[t.getMonth()], n].join(" ")), e.format.apply(e, arguments));
|
|
3741
|
+
}, e.inherits = n(30), e._extend = function (t, e) {
|
|
3742
|
+
if (!e || !w(e)) return t;
|
|
3743
|
+
for (var n = Object.keys(e), r = n.length; r--;) t[n[r]] = e[n[r]];
|
|
3744
|
+
return t;
|
|
3745
|
+
};
|
|
3746
|
+
}).call(e, n(0), n(28));
|
|
3747
|
+
}, function (t, e) {
|
|
3748
|
+
var n,
|
|
3749
|
+
r,
|
|
3750
|
+
i = t.exports = {};
|
|
3751
|
+
function o() {
|
|
3752
|
+
throw new Error("setTimeout has not been defined");
|
|
3753
|
+
}
|
|
3754
|
+
function u() {
|
|
3755
|
+
throw new Error("clearTimeout has not been defined");
|
|
3756
|
+
}
|
|
3757
|
+
function s(t) {
|
|
3758
|
+
if (n === setTimeout) return setTimeout(t, 0);
|
|
3759
|
+
if ((n === o || !n) && setTimeout) return n = setTimeout, setTimeout(t, 0);
|
|
3760
|
+
try {
|
|
3761
|
+
return n(t, 0);
|
|
3762
|
+
} catch (e) {
|
|
3763
|
+
try {
|
|
3764
|
+
return n.call(null, t, 0);
|
|
3765
|
+
} catch (e) {
|
|
3766
|
+
return n.call(this, t, 0);
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
!function () {
|
|
3771
|
+
try {
|
|
3772
|
+
n = "function" == typeof setTimeout ? setTimeout : o;
|
|
3773
|
+
} catch (t) {
|
|
3774
|
+
n = o;
|
|
3775
|
+
}
|
|
3776
|
+
try {
|
|
3777
|
+
r = "function" == typeof clearTimeout ? clearTimeout : u;
|
|
3778
|
+
} catch (t) {
|
|
3779
|
+
r = u;
|
|
3780
|
+
}
|
|
3781
|
+
}();
|
|
3782
|
+
var a,
|
|
3783
|
+
c = [],
|
|
3784
|
+
f = !1,
|
|
3785
|
+
l = -1;
|
|
3786
|
+
function h() {
|
|
3787
|
+
f && a && (f = !1, a.length ? c = a.concat(c) : l = -1, c.length && p());
|
|
3788
|
+
}
|
|
3789
|
+
function p() {
|
|
3790
|
+
if (!f) {
|
|
3791
|
+
var t = s(h);
|
|
3792
|
+
f = !0;
|
|
3793
|
+
for (var e = c.length; e;) {
|
|
3794
|
+
for (a = c, c = []; ++l < e;) a && a[l].run();
|
|
3795
|
+
l = -1, e = c.length;
|
|
3796
|
+
}
|
|
3797
|
+
a = null, f = !1, function (t) {
|
|
3798
|
+
if (r === clearTimeout) return clearTimeout(t);
|
|
3799
|
+
if ((r === u || !r) && clearTimeout) return r = clearTimeout, clearTimeout(t);
|
|
3800
|
+
try {
|
|
3801
|
+
r(t);
|
|
3802
|
+
} catch (e) {
|
|
3803
|
+
try {
|
|
3804
|
+
return r.call(null, t);
|
|
3805
|
+
} catch (e) {
|
|
3806
|
+
return r.call(this, t);
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
}(t);
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
function d(t, e) {
|
|
3813
|
+
this.fun = t, this.array = e;
|
|
3814
|
+
}
|
|
3815
|
+
function g() {}
|
|
3816
|
+
i.nextTick = function (t) {
|
|
3817
|
+
var e = new Array(arguments.length - 1);
|
|
3818
|
+
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
3819
|
+
c.push(new d(t, e)), 1 !== c.length || f || s(p);
|
|
3820
|
+
}, d.prototype.run = function () {
|
|
3821
|
+
this.fun.apply(null, this.array);
|
|
3822
|
+
}, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {}, i.on = g, i.addListener = g, i.once = g, i.off = g, i.removeListener = g, i.removeAllListeners = g, i.emit = g, i.prependListener = g, i.prependOnceListener = g, i.listeners = function (t) {
|
|
3823
|
+
return [];
|
|
3824
|
+
}, i.binding = function (t) {
|
|
3825
|
+
throw new Error("process.binding is not supported");
|
|
3826
|
+
}, i.cwd = function () {
|
|
3827
|
+
return "/";
|
|
3828
|
+
}, i.chdir = function (t) {
|
|
3829
|
+
throw new Error("process.chdir is not supported");
|
|
3830
|
+
}, i.umask = function () {
|
|
3831
|
+
return 0;
|
|
3832
|
+
};
|
|
3833
|
+
}, function (t, e) {
|
|
3834
|
+
t.exports = function (t) {
|
|
3835
|
+
return t && "object" == typeof t && "function" == typeof t.copy && "function" == typeof t.fill && "function" == typeof t.readUInt8;
|
|
3836
|
+
};
|
|
3837
|
+
}, function (t, e) {
|
|
3838
|
+
"function" == typeof Object.create ? t.exports = function (t, e) {
|
|
3839
|
+
t.super_ = e, t.prototype = Object.create(e.prototype, {
|
|
3840
|
+
constructor: {
|
|
3841
|
+
value: t,
|
|
3842
|
+
enumerable: !1,
|
|
3843
|
+
writable: !0,
|
|
3844
|
+
configurable: !0
|
|
3845
|
+
}
|
|
3846
|
+
});
|
|
3847
|
+
} : t.exports = function (t, e) {
|
|
3848
|
+
t.super_ = e;
|
|
3849
|
+
var n = function () {};
|
|
3850
|
+
n.prototype = e.prototype, t.prototype = new n(), t.prototype.constructor = t;
|
|
3851
|
+
};
|
|
3852
|
+
}, function (t, e, n) {
|
|
3853
|
+
|
|
3854
|
+
t.exports = function (t, e, n) {
|
|
3855
|
+
var r = e.value,
|
|
3856
|
+
i = t.innerText,
|
|
3857
|
+
o = i.toLowerCase().indexOf(r.toLowerCase()),
|
|
3858
|
+
u = r.length;
|
|
3859
|
+
return r && o >= 0 ? i.substring(0, o) + '<span class="' + n + '">' + i.substr(o, u) + "</span>" + i.substring(o + u) : i;
|
|
3860
|
+
};
|
|
3861
|
+
}, function (t, e, n) {
|
|
3862
|
+
|
|
3863
|
+
var r,
|
|
3864
|
+
i = n(33),
|
|
3865
|
+
o = (r = i) && r.__esModule ? r : {
|
|
3866
|
+
default: r
|
|
3867
|
+
};
|
|
3868
|
+
var u = {
|
|
3869
|
+
input: ".combobox",
|
|
3870
|
+
list: ".listbox",
|
|
3871
|
+
options: ".option",
|
|
3872
|
+
groups: null,
|
|
3873
|
+
openClass: "open",
|
|
3874
|
+
activeClass: "active",
|
|
3875
|
+
selectedClass: "selected",
|
|
3876
|
+
useLiveRegion: !0,
|
|
3877
|
+
allowEmpty: !0,
|
|
3878
|
+
multiselect: !1,
|
|
3879
|
+
noResultsText: null,
|
|
3880
|
+
selectionValue: function (t) {
|
|
3881
|
+
return t.map(function (t) {
|
|
3882
|
+
return t.innerText.trim();
|
|
3883
|
+
}).join(" - ");
|
|
3884
|
+
},
|
|
3885
|
+
optionValue: function (t) {
|
|
3886
|
+
return t.innerHTML;
|
|
3887
|
+
},
|
|
3888
|
+
announcement: {
|
|
3889
|
+
count: function (t) {
|
|
3890
|
+
return t + " options available";
|
|
3891
|
+
},
|
|
3892
|
+
selected: "Selected."
|
|
3893
|
+
},
|
|
3894
|
+
filter: "contains",
|
|
3895
|
+
autoFilter: !0
|
|
3896
|
+
};
|
|
3897
|
+
t.exports = function (t) {
|
|
3898
|
+
var e = {},
|
|
3899
|
+
n = {};
|
|
3900
|
+
return t.announcement = t.announcement || {}, (0, o.default)(n, u.announcement, t.announcement), (0, o.default)(e, u, t), e.announcement = n, e;
|
|
3901
|
+
};
|
|
3902
|
+
}, function (t, e, n) {
|
|
3903
|
+
|
|
3904
|
+
var r = n(34);
|
|
3905
|
+
function i(t, e) {
|
|
3906
|
+
for (var n in e) o(e, n) && (t[n] = e[n]);
|
|
3907
|
+
}
|
|
3908
|
+
function o(t, e) {
|
|
3909
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
3910
|
+
}
|
|
3911
|
+
t.exports = function (t) {
|
|
3912
|
+
r(t) || (t = {});
|
|
3913
|
+
for (var e = arguments.length, n = 1; n < e; n++) {
|
|
3914
|
+
var o = arguments[n];
|
|
3915
|
+
r(o) && i(t, o);
|
|
3916
|
+
}
|
|
3917
|
+
return t;
|
|
3918
|
+
};
|
|
3919
|
+
}, function (t, e, n) {
|
|
3920
|
+
|
|
3921
|
+
t.exports = function (t) {
|
|
3922
|
+
return void 0 !== t && null !== t && ("object" == typeof t || "function" == typeof t);
|
|
3923
|
+
};
|
|
3924
|
+
}, function (t, e, n) {
|
|
3925
|
+
|
|
3926
|
+
t.exports = function (t, e, n, r, i) {
|
|
3927
|
+
var o = "true" === t.getAttribute("aria-selected"),
|
|
3928
|
+
u = e.announcement.selected,
|
|
3929
|
+
s = t.innerText;
|
|
3930
|
+
s = r && e.announcement && e.announcement.groupChange ? e.announcement.groupChange(i) + " " + s : s, n(s = o && u ? s + " " + u : s, 500);
|
|
3931
|
+
};
|
|
3932
|
+
}]);
|
|
3933
|
+
});
|
|
3934
|
+
}(dist));
|
|
3935
|
+
|
|
3936
|
+
var Combobo = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
3937
|
+
|
|
3938
|
+
const countries = [{
|
|
3939
|
+
"name": "Afghanistan",
|
|
3940
|
+
"code": "AF",
|
|
3941
|
+
"flag": "🇦🇫"
|
|
3942
|
+
}, {
|
|
3943
|
+
"name": "Egypt",
|
|
3944
|
+
"code": "EG",
|
|
3945
|
+
"flag": "🇪🇬"
|
|
3946
|
+
}, {
|
|
3947
|
+
"name": "Åland Islands",
|
|
3948
|
+
"code": "AX",
|
|
3949
|
+
"flag": "🇦🇽"
|
|
3950
|
+
}, {
|
|
3951
|
+
"name": "Albania",
|
|
3952
|
+
"code": "AL",
|
|
3953
|
+
"flag": "🇦🇱"
|
|
3954
|
+
}, {
|
|
3955
|
+
"name": "Algeria",
|
|
3956
|
+
"code": "DZ",
|
|
3957
|
+
"flag": "🇩🇿"
|
|
3958
|
+
}, {
|
|
3959
|
+
"name": "American Samoa",
|
|
3960
|
+
"code": "AS",
|
|
3961
|
+
"flag": "🇦🇸"
|
|
3962
|
+
}, {
|
|
3963
|
+
"name": "Andorra",
|
|
3964
|
+
"code": "AD",
|
|
3965
|
+
"flag": "🇦🇩"
|
|
3966
|
+
}, {
|
|
3967
|
+
"name": "Angola",
|
|
3968
|
+
"code": "AO",
|
|
3969
|
+
"flag": "🇦🇴"
|
|
3970
|
+
}, {
|
|
3971
|
+
"name": "Anguilla",
|
|
3972
|
+
"code": "AI",
|
|
3973
|
+
"flag": "🇦🇮"
|
|
3974
|
+
}, {
|
|
3975
|
+
"name": "Antarctica",
|
|
3976
|
+
"code": "AQ",
|
|
3977
|
+
"flag": "🇦🇶"
|
|
3978
|
+
}, {
|
|
3979
|
+
"name": "Antigua and Barbuda",
|
|
3980
|
+
"code": "AG",
|
|
3981
|
+
"flag": "🇦🇬"
|
|
3982
|
+
}, {
|
|
3983
|
+
"name": "Equatorial Guinea",
|
|
3984
|
+
"code": "GQ",
|
|
3985
|
+
"flag": "🇬🇶"
|
|
3986
|
+
}, {
|
|
3987
|
+
"name": "Argentina",
|
|
3988
|
+
"code": "AR",
|
|
3989
|
+
"flag": "🇦🇷"
|
|
3990
|
+
}, {
|
|
3991
|
+
"name": "Armenia",
|
|
3992
|
+
"code": "AM",
|
|
3993
|
+
"flag": "🇦🇲"
|
|
3994
|
+
}, {
|
|
3995
|
+
"name": "Aruba",
|
|
3996
|
+
"code": "AW",
|
|
3997
|
+
"flag": "🇦🇼"
|
|
3998
|
+
}, {
|
|
3999
|
+
"name": "Azerbaijan",
|
|
4000
|
+
"code": "AZ",
|
|
4001
|
+
"flag": "🇦🇿"
|
|
4002
|
+
}, {
|
|
4003
|
+
"name": "Ethiopia",
|
|
4004
|
+
"code": "ET",
|
|
4005
|
+
"flag": "🇪🇹"
|
|
4006
|
+
}, {
|
|
4007
|
+
"name": "Australia",
|
|
4008
|
+
"code": "AU",
|
|
4009
|
+
"flag": "🇦🇺"
|
|
4010
|
+
}, {
|
|
4011
|
+
"name": "Bahamas",
|
|
4012
|
+
"code": "BS",
|
|
4013
|
+
"flag": "🇧🇸"
|
|
4014
|
+
}, {
|
|
4015
|
+
"name": "Bahrain",
|
|
4016
|
+
"code": "BH",
|
|
4017
|
+
"flag": "🇧🇭"
|
|
4018
|
+
}, {
|
|
4019
|
+
"name": "Bangladesh",
|
|
4020
|
+
"code": "BD",
|
|
4021
|
+
"flag": "🇧🇩"
|
|
4022
|
+
}, {
|
|
4023
|
+
"name": "Barbados",
|
|
4024
|
+
"code": "BB",
|
|
4025
|
+
"flag": "🇧🇧"
|
|
4026
|
+
}, {
|
|
4027
|
+
"name": "Belarus",
|
|
4028
|
+
"code": "BY",
|
|
4029
|
+
"flag": "🇧🇾"
|
|
4030
|
+
}, {
|
|
4031
|
+
"name": "Belgium",
|
|
4032
|
+
"code": "BE",
|
|
4033
|
+
"flag": "🇧🇪"
|
|
4034
|
+
}, {
|
|
4035
|
+
"name": "Belize",
|
|
4036
|
+
"code": "BZ",
|
|
4037
|
+
"flag": "🇧🇿"
|
|
4038
|
+
}, {
|
|
4039
|
+
"name": "Benin",
|
|
4040
|
+
"code": "BJ",
|
|
4041
|
+
"flag": "🇧🇯"
|
|
4042
|
+
}, {
|
|
4043
|
+
"name": "Bermuda",
|
|
4044
|
+
"code": "BM",
|
|
4045
|
+
"flag": "🇧🇲"
|
|
4046
|
+
}, {
|
|
4047
|
+
"name": "Bhutan",
|
|
4048
|
+
"code": "BT",
|
|
4049
|
+
"flag": "🇧🇹"
|
|
4050
|
+
}, {
|
|
4051
|
+
"name": "Bolivia",
|
|
4052
|
+
"flag": "🇧🇴"
|
|
4053
|
+
}, {
|
|
4054
|
+
"name": "Bosnia and Herzegovina",
|
|
4055
|
+
"code": "BA",
|
|
4056
|
+
"flag": "🇧🇦"
|
|
4057
|
+
}, {
|
|
4058
|
+
"name": "Botswana",
|
|
4059
|
+
"code": "BW",
|
|
4060
|
+
"flag": "🇧🇼"
|
|
4061
|
+
}, {
|
|
4062
|
+
"name": "Bouvet Island",
|
|
4063
|
+
"code": "BV",
|
|
4064
|
+
"flag": "🇧🇻"
|
|
4065
|
+
}, {
|
|
4066
|
+
"name": "Brazil",
|
|
4067
|
+
"code": "BR",
|
|
4068
|
+
"flag": "🇧🇷"
|
|
4069
|
+
}, {
|
|
4070
|
+
"name": "British Indian Ocean Territory",
|
|
4071
|
+
"code": "IO",
|
|
4072
|
+
"flag": "🇮🇴"
|
|
4073
|
+
}, {
|
|
4074
|
+
"name": "Brunei",
|
|
4075
|
+
"code": "BN",
|
|
4076
|
+
"flag": "🇧🇳"
|
|
4077
|
+
}, {
|
|
4078
|
+
"name": "Bulgaria",
|
|
4079
|
+
"code": "BG",
|
|
4080
|
+
"flag": "🇧🇬"
|
|
4081
|
+
}, {
|
|
4082
|
+
"name": "Burkina Faso",
|
|
4083
|
+
"code": "BF",
|
|
4084
|
+
"flag": "🇧🇫"
|
|
4085
|
+
}, {
|
|
4086
|
+
"name": "Burundi",
|
|
4087
|
+
"code": "BI",
|
|
4088
|
+
"flag": "🇧🇮"
|
|
4089
|
+
}, {
|
|
4090
|
+
"name": "Chile",
|
|
4091
|
+
"code": "CL",
|
|
4092
|
+
"flag": "🇨🇱"
|
|
4093
|
+
}, {
|
|
4094
|
+
"name": "China",
|
|
4095
|
+
"code": "CN",
|
|
4096
|
+
"flag": "🇨🇳"
|
|
4097
|
+
}, {
|
|
4098
|
+
"name": "Cook Islands",
|
|
4099
|
+
"code": "CK",
|
|
4100
|
+
"flag": "🇨🇰"
|
|
4101
|
+
}, {
|
|
4102
|
+
"name": "Costa Rica",
|
|
4103
|
+
"code": "CR",
|
|
4104
|
+
"flag": "🇨🇷"
|
|
4105
|
+
}, {
|
|
4106
|
+
"name": "Curacao",
|
|
4107
|
+
"code": "CW",
|
|
4108
|
+
"flag": "🇨🇼"
|
|
4109
|
+
}, {
|
|
4110
|
+
"name": "Denmark",
|
|
4111
|
+
"code": "DK",
|
|
4112
|
+
"flag": "🇩🇰"
|
|
4113
|
+
}, {
|
|
4114
|
+
"name": "Democratic Republic of the Congo",
|
|
4115
|
+
"code": "CD",
|
|
4116
|
+
"flag": "🇨🇩"
|
|
4117
|
+
}, {
|
|
4118
|
+
"name": "Germany",
|
|
4119
|
+
"code": "DE",
|
|
4120
|
+
"flag": "🇩🇪"
|
|
4121
|
+
}, {
|
|
4122
|
+
"name": "Dominica",
|
|
4123
|
+
"code": "DM",
|
|
4124
|
+
"flag": "🇩🇲"
|
|
4125
|
+
}, {
|
|
4126
|
+
"name": "Dominican Republic",
|
|
4127
|
+
"code": "DO",
|
|
4128
|
+
"flag": "🇩🇴"
|
|
4129
|
+
}, {
|
|
4130
|
+
"name": "Djibouti",
|
|
4131
|
+
"code": "DJ",
|
|
4132
|
+
"flag": "🇩🇯"
|
|
4133
|
+
}, {
|
|
4134
|
+
"name": "Ecuador",
|
|
4135
|
+
"code": "EC",
|
|
4136
|
+
"flag": "🇪🇨"
|
|
4137
|
+
}, {
|
|
4138
|
+
"name": "El Salvador",
|
|
4139
|
+
"code": "SV",
|
|
4140
|
+
"flag": "🇸🇻"
|
|
4141
|
+
}, {
|
|
4142
|
+
"name": "Ivory Coast",
|
|
4143
|
+
"code": "CI",
|
|
4144
|
+
"flag": "🇨🇮"
|
|
4145
|
+
}, {
|
|
4146
|
+
"name": "Eritrea",
|
|
4147
|
+
"code": "ER",
|
|
4148
|
+
"flag": "🇪🇷"
|
|
4149
|
+
}, {
|
|
4150
|
+
"name": "Estonia",
|
|
4151
|
+
"code": "EE",
|
|
4152
|
+
"flag": "🇪🇪"
|
|
4153
|
+
}, {
|
|
4154
|
+
"name": "Eswatini",
|
|
4155
|
+
"code": "SZ",
|
|
4156
|
+
"flag": "🇸🇿"
|
|
4157
|
+
}, {
|
|
4158
|
+
"name": "Falkland Islands",
|
|
4159
|
+
"code": "FK",
|
|
4160
|
+
"flag": "🇫🇰"
|
|
4161
|
+
}, {
|
|
4162
|
+
"name": "Faroe Islands",
|
|
4163
|
+
"code": "FO",
|
|
4164
|
+
"flag": "🇫🇴"
|
|
4165
|
+
}, {
|
|
4166
|
+
"name": "Fiji",
|
|
4167
|
+
"code": "FJ",
|
|
4168
|
+
"flag": "🇫🇯"
|
|
4169
|
+
}, {
|
|
4170
|
+
"name": "Finland",
|
|
4171
|
+
"code": "FI",
|
|
4172
|
+
"flag": "🇫🇮"
|
|
4173
|
+
}, {
|
|
4174
|
+
"name": "Federated States of Micronesia",
|
|
4175
|
+
"code": "FM",
|
|
4176
|
+
"flag": "🇫🇲"
|
|
4177
|
+
}, {
|
|
4178
|
+
"name": "France",
|
|
4179
|
+
"code": "FR",
|
|
4180
|
+
"flag": "🇫🇷"
|
|
4181
|
+
}, {
|
|
4182
|
+
"name": "French Guiana",
|
|
4183
|
+
"code": "GF",
|
|
4184
|
+
"flag": "🇬🇫"
|
|
4185
|
+
}, {
|
|
4186
|
+
"name": "French Polynesia",
|
|
4187
|
+
"code": "PF",
|
|
4188
|
+
"flag": "🇵🇫"
|
|
4189
|
+
}, {
|
|
4190
|
+
"name": "French Southern and Antarctic Lands",
|
|
4191
|
+
"code": "TF",
|
|
4192
|
+
"flag": "🇹🇫"
|
|
4193
|
+
}, {
|
|
4194
|
+
"name": "Principality of Monaco",
|
|
4195
|
+
"code": "MC",
|
|
4196
|
+
"flag": "🇲🇨"
|
|
4197
|
+
}, {
|
|
4198
|
+
"name": "Gabon",
|
|
4199
|
+
"code": "GA",
|
|
4200
|
+
"flag": "🇬🇦"
|
|
4201
|
+
}, {
|
|
4202
|
+
"name": "Gambia",
|
|
4203
|
+
"code": "GM",
|
|
4204
|
+
"flag": "🇬🇲"
|
|
4205
|
+
}, {
|
|
4206
|
+
"name": "Georgia",
|
|
4207
|
+
"code": "GE",
|
|
4208
|
+
"flag": "🇬🇪"
|
|
4209
|
+
}, {
|
|
4210
|
+
"name": "Ghana",
|
|
4211
|
+
"code": "GH",
|
|
4212
|
+
"flag": "🇬🇭"
|
|
4213
|
+
}, {
|
|
4214
|
+
"name": "Gibraltar",
|
|
4215
|
+
"code": "GI",
|
|
4216
|
+
"flag": "🇬🇮"
|
|
4217
|
+
}, {
|
|
4218
|
+
"name": "Grenada",
|
|
4219
|
+
"code": "GD",
|
|
4220
|
+
"flag": "🇬🇩"
|
|
4221
|
+
}, {
|
|
4222
|
+
"name": "Greece",
|
|
4223
|
+
"code": "GR",
|
|
4224
|
+
"flag": "🇬🇷"
|
|
4225
|
+
}, {
|
|
4226
|
+
"name": "Greenland",
|
|
4227
|
+
"code": "GL",
|
|
4228
|
+
"flag": "🇬🇱"
|
|
4229
|
+
}, {
|
|
4230
|
+
"name": "Guadeloupe",
|
|
4231
|
+
"code": "GP",
|
|
4232
|
+
"flag": "🇬🇵"
|
|
4233
|
+
}, {
|
|
4234
|
+
"name": "Guam",
|
|
4235
|
+
"code": "GU",
|
|
4236
|
+
"flag": "🇬🇺"
|
|
4237
|
+
}, {
|
|
4238
|
+
"name": "Guatemala",
|
|
4239
|
+
"code": "GT",
|
|
4240
|
+
"flag": "🇬🇹"
|
|
4241
|
+
}, {
|
|
4242
|
+
"name": "Guernsey",
|
|
4243
|
+
"code": "GG",
|
|
4244
|
+
"flag": "🇬🇬"
|
|
4245
|
+
}, {
|
|
4246
|
+
"name": "Guinea",
|
|
4247
|
+
"code": "GN",
|
|
4248
|
+
"flag": "🇬🇳"
|
|
4249
|
+
}, {
|
|
4250
|
+
"name": "Guinea-Bissau",
|
|
4251
|
+
"code": "GW",
|
|
4252
|
+
"flag": "🇬🇼"
|
|
4253
|
+
}, {
|
|
4254
|
+
"name": "Guyana",
|
|
4255
|
+
"code": "GY",
|
|
4256
|
+
"flag": "🇬🇾"
|
|
4257
|
+
}, {
|
|
4258
|
+
"name": "Haiti",
|
|
4259
|
+
"code": "HT",
|
|
4260
|
+
"flag": "🇭🇹"
|
|
4261
|
+
}, {
|
|
4262
|
+
"name": "Heard Island and McDonald Islands",
|
|
4263
|
+
"code": "HM",
|
|
4264
|
+
"flag": "🇭🇲"
|
|
4265
|
+
}, {
|
|
4266
|
+
"name": "Honduras",
|
|
4267
|
+
"code": "HN",
|
|
4268
|
+
"flag": "🇭🇳"
|
|
4269
|
+
}, {
|
|
4270
|
+
"name": "Hong Kong",
|
|
4271
|
+
"code": "HK",
|
|
4272
|
+
"flag": "🇭🇰"
|
|
4273
|
+
}, {
|
|
4274
|
+
"name": "India",
|
|
4275
|
+
"code": "IN",
|
|
4276
|
+
"flag": "🇮🇳"
|
|
4277
|
+
}, {
|
|
4278
|
+
"name": "Indonesia",
|
|
4279
|
+
"code": "ID",
|
|
4280
|
+
"flag": "🇮🇩"
|
|
4281
|
+
}, {
|
|
4282
|
+
"name": "Isle of Man",
|
|
4283
|
+
"code": "IM",
|
|
4284
|
+
"flag": "🇮🇲"
|
|
4285
|
+
}, {
|
|
4286
|
+
"name": "Iraq",
|
|
4287
|
+
"code": "IQ",
|
|
4288
|
+
"flag": "🇮🇶"
|
|
4289
|
+
}, {
|
|
4290
|
+
"name": "Iran",
|
|
4291
|
+
"code": "IR",
|
|
4292
|
+
"flag": "🇮🇷"
|
|
4293
|
+
}, {
|
|
4294
|
+
"name": "Ireland",
|
|
4295
|
+
"code": "IE",
|
|
4296
|
+
"flag": "🇮🇪"
|
|
4297
|
+
}, {
|
|
4298
|
+
"name": "Iceland",
|
|
4299
|
+
"code": "IS",
|
|
4300
|
+
"flag": "🇮🇸"
|
|
4301
|
+
}, {
|
|
4302
|
+
"name": "Israel",
|
|
4303
|
+
"code": "IL",
|
|
4304
|
+
"flag": "🇮🇱"
|
|
4305
|
+
}, {
|
|
4306
|
+
"name": "Italy",
|
|
4307
|
+
"code": "IT",
|
|
4308
|
+
"flag": "🇮🇹"
|
|
4309
|
+
}, {
|
|
4310
|
+
"name": "Jamaica",
|
|
4311
|
+
"code": "JM",
|
|
4312
|
+
"flag": "🇯🇲"
|
|
4313
|
+
}, {
|
|
4314
|
+
"name": "Japan",
|
|
4315
|
+
"code": "JP",
|
|
4316
|
+
"flag": "🇯🇵"
|
|
4317
|
+
}, {
|
|
4318
|
+
"name": "Yemen",
|
|
4319
|
+
"code": "YE",
|
|
4320
|
+
"flag": "🇾🇪"
|
|
4321
|
+
}, {
|
|
4322
|
+
"name": "Jersey",
|
|
4323
|
+
"code": "JE",
|
|
4324
|
+
"flag": "🇯🇪"
|
|
4325
|
+
}, {
|
|
4326
|
+
"name": "Jordan",
|
|
4327
|
+
"code": "JO",
|
|
4328
|
+
"flag": "🇯🇴"
|
|
4329
|
+
}, {
|
|
4330
|
+
"name": "British Virgin Islands",
|
|
4331
|
+
"code": "VG",
|
|
4332
|
+
"flag": "🇻🇬"
|
|
4333
|
+
}, {
|
|
4334
|
+
"name": "Virgin Islands",
|
|
4335
|
+
"code": "VI",
|
|
4336
|
+
"flag": "🇻🇮"
|
|
4337
|
+
}, {
|
|
4338
|
+
"name": "Cayman Islands",
|
|
4339
|
+
"code": "KY",
|
|
4340
|
+
"flag": "🇰🇾"
|
|
4341
|
+
}, {
|
|
4342
|
+
"name": "Cambodia",
|
|
4343
|
+
"code": "KH",
|
|
4344
|
+
"flag": "🇰🇭"
|
|
4345
|
+
}, {
|
|
4346
|
+
"name": "Cameroon",
|
|
4347
|
+
"code": "CM",
|
|
4348
|
+
"flag": "🇨🇲"
|
|
4349
|
+
}, {
|
|
4350
|
+
"name": "Canada",
|
|
4351
|
+
"code": "CA",
|
|
4352
|
+
"flag": "🇨🇦"
|
|
4353
|
+
}, {
|
|
4354
|
+
"name": "Cape Verde",
|
|
4355
|
+
"code": "CV",
|
|
4356
|
+
"flag": "🇨🇻"
|
|
4357
|
+
}, {
|
|
4358
|
+
"name": "Caribbean Netherlands",
|
|
4359
|
+
"code": "BQ",
|
|
4360
|
+
"flag": "🇧🇶"
|
|
4361
|
+
}, {
|
|
4362
|
+
"name": "Kazakhstan",
|
|
4363
|
+
"code": "KZ",
|
|
4364
|
+
"flag": "🇰🇿"
|
|
4365
|
+
}, {
|
|
4366
|
+
"name": "Qatar",
|
|
4367
|
+
"code": "QA",
|
|
4368
|
+
"flag": "🇶🇦"
|
|
4369
|
+
}, {
|
|
4370
|
+
"name": "Kenya",
|
|
4371
|
+
"code": "KE",
|
|
4372
|
+
"flag": "🇰🇪"
|
|
4373
|
+
}, {
|
|
4374
|
+
"name": "Kyrgyzstan",
|
|
4375
|
+
"code": "KG",
|
|
4376
|
+
"flag": "🇰🇬"
|
|
4377
|
+
}, {
|
|
4378
|
+
"name": "Kiribati",
|
|
4379
|
+
"code": "KI",
|
|
4380
|
+
"flag": "🇰🇮"
|
|
4381
|
+
}, {
|
|
4382
|
+
"name": "United States Minor Outlying Islands",
|
|
4383
|
+
"code": "UM",
|
|
4384
|
+
"flag": "🇺🇲"
|
|
4385
|
+
}, {
|
|
4386
|
+
"name": "Cocos (Keeling) Islands",
|
|
4387
|
+
"code": "CC",
|
|
4388
|
+
"flag": "🇨🇨"
|
|
4389
|
+
}, {
|
|
4390
|
+
"name": "Colombia",
|
|
4391
|
+
"code": "CO",
|
|
4392
|
+
"flag": "🇨🇴"
|
|
4393
|
+
}, {
|
|
4394
|
+
"name": "Comoros",
|
|
4395
|
+
"code": "KM",
|
|
4396
|
+
"flag": "🇰🇲"
|
|
4397
|
+
}, {
|
|
4398
|
+
"name": "Kosovo",
|
|
4399
|
+
"code": "XK",
|
|
4400
|
+
"flag": "🇽🇰"
|
|
4401
|
+
}, {
|
|
4402
|
+
"name": "Croatia",
|
|
4403
|
+
"code": "HR",
|
|
4404
|
+
"flag": "🇭🇷"
|
|
4405
|
+
}, {
|
|
4406
|
+
"name": "Cuba",
|
|
4407
|
+
"code": "CU",
|
|
4408
|
+
"flag": "🇨🇺"
|
|
4409
|
+
}, {
|
|
4410
|
+
"name": "Kuwait",
|
|
4411
|
+
"code": "KW",
|
|
4412
|
+
"flag": "🇰🇼"
|
|
4413
|
+
}, {
|
|
4414
|
+
"name": "Laos",
|
|
4415
|
+
"code": "LA",
|
|
4416
|
+
"flag": "🇱🇦"
|
|
4417
|
+
}, {
|
|
4418
|
+
"name": "Lesotho",
|
|
4419
|
+
"code": "LS",
|
|
4420
|
+
"flag": "🇱🇸"
|
|
4421
|
+
}, {
|
|
4422
|
+
"name": "Latvia",
|
|
4423
|
+
"code": "LV",
|
|
4424
|
+
"flag": "🇱🇻"
|
|
4425
|
+
}, {
|
|
4426
|
+
"name": "Lebanon",
|
|
4427
|
+
"code": "LB",
|
|
4428
|
+
"flag": "🇱🇧"
|
|
4429
|
+
}, {
|
|
4430
|
+
"name": "Liberia",
|
|
4431
|
+
"code": "LR",
|
|
4432
|
+
"flag": "🇱🇷"
|
|
4433
|
+
}, {
|
|
4434
|
+
"name": "Libya",
|
|
4435
|
+
"code": "LY",
|
|
4436
|
+
"flag": "🇱🇾"
|
|
4437
|
+
}, {
|
|
4438
|
+
"name": "Liechtenstein",
|
|
4439
|
+
"code": "LI",
|
|
4440
|
+
"flag": "🇱🇮"
|
|
4441
|
+
}, {
|
|
4442
|
+
"name": "Lithuania",
|
|
4443
|
+
"code": "LT",
|
|
4444
|
+
"flag": "🇱🇹"
|
|
4445
|
+
}, {
|
|
4446
|
+
"name": "Luxembourg",
|
|
4447
|
+
"code": "LU",
|
|
4448
|
+
"flag": "🇱🇺"
|
|
4449
|
+
}, {
|
|
4450
|
+
"name": "Macao",
|
|
4451
|
+
"code": "MO",
|
|
4452
|
+
"flag": "🇲🇴"
|
|
4453
|
+
}, {
|
|
4454
|
+
"name": "Madagascar",
|
|
4455
|
+
"code": "MG",
|
|
4456
|
+
"flag": "🇲🇬"
|
|
4457
|
+
}, {
|
|
4458
|
+
"name": "Malawi",
|
|
4459
|
+
"code": "MW",
|
|
4460
|
+
"flag": "🇲🇼"
|
|
4461
|
+
}, {
|
|
4462
|
+
"name": "Malaysia",
|
|
4463
|
+
"code": "MY",
|
|
4464
|
+
"flag": "🇲🇾"
|
|
4465
|
+
}, {
|
|
4466
|
+
"name": "Maldives",
|
|
4467
|
+
"code": "MV",
|
|
4468
|
+
"flag": "🇲🇻"
|
|
4469
|
+
}, {
|
|
4470
|
+
"name": "Mali",
|
|
4471
|
+
"code": "ML",
|
|
4472
|
+
"flag": "🇲🇱"
|
|
4473
|
+
}, {
|
|
4474
|
+
"name": "Malta",
|
|
4475
|
+
"code": "MT",
|
|
4476
|
+
"flag": "🇲🇹"
|
|
4477
|
+
}, {
|
|
4478
|
+
"name": "Morocco",
|
|
4479
|
+
"code": "MA",
|
|
4480
|
+
"flag": "🇲🇦"
|
|
4481
|
+
}, {
|
|
4482
|
+
"name": "Marshall Islands",
|
|
4483
|
+
"code": "MH",
|
|
4484
|
+
"flag": "🇲🇭"
|
|
4485
|
+
}, {
|
|
4486
|
+
"name": "Martinique",
|
|
4487
|
+
"code": "MQ",
|
|
4488
|
+
"flag": "🇲🇶"
|
|
4489
|
+
}, {
|
|
4490
|
+
"name": "Mauritania",
|
|
4491
|
+
"code": "MR",
|
|
4492
|
+
"flag": "🇲🇷"
|
|
4493
|
+
}, {
|
|
4494
|
+
"name": "Mauritius",
|
|
4495
|
+
"code": "MU",
|
|
4496
|
+
"flag": "🇲🇺"
|
|
4497
|
+
}, {
|
|
4498
|
+
"name": "Mayotte",
|
|
4499
|
+
"code": "YT",
|
|
4500
|
+
"flag": "🇾🇹"
|
|
4501
|
+
}, {
|
|
4502
|
+
"name": "Mexico",
|
|
4503
|
+
"code": "MX",
|
|
4504
|
+
"flag": "🇲🇽"
|
|
4505
|
+
}, {
|
|
4506
|
+
"name": "Moldova",
|
|
4507
|
+
"code": "MD",
|
|
4508
|
+
"flag": "🇲🇩"
|
|
4509
|
+
}, {
|
|
4510
|
+
"name": "Mongolia",
|
|
4511
|
+
"code": "MN",
|
|
4512
|
+
"flag": "🇲🇳"
|
|
4513
|
+
}, {
|
|
4514
|
+
"name": "Montenegro",
|
|
4515
|
+
"code": "ME",
|
|
4516
|
+
"flag": "🇲🇪"
|
|
4517
|
+
}, {
|
|
4518
|
+
"name": "Montserrat",
|
|
4519
|
+
"code": "MS",
|
|
4520
|
+
"flag": "🇲🇸"
|
|
4521
|
+
}, {
|
|
4522
|
+
"name": "Mozambique",
|
|
4523
|
+
"code": "MZ",
|
|
4524
|
+
"flag": "🇲🇿"
|
|
4525
|
+
}, {
|
|
4526
|
+
"name": "Myanmar",
|
|
4527
|
+
"code": "MM",
|
|
4528
|
+
"flag": "🇲🇲"
|
|
4529
|
+
}, {
|
|
4530
|
+
"name": "Namibia",
|
|
4531
|
+
"code": "NA",
|
|
4532
|
+
"flag": "🇳🇦"
|
|
4533
|
+
}, {
|
|
4534
|
+
"name": "Nauru",
|
|
4535
|
+
"code": "NR",
|
|
4536
|
+
"flag": "🇳🇷"
|
|
4537
|
+
}, {
|
|
4538
|
+
"name": "Nepal",
|
|
4539
|
+
"code": "NP",
|
|
4540
|
+
"flag": "🇳🇵"
|
|
4541
|
+
}, {
|
|
4542
|
+
"name": "New Caledonia",
|
|
4543
|
+
"code": "NC",
|
|
4544
|
+
"flag": "🇳🇨"
|
|
4545
|
+
}, {
|
|
4546
|
+
"name": "New Zealand",
|
|
4547
|
+
"code": "NZ",
|
|
4548
|
+
"flag": "🇳🇿"
|
|
4549
|
+
}, {
|
|
4550
|
+
"name": "Nicaragua",
|
|
4551
|
+
"code": "NI",
|
|
4552
|
+
"flag": "🇳🇮"
|
|
4553
|
+
}, {
|
|
4554
|
+
"name": "Netherlands",
|
|
4555
|
+
"code": "NL",
|
|
4556
|
+
"flag": "🇳🇱"
|
|
4557
|
+
}, {
|
|
4558
|
+
"name": "Niger",
|
|
4559
|
+
"code": "NE",
|
|
4560
|
+
"flag": "🇳🇪"
|
|
4561
|
+
}, {
|
|
4562
|
+
"name": "Nigeria",
|
|
4563
|
+
"code": "NG",
|
|
4564
|
+
"flag": "🇳🇬"
|
|
4565
|
+
}, {
|
|
4566
|
+
"name": "Niue",
|
|
4567
|
+
"code": "NU",
|
|
4568
|
+
"flag": "🇳🇺"
|
|
4569
|
+
}, {
|
|
4570
|
+
"name": "North Korea",
|
|
4571
|
+
"code": "KP",
|
|
4572
|
+
"flag": "🇰🇵"
|
|
4573
|
+
}, {
|
|
4574
|
+
"name": "Northern Mariana Islands",
|
|
4575
|
+
"code": "MP",
|
|
4576
|
+
"flag": "🇲🇵"
|
|
4577
|
+
}, {
|
|
4578
|
+
"name": "North Macedonia",
|
|
4579
|
+
"code": "MK",
|
|
4580
|
+
"flag": "🇲🇰"
|
|
4581
|
+
}, {
|
|
4582
|
+
"name": "Norfolk Island",
|
|
4583
|
+
"code": "NF",
|
|
4584
|
+
"flag": "🇳🇫"
|
|
4585
|
+
}, {
|
|
4586
|
+
"name": "Norway",
|
|
4587
|
+
"code": "NO",
|
|
4588
|
+
"flag": "🇳🇴"
|
|
4589
|
+
}, {
|
|
4590
|
+
"name": "Oman",
|
|
4591
|
+
"code": "OM",
|
|
4592
|
+
"flag": "🇴🇲"
|
|
4593
|
+
}, {
|
|
4594
|
+
"name": "Austria",
|
|
4595
|
+
"code": "AT",
|
|
4596
|
+
"flag": "🇦🇹"
|
|
4597
|
+
}, {
|
|
4598
|
+
"name": "East Timor",
|
|
4599
|
+
"code": "TL",
|
|
4600
|
+
"flag": "🇹🇱"
|
|
4601
|
+
}, {
|
|
4602
|
+
"name": "Pakistan",
|
|
4603
|
+
"code": "PK",
|
|
4604
|
+
"flag": "🇵🇰"
|
|
4605
|
+
}, {
|
|
4606
|
+
"name": "Palestine",
|
|
4607
|
+
"code": "PS",
|
|
4608
|
+
"flag": "🇵🇸"
|
|
4609
|
+
}, {
|
|
4610
|
+
"name": "Palau",
|
|
4611
|
+
"code": "PW",
|
|
4612
|
+
"flag": "🇵🇼"
|
|
4613
|
+
}, {
|
|
4614
|
+
"name": "Panama",
|
|
4615
|
+
"code": "PA",
|
|
4616
|
+
"flag": "🇵🇦"
|
|
4617
|
+
}, {
|
|
4618
|
+
"name": "Papua New Guinea",
|
|
4619
|
+
"code": "PG",
|
|
4620
|
+
"flag": "🇵🇬"
|
|
4621
|
+
}, {
|
|
4622
|
+
"name": "Paraguay",
|
|
4623
|
+
"code": "PY",
|
|
4624
|
+
"flag": "🇵🇾"
|
|
4625
|
+
}, {
|
|
4626
|
+
"name": "Peru",
|
|
4627
|
+
"code": "PE",
|
|
4628
|
+
"flag": "🇵🇪"
|
|
4629
|
+
}, {
|
|
4630
|
+
"name": "Philippines",
|
|
4631
|
+
"code": "PH",
|
|
4632
|
+
"flag": "🇵🇭"
|
|
4633
|
+
}, {
|
|
4634
|
+
"name": "Pitcairn Islands",
|
|
4635
|
+
"code": "PN",
|
|
4636
|
+
"flag": "🇵🇳"
|
|
4637
|
+
}, {
|
|
4638
|
+
"name": "Poland",
|
|
4639
|
+
"code": "PL",
|
|
4640
|
+
"flag": "🇵🇱"
|
|
4641
|
+
}, {
|
|
4642
|
+
"name": "Portugal",
|
|
4643
|
+
"code": "PT",
|
|
4644
|
+
"flag": "🇵🇹"
|
|
4645
|
+
}, {
|
|
4646
|
+
"name": "Puerto Rico",
|
|
4647
|
+
"code": "PR",
|
|
4648
|
+
"flag": "🇵🇷"
|
|
4649
|
+
}, {
|
|
4650
|
+
"name": "Republic of the Congo",
|
|
4651
|
+
"code": "CG",
|
|
4652
|
+
"flag": "🇨🇬"
|
|
4653
|
+
}, {
|
|
4654
|
+
"name": "Reunion",
|
|
4655
|
+
"code": "RE",
|
|
4656
|
+
"flag": "🇷🇪"
|
|
4657
|
+
}, {
|
|
4658
|
+
"name": "Rwanda",
|
|
4659
|
+
"code": "RW",
|
|
4660
|
+
"flag": "🇷🇼"
|
|
4661
|
+
}, {
|
|
4662
|
+
"name": "Romania",
|
|
4663
|
+
"code": "RO",
|
|
4664
|
+
"flag": "🇷🇴"
|
|
4665
|
+
}, {
|
|
4666
|
+
"name": "Russia",
|
|
4667
|
+
"code": "RU",
|
|
4668
|
+
"flag": "🇷🇺"
|
|
4669
|
+
}, {
|
|
4670
|
+
"name": "Saint Martin",
|
|
4671
|
+
"code": "MF",
|
|
4672
|
+
"flag": "🇲🇫"
|
|
4673
|
+
}, {
|
|
4674
|
+
"name": "Solomon Islands",
|
|
4675
|
+
"code": "SB",
|
|
4676
|
+
"flag": "🇸🇧"
|
|
4677
|
+
}, {
|
|
4678
|
+
"name": "Zambia",
|
|
4679
|
+
"code": "ZM",
|
|
4680
|
+
"flag": "🇿🇲"
|
|
4681
|
+
}, {
|
|
4682
|
+
"name": "Samoa",
|
|
4683
|
+
"code": "WS",
|
|
4684
|
+
"flag": "🇼🇸"
|
|
4685
|
+
}, {
|
|
4686
|
+
"name": "San Marino",
|
|
4687
|
+
"code": "SM",
|
|
4688
|
+
"flag": "🇸🇲"
|
|
4689
|
+
}, {
|
|
4690
|
+
"name": "Saint Barthelemy",
|
|
4691
|
+
"code": "BL",
|
|
4692
|
+
"flag": "🇧🇱"
|
|
4693
|
+
}, {
|
|
4694
|
+
"name": "Sao Tome and Principe",
|
|
4695
|
+
"code": "ST",
|
|
4696
|
+
"flag": "🇸🇹"
|
|
4697
|
+
}, {
|
|
4698
|
+
"name": "Saudi Arabia",
|
|
4699
|
+
"code": "SA",
|
|
4700
|
+
"flag": "🇸🇦"
|
|
4701
|
+
}, {
|
|
4702
|
+
"name": "Sweden",
|
|
4703
|
+
"code": "SE",
|
|
4704
|
+
"flag": "🇸🇪"
|
|
4705
|
+
}, {
|
|
4706
|
+
"name": "Switzerland",
|
|
4707
|
+
"code": "CH",
|
|
4708
|
+
"flag": "🇨🇭"
|
|
4709
|
+
}, {
|
|
4710
|
+
"name": "Senegal",
|
|
4711
|
+
"code": "SN",
|
|
4712
|
+
"flag": "🇸🇳"
|
|
4713
|
+
}, {
|
|
4714
|
+
"name": "Serbia",
|
|
4715
|
+
"code": "RS",
|
|
4716
|
+
"flag": "🇷🇸"
|
|
4717
|
+
}, {
|
|
4718
|
+
"name": "Seychelles",
|
|
4719
|
+
"code": "SC",
|
|
4720
|
+
"flag": "🇸🇨"
|
|
4721
|
+
}, {
|
|
4722
|
+
"name": "Sierra Leone",
|
|
4723
|
+
"code": "SL",
|
|
4724
|
+
"flag": "🇸🇱"
|
|
4725
|
+
}, {
|
|
4726
|
+
"name": "Zimbabwe",
|
|
4727
|
+
"code": "ZW",
|
|
4728
|
+
"flag": "🇿🇼"
|
|
4729
|
+
}, {
|
|
4730
|
+
"name": "Singapore",
|
|
4731
|
+
"code": "SG",
|
|
4732
|
+
"flag": "🇸🇬"
|
|
4733
|
+
}, {
|
|
4734
|
+
"name": "Sint Maarten",
|
|
4735
|
+
"code": "SX",
|
|
4736
|
+
"flag": "🇸🇽"
|
|
4737
|
+
}, {
|
|
4738
|
+
"name": "Slovakia",
|
|
4739
|
+
"code": "SK",
|
|
4740
|
+
"flag": "🇸🇰"
|
|
4741
|
+
}, {
|
|
4742
|
+
"name": "Slovenia",
|
|
4743
|
+
"code": "SI",
|
|
4744
|
+
"flag": "🇸🇮"
|
|
4745
|
+
}, {
|
|
4746
|
+
"name": "Somalia",
|
|
4747
|
+
"code": "SO",
|
|
4748
|
+
"flag": "🇸🇴"
|
|
4749
|
+
}, {
|
|
4750
|
+
"name": "Spain",
|
|
4751
|
+
"code": "ES",
|
|
4752
|
+
"flag": "🇪🇸"
|
|
4753
|
+
}, {
|
|
4754
|
+
"name": "Sri Lanka",
|
|
4755
|
+
"code": "LK",
|
|
4756
|
+
"flag": "🇱🇰"
|
|
4757
|
+
}, {
|
|
4758
|
+
"name": "Saint Helena, Ascension and Tristan da Cunha",
|
|
4759
|
+
"code": "SH",
|
|
4760
|
+
"flag": "🇸🇭"
|
|
4761
|
+
}, {
|
|
4762
|
+
"name": "Saint Kitts and Nevis",
|
|
4763
|
+
"code": "KN",
|
|
4764
|
+
"flag": "🇰🇳"
|
|
4765
|
+
}, {
|
|
4766
|
+
"name": "Saint Lucia",
|
|
4767
|
+
"code": "LC",
|
|
4768
|
+
"flag": "🇱🇨"
|
|
4769
|
+
}, {
|
|
4770
|
+
"name": "Saint Pierre and Miquelon",
|
|
4771
|
+
"code": "PM",
|
|
4772
|
+
"flag": "🇵🇲"
|
|
4773
|
+
}, {
|
|
4774
|
+
"name": "Saint Vincent and the Grenadines",
|
|
4775
|
+
"code": "VC",
|
|
4776
|
+
"flag": "🇻🇨"
|
|
4777
|
+
}, {
|
|
4778
|
+
"name": "South Africa",
|
|
4779
|
+
"code": "ZA",
|
|
4780
|
+
"flag": "🇿🇦"
|
|
4781
|
+
}, {
|
|
4782
|
+
"name": "Sudan",
|
|
4783
|
+
"code": "SD",
|
|
4784
|
+
"flag": "🇸🇩"
|
|
4785
|
+
}, {
|
|
4786
|
+
"name": "South Georgia and South Sandwich Islands",
|
|
4787
|
+
"code": "GS",
|
|
4788
|
+
"flag": "🇬🇸"
|
|
4789
|
+
}, {
|
|
4790
|
+
"name": "South Korea",
|
|
4791
|
+
"code": "KR",
|
|
4792
|
+
"flag": "🇰🇷"
|
|
4793
|
+
}, {
|
|
4794
|
+
"name": "South Sudan",
|
|
4795
|
+
"code": "SS",
|
|
4796
|
+
"flag": "🇸🇸"
|
|
4797
|
+
}, {
|
|
4798
|
+
"name": "Suriname",
|
|
4799
|
+
"code": "SR",
|
|
4800
|
+
"flag": "🇸🇷"
|
|
4801
|
+
}, {
|
|
4802
|
+
"name": "Svalbard",
|
|
4803
|
+
"code": "SJ",
|
|
4804
|
+
"flag": "🇸🇯"
|
|
4805
|
+
}, {
|
|
4806
|
+
"name": "Syria",
|
|
4807
|
+
"code": "SY",
|
|
4808
|
+
"flag": "🇸🇾"
|
|
4809
|
+
}, {
|
|
4810
|
+
"name": "Tajikistan",
|
|
4811
|
+
"code": "TJ",
|
|
4812
|
+
"flag": "🇹🇯"
|
|
4813
|
+
}, {
|
|
4814
|
+
"name": "Taiwan",
|
|
4815
|
+
"code": "TW",
|
|
4816
|
+
"flag": "🇹🇼"
|
|
4817
|
+
}, {
|
|
4818
|
+
"name": "Tanzania",
|
|
4819
|
+
"code": "TZ",
|
|
4820
|
+
"flag": "🇹🇿"
|
|
4821
|
+
}, {
|
|
4822
|
+
"name": "Thailand",
|
|
4823
|
+
"code": "TH",
|
|
4824
|
+
"flag": "🇹🇭"
|
|
4825
|
+
}, {
|
|
4826
|
+
"name": "Togo",
|
|
4827
|
+
"code": "TG",
|
|
4828
|
+
"flag": "🇹🇬"
|
|
4829
|
+
}, {
|
|
4830
|
+
"name": "Tokelau",
|
|
4831
|
+
"code": "TK",
|
|
4832
|
+
"flag": "🇹🇰"
|
|
4833
|
+
}, {
|
|
4834
|
+
"name": "Tonga",
|
|
4835
|
+
"code": "TO",
|
|
4836
|
+
"flag": "🇹🇴"
|
|
4837
|
+
}, {
|
|
4838
|
+
"name": "Trinidad and Tobago",
|
|
4839
|
+
"code": "TT",
|
|
4840
|
+
"flag": "🇹🇹"
|
|
4841
|
+
}, {
|
|
4842
|
+
"name": "Chad",
|
|
4843
|
+
"code": "TD",
|
|
4844
|
+
"flag": "🇹🇩"
|
|
4845
|
+
}, {
|
|
4846
|
+
"name": "Czechia",
|
|
4847
|
+
"code": "CZ",
|
|
4848
|
+
"flag": "🇨🇿"
|
|
4849
|
+
}, {
|
|
4850
|
+
"name": "Tunisia",
|
|
4851
|
+
"code": "TN",
|
|
4852
|
+
"flag": "🇹🇳"
|
|
4853
|
+
}, {
|
|
4854
|
+
"name": "Turkey",
|
|
4855
|
+
"code": "TR",
|
|
4856
|
+
"flag": "🇹🇷"
|
|
4857
|
+
}, {
|
|
4858
|
+
"name": "Turkmenistan",
|
|
4859
|
+
"code": "TM",
|
|
4860
|
+
"flag": "🇹🇲"
|
|
4861
|
+
}, {
|
|
4862
|
+
"name": "Turks and Caicos Islands",
|
|
4863
|
+
"code": "TC",
|
|
4864
|
+
"flag": "🇹🇨"
|
|
4865
|
+
}, {
|
|
4866
|
+
"name": "Tuvalu",
|
|
4867
|
+
"code": "TV",
|
|
4868
|
+
"flag": "🇹🇻"
|
|
4869
|
+
}, {
|
|
4870
|
+
"name": "Uganda",
|
|
4871
|
+
"code": "UG",
|
|
4872
|
+
"flag": "🇺🇬"
|
|
4873
|
+
}, {
|
|
4874
|
+
"name": "Ukraine",
|
|
4875
|
+
"code": "UA",
|
|
4876
|
+
"flag": "🇺🇦"
|
|
4877
|
+
}, {
|
|
4878
|
+
"name": "Hungary",
|
|
4879
|
+
"code": "HU",
|
|
4880
|
+
"flag": "🇭🇺"
|
|
4881
|
+
}, {
|
|
4882
|
+
"name": "Uruguay",
|
|
4883
|
+
"code": "UY",
|
|
4884
|
+
"flag": "🇺🇾"
|
|
4885
|
+
}, {
|
|
4886
|
+
"name": "Uzbekistan",
|
|
4887
|
+
"code": "UZ",
|
|
4888
|
+
"flag": "🇺🇿"
|
|
4889
|
+
}, {
|
|
4890
|
+
"name": "Vanuatu",
|
|
4891
|
+
"code": "VU",
|
|
4892
|
+
"flag": "🇻🇺"
|
|
4893
|
+
}, {
|
|
4894
|
+
"name": "Vatican City",
|
|
4895
|
+
"code": "VA",
|
|
4896
|
+
"flag": "🇻🇦"
|
|
4897
|
+
}, {
|
|
4898
|
+
"name": "Venezuela",
|
|
4899
|
+
"code": "VE",
|
|
4900
|
+
"flag": "🇻🇪"
|
|
4901
|
+
}, {
|
|
4902
|
+
"name": "United Arab Emirates",
|
|
4903
|
+
"code": "AE",
|
|
4904
|
+
"flag": "🇦🇪"
|
|
4905
|
+
}, {
|
|
4906
|
+
"name": "United States of America",
|
|
4907
|
+
"code": "US",
|
|
4908
|
+
"flag": "🇺🇸"
|
|
4909
|
+
}, {
|
|
4910
|
+
"name": "United Kingdom",
|
|
4911
|
+
"code": "GB",
|
|
4912
|
+
"flag": "🇬🇧"
|
|
4913
|
+
}, {
|
|
4914
|
+
"name": "Vietnam",
|
|
4915
|
+
"code": "VN",
|
|
4916
|
+
"flag": "🇻🇳"
|
|
4917
|
+
}, {
|
|
4918
|
+
"name": "Wallis and Futuna",
|
|
4919
|
+
"code": "WF",
|
|
4920
|
+
"flag": "🇼🇫"
|
|
4921
|
+
}, {
|
|
4922
|
+
"name": "Christmas Island",
|
|
4923
|
+
"code": "CX",
|
|
4924
|
+
"flag": "🇨🇽"
|
|
4925
|
+
}, {
|
|
4926
|
+
"name": "Western Sahara",
|
|
4927
|
+
"code": "EH",
|
|
4928
|
+
"flag": "🇪🇭"
|
|
4929
|
+
}, {
|
|
4930
|
+
"name": "Central African Republic",
|
|
4931
|
+
"code": "CF",
|
|
4932
|
+
"flag": "🇨🇫"
|
|
4933
|
+
}, {
|
|
4934
|
+
"name": "Cyprus",
|
|
4935
|
+
"code": "CY",
|
|
4936
|
+
"flag": "🇨🇾"
|
|
4937
|
+
}];
|
|
4938
|
+
|
|
4939
|
+
const CountrySelect = ({
|
|
4940
|
+
formId,
|
|
4941
|
+
id,
|
|
4942
|
+
label,
|
|
4943
|
+
field,
|
|
4944
|
+
validations,
|
|
4945
|
+
defaultValue,
|
|
4946
|
+
placeholder
|
|
4947
|
+
}) => {
|
|
4948
|
+
const elInputRef = useRef(null);
|
|
4949
|
+
const [country, setCountry] = useState('');
|
|
4950
|
+
const selectFormValidationSent = makeSelectFormValidationSent(formId);
|
|
4951
|
+
const formValidationSent = useSelector(selectFormValidationSent);
|
|
4952
|
+
const [a11yInvalid, setA11yInvalid] = useState('');
|
|
4953
|
+
const isRequired = validations && validations.required ? true : false;
|
|
4954
|
+
useEffect(() => {
|
|
4955
|
+
if (formValidationSent) setA11yInvalid(doA11yValidation(country, field, true));
|
|
4956
|
+
}, [formValidationSent]);
|
|
4957
|
+
const dispatch = useDispatch();
|
|
4958
|
+
const doUpdate = value => {
|
|
4959
|
+
setCountry(value);
|
|
4960
|
+
dispatch(setValue(formId, id, value));
|
|
4961
|
+
setA11yInvalid(doA11yValidation(value, field, formValidationSent));
|
|
4962
|
+
};
|
|
4963
|
+
const onKeyDown = evt => {
|
|
4964
|
+
if (evt.key === 'Enter') {
|
|
4965
|
+
doUpdate(evt.target.value);
|
|
4966
|
+
}
|
|
4967
|
+
};
|
|
4968
|
+
useEffect(() => {
|
|
4969
|
+
if (elInputRef !== null && elInputRef !== void 0 && elInputRef.current) {
|
|
4970
|
+
var _elInputRef$current;
|
|
4971
|
+
const combo = new Combobo({
|
|
4972
|
+
input: elInputRef === null || elInputRef === void 0 ? void 0 : elInputRef.current,
|
|
4973
|
+
list: '.input__countries .input__listbox',
|
|
4974
|
+
noResultsText: 'No countries found.',
|
|
4975
|
+
onSelect: value => {
|
|
4976
|
+
doUpdate(value);
|
|
4977
|
+
},
|
|
4978
|
+
onKeyDown: evt => {
|
|
4979
|
+
if (evt.key === 'Escape') combo.close();
|
|
4980
|
+
}
|
|
4981
|
+
});
|
|
4982
|
+
elInputRef === null || elInputRef === void 0 ? void 0 : (_elInputRef$current = elInputRef.current) === null || _elInputRef$current === void 0 ? void 0 : _elInputRef$current.addEventListener('keydown', onKeyDown);
|
|
4983
|
+
return () => {
|
|
4984
|
+
var _elInputRef$current2;
|
|
4985
|
+
elInputRef === null || elInputRef === void 0 ? void 0 : (_elInputRef$current2 = elInputRef.current) === null || _elInputRef$current2 === void 0 ? void 0 : _elInputRef$current2.removeEventListener('keydown', onKeyDown);
|
|
4986
|
+
if (combo && typeof combo.destroy === 'function') combo.destroy();
|
|
4987
|
+
};
|
|
4988
|
+
}
|
|
4989
|
+
}, []);
|
|
4990
|
+
useEffect(() => {
|
|
4991
|
+
if (defaultValue) {
|
|
4992
|
+
setCountry(defaultValue);
|
|
4993
|
+
dispatch(setValue(formId, id, defaultValue));
|
|
4994
|
+
}
|
|
4995
|
+
}, [defaultValue]);
|
|
4996
|
+
return /*#__PURE__*/React.createElement(CountrySelectStyled, {
|
|
4997
|
+
className: "input__countries"
|
|
4998
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
4999
|
+
className: "input__label",
|
|
5000
|
+
htmlFor: "country-searchable-select"
|
|
5001
|
+
}, label, isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
5002
|
+
className: "label__required"
|
|
5003
|
+
}, "(required)") : /*#__PURE__*/React.createElement("span", {
|
|
5004
|
+
className: "label__optional"
|
|
5005
|
+
}, "(optional)")), /*#__PURE__*/React.createElement("div", {
|
|
5006
|
+
className: "input__wrapper"
|
|
5007
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
5008
|
+
type: "text",
|
|
5009
|
+
placeholder: placeholder,
|
|
5010
|
+
className: "input",
|
|
5011
|
+
id: "country-searchable-select",
|
|
5012
|
+
ref: elInputRef,
|
|
5013
|
+
"aria-invalid": a11yInvalid,
|
|
5014
|
+
defaultValue: defaultValue
|
|
5015
|
+
}), a11yInvalid == 'true' && /*#__PURE__*/React.createElement("svg", {
|
|
5016
|
+
className: "svg",
|
|
5017
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5018
|
+
focusable: "false",
|
|
5019
|
+
"aria-hidden": "true",
|
|
5020
|
+
role: "presentation",
|
|
5021
|
+
width: "16",
|
|
5022
|
+
height: "16",
|
|
5023
|
+
fill: "none"
|
|
5024
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
5025
|
+
fill: "#333",
|
|
5026
|
+
d: "M12.2 3.807a.664.664 0 0 0-.94 0L8 7.06 4.74 3.8a.665.665 0 0 0-.94.94L7.06 8 3.8 11.26a.664.664 0 1 0 .94.94L8 8.94l3.26 3.26a.665.665 0 0 0 .94-.94L8.94 8l3.26-3.26a.668.668 0 0 0 0-.933Z"
|
|
5027
|
+
})), a11yInvalid == 'false' && /*#__PURE__*/React.createElement("svg", {
|
|
5028
|
+
className: "svg",
|
|
5029
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5030
|
+
focusable: "false",
|
|
5031
|
+
"aria-hidden": "true",
|
|
5032
|
+
role: "presentation",
|
|
5033
|
+
width: "16",
|
|
5034
|
+
height: "16",
|
|
5035
|
+
fill: "none"
|
|
5036
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
5037
|
+
fill: "#333",
|
|
5038
|
+
d: "m2 8 4.418 4.667L14 4.659l-1.246-1.326-6.336 6.692-3.18-3.332L2 8Z"
|
|
5039
|
+
})), /*#__PURE__*/React.createElement("ul", {
|
|
5040
|
+
className: "input__listbox",
|
|
5041
|
+
"aria-labelledby": "List of countries"
|
|
5042
|
+
}, countries.map((country, i) => /*#__PURE__*/React.createElement("li", {
|
|
5043
|
+
key: `${country.code}-${i}`,
|
|
5044
|
+
className: "option",
|
|
5045
|
+
onClick: () => doUpdate(country.name),
|
|
5046
|
+
"aria-labelledby": country.name
|
|
5047
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5048
|
+
role: "presentation",
|
|
5049
|
+
style: {
|
|
5050
|
+
display: 'flex',
|
|
5051
|
+
alignItems: 'center'
|
|
5052
|
+
}
|
|
5053
|
+
}, /*#__PURE__*/React.createElement("span", null, country.name, ' ', /*#__PURE__*/React.createElement("span", {
|
|
5054
|
+
"aria-hidden": "true"
|
|
5055
|
+
}, country.flag))))))));
|
|
5056
|
+
};
|
|
5057
|
+
const CountrySelectStyled = styled.div.withConfig({
|
|
5058
|
+
displayName: "country__CountrySelectStyled",
|
|
5059
|
+
componentId: "sc-93yqgk-0"
|
|
5060
|
+
})(["", ";"], () => {
|
|
5061
|
+
return css(["display:flex;flex-direction:column;--semantic-type-1:#01010c;--semantic-background-1:#fff;--semantic-active-background-1:#efefef;--semantic-border-1:#949494;.input__label{margin-bottom:4px;}.input__wrapper{position:relative;}.input__listbox{display:none;position:absolute;top:40px;left:0;width:100%;padding:8px;background:var(--semantic-background-1);z-index:99;text-align:left;overflow-y:auto;border:1px solid var(--semantic-border-1);max-height:400px;}.input__listbox.open{display:block;}.input__listbox .option{padding:8px;cursor:default;display:flex;align-items:center;border:none;width:100%;}.input__listbox .option.selected{color:var(--semantic-type-1);background-color:var(--semantic-active-background-1);}.input__listbox .option.active{color:var(--semantic-type-1);background-color:var(--semantic-active-background-1);}"]);
|
|
5062
|
+
});
|
|
5063
|
+
|
|
1703
5064
|
const FormComposer = ({
|
|
1704
5065
|
fields,
|
|
1705
5066
|
formData,
|
|
@@ -1710,8 +5071,7 @@ const FormComposer = ({
|
|
|
1710
5071
|
defaultLanguage,
|
|
1711
5072
|
errors,
|
|
1712
5073
|
useDefaultTheme,
|
|
1713
|
-
entries
|
|
1714
|
-
setCheckboxValue
|
|
5074
|
+
entries
|
|
1715
5075
|
}) => {
|
|
1716
5076
|
if (!fields || fields.length < 1) return null;
|
|
1717
5077
|
return fields.map((field, idx) => {
|
|
@@ -1783,8 +5143,7 @@ const FormComposer = ({
|
|
|
1783
5143
|
formId: formId,
|
|
1784
5144
|
defaultValue: formData && formData[field.id] || field.default,
|
|
1785
5145
|
type: field.dataType === 'boolean' ? 'single' : 'multiple',
|
|
1786
|
-
useDefaultTheme: useDefaultTheme
|
|
1787
|
-
setCheckboxValue: setCheckboxValue
|
|
5146
|
+
useDefaultTheme: useDefaultTheme
|
|
1788
5147
|
});
|
|
1789
5148
|
}
|
|
1790
5149
|
case 'radio':
|
|
@@ -1854,6 +5213,20 @@ const FormComposer = ({
|
|
|
1854
5213
|
placeholder: field.editor
|
|
1855
5214
|
});
|
|
1856
5215
|
}
|
|
5216
|
+
case 'country':
|
|
5217
|
+
{
|
|
5218
|
+
var _field$default, _field$editor, _field$editor$propert, _field$editor$propert2;
|
|
5219
|
+
return /*#__PURE__*/React.createElement(CountrySelect, {
|
|
5220
|
+
key: `${field.id}-${idx}`,
|
|
5221
|
+
formId: formId,
|
|
5222
|
+
field: field,
|
|
5223
|
+
id: field.id,
|
|
5224
|
+
label: field.name && field.name[defaultLanguage],
|
|
5225
|
+
validations: field.validations,
|
|
5226
|
+
defaultValue: field === null || field === void 0 ? void 0 : (_field$default = field.default) === null || _field$default === void 0 ? void 0 : _field$default[defaultLanguage],
|
|
5227
|
+
placeholder: field === null || field === void 0 ? void 0 : (_field$editor = field.editor) === null || _field$editor === void 0 ? void 0 : (_field$editor$propert = _field$editor.properties) === null || _field$editor$propert === void 0 ? void 0 : (_field$editor$propert2 = _field$editor$propert.placeholderText) === null || _field$editor$propert2 === void 0 ? void 0 : _field$editor$propert2[defaultLanguage]
|
|
5228
|
+
});
|
|
5229
|
+
}
|
|
1857
5230
|
}
|
|
1858
5231
|
});
|
|
1859
5232
|
};
|
|
@@ -1867,8 +5240,7 @@ FormComposer.propTypes = {
|
|
|
1867
5240
|
setDateRangeValues: PropTypes.func,
|
|
1868
5241
|
defaultLanguage: PropTypes.string,
|
|
1869
5242
|
errors: PropTypes.array,
|
|
1870
|
-
useDefaultTheme: PropTypes.bool
|
|
1871
|
-
setCheckboxValue: PropTypes.func
|
|
5243
|
+
useDefaultTheme: PropTypes.bool
|
|
1872
5244
|
};
|
|
1873
5245
|
|
|
1874
5246
|
const Loader = ({
|
|
@@ -1929,7 +5301,7 @@ const Button = ({
|
|
|
1929
5301
|
useDefaultTheme
|
|
1930
5302
|
}) => {
|
|
1931
5303
|
return /*#__PURE__*/React.createElement(ButtonStyled, {
|
|
1932
|
-
className:
|
|
5304
|
+
className: className,
|
|
1933
5305
|
type: type,
|
|
1934
5306
|
onClick: () => action(),
|
|
1935
5307
|
disabled: loading,
|
|
@@ -1979,7 +5351,6 @@ const Form = ({
|
|
|
1979
5351
|
const dispatch = useDispatch();
|
|
1980
5352
|
const _setFormId = formId => dispatch(setFormId(formId));
|
|
1981
5353
|
const _setValue = (formId, id, value) => dispatch(setValue(formId, id, value));
|
|
1982
|
-
const _setCheckboxValue = (formId, id, value, isChecked) => dispatch(setCheckboxValue(formId, id, value, isChecked));
|
|
1983
5354
|
const _setDateRangeValues = (formId, id, dateType, value) => dispatch(setDateRangeValues(formId, id, dateType, value));
|
|
1984
5355
|
const _onValidateField = (formId, id, value) => dispatch(onValidateField(formId, id, value));
|
|
1985
5356
|
const _doTogglePageForward = (formId, pageIndex) => dispatch(doTogglePageForward(formId, pageIndex));
|
|
@@ -1996,7 +5367,6 @@ const Form = ({
|
|
|
1996
5367
|
const selectFormFieldErrors = makeSelectFormFieldErrors(formId);
|
|
1997
5368
|
const selectFormEntries = makeSelectFormEntries(formId);
|
|
1998
5369
|
const selectFormPostData = makeSelectFormPostData(formId);
|
|
1999
|
-
const selectFormValidationSent = makeSelectFormValidationSent(formId);
|
|
2000
5370
|
const status = useSelector(selectFormStatus);
|
|
2001
5371
|
const fields = useSelector(selectFormFields);
|
|
2002
5372
|
const pagingInfo = useSelector(selectPagingInfo);
|
|
@@ -2005,7 +5375,6 @@ const Form = ({
|
|
|
2005
5375
|
const errors = useSelector(selectFormFieldErrors);
|
|
2006
5376
|
const entries = useSelector(selectFormEntries);
|
|
2007
5377
|
const formData = useSelector(selectFormPostData);
|
|
2008
|
-
const validate = useSelector(selectFormValidationSent);
|
|
2009
5378
|
if (pagingInfo && pagingInfo.pageCount > 1) {
|
|
2010
5379
|
const isLastPage = pagingInfo.pageCount == pagingInfo.pageIndex + 1;
|
|
2011
5380
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
@@ -2014,12 +5383,7 @@ const Form = ({
|
|
|
2014
5383
|
className: className,
|
|
2015
5384
|
id: formId,
|
|
2016
5385
|
useDefaultTheme: useDefaultTheme
|
|
2017
|
-
}, !(status !== null && status !== void 0 && status.hasSuccess) && !(status !== null && status !== void 0 && status.isLoading) && /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
2018
|
-
type: "button",
|
|
2019
|
-
text: "Go Back",
|
|
2020
|
-
action: () => _doTogglePageBack(formId, pagingInfo.pageIndex - 1),
|
|
2021
|
-
useDefaultTheme: useDefaultTheme
|
|
2022
|
-
}), /*#__PURE__*/React.createElement(FormComposer, {
|
|
5386
|
+
}, !(status !== null && status !== void 0 && status.hasSuccess) && !(status !== null && status !== void 0 && status.isLoading) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormComposer, {
|
|
2023
5387
|
fields: fields,
|
|
2024
5388
|
formData: formData,
|
|
2025
5389
|
formId: formId,
|
|
@@ -2030,17 +5394,24 @@ const Form = ({
|
|
|
2030
5394
|
pagingInfo: pagingInfo,
|
|
2031
5395
|
useDefaultTheme: useDefaultTheme,
|
|
2032
5396
|
entries: entries,
|
|
2033
|
-
setDateRangeValues: _setDateRangeValues
|
|
2034
|
-
|
|
5397
|
+
setDateRangeValues: _setDateRangeValues
|
|
5398
|
+
}), pagingInfo.pageIndex > 0 && /*#__PURE__*/React.createElement(Button, {
|
|
5399
|
+
className: "form__btn--prev",
|
|
5400
|
+
type: "button",
|
|
5401
|
+
text: "Go Back",
|
|
5402
|
+
action: () => _doTogglePageBack(formId, pagingInfo.pageIndex - 1),
|
|
5403
|
+
useDefaultTheme: useDefaultTheme
|
|
2035
5404
|
}), !isLastPage && /*#__PURE__*/React.createElement(Button, {
|
|
5405
|
+
className: "form__btn--next",
|
|
2036
5406
|
type: "button",
|
|
2037
5407
|
text: "Next",
|
|
2038
5408
|
action: () => _doTogglePageForward(formId, pagingInfo.pageIndex + 1),
|
|
2039
5409
|
useDefaultTheme: useDefaultTheme
|
|
2040
5410
|
}), isLastPage && /*#__PURE__*/React.createElement(Button, {
|
|
5411
|
+
className: "form__btn--submit",
|
|
2041
5412
|
text: (settings === null || settings === void 0 ? void 0 : settings.submitButtonText) || "Submit",
|
|
2042
5413
|
type: "button",
|
|
2043
|
-
loading: status === null || status === void 0 ? void 0 : status.
|
|
5414
|
+
loading: status === null || status === void 0 ? void 0 : status.isSubmitting,
|
|
2044
5415
|
action: () => {
|
|
2045
5416
|
_onSubmit(formId);
|
|
2046
5417
|
if (onCustomSubmit) onCustomSubmit();
|
|
@@ -2053,7 +5424,7 @@ const Form = ({
|
|
|
2053
5424
|
color: "#333"
|
|
2054
5425
|
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.messages.success) && /*#__PURE__*/React.createElement("p", {
|
|
2055
5426
|
className: "success-message"
|
|
2056
|
-
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 &&
|
|
5427
|
+
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 && /*#__PURE__*/React.createElement("div", {
|
|
2057
5428
|
className: "form__errors",
|
|
2058
5429
|
role: "alert"
|
|
2059
5430
|
}, errors === null || errors === void 0 ? void 0 : errors.map(({
|
|
@@ -2081,9 +5452,9 @@ const Form = ({
|
|
|
2081
5452
|
defaultLanguage: defaultLanguage,
|
|
2082
5453
|
errors: errors,
|
|
2083
5454
|
useDefaultTheme: useDefaultTheme,
|
|
2084
|
-
entries: entries
|
|
2085
|
-
setCheckboxValue: _setCheckboxValue
|
|
5455
|
+
entries: entries
|
|
2086
5456
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
5457
|
+
className: "form__btn--submit",
|
|
2087
5458
|
loading: status === null || status === void 0 ? void 0 : status.isSubmitting,
|
|
2088
5459
|
text: (settings === null || settings === void 0 ? void 0 : settings.submitButtonText) || "Submit",
|
|
2089
5460
|
type: "button",
|
|
@@ -2099,7 +5470,7 @@ const Form = ({
|
|
|
2099
5470
|
color: "#333"
|
|
2100
5471
|
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.messages.success) && /*#__PURE__*/React.createElement("p", {
|
|
2101
5472
|
className: "success-message"
|
|
2102
|
-
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 &&
|
|
5473
|
+
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 && /*#__PURE__*/React.createElement("div", {
|
|
2103
5474
|
className: "form__errors",
|
|
2104
5475
|
role: "alert"
|
|
2105
5476
|
}, errors === null || errors === void 0 ? void 0 : errors.map(({
|