@tsed/schema 8.0.0-alpha.5 → 8.0.0-alpha.7
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/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/esm/components/async-api/channelsMapper.js.map +1 -1
- package/lib/esm/components/async-api/generate.js.map +1 -1
- package/lib/esm/components/async-api/messageMapper.js.map +1 -1
- package/lib/esm/components/async-api/payloadMapper.js.map +1 -1
- package/lib/esm/components/async-api/responseMapper.js.map +1 -1
- package/lib/esm/components/default/anyMapper.js.map +1 -1
- package/lib/esm/components/default/classMapper.js.map +1 -1
- package/lib/esm/components/default/genericsMapper.js.map +1 -1
- package/lib/esm/components/default/inheritedClassMapper.js.map +1 -1
- package/lib/esm/components/default/inlineEnumsMapper.js.map +1 -1
- package/lib/esm/components/default/lazyRefMapper.js.map +1 -1
- package/lib/esm/components/default/mapMapper.js +1 -1
- package/lib/esm/components/default/mapMapper.js.map +1 -1
- package/lib/esm/components/default/nullableMapper.js.map +1 -1
- package/lib/esm/components/default/objectMapper.js.map +1 -1
- package/lib/esm/components/default/ofMapper.js.map +1 -1
- package/lib/esm/components/default/propertiesMapper.js.map +1 -1
- package/lib/esm/components/default/requiredMapper.js.map +1 -1
- package/lib/esm/components/default/schemaMapper.js.map +1 -1
- package/lib/esm/components/open-spec/generate.js.map +1 -1
- package/lib/esm/components/open-spec/nullableMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInFilesMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInParameterMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationInQueryMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationRequestBodyMapper.js.map +1 -1
- package/lib/esm/components/open-spec/operationResponseMapper.js.map +1 -1
- package/lib/esm/components/open-spec/pathsMapper.js.map +1 -1
- package/lib/esm/constants/httpStatusMessages.js +1 -1
- package/lib/esm/constants/httpStatusMessages.js.map +1 -1
- package/lib/esm/decorators/class/children.js.map +1 -1
- package/lib/esm/decorators/class/discriminatorValue.js.map +1 -1
- package/lib/esm/decorators/collections/collectionOf.js.map +1 -1
- package/lib/esm/decorators/collections/maxItems.js.map +1 -1
- package/lib/esm/decorators/collections/maxProperties.js.map +1 -1
- package/lib/esm/decorators/collections/minItems.js.map +1 -1
- package/lib/esm/decorators/collections/minProperties.js.map +1 -1
- package/lib/esm/decorators/common/allow.js.map +1 -1
- package/lib/esm/decorators/common/any.js.map +1 -1
- package/lib/esm/decorators/common/const.js.map +1 -1
- package/lib/esm/decorators/common/defaultMsg.js.map +1 -1
- package/lib/esm/decorators/common/description.js.map +1 -1
- package/lib/esm/decorators/common/discriminatorKey.js.map +1 -1
- package/lib/esm/decorators/common/enum.js.map +1 -1
- package/lib/esm/decorators/common/examples.js.map +1 -1
- package/lib/esm/decorators/common/format.js.map +1 -1
- package/lib/esm/decorators/common/groups.js.map +1 -1
- package/lib/esm/decorators/common/integer.js.map +1 -1
- package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -1
- package/lib/esm/decorators/common/maxLength.js.map +1 -1
- package/lib/esm/decorators/common/minLength.js.map +1 -1
- package/lib/esm/decorators/common/multipleOf.js.map +1 -1
- package/lib/esm/decorators/common/name.js.map +1 -1
- package/lib/esm/decorators/common/nullable.js.map +1 -1
- package/lib/esm/decorators/common/optional.js.map +1 -1
- package/lib/esm/decorators/common/property.js.map +1 -1
- package/lib/esm/decorators/common/requiredGroups.js.map +1 -1
- package/lib/esm/decorators/common/typeError.js.map +1 -1
- package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -1
- package/lib/esm/decorators/generics/genericOf.js.map +1 -1
- package/lib/esm/decorators/operations/acceptMime.js.map +1 -1
- package/lib/esm/decorators/operations/consumes.js.map +1 -1
- package/lib/esm/decorators/operations/deprecated.js.map +1 -1
- package/lib/esm/decorators/operations/header.js.map +1 -1
- package/lib/esm/decorators/operations/in.js.map +1 -1
- package/lib/esm/decorators/operations/inFile.js +2 -2
- package/lib/esm/decorators/operations/inFile.js.map +1 -1
- package/lib/esm/decorators/operations/operation.js.map +1 -1
- package/lib/esm/decorators/operations/operationId.js.map +1 -1
- package/lib/esm/decorators/operations/operationPath.js.map +1 -1
- package/lib/esm/decorators/operations/path.js.map +1 -1
- package/lib/esm/decorators/operations/produces.js.map +1 -1
- package/lib/esm/decorators/operations/redirect.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/decorators/operations/security.js.map +1 -1
- package/lib/esm/decorators/operations/status.js.map +1 -1
- package/lib/esm/decorators/operations/summary.js.map +1 -1
- package/lib/esm/decorators/operations/tags.js.map +1 -1
- package/lib/esm/domain/DecoratorContext.js.map +1 -1
- package/lib/esm/domain/JsonClassStore.js +1 -1
- package/lib/esm/domain/JsonClassStore.js.map +1 -1
- package/lib/esm/domain/JsonEntityStore.js.map +1 -1
- package/lib/esm/domain/JsonLazyRef.js.map +1 -1
- package/lib/esm/domain/JsonMap.js.map +1 -1
- package/lib/esm/domain/JsonMedia.js.map +1 -1
- package/lib/esm/domain/JsonMethodStore.js.map +1 -1
- package/lib/esm/domain/JsonOperation.js.map +1 -1
- package/lib/esm/domain/JsonOperationRoute.js.map +1 -1
- package/lib/esm/domain/JsonParameter.js.map +1 -1
- package/lib/esm/domain/JsonParameterStore.js +1 -1
- package/lib/esm/domain/JsonParameterStore.js.map +1 -1
- package/lib/esm/domain/JsonPropertyStore.js +1 -1
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
- package/lib/esm/domain/JsonRequestBody.js.map +1 -1
- package/lib/esm/domain/JsonResponse.js.map +1 -1
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/esm/hooks/alterIgnore.js.map +1 -1
- package/lib/esm/hooks/alterOneOf.js.map +1 -1
- package/lib/esm/hooks/alterRequiredGroups.js.map +1 -1
- package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
- package/lib/esm/utils/concatPath.js.map +1 -1
- package/lib/esm/utils/from.js.map +1 -1
- package/lib/esm/utils/generateSpec.js.map +1 -1
- package/lib/esm/utils/generics.js.map +1 -1
- package/lib/esm/utils/getComputedType.js.map +1 -1
- package/lib/esm/utils/getInheritedStores.js.map +1 -1
- package/lib/esm/utils/getJsonEntityStore.js +3 -3
- package/lib/esm/utils/getJsonEntityStore.js.map +1 -1
- package/lib/esm/utils/getJsonPathParameters.js.map +1 -1
- package/lib/esm/utils/getJsonSchema.js +1 -1
- package/lib/esm/utils/getJsonSchema.js.map +1 -1
- package/lib/esm/utils/getJsonType.js.map +1 -1
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
- package/lib/esm/utils/getOperationsStores.js.map +1 -1
- package/lib/esm/utils/getPropertiesStores.js.map +1 -1
- package/lib/esm/utils/getSpec.js.map +1 -1
- package/lib/esm/utils/getSpecType.js.map +1 -1
- package/lib/esm/utils/mapHeaders.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec.js +1 -1
- package/lib/esm/utils/mapOpenSpec.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec2.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec3.js.map +1 -1
- package/lib/esm/utils/mapOperationOptions.js.map +1 -1
- package/lib/esm/utils/matchGroups.js.map +1 -1
- package/lib/esm/utils/mergeSpec.js +1 -1
- package/lib/esm/utils/mergeSpec.js.map +1 -1
- package/lib/esm/utils/operationIdFormatter.js.map +1 -1
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/esm/utils/serializeEnumValues.js.map +1 -1
- package/lib/esm/utils/somethingOf.js.map +1 -1
- package/lib/esm/utils/transformToOS2.js.map +1 -1
- package/lib/esm/utils/withErrorMsg.js.map +1 -1
- package/lib/types/constants/OperationVerbs.d.ts +1 -1
- package/lib/types/domain/JsonClassStore.d.ts +1 -1
- package/lib/types/domain/JsonPropertyStore.d.ts +1 -1
- package/lib/types/utils/getJsonEntityStore.d.ts +3 -3
- package/lib/types/utils/getJsonSchema.d.ts +1 -1
- package/package.json +16 -15
- package/lib/cjs/components/async-api/channelsMapper.js +0 -62
- package/lib/cjs/components/async-api/channelsMapper.js.map +0 -1
- package/lib/cjs/components/async-api/generate.js +0 -20
- package/lib/cjs/components/async-api/generate.js.map +0 -1
- package/lib/cjs/components/async-api/messageMapper.js +0 -44
- package/lib/cjs/components/async-api/messageMapper.js.map +0 -1
- package/lib/cjs/components/async-api/payloadMapper.js +0 -52
- package/lib/cjs/components/async-api/payloadMapper.js.map +0 -1
- package/lib/cjs/components/async-api/responseMapper.js +0 -58
- package/lib/cjs/components/async-api/responseMapper.js.map +0 -1
- package/lib/cjs/components/default/anyMapper.js +0 -29
- package/lib/cjs/components/default/anyMapper.js.map +0 -1
- package/lib/cjs/components/default/classMapper.js +0 -43
- package/lib/cjs/components/default/classMapper.js.map +0 -1
- package/lib/cjs/components/default/genericsMapper.js +0 -62
- package/lib/cjs/components/default/genericsMapper.js.map +0 -1
- package/lib/cjs/components/default/inheritedClassMapper.js +0 -22
- package/lib/cjs/components/default/inheritedClassMapper.js.map +0 -1
- package/lib/cjs/components/default/inlineEnumsMapper.js +0 -16
- package/lib/cjs/components/default/inlineEnumsMapper.js.map +0 -1
- package/lib/cjs/components/default/itemMapper.js +0 -10
- package/lib/cjs/components/default/itemMapper.js.map +0 -1
- package/lib/cjs/components/default/lazyRefMapper.js +0 -18
- package/lib/cjs/components/default/lazyRefMapper.js.map +0 -1
- package/lib/cjs/components/default/mapMapper.js +0 -25
- package/lib/cjs/components/default/mapMapper.js.map +0 -1
- package/lib/cjs/components/default/nullableMapper.js +0 -54
- package/lib/cjs/components/default/nullableMapper.js.map +0 -1
- package/lib/cjs/components/default/objectMapper.js +0 -30
- package/lib/cjs/components/default/objectMapper.js.map +0 -1
- package/lib/cjs/components/default/ofMapper.js +0 -17
- package/lib/cjs/components/default/ofMapper.js.map +0 -1
- package/lib/cjs/components/default/propertiesMapper.js +0 -25
- package/lib/cjs/components/default/propertiesMapper.js.map +0 -1
- package/lib/cjs/components/default/requiredMapper.js +0 -56
- package/lib/cjs/components/default/requiredMapper.js.map +0 -1
- package/lib/cjs/components/default/schemaMapper.js +0 -124
- package/lib/cjs/components/default/schemaMapper.js.map +0 -1
- package/lib/cjs/components/index.js +0 -37
- package/lib/cjs/components/index.js.map +0 -1
- package/lib/cjs/components/open-spec/generate.js +0 -24
- package/lib/cjs/components/open-spec/generate.js.map +0 -1
- package/lib/cjs/components/open-spec/nullableMapper.js +0 -49
- package/lib/cjs/components/open-spec/nullableMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInFilesMapper.js +0 -28
- package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInParameterMapper.js +0 -39
- package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInParametersMapper.js +0 -10
- package/lib/cjs/components/open-spec/operationInParametersMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationInQueryMapper.js +0 -61
- package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationMapper.js +0 -49
- package/lib/cjs/components/open-spec/operationMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationMediaMapper.js +0 -11
- package/lib/cjs/components/open-spec/operationMediaMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js +0 -67
- package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/operationResponseMapper.js +0 -24
- package/lib/cjs/components/open-spec/operationResponseMapper.js.map +0 -1
- package/lib/cjs/components/open-spec/pathsMapper.js +0 -95
- package/lib/cjs/components/open-spec/pathsMapper.js.map +0 -1
- package/lib/cjs/constants/OperationVerbs.js +0 -32
- package/lib/cjs/constants/OperationVerbs.js.map +0 -1
- package/lib/cjs/constants/httpStatusMessages.js +0 -24
- package/lib/cjs/constants/httpStatusMessages.js.map +0 -1
- package/lib/cjs/constants/jsonSchemaProperties.js +0 -21
- package/lib/cjs/constants/jsonSchemaProperties.js.map +0 -1
- package/lib/cjs/decorators/class/children.js +0 -24
- package/lib/cjs/decorators/class/children.js.map +0 -1
- package/lib/cjs/decorators/class/discriminatorValue.js +0 -56
- package/lib/cjs/decorators/class/discriminatorValue.js.map +0 -1
- package/lib/cjs/decorators/collections/collectionContains.js +0 -29
- package/lib/cjs/decorators/collections/collectionContains.js.map +0 -1
- package/lib/cjs/decorators/collections/collectionOf.js +0 -102
- package/lib/cjs/decorators/collections/collectionOf.js.map +0 -1
- package/lib/cjs/decorators/collections/maxItems.js +0 -61
- package/lib/cjs/decorators/collections/maxItems.js.map +0 -1
- package/lib/cjs/decorators/collections/maxProperties.js +0 -84
- package/lib/cjs/decorators/collections/maxProperties.js.map +0 -1
- package/lib/cjs/decorators/collections/minItems.js +0 -65
- package/lib/cjs/decorators/collections/minItems.js.map +0 -1
- package/lib/cjs/decorators/collections/minProperties.js +0 -83
- package/lib/cjs/decorators/collections/minProperties.js.map +0 -1
- package/lib/cjs/decorators/collections/uniqueItems.js +0 -61
- package/lib/cjs/decorators/collections/uniqueItems.js.map +0 -1
- package/lib/cjs/decorators/common/additionalProperties.js +0 -20
- package/lib/cjs/decorators/common/additionalProperties.js.map +0 -1
- package/lib/cjs/decorators/common/allOf.js +0 -22
- package/lib/cjs/decorators/common/allOf.js.map +0 -1
- package/lib/cjs/decorators/common/allow.js +0 -47
- package/lib/cjs/decorators/common/allow.js.map +0 -1
- package/lib/cjs/decorators/common/any.js +0 -46
- package/lib/cjs/decorators/common/any.js.map +0 -1
- package/lib/cjs/decorators/common/anyOf.js +0 -26
- package/lib/cjs/decorators/common/anyOf.js.map +0 -1
- package/lib/cjs/decorators/common/const.js +0 -70
- package/lib/cjs/decorators/common/const.js.map +0 -1
- package/lib/cjs/decorators/common/customKey.js +0 -43
- package/lib/cjs/decorators/common/customKey.js.map +0 -1
- package/lib/cjs/decorators/common/default.js +0 -51
- package/lib/cjs/decorators/common/default.js.map +0 -1
- package/lib/cjs/decorators/common/defaultMsg.js +0 -41
- package/lib/cjs/decorators/common/defaultMsg.js.map +0 -1
- package/lib/cjs/decorators/common/description.js +0 -75
- package/lib/cjs/decorators/common/description.js.map +0 -1
- package/lib/cjs/decorators/common/discriminatorKey.js +0 -13
- package/lib/cjs/decorators/common/discriminatorKey.js.map +0 -1
- package/lib/cjs/decorators/common/enum.js +0 -109
- package/lib/cjs/decorators/common/enum.js.map +0 -1
- package/lib/cjs/decorators/common/errorMsg.js +0 -18
- package/lib/cjs/decorators/common/errorMsg.js.map +0 -1
- package/lib/cjs/decorators/common/example.js +0 -21
- package/lib/cjs/decorators/common/example.js.map +0 -1
- package/lib/cjs/decorators/common/examples.js +0 -21
- package/lib/cjs/decorators/common/examples.js.map +0 -1
- package/lib/cjs/decorators/common/exclusiveMaximum.js +0 -78
- package/lib/cjs/decorators/common/exclusiveMaximum.js.map +0 -1
- package/lib/cjs/decorators/common/exclusiveMinimum.js +0 -78
- package/lib/cjs/decorators/common/exclusiveMinimum.js.map +0 -1
- package/lib/cjs/decorators/common/format.js +0 -487
- package/lib/cjs/decorators/common/format.js.map +0 -1
- package/lib/cjs/decorators/common/forwardGroups.js +0 -20
- package/lib/cjs/decorators/common/forwardGroups.js.map +0 -1
- package/lib/cjs/decorators/common/groups.js +0 -49
- package/lib/cjs/decorators/common/groups.js.map +0 -1
- package/lib/cjs/decorators/common/hidden.js +0 -40
- package/lib/cjs/decorators/common/hidden.js.map +0 -1
- package/lib/cjs/decorators/common/ignore.js +0 -68
- package/lib/cjs/decorators/common/ignore.js.map +0 -1
- package/lib/cjs/decorators/common/integer.js +0 -71
- package/lib/cjs/decorators/common/integer.js.map +0 -1
- package/lib/cjs/decorators/common/jsonEntityFn.js +0 -32
- package/lib/cjs/decorators/common/jsonEntityFn.js.map +0 -1
- package/lib/cjs/decorators/common/maxLength.js +0 -90
- package/lib/cjs/decorators/common/maxLength.js.map +0 -1
- package/lib/cjs/decorators/common/maximum.js +0 -149
- package/lib/cjs/decorators/common/maximum.js.map +0 -1
- package/lib/cjs/decorators/common/minLength.js +0 -91
- package/lib/cjs/decorators/common/minLength.js.map +0 -1
- package/lib/cjs/decorators/common/minimum.js +0 -147
- package/lib/cjs/decorators/common/minimum.js.map +0 -1
- package/lib/cjs/decorators/common/multipleOf.js +0 -82
- package/lib/cjs/decorators/common/multipleOf.js.map +0 -1
- package/lib/cjs/decorators/common/name.js +0 -52
- package/lib/cjs/decorators/common/name.js.map +0 -1
- package/lib/cjs/decorators/common/nullable.js +0 -34
- package/lib/cjs/decorators/common/nullable.js.map +0 -1
- package/lib/cjs/decorators/common/oneOf.js +0 -27
- package/lib/cjs/decorators/common/oneOf.js.map +0 -1
- package/lib/cjs/decorators/common/optional.js +0 -28
- package/lib/cjs/decorators/common/optional.js.map +0 -1
- package/lib/cjs/decorators/common/pattern.js +0 -104
- package/lib/cjs/decorators/common/pattern.js.map +0 -1
- package/lib/cjs/decorators/common/property.js +0 -27
- package/lib/cjs/decorators/common/property.js.map +0 -1
- package/lib/cjs/decorators/common/readOnly.js +0 -21
- package/lib/cjs/decorators/common/readOnly.js.map +0 -1
- package/lib/cjs/decorators/common/recordOf.js +0 -63
- package/lib/cjs/decorators/common/recordOf.js.map +0 -1
- package/lib/cjs/decorators/common/required.js +0 -53
- package/lib/cjs/decorators/common/required.js.map +0 -1
- package/lib/cjs/decorators/common/requiredGroups.js +0 -26
- package/lib/cjs/decorators/common/requiredGroups.js.map +0 -1
- package/lib/cjs/decorators/common/schema.js +0 -66
- package/lib/cjs/decorators/common/schema.js.map +0 -1
- package/lib/cjs/decorators/common/title.js +0 -49
- package/lib/cjs/decorators/common/title.js.map +0 -1
- package/lib/cjs/decorators/common/typeError.js +0 -18
- package/lib/cjs/decorators/common/typeError.js.map +0 -1
- package/lib/cjs/decorators/common/writeOnly.js +0 -21
- package/lib/cjs/decorators/common/writeOnly.js.map +0 -1
- package/lib/cjs/decorators/config/jsonEntityComponent.js +0 -18
- package/lib/cjs/decorators/config/jsonEntityComponent.js.map +0 -1
- package/lib/cjs/decorators/generics/genericOf.js +0 -99
- package/lib/cjs/decorators/generics/genericOf.js.map +0 -1
- package/lib/cjs/decorators/generics/generics.js +0 -25
- package/lib/cjs/decorators/generics/generics.js.map +0 -1
- package/lib/cjs/decorators/operations/acceptMime.js +0 -28
- package/lib/cjs/decorators/operations/acceptMime.js.map +0 -1
- package/lib/cjs/decorators/operations/consumes.js +0 -39
- package/lib/cjs/decorators/operations/consumes.js.map +0 -1
- package/lib/cjs/decorators/operations/contentType.js +0 -28
- package/lib/cjs/decorators/operations/contentType.js.map +0 -1
- package/lib/cjs/decorators/operations/deprecated.js +0 -49
- package/lib/cjs/decorators/operations/deprecated.js.map +0 -1
- package/lib/cjs/decorators/operations/header.js +0 -63
- package/lib/cjs/decorators/operations/header.js.map +0 -1
- package/lib/cjs/decorators/operations/in.js +0 -80
- package/lib/cjs/decorators/operations/in.js.map +0 -1
- package/lib/cjs/decorators/operations/inFile.js +0 -45
- package/lib/cjs/decorators/operations/inFile.js.map +0 -1
- package/lib/cjs/decorators/operations/location.js +0 -29
- package/lib/cjs/decorators/operations/location.js.map +0 -1
- package/lib/cjs/decorators/operations/operation.js +0 -48
- package/lib/cjs/decorators/operations/operation.js.map +0 -1
- package/lib/cjs/decorators/operations/operationId.js +0 -24
- package/lib/cjs/decorators/operations/operationId.js.map +0 -1
- package/lib/cjs/decorators/operations/operationPath.js +0 -34
- package/lib/cjs/decorators/operations/operationPath.js.map +0 -1
- package/lib/cjs/decorators/operations/partial.js +0 -18
- package/lib/cjs/decorators/operations/partial.js.map +0 -1
- package/lib/cjs/decorators/operations/path.js +0 -29
- package/lib/cjs/decorators/operations/path.js.map +0 -1
- package/lib/cjs/decorators/operations/produces.js +0 -46
- package/lib/cjs/decorators/operations/produces.js.map +0 -1
- package/lib/cjs/decorators/operations/publish.js +0 -10
- package/lib/cjs/decorators/operations/publish.js.map +0 -1
- package/lib/cjs/decorators/operations/redirect.js +0 -25
- package/lib/cjs/decorators/operations/redirect.js.map +0 -1
- package/lib/cjs/decorators/operations/returns.js +0 -293
- package/lib/cjs/decorators/operations/returns.js.map +0 -1
- package/lib/cjs/decorators/operations/route.js +0 -158
- package/lib/cjs/decorators/operations/route.js.map +0 -1
- package/lib/cjs/decorators/operations/security.js +0 -31
- package/lib/cjs/decorators/operations/security.js.map +0 -1
- package/lib/cjs/decorators/operations/status.js +0 -133
- package/lib/cjs/decorators/operations/status.js.map +0 -1
- package/lib/cjs/decorators/operations/subscribe.js +0 -10
- package/lib/cjs/decorators/operations/subscribe.js.map +0 -1
- package/lib/cjs/decorators/operations/summary.js +0 -34
- package/lib/cjs/decorators/operations/summary.js.map +0 -1
- package/lib/cjs/decorators/operations/tags.js +0 -52
- package/lib/cjs/decorators/operations/tags.js.map +0 -1
- package/lib/cjs/decorators/operations/view.js +0 -31
- package/lib/cjs/decorators/operations/view.js.map +0 -1
- package/lib/cjs/domain/DecoratorContext.js +0 -88
- package/lib/cjs/domain/DecoratorContext.js.map +0 -1
- package/lib/cjs/domain/JsonAliasMap.js +0 -15
- package/lib/cjs/domain/JsonAliasMap.js.map +0 -1
- package/lib/cjs/domain/JsonClassStore.js +0 -37
- package/lib/cjs/domain/JsonClassStore.js.map +0 -1
- package/lib/cjs/domain/JsonDiscriminator.js +0 -38
- package/lib/cjs/domain/JsonDiscriminator.js.map +0 -1
- package/lib/cjs/domain/JsonEntityStore.js +0 -158
- package/lib/cjs/domain/JsonEntityStore.js.map +0 -1
- package/lib/cjs/domain/JsonFormatTypes.js +0 -22
- package/lib/cjs/domain/JsonFormatTypes.js.map +0 -1
- package/lib/cjs/domain/JsonLazyRef.js +0 -22
- package/lib/cjs/domain/JsonLazyRef.js.map +0 -1
- package/lib/cjs/domain/JsonMap.js +0 -29
- package/lib/cjs/domain/JsonMap.js.map +0 -1
- package/lib/cjs/domain/JsonMedia.js +0 -21
- package/lib/cjs/domain/JsonMedia.js.map +0 -1
- package/lib/cjs/domain/JsonMethodStore.js +0 -147
- package/lib/cjs/domain/JsonMethodStore.js.map +0 -1
- package/lib/cjs/domain/JsonOperation.js +0 -156
- package/lib/cjs/domain/JsonOperation.js.map +0 -1
- package/lib/cjs/domain/JsonOperationPathsMap.js +0 -19
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +0 -1
- package/lib/cjs/domain/JsonOperationRoute.js +0 -54
- package/lib/cjs/domain/JsonOperationRoute.js.map +0 -1
- package/lib/cjs/domain/JsonParameter.js +0 -50
- package/lib/cjs/domain/JsonParameter.js.map +0 -1
- package/lib/cjs/domain/JsonParameterStore.js +0 -99
- package/lib/cjs/domain/JsonParameterStore.js.map +0 -1
- package/lib/cjs/domain/JsonParameterTypes.js +0 -27
- package/lib/cjs/domain/JsonParameterTypes.js.map +0 -1
- package/lib/cjs/domain/JsonPropertyStore.js +0 -80
- package/lib/cjs/domain/JsonPropertyStore.js.map +0 -1
- package/lib/cjs/domain/JsonRequestBody.js +0 -34
- package/lib/cjs/domain/JsonRequestBody.js.map +0 -1
- package/lib/cjs/domain/JsonResponse.js +0 -45
- package/lib/cjs/domain/JsonResponse.js.map +0 -1
- package/lib/cjs/domain/JsonSchema.js +0 -822
- package/lib/cjs/domain/JsonSchema.js.map +0 -1
- package/lib/cjs/domain/SpecTypes.js +0 -11
- package/lib/cjs/domain/SpecTypes.js.map +0 -1
- package/lib/cjs/hooks/alterIgnore.js +0 -24
- package/lib/cjs/hooks/alterIgnore.js.map +0 -1
- package/lib/cjs/hooks/alterOneOf.js +0 -50
- package/lib/cjs/hooks/alterOneOf.js.map +0 -1
- package/lib/cjs/hooks/alterRequiredGroups.js +0 -14
- package/lib/cjs/hooks/alterRequiredGroups.js.map +0 -1
- package/lib/cjs/index.js +0 -186
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/IgnoreCallback.js +0 -3
- package/lib/cjs/interfaces/IgnoreCallback.js.map +0 -1
- package/lib/cjs/interfaces/JsonHookContext.js +0 -3
- package/lib/cjs/interfaces/JsonHookContext.js.map +0 -1
- package/lib/cjs/interfaces/JsonOpenSpec.js +0 -3
- package/lib/cjs/interfaces/JsonOpenSpec.js.map +0 -1
- package/lib/cjs/interfaces/JsonSchemaOptions.js +0 -3
- package/lib/cjs/interfaces/JsonSchemaOptions.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/registries/JsonSchemaMapperContainer.js +0 -43
- package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +0 -1
- package/lib/cjs/registries/enumRegistries.js +0 -5
- package/lib/cjs/registries/enumRegistries.js.map +0 -1
- package/lib/cjs/utils/buildPath.js +0 -13
- package/lib/cjs/utils/buildPath.js.map +0 -1
- package/lib/cjs/utils/concatParameters.js +0 -16
- package/lib/cjs/utils/concatParameters.js.map +0 -1
- package/lib/cjs/utils/concatPath.js +0 -23
- package/lib/cjs/utils/concatPath.js.map +0 -1
- package/lib/cjs/utils/defineStatusModel.js +0 -13
- package/lib/cjs/utils/defineStatusModel.js.map +0 -1
- package/lib/cjs/utils/from.js +0 -280
- package/lib/cjs/utils/from.js.map +0 -1
- package/lib/cjs/utils/generateSpec.js +0 -47
- package/lib/cjs/utils/generateSpec.js.map +0 -1
- package/lib/cjs/utils/generics.js +0 -40
- package/lib/cjs/utils/generics.js.map +0 -1
- package/lib/cjs/utils/getComputedType.js +0 -26
- package/lib/cjs/utils/getComputedType.js.map +0 -1
- package/lib/cjs/utils/getInheritedStores.js +0 -23
- package/lib/cjs/utils/getInheritedStores.js.map +0 -1
- package/lib/cjs/utils/getJsonEntityStore.js +0 -18
- package/lib/cjs/utils/getJsonEntityStore.js.map +0 -1
- package/lib/cjs/utils/getJsonPathParameters.js +0 -87
- package/lib/cjs/utils/getJsonPathParameters.js.map +0 -1
- package/lib/cjs/utils/getJsonSchema.js +0 -59
- package/lib/cjs/utils/getJsonSchema.js.map +0 -1
- package/lib/cjs/utils/getJsonType.js +0 -40
- package/lib/cjs/utils/getJsonType.js.map +0 -1
- package/lib/cjs/utils/getOperationsRoutes.js +0 -37
- package/lib/cjs/utils/getOperationsRoutes.js.map +0 -1
- package/lib/cjs/utils/getOperationsStores.js +0 -33
- package/lib/cjs/utils/getOperationsStores.js.map +0 -1
- package/lib/cjs/utils/getPropertiesStores.js +0 -45
- package/lib/cjs/utils/getPropertiesStores.js.map +0 -1
- package/lib/cjs/utils/getSpec.js +0 -79
- package/lib/cjs/utils/getSpec.js.map +0 -1
- package/lib/cjs/utils/getSpecType.js +0 -21
- package/lib/cjs/utils/getSpecType.js.map +0 -1
- package/lib/cjs/utils/isSuccessStatus.js +0 -8
- package/lib/cjs/utils/isSuccessStatus.js.map +0 -1
- package/lib/cjs/utils/mapHeaders.js +0 -29
- package/lib/cjs/utils/mapHeaders.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec.js +0 -41
- package/lib/cjs/utils/mapOpenSpec.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec2.js +0 -34
- package/lib/cjs/utils/mapOpenSpec2.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpec3.js +0 -26
- package/lib/cjs/utils/mapOpenSpec3.js.map +0 -1
- package/lib/cjs/utils/mapOpenSpecInfo.js +0 -21
- package/lib/cjs/utils/mapOpenSpecInfo.js.map +0 -1
- package/lib/cjs/utils/mapOperationOptions.js +0 -31
- package/lib/cjs/utils/mapOperationOptions.js.map +0 -1
- package/lib/cjs/utils/matchGroups.js +0 -56
- package/lib/cjs/utils/matchGroups.js.map +0 -1
- package/lib/cjs/utils/mergeSpec.js +0 -51
- package/lib/cjs/utils/mergeSpec.js.map +0 -1
- package/lib/cjs/utils/operationIdFormatter.js +0 -41
- package/lib/cjs/utils/operationIdFormatter.js.map +0 -1
- package/lib/cjs/utils/ref.js +0 -55
- package/lib/cjs/utils/ref.js.map +0 -1
- package/lib/cjs/utils/removeHiddenOperation.js +0 -8
- package/lib/cjs/utils/removeHiddenOperation.js.map +0 -1
- package/lib/cjs/utils/serializeEnumValues.js +0 -26
- package/lib/cjs/utils/serializeEnumValues.js.map +0 -1
- package/lib/cjs/utils/somethingOf.js +0 -16
- package/lib/cjs/utils/somethingOf.js.map +0 -1
- package/lib/cjs/utils/toJsonMapCollection.js +0 -15
- package/lib/cjs/utils/toJsonMapCollection.js.map +0 -1
- package/lib/cjs/utils/toJsonRegex.js +0 -12
- package/lib/cjs/utils/toJsonRegex.js.map +0 -1
- package/lib/cjs/utils/transformToOS2.js +0 -509
- package/lib/cjs/utils/transformToOS2.js.map +0 -1
- package/lib/cjs/utils/withErrorMsg.js +0 -34
- package/lib/cjs/utils/withErrorMsg.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/components/async-api/channelsMapper.d.ts +0 -2
- package/lib/types-esm/components/async-api/generate.d.ts +0 -1
- package/lib/types-esm/components/async-api/messageMapper.d.ts +0 -6
- package/lib/types-esm/components/async-api/payloadMapper.d.ts +0 -4
- package/lib/types-esm/components/async-api/responseMapper.d.ts +0 -6
- package/lib/types-esm/components/default/anyMapper.d.ts +0 -2
- package/lib/types-esm/components/default/classMapper.d.ts +0 -3
- package/lib/types-esm/components/default/genericsMapper.d.ts +0 -5
- package/lib/types-esm/components/default/inheritedClassMapper.d.ts +0 -5
- package/lib/types-esm/components/default/inlineEnumsMapper.d.ts +0 -3
- package/lib/types-esm/components/default/itemMapper.d.ts +0 -2
- package/lib/types-esm/components/default/lazyRefMapper.d.ts +0 -3
- package/lib/types-esm/components/default/mapMapper.d.ts +0 -9
- package/lib/types-esm/components/default/nullableMapper.d.ts +0 -2
- package/lib/types-esm/components/default/objectMapper.d.ts +0 -8
- package/lib/types-esm/components/default/ofMapper.d.ts +0 -3
- package/lib/types-esm/components/default/propertiesMapper.d.ts +0 -3
- package/lib/types-esm/components/default/requiredMapper.d.ts +0 -3
- package/lib/types-esm/components/default/schemaMapper.d.ts +0 -3
- package/lib/types-esm/components/index.d.ts +0 -33
- package/lib/types-esm/components/open-spec/generate.d.ts +0 -1
- package/lib/types-esm/components/open-spec/nullableMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationInFilesMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationInParameterMapper.d.ts +0 -10
- package/lib/types-esm/components/open-spec/operationInParametersMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationInQueryMapper.d.ts +0 -2
- package/lib/types-esm/components/open-spec/operationMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationMediaMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/operationResponseMapper.d.ts +0 -3
- package/lib/types-esm/components/open-spec/pathsMapper.d.ts +0 -2
- package/lib/types-esm/constants/OperationVerbs.d.ts +0 -16
- package/lib/types-esm/constants/httpStatusMessages.d.ts +0 -11
- package/lib/types-esm/constants/jsonSchemaProperties.d.ts +0 -7
- package/lib/types-esm/decorators/class/children.d.ts +0 -11
- package/lib/types-esm/decorators/class/discriminatorValue.d.ts +0 -42
- package/lib/types-esm/decorators/collections/collectionContains.d.ts +0 -21
- package/lib/types-esm/decorators/collections/collectionOf.d.ts +0 -101
- package/lib/types-esm/decorators/collections/maxItems.d.ts +0 -48
- package/lib/types-esm/decorators/collections/maxProperties.d.ts +0 -71
- package/lib/types-esm/decorators/collections/minItems.d.ts +0 -52
- package/lib/types-esm/decorators/collections/minProperties.d.ts +0 -70
- package/lib/types-esm/decorators/collections/uniqueItems.d.ts +0 -51
- package/lib/types-esm/decorators/common/additionalProperties.d.ts +0 -11
- package/lib/types-esm/decorators/common/allOf.d.ts +0 -13
- package/lib/types-esm/decorators/common/allow.d.ts +0 -28
- package/lib/types-esm/decorators/common/any.d.ts +0 -38
- package/lib/types-esm/decorators/common/anyOf.d.ts +0 -17
- package/lib/types-esm/decorators/common/const.d.ts +0 -61
- package/lib/types-esm/decorators/common/customKey.d.ts +0 -26
- package/lib/types-esm/decorators/common/default.d.ts +0 -41
- package/lib/types-esm/decorators/common/defaultMsg.d.ts +0 -32
- package/lib/types-esm/decorators/common/description.d.ts +0 -53
- package/lib/types-esm/decorators/common/discriminatorKey.d.ts +0 -1
- package/lib/types-esm/decorators/common/enum.d.ts +0 -101
- package/lib/types-esm/decorators/common/errorMsg.d.ts +0 -6
- package/lib/types-esm/decorators/common/example.d.ts +0 -11
- package/lib/types-esm/decorators/common/examples.d.ts +0 -12
- package/lib/types-esm/decorators/common/exclusiveMaximum.d.ts +0 -70
- package/lib/types-esm/decorators/common/exclusiveMinimum.d.ts +0 -70
- package/lib/types-esm/decorators/common/format.d.ts +0 -466
- package/lib/types-esm/decorators/common/forwardGroups.d.ts +0 -10
- package/lib/types-esm/decorators/common/groups.d.ts +0 -12
- package/lib/types-esm/decorators/common/hidden.d.ts +0 -32
- package/lib/types-esm/decorators/common/ignore.d.ts +0 -59
- package/lib/types-esm/decorators/common/integer.d.ts +0 -61
- package/lib/types-esm/decorators/common/jsonEntityFn.d.ts +0 -21
- package/lib/types-esm/decorators/common/maxLength.d.ts +0 -77
- package/lib/types-esm/decorators/common/maximum.d.ts +0 -139
- package/lib/types-esm/decorators/common/minLength.d.ts +0 -78
- package/lib/types-esm/decorators/common/minimum.d.ts +0 -137
- package/lib/types-esm/decorators/common/multipleOf.d.ts +0 -69
- package/lib/types-esm/decorators/common/name.d.ts +0 -32
- package/lib/types-esm/decorators/common/nullable.d.ts +0 -25
- package/lib/types-esm/decorators/common/oneOf.d.ts +0 -17
- package/lib/types-esm/decorators/common/optional.d.ts +0 -10
- package/lib/types-esm/decorators/common/pattern.d.ts +0 -94
- package/lib/types-esm/decorators/common/property.d.ts +0 -11
- package/lib/types-esm/decorators/common/readOnly.d.ts +0 -11
- package/lib/types-esm/decorators/common/recordOf.d.ts +0 -46
- package/lib/types-esm/decorators/common/required.d.ts +0 -44
- package/lib/types-esm/decorators/common/requiredGroups.d.ts +0 -10
- package/lib/types-esm/decorators/common/schema.d.ts +0 -53
- package/lib/types-esm/decorators/common/title.d.ts +0 -39
- package/lib/types-esm/decorators/common/typeError.d.ts +0 -8
- package/lib/types-esm/decorators/common/writeOnly.d.ts +0 -11
- package/lib/types-esm/decorators/config/jsonEntityComponent.d.ts +0 -10
- package/lib/types-esm/decorators/generics/genericOf.d.ts +0 -76
- package/lib/types-esm/decorators/generics/generics.d.ts +0 -14
- package/lib/types-esm/decorators/operations/acceptMime.d.ts +0 -19
- package/lib/types-esm/decorators/operations/consumes.d.ts +0 -19
- package/lib/types-esm/decorators/operations/contentType.d.ts +0 -20
- package/lib/types-esm/decorators/operations/deprecated.d.ts +0 -23
- package/lib/types-esm/decorators/operations/header.d.ts +0 -49
- package/lib/types-esm/decorators/operations/in.d.ts +0 -64
- package/lib/types-esm/decorators/operations/inFile.d.ts +0 -25
- package/lib/types-esm/decorators/operations/location.d.ts +0 -22
- package/lib/types-esm/decorators/operations/operation.d.ts +0 -60
- package/lib/types-esm/decorators/operations/operationId.d.ts +0 -10
- package/lib/types-esm/decorators/operations/operationPath.d.ts +0 -21
- package/lib/types-esm/decorators/operations/partial.d.ts +0 -10
- package/lib/types-esm/decorators/operations/path.d.ts +0 -15
- package/lib/types-esm/decorators/operations/produces.d.ts +0 -26
- package/lib/types-esm/decorators/operations/publish.d.ts +0 -1
- package/lib/types-esm/decorators/operations/redirect.d.ts +0 -52
- package/lib/types-esm/decorators/operations/returns.d.ts +0 -267
- package/lib/types-esm/decorators/operations/route.d.ts +0 -128
- package/lib/types-esm/decorators/operations/security.d.ts +0 -56
- package/lib/types-esm/decorators/operations/status.d.ts +0 -127
- package/lib/types-esm/decorators/operations/subscribe.d.ts +0 -1
- package/lib/types-esm/decorators/operations/summary.d.ts +0 -20
- package/lib/types-esm/decorators/operations/tags.d.ts +0 -23
- package/lib/types-esm/decorators/operations/view.d.ts +0 -23
- package/lib/types-esm/domain/DecoratorContext.d.ts +0 -28
- package/lib/types-esm/domain/JsonAliasMap.d.ts +0 -12
- package/lib/types-esm/domain/JsonClassStore.d.ts +0 -12
- package/lib/types-esm/domain/JsonDiscriminator.d.ts +0 -18
- package/lib/types-esm/domain/JsonEntityStore.d.ts +0 -110
- package/lib/types-esm/domain/JsonFormatTypes.d.ts +0 -17
- package/lib/types-esm/domain/JsonLazyRef.d.ts +0 -9
- package/lib/types-esm/domain/JsonMap.d.ts +0 -9
- package/lib/types-esm/domain/JsonMedia.d.ts +0 -11
- package/lib/types-esm/domain/JsonMethodStore.d.ts +0 -92
- package/lib/types-esm/domain/JsonOperation.d.ts +0 -51
- package/lib/types-esm/domain/JsonOperationPathsMap.d.ts +0 -7
- package/lib/types-esm/domain/JsonOperationRoute.d.ts +0 -25
- package/lib/types-esm/domain/JsonParameter.d.ts +0 -22
- package/lib/types-esm/domain/JsonParameterStore.d.ts +0 -52
- package/lib/types-esm/domain/JsonParameterTypes.d.ts +0 -16
- package/lib/types-esm/domain/JsonPropertyStore.d.ts +0 -32
- package/lib/types-esm/domain/JsonRequestBody.d.ts +0 -12
- package/lib/types-esm/domain/JsonResponse.d.ts +0 -18
- package/lib/types-esm/domain/JsonSchema.d.ts +0 -340
- package/lib/types-esm/domain/SpecTypes.d.ts +0 -6
- package/lib/types-esm/hooks/alterIgnore.d.ts +0 -10
- package/lib/types-esm/hooks/alterOneOf.d.ts +0 -3
- package/lib/types-esm/hooks/alterRequiredGroups.d.ts +0 -6
- package/lib/types-esm/index.d.ts +0 -182
- package/lib/types-esm/interfaces/IgnoreCallback.d.ts +0 -4
- package/lib/types-esm/interfaces/JsonHookContext.d.ts +0 -17
- package/lib/types-esm/interfaces/JsonOpenSpec.d.ts +0 -9
- package/lib/types-esm/interfaces/JsonSchemaOptions.d.ts +0 -30
- package/lib/types-esm/registries/JsonSchemaMapperContainer.d.ts +0 -21
- package/lib/types-esm/registries/enumRegistries.d.ts +0 -2
- package/lib/types-esm/utils/buildPath.d.ts +0 -6
- package/lib/types-esm/utils/concatParameters.d.ts +0 -4
- package/lib/types-esm/utils/concatPath.d.ts +0 -1
- package/lib/types-esm/utils/defineStatusModel.d.ts +0 -3
- package/lib/types-esm/utils/from.d.ts +0 -190
- package/lib/types-esm/utils/generateSpec.d.ts +0 -16
- package/lib/types-esm/utils/generics.d.ts +0 -50
- package/lib/types-esm/utils/getComputedType.d.ts +0 -5
- package/lib/types-esm/utils/getInheritedStores.d.ts +0 -8
- package/lib/types-esm/utils/getJsonEntityStore.d.ts +0 -15
- package/lib/types-esm/utils/getJsonPathParameters.d.ts +0 -7
- package/lib/types-esm/utils/getJsonSchema.d.ts +0 -4
- package/lib/types-esm/utils/getJsonType.d.ts +0 -5
- package/lib/types-esm/utils/getOperationsRoutes.d.ts +0 -10
- package/lib/types-esm/utils/getOperationsStores.d.ts +0 -6
- package/lib/types-esm/utils/getPropertiesStores.d.ts +0 -20
- package/lib/types-esm/utils/getSpec.d.ts +0 -34
- package/lib/types-esm/utils/getSpecType.d.ts +0 -12
- package/lib/types-esm/utils/isSuccessStatus.d.ts +0 -2
- package/lib/types-esm/utils/mapHeaders.d.ts +0 -9
- package/lib/types-esm/utils/mapOpenSpec.d.ts +0 -10
- package/lib/types-esm/utils/mapOpenSpec2.d.ts +0 -9
- package/lib/types-esm/utils/mapOpenSpec3.d.ts +0 -8
- package/lib/types-esm/utils/mapOpenSpecInfo.d.ts +0 -6
- package/lib/types-esm/utils/mapOperationOptions.d.ts +0 -5
- package/lib/types-esm/utils/matchGroups.d.ts +0 -4
- package/lib/types-esm/utils/mergeSpec.d.ts +0 -23
- package/lib/types-esm/utils/operationIdFormatter.d.ts +0 -6
- package/lib/types-esm/utils/ref.d.ts +0 -14
- package/lib/types-esm/utils/removeHiddenOperation.d.ts +0 -2
- package/lib/types-esm/utils/serializeEnumValues.d.ts +0 -5
- package/lib/types-esm/utils/somethingOf.d.ts +0 -1
- package/lib/types-esm/utils/toJsonMapCollection.d.ts +0 -7
- package/lib/types-esm/utils/toJsonRegex.d.ts +0 -5
- package/lib/types-esm/utils/transformToOS2.d.ts +0 -25
- package/lib/types-esm/utils/withErrorMsg.d.ts +0 -6
- /package/{webpack.config.js → webpack.config.cjs} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see schema.umd.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("change-case"),require("@tsed/core")):"function"==typeof define&&define.amd?define(["change-case","@tsed/core"],t):"object"==typeof exports?exports["@tsed/schema"]=t(require("change-case"),require("@tsed/core")):e["@tsed/schema"]=t(e["change-case"],e["@tsed/core"])}(self,((e,t)=>(()=>{"use strict";var r={133:(e,t,r)=>{e.exports=r(555)},379:e=>{const t="\\\\/",r=`[^${t}]`,s="\\.",n="\\/",i="[^/]",o=`(?:${n}|$)`,a=`(?:^|${n})`,c=`${s}{1,2}${o}`,p={DOT_LITERAL:s,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:n,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!${s})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${s}{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${n}]`,STAR:`${i}*?`,START_ANCHOR:a,SEP:"/"},u={...p,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${s}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${t}])${s}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:p}},390:(e,t,r)=>{const s=r(379),n=r(290),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:p}=s,u=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>n.escapeRegex(e))).join("..")}return r},h=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=p[e]||e;const r={...t},l="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let m=e.length;if(m>l)throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${l}`);const d={type:"bos",value:"",output:r.prepend||""},f=[d],y=r.capture?"":"?:",g=s.globChars(r.windows),O=s.extglobChars(g),{DOT_LITERAL:S,PLUS_LITERAL:b,SLASH_LITERAL:R,ONE_CHAR:A,DOTS_SLASH:E,NO_DOT:T,NO_DOT_SLASH:v,NO_DOTS_SLASH:P,QMARK:C,QMARK_NO_DOT:x,STAR:$,START_ANCHOR:M}=g,w=e=>`(${y}(?:(?!${M}${e.dot?E:S}).)*?)`,_=r.dot?"":T,N=r.dot?C:x;let I=!0===r.bash?w(r):$;r.capture&&(I=`(${I})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const D={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:f};e=n.removePrefix(e,D),m=e.length;const L=[],k=[],j=[];let H,G=d;const q=()=>D.index===m-1,B=D.peek=(t=1)=>e[D.index+t],U=D.advance=()=>e[++D.index],K=()=>e.slice(D.index+1),J=(e="",t=0)=>{D.consumed+=e,D.index+=t},F=e=>{D.output+=null!=e.output?e.output:e.value,J(e.value)},V=()=>{let e=1;for(;"!"===B()&&("("!==B(2)||"?"===B(3));)U(),D.start++,e++;return e%2!=0&&(D.negated=!0,D.start++,!0)},W=e=>{D[e]++,j.push(e)},X=e=>{D[e]--,j.pop()},z=e=>{if("globstar"===G.type){const t=D.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||L.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(D.output=D.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=I,D.output+=G.output)}if(L.length&&"paren"!==e.type&&!O[e.value]&&(L[L.length-1].inner+=e.value),(e.value||e.output)&&F(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,f.push(e),G=e},Q=(e,t)=>{const s={...O[t],conditions:1,inner:""};s.prev=G,s.parens=D.parens,s.output=D.output;const n=(r.capture?"(":"")+s.open;W("parens"),z({type:e,value:t,output:D.output?"":A}),z({type:"paren",extglob:!0,value:U(),output:n}),L.push(s)},Y=e=>{let t=e.close+(r.capture?")":"");if("negate"===e.type){let s=I;e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=w(r)),(s!==I||q()||/^\)+$/.test(K()))&&(t=e.close=`)$))${s}`),"bos"===e.prev.type&&q()&&(D.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:H,output:t}),X("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=!1,i=e.replace(c,((e,t,r,n,i,o)=>"\\"===n?(s=!0,e):"?"===n?t?t+n+(i?C.repeat(i.length):""):0===o?N+(i?C.repeat(i.length):""):C.repeat(r.length):"."===n?S.repeat(r.length):"*"===n?t?t+n+(i?I:""):I:t?e:`\\${e}`));return!0===s&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===r.contains?(D.output=e,D):(D.output=n.wrapOutput(i,D,t),D)}for(;!q();){if(H=U(),"\0"===H)continue;if("\\"===H){const e=B();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",z({type:"text",value:H});continue}const t=/^\\+/.exec(K());let s=0;if(t&&t[0].length>2&&(s=t[0].length,D.index+=s,s%2!=0&&(H+="\\")),!0===r.unescape?H=U()||"":H+=U()||"",0===D.brackets){z({type:"text",value:H});continue}}if(D.brackets>0&&("]"!==H||"["===G.value||"[^"===G.value)){if(!1!==r.posix&&":"===H){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),s=o[r];if(s){G.value=t+s,D.backtrack=!0,U(),d.output||1!==f.indexOf(G)||(d.output=A);continue}}}("["===H&&":"!==B()||"-"===H&&"]"===B())&&(H=`\\${H}`),"]"!==H||"["!==G.value&&"[^"!==G.value||(H=`\\${H}`),!0===r.posix&&"!"===H&&"["===G.value&&(H="^"),G.value+=H,F({value:H});continue}if(1===D.quotes&&'"'!==H){H=n.escapeRegex(H),G.value+=H,F({value:H});continue}if('"'===H){D.quotes=1===D.quotes?0:1,!0===r.keepQuotes&&z({type:"text",value:H});continue}if("("===H){W("parens"),z({type:"paren",value:H});continue}if(")"===H){if(0===D.parens&&!0===r.strictBrackets)throw new SyntaxError(h("opening","("));const e=L[L.length-1];if(e&&D.parens===e.parens+1){Y(L.pop());continue}z({type:"paren",value:H,output:D.parens?")":"\\)"}),X("parens");continue}if("["===H){if(!0!==r.nobracket&&K().includes("]"))W("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));H=`\\${H}`}z({type:"bracket",value:H});continue}if("]"===H){if(!0===r.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:H,output:`\\${H}`});continue}if(0===D.brackets){if(!0===r.strictBrackets)throw new SyntaxError(h("opening","["));z({type:"text",value:H,output:`\\${H}`});continue}X("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),G.value+=H,F({value:H}),!1===r.literalBrackets||n.hasRegexChars(e))continue;const t=n.escapeRegex(G.value);if(D.output=D.output.slice(0,-G.value.length),!0===r.literalBrackets){D.output+=t,G.value=t;continue}G.value=`(${y}${t}|${G.value})`,D.output+=G.value;continue}if("{"===H&&!0!==r.nobrace){W("braces");const e={type:"brace",value:H,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};k.push(e),z(e);continue}if("}"===H){const e=k[k.length-1];if(!0===r.nobrace||!e){z({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=f.slice(),s=[];for(let t=e.length-1;t>=0&&(f.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&s.unshift(e[t].value);t=u(s,r),D.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=D.output.slice(0,e.outputIndex),s=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",D.output=r;for(const e of s)D.output+=e.output||e.value}z({type:"brace",value:H,output:t}),X("braces"),k.pop();continue}if("|"===H){L.length>0&&L[L.length-1].conditions++,z({type:"text",value:H});continue}if(","===H){let e=H;const t=k[k.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),z({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===G.type&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",f.pop(),G=d;continue}z({type:"slash",value:H,output:R});continue}if("."===H){if(D.braces>0&&"dot"===G.type){"."===G.value&&(G.output=S);const e=k[k.length-1];G.type="dots",G.output+=H,G.value+=H,e.dots=!0;continue}if(D.braces+D.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:H,output:S});continue}z({type:"dot",value:H,output:S});continue}if("?"===H){if((!G||"("!==G.value)&&!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Q("qmark",H);continue}if(G&&"paren"===G.type){const e=B();let t=H;if("<"===e&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${H}`),z({type:"text",value:H,output:t});continue}if(!0!==r.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:H,output:x});continue}z({type:"qmark",value:H,output:C});continue}if("!"===H){if(!0!==r.noextglob&&"("===B()&&("?"!==B(2)||!/[!=<:]/.test(B(3)))){Q("negate",H);continue}if(!0!==r.nonegate&&0===D.index){V();continue}}if("+"===H){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Q("plus",H);continue}if(G&&"("===G.value||!1===r.regex){z({type:"plus",value:H,output:b});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||D.parens>0){z({type:"plus",value:H});continue}z({type:"plus",value:b});continue}if("@"===H){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){z({type:"at",extglob:!0,value:H,output:""});continue}z({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=a.exec(K());e&&(H+=e[0],D.index+=e[0].length),z({type:"text",value:H});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=H,G.output=I,D.backtrack=!0,D.globstar=!0,J(H);continue}let t=K();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Q("star",H);continue}if("star"===G.type){if(!0===r.noglobstar){J(H);continue}const s=G.prev,n=s.prev,i="slash"===s.type||"bos"===s.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===r.bash&&(!i||t[0]&&"/"!==t[0])){z({type:"star",value:H,output:""});continue}const a=D.braces>0&&("comma"===s.type||"brace"===s.type),c=L.length&&("pipe"===s.type||"paren"===s.type);if(!i&&"paren"!==s.type&&!a&&!c){z({type:"star",value:H,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[D.index+4];if(r&&"/"!==r)break;t=t.slice(3),J("/**",3)}if("bos"===s.type&&q()){G.type="globstar",G.value+=H,G.output=w(r),D.output=G.output,D.globstar=!0,J(H);continue}if("slash"===s.type&&"bos"!==s.prev.type&&!o&&q()){D.output=D.output.slice(0,-(s.output+G.output).length),s.output=`(?:${s.output}`,G.type="globstar",G.output=w(r)+(r.strictSlashes?")":"|$)"),G.value+=H,D.globstar=!0,D.output+=s.output+G.output,J(H);continue}if("slash"===s.type&&"bos"!==s.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";D.output=D.output.slice(0,-(s.output+G.output).length),s.output=`(?:${s.output}`,G.type="globstar",G.output=`${w(r)}${R}|${R}${e})`,G.value+=H,D.output+=s.output+G.output,D.globstar=!0,J(H+U()),z({type:"slash",value:"/",output:""});continue}if("bos"===s.type&&"/"===t[0]){G.type="globstar",G.value+=H,G.output=`(?:^|${R}|${w(r)}${R})`,D.output=G.output,D.globstar=!0,J(H+U()),z({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-G.output.length),G.type="globstar",G.output=w(r),G.value+=H,D.output+=G.output,D.globstar=!0,J(H);continue}const s={type:"star",value:H,output:I};!0!==r.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==r.regex?(D.index!==D.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(D.output+=v,G.output+=v):!0===r.dot?(D.output+=P,G.output+=P):(D.output+=_,G.output+=_),"*"!==B()&&(D.output+=A,G.output+=A)),z(s)):(s.output=H,z(s)):(s.output=".*?","bos"!==G.type&&"slash"!==G.type||(s.output=_+s.output),z(s))}for(;D.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));D.output=n.escapeLast(D.output,"["),X("brackets")}for(;D.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing",")"));D.output=n.escapeLast(D.output,"("),X("parens")}for(;D.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","}"));D.output=n.escapeLast(D.output,"{"),X("braces")}if(!0===r.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${R}?`}),!0===D.backtrack){D.output="";for(const e of D.tokens)D.output+=null!=e.output?e.output:e.value,e.suffix&&(D.output+=e.suffix)}return D};l.fastpaths=(e,t)=>{const r={...t},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=p[e]||e;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:h,DOTS_SLASH:l,NO_DOT:m,NO_DOTS:d,NO_DOTS_SLASH:f,STAR:y,START_ANCHOR:g}=s.globChars(r.windows),O=r.dot?d:m,S=r.dot?f:m,b=r.capture?"":"?:";let R=!0===r.bash?".*?":y;r.capture&&(R=`(${R})`);const A=e=>!0===e.noglobstar?R:`(${b}(?:(?!${g}${e.dot?l:c}).)*?)`,E=e=>{switch(e){case"*":return`${O}${h}${R}`;case".*":return`${c}${h}${R}`;case"*.*":return`${O}${R}${c}${h}${R}`;case"*/*":return`${O}${R}${u}${h}${S}${R}`;case"**":return O+A(r);case"**/*":return`(?:${O}${A(r)}${u})?${S}${h}${R}`;case"**/*.*":return`(?:${O}${A(r)}${u})?${S}${R}${c}${h}${R}`;case"**/.*":return`(?:${O}${A(r)}${u})?${c}${h}${R}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=E(t[1]);if(!r)return;return r+c+t[2]}}},T=n.removePrefix(e,{negated:!1,prefix:""});let v=E(T);return v&&!0!==r.strictSlashes&&(v+=`${u}?`),v},e.exports=l},555:(e,t,r)=>{const s=r(270),n=r(390),i=r(290),o=r(379),a=(e,t,r=!1)=>{if(Array.isArray(e)){const s=e.map((e=>a(e,t,r))),n=e=>{for(const t of s){const r=t(e);if(r)return r}return!1};return n}const s=(n=e)&&"object"==typeof n&&!Array.isArray(n)&&e.tokens&&e.input;var n;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},o=i.windows,c=s?a.compileRe(e,t):a.makeRe(e,t,!1,!0),p=c.state;delete c.state;let u=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=a(i.ignore,e,r)}const h=(r,s=!1)=>{const{isMatch:n,match:h,output:l}=a.test(r,c,t,{glob:e,posix:o}),m={glob:e,state:p,regex:c,posix:o,input:r,output:l,match:h,isMatch:n};return"function"==typeof i.onResult&&i.onResult(m),!1===n?(m.isMatch=!1,!!s&&m):u(r)?("function"==typeof i.onIgnore&&i.onIgnore(m),m.isMatch=!1,!!s&&m):("function"==typeof i.onMatch&&i.onMatch(m),!s||m)};return r&&(h.state=p),h};a.test=(e,t,r,{glob:s,posix:n}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const o=r||{},c=o.format||(n?i.toPosixSlashes:null);let p=e===s,u=p&&c?c(e):e;return!1===p&&(u=c?c(e):e,p=u===s),!1!==p&&!0!==o.capture||(p=!0===o.matchBase||!0===o.basename?a.matchBase(e,t,r,n):t.exec(u)),{isMatch:Boolean(p),match:p,output:u}},a.matchBase=(e,t,r)=>(t instanceof RegExp?t:a.makeRe(t,r)).test(i.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map((e=>a.parse(e,t))):n(e,{...t,fastpaths:!1}),a.scan=(e,t)=>s(e,t),a.compileRe=(e,t,r=!1,s=!1)=>{if(!0===r)return e.output;const n=t||{},i=n.contains?"":"^",o=n.contains?"":"$";let c=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const p=a.toRegex(c,t);return!0===s&&(p.state=e),p},a.makeRe=(e,t,r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");const i=t||{};let o,c={negated:!1,fastpaths:!0},p="";return e.startsWith("./")&&(e=e.slice(2),p=c.prefix="./"),!1===i.fastpaths||"."!==e[0]&&"*"!==e[0]||(o=n.fastpaths(e,t)),void 0===o?(c=n(e,t),c.prefix=p+(c.prefix||"")):c.output=o,a.compileRe(c,t,r,s)},a.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=o,e.exports=a},270:(e,t,r)=>{const s=r(290),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:p,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:d,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:O}=r(379),S=e=>e===u||e===o,b=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},R=e.length-1,A=!0===r.parts||!0===r.scanToEnd,E=[],T=[],v=[];let P,C,x=e,$=-1,M=0,w=0,_=!1,N=!1,I=!1,D=!1,L=!1,k=!1,j=!1,H=!1,G=!1,q=0,B={value:"",depth:0,isGlob:!1};const U=()=>$>=R,K=()=>(P=C,x.charCodeAt(++$));for(;$<R;){let e;if(C=K(),C!==o){if(!0===k||C===h){for(q++;!0!==U()&&(C=K());)if(C!==o)if(C!==h){if(!0!==k&&C===c&&(C=K())===c){if(_=B.isBrace=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}if(!0!==k&&C===a){if(_=B.isBrace=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===y&&(q--,0===q)){k=!1,_=B.isBrace=!0,G=!0;break}}else q++;else j=B.backslashes=!0,K();if(!0===A)continue;break}if(C!==u){if(!0!==r.noext&&!0==(C===d||C===i||C===n||C===f||C===p)&&x.charCodeAt($+1)===l){if(I=B.isGlob=!0,D=B.isExtglob=!0,G=!0,!0===A){for(;!0!==U()&&(C=K());)if(C!==o){if(C===g){I=B.isGlob=!0,G=!0;break}}else j=B.backslashes=!0,C=K();continue}break}if(C===n){if(P===n&&(L=B.isGlobstar=!0),I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===f){if(I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===m)for(;!0!==U()&&(e=K());)if(e!==o){if(e===O){if(N=B.isBracket=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}}else j=B.backslashes=!0,K();if(!0===r.nonegate||C!==p||$!==M){if(!0!==r.noparen&&C===l){if(I=B.isGlob=!0,!0===A){for(;!0!==U()&&(C=K());)if(C!==l){if(C===g){G=!0;break}}else j=B.backslashes=!0,C=K();continue}break}if(!0===I){if(G=!0,!0===A)continue;break}}else H=B.negated=!0,M++}else{if(E.push($),T.push(B),B={value:"",depth:0,isGlob:!1},!0===G)continue;if(P===c&&$===M+1){M+=2;continue}w=$+1}}else j=B.backslashes=!0,C=K(),C===h&&(k=!0)}!0===r.noext&&(D=!1,I=!1);let J=x,F="",V="";M>0&&(F=x.slice(0,M),x=x.slice(M),w-=M),J&&!0===I&&w>0?(J=x.slice(0,w),V=x.slice(w)):!0===I?(J="",V=x):J=x,J&&""!==J&&"/"!==J&&J!==x&&S(J.charCodeAt(J.length-1))&&(J=J.slice(0,-1)),!0===r.unescape&&(V&&(V=s.removeBackslashes(V)),J&&!0===j&&(J=s.removeBackslashes(J)));const W={prefix:F,input:e,start:M,base:J,glob:V,isBrace:_,isBracket:N,isGlob:I,isExtglob:D,isGlobstar:L,negated:H};if(!0===r.tokens&&(W.maxDepth=0,S(C)||T.push(B),W.tokens=T),!0===r.parts||!0===r.tokens){let t;for(let s=0;s<E.length;s++){const n=t?t+1:M,i=E[s],o=e.slice(n,i);r.tokens&&(0===s&&0!==M?(T[s].isPrefix=!0,T[s].value=F):T[s].value=o,b(T[s]),W.maxDepth+=T[s].depth),0===s&&""===o||v.push(o),t=i}if(t&&t+1<e.length){const s=e.slice(t+1);v.push(s),r.tokens&&(T[T.length-1].value=s,b(T[T.length-1]),W.maxDepth+=T[T.length-1].depth)}W.slashes=E,W.parts=v}return W}},290:(e,t,r)=>{const{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=r(379);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>i.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(o,"\\$1"),t.toPosixSlashes=e=>e.replace(s,"/"),t.removeBackslashes=e=>e.replace(n,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.escapeLast=(e,r,s)=>{const n=e.lastIndexOf(r,s);return-1===n?e:"\\"===e[n-1]?t.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let s=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},t.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")},203:(e,t,r)=>{var s=r(739);function n(e){if(!Object.prototype.hasOwnProperty.call(i.message,e))throw new Error("invalid status code: "+e);return i.message[e]}function i(e){if("number"==typeof e)return n(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(i.code,t))throw new Error('invalid status message: "'+e+'"');return i.code[t]}(e):n(t)}e.exports=i,i.message=s,i.code=function(e){var t={};return Object.keys(e).forEach((function(r){var s=e[r],n=Number(r);t[s.toLowerCase()]=n})),t}(s),i.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(s),i.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},i.empty={204:!0,205:!0,304:!0},i.retry={502:!0,503:!0,504:!0}},803:e=>{e.exports=t},598:t=>{t.exports=e},739:e=>{e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{ARRAY_PROPERTIES:()=>Pe,AcceptMime:()=>Yr,AdditionalProperties:()=>vt,All:()=>Es,AllOf:()=>Pt,Allow:()=>xt,Any:()=>$t,AnyOf:()=>Mt,ArrayOf:()=>yt,BOOLEAN_PROPERTIES:()=>Te,COMMON_PROPERTIES:()=>xe,Children:()=>mt,CollectionContains:()=>Ot,CollectionOf:()=>ft,Const:()=>wt,Consumes:()=>Zr,ContentType:()=>as,Converter:()=>un,CustomKey:()=>_t,CustomKeys:()=>Nt,DateFormat:()=>Yt,DateTime:()=>Qt,DecoratorContext:()=>es,Default:()=>It,DefaultMsg:()=>Lt,Delete:()=>Cs,Deprecated:()=>cs,Description:()=>kt,Discriminator:()=>v,DiscriminatorKey:()=>jt,DiscriminatorValue:()=>dt,Email:()=>zt,EndpointMetadata:()=>W,Enum:()=>Ht,ErrorMsg:()=>Dt,Example:()=>Gt,Examples:()=>qt,ExclusiveMaximum:()=>Kt,ExclusiveMinimum:()=>Vt,For:()=>Rr,Format:()=>Xt,ForwardGroups:()=>rr,GenericOf:()=>Xr,Generics:()=>zr,Get:()=>Ts,Groups:()=>ar,HTTP_STATUS_MESSAGES:()=>Qe,Head:()=>xs,Header:()=>ps,Hidden:()=>cr,Ignore:()=>pr,In:()=>us,InFile:()=>hs,Integer:()=>ur,JSON_TYPES:()=>b,JsonClassStore:()=>M,JsonEntitiesContainer:()=>d,JsonEntityComponent:()=>$,JsonEntityFn:()=>lt,JsonEntityStore:()=>f,JsonFormatTypes:()=>Wt,JsonLazyRef:()=>ue,JsonMap:()=>N,JsonMedia:()=>K,JsonMethodStore:()=>V,JsonOperation:()=>F,JsonOperationPathsMap:()=>z,JsonOperationRoute:()=>js,JsonParameter:()=>k,JsonParameterStore:()=>j,JsonParameterTypes:()=>I,JsonPropertyStore:()=>w,JsonRequestBody:()=>rt,JsonResponse:()=>J,JsonSchema:()=>x,Location:()=>ls,MANY_OF_PROPERTIES:()=>Ae,MapOf:()=>gt,Max:()=>Ut,MaxItems:()=>bt,MaxLength:()=>hr,MaxProperties:()=>Rt,Maximum:()=>Bt,Min:()=>Ft,MinItems:()=>At,MinLength:()=>lr,MinProperties:()=>Et,Minimum:()=>Jt,MultipleOf:()=>mr,NUMBER_PROPERTIES:()=>ve,Name:()=>dr,Nullable:()=>fr,OBJECT_PROPERTIES:()=>Ce,OPERATION_HTTP_VERBS:()=>r,OPERATION_WS_VERBS:()=>s,OneOf:()=>yr,Operation:()=>ys,OperationId:()=>gs,OperationPath:()=>Os,OperationVerbs:()=>e,Optional:()=>gr,Options:()=>Ms,ParamMetadata:()=>H,Partial:()=>Ss,Patch:()=>$s,Path:()=>bs,Pattern:()=>Or,Post:()=>vs,Produces:()=>Qr,Property:()=>Ct,PropertyMetadata:()=>_,Publish:()=>Rs,Put:()=>Ps,ReadOnly:()=>Sr,RecordOf:()=>Ar,Redirect:()=>As,Required:()=>Er,RequiredGroups:()=>Tr,Returns:()=>os,STRING_PROPERTIES:()=>Ee,Schema:()=>br,Security:()=>ws,SpecTypes:()=>re,Status:()=>_s,Subscribe:()=>Ns,Summary:()=>Is,Tags:()=>Ds,TimeFormat:()=>Zt,Title:()=>vr,TypeError:()=>Pr,UniqueItems:()=>Tt,Uri:()=>er,Url:()=>tr,View:()=>Ls,WriteOnly:()=>Cr,allOf:()=>Fr,alterIgnore:()=>Me,alterOneOf:()=>je,alterRequiredGroups:()=>Ie,any:()=>Ur,anyMapper:()=>de,anyOf:()=>Kr,array:()=>Hr,boolean:()=>_r,buildPath:()=>l,channelsMapper:()=>te,classMapper:()=>fe,concatParameters:()=>it,concatPath:()=>ks,createRef:()=>le,createRefName:()=>he,date:()=>Nr,datetime:()=>Ir,defineStatusModel:()=>rs,email:()=>Lr,enums:()=>Wr,enumsRegistry:()=>O,execMapper:()=>p,formatParameterType:()=>D,from:()=>xr,generateSpec:()=>ln,genericsMapper:()=>ye,getComputedType:()=>S,getGenericsMap:()=>ie,getInheritedStores:()=>Q,getJsonEntityStore:()=>X,getJsonPathParameters:()=>ot,getJsonSchema:()=>dn,getJsonSchemaMapper:()=>c,getJsonType:()=>R,getOperationId:()=>ct,getOperationsRoutes:()=>fn,getOperationsStores:()=>Y,getProperties:()=>gn,getPropertiesStores:()=>yn,getSpec:()=>Fs,getSpecType:()=>Vs,getSpecTypeFromSpec:()=>Ws,getStatusConstant:()=>Ye,getStatusMessage:()=>Ze,getStatusModel:()=>ss,hasMapper:()=>u,inheritedClassMapper:()=>ge,inlineEnumsMapper:()=>Oe,integer:()=>Mr,isParameterType:()=>L,isRedirectionStatus:()=>q,isSuccessStatus:()=>G,itemMapper:()=>Se,lazyRef:()=>Vr,lazyRefMapper:()=>be,makeOf:()=>se,map:()=>Gr,mapAliasedProperties:()=>Le,mapGenericsOptions:()=>oe,mapHeaders:()=>B,mapMapper:()=>Re,mapOpenSpec:()=>Ys,mapOpenSpec2:()=>zs,mapOpenSpec3:()=>Qs,mapOpenSpecInfo:()=>Xs,mapOperationOptions:()=>ds,matchGroups:()=>or,mergeSpec:()=>Ks,messageMapper:()=>ne,nullableMapper:()=>$e,nullableMapperOpenApi:()=>Ue,number:()=>$r,object:()=>Br,objectMapper:()=>we,ofMapper:()=>_e,oneOf:()=>Jr,oneOfMapper:()=>h,operationIdFormatter:()=>at,operationInFilesMapper:()=>Ke,operationInParameterMapper:()=>Je,operationInParametersMapper:()=>Fe,operationInQueryMapper:()=>We,operationMapper:()=>et,operationMediaMapper:()=>tt,operationRequestBodyMapper:()=>st,operationResponseMapper:()=>nt,parameters:()=>Gs,pathsMapper:()=>ht,payloadMapper:()=>ce,popGenerics:()=>ae,propertiesMapper:()=>Ne,registerJsonSchemaMapper:()=>a,removeHiddenOperation:()=>Z,requiredMapper:()=>De,responsePayloadMapper:()=>pe,schemaMapper:()=>qe,schemesReducer:()=>Hs,security:()=>qs,serializeEnum:()=>A,serializeEnumValues:()=>E,set:()=>qr,string:()=>wr,tagsReducer:()=>Bs,time:()=>Dr,toJsonMapCollection:()=>U,toJsonRegex:()=>T,toRef:()=>me,transformInformation:()=>pn,transformSecurity:()=>cn,transformToOS2:()=>hn,uri:()=>kr,url:()=>jr,withErrorMsg:()=>St});var e,t=n(598);!function(e){e.ALL="ALL",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.HEAD="HEAD",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.TRACE="TRACE",e.PUBLISH="PUBLISH",e.SUBSCRIBE="SUBSCRIBE",e.CUSTOM="CUSTOM"}(e||(e={}));const r=[e.ALL,e.GET,e.POST,e.PUT,e.PATCH,e.HEAD,e.DELETE,e.OPTIONS,e.TRACE,e.CUSTOM],s=[e.PUBLISH,e.SUBSCRIBE],o=new Map;function a(e,t,r){return o.set(r?`${r}:${e}`:e,t)}function c(e,t){const r=o.get(`${t?.specType}:${e}`)||o.get(e);if(r)return r;throw new Error(`JsonSchema ${e} mapper doesn't exists`)}function p(e,t,r,s){return c(e,r)(...t,r,s)}function u(e){return o.has(e)}function h(e,t){return e.find((e=>o.has(`${t?.specType}:${e}`)))||e.find((e=>o.has(e)))}function l(e){return e.split("/").filter(Boolean).join("/")}var m=n(803);const d=new Map;class f{constructor(e){this.isStore=!0;const{target:t,propertyKey:r,descriptor:s,index:n,decoratorType:i}=e;this.target=t,this.propertyKey=r,this.propertyName=String(r),this.descriptor=s,this.index=n,this.decoratorType=i,this.token=t,this.store=e.store,this.parent=this}get targetName(){return(0,m.nameOf)(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return(0,m.isArrayOrArrayClass)(this.collectionType)}get discriminatorAncestor(){const e=(0,m.ancestorsOf)(this.target).find((e=>f.from(e).schema.isDiscriminator));return e&&f.from(e)}get isPrimitive(){return(0,m.isPrimitiveOrPrimitiveClass)(this._type)}get isDate(){return(0,m.isDate)(this.computedType)}get isObject(){return(0,m.isObject)(this.computedType)}get isClass(){return(0,m.isClass)(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){return this.schema.isDiscriminator&&this.discriminatorAncestor?.schema.discriminator().base!==this.target}static from(...e){if(e[0].isStore)return e[0];const t=e[0];e.length>1&&(e[0]=(0,m.prototypeOf)(e[0]));const r=m.Store.from(...e);if(!r.has("JsonEntityStore")){const s=(0,m.decoratorTypeOf)(e),n=new(d.get(s))({store:r,decoratorType:s,target:(0,m.classOf)(t),propertyKey:e[1],index:"number"==typeof e[2]?e[2]:void 0,descriptor:"object"==typeof e[2]?e[2]:void 0});n.build(),r.set("JsonEntityStore",n)}return r.get("JsonEntityStore")}static fromMethod(e,t){return this.from(e,t,(0,m.descriptorOf)(e,t))}static get(e,t,r){return f.from((0,m.prototypeOf)(e),t,r)}isGetterOnly(){return(0,m.isObject)(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t)}toString(){return[this.targetName,this.propertyName,this.index].filter((e=>void 0!==e)).join(":")}buildType(e){(0,m.isCollection)(e)?this.collectionType=e:(this._type=e,this._type&&(0,m.isPlainObject)(this._type)&&(this._type=String))}getBestType(){return this.itemSchema.hasDiscriminator?this.itemSchema.discriminator().base:(0,m.isClassObject)(this.type)?this.itemSchema.getTarget():(0,m.isArrowFn)(this.type)?this.type():this.type}}function y(e,t,r,s){var n,i=arguments.length,o=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i<3?n(o):i>3?n(t,r,o):n(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function g(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const O=new Map;function S(e){return(0,m.isPromise)(e)||e===Function?Object:(0,m.isClass)(e)||(0,m.isSymbol)(e)||(0,m.isPrimitiveOrPrimitiveClass)(e)||(0,m.isClassObject)(e)||(0,m.isDate)(e)||(0,m.isCollection)(e)?(0,m.classOf)(e):(0,m.isArrowFn)(e)?e():e}const b=["string","number","integer","boolean","object","array","null","any"];function R(e){return null===e?"null":(0,m.isPrimitiveOrPrimitiveClass)(e)?b.indexOf(e)>-1?e:"string"==typeof e?"file"===e?"file":"generic":(0,m.primitiveOf)(e):e===Array?"array":(0,m.isArray)(e)?e.map(R):e===Set?"array":(0,m.isDate)(e)||(0,m.isBuffer)(e)?"string":"object"}const A=e=>(0,m.isObject)(e)&&null!==e?Object.entries(e).reduce(((e,[t,r])=>isNaN(+t)?e.concat(r):e),[]):e;function E(e){const t=e.reduce(((e,t)=>e.concat(A(t))),[]),r=t.reduce(((e,t)=>e.add((e=>null===e?"null":typeof e)(t))),new Set);return{values:(0,m.uniq)(t),types:r}}function T(e){return String(e).replace(/^(\/)(.*)(\/)$/,"$2")}class v{constructor({base:e,propertyName:t,types:r,values:s}={}){this.values=new Map,this.types=new Map,Object.assign(this,(0,m.cleanObject)({base:e,propertyName:t,types:r?new Map(r):void 0,values:s?new Map(s):void 0}))}add(e,t){return t.forEach((t=>{this.values.set(t,e)})),this.types.set(e,t),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const t=this.types.get(e);return t?t[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function P(e){return e instanceof x?e:Object.entries(e).reduce(((e,[t,r])=>(e[T(t)]=C(r),e)),{})}function C(e){return(0,m.isArray)(e)?e.map(C):e.isStore||e.$isJsonDocument||e.isLazyRef?e:(0,m.classOf)(e)!==Object&&(0,m.isClass)(e)?f.from(e).schema:(0,m.isObject)(e)?x.from(e):(0,m.isPrimitiveClass)(e)?x.from({type:e}):e}class x extends Map{#e;#t;#r;#s;#n;#i;#o;#a;#c;#p;constructor(e={}){super(),this.$kind="schema",this.$isJsonDocument=!0,this.$hooks=new m.Hooks,this.$required=new Set,this.$allow=[],this.$forwardGroups=!1,this.$ignore=!1,this.isDiscriminatorKey=!1,this.isDiscriminator=!1,this.#e=!1,this.#t=null,this.#s=[],this.#n=new Map,this.#a=!1,this.#c=!1,this.#p=!1,e&&this.assign(e)}get alias(){return this.#n}get nestedGenerics(){return this.#s}set nestedGenerics(e){this.#s=e}get genericLabels(){return this.#r}set genericLabels(e){this.#r=e}get isClass(){return(0,m.isClass)(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(this.#o)}get isCollection(){return this.#c}get isGeneric(){return this.#a}get discriminatorAncestor(){const e=(0,m.ancestorsOf)(this.#o).find((e=>f.from(e).schema.isDiscriminator));return e&&f.from(e).schema}get hasGenerics(){return!(!this.nestedGenerics||!this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return this.#p}get isNullable(){return this.#e}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}get hasDiscriminator(){return!!this.#t}static from(e={}){return new x(e)}nullable(e){this.#e=e}itemSchema(e={}){return this.#i=this.#i||C(e),this.#i.assign(e),this.#i}getAliasOf(e){return this.#n.get(e)}addAlias(e,t){return this.#n.set(e,t),this.#n.set(t,e),this}removeAlias(e){const t=this.#n.get(e);return t&&this.#n.delete(t),this.#n.delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return this.#p=!0,super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){return"boolean"!=typeof e&&this.$hooks.on("ignore",e),this.$ignore=e,this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,this.#t=this.#t||new v({base:this.#o})}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const t=this.discriminatorAncestor.discriminator();t.add(this.#o,e),this.isDiscriminator=!0;const r=this.get("properties"),s=r[t.propertyName]||new x({type:"string"});return 1===e.length?(s.const(e[0]),s.examples([e[0]])):(s.enum(...e),s.examples(e)),r[t.propertyName]=s,this.set("properties",r),this}additionalItems(e){return super.set("additionalItems",C(e)),this}contains(e){return super.set("contains",C(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",this.#i=C(e)),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return[].concat(this.getJsonType()).includes("string")&&!this.has("minLength")&&this.minLength(1),e.forEach((e=>{switch(e){case"":this.set("minLength",void 0);break;case null:this.any(...["null"].concat(this.getJsonType(),this.$allow.map((e=>typeof e))))}})),this.$allow.push(...e),this}required(e=!0){if(!(0,m.isArray)(e)){const t=this.clone();return t.$selfRequired=e,[].concat(t.getJsonType()).includes("string")&&t.minLength(1),t}return this.$required.clear(),e.forEach((e=>this.$required.add(e))),this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",P(e)),this}addProperty(e,t){const r=this.get("properties")||{};return r[e]=t,super.set("properties",P(r)),this}patternProperties(e){return super.set("patternProperties",P(e)),this}additionalProperties(e){return super.set("additionalProperties",C(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",P(e)),this}propertyNames(e){return super.set("propertyNames",C(e)),this}enum(e,...t){if(O.has(e))return this.enum(O.get(e));if(e instanceof x)e.getName()?super.set("enum",e):super.set("enum",e.get("enum")).any(...e.get("enum").map((e=>typeof e)));else{const{values:r,types:s}=E([e,t].flat());super.set("enum",r).any(...s)}return this}definitions(e){return super.set("definitions",P(e)),this}allOf(e){return this.setManyOf("allOf",e),this}anyOf(e){return this.setManyOf("anyOf",e),this}oneOf(e){return this.setManyOf("oneOf",e),this}not(e){return super.set("not",C(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",T(e)),this}format(e){return super.set("format",e),this}type(e){switch(e){case"map":case Map:super.set("type",R(e)),this.#o=e,this.#c=!0,this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case"array":case Array:super.set("type",R(e)),this.#o=e,this.#c=!0,this.has("items")||super.set("items",this.itemSchema({}));break;case"set":case Set:super.set("type",R(e)),this.#o=e,this.#c=!0,this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":this.integer();break;case"number":case"string":case"boolean":case"object":case Object:case Date:case Boolean:case Number:case String:super.set("type",R(e)),this.#o=e,this.has("properties")||super.set("properties",{});break;default:if((0,m.isClass)(e)||(0,m.isFunction)(e))super.set("type",void 0),this.#o=e,this.has("properties")||super.set("properties",{});else{const t=R(e);"generic"===t?(this.#a=!0,super.set("$ref",e)):super.set("type",t)}}return this}any(...e){return e=e.length?e:["integer","number","string","boolean","array","object","null"],(e=(0,m.uniq)(e).map((e=>(0,m.isClass)(e)?e:{type:R(e)}))).length>1?this.anyOf(e):this.type(e[0]?.type||e[0]),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,t){return super.set(`#${e}`,t),this}toObject(e){return this.toJSON(e)}toJSON(e){return p("schema",[this],e)}assign(e={}){return(e instanceof x?[...e.entries()]:Object.entries(e)).forEach((([e,t])=>{this.set(e,t)})),e instanceof x&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach((e=>{this.$required.add(e)})),this.#t=this.#t?new v(this.#t):null,this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,this.#p=e.#p,this.#n=new Map(this.#n.entries()),e.#r&&(this.#r=[...e.#r]),this.#s=e.#s.map((e=>[...e])),this.#o=e.#o,this.#a=e.#a,this.#c=e.#c,this.#p=e.#p,this.#e=e.#e,super.set("type",e.get("type"))),this}set(e,t){return e in this?(0,m.isFunction)(this[e])&&this[e](t):super.set(e,t),this}getComputedType(){return S(this.#o)}getComputedItemType(){return this.#i?this.#i.getComputedType():this.getComputedType()}getJsonType(){return this.get("anyOf")?this.get("anyOf").map((e=>e.getJsonType())):this.get("type")||R(this.getComputedType())}getTarget(){return this.#o}getName(){return this.get("name")||((0,m.isClass)(this.#o)?(0,m.nameOf)((0,m.classOf)(this.getComputedType())):"")}clone(){return new x(this)}setManyOf(e,t){let r=t.filter((e=>"null"!==e?.type||(this.nullable(!0),!1))).map(C);if(!(1!==r.length||t[0]instanceof x||this.isNullable)){if(!r[0].hasDiscriminator)return this.type(t[0]);const e=r[0].discriminator().children();if(!e.length)return this.type(t[0]);r=e.map(C)}super.set(e,r);const s=r[0];if(s.isDiscriminator){const e=s.discriminatorAncestor.discriminator(),{propertyName:t}=e;super.set("discriminator",{propertyName:t}),this.isDiscriminator=!0,this.#t=e}}}function $(e){return t=>{d.set(e,t)}}let M=class extends f{constructor(){super(...arguments),this.children=new Map}get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=x.from({type:this.type})}};M=y([$(m.DecoratorTypes.CLASS)],M);let w=class extends f{constructor(){super(...arguments),this.parent=f.from(this.target)}get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(e){e?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}build(){this._type||this.buildType(m.Metadata.getType((0,m.prototypeOf)(this.target),this.propertyKey)),this._type=this._type||Object;let e=this.parent.schema.get("properties")[this.propertyName];e||(this.parent.children.set(this.propertyName,this),e=x.from({type:this.collectionType||this.type}),this.collectionType&&e.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,e),this._schema=e}static get(e,t){return f.from((0,m.prototypeOf)(e),t)}};w=y([$(m.DecoratorTypes.PROP)],w);const _=w;class N extends Map{constructor(e={}){super(),this.$kind="map",this.$isJsonDocument=!0,this.assign(e)}assign(e={}){return Object.entries(e).forEach((([e,t])=>{(0,m.isFunction)(this[e])?this[e](t):this.set(e,t)})),this}toJSON(e){return p("map",[this],e)}}var I;function D(e){return String(e).toLowerCase().replace("raw_","").replace("cookies","cookie")}function L(e){return Object.values(I).includes(D(e))}!function(e){e.BODY="body",e.PATH="path",e.QUERY="query",e.HEADER="header",e.COOKIES="cookie",e.FILES="files"}(I||(I={}));class k extends N{constructor(){super(...arguments),this.$kind="operationInParameter",this.nestedGenerics=[]}getName(){const e=this.get("name");return"files"===this.get("in")?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,t=""){return this.set("in",D(e)),this.expression=t,this}required(e){return this.set("required",e),this}schema(e){return this.$schema=e,this}toJSON(e){return p("operationInParameter",[this],e)}}let j=class extends f{constructor(e){super(e),this.parameter=new k,this.parent=f.fromMethod(this.target,this.propertyKey),this.pipes=e.pipes||[],this.paramType=e.paramType||this.paramType,this.expression=e.expression||this.expression,this.dataPath=e.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(e){this.parameter.nestedGenerics=e}get required(){return!!this.parameter.get("required")}set required(e){this.parameter.required(e)}get allowedRequiredValues(){return this.schema.$allow}static getParams(e,t){const r=[],s=(0,m.ancestorsOf)(e).reverse().find((e=>(0,m.isMethodDescriptor)(e,t)&&f.fromMethod(e,t).children.size));return s?(f.fromMethod(s,t).children.forEach(((e,t)=>{r[+t]=e})),r):[]}static get(e,t,r){return f.from((0,m.prototypeOf)(e),t,r)}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}getSchema(e){return(0,m.isCollection)(e)||!(0,m.isClass)(e)?x.from({type:e}):f.from(e).schema}build(){if(!this._type){const e=m.Metadata.getParamTypes((0,m.prototypeOf)(this.target),this.propertyKey)[this.index];this.buildType(e)}this._type=this._type||Object,this._schema||(this.parent.children.set(this.index,this),this._schema=this.getSchema(this.collectionType||this.type),this.parameter.schema(this._schema),this.collectionType&&this._schema.itemSchema(this.getSchema(this.type)),this.parent.operation.addParameter(this.index,this.parameter))}};j=y([$(m.DecoratorTypes.PARAM),g("design:paramtypes",[Object])],j);const H=j,G=e=>Number(e)&&200<=Number(e)&&Number(e)<300,q=e=>Number(e)&&300<=Number(e)&&Number(e)<400;function B(e){return Object.keys(e).reduce(((t,r)=>{const s=e[r];let n=typeof s,i={example:s};return"object"===n&&(i=s,i.example=void 0===i.value?i.example:i.value,delete i.value,n=typeof i.example),i.type=i.type||n,t[r]=(0,m.cleanObject)(i),t}),{})}function U(e,t=N){return Object.entries(e).reduce(((e,[r,s])=>(e.set(r,new t(s)),e)),new N)}class K extends N{constructor(){super(...arguments),this.$kind="operationMedia",this.groups=[]}schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}}class J extends N{constructor(e={}){super(e),this.$kind="operationResponse",this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",B(e)),this}content(e){return this.set("content",U(e,K)),this}getContent(){return this.get("content")}getMedia(e,t=!0){return t&&this.addMedia(e),this.getContent()?.get(e)}addMedia(e){const t=this.get("content");return t.has(e)||t.set(e,new K),this}isBinary(){return this.getContent().has("application/octet-stream")}}class F extends N{#u;#h;constructor(e={}){super({parameters:[],responses:new N,...e}),this.$kind="operation",this.operationPaths=new Map,this.#h=!1}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return this.#u}tags(e){return super.set("tags",e),this}addTags(e){return e=(0,m.uniqBy)([...this.get("tags")||[],...e],"name"),this.tags(e)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return this.#u=e,this}getStatus(){return this.#u||200}setRedirection(e=302){return this.#h=!0,this.#u=e,this}isRedirection(e){return this.#h&&e?q(e):this.#h}addResponse(e,t){if((G(e)||q(e))&&!this.#u){const t=this.getResponseOf(200);this.getResponses().set(e.toString(),t).delete("200"),this.defaultStatus(Number(e))}const r="default"===e?this.getStatus().toString():e.toString(),s=this.getResponses().get(r);return s?(t.forEach(((e,t)=>{["content"].includes(t)||s.set(t,(0,m.deepMerge)(s.get(t),e))})),s.status=Number(r)):(t.status=Number(r),this.getResponses().set(r,t)),this}getResponses(){return this.get("responses")}getResponseOf(e){return("default"===e?this.response:this.getResponses().get(String(e)))||new J}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(e,t){const r=this.get("security")||{};return r[e]=(0,m.uniq)([...r[e]||[],...t]),this.security(r)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,t){-1===e&&(e=this.get("parameters").length),this.get("parameters")[e]=t}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(e){const t=(0,m.uniq)([].concat(this.get("produces"),e)).filter(Boolean);this.set("produces",t)}addOperationPath(e,t,r={}){return this.operationPaths.set(String(e)+String(t),{...r,method:e,path:t}),this}getAllowedOperationPath(e){return e?[...this.operationPaths.values()].filter((({method:t})=>t&&e.includes(t.toUpperCase()))):[...this.operationPaths.values()]}}let V=class extends f{constructor(e){super({store:m.Store.fromMethod(e.target,e.propertyKey),descriptor:(0,m.descriptorOf)(e.target,e.propertyKey),...e}),this.parent=f.from(this.target),this.middlewares=[],this.beforeMiddlewares=[],this.afterMiddlewares=[],this.operation=new F,this.children=new Map;const{beforeMiddlewares:t=[],middlewares:r=[],afterMiddlewares:s=[]}=e;this.after(s),this.before(t),this.use(r)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(e){this.store.set("view",e)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(e){this.store.set("acceptMimes",e)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(e,t,r){return r=r||(0,m.descriptorOf)((0,m.prototypeOf)(e),t),f.from((0,m.prototypeOf)(e),t,r)}getResponseOptions(e,{contentType:t="application/json",includes:r}={}){const s=this.operation.getResponseOf(e).getMedia(t,!1);if(s&&s.has("schema")){const e=s.get("schema");let t=s.groups;return r&&s.allowedGroups?.size&&(t=[...t||[],...r.filter((e=>s.allowedGroups.has(e)))]),{type:e.getComputedItemType(),groups:t}}return{type:this.type}}before(e){return this.beforeMiddlewares=this.beforeMiddlewares.concat(e).filter(m.isFunction),this}after(e){return this.afterMiddlewares=this.afterMiddlewares.concat(e).filter(m.isFunction),this}use(e){return this.middlewares=this.middlewares.concat(e).filter(m.isFunction),this}get(e){const t=m.Store.from(this.target).get(e);return(0,m.deepMerge)(t,this.store.get(e))}getParamTypes(){return[...this.children.values()].reduce(((e,t)=>({...e,[t.paramType]:!0})),{})}build(){if(!this._type){let e=m.Metadata.getReturnType(this.target,this.propertyKey);e=(0,m.isPromise)(e)?void 0:e,this.buildType(e)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),(0,m.isCollection)(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=x.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}};V=y([$(m.DecoratorTypes.METHOD),g("design:paramtypes",[Object])],V);const W=V;function X(...e){return f.from(...e)}d.set(m.DecoratorTypes.CLASS,M),d.set(m.DecoratorTypes.PROP,w),d.set(m.DecoratorTypes.PARAM,j),d.set(m.DecoratorTypes.METHOD,V);class z extends Map{constructor(){super(...arguments),this.$kind="operationPaths",this.$isJsonDocument=!0,this.getKey=(e,t)=>`${e}-${t}`}setOperationPath(e){const t=this.getKey(e.method,e.path);this.set(t,e)}}function Q(e){const t=e.isStore?e:X(e);return t.$inherited||(t.$inherited=(0,m.ancestorsOf)(t.target).reverse().reduce(((e,t)=>e.set(t,X(t))),new Map)),t.$inherited}function Y(e){const t=e.isStore?e:X(e);if(!t.$operations){const e=new z;t.$operations=new Map,Q(t).forEach((e=>{e.children.forEach((e=>{e instanceof V&&!t.$operations.has(e.propertyKey)&&t.$operations.set(e.propertyKey,e)}))})),t.$operations.forEach((t=>{t.operation.operationPaths.forEach((t=>{e.setOperationPath(t)}))})),e.clear()}return t.$operations}function Z(e){return!e.store.get("hidden")}const ee=[e.PUBLISH,e.SUBSCRIBE];function te(e,{channels:r,rootPath:s,...n}){const i=l(s+X(e).path);return n={...n,ctrlRootPath:i},[...Y(e).values()].filter(Z).flatMap((e=>{const t=e.operation.getAllowedOperationPath(ee);return 0===t.length?[]:t.map((t=>({operationPath:t,operationStore:e})))})).reduce(function(e){return(r,{operationPath:s,operationStore:n})=>{const i=e.ctrlRootPath||"/",o=s.method.toLowerCase(),a=(0,t.camelCase)(`${o.toLowerCase()} ${n.parent.schema.getName()}`),c=p("message",[n,s],e);return{...r,[i]:{...r[i],[o]:{...r[i]?.[o],operationId:a,message:{oneOf:[...r[i]?.[o]?.message?.oneOf||[],c]}}}}}}(n),r)}var re;function se(e,t){return t.length?1===t.length?t[0]:{[e]:t}:null}function ne(t,r,{tags:s=[],defaultTags:n=[],...i}={}){const{path:o,method:a}=r,c=String(o);let u=(0,m.getValue)(i.components,"messages."+o,(0,m.cleanObject)({description:t.operation.get("description"),summary:t.operation.get("summary")}));if(a.toUpperCase()===e.PUBLISH){const s=p("payload",[t,r],i);s&&(u.payload=s);const n=t.operation.getAllowedOperationPath([e.SUBSCRIBE]).map((e=>p("message",[t,e],i))).filter(Boolean),o=se("oneOf",n);o&&(u["x-response"]=o)}else{const e=p("response",[t,r],i);e&&(u["x-response"]=e)}return i.components.messages=i.components.messages||{},i.components.messages[c]=u,{$ref:`#/components/messages/${c}`}}function ie(e,t){return e.reduce(((e,r,s)=>e.set(r,t[s])),new Map)}function oe(e){if(e.genericLabels&&e.genericTypes){const{genericLabels:t,genericTypes:r,...s}=e;return{...s,generics:ie(t,r)}}return e}function ae(e){const[t,...r]=e.nestedGenerics;return{genericTypes:t,nestedGenerics:r}}function ce(e,r,s){const n=e.operation.get("parameters").filter((e=>L(e.get("in")))),i=(0,t.pascalCase)([r.path,r.method,"Payload"].join(" "));(0,m.setValue)(s,`components.schemas.${i}`,{});const o=n.map((e=>{const t=function(e,t={}){return{...t,groups:e.groups,groupsName:e.groupsName}}(e,s),r=p("item",[e.$schema],{...t,...ae(e)});switch(e.get("in")){case I.BODY:return r;case I.QUERY:case I.PATH:case I.HEADER:return{type:"object",properties:{[e.get("name")]:r}}}return r}),{}).filter(Boolean);return se("allOf",o)}function pe(e,r,s){const n=e.operation.getResponses(),i=[],o=[],a=[],c=[];[...n.entries()].forEach((([e,t])=>{const r=p("map",[t],s);if(i.push(+e),o.push(r.description),204!=+e){const{content:e}=r,t=e[Object.keys(e)[0]];a.push(t)}}));const u=(0,t.pascalCase)([r.path,r.method,"Response"].join(" ")),h={type:"object",properties:{status:{type:"number",enum:i},statusText:{type:"string",enum:o}},required:["status"]},l=se("oneOf",a);l&&(0,m.setValue)(h,"properties.data",l);const d=se("oneOf",c);return c.length&&(0,m.setValue)(h,"properties.error",d),(0,m.setValue)(s,`components.schemas.${u}`,h),{$ref:`#/components/schemas/${u}`}}a("channels",te),function(e){e.JSON="jsonschema",e.SWAGGER="swagger2",e.OPENAPI="openapi3",e.ASYNCAPI="asyncapi2"}(re||(re={})),a("generate",(function(e,t){const r={channels:p("channels",[e],t)};return r.tags=(0,m.uniqBy)(t.tags,"name"),t.components?.schemas&&Object.keys(t.components.schemas).length&&(r.components={...t.components,schemas:t.components.schemas}),r}),re.ASYNCAPI),a("message",ne,re.ASYNCAPI),a("payload",ce,re.ASYNCAPI),a("response",pe,re.ASYNCAPI);class ue{constructor(e){this.getType=e,this.isLazyRef=!0}get target(){return this.getType()}get schema(){return X(this.getType()).schema}get name(){return(0,m.nameOf)(this.getType())}}function he(e,r){return r.groups&&r.groups.length?(0,t.pascalCase)(`${e} ${r.groupsName||r.groups.join(" ")}`):e}function le(e,t,r){const s=function(e){const{host:t="#/"+([re.OPENAPI,re.ASYNCAPI].includes(e.specType)?"components/schemas":"definitions")}=e;return t}(r),n={$ref:`${s}/${e}`},i=t.isReadOnly,o=t.isWriteOnly;return(0,m.cleanObject)({readOnly:!!i||void 0,writeOnly:!!o||void 0,...i||o?{anyOf:[n]}:n})}function me(e,t,r){const s=he(e.getName(),r);return(0,m.setValue)(r,`components.schemas.${s}`,t),le(s,e,r)}function de(e,t={}){if("object"!=typeof e||null===e)return e;if(e instanceof ue)return p("lazyRef",[e],t);if(e instanceof x&&e.get("enum")instanceof x){const r=e.get("enum");return me(r,r.toJSON(t),t)}if(e.$kind&&e.$isJsonDocument){const r=p(h([e.$kind,"map"],t),[e],oe(t));return e.canRef?me(e,r,t):r}return p("object",[e],t)}function fe(e,t){const r=f.from(e.class),s=he(r.schema.getName()||e.getName(),t);if(e.hasGenerics){const{type:s,properties:n,additionalProperties:i,items:o,...a}=e.toJSON(t),c={...p("any",[r.schema],{...t,...ae(e),root:!1}),...a};if(c.title){const r=he(c.title,t);return(0,m.setValue)(t.components,`schemas.${r}`,c),delete c.title,le(r,e,t)}return c}return(0,m.getValue)(t,`components.schemas.${s}`)||((0,m.setValue)(t,`components.schemas.${s}`,{}),t.components.schemas[s]=p("any",[r.schema],oe({...t,root:!1}))),le(s,e,t)}function ye(e,t){const{generics:r}=t;if(r&&e.$ref&&r.has(e.$ref)){let s=r.get(e.$ref);if((0,m.isPrimitiveClass)(s))return{type:R(s)};if(s===Date)return{type:"string",format:"date-time"};if(s.toJSON)return s.toJSON({...t,generics:void 0});if(s===Object)return{type:"object"};if((0,m.isClass)(s)){const e={class:s};return 0===t.nestedGenerics.length?p("class",[e],{...t,generics:void 0}):p("schema",[f.from(e.class).schema],{...t,...ae(t),root:!1})}}return e}function ge(e,{target:t,...r}){const s=Array.from(Q(t).entries()).filter((([e])=>(0,m.classOf)(e)!==(0,m.classOf)(t)));if(s.length){const t=s.reduce(((e,[,t])=>(0,m.deepMerge)(e,p("schema",[t.schema],r))),{});e=(0,m.deepMerge)(t,e)}return e}function Oe(e,t,r){return r.inlineEnums&&e.enum?.$isJsonDocument&&(e.enum=e.enum.toJSON().enum),e.enum&&(e.type="object"===e.type||void 0===e.type?"string":e.type),e}function Se(e,t){return e&&e.isClass?p("class",[e],t):p("any",[e],t)}function be(e,t){const r=e.name;if(t.$refs?.find((t=>t===e.target)))return le(r,e.schema,t);t.$refs=[...t.$refs||[],e.target];const s=e.getType()&&p("schema",[e.schema],oe(t));return me(e.schema,s,t)}function Re(e,{ignore:t=[],...r}={}){return r=oe(r),Array.from(e.entries()).reduce(((e,[s,n])=>(t.includes(s)||(e[s]=p("item",[n],r)),e)),{})}a("any",de),a("class",fe),a("generics",ye),a("inheritedClass",ge),a("inlineEnums",Oe),a("item",Se),a("lazyRef",be),a("map",Re);const Ae=["oneOf","allOf","anyOf"],Ee=["minLength","maxLength","pattern","format"],Te=[],ve=["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"],Pe=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains"],Ce=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains","patternProperties","dependencies"],xe=["const","enum"];function $e(e,t){return t?.isNullable?(e.discriminator||(e.$ref?e=(0,m.cleanObject)({...e,$ref:void 0,anyOf:[{type:"null"},{$ref:e.$ref}]}):Ae.some((t=>{if(e[t])if(e[t]=e[t].filter((e=>"null"!==e.type)),1===e[t].length){const r=e[t];e=(0,m.cleanObject)({...e,...r[0],[t]:void 0,type:["null",Number.isInteger(e.multipleOf)?"integer":r[0].type]})}else e[t]=[{type:"null"}].concat(e[t]).map((e=>(Number.isInteger(e.multipleOf)&&(e.type="integer"),e))),delete e.type}))),e):e}function Me(e,t){if((0,m.isBoolean)(e.$ignore)&&e.$ignore)return!0;let r=e?.$hooks?.alter("ignore",!1,[t]);return r||(!1!==t.groups?e?.$hooks?.alter("groups",!1,[t.groups]):r)}function we(e,t){const{specType:r,operationIdFormatter:s,root:n,components:i,genericTypes:o,nestedGenerics:a,useAlias:c,genericLabels:u,...h}=t;return Object.entries(e).reduce(((r,[s,n])=>{if(!1!==t.withIgnoredProps&&!Me(n,h)){const i={...t,groups:e?.$forwardGroups||n?.$forwardGroups?t.groups:void 0};r[s]=p("item",[n],i),r[s]=p("nullable",[r[s],n],i)}return r}),(0,m.isArray)(e)?[]:{})}function _e(e,t,r){return e.map((e=>p("item",[e],{...t,genericLabels:r.genericLabels})))}function Ne(e,t,r){return e.isClass?p("class",[e],t):p("any",[e],{...t,genericLabels:r.genericLabels})}function Ie(e,t,r){return!1!==r.groups?t?.$hooks?.alter("requiredGroups",e,[r.groups]):e}function De(e,t,r){if(r.groups&&r.groups.includes("partial"))return e.discriminator?{...e,required:[e.discriminator.propertyName]}:e;let s=function(e,t,r){let s=e.required||[];return s=[...s,...t.$required],t.get("properties")&&(s=Object.entries(t.get("properties")).reduce(((e,[t,r])=>r&&void 0!==r.$selfRequired?r.$selfRequired?e.concat(t):e.filter((e=>e===t)):e),s)),Ie((0,m.uniq)(s),t,r)}(e,t,r);return s=(0,m.uniq)(s).reduce(function(e,t,r={}){const{useAlias:s}=r,n=Object.keys(e.properties||{});return(e,r)=>{const i=s&&t.alias.get(r)||r;return n.includes(i)?e.concat(i):e}}(e,t,r),[]),e.discriminator&&s.push(e.discriminator.propertyName),s.length?{...e,required:s}:e}function Le(e,t){return Object.entries(e).reduce(((e,[r,s])=>(e[r=t.get(r)||r]=s,e)),{})}a("nullable",$e),a("object",we),a("anyOf",_e),a("allOf",_e),a("oneOf",_e),a("properties",Ne),a("items",Ne),a("additionalProperties",Ne),a("propertyNames",Ne),a("contains",Ne),a("dependencies",Ne),a("patternProperties",Ne),a("additionalItems",Ne),a("not",Ne),a("definitions",Ne),a("required",De);const ke={string:{properties:Ee,is:m.isString},number:{properties:ve,is:m.isNumber},boolean:{properties:Te,is:m.isBoolean},array:{properties:Pe,is:()=>!1},object:{properties:Ce,is:()=>!1}};function je(e,t,r){const s=function(e){return Ae.find((t=>e[t]))}(e);return s&&(e[s].forEach((t=>{!function(e,t,r){const s=ke[e];s?.properties.concat(xe).forEach((e=>{void 0!==t[e]&&(xe.includes(e)?r[e]=t[e].filter(s.is):(r[e]=t[e],delete t[e]))}))}(t.type,e,t)})),Ae.forEach((s=>{e[s]&&!1!==r.groups&&t.$hooks.has(s)&&(e={...e,[s]:t.$hooks.alter(s,e[s],[r.groups])})})),delete e.const,delete e.enum,e.items||e.properties||delete e.type),e}const He=["name","$required","$hooks","_nestedGenerics",re.OPENAPI,re.SWAGGER,re.JSON],Ge=["const"];function qe(e,t){const{options:r,addDef:s}=function(e){let t=!1;e||(t=!0,e={components:{schemas:{}},inlineEnums:!0});const{useAlias:r=!0,components:s={schemas:{}}}=e;return{addDef:t,options:e={...e,useAlias:r,components:s}}}(t),n=function(e,t){let r=function(e,t){const{useAlias:r}=t;return[...e.keys()].filter((e=>!function(e,{specType:t=re.JSON,customKeys:r=!1}){return He.includes(e)||e.startsWith("#")&&(!1===r||t!==re.JSON)||t!==re.JSON&&Ge.includes(e)}(e,t))).reduce(((s,n)=>{let i=e.get(n);if("type"===(n=n.replace(/^#/,"")))return{...s,[n]:e.getJsonType()};if(function(e,t,r){return"examples"===e&&(0,m.isObject)(t)&&[re.OPENAPI,re.ASYNCAPI].includes(r.specType)}(n,i,t)&&(n="example",i=Object.values(i)[0]),i&&"object"==typeof i&&u(n)){if(i=p(n,[i],t,e),function(e,t){return"object"==typeof t&&["items","properties","additionalProperties"].includes(e)&&0===Object.keys(t).length}(n,i))return s;(function(e,t,r){return"object"==typeof t&&r&&["properties","additionalProperties"].includes(e)})(n,i,r)&&(i=Le(i,e.alias))}return{...s,[n]:i}}),{})}(e,t);return e.isClass&&(r=p("inheritedClass",[r],{...t,root:!1,target:e.getComputedType()})),r=p("generics",[r],{...t,root:!1}),e.has(t.specType)&&(r={...r,...e.get(t.specType).toJSON(t)}),r=p("required",[r,e],t),r=p("nullable",[r,e],t),r=je(r,e,t),r=p("inlineEnums",[r,e],t),r}(e,r);return s&&Object.keys((0,m.getValue)(r,"components.schemas",{})).length&&(n.definitions=r.components.schemas),n}function Be(e,t){const r={paths:p("paths",[e],t={...t,specType:re.OPENAPI})};return r.tags=(0,m.uniqBy)(t.tags,"name"),Object.keys((0,m.getValue)(t,"components.schemas",{})).length&&(r.components={schemas:t.components.schemas}),r}function Ue(e,t){return t?.isNullable?e.$ref?(0,m.cleanObject)({...e,...e.$ref&&{anyOf:[{$ref:e.$ref}],type:void 0},nullable:!0,$ref:void 0}):(0,m.cleanObject)({...e,...1===e.anyOf?.length?{...e.anyOf[0],anyOf:void 0,type:Number.isInteger(e.multipleOf)?"integer":e.anyOf[0]?.type}:{type:e.anyOf?.length>1?void 0:e.type,anyOf:e.anyOf?.map((e=>(Number.isInteger(e.multipleOf)&&(e.type="integer"),e)))},nullable:!0}):e}function Ke(e,{jsonSchema:t}){const r={type:"string",format:"binary",oneOf:void 0};return"array"===t.type?(t.items=(0,m.cleanObject)({...t.items,...r}),e.schema=t,e):(e.schema=(0,m.cleanObject)({...t,...r}),e)}function Je(e,r){const s=function(e,t={}){return{...t,groups:e.groups,groupsName:e.groupsName}}(e,r),n={...s.components?.schemas||{}},{type:i,schema:o,...a}=p("map",[e],s),c=p("item",[e.$schema],{...s,...ae(e)});a.required=a.required||e.get("in")===I.PATH;const h={...s,jsonSchema:c,jsonParameter:e,oldSchemas:n},l=(0,t.camelCase)(`operationIn ${e.get("in")}`);return u(l)?p(l,[a],h):(a.schema=c,a)}function Fe(e,t){return e.flatMap((e=>p("operationInParameter",[e],t))).filter(Boolean)}function Ve(e,t){if(!t)return;let r=!1;const s=Object.entries(t).reduce(((t,[s,{value:n,description:i,...o}])=>void 0===n[e]?t:(r=!0,{...t,[s]:{...o,value:n[e],description:i}})),{});return r?s:void 0}function We(e,{jsonSchema:t,jsonParameters:r,...s}){if(t.$ref){if(!e.name)return function(e,{jsonParameter:t,...r}){const s=he(t.$schema.getName(),r),n=r.components?.schemas?.[s];return n&&!r.oldSchemas?.[s]&&delete r.components.schemas[t.$schema.getName()],Object.entries(n?.properties||{}).reduce(((t,[r,{description:s,...i}])=>[...t,(0,m.cleanObject)({...e,name:r,required:(n?.required||[]).includes(r),description:s,schema:i,style:i.$ref?"deepObject":void 0,examples:Ve(r,e.examples)})]),[])}(e,s);e.style="deepObject"}return e.schema=t,e}a("schema",qe),a("generate",Be,re.OPENAPI),a("generate",Be,re.SWAGGER),a("nullable",Ue,re.OPENAPI),a("nullable",Ue,re.SWAGGER),a("operationInFiles",Ke),a("operationInParameter",Je),a("operationInParameters",Fe),a("operationInQuery",We);var Xe=n(203),ze=n.n(Xe);const Qe=ze().codes.reduce(((e,r)=>{const s=String(ze()(r));return{...e,[String(r)]:{label:s,code:(0,t.constantCase)(s)}}}),{});function Ye(e){return Qe[e]?.code}function Ze(e){return Qe[e]?.label}function et(e,{tags:t=[],defaultTags:r=[],...s}={}){const{consumes:n,produces:i,...o}=p("map",[e],{...s,ignore:["parameters"]});o.security&&(o.security=[].concat(o.security)),0===e.get("responses").size&&(o.responses={200:{description:Ze(200)}});const a={...s,consumes:e.get("consumes")?.length?e.get("consumes"):["application/json"]},[c,u]=function(e,t){return e.get("parameters").filter((e=>L(e.get("in")))).reduce(((e,t)=>{const[r,s]=e;return[I.BODY,I.FILES].includes(t.get("in"))?[r,[...s,t]]:[[...r,t],s]}),[[],[]])}(e);o.parameters=p("operationInParameters",[c],s),u.length&&(o.requestBody=p("operationRequestBody",[u],a));const h=o.tags?.length?o.tags:r;return h.length&&(o.tags=h.map((({name:e})=>e))),t.push(...h),o}function tt(e,t){return p("map",[e],{...t,groups:[...e.groups||[]],groupsName:e.groupsName})}Qe[200].label="Success",Qe[200].code="SUCCESS",a("operation",et),a("operationMedia",tt);class rt extends N{constructor(e={}){super(e),this.$kind="operationRequestBody",this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",U(e)),this}addContent(e,t,r){const s=this.get("content"),n=new N;return n.set("schema",t),r&&n.set("examples",r),s.set(e,n),this}required(e){return this.set("required",e),this}}function st(e,{consumes:t,...r}){const{schema:s,examples:n,in:i,...o}=function(e,t){let r=new x;const s={},n=[];let i=0;const o=e.some((e=>"files"===e.get("in")));return e.forEach((e=>{const a=e.getName();[...e.entries()].filter((([e])=>!["in","name"].includes(e))).forEach((([e,t])=>{void 0===s[e]&&(s[e]=t)}));const c=p("operationInParameter",[e],t);if(a){const t={...c.schema||{type:c.type}};o&&c.description&&(t.description=c.description),r.addProperty(a,t),e.get("required")&&r.addRequired(a),i++}else n.push(c)})),i||1!==n.length?(r.type("object"),s.description&&o&&delete s.description,{schema:r.toJSON(t),required:!1,...s}):n[0]}(e,r),a=new rt(o);return t.forEach((e=>{a.addContent(e,s,n)})),p("map",[a],r)}function nt(e,t={}){const r=p("map",[e],t);return 204===e.status&&delete r.content,r.headers&&Object.entries(r.headers).forEach((([e,{type:t,...s}])=>{r.headers[e]={...s,schema:{type:t}}})),r}function it(e,t){return e.map((e=>t.parameters.find((t=>t.in===e.in&&t.name===e.name))||e)).concat(...t.parameters.filter((e=>"path"!==e.in)))}function ot(e,t=""){t instanceof RegExp&&(t=t.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],s=[];let n=!1,i="";return function(e){let t=0;return e.split("").filter((e=>{"("===e&&t++;const r=0===t;return")"===e&&t--,r})).join("").split("/").filter((e=>!!e))}(`${e}${t}`).map((e=>{const t=e.replace(":","").replace("?","");if(e.includes(":")){const o=e.includes("?");o&&!n&&(n=!0,s.push({path:i,parameters:[].concat(r)}));const{prefix:a,name:c,postfix:p}=function(e){const[t,r]=e.split("="),s=(r||t).split(".");return{prefix:r&&t?`${t}=`:"",name:s.splice(0,1)[0],postfix:s.length?`.${s.join(".")}`:""}}(t);i+=`/${a}{${c}}${p}`,r.push({in:"path",name:c,type:"string",required:!0}),o&&n&&s.push({path:i,parameters:[].concat(r)})}else i+=`/${e}`})),s.length?s:[{path:i,parameters:[].concat(r)}]}function at(e=""){const r=new Map;return(s,n,i="")=>{const o=((r,s)=>{const n=(e||"%c.%m").replace(/%c/,r).replace(/%m/,s);return""===e?(0,t.camelCase)(n):n})(s,n),a=s+n;if(!r.has(a))return r.set(a,0),o;const c=i.match(/{(\w+)}/gi);if(c){const e=s+n+c[0];if(!r.has(e))return r.set(e,0),(0,t.camelCase)(`${o} By ${c}`)}const p=r.get(a)+1;return r.set(a,p),`${o}_${p}`}}function ct(e,{store:t,operationIdFormatter:r}){return r(t.parent.schema.get("name")||t.parent.targetName,t.propertyName,e)}a("operationRequestBody",st),a("operationResponse",nt);const pt=[e.ALL,e.GET,e.POST,e.PUT,e.PATCH,e.HEAD,e.OPTIONS,e.DELETE,e.TRACE];function ut(e,{path:t,method:r,operation:s}){return{...e,[t]:{...e[t],[r.toLowerCase()]:s}}}function ht(e,{paths:t,rootPath:r,...s}){const n=l(r+X(e).path);return s={...s,ctrlRootPath:n},[...Y(e).values()].filter(Z).filter((e=>e.operation.getAllowedOperationPath(pt).length>0)).flatMap(function(e){return t=>{const r=t.operation.getAllowedOperationPath(pt);if(0===r.length)return[];const s=p("operation",[t.operation],e);return r.map((e=>({operationPath:e,operation:s,operationStore:t})))}}(s)).flatMap(function(e){return({operationPath:t,operation:r,operationStore:s})=>{const{path:n,method:i}=t;return ot(e.ctrlRootPath,n).map((({path:t,parameters:n})=>(t=t||"/",n=it(n.map((({type:e,...t})=>({...t,schema:{type:e}}))),r),{operation:{...r,parameters:n,operationId:r.operationId||ct(t,{...e,store:s})},method:i,path:t})))}}(s)).reduce(ut,t)}function lt(e){return(...t)=>{const r=e(X(...t),t);"function"==typeof r&&r(...t)}}function mt(...e){return lt((t=>{t.store.set("childrenControllers",e),e.forEach((e=>{m.Store.from(e).set("parentController",t.token)}))}))}function dt(e,...r){return lt((s=>{e=e||(0,t.snakeCase)(s.targetName),s.discriminatorAncestor&&s.schema.discriminatorValue(e,...r)}))}function ft(e,t){if(!e)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let s=!1;const n=(...n)=>{const i=f.from(...n);t&&(i.collectionType=t,i.schema.type(t)),i.type=e,i.itemSchema.type(e),i.schema.assign(r),i.isArray&&s&&(i.schema.set("contains",i.schema.get("items")),i.schema.delete("items"))};return n.MinItems=e=>(r.minItems=e,n),n.MaxItems=e=>(r.maxItems=e,n),n.MinProperties=e=>(r.minProperties=e,n),n.MaxProperties=e=>(r.maxProperties=e,n),n.Contains=()=>(s=!0,n),n.UniqueItems=(e=!0)=>(r.uniqueItems=e,n),n}function yt(e){return ft(e,Array)}function gt(e){return ft(e,Map)}function Ot(e){return ft(e).Contains()}function St(e,t){const r={};return(...s)=>{const n=(0,m.useDecorators)(t(...s));return n.Error=t=>(r.message=t,(0,m.useDecorators)(n,r.message&<((r=>{const s=r.parentSchema.get("#errorMessage")||{};"required"===e?r.parentSchema.customKey("errorMessage",(0,m.deepMerge)(s,{[e]:{[r.propertyName]:t}})):r.itemSchema.customKey("errorMessage",(0,m.deepMerge)(s,{[e]:t}))})))),n}}a("paths",ht);const bt=St("maxItems",(e=>{if(e<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return lt((t=>{t.schema.maxItems(e)}))})),Rt=St("maxProperties",(e=>{if(e<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return lt((t=>{t.isCollection?t.schema.maxProperties(e):t.itemSchema.maxProperties(e)}))})),At=St("minItems",(e=>{if(e<0)throw new Error("The value of minItems MUST be a non-negative integer.");return lt((t=>{t.schema.minItems(e)}))})),Et=St("minProperties",(e=>{if(e<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return lt((t=>{t.isCollection?t.schema.minProperties(e):t.itemSchema.minProperties(e)}))})),Tt=St("uniqueItems",((e=!0)=>lt((t=>{t.schema.uniqueItems(e)}))));function vt(e){return lt(((t,r)=>{t.itemSchema.additionalProperties(e)}))}function Pt(...e){return lt((t=>{t.itemSchema.allOf(e)}))}function Ct(e){return lt((t=>{e&&(((0,m.isClass)(e)||(0,m.isArrowFn)(e))&&(t.type=e),t.itemSchema.type(e))}))}function xt(...e){const t=e.find((e=>(0,m.isClass)(e)));return(0,m.useDecorators)(t&&Ct(t),lt(((t,r)=>{t.decoratorType===m.DecoratorTypes.PARAM&&(t.required=!0),t.decoratorType===m.DecoratorTypes.PROP&&t.parentSchema.addRequired(t.propertyName),t.schema.allow(...e)})))}function $t(...e){return lt((t=>{t.itemSchema.any(...e)}))}function Mt(...e){return lt((t=>{t.itemSchema.anyOf(e)}))}function wt(e){return lt((t=>{t.itemSchema.const(e)}))}function _t(e,t){return lt((r=>{r.itemSchema.customKey(e,t)}))}function Nt(e){return lt((t=>{Object.entries(e).forEach((([e,r])=>{t.itemSchema.customKey(e,r)}))}))}function It(e){return lt((t=>{t.itemSchema.default(e)}))}function Dt(e){return lt((t=>{const r=t.parentSchema.get("#errorMessage")||{};t.parentSchema.customKey("errorMessage",{...r,...e})}))}function Lt(e){return(0,m.useDecorators)(Dt({_:e}))}function kt(e){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.PROP:case m.DecoratorTypes.CLASS:t.schema.description(e);break;case m.DecoratorTypes.PARAM:t.parameter.description(e);break;case m.DecoratorTypes.METHOD:t.operation?.description(e)}}))}function jt(){return(0,m.useDecorators)(Ct(),lt((e=>{e.discriminatorKey()})))}const Ht=St("enum",(function(e,...t){return lt((r=>{r.itemSchema.enum(e,...t)}))}));function Gt(...e){return lt((t=>{t.schema.examples(e)}))}function qt(e){return lt((t=>{t.parameter.examples(e)}))}const Bt=St("maximum",((e,t=!1)=>lt((r=>{t?r.itemSchema.exclusiveMaximum(e):r.itemSchema.maximum(e)})))),Ut=Bt,Kt=St("exclusiveMaximum",((e,t=!0)=>Bt(e,t))),Jt=St("minimum",((e,t=!1)=>lt((r=>{t?r.itemSchema.exclusiveMinimum(e):r.itemSchema.minimum(e)})))),Ft=Jt,Vt=St("exclusiveMinimum",((e,t=!0)=>Jt(e,t)));var Wt;!function(e){e.DATE_TIME="date-time",e.DATE="date",e.TIME="time",e.EMAIL="email",e.HOSTNAME="hostname",e.IPV4="ipv4",e.IPV6="ipv6",e.URI="uri",e.URL="url",e.URI_REF="uri-reference",e.URI_TEMPLATE="uri-template",e.JSON_POINTER="json-pointer",e.RELATIVE_JSON_POINTER="relative-json-pointer",e.UUID="uuid",e.REGEX="regex"}(Wt||(Wt={}));const Xt=St("format",(e=>lt((t=>{t.itemSchema.format(e)})))),zt=St("format",(()=>Xt(Wt.EMAIL))),Qt=St("format",(()=>Xt(Wt.DATE_TIME))),Yt=St("format",(()=>Xt(Wt.DATE))),Zt=St("format",(()=>Xt(Wt.TIME))),er=St("format",(()=>Xt(Wt.URI))),tr=St("format",(()=>Xt(Wt.URL)));function rr(e=!0){return lt((t=>{t.schema.$forwardGroups=e}))}var sr=n(133),nr=n.n(sr);function ir(e,t){t=[].concat(t),e=[].concat(e);let r=new Set,s=new Set,n=new Set,i=0,o=e=>{n.add(e.output)};for(let n=0;n<t.length;n++){let a=nr()(String(t[n]),{onResult:o},!0),c=a.state.negated||a.state.negatedExtglob;c&&i++;for(let t of e){let e=a(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),s.add(e.output)))}}return!!(i===t.length?[...n]:[...s]).filter((e=>!r.has(e))).length}function or(e,t=[]){const r=e.filter((e=>e.startsWith("!"))).map((e=>e.replace("!",""))),s=e.filter((e=>!e.startsWith("!")));return!!(r.length&&t.length&&ir(r,t))||!!s.length&&!ir(e.filter((e=>!e.startsWith("!"))),t)}function ar(...e){return lt((t=>{switch(t.decoratorType){case m.DecoratorTypes.CLASS:!function(e,t){const r=Object.entries(e[0]);t.children.forEach((e=>{ar(...r.filter((([,t])=>t.includes(e.propertyName))).map((([e])=>e)))(e.target,e.propertyKey)}))}(e,t);break;case m.DecoratorTypes.PROP:_t("x-groups",e)(t.target,t.propertyKey),t.schema.$hooks.on("groups",((t,r)=>!(t||!or(e,r))||t));break;case m.DecoratorTypes.PARAM:let r="";2==e.length&&(0,m.isArray)(e[1])&&(r=e[0],e=e[1]),t.parameter.groups=e,t.parameter.groupsName=r}}))}function cr(){return(0,m.StoreSet)("hidden",!0)}function pr(e=!0){return lt((t=>{t.schema.ignore(e)}))}function ur(){return lt((e=>{e.itemSchema.type("integer")}))}const hr=St("maxLength",(e=>{if(e<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return lt((t=>{t.itemSchema.maxLength(e)}))})),lr=St("minLength",(e=>{if(e<0)throw new Error("The value of minLength MUST be a non-negative integer.");return lt((t=>{t.itemSchema.minLength(e)}))})),mr=St("multipleOf",(e=>{if(e<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return lt((t=>{t.itemSchema.multipleOf(e)}))}));function dr(e){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.CLASS:t.schema.name(e);break;case m.DecoratorTypes.PARAM:t.parameter.name(e);break;default:t.parent.schema.addAlias(r[1],e)}}))}function fr(e,...t){return t=[e,...t],(0,m.useDecorators)(1===t.length&&Ct(t[0]),$t(null,...t))}function yr(...e){return lt((t=>{t.itemSchema.oneOf(e),t.type=Object}))}function gr(){return lt((e=>{switch(e.decoratorType){case m.DecoratorTypes.PARAM:e.required=!1;break;case m.DecoratorTypes.PROP:e.parentSchema.removeRequired(e.propertyName)}}))}const Or=St("pattern",(e=>lt((t=>{t.itemSchema.pattern(e)}))));function Sr(e=!0){return lt((t=>{t.itemSchema.readOnly(e)}))}function br(e){return lt((t=>{t.schema.assign(e)}))}function Rr(e,t){return lt((r=>{r.schema.set(e,t)}))}function Ar(e,...t){return br({properties:{...t.reduce(((t,r)=>({...t,[r]:e})),{})}})}const Er=St("required",((e=!0,...t)=>e?xt(...t):gr()));function Tr(...e){return lt((t=>{t.parent.schema.$hooks.on("requiredGroups",((r,s)=>or(e,s)?r.filter((e=>e!==t.propertyKey)):r))}))}function vr(e){return lt((t=>{t.schema.title(e)}))}function Pr(e){return lt((()=>(0,m.useDecorators)(Dt({type:e}))))}function Cr(e=!0){return lt((t=>{t.itemSchema.writeOnly(e)}))}function xr(e=Object){if((0,m.isClass)(e)){const{schema:t}=X(e);return t.properties=function(t){return Object.entries(t).forEach((([t,r])=>{X(e.prototype,t).schema.assign(r)})),this},t}return x.from({type:e})}function $r(){return xr(Number)}function Mr(){return xr(Number).integer()}function wr(){return xr(String)}function _r(){return xr(Boolean)}function Nr(){return xr(Date).format(Wt.DATE)}function Ir(){return xr(Date).format(Wt.DATE_TIME)}function Dr(){return xr(Date).format(Wt.TIME)}function Lr(){return xr(String).format(Wt.EMAIL)}function kr(){return xr(String).format(Wt.URI)}function jr(){return xr(String).format(Wt.URL)}function Hr(){return xr(Array)}function Gr(){return xr(Map).unknown(!0)}function qr(){return xr(Array).uniqueItems(!0)}function Br(e={}){return xr(Object).properties(e)}function Ur(...e){return xr().any(...e)}function Kr(...e){return xr().anyOf(e)}function Jr(...e){return xr().oneOf(e)}function Fr(...e){return xr().allOf(e)}function Vr(e){try{if(e())return f.from(e()).schema}catch(e){}return new ue(e)}function Wr(e){const t=wr().enum(e);return O.set(e,t),t}function Xr(...e){const t=[e.map((e=>function(e){return(0,m.isObject)(e)&&!("toJSON"in e)}(e)?wr().enum(Object.values(e)):e))],r=(...e)=>{f.from(...e).nestedGenerics=t};return r.Nested=(...e)=>(t.push(e),r),r}function zr(...e){return t=>{f.from(t).schema.genericLabels=e}}function Qr(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.produces(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Qr(...e));break;default:throw new m.UnsupportedDecoratorType(Qr,r)}}))}function Yr(...e){return(0,m.useDecorators)(Qr(...e),(0,m.StoreSet)("acceptMimes",e))}function Zr(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.consumes(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Zr(...e));break;default:throw new m.UnsupportedDecoratorType(Zr,r)}}))}class es extends Map{constructor(e={}){super(),this.actions=[],Object.entries(e).forEach((([e,t])=>{this.set(e,t)}))}addAction(e){return this.actions.push(e),this}build(){const e=(...t)=>this.bind(t,e),r=t=>{return r=(...e)=>{t in this?this[t](...e):this.set(t,e[0])},(...t)=>(r(...t),e);var r};return this.methods.forEach((s=>{e[(0,t.pascalCase)(s)]=r(s)})),e}toObject(){return[...this.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}getMergedKey(e,t){let r=this.get(e)||t;if(r)return this.decoratorType===m.DecoratorTypes.CLASS&&(r={...r,...t||{}}),{...t||{},...r}}bind(e,t){this.entity=f.from(...e),this.beforeInit(),this.onInit(e,t),this.afterInit()}onInit(e,t){this.forEach(((e,t)=>{this.onMapKey(t,e)}))}onMapKey(e,t){this.entity.set(e,t)}runActions(){return this.actions.forEach((e=>{e(this)})),this}beforeInit(){}afterInit(){}}const ts=new Map;function rs(e,t){ts.set(e,t)}function ss(e){return ts.get(e)}function ns(e){return e.map((e=>function(e){return(0,m.isObject)(e)&&!("toJSON"in e)}(e)?wr().enum(Object.values(e)):e))}class is extends es{constructor({status:e,model:t}){super(),this.methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location","binary"],this.model(t),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&Ze(e)&&!this.get("description")&&(this.set("description",Ze(e)),this.get("model")||this.model(ss(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...B(e)}),this}header(e,t){return void 0===t&&(0,m.isString)(e)?this.headers({[e]:{type:"string"}}):this.headers({[e]:t})}location(e,t={}){return this.headers({Location:{...t,value:e}}),this}groups(...e){return 2===e.length&&(0,m.isArray)(e[1])?(this.set("groupsName",e[0]),this.set("groups",e[1])):this.set("groups",e),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const t=this.get("model");return this.checkPrimitive(t),this.checkCollection(t),this.addAction((t=>{this.get("schema").nestedGenerics.push(ns(e))})),this}of(...e){const t=this.get("model");return this.checkPrimitive(t),this.addAction((()=>{const r=this.get("schema");(0,m.isCollection)(t)?r?.itemSchema({type:e[0]}):r?.nestedGenerics.push(ns(e))})),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction((()=>{this.get("schema").assign(e)})),this}examples(e){return this.set("examples",(0,m.isString)(e)?[e]:e),this}title(e){return this.schema({title:e})}binary(){return this.type(String),this.set("contentType","application/octet-stream"),this.schema({format:"binary"}),this}checkPrimitive(e){if((0,m.isPrimitiveOrPrimitiveClass)(e))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(e){if((0,m.isCollection)(e))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const e=this.get("model");let t=this.get("contentType");return(e&&!(0,m.isPlainObject)(e)&&!(0,m.isPrimitiveOrPrimitiveClass)(e)||this.hasOfTypes)&&(t=t||"application/json"),t}getStatus(){return this.get("status")||"default"}onInit(e,t){switch((0,m.decoratorTypeOf)(e)){case m.DecoratorTypes.METHOD:this.entity=f.from(...e),this.entity.operation&&this.map();break;case m.DecoratorTypes.CLASS:this.decoratorType=m.DecoratorTypes.CLASS,(0,m.decorateMethodsOf)(e[0],t)}}map(){const e=this.get("model"),{entity:t,decoratorType:r}=this,s=this.entity.operation,n=this.getStatus(),i=s.ensureResponseOf(n),o=this.getContentType();let{description:a=i.get("description")}=this.toObject();a&&(a=r===m.DecoratorTypes.CLASS&&i.get("description")||a,i.description(a));const c=this.getMergedKey("headers",i.get("headers"));return c&&i.headers(c),this.mapMedia(i),(G(this.get("status"))||"default"===n)&&e&&(t.type=e),o&&s.addProduce(o),this.runActions()}mapMedia(e){const t=this.getContentType(),r=this.get("model"),s=e.getMedia(t||"*/*"),n=s.get("schema")||new x({type:r}),i=this.get("groups"),o=this.get("groupsName"),a=this.get("allowedGroups"),c=this.entity.operation;if(r&&((0,m.isArray)(r)?n.oneOf(r.map((e=>({type:e})))):n.type(r)),this.set("schema",n),s.schema(n),s.groups=i,s.groupsName=o,a){s.allowedGroups=a;const e=new k;e.in("query").name("includes"),e.schema(x.from({type:"array",items:{type:"string",enum:[...a]}})),c.addParameter(-1,e)}const p=this.get("examples");return p&&s.examples(p),s}manyOf(e,t){const r=this.get("model");return this.hasOfTypes=!0,this.addAction((()=>{const s=this.get("schema");(0,m.isCollection)(r)?(s.type(r||Object),s.itemSchema().set(e,t)):s.set(e,t)})),this}}function os(e,t){return new is({status:e,model:t}).build()}function as(e){return os().ContentType(e)}function cs(e=!0){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.METHOD:t.operation.deprecated(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],cs(e));break;case m.DecoratorTypes.PARAM:t.parameter.set("deprecated",e);break;case m.DecoratorTypes.PROP:t.schema.set("deprecated",e);break;default:throw new m.UnsupportedDecoratorType(cs,r)}}))}function ps(e,t){return void 0!==t&&(e={[e]:t}),void 0===t&&(0,m.isString)(e)&&(e={[e]:{type:"string"}}),os().Headers(e)}function us(e){const t=new k,r={},s=(n,i,o)=>{const a=f.from(n,i,o);switch(a.decoratorType){case m.DecoratorTypes.PARAM:a.parameter.in(e);break;case m.DecoratorTypes.METHOD:t.in(e),a.operation.addParameter(-1,t),t.schema(x.from(r));break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(n,s);break;default:throw new m.UnsupportedDecoratorType(us,[n,i,o])}};return s.Type=e=>(r.type=e,s),s.Name=e=>(t.name(e),s),s.Description=e=>(t.description(e),s),s.Required=(e=!0)=>(t.required(e),s),s.Pattern=e=>s.Schema({pattern:e.toString()}),s.Schema=e=>(Object.assign(r,e.toJSON?e.toJSON():e),s),s}function hs(e){return(...t)=>{const[r,s,n]=t,i=m.Metadata.getParamTypes(r,s)[n]===Array,o=[e="object"==typeof e?void 0:e,!i&&"0"].filter(Boolean).join(".");(0,m.useDecorators)(us(I.FILES),dr(o),(0,m.useMethodDecorators)(os(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),Zr("multipart/form-data")))(...t)}}function ls(e,t){return os().Location(e,t)}const ms=new Set([...Object.keys(e).filter((t=>t!==e.CUSTOM)).map((e=>e.toLowerCase()))]);function ds(e){let t,r;const s=e.filter((e=>"string"==typeof e&&ms.has(e.toLowerCase())?(t=e.toLocaleUpperCase(),!1):"string"==typeof e||e instanceof RegExp?(r=e||"/",!1):!!e));return{path:r,method:t,use:s}}class fs extends es{constructor(){super(...arguments),this.methods=["name","description","summary","method","id","use","useAfter","useBefore"]}beforeInit(){const t=this.get("path"),r=e[this.get("method")]||e.CUSTOM;t&&this.entity.operation.addOperationPath(r,t)}onMapKey(e,t){switch(e){case"name":case"id":return void this.entity.operation.operationId(t);case"summary":return void this.entity.operation.summary(t);case"description":return void this.entity.operation.description(t);case"use":return void this.entity.use(t);case"useAfter":return void this.entity.after(t);case"useBefore":return void this.entity.before(t)}return super.onMapKey(e,t)}}function ys(...e){const t=ds(e);return new fs(t).build()}function gs(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(gs,r);t.operation.operationId(e)}))}function Os(e,t="/"){return lt(((r,s)=>{if(r.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(Os,s);r.operation.addOperationPath(e.toUpperCase(),t)}))}function Ss(){return ar("partial")}function bs(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.CLASS)throw new m.UnsupportedDecoratorType(bs,r);t.path=e}))}function Rs(t){return ys(e.PUBLISH,t)}function As(...e){const{status:t,url:r,meta:s}=e.reduce(((e,t)=>(0,m.isNumber)(t)?(e.status=t,e):(0,m.isString)(t)?(e.url=t,e):(e.meta=t,e)),{status:302,url:"",meta:{}});return(0,m.useDecorators)(os(t).Location(r,s),lt((e=>{e.operation?.setRedirection(t)})))}function Es(t="/",...r){return ys(...[e.ALL,t].concat(r))}function Ts(t="/",...r){return ys(...[e.GET,t].concat(r))}function vs(t="/",...r){return ys(...[e.POST,t].concat(r))}function Ps(t="/",...r){return ys(...[e.PUT,t].concat(r))}function Cs(t="/",...r){return ys(...[e.DELETE,t].concat(r))}function xs(t="/",...r){return ys(...[e.HEAD,t].concat(r))}function $s(t="/",...r){return ys(...[e.PATCH,t].concat(r))}function Ms(t="/",...r){return ys(...[e.OPTIONS,t].concat(r))}function ws(e,...t){return lt(((r,s)=>{switch(r.decoratorType){case m.DecoratorTypes.METHOD:Array.isArray(e)?r.operation.security(e):r.operation.addSecurityScopes(e,t);break;case m.DecoratorTypes.CLASS:Array.isArray(e)?(0,m.decorateMethodsOf)(s[0],ws(e)):(0,m.decorateMethodsOf)(s[0],ws(e,...t));break;default:throw new m.UnsupportedDecoratorType(ws,s)}}))}function _s(e,t){return os(e,t)}function Ns(t){return ys(e.SUBSCRIBE,t)}function Is(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(Is,r);t.operation.summary(e)}))}function Ds(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.addTags(function(e){return e.map((e=>"string"==typeof e?{name:e}:e))}(e));break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Ds(...e));break;default:throw new m.UnsupportedDecoratorType(Ds,r)}}))}function Ls(e,t){return(0,m.StoreSet)("view",{path:e,options:t})}function ks(e,t){if(e instanceof RegExp||t instanceof RegExp){if(!e)return t;if(!t)return e;const r=e instanceof RegExp?e:new RegExp(e,"gi"),s=t instanceof RegExp?t:new RegExp(t,"gi");return new RegExp(r.source+s.source,(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":""))}e&&t&&e.endsWith("/")&&t.startsWith("/")&&(t=t.slice(1));const r=(e||"")+(t||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class js{constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){return this.operationPath?.path}get fullPath(){return ks(this.basePath,this.path)}get method(){return this.operationPath?.method||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}const Hs=(0,m.mergeReducerBuilder)(((e,t)=>e.type&&e.type&&e.type===t.type&&"array"===t.type?JSON.stringify(e.items)===JSON.stringify(t.items):e.type&&e.type===t.type||e.$ref&&e.$ref===t.$ref)),Gs=(0,m.mergeReducerBuilder)(((e,t)=>e.in===t.in&&e.name===t.name)),qs=(0,m.mergeReducerBuilder)(((e,t)=>!!Object.keys(t).find((t=>!!e[t])))),Bs=(0,m.mergeReducerBuilder)(((e,t)=>e.name===t.name)),Us={security:qs,parameters:Gs,oneOf:Hs,anyOf:Hs,allOf:Hs,tags:Bs};function Ks(e,t){return(0,m.deepMerge)(e,t,{reducers:Us,cleanUndefinedProps:!0})}const Js=new Map;function Fs(e,t={}){if(t={specType:re.OPENAPI,...t,tags:[],paths:{},channels:{},components:{},operationIdFormatter:t.operationIdFormatter||at(t.operationIdPattern),root:!1},(0,m.isArray)(e)){let r={};return t={...t,append(e){r=Ks(r,e)}},e.forEach((({token:e,...r})=>{const s=Fs(e,{...t,...r});t.append(s)})),r}return function(e,t,r){Js.has(e)||Js.set(e,new Map);const s=Js.get(e),n=JSON.stringify(t);return s.has(n)||s.set(n,r()),s.get(n)}(e,t,(()=>function(e,t){const r=X(e),{rootPath:s="/"}=t;return t={...t,rootPath:s,defaultTags:[(0,m.cleanObject)({name:r.schema.getName(),description:r.schema.get("description")})]},p("generate",[r],t)}(e,t)))}function Vs(e){return e.startsWith("3.")?re.OPENAPI:re.SWAGGER}function Ws(e){return"openapi"in e?re.OPENAPI:re.SWAGGER}function Xs(e){const{title:t,description:r,version:s,termsOfService:n,contact:i,license:o}=e;return(0,m.cleanObject)({version:s,title:t,description:r,termsOfService:n,contact:i,license:o})}function zs(e,{version:t,specVersion:r,acceptMimes:s=["application/json"]}){const{paths:n,security:i,tags:o,host:a,basePath:c,schemes:p,consumes:u=[],produces:h=["application/json"],definitions:l,parameters:d,responses:f,securityDefinitions:y,externalDocs:g}=e;return{swagger:r,consumes:(0,m.uniq)([...s,...u]),produces:(0,m.uniq)([...h]),info:Xs((0,m.getValue)(e,"info",{})),paths:n,host:a,basePath:c,schemes:p,definitions:l,parameters:d,responses:f,security:i,securityDefinitions:y,tags:o,externalDocs:g}}function Qs(e,{specVersion:t}){const{servers:r,paths:s,components:n,security:i,tags:o,externalDocs:a}=e;return{openapi:t,info:Xs((0,m.getValue)(e,"info",{})),servers:r,paths:s,components:n,security:i,tags:o,externalDocs:a}}function Ys(e,{fileSpec:t,acceptMimes:r,specVersion:s,version:n}){const i={specVersion:s=s||(0,m.getValue)(e,"openapi",(0,m.getValue)(e,"swagger","2.0")),acceptMimes:r};switch(Vs(s)){case re.OPENAPI:e=Qs(e,i),t=t?Qs(t,i):t;break;default:case re.SWAGGER:e=zs(e,i),t=t?zs(t,i):t}return e=Ks(e,t),(0,m.setValue)(e,"info.title",(0,m.getValue)(e,"info.title","Api documentation")),(0,m.setValue)(e,"info.version",(0,m.getValue)(e,"info.version",n)),e}const Zs=["get","put","post","delete","options","head","patch","trace"],en=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],tn=["type","items"],rn=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,sn={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function nn(e){if(Array.isArray(e))e.forEach(nn);else if("object"==typeof e)for(let t in e)"$ref"===t?e.$ref=e.$ref.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/"):nn(e[t])}function on(e){return new RegExp(rn,"i").test(e)}function an(e){const t=Object.keys(sn).map((e=>sn[e]));return Object.keys(e).filter((e=>t.indexOf(e)>-1||on(e)))}function cn(e){function t(e){const{scheme:t,type:r,name:s,bearerFormat:n,flows:i,...o}=e;switch(r){case"http":if("basic"===t)return{...o,type:t};if("bearer"===t)return{...o,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const e=Object.keys(i)[0],s=i[e];let n=e;return"clientCredentials"===n?n="application":"authorizationCode"===n&&(n="accessCode"),{type:r,flow:n,authorizationUrl:s.authorizationUrl,tokenUrl:s.tokenUrl,scopes:s.scopes}}}return Object.entries(e).reduce(((e,[r,s])=>({...e,[r]:t(s)})),{})}function pn(e){let t=e.url;const r=e.variables||{};for(const e in r){const s=r[e]||{};if(s.default){const r=RegExp(`{${e}}`,"g");t=t.replace(r,s.default)}}const s=new URL(t);return{host:s.host?s.host:void 0,basePath:s.pathname,schemes:null!==s.protocol?[s.protocol.substring(0,s.protocol.length-1)]:void 0}}class un{constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?pn(e):{}}resolveReference(e,t,r){if(!t||!t.$ref)return t;const s=t.$ref;if(s.startsWith("#")){const t=s.split("/").map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~")));t.shift();let n=e;return t.forEach((e=>{n=n[e]})),r?JSON.parse(JSON.stringify(n)):n}}convert(){const e={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,nn(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],(0,m.cleanObject)({...e,...this.spec})}convertOperations(e,t){return Object.entries(e).reduce(((e,[r,s])=>{const n=e[r]=this.resolveReference({...t,paths:e},s,!0);return this.convertParameters(n),Object.keys(n).forEach((r=>{if(Zs.indexOf(r)>=0){const s=n[r]=this.resolveReference({...t,paths:e},n[r],!0);this.convertOperationParameters(s),this.convertResponses(s)}})),e}),e)}convertOperationParameters(e){let t,r,s,n;if(e.parameters=e.parameters||[],e.requestBody){let i=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const t=an(e.requestBody.content)[0],r={content:{}},s=e.requestBody.content[t];s&&s.schema&&s.schema.$ref&&!s.schema.$ref.startsWith("#")&&(i=this.resolveReference(this.spec,s.schema,!0),r.content[`${t}`]={schema:i},i=r)}if(i.name="body",t=i.content,t&&Object.keys(t).length){if(s=Object.keys(t).filter((e=>e.indexOf("/")>0)),n=s.filter((e=>e.indexOf("*")<0)),r=an(t)[0],delete i.content,[sn.APPLICATION_X_WWW_URLENCODED,sn.MULTIPART_FORM_DATA].includes(r))if(e.consumes=n,i.in="formData",i.schema=t[r].schema,i.schema=this.resolveReference(this.spec,i.schema,!0),"object"===i.schema.type&&i.schema.properties){const t=i.schema.required||[];Object.keys(i.schema.properties).forEach((r=>{const s=i.schema.properties[r];if(!s.readOnly){const n={name:r,in:"formData",schema:s};t.indexOf(r)>=0&&(n.required=!0),e.parameters?.push(n)}}))}else e.parameters.push(i);else r?(e.consumes=n,i.in="body",i.schema=t[r].schema,e.parameters.push(i)):s&&(e.consumes=n||["application/octet-stream"],i.in="body",i.name=i.name||"file",delete i.type,i.schema=t[s[0]].schema||{type:"string",format:"binary"},e.parameters.push(i));i.schema&&this.convertSchema(i.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){void 0!==e.parameters&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach(((t,r)=>{if("body"!==(t=e.parameters[r]=this.resolveReference(this.spec,t,!1)).in){if(this.copySchemaProperties(t,en),this.copySchemaProperties(t,tn),this.copySchemaXProperties(t),!t.description){const e=this.resolveReference(this.spec,t.schema,!1);e&&e.description&&(t.description=e.description)}void 0!==t.example&&(t["x-example"]=t.example),delete t.schema,delete t.allowReserved,delete t.example}if("array"===t.type)switch(t.style||("query"===t.in||"cookie"===t.in?"form":"simple")){case"matrix":t.collectionFormat=t.explode?void 0:"csv";break;case"label":t.collectionFormat=void 0;break;case"simple":t.collectionFormat="csv";break;case"spaceDelimited":t.collectionFormat="ssv";break;case"pipeDelimited":t.collectionFormat="pipes";break;case"deepOpbject":t.collectionFormat="multi";break;case"form":t.collectionFormat=!1===t.explode?"csv":"multi"}delete t.style,delete t.explode})))}copySchemaProperties(e,t){let r=this.resolveReference(this.spec,e.schema,!0);r&&t.forEach((t=>{const s=r[t];"additionalProperties"===t&&"boolean"==typeof s||void 0!==s&&(e[t]=s)}))}copySchemaXProperties(e){let t=this.resolveReference(this.spec,e.schema,!0);t&&Object.keys(t).forEach((r=>{Reflect.hasOwnProperty.call(t,r)&&!Reflect.hasOwnProperty.call(e,r)&&r.startsWith("x-")&&(e[r]=t[r])}))}convertResponses(e){Object.keys(e.responses||{}).forEach((t=>{const r=e.responses[t]=this.resolveReference(this.spec,e.responses[t],!0);if(r.content){let t=null,s=null;if(Object.keys(r.content).forEach((n=>{const i=n.indexOf("*")<0?n:"application/octet-stream";e.produces?e.produces.indexOf(i)<0&&e.produces.push(i):e.produces=[i];const o=r.content[n];t=t||o.schema,!s&&on(i)&&(s=o.schema),o.example&&(r.examples=r.examples||{},r.examples[i]=o.example)})),t){r.schema=s||t;const e=this.resolveReference(this.spec,r.schema,!0);e&&r.schema.$ref&&!r.schema.$ref.startsWith("#")&&(r.schema=e),this.convertSchema(r.schema,"response")}}Object.keys(r.headers||{}).forEach((e=>{const t=this.resolveReference(this.spec,r.headers[e],!0);t.schema&&(t.type=t.schema.type,t.format=t.schema.format,delete t.schema),r.headers[e]=t})),delete r.content}))}convertSchema(e,t){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const r in e.allOf)this.convertSchema(e.allOf[r],t);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach((r=>{!0===e.properties[r].writeOnly&&"response"===t?delete e.properties[r]:(this.convertSchema(e.properties[r],t),delete e.properties[r].writeOnly)}));break;case"array":e.items&&this.convertSchema(e.items,t)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),void 0!==e.deprecated&&(void 0===e["x-deprecated"]&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach((e=>{this.convertSchema(this.spec.definitions[e])})),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach((t=>{const r=e[t];if("string"!=typeof r)return void console.warn(`Ignoring ${r} for ${t} in discriminator.mapping.`);let s;if(/^[a-zA-Z0-9._-]+$/.test(r))try{s=this.resolveReference(this.spec,{$ref:`#/components/schemas/${r}`},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} as schema name in discriminator.mapping: ${e}`)}if(!s)try{s=this.resolveReference(this.spec,{$ref:r},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} in discriminator.mapping: ${e}`)}s?(s["x-discriminator-value"]=t,s["x-ms-discriminator-value"]=t):console.warn(`Unable to resolve ${r} for ${t} in discriminator.mapping.`)}))}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=cn(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function hn(e){return new un(e).convert()}async function ln({tokens:e,...t}){const{version:r="1.0.0",acceptMimes:s,specPath:n,specVersion:i}=t,o=Ys((0,m.getValue)(t,"spec",{}),{fileSpec:{},version:r,specVersion:i,acceptMimes:s}),a=Ws(o),c=Ks(o,Fs(e,t));return a===re.SWAGGER?hn(c):c}const mn="$cache:schemes";function dn(e,t={}){const r=X(e),s=t.specType||re.JSON;return t={endpoint:!0,groups:[],inlineEnums:s===re.JSON,...t,specType:s,components:{schemas:{}}},"parameter"===r.decoratorType&&(t={...t,genericTypes:r.nestedGenerics[0],nestedGenerics:r.nestedGenerics,groups:r.parameter?.groups}),function(e,t){const r=e.store.get(mn)||new Map,s=function(e){return JSON.stringify(e)}(t);if(!r.has(s)){const n=p("schema",[e.schema],t);Object.keys((0,m.getValue)(t,"components.schemas",{})).length&&(n.definitions=t.components.schemas),r.set(s,n)}return e.store.set(mn,r),r.get(s)}(r,t)}function fn(e,t={}){const r=e.isStore?e:X(e),s=ks(t.basePath,r.path);let n=[];return t.withChildren&&(n=r.get("childrenControllers",[]).reduce(((e,r)=>e.concat(fn(r,{...t,basePath:s}))),n)),[...Y(e).values()].reduce(((r,n)=>{const{operation:i}=n;return i&&i.getAllowedOperationPath(t.allowedVerbs).forEach((t=>{r.push(new js({basePath:s,token:e,endpoint:n,operationPath:t}))})),r}),n)}function yn(e){const t=e.isStore?e:X(e);if(!t.$properties){const e=Q(t);t.$properties=new Map,e.forEach((e=>{e.children.forEach((e=>{t.$properties.has(e.propertyKey)||t.$properties.set(e.propertyKey,e)}))}))}return t.$properties}function gn(e,t={}){const r=yn(e),s=new Map;return r.forEach(((e,r)=>{!t.withIgnoredProps&&Me(e.itemSchema,t)||s.set(r,e)})),s}})(),i})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("change-case"),require("@tsed/core")):"function"==typeof define&&define.amd?define(["change-case","@tsed/core"],t):"object"==typeof exports?exports["@tsed/schema"]=t(require("change-case"),require("@tsed/core")):e["@tsed/schema"]=t(e["change-case"],e["@tsed/core"])}(self,((e,t)=>(()=>{"use strict";var r={133:(e,t,r)=>{e.exports=r(555)},379:e=>{const t="\\\\/",r=`[^${t}]`,s="\\.",n="\\/",i="[^/]",o=`(?:${n}|$)`,a=`(?:^|${n})`,c=`${s}{1,2}${o}`,p={DOT_LITERAL:s,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:n,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!${s})`,NO_DOTS:`(?!${a}${c})`,NO_DOT_SLASH:`(?!${s}{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.${n}]`,STAR:`${i}*?`,START_ANCHOR:a,SEP:"/"},u={...p,SLASH_LITERAL:`[${t}]`,QMARK:r,STAR:`${r}*?`,DOTS_SLASH:`${s}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${s})`,NO_DOTS:`(?!(?:^|[${t}])${s}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${s}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${s}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?u:p}},390:(e,t,r)=>{const s=r(379),n=r(290),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:p}=s,u=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>n.escapeRegex(e))).join("..")}return r},h=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,l=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=p[e]||e;const r={...t},l="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let m=e.length;if(m>l)throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${l}`);const d={type:"bos",value:"",output:r.prepend||""},f=[d],y=r.capture?"":"?:",g=s.globChars(r.windows),O=s.extglobChars(g),{DOT_LITERAL:S,PLUS_LITERAL:b,SLASH_LITERAL:R,ONE_CHAR:A,DOTS_SLASH:E,NO_DOT:T,NO_DOT_SLASH:v,NO_DOTS_SLASH:P,QMARK:C,QMARK_NO_DOT:x,STAR:$,START_ANCHOR:M}=g,w=e=>`(${y}(?:(?!${M}${e.dot?E:S}).)*?)`,_=r.dot?"":T,N=r.dot?C:x;let I=!0===r.bash?w(r):$;r.capture&&(I=`(${I})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const D={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:f};e=n.removePrefix(e,D),m=e.length;const L=[],k=[],j=[];let H,G=d;const q=()=>D.index===m-1,B=D.peek=(t=1)=>e[D.index+t],U=D.advance=()=>e[++D.index],K=()=>e.slice(D.index+1),J=(e="",t=0)=>{D.consumed+=e,D.index+=t},F=e=>{D.output+=null!=e.output?e.output:e.value,J(e.value)},V=()=>{let e=1;for(;"!"===B()&&("("!==B(2)||"?"===B(3));)U(),D.start++,e++;return e%2!=0&&(D.negated=!0,D.start++,!0)},W=e=>{D[e]++,j.push(e)},X=e=>{D[e]--,j.pop()},z=e=>{if("globstar"===G.type){const t=D.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||L.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(D.output=D.output.slice(0,-G.output.length),G.type="star",G.value="*",G.output=I,D.output+=G.output)}if(L.length&&"paren"!==e.type&&!O[e.value]&&(L[L.length-1].inner+=e.value),(e.value||e.output)&&F(e),G&&"text"===G.type&&"text"===e.type)return G.value+=e.value,void(G.output=(G.output||"")+e.value);e.prev=G,f.push(e),G=e},Q=(e,t)=>{const s={...O[t],conditions:1,inner:""};s.prev=G,s.parens=D.parens,s.output=D.output;const n=(r.capture?"(":"")+s.open;W("parens"),z({type:e,value:t,output:D.output?"":A}),z({type:"paren",extglob:!0,value:U(),output:n}),L.push(s)},Y=e=>{let t=e.close+(r.capture?")":"");if("negate"===e.type){let s=I;e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=w(r)),(s!==I||q()||/^\)+$/.test(K()))&&(t=e.close=`)$))${s}`),"bos"===e.prev.type&&q()&&(D.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:H,output:t}),X("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=!1,i=e.replace(c,((e,t,r,n,i,o)=>"\\"===n?(s=!0,e):"?"===n?t?t+n+(i?C.repeat(i.length):""):0===o?N+(i?C.repeat(i.length):""):C.repeat(r.length):"."===n?S.repeat(r.length):"*"===n?t?t+n+(i?I:""):I:t?e:`\\${e}`));return!0===s&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===r.contains?(D.output=e,D):(D.output=n.wrapOutput(i,D,t),D)}for(;!q();){if(H=U(),"\0"===H)continue;if("\\"===H){const e=B();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",z({type:"text",value:H});continue}const t=/^\\+/.exec(K());let s=0;if(t&&t[0].length>2&&(s=t[0].length,D.index+=s,s%2!=0&&(H+="\\")),!0===r.unescape?H=U()||"":H+=U()||"",0===D.brackets){z({type:"text",value:H});continue}}if(D.brackets>0&&("]"!==H||"["===G.value||"[^"===G.value)){if(!1!==r.posix&&":"===H){const e=G.value.slice(1);if(e.includes("[")&&(G.posix=!0,e.includes(":"))){const e=G.value.lastIndexOf("["),t=G.value.slice(0,e),r=G.value.slice(e+2),s=o[r];if(s){G.value=t+s,D.backtrack=!0,U(),d.output||1!==f.indexOf(G)||(d.output=A);continue}}}("["===H&&":"!==B()||"-"===H&&"]"===B())&&(H=`\\${H}`),"]"!==H||"["!==G.value&&"[^"!==G.value||(H=`\\${H}`),!0===r.posix&&"!"===H&&"["===G.value&&(H="^"),G.value+=H,F({value:H});continue}if(1===D.quotes&&'"'!==H){H=n.escapeRegex(H),G.value+=H,F({value:H});continue}if('"'===H){D.quotes=1===D.quotes?0:1,!0===r.keepQuotes&&z({type:"text",value:H});continue}if("("===H){W("parens"),z({type:"paren",value:H});continue}if(")"===H){if(0===D.parens&&!0===r.strictBrackets)throw new SyntaxError(h("opening","("));const e=L[L.length-1];if(e&&D.parens===e.parens+1){Y(L.pop());continue}z({type:"paren",value:H,output:D.parens?")":"\\)"}),X("parens");continue}if("["===H){if(!0!==r.nobracket&&K().includes("]"))W("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));H=`\\${H}`}z({type:"bracket",value:H});continue}if("]"===H){if(!0===r.nobracket||G&&"bracket"===G.type&&1===G.value.length){z({type:"text",value:H,output:`\\${H}`});continue}if(0===D.brackets){if(!0===r.strictBrackets)throw new SyntaxError(h("opening","["));z({type:"text",value:H,output:`\\${H}`});continue}X("brackets");const e=G.value.slice(1);if(!0===G.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),G.value+=H,F({value:H}),!1===r.literalBrackets||n.hasRegexChars(e))continue;const t=n.escapeRegex(G.value);if(D.output=D.output.slice(0,-G.value.length),!0===r.literalBrackets){D.output+=t,G.value=t;continue}G.value=`(${y}${t}|${G.value})`,D.output+=G.value;continue}if("{"===H&&!0!==r.nobrace){W("braces");const e={type:"brace",value:H,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};k.push(e),z(e);continue}if("}"===H){const e=k[k.length-1];if(!0===r.nobrace||!e){z({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=f.slice(),s=[];for(let t=e.length-1;t>=0&&(f.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&s.unshift(e[t].value);t=u(s,r),D.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=D.output.slice(0,e.outputIndex),s=D.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",D.output=r;for(const e of s)D.output+=e.output||e.value}z({type:"brace",value:H,output:t}),X("braces"),k.pop();continue}if("|"===H){L.length>0&&L[L.length-1].conditions++,z({type:"text",value:H});continue}if(","===H){let e=H;const t=k[k.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),z({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===G.type&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",f.pop(),G=d;continue}z({type:"slash",value:H,output:R});continue}if("."===H){if(D.braces>0&&"dot"===G.type){"."===G.value&&(G.output=S);const e=k[k.length-1];G.type="dots",G.output+=H,G.value+=H,e.dots=!0;continue}if(D.braces+D.parens===0&&"bos"!==G.type&&"slash"!==G.type){z({type:"text",value:H,output:S});continue}z({type:"dot",value:H,output:S});continue}if("?"===H){if((!G||"("!==G.value)&&!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Q("qmark",H);continue}if(G&&"paren"===G.type){const e=B();let t=H;if("<"===e&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===G.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${H}`),z({type:"text",value:H,output:t});continue}if(!0!==r.dot&&("slash"===G.type||"bos"===G.type)){z({type:"qmark",value:H,output:x});continue}z({type:"qmark",value:H,output:C});continue}if("!"===H){if(!0!==r.noextglob&&"("===B()&&("?"!==B(2)||!/[!=<:]/.test(B(3)))){Q("negate",H);continue}if(!0!==r.nonegate&&0===D.index){V();continue}}if("+"===H){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Q("plus",H);continue}if(G&&"("===G.value||!1===r.regex){z({type:"plus",value:H,output:b});continue}if(G&&("bracket"===G.type||"paren"===G.type||"brace"===G.type)||D.parens>0){z({type:"plus",value:H});continue}z({type:"plus",value:b});continue}if("@"===H){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){z({type:"at",extglob:!0,value:H,output:""});continue}z({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=a.exec(K());e&&(H+=e[0],D.index+=e[0].length),z({type:"text",value:H});continue}if(G&&("globstar"===G.type||!0===G.star)){G.type="star",G.star=!0,G.value+=H,G.output=I,D.backtrack=!0,D.globstar=!0,J(H);continue}let t=K();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Q("star",H);continue}if("star"===G.type){if(!0===r.noglobstar){J(H);continue}const s=G.prev,n=s.prev,i="slash"===s.type||"bos"===s.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===r.bash&&(!i||t[0]&&"/"!==t[0])){z({type:"star",value:H,output:""});continue}const a=D.braces>0&&("comma"===s.type||"brace"===s.type),c=L.length&&("pipe"===s.type||"paren"===s.type);if(!i&&"paren"!==s.type&&!a&&!c){z({type:"star",value:H,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[D.index+4];if(r&&"/"!==r)break;t=t.slice(3),J("/**",3)}if("bos"===s.type&&q()){G.type="globstar",G.value+=H,G.output=w(r),D.output=G.output,D.globstar=!0,J(H);continue}if("slash"===s.type&&"bos"!==s.prev.type&&!o&&q()){D.output=D.output.slice(0,-(s.output+G.output).length),s.output=`(?:${s.output}`,G.type="globstar",G.output=w(r)+(r.strictSlashes?")":"|$)"),G.value+=H,D.globstar=!0,D.output+=s.output+G.output,J(H);continue}if("slash"===s.type&&"bos"!==s.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";D.output=D.output.slice(0,-(s.output+G.output).length),s.output=`(?:${s.output}`,G.type="globstar",G.output=`${w(r)}${R}|${R}${e})`,G.value+=H,D.output+=s.output+G.output,D.globstar=!0,J(H+U()),z({type:"slash",value:"/",output:""});continue}if("bos"===s.type&&"/"===t[0]){G.type="globstar",G.value+=H,G.output=`(?:^|${R}|${w(r)}${R})`,D.output=G.output,D.globstar=!0,J(H+U()),z({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-G.output.length),G.type="globstar",G.output=w(r),G.value+=H,D.output+=G.output,D.globstar=!0,J(H);continue}const s={type:"star",value:H,output:I};!0!==r.bash?!G||"bracket"!==G.type&&"paren"!==G.type||!0!==r.regex?(D.index!==D.start&&"slash"!==G.type&&"dot"!==G.type||("dot"===G.type?(D.output+=v,G.output+=v):!0===r.dot?(D.output+=P,G.output+=P):(D.output+=_,G.output+=_),"*"!==B()&&(D.output+=A,G.output+=A)),z(s)):(s.output=H,z(s)):(s.output=".*?","bos"!==G.type&&"slash"!==G.type||(s.output=_+s.output),z(s))}for(;D.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","]"));D.output=n.escapeLast(D.output,"["),X("brackets")}for(;D.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing",")"));D.output=n.escapeLast(D.output,"("),X("parens")}for(;D.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(h("closing","}"));D.output=n.escapeLast(D.output,"{"),X("braces")}if(!0===r.strictSlashes||"star"!==G.type&&"bracket"!==G.type||z({type:"maybe_slash",value:"",output:`${R}?`}),!0===D.backtrack){D.output="";for(const e of D.tokens)D.output+=null!=e.output?e.output:e.value,e.suffix&&(D.output+=e.suffix)}return D};l.fastpaths=(e,t)=>{const r={...t},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=p[e]||e;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:h,DOTS_SLASH:l,NO_DOT:m,NO_DOTS:d,NO_DOTS_SLASH:f,STAR:y,START_ANCHOR:g}=s.globChars(r.windows),O=r.dot?d:m,S=r.dot?f:m,b=r.capture?"":"?:";let R=!0===r.bash?".*?":y;r.capture&&(R=`(${R})`);const A=e=>!0===e.noglobstar?R:`(${b}(?:(?!${g}${e.dot?l:c}).)*?)`,E=e=>{switch(e){case"*":return`${O}${h}${R}`;case".*":return`${c}${h}${R}`;case"*.*":return`${O}${R}${c}${h}${R}`;case"*/*":return`${O}${R}${u}${h}${S}${R}`;case"**":return O+A(r);case"**/*":return`(?:${O}${A(r)}${u})?${S}${h}${R}`;case"**/*.*":return`(?:${O}${A(r)}${u})?${S}${R}${c}${h}${R}`;case"**/.*":return`(?:${O}${A(r)}${u})?${c}${h}${R}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=E(t[1]);if(!r)return;return r+c+t[2]}}},T=n.removePrefix(e,{negated:!1,prefix:""});let v=E(T);return v&&!0!==r.strictSlashes&&(v+=`${u}?`),v},e.exports=l},555:(e,t,r)=>{const s=r(270),n=r(390),i=r(290),o=r(379),a=(e,t,r=!1)=>{if(Array.isArray(e)){const s=e.map((e=>a(e,t,r))),n=e=>{for(const t of s){const r=t(e);if(r)return r}return!1};return n}const s=(n=e)&&"object"==typeof n&&!Array.isArray(n)&&e.tokens&&e.input;var n;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},o=i.windows,c=s?a.compileRe(e,t):a.makeRe(e,t,!1,!0),p=c.state;delete c.state;let u=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=a(i.ignore,e,r)}const h=(r,s=!1)=>{const{isMatch:n,match:h,output:l}=a.test(r,c,t,{glob:e,posix:o}),m={glob:e,state:p,regex:c,posix:o,input:r,output:l,match:h,isMatch:n};return"function"==typeof i.onResult&&i.onResult(m),!1===n?(m.isMatch=!1,!!s&&m):u(r)?("function"==typeof i.onIgnore&&i.onIgnore(m),m.isMatch=!1,!!s&&m):("function"==typeof i.onMatch&&i.onMatch(m),!s||m)};return r&&(h.state=p),h};a.test=(e,t,r,{glob:s,posix:n}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const o=r||{},c=o.format||(n?i.toPosixSlashes:null);let p=e===s,u=p&&c?c(e):e;return!1===p&&(u=c?c(e):e,p=u===s),!1!==p&&!0!==o.capture||(p=!0===o.matchBase||!0===o.basename?a.matchBase(e,t,r,n):t.exec(u)),{isMatch:Boolean(p),match:p,output:u}},a.matchBase=(e,t,r)=>(t instanceof RegExp?t:a.makeRe(t,r)).test(i.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map((e=>a.parse(e,t))):n(e,{...t,fastpaths:!1}),a.scan=(e,t)=>s(e,t),a.compileRe=(e,t,r=!1,s=!1)=>{if(!0===r)return e.output;const n=t||{},i=n.contains?"":"^",o=n.contains?"":"$";let c=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(c=`^(?!${c}).*$`);const p=a.toRegex(c,t);return!0===s&&(p.state=e),p},a.makeRe=(e,t,r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");const i=t||{};let o,c={negated:!1,fastpaths:!0},p="";return e.startsWith("./")&&(e=e.slice(2),p=c.prefix="./"),!1===i.fastpaths||"."!==e[0]&&"*"!==e[0]||(o=n.fastpaths(e,t)),void 0===o?(c=n(e,t),c.prefix=p+(c.prefix||"")):c.output=o,a.compileRe(c,t,r,s)},a.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=o,e.exports=a},270:(e,t,r)=>{const s=r(290),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:p,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:l,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:d,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:O}=r(379),S=e=>e===u||e===o,b=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},R=e.length-1,A=!0===r.parts||!0===r.scanToEnd,E=[],T=[],v=[];let P,C,x=e,$=-1,M=0,w=0,_=!1,N=!1,I=!1,D=!1,L=!1,k=!1,j=!1,H=!1,G=!1,q=0,B={value:"",depth:0,isGlob:!1};const U=()=>$>=R,K=()=>(P=C,x.charCodeAt(++$));for(;$<R;){let e;if(C=K(),C!==o){if(!0===k||C===h){for(q++;!0!==U()&&(C=K());)if(C!==o)if(C!==h){if(!0!==k&&C===c&&(C=K())===c){if(_=B.isBrace=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}if(!0!==k&&C===a){if(_=B.isBrace=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===y&&(q--,0===q)){k=!1,_=B.isBrace=!0,G=!0;break}}else q++;else j=B.backslashes=!0,K();if(!0===A)continue;break}if(C!==u){if(!0!==r.noext&&!0==(C===d||C===i||C===n||C===f||C===p)&&x.charCodeAt($+1)===l){if(I=B.isGlob=!0,D=B.isExtglob=!0,G=!0,!0===A){for(;!0!==U()&&(C=K());)if(C!==o){if(C===g){I=B.isGlob=!0,G=!0;break}}else j=B.backslashes=!0,C=K();continue}break}if(C===n){if(P===n&&(L=B.isGlobstar=!0),I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===f){if(I=B.isGlob=!0,G=!0,!0===A)continue;break}if(C===m)for(;!0!==U()&&(e=K());)if(e!==o){if(e===O){if(N=B.isBracket=!0,I=B.isGlob=!0,G=!0,!0===A)continue;break}}else j=B.backslashes=!0,K();if(!0===r.nonegate||C!==p||$!==M){if(!0!==r.noparen&&C===l){if(I=B.isGlob=!0,!0===A){for(;!0!==U()&&(C=K());)if(C!==l){if(C===g){G=!0;break}}else j=B.backslashes=!0,C=K();continue}break}if(!0===I){if(G=!0,!0===A)continue;break}}else H=B.negated=!0,M++}else{if(E.push($),T.push(B),B={value:"",depth:0,isGlob:!1},!0===G)continue;if(P===c&&$===M+1){M+=2;continue}w=$+1}}else j=B.backslashes=!0,C=K(),C===h&&(k=!0)}!0===r.noext&&(D=!1,I=!1);let J=x,F="",V="";M>0&&(F=x.slice(0,M),x=x.slice(M),w-=M),J&&!0===I&&w>0?(J=x.slice(0,w),V=x.slice(w)):!0===I?(J="",V=x):J=x,J&&""!==J&&"/"!==J&&J!==x&&S(J.charCodeAt(J.length-1))&&(J=J.slice(0,-1)),!0===r.unescape&&(V&&(V=s.removeBackslashes(V)),J&&!0===j&&(J=s.removeBackslashes(J)));const W={prefix:F,input:e,start:M,base:J,glob:V,isBrace:_,isBracket:N,isGlob:I,isExtglob:D,isGlobstar:L,negated:H};if(!0===r.tokens&&(W.maxDepth=0,S(C)||T.push(B),W.tokens=T),!0===r.parts||!0===r.tokens){let t;for(let s=0;s<E.length;s++){const n=t?t+1:M,i=E[s],o=e.slice(n,i);r.tokens&&(0===s&&0!==M?(T[s].isPrefix=!0,T[s].value=F):T[s].value=o,b(T[s]),W.maxDepth+=T[s].depth),0===s&&""===o||v.push(o),t=i}if(t&&t+1<e.length){const s=e.slice(t+1);v.push(s),r.tokens&&(T[T.length-1].value=s,b(T[T.length-1]),W.maxDepth+=T[T.length-1].depth)}W.slashes=E,W.parts=v}return W}},290:(e,t,r)=>{const{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:o}=r(379);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>i.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(o,"\\$1"),t.toPosixSlashes=e=>e.replace(s,"/"),t.removeBackslashes=e=>e.replace(n,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.escapeLast=(e,r,s)=>{const n=e.lastIndexOf(r,s);return-1===n?e:"\\"===e[n-1]?t.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let s=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},t.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")},203:(e,t,r)=>{var s=r(739);function n(e){if(!Object.prototype.hasOwnProperty.call(i.message,e))throw new Error("invalid status code: "+e);return i.message[e]}function i(e){if("number"==typeof e)return n(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(i.code,t))throw new Error('invalid status message: "'+e+'"');return i.code[t]}(e):n(t)}e.exports=i,i.message=s,i.code=function(e){var t={};return Object.keys(e).forEach((function(r){var s=e[r],n=Number(r);t[s.toLowerCase()]=n})),t}(s),i.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(s),i.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},i.empty={204:!0,205:!0,304:!0},i.retry={502:!0,503:!0,504:!0}},803:e=>{e.exports=t},598:t=>{t.exports=e},739:e=>{e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{ARRAY_PROPERTIES:()=>Pe,AcceptMime:()=>Yr,AdditionalProperties:()=>vt,All:()=>Es,AllOf:()=>Pt,Allow:()=>xt,Any:()=>$t,AnyOf:()=>Mt,ArrayOf:()=>yt,BOOLEAN_PROPERTIES:()=>Te,COMMON_PROPERTIES:()=>xe,Children:()=>mt,CollectionContains:()=>Ot,CollectionOf:()=>ft,Const:()=>wt,Consumes:()=>Zr,ContentType:()=>as,Converter:()=>un,CustomKey:()=>_t,CustomKeys:()=>Nt,DateFormat:()=>Yt,DateTime:()=>Qt,DecoratorContext:()=>es,Default:()=>It,DefaultMsg:()=>Lt,Delete:()=>Cs,Deprecated:()=>cs,Description:()=>kt,Discriminator:()=>P,DiscriminatorKey:()=>jt,DiscriminatorValue:()=>dt,Email:()=>zt,EndpointMetadata:()=>G,Enum:()=>Ht,ErrorMsg:()=>Dt,Example:()=>Gt,Examples:()=>qt,ExclusiveMaximum:()=>Kt,ExclusiveMinimum:()=>Vt,For:()=>Rr,Format:()=>Xt,ForwardGroups:()=>rr,GenericOf:()=>Xr,Generics:()=>zr,Get:()=>Ts,Groups:()=>ar,HTTP_STATUS_MESSAGES:()=>Qe,Head:()=>xs,Header:()=>ps,Hidden:()=>cr,Ignore:()=>pr,In:()=>us,InFile:()=>hs,Integer:()=>ur,JSON_TYPES:()=>R,JsonClassStore:()=>M,JsonEntitiesContainer:()=>y,JsonEntityComponent:()=>O,JsonEntityFn:()=>lt,JsonEntityStore:()=>g,JsonFormatTypes:()=>Wt,JsonLazyRef:()=>ue,JsonMap:()=>N,JsonMedia:()=>L,JsonMethodStore:()=>H,JsonOperation:()=>j,JsonOperationPathsMap:()=>z,JsonOperationRoute:()=>js,JsonParameter:()=>K,JsonParameterStore:()=>J,JsonParameterTypes:()=>q,JsonPropertyStore:()=>V,JsonRequestBody:()=>rt,JsonResponse:()=>k,JsonSchema:()=>$,Location:()=>ls,MANY_OF_PROPERTIES:()=>Ae,MapOf:()=>gt,Max:()=>Ut,MaxItems:()=>bt,MaxLength:()=>hr,MaxProperties:()=>Rt,Maximum:()=>Bt,Min:()=>Ft,MinItems:()=>At,MinLength:()=>lr,MinProperties:()=>Et,Minimum:()=>Jt,MultipleOf:()=>mr,NUMBER_PROPERTIES:()=>ve,Name:()=>dr,Nullable:()=>fr,OBJECT_PROPERTIES:()=>Ce,OPERATION_HTTP_VERBS:()=>r,OPERATION_WS_VERBS:()=>s,OneOf:()=>yr,Operation:()=>ys,OperationId:()=>gs,OperationPath:()=>Os,OperationVerbs:()=>e,Optional:()=>gr,Options:()=>Ms,ParamMetadata:()=>F,Partial:()=>Ss,Patch:()=>$s,Path:()=>bs,Pattern:()=>Or,Post:()=>vs,Produces:()=>Qr,Property:()=>Ct,PropertyMetadata:()=>W,Publish:()=>Rs,Put:()=>Ps,ReadOnly:()=>Sr,RecordOf:()=>Ar,Redirect:()=>As,Required:()=>Er,RequiredGroups:()=>Tr,Returns:()=>os,STRING_PROPERTIES:()=>Ee,Schema:()=>br,Security:()=>ws,SpecTypes:()=>re,Status:()=>_s,Subscribe:()=>Ns,Summary:()=>Is,Tags:()=>Ds,TimeFormat:()=>Zt,Title:()=>vr,TypeError:()=>Pr,UniqueItems:()=>Tt,Uri:()=>er,Url:()=>tr,View:()=>Ls,WriteOnly:()=>Cr,allOf:()=>Fr,alterIgnore:()=>Me,alterOneOf:()=>je,alterRequiredGroups:()=>Ie,any:()=>Ur,anyMapper:()=>de,anyOf:()=>Kr,array:()=>Hr,boolean:()=>_r,buildPath:()=>l,channelsMapper:()=>te,classMapper:()=>fe,concatParameters:()=>it,concatPath:()=>ks,createRef:()=>le,createRefName:()=>he,date:()=>Nr,datetime:()=>Ir,defineStatusModel:()=>rs,email:()=>Lr,enums:()=>Wr,enumsRegistry:()=>S,execMapper:()=>p,formatParameterType:()=>B,from:()=>xr,generateSpec:()=>ln,genericsMapper:()=>ye,getComputedType:()=>b,getGenericsMap:()=>ie,getInheritedStores:()=>Q,getJsonEntityStore:()=>X,getJsonPathParameters:()=>ot,getJsonSchema:()=>dn,getJsonSchemaMapper:()=>c,getJsonType:()=>A,getOperationId:()=>ct,getOperationsRoutes:()=>fn,getOperationsStores:()=>Y,getProperties:()=>gn,getPropertiesStores:()=>yn,getSpec:()=>Fs,getSpecType:()=>Vs,getSpecTypeFromSpec:()=>Ws,getStatusConstant:()=>Ye,getStatusMessage:()=>Ze,getStatusModel:()=>ss,hasMapper:()=>u,inheritedClassMapper:()=>ge,inlineEnumsMapper:()=>Oe,integer:()=>Mr,isParameterType:()=>U,isRedirectionStatus:()=>_,isSuccessStatus:()=>w,itemMapper:()=>Se,lazyRef:()=>Vr,lazyRefMapper:()=>be,makeOf:()=>se,map:()=>Gr,mapAliasedProperties:()=>Le,mapGenericsOptions:()=>oe,mapHeaders:()=>I,mapMapper:()=>Re,mapOpenSpec:()=>Ys,mapOpenSpec2:()=>zs,mapOpenSpec3:()=>Qs,mapOpenSpecInfo:()=>Xs,mapOperationOptions:()=>ds,matchGroups:()=>or,mergeSpec:()=>Ks,messageMapper:()=>ne,nullableMapper:()=>$e,nullableMapperOpenApi:()=>Ue,number:()=>$r,object:()=>Br,objectMapper:()=>we,ofMapper:()=>_e,oneOf:()=>Jr,oneOfMapper:()=>h,operationIdFormatter:()=>at,operationInFilesMapper:()=>Ke,operationInParameterMapper:()=>Je,operationInParametersMapper:()=>Fe,operationInQueryMapper:()=>We,operationMapper:()=>et,operationMediaMapper:()=>tt,operationRequestBodyMapper:()=>st,operationResponseMapper:()=>nt,parameters:()=>Gs,pathsMapper:()=>ht,payloadMapper:()=>ce,popGenerics:()=>ae,propertiesMapper:()=>Ne,registerJsonSchemaMapper:()=>a,removeHiddenOperation:()=>Z,requiredMapper:()=>De,responsePayloadMapper:()=>pe,schemaMapper:()=>qe,schemesReducer:()=>Hs,security:()=>qs,serializeEnum:()=>E,serializeEnumValues:()=>T,set:()=>qr,string:()=>wr,tagsReducer:()=>Bs,time:()=>Dr,toJsonMapCollection:()=>D,toJsonRegex:()=>v,toRef:()=>me,transformInformation:()=>pn,transformSecurity:()=>cn,transformToOS2:()=>hn,uri:()=>kr,url:()=>jr,withErrorMsg:()=>St});var e,t=n(598);!function(e){e.ALL="ALL",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.HEAD="HEAD",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.TRACE="TRACE",e.PUBLISH="PUBLISH",e.SUBSCRIBE="SUBSCRIBE",e.CUSTOM="CUSTOM"}(e||(e={}));const r=[e.ALL,e.GET,e.POST,e.PUT,e.PATCH,e.HEAD,e.DELETE,e.OPTIONS,e.TRACE,e.CUSTOM],s=[e.PUBLISH,e.SUBSCRIBE],o=new Map;function a(e,t,r){return o.set(r?`${r}:${e}`:e,t)}function c(e,t){const r=o.get(`${t?.specType}:${e}`)||o.get(e);if(r)return r;throw new Error(`JsonSchema ${e} mapper doesn't exists`)}function p(e,t,r,s){return c(e,r)(...t,r,s)}function u(e){return o.has(e)}function h(e,t){return e.find((e=>o.has(`${t?.specType}:${e}`)))||e.find((e=>o.has(e)))}function l(e){return e.split("/").filter(Boolean).join("/")}var m=n(803);function d(e,t,r,s){var n,i=arguments.length,o=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(i<3?n(o):i>3?n(t,r,o):n(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const y=new Map;class g{constructor(e){this.isStore=!0;const{target:t,propertyKey:r,descriptor:s,index:n,decoratorType:i}=e;this.target=t,this.propertyKey=r,this.propertyName=String(r),this.descriptor=s,this.index=n,this.decoratorType=i,this.token=t,this.store=e.store,this.parent=this}get targetName(){return(0,m.nameOf)(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return(0,m.isArrayOrArrayClass)(this.collectionType)}get discriminatorAncestor(){const e=(0,m.ancestorsOf)(this.target).find((e=>g.from(e).schema.isDiscriminator));return e&&g.from(e)}get isPrimitive(){return(0,m.isPrimitiveOrPrimitiveClass)(this._type)}get isDate(){return(0,m.isDate)(this.computedType)}get isObject(){return(0,m.isObject)(this.computedType)}get isClass(){return(0,m.isClass)(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){return this.schema.isDiscriminator&&this.discriminatorAncestor?.schema.discriminator().base!==this.target}static from(...e){if(e[0].isStore)return e[0];const t=e[0];e.length>1&&(e[0]=(0,m.prototypeOf)(e[0]));const r=m.Store.from(...e);if(!r.has("JsonEntityStore")){const s=(0,m.decoratorTypeOf)(e),n=new(y.get(s))({store:r,decoratorType:s,target:(0,m.classOf)(t),propertyKey:e[1],index:"number"==typeof e[2]?e[2]:void 0,descriptor:"object"==typeof e[2]?e[2]:void 0});n.build(),r.set("JsonEntityStore",n)}return r.get("JsonEntityStore")}static fromMethod(e,t){return this.from(e,t,(0,m.descriptorOf)(e,t))}static get(e,t,r){return g.from((0,m.prototypeOf)(e),t,r)}isGetterOnly(){return(0,m.isObject)(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t)}toString(){return[this.targetName,this.propertyName,this.index].filter((e=>void 0!==e)).join(":")}buildType(e){(0,m.isCollection)(e)?this.collectionType=e:(this._type=e,this._type&&(0,m.isPlainObject)(this._type)&&(this._type=String))}getBestType(){return this.itemSchema.hasDiscriminator?this.itemSchema.discriminator().base:(0,m.isClassObject)(this.type)?this.itemSchema.getTarget():(0,m.isArrowFn)(this.type)?this.type():this.type}}function O(e){return t=>{y.set(e,t)}}const S=new Map;function b(e){return(0,m.isPromise)(e)||e===Function?Object:(0,m.isClass)(e)||(0,m.isSymbol)(e)||(0,m.isPrimitiveOrPrimitiveClass)(e)||(0,m.isClassObject)(e)||(0,m.isDate)(e)||(0,m.isCollection)(e)?(0,m.classOf)(e):(0,m.isArrowFn)(e)?e():e}const R=["string","number","integer","boolean","object","array","null","any"];function A(e){return null===e?"null":(0,m.isPrimitiveOrPrimitiveClass)(e)?R.indexOf(e)>-1?e:"string"==typeof e?"file"===e?"file":"generic":(0,m.primitiveOf)(e):e===Array?"array":(0,m.isArray)(e)?e.map(A):e===Set?"array":(0,m.isDate)(e)||(0,m.isBuffer)(e)?"string":"object"}const E=e=>(0,m.isObject)(e)&&null!==e?Object.entries(e).reduce(((e,[t,r])=>isNaN(+t)?e.concat(r):e),[]):e;function T(e){const t=e.reduce(((e,t)=>e.concat(E(t))),[]),r=t.reduce(((e,t)=>e.add((e=>null===e?"null":typeof e)(t))),new Set);return{values:(0,m.uniq)(t),types:r}}function v(e){return String(e).replace(/^(\/)(.*)(\/)$/,"$2")}class P{constructor({base:e,propertyName:t,types:r,values:s}={}){this.values=new Map,this.types=new Map,Object.assign(this,(0,m.cleanObject)({base:e,propertyName:t,types:r?new Map(r):void 0,values:s?new Map(s):void 0}))}add(e,t){return t.forEach((t=>{this.values.set(t,e)})),this.types.set(e,t),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const t=this.types.get(e);return t?t[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function C(e){return e instanceof $?e:Object.entries(e).reduce(((e,[t,r])=>(e[v(t)]=x(r),e)),{})}function x(e){return(0,m.isArray)(e)?e.map(x):e.isStore||e.$isJsonDocument||e.isLazyRef?e:(0,m.classOf)(e)!==Object&&(0,m.isClass)(e)?g.from(e).schema:(0,m.isObject)(e)?$.from(e):(0,m.isPrimitiveClass)(e)?$.from({type:e}):e}class $ extends Map{#e;#t;#r;#s;#n;#i;#o;#a;#c;#p;constructor(e={}){super(),this.$kind="schema",this.$isJsonDocument=!0,this.$hooks=new m.Hooks,this.$required=new Set,this.$allow=[],this.$forwardGroups=!1,this.$ignore=!1,this.isDiscriminatorKey=!1,this.isDiscriminator=!1,this.#e=!1,this.#t=null,this.#s=[],this.#n=new Map,this.#a=!1,this.#c=!1,this.#p=!1,e&&this.assign(e)}get alias(){return this.#n}get nestedGenerics(){return this.#s}set nestedGenerics(e){this.#s=e}get genericLabels(){return this.#r}set genericLabels(e){this.#r=e}get isClass(){return(0,m.isClass)(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(this.#o)}get isCollection(){return this.#c}get isGeneric(){return this.#a}get discriminatorAncestor(){const e=(0,m.ancestorsOf)(this.#o).find((e=>g.from(e).schema.isDiscriminator));return e&&g.from(e).schema}get hasGenerics(){return!(!this.nestedGenerics||!this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return this.#p}get isNullable(){return this.#e}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}get hasDiscriminator(){return!!this.#t}static from(e={}){return new $(e)}nullable(e){this.#e=e}itemSchema(e={}){return this.#i=this.#i||x(e),this.#i.assign(e),this.#i}getAliasOf(e){return this.#n.get(e)}addAlias(e,t){return this.#n.set(e,t),this.#n.set(t,e),this}removeAlias(e){const t=this.#n.get(e);return t&&this.#n.delete(t),this.#n.delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return this.#p=!0,super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){return"boolean"!=typeof e&&this.$hooks.on("ignore",e),this.$ignore=e,this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,this.#t=this.#t||new P({base:this.#o})}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const t=this.discriminatorAncestor.discriminator();t.add(this.#o,e),this.isDiscriminator=!0;const r=this.get("properties"),s=r[t.propertyName]||new $({type:"string"});return 1===e.length?(s.const(e[0]),s.examples([e[0]])):(s.enum(...e),s.examples(e)),r[t.propertyName]=s,this.set("properties",r),this}additionalItems(e){return super.set("additionalItems",x(e)),this}contains(e){return super.set("contains",x(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",this.#i=x(e)),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return[].concat(this.getJsonType()).includes("string")&&!this.has("minLength")&&this.minLength(1),e.forEach((e=>{switch(e){case"":this.set("minLength",void 0);break;case null:this.any(...["null"].concat(this.getJsonType(),this.$allow.map((e=>typeof e))))}})),this.$allow.push(...e),this}required(e=!0){if(!(0,m.isArray)(e)){const t=this.clone();return t.$selfRequired=e,[].concat(t.getJsonType()).includes("string")&&t.minLength(1),t}return this.$required.clear(),e.forEach((e=>this.$required.add(e))),this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",C(e)),this}addProperty(e,t){const r=this.get("properties")||{};return r[e]=t,super.set("properties",C(r)),this}patternProperties(e){return super.set("patternProperties",C(e)),this}additionalProperties(e){return super.set("additionalProperties",x(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",C(e)),this}propertyNames(e){return super.set("propertyNames",x(e)),this}enum(e,...t){if(S.has(e))return this.enum(S.get(e));if(e instanceof $)e.getName()?super.set("enum",e):super.set("enum",e.get("enum")).any(...e.get("enum").map((e=>typeof e)));else{const{values:r,types:s}=T([e,t].flat());super.set("enum",r).any(...s)}return this}definitions(e){return super.set("definitions",C(e)),this}allOf(e){return this.setManyOf("allOf",e),this}anyOf(e){return this.setManyOf("anyOf",e),this}oneOf(e){return this.setManyOf("oneOf",e),this}not(e){return super.set("not",x(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",v(e)),this}format(e){return super.set("format",e),this}type(e){switch(e){case"map":case Map:super.set("type",A(e)),this.#o=e,this.#c=!0,this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case"array":case Array:super.set("type",A(e)),this.#o=e,this.#c=!0,this.has("items")||super.set("items",this.itemSchema({}));break;case"set":case Set:super.set("type",A(e)),this.#o=e,this.#c=!0,this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":this.integer();break;case"number":case"string":case"boolean":case"object":case Object:case Date:case Boolean:case Number:case String:super.set("type",A(e)),this.#o=e,this.has("properties")||super.set("properties",{});break;default:if((0,m.isClass)(e)||(0,m.isFunction)(e))super.set("type",void 0),this.#o=e,this.has("properties")||super.set("properties",{});else{const t=A(e);"generic"===t?(this.#a=!0,super.set("$ref",e)):super.set("type",t)}}return this}any(...e){return e=e.length?e:["integer","number","string","boolean","array","object","null"],(e=(0,m.uniq)(e).map((e=>(0,m.isClass)(e)?e:{type:A(e)}))).length>1?this.anyOf(e):this.type(e[0]?.type||e[0]),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,t){return super.set(`#${e}`,t),this}toObject(e){return this.toJSON(e)}toJSON(e){return p("schema",[this],e)}assign(e={}){return(e instanceof $?[...e.entries()]:Object.entries(e)).forEach((([e,t])=>{this.set(e,t)})),e instanceof $&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach((e=>{this.$required.add(e)})),this.#t=this.#t?new P(this.#t):null,this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,this.#p=e.#p,this.#n=new Map(this.#n.entries()),e.#r&&(this.#r=[...e.#r]),this.#s=e.#s.map((e=>[...e])),this.#o=e.#o,this.#a=e.#a,this.#c=e.#c,this.#p=e.#p,this.#e=e.#e,super.set("type",e.get("type"))),this}set(e,t){return e in this?(0,m.isFunction)(this[e])&&this[e](t):super.set(e,t),this}getComputedType(){return b(this.#o)}getComputedItemType(){return this.#i?this.#i.getComputedType():this.getComputedType()}getJsonType(){return this.get("anyOf")?this.get("anyOf").map((e=>e.getJsonType())):this.get("type")||A(this.getComputedType())}getTarget(){return this.#o}getName(){return this.get("name")||((0,m.isClass)(this.#o)?(0,m.nameOf)((0,m.classOf)(this.getComputedType())):"")}clone(){return new $(this)}setManyOf(e,t){let r=t.filter((e=>"null"!==e?.type||(this.nullable(!0),!1))).map(x);if(!(1!==r.length||t[0]instanceof $||this.isNullable)){if(!r[0].hasDiscriminator)return this.type(t[0]);const e=r[0].discriminator().children();if(!e.length)return this.type(t[0]);r=e.map(x)}super.set(e,r);const s=r[0];if(s.isDiscriminator){const e=s.discriminatorAncestor.discriminator(),{propertyName:t}=e;super.set("discriminator",{propertyName:t}),this.isDiscriminator=!0,this.#t=e}}}let M=class extends g{constructor(){super(...arguments),this.children=new Map}get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=$.from({type:this.type})}};M=d([O(m.DecoratorTypes.CLASS)],M);const w=e=>Number(e)&&200<=Number(e)&&Number(e)<300,_=e=>Number(e)&&300<=Number(e)&&Number(e)<400;class N extends Map{constructor(e={}){super(),this.$kind="map",this.$isJsonDocument=!0,this.assign(e)}assign(e={}){return Object.entries(e).forEach((([e,t])=>{(0,m.isFunction)(this[e])?this[e](t):this.set(e,t)})),this}toJSON(e){return p("map",[this],e)}}function I(e){return Object.keys(e).reduce(((t,r)=>{const s=e[r];let n=typeof s,i={example:s};return"object"===n&&(i=s,i.example=void 0===i.value?i.example:i.value,delete i.value,n=typeof i.example),i.type=i.type||n,t[r]=(0,m.cleanObject)(i),t}),{})}function D(e,t=N){return Object.entries(e).reduce(((e,[r,s])=>(e.set(r,new t(s)),e)),new N)}class L extends N{constructor(){super(...arguments),this.$kind="operationMedia",this.groups=[]}schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}}class k extends N{constructor(e={}){super(e),this.$kind="operationResponse",this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",I(e)),this}content(e){return this.set("content",D(e,L)),this}getContent(){return this.get("content")}getMedia(e,t=!0){return t&&this.addMedia(e),this.getContent()?.get(e)}addMedia(e){const t=this.get("content");return t.has(e)||t.set(e,new L),this}isBinary(){return this.getContent().has("application/octet-stream")}}class j extends N{#u;#h;constructor(e={}){super({parameters:[],responses:new N,...e}),this.$kind="operation",this.operationPaths=new Map,this.#h=!1}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return this.#u}tags(e){return super.set("tags",e),this}addTags(e){return e=(0,m.uniqBy)([...this.get("tags")||[],...e],"name"),this.tags(e)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return this.#u=e,this}getStatus(){return this.#u||200}setRedirection(e=302){return this.#h=!0,this.#u=e,this}isRedirection(e){return this.#h&&e?_(e):this.#h}addResponse(e,t){if((w(e)||_(e))&&!this.#u){const t=this.getResponseOf(200);this.getResponses().set(e.toString(),t).delete("200"),this.defaultStatus(Number(e))}const r="default"===e?this.getStatus().toString():e.toString(),s=this.getResponses().get(r);return s?(t.forEach(((e,t)=>{["content"].includes(t)||s.set(t,(0,m.deepMerge)(s.get(t),e))})),s.status=Number(r)):(t.status=Number(r),this.getResponses().set(r,t)),this}getResponses(){return this.get("responses")}getResponseOf(e){return("default"===e?this.response:this.getResponses().get(String(e)))||new k}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(e,t){const r=this.get("security")||{};return r[e]=(0,m.uniq)([...r[e]||[],...t]),this.security(r)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,t){-1===e&&(e=this.get("parameters").length),this.get("parameters")[e]=t}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(e){const t=(0,m.uniq)([].concat(this.get("produces"),e)).filter(Boolean);this.set("produces",t)}addOperationPath(e,t,r={}){return this.operationPaths.set(String(e)+String(t),{...r,method:e,path:t}),this}getAllowedOperationPath(e){return e?[...this.operationPaths.values()].filter((({method:t})=>t&&e.includes(t.toUpperCase()))):[...this.operationPaths.values()]}}let H=class extends g{constructor(e){super({store:m.Store.fromMethod(e.target,e.propertyKey),descriptor:(0,m.descriptorOf)(e.target,e.propertyKey),...e}),this.parent=g.from(this.target),this.middlewares=[],this.beforeMiddlewares=[],this.afterMiddlewares=[],this.operation=new j,this.children=new Map;const{beforeMiddlewares:t=[],middlewares:r=[],afterMiddlewares:s=[]}=e;this.after(s),this.before(t),this.use(r)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(e){this.store.set("view",e)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(e){this.store.set("acceptMimes",e)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(e,t,r){return r=r||(0,m.descriptorOf)((0,m.prototypeOf)(e),t),g.from((0,m.prototypeOf)(e),t,r)}getResponseOptions(e,{contentType:t="application/json",includes:r}={}){const s=this.operation.getResponseOf(e).getMedia(t,!1);if(s&&s.has("schema")){const e=s.get("schema");let t=s.groups;return r&&s.allowedGroups?.size&&(t=[...t||[],...r.filter((e=>s.allowedGroups.has(e)))]),{type:e.getComputedItemType(),groups:t}}return{type:this.type}}before(e){return this.beforeMiddlewares=this.beforeMiddlewares.concat(e).filter(m.isFunction),this}after(e){return this.afterMiddlewares=this.afterMiddlewares.concat(e).filter(m.isFunction),this}use(e){return this.middlewares=this.middlewares.concat(e).filter(m.isFunction),this}get(e){const t=m.Store.from(this.target).get(e);return(0,m.deepMerge)(t,this.store.get(e))}getParamTypes(){return[...this.children.values()].reduce(((e,t)=>({...e,[t.paramType]:!0})),{})}build(){if(!this._type){let e=m.Metadata.getReturnType(this.target,this.propertyKey);e=(0,m.isPromise)(e)?void 0:e,this.buildType(e)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),(0,m.isCollection)(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=$.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}};H=d([O(m.DecoratorTypes.METHOD),f("design:paramtypes",[Object])],H);const G=H;var q;function B(e){return String(e).toLowerCase().replace("raw_","").replace("cookies","cookie")}function U(e){return Object.values(q).includes(B(e))}!function(e){e.BODY="body",e.PATH="path",e.QUERY="query",e.HEADER="header",e.COOKIES="cookie",e.FILES="files"}(q||(q={}));class K extends N{constructor(){super(...arguments),this.$kind="operationInParameter",this.nestedGenerics=[]}getName(){const e=this.get("name");return"files"===this.get("in")?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,t=""){return this.set("in",B(e)),this.expression=t,this}required(e){return this.set("required",e),this}schema(e){return this.$schema=e,this}toJSON(e){return p("operationInParameter",[this],e)}}let J=class extends g{constructor(e){super(e),this.parameter=new K,this.parent=g.fromMethod(this.target,this.propertyKey),this.pipes=e.pipes||[],this.paramType=e.paramType||this.paramType,this.expression=e.expression||this.expression,this.dataPath=e.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(e){this.parameter.nestedGenerics=e}get required(){return!!this.parameter.get("required")}set required(e){this.parameter.required(e)}get allowedRequiredValues(){return this.schema.$allow}static getParams(e,t){const r=[],s=(0,m.ancestorsOf)(e).reverse().find((e=>(0,m.isMethodDescriptor)(e,t)&&g.fromMethod(e,t).children.size));return s?(g.fromMethod(s,t).children.forEach(((e,t)=>{r[+t]=e})),r):[]}static get(e,t,r){return g.from((0,m.prototypeOf)(e),t,r)}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}getSchema(e){return(0,m.isCollection)(e)||!(0,m.isClass)(e)?$.from({type:e}):g.from(e).schema}build(){if(!this._type){const e=m.Metadata.getParamTypes((0,m.prototypeOf)(this.target),this.propertyKey)[this.index];this.buildType(e)}this._type=this._type||Object,this._schema||(this.parent.children.set(this.index,this),this._schema=this.getSchema(this.collectionType||this.type),this.parameter.schema(this._schema),this.collectionType&&this._schema.itemSchema(this.getSchema(this.type)),this.parent.operation.addParameter(this.index,this.parameter))}};J=d([O(m.DecoratorTypes.PARAM),f("design:paramtypes",[Object])],J);const F=J;let V=class extends g{constructor(){super(...arguments),this.parent=g.from(this.target)}get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(e){e?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}build(){this._type||this.buildType(m.Metadata.getType((0,m.prototypeOf)(this.target),this.propertyKey)),this._type=this._type||Object;let e=this.parent.schema.get("properties")[this.propertyName];e||(this.parent.children.set(this.propertyName,this),e=$.from({type:this.collectionType||this.type}),this.collectionType&&e.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,e),this._schema=e}static get(e,t){return g.from((0,m.prototypeOf)(e),t)}};V=d([O(m.DecoratorTypes.PROP)],V);const W=V;function X(...e){return g.from(...e)}y.set(m.DecoratorTypes.CLASS,M),y.set(m.DecoratorTypes.PROP,V),y.set(m.DecoratorTypes.PARAM,J),y.set(m.DecoratorTypes.METHOD,H);class z extends Map{constructor(){super(...arguments),this.$kind="operationPaths",this.$isJsonDocument=!0,this.getKey=(e,t)=>`${e}-${t}`}setOperationPath(e){const t=this.getKey(e.method,e.path);this.set(t,e)}}function Q(e){const t=e.isStore?e:X(e);return t.$inherited||(t.$inherited=(0,m.ancestorsOf)(t.target).reverse().reduce(((e,t)=>e.set(t,X(t))),new Map)),t.$inherited}function Y(e){const t=e.isStore?e:X(e);if(!t.$operations){const e=new z;t.$operations=new Map,Q(t).forEach((e=>{e.children.forEach((e=>{e instanceof H&&!t.$operations.has(e.propertyKey)&&t.$operations.set(e.propertyKey,e)}))})),t.$operations.forEach((t=>{t.operation.operationPaths.forEach((t=>{e.setOperationPath(t)}))})),e.clear()}return t.$operations}function Z(e){return!e.store.get("hidden")}const ee=[e.PUBLISH,e.SUBSCRIBE];function te(e,{channels:r,rootPath:s,...n}){const i=l(s+X(e).path);return n={...n,ctrlRootPath:i},[...Y(e).values()].filter(Z).flatMap((e=>{const t=e.operation.getAllowedOperationPath(ee);return 0===t.length?[]:t.map((t=>({operationPath:t,operationStore:e})))})).reduce(function(e){return(r,{operationPath:s,operationStore:n})=>{const i=e.ctrlRootPath||"/",o=s.method.toLowerCase(),a=(0,t.camelCase)(`${o.toLowerCase()} ${n.parent.schema.getName()}`),c=p("message",[n,s],e);return{...r,[i]:{...r[i],[o]:{...r[i]?.[o],operationId:a,message:{oneOf:[...r[i]?.[o]?.message?.oneOf||[],c]}}}}}}(n),r)}var re;function se(e,t){return t.length?1===t.length?t[0]:{[e]:t}:null}function ne(t,r,{tags:s=[],defaultTags:n=[],...i}={}){const{path:o,method:a}=r,c=String(o);let u=(0,m.getValue)(i.components,"messages."+o,(0,m.cleanObject)({description:t.operation.get("description"),summary:t.operation.get("summary")}));if(a.toUpperCase()===e.PUBLISH){const s=p("payload",[t,r],i);s&&(u.payload=s);const n=t.operation.getAllowedOperationPath([e.SUBSCRIBE]).map((e=>p("message",[t,e],i))).filter(Boolean),o=se("oneOf",n);o&&(u["x-response"]=o)}else{const e=p("response",[t,r],i);e&&(u["x-response"]=e)}return i.components.messages=i.components.messages||{},i.components.messages[c]=u,{$ref:`#/components/messages/${c}`}}function ie(e,t){return e.reduce(((e,r,s)=>e.set(r,t[s])),new Map)}function oe(e){if(e.genericLabels&&e.genericTypes){const{genericLabels:t,genericTypes:r,...s}=e;return{...s,generics:ie(t,r)}}return e}function ae(e){const[t,...r]=e.nestedGenerics;return{genericTypes:t,nestedGenerics:r}}function ce(e,r,s){const n=e.operation.get("parameters").filter((e=>U(e.get("in")))),i=(0,t.pascalCase)([r.path,r.method,"Payload"].join(" "));(0,m.setValue)(s,`components.schemas.${i}`,{});const o=n.map((e=>{const t=function(e,t={}){return{...t,groups:e.groups,groupsName:e.groupsName}}(e,s),r=p("item",[e.$schema],{...t,...ae(e)});switch(e.get("in")){case q.BODY:return r;case q.QUERY:case q.PATH:case q.HEADER:return{type:"object",properties:{[e.get("name")]:r}}}return r}),{}).filter(Boolean);return se("allOf",o)}function pe(e,r,s){const n=e.operation.getResponses(),i=[],o=[],a=[],c=[];[...n.entries()].forEach((([e,t])=>{const r=p("map",[t],s);if(i.push(+e),o.push(r.description),204!=+e){const{content:e}=r,t=e[Object.keys(e)[0]];a.push(t)}}));const u=(0,t.pascalCase)([r.path,r.method,"Response"].join(" ")),h={type:"object",properties:{status:{type:"number",enum:i},statusText:{type:"string",enum:o}},required:["status"]},l=se("oneOf",a);l&&(0,m.setValue)(h,"properties.data",l);const d=se("oneOf",c);return c.length&&(0,m.setValue)(h,"properties.error",d),(0,m.setValue)(s,`components.schemas.${u}`,h),{$ref:`#/components/schemas/${u}`}}a("channels",te),function(e){e.JSON="jsonschema",e.SWAGGER="swagger2",e.OPENAPI="openapi3",e.ASYNCAPI="asyncapi2"}(re||(re={})),a("generate",(function(e,t){const r={channels:p("channels",[e],t)};return r.tags=(0,m.uniqBy)(t.tags,"name"),t.components?.schemas&&Object.keys(t.components.schemas).length&&(r.components={...t.components,schemas:t.components.schemas}),r}),re.ASYNCAPI),a("message",ne,re.ASYNCAPI),a("payload",ce,re.ASYNCAPI),a("response",pe,re.ASYNCAPI);class ue{constructor(e){this.getType=e,this.isLazyRef=!0}get target(){return this.getType()}get schema(){return X(this.getType()).schema}get name(){return(0,m.nameOf)(this.getType())}}function he(e,r){return r.groups&&r.groups.length?(0,t.pascalCase)(`${e} ${r.groupsName||r.groups.join(" ")}`):e}function le(e,t,r){const s=function(e){const{host:t="#/"+([re.OPENAPI,re.ASYNCAPI].includes(e.specType)?"components/schemas":"definitions")}=e;return t}(r),n={$ref:`${s}/${e}`},i=t.isReadOnly,o=t.isWriteOnly;return(0,m.cleanObject)({readOnly:!!i||void 0,writeOnly:!!o||void 0,...i||o?{anyOf:[n]}:n})}function me(e,t,r){const s=he(e.getName(),r);return(0,m.setValue)(r,`components.schemas.${s}`,t),le(s,e,r)}function de(e,t={}){if("object"!=typeof e||null===e)return e;if(e instanceof ue)return p("lazyRef",[e],t);if(e instanceof $&&e.get("enum")instanceof $){const r=e.get("enum");return me(r,r.toJSON(t),t)}if(e.$kind&&e.$isJsonDocument){const r=p(h([e.$kind,"map"],t),[e],oe(t));return e.canRef?me(e,r,t):r}return p("object",[e],t)}function fe(e,t){const r=g.from(e.class),s=he(r.schema.getName()||e.getName(),t);if(e.hasGenerics){const{type:s,properties:n,additionalProperties:i,items:o,...a}=e.toJSON(t),c={...p("any",[r.schema],{...t,...ae(e),root:!1}),...a};if(c.title){const r=he(c.title,t);return(0,m.setValue)(t.components,`schemas.${r}`,c),delete c.title,le(r,e,t)}return c}return(0,m.getValue)(t,`components.schemas.${s}`)||((0,m.setValue)(t,`components.schemas.${s}`,{}),t.components.schemas[s]=p("any",[r.schema],oe({...t,root:!1}))),le(s,e,t)}function ye(e,t){const{generics:r}=t;if(r&&e.$ref&&r.has(e.$ref)){let s=r.get(e.$ref);if((0,m.isPrimitiveClass)(s))return{type:A(s)};if(s===Date)return{type:"string",format:"date-time"};if(s.toJSON)return s.toJSON({...t,generics:void 0});if(s===Object)return{type:"object"};if((0,m.isClass)(s)){const e={class:s};return 0===t.nestedGenerics.length?p("class",[e],{...t,generics:void 0}):p("schema",[g.from(e.class).schema],{...t,...ae(t),root:!1})}}return e}function ge(e,{target:t,...r}){const s=Array.from(Q(t).entries()).filter((([e])=>(0,m.classOf)(e)!==(0,m.classOf)(t)));if(s.length){const t=s.reduce(((e,[,t])=>(0,m.deepMerge)(e,p("schema",[t.schema],r))),{});e=(0,m.deepMerge)(t,e)}return e}function Oe(e,t,r){return r.inlineEnums&&e.enum?.$isJsonDocument&&(e.enum=e.enum.toJSON().enum),e.enum&&(e.type="object"===e.type||void 0===e.type?"string":e.type),e}function Se(e,t){return e&&e.isClass?p("class",[e],t):p("any",[e],t)}function be(e,t){const r=e.name;if(t.$refs?.find((t=>t===e.target)))return le(r,e.schema,t);t.$refs=[...t.$refs||[],e.target];const s=e.getType()&&p("schema",[e.schema],oe(t));return me(e.schema,s,t)}function Re(e,{ignore:t=[],...r}={}){return r=oe(r),Array.from(e.entries()).reduce(((e,[s,n])=>(t.includes(s)||(e[s]=p("item",[n],r)),e)),{})}a("any",de),a("class",fe),a("generics",ye),a("inheritedClass",ge),a("inlineEnums",Oe),a("item",Se),a("lazyRef",be),a("map",Re);const Ae=["oneOf","allOf","anyOf"],Ee=["minLength","maxLength","pattern","format"],Te=[],ve=["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf"],Pe=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains"],Ce=["maxItems","minItems","uniqueItems","items","contains","maxContains","minContains","patternProperties","dependencies"],xe=["const","enum"];function $e(e,t){return t?.isNullable?(e.discriminator||(e.$ref?e=(0,m.cleanObject)({...e,$ref:void 0,anyOf:[{type:"null"},{$ref:e.$ref}]}):Ae.some((t=>{if(e[t])if(e[t]=e[t].filter((e=>"null"!==e.type)),1===e[t].length){const r=e[t];e=(0,m.cleanObject)({...e,...r[0],[t]:void 0,type:["null",Number.isInteger(e.multipleOf)?"integer":r[0].type]})}else e[t]=[{type:"null"}].concat(e[t]).map((e=>(Number.isInteger(e.multipleOf)&&(e.type="integer"),e))),delete e.type}))),e):e}function Me(e,t){if((0,m.isBoolean)(e.$ignore)&&e.$ignore)return!0;let r=e?.$hooks?.alter("ignore",!1,[t]);return r||(!1!==t.groups?e?.$hooks?.alter("groups",!1,[t.groups]):r)}function we(e,t){const{specType:r,operationIdFormatter:s,root:n,components:i,genericTypes:o,nestedGenerics:a,useAlias:c,genericLabels:u,...h}=t;return Object.entries(e).reduce(((r,[s,n])=>{if(!1!==t.withIgnoredProps&&!Me(n,h)){const i={...t,groups:e?.$forwardGroups||n?.$forwardGroups?t.groups:void 0};r[s]=p("item",[n],i),r[s]=p("nullable",[r[s],n],i)}return r}),(0,m.isArray)(e)?[]:{})}function _e(e,t,r){return e.map((e=>p("item",[e],{...t,genericLabels:r.genericLabels})))}function Ne(e,t,r){return e.isClass?p("class",[e],t):p("any",[e],{...t,genericLabels:r.genericLabels})}function Ie(e,t,r){return!1!==r.groups?t?.$hooks?.alter("requiredGroups",e,[r.groups]):e}function De(e,t,r){if(r.groups&&r.groups.includes("partial"))return e.discriminator?{...e,required:[e.discriminator.propertyName]}:e;let s=function(e,t,r){let s=e.required||[];return s=[...s,...t.$required],t.get("properties")&&(s=Object.entries(t.get("properties")).reduce(((e,[t,r])=>r&&void 0!==r.$selfRequired?r.$selfRequired?e.concat(t):e.filter((e=>e===t)):e),s)),Ie((0,m.uniq)(s),t,r)}(e,t,r);return s=(0,m.uniq)(s).reduce(function(e,t,r={}){const{useAlias:s}=r,n=Object.keys(e.properties||{});return(e,r)=>{const i=s&&t.alias.get(r)||r;return n.includes(i)?e.concat(i):e}}(e,t,r),[]),e.discriminator&&s.push(e.discriminator.propertyName),s.length?{...e,required:s}:e}function Le(e,t){return Object.entries(e).reduce(((e,[r,s])=>(e[r=t.get(r)||r]=s,e)),{})}a("nullable",$e),a("object",we),a("anyOf",_e),a("allOf",_e),a("oneOf",_e),a("properties",Ne),a("items",Ne),a("additionalProperties",Ne),a("propertyNames",Ne),a("contains",Ne),a("dependencies",Ne),a("patternProperties",Ne),a("additionalItems",Ne),a("not",Ne),a("definitions",Ne),a("required",De);const ke={string:{properties:Ee,is:m.isString},number:{properties:ve,is:m.isNumber},boolean:{properties:Te,is:m.isBoolean},array:{properties:Pe,is:()=>!1},object:{properties:Ce,is:()=>!1}};function je(e,t,r){const s=function(e){return Ae.find((t=>e[t]))}(e);return s&&(e[s].forEach((t=>{!function(e,t,r){const s=ke[e];s?.properties.concat(xe).forEach((e=>{void 0!==t[e]&&(xe.includes(e)?r[e]=t[e].filter(s.is):(r[e]=t[e],delete t[e]))}))}(t.type,e,t)})),Ae.forEach((s=>{e[s]&&!1!==r.groups&&t.$hooks.has(s)&&(e={...e,[s]:t.$hooks.alter(s,e[s],[r.groups])})})),delete e.const,delete e.enum,e.items||e.properties||delete e.type),e}const He=["name","$required","$hooks","_nestedGenerics",re.OPENAPI,re.SWAGGER,re.JSON],Ge=["const"];function qe(e,t){const{options:r,addDef:s}=function(e){let t=!1;e||(t=!0,e={components:{schemas:{}},inlineEnums:!0});const{useAlias:r=!0,components:s={schemas:{}}}=e;return{addDef:t,options:e={...e,useAlias:r,components:s}}}(t),n=function(e,t){let r=function(e,t){const{useAlias:r}=t;return[...e.keys()].filter((e=>!function(e,{specType:t=re.JSON,customKeys:r=!1}){return He.includes(e)||e.startsWith("#")&&(!1===r||t!==re.JSON)||t!==re.JSON&&Ge.includes(e)}(e,t))).reduce(((s,n)=>{let i=e.get(n);if("type"===(n=n.replace(/^#/,"")))return{...s,[n]:e.getJsonType()};if(function(e,t,r){return"examples"===e&&(0,m.isObject)(t)&&[re.OPENAPI,re.ASYNCAPI].includes(r.specType)}(n,i,t)&&(n="example",i=Object.values(i)[0]),i&&"object"==typeof i&&u(n)){if(i=p(n,[i],t,e),function(e,t){return"object"==typeof t&&["items","properties","additionalProperties"].includes(e)&&0===Object.keys(t).length}(n,i))return s;(function(e,t,r){return"object"==typeof t&&r&&["properties","additionalProperties"].includes(e)})(n,i,r)&&(i=Le(i,e.alias))}return{...s,[n]:i}}),{})}(e,t);return e.isClass&&(r=p("inheritedClass",[r],{...t,root:!1,target:e.getComputedType()})),r=p("generics",[r],{...t,root:!1}),e.has(t.specType)&&(r={...r,...e.get(t.specType).toJSON(t)}),r=p("required",[r,e],t),r=p("nullable",[r,e],t),r=je(r,e,t),r=p("inlineEnums",[r,e],t),r}(e,r);return s&&Object.keys((0,m.getValue)(r,"components.schemas",{})).length&&(n.definitions=r.components.schemas),n}function Be(e,t){const r={paths:p("paths",[e],t={...t,specType:re.OPENAPI})};return r.tags=(0,m.uniqBy)(t.tags,"name"),Object.keys((0,m.getValue)(t,"components.schemas",{})).length&&(r.components={schemas:t.components.schemas}),r}function Ue(e,t){return t?.isNullable?e.$ref?(0,m.cleanObject)({...e,...e.$ref&&{anyOf:[{$ref:e.$ref}],type:void 0},nullable:!0,$ref:void 0}):(0,m.cleanObject)({...e,...1===e.anyOf?.length?{...e.anyOf[0],anyOf:void 0,type:Number.isInteger(e.multipleOf)?"integer":e.anyOf[0]?.type}:{type:e.anyOf?.length>1?void 0:e.type,anyOf:e.anyOf?.map((e=>(Number.isInteger(e.multipleOf)&&(e.type="integer"),e)))},nullable:!0}):e}function Ke(e,{jsonSchema:t}){const r={type:"string",format:"binary",oneOf:void 0};return"array"===t.type?(t.items=(0,m.cleanObject)({...t.items,...r}),e.schema=t,e):(e.schema=(0,m.cleanObject)({...t,...r}),e)}function Je(e,r){const s=function(e,t={}){return{...t,groups:e.groups,groupsName:e.groupsName}}(e,r),n={...s.components?.schemas||{}},{type:i,schema:o,...a}=p("map",[e],s),c=p("item",[e.$schema],{...s,...ae(e)});a.required=a.required||e.get("in")===q.PATH;const h={...s,jsonSchema:c,jsonParameter:e,oldSchemas:n},l=(0,t.camelCase)(`operationIn ${e.get("in")}`);return u(l)?p(l,[a],h):(a.schema=c,a)}function Fe(e,t){return e.flatMap((e=>p("operationInParameter",[e],t))).filter(Boolean)}function Ve(e,t){if(!t)return;let r=!1;const s=Object.entries(t).reduce(((t,[s,{value:n,description:i,...o}])=>void 0===n[e]?t:(r=!0,{...t,[s]:{...o,value:n[e],description:i}})),{});return r?s:void 0}function We(e,{jsonSchema:t,jsonParameters:r,...s}){if(t.$ref){if(!e.name)return function(e,{jsonParameter:t,...r}){const s=he(t.$schema.getName(),r),n=r.components?.schemas?.[s];return n&&!r.oldSchemas?.[s]&&delete r.components.schemas[t.$schema.getName()],Object.entries(n?.properties||{}).reduce(((t,[r,{description:s,...i}])=>[...t,(0,m.cleanObject)({...e,name:r,required:(n?.required||[]).includes(r),description:s,schema:i,style:i.$ref?"deepObject":void 0,examples:Ve(r,e.examples)})]),[])}(e,s);e.style="deepObject"}return e.schema=t,e}a("schema",qe),a("generate",Be,re.OPENAPI),a("generate",Be,re.SWAGGER),a("nullable",Ue,re.OPENAPI),a("nullable",Ue,re.SWAGGER),a("operationInFiles",Ke),a("operationInParameter",Je),a("operationInParameters",Fe),a("operationInQuery",We);var Xe=n(203),ze=n.n(Xe);const Qe=ze().codes.reduce(((e,r)=>{const s=String(ze()(r));return{...e,[String(r)]:{label:s,code:(0,t.constantCase)(s)}}}),{});function Ye(e){return Qe[e]?.code}function Ze(e){return Qe[e]?.label}function et(e,{tags:t=[],defaultTags:r=[],...s}={}){const{consumes:n,produces:i,...o}=p("map",[e],{...s,ignore:["parameters"]});o.security&&(o.security=[].concat(o.security)),0===e.get("responses").size&&(o.responses={200:{description:Ze(200)}});const a={...s,consumes:e.get("consumes")?.length?e.get("consumes"):["application/json"]},[c,u]=function(e,t){return e.get("parameters").filter((e=>U(e.get("in")))).reduce(((e,t)=>{const[r,s]=e;return[q.BODY,q.FILES].includes(t.get("in"))?[r,[...s,t]]:[[...r,t],s]}),[[],[]])}(e);o.parameters=p("operationInParameters",[c],s),u.length&&(o.requestBody=p("operationRequestBody",[u],a));const h=o.tags?.length?o.tags:r;return h.length&&(o.tags=h.map((({name:e})=>e))),t.push(...h),o}function tt(e,t){return p("map",[e],{...t,groups:[...e.groups||[]],groupsName:e.groupsName})}Qe[200].label="Success",Qe[200].code="SUCCESS",a("operation",et),a("operationMedia",tt);class rt extends N{constructor(e={}){super(e),this.$kind="operationRequestBody",this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",D(e)),this}addContent(e,t,r){const s=this.get("content"),n=new N;return n.set("schema",t),r&&n.set("examples",r),s.set(e,n),this}required(e){return this.set("required",e),this}}function st(e,{consumes:t,...r}){const{schema:s,examples:n,in:i,...o}=function(e,t){let r=new $;const s={},n=[];let i=0;const o=e.some((e=>"files"===e.get("in")));return e.forEach((e=>{const a=e.getName();[...e.entries()].filter((([e])=>!["in","name"].includes(e))).forEach((([e,t])=>{void 0===s[e]&&(s[e]=t)}));const c=p("operationInParameter",[e],t);if(a){const t={...c.schema||{type:c.type}};o&&c.description&&(t.description=c.description),r.addProperty(a,t),e.get("required")&&r.addRequired(a),i++}else n.push(c)})),i||1!==n.length?(r.type("object"),s.description&&o&&delete s.description,{schema:r.toJSON(t),required:!1,...s}):n[0]}(e,r),a=new rt(o);return t.forEach((e=>{a.addContent(e,s,n)})),p("map",[a],r)}function nt(e,t={}){const r=p("map",[e],t);return 204===e.status&&delete r.content,r.headers&&Object.entries(r.headers).forEach((([e,{type:t,...s}])=>{r.headers[e]={...s,schema:{type:t}}})),r}function it(e,t){return e.map((e=>t.parameters.find((t=>t.in===e.in&&t.name===e.name))||e)).concat(...t.parameters.filter((e=>"path"!==e.in)))}function ot(e,t=""){t instanceof RegExp&&(t=t.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],s=[];let n=!1,i="";return function(e){let t=0;return e.split("").filter((e=>{"("===e&&t++;const r=0===t;return")"===e&&t--,r})).join("").split("/").filter((e=>!!e))}(`${e}${t}`).map((e=>{const t=e.replace(":","").replace("?","");if(e.includes(":")){const o=e.includes("?");o&&!n&&(n=!0,s.push({path:i,parameters:[].concat(r)}));const{prefix:a,name:c,postfix:p}=function(e){const[t,r]=e.split("="),s=(r||t).split(".");return{prefix:r&&t?`${t}=`:"",name:s.splice(0,1)[0],postfix:s.length?`.${s.join(".")}`:""}}(t);i+=`/${a}{${c}}${p}`,r.push({in:"path",name:c,type:"string",required:!0}),o&&n&&s.push({path:i,parameters:[].concat(r)})}else i+=`/${e}`})),s.length?s:[{path:i,parameters:[].concat(r)}]}function at(e=""){const r=new Map;return(s,n,i="")=>{const o=((r,s)=>{const n=(e||"%c.%m").replace(/%c/,r).replace(/%m/,s);return""===e?(0,t.camelCase)(n):n})(s,n),a=s+n;if(!r.has(a))return r.set(a,0),o;const c=i.match(/{(\w+)}/gi);if(c){const e=s+n+c[0];if(!r.has(e))return r.set(e,0),(0,t.camelCase)(`${o} By ${c}`)}const p=r.get(a)+1;return r.set(a,p),`${o}_${p}`}}function ct(e,{store:t,operationIdFormatter:r}){return r(t.parent.schema.get("name")||t.parent.targetName,t.propertyName,e)}a("operationRequestBody",st),a("operationResponse",nt);const pt=[e.ALL,e.GET,e.POST,e.PUT,e.PATCH,e.HEAD,e.OPTIONS,e.DELETE,e.TRACE];function ut(e,{path:t,method:r,operation:s}){return{...e,[t]:{...e[t],[r.toLowerCase()]:s}}}function ht(e,{paths:t,rootPath:r,...s}){const n=l(r+X(e).path);return s={...s,ctrlRootPath:n},[...Y(e).values()].filter(Z).filter((e=>e.operation.getAllowedOperationPath(pt).length>0)).flatMap(function(e){return t=>{const r=t.operation.getAllowedOperationPath(pt);if(0===r.length)return[];const s=p("operation",[t.operation],e);return r.map((e=>({operationPath:e,operation:s,operationStore:t})))}}(s)).flatMap(function(e){return({operationPath:t,operation:r,operationStore:s})=>{const{path:n,method:i}=t;return ot(e.ctrlRootPath,n).map((({path:t,parameters:n})=>(t=t||"/",n=it(n.map((({type:e,...t})=>({...t,schema:{type:e}}))),r),{operation:{...r,parameters:n,operationId:r.operationId||ct(t,{...e,store:s})},method:i,path:t})))}}(s)).reduce(ut,t)}function lt(e){return(...t)=>{const r=e(X(...t),t);"function"==typeof r&&r(...t)}}function mt(...e){return lt((t=>{t.store.set("childrenControllers",e),e.forEach((e=>{m.Store.from(e).set("parentController",t.token)}))}))}function dt(e,...r){return lt((s=>{e=e||(0,t.snakeCase)(s.targetName),s.discriminatorAncestor&&s.schema.discriminatorValue(e,...r)}))}function ft(e,t){if(!e)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let s=!1;const n=(...n)=>{const i=g.from(...n);t&&(i.collectionType=t,i.schema.type(t)),i.type=e,i.itemSchema.type(e),i.schema.assign(r),i.isArray&&s&&(i.schema.set("contains",i.schema.get("items")),i.schema.delete("items"))};return n.MinItems=e=>(r.minItems=e,n),n.MaxItems=e=>(r.maxItems=e,n),n.MinProperties=e=>(r.minProperties=e,n),n.MaxProperties=e=>(r.maxProperties=e,n),n.Contains=()=>(s=!0,n),n.UniqueItems=(e=!0)=>(r.uniqueItems=e,n),n}function yt(e){return ft(e,Array)}function gt(e){return ft(e,Map)}function Ot(e){return ft(e).Contains()}function St(e,t){const r={};return(...s)=>{const n=(0,m.useDecorators)(t(...s));return n.Error=t=>(r.message=t,(0,m.useDecorators)(n,r.message&<((r=>{const s=r.parentSchema.get("#errorMessage")||{};"required"===e?r.parentSchema.customKey("errorMessage",(0,m.deepMerge)(s,{[e]:{[r.propertyName]:t}})):r.itemSchema.customKey("errorMessage",(0,m.deepMerge)(s,{[e]:t}))})))),n}}a("paths",ht);const bt=St("maxItems",(e=>{if(e<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return lt((t=>{t.schema.maxItems(e)}))})),Rt=St("maxProperties",(e=>{if(e<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return lt((t=>{t.isCollection?t.schema.maxProperties(e):t.itemSchema.maxProperties(e)}))})),At=St("minItems",(e=>{if(e<0)throw new Error("The value of minItems MUST be a non-negative integer.");return lt((t=>{t.schema.minItems(e)}))})),Et=St("minProperties",(e=>{if(e<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return lt((t=>{t.isCollection?t.schema.minProperties(e):t.itemSchema.minProperties(e)}))})),Tt=St("uniqueItems",((e=!0)=>lt((t=>{t.schema.uniqueItems(e)}))));function vt(e){return lt(((t,r)=>{t.itemSchema.additionalProperties(e)}))}function Pt(...e){return lt((t=>{t.itemSchema.allOf(e)}))}function Ct(e){return lt((t=>{e&&(((0,m.isClass)(e)||(0,m.isArrowFn)(e))&&(t.type=e),t.itemSchema.type(e))}))}function xt(...e){const t=e.find((e=>(0,m.isClass)(e)));return(0,m.useDecorators)(t&&Ct(t),lt(((t,r)=>{t.decoratorType===m.DecoratorTypes.PARAM&&(t.required=!0),t.decoratorType===m.DecoratorTypes.PROP&&t.parentSchema.addRequired(t.propertyName),t.schema.allow(...e)})))}function $t(...e){return lt((t=>{t.itemSchema.any(...e)}))}function Mt(...e){return lt((t=>{t.itemSchema.anyOf(e)}))}function wt(e){return lt((t=>{t.itemSchema.const(e)}))}function _t(e,t){return lt((r=>{r.itemSchema.customKey(e,t)}))}function Nt(e){return lt((t=>{Object.entries(e).forEach((([e,r])=>{t.itemSchema.customKey(e,r)}))}))}function It(e){return lt((t=>{t.itemSchema.default(e)}))}function Dt(e){return lt((t=>{const r=t.parentSchema.get("#errorMessage")||{};t.parentSchema.customKey("errorMessage",{...r,...e})}))}function Lt(e){return(0,m.useDecorators)(Dt({_:e}))}function kt(e){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.PROP:case m.DecoratorTypes.CLASS:t.schema.description(e);break;case m.DecoratorTypes.PARAM:t.parameter.description(e);break;case m.DecoratorTypes.METHOD:t.operation?.description(e)}}))}function jt(){return(0,m.useDecorators)(Ct(),lt((e=>{e.discriminatorKey()})))}const Ht=St("enum",(function(e,...t){return lt((r=>{r.itemSchema.enum(e,...t)}))}));function Gt(...e){return lt((t=>{t.schema.examples(e)}))}function qt(e){return lt((t=>{t.parameter.examples(e)}))}const Bt=St("maximum",((e,t=!1)=>lt((r=>{t?r.itemSchema.exclusiveMaximum(e):r.itemSchema.maximum(e)})))),Ut=Bt,Kt=St("exclusiveMaximum",((e,t=!0)=>Bt(e,t))),Jt=St("minimum",((e,t=!1)=>lt((r=>{t?r.itemSchema.exclusiveMinimum(e):r.itemSchema.minimum(e)})))),Ft=Jt,Vt=St("exclusiveMinimum",((e,t=!0)=>Jt(e,t)));var Wt;!function(e){e.DATE_TIME="date-time",e.DATE="date",e.TIME="time",e.EMAIL="email",e.HOSTNAME="hostname",e.IPV4="ipv4",e.IPV6="ipv6",e.URI="uri",e.URL="url",e.URI_REF="uri-reference",e.URI_TEMPLATE="uri-template",e.JSON_POINTER="json-pointer",e.RELATIVE_JSON_POINTER="relative-json-pointer",e.UUID="uuid",e.REGEX="regex"}(Wt||(Wt={}));const Xt=St("format",(e=>lt((t=>{t.itemSchema.format(e)})))),zt=St("format",(()=>Xt(Wt.EMAIL))),Qt=St("format",(()=>Xt(Wt.DATE_TIME))),Yt=St("format",(()=>Xt(Wt.DATE))),Zt=St("format",(()=>Xt(Wt.TIME))),er=St("format",(()=>Xt(Wt.URI))),tr=St("format",(()=>Xt(Wt.URL)));function rr(e=!0){return lt((t=>{t.schema.$forwardGroups=e}))}var sr=n(133),nr=n.n(sr);function ir(e,t){t=[].concat(t),e=[].concat(e);let r=new Set,s=new Set,n=new Set,i=0,o=e=>{n.add(e.output)};for(let n=0;n<t.length;n++){let a=nr()(String(t[n]),{onResult:o},!0),c=a.state.negated||a.state.negatedExtglob;c&&i++;for(let t of e){let e=a(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),s.add(e.output)))}}return!!(i===t.length?[...n]:[...s]).filter((e=>!r.has(e))).length}function or(e,t=[]){const r=e.filter((e=>e.startsWith("!"))).map((e=>e.replace("!",""))),s=e.filter((e=>!e.startsWith("!")));return!!(r.length&&t.length&&ir(r,t))||!!s.length&&!ir(e.filter((e=>!e.startsWith("!"))),t)}function ar(...e){return lt((t=>{switch(t.decoratorType){case m.DecoratorTypes.CLASS:!function(e,t){const r=Object.entries(e[0]);t.children.forEach((e=>{ar(...r.filter((([,t])=>t.includes(e.propertyName))).map((([e])=>e)))(e.target,e.propertyKey)}))}(e,t);break;case m.DecoratorTypes.PROP:_t("x-groups",e)(t.target,t.propertyKey),t.schema.$hooks.on("groups",((t,r)=>!(t||!or(e,r))||t));break;case m.DecoratorTypes.PARAM:let r="";2==e.length&&(0,m.isArray)(e[1])&&(r=e[0],e=e[1]),t.parameter.groups=e,t.parameter.groupsName=r}}))}function cr(){return(0,m.StoreSet)("hidden",!0)}function pr(e=!0){return lt((t=>{t.schema.ignore(e)}))}function ur(){return lt((e=>{e.itemSchema.type("integer")}))}const hr=St("maxLength",(e=>{if(e<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return lt((t=>{t.itemSchema.maxLength(e)}))})),lr=St("minLength",(e=>{if(e<0)throw new Error("The value of minLength MUST be a non-negative integer.");return lt((t=>{t.itemSchema.minLength(e)}))})),mr=St("multipleOf",(e=>{if(e<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return lt((t=>{t.itemSchema.multipleOf(e)}))}));function dr(e){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.CLASS:t.schema.name(e);break;case m.DecoratorTypes.PARAM:t.parameter.name(e);break;default:t.parent.schema.addAlias(r[1],e)}}))}function fr(e,...t){return t=[e,...t],(0,m.useDecorators)(1===t.length&&Ct(t[0]),$t(null,...t))}function yr(...e){return lt((t=>{t.itemSchema.oneOf(e),t.type=Object}))}function gr(){return lt((e=>{switch(e.decoratorType){case m.DecoratorTypes.PARAM:e.required=!1;break;case m.DecoratorTypes.PROP:e.parentSchema.removeRequired(e.propertyName)}}))}const Or=St("pattern",(e=>lt((t=>{t.itemSchema.pattern(e)}))));function Sr(e=!0){return lt((t=>{t.itemSchema.readOnly(e)}))}function br(e){return lt((t=>{t.schema.assign(e)}))}function Rr(e,t){return lt((r=>{r.schema.set(e,t)}))}function Ar(e,...t){return br({properties:{...t.reduce(((t,r)=>({...t,[r]:e})),{})}})}const Er=St("required",((e=!0,...t)=>e?xt(...t):gr()));function Tr(...e){return lt((t=>{t.parent.schema.$hooks.on("requiredGroups",((r,s)=>or(e,s)?r.filter((e=>e!==t.propertyKey)):r))}))}function vr(e){return lt((t=>{t.schema.title(e)}))}function Pr(e){return lt((()=>(0,m.useDecorators)(Dt({type:e}))))}function Cr(e=!0){return lt((t=>{t.itemSchema.writeOnly(e)}))}function xr(e=Object){if((0,m.isClass)(e)){const{schema:t}=X(e);return t.properties=function(t){return Object.entries(t).forEach((([t,r])=>{X(e.prototype,t).schema.assign(r)})),this},t}return $.from({type:e})}function $r(){return xr(Number)}function Mr(){return xr(Number).integer()}function wr(){return xr(String)}function _r(){return xr(Boolean)}function Nr(){return xr(Date).format(Wt.DATE)}function Ir(){return xr(Date).format(Wt.DATE_TIME)}function Dr(){return xr(Date).format(Wt.TIME)}function Lr(){return xr(String).format(Wt.EMAIL)}function kr(){return xr(String).format(Wt.URI)}function jr(){return xr(String).format(Wt.URL)}function Hr(){return xr(Array)}function Gr(){return xr(Map).unknown(!0)}function qr(){return xr(Array).uniqueItems(!0)}function Br(e={}){return xr(Object).properties(e)}function Ur(...e){return xr().any(...e)}function Kr(...e){return xr().anyOf(e)}function Jr(...e){return xr().oneOf(e)}function Fr(...e){return xr().allOf(e)}function Vr(e){try{if(e())return g.from(e()).schema}catch(e){}return new ue(e)}function Wr(e){const t=wr().enum(e);return S.set(e,t),t}function Xr(...e){const t=[e.map((e=>function(e){return(0,m.isObject)(e)&&!("toJSON"in e)}(e)?wr().enum(Object.values(e)):e))],r=(...e)=>{g.from(...e).nestedGenerics=t};return r.Nested=(...e)=>(t.push(e),r),r}function zr(...e){return t=>{g.from(t).schema.genericLabels=e}}function Qr(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.produces(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Qr(...e));break;default:throw new m.UnsupportedDecoratorType(Qr,r)}}))}function Yr(...e){return(0,m.useDecorators)(Qr(...e),(0,m.StoreSet)("acceptMimes",e))}function Zr(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.consumes(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Zr(...e));break;default:throw new m.UnsupportedDecoratorType(Zr,r)}}))}class es extends Map{constructor(e={}){super(),this.actions=[],Object.entries(e).forEach((([e,t])=>{this.set(e,t)}))}addAction(e){return this.actions.push(e),this}build(){const e=(...t)=>this.bind(t,e),r=t=>{return r=(...e)=>{t in this?this[t](...e):this.set(t,e[0])},(...t)=>(r(...t),e);var r};return this.methods.forEach((s=>{e[(0,t.pascalCase)(s)]=r(s)})),e}toObject(){return[...this.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}getMergedKey(e,t){let r=this.get(e)||t;if(r)return this.decoratorType===m.DecoratorTypes.CLASS&&(r={...r,...t||{}}),{...t||{},...r}}bind(e,t){this.entity=g.from(...e),this.beforeInit(),this.onInit(e,t),this.afterInit()}onInit(e,t){this.forEach(((e,t)=>{this.onMapKey(t,e)}))}onMapKey(e,t){this.entity.set(e,t)}runActions(){return this.actions.forEach((e=>{e(this)})),this}beforeInit(){}afterInit(){}}const ts=new Map;function rs(e,t){ts.set(e,t)}function ss(e){return ts.get(e)}function ns(e){return e.map((e=>function(e){return(0,m.isObject)(e)&&!("toJSON"in e)}(e)?wr().enum(Object.values(e)):e))}class is extends es{constructor({status:e,model:t}){super(),this.methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location","binary"],this.model(t),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&Ze(e)&&!this.get("description")&&(this.set("description",Ze(e)),this.get("model")||this.model(ss(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...I(e)}),this}header(e,t){return void 0===t&&(0,m.isString)(e)?this.headers({[e]:{type:"string"}}):this.headers({[e]:t})}location(e,t={}){return this.headers({Location:{...t,value:e}}),this}groups(...e){return 2===e.length&&(0,m.isArray)(e[1])?(this.set("groupsName",e[0]),this.set("groups",e[1])):this.set("groups",e),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const t=this.get("model");return this.checkPrimitive(t),this.checkCollection(t),this.addAction((t=>{this.get("schema").nestedGenerics.push(ns(e))})),this}of(...e){const t=this.get("model");return this.checkPrimitive(t),this.addAction((()=>{const r=this.get("schema");(0,m.isCollection)(t)?r?.itemSchema({type:e[0]}):r?.nestedGenerics.push(ns(e))})),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction((()=>{this.get("schema").assign(e)})),this}examples(e){return this.set("examples",(0,m.isString)(e)?[e]:e),this}title(e){return this.schema({title:e})}binary(){return this.type(String),this.set("contentType","application/octet-stream"),this.schema({format:"binary"}),this}checkPrimitive(e){if((0,m.isPrimitiveOrPrimitiveClass)(e))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(e){if((0,m.isCollection)(e))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const e=this.get("model");let t=this.get("contentType");return(e&&!(0,m.isPlainObject)(e)&&!(0,m.isPrimitiveOrPrimitiveClass)(e)||this.hasOfTypes)&&(t=t||"application/json"),t}getStatus(){return this.get("status")||"default"}onInit(e,t){switch((0,m.decoratorTypeOf)(e)){case m.DecoratorTypes.METHOD:this.entity=g.from(...e),this.entity.operation&&this.map();break;case m.DecoratorTypes.CLASS:this.decoratorType=m.DecoratorTypes.CLASS,(0,m.decorateMethodsOf)(e[0],t)}}map(){const e=this.get("model"),{entity:t,decoratorType:r}=this,s=this.entity.operation,n=this.getStatus(),i=s.ensureResponseOf(n),o=this.getContentType();let{description:a=i.get("description")}=this.toObject();a&&(a=r===m.DecoratorTypes.CLASS&&i.get("description")||a,i.description(a));const c=this.getMergedKey("headers",i.get("headers"));return c&&i.headers(c),this.mapMedia(i),(w(this.get("status"))||"default"===n)&&e&&(t.type=e),o&&s.addProduce(o),this.runActions()}mapMedia(e){const t=this.getContentType(),r=this.get("model"),s=e.getMedia(t||"*/*"),n=s.get("schema")||new $({type:r}),i=this.get("groups"),o=this.get("groupsName"),a=this.get("allowedGroups"),c=this.entity.operation;if(r&&((0,m.isArray)(r)?n.oneOf(r.map((e=>({type:e})))):n.type(r)),this.set("schema",n),s.schema(n),s.groups=i,s.groupsName=o,a){s.allowedGroups=a;const e=new K;e.in("query").name("includes"),e.schema($.from({type:"array",items:{type:"string",enum:[...a]}})),c.addParameter(-1,e)}const p=this.get("examples");return p&&s.examples(p),s}manyOf(e,t){const r=this.get("model");return this.hasOfTypes=!0,this.addAction((()=>{const s=this.get("schema");(0,m.isCollection)(r)?(s.type(r||Object),s.itemSchema().set(e,t)):s.set(e,t)})),this}}function os(e,t){return new is({status:e,model:t}).build()}function as(e){return os().ContentType(e)}function cs(e=!0){return lt(((t,r)=>{switch((0,m.decoratorTypeOf)(r)){case m.DecoratorTypes.METHOD:t.operation.deprecated(e);break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],cs(e));break;case m.DecoratorTypes.PARAM:t.parameter.set("deprecated",e);break;case m.DecoratorTypes.PROP:t.schema.set("deprecated",e);break;default:throw new m.UnsupportedDecoratorType(cs,r)}}))}function ps(e,t){return void 0!==t&&(e={[e]:t}),void 0===t&&(0,m.isString)(e)&&(e={[e]:{type:"string"}}),os().Headers(e)}function us(e){const t=new K,r={},s=(n,i,o)=>{const a=g.from(n,i,o);switch(a.decoratorType){case m.DecoratorTypes.PARAM:a.parameter.in(e);break;case m.DecoratorTypes.METHOD:t.in(e),a.operation.addParameter(-1,t),t.schema($.from(r));break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(n,s);break;default:throw new m.UnsupportedDecoratorType(us,[n,i,o])}};return s.Type=e=>(r.type=e,s),s.Name=e=>(t.name(e),s),s.Description=e=>(t.description(e),s),s.Required=(e=!0)=>(t.required(e),s),s.Pattern=e=>s.Schema({pattern:e.toString()}),s.Schema=e=>(Object.assign(r,e.toJSON?e.toJSON():e),s),s}function hs(e){return(...t)=>{const[r,s,n]=t,i=m.Metadata.getParamTypes(r,s)[n]===Array,o=[e="object"==typeof e?void 0:e,!i&&"0"].filter(Boolean).join(".");(0,m.useDecorators)(us(q.FILES),dr(o),(0,m.useMethodDecorators)(os(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),Zr("multipart/form-data")))(...t)}}function ls(e,t){return os().Location(e,t)}const ms=new Set([...Object.keys(e).filter((t=>t!==e.CUSTOM)).map((e=>e.toLowerCase()))]);function ds(e){let t,r;const s=e.filter((e=>"string"==typeof e&&ms.has(e.toLowerCase())?(t=e.toLocaleUpperCase(),!1):"string"==typeof e||e instanceof RegExp?(r=e||"/",!1):!!e));return{path:r,method:t,use:s}}class fs extends es{constructor(){super(...arguments),this.methods=["name","description","summary","method","id","use","useAfter","useBefore"]}beforeInit(){const t=this.get("path"),r=e[this.get("method")]||e.CUSTOM;t&&this.entity.operation.addOperationPath(r,t)}onMapKey(e,t){switch(e){case"name":case"id":return void this.entity.operation.operationId(t);case"summary":return void this.entity.operation.summary(t);case"description":return void this.entity.operation.description(t);case"use":return void this.entity.use(t);case"useAfter":return void this.entity.after(t);case"useBefore":return void this.entity.before(t)}return super.onMapKey(e,t)}}function ys(...e){const t=ds(e);return new fs(t).build()}function gs(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(gs,r);t.operation.operationId(e)}))}function Os(e,t="/"){return lt(((r,s)=>{if(r.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(Os,s);r.operation.addOperationPath(e.toUpperCase(),t)}))}function Ss(){return ar("partial")}function bs(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.CLASS)throw new m.UnsupportedDecoratorType(bs,r);t.path=e}))}function Rs(t){return ys(e.PUBLISH,t)}function As(...e){const{status:t,url:r,meta:s}=e.reduce(((e,t)=>(0,m.isNumber)(t)?(e.status=t,e):(0,m.isString)(t)?(e.url=t,e):(e.meta=t,e)),{status:302,url:"",meta:{}});return(0,m.useDecorators)(os(t).Location(r,s),lt((e=>{e.operation?.setRedirection(t)})))}function Es(t="/",...r){return ys(...[e.ALL,t].concat(r))}function Ts(t="/",...r){return ys(...[e.GET,t].concat(r))}function vs(t="/",...r){return ys(...[e.POST,t].concat(r))}function Ps(t="/",...r){return ys(...[e.PUT,t].concat(r))}function Cs(t="/",...r){return ys(...[e.DELETE,t].concat(r))}function xs(t="/",...r){return ys(...[e.HEAD,t].concat(r))}function $s(t="/",...r){return ys(...[e.PATCH,t].concat(r))}function Ms(t="/",...r){return ys(...[e.OPTIONS,t].concat(r))}function ws(e,...t){return lt(((r,s)=>{switch(r.decoratorType){case m.DecoratorTypes.METHOD:Array.isArray(e)?r.operation.security(e):r.operation.addSecurityScopes(e,t);break;case m.DecoratorTypes.CLASS:Array.isArray(e)?(0,m.decorateMethodsOf)(s[0],ws(e)):(0,m.decorateMethodsOf)(s[0],ws(e,...t));break;default:throw new m.UnsupportedDecoratorType(ws,s)}}))}function _s(e,t){return os(e,t)}function Ns(t){return ys(e.SUBSCRIBE,t)}function Is(e){return lt(((t,r)=>{if(t.decoratorType!==m.DecoratorTypes.METHOD)throw new m.UnsupportedDecoratorType(Is,r);t.operation.summary(e)}))}function Ds(...e){return lt(((t,r)=>{switch(t.decoratorType){case m.DecoratorTypes.METHOD:t.operation.addTags(function(e){return e.map((e=>"string"==typeof e?{name:e}:e))}(e));break;case m.DecoratorTypes.CLASS:(0,m.decorateMethodsOf)(r[0],Ds(...e));break;default:throw new m.UnsupportedDecoratorType(Ds,r)}}))}function Ls(e,t){return(0,m.StoreSet)("view",{path:e,options:t})}function ks(e,t){if(e instanceof RegExp||t instanceof RegExp){if(!e)return t;if(!t)return e;const r=e instanceof RegExp?e:new RegExp(e,"gi"),s=t instanceof RegExp?t:new RegExp(t,"gi");return new RegExp(r.source+s.source,(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":""))}e&&t&&e.endsWith("/")&&t.startsWith("/")&&(t=t.slice(1));const r=(e||"")+(t||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class js{constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){return this.operationPath?.path}get fullPath(){return ks(this.basePath,this.path)}get method(){return this.operationPath?.method||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}const Hs=(0,m.mergeReducerBuilder)(((e,t)=>e.type&&e.type&&e.type===t.type&&"array"===t.type?JSON.stringify(e.items)===JSON.stringify(t.items):e.type&&e.type===t.type||e.$ref&&e.$ref===t.$ref)),Gs=(0,m.mergeReducerBuilder)(((e,t)=>e.in===t.in&&e.name===t.name)),qs=(0,m.mergeReducerBuilder)(((e,t)=>!!Object.keys(t).find((t=>!!e[t])))),Bs=(0,m.mergeReducerBuilder)(((e,t)=>e.name===t.name)),Us={security:qs,parameters:Gs,oneOf:Hs,anyOf:Hs,allOf:Hs,tags:Bs};function Ks(e,t){return(0,m.deepMerge)(e,t,{reducers:Us,cleanUndefinedProps:!0})}const Js=new Map;function Fs(e,t={}){if(t={specType:re.OPENAPI,...t,tags:[],paths:{},channels:{},components:{},operationIdFormatter:t.operationIdFormatter||at(t.operationIdPattern),root:!1},(0,m.isArray)(e)){let r={};return t={...t,append(e){r=Ks(r,e)}},e.forEach((({token:e,...r})=>{const s=Fs(e,{...t,...r});t.append(s)})),r}return function(e,t,r){Js.has(e)||Js.set(e,new Map);const s=Js.get(e),n=JSON.stringify(t);return s.has(n)||s.set(n,r()),s.get(n)}(e,t,(()=>function(e,t){const r=X(e),{rootPath:s="/"}=t;return t={...t,rootPath:s,defaultTags:[(0,m.cleanObject)({name:r.schema.getName(),description:r.schema.get("description")})]},p("generate",[r],t)}(e,t)))}function Vs(e){return e.startsWith("3.")?re.OPENAPI:re.SWAGGER}function Ws(e){return"openapi"in e?re.OPENAPI:re.SWAGGER}function Xs(e){const{title:t,description:r,version:s,termsOfService:n,contact:i,license:o}=e;return(0,m.cleanObject)({version:s,title:t,description:r,termsOfService:n,contact:i,license:o})}function zs(e,{version:t,specVersion:r,acceptMimes:s=["application/json"]}){const{paths:n,security:i,tags:o,host:a,basePath:c,schemes:p,consumes:u=[],produces:h=["application/json"],definitions:l,parameters:d,responses:f,securityDefinitions:y,externalDocs:g}=e;return{swagger:r,consumes:(0,m.uniq)([...s,...u]),produces:(0,m.uniq)([...h]),info:Xs((0,m.getValue)(e,"info",{})),paths:n,host:a,basePath:c,schemes:p,definitions:l,parameters:d,responses:f,security:i,securityDefinitions:y,tags:o,externalDocs:g}}function Qs(e,{specVersion:t}){const{servers:r,paths:s,components:n,security:i,tags:o,externalDocs:a}=e;return{openapi:t,info:Xs((0,m.getValue)(e,"info",{})),servers:r,paths:s,components:n,security:i,tags:o,externalDocs:a}}function Ys(e,{fileSpec:t,acceptMimes:r,specVersion:s,version:n}){const i={specVersion:s=s||(0,m.getValue)(e,"openapi",(0,m.getValue)(e,"swagger","2.0")),acceptMimes:r};switch(Vs(s)){case re.OPENAPI:e=Qs(e,i),t=t?Qs(t,i):t;break;default:case re.SWAGGER:e=zs(e,i),t=t?zs(t,i):t}return e=Ks(e,t),(0,m.setValue)(e,"info.title",(0,m.getValue)(e,"info.title","Api documentation")),(0,m.setValue)(e,"info.version",(0,m.getValue)(e,"info.version",n)),e}const Zs=["get","put","post","delete","options","head","patch","trace"],en=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],tn=["type","items"],rn=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,sn={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function nn(e){if(Array.isArray(e))e.forEach(nn);else if("object"==typeof e)for(let t in e)"$ref"===t?e.$ref=e.$ref.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/"):nn(e[t])}function on(e){return new RegExp(rn,"i").test(e)}function an(e){const t=Object.keys(sn).map((e=>sn[e]));return Object.keys(e).filter((e=>t.indexOf(e)>-1||on(e)))}function cn(e){function t(e){const{scheme:t,type:r,name:s,bearerFormat:n,flows:i,...o}=e;switch(r){case"http":if("basic"===t)return{...o,type:t};if("bearer"===t)return{...o,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const e=Object.keys(i)[0],s=i[e];let n=e;return"clientCredentials"===n?n="application":"authorizationCode"===n&&(n="accessCode"),{type:r,flow:n,authorizationUrl:s.authorizationUrl,tokenUrl:s.tokenUrl,scopes:s.scopes}}}return Object.entries(e).reduce(((e,[r,s])=>({...e,[r]:t(s)})),{})}function pn(e){let t=e.url;const r=e.variables||{};for(const e in r){const s=r[e]||{};if(s.default){const r=RegExp(`{${e}}`,"g");t=t.replace(r,s.default)}}const s=new URL(t);return{host:s.host?s.host:void 0,basePath:s.pathname,schemes:null!==s.protocol?[s.protocol.substring(0,s.protocol.length-1)]:void 0}}class un{constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?pn(e):{}}resolveReference(e,t,r){if(!t||!t.$ref)return t;const s=t.$ref;if(s.startsWith("#")){const t=s.split("/").map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~")));t.shift();let n=e;return t.forEach((e=>{n=n[e]})),r?JSON.parse(JSON.stringify(n)):n}}convert(){const e={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,nn(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],(0,m.cleanObject)({...e,...this.spec})}convertOperations(e,t){return Object.entries(e).reduce(((e,[r,s])=>{const n=e[r]=this.resolveReference({...t,paths:e},s,!0);return this.convertParameters(n),Object.keys(n).forEach((r=>{if(Zs.indexOf(r)>=0){const s=n[r]=this.resolveReference({...t,paths:e},n[r],!0);this.convertOperationParameters(s),this.convertResponses(s)}})),e}),e)}convertOperationParameters(e){let t,r,s,n;if(e.parameters=e.parameters||[],e.requestBody){let i=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const t=an(e.requestBody.content)[0],r={content:{}},s=e.requestBody.content[t];s&&s.schema&&s.schema.$ref&&!s.schema.$ref.startsWith("#")&&(i=this.resolveReference(this.spec,s.schema,!0),r.content[`${t}`]={schema:i},i=r)}if(i.name="body",t=i.content,t&&Object.keys(t).length){if(s=Object.keys(t).filter((e=>e.indexOf("/")>0)),n=s.filter((e=>e.indexOf("*")<0)),r=an(t)[0],delete i.content,[sn.APPLICATION_X_WWW_URLENCODED,sn.MULTIPART_FORM_DATA].includes(r))if(e.consumes=n,i.in="formData",i.schema=t[r].schema,i.schema=this.resolveReference(this.spec,i.schema,!0),"object"===i.schema.type&&i.schema.properties){const t=i.schema.required||[];Object.keys(i.schema.properties).forEach((r=>{const s=i.schema.properties[r];if(!s.readOnly){const n={name:r,in:"formData",schema:s};t.indexOf(r)>=0&&(n.required=!0),e.parameters?.push(n)}}))}else e.parameters.push(i);else r?(e.consumes=n,i.in="body",i.schema=t[r].schema,e.parameters.push(i)):s&&(e.consumes=n||["application/octet-stream"],i.in="body",i.name=i.name||"file",delete i.type,i.schema=t[s[0]].schema||{type:"string",format:"binary"},e.parameters.push(i));i.schema&&this.convertSchema(i.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){void 0!==e.parameters&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach(((t,r)=>{if("body"!==(t=e.parameters[r]=this.resolveReference(this.spec,t,!1)).in){if(this.copySchemaProperties(t,en),this.copySchemaProperties(t,tn),this.copySchemaXProperties(t),!t.description){const e=this.resolveReference(this.spec,t.schema,!1);e&&e.description&&(t.description=e.description)}void 0!==t.example&&(t["x-example"]=t.example),delete t.schema,delete t.allowReserved,delete t.example}if("array"===t.type)switch(t.style||("query"===t.in||"cookie"===t.in?"form":"simple")){case"matrix":t.collectionFormat=t.explode?void 0:"csv";break;case"label":t.collectionFormat=void 0;break;case"simple":t.collectionFormat="csv";break;case"spaceDelimited":t.collectionFormat="ssv";break;case"pipeDelimited":t.collectionFormat="pipes";break;case"deepOpbject":t.collectionFormat="multi";break;case"form":t.collectionFormat=!1===t.explode?"csv":"multi"}delete t.style,delete t.explode})))}copySchemaProperties(e,t){let r=this.resolveReference(this.spec,e.schema,!0);r&&t.forEach((t=>{const s=r[t];"additionalProperties"===t&&"boolean"==typeof s||void 0!==s&&(e[t]=s)}))}copySchemaXProperties(e){let t=this.resolveReference(this.spec,e.schema,!0);t&&Object.keys(t).forEach((r=>{Reflect.hasOwnProperty.call(t,r)&&!Reflect.hasOwnProperty.call(e,r)&&r.startsWith("x-")&&(e[r]=t[r])}))}convertResponses(e){Object.keys(e.responses||{}).forEach((t=>{const r=e.responses[t]=this.resolveReference(this.spec,e.responses[t],!0);if(r.content){let t=null,s=null;if(Object.keys(r.content).forEach((n=>{const i=n.indexOf("*")<0?n:"application/octet-stream";e.produces?e.produces.indexOf(i)<0&&e.produces.push(i):e.produces=[i];const o=r.content[n];t=t||o.schema,!s&&on(i)&&(s=o.schema),o.example&&(r.examples=r.examples||{},r.examples[i]=o.example)})),t){r.schema=s||t;const e=this.resolveReference(this.spec,r.schema,!0);e&&r.schema.$ref&&!r.schema.$ref.startsWith("#")&&(r.schema=e),this.convertSchema(r.schema,"response")}}Object.keys(r.headers||{}).forEach((e=>{const t=this.resolveReference(this.spec,r.headers[e],!0);t.schema&&(t.type=t.schema.type,t.format=t.schema.format,delete t.schema),r.headers[e]=t})),delete r.content}))}convertSchema(e,t){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const r in e.allOf)this.convertSchema(e.allOf[r],t);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach((r=>{!0===e.properties[r].writeOnly&&"response"===t?delete e.properties[r]:(this.convertSchema(e.properties[r],t),delete e.properties[r].writeOnly)}));break;case"array":e.items&&this.convertSchema(e.items,t)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),void 0!==e.deprecated&&(void 0===e["x-deprecated"]&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach((e=>{this.convertSchema(this.spec.definitions[e])})),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach((t=>{const r=e[t];if("string"!=typeof r)return void console.warn(`Ignoring ${r} for ${t} in discriminator.mapping.`);let s;if(/^[a-zA-Z0-9._-]+$/.test(r))try{s=this.resolveReference(this.spec,{$ref:`#/components/schemas/${r}`},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} as schema name in discriminator.mapping: ${e}`)}if(!s)try{s=this.resolveReference(this.spec,{$ref:r},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} in discriminator.mapping: ${e}`)}s?(s["x-discriminator-value"]=t,s["x-ms-discriminator-value"]=t):console.warn(`Unable to resolve ${r} for ${t} in discriminator.mapping.`)}))}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=cn(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function hn(e){return new un(e).convert()}async function ln({tokens:e,...t}){const{version:r="1.0.0",acceptMimes:s,specPath:n,specVersion:i}=t,o=Ys((0,m.getValue)(t,"spec",{}),{fileSpec:{},version:r,specVersion:i,acceptMimes:s}),a=Ws(o),c=Ks(o,Fs(e,t));return a===re.SWAGGER?hn(c):c}const mn="$cache:schemes";function dn(e,t={}){const r=X(e),s=t.specType||re.JSON;return t={endpoint:!0,groups:[],inlineEnums:s===re.JSON,...t,specType:s,components:{schemas:{}}},"parameter"===r.decoratorType&&(t={...t,genericTypes:r.nestedGenerics[0],nestedGenerics:r.nestedGenerics,groups:r.parameter?.groups}),function(e,t){const r=e.store.get(mn)||new Map,s=function(e){return JSON.stringify(e)}(t);if(!r.has(s)){const n=p("schema",[e.schema],t);Object.keys((0,m.getValue)(t,"components.schemas",{})).length&&(n.definitions=t.components.schemas),r.set(s,n)}return e.store.set(mn,r),r.get(s)}(r,t)}function fn(e,t={}){const r=e.isStore?e:X(e),s=ks(t.basePath,r.path);let n=[];return t.withChildren&&(n=r.get("childrenControllers",[]).reduce(((e,r)=>e.concat(fn(r,{...t,basePath:s}))),n)),[...Y(e).values()].reduce(((r,n)=>{const{operation:i}=n;return i&&i.getAllowedOperationPath(t.allowedVerbs).forEach((t=>{r.push(new js({basePath:s,token:e,endpoint:n,operationPath:t}))})),r}),n)}function yn(e){const t=e.isStore?e:X(e);if(!t.$properties){const e=Q(t);t.$properties=new Map,e.forEach((e=>{e.children.forEach((e=>{t.$properties.has(e.propertyKey)||t.$properties.set(e.propertyKey,e)}))}))}return t.$properties}function gn(e,t={}){const r=yn(e),s=new Map;return r.forEach(((e,r)=>{!t.withIgnoredProps&&Me(e.itemSchema,t)||s.set(r,e)})),s}})(),i})()));
|
|
3
3
|
//# sourceMappingURL=schema.umd.min.js.map
|