math-main-components 0.0.196 → 0.0.198
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/dist/components/Accordeon/Accordeon.d.ts +4 -1
- package/dist/components/Accordeon/Accordeon.stories.d.ts +13 -0
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.stories.d.ts +13 -0
- package/dist/components/{AuthButton/AuthButton.d.ts → Button2/Button2.d.ts} +2 -2
- package/dist/components/Button2/Button2.stories.d.ts +13 -0
- package/dist/components/Button2/index.d.ts +1 -0
- package/dist/components/CardButton/CardButton.d.ts +3 -3
- package/dist/components/CardButton/CardButton.stories.d.ts +13 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/components/ChooseRole/ChooseRole.d.ts +3 -4
- package/dist/components/ChooseRole/ChooseRole.stories.d.ts +13 -0
- package/dist/components/ChooseRole/index.d.ts +1 -1
- package/dist/components/CopyCode/CopyCode.d.ts +3 -4
- package/dist/components/CopyCode/CopyCode.stories.d.ts +13 -0
- package/dist/components/EmptyCard/EmptyCard.stories.d.ts +13 -0
- package/dist/components/FormButton/FormButton.d.ts +4 -4
- package/dist/components/FormButton/FormButton.stories.d.ts +13 -0
- package/dist/components/FormText/FormText.stories.d.ts +13 -0
- package/dist/components/ForwardButton/ForwardButton.stories.d.ts +13 -0
- package/dist/index.cjs.js +39 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +39 -47
- package/dist/styles/font.scss +5 -0
- package/dist/styles/material-symbols.scss +24 -0
- package/dist/styles/theme-colors.scss +164 -0
- package/dist/styles/theme-styles.scss +8 -0
- package/package.json +19 -3
- package/styles/font.scss +11 -0
- package/styles/material-symbols.scss +24 -0
- package/styles/theme-colors.scss +164 -0
- package/styles/theme-styles.scss +8 -0
- package/dist/_virtual/_interop_require_default.cjs.js +0 -3
- package/dist/_virtual/_interop_require_wildcard.cjs.js +0 -3
- package/dist/_virtual/add-base-path.js +0 -3
- package/dist/_virtual/add-locale.js +0 -3
- package/dist/_virtual/add-locale2.js +0 -3
- package/dist/_virtual/add-path-prefix.js +0 -3
- package/dist/_virtual/add-path-suffix.js +0 -3
- package/dist/_virtual/app-paths.js +0 -3
- package/dist/_virtual/app-router-context.shared-runtime.js +0 -3
- package/dist/_virtual/app-router-headers.js +0 -3
- package/dist/_virtual/bloom-filter.js +0 -3
- package/dist/_virtual/compare-states.js +0 -3
- package/dist/_virtual/denormalize-page-path.js +0 -3
- package/dist/_virtual/detect-domain-locale.js +0 -3
- package/dist/_virtual/detect-domain-locale2.js +0 -3
- package/dist/_virtual/ensure-leading-slash.js +0 -3
- package/dist/_virtual/escape-regexp.js +0 -3
- package/dist/_virtual/format-next-pathname-info.js +0 -3
- package/dist/_virtual/format-url.js +0 -3
- package/dist/_virtual/get-asset-path-from-route.js +0 -3
- package/dist/_virtual/get-cookie-parser.js +0 -3
- package/dist/_virtual/get-domain-locale.js +0 -3
- package/dist/_virtual/get-next-pathname-info.js +0 -3
- package/dist/_virtual/handle-smooth-scroll.js +0 -3
- package/dist/_virtual/has-base-path.js +0 -3
- package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
- package/dist/_virtual/head-manager.js +0 -3
- package/dist/_virtual/index.js +0 -3
- package/dist/_virtual/index2.js +0 -3
- package/dist/_virtual/index3.js +0 -3
- package/dist/_virtual/index4.js +0 -3
- package/dist/_virtual/index5.js +0 -3
- package/dist/_virtual/interception-routes.js +0 -3
- package/dist/_virtual/interpolate-as.js +0 -3
- package/dist/_virtual/is-api-route.js +0 -3
- package/dist/_virtual/is-bot.js +0 -3
- package/dist/_virtual/is-dynamic.js +0 -3
- package/dist/_virtual/is-error.js +0 -3
- package/dist/_virtual/is-local-url.js +0 -3
- package/dist/_virtual/is-plain-object.js +0 -3
- package/dist/_virtual/link.js +0 -3
- package/dist/_virtual/link2.js +0 -3
- package/dist/_virtual/mitt.js +0 -3
- package/dist/_virtual/normalize-locale-path.js +0 -3
- package/dist/_virtual/normalize-locale-path2.js +0 -3
- package/dist/_virtual/normalize-path-sep.js +0 -3
- package/dist/_virtual/normalize-trailing-slash.js +0 -3
- package/dist/_virtual/omit.js +0 -3
- package/dist/_virtual/parse-path.js +0 -3
- package/dist/_virtual/parse-relative-url.js +0 -3
- package/dist/_virtual/parse-url.js +0 -3
- package/dist/_virtual/path-has-prefix.js +0 -3
- package/dist/_virtual/path-match.js +0 -3
- package/dist/_virtual/prepare-destination.js +0 -3
- package/dist/_virtual/querystring.js +0 -3
- package/dist/_virtual/react-is.development.js +0 -3
- package/dist/_virtual/react-is.production.min.js +0 -3
- package/dist/_virtual/remove-base-path.js +0 -3
- package/dist/_virtual/remove-locale.js +0 -3
- package/dist/_virtual/remove-path-prefix.js +0 -3
- package/dist/_virtual/remove-trailing-slash.js +0 -3
- package/dist/_virtual/request-idle-callback.js +0 -3
- package/dist/_virtual/resolve-href.js +0 -3
- package/dist/_virtual/resolve-rewrites.js +0 -3
- package/dist/_virtual/route-loader.js +0 -3
- package/dist/_virtual/route-matcher.js +0 -3
- package/dist/_virtual/route-regex.js +0 -3
- package/dist/_virtual/router-context.shared-runtime.js +0 -3
- package/dist/_virtual/router-reducer-types.js +0 -3
- package/dist/_virtual/router.js +0 -3
- package/dist/_virtual/router2.js +0 -3
- package/dist/_virtual/router3.js +0 -3
- package/dist/_virtual/script.js +0 -3
- package/dist/_virtual/segment.js +0 -3
- package/dist/_virtual/sorted-routes.js +0 -3
- package/dist/_virtual/trusted-types.js +0 -3
- package/dist/_virtual/use-intersection.js +0 -3
- package/dist/_virtual/utils.js +0 -3
- package/dist/_virtual/with-router.js +0 -3
- package/dist/components/Accordeon/Accordeon.types.d.ts +0 -4
- package/dist/components/AuthButton/index.d.ts +0 -1
- package/dist/components/Dialog/Dialog.types.d.ts +0 -7
- package/dist/components/PrimaryButton/PrimaryButton.d.ts +0 -8
- package/dist/components/PrimaryButton/index.d.ts +0 -1
- package/dist/components/SvgIcon/SvgIcon.types.d.ts +0 -8
- package/dist/components/index.d.ts +0 -31
- package/dist/components/useDimensions.d.ts +0 -4
- package/dist/components/useOrientation.d.ts +0 -3
- package/dist/components/useScroll.d.ts +0 -4
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.cjs.js +0 -7
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs.js +0 -48
- package/dist/node_modules/clsx/dist/clsx.m.js +0 -3
- package/dist/node_modules/external-svg-loader/dist/svg-loader.min.js +0 -1
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
- package/dist/node_modules/next/dist/client/add-locale.js +0 -42
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -78
- package/dist/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -69
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -39
- package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -51
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
- package/dist/node_modules/next/dist/client/head-manager.js +0 -212
- package/dist/node_modules/next/dist/client/link.js +0 -431
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -40
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -50
- package/dist/node_modules/next/dist/client/remove-base-path.js +0 -45
- package/dist/node_modules/next/dist/client/remove-locale.js +0 -41
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -99
- package/dist/node_modules/next/dist/client/route-loader.js +0 -327
- package/dist/node_modules/next/dist/client/router.js +0 -202
- package/dist/node_modules/next/dist/client/script.js +0 -353
- package/dist/node_modules/next/dist/client/trusted-types.js +0 -54
- package/dist/node_modules/next/dist/client/use-intersection.js +0 -129
- package/dist/node_modules/next/dist/client/with-router.js +0 -52
- package/dist/node_modules/next/dist/compiled/cookie/index.js +0 -18
- package/dist/node_modules/next/dist/compiled/gzip-size/index.js +0 -15
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -416
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +0 -230
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.min.js +0 -26
- package/dist/node_modules/next/dist/compiled/react-is/index.js +0 -21
- package/dist/node_modules/next/dist/lib/is-api-route.js +0 -27
- package/dist/node_modules/next/dist/lib/is-error.js +0 -53
- package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.js +0 -35
- package/dist/node_modules/next/dist/server/future/helpers/interception-routes.js +0 -97
- package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +0 -63
- package/dist/node_modules/next/dist/shared/lib/bloom-filter.js +0 -96
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -38
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/is-plain-object.js +0 -50
- package/dist/node_modules/next/dist/shared/lib/mitt.js +0 -57
- package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/router.js +0 -1771
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
- package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -99
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js +0 -29
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -69
- package/dist/node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js +0 -49
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -67
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.js +0 -27
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -28
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -40
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -47
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.js +0 -44
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.js +0 -62
- package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +0 -245
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -80
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +0 -52
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -35
- package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.js +0 -136
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -53
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -200
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -182
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -28
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -196
- package/dist/node_modules/next/link.js +0 -7
- package/dist/node_modules/next/router.js +0 -6
- package/dist/node_modules/react-toastify/dist/react-toastify.esm.mjs.js +0 -7
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -28
- package/dist/services/prisma.service.d.ts +0 -2
- package/dist/src/components/Accordeon/Accordeon.js +0 -14
- package/dist/src/components/Accordeon/styles.module.scss.js +0 -7
- package/dist/src/components/AuthButton/styles.module.scss.js +0 -4
- package/dist/src/components/CardButton/styles.module.scss.js +0 -4
- package/dist/src/components/Checkbox/styles.module.scss.js +0 -4
- package/dist/src/components/ChooseRole/styles.module.scss.js +0 -4
- package/dist/src/components/CopyCode/styles.module.scss.js +0 -4
- package/dist/src/components/Dialog/Dialog.js +0 -14
- package/dist/src/components/Dialog/styles.module.scss.js +0 -7
- package/dist/src/components/FormButton/styles.module.scss.js +0 -4
- package/dist/src/components/FormText/styles.module.scss.js +0 -4
- package/dist/src/components/ForwardButton/styles.module.scss.js +0 -4
- package/dist/src/components/Gap/Gap.js +0 -7
- package/dist/src/components/InputMail/styles.module.scss.js +0 -4
- package/dist/src/components/InputNames/styles.module.scss.js +0 -4
- package/dist/src/components/InputNumber/styles.module.scss.js +0 -4
- package/dist/src/components/InputPassword/styles.module.scss.js +0 -4
- package/dist/src/components/InputPin/styles.module.scss.js +0 -4
- package/dist/src/components/InputText/styles.module.scss.js +0 -4
- package/dist/src/components/OptionField/styles.module.scss.js +0 -4
- package/dist/src/components/OptionFieldHorizontal/styles.module.scss.js +0 -4
- package/dist/src/components/PrimaryButton/styles.module.scss.js +0 -4
- package/dist/src/components/ProgressBar/styles.module.scss.js +0 -4
- package/dist/src/components/RadioButtons/styles.module.scss.js +0 -4
- package/dist/src/components/RedirectButton/styles.module.scss.js +0 -4
- package/dist/src/components/SearchChips/styles.module.scss.js +0 -4
- package/dist/src/components/Searchbar/styles.module.scss.js +0 -4
- package/dist/src/components/Slider/styles.module.scss.js +0 -4
- package/dist/src/components/StepBack/styles.module.scss.js +0 -4
- package/dist/src/components/SvgIcon/SvgIcon.js +0 -9
- package/dist/src/components/Table/Table.js +0 -12
- package/dist/src/components/Table/styles.module.scss.js +0 -4
- package/dist/src/components/TextWithIcon/styles.module.scss.js +0 -4
- package/dist/src/components/UsageCard/styles.module.scss.js +0 -4
- package/dist/src/index.js +0 -36
- package/dist/types/Concept.d.ts +0 -7
- package/dist/types/Content.d.ts +0 -15
- package/dist/types/CourseAnnouncement.d.ts +0 -13
- package/dist/types/CourseAnnouncementAsset.d.ts +0 -22
- package/dist/types/CourseAnnouncementAssset.d.ts +0 -21
- package/dist/types/CourseMessage.d.ts +0 -13
- package/dist/types/CourseParticipant.d.ts +0 -9
- package/dist/types/CoursePin.d.ts +0 -8
- package/dist/types/File.d.ts +0 -13
- package/dist/types/HelpData.d.ts +0 -8
- package/dist/types/News.d.ts +0 -13
- package/dist/types/OrganizationMember.d.ts +0 -12
- package/dist/types/Page.d.ts +0 -8
- package/dist/types/ProductFeature.d.ts +0 -8
- package/dist/types/ProductLimit.d.ts +0 -8
- package/dist/types/PublicUser.d.ts +0 -7
- package/dist/types/index.d.ts +0 -2
- package/dist/types/marketing/BenefitForIndividuals.d.ts +0 -9
- package/dist/types/marketing/BenefitForSchools.d.ts +0 -9
- package/dist/types/marketing/Page.d.ts +0 -8
- package/dist/types/marketing/WebsiteData.d.ts +0 -23
@@ -1,40 +0,0 @@
|
|
1
|
-
import { __exports as isLocalUrl } from '../../../../../../../_virtual/is-local-url.js';
|
2
|
-
import { __require as requireUtils } from '../../utils.js';
|
3
|
-
import { __require as requireHasBasePath } from '../../../../client/has-base-path.js';
|
4
|
-
|
5
|
-
var hasRequiredIsLocalUrl;
|
6
|
-
|
7
|
-
function requireIsLocalUrl () {
|
8
|
-
if (hasRequiredIsLocalUrl) return isLocalUrl;
|
9
|
-
hasRequiredIsLocalUrl = 1;
|
10
|
-
(function (exports) {
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
12
|
-
value: true
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "isLocalURL", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function() {
|
17
|
-
return isLocalURL;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
const _utils = requireUtils();
|
21
|
-
const _hasbasepath = requireHasBasePath();
|
22
|
-
function isLocalURL(url) {
|
23
|
-
// prevent a hydration mismatch on href for url with anchor refs
|
24
|
-
if (!(0, _utils.isAbsoluteUrl)(url)) return true;
|
25
|
-
try {
|
26
|
-
// absolute urls can be local if they are on the same origin
|
27
|
-
const locationOrigin = (0, _utils.getLocationOrigin)();
|
28
|
-
const resolved = new URL(url, locationOrigin);
|
29
|
-
return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname);
|
30
|
-
} catch (_) {
|
31
|
-
return false;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
|
36
|
-
} (isLocalUrl));
|
37
|
-
return isLocalUrl;
|
38
|
-
}
|
39
|
-
|
40
|
-
export { requireIsLocalUrl as __require };
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { __exports as omit } from '../../../../../../../_virtual/omit.js';
|
2
|
-
|
3
|
-
var hasRequiredOmit;
|
4
|
-
|
5
|
-
function requireOmit () {
|
6
|
-
if (hasRequiredOmit) return omit;
|
7
|
-
hasRequiredOmit = 1;
|
8
|
-
(function (exports) {
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
10
|
-
value: true
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "omit", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function() {
|
15
|
-
return omit;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
function omit(object, keys) {
|
19
|
-
const omitted = {};
|
20
|
-
Object.keys(object).forEach((key)=>{
|
21
|
-
if (!keys.includes(key)) {
|
22
|
-
omitted[key] = object[key];
|
23
|
-
}
|
24
|
-
});
|
25
|
-
return omitted;
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
} (omit));
|
30
|
-
return omit;
|
31
|
-
}
|
32
|
-
|
33
|
-
export { requireOmit as __require };
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { __exports as parsePath } from '../../../../../../../_virtual/parse-path.js';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Given a path this function will find the pathname, query and hash and return
|
5
|
-
* them. This is useful to parse full paths on the client side.
|
6
|
-
* @param path A path to parse e.g. /foo/bar?id=1#hash
|
7
|
-
*/
|
8
|
-
|
9
|
-
var hasRequiredParsePath;
|
10
|
-
|
11
|
-
function requireParsePath () {
|
12
|
-
if (hasRequiredParsePath) return parsePath;
|
13
|
-
hasRequiredParsePath = 1;
|
14
|
-
(function (exports) {
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
16
|
-
value: true
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "parsePath", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function() {
|
21
|
-
return parsePath;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
function parsePath(path) {
|
25
|
-
const hashIndex = path.indexOf("#");
|
26
|
-
const queryIndex = path.indexOf("?");
|
27
|
-
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
28
|
-
if (hasQuery || hashIndex > -1) {
|
29
|
-
return {
|
30
|
-
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
31
|
-
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : "",
|
32
|
-
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
33
|
-
};
|
34
|
-
}
|
35
|
-
return {
|
36
|
-
pathname: path,
|
37
|
-
query: "",
|
38
|
-
hash: ""
|
39
|
-
};
|
40
|
-
}
|
41
|
-
|
42
|
-
|
43
|
-
} (parsePath));
|
44
|
-
return parsePath;
|
45
|
-
}
|
46
|
-
|
47
|
-
export { requireParsePath as __require };
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import { __exports as parseRelativeUrl } from '../../../../../../../_virtual/parse-relative-url.js';
|
2
|
-
import { __require as requireUtils } from '../../utils.js';
|
3
|
-
import { __require as requireQuerystring } from './querystring.js';
|
4
|
-
|
5
|
-
var hasRequiredParseRelativeUrl;
|
6
|
-
|
7
|
-
function requireParseRelativeUrl () {
|
8
|
-
if (hasRequiredParseRelativeUrl) return parseRelativeUrl;
|
9
|
-
hasRequiredParseRelativeUrl = 1;
|
10
|
-
(function (exports) {
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
12
|
-
value: true
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "parseRelativeUrl", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function() {
|
17
|
-
return parseRelativeUrl;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
const _utils = requireUtils();
|
21
|
-
const _querystring = requireQuerystring();
|
22
|
-
function parseRelativeUrl(url, base) {
|
23
|
-
const globalBase = new URL(typeof window === "undefined" ? "http://n" : (0, _utils.getLocationOrigin)());
|
24
|
-
const resolvedBase = base ? new URL(base, globalBase) : url.startsWith(".") ? new URL(typeof window === "undefined" ? "http://n" : window.location.href) : globalBase;
|
25
|
-
const { pathname, searchParams, search, hash, href, origin } = new URL(url, resolvedBase);
|
26
|
-
if (origin !== globalBase.origin) {
|
27
|
-
throw new Error("invariant: invalid relative URL, router received " + url);
|
28
|
-
}
|
29
|
-
return {
|
30
|
-
pathname,
|
31
|
-
query: (0, _querystring.searchParamsToUrlQuery)(searchParams),
|
32
|
-
search,
|
33
|
-
hash,
|
34
|
-
href: href.slice(globalBase.origin.length)
|
35
|
-
};
|
36
|
-
}
|
37
|
-
|
38
|
-
|
39
|
-
} (parseRelativeUrl));
|
40
|
-
return parseRelativeUrl;
|
41
|
-
}
|
42
|
-
|
43
|
-
export { requireParseRelativeUrl as __require };
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import { __exports as parseUrl } from '../../../../../../../_virtual/parse-url.js';
|
2
|
-
import { __require as requireQuerystring } from './querystring.js';
|
3
|
-
import { __require as requireParseRelativeUrl } from './parse-relative-url.js';
|
4
|
-
|
5
|
-
var hasRequiredParseUrl;
|
6
|
-
|
7
|
-
function requireParseUrl () {
|
8
|
-
if (hasRequiredParseUrl) return parseUrl;
|
9
|
-
hasRequiredParseUrl = 1;
|
10
|
-
(function (exports) {
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
12
|
-
value: true
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "parseUrl", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function() {
|
17
|
-
return parseUrl;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
const _querystring = requireQuerystring();
|
21
|
-
const _parserelativeurl = requireParseRelativeUrl();
|
22
|
-
function parseUrl(url) {
|
23
|
-
if (url.startsWith("/")) {
|
24
|
-
return (0, _parserelativeurl.parseRelativeUrl)(url);
|
25
|
-
}
|
26
|
-
const parsedURL = new URL(url);
|
27
|
-
return {
|
28
|
-
hash: parsedURL.hash,
|
29
|
-
hostname: parsedURL.hostname,
|
30
|
-
href: parsedURL.href,
|
31
|
-
pathname: parsedURL.pathname,
|
32
|
-
port: parsedURL.port,
|
33
|
-
protocol: parsedURL.protocol,
|
34
|
-
query: (0, _querystring.searchParamsToUrlQuery)(parsedURL.searchParams),
|
35
|
-
search: parsedURL.search
|
36
|
-
};
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
} (parseUrl));
|
41
|
-
return parseUrl;
|
42
|
-
}
|
43
|
-
|
44
|
-
export { requireParseUrl as __require };
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { __exports as pathHasPrefix } from '../../../../../../../_virtual/path-has-prefix.js';
|
2
|
-
import { __require as requireParsePath } from './parse-path.js';
|
3
|
-
|
4
|
-
var hasRequiredPathHasPrefix;
|
5
|
-
|
6
|
-
function requirePathHasPrefix () {
|
7
|
-
if (hasRequiredPathHasPrefix) return pathHasPrefix;
|
8
|
-
hasRequiredPathHasPrefix = 1;
|
9
|
-
(function (exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "pathHasPrefix", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return pathHasPrefix;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const _parsepath = requireParsePath();
|
20
|
-
function pathHasPrefix(path, prefix) {
|
21
|
-
if (typeof path !== "string") {
|
22
|
-
return false;
|
23
|
-
}
|
24
|
-
const { pathname } = (0, _parsepath.parsePath)(path);
|
25
|
-
return pathname === prefix || pathname.startsWith(prefix + "/");
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
} (pathHasPrefix));
|
30
|
-
return pathHasPrefix;
|
31
|
-
}
|
32
|
-
|
33
|
-
export { requirePathHasPrefix as __require };
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import { __exports as pathMatch } from '../../../../../../../_virtual/path-match.js';
|
2
|
-
import { __require as requirePathToRegexp } from '../../../../compiled/path-to-regexp/index.js';
|
3
|
-
|
4
|
-
var hasRequiredPathMatch;
|
5
|
-
|
6
|
-
function requirePathMatch () {
|
7
|
-
if (hasRequiredPathMatch) return pathMatch;
|
8
|
-
hasRequiredPathMatch = 1;
|
9
|
-
(function (exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "getPathMatch", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return getPathMatch;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const _pathtoregexp = requirePathToRegexp();
|
20
|
-
function getPathMatch(path, options) {
|
21
|
-
const keys = [];
|
22
|
-
const regexp = (0, _pathtoregexp.pathToRegexp)(path, keys, {
|
23
|
-
delimiter: "/",
|
24
|
-
sensitive: typeof (options == null ? void 0 : options.sensitive) === "boolean" ? options.sensitive : false,
|
25
|
-
strict: options == null ? void 0 : options.strict
|
26
|
-
});
|
27
|
-
const matcher = (0, _pathtoregexp.regexpToFunction)((options == null ? void 0 : options.regexModifier) ? new RegExp(options.regexModifier(regexp.source), regexp.flags) : regexp, keys);
|
28
|
-
/**
|
29
|
-
* A matcher function that will check if a given pathname matches the path
|
30
|
-
* given in the builder function. When the path does not match it will return
|
31
|
-
* `false` but if it does it will return an object with the matched params
|
32
|
-
* merged with the params provided in the second argument.
|
33
|
-
*/ return (pathname, params)=>{
|
34
|
-
// If no pathname is provided it's not a match.
|
35
|
-
if (typeof pathname !== "string") return false;
|
36
|
-
const match = matcher(pathname);
|
37
|
-
// If the path did not match `false` will be returned.
|
38
|
-
if (!match) return false;
|
39
|
-
/**
|
40
|
-
* If unnamed params are not allowed they must be removed from
|
41
|
-
* the matched parameters. path-to-regexp uses "string" for named and
|
42
|
-
* "number" for unnamed parameters.
|
43
|
-
*/ if (options == null ? void 0 : options.removeUnnamedParams) {
|
44
|
-
for (const key of keys){
|
45
|
-
if (typeof key.name === "number") {
|
46
|
-
delete match.params[key.name];
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
return {
|
51
|
-
...params,
|
52
|
-
...match.params
|
53
|
-
};
|
54
|
-
};
|
55
|
-
}
|
56
|
-
|
57
|
-
|
58
|
-
} (pathMatch));
|
59
|
-
return pathMatch;
|
60
|
-
}
|
61
|
-
|
62
|
-
export { requirePathMatch as __require };
|
@@ -1,245 +0,0 @@
|
|
1
|
-
import { __exports as prepareDestination } from '../../../../../../../_virtual/prepare-destination.js';
|
2
|
-
import { __require as requirePathToRegexp } from '../../../../compiled/path-to-regexp/index.js';
|
3
|
-
import { __require as requireEscapeRegexp } from '../../escape-regexp.js';
|
4
|
-
import { __require as requireParseUrl } from './parse-url.js';
|
5
|
-
import { __require as requireInterceptionRoutes } from '../../../../server/future/helpers/interception-routes.js';
|
6
|
-
import { __require as requireAppRouterHeaders } from '../../../../client/components/app-router-headers.js';
|
7
|
-
import { __require as requireGetCookieParser } from '../../../../server/api-utils/get-cookie-parser.js';
|
8
|
-
|
9
|
-
var hasRequiredPrepareDestination;
|
10
|
-
|
11
|
-
function requirePrepareDestination () {
|
12
|
-
if (hasRequiredPrepareDestination) return prepareDestination;
|
13
|
-
hasRequiredPrepareDestination = 1;
|
14
|
-
(function (exports) {
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
16
|
-
value: true
|
17
|
-
});
|
18
|
-
function _export(target, all) {
|
19
|
-
for(var name in all)Object.defineProperty(target, name, {
|
20
|
-
enumerable: true,
|
21
|
-
get: all[name]
|
22
|
-
});
|
23
|
-
}
|
24
|
-
_export(exports, {
|
25
|
-
matchHas: function() {
|
26
|
-
return matchHas;
|
27
|
-
},
|
28
|
-
compileNonPath: function() {
|
29
|
-
return compileNonPath;
|
30
|
-
},
|
31
|
-
prepareDestination: function() {
|
32
|
-
return prepareDestination;
|
33
|
-
}
|
34
|
-
});
|
35
|
-
const _pathtoregexp = requirePathToRegexp();
|
36
|
-
const _escaperegexp = requireEscapeRegexp();
|
37
|
-
const _parseurl = requireParseUrl();
|
38
|
-
const _interceptionroutes = requireInterceptionRoutes();
|
39
|
-
const _approuterheaders = requireAppRouterHeaders();
|
40
|
-
const _getcookieparser = requireGetCookieParser();
|
41
|
-
/**
|
42
|
-
* Ensure only a-zA-Z are used for param names for proper interpolating
|
43
|
-
* with path-to-regexp
|
44
|
-
*/ function getSafeParamName(paramName) {
|
45
|
-
let newParamName = "";
|
46
|
-
for(let i = 0; i < paramName.length; i++){
|
47
|
-
const charCode = paramName.charCodeAt(i);
|
48
|
-
if (charCode > 64 && charCode < 91 || // A-Z
|
49
|
-
charCode > 96 && charCode < 123 // a-z
|
50
|
-
) {
|
51
|
-
newParamName += paramName[i];
|
52
|
-
}
|
53
|
-
}
|
54
|
-
return newParamName;
|
55
|
-
}
|
56
|
-
function escapeSegment(str, segmentName) {
|
57
|
-
return str.replace(new RegExp(":" + (0, _escaperegexp.escapeStringRegexp)(segmentName), "g"), "__ESC_COLON_" + segmentName);
|
58
|
-
}
|
59
|
-
function unescapeSegments(str) {
|
60
|
-
return str.replace(/__ESC_COLON_/gi, ":");
|
61
|
-
}
|
62
|
-
function matchHas(req, query, has, missing) {
|
63
|
-
if (has === void 0) has = [];
|
64
|
-
if (missing === void 0) missing = [];
|
65
|
-
const params = {};
|
66
|
-
const hasMatch = (hasItem)=>{
|
67
|
-
let value;
|
68
|
-
let key = hasItem.key;
|
69
|
-
switch(hasItem.type){
|
70
|
-
case "header":
|
71
|
-
{
|
72
|
-
key = key.toLowerCase();
|
73
|
-
value = req.headers[key];
|
74
|
-
break;
|
75
|
-
}
|
76
|
-
case "cookie":
|
77
|
-
{
|
78
|
-
if ("cookies" in req) {
|
79
|
-
value = req.cookies[hasItem.key];
|
80
|
-
} else {
|
81
|
-
const cookies = (0, _getcookieparser.getCookieParser)(req.headers)();
|
82
|
-
value = cookies[hasItem.key];
|
83
|
-
}
|
84
|
-
break;
|
85
|
-
}
|
86
|
-
case "query":
|
87
|
-
{
|
88
|
-
value = query[key];
|
89
|
-
break;
|
90
|
-
}
|
91
|
-
case "host":
|
92
|
-
{
|
93
|
-
const { host } = (req == null ? void 0 : req.headers) || {};
|
94
|
-
// remove port from host if present
|
95
|
-
const hostname = host == null ? void 0 : host.split(":")[0].toLowerCase();
|
96
|
-
value = hostname;
|
97
|
-
break;
|
98
|
-
}
|
99
|
-
}
|
100
|
-
if (!hasItem.value && value) {
|
101
|
-
params[getSafeParamName(key)] = value;
|
102
|
-
return true;
|
103
|
-
} else if (value) {
|
104
|
-
const matcher = new RegExp("^" + hasItem.value + "$");
|
105
|
-
const matches = Array.isArray(value) ? value.slice(-1)[0].match(matcher) : value.match(matcher);
|
106
|
-
if (matches) {
|
107
|
-
if (Array.isArray(matches)) {
|
108
|
-
if (matches.groups) {
|
109
|
-
Object.keys(matches.groups).forEach((groupKey)=>{
|
110
|
-
params[groupKey] = matches.groups[groupKey];
|
111
|
-
});
|
112
|
-
} else if (hasItem.type === "host" && matches[0]) {
|
113
|
-
params.host = matches[0];
|
114
|
-
}
|
115
|
-
}
|
116
|
-
return true;
|
117
|
-
}
|
118
|
-
}
|
119
|
-
return false;
|
120
|
-
};
|
121
|
-
const allMatch = has.every((item)=>hasMatch(item)) && !missing.some((item)=>hasMatch(item));
|
122
|
-
if (allMatch) {
|
123
|
-
return params;
|
124
|
-
}
|
125
|
-
return false;
|
126
|
-
}
|
127
|
-
function compileNonPath(value, params) {
|
128
|
-
if (!value.includes(":")) {
|
129
|
-
return value;
|
130
|
-
}
|
131
|
-
for (const key of Object.keys(params)){
|
132
|
-
if (value.includes(":" + key)) {
|
133
|
-
value = value.replace(new RegExp(":" + key + "\\*", "g"), ":" + key + "--ESCAPED_PARAM_ASTERISKS").replace(new RegExp(":" + key + "\\?", "g"), ":" + key + "--ESCAPED_PARAM_QUESTION").replace(new RegExp(":" + key + "\\+", "g"), ":" + key + "--ESCAPED_PARAM_PLUS").replace(new RegExp(":" + key + "(?!\\w)", "g"), "--ESCAPED_PARAM_COLON" + key);
|
134
|
-
}
|
135
|
-
}
|
136
|
-
value = value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g, "\\$1").replace(/--ESCAPED_PARAM_PLUS/g, "+").replace(/--ESCAPED_PARAM_COLON/g, ":").replace(/--ESCAPED_PARAM_QUESTION/g, "?").replace(/--ESCAPED_PARAM_ASTERISKS/g, "*");
|
137
|
-
// the value needs to start with a forward-slash to be compiled
|
138
|
-
// correctly
|
139
|
-
return (0, _pathtoregexp.compile)("/" + value, {
|
140
|
-
validate: false
|
141
|
-
})(params).slice(1);
|
142
|
-
}
|
143
|
-
function prepareDestination(args) {
|
144
|
-
const query = Object.assign({}, args.query);
|
145
|
-
delete query.__nextLocale;
|
146
|
-
delete query.__nextDefaultLocale;
|
147
|
-
delete query.__nextDataReq;
|
148
|
-
delete query.__nextInferredLocaleFromDefault;
|
149
|
-
delete query[_approuterheaders.NEXT_RSC_UNION_QUERY];
|
150
|
-
let escapedDestination = args.destination;
|
151
|
-
for (const param of Object.keys({
|
152
|
-
...args.params,
|
153
|
-
...query
|
154
|
-
})){
|
155
|
-
escapedDestination = escapeSegment(escapedDestination, param);
|
156
|
-
}
|
157
|
-
const parsedDestination = (0, _parseurl.parseUrl)(escapedDestination);
|
158
|
-
const destQuery = parsedDestination.query;
|
159
|
-
const destPath = unescapeSegments("" + parsedDestination.pathname + (parsedDestination.hash || ""));
|
160
|
-
const destHostname = unescapeSegments(parsedDestination.hostname || "");
|
161
|
-
const destPathParamKeys = [];
|
162
|
-
const destHostnameParamKeys = [];
|
163
|
-
(0, _pathtoregexp.pathToRegexp)(destPath, destPathParamKeys);
|
164
|
-
(0, _pathtoregexp.pathToRegexp)(destHostname, destHostnameParamKeys);
|
165
|
-
const destParams = [];
|
166
|
-
destPathParamKeys.forEach((key)=>destParams.push(key.name));
|
167
|
-
destHostnameParamKeys.forEach((key)=>destParams.push(key.name));
|
168
|
-
const destPathCompiler = (0, _pathtoregexp.compile)(destPath, // we don't validate while compiling the destination since we should
|
169
|
-
// have already validated before we got to this point and validating
|
170
|
-
// breaks compiling destinations with named pattern params from the source
|
171
|
-
// e.g. /something:hello(.*) -> /another/:hello is broken with validation
|
172
|
-
// since compile validation is meant for reversing and not for inserting
|
173
|
-
// params from a separate path-regex into another
|
174
|
-
{
|
175
|
-
validate: false
|
176
|
-
});
|
177
|
-
const destHostnameCompiler = (0, _pathtoregexp.compile)(destHostname, {
|
178
|
-
validate: false
|
179
|
-
});
|
180
|
-
// update any params in query values
|
181
|
-
for (const [key, strOrArray] of Object.entries(destQuery)){
|
182
|
-
// the value needs to start with a forward-slash to be compiled
|
183
|
-
// correctly
|
184
|
-
if (Array.isArray(strOrArray)) {
|
185
|
-
destQuery[key] = strOrArray.map((value)=>compileNonPath(unescapeSegments(value), args.params));
|
186
|
-
} else if (typeof strOrArray === "string") {
|
187
|
-
destQuery[key] = compileNonPath(unescapeSegments(strOrArray), args.params);
|
188
|
-
}
|
189
|
-
}
|
190
|
-
// add path params to query if it's not a redirect and not
|
191
|
-
// already defined in destination query or path
|
192
|
-
let paramKeys = Object.keys(args.params).filter((name)=>name !== "nextInternalLocale");
|
193
|
-
if (args.appendParamsToQuery && !paramKeys.some((key)=>destParams.includes(key))) {
|
194
|
-
for (const key of paramKeys){
|
195
|
-
if (!(key in destQuery)) {
|
196
|
-
destQuery[key] = args.params[key];
|
197
|
-
}
|
198
|
-
}
|
199
|
-
}
|
200
|
-
let newUrl;
|
201
|
-
// The compiler also that the interception route marker is an unnamed param, hence '0',
|
202
|
-
// so we need to add it to the params object.
|
203
|
-
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(destPath)) {
|
204
|
-
for (const segment of destPath.split("/")){
|
205
|
-
const marker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
|
206
|
-
if (marker) {
|
207
|
-
args.params["0"] = marker;
|
208
|
-
break;
|
209
|
-
}
|
210
|
-
}
|
211
|
-
}
|
212
|
-
try {
|
213
|
-
newUrl = destPathCompiler(args.params);
|
214
|
-
const [pathname, hash] = newUrl.split("#");
|
215
|
-
parsedDestination.hostname = destHostnameCompiler(args.params);
|
216
|
-
parsedDestination.pathname = pathname;
|
217
|
-
parsedDestination.hash = "" + (hash ? "#" : "") + (hash || "");
|
218
|
-
delete parsedDestination.search;
|
219
|
-
} catch (err) {
|
220
|
-
if (err.message.match(/Expected .*? to not repeat, but got an array/)) {
|
221
|
-
throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");
|
222
|
-
}
|
223
|
-
throw err;
|
224
|
-
}
|
225
|
-
// Query merge order lowest priority to highest
|
226
|
-
// 1. initial URL query values
|
227
|
-
// 2. path segment values
|
228
|
-
// 3. destination specified query values
|
229
|
-
parsedDestination.query = {
|
230
|
-
...query,
|
231
|
-
...parsedDestination.query
|
232
|
-
};
|
233
|
-
return {
|
234
|
-
newUrl,
|
235
|
-
destQuery,
|
236
|
-
parsedDestination
|
237
|
-
};
|
238
|
-
}
|
239
|
-
|
240
|
-
|
241
|
-
} (prepareDestination));
|
242
|
-
return prepareDestination;
|
243
|
-
}
|
244
|
-
|
245
|
-
export { requirePrepareDestination as __require };
|
@@ -1,80 +0,0 @@
|
|
1
|
-
import { __exports as querystring } from '../../../../../../../_virtual/querystring.js';
|
2
|
-
|
3
|
-
var hasRequiredQuerystring;
|
4
|
-
|
5
|
-
function requireQuerystring () {
|
6
|
-
if (hasRequiredQuerystring) return querystring;
|
7
|
-
hasRequiredQuerystring = 1;
|
8
|
-
(function (exports) {
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
10
|
-
value: true
|
11
|
-
});
|
12
|
-
function _export(target, all) {
|
13
|
-
for(var name in all)Object.defineProperty(target, name, {
|
14
|
-
enumerable: true,
|
15
|
-
get: all[name]
|
16
|
-
});
|
17
|
-
}
|
18
|
-
_export(exports, {
|
19
|
-
searchParamsToUrlQuery: function() {
|
20
|
-
return searchParamsToUrlQuery;
|
21
|
-
},
|
22
|
-
urlQueryToSearchParams: function() {
|
23
|
-
return urlQueryToSearchParams;
|
24
|
-
},
|
25
|
-
assign: function() {
|
26
|
-
return assign;
|
27
|
-
}
|
28
|
-
});
|
29
|
-
function searchParamsToUrlQuery(searchParams) {
|
30
|
-
const query = {};
|
31
|
-
searchParams.forEach((value, key)=>{
|
32
|
-
if (typeof query[key] === "undefined") {
|
33
|
-
query[key] = value;
|
34
|
-
} else if (Array.isArray(query[key])) {
|
35
|
-
query[key].push(value);
|
36
|
-
} else {
|
37
|
-
query[key] = [
|
38
|
-
query[key],
|
39
|
-
value
|
40
|
-
];
|
41
|
-
}
|
42
|
-
});
|
43
|
-
return query;
|
44
|
-
}
|
45
|
-
function stringifyUrlQueryParam(param) {
|
46
|
-
if (typeof param === "string" || typeof param === "number" && !isNaN(param) || typeof param === "boolean") {
|
47
|
-
return String(param);
|
48
|
-
} else {
|
49
|
-
return "";
|
50
|
-
}
|
51
|
-
}
|
52
|
-
function urlQueryToSearchParams(urlQuery) {
|
53
|
-
const result = new URLSearchParams();
|
54
|
-
Object.entries(urlQuery).forEach((param)=>{
|
55
|
-
let [key, value] = param;
|
56
|
-
if (Array.isArray(value)) {
|
57
|
-
value.forEach((item)=>result.append(key, stringifyUrlQueryParam(item)));
|
58
|
-
} else {
|
59
|
-
result.set(key, stringifyUrlQueryParam(value));
|
60
|
-
}
|
61
|
-
});
|
62
|
-
return result;
|
63
|
-
}
|
64
|
-
function assign(target) {
|
65
|
-
for(var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
66
|
-
searchParamsList[_key - 1] = arguments[_key];
|
67
|
-
}
|
68
|
-
searchParamsList.forEach((searchParams)=>{
|
69
|
-
Array.from(searchParams.keys()).forEach((key)=>target.delete(key));
|
70
|
-
searchParams.forEach((value, key)=>target.append(key, value));
|
71
|
-
});
|
72
|
-
return target;
|
73
|
-
}
|
74
|
-
|
75
|
-
|
76
|
-
} (querystring));
|
77
|
-
return querystring;
|
78
|
-
}
|
79
|
-
|
80
|
-
export { requireQuerystring as __require };
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import { __exports as removePathPrefix } from '../../../../../../../_virtual/remove-path-prefix.js';
|
2
|
-
import { __require as requirePathHasPrefix } from './path-has-prefix.js';
|
3
|
-
|
4
|
-
var hasRequiredRemovePathPrefix;
|
5
|
-
|
6
|
-
function requireRemovePathPrefix () {
|
7
|
-
if (hasRequiredRemovePathPrefix) return removePathPrefix;
|
8
|
-
hasRequiredRemovePathPrefix = 1;
|
9
|
-
(function (exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "removePathPrefix", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return removePathPrefix;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const _pathhasprefix = requirePathHasPrefix();
|
20
|
-
function removePathPrefix(path, prefix) {
|
21
|
-
// If the path doesn't start with the prefix we can return it as is. This
|
22
|
-
// protects us from situations where the prefix is a substring of the path
|
23
|
-
// prefix such as:
|
24
|
-
//
|
25
|
-
// For prefix: /blog
|
26
|
-
//
|
27
|
-
// /blog -> true
|
28
|
-
// /blog/ -> true
|
29
|
-
// /blog/1 -> true
|
30
|
-
// /blogging -> false
|
31
|
-
// /blogging/ -> false
|
32
|
-
// /blogging/1 -> false
|
33
|
-
if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) {
|
34
|
-
return path;
|
35
|
-
}
|
36
|
-
// Remove the prefix from the path via slicing.
|
37
|
-
const withoutPrefix = path.slice(prefix.length);
|
38
|
-
// If the path without the prefix starts with a `/` we can return it as is.
|
39
|
-
if (withoutPrefix.startsWith("/")) {
|
40
|
-
return withoutPrefix;
|
41
|
-
}
|
42
|
-
// If the path without the prefix doesn't start with a `/` we need to add it
|
43
|
-
// back to the path to make sure it's a valid path.
|
44
|
-
return "/" + withoutPrefix;
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
} (removePathPrefix));
|
49
|
-
return removePathPrefix;
|
50
|
-
}
|
51
|
-
|
52
|
-
export { requireRemovePathPrefix as __require };
|