@qite/tide-booking-component 1.4.41 → 1.4.43
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/build/build-cjs/booking-product/components/date-range-picker/calendar-day.d.ts +1 -0
- package/build/build-cjs/booking-wizard/components/step-route.d.ts +0 -1
- package/build/build-cjs/index.js +910 -59
- package/build/build-cjs/qsm/store/qsm-slice.d.ts +1 -1
- package/build/build-esm/booking-product/components/date-range-picker/calendar-day.d.ts +1 -0
- package/build/build-esm/booking-wizard/components/step-route.d.ts +0 -1
- package/build/build-esm/index.js +4356 -3288
- package/build/build-esm/qsm/store/qsm-slice.d.ts +1 -1
- package/package.json +11 -12
- package/src/booking-product/components/date-range-picker/calendar-day.tsx +1 -0
- package/src/booking-wizard/components/step-route.tsx +0 -1
- package/src/booking-wizard/features/booking/booking.tsx +27 -11
- package/src/booking-wizard/features/confirmation/confirmation.tsx +2 -1
- package/src/booking-wizard/features/error/error.tsx +2 -1
- package/src/booking-wizard/features/flight-options/index.tsx +2 -1
- package/src/booking-wizard/features/product-options/options-form.tsx +2 -1
- package/src/booking-wizard/features/room-options/index.tsx +2 -1
- package/src/booking-wizard/features/summary/summary.tsx +7 -3
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +2 -2
- package/src/content/navbar/index.tsx +1 -1
- /package/build/build-cjs/{booking-wizard → src/booking-wizard}/features/booking/booking-self-contained.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/accordion.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/breadcrumb.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/contact.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/faq.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/gallery.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/image-with-text.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/login.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/components/personal-contact-form.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/features/content-page/content-page-self-contained.d.ts +0 -0
- /package/build/build-cjs/{content → src/content}/navbar/placeholderData.d.ts +0 -0
- /package/build/build-cjs/{qsm → src/qsm}/components/date-picker/index.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/components/filters/filters.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/components/flight/flight-banner.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/components/flight/flight-card.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/components/flight/flight-leg.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/components/flight/flight-path.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/features/flights/flight-search-results-self-contained.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/features/hotels/hotel-flight-search-results-self-contained.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/features/hotels/hotel-search-results-self-contained.d.ts +0 -0
- /package/build/build-cjs/{search-results → src/search-results}/features/roundtrips/roundtrip-search-results-self-contained.d.ts +0 -0
- /package/build/build-esm/{booking-wizard → src/booking-wizard}/features/booking/booking-self-contained.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/accordion.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/breadcrumb.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/contact.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/faq.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/gallery.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/image-with-text.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/login.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/components/personal-contact-form.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/features/content-page/content-page-self-contained.d.ts +0 -0
- /package/build/build-esm/{content → src/content}/navbar/placeholderData.d.ts +0 -0
- /package/build/build-esm/{qsm → src/qsm}/components/date-picker/index.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/components/filters/filters.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/components/flight/flight-banner.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/components/flight/flight-card.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/components/flight/flight-leg.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/components/flight/flight-path.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/features/flights/flight-search-results-self-contained.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/features/hotels/hotel-flight-search-results-self-contained.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/features/hotels/hotel-search-results-self-contained.d.ts +0 -0
- /package/build/build-esm/{search-results → src/search-results}/features/roundtrips/roundtrip-search-results-self-contained.d.ts +0 -0
package/build/build-cjs/index.js
CHANGED
|
@@ -10,8 +10,9 @@ var lodash = require('lodash');
|
|
|
10
10
|
var locale = require('date-fns/locale');
|
|
11
11
|
var reactPopper = require('react-popper');
|
|
12
12
|
var reactRedux = require('react-redux');
|
|
13
|
-
var router = require('@reach/router');
|
|
14
13
|
var toolkit = require('@reduxjs/toolkit');
|
|
14
|
+
var reactRouter = require('react-router');
|
|
15
|
+
require('react-dom');
|
|
15
16
|
var flat = require('flat');
|
|
16
17
|
var formik = require('formik');
|
|
17
18
|
var produce = require('immer');
|
|
@@ -21,6 +22,32 @@ function _interopDefaultLegacy(e) {
|
|
|
21
22
|
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
function _interopNamespace(e) {
|
|
26
|
+
if (e && e.__esModule) return e;
|
|
27
|
+
var n = Object.create(null);
|
|
28
|
+
if (e) {
|
|
29
|
+
Object.keys(e).forEach(function (k) {
|
|
30
|
+
if (k !== 'default') {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
32
|
+
Object.defineProperty(
|
|
33
|
+
n,
|
|
34
|
+
k,
|
|
35
|
+
d.get
|
|
36
|
+
? d
|
|
37
|
+
: {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return e[k];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
n['default'] = e;
|
|
48
|
+
return Object.freeze(n);
|
|
49
|
+
}
|
|
50
|
+
|
|
24
51
|
function _mergeNamespaces(n, m) {
|
|
25
52
|
m.forEach(function (e) {
|
|
26
53
|
e &&
|
|
@@ -48,6 +75,7 @@ function _mergeNamespaces(n, m) {
|
|
|
48
75
|
}
|
|
49
76
|
|
|
50
77
|
var React__default = /*#__PURE__*/ _interopDefaultLegacy(React);
|
|
78
|
+
var React__namespace = /*#__PURE__*/ _interopNamespace(React);
|
|
51
79
|
var JsonURL__default = /*#__PURE__*/ _interopDefaultLegacy(JsonURL);
|
|
52
80
|
var flat__default = /*#__PURE__*/ _interopDefaultLegacy(flat);
|
|
53
81
|
var produce__default = /*#__PURE__*/ _interopDefaultLegacy(produce);
|
|
@@ -15701,6 +15729,802 @@ var BookingProduct = function (_a) {
|
|
|
15701
15729
|
);
|
|
15702
15730
|
};
|
|
15703
15731
|
|
|
15732
|
+
/**
|
|
15733
|
+
* @remix-run/router v1.23.2
|
|
15734
|
+
*
|
|
15735
|
+
* Copyright (c) Remix Software Inc.
|
|
15736
|
+
*
|
|
15737
|
+
* This source code is licensed under the MIT license found in the
|
|
15738
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
15739
|
+
*
|
|
15740
|
+
* @license MIT
|
|
15741
|
+
*/
|
|
15742
|
+
|
|
15743
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
15744
|
+
//#region Types and Constants
|
|
15745
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
15746
|
+
/**
|
|
15747
|
+
* Actions represent the type of change to a location value.
|
|
15748
|
+
*/
|
|
15749
|
+
var Action;
|
|
15750
|
+
(function (Action) {
|
|
15751
|
+
/**
|
|
15752
|
+
* A POP indicates a change to an arbitrary index in the history stack, such
|
|
15753
|
+
* as a back or forward navigation. It does not describe the direction of the
|
|
15754
|
+
* navigation, only that the current index changed.
|
|
15755
|
+
*
|
|
15756
|
+
* Note: This is the default action for newly created history objects.
|
|
15757
|
+
*/
|
|
15758
|
+
Action['Pop'] = 'POP';
|
|
15759
|
+
/**
|
|
15760
|
+
* A PUSH indicates a new entry being added to the history stack, such as when
|
|
15761
|
+
* a link is clicked and a new page loads. When this happens, all subsequent
|
|
15762
|
+
* entries in the stack are lost.
|
|
15763
|
+
*/
|
|
15764
|
+
Action['Push'] = 'PUSH';
|
|
15765
|
+
/**
|
|
15766
|
+
* A REPLACE indicates the entry at the current index in the history stack
|
|
15767
|
+
* being replaced by a new one.
|
|
15768
|
+
*/
|
|
15769
|
+
Action['Replace'] = 'REPLACE';
|
|
15770
|
+
})(Action || (Action = {}));
|
|
15771
|
+
function invariant(value, message) {
|
|
15772
|
+
if (value === false || value === null || typeof value === 'undefined') {
|
|
15773
|
+
throw new Error(message);
|
|
15774
|
+
}
|
|
15775
|
+
}
|
|
15776
|
+
function warning(cond, message) {
|
|
15777
|
+
if (!cond) {
|
|
15778
|
+
// eslint-disable-next-line no-console
|
|
15779
|
+
if (typeof console !== 'undefined') console.warn(message);
|
|
15780
|
+
try {
|
|
15781
|
+
// Welcome to debugging history!
|
|
15782
|
+
//
|
|
15783
|
+
// This error is thrown as a convenience, so you can more easily
|
|
15784
|
+
// find the source for a warning that appears in the console by
|
|
15785
|
+
// enabling "pause on exceptions" in your JavaScript debugger.
|
|
15786
|
+
throw new Error(message);
|
|
15787
|
+
// eslint-disable-next-line no-empty
|
|
15788
|
+
} catch (e) {}
|
|
15789
|
+
}
|
|
15790
|
+
}
|
|
15791
|
+
//#endregion
|
|
15792
|
+
|
|
15793
|
+
var ResultType;
|
|
15794
|
+
(function (ResultType) {
|
|
15795
|
+
ResultType['data'] = 'data';
|
|
15796
|
+
ResultType['deferred'] = 'deferred';
|
|
15797
|
+
ResultType['redirect'] = 'redirect';
|
|
15798
|
+
ResultType['error'] = 'error';
|
|
15799
|
+
})(ResultType || (ResultType = {}));
|
|
15800
|
+
/**
|
|
15801
|
+
* Performs pattern matching on a URL pathname and returns information about
|
|
15802
|
+
* the match.
|
|
15803
|
+
*
|
|
15804
|
+
* @see https://reactrouter.com/v6/utils/match-path
|
|
15805
|
+
*/
|
|
15806
|
+
function matchPath(pattern, pathname) {
|
|
15807
|
+
if (typeof pattern === 'string') {
|
|
15808
|
+
pattern = {
|
|
15809
|
+
path: pattern,
|
|
15810
|
+
caseSensitive: false,
|
|
15811
|
+
end: true
|
|
15812
|
+
};
|
|
15813
|
+
}
|
|
15814
|
+
let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
|
15815
|
+
let match = pathname.match(matcher);
|
|
15816
|
+
if (!match) return null;
|
|
15817
|
+
let matchedPathname = match[0];
|
|
15818
|
+
let pathnameBase = matchedPathname.replace(/(.)\/+$/, '$1');
|
|
15819
|
+
let captureGroups = match.slice(1);
|
|
15820
|
+
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
15821
|
+
let { paramName, isOptional } = _ref;
|
|
15822
|
+
// We need to compute the pathnameBase here using the raw splat value
|
|
15823
|
+
// instead of using params["*"] later because it will be decoded then
|
|
15824
|
+
if (paramName === '*') {
|
|
15825
|
+
let splatValue = captureGroups[index] || '';
|
|
15826
|
+
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, '$1');
|
|
15827
|
+
}
|
|
15828
|
+
const value = captureGroups[index];
|
|
15829
|
+
if (isOptional && !value) {
|
|
15830
|
+
memo[paramName] = undefined;
|
|
15831
|
+
} else {
|
|
15832
|
+
memo[paramName] = (value || '').replace(/%2F/g, '/');
|
|
15833
|
+
}
|
|
15834
|
+
return memo;
|
|
15835
|
+
}, {});
|
|
15836
|
+
return {
|
|
15837
|
+
params,
|
|
15838
|
+
pathname: matchedPathname,
|
|
15839
|
+
pathnameBase,
|
|
15840
|
+
pattern
|
|
15841
|
+
};
|
|
15842
|
+
}
|
|
15843
|
+
function compilePath(path, caseSensitive, end) {
|
|
15844
|
+
if (caseSensitive === void 0) {
|
|
15845
|
+
caseSensitive = false;
|
|
15846
|
+
}
|
|
15847
|
+
if (end === void 0) {
|
|
15848
|
+
end = true;
|
|
15849
|
+
}
|
|
15850
|
+
warning(
|
|
15851
|
+
path === '*' || !path.endsWith('*') || path.endsWith('/*'),
|
|
15852
|
+
'Route path "' +
|
|
15853
|
+
path +
|
|
15854
|
+
'" will be treated as if it were ' +
|
|
15855
|
+
('"' + path.replace(/\*$/, '/*') + '" because the `*` character must ') +
|
|
15856
|
+
'always follow a `/` in the pattern. To get rid of this warning, ' +
|
|
15857
|
+
('please change the route path to "' + path.replace(/\*$/, '/*') + '".')
|
|
15858
|
+
);
|
|
15859
|
+
let params = [];
|
|
15860
|
+
let regexpSource =
|
|
15861
|
+
'^' +
|
|
15862
|
+
path
|
|
15863
|
+
.replace(/\/*\*?$/, '') // Ignore trailing / and /*, we'll handle it below
|
|
15864
|
+
.replace(/^\/*/, '/') // Make sure it has a leading /
|
|
15865
|
+
.replace(/[\\.*+^${}|()[\]]/g, '\\$&') // Escape special regex chars
|
|
15866
|
+
.replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
|
|
15867
|
+
params.push({
|
|
15868
|
+
paramName,
|
|
15869
|
+
isOptional: isOptional != null
|
|
15870
|
+
});
|
|
15871
|
+
return isOptional ? '/?([^\\/]+)?' : '/([^\\/]+)';
|
|
15872
|
+
});
|
|
15873
|
+
if (path.endsWith('*')) {
|
|
15874
|
+
params.push({
|
|
15875
|
+
paramName: '*'
|
|
15876
|
+
});
|
|
15877
|
+
regexpSource +=
|
|
15878
|
+
path === '*' || path === '/*'
|
|
15879
|
+
? '(.*)$' // Already matched the initial /, just match the rest
|
|
15880
|
+
: '(?:\\/(.+)|\\/*)$'; // Don't include the / in params["*"]
|
|
15881
|
+
} else if (end) {
|
|
15882
|
+
// When matching to the end, ignore trailing slashes
|
|
15883
|
+
regexpSource += '\\/*$';
|
|
15884
|
+
} else if (path !== '' && path !== '/') {
|
|
15885
|
+
// If our path is non-empty and contains anything beyond an initial slash,
|
|
15886
|
+
// then we have _some_ form of path in our regex, so we should expect to
|
|
15887
|
+
// match only if we find the end of this path segment. Look for an optional
|
|
15888
|
+
// non-captured trailing slash (to match a portion of the URL) or the end
|
|
15889
|
+
// of the path (if we've matched to the end). We used to do this with a
|
|
15890
|
+
// word boundary but that gives false positives on routes like
|
|
15891
|
+
// /user-preferences since `-` counts as a word boundary.
|
|
15892
|
+
regexpSource += '(?:(?=\\/|$))';
|
|
15893
|
+
} else;
|
|
15894
|
+
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : 'i');
|
|
15895
|
+
return [matcher, params];
|
|
15896
|
+
}
|
|
15897
|
+
/**
|
|
15898
|
+
* @private
|
|
15899
|
+
*/
|
|
15900
|
+
function stripBasename(pathname, basename) {
|
|
15901
|
+
if (basename === '/') return pathname;
|
|
15902
|
+
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
15903
|
+
return null;
|
|
15904
|
+
}
|
|
15905
|
+
// We want to leave trailing slash behavior in the user's control, so if they
|
|
15906
|
+
// specify a basename with a trailing slash, we should support it
|
|
15907
|
+
let startIndex = basename.endsWith('/') ? basename.length - 1 : basename.length;
|
|
15908
|
+
let nextChar = pathname.charAt(startIndex);
|
|
15909
|
+
if (nextChar && nextChar !== '/') {
|
|
15910
|
+
// pathname does not start with basename/
|
|
15911
|
+
return null;
|
|
15912
|
+
}
|
|
15913
|
+
return pathname.slice(startIndex) || '/';
|
|
15914
|
+
}
|
|
15915
|
+
/**
|
|
15916
|
+
* @private
|
|
15917
|
+
*/
|
|
15918
|
+
const joinPaths = (paths) => paths.join('/').replace(/\/\/+/g, '/');
|
|
15919
|
+
|
|
15920
|
+
const validMutationMethodsArr = ['post', 'put', 'patch', 'delete'];
|
|
15921
|
+
['get', ...validMutationMethodsArr];
|
|
15922
|
+
|
|
15923
|
+
/**
|
|
15924
|
+
* React Router DOM v6.30.3
|
|
15925
|
+
*
|
|
15926
|
+
* Copyright (c) Remix Software Inc.
|
|
15927
|
+
*
|
|
15928
|
+
* This source code is licensed under the MIT license found in the
|
|
15929
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
15930
|
+
*
|
|
15931
|
+
* @license MIT
|
|
15932
|
+
*/
|
|
15933
|
+
|
|
15934
|
+
function _extends() {
|
|
15935
|
+
_extends = Object.assign
|
|
15936
|
+
? Object.assign.bind()
|
|
15937
|
+
: function (target) {
|
|
15938
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
15939
|
+
var source = arguments[i];
|
|
15940
|
+
for (var key in source) {
|
|
15941
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
15942
|
+
target[key] = source[key];
|
|
15943
|
+
}
|
|
15944
|
+
}
|
|
15945
|
+
}
|
|
15946
|
+
return target;
|
|
15947
|
+
};
|
|
15948
|
+
return _extends.apply(this, arguments);
|
|
15949
|
+
}
|
|
15950
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
15951
|
+
if (source == null) return {};
|
|
15952
|
+
var target = {};
|
|
15953
|
+
var sourceKeys = Object.keys(source);
|
|
15954
|
+
var key, i;
|
|
15955
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
15956
|
+
key = sourceKeys[i];
|
|
15957
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
15958
|
+
target[key] = source[key];
|
|
15959
|
+
}
|
|
15960
|
+
return target;
|
|
15961
|
+
}
|
|
15962
|
+
|
|
15963
|
+
const defaultMethod = 'get';
|
|
15964
|
+
const defaultEncType = 'application/x-www-form-urlencoded';
|
|
15965
|
+
function isHtmlElement(object) {
|
|
15966
|
+
return object != null && typeof object.tagName === 'string';
|
|
15967
|
+
}
|
|
15968
|
+
function isButtonElement(object) {
|
|
15969
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === 'button';
|
|
15970
|
+
}
|
|
15971
|
+
function isFormElement(object) {
|
|
15972
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === 'form';
|
|
15973
|
+
}
|
|
15974
|
+
function isInputElement(object) {
|
|
15975
|
+
return isHtmlElement(object) && object.tagName.toLowerCase() === 'input';
|
|
15976
|
+
}
|
|
15977
|
+
function isModifiedEvent(event) {
|
|
15978
|
+
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
15979
|
+
}
|
|
15980
|
+
function shouldProcessLinkClick(event, target) {
|
|
15981
|
+
return (
|
|
15982
|
+
event.button === 0 &&
|
|
15983
|
+
// Ignore everything but left clicks
|
|
15984
|
+
(!target || target === '_self') &&
|
|
15985
|
+
// Let browser handle "target=_blank" etc.
|
|
15986
|
+
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
|
15987
|
+
);
|
|
15988
|
+
}
|
|
15989
|
+
// One-time check for submitter support
|
|
15990
|
+
let _formDataSupportsSubmitter = null;
|
|
15991
|
+
function isFormDataSubmitterSupported() {
|
|
15992
|
+
if (_formDataSupportsSubmitter === null) {
|
|
15993
|
+
try {
|
|
15994
|
+
new FormData(
|
|
15995
|
+
document.createElement('form'),
|
|
15996
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
15997
|
+
0
|
|
15998
|
+
);
|
|
15999
|
+
_formDataSupportsSubmitter = false;
|
|
16000
|
+
} catch (e) {
|
|
16001
|
+
_formDataSupportsSubmitter = true;
|
|
16002
|
+
}
|
|
16003
|
+
}
|
|
16004
|
+
return _formDataSupportsSubmitter;
|
|
16005
|
+
}
|
|
16006
|
+
const supportedFormEncTypes = new Set(['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']);
|
|
16007
|
+
function getFormEncType(encType) {
|
|
16008
|
+
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
16009
|
+
process.env.NODE_ENV !== 'production'
|
|
16010
|
+
? warning(false, '"' + encType + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + defaultEncType + '"'))
|
|
16011
|
+
: void 0;
|
|
16012
|
+
return null;
|
|
16013
|
+
}
|
|
16014
|
+
return encType;
|
|
16015
|
+
}
|
|
16016
|
+
function getFormSubmissionInfo(target, basename) {
|
|
16017
|
+
let method;
|
|
16018
|
+
let action;
|
|
16019
|
+
let encType;
|
|
16020
|
+
let formData;
|
|
16021
|
+
let body;
|
|
16022
|
+
if (isFormElement(target)) {
|
|
16023
|
+
// When grabbing the action from the element, it will have had the basename
|
|
16024
|
+
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
16025
|
+
// re-prefix in the router
|
|
16026
|
+
let attr = target.getAttribute('action');
|
|
16027
|
+
action = attr ? stripBasename(attr, basename) : null;
|
|
16028
|
+
method = target.getAttribute('method') || defaultMethod;
|
|
16029
|
+
encType = getFormEncType(target.getAttribute('enctype')) || defaultEncType;
|
|
16030
|
+
formData = new FormData(target);
|
|
16031
|
+
} else if (isButtonElement(target) || (isInputElement(target) && (target.type === 'submit' || target.type === 'image'))) {
|
|
16032
|
+
let form = target.form;
|
|
16033
|
+
if (form == null) {
|
|
16034
|
+
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
16035
|
+
}
|
|
16036
|
+
// <button>/<input type="submit"> may override attributes of <form>
|
|
16037
|
+
// When grabbing the action from the element, it will have had the basename
|
|
16038
|
+
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
16039
|
+
// re-prefix in the router
|
|
16040
|
+
let attr = target.getAttribute('formaction') || form.getAttribute('action');
|
|
16041
|
+
action = attr ? stripBasename(attr, basename) : null;
|
|
16042
|
+
method = target.getAttribute('formmethod') || form.getAttribute('method') || defaultMethod;
|
|
16043
|
+
encType = getFormEncType(target.getAttribute('formenctype')) || getFormEncType(form.getAttribute('enctype')) || defaultEncType;
|
|
16044
|
+
// Build a FormData object populated from a form and submitter
|
|
16045
|
+
formData = new FormData(form, target);
|
|
16046
|
+
// If this browser doesn't support the `FormData(el, submitter)` format,
|
|
16047
|
+
// then tack on the submitter value at the end. This is a lightweight
|
|
16048
|
+
// solution that is not 100% spec compliant. For complete support in older
|
|
16049
|
+
// browsers, consider using the `formdata-submitter-polyfill` package
|
|
16050
|
+
if (!isFormDataSubmitterSupported()) {
|
|
16051
|
+
let { name, type, value } = target;
|
|
16052
|
+
if (type === 'image') {
|
|
16053
|
+
let prefix = name ? name + '.' : '';
|
|
16054
|
+
formData.append(prefix + 'x', '0');
|
|
16055
|
+
formData.append(prefix + 'y', '0');
|
|
16056
|
+
} else if (name) {
|
|
16057
|
+
formData.append(name, value);
|
|
16058
|
+
}
|
|
16059
|
+
}
|
|
16060
|
+
} else if (isHtmlElement(target)) {
|
|
16061
|
+
throw new Error('Cannot submit element that is not <form>, <button>, or ' + '<input type="submit|image">');
|
|
16062
|
+
} else {
|
|
16063
|
+
method = defaultMethod;
|
|
16064
|
+
action = null;
|
|
16065
|
+
encType = defaultEncType;
|
|
16066
|
+
body = target;
|
|
16067
|
+
}
|
|
16068
|
+
// Send body for <Form encType="text/plain" so we encode it into text
|
|
16069
|
+
if (formData && encType === 'text/plain') {
|
|
16070
|
+
body = formData;
|
|
16071
|
+
formData = undefined;
|
|
16072
|
+
}
|
|
16073
|
+
return {
|
|
16074
|
+
action,
|
|
16075
|
+
method: method.toLowerCase(),
|
|
16076
|
+
encType,
|
|
16077
|
+
formData,
|
|
16078
|
+
body
|
|
16079
|
+
};
|
|
16080
|
+
}
|
|
16081
|
+
|
|
16082
|
+
const _excluded = ['onClick', 'relative', 'reloadDocument', 'replace', 'state', 'target', 'to', 'preventScrollReset', 'viewTransition'],
|
|
16083
|
+
_excluded2 = ['aria-current', 'caseSensitive', 'className', 'end', 'style', 'to', 'viewTransition', 'children'],
|
|
16084
|
+
_excluded3 = [
|
|
16085
|
+
'fetcherKey',
|
|
16086
|
+
'navigate',
|
|
16087
|
+
'reloadDocument',
|
|
16088
|
+
'replace',
|
|
16089
|
+
'state',
|
|
16090
|
+
'method',
|
|
16091
|
+
'action',
|
|
16092
|
+
'onSubmit',
|
|
16093
|
+
'relative',
|
|
16094
|
+
'preventScrollReset',
|
|
16095
|
+
'viewTransition'
|
|
16096
|
+
];
|
|
16097
|
+
// HEY YOU! DON'T TOUCH THIS VARIABLE!
|
|
16098
|
+
//
|
|
16099
|
+
// It is replaced with the proper version at build time via a babel plugin in
|
|
16100
|
+
// the rollup config.
|
|
16101
|
+
//
|
|
16102
|
+
// Export a global property onto the window for React Router detection by the
|
|
16103
|
+
// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
|
|
16104
|
+
// to detect and properly classify live websites as being built with React Router:
|
|
16105
|
+
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
|
|
16106
|
+
const REACT_ROUTER_VERSION = '6';
|
|
16107
|
+
try {
|
|
16108
|
+
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
16109
|
+
} catch (e) {
|
|
16110
|
+
// no-op
|
|
16111
|
+
}
|
|
16112
|
+
const ViewTransitionContext = /*#__PURE__*/ React__namespace.createContext({
|
|
16113
|
+
isTransitioning: false
|
|
16114
|
+
});
|
|
16115
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16116
|
+
ViewTransitionContext.displayName = 'ViewTransition';
|
|
16117
|
+
}
|
|
16118
|
+
const FetchersContext = /*#__PURE__*/ React__namespace.createContext(new Map());
|
|
16119
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16120
|
+
FetchersContext.displayName = 'Fetchers';
|
|
16121
|
+
}
|
|
16122
|
+
if (process.env.NODE_ENV !== 'production');
|
|
16123
|
+
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
16124
|
+
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
16125
|
+
/**
|
|
16126
|
+
* The public API for rendering a history-aware `<a>`.
|
|
16127
|
+
*/
|
|
16128
|
+
const Link = /*#__PURE__*/ React__namespace.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
16129
|
+
let { onClick, relative, reloadDocument, replace, state, target, to, preventScrollReset, viewTransition } = _ref7,
|
|
16130
|
+
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
16131
|
+
let { basename } = React__namespace.useContext(reactRouter.UNSAFE_NavigationContext);
|
|
16132
|
+
// Rendered into <a href> for absolute URLs
|
|
16133
|
+
let absoluteHref;
|
|
16134
|
+
let isExternal = false;
|
|
16135
|
+
if (typeof to === 'string' && ABSOLUTE_URL_REGEX.test(to)) {
|
|
16136
|
+
// Render the absolute href server- and client-side
|
|
16137
|
+
absoluteHref = to;
|
|
16138
|
+
// Only check for external origins client-side
|
|
16139
|
+
if (isBrowser) {
|
|
16140
|
+
try {
|
|
16141
|
+
let currentUrl = new URL(window.location.href);
|
|
16142
|
+
let targetUrl = to.startsWith('//') ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
16143
|
+
let path = stripBasename(targetUrl.pathname, basename);
|
|
16144
|
+
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
16145
|
+
// Strip the protocol/origin/basename for same-origin absolute URLs
|
|
16146
|
+
to = path + targetUrl.search + targetUrl.hash;
|
|
16147
|
+
} else {
|
|
16148
|
+
isExternal = true;
|
|
16149
|
+
}
|
|
16150
|
+
} catch (e) {
|
|
16151
|
+
// We can't do external URL detection without a valid URL
|
|
16152
|
+
process.env.NODE_ENV !== 'production'
|
|
16153
|
+
? warning(false, '<Link to="' + to + '"> contains an invalid URL which will probably break ' + 'when clicked - please update to a valid URL path.')
|
|
16154
|
+
: void 0;
|
|
16155
|
+
}
|
|
16156
|
+
}
|
|
16157
|
+
}
|
|
16158
|
+
// Rendered into <a href> for relative URLs
|
|
16159
|
+
let href = reactRouter.useHref(to, {
|
|
16160
|
+
relative
|
|
16161
|
+
});
|
|
16162
|
+
let internalOnClick = useLinkClickHandler(to, {
|
|
16163
|
+
replace,
|
|
16164
|
+
state,
|
|
16165
|
+
target,
|
|
16166
|
+
preventScrollReset,
|
|
16167
|
+
relative,
|
|
16168
|
+
viewTransition
|
|
16169
|
+
});
|
|
16170
|
+
function handleClick(event) {
|
|
16171
|
+
if (onClick) onClick(event);
|
|
16172
|
+
if (!event.defaultPrevented) {
|
|
16173
|
+
internalOnClick(event);
|
|
16174
|
+
}
|
|
16175
|
+
}
|
|
16176
|
+
return (
|
|
16177
|
+
/*#__PURE__*/
|
|
16178
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
16179
|
+
React__namespace.createElement(
|
|
16180
|
+
'a',
|
|
16181
|
+
_extends({}, rest, {
|
|
16182
|
+
href: absoluteHref || href,
|
|
16183
|
+
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
16184
|
+
ref: ref,
|
|
16185
|
+
target: target
|
|
16186
|
+
})
|
|
16187
|
+
)
|
|
16188
|
+
);
|
|
16189
|
+
});
|
|
16190
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16191
|
+
Link.displayName = 'Link';
|
|
16192
|
+
}
|
|
16193
|
+
/**
|
|
16194
|
+
* A `<Link>` wrapper that knows if it's "active" or not.
|
|
16195
|
+
*/
|
|
16196
|
+
const NavLink = /*#__PURE__*/ React__namespace.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
16197
|
+
let {
|
|
16198
|
+
'aria-current': ariaCurrentProp = 'page',
|
|
16199
|
+
caseSensitive = false,
|
|
16200
|
+
className: classNameProp = '',
|
|
16201
|
+
end = false,
|
|
16202
|
+
style: styleProp,
|
|
16203
|
+
to,
|
|
16204
|
+
viewTransition,
|
|
16205
|
+
children
|
|
16206
|
+
} = _ref8,
|
|
16207
|
+
rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
16208
|
+
let path = reactRouter.useResolvedPath(to, {
|
|
16209
|
+
relative: rest.relative
|
|
16210
|
+
});
|
|
16211
|
+
let location = reactRouter.useLocation();
|
|
16212
|
+
let routerState = React__namespace.useContext(reactRouter.UNSAFE_DataRouterStateContext);
|
|
16213
|
+
let { navigator, basename } = React__namespace.useContext(reactRouter.UNSAFE_NavigationContext);
|
|
16214
|
+
let isTransitioning =
|
|
16215
|
+
routerState != null &&
|
|
16216
|
+
// Conditional usage is OK here because the usage of a data router is static
|
|
16217
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
16218
|
+
useViewTransitionState(path) &&
|
|
16219
|
+
viewTransition === true;
|
|
16220
|
+
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
16221
|
+
let locationPathname = location.pathname;
|
|
16222
|
+
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
16223
|
+
if (!caseSensitive) {
|
|
16224
|
+
locationPathname = locationPathname.toLowerCase();
|
|
16225
|
+
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
16226
|
+
toPathname = toPathname.toLowerCase();
|
|
16227
|
+
}
|
|
16228
|
+
if (nextLocationPathname && basename) {
|
|
16229
|
+
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
16230
|
+
}
|
|
16231
|
+
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
16232
|
+
// we're looking for a slash _after_ what's in `to`. For example:
|
|
16233
|
+
//
|
|
16234
|
+
// <NavLink to="/users"> and <NavLink to="/users/">
|
|
16235
|
+
// both want to look for a / at index 6 to match URL `/users/matt`
|
|
16236
|
+
const endSlashPosition = toPathname !== '/' && toPathname.endsWith('/') ? toPathname.length - 1 : toPathname.length;
|
|
16237
|
+
let isActive = locationPathname === toPathname || (!end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === '/');
|
|
16238
|
+
let isPending =
|
|
16239
|
+
nextLocationPathname != null &&
|
|
16240
|
+
(nextLocationPathname === toPathname || (!end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === '/'));
|
|
16241
|
+
let renderProps = {
|
|
16242
|
+
isActive,
|
|
16243
|
+
isPending,
|
|
16244
|
+
isTransitioning
|
|
16245
|
+
};
|
|
16246
|
+
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
|
16247
|
+
let className;
|
|
16248
|
+
if (typeof classNameProp === 'function') {
|
|
16249
|
+
className = classNameProp(renderProps);
|
|
16250
|
+
} else {
|
|
16251
|
+
// If the className prop is not a function, we use a default `active`
|
|
16252
|
+
// class for <NavLink />s that are active. In v5 `active` was the default
|
|
16253
|
+
// value for `activeClassName`, but we are removing that API and can still
|
|
16254
|
+
// use the old default behavior for a cleaner upgrade path and keep the
|
|
16255
|
+
// simple styling rules working as they currently do.
|
|
16256
|
+
className = [classNameProp, isActive ? 'active' : null, isPending ? 'pending' : null, isTransitioning ? 'transitioning' : null].filter(Boolean).join(' ');
|
|
16257
|
+
}
|
|
16258
|
+
let style = typeof styleProp === 'function' ? styleProp(renderProps) : styleProp;
|
|
16259
|
+
return /*#__PURE__*/ React__namespace.createElement(
|
|
16260
|
+
Link,
|
|
16261
|
+
_extends({}, rest, {
|
|
16262
|
+
'aria-current': ariaCurrent,
|
|
16263
|
+
className: className,
|
|
16264
|
+
ref: ref,
|
|
16265
|
+
style: style,
|
|
16266
|
+
to: to,
|
|
16267
|
+
viewTransition: viewTransition
|
|
16268
|
+
}),
|
|
16269
|
+
typeof children === 'function' ? children(renderProps) : children
|
|
16270
|
+
);
|
|
16271
|
+
});
|
|
16272
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16273
|
+
NavLink.displayName = 'NavLink';
|
|
16274
|
+
}
|
|
16275
|
+
/**
|
|
16276
|
+
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
|
16277
|
+
* that the interaction with the server is with `fetch` instead of new document
|
|
16278
|
+
* requests, allowing components to add nicer UX to the page as the form is
|
|
16279
|
+
* submitted and returns with data.
|
|
16280
|
+
*/
|
|
16281
|
+
const Form = /*#__PURE__*/ React__namespace.forwardRef((_ref9, forwardedRef) => {
|
|
16282
|
+
let { fetcherKey, navigate, reloadDocument, replace, state, method = defaultMethod, action, onSubmit, relative, preventScrollReset, viewTransition } = _ref9,
|
|
16283
|
+
props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
16284
|
+
let submit = useSubmit();
|
|
16285
|
+
let formAction = useFormAction(action, {
|
|
16286
|
+
relative
|
|
16287
|
+
});
|
|
16288
|
+
let formMethod = method.toLowerCase() === 'get' ? 'get' : 'post';
|
|
16289
|
+
let submitHandler = (event) => {
|
|
16290
|
+
onSubmit && onSubmit(event);
|
|
16291
|
+
if (event.defaultPrevented) return;
|
|
16292
|
+
event.preventDefault();
|
|
16293
|
+
let submitter = event.nativeEvent.submitter;
|
|
16294
|
+
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute('formmethod')) || method;
|
|
16295
|
+
submit(submitter || event.currentTarget, {
|
|
16296
|
+
fetcherKey,
|
|
16297
|
+
method: submitMethod,
|
|
16298
|
+
navigate,
|
|
16299
|
+
replace,
|
|
16300
|
+
state,
|
|
16301
|
+
relative,
|
|
16302
|
+
preventScrollReset,
|
|
16303
|
+
viewTransition
|
|
16304
|
+
});
|
|
16305
|
+
};
|
|
16306
|
+
return /*#__PURE__*/ React__namespace.createElement(
|
|
16307
|
+
'form',
|
|
16308
|
+
_extends(
|
|
16309
|
+
{
|
|
16310
|
+
ref: forwardedRef,
|
|
16311
|
+
method: formMethod,
|
|
16312
|
+
action: formAction,
|
|
16313
|
+
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
16314
|
+
},
|
|
16315
|
+
props
|
|
16316
|
+
)
|
|
16317
|
+
);
|
|
16318
|
+
});
|
|
16319
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
16320
|
+
Form.displayName = 'Form';
|
|
16321
|
+
}
|
|
16322
|
+
if (process.env.NODE_ENV !== 'production');
|
|
16323
|
+
//#endregion
|
|
16324
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
16325
|
+
//#region Hooks
|
|
16326
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
16327
|
+
var DataRouterHook;
|
|
16328
|
+
(function (DataRouterHook) {
|
|
16329
|
+
DataRouterHook['UseScrollRestoration'] = 'useScrollRestoration';
|
|
16330
|
+
DataRouterHook['UseSubmit'] = 'useSubmit';
|
|
16331
|
+
DataRouterHook['UseSubmitFetcher'] = 'useSubmitFetcher';
|
|
16332
|
+
DataRouterHook['UseFetcher'] = 'useFetcher';
|
|
16333
|
+
DataRouterHook['useViewTransitionState'] = 'useViewTransitionState';
|
|
16334
|
+
})(DataRouterHook || (DataRouterHook = {}));
|
|
16335
|
+
var DataRouterStateHook;
|
|
16336
|
+
(function (DataRouterStateHook) {
|
|
16337
|
+
DataRouterStateHook['UseFetcher'] = 'useFetcher';
|
|
16338
|
+
DataRouterStateHook['UseFetchers'] = 'useFetchers';
|
|
16339
|
+
DataRouterStateHook['UseScrollRestoration'] = 'useScrollRestoration';
|
|
16340
|
+
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
16341
|
+
// Internal hooks
|
|
16342
|
+
function getDataRouterConsoleError(hookName) {
|
|
16343
|
+
return hookName + ' must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.';
|
|
16344
|
+
}
|
|
16345
|
+
function useDataRouterContext(hookName) {
|
|
16346
|
+
let ctx = React__namespace.useContext(reactRouter.UNSAFE_DataRouterContext);
|
|
16347
|
+
!ctx ? (process.env.NODE_ENV !== 'production' ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false)) : void 0;
|
|
16348
|
+
return ctx;
|
|
16349
|
+
}
|
|
16350
|
+
// External hooks
|
|
16351
|
+
/**
|
|
16352
|
+
* Handles the click behavior for router `<Link>` components. This is useful if
|
|
16353
|
+
* you need to create custom `<Link>` components with the same click behavior we
|
|
16354
|
+
* use in our exported `<Link>`.
|
|
16355
|
+
*/
|
|
16356
|
+
function useLinkClickHandler(to, _temp) {
|
|
16357
|
+
let { target, replace: replaceProp, state, preventScrollReset, relative, viewTransition } = _temp === void 0 ? {} : _temp;
|
|
16358
|
+
let navigate = reactRouter.useNavigate();
|
|
16359
|
+
let location = reactRouter.useLocation();
|
|
16360
|
+
let path = reactRouter.useResolvedPath(to, {
|
|
16361
|
+
relative
|
|
16362
|
+
});
|
|
16363
|
+
return React__namespace.useCallback(
|
|
16364
|
+
(event) => {
|
|
16365
|
+
if (shouldProcessLinkClick(event, target)) {
|
|
16366
|
+
event.preventDefault();
|
|
16367
|
+
// If the URL hasn't changed, a regular <a> will do a replace instead of
|
|
16368
|
+
// a push, so do the same here unless the replace prop is explicitly set
|
|
16369
|
+
let replace = replaceProp !== undefined ? replaceProp : reactRouter.createPath(location) === reactRouter.createPath(path);
|
|
16370
|
+
navigate(to, {
|
|
16371
|
+
replace,
|
|
16372
|
+
state,
|
|
16373
|
+
preventScrollReset,
|
|
16374
|
+
relative,
|
|
16375
|
+
viewTransition
|
|
16376
|
+
});
|
|
16377
|
+
}
|
|
16378
|
+
},
|
|
16379
|
+
[location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]
|
|
16380
|
+
);
|
|
16381
|
+
}
|
|
16382
|
+
function validateClientSideSubmission() {
|
|
16383
|
+
if (typeof document === 'undefined') {
|
|
16384
|
+
throw new Error('You are calling submit during the server render. ' + 'Try calling submit within a `useEffect` or callback instead.');
|
|
16385
|
+
}
|
|
16386
|
+
}
|
|
16387
|
+
let fetcherId = 0;
|
|
16388
|
+
let getUniqueFetcherId = () => '__' + String(++fetcherId) + '__';
|
|
16389
|
+
/**
|
|
16390
|
+
* Returns a function that may be used to programmatically submit a form (or
|
|
16391
|
+
* some arbitrary data) to the server.
|
|
16392
|
+
*/
|
|
16393
|
+
function useSubmit() {
|
|
16394
|
+
let { router } = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
16395
|
+
let { basename } = React__namespace.useContext(reactRouter.UNSAFE_NavigationContext);
|
|
16396
|
+
let currentRouteId = reactRouter.UNSAFE_useRouteId();
|
|
16397
|
+
return React__namespace.useCallback(
|
|
16398
|
+
function (target, options) {
|
|
16399
|
+
if (options === void 0) {
|
|
16400
|
+
options = {};
|
|
16401
|
+
}
|
|
16402
|
+
validateClientSideSubmission();
|
|
16403
|
+
let { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename);
|
|
16404
|
+
if (options.navigate === false) {
|
|
16405
|
+
let key = options.fetcherKey || getUniqueFetcherId();
|
|
16406
|
+
router.fetch(key, currentRouteId, options.action || action, {
|
|
16407
|
+
preventScrollReset: options.preventScrollReset,
|
|
16408
|
+
formData,
|
|
16409
|
+
body,
|
|
16410
|
+
formMethod: options.method || method,
|
|
16411
|
+
formEncType: options.encType || encType,
|
|
16412
|
+
flushSync: options.flushSync
|
|
16413
|
+
});
|
|
16414
|
+
} else {
|
|
16415
|
+
router.navigate(options.action || action, {
|
|
16416
|
+
preventScrollReset: options.preventScrollReset,
|
|
16417
|
+
formData,
|
|
16418
|
+
body,
|
|
16419
|
+
formMethod: options.method || method,
|
|
16420
|
+
formEncType: options.encType || encType,
|
|
16421
|
+
replace: options.replace,
|
|
16422
|
+
state: options.state,
|
|
16423
|
+
fromRouteId: currentRouteId,
|
|
16424
|
+
flushSync: options.flushSync,
|
|
16425
|
+
viewTransition: options.viewTransition
|
|
16426
|
+
});
|
|
16427
|
+
}
|
|
16428
|
+
},
|
|
16429
|
+
[router, basename, currentRouteId]
|
|
16430
|
+
);
|
|
16431
|
+
}
|
|
16432
|
+
// v7: Eventually we should deprecate this entirely in favor of using the
|
|
16433
|
+
// router method directly?
|
|
16434
|
+
function useFormAction(action, _temp2) {
|
|
16435
|
+
let { relative } = _temp2 === void 0 ? {} : _temp2;
|
|
16436
|
+
let { basename } = React__namespace.useContext(reactRouter.UNSAFE_NavigationContext);
|
|
16437
|
+
let routeContext = React__namespace.useContext(reactRouter.UNSAFE_RouteContext);
|
|
16438
|
+
!routeContext ? (process.env.NODE_ENV !== 'production' ? invariant(false, 'useFormAction must be used inside a RouteContext') : invariant(false)) : void 0;
|
|
16439
|
+
let [match] = routeContext.matches.slice(-1);
|
|
16440
|
+
// Shallow clone path so we can modify it below, otherwise we modify the
|
|
16441
|
+
// object referenced by useMemo inside useResolvedPath
|
|
16442
|
+
let path = _extends(
|
|
16443
|
+
{},
|
|
16444
|
+
reactRouter.useResolvedPath(action ? action : '.', {
|
|
16445
|
+
relative
|
|
16446
|
+
})
|
|
16447
|
+
);
|
|
16448
|
+
// If no action was specified, browsers will persist current search params
|
|
16449
|
+
// when determining the path, so match that behavior
|
|
16450
|
+
// https://github.com/remix-run/remix/issues/927
|
|
16451
|
+
let location = reactRouter.useLocation();
|
|
16452
|
+
if (action == null) {
|
|
16453
|
+
// Safe to write to this directly here since if action was undefined, we
|
|
16454
|
+
// would have called useResolvedPath(".") which will never include a search
|
|
16455
|
+
path.search = location.search;
|
|
16456
|
+
// When grabbing search params from the URL, remove any included ?index param
|
|
16457
|
+
// since it might not apply to our contextual route. We add it back based
|
|
16458
|
+
// on match.route.index below
|
|
16459
|
+
let params = new URLSearchParams(path.search);
|
|
16460
|
+
let indexValues = params.getAll('index');
|
|
16461
|
+
let hasNakedIndexParam = indexValues.some((v) => v === '');
|
|
16462
|
+
if (hasNakedIndexParam) {
|
|
16463
|
+
params.delete('index');
|
|
16464
|
+
indexValues.filter((v) => v).forEach((v) => params.append('index', v));
|
|
16465
|
+
let qs = params.toString();
|
|
16466
|
+
path.search = qs ? '?' + qs : '';
|
|
16467
|
+
}
|
|
16468
|
+
}
|
|
16469
|
+
if ((!action || action === '.') && match.route.index) {
|
|
16470
|
+
path.search = path.search ? path.search.replace(/^\?/, '?index&') : '?index';
|
|
16471
|
+
}
|
|
16472
|
+
// If we're operating within a basename, prepend it to the pathname prior
|
|
16473
|
+
// to creating the form action. If this is a root navigation, then just use
|
|
16474
|
+
// the raw basename which allows the basename to have full control over the
|
|
16475
|
+
// presence of a trailing slash on root actions
|
|
16476
|
+
if (basename !== '/') {
|
|
16477
|
+
path.pathname = path.pathname === '/' ? basename : joinPaths([basename, path.pathname]);
|
|
16478
|
+
}
|
|
16479
|
+
return reactRouter.createPath(path);
|
|
16480
|
+
}
|
|
16481
|
+
/**
|
|
16482
|
+
* Return a boolean indicating if there is an active view transition to the
|
|
16483
|
+
* given href. You can use this value to render CSS classes or viewTransitionName
|
|
16484
|
+
* styles onto your elements
|
|
16485
|
+
*
|
|
16486
|
+
* @param href The destination href
|
|
16487
|
+
* @param [opts.relative] Relative routing type ("route" | "path")
|
|
16488
|
+
*/
|
|
16489
|
+
function useViewTransitionState(to, opts) {
|
|
16490
|
+
if (opts === void 0) {
|
|
16491
|
+
opts = {};
|
|
16492
|
+
}
|
|
16493
|
+
let vtContext = React__namespace.useContext(ViewTransitionContext);
|
|
16494
|
+
!(vtContext != null)
|
|
16495
|
+
? process.env.NODE_ENV !== 'production'
|
|
16496
|
+
? invariant(
|
|
16497
|
+
false,
|
|
16498
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " +
|
|
16499
|
+
'Did you accidentally import `RouterProvider` from `react-router`?'
|
|
16500
|
+
)
|
|
16501
|
+
: invariant(false)
|
|
16502
|
+
: void 0;
|
|
16503
|
+
let { basename } = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
16504
|
+
let path = reactRouter.useResolvedPath(to, {
|
|
16505
|
+
relative: opts.relative
|
|
16506
|
+
});
|
|
16507
|
+
if (!vtContext.isTransitioning) {
|
|
16508
|
+
return false;
|
|
16509
|
+
}
|
|
16510
|
+
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
16511
|
+
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
16512
|
+
// Transition is active if we're going to or coming from the indicated
|
|
16513
|
+
// destination. This ensures that other PUSH navigations that reverse
|
|
16514
|
+
// an indicated transition apply. I.e., on the list view you have:
|
|
16515
|
+
//
|
|
16516
|
+
// <NavLink to="/details/1" viewTransition>
|
|
16517
|
+
//
|
|
16518
|
+
// If you click the breadcrumb back to the list view:
|
|
16519
|
+
//
|
|
16520
|
+
// <NavLink to="/list" viewTransition>
|
|
16521
|
+
//
|
|
16522
|
+
// We should apply the transition because it's indicated as active going
|
|
16523
|
+
// from /list -> /details/1 and therefore should be active on the reverse
|
|
16524
|
+
// (even though this isn't strictly a POP reverse)
|
|
16525
|
+
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
16526
|
+
}
|
|
16527
|
+
|
|
15704
16528
|
var CHILD_MAX_AGE = 17;
|
|
15705
16529
|
var initialState$6 = {
|
|
15706
16530
|
formValues: undefined
|
|
@@ -18145,6 +18969,7 @@ var Message = function (_a) {
|
|
|
18145
18969
|
var Confirmation = function () {
|
|
18146
18970
|
var dispatch = useAppDispatch();
|
|
18147
18971
|
var settings = React.useContext(SettingsContext);
|
|
18972
|
+
var navigate = reactRouter.useNavigate();
|
|
18148
18973
|
var bookingNumber = reactRedux.useSelector(selectBookingNumber);
|
|
18149
18974
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
18150
18975
|
var isOption = reactRedux.useSelector(selectIsOption);
|
|
@@ -18152,7 +18977,7 @@ var Confirmation = function () {
|
|
|
18152
18977
|
if (settings.skipRouter) {
|
|
18153
18978
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
18154
18979
|
} else {
|
|
18155
|
-
|
|
18980
|
+
navigate(''.concat(settings.basePath).concat(settings.error.pathSuffix, '?').concat(bookingQueryString));
|
|
18156
18981
|
}
|
|
18157
18982
|
}
|
|
18158
18983
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
@@ -18236,6 +19061,7 @@ var Confirmation = function () {
|
|
|
18236
19061
|
|
|
18237
19062
|
var Error$1 = function () {
|
|
18238
19063
|
var dispatch = useAppDispatch();
|
|
19064
|
+
var navigate = reactRouter.useNavigate();
|
|
18239
19065
|
var settings = React.useContext(SettingsContext);
|
|
18240
19066
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
18241
19067
|
var tryAgainUrl = ''.concat(settings.basePath, '?').concat(bookingQueryString);
|
|
@@ -18247,7 +19073,7 @@ var Error$1 = function () {
|
|
|
18247
19073
|
}
|
|
18248
19074
|
} else {
|
|
18249
19075
|
dispatch(setIsRetry(true));
|
|
18250
|
-
|
|
19076
|
+
navigate(tryAgainUrl);
|
|
18251
19077
|
}
|
|
18252
19078
|
};
|
|
18253
19079
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
@@ -19865,6 +20691,7 @@ var FlightOptionModal = function (_a) {
|
|
|
19865
20691
|
var FlightOptionsForm = function () {
|
|
19866
20692
|
var _a, _b, _c, _d;
|
|
19867
20693
|
var settings = React.useContext(SettingsContext);
|
|
20694
|
+
var navigate = reactRouter.useNavigate();
|
|
19868
20695
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
19869
20696
|
var dispatch = useAppDispatch();
|
|
19870
20697
|
var packageDetails = reactRedux.useSelector(selectPackageDetails);
|
|
@@ -19883,9 +20710,9 @@ var FlightOptionsForm = function () {
|
|
|
19883
20710
|
dispatch(setCurrentStep(ROOM_OPTIONS_FORM_STEP));
|
|
19884
20711
|
} else {
|
|
19885
20712
|
if (settings.roomOptions.isHidden) {
|
|
19886
|
-
|
|
20713
|
+
navigate(''.concat(settings.basePath).concat(settings.options.pathSuffix, '?').concat(bookingQueryString));
|
|
19887
20714
|
} else {
|
|
19888
|
-
|
|
20715
|
+
navigate(''.concat(settings.basePath).concat(settings.roomOptions.pathSuffix, '?').concat(bookingQueryString));
|
|
19889
20716
|
}
|
|
19890
20717
|
}
|
|
19891
20718
|
e.preventDefault();
|
|
@@ -20023,7 +20850,7 @@ var FlightOptionsForm = function () {
|
|
|
20023
20850
|
)
|
|
20024
20851
|
: travelersFirstStep
|
|
20025
20852
|
? React__default['default'].createElement(
|
|
20026
|
-
|
|
20853
|
+
Link,
|
|
20027
20854
|
{
|
|
20028
20855
|
to: ''.concat(settings.basePath).concat(settings.travellers.pathSuffix, '?').concat(bookingQueryString),
|
|
20029
20856
|
title: translations.STEPS.PREVIOUS,
|
|
@@ -21924,6 +22751,7 @@ var PrintOfferButton = function (_a) {
|
|
|
21924
22751
|
var OptionsForm = function () {
|
|
21925
22752
|
var _a, _b;
|
|
21926
22753
|
var settings = React.useContext(SettingsContext);
|
|
22754
|
+
var navigate = reactRouter.useNavigate();
|
|
21927
22755
|
var token = settings.token;
|
|
21928
22756
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
21929
22757
|
var dispatch = useAppDispatch();
|
|
@@ -21999,9 +22827,9 @@ var OptionsForm = function () {
|
|
|
21999
22827
|
}
|
|
22000
22828
|
} else {
|
|
22001
22829
|
if (travelersFirstStep) {
|
|
22002
|
-
|
|
22830
|
+
navigate(''.concat(settings.basePath).concat(settings.summary.pathSuffix, '?').concat(bookingQueryString));
|
|
22003
22831
|
} else {
|
|
22004
|
-
|
|
22832
|
+
navigate(''.concat(settings.basePath).concat(settings.travellers.pathSuffix, '?').concat(bookingQueryString));
|
|
22005
22833
|
}
|
|
22006
22834
|
}
|
|
22007
22835
|
e.preventDefault();
|
|
@@ -22300,7 +23128,7 @@ var OptionsForm = function () {
|
|
|
22300
23128
|
translations.STEPS.PREVIOUS
|
|
22301
23129
|
)
|
|
22302
23130
|
: React__default['default'].createElement(
|
|
22303
|
-
|
|
23131
|
+
Link,
|
|
22304
23132
|
{ to: previousUrl, title: translations.STEPS.PREVIOUS, className: 'cta cta--secondary' },
|
|
22305
23133
|
translations.STEPS.PREVIOUS
|
|
22306
23134
|
)
|
|
@@ -22531,6 +23359,7 @@ var TravelerRooms = function (_a) {
|
|
|
22531
23359
|
|
|
22532
23360
|
var RoomOptionsForm = function () {
|
|
22533
23361
|
var settings = React.useContext(SettingsContext);
|
|
23362
|
+
var navigate = reactRouter.useNavigate();
|
|
22534
23363
|
var translations = reactRedux.useSelector(selectTranslations);
|
|
22535
23364
|
var dispatch = useAppDispatch();
|
|
22536
23365
|
var packageDetails = reactRedux.useSelector(selectPackageDetails);
|
|
@@ -22547,7 +23376,7 @@ var RoomOptionsForm = function () {
|
|
|
22547
23376
|
if (settings.skipRouter) {
|
|
22548
23377
|
dispatch(setCurrentStep(OPTIONS_FORM_STEP));
|
|
22549
23378
|
} else {
|
|
22550
|
-
|
|
23379
|
+
navigate(''.concat(settings.basePath).concat(settings.options.pathSuffix, '?').concat(bookingQueryString));
|
|
22551
23380
|
}
|
|
22552
23381
|
e.preventDefault();
|
|
22553
23382
|
};
|
|
@@ -22622,7 +23451,7 @@ var RoomOptionsForm = function () {
|
|
|
22622
23451
|
translations.STEPS.PREVIOUS
|
|
22623
23452
|
)
|
|
22624
23453
|
: React__default['default'].createElement(
|
|
22625
|
-
|
|
23454
|
+
Link,
|
|
22626
23455
|
{
|
|
22627
23456
|
to: ''.concat(settings.basePath).concat(settings.flightOptions.pathSuffix, '?').concat(bookingQueryString),
|
|
22628
23457
|
title: translations.STEPS.PREVIOUS,
|
|
@@ -23424,6 +24253,7 @@ var SummaryPerBookingOptionGroup = function (_a) {
|
|
|
23424
24253
|
var Summary = function () {
|
|
23425
24254
|
var _a, _b, _c, _d, _e, _f;
|
|
23426
24255
|
var dispatch = useAppDispatch();
|
|
24256
|
+
var navigate = reactRouter.useNavigate();
|
|
23427
24257
|
var settings = React.useContext(SettingsContext);
|
|
23428
24258
|
var _g = React.useState(false),
|
|
23429
24259
|
isSubmitting = _g[0],
|
|
@@ -23463,7 +24293,7 @@ var Summary = function () {
|
|
|
23463
24293
|
if (settings.skipRouter) {
|
|
23464
24294
|
dispatch(setCurrentStep(TRAVELERS_FORM_STEP));
|
|
23465
24295
|
} else {
|
|
23466
|
-
|
|
24296
|
+
navigate(''.concat(settings.basePath, '?').concat(bookingQueryString));
|
|
23467
24297
|
}
|
|
23468
24298
|
}
|
|
23469
24299
|
var rooms = reactRedux.useSelector(selectRooms);
|
|
@@ -23509,8 +24339,11 @@ var Summary = function () {
|
|
|
23509
24339
|
return [2 /*return*/];
|
|
23510
24340
|
}
|
|
23511
24341
|
if (bookRequest.payload.returnPaymentUrl) {
|
|
23512
|
-
|
|
23513
|
-
|
|
24342
|
+
if (typeof window !== 'undefined') {
|
|
24343
|
+
location_1 = window.location;
|
|
24344
|
+
window.scrollTo(0, 0);
|
|
24345
|
+
bookRequest.payload.redirectUrl = ''.concat(location_1.protocol, '//').concat(location_1.host).concat(settings.basePath);
|
|
24346
|
+
}
|
|
23514
24347
|
}
|
|
23515
24348
|
_b.label = 1;
|
|
23516
24349
|
case 1:
|
|
@@ -23531,7 +24364,7 @@ var Summary = function () {
|
|
|
23531
24364
|
if (settings.skipRouter) {
|
|
23532
24365
|
dispatch(setCurrentStep(CONFIRMATION_STEP));
|
|
23533
24366
|
} else {
|
|
23534
|
-
|
|
24367
|
+
navigate(''.concat(settings.basePath).concat(settings.confirmation.pathSuffix, '?').concat(bookingQueryString));
|
|
23535
24368
|
}
|
|
23536
24369
|
}
|
|
23537
24370
|
return [3 /*break*/, 5];
|
|
@@ -23540,7 +24373,7 @@ var Summary = function () {
|
|
|
23540
24373
|
if (settings.skipRouter) {
|
|
23541
24374
|
dispatch(setCurrentStep(ERROR_STEP));
|
|
23542
24375
|
} else {
|
|
23543
|
-
|
|
24376
|
+
navigate(''.concat(settings.basePath).concat(settings.error.pathSuffix, '?').concat(bookingQueryString));
|
|
23544
24377
|
}
|
|
23545
24378
|
return [3 /*break*/, 5];
|
|
23546
24379
|
case 4:
|
|
@@ -24204,7 +25037,7 @@ var Summary = function () {
|
|
|
24204
25037
|
translations.STEPS.PREVIOUS
|
|
24205
25038
|
)
|
|
24206
25039
|
: React__default['default'].createElement(
|
|
24207
|
-
|
|
25040
|
+
Link,
|
|
24208
25041
|
{
|
|
24209
25042
|
to: ''.concat(settings.basePath).concat(settings.travellers.pathSuffix, '?').concat(bookingQueryString),
|
|
24210
25043
|
title: translations.STEPS.PREVIOUS,
|
|
@@ -24822,6 +25655,7 @@ function createInitialValues(formRooms, startDate, agentAdressId, personTranslat
|
|
|
24822
25655
|
var TravelersForm = function () {
|
|
24823
25656
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24824
25657
|
var dispatch = useAppDispatch();
|
|
25658
|
+
var navigate = reactRouter.useNavigate();
|
|
24825
25659
|
var settings = React.useContext(SettingsContext);
|
|
24826
25660
|
var bookingQueryString = reactRedux.useSelector(selectBookingQueryString);
|
|
24827
25661
|
var startDate = reactRedux.useSelector(selectStartDate);
|
|
@@ -24874,7 +25708,7 @@ var TravelersForm = function () {
|
|
|
24874
25708
|
if (settings.skipRouter) {
|
|
24875
25709
|
dispatch(setCurrentStep(SUMMARY_STEP));
|
|
24876
25710
|
} else {
|
|
24877
|
-
|
|
25711
|
+
navigate(''.concat(settings.basePath).concat(settings.summary.pathSuffix, '?').concat(bookingQueryString));
|
|
24878
25712
|
}
|
|
24879
25713
|
}
|
|
24880
25714
|
})
|
|
@@ -24901,9 +25735,9 @@ var TravelersForm = function () {
|
|
|
24901
25735
|
}
|
|
24902
25736
|
} else {
|
|
24903
25737
|
if (travelersFirstStep) {
|
|
24904
|
-
|
|
25738
|
+
navigate(''.concat(settings.basePath).concat(settings.flightOptions.pathSuffix, '?').concat(bookingQueryString));
|
|
24905
25739
|
} else {
|
|
24906
|
-
|
|
25740
|
+
navigate(''.concat(settings.basePath).concat(settings.summary.pathSuffix, '?').concat(bookingQueryString));
|
|
24907
25741
|
}
|
|
24908
25742
|
}
|
|
24909
25743
|
}
|
|
@@ -24984,7 +25818,7 @@ var TravelersForm = function () {
|
|
|
24984
25818
|
query = 'rooms=('.concat(roomsString, ')');
|
|
24985
25819
|
}
|
|
24986
25820
|
var newUrl = ''.concat(window.location.pathname, '?').concat(query);
|
|
24987
|
-
|
|
25821
|
+
navigate(newUrl, { replace: true });
|
|
24988
25822
|
},
|
|
24989
25823
|
[formik$1.values]
|
|
24990
25824
|
);
|
|
@@ -26004,7 +26838,7 @@ var TravelersForm = function () {
|
|
|
26004
26838
|
)
|
|
26005
26839
|
: !travelersFirstStep
|
|
26006
26840
|
? React__default['default'].createElement(
|
|
26007
|
-
|
|
26841
|
+
Link,
|
|
26008
26842
|
{
|
|
26009
26843
|
to: ''.concat(settings.basePath).concat(settings.options.pathSuffix, '?').concat(bookingQueryString),
|
|
26010
26844
|
title: translations.STEPS.PREVIOUS,
|
|
@@ -26050,7 +26884,8 @@ var Booking = function (_a) {
|
|
|
26050
26884
|
isOffer = _b.isOffer,
|
|
26051
26885
|
allowOption = _b.allowOption;
|
|
26052
26886
|
var dispatch = useAppDispatch();
|
|
26053
|
-
var location =
|
|
26887
|
+
var location = reactRouter.useLocation();
|
|
26888
|
+
var navigate = reactRouter.useNavigate();
|
|
26054
26889
|
var productAttributes = reactRedux.useSelector(selectProductAttributes);
|
|
26055
26890
|
var bookingAttributes = reactRedux.useSelector(selectBookingAttributes);
|
|
26056
26891
|
var rooms = reactRedux.useSelector(selectBookingRooms);
|
|
@@ -26103,7 +26938,7 @@ var Booking = function (_a) {
|
|
|
26103
26938
|
}
|
|
26104
26939
|
if (!lodash.isNil(bookingNumber)) {
|
|
26105
26940
|
dispatch(setBookingNumber(bookingNumber));
|
|
26106
|
-
|
|
26941
|
+
navigate(''.concat(basePath).concat(confirmation.pathSuffix, '?bookingNr=').concat(bookingNumber));
|
|
26107
26942
|
}
|
|
26108
26943
|
var nextBookingAttrs = {
|
|
26109
26944
|
startDate: startDate,
|
|
@@ -26265,61 +27100,77 @@ var Booking = function (_a) {
|
|
|
26265
27100
|
'div',
|
|
26266
27101
|
{ className: 'booking__panel' },
|
|
26267
27102
|
React__default['default'].createElement(
|
|
26268
|
-
|
|
26269
|
-
|
|
27103
|
+
reactRouter.Routes,
|
|
27104
|
+
null,
|
|
26270
27105
|
travelersFirstStep &&
|
|
26271
|
-
React__default['default'].createElement(
|
|
27106
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26272
27107
|
path: '/',
|
|
26273
|
-
|
|
26274
|
-
|
|
26275
|
-
|
|
27108
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27109
|
+
number: numberIndex++,
|
|
27110
|
+
title: translations.STEPS.PERSONAL_DETAILS,
|
|
27111
|
+
component: React__default['default'].createElement(TravelersForm, null)
|
|
27112
|
+
})
|
|
26276
27113
|
}),
|
|
26277
27114
|
!flightOptions.isHidden &&
|
|
26278
27115
|
flightOptions.pathSuffix &&
|
|
26279
|
-
React__default['default'].createElement(
|
|
27116
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26280
27117
|
path: '/',
|
|
26281
|
-
|
|
26282
|
-
|
|
26283
|
-
|
|
27118
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27119
|
+
number: numberIndex++,
|
|
27120
|
+
title: translations.STEPS.FLIGHT_OPTIONS,
|
|
27121
|
+
component: React__default['default'].createElement(FlightOptionsForm, null)
|
|
27122
|
+
})
|
|
26284
27123
|
}),
|
|
26285
27124
|
!roomOptions.isHidden &&
|
|
26286
27125
|
roomOptions.pathSuffix &&
|
|
26287
|
-
React__default['default'].createElement(
|
|
27126
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26288
27127
|
path: roomOptions.pathSuffix,
|
|
26289
|
-
|
|
26290
|
-
|
|
26291
|
-
|
|
27128
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27129
|
+
number: numberIndex++,
|
|
27130
|
+
title: translations.STEPS.ROOM_OPTIONS,
|
|
27131
|
+
component: React__default['default'].createElement(RoomOptionsForm, null)
|
|
27132
|
+
})
|
|
26292
27133
|
}),
|
|
26293
|
-
React__default['default'].createElement(
|
|
27134
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26294
27135
|
path: options.pathSuffix,
|
|
26295
|
-
|
|
26296
|
-
|
|
26297
|
-
|
|
27136
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27137
|
+
number: numberIndex++,
|
|
27138
|
+
title: translations.STEPS.EXTRA_OPTIONS,
|
|
27139
|
+
component: React__default['default'].createElement(OptionsForm, null)
|
|
27140
|
+
})
|
|
26298
27141
|
}),
|
|
26299
27142
|
!travelersFirstStep &&
|
|
26300
|
-
React__default['default'].createElement(
|
|
27143
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26301
27144
|
path: travellers.pathSuffix,
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
|
|
27145
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27146
|
+
number: numberIndex++,
|
|
27147
|
+
title: translations.STEPS.PERSONAL_DETAILS,
|
|
27148
|
+
component: React__default['default'].createElement(TravelersForm, null)
|
|
27149
|
+
})
|
|
26305
27150
|
}),
|
|
26306
|
-
React__default['default'].createElement(
|
|
27151
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26307
27152
|
path: summary.pathSuffix,
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
27153
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27154
|
+
number: numberIndex++,
|
|
27155
|
+
title: translations.STEPS.SUMMARY,
|
|
27156
|
+
component: React__default['default'].createElement(Summary, null)
|
|
27157
|
+
})
|
|
26311
27158
|
}),
|
|
26312
|
-
React__default['default'].createElement(
|
|
27159
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26313
27160
|
path: confirmation.pathSuffix,
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
|
|
27161
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27162
|
+
number: numberIndex++,
|
|
27163
|
+
title: translations.STEPS.CONFIRMATION,
|
|
27164
|
+
component: React__default['default'].createElement(Confirmation, null)
|
|
27165
|
+
})
|
|
26317
27166
|
}),
|
|
26318
|
-
React__default['default'].createElement(
|
|
27167
|
+
React__default['default'].createElement(reactRouter.Route, {
|
|
26319
27168
|
path: error.pathSuffix,
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
27169
|
+
element: React__default['default'].createElement(StepRoute, {
|
|
27170
|
+
number: numberIndex++,
|
|
27171
|
+
title: translations.STEPS.ERROR,
|
|
27172
|
+
component: React__default['default'].createElement(Error$1, null)
|
|
27173
|
+
})
|
|
26323
27174
|
})
|
|
26324
27175
|
)
|
|
26325
27176
|
),
|
|
@@ -27833,7 +28684,7 @@ var Navbar = function (_a) {
|
|
|
27833
28684
|
var _d = React.useState(),
|
|
27834
28685
|
activeMobileGroup = _d[0],
|
|
27835
28686
|
setActiveMobileGroup = _d[1];
|
|
27836
|
-
var location =
|
|
28687
|
+
var location = reactRouter.useLocation();
|
|
27837
28688
|
var normalizePath = function (path) {
|
|
27838
28689
|
return path.replace(/\/+$/, '');
|
|
27839
28690
|
};
|